Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feature(ui): add generic v3 loader component and migrate branded loader call sites (#7895)

claude[bot]f95fa0274cd5
diff --git a/DESIGN.md b/DESIGN.md
index 9ea4a8f741..90d91adeca 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -234,13 +234,15 @@ variants, sizes, and class lists, open the source or its `*.stories.tsx`
#### Feedback & loading
-| Component | Reach for this when… |
-| ---------------------------------------------------------------------------- | ---------------------------------------------------------------- |
-| [`Alert`](frontend/src/components/v3/generic/Alert/Alert.tsx) | Inline message banner inside a page or Card. |
-| [`Toast`](frontend/src/components/v3/generic/Toast/Toast.tsx) | Transient post-action feedback. Replaces `alert()`. |
-| [`Empty`](frontend/src/components/v3/generic/Empty/Empty.tsx) | Zero-state placeholder — pair with Table, list, or empty filter. |
-| [`Skeleton`](frontend/src/components/v3/generic/Skeleton/Skeleton.tsx) | Shimmer placeholder while data is loading. |
-| [`PageLoader`](frontend/src/components/v3/generic/PageLoader/PageLoader.tsx) | Centered Lottie spinner for full-page loading. |
+| Component | Reach for this when… |
+| ----------------------------------------------------------------------------- | ---------------------------------------------------------------- |
+| [`Alert`](frontend/src/components/v3/generic/Alert/Alert.tsx) | Inline message banner inside a page or Card. |
+| [`Toast`](frontend/src/components/v3/generic/Toast/Toast.tsx) | Transient post-action feedback. Replaces `alert()`. |
+| [`Empty`](frontend/src/components/v3/generic/Empty/Empty.tsx) | Zero-state placeholder — pair with Table, list, or empty filter. |
+| [`Skeleton`](frontend/src/components/v3/generic/Skeleton/Skeleton.tsx) | Shimmer placeholder while data is loading. |
+| [`Spinner`](frontend/src/components/v3/generic/Spinner/Spinner.tsx) | Neutral circle for compact inline refreshes. |
+| [`Loader`](frontend/src/components/v3/generic/Loader/Loader.tsx) | Branded loading animation — pending controls and page waits. |
+| [`PageLoader`](frontend/src/components/v3/platform/PageLoader/PageLoader.tsx) | Centered Lottie spinner for full-page loading. |
#### Atoms & domain
diff --git a/frontend/.storybook/preview.tsx b/frontend/.storybook/preview.tsx
index 9ae2d9dbfd..944df8ca71 100644
--- a/frontend/.storybook/preview.tsx
+++ b/frontend/.storybook/preview.tsx
@@ -1,4 +1,6 @@
import type { Preview } from "@storybook/react-vite";
+import { setWasmUrl } from "@lottiefiles/dotlottie-react";
+import lottieWasmUrl from "@lottiefiles/dotlottie-web/dist/dotlottie-player.wasm?url";
import { initializePlatform } from "../src/lib/fn/platform";
@@ -10,6 +12,9 @@ import "../src/index.css";
initializePlatform();
+// Mirrors main.tsx: serve the Lottie player WASM from the local module instead of a CDN.
+setWasmUrl(lottieWasmUrl);
+
const preview: Preview = {
decorators: [DocumentDecorator, RouterDecorator],
parameters: {
diff --git a/frontend/src/components/v2/Button/Button.tsx b/frontend/src/components/v2/Button/Button.tsx
index d628287b82..221dee2df9 100644
--- a/frontend/src/components/v2/Button/Button.tsx
+++ b/frontend/src/components/v2/Button/Button.tsx
@@ -2,7 +2,7 @@ import { ButtonHTMLAttributes, forwardRef, ReactNode } from "react";
import { cva, VariantProps } from "cva";
import { twMerge } from "tailwind-merge";
-import { Lottie } from "../Lottie";
+import { Loader } from "../../v3/generic/Loader";
type Props = {
children: ReactNode;
@@ -188,17 +188,15 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
})
)}
disabled={isDisabled}
+ aria-busy={isLoading || undefined}
{...props}
>
{isLoading && (
- <Lottie
- icon={
- variant === "solid" && colorSchema === "primary"
- ? "infisical_loading_bw"
- : "infisical_loading"
- }
- isAutoPlay
- className="absolute w-8 rounded-xl opacity-80 shadow-xs"
+ <Loader
+ aria-hidden
+ variant={variant === "solid" && colorSchema === "primary" ? "inverse" : "brand"}
+ size="sm"
+ className="absolute rounded-xl opacity-80 shadow-xs"
/>
)}
{leftIcon && (
diff --git a/frontend/src/components/v2/ContentLoader/ContentLoader.tsx b/frontend/src/components/v2/ContentLoader/ContentLoader.tsx
index 16a1c025ac..8a64be7dd8 100644
--- a/frontend/src/components/v2/ContentLoader/ContentLoader.tsx
+++ b/frontend/src/components/v2/ContentLoader/ContentLoader.tsx
@@ -5,7 +5,7 @@ import { useEffect, useState } from "react";
import { AnimatePresence, motion } from "framer-motion";
import { twMerge } from "tailwind-merge";
-import { Lottie } from "../Lottie";
+import { Loader } from "../../v3/generic/Loader";
type Props = {
text?: string | string[];
@@ -34,11 +34,7 @@ export const ContentLoader = ({ text, frequency = 2000, className, lottieClassNa
className
)}
>
- <Lottie
- isAutoPlay
- icon="infisical_loading"
- className={twMerge("h-32 w-32", lottieClassName)}
- />
+ <Loader variant="brand" size="lg" className={twMerge("h-32", lottieClassName)} />
{text && isTextArray && (
<AnimatePresence mode="wait">
<motion.div
diff --git a/frontend/src/components/v2/Lottie/Lottie.tsx b/frontend/src/components/v2/Lottie/Lottie.tsx
index d89d1a979f..61c67cb24b 100644
--- a/frontend/src/components/v2/Lottie/Lottie.tsx
+++ b/frontend/src/components/v2/Lottie/Lottie.tsx
@@ -1,5 +1,5 @@
-import { forwardRef, ReactNode, useRef } from "react";
-import { DotLottie, DotLottieReact, Mode } from "@lottiefiles/dotlottie-react";
+import { forwardRef, ReactNode } from "react";
+import { DotLottieReact, Mode } from "@lottiefiles/dotlottie-react";
export type LottieProps = {
// Kudos to https://itnext.io/react-polymorphic-components-with-typescript-f7ce72ea7af2
@@ -10,20 +10,16 @@ export type LottieProps = {
isAutoPlay?: boolean;
};
+// The onMouseEnter/onMouseLeave play/stop handlers were removed: this component's
+// only consumer is the router's indeterminate page loader, and an indeterminate
+// loader must not stop while the wait continues (stop() resets to frame 0, a fully
+// drawn mark that reads as a hung app until the pointer re-enters).
+// Hover-to-play icons inline their own DotLottieReact player instead.
export const Lottie = forwardRef<HTMLDivElement, LottieProps>(
({ children, icon, iconMode, isAutoPlay, ...props }, ref): JSX.Element => {
- const iconRef = useRef<DotLottie | null>(null);
return (
- <div
- onMouseEnter={() => iconRef.current?.play()}
- onMouseLeave={() => iconRef.current?.stop()}
- {...props}
- ref={ref}
- >
+ <div {...props} ref={ref}>
<DotLottieReact
- dotLottieRefCallback={(el) => {
- iconRef.current = el;
- }}
mode={iconMode}
src={`/lotties/${icon}.json`}
loop
diff --git a/frontend/src/components/v3/generic/Button/Button.tsx b/frontend/src/components/v3/generic/Button/Button.tsx
index 8adb259f4b..27568d2aa1 100644
--- a/frontend/src/components/v3/generic/Button/Button.tsx
+++ b/frontend/src/components/v3/generic/Button/Button.tsx
@@ -3,9 +3,10 @@ import { forwardRef } from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "cva";
-import { Lottie } from "@app/components/v2/Lottie";
import { cn } from "@app/components/v3/utils";
+import { Loader } from "../Loader";
+
const buttonVariants = cva(
cn(
"relative inline-flex items-center overflow-visible rounded-md active:scale-[0.99] justify-center border cursor-pointer whitespace-nowrap",
@@ -102,9 +103,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
) : (
<>
{_children}
- {isPending && (
- <Lottie icon="infisical_loading_white" isAutoPlay className="absolute w-8 rounded-xl" />
- )}
+ {isPending && <Loader aria-hidden size="sm" className="absolute rounded-xl" />}
</>
);
@@ -115,6 +114,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
data-variant={variant}
data-size={size}
type={type}
+ aria-busy={isPending || undefined}
disabled={isDisabled || isPending}
className={cn(buttonVariants({ variant, size, className, isPending, isFullWidth }))}
{...props}
diff --git a/frontend/src/components/v3/generic/IconButton/IconButton.stories.tsx b/frontend/src/components/v3/generic/IconButton/IconButton.stories.tsx
index 5d9f262475..9ad039fa4a 100644
--- a/frontend/src/components/v3/generic/IconButton/IconButton.stories.tsx
+++ b/frontend/src/components/v3/generic/IconButton/IconButton.stories.tsx
@@ -337,7 +337,7 @@ export const IsPending: Story = {
docs: {
description: {
story:
- "Use `isPending` to show a loading spinner inside the button and disable interaction. The Lottie spinner swaps to a dark version automatically for the filled `default` variant."
+ "Use `isPending` to show a loading animation inside the button and disable interaction. The `Loader` swaps to its `inverse` tint automatically for the filled `default` variant."
}
}
}
diff --git a/frontend/src/components/v3/generic/IconButton/IconButton.tsx b/frontend/src/components/v3/generic/IconButton/IconButton.tsx
index ac3dadfbc1..584267cfa2 100644
--- a/frontend/src/components/v3/generic/IconButton/IconButton.tsx
+++ b/frontend/src/components/v3/generic/IconButton/IconButton.tsx
@@ -4,9 +4,10 @@ import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "cva";
import { twMerge } from "tailwind-merge";
-import { Lottie } from "@app/components/v2/Lottie";
import { cn } from "@app/components/v3/utils";
+import { Loader } from "../Loader";
+
const iconButtonVariants = cva(
cn(
"inline-flex items-center active:scale-[0.99] justify-center border cursor-pointer whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&>svg]:shrink-0",
@@ -101,9 +102,10 @@ const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
<>
{children}
{isPending && (
- <Lottie
- icon={variant === "default" ? "infisical_loading_bw" : "infisical_loading_white"}
- isAutoPlay
+ <Loader
+ aria-hidden
+ variant={variant === "default" ? "inverse" : "default"}
+ size="xs"
className={twMerge(
"absolute rounded-xl",
size === "2xs" && "w-5",
@@ -123,6 +125,7 @@ const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
data-slot="icon-button"
type={type}
className={cn(iconButtonVariants({ variant, size, isPending }), className)}
+ aria-busy={isPending || undefined}
disabled={isPending || disabled || isDisabled}
{...props}
>
diff --git a/frontend/src/components/v3/generic/Loader/Loader.stories.tsx b/frontend/src/components/v3/generic/Loader/Loader.stories.tsx
new file mode 100644
index 0000000000..1eeec6bc49
--- /dev/null
+++ b/frontend/src/components/v3/generic/Loader/Loader.stories.tsx
@@ -0,0 +1,235 @@
+import type { Meta, StoryObj } from "@storybook/react-vite";
+import { MotionConfig } from "framer-motion";
+import { RefreshCwIcon, Trash2Icon } from "lucide-react";
+
+import { Button } from "../Button";
+import { IconButton } from "../IconButton";
+import { Loader } from "./Loader";
+
+/**
+ * `Loader` is the branded Infisical loading animation — the stroke-draw of the
+ * logo mark. It is the single source for that animation: the mark, the three
+ * tints, and the size scale all live here, and every product call site composes
+ * it rather than naming a Lottie asset itself. `main.tsx` is the deliberate
+ * exception: the entry module has to keep importing the `v2` barrel to hold
+ * `@app/context` in the entry chunk, so the router's pending component stays on
+ * `v2/Lottie`.
+ *
+ * Reach for `Loader` when the surface is Infisical's own and the wait is
+ * unmeasurable: full-page route transitions (`PageLoader`), pending `Button`
+ * and `IconButton` states, and section-level fetches inside a `Card`. Reach for
+ * `Spinner` instead for compact inline refreshes — a neutral circle in a table
+ * header or beside a row — where the brand mark would be too loud and too wide.
+ * Reach for `Skeleton` whenever the shape of the pending content is already
+ * known.
+ *
+ * The scale is expressed as **widths** because the mark is 1.91:1, not square;
+ * height follows the asset. `className` merges through `cn` and wins, so a
+ * call site sitting between steps (`w-24` for `PageLoader`) can set its own
+ * width without a new size.
+ * When the operating system requests reduced motion, the player remains on the
+ * fully drawn first frame while the status semantics continue to announce the
+ * pending state.
+ */
+const meta = {
+ title: "Generic/Loader",
+ component: Loader,
+ parameters: {
+ layout: "centered"
+ },
+ tags: ["autodocs"],
+ argTypes: {
+ variant: {
+ control: "select",
+ options: ["default", "inverse", "brand"]
+ },
+ size: {
+ control: "select",
+ options: ["xs", "sm", "md", "lg"]
+ },
+ label: {
+ control: "text"
+ },
+ className: {
+ table: { disable: true }
+ }
+ },
+ args: {
+ label: "Loading",
+ size: "md",
+ variant: "default"
+ }
+} satisfies Meta<typeof Loader>;
+
+export default meta;
+type Story = StoryObj<typeof meta>;
+
+export const Default: Story = {
+ parameters: {
+ docs: {
+ description: {
+ story:
+ "The in-product default: the white mark at `md`. Use it on any dark product surface — a `Card` body waiting on a fetch, a section that owns its own loading state. The animation loops for as long as the wait lasts, or remains on its fully drawn first frame when the operating system requests reduced motion. It carries no progress information, so pair it with copy when the wait is long enough to need explaining."
+ }
+ }
+ }
+};
+
+export const VariantDefault: Story = {
+ name: "Variant: Default",
+ args: {
+ variant: "default"
+ },
+ parameters: {
+ docs: {
+ description: {
+ story:
+ "White mark. The in-product default — correct on every dark surface in the app (`bg-page`, `bg-card`, `bg-popover`) and on tinted controls, where the button's own tint shows through around the stroke."
+ }
+ }
+ }
+};
+
+export const VariantInverse: Story = {
+ name: "Variant: Inverse",
+ decorators: [
+ (Story) => (
+ <div className="rounded-md bg-foreground p-6">
+ <Story />
+ </div>
+ )
+ ],
+ args: {
+ variant: "inverse"
+ },
+ parameters: {
+ docs: {
+ description: {
+ story:
+ "Black mark, for inverted surfaces where the foreground color is the background — the solid `default` `IconButton`, and anything else painted `bg-foreground`. Shown here on `bg-foreground`, since it is invisible against the page."
+ }
+ }
+ }
+};
+
+export const VariantBrand: Story = {
+ name: "Variant: Brand",
+ args: {
+ variant: "brand"
+ },
+ parameters: {
+ docs: {
+ description: {
+ story:
+ "The colored mark. Reserve it for brand-forward moments: the router's own pending state before the product chrome exists, full-screen `ContentLoader` waits, and connection tests that stand in for the product itself. Do not use it as a generic accent inside routine product UI."
+ }
+ }
+ }
+};
+
+export const ReducedMotion: Story = {
+ name: "State: Reduced Motion",
+ decorators: [
+ (Story) => (
+ <MotionConfig reducedMotion="always">
+ <Story />
+ </MotionConfig>
+ )
+ ],
+ parameters: {
+ docs: {
+ description: {
+ story:
+ "Forces the operating system's reduced-motion state so the loader can be reviewed without changing local accessibility settings. The mark remains on its fully drawn first frame while the loading status semantics stay available to assistive technology."
+ }
+ }
+ }
+};
+
+export const Sizes: Story = {
+ parameters: {
+ docs: {
+ description: {
+ story:
+ "Use `xs` inside compact controls, `sm` inside standard `Button` and `IconButton` pending states, `md` for a section or table body that owns its loading state, and `lg` only for a full-page or full-screen wait. Sizes are widths; pass `className` when a call site needs a width between two steps."
+ }
+ }
+ },
+ render: () => (
+ <div className="flex items-end gap-6">
+ {(["xs", "sm", "md", "lg"] as const).map((size) => (
+ <div key={size} className="flex flex-col items-center gap-2 text-xs text-muted">
+ <Loader size={size} label={`Loading ${size} example`} />
+ <span>{size}</span>
+ </div>
+ ))}
+ </div>
+ )
+};
+
+export const ExamplePendingButton: Story = {
+ name: "Example: Pending Button",
+ parameters: {
+ docs: {
+ description: {
+ story:
+ "`Button` composes `Loader` itself: set `isPending` and the label goes transparent while the `sm` mark draws over the control. Prefer `isPending` over rendering a `Loader` as a Button child — it also disables the control, which is what stops the double submit. `LDAPModal`'s Test Connection button is the one legacy exception: it swaps its label for an inline mark instead of overlaying one."
+ }
+ }
+ },
+ render: () => (
+ <div className="flex items-center gap-3">
+ <Button isPending variant="org">
+ Save Changes
+ </Button>
+ <Button isPending variant="outline">
+ Save Changes
+ </Button>
+ </div>
+ )
+};
+
+export const ExamplePendingIconButton: Story = {
+ name: "Example: Pending Icon Button",
+ parameters: {
+ docs: {
+ description: {
+ story:
+ "`IconButton` composes `Loader` the same way, sizing the mark to the control and switching to the `inverse` tint on the solid `default` variant so the stroke stays legible against `bg-foreground`. Use it for row actions and toolbar triggers that fire a mutation."
+ }
+ }
+ },
+ render: () => (
+ <div className="flex items-center gap-3">
+ <IconButton isPending aria-label="Refresh">
+ <RefreshCwIcon />
+ </IconButton>
+ <IconButton isPending variant="outline" aria-label="Refresh">
+ <RefreshCwIcon />
+ </IconButton>
+ <IconButton isPending variant="danger" aria-label="Delete">
+ <Trash2Icon />
+ </IconButton>
+ </div>
+ )
+};
+
+export const ExamplePageLoader: Story = {
+ name: "Example: Page Loader",
+ parameters: {
+ layout: "fullscreen",
+ docs: {
+ description: {
+ story:
+ "The full-page composition `PageLoader` renders: the mark centered in a `flex h-full w-full items-center justify-center` wrapper at `w-24`, between the `md` and `lg` steps. Use `PageLoader` from `@app/components/v3` rather than rebuilding this — it is what every route-level pending state already reaches for."
+ }
+ }
+ },
+ render: () => (
+ <div className="h-96 bg-page">
+ <div className="flex h-full w-full items-center justify-center">
+ <Loader className="w-24" label="Loading page" />
+ </div>
+ </div>
+ )
+};
diff --git a/frontend/src/components/v3/generic/Loader/Loader.tsx b/frontend/src/components/v3/generic/Loader/Loader.tsx
new file mode 100644
index 0000000000..bade089e25
--- /dev/null
+++ b/frontend/src/components/v3/generic/Loader/Loader.tsx
@@ -0,0 +1,76 @@
+import { type ComponentProps, useEffect, useRef } from "react";
+import { type DotLottie, DotLottieReact } from "@lottiefiles/dotlottie-react";
+import { useReducedMotionConfig } from "framer-motion";
+
+import { cn } from "../../utils";
+
+type LoaderVariant = "default" | "inverse" | "brand";
+
+type LoaderSize = "xs" | "sm" | "md" | "lg";
+
+type LoaderProps = Omit<ComponentProps<"div">, "children"> & {
+ label?: string;
+ size?: LoaderSize;
+ variant?: LoaderVariant;
+};
+
+const animationSources: Record<LoaderVariant, string> = {
+ default: "/lotties/infisical_loading_white.json",
+ inverse: "/lotties/infisical_loading_bw.json",
+ brand: "/lotties/infisical_loading.json"
+};
+
+// The mark is 1.91:1 rather than square, so the scale is expressed as widths and
+// the height follows the asset's aspect ratio.
+const sizeStyles: Record<LoaderSize, string> = {
+ xs: "w-5",
+ sm: "w-8",
+ md: "w-16",
+ lg: "w-32"
+};
+
+function Loader({
+ className,
+ label = "Loading",
+ size = "md",
+ variant = "default",
+ ...props
+}: LoaderProps) {
+ const prefersReducedMotion = Boolean(useReducedMotionConfig());
+ const animationRef = useRef<DotLottie | null>(null);
+
+ useEffect(() => {
+ if (prefersReducedMotion) {
+ animationRef.current?.stop();
+ } else {
+ animationRef.current?.play();
+ }
+ }, [prefersReducedMotion]);
+
+ return (
+ <div
+ role="status"
+ aria-label={label}
+ data-slot="loader"
+ className={cn(sizeStyles[size], className)}
+ {...props}
+ >
+ {/* The reduced-motion state intentionally stops at the fully drawn first frame,
+ preserving the loading indicator without continuous animation. */}
+ <DotLottieReact
+ dotLottieRefCallback={(animation) => {
+ animationRef.current = animation;
+ if (prefersReducedMotion) {
+ animation?.stop();
+ }
+ }}
+ src={animationSources[variant]}
+ loop
+ autoplay={!prefersReducedMotion}
+ className="h-full w-full"
+ />
+ </div>
+ );
+}
+
+export { Loader, type LoaderProps, type LoaderSize, type LoaderVariant };
diff --git a/frontend/src/components/v3/generic/Loader/index.ts b/frontend/src/components/v3/generic/Loader/index.ts
new file mode 100644
index 0000000000..f9f5a2b49f
--- /dev/null
+++ b/frontend/src/components/v3/generic/Loader/index.ts
@@ -0,0 +1 @@
+export * from "./Loader";
diff --git a/frontend/src/components/v3/generic/index.ts b/frontend/src/components/v3/generic/index.ts
index 41f87190fd..6cafe4c56b 100644
--- a/frontend/src/components/v3/generic/index.ts
+++ b/frontend/src/components/v3/generic/index.ts
@@ -29,6 +29,7 @@ export * from "./Input";
export * from "./InputGroup";
export * from "./Item";
export * from "./Label";
+export * from "./Loader";
export * from "./Pagination";
export * from "./Popover";
export * from "./RadioGroup";
diff --git a/frontend/src/components/v3/platform/PageLoader/PageLoader.tsx b/frontend/src/components/v3/platform/PageLoader/PageLoader.tsx
index 9cc97925cb..7797bdcc62 100644
--- a/frontend/src/components/v3/platform/PageLoader/PageLoader.tsx
+++ b/frontend/src/components/v3/platform/PageLoader/PageLoader.tsx
@@ -1,6 +1,5 @@
-import { twMerge } from "tailwind-merge";
-
-import { Lottie } from "@app/components/v2/Lottie";
+import { Loader } from "../../generic/Loader";
+import { cn } from "../../utils";
type PageLoaderProps = {
lottieClassName?: string;
@@ -9,11 +8,7 @@ type PageLoaderProps = {
export function PageLoader({ lottieClassName }: PageLoaderProps) {
return (
<div className="flex h-full w-full items-center justify-center">
- <Lottie
- icon="infisical_loading_white"
- isAutoPlay
- className={twMerge("w-24", lottieClassName)}
- />
+ <Loader className={cn("w-24", lottieClassName)} />
</div>
);
}
diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx
index 9349ec884c..9e72788e9c 100644
--- a/frontend/src/main.tsx
+++ b/frontend/src/main.tsx
@@ -5,6 +5,10 @@ import lottieWasmUrl from "@lottiefiles/dotlottie-web/dist/dotlottie-player.wasm
import { createRouter, RouterProvider } from "@tanstack/react-router";
import NProgress from "nprogress";
+// Load-bearing import: the entry module pulling in this barrel is what keeps
+// @app/context in the entry chunk. Pointing this at a deeper path re-partitions
+// the chunks and breaks module init order, which took the app down on boot.
+// Neither lint nor typecheck catches it, so only a real build does.
import { Lottie } from "./components/v2";
import { queryClient } from "./hooks/api/reactQuery";
import { initializePlatform } from "./lib/fn/platform";
diff --git a/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/components/CaCertificatesSection/CaCertificatesTable.tsx b/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/components/CaCertificatesSection/CaCertificatesTable.tsx
index 38993e6e1a..976f38abe6 100644
--- a/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/components/CaCertificatesSection/CaCertificatesTable.tsx
+++ b/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/components/CaCertificatesSection/CaCertificatesTable.tsx
@@ -5,7 +5,6 @@ import FileSaver from "file-saver";
import { EllipsisIcon } from "lucide-react";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { Lottie } from "@app/components/v2";
import {
Badge,
DropdownMenu,
@@ -17,6 +16,7 @@ import {
EmptyHeader,
EmptyTitle,
IconButton,
+ Loader,
Table,
TableBody,
TableCell,
@@ -43,7 +43,7 @@ export const CaCertificatesTable = ({ caId, caName }: Props) => {
if (isPending) {
return (
<div className="flex h-40 w-full items-center justify-center">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
);
}
diff --git a/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/components/CaCrlsSection/CaCrlsTable.tsx b/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/components/CaCrlsSection/CaCrlsTable.tsx
index 91592dc61d..15d8b67da9 100644
--- a/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/components/CaCrlsSection/CaCrlsTable.tsx
+++ b/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/components/CaCrlsSection/CaCrlsTable.tsx
@@ -1,7 +1,6 @@
import FileSaver from "file-saver";
import { ClipboardListIcon, DownloadIcon, EllipsisIcon } from "lucide-react";
-import { Lottie } from "@app/components/v2";
import {
DropdownMenu,
DropdownMenuContent,
@@ -11,6 +10,7 @@ import {
EmptyHeader,
EmptyTitle,
IconButton,
+ Loader,
Table,
TableBody,
TableCell,
@@ -35,7 +35,7 @@ export const CaCrlsTable = ({ caId }: Props) => {
if (isPending) {
return (
<div className="flex h-40 w-full items-center justify-center">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
);
}
diff --git a/frontend/src/pages/cert-manager/CertificateDetailsByIDPage/components/CertificateInstallationsSection.tsx b/frontend/src/pages/cert-manager/CertificateDetailsByIDPage/components/CertificateInstallationsSection.tsx
index 807eb100db..0ef8a1072e 100644
--- a/frontend/src/pages/cert-manager/CertificateDetailsByIDPage/components/CertificateInstallationsSection.tsx
+++ b/frontend/src/pages/cert-manager/CertificateDetailsByIDPage/components/CertificateInstallationsSection.tsx
@@ -2,13 +2,13 @@ import { useState } from "react";
import { useNavigate, useParams } from "@tanstack/react-router";
import { format } from "date-fns";
-import { Lottie } from "@app/components/v2";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
+ Loader,
Pagination,
Table,
TableBody,
@@ -53,7 +53,7 @@ export const CertificateInstallationsSection = ({ certificateId }: Props) => {
</CardHeader>
<CardContent>
<div className="flex h-40 w-full items-center justify-center">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
</CardContent>
</Card>
diff --git a/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/components/DiscoveryInstallationsSection.tsx b/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/components/DiscoveryInstallationsSection.tsx
index cb5ce7a50d..1aa1de6eb5 100644
--- a/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/components/DiscoveryInstallationsSection.tsx
+++ b/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/components/DiscoveryInstallationsSection.tsx
@@ -2,7 +2,6 @@ import { useState } from "react";
import { useNavigate, useParams } from "@tanstack/react-router";
import { format } from "date-fns";
-import { Lottie } from "@app/components/v2";
import {
Card,
CardContent,
@@ -13,6 +12,7 @@ import {
EmptyDescription,
EmptyHeader,
EmptyTitle,
+ Loader,
Pagination,
Table,
TableBody,
@@ -58,7 +58,7 @@ export const DiscoveryInstallationsSection = ({ discoveryId, projectId }: Props)
<CardContent className="p-0">
{isPending && (
<div className="flex h-40 w-full items-center justify-center">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
)}
{!isPending && installations.length === 0 && (
diff --git a/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/components/DiscoveryScanLogsSection.tsx b/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/components/DiscoveryScanLogsSection.tsx
index c7dd91d49b..9c086001be 100644
--- a/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/components/DiscoveryScanLogsSection.tsx
+++ b/frontend/src/pages/cert-manager/DiscoveryDetailsByIDPage/components/DiscoveryScanLogsSection.tsx
@@ -3,7 +3,7 @@ import { faSyncAlt } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { format } from "date-fns";
-import { Lottie, Tooltip } from "@app/components/v2";
+import { Tooltip } from "@app/components/v2";
import {
Button,
Card,
@@ -15,6 +15,7 @@ import {
EmptyDescription,
EmptyHeader,
EmptyTitle,
+ Loader,
Pagination,
Table,
TableBody,
@@ -76,7 +77,7 @@ export const DiscoveryScanLogsSection = ({
<CardContent className="p-0">
{isPending && (
<div className="flex h-40 w-full items-center justify-center">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
)}
{!isPending && scans.length === 0 && (
diff --git a/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupMembersSection/GroupMembersTable.tsx b/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupMembersSection/GroupMembersTable.tsx
index 44f88f2dd7..190f3a470e 100644
--- a/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupMembersSection/GroupMembersTable.tsx
+++ b/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupMembersSection/GroupMembersTable.tsx
@@ -3,7 +3,6 @@ import { ChevronDownIcon, FilterIcon, HardDriveIcon, PlusIcon, UserIcon } from "
import { twMerge } from "tailwind-merge";
import { OrgPermissionCan } from "@app/components/permissions";
-import { Lottie } from "@app/components/v2";
import {
Button,
DropdownMenu,
@@ -18,6 +17,7 @@ import {
EmptyTitle,
IconButton,
Input,
+ Loader,
Pagination,
Table,
TableBody,
@@ -119,7 +119,7 @@ export const GroupMembersTable = ({
if (isPending) {
return (
<div className="flex h-40 w-full items-center justify-center">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
);
}
diff --git a/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupProjectsSection/GroupProjectsTable.tsx b/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupProjectsSection/GroupProjectsTable.tsx
index 5e25cbdabd..585ce8c5ca 100644
--- a/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupProjectsSection/GroupProjectsTable.tsx
+++ b/frontend/src/pages/organization/GroupDetailsByIDPage/components/GroupProjectsSection/GroupProjectsTable.tsx
@@ -1,7 +1,6 @@
import { ChevronDownIcon, PlusIcon } from "lucide-react";
import { twMerge } from "tailwind-merge";
-import { Lottie } from "@app/components/v2";
import {
Button,
Empty,
@@ -10,6 +9,7 @@ import {
EmptyHeader,
EmptyTitle,
Input,
+ Loader,
Pagination,
Table,
TableBody,
@@ -99,7 +99,7 @@ export const GroupProjectsTable = ({
if (isPending) {
return (
<div className="flex h-40 w-full items-center justify-center">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
);
}
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsTable.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsTable.tsx
index de8bd6bde4..6e6f376676 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsTable.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsTable.tsx
@@ -2,7 +2,6 @@ import { useMemo } from "react";
import { ChevronDownIcon, PlusIcon } from "lucide-react";
import { twMerge } from "tailwind-merge";
-import { Lottie } from "@app/components/v2";
import {
Button,
Empty,
@@ -11,6 +10,7 @@ import {
EmptyHeader,
EmptyTitle,
Input,
+ Loader,
Pagination,
Table,
TableBody,
@@ -102,7 +102,7 @@ export const IdentityProjectsTable = ({ identityId, handlePopUpOpen }: Props) =>
return (
// scott: todo proper loader
<div className="flex h-40 w-full items-center justify-center">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
);
}
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/LDAPModal.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/LDAPModal.tsx
index c6376961b8..d0a1cd0b35 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/LDAPModal.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/LDAPModal.tsx
@@ -5,7 +5,6 @@ import { Trash2 } from "lucide-react";
import { z } from "zod";
import { createNotification } from "@app/components/notifications";
-import { Lottie } from "@app/components/v2/Lottie";
import {
AlertDialog,
AlertDialogAction,
@@ -26,6 +25,7 @@ import {
FieldLabel,
FieldTitle,
Input,
+ Loader,
Sheet,
SheetContent,
SheetFooter,
@@ -531,7 +531,7 @@ export const LDAPModal = ({ popUp, handlePopUpClose, handlePopUpToggle, hideDele
isDisabled={!watchUrl || !watchBindDN || !watchBindPass || testIsLoading}
>
{testIsLoading ? (
- <Lottie icon="infisical_loading" isAutoPlay className="mr-2 h-6 w-6" />
+ <Loader variant="brand" size="xs" className="mr-2 h-6 w-6" />
) : (
"Test Connection"
)}
diff --git a/frontend/src/pages/organization/UserDetailsByIDPage/components/UserProjectsSection/UserGroupsTable.tsx b/frontend/src/pages/organization/UserDetailsByIDPage/components/UserProjectsSection/UserGroupsTable.tsx
index 9869a0b5d2..82dd9c953c 100644
--- a/frontend/src/pages/organization/UserDetailsByIDPage/components/UserProjectsSection/UserGroupsTable.tsx
+++ b/frontend/src/pages/organization/UserDetailsByIDPage/components/UserProjectsSection/UserGroupsTable.tsx
@@ -2,13 +2,13 @@ import { useMemo } from "react";
import { ChevronDownIcon } from "lucide-react";
import { twMerge } from "tailwind-merge";
-import { Lottie } from "@app/components/v2";
import {
Empty,
EmptyDescription,
EmptyHeader,
EmptyTitle,
Input,
+ Loader,
Pagination,
Table,
TableBody,
@@ -84,7 +84,7 @@ export const UserGroupsTable = ({ handlePopUpOpen, orgMembership }: Props) => {
if (isPending) {
return (
<div className="flex h-40 w-full items-center justify-center">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
);
}
diff --git a/frontend/src/pages/organization/UserDetailsByIDPage/components/UserProjectsSection/UserProjectsTable.tsx b/frontend/src/pages/organization/UserDetailsByIDPage/components/UserProjectsSection/UserProjectsTable.tsx
index 52751ba847..3640b3d3f1 100644
--- a/frontend/src/pages/organization/UserDetailsByIDPage/components/UserProjectsSection/UserProjectsTable.tsx
+++ b/frontend/src/pages/organization/UserDetailsByIDPage/components/UserProjectsSection/UserProjectsTable.tsx
@@ -2,7 +2,6 @@ import { useMemo } from "react";
import { ChevronDownIcon, PlusIcon } from "lucide-react";
import { twMerge } from "tailwind-merge";
-import { Lottie } from "@app/components/v2";
import {
Button,
Empty,
@@ -11,6 +10,7 @@ import {
EmptyHeader,
EmptyTitle,
Input,
+ Loader,
Pagination,
Table,
TableBody,
@@ -111,7 +111,7 @@ export const UserProjectsTable = ({
if (isPending) {
return (
<div className="flex h-40 w-full items-center justify-center">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
);
}
diff --git a/frontend/src/pages/secret-manager/InsightsPage/components/CalendarCard.tsx b/frontend/src/pages/secret-manager/InsightsPage/components/CalendarCard.tsx
index b39cd48ab0..4c893476d0 100644
--- a/frontend/src/pages/secret-manager/InsightsPage/components/CalendarCard.tsx
+++ b/frontend/src/pages/secret-manager/InsightsPage/components/CalendarCard.tsx
@@ -2,7 +2,6 @@ import { useState } from "react";
import { addMonths, format, subMonths } from "date-fns";
import { ChevronLeft, ChevronRight } from "lucide-react";
-import { Lottie } from "@app/components/v2";
import {
Card,
CardAction,
@@ -10,7 +9,8 @@ import {
CardDescription,
CardHeader,
CardTitle,
- IconButton
+ IconButton,
+ Loader
} from "@app/components/v3";
import { useProject } from "@app/context";
import { useGetCalendarInsights } from "@app/hooks/api";
@@ -66,7 +66,7 @@ export const CalendarCard = () => {
/>
{isPending && (
<div className="absolute inset-0 flex items-center justify-center bg-container/40">
- <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ <Loader />
</div>
)}
</div>