Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
improvement: add additional stories, adjust/fix various components styling, add new radio group component and optimize imports to remove pulling in app deps for storybook build
Scott Wilsonce18cb820982
diff --git a/frontend/.storybook/preview.tsx b/frontend/.storybook/preview.tsxindex 0eae113de7..8fc182180c 100644--- a/frontend/.storybook/preview.tsx+++ b/frontend/.storybook/preview.tsx@@ -27,7 +27,8 @@ const preview: Preview = {backgrounds: {default: "dark",options: {- dark: { name: "Dark", value: "var(--background)" }+ dark: { name: "Dark", value: "var(--background)" },+ card: { name: "Card", value: "var(--color-card)" }}}},diff --git a/frontend/src/components/v3/generic/Alert/Alert.stories.tsx b/frontend/src/components/v3/generic/Alert/Alert.stories.tsxindex 9e7009e735..2fb1005e6c 100644--- a/frontend/src/components/v3/generic/Alert/Alert.stories.tsx+++ b/frontend/src/components/v3/generic/Alert/Alert.stories.tsx@@ -1,7 +1,14 @@import type { Meta, StoryObj } from "@storybook/react-vite";-import { CheckIcon, CircleXIcon, InfoIcon, TriangleAlertIcon } from "lucide-react";+import {+ BoxesIcon as SubOrgIcon,+ BoxIcon as ProjectIcon,+ Building2Icon as OrgIcon,+ CheckIcon,+ CircleXIcon,+ InfoIcon,+ TriangleAlertIcon+} from "lucide-react";-import { OrgIcon, ProjectIcon, SubOrgIcon } from "../../platform";import { Alert, AlertDescription, AlertTitle } from "./Alert";/**diff --git a/frontend/src/components/v3/generic/Badge/Badge.stories.tsx b/frontend/src/components/v3/generic/Badge/Badge.stories.tsxindex 230a3bd2e5..1a717de0b5 100644--- a/frontend/src/components/v3/generic/Badge/Badge.stories.tsx+++ b/frontend/src/components/v3/generic/Badge/Badge.stories.tsx@@ -4,6 +4,9 @@ import {AlertTriangleIcon,AsteriskIcon,BanIcon,+ BoxesIcon as SubOrgIcon,+ BoxIcon as ProjectIcon,+ Building2Icon as OrgIcon,CheckIcon,ChevronsUpDownIcon,CircleXIcon,@@ -15,7 +18,6 @@ import {UserIcon} from "lucide-react";-import { OrgIcon, ProjectIcon, SubOrgIcon } from "../../platform";import { ButtonGroup } from "../ButtonGroup";import { Badge } from "./Badge";diff --git a/frontend/src/components/v3/generic/Breadcrumb/Breadcrumb.stories.tsx b/frontend/src/components/v3/generic/Breadcrumb/Breadcrumb.stories.tsxindex 4be04ed19a..689c05d8bd 100644--- a/frontend/src/components/v3/generic/Breadcrumb/Breadcrumb.stories.tsx+++ b/frontend/src/components/v3/generic/Breadcrumb/Breadcrumb.stories.tsx@@ -1,80 +1,369 @@-import { ReactNode } from "react";import type { Meta, StoryObj } from "@storybook/react-vite";-import { MoreHorizontal } from "lucide-react";+import { Link } from "@tanstack/react-router";+import { FolderIcon, HomeIcon, MoreHorizontalIcon, SlashIcon } from "lucide-react";import {- BreadcrumbLink,- BreadcrumbPage,DropdownMenu,DropdownMenuContent,DropdownMenuItem,- DropdownMenuTrigger,- IconButton-} from "@app/components/v3/generic";--import { Breadcrumb, BreadcrumbItem, BreadcrumbList, BreadcrumbSeparator } from "./Breadcrumb";--function BreadcrumbDemo({ children }: { children: ReactNode }) {- return (- <Breadcrumb>- <BreadcrumbList>{children}</BreadcrumbList>- </Breadcrumb>- );-}+ DropdownMenuTrigger+} from "../Dropdown";+import { IconButton } from "../IconButton";+import {+ Breadcrumb,+ BreadcrumbEllipsis,+ BreadcrumbItem,+ BreadcrumbLink,+ BreadcrumbList,+ BreadcrumbPage,+ BreadcrumbSeparator+} from "./Breadcrumb";+/**+ * `Breadcrumb` is the navigation primitive for showing a user's location inside a+ * nested hierarchy — projects, folders, settings categories, anything tree-shaped.+ * Compose it from `Breadcrumb` (the `<nav>` wrapper), `BreadcrumbList`,+ * `BreadcrumbItem`, `BreadcrumbLink` (clickable parents), `BreadcrumbPage` (the+ * current location, non-clickable), `BreadcrumbSeparator`, and `BreadcrumbEllipsis`.+ *+ * **Anatomy rules**: every trail starts with a list of `BreadcrumbItem`s separated+ * by `BreadcrumbSeparator`s, and ends in a single `BreadcrumbPage` for the active+ * location. Use `BreadcrumbLink asChild` to slot in a router `Link` so the row+ * stays an SPA-style navigation. The default separator is a chevron — pass any+ * children to `BreadcrumbSeparator` to swap it (slashes, dots, custom icons).+ *+ * **When to reach for it**: any deep page that has a meaningful parent chain.+ * Skip it on top-level pages where there is nothing to navigate up to.+ */const meta = {title: "Generic/Breadcrumb",- component: BreadcrumbDemo,+ component: Breadcrumb,parameters: {layout: "centered"},tags: ["autodocs"]-} satisfies Meta<typeof BreadcrumbDemo>;+} satisfies Meta<typeof Breadcrumb>;export default meta;type Story = StoryObj<typeof meta>;-export const SecretsManagement: Story = {- name: "Example: Secrets Management",- args: {- children: (- <>+export const Default: Story = {+ name: "Anatomy: Default",+ parameters: {+ docs: {+ description: {+ story:+ "The baseline — a list of `BreadcrumbLink`s separated by the default chevron, terminating in a `BreadcrumbPage` for the current location. This is the structure to start from for every trail."+ }+ }+ },+ render: () => (+ <Breadcrumb>+ <BreadcrumbList>+ <BreadcrumbItem>+ <BreadcrumbLink href="#">Projects</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbLink href="#">Acme</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbPage>Secrets</BreadcrumbPage>+ </BreadcrumbItem>+ </BreadcrumbList>+ </Breadcrumb>+ )+};++export const CurrentPageOnly: Story = {+ name: "Anatomy: Current Page Only",+ parameters: {+ docs: {+ description: {+ story:+ 'When there is no parent worth surfacing, render a single `BreadcrumbPage`. It still emits the right ARIA — `aria-current="page"` — so screen readers announce the location, even without a trail.'+ }+ }+ },+ render: () => (+ <Breadcrumb>+ <BreadcrumbList>+ <BreadcrumbItem>+ <BreadcrumbPage>Settings</BreadcrumbPage>+ </BreadcrumbItem>+ </BreadcrumbList>+ </Breadcrumb>+ )+};++export const CustomSeparatorSlash: Story = {+ name: "Variant: Slash Separator",+ parameters: {+ docs: {+ description: {+ story:+ "Pass any children to `BreadcrumbSeparator` to override the default chevron. A rotated `SlashIcon` reads as a path delimiter — handy for file-system-flavoured trails (folder paths, secret paths, repo URLs)."+ }+ }+ },+ render: () => (+ <Breadcrumb>+ <BreadcrumbList>+ <BreadcrumbItem>+ <BreadcrumbLink href="#">infra</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator>+ <SlashIcon className="-rotate-12" />+ </BreadcrumbSeparator>+ <BreadcrumbItem>+ <BreadcrumbLink href="#">prod</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator>+ <SlashIcon className="-rotate-12" />+ </BreadcrumbSeparator>+ <BreadcrumbItem>+ <BreadcrumbPage>postgres</BreadcrumbPage>+ </BreadcrumbItem>+ </BreadcrumbList>+ </Breadcrumb>+ )+};++export const CustomSeparatorDot: Story = {+ name: "Variant: Dot Separator",+ parameters: {+ docs: {+ description: {+ story:+ "A middle dot reads as a quieter, more typographic delimiter — good for breadcrumbs that sit alongside body copy or status text where chevrons would feel too directional."+ }+ }+ },+ render: () => (+ <Breadcrumb>+ <BreadcrumbList>+ <BreadcrumbItem>+ <BreadcrumbLink href="#">Audit logs</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator>·</BreadcrumbSeparator>+ <BreadcrumbItem>+ <BreadcrumbLink href="#">2026-04</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator>·</BreadcrumbSeparator>+ <BreadcrumbItem>+ <BreadcrumbPage>Event 18a3-9c</BreadcrumbPage>+ </BreadcrumbItem>+ </BreadcrumbList>+ </Breadcrumb>+ )+};++export const WithLeadingIcon: Story = {+ name: "Example: With Leading Icon",+ parameters: {+ docs: {+ description: {+ story:+ "Drop an icon inside a `BreadcrumbLink` to anchor the trail visually — a home icon for the org root, a folder icon for a tree's root, or a product mark for a multi-product workspace. Pair with a sibling label or use the icon alone (with `aria-label`) to save horizontal space."+ }+ }+ },+ render: () => (+ <Breadcrumb>+ <BreadcrumbList>+ <BreadcrumbItem>+ <BreadcrumbLink href="#" aria-label="Home">+ <HomeIcon />+ </BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbLink href="#">Acme</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbPage>Members</BreadcrumbPage>+ </BreadcrumbItem>+ </BreadcrumbList>+ </Breadcrumb>+ )+};++export const WithEllipsis: Story = {+ name: "Example: Static Ellipsis",+ parameters: {+ docs: {+ description: {+ story:+ "Use `BreadcrumbEllipsis` between segments to indicate that the middle of the trail has been collapsed for space. This is the static, non-interactive variant — pair it with the *Collapsed With Dropdown* pattern below when the hidden segments need to remain reachable."+ }+ }+ },+ render: () => (+ <Breadcrumb>+ <BreadcrumbList>+ <BreadcrumbItem>+ <BreadcrumbLink href="#">Projects</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbEllipsis />+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbLink href="#">infra</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbPage>vars</BreadcrumbPage>+ </BreadcrumbItem>+ </BreadcrumbList>+ </Breadcrumb>+ )+};++export const AsRouterLink: Story = {+ name: "Example: As Router Link (asChild)",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `asChild` to `BreadcrumbLink` and slot in a TanStack `<Link>` so each parent crumb stays an SPA navigation rather than a full-page reload. This is the default pattern for in-app trails."+ }+ }+ },+ render: () => (+ <Breadcrumb>+ <BreadcrumbList><BreadcrumbItem><BreadcrumbLink asChild>- <a href="/">root</a>+ <Link to=".">Organization</Link></BreadcrumbLink></BreadcrumbItem><BreadcrumbSeparator /><BreadcrumbItem><BreadcrumbLink asChild>- <a href="/">api</a>+ <Link to=".">Projects</Link></BreadcrumbLink></BreadcrumbItem><BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbPage>Acme</BreadcrumbPage>+ </BreadcrumbItem>+ </BreadcrumbList>+ </Breadcrumb>+ )+};++export const CollapsedWithDropdown: Story = {+ name: "Example: Collapsed With Dropdown",+ parameters: {+ docs: {+ description: {+ story:+ "When a path is too long to fit, swap the middle segments for a `DropdownMenu` triggered by a `BreadcrumbEllipsis` (or kebab `IconButton`). This keeps every parent reachable in one click while the trail collapses to first → ellipsis → last. This is the canonical pattern for deep folder paths."+ }+ }+ },+ render: () => (+ <Breadcrumb>+ <BreadcrumbList>+ <BreadcrumbItem>+ <BreadcrumbLink href="#" aria-label="Root">+ <FolderIcon />+ </BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator>+ <SlashIcon className="-rotate-12" />+ </BreadcrumbSeparator>+ <BreadcrumbItem>+ <BreadcrumbLink href="#">api</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator>+ <SlashIcon className="-rotate-12" />+ </BreadcrumbSeparator><BreadcrumbItem><DropdownMenu><DropdownMenuTrigger asChild>- <IconButton size="xs" variant="ghost">- <MoreHorizontal />+ <IconButton size="xs" variant="ghost" aria-label="Show hidden folders">+ <MoreHorizontalIcon /></IconButton></DropdownMenuTrigger><DropdownMenuContent align="start">- <DropdownMenuItem>/logging</DropdownMenuItem>- <DropdownMenuItem>/data-dog</DropdownMenuItem>+ <DropdownMenuItem>+ <FolderIcon /> services+ </DropdownMenuItem>+ <DropdownMenuItem>+ <FolderIcon /> auth+ </DropdownMenuItem>+ <DropdownMenuItem>+ <FolderIcon /> integrations+ </DropdownMenuItem></DropdownMenuContent></DropdownMenu></BreadcrumbItem>- <BreadcrumbSeparator />+ <BreadcrumbSeparator>+ <SlashIcon className="-rotate-12" />+ </BreadcrumbSeparator><BreadcrumbItem>- <BreadcrumbLink asChild>- <a href="/docs/components">config</a>- </BreadcrumbLink>+ <BreadcrumbLink href="#">config</BreadcrumbLink></BreadcrumbItem>- <BreadcrumbSeparator />+ <BreadcrumbSeparator>+ <SlashIcon className="-rotate-12" />+ </BreadcrumbSeparator><BreadcrumbItem><BreadcrumbPage>vars</BreadcrumbPage></BreadcrumbItem>- </>+ </BreadcrumbList>+ </Breadcrumb>+ )+};++export const LongPath: Story = {+ name: "Example: Long Path",+ decorators: [+ (Story) => (+ <div className="w-[420px]">+ <Story />+ </div>)- }+ ],+ parameters: {+ docs: {+ description: {+ story:+ "`BreadcrumbList` is a wrapping flex row, so a path that doesn't fit will flow onto a second line rather than overflow. Constrain the parent's width when previewing wrap behavior — the page chrome will impose its own bound in production."+ }+ }+ },+ render: () => (+ <Breadcrumb>+ <BreadcrumbList>+ <BreadcrumbItem>+ <BreadcrumbLink href="#">Organization</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbLink href="#">Acme Corporation</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbLink href="#">Projects</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbLink href="#">Production Secrets</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbLink href="#">Database</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbSeparator />+ <BreadcrumbItem>+ <BreadcrumbPage>Connection strings</BreadcrumbPage>+ </BreadcrumbItem>+ </BreadcrumbList>+ </Breadcrumb>+ )};diff --git a/frontend/src/components/v3/generic/Button/Button.stories.tsx b/frontend/src/components/v3/generic/Button/Button.stories.tsxindex 1d4d0a8524..e21d0a16d8 100644--- a/frontend/src/components/v3/generic/Button/Button.stories.tsx+++ b/frontend/src/components/v3/generic/Button/Button.stories.tsx@@ -2,6 +2,9 @@ import type { Meta, StoryObj } from "@storybook/react-vite";import { Link } from "@tanstack/react-router";import {ArrowLeftIcon,+ BoxesIcon as SubOrgIcon,+ BoxIcon as ProjectIcon,+ Building2Icon as OrgIcon,CheckIcon,CircleXIcon,ExternalLinkIcon,@@ -10,7 +13,6 @@ import {TriangleAlertIcon} from "lucide-react";-import { OrgIcon, ProjectIcon, SubOrgIcon } from "../../platform";import { Button } from "./Button";/**diff --git a/frontend/src/components/v3/generic/Button/Button.tsx b/frontend/src/components/v3/generic/Button/Button.tsxindex 075b7850e0..a69ed19935 100644--- a/frontend/src/components/v3/generic/Button/Button.tsx+++ b/frontend/src/components/v3/generic/Button/Button.tsx@@ -3,7 +3,7 @@ import { forwardRef } from "react";import { Slot } from "@radix-ui/react-slot";import { cva, type VariantProps } from "cva";-import { Lottie } from "@app/components/v2";+import { Lottie } from "@app/components/v2/Lottie";import { cn } from "@app/components/v3/utils";const buttonVariants = cva(diff --git a/frontend/src/components/v3/generic/Calendar/Calendar.stories.tsx b/frontend/src/components/v3/generic/Calendar/Calendar.stories.tsxindex dd7687440c..dc8fd515db 100644--- a/frontend/src/components/v3/generic/Calendar/Calendar.stories.tsx+++ b/frontend/src/components/v3/generic/Calendar/Calendar.stories.tsx@@ -1,7 +1,10 @@import { useState } from "react";import type { DateRange } from "react-day-picker";import type { Meta, StoryObj } from "@storybook/react-vite";+import { CalendarIcon } from "lucide-react";+import { Button } from "../Button";+import { Popover, PopoverContent, PopoverTrigger } from "../Popover";import { Calendar } from "./Calendar";/**@@ -172,3 +175,35 @@ export const DisabledDates: Story = {},render: () => <DisabledDatesStory />};++const InPopoverStory = () => {+ const [selected, setSelected] = useState<Date | undefined>();+ return (+ <Popover>+ <PopoverTrigger asChild>+ <Button variant="outline" className="w-56 justify-start">+ <CalendarIcon />+ {selected+ ? selected.toLocaleDateString(undefined, { dateStyle: "medium" })+ : "Pick a date"}+ </Button>+ </PopoverTrigger>+ <PopoverContent className="w-auto p-0" align="start">+ <Calendar mode="single" selected={selected} onSelect={setSelected} />+ </PopoverContent>+ </Popover>+ );+};++export const InPopover: Story = {+ name: "Example: In Popover",+ parameters: {+ docs: {+ description: {+ story:+ 'The canonical date-picker pattern: a `Button` shows the selected date, clicking it opens the `Calendar` in a `Popover`. Set `className="w-auto p-0"` on `PopoverContent` so the calendar\'s own padding controls the layout (the popover\'s default padding would double-pad the grid). Use `align="start"` so the popover anchors to the trigger\'s leading edge.'+ }+ }+ },+ render: () => <InPopoverStory />+};diff --git a/frontend/src/components/v3/generic/Checkbox/Checkbox.stories.tsx b/frontend/src/components/v3/generic/Checkbox/Checkbox.stories.tsxindex 6975041979..1459ec6e6a 100644--- a/frontend/src/components/v3/generic/Checkbox/Checkbox.stories.tsx+++ b/frontend/src/components/v3/generic/Checkbox/Checkbox.stories.tsx@@ -1,5 +1,17 @@+import { useState } from "react";import type { Meta, StoryObj } from "@storybook/react-vite";+import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldGroup,+ FieldLegend,+ FieldSet,+ FieldTitle+} from "../Field";+import { Label } from "../Label";import { Checkbox } from "./Checkbox";/**@@ -36,7 +48,10 @@ const meta = {control: "boolean"}},- args: { isChecked: false, isDisabled: false }+ args: { isChecked: false, isDisabled: false },+ globals: {+ backgrounds: { value: "card" }+ }} satisfies Meta<typeof Checkbox>;export default meta;@@ -207,3 +222,137 @@ export const Disabled: Story = {}}};++export const Indeterminate: Story = {+ name: "State: Indeterminate",+ args: {+ variant: "outline",+ isIndeterminate: true+ },+ parameters: {+ docs: {+ description: {+ story:+ "Pass `isIndeterminate` for the mixed-selection state — used by parent checkboxes when only some children are selected. The minus icon replaces the check, signaling 'partial' rather than 'on' or 'off'."+ }+ }+ }+};++export const WithLabel: Story = {+ name: "Example: With Label",+ parameters: {+ docs: {+ description: {+ story:+ "The minimum accessible pairing — a `Label` whose `htmlFor` matches the `Checkbox`'s `id`. Clicking the label toggles the checkbox."+ }+ }+ },+ render: () => (+ <div className="flex w-80 items-center gap-3">+ <Checkbox id="checkbox-terms" />+ <Label htmlFor="checkbox-terms">I agree to the terms of service</Label>+ </div>+ )+};++export const WithDescription: Story = {+ name: "Example: With Description",+ parameters: {+ docs: {+ description: {+ story:+ "Pair a `Checkbox` with `FieldTitle` and `FieldDescription` inside a horizontal `Field` for the canonical settings-row layout — checkbox on the left, title and helper text on the right."+ }+ }+ },+ render: () => (+ <Field orientation="horizontal" className="w-[420px]">+ <Checkbox id="checkbox-deploy" defaultChecked />+ <FieldContent>+ <FieldTitle>Deploy events</FieldTitle>+ <FieldDescription>+ Email me when a deploy completes, fails, or is rolled back.+ </FieldDescription>+ </FieldContent>+ </Field>+ )+};++function WithValidationErrorRender() {+ const [accepted, setAccepted] = useState(false);+ return (+ <Field className="w-[420px]">+ <Field orientation="horizontal">+ <Checkbox+ id="checkbox-terms-required"+ isChecked={accepted}+ onCheckedChange={(next) => setAccepted(next === true)}+ isError={!accepted}+ />+ <FieldContent>+ <FieldTitle>I agree to the terms of service</FieldTitle>+ <FieldDescription>+ By checking this box you consent to our terms and privacy policy.+ </FieldDescription>+ </FieldContent>+ </Field>+ {!accepted && <FieldError>You must accept the terms to continue.</FieldError>}+ </Field>+ );+}++export const WithValidationError: Story = {+ name: "Example: With Validation Error",+ parameters: {+ docs: {+ description: {+ story:+ 'Setting `isError` flips `aria-invalid="true"` on the `Checkbox`, which paints the danger border and lets assistive tech announce the error — same contract as `Input`. Pair with a `FieldError` for required-acknowledgement flows (terms, policies, destructive confirmations); the error clears as soon as the user checks the box.'+ }+ }+ },+ render: () => <WithValidationErrorRender />+};++export const InFieldSet: Story = {+ name: "Example: In Field Set",+ parameters: {+ docs: {+ description: {+ story:+ "Wrap related boolean controls in a `FieldSet` with a `FieldLegend` for semantic grouping — the legend acts as a single accessible label for the entire set. The canonical layout for a notifications, permissions, or feature-flag picker."+ }+ }+ },+ render: () => (+ <FieldSet className="w-[420px]">+ <FieldLegend>Notifications</FieldLegend>+ <FieldDescription>Choose which events should email you.</FieldDescription>+ <FieldGroup>+ <Field orientation="horizontal">+ <Checkbox id="notify-deploys" defaultChecked />+ <FieldContent>+ <FieldTitle>Deploy events</FieldTitle>+ <FieldDescription>When a deploy completes, fails, or is rolled back.</FieldDescription>+ </FieldContent>+ </Field>+ <Field orientation="horizontal">+ <Checkbox id="notify-access" />+ <FieldContent>+ <FieldTitle>Access changes</FieldTitle>+ <FieldDescription>When roles or permissions change for this project.</FieldDescription>+ </FieldContent>+ </Field>+ <Field orientation="horizontal">+ <Checkbox id="notify-billing" defaultChecked />+ <FieldContent>+ <FieldTitle>Billing updates</FieldTitle>+ <FieldDescription>Invoices, plan changes, and usage alerts.</FieldDescription>+ </FieldContent>+ </Field>+ </FieldGroup>+ </FieldSet>+ )+};diff --git a/frontend/src/components/v3/generic/Checkbox/Checkbox.tsx b/frontend/src/components/v3/generic/Checkbox/Checkbox.tsxindex 070de22407..f458a03e91 100644--- a/frontend/src/components/v3/generic/Checkbox/Checkbox.tsx+++ b/frontend/src/components/v3/generic/Checkbox/Checkbox.tsx@@ -12,8 +12,7 @@ const checkboxVariants = cva("outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed","disabled:opacity-50 cursor-pointer",- "aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20",- "dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",+ "aria-invalid:border-danger aria-invalid:ring-danger/40","border-foreground/15 inner-shadow text-foreground hover:bg-foreground/10 hover:border-foreground/20"),{@@ -52,6 +51,7 @@ type CheckboxProps = Omit<isIndeterminate?: boolean;isChecked?: boolean;isRequired?: boolean;+ isError?: boolean;};function Checkbox({@@ -61,12 +61,14 @@ function Checkbox({isIndeterminate,isChecked,isRequired,+ isError,...props}: CheckboxProps) {return (<CheckboxPrimitivedata-slot="checkbox"className={cn(checkboxVariants({ variant }), className)}+ aria-invalid={isError}{...props}checked={isChecked}disabled={isDisabled}diff --git a/frontend/src/components/v3/generic/ColorPicker/ColorPicker.css b/frontend/src/components/v3/generic/ColorPicker/ColorPicker.cssindex 2544dad090..df2c107f28 100644--- a/frontend/src/components/v3/generic/ColorPicker/ColorPicker.css+++ b/frontend/src/components/v3/generic/ColorPicker/ColorPicker.css@@ -11,6 +11,7 @@.react-colorful__hue {height: 10px !important;border-radius: 5px !important;+ margin: 0 8px 8px !important;}.react-colorful__saturation-pointer,diff --git a/frontend/src/components/v3/generic/ColorPicker/ColorPicker.stories.tsx b/frontend/src/components/v3/generic/ColorPicker/ColorPicker.stories.tsxnew file mode 100644index 0000000000..687c6b29e7--- /dev/null+++ b/frontend/src/components/v3/generic/ColorPicker/ColorPicker.stories.tsx@@ -0,0 +1,219 @@+import { useState } from "react";+import type { Meta, StoryObj } from "@storybook/react-vite";++import { Field, FieldDescription, FieldError, FieldLabel } from "../Field";+import { ColorPicker } from "./ColorPicker";++/**+ * `ColorPicker` is the v3 hex color control. It pairs a monospaced `Input` for+ * typing or pasting a hex value with a swatch button that opens a `Popover`+ * containing a 2D color picker (HSL square + hue slider, via `react-colorful`).+ *+ * The component is controlled — pass `value` and `onChange` together. The+ * swatch and picker only react to syntactically-valid six-digit hex+ * (`#RRGGBB`), but the input accepts free-form text so users can paste,+ * partially edit, or clear the value without the swatch flickering.+ *+ * For labels, helper text, and validation errors, compose with `Field` /+ * `FieldLabel` / `FieldDescription` / `FieldError` from `../Field` — same+ * pattern as `Input`.+ *+ * Reach for `ColorPicker` when the user is choosing an arbitrary brand or+ * theme color (tag colors, custom theme accents). For a fixed palette of+ * options (status colors, severity tiers), present a `Select` or radio group+ * instead.+ */+const meta = {+ title: "Generic/ColorPicker",+ component: ColorPicker,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ value: {+ control: "text"+ },+ placeholder: {+ control: "text"+ },+ disabled: {+ control: "boolean"+ },+ isError: {+ control: "boolean"+ },+ className: {+ table: { disable: true }+ },+ onChange: {+ table: { disable: true }+ }+ },+ args: {+ placeholder: "#000000",+ disabled: false,+ isError: false+ },+ decorators: [+ (Story) => (+ <div className="w-80">+ <Story />+ </div>+ )+ ]+} satisfies Meta<typeof ColorPicker>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ parameters: {+ docs: {+ description: {+ story:+ "Baseline empty picker — the input is empty, the swatch is unfilled. Click the swatch to open the picker, type or paste into the input to set a value directly. Toggle controls in the panel to play with state."+ }+ }+ },+ render: (args) => <ColorPicker {...args} />+};++export const WithValue: Story = {+ name: "State: With Value",+ args: {+ value: "#3b82f6"+ },+ parameters: {+ docs: {+ description: {+ story:+ "When the input holds a valid `#RRGGBB` value, the swatch fills with that color and the picker opens centered on it. Used for editing an existing tag, a previously-saved theme accent, or any field that has a known starting color."+ }+ }+ },+ render: (args) => <ColorPicker {...args} />+};++export const Disabled: Story = {+ name: "State: Disabled",+ args: {+ value: "#10b981",+ disabled: true+ },+ parameters: {+ docs: {+ description: {+ story:+ "`disabled` blocks both the input and the swatch — the popover can't open, the input drops out of the tab order, and the whole control dims. Use when the field is contextually unavailable (no entitlement, dependent on another field)."+ }+ }+ },+ render: (args) => <ColorPicker {...args} />+};++export const WithError: Story = {+ name: "State: Error",+ args: {+ value: "not-a-color",+ isError: true+ },+ parameters: {+ docs: {+ description: {+ story:+ 'Setting `isError` flips `aria-invalid="true"` on the input, which paints the danger border + ring and lets assistive tech announce the error. The swatch stays unfilled until the value parses as a valid hex. Always pair with a `FieldError` so sighted users get the explanation — see *Example: With Validation Error*.'+ }+ }+ },+ render: (args) => <ColorPicker {...args} />+};++function ControlledRender() {+ const [color, setColor] = useState("#7c3aed");+ return (+ <div className="flex flex-col gap-3 text-sm text-foreground">+ <ColorPicker value={color} onChange={setColor} />+ <div className="flex items-center gap-2 text-accent">+ Selected: <code>{color || "—"}</code>+ </div>+ </div>+ );+}++export const Controlled: Story = {+ name: "Example: Controlled",+ parameters: {+ docs: {+ description: {+ story:+ "The canonical usage: pair `value` with `onChange` so the parent owns the color state. Reach for this pattern in form libraries (`react-hook-form` `Controller`), in derived UI that previews the chosen color, or anywhere you need to react to changes."+ }+ }+ },+ render: () => <ControlledRender />+};++export const WithLabel: Story = {+ name: "Example: With Label",+ parameters: {+ docs: {+ description: {+ story:+ "Wrap the picker in a `Field` with a `FieldLabel` for the minimum accessible pairing. The label points at the input by default, so clicking it focuses the typeable hex value rather than opening the popover."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel>Tag color</FieldLabel>+ <ColorPicker />+ </Field>+ )+};++export const WithDescription: Story = {+ name: "Example: With Description",+ parameters: {+ docs: {+ description: {+ story:+ "Add a `FieldDescription` below the picker for guidance on what the color is for or where it will appear. Keep it short — a one-line explanation, not a usage manual."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel>Brand accent</FieldLabel>+ <ColorPicker />+ <FieldDescription>+ Used as the primary accent across the audit log header and CSV exports.+ </FieldDescription>+ </Field>+ )+};++function WithValidationErrorRender() {+ const [color, setColor] = useState("zzzz");+ const isValid = /^#[0-9A-Fa-f]{6}$/.test(color);+ return (+ <Field>+ <FieldLabel>Tag color</FieldLabel>+ <ColorPicker value={color} onChange={setColor} isError={!isValid} />+ {!isValid && <FieldError>Enter a six-digit hex value (e.g. #3b82f6).</FieldError>}+ </Field>+ );+}++export const WithValidationError: Story = {+ name: "Example: With Validation Error",+ parameters: {+ docs: {+ description: {+ story:+ "The standard validation pattern: `isError` on the picker + a `FieldError` below it. Wire the error state to your validator (here, a regex test against `#RRGGBB`) so the error clears as soon as the user types a valid hex."+ }+ }+ },+ render: () => <WithValidationErrorRender />+};diff --git a/frontend/src/components/v3/generic/ColorPicker/ColorPicker.tsx b/frontend/src/components/v3/generic/ColorPicker/ColorPicker.tsxindex 0d04bdcccd..7a408ed118 100644--- a/frontend/src/components/v3/generic/ColorPicker/ColorPicker.tsx+++ b/frontend/src/components/v3/generic/ColorPicker/ColorPicker.tsx@@ -71,7 +71,7 @@ const ColorPicker = forwardRef<HTMLInputElement, ColorPickerProps>(aria-label="Pick a color"/></PopoverTrigger>- <PopoverContent className="w-[220px] p-3" align="end">+ <PopoverContent className="w-[220px] p-0" align="end"><HexColorPickercolor={isValidHex ? localColor : "#000000"}onChange={handlePickerChange}diff --git a/frontend/src/components/v3/generic/Detail/Detail.stories.tsx b/frontend/src/components/v3/generic/Detail/Detail.stories.tsxindex 1da6847520..3134943788 100644--- a/frontend/src/components/v3/generic/Detail/Detail.stories.tsx+++ b/frontend/src/components/v3/generic/Detail/Detail.stories.tsx@@ -30,6 +30,9 @@ const meta = {disable: true}}+ },+ globals: {+ backgrounds: { value: "card" }}} satisfies Meta<typeof Detail>;@@ -60,7 +63,7 @@ export const Group: Story = {docs: {description: {story:- "Wrap multiple `Detail`s in a `DetailGroup` to stack them with consistent vertical spacing (`gap-y-4`). Use for entity metadata sections like profile fields or integration settings."+ "Wrap multiple `Detail`s in a `DetailGroup` to stack them with consistent vertical spacing. Use for entity metadata sections like profile fields or integration settings."}}},@@ -94,7 +97,7 @@ export const GroupWithHeader: Story = {docs: {description: {story:- "Place a `DetailGroupHeader` as the first child of a `DetailGroup` to title the section. Use `flex items-center justify-between` on the header to align an inline action like an edit `IconButton`."+ "Place a `DetailGroupHeader` as the first child of a `DetailGroup` to title the section. Pair the title with a trailing inline action — an edit `IconButton`, a copy button, an external link — to put a contextual control beside the section name."}}},@@ -130,7 +133,7 @@ export const BadgeValues: Story = {docs: {description: {story:- 'Use `Badge` inside `DetailValue` for status, scope, or boolean-like fields — far more scannable than plain text. Combine with inline text via `className="flex items-center gap-1.5"` on the value for mixed content.'+ "Use `Badge` inside `DetailValue` for status, scope, or boolean-like fields — far more scannable than plain text. Mix badges with inline text by laying the value out as a flex row when a single field needs both."}}},diff --git a/frontend/src/components/v3/generic/Dialog/Dialog.stories.tsx b/frontend/src/components/v3/generic/Dialog/Dialog.stories.tsxindex cac6b553ba..4b77f4e578 100644--- a/frontend/src/components/v3/generic/Dialog/Dialog.stories.tsx+++ b/frontend/src/components/v3/generic/Dialog/Dialog.stories.tsx@@ -3,6 +3,7 @@ import type { Meta, StoryObj } from "@storybook/react-vite";import { Button } from "../Button";import { Input } from "../Input";import { Label } from "../Label";+import { Separator } from "../Separator";import {Dialog,DialogClose,@@ -102,7 +103,7 @@ export const WithForm: Story = {</div><div className="flex flex-col gap-2"><Label htmlFor="dialog-email">Email</Label>- <Input id="dialog-email" type="email" defaultValue="[email protected]" />+ <Input id="dialog-email" type="email" defaultValue="[email protected]" /></div></div><DialogFooter>@@ -155,7 +156,7 @@ export const ScrollableContent: Story = {docs: {description: {story:- "For long content, wrap the body in a scrollable container with `max-h-[...] overflow-y-auto`. The header and footer stay anchored while the middle scrolls — common for terms, changelogs, and audit log previews."+ "For long content, anchor the header and footer while the middle scrolls — common for terms, changelogs, and audit log previews. Wrap the scroll region between two `Separator`s in a single column so the rules sit flush against the scrolling content (the parent's gap would otherwise push padding between them)."}}},@@ -169,16 +170,20 @@ export const ScrollableContent: Story = {<DialogTitle>Terms of service</DialogTitle><DialogDescription>Please review the terms before continuing.</DialogDescription></DialogHeader>- <div className="flex max-h-64 thin-scrollbar flex-col gap-3 overflow-y-auto text-sm text-foreground">- {Array.from({ length: 10 }).map((_, i) => (- // eslint-disable-next-line react/no-array-index-key- <p key={i}>- <span className="font-medium">Section {i + 1}.</span> Lorem ipsum dolor sit amet,- consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore- magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi- ut aliquip ex ea commodo consequat.- </p>- ))}+ <div className="flex flex-col">+ <Separator />+ <div className="flex max-h-64 thin-scrollbar flex-col gap-3 overflow-y-auto py-4 text-sm text-foreground">+ {Array.from({ length: 10 }).map((_, i) => (+ // eslint-disable-next-line react/no-array-index-key+ <p key={i}>+ <span className="font-medium">Section {i + 1}.</span> Lorem ipsum dolor sit amet,+ consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore+ magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris+ nisi ut aliquip ex ea commodo consequat.+ </p>+ ))}+ </div>+ <Separator /></div><DialogFooter><DialogClose asChild>diff --git a/frontend/src/components/v3/generic/Field/Field.stories.tsx b/frontend/src/components/v3/generic/Field/Field.stories.tsxindex 48bea4283f..4ffd7d71d0 100644--- a/frontend/src/components/v3/generic/Field/Field.stories.tsx+++ b/frontend/src/components/v3/generic/Field/Field.stories.tsx@@ -49,6 +49,9 @@ const meta = {disable: true}}+ },+ globals: {+ backgrounds: { value: "card" }}} satisfies Meta<typeof Field>;@@ -124,7 +127,7 @@ export const FieldGroupExample: Story = {docs: {description: {story:- "Stack related fields in a `FieldGroup` for consistent vertical rhythm (`gap-5`). The group also provides the `@container` query context that the `responsive` orientation keys off of."+ "Stack related fields in a `FieldGroup` for consistent vertical rhythm. The group also establishes the container-query context that the `responsive` orientation keys off of."}}},@@ -136,7 +139,7 @@ export const FieldGroupExample: Story = {</Field><Field><FieldLabel htmlFor="group-email">Email</FieldLabel>- <Input id="group-email" type="email" defaultValue="[email protected]" />+ <Input id="group-email" type="email" defaultValue="[email protected]" /><FieldDescription>Used for sign-in and critical notifications. Cannot be changed.</FieldDescription>@@ -187,7 +190,7 @@ export const FieldSetExample: Story = {docs: {description: {story:- "Wrap related boolean controls in a `FieldSet` with a `FieldLegend` for semantic grouping — the legend serves as a single accessible label for the entire set, and `FieldDescription` right after the legend applies an extra top-negative-margin to tuck it close."+ "Wrap related boolean controls in a `FieldSet` with a `FieldLegend` for semantic grouping — the legend acts as a single accessible label for the entire set. A `FieldDescription` placed immediately after the legend tucks in close to it, then the `FieldGroup` of checkboxes follows below."}}},diff --git a/frontend/src/components/v3/generic/Field/Field.tsx b/frontend/src/components/v3/generic/Field/Field.tsxindex 54d94f9359..f687f897c6 100644--- a/frontend/src/components/v3/generic/Field/Field.tsx+++ b/frontend/src/components/v3/generic/Field/Field.tsx@@ -90,15 +90,39 @@ function FieldContent({ className, ...props }: React.ComponentProps<"div">) {);}-function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>) {+const fieldLabelVariants = cva(+ cn(+ "group/field-label peer/field-label flex w-fit items-center gap-1.5 border-border text-xs leading-snug text-accent transition-colors duration-75 group-data-[disabled=true]/field:opacity-50",+ "has-[>[data-slot=field]]:cursor-pointer has-[>[data-slot=field]]:rounded-md",+ "has-[>[data-slot=field]]:border has-[>[data-slot=field]]:bg-container/25 has-[>[data-slot=field]]:hover:bg-container-hover [&>*]:data-[slot=field]:p-2.5 [&>svg]:size-3",+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col"+ ),+ {+ variants: {+ variant: {+ default: "has-[[data-state=checked]]:bg-container!", // uses base styling+ project:+ "has-[[data-state=checked]]:border-project/30 has-[[data-state=checked]]:bg-project/5!",+ org: "has-[[data-state=checked]]:border-org/30 has-[[data-state=checked]]:bg-org/5!",+ "sub-org":+ "has-[[data-state=checked]]:border-sub-org/30 has-[[data-state=checked]]:bg-sub-org/5!"+ }+ },+ defaultVariants: {+ variant: "default"+ }+ }+);++function FieldLabel({+ className,+ variant,+ ...props+}: React.ComponentProps<typeof Label> & VariantProps<typeof fieldLabelVariants>) {return (<Labeldata-slot="field-label"- className={cn(- "group/field-label peer/field-label flex w-fit items-center gap-1.5 text-xs leading-snug text-accent group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 [&>*]:data-[slot=field]:p-2.5 [&>svg]:size-3",- "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",- className- )}+ className={cn(fieldLabelVariants({ variant }), className)}{...props}/>);diff --git a/frontend/src/components/v3/generic/IconButton/IconButton.stories.tsx b/frontend/src/components/v3/generic/IconButton/IconButton.stories.tsxindex 7117c65e07..059c3eca7c 100644--- a/frontend/src/components/v3/generic/IconButton/IconButton.stories.tsx+++ b/frontend/src/components/v3/generic/IconButton/IconButton.stories.tsx@@ -1,6 +1,9 @@import type { Meta, StoryObj } from "@storybook/react-vite";import { Link } from "@tanstack/react-router";import {+ BoxesIcon as SubOrgIcon,+ BoxIcon as ProjectIcon,+ Building2Icon as OrgIcon,CheckIcon,CircleXIcon,EditIcon,@@ -12,7 +15,6 @@ import {TriangleAlertIcon} from "lucide-react";-import { OrgIcon, ProjectIcon, SubOrgIcon } from "../../platform";import { IconButton } from "./IconButton";/**diff --git a/frontend/src/components/v3/generic/IconButton/IconButton.tsx b/frontend/src/components/v3/generic/IconButton/IconButton.tsxindex 7cf4e79b54..e111ddde97 100644--- a/frontend/src/components/v3/generic/IconButton/IconButton.tsx+++ b/frontend/src/components/v3/generic/IconButton/IconButton.tsx@@ -4,7 +4,7 @@ import { Slot } from "@radix-ui/react-slot";import { cva, type VariantProps } from "cva";import { twMerge } from "tailwind-merge";-import { Lottie } from "@app/components/v2";+import { Lottie } from "@app/components/v2/Lottie";import { cn } from "@app/components/v3/utils";const iconButtonVariants = cva(diff --git a/frontend/src/components/v3/generic/Input/Input.stories.tsx b/frontend/src/components/v3/generic/Input/Input.stories.tsxnew file mode 100644index 0000000000..ea8bda9dfd--- /dev/null+++ b/frontend/src/components/v3/generic/Input/Input.stories.tsx@@ -0,0 +1,214 @@+import type { Meta, StoryObj } from "@storybook/react-vite";++import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from "../Field";+import { Input } from "./Input";++/**+ * `Input` is the v3 single-line text control. It renders a styled native `<input>`,+ * forwards every standard HTML input attribute, and adds one custom prop — `isError` —+ * which flips `aria-invalid` and applies the danger border + focus ring.+ *+ * Use the native `type` attribute for browser-native UX (email keyboards, password+ * masking, native date pickers, file selectors). For labels, helper text, and+ * validation errors, compose with `Field` / `FieldLabel` / `FieldDescription` /+ * `FieldError` from `../Field` rather than re-inventing the layout.+ *+ * The component fills its parent's width by design — let the parent (`Field`,+ * `FieldGroup`, or a custom container) decide how wide the input should be.+ */+const meta = {+ title: "Generic/Input",+ component: Input,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ type: {+ control: "select",+ options: ["text", "email", "password", "number", "date", "url", "search", "tel", "file"]+ },+ isError: {+ control: "boolean"+ },+ disabled: {+ control: "boolean"+ },+ readOnly: {+ control: "boolean"+ },+ placeholder: {+ control: "text"+ },+ className: {+ table: { disable: true }+ }+ },+ args: {+ type: "text",+ placeholder: "Enter text...",+ isError: false,+ disabled: false,+ readOnly: false+ },+ decorators: [+ (Story) => (+ <div className="w-80">+ <Story />+ </div>+ )+ ],+ globals: {+ backgrounds: { value: "card" }+ }+} satisfies Meta<typeof Input>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ parameters: {+ docs: {+ description: {+ story:+ "Baseline empty input with placeholder text. Use as the starting point for any text input — toggle `type` in the controls panel for specialised browser UX (email, password, number, date, file, etc.)."+ }+ }+ }+};++export const Disabled: Story = {+ name: "State: Disabled",+ args: {+ defaultValue: "Read-only via disabled",+ disabled: true+ },+ parameters: {+ docs: {+ description: {+ story:+ "`disabled` removes the input from the tab order, dims it, and signals non-interactivity through the cursor. Use for fields that aren't editable in the current state — but prefer `readOnly` when the value is still meaningful and copy-able."+ }+ }+ }+};++export const Readonly: Story = {+ name: "State: Readonly",+ args: {+ defaultValue: "[email protected]",+ readOnly: true+ },+ parameters: {+ docs: {+ description: {+ story:+ "`readOnly` keeps the input focusable and selectable but blocks edits. It looks visually identical to a normal input — that's intentional, since the value is still part of the form. Use for derived or immutable values (e.g. account email)."+ }+ }+ }+};++export const WithError: Story = {+ name: "State: Error",+ args: {+ type: "email",+ defaultValue: "not-an-email",+ isError: true+ },+ parameters: {+ docs: {+ description: {+ story:+ 'Setting `isError` flips `aria-invalid="true"`, which (a) styles the input with the danger border + ring and (b) lets assistive tech announce the error. Always render a paired `FieldError` so sighted users get the explanation too — see *Example: With Validation Error*.'+ }+ }+ }+};++export const WithLabel: Story = {+ name: "Example: With Label",+ parameters: {+ docs: {+ description: {+ story:+ "The minimum accessible pairing: a `Field` wrapper, a `FieldLabel` whose `htmlFor` matches the `Input`'s `id`, and the `Input` itself. Don't ship raw inputs without a label — use `aria-label` only when a visible label is genuinely impossible."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel htmlFor="input-with-label">Workspace name</FieldLabel>+ <Input id="input-with-label" placeholder="Acme Corporation" />+ </Field>+ )+};++export const WithDescription: Story = {+ name: "Example: With Description",+ parameters: {+ docs: {+ description: {+ story:+ "Add `FieldDescription` below the input for helper text — the *why* behind the field, format hints, or cross-references. Keep it short; long-form guidance belongs in docs, not the form."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel htmlFor="input-with-description">API endpoint</FieldLabel>+ <Input id="input-with-description" type="url" placeholder="https://api.example.com" />+ <FieldDescription>+ Fully qualified URL including protocol. We'll send signed requests to this host.+ </FieldDescription>+ </Field>+ )+};++export const WithValidationError: Story = {+ name: "Example: With Validation Error",+ parameters: {+ docs: {+ description: {+ story:+ "The standard validation pattern: `isError` on the input + a `FieldError` below it. `FieldError` accepts a string (shown here) or a `react-hook-form` `errors` array — duplicate messages are de-duplicated and multiple distinct messages render as a bulleted list."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel htmlFor="input-with-validation-error">Email</FieldLabel>+ <Input id="input-with-validation-error" type="email" defaultValue="not-an-email" isError />+ <FieldError>Enter a valid email address.</FieldError>+ </Field>+ )+};++export const InFieldGroup: Story = {+ name: "Example: In Field Group",+ parameters: {+ docs: {+ description: {+ story:+ "Stack multiple inputs in a `FieldGroup` for consistent vertical rhythm and to share the container-query context that `Field`'s `responsive` orientation depends on. This is the canonical layout for almost every form in the product."+ }+ }+ },+ render: () => (+ <FieldGroup>+ <Field>+ <FieldLabel htmlFor="group-name">Full name</FieldLabel>+ <Input id="group-name" defaultValue="Scott Wilson" />+ </Field>+ <Field>+ <FieldLabel htmlFor="group-email">Email</FieldLabel>+ <Input id="group-email" type="email" defaultValue="[email protected]" />+ <FieldDescription>Used for sign-in and critical notifications.</FieldDescription>+ </Field>+ <Field>+ <FieldLabel htmlFor="group-role">Role</FieldLabel>+ <Input id="group-role" defaultValue="Admin" disabled />+ </Field>+ </FieldGroup>+ )+};diff --git a/frontend/src/components/v3/generic/InputGroup/InputGroup.stories.tsx b/frontend/src/components/v3/generic/InputGroup/InputGroup.stories.tsxnew file mode 100644index 0000000000..7c61c9323b--- /dev/null+++ b/frontend/src/components/v3/generic/InputGroup/InputGroup.stories.tsx@@ -0,0 +1,414 @@+import { useState } from "react";+import type { Meta, StoryObj } from "@storybook/react-vite";+import { CopyIcon, EyeIcon, EyeOffIcon, MailIcon, SearchIcon, SendIcon, XIcon } from "lucide-react";++import { Button } from "../Button";+import {+ InputGroup,+ InputGroupAddon,+ InputGroupButton,+ InputGroupInput,+ InputGroupText,+ InputGroupTextArea+} from "./InputGroup";++/**+ * `InputGroup` is a composition primitive that wraps an input (or textarea) and+ * decorates it with addons — icons, text, action buttons, or full-width header /+ * footer rows. Use it whenever a control needs more chrome than a bare `Input`:+ * a search icon, a `https://` prefix, an inline "Copy" button, a character+ * counter under a composer, etc.+ *+ * **Anatomy**: `InputGroup` is the chromed container. Inside it, place exactly+ * one focusable control (`InputGroupInput` or `InputGroupTextArea`) plus any+ * number of `InputGroupAddon`s. Each addon's `align` prop controls placement:+ * `inline-start` / `inline-end` (left / right of a single-line control), or+ * `block-start` / `block-end` (full-width header / footer rows that turn the+ * group into a stacked layout — automatically used when wrapping a textarea).+ *+ * For labels, helper text, and validation messages, compose with+ * `Field` / `FieldLabel` / `FieldDescription` / `FieldError` from `../Field` —+ * `InputGroup` only owns the control + its addons.+ */+const meta = {+ title: "Generic/InputGroup",+ component: InputGroup,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ className: { table: { disable: true } },+ children: { table: { disable: true } }+ },+ decorators: [+ (Story) => (+ <div className="w-80">+ <Story />+ </div>+ )+ ],+ globals: {+ backgrounds: { value: "card" }+ }+} satisfies Meta<typeof InputGroup>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ name: "Anatomy: Default",+ parameters: {+ docs: {+ description: {+ story:+ "The bare baseline — `InputGroup` wrapping an `InputGroupInput`. Without addons it looks like an `Input` with the same chrome; reach for a plain `Input` instead unless you need the group's `:has()` behavior."+ }+ }+ },+ render: () => (+ <InputGroup>+ <InputGroupInput placeholder="Acme Corporation" />+ </InputGroup>+ )+};++export const AddonInlineStart: Story = {+ name: "Anatomy: Addon Inline Start",+ parameters: {+ docs: {+ description: {+ story:+ '`align="inline-start"` (the default) puts an addon on the leading edge of the input. The addon is a single click-target — clicking it focuses the input.'+ }+ }+ },+ render: () => (+ <InputGroup>+ <InputGroupAddon align="inline-start">+ <SearchIcon />+ </InputGroupAddon>+ <InputGroupInput placeholder="Search secrets…" />+ </InputGroup>+ )+};++export const AddonInlineEnd: Story = {+ name: "Anatomy: Addon Inline End",+ parameters: {+ docs: {+ description: {+ story:+ '`align="inline-end"` places an addon on the trailing edge. Use for status icons, validation hints, or trailing text affordances.'+ }+ }+ },+ render: () => (+ <InputGroup>+ <InputGroupInput type="email" placeholder="[email protected]" />+ <InputGroupAddon align="inline-end">+ <MailIcon />+ </InputGroupAddon>+ </InputGroup>+ )+};++export const AddonBlockStart: Story = {+ name: "Anatomy: Addon Block Start",+ parameters: {+ docs: {+ description: {+ story:+ '`align="block-start"` turns the group into a stacked layout with a full-width header row above the input. Useful for inline section labels or breadcrumb-style context.'+ }+ }+ },+ render: () => (+ <InputGroup>+ <InputGroupAddon align="block-start">+ <InputGroupText>Subdomain</InputGroupText>+ </InputGroupAddon>+ <InputGroupInput placeholder="acme" />+ </InputGroup>+ )+};++export const AddonBlockEnd: Story = {+ name: "Anatomy: Addon Block End",+ parameters: {+ docs: {+ description: {+ story:+ '`align="block-end"` adds a full-width footer row beneath the control — most often a toolbar for a `InputGroupTextArea`, but it works under a single-line input too.'+ }+ }+ },+ render: () => (+ <InputGroup>+ <InputGroupInput placeholder="Tag a teammate…" />+ <InputGroupAddon align="block-end">+ <InputGroupText>Press Enter to mention</InputGroupText>+ </InputGroupAddon>+ </InputGroup>+ )+};++export const WithText: Story = {+ name: "Variant: Text",+ parameters: {+ docs: {+ description: {+ story:+ "`InputGroupText` is the typography slot for non-interactive labels — protocol prefixes, unit suffixes, fixed domain parts. Muted color and consistent icon sizing are inherited automatically."+ }+ }+ },+ render: () => (+ <InputGroup>+ <InputGroupAddon align="inline-start">+ <InputGroupText>https://</InputGroupText>+ </InputGroupAddon>+ <InputGroupInput placeholder="acme" />+ <InputGroupAddon align="inline-end">+ <InputGroupText>.infisical.com</InputGroupText>+ </InputGroupAddon>+ </InputGroup>+ )+};++export const WithButton: Story = {+ name: "Variant: Button",+ parameters: {+ docs: {+ description: {+ story:+ '`InputGroupButton` is a v3 `IconButton` re-skinned for the in-group context — square, ghost-muted, and tucked snugly against the trailing edge of the group. Choose `size="xs"` (default) for tight rows and `size="sm"` for roomier ones. Always set `aria-label` since there is no visible text, and rely on the default `type="button"` so the button does not submit the surrounding form.'+ }+ }+ },+ render: () => (+ <InputGroup>+ <InputGroupInput defaultValue="https://app.infisical.com/share/abc123" readOnly />+ <InputGroupAddon align="inline-end">+ <InputGroupButton aria-label="Copy link">+ <CopyIcon />+ </InputGroupButton>+ </InputGroupAddon>+ </InputGroup>+ )+};++export const WithTextArea: Story = {+ name: "Variant: TextArea",+ decorators: [+ (Story) => (+ <div className="w-96">+ <Story />+ </div>+ )+ ],+ parameters: {+ docs: {+ description: {+ story:+ "Swap `InputGroupInput` for `InputGroupTextArea` to get a multi-line composer. The group auto-expands to fit the textarea and a `block-end` toolbar provides a natural home for primary / secondary actions."+ }+ }+ },+ render: () => (+ <InputGroup>+ <InputGroupTextArea rows={4} placeholder="Leave a comment…" />+ <InputGroupAddon align="block-end">+ <Button size="xs" variant="ghost" className="ml-auto">+ Cancel+ </Button>+ <Button size="xs" variant="outline">+ <SendIcon />+ Send+ </Button>+ </InputGroupAddon>+ </InputGroup>+ )+};++export const Disabled: Story = {+ name: "State: Disabled",+ parameters: {+ docs: {+ description: {+ story:+ 'Set `data-disabled="true"` on the group and `disabled` on the control to fade both the input and its addons together — the whole group reads as inactive in one go.'+ }+ }+ },+ render: () => (+ <InputGroup data-disabled="true">+ <InputGroupAddon align="inline-start">+ <SearchIcon />+ </InputGroupAddon>+ <InputGroupInput defaultValue="Read-only via disabled" disabled />+ <InputGroupAddon align="inline-end">+ <InputGroupButton size="xs" aria-label="Clear" disabled>+ <XIcon />+ </InputGroupButton>+ </InputGroupAddon>+ </InputGroup>+ )+};++export const WithError: Story = {+ name: "State: Error",+ parameters: {+ docs: {+ description: {+ story:+ "Set `aria-invalid` (or `isError` on `InputGroupInput`) and the danger border + ring spans the *whole* group — addons and all — so the error reads as a property of the field, not just the control. Pair with a `FieldError` for sighted-user feedback."+ }+ }+ },+ render: () => (+ <InputGroup>+ <InputGroupAddon align="inline-start">+ <MailIcon />+ </InputGroupAddon>+ <InputGroupInput type="email" defaultValue="not-an-email" isError />+ </InputGroup>+ )+};++export const SearchWithClear: Story = {+ name: "Example: Search With Clear",+ render: function SearchWithClearRender() {+ const [value, setValue] = useState("kubernetes");+ return (+ <InputGroup>+ <InputGroupAddon align="inline-start">+ <SearchIcon />+ </InputGroupAddon>+ <InputGroupInput+ placeholder="Search secrets…"+ value={value}+ onChange={(e) => setValue(e.target.value)}+ />+ {value.length > 0 && (+ <InputGroupAddon align="inline-end">+ <InputGroupButton size="xs" aria-label="Clear search" onClick={() => setValue("")}>+ <XIcon />+ </InputGroupButton>+ </InputGroupAddon>+ )}+ </InputGroup>+ );+ },+ parameters: {+ docs: {+ description: {+ story:+ 'The canonical search field: leading `<SearchIcon />`, trailing icon-only clear button that only renders when the value is non-empty. The clear button calls `setValue("")` on click.'+ }+ }+ }+};++export const PasswordWithReveal: Story = {+ name: "Example: Password With Reveal",+ render: function PasswordWithRevealRender() {+ const [show, setShow] = useState(false);+ return (+ <InputGroup>+ <InputGroupInput+ type={show ? "text" : "password"}+ defaultValue="hunter2"+ autoComplete="current-password"+ />+ <InputGroupAddon align="inline-end">+ <InputGroupButton+ size="xs"+ aria-label={show ? "Hide password" : "Show password"}+ onClick={() => setShow((s) => !s)}+ >+ {show ? <EyeOffIcon /> : <EyeIcon />}+ </InputGroupButton>+ </InputGroupAddon>+ </InputGroup>+ );+ },+ parameters: {+ docs: {+ description: {+ story:+ 'Toggle between `type="password"` and `type="text"` on click. Always set `autoComplete` (e.g. `current-password` or `new-password`) so password managers behave correctly.'+ }+ }+ }+};++export const UrlWithProtocol: Story = {+ name: "Example: URL With Protocol",+ parameters: {+ docs: {+ description: {+ story:+ "Use an `InputGroupText` prefix to fix part of the value users do not need to type — protocols, country codes, currency symbols. Strip the prefix from the captured value before submitting."+ }+ }+ },+ render: () => (+ <InputGroup>+ <InputGroupAddon align="inline-start">+ <InputGroupText>https://</InputGroupText>+ </InputGroupAddon>+ <InputGroupInput placeholder="api.example.com" />+ </InputGroup>+ )+};++const TWEET_LIMIT = 280;++export const TextAreaWithCharCounter: Story = {+ name: "Example: TextArea With Character Counter",+ decorators: [+ (Story) => (+ <div className="w-96">+ <Story />+ </div>+ )+ ],+ render: function TextAreaWithCharCounterRender() {+ const [value, setValue] = useState("");+ const isError = value.length > TWEET_LIMIT;+ return (+ <InputGroup>+ <InputGroupTextArea+ rows={4}+ placeholder="What's on your mind?"+ value={value}+ onChange={(e) => setValue(e.target.value)}+ aria-invalid={isError}+ />+ <InputGroupAddon align="block-end">+ <InputGroupText>+ {value.length} / {TWEET_LIMIT}+ </InputGroupText>+ <Button+ className="ml-auto"+ size="xs"+ variant="outline"+ isDisabled={value.length === 0 || isError}+ >+ <SendIcon />+ Post+ </Button>+ </InputGroupAddon>+ </InputGroup>+ );+ },+ parameters: {+ docs: {+ description: {+ story:+ "Controlled `InputGroupTextArea` with a live character count in a `block-end` toolbar. Crossing the limit flips the textarea to its error state and disables the submit button."+ }+ }+ }+};diff --git a/frontend/src/components/v3/generic/InputGroup/InputGroup.tsx b/frontend/src/components/v3/generic/InputGroup/InputGroup.tsxindex 7e2c3de274..29b60a5cee 100644--- a/frontend/src/components/v3/generic/InputGroup/InputGroup.tsx+++ b/frontend/src/components/v3/generic/InputGroup/InputGroup.tsx@@ -3,7 +3,9 @@ import * as React from "react";import { cva, type VariantProps } from "cva";import { cn } from "../../utils";+import { IconButton, type IconButtonProps } from "../IconButton";import { Input } from "../Input";+import { TextArea } from "../TextArea";function InputGroup({ className, ...props }: React.ComponentProps<"div">) {return (@@ -24,7 +26,7 @@ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {"has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50",// Error state.- "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",+ "has-[[data-slot][aria-invalid=true]]:border-danger has-[[data-slot][aria-invalid=true]]:ring-danger/40",className)}@@ -75,45 +77,43 @@ function InputGroupAddon({);}-// const inputGroupButtonVariants = cva("text-sm shadow-none flex gap-2 items-center", {-// variants: {-// size: {-// xs: "h-6 gap-1 px-2 rounded-sm [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",-// sm: "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",-// "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",-// "icon-sm": "size-8 p-0 has-[>svg]:p-0"-// }-// },-// defaultVariants: {-// size: "xs"-// }-// });--// TODO-// function InputGroupButton({-// className,-// type = "button",-// variant = "ghost",-// size = "xs",-// ...props-// }: Omit<React.ComponentProps<typeof UnstableButton>, "size"> &-// VariantProps<typeof inputGroupButtonVariants>) {-// return (-// <UnstableButton-// type={type}-// data-size={size}-// variant={variant}-// className={cn(inputGroupButtonVariants({ size }), className)}-// {...props}-// />-// );-// }+const inputGroupButtonVariants = cva("shadow-none", {+ variants: {+ size: {+ xs: "size-6 rounded-[4px] [&>svg]:size-3.5",+ sm: "size-8 [&>svg]:size-4"+ }+ },+ defaultVariants: {+ size: "xs"+ }+});++type InputGroupButtonProps = Omit<IconButtonProps, "size" | "asChild"> &+ VariantProps<typeof inputGroupButtonVariants>;++const InputGroupButton = React.forwardRef<HTMLButtonElement, InputGroupButtonProps>(+ ({ className, type = "button", variant = "ghost-muted", size = "xs", ...props }, ref) => {+ return (+ <IconButton+ ref={ref}+ type={type}+ data-size={size}+ variant={variant}+ className={cn(inputGroupButtonVariants({ size }), className)}+ {...(props as IconButtonProps)}+ />+ );+ }+);++InputGroupButton.displayName = "InputGroupButton";function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {return (<spanclassName={cn(- "text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",+ "flex items-center gap-2 text-sm text-muted [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",className)}{...props}@@ -121,7 +121,7 @@ function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {);}-const InputGroupInput = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(+const InputGroupInput = React.forwardRef<HTMLInputElement, React.ComponentProps<typeof Input>>(({ className, ...props }, ref) => {return (<Input@@ -139,24 +139,29 @@ const InputGroupInput = React.forwardRef<HTMLInputElement, React.ComponentProps<InputGroupInput.displayName = "InputGroupInput";-// function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">) {-// return (-// <Textarea-// data-slot="input-group-control"-// className={cn(-// "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",-// className-// )}-// {...props}-// />-// );-// }+const InputGroupTextArea = React.forwardRef<HTMLTextAreaElement, React.ComponentProps<"textarea">>(+ ({ className, ...props }, ref) => {+ return (+ <TextArea+ ref={ref}+ data-slot="input-group-control"+ className={cn(+ "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",+ className+ )}+ {...props}+ />+ );+ }+);++InputGroupTextArea.displayName = "InputGroupTextArea";export {InputGroup,InputGroupAddon,- // InputGroupButton,+ InputGroupButton,InputGroupInput,- InputGroupText- // InputGroupTextarea+ InputGroupText,+ InputGroupTextArea};diff --git a/frontend/src/components/v3/generic/Item/Item.stories.tsx b/frontend/src/components/v3/generic/Item/Item.stories.tsxnew file mode 100644index 0000000000..32395d854f--- /dev/null+++ b/frontend/src/components/v3/generic/Item/Item.stories.tsx@@ -0,0 +1,530 @@+import type { Meta, StoryObj } from "@storybook/react-vite";+import { Link } from "@tanstack/react-router";+import {+ BellIcon,+ ChevronRightIcon,+ EllipsisIcon,+ ImageIcon,+ KeyIcon,+ LockIcon,+ PencilIcon,+ TrashIcon,+ UserIcon+} from "lucide-react";++import { Badge } from "../Badge";+import { Button } from "../Button";+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuTrigger+} from "../Dropdown";+import { IconButton } from "../IconButton";+import {+ Item,+ ItemActions,+ ItemContent,+ ItemDescription,+ ItemFooter,+ ItemGroup,+ ItemHeader,+ ItemMedia,+ ItemSeparator,+ ItemTitle+} from "./Item";++/**+ * `Item` is the row primitive used for lists, settings panes, navigation entries,+ * and selection menus. Compose it from `ItemGroup`, `Item`, `ItemMedia`,+ * `ItemContent`, `ItemTitle`, `ItemDescription`, `ItemActions`, `ItemHeader`,+ * `ItemFooter`, and `ItemSeparator` — the layout is driven entirely by composition.+ *+ */+const meta = {+ title: "Generic/Item",+ component: Item,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ args: {+ className: "w-[500px]"+ },+ argTypes: {+ variant: {+ control: "select",+ options: ["default", "outline", "muted"]+ },+ size: {+ control: "select",+ options: ["default", "sm", "xs"]+ },+ asChild: {+ table: {+ disable: true+ }+ },+ children: {+ table: {+ disable: true+ }+ },+ className: {+ table: {+ disable: true+ }+ }+ }+} satisfies Meta<typeof Item>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ name: "Variant: Default",+ args: {+ variant: "default"+ },+ parameters: {+ docs: {+ description: {+ story:+ "Borderless baseline — use this variant when the row is already inside a bordered surface (a `Card`, `Sheet`, or `DropdownMenuContent`) so the row blends into its container instead of stacking another frame."+ }+ }+ },+ render: (args) => (+ <Item {...args}>+ <ItemMedia variant="icon">+ <KeyIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>API Key</ItemTitle>+ <ItemDescription>Service-to-service authentication credential.</ItemDescription>+ </ItemContent>+ <ChevronRightIcon className="text-muted-foreground size-4" />+ </Item>+ )+};++export const Outline: Story = {+ name: "Variant: Outline",+ args: {+ variant: "outline"+ },+ parameters: {+ docs: {+ description: {+ story:+ "Standalone bordered row — use on the page background when the `Item` is not nested inside another bordered surface and needs its own visual frame."+ }+ }+ },+ render: (args) => (+ <Item {...args}>+ <ItemMedia variant="icon">+ <UserIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Account</ItemTitle>+ <ItemDescription>Manage your profile and personal preferences.</ItemDescription>+ </ItemContent>+ <ChevronRightIcon className="text-muted-foreground size-4" />+ </Item>+ )+};++export const SizeSm: Story = {+ name: "Size: Small",+ args: {+ variant: "outline",+ size: "sm"+ },+ parameters: {+ docs: {+ description: {+ story:+ '`size="sm"` tightens the parent `ItemGroup`\'s inter-item gap. Reach for it when stacking many rows in a single panel and the default rhythm feels too airy.'+ }+ }+ },+ render: (args) => (+ <ItemGroup>+ <Item {...args}>+ <ItemMedia variant="icon">+ <BellIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Notifications</ItemTitle>+ </ItemContent>+ </Item>+ <Item {...args}>+ <ItemMedia variant="icon">+ <UserIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Profile</ItemTitle>+ </ItemContent>+ </Item>+ </ItemGroup>+ )+};++export const SizeXs: Story = {+ name: "Size: Extra Small",+ args: {+ variant: "outline",+ size: "xs"+ },+ parameters: {+ docs: {+ description: {+ story:+ '`size="xs"` is for dense lists — collapsed inner spacing, smaller media thumbnails, and tighter description text. It also drops its own padding when nested inside a `DropdownMenuContent`, so it slots cleanly into command menus, picker lists, and other compact stacks.'+ }+ }+ },+ render: (args) => (+ <ItemGroup>+ <Item {...args}>+ <ItemMedia variant="icon">+ <KeyIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Universal Auth</ItemTitle>+ <ItemDescription>Token-based authentication.</ItemDescription>+ </ItemContent>+ </Item>+ <Item {...args}>+ <ItemMedia variant="icon">+ <LockIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Kubernetes Auth</ItemTitle>+ <ItemDescription>Service-account JWT exchange.</ItemDescription>+ </ItemContent>+ </Item>+ </ItemGroup>+ )+};++export const WithIconMedia: Story = {+ name: "Example: With Icon Media",+ args: {+ variant: "outline"+ },+ parameters: {+ docs: {+ description: {+ story:+ '`ItemMedia variant="icon"` is the slot for any leading Lucide icon. When `ItemDescription` is present (and especially when it wraps to multiple lines), the media automatically aligns to the top of the row — no manual alignment needed.'+ }+ }+ },+ render: (args) => (+ <Item {...args}>+ <ItemMedia variant="icon">+ <BellIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Deployment alerts</ItemTitle>+ <ItemDescription>+ Get notified when a production deployment fails, when a release is rolled back, or when a+ health check starts reporting degraded status.+ </ItemDescription>+ </ItemContent>+ </Item>+ )+};++export const WithImageMedia: Story = {+ name: "Example: With Image Media",+ args: {+ variant: "outline"+ },+ parameters: {+ docs: {+ description: {+ story:+ '`ItemMedia variant="image"` renders a rounded thumbnail that scales down with the row size. Drop an `<img>` (or any element) inside — the wrapper handles cropping so avatars and integration logos stay square.'+ }+ }+ },+ render: (args) => (+ <Item {...args}>+ <ItemMedia variant="image">+ <ImageIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Ada Carter</ItemTitle>+ <ItemDescription>[email protected] · Owner</ItemDescription>+ </ItemContent>+ <Badge variant="success">Active</Badge>+ </Item>+ )+};++export const WithActions: Story = {+ name: "Example: With Actions",+ args: {+ variant: "outline"+ },+ parameters: {+ docs: {+ description: {+ story:+ "Trailing `ItemActions` is the canonical settings-row composition: a label + description on the left, a kebab `DropdownMenu` on the right. `ItemActions` lays out trailing controls with consistent spacing — pile in badges, status chips, buttons, or menus as needed."+ }+ }+ },+ render: (args) => (+ <Item {...args}>+ <ItemMedia variant="icon">+ <KeyIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Production API Key</ItemTitle>+ <ItemDescription>Last used 12 minutes ago.</ItemDescription>+ </ItemContent>+ <ItemActions>+ <Badge variant="info">prod</Badge>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton variant="ghost" size="xs" aria-label="Key options">+ <EllipsisIcon />+ </IconButton>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuItem>+ <PencilIcon />+ Rename+ </DropdownMenuItem>+ <DropdownMenuItem variant="danger">+ <TrashIcon />+ Revoke+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </ItemActions>+ </Item>+ )+};++export const WithHeaderAndFooter: Story = {+ name: "Example: With Header and Footer",+ args: {+ variant: "outline"+ },+ parameters: {+ docs: {+ description: {+ story:+ "`ItemHeader` and `ItemFooter` break the row into stacked sections — header above the body, footer below. Use this layout when a single row needs to surface metadata above the content and actions below it."+ }+ }+ },+ render: (args) => (+ <Item {...args}>+ <ItemHeader>+ <ItemTitle>Universal Auth</ItemTitle>+ <Badge variant="success">Active</Badge>+ </ItemHeader>+ <ItemContent>+ <ItemDescription>+ Token-based authentication for service-to-service calls. Tokens expire after the+ configured TTL and may be rotated at any time.+ </ItemDescription>+ </ItemContent>+ <ItemFooter>+ <span className="text-muted-foreground text-xs">Created 04/10/2026 · 3 active tokens</span>+ <Button variant="outline" size="xs">+ Manage tokens+ </Button>+ </ItemFooter>+ </Item>+ )+};++export const AsLink: Story = {+ name: "Example: As Link (asChild)",+ args: {+ variant: "outline",+ asChild: true+ },+ parameters: {+ docs: {+ description: {+ story:+ "Pass `asChild` and drop a TanStack `<Link>` (or a plain `<a>`) inside to turn the entire row into a single navigation target. Hover styling and transitions are wired in for free — reach for this pattern any time the whole row should be clickable."+ }+ }+ },+ render: (args) => (+ <Item {...args}>+ <Link to=".">+ <ItemMedia variant="icon">+ <UserIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Account settings</ItemTitle>+ <ItemDescription>Profile, security, and notification preferences.</ItemDescription>+ </ItemContent>+ <ChevronRightIcon className="text-muted-foreground size-4" />+ </Link>+ </Item>+ )+};++export const InGroupWithSeparator: Story = {+ name: "Example: In ItemGroup with Separator",+ args: {+ variant: "default"+ },+ parameters: {+ docs: {+ description: {+ story:+ "`ItemGroup` stacks rows with consistent vertical rhythm (auto-tightening at `sm` and `xs` sizes). Drop in `ItemSeparator` between rows when you want explicit dividers instead of relying on the row borders or background contrast."+ }+ }+ },+ render: (args) => (+ <ItemGroup>+ <Item {...args}>+ <ItemMedia variant="icon">+ <KeyIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>API Keys</ItemTitle>+ </ItemContent>+ </Item>+ <ItemSeparator />+ <Item {...args}>+ <ItemMedia variant="icon">+ <UserIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Members</ItemTitle>+ </ItemContent>+ </Item>+ <ItemSeparator />+ <Item {...args}>+ <ItemMedia variant="icon">+ <BellIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Notifications</ItemTitle>+ </ItemContent>+ </Item>+ </ItemGroup>+ )+};++export const FullComposition: Story = {+ name: "Example: Full Composition",+ args: {+ variant: "outline"+ },+ parameters: {+ docs: {+ description: {+ story:+ "A realistic settings-list panel — an `ItemGroup` of three outlined rows, each with an icon, title, description, status `Badge`, and a kebab `DropdownMenu` for row-level actions. This is the canonical layout for an entity-management page (auth methods, integrations, secret approvers)."+ }+ }+ },+ render: (args) => (+ <ItemGroup className="w-[600px]">+ <Item {...args}>+ <ItemMedia variant="icon">+ <KeyIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Universal Auth</ItemTitle>+ <ItemDescription>+ Token-based authentication for service-to-service calls.+ </ItemDescription>+ </ItemContent>+ <ItemActions>+ <Badge variant="success">Active</Badge>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton variant="ghost" size="xs" aria-label="Universal Auth options">+ <EllipsisIcon />+ </IconButton>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuItem>+ <PencilIcon />+ Edit+ </DropdownMenuItem>+ <DropdownMenuItem variant="danger">+ <TrashIcon />+ Remove+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </ItemActions>+ </Item>+ <Item {...args}>+ <ItemMedia variant="icon">+ <LockIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>Kubernetes Auth</ItemTitle>+ <ItemDescription>Service-account JWT exchange via the cluster API.</ItemDescription>+ </ItemContent>+ <ItemActions>+ <Badge variant="danger">Locked</Badge>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton variant="ghost" size="xs" aria-label="Kubernetes Auth options">+ <EllipsisIcon />+ </IconButton>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuItem>+ <PencilIcon />+ Edit+ </DropdownMenuItem>+ <DropdownMenuItem variant="danger">+ <TrashIcon />+ Remove+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </ItemActions>+ </Item>+ <Item {...args}>+ <ItemMedia variant="icon">+ <UserIcon />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>OIDC Auth</ItemTitle>+ <ItemDescription>Federated login through an external identity provider.</ItemDescription>+ </ItemContent>+ <ItemActions>+ <Badge variant="warning">Pending</Badge>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton variant="ghost" size="xs" aria-label="OIDC Auth options">+ <EllipsisIcon />+ </IconButton>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuItem>+ <PencilIcon />+ Edit+ </DropdownMenuItem>+ <DropdownMenuItem variant="danger">+ <TrashIcon />+ Remove+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </ItemActions>+ </Item>+ </ItemGroup>+ )+};diff --git a/frontend/src/components/v3/generic/Item/Item.tsx b/frontend/src/components/v3/generic/Item/Item.tsxindex 7a4683b79e..bdf7e046e9 100644--- a/frontend/src/components/v3/generic/Item/Item.tsx+++ b/frontend/src/components/v3/generic/Item/Item.tsx@@ -37,8 +37,7 @@ const itemVariants = cva(variants: {variant: {default: "border-transparent",- outline: "border-border bg-container",- muted: "bg-muted/50 border-transparent"+ outline: "border-border bg-card"},size: {default: "gap-2.5 px-3 py-2.5",@@ -73,7 +72,7 @@ function Item({}const itemMediaVariants = cva(- "gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none",+ "gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 text-muted group-has-[[data-slot=item-description]]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none",{variants: {variant: {@@ -122,7 +121,7 @@ function ItemTitle({ className, ...props }: React.ComponentProps<"div">) {<divdata-slot="item-title"className={cn(- "line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",+ "line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium text-foreground underline-offset-4",className)}{...props}@@ -135,7 +134,7 @@ function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {<pdata-slot="item-description"className={cn(- "text-muted-foreground line-clamp-2 text-left text-sm leading-normal font-normal group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",+ "text-muted-foreground line-clamp-2 text-left text-sm leading-normal font-normal text-accent group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-foreground",className)}{...props}@@ -163,7 +162,7 @@ function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {return (<divdata-slot="item-footer"- className={cn("flex basis-full items-center justify-between gap-2", className)}+ className={cn("flex basis-full items-center justify-between gap-2 text-muted", className)}{...props}/>);diff --git a/frontend/src/components/v3/generic/Label/Label.stories.tsx b/frontend/src/components/v3/generic/Label/Label.stories.tsxnew file mode 100644index 0000000000..0cba85f058--- /dev/null+++ b/frontend/src/components/v3/generic/Label/Label.stories.tsx@@ -0,0 +1,102 @@+import type { Meta, StoryObj } from "@storybook/react-vite";++import { Input } from "../Input";+import { Switch } from "../Switch";+import { Label } from "./Label";++/**+ * `Label` is the v3 form-label primitive — a styled `<label>` built on Radix.+ * It auto-handles the `htmlFor` association, dims when a sibling input is+ * `disabled` (via the `peer-disabled` selector), and dims inside a disabled+ * group (via `data-disabled="true"` on a parent with the `group` class).+ *+ * Most of the time you don't reach for `Label` directly — instead, use+ * `FieldLabel` from `../Field`, which composes `Label` with the form-field+ * spacing and accessibility wiring. Reach for the bare `Label` for one-off+ * inline pairings outside the `Field` system (toggle rows, table headers+ * with controls, ad-hoc settings strips).+ */+const meta = {+ title: "Generic/Label",+ component: Label,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ children: {+ control: "text"+ }+ },+ args: {+ children: "Workspace name"+ }+} satisfies Meta<typeof Label>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ parameters: {+ docs: {+ description: {+ story:+ "Bare label text. Use as the building block for any form-control pairing — but prefer `FieldLabel` whenever you also need the v3 form-field spacing and accessibility plumbing."+ }+ }+ }+};++export const WithInput: Story = {+ name: "Example: With Input",+ parameters: {+ docs: {+ description: {+ story:+ "Pair a `Label`'s `htmlFor` with the input's `id` so clicking the label focuses the field. This is the minimum accessible association — without it, the label is just decorative text."+ }+ }+ },+ render: () => (+ <div className="flex w-80 flex-col gap-2">+ <Label htmlFor="label-input">Workspace name</Label>+ <Input id="label-input" placeholder="Acme Corporation" />+ </div>+ )+};++export const InlineWithSwitch: Story = {+ name: "Example: Inline With Switch",+ parameters: {+ docs: {+ description: {+ story:+ "Use `Label` as the inline label for a `Switch` (or `Checkbox`) when you don't need a description below — for example, settings toggle rows. Place the label and control as flex siblings; the label inherits the row's vertical alignment."+ }+ }+ },+ render: () => (+ <div className="flex w-80 items-center gap-3">+ <Switch id="label-mfa" />+ <Label htmlFor="label-mfa">Require MFA on sign-in</Label>+ </div>+ )+};++export const InDisabledGroup: Story = {+ name: "State: In Disabled Group",+ parameters: {+ docs: {+ description: {+ story:+ 'When the parent has the `group` class and `data-disabled="true"`, the label dims to 50% opacity automatically. This is how `Field`/`FieldGroup` propagate disabled state down — wrap your own controls the same way for an ad-hoc disabled section.'+ }+ }+ },+ render: () => (+ <div className="group flex w-80 flex-col gap-2" data-disabled="true">+ <Label htmlFor="label-disabled">Email</Label>+ <Input id="label-disabled" defaultValue="[email protected]" disabled />+ </div>+ )+};diff --git a/frontend/src/components/v3/generic/Pagination/Pagination.stories.tsx b/frontend/src/components/v3/generic/Pagination/Pagination.stories.tsxnew file mode 100644index 0000000000..5cc5a084ba--- /dev/null+++ b/frontend/src/components/v3/generic/Pagination/Pagination.stories.tsx@@ -0,0 +1,150 @@+import { useState } from "react";+import type { Meta, StoryObj } from "@storybook/react-vite";++import { Pagination } from "./Pagination";++/**+ * `Pagination` is the v3 page-controls component — first / prev / next / last+ * buttons plus a per-page dropdown and a "1 – 10 of 142" range readout. Wire+ * it up by passing the total `count`, the current `page`, and the+ * `onChangePage` / `onChangePerPage` callbacks; the component derives bounds+ * (can-go-prev, can-go-last, etc.) automatically and disables the chevrons+ * when there is nowhere to go.+ *+ * Reach for `Pagination` as a sibling directly below a `Table`, `DataGrid`,+ * or any list whose dataset doesn't fit on a single screen — see+ * *Generic / Table → Example: With Pagination* for the canonical pairing.+ */+const meta = {+ title: "Generic/Pagination",+ component: Pagination,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ count: {+ control: { type: "number", min: 0 }+ },+ page: {+ control: { type: "number", min: 1 }+ },+ perPage: {+ control: { type: "number" }+ }+ },+ args: {+ count: 142,+ page: 1,+ perPage: 10,+ onChangePage: () => {},+ onChangePerPage: () => {}+ },+ decorators: [+ (Story) => (+ <div className="w-[600px]">+ <Story />+ </div>+ )+ ]+} satisfies Meta<typeof Pagination>;++export default meta;+type Story = StoryObj<typeof meta>;++function PaginationRender({+ initialCount = 142,+ initialPerPage = 10,+ perPageList+}: {+ initialCount?: number;+ initialPerPage?: number;+ perPageList?: number[];+}) {+ const [page, setPage] = useState(1);+ const [perPage, setPerPage] = useState(initialPerPage);+ return (+ <Pagination+ count={initialCount}+ page={page}+ perPage={perPage}+ onChangePage={setPage}+ onChangePerPage={(next) => {+ setPerPage(next);+ setPage(1);+ }}+ perPageList={perPageList}+ />+ );+}++export const Default: Story = {+ parameters: {+ docs: {+ description: {+ story:+ "Baseline pagination over 142 rows at 10 per page. Use the chevrons to step or jump to first / last; open the dropdown to change the per-page count. Wire `onChangePage` and `onChangePerPage` to your data fetcher (server-side) or your client-side slice."+ }+ }+ },+ render: () => <PaginationRender />+};++export const FewRows: Story = {+ name: "State: Single Page",+ parameters: {+ docs: {+ description: {+ story:+ "When the total `count` fits on a single page, the chevrons render disabled and the readout shows the full set ('1 – 8 of 8'). The component still renders so the per-page dropdown stays reachable for users who want to switch density."+ }+ }+ },+ render: () => <PaginationRender initialCount={8} />+};++export const CustomPerPageList: Story = {+ name: "Variant: Custom Per-Page List",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `perPageList` to override the default options (`[10, 20, 50, 100]`). Use larger steps for dense data (audit logs, secret diffs) and smaller steps for visually heavy rows (cards, expandable items). The initial `perPage` should be one of the values in the list."+ }+ }+ },+ render: () => (+ <PaginationRender initialPerPage={25} perPageList={[25, 50, 100, 250]} initialCount={500} />+ )+};++function StartAdornmentRender() {+ const [page, setPage] = useState(1);+ const [perPage, setPerPage] = useState(20);+ return (+ <Pagination+ count={142}+ page={page}+ perPage={perPage}+ onChangePage={setPage}+ onChangePerPage={(next) => {+ setPerPage(next);+ setPage(1);+ }}+ startAdornment={<span className="text-xs text-muted">3 selected</span>}+ />+ );+}++export const WithStartAdornment: Story = {+ name: "Example: With Start Adornment",+ parameters: {+ docs: {+ description: {+ story:+ "Pass a node to `startAdornment` to render content on the leading edge of the controls — typically a selection count, a filter summary, or a bulk-action button strip. The pagination block pushes itself to the trailing edge so the adornment owns the start."+ }+ }+ },+ render: () => <StartAdornmentRender />+};diff --git a/frontend/src/components/v3/generic/Pagination/Pagination.tsx b/frontend/src/components/v3/generic/Pagination/Pagination.tsxindex 5b88a654b1..009dae0fb1 100644--- a/frontend/src/components/v3/generic/Pagination/Pagination.tsx+++ b/frontend/src/components/v3/generic/Pagination/Pagination.tsx@@ -47,7 +47,12 @@ const Pagination = ({const canGoLast = page < upperLimit;return (- <div className={twMerge("flex w-full items-center justify-end px-2 pt-2", className)}>+ <div+ className={twMerge(+ "flex w-full items-center justify-end px-2 pt-2 text-foreground",+ className+ )}+ >{startAdornment}<div className={twMerge("mr-4 flex items-center space-x-2", startAdornment && "ml-auto")}><div className="text-xs">diff --git a/frontend/src/components/v3/generic/Popover/Popover.stories.tsx b/frontend/src/components/v3/generic/Popover/Popover.stories.tsxnew file mode 100644index 0000000000..f85f3b303f--- /dev/null+++ b/frontend/src/components/v3/generic/Popover/Popover.stories.tsx@@ -0,0 +1,271 @@+import type { Meta, StoryObj } from "@storybook/react-vite";+import { CheckIcon, InfoIcon, PencilIcon } from "lucide-react";++import { Button } from "../Button";+import { Field, FieldDescription, FieldLabel } from "../Field";+import { IconButton } from "../IconButton";+import { Input } from "../Input";+import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./Popover";++/**+ * Reach for `Popover` when the content is contextual but interactive (forms,+ * pickers, action menus). Use `Tooltip` for read-only label-style hints, `Dialog`+ * when the user must complete a task before continuing, and `DropdownMenu` for+ * pure action lists with menu semantics.+ *+ * Compose four parts:+ * - `Popover` — the root that owns open state.+ * - `PopoverTrigger` — the element that toggles the panel. Pair with `asChild` to+ * render an existing `Button` / `IconButton` as the trigger.+ * - `PopoverContent` — the floating panel. Accepts `align` (`start` / `center` / `end`),+ * `side` (`top` / `right` / `bottom` / `left`), `sideOffset` (gap in px), and+ * `container` (custom portal target).+ * - `PopoverAnchor` — optional. Detaches positioning from the trigger so the panel+ * can open relative to a different element.+ *+ */+const meta = {+ title: "Generic/Popover",+ component: Popover,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ children: { table: { disable: true } },+ open: { table: { disable: true } },+ defaultOpen: { table: { disable: true } },+ onOpenChange: { table: { disable: true } },+ modal: { table: { disable: true } }+ }+} satisfies Meta<typeof Popover>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ name: "Example: Default",+ parameters: {+ docs: {+ description: {+ story:+ "The baseline pairing — a `Button` trigger with `asChild` plus a `PopoverContent` panel. Click the trigger or press Enter / Space to open; Esc or an outside click dismisses. Default placement is centered below the trigger with a `sideOffset` of 4."+ }+ }+ },+ render: () => (+ <Popover>+ <PopoverTrigger asChild>+ <Button variant="outline">Open popover</Button>+ </PopoverTrigger>+ <PopoverContent>+ <div className="flex flex-col gap-2">+ <p className="text-sm font-medium">Quick info</p>+ <p className="text-muted-foreground text-sm">+ Popover content can hold any markup — text, form controls, pickers, or small action+ menus.+ </p>+ </div>+ </PopoverContent>+ </Popover>+ )+};++export const WithIconButtonTrigger: Story = {+ name: "Example: With Icon Button Trigger",+ parameters: {+ docs: {+ description: {+ story:+ "Use `IconButton` + `asChild` to trigger from a single-glyph control — the canonical pattern for inline detail bubbles (e.g. resolved-secret previews, audit-log row context). Always set `aria-label` on the icon button so the trigger has an accessible name."+ }+ }+ },+ render: () => (+ <Popover>+ <PopoverTrigger asChild>+ <IconButton variant="ghost-muted" size="sm" aria-label="More information">+ <InfoIcon />+ </IconButton>+ </PopoverTrigger>+ <PopoverContent align="start" className="w-80">+ <div className="flex flex-col gap-2">+ <p className="text-sm font-medium">About this field</p>+ <p className="text-muted-foreground text-sm">+ The slug is auto-generated from the name and used in URLs. It can be edited later from+ project settings.+ </p>+ </div>+ </PopoverContent>+ </Popover>+ )+};++export const Alignment: Story = {+ name: "Example: Alignment",+ parameters: {+ docs: {+ description: {+ story:+ "`align` controls horizontal placement relative to the trigger edge. `start` aligns the panel to the trigger's leading edge, `center` (default) centers it, `end` aligns to the trailing edge. Choose based on where the panel is most likely to fit without clipping the viewport — `end` is common for triggers that sit near the right edge of a layout."+ }+ }+ },+ render: () => (+ <div className="flex items-center gap-3">+ <Popover>+ <PopoverTrigger asChild>+ <Button variant="outline">align="start"</Button>+ </PopoverTrigger>+ <PopoverContent align="start">+ <p className="text-sm">Panel aligned to the trigger's leading edge.</p>+ </PopoverContent>+ </Popover>+ <Popover>+ <PopoverTrigger asChild>+ <Button variant="outline">align="center"</Button>+ </PopoverTrigger>+ <PopoverContent align="center">+ <p className="text-sm">Panel centered on the trigger.</p>+ </PopoverContent>+ </Popover>+ <Popover>+ <PopoverTrigger asChild>+ <Button variant="outline">align="end"</Button>+ </PopoverTrigger>+ <PopoverContent align="end">+ <p className="text-sm">Panel aligned to the trigger's trailing edge.</p>+ </PopoverContent>+ </Popover>+ </div>+ )+};++export const Sides: Story = {+ name: "Example: Sides",+ parameters: {+ docs: {+ description: {+ story:+ "`side` controls which edge of the trigger the panel opens from — `top`, `right`, `bottom` (default), or `left`. Increase `sideOffset` (default `4`) to add breathing room. Radix automatically flips to the opposite side if there isn't enough viewport space."+ }+ }+ },+ render: () => (+ <div className="grid grid-cols-2 gap-3">+ <Popover>+ <PopoverTrigger asChild>+ <Button variant="outline">side="top"</Button>+ </PopoverTrigger>+ <PopoverContent side="top">+ <p className="text-sm">Opens above the trigger.</p>+ </PopoverContent>+ </Popover>+ <Popover>+ <PopoverTrigger asChild>+ <Button variant="outline">side="right"</Button>+ </PopoverTrigger>+ <PopoverContent side="right" sideOffset={8}>+ <p className="text-sm">Opens to the right with `sideOffset={8}`.</p>+ </PopoverContent>+ </Popover>+ <Popover>+ <PopoverTrigger asChild>+ <Button variant="outline">side="bottom"</Button>+ </PopoverTrigger>+ <PopoverContent side="bottom">+ <p className="text-sm">Opens below the trigger (default).</p>+ </PopoverContent>+ </Popover>+ <Popover>+ <PopoverTrigger asChild>+ <Button variant="outline">side="left"</Button>+ </PopoverTrigger>+ <PopoverContent side="left" sideOffset={8}>+ <p className="text-sm">Opens to the left with `sideOffset={8}`.</p>+ </PopoverContent>+ </Popover>+ </div>+ )+};++export const WithForm: Story = {+ name: "Example: With Form",+ parameters: {+ docs: {+ description: {+ story:+ "Drop `Field` + `Input` + an action button into `PopoverContent` for the *edit one thing inline* pattern — renaming a workspace, updating a tag, tweaking a single config value. Prefer this over a full `Dialog` when the change is small and reversible. Override the default `w-72` via `className` when the form needs more room."+ }+ }+ },+ render: () => (+ <Popover>+ <PopoverTrigger asChild>+ <Button variant="outline">+ <PencilIcon />+ Rename workspace+ </Button>+ </PopoverTrigger>+ <PopoverContent className="w-80" align="start">+ <div className="flex flex-col gap-3">+ <div className="flex flex-col gap-1">+ <p className="text-sm font-medium">Rename workspace</p>+ <p className="text-muted-foreground text-xs">+ The new name is visible to everyone with workspace access.+ </p>+ </div>+ <Field>+ <FieldLabel htmlFor="popover-workspace-name">Name</FieldLabel>+ <Input id="popover-workspace-name" defaultValue="Acme Corporation" />+ <FieldDescription>Letters, numbers, spaces, and hyphens.</FieldDescription>+ </Field>+ <div className="flex justify-end gap-2">+ <Button variant="ghost" size="sm">+ Cancel+ </Button>+ <Button size="sm">Save</Button>+ </div>+ </div>+ </PopoverContent>+ </Popover>+ )+};++export const WithAnchor: Story = {+ name: "Example: With Custom Anchor",+ parameters: {+ docs: {+ description: {+ story:+ "Use `PopoverAnchor` to detach positioning from the trigger — the panel opens relative to the anchor instead of the button that toggles it. Useful when the visual landmark (a row, a status badge) isn't the same element as the affordance that opens the popover."+ }+ }+ },+ render: () => (+ <Popover>+ <PopoverAnchor asChild>+ <div className="flex items-center gap-3 rounded-md border border-border bg-card px-3 py-2">+ <CheckIcon className="size-4 text-success" />+ <div className="flex flex-col">+ <span className="text-sm font-medium text-foreground">Production deploy</span>+ <span className="text-xs text-muted">Anchor — panel opens here</span>+ </div>+ <PopoverTrigger asChild>+ <Button variant="ghost" size="xs">+ Details+ </Button>+ </PopoverTrigger>+ </div>+ </PopoverAnchor>+ <PopoverContent align="start" sideOffset={8}>+ <div className="flex flex-col gap-1">+ <p className="text-sm font-medium">Deploy succeeded</p>+ <p className="text-muted-foreground text-sm">+ Triggered by Scott Wilson · 12 services updated · 38s+ </p>+ </div>+ </PopoverContent>+ </Popover>+ )+};diff --git a/frontend/src/components/v3/generic/RadioGroup/RadioGroup.stories.tsx b/frontend/src/components/v3/generic/RadioGroup/RadioGroup.stories.tsxnew file mode 100644index 0000000000..4aee405516--- /dev/null+++ b/frontend/src/components/v3/generic/RadioGroup/RadioGroup.stories.tsx@@ -0,0 +1,483 @@+import { useState } from "react";+import type { Meta, StoryObj } from "@storybook/react-vite";++import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldLabel,+ FieldTitle+} from "../Field";+import { Label } from "../Label";+import { RadioGroup, RadioGroupItem } from "./RadioGroup";++/**+ * `RadioGroup` is the v3 single-choice control built on+ * `@radix-ui/react-radio-group`. Compose `RadioGroup` (root) with one or more+ * `RadioGroupItem`s — each item gets a `value` and is paired with a visible+ * `Label` (or `FieldTitle` / `FieldDescription` inside a horizontal `Field`+ * for richer rows).+ *+ * The root manages the selected `value` (controlled or uncontrolled via+ * `defaultValue`); the items are stateless dots that paint as filled when+ * their `value` matches the group's. Errors flip via the `isError` prop on+ * each item, matching `Input` and `Checkbox`.+ *+ * Reach for `RadioGroup` for short, mutually-exclusive choices that benefit+ * from showing every option at once. For long lists, use `Select` (or+ * `FilterableSelect` once the list gets searchable). For multi-select,+ * `Checkbox` rows in a `FieldSet`.+ */+const meta = {+ title: "Generic/RadioGroup",+ component: RadioGroup,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ decorators: [+ (Story) => (+ <div className="w-80">+ <Story />+ </div>+ )+ ],+ globals: {+ backgrounds: { value: "card" }+ }+} satisfies Meta<typeof RadioGroup>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ parameters: {+ docs: {+ description: {+ story:+ "Baseline group of three options. Each `RadioGroupItem` is paired with a `Label` whose `htmlFor` matches the item's `id`, so clicking the label selects the option."+ }+ }+ },+ render: () => (+ <RadioGroup defaultValue="staging">+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-default-dev" value="dev" />+ <Label htmlFor="rg-default-dev">Development</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-default-staging" value="staging" />+ <Label htmlFor="rg-default-staging">Staging</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-default-prod" value="prod" />+ <Label htmlFor="rg-default-prod">Production</Label>+ </div>+ </RadioGroup>+ )+};++export const Disabled: Story = {+ name: "State: Disabled",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `disabled` to the root `RadioGroup` to dim and lock every option at once. Use when the field is contextually unavailable (no entitlement, dependent on another field, locked by policy)."+ }+ }+ },+ render: () => (+ <RadioGroup defaultValue="prod" disabled>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-disabled-dev" value="dev" />+ <Label htmlFor="rg-disabled-dev">Development</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-disabled-staging" value="staging" />+ <Label htmlFor="rg-disabled-staging">Staging</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-disabled-prod" value="prod" />+ <Label htmlFor="rg-disabled-prod">Production</Label>+ </div>+ </RadioGroup>+ )+};++export const DisabledItem: Story = {+ name: "State: Disabled Item",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `disabled` to a single `RadioGroupItem` to disable just that option — the item dims and is skipped by both pointer and keyboard navigation. Use for options that exist for context but aren't currently selectable (entitlement-gated tiers, conflicting choices)."+ }+ }+ },+ render: () => (+ <RadioGroup defaultValue="basic">+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-item-disabled-basic" value="basic" />+ <Label htmlFor="rg-item-disabled-basic">Free</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-item-disabled-pro" value="pro" />+ <Label htmlFor="rg-item-disabled-pro">Pro</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-item-disabled-enterprise" value="enterprise" disabled />+ <Label htmlFor="rg-item-disabled-enterprise">Enterprise (contact sales)</Label>+ </div>+ </RadioGroup>+ )+};++export const WithError: Story = {+ name: "State: Error",+ parameters: {+ docs: {+ description: {+ story:+ 'Setting `isError` on `RadioGroupItem` flips `aria-invalid="true"`, which paints the danger border on the item — same contract as `Input` and `Checkbox`. Always pair with a `FieldError` so sighted users get the explanation — see *Example: With Validation Error*.'+ }+ }+ },+ render: () => (+ <RadioGroup>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-error-dev" value="dev" isError />+ <Label htmlFor="rg-error-dev">Development</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-error-prod" value="prod" isError />+ <Label htmlFor="rg-error-prod">Production</Label>+ </div>+ </RadioGroup>+ )+};++export const WithLabel: Story = {+ name: "Example: With Label",+ parameters: {+ docs: {+ description: {+ story:+ "Wrap the group in a `Field` with a `FieldLabel` so the question itself is labelled, and pair each `RadioGroupItem` with its own `Label`. The `FieldLabel` describes the field as a whole; the per-item `Label` is the visible option text."+ }+ }+ },+ render: () => (+ <Field className="w-80">+ <FieldLabel>Default environment</FieldLabel>+ <RadioGroup defaultValue="dev">+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-label-dev" value="dev" />+ <Label htmlFor="rg-label-dev">Development</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-label-staging" value="staging" />+ <Label htmlFor="rg-label-staging">Staging</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-label-prod" value="prod" />+ <Label htmlFor="rg-label-prod">Production</Label>+ </div>+ </RadioGroup>+ </Field>+ )+};++export const WithItemDescriptions: Story = {+ name: "Example: With Item Descriptions",+ decorators: [+ (Story) => (+ <div className="w-[420px]">+ <Story />+ </div>+ )+ ],+ parameters: {+ docs: {+ description: {+ story:+ "For richer rows, pair each `RadioGroupItem` with `FieldTitle` + `FieldDescription` inside a horizontal `Field`. The whole row reads as one option — title and helper text on the right of the radio dot."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel>Sync strategy</FieldLabel>+ <RadioGroup defaultValue="manual">+ <Field orientation="horizontal">+ <RadioGroupItem id="rg-sync-manual" value="manual" />+ <FieldContent>+ <FieldTitle>Manual</FieldTitle>+ <FieldDescription>+ Run a sync only when you click the button. Lowest cost; no surprise overwrites.+ </FieldDescription>+ </FieldContent>+ </Field>+ <Field orientation="horizontal">+ <RadioGroupItem id="rg-sync-scheduled" value="scheduled" />+ <FieldContent>+ <FieldTitle>Scheduled</FieldTitle>+ <FieldDescription>+ Sync on a cron expression. Good for nightly snapshots and weekend rotations.+ </FieldDescription>+ </FieldContent>+ </Field>+ <Field orientation="horizontal">+ <RadioGroupItem id="rg-sync-realtime" value="realtime" />+ <FieldContent>+ <FieldTitle>Real-time</FieldTitle>+ <FieldDescription>+ Stream every change to the destination. Highest cost; requires upstream webhooks.+ </FieldDescription>+ </FieldContent>+ </Field>+ </RadioGroup>+ </Field>+ )+};++export const ChoiceCards: Story = {+ name: "Example: Choice Cards",+ decorators: [+ (Story) => (+ <div className="w-[420px]">+ <Story />+ </div>+ )+ ],+ parameters: {+ docs: {+ description: {+ story:+ "Wrap each option in a `FieldLabel` so the whole row — title, description, and radio dot — becomes a single click target via the native `<label>` association. Reach for this layout when each option needs more than a one-word label (pricing tiers, integration modes, role choices)."+ }+ }+ },+ render: () => (+ <RadioGroup defaultValue="plus">+ <FieldLabel htmlFor="rg-card-plus">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Plus</FieldTitle>+ <FieldDescription>For individuals and small teams.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="plus" id="rg-card-plus" />+ </Field>+ </FieldLabel>+ <FieldLabel htmlFor="rg-card-pro">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Pro</FieldTitle>+ <FieldDescription>For growing businesses.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="pro" id="rg-card-pro" />+ </Field>+ </FieldLabel>+ <FieldLabel htmlFor="rg-card-enterprise">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Enterprise</FieldTitle>+ <FieldDescription>For large teams and enterprises.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="enterprise" id="rg-card-enterprise" />+ </Field>+ </FieldLabel>+ </RadioGroup>+ )+};++export const ChoiceCardsProject: Story = {+ name: "Example: Choice Cards (Project)",+ decorators: [+ (Story) => (+ <div className="w-[420px]">+ <Story />+ </div>+ )+ ],+ parameters: {+ docs: {+ description: {+ story:+ 'Pass `variant="project"` to `FieldLabel` so the selected card paints with the project scope tokens. Reach for this in project-scoped pickers (project roles, environment defaults, project-level integrations).'+ }+ }+ },+ render: () => (+ <RadioGroup defaultValue="member">+ <FieldLabel htmlFor="rg-card-proj-viewer" variant="project">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Viewer</FieldTitle>+ <FieldDescription>Read-only access to secrets and audit logs.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="viewer" id="rg-card-proj-viewer" />+ </Field>+ </FieldLabel>+ <FieldLabel htmlFor="rg-card-proj-member" variant="project">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Member</FieldTitle>+ <FieldDescription>Read and write access; cannot manage members.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="member" id="rg-card-proj-member" />+ </Field>+ </FieldLabel>+ <FieldLabel htmlFor="rg-card-proj-admin" variant="project">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Admin</FieldTitle>+ <FieldDescription>Full access including member and policy management.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="admin" id="rg-card-proj-admin" />+ </Field>+ </FieldLabel>+ </RadioGroup>+ )+};++export const ChoiceCardsOrg: Story = {+ name: "Example: Choice Cards (Org)",+ decorators: [+ (Story) => (+ <div className="w-[420px]">+ <Story />+ </div>+ )+ ],+ parameters: {+ docs: {+ description: {+ story:+ 'Pass `variant="org"` to `FieldLabel` so the selected card paints with the organization scope tokens. Reach for this in org-level pickers (billing tier, default org settings, SSO mode).'+ }+ }+ },+ render: () => (+ <RadioGroup defaultValue="pro">+ <FieldLabel htmlFor="rg-card-org-plus" variant="org">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Plus</FieldTitle>+ <FieldDescription>For individuals and small teams.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="plus" id="rg-card-org-plus" />+ </Field>+ </FieldLabel>+ <FieldLabel htmlFor="rg-card-org-pro" variant="org">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Pro</FieldTitle>+ <FieldDescription>For growing businesses with multiple projects.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="pro" id="rg-card-org-pro" />+ </Field>+ </FieldLabel>+ <FieldLabel htmlFor="rg-card-org-enterprise" variant="org">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Enterprise</FieldTitle>+ <FieldDescription>+ For large teams and enterprises with custom compliance needs.+ </FieldDescription>+ </FieldContent>+ <RadioGroupItem value="enterprise" id="rg-card-org-enterprise" />+ </Field>+ </FieldLabel>+ </RadioGroup>+ )+};++export const ChoiceCardsSubOrg: Story = {+ name: "Example: Choice Cards (Sub-Org)",+ decorators: [+ (Story) => (+ <div className="w-[420px]">+ <Story />+ </div>+ )+ ],+ parameters: {+ docs: {+ description: {+ story:+ 'Pass `variant="sub-org"` to `FieldLabel` so the selected card paints with the sub-organization scope tokens. Reach for this in sub-org / namespace pickers and any choice that lives below the org but above project scope.'+ }+ }+ },+ render: () => (+ <RadioGroup defaultValue="engineering">+ <FieldLabel htmlFor="rg-card-suborg-engineering" variant="sub-org">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Engineering</FieldTitle>+ <FieldDescription>Production secrets shared across app teams.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="engineering" id="rg-card-suborg-engineering" />+ </Field>+ </FieldLabel>+ <FieldLabel htmlFor="rg-card-suborg-data" variant="sub-org">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Data</FieldTitle>+ <FieldDescription>ETL credentials and warehouse access.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="data" id="rg-card-suborg-data" />+ </Field>+ </FieldLabel>+ <FieldLabel htmlFor="rg-card-suborg-platform" variant="sub-org">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Platform</FieldTitle>+ <FieldDescription>Infrastructure tooling and CI/CD secrets.</FieldDescription>+ </FieldContent>+ <RadioGroupItem value="platform" id="rg-card-suborg-platform" />+ </Field>+ </FieldLabel>+ </RadioGroup>+ )+};++function WithValidationErrorRender() {+ const [value, setValue] = useState<string>("");+ const isInvalid = !value;+ return (+ <Field className="w-80">+ <FieldLabel>Default environment</FieldLabel>+ <RadioGroup value={value} onValueChange={setValue}>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-validation-dev" value="dev" isError={isInvalid} />+ <Label htmlFor="rg-validation-dev">Development</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-validation-staging" value="staging" isError={isInvalid} />+ <Label htmlFor="rg-validation-staging">Staging</Label>+ </div>+ <div className="flex items-center gap-3">+ <RadioGroupItem id="rg-validation-prod" value="prod" isError={isInvalid} />+ <Label htmlFor="rg-validation-prod">Production</Label>+ </div>+ </RadioGroup>+ {isInvalid && <FieldError>Pick a default environment.</FieldError>}+ </Field>+ );+}++export const WithValidationError: Story = {+ name: "Example: With Validation Error",+ parameters: {+ docs: {+ description: {+ story:+ "The standard validation pattern: `isError` on each `RadioGroupItem` + a `FieldError` below the group. Wire the error state to your validator (here, just 'pick something') — the error clears as soon as the user makes a selection."+ }+ }+ },+ render: () => <WithValidationErrorRender />+};diff --git a/frontend/src/components/v3/generic/RadioGroup/RadioGroup.tsx b/frontend/src/components/v3/generic/RadioGroup/RadioGroup.tsxnew file mode 100644index 0000000000..ccc3c957c8--- /dev/null+++ b/frontend/src/components/v3/generic/RadioGroup/RadioGroup.tsx@@ -0,0 +1,52 @@+/* eslint-disable react/prop-types */++import * as React from "react";+import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";++import { cn } from "../../utils";++function RadioGroup({+ className,+ ...props+}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {+ return (+ <RadioGroupPrimitive.Root+ data-slot="radio-group"+ className={cn("grid w-full gap-2", className)}+ {...props}+ />+ );+}++type RadioGroupItemProps = React.ComponentProps<typeof RadioGroupPrimitive.Item> & {+ isError?: boolean;+};++function RadioGroupItem({ className, isError, ...props }: RadioGroupItemProps) {+ return (+ <RadioGroupPrimitive.Item+ data-slot="radio-group-item"+ aria-invalid={isError}+ className={cn(+ "peer relative flex aspect-square size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border border-border bg-transparent text-foreground shadow-xs transition-colors outline-none",+ "after:absolute after:-inset-x-3 after:-inset-y-2",+ "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",+ "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",+ "aria-invalid:border-danger aria-invalid:ring-danger/40",+ "hover:border-foreground/30",+ "data-[state=checked]:border-foreground/25 data-[state=checked]:bg-foreground/75",+ className+ )}+ {...props}+ >+ <RadioGroupPrimitive.Indicator+ data-slot="radio-group-indicator"+ className="flex size-4 items-center justify-center"+ >+ <span className="size-2 rounded-full bg-background" />+ </RadioGroupPrimitive.Indicator>+ </RadioGroupPrimitive.Item>+ );+}++export { RadioGroup, RadioGroupItem };diff --git a/frontend/src/components/v3/generic/RadioGroup/index.ts b/frontend/src/components/v3/generic/RadioGroup/index.tsnew file mode 100644index 0000000000..da254de298--- /dev/null+++ b/frontend/src/components/v3/generic/RadioGroup/index.ts@@ -0,0 +1 @@+export * from "./RadioGroup";diff --git a/frontend/src/components/v3/generic/ReactSelect/CreatableSelect.stories.tsx b/frontend/src/components/v3/generic/ReactSelect/CreatableSelect.stories.tsxnew file mode 100644index 0000000000..cd834c260a--- /dev/null+++ b/frontend/src/components/v3/generic/ReactSelect/CreatableSelect.stories.tsx@@ -0,0 +1,233 @@+import { useState } from "react";+import type { Meta, StoryObj } from "@storybook/react-vite";++import { Field, FieldDescription, FieldError, FieldLabel } from "../Field";+import { CreatableSelect } from "./CreatableSelect";++type Option = { label: string; value: string };++const TAG_OPTIONS: Option[] = [+ { label: "production", value: "production" },+ { label: "staging", value: "staging" },+ { label: "rotation-required", value: "rotation-required" },+ { label: "compliance", value: "compliance" },+ { label: "audit", value: "audit" }+];++const slugRegex = /^[a-z][a-z0-9-]*$/;++/**+ * `CreatableSelect` is the v3 react-select-based dropdown that lets users pick+ * from existing options *or* create new ones inline. The canonical use is a+ * tag input — choose existing tags from the menu, type a new one and hit Enter+ * to create it.+ *+ * Inherits `FilterableSelect`'s state and styling, plus react-select-creatable's+ * extras for managing inline creation:+ * - **`onCreateOption(input)`** — called when the user creates a new value.+ * Persist it (e.g. via a mutation), then add it to the option list.+ * - **`isValidNewOption(input)`** — gate creation on a validator (slug shape,+ * length, uniqueness). Return `false` to hide the Create suggestion.+ * - **`formatCreateLabel(input)`** — customize the suggestion text.+ *+ * Reach for `CreatableSelect` over `FilterableSelect` only when the user+ * legitimately needs to add new entries (tags, role names, custom claims).+ * For a fixed list, `FilterableSelect` is the right primitive.+ */+const meta = {+ title: "Generic/CreatableSelect",+ component: CreatableSelect,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ decorators: [+ (Story) => (+ <div className="h-52 w-96">+ <Story />+ </div>+ )+ ],+ globals: {+ backgrounds: { value: "card" }+ }+} satisfies Meta<typeof CreatableSelect>;++export default meta;+type Story = StoryObj<typeof meta>;++function DefaultRender() {+ const [options, setOptions] = useState<Option[]>(TAG_OPTIONS);+ const [value, setValue] = useState<Option | null>(null);+ return (+ <CreatableSelect+ value={value}+ onChange={(next) => setValue(next as Option | null)}+ options={options}+ onCreateOption={(input) => {+ const next = { label: input, value: input };+ setOptions([...options, next]);+ setValue(next);+ }}+ placeholder="Pick or create a tag..."+ />+ );+}++export const Default: Story = {+ parameters: {+ docs: {+ description: {+ story:+ "Baseline creatable single-select. Type a value not in the list and the menu offers a Create suggestion; selecting it triggers `onCreateOption(input)` so the parent can persist the new value and append it to the option list."+ }+ }+ },+ render: () => <DefaultRender />+};++function MultiRender() {+ const [options, setOptions] = useState<Option[]>(TAG_OPTIONS);+ const [value, setValue] = useState<Option[]>([]);+ return (+ <CreatableSelect+ isMulti+ value={value}+ onChange={(next) => setValue([...((next ?? []) as Option[])])}+ options={options}+ onCreateOption={(input) => {+ const next = { label: input, value: input };+ setOptions([...options, next]);+ setValue([...value, next]);+ }}+ placeholder="Pick or create tags..."+ />+ );+}++export const Multi: Story = {+ name: "Variant: Multi",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `isMulti` for the canonical tag-input experience — pick existing tags from the menu, type a new one and hit Enter to create it. Each selection renders as a removable chip; created entries persist in the option list so the next user sees them."+ }+ }+ },+ render: () => <MultiRender />+};++export const Disabled: Story = {+ name: "State: Disabled",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `isDisabled` to block opening the menu and creating new entries. Use when the field is contextually locked (no permission to edit tags, locked by policy)."+ }+ }+ },+ render: () => (+ <CreatableSelect+ isDisabled+ isMulti+ defaultValue={[TAG_OPTIONS[0], TAG_OPTIONS[3]]}+ options={TAG_OPTIONS}+ />+ )+};++export const WithError: Story = {+ name: "State: Error",+ parameters: {+ docs: {+ description: {+ story:+ "Setting `isError` paints the danger border + ring and announces the error to assistive tech, matching `Input`'s error contract. Always pair with a `FieldError` so sighted users get the explanation — see *Example: With Validation Error*."+ }+ }+ },+ render: () => (+ <CreatableSelect isError isMulti options={TAG_OPTIONS} placeholder="Pick or create tags..." />+ )+};++function WithValidationErrorRender() {+ const [value, setValue] = useState<Option[]>([]);+ const isInvalid = value.length === 0;+ return (+ <Field>+ <FieldLabel htmlFor="creatable-error">Tags</FieldLabel>+ <CreatableSelect+ inputId="creatable-error"+ isMulti+ value={value}+ onChange={(next) => setValue([...((next ?? []) as Option[])])}+ options={TAG_OPTIONS}+ isError={isInvalid}+ placeholder="Pick or create tags..."+ />+ {isInvalid && <FieldError>Add at least one tag.</FieldError>}+ </Field>+ );+}++export const WithValidationError: Story = {+ name: "Example: With Validation Error",+ parameters: {+ docs: {+ description: {+ story:+ "The standard validation pattern: `isError` on the control + a `FieldError` below it. The error clears as soon as the user picks (or creates) a value."+ }+ }+ },+ render: () => <WithValidationErrorRender />+};++function ValidatedCreationRender() {+ const [options, setOptions] = useState<Option[]>(TAG_OPTIONS);+ const [value, setValue] = useState<Option[]>([]);+ return (+ <Field>+ <FieldLabel htmlFor="creatable-tags">Tags</FieldLabel>+ <CreatableSelect+ inputId="creatable-tags"+ isMulti+ value={value}+ onChange={(next) => setValue([...((next ?? []) as Option[])])}+ options={options}+ isValidNewOption={(input) =>+ slugRegex.test(input) && !options.some((o) => o.value === input)+ }+ formatCreateLabel={(input) => `Create tag "${input}"`}+ noOptionsMessage={({ inputValue }) =>+ inputValue ? "Tags must be lowercase slugs (a–z, 0–9, hyphen)" : "No tags yet"+ }+ onCreateOption={(input) => {+ const next = { label: input, value: input };+ setOptions([...options, next]);+ setValue([...value, next]);+ }}+ placeholder="Pick or create tags..."+ />+ <FieldDescription>+ Tag slugs must start with a letter and contain only lowercase letters, numbers, and hyphens.+ </FieldDescription>+ </Field>+ );+}++export const ValidatedCreation: Story = {+ name: "Example: Validated Creation",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `isValidNewOption` to gate inline creation — return `false` to hide the Create suggestion until the user types a valid value. Pair with `noOptionsMessage` to explain *why* the input is rejected, and `formatCreateLabel` to customize the suggestion text. This is the canonical secret-tag input from the secret-manager UI."+ }+ }+ },+ render: () => <ValidatedCreationRender />+};diff --git a/frontend/src/components/v3/generic/ReactSelect/FilterableSelect.stories.tsx b/frontend/src/components/v3/generic/ReactSelect/FilterableSelect.stories.tsxnew file mode 100644index 0000000000..ac23285ed6--- /dev/null+++ b/frontend/src/components/v3/generic/ReactSelect/FilterableSelect.stories.tsx@@ -0,0 +1,215 @@+import { useState } from "react";+import type { Meta, StoryObj } from "@storybook/react-vite";++import { Field, FieldDescription, FieldError, FieldLabel } from "../Field";+import { FilterableSelect } from "./FilterableSelect";++type Option = { label: string; value: string };+type RegionOption = Option & { region: string };++const ENVIRONMENT_OPTIONS: Option[] = [+ { label: "Development", value: "dev" },+ { label: "Staging", value: "staging" },+ { label: "QA", value: "qa" },+ { label: "Production", value: "prod" },+ { label: "Disaster Recovery", value: "dr" }+];++const REGION_OPTIONS: RegionOption[] = [+ { label: "us-east-1 (N. Virginia)", value: "us-east-1", region: "Americas" },+ { label: "us-west-2 (Oregon)", value: "us-west-2", region: "Americas" },+ { label: "ca-central-1 (Montréal)", value: "ca-central-1", region: "Americas" },+ { label: "eu-west-1 (Ireland)", value: "eu-west-1", region: "Europe" },+ { label: "eu-central-1 (Frankfurt)", value: "eu-central-1", region: "Europe" },+ { label: "ap-south-1 (Mumbai)", value: "ap-south-1", region: "Asia Pacific" },+ { label: "ap-southeast-1 (Singapore)", value: "ap-southeast-1", region: "Asia Pacific" }+];++/**+ * `FilterableSelect` is the v3 react-select-based dropdown for searchable+ * single or multi selection over a known set of options. Reach for it when the+ * option list is too long for the Radix-based `Select` (which has no search)+ * but doesn't need users to add new entries — for that, see `CreatableSelect`.+ *+ * Pass options as `{ label, value }[]`. Use `isMulti` for multi-select; pass+ * `groupBy` (a key on each option) and optionally `getGroupHeaderLabel` to+ * bucket options into headed groups.+ *+ * Errors flip via the `isError` prop, matching `Input` and `Select`. For+ * labels and helper text, compose with `Field` / `FieldLabel` /+ * `FieldDescription` / `FieldError` — same pattern as the rest of the v3 form+ * primitives.+ */+const meta = {+ title: "Generic/FilterableSelect",+ component: FilterableSelect,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ decorators: [+ (Story) => (+ <div className="h-52 w-96">+ <Story />+ </div>+ )+ ],+ globals: {+ backgrounds: { value: "card" }+ }+} satisfies Meta<typeof FilterableSelect>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ parameters: {+ docs: {+ description: {+ story:+ "Baseline single-select with a searchable list. Type in the field to filter options; click or hit Enter to select. Reach for this over the Radix-based `Select` whenever the option list is long enough that a user would want search."+ }+ }+ },+ render: () => (+ <FilterableSelect options={ENVIRONMENT_OPTIONS} placeholder="Choose an environment..." />+ )+};++export const Multi: Story = {+ name: "Variant: Multi",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `isMulti` to allow selecting multiple options. The chosen values render as removable chips inside the control; `closeMenuOnSelect` defaults to `false` in this mode so the user can pick several without re-opening the menu."+ }+ }+ },+ render: () => (+ <FilterableSelect isMulti options={ENVIRONMENT_OPTIONS} placeholder="Choose environments..." />+ )+};++export const Disabled: Story = {+ name: "State: Disabled",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `isDisabled` to block opening the menu and dim the control. Use when the field is contextually unavailable (no entitlement, dependent on another field, locked by policy)."+ }+ }+ },+ render: () => (+ <FilterableSelect+ isDisabled+ defaultValue={ENVIRONMENT_OPTIONS[3]}+ options={ENVIRONMENT_OPTIONS}+ />+ )+};++export const Loading: Story = {+ name: "State: Loading",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `isLoading` while the option list is fetching. The control still opens but shows a loading indicator instead of options. Useful for selects whose options come from an async query."+ }+ }+ },+ render: () => <FilterableSelect isLoading options={[]} placeholder="Loading regions..." />+};++export const WithError: Story = {+ name: "State: Error",+ parameters: {+ docs: {+ description: {+ story:+ "Setting `isError` paints the danger border + ring and announces the error to assistive tech, matching `Input`'s error contract. Always pair with a `FieldError` so sighted users get the explanation — see *Example: With Validation Error*."+ }+ }+ },+ render: () => (+ <FilterableSelect+ isError+ options={ENVIRONMENT_OPTIONS}+ placeholder="Choose an environment..."+ />+ )+};++export const Grouped: Story = {+ name: "Example: Grouped",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `groupBy` (a key on each option) and the dropdown buckets options under that key's value. Optionally pass `getGroupHeaderLabel` to format the heading text. The grouping is purely visual — values must still be unique across the whole menu."+ }+ }+ },+ render: () => (+ <FilterableSelect options={REGION_OPTIONS} groupBy="region" placeholder="Choose a region..." />+ )+};++export const WithLabel: Story = {+ name: "Example: With Label",+ parameters: {+ docs: {+ description: {+ story:+ "Wrap in a `Field` with `FieldLabel` for the minimum accessible pairing. Pass `inputId` so the label points at the inner input — clicking the label focuses the search box rather than opening the menu."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel htmlFor="filterable-region">Default region</FieldLabel>+ <FilterableSelect+ inputId="filterable-region"+ options={REGION_OPTIONS}+ placeholder="Choose a region..."+ />+ <FieldDescription>+ New projects in this org will deploy here unless overridden at create time.+ </FieldDescription>+ </Field>+ )+};++function WithValidationErrorRender() {+ const [value, setValue] = useState<Option | null>(null);+ const isInvalid = !value;+ return (+ <Field>+ <FieldLabel htmlFor="filterable-error">Environment</FieldLabel>+ <FilterableSelect+ inputId="filterable-error"+ value={value}+ onChange={(next) => setValue(next as Option | null)}+ options={ENVIRONMENT_OPTIONS}+ isError={isInvalid}+ placeholder="Choose an environment..."+ />+ {isInvalid && <FieldError>Environment is required.</FieldError>}+ </Field>+ );+}++export const WithValidationError: Story = {+ name: "Example: With Validation Error",+ parameters: {+ docs: {+ description: {+ story:+ "The standard validation pattern: `isError` on the control + a `FieldError` below it. The error clears as soon as the user picks a value."+ }+ }+ },+ render: () => <WithValidationErrorRender />+};diff --git a/frontend/src/components/v3/generic/ReactSelect/styles.ts b/frontend/src/components/v3/generic/ReactSelect/styles.tsindex 3df40b0fdd..2046737a01 100644--- a/frontend/src/components/v3/generic/ReactSelect/styles.ts+++ b/frontend/src/components/v3/generic/ReactSelect/styles.ts@@ -10,7 +10,7 @@ export const selectClassNames: ClassNamesConfig<unknown, boolean, GroupBase<unkn),placeholder: () => "text-muted text-sm",input: () => "text-foreground text-sm",- singleValue: () => "truncate pr-2",+ singleValue: () => "truncate pr-2 text-foreground",valueContainer: () =>"gap-1 max-h-40 !pointer-events-auto !overflow-y-auto thin-scrollbar flex-wrap",multiValue: () => "bg-foreground/10 rounded px-1.5 py-0.5 gap-1 text-xs items-center",@@ -25,7 +25,7 @@ export const selectClassNames: ClassNamesConfig<unknown, boolean, GroupBase<unkn),dropdownIndicator: () =>"opacity-50 p-1 hover:bg-foreground/10 cursor-pointer rounded-md [&>svg]:size-4",- indicatorsContainer: () => "gap-1 flex items-center",+ indicatorsContainer: () => "gap-1 flex items-center text-foreground",indicatorSeparator: () => "bg-accent/20",clearIndicator: () =>"opacity-50 hover:opacity-100 hover:bg-foreground/10 cursor-pointer rounded-md p-1 text-danger [&>svg]:size-4",diff --git a/frontend/src/components/v3/generic/Select/Select.stories.tsx b/frontend/src/components/v3/generic/Select/Select.stories.tsxnew file mode 100644index 0000000000..22166a1b9b--- /dev/null+++ b/frontend/src/components/v3/generic/Select/Select.stories.tsx@@ -0,0 +1,484 @@+import { useState } from "react";+import type { Meta, StoryObj } from "@storybook/react-vite";+import { CloudIcon, KeyIcon, LockIcon, ServerIcon, ShieldIcon } from "lucide-react";++import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from "../Field";+import { Input } from "../Input";+import {+ Select,+ SelectContent,+ SelectGroup,+ SelectItem,+ SelectLabel,+ SelectSeparator,+ SelectTrigger,+ SelectValue+} from "./Select";++/**+ * `Select` is the v3 single-select dropdown built on `@radix-ui/react-select`. It+ * is a compound component — you assemble it from `Select` (root) →+ * `SelectTrigger` (the clickable surface, contains a `SelectValue`) →+ * `SelectContent` (the portalled menu) → `SelectItem`s, optionally grouped with+ * `SelectGroup` + `SelectLabel` and divided with `SelectSeparator`.+ *+ * The trigger sizes to its content by default — let the parent container+ * (`Field`, a sidebar, a toolbar) decide width via layout constraints. For+ * labels, helper text, and validation errors, compose with `Field` /+ * `FieldLabel` / `FieldDescription` / `FieldError` from `../Field` exactly as+ * you would for `Input` — the `id` belongs on the **trigger**, not the root.+ *+ * Reach for `Select` when the option list is short and known. For long, search-+ * driven lists (commands, secrets, identities) use `Command` instead. For+ * multi-select, layer `Command` inside a `Popover` — `Select` is single-value+ * by design.+ */+const meta = {+ title: "Generic/Select",+ component: Select,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ disabled: {+ control: "boolean"+ },+ defaultValue: {+ control: "text"+ },+ value: {+ control: "text"+ },+ dir: {+ control: "select",+ options: ["ltr", "rtl"]+ },+ children: {+ table: { disable: true }+ }+ },+ args: {+ disabled: false+ },+ decorators: [+ (Story) => (+ <div className="w-80">+ <Story />+ </div>+ )+ ],+ globals: {+ backgrounds: { value: "card" }+ }+} satisfies Meta<typeof Select>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ parameters: {+ docs: {+ description: {+ story:+ "The baseline anatomy: `Select` wraps a `SelectTrigger` (with a `SelectValue` for the placeholder / selected text) and a `SelectContent` containing flat `SelectItem`s. The trigger sizes to its content by default — let a `Field` or other layout container decide its width when you need it to stretch."+ }+ }+ },+ render: () => (+ <Select>+ <SelectTrigger className="w-full">+ <SelectValue placeholder="Choose an environment" />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="dev">Development</SelectItem>+ <SelectItem value="staging">Staging</SelectItem>+ <SelectItem value="qa">QA</SelectItem>+ <SelectItem value="prod">Production</SelectItem>+ <SelectItem value="dr">Disaster recovery</SelectItem>+ </SelectContent>+ </Select>+ )+};++export const SizeSmall: Story = {+ name: "Size: Small",+ parameters: {+ docs: {+ description: {+ story:+ 'Pass `size="sm"` to `SelectTrigger` for the compact variant — appropriate for table cells, toolbars, and filter rows where vertical density matters. The default size is what you want inside a `Field`, where the trigger needs to line up with `Input`s and other form controls.'+ }+ }+ },+ render: () => (+ <Select defaultValue="prod">+ <SelectTrigger size="sm" className="w-full">+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="dev">Development</SelectItem>+ <SelectItem value="staging">Staging</SelectItem>+ <SelectItem value="prod">Production</SelectItem>+ </SelectContent>+ </Select>+ )+};++export const Disabled: Story = {+ name: "State: Disabled",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `disabled` to the root `Select` to block opening the menu entirely — the trigger dims and signals non-interactivity through the cursor. Use this when the field is contextually unavailable (no entitlement, dependent on another field, locked by policy)."+ }+ }+ },+ render: () => (+ <Select disabled defaultValue="prod">+ <SelectTrigger className="w-full">+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="dev">Development</SelectItem>+ <SelectItem value="prod">Production</SelectItem>+ </SelectContent>+ </Select>+ )+};++export const DisabledItem: Story = {+ name: "State: Disabled Item",+ parameters: {+ docs: {+ description: {+ story:+ "Disable individual options with `disabled` on `SelectItem` — the row dims and is skipped by both pointer and keyboard navigation. Use for rows that exist for context but aren't currently selectable (entitlement-gated tiers, conflicting choices, items already in use)."+ }+ }+ },+ render: () => (+ <Select>+ <SelectTrigger className="w-full">+ <SelectValue placeholder="Pick a plan" />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="free">Free</SelectItem>+ <SelectItem value="pro">Pro</SelectItem>+ <SelectItem value="enterprise" disabled>+ Enterprise (contact sales)+ </SelectItem>+ </SelectContent>+ </Select>+ )+};++export const Error: Story = {+ name: "State: Error",+ parameters: {+ docs: {+ description: {+ story:+ 'Setting `isError` on `SelectTrigger` flips `aria-invalid="true"`, which (a) styles the trigger with the danger border + ring and (b) lets assistive tech announce the error. Always render a paired `FieldError` so sighted users get the explanation too — see *Example: With Validation Error*.'+ }+ }+ },+ render: () => (+ <Select>+ <SelectTrigger isError className="w-full">+ <SelectValue placeholder="Choose an environment" />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="dev">Development</SelectItem>+ <SelectItem value="prod">Production</SelectItem>+ </SelectContent>+ </Select>+ )+};++export const WithLabel: Story = {+ name: "Example: With Label",+ parameters: {+ docs: {+ description: {+ story:+ "The minimum accessible pairing: a `Field` wrapper, a `FieldLabel` whose `htmlFor` matches the `id` on the **`SelectTrigger`** (not the root `Select`), and the trigger itself. Clicking the label focuses and opens the menu."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel htmlFor="select-with-label">Environment</FieldLabel>+ <Select>+ <SelectTrigger id="select-with-label" className="w-full">+ <SelectValue placeholder="Choose an environment" />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="dev">Development</SelectItem>+ <SelectItem value="staging">Staging</SelectItem>+ <SelectItem value="prod">Production</SelectItem>+ </SelectContent>+ </Select>+ </Field>+ )+};++export const WithDescription: Story = {+ name: "Example: With Description",+ parameters: {+ docs: {+ description: {+ story:+ "Add a `FieldDescription` below the trigger for helper text — the *why* behind the field, format hints, or cross-references. Keep it short; long-form guidance belongs in docs, not the form."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel htmlFor="select-with-description">Default region</FieldLabel>+ <Select>+ <SelectTrigger id="select-with-description" className="w-full">+ <SelectValue placeholder="Choose a region" />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="us-east-1">us-east-1 (N. Virginia)</SelectItem>+ <SelectItem value="us-west-2">us-west-2 (Oregon)</SelectItem>+ <SelectItem value="eu-west-1">eu-west-1 (Ireland)</SelectItem>+ <SelectItem value="ap-south-1">ap-south-1 (Mumbai)</SelectItem>+ </SelectContent>+ </Select>+ <FieldDescription>+ New projects in this org will deploy here unless overridden at create time.+ </FieldDescription>+ </Field>+ )+};++export const WithValidationError: Story = {+ name: "Example: With Validation Error",+ parameters: {+ docs: {+ description: {+ story:+ "The standard validation pattern: `isError` on the trigger + a `FieldError` below it. `FieldError` accepts a string (shown here) or a `react-hook-form` `errors` array — duplicate messages are de-duplicated and multiple distinct messages render as a bulleted list."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel htmlFor="select-with-error">Environment</FieldLabel>+ <Select>+ <SelectTrigger id="select-with-error" isError className="w-full">+ <SelectValue placeholder="Choose an environment" />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="dev">Development</SelectItem>+ <SelectItem value="prod">Production</SelectItem>+ </SelectContent>+ </Select>+ <FieldError>Environment is required.</FieldError>+ </Field>+ )+};++export const WithGroups: Story = {+ name: "Example: With Groups",+ parameters: {+ docs: {+ description: {+ story:+ "Use `SelectGroup` to bucket related items, `SelectLabel` for the group heading (small muted text, non-interactive), and `SelectSeparator` for a thin divider between groups. The grouping is purely visual — `value`s still need to be unique across the whole menu."+ }+ }+ },+ render: () => (+ <Select>+ <SelectTrigger className="w-full">+ <SelectValue placeholder="Choose an environment" />+ </SelectTrigger>+ <SelectContent>+ <SelectGroup>+ <SelectLabel>Non-production</SelectLabel>+ <SelectItem value="dev">Development</SelectItem>+ <SelectItem value="staging">Staging</SelectItem>+ <SelectItem value="qa">QA</SelectItem>+ </SelectGroup>+ <SelectSeparator />+ <SelectGroup>+ <SelectLabel>Production</SelectLabel>+ <SelectItem value="prod">Production</SelectItem>+ <SelectItem value="dr">Disaster recovery</SelectItem>+ </SelectGroup>+ </SelectContent>+ </Select>+ )+};++export const WithIcons: Story = {+ name: "Example: With Icons",+ parameters: {+ docs: {+ description: {+ story:+ "`SelectItem` happily renders a leading icon — bare SVGs are auto-sized and stay out of the click target. The check indicator that marks the selected row sits on the right, so leading icons never collide with it. The `SelectValue` mirrors whatever the selected item rendered, so the chosen icon shows in the trigger too."+ }+ }+ },+ render: () => (+ <Select defaultValue="kms">+ <SelectTrigger className="w-full">+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="secrets">+ <KeyIcon />+ Secret Manager+ </SelectItem>+ <SelectItem value="kms">+ <LockIcon />+ KMS+ </SelectItem>+ <SelectItem value="pki">+ <ShieldIcon />+ PKI+ </SelectItem>+ <SelectItem value="ssh">+ <ServerIcon />+ SSH+ </SelectItem>+ </SelectContent>+ </Select>+ )+};++export const InFieldGroup: Story = {+ name: "Example: In Field Group",+ parameters: {+ docs: {+ description: {+ story:+ "Stack `Select`s alongside other inputs in a `FieldGroup` for consistent vertical rhythm. This is the canonical layout for almost every form in the product — `Select`, `Input`, and `TextArea` all line up to the same width inside their `Field`s."+ }+ }+ },+ render: () => (+ <FieldGroup>+ <Field>+ <FieldLabel htmlFor="group-name">Project name</FieldLabel>+ <Input id="group-name" defaultValue="acme-prod" />+ </Field>+ <Field>+ <FieldLabel htmlFor="group-environment">Default environment</FieldLabel>+ <Select defaultValue="dev">+ <SelectTrigger id="group-environment" className="w-full">+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="dev">Development</SelectItem>+ <SelectItem value="staging">Staging</SelectItem>+ <SelectItem value="prod">Production</SelectItem>+ </SelectContent>+ </Select>+ <FieldDescription>Used as the active environment when the project loads.</FieldDescription>+ </Field>+ <Field>+ <FieldLabel htmlFor="group-region">Region</FieldLabel>+ <Select defaultValue="us-east-1">+ <SelectTrigger id="group-region" className="w-full">+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="us-east-1">us-east-1</SelectItem>+ <SelectItem value="us-west-2">us-west-2</SelectItem>+ <SelectItem value="eu-west-1">eu-west-1</SelectItem>+ </SelectContent>+ </Select>+ </Field>+ </FieldGroup>+ )+};++function ControlledRender() {+ const [value, setValue] = useState("staging");+ return (+ <Field>+ <FieldLabel htmlFor="select-controlled">Environment</FieldLabel>+ <Select value={value} onValueChange={setValue}>+ <SelectTrigger id="select-controlled" className="w-full">+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="dev">Development</SelectItem>+ <SelectItem value="staging">Staging</SelectItem>+ <SelectItem value="prod">Production</SelectItem>+ </SelectContent>+ </Select>+ <FieldDescription>+ Selected: <code>{value}</code>+ </FieldDescription>+ </Field>+ );+}++export const Controlled: Story = {+ name: "Example: Controlled",+ parameters: {+ docs: {+ description: {+ story:+ "Drive the value with `value` + `onValueChange` when you need to react to changes (form libraries, derived UI, telemetry). Use `defaultValue` instead when you only need an initial value and don't care about the selection until submit — every other story above is uncontrolled for that reason."+ }+ }+ },+ render: () => <ControlledRender />+};++export const LongList: Story = {+ name: "Example: Long List",+ parameters: {+ docs: {+ description: {+ story:+ "When the menu overflows the viewport, `SelectContent` automatically renders `SelectScrollUpButton` / `SelectScrollDownButton` chevrons — you don't wire them up. The menu is also portalled, so it escapes any `overflow:hidden` ancestor. For lists this long, consider whether `Command` (searchable) is a better fit."+ }+ }+ },+ render: () => (+ <Select>+ <SelectTrigger className="w-full">+ <SelectValue placeholder="Choose an AWS region" />+ </SelectTrigger>+ <SelectContent>+ {[+ "us-east-1",+ "us-east-2",+ "us-west-1",+ "us-west-2",+ "ca-central-1",+ "sa-east-1",+ "eu-west-1",+ "eu-west-2",+ "eu-west-3",+ "eu-central-1",+ "eu-north-1",+ "eu-south-1",+ "me-south-1",+ "af-south-1",+ "ap-south-1",+ "ap-northeast-1",+ "ap-northeast-2",+ "ap-northeast-3",+ "ap-southeast-1",+ "ap-southeast-2",+ "ap-east-1"+ ].map((region) => (+ <SelectItem key={region} value={region}>+ <CloudIcon />+ {region}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ )+};diff --git a/frontend/src/components/v3/generic/Select/Select.tsx b/frontend/src/components/v3/generic/Select/Select.tsxindex 010a41ecc5..3bbc7d59ce 100644--- a/frontend/src/components/v3/generic/Select/Select.tsx+++ b/frontend/src/components/v3/generic/Select/Select.tsx@@ -63,17 +63,20 @@ function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Vfunction SelectTrigger({className,size = "default",+ isError,children,...props}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {size?: "sm" | "default";+ isError?: boolean;}) {return (<SelectPrimitive.Triggerdata-slot="select-trigger"data-size={size}+ aria-invalid={isError}className={cn(- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 flex w-fit !cursor-pointer items-center justify-between gap-1.5 rounded-md border border-border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-placeholder:text-muted data-[size=default]:h-9 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:block *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 *:data-[slot=select-value]:truncate [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&>span]:truncate",+ "flex w-fit !cursor-pointer items-center justify-between gap-1.5 rounded-md border border-border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger aria-invalid:ring-danger/40 data-placeholder:text-muted data-[size=default]:h-9 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:block *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 *:data-[slot=select-value]:truncate [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&>span]:truncate",className)}{...props}diff --git a/frontend/src/components/v3/generic/Separator/Separator.stories.tsx b/frontend/src/components/v3/generic/Separator/Separator.stories.tsxnew file mode 100644index 0000000000..275ebf6bc3--- /dev/null+++ b/frontend/src/components/v3/generic/Separator/Separator.stories.tsx@@ -0,0 +1,164 @@+import type { Meta, StoryObj } from "@storybook/react-vite";+import { BoldIcon, CodeIcon, ItalicIcon, LinkIcon, ListIcon, UnderlineIcon } from "lucide-react";++import { IconButton } from "../IconButton";+import { Separator } from "./Separator";++/**+ * `Separator` is the v3 divider primitive — a hairline that visually splits+ * related content. Built on Radix's `Separator` so it ships with the right+ * ARIA out of the box.+ *+ * Two layout modes:+ * - **`orientation="horizontal"`** (default) — a full-width line between+ * stacked sections (settings groups, dialog chrome, scroll regions).+ * - **`orientation="vertical"`** — a full-height line between inline groups+ * (toolbar buttons, breadcrumb segments). Place it inside a flex row whose+ * height is defined by its content; the separator stretches to that height.+ *+ * By default `Separator` is `decorative={true}` — the line is just visual and+ * hidden from assistive tech. Pass `decorative={false}` when the divider+ * expresses semantic structure (e.g. between unrelated topic groups in a long+ * form) so screen readers announce it as a divider.+ *+ * For a labeled divider ("OR" between sign-in methods, "AND" between filter+ * groups), reach for `FieldSeparator` instead — it renders the same line with+ * inline text.+ */+const meta = {+ title: "Generic/Separator",+ component: Separator,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ orientation: {+ control: "select",+ options: ["horizontal", "vertical"]+ },+ decorative: {+ control: "boolean"+ },+ className: {+ table: { disable: true }+ }+ },+ args: {+ orientation: "horizontal",+ decorative: true+ },+ decorators: [+ (Story) => (+ <div className="w-80">+ <Story />+ </div>+ )+ ]+} satisfies Meta<typeof Separator>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ name: "Anatomy: Horizontal",+ parameters: {+ docs: {+ description: {+ story:+ "The baseline horizontal separator — a full-width hairline. Use it to split stacked content sections so the eye registers where one section ends and the next begins."+ }+ }+ },+ render: (args) => <Separator {...args} />+};++export const Vertical: Story = {+ name: "Variant: Vertical",+ args: {+ orientation: "vertical"+ },+ parameters: {+ docs: {+ description: {+ story:+ "Pass `orientation=\"vertical\"` to render a full-height divider between inline elements. The separator stretches to its parent's height — place it inside a flex row, and the parent's content (or explicit height) gives the line something to fill."+ }+ }+ },+ render: () => (+ <div className="flex h-6 items-center gap-3 text-sm text-foreground">+ <span>Edit</span>+ <Separator orientation="vertical" />+ <span>Duplicate</span>+ <Separator orientation="vertical" />+ <span>Delete</span>+ </div>+ )+};++export const BetweenSections: Story = {+ name: "Example: Between Sections",+ parameters: {+ docs: {+ description: {+ story:+ "Drop a `Separator` between stacked content sections so each reads as its own visual unit. Common in settings panels, profile detail panes, and anywhere a long page is broken into named topic groups."+ }+ }+ },+ render: () => (+ <div className="flex flex-col gap-4 text-sm text-foreground">+ <div>+ <div className="font-medium">Account</div>+ <div className="text-accent">[email protected]</div>+ </div>+ <Separator />+ <div>+ <div className="font-medium">Workspace</div>+ <div className="text-accent">acme-prod</div>+ </div>+ <Separator />+ <div>+ <div className="font-medium">Role</div>+ <div className="text-accent">Admin</div>+ </div>+ </div>+ )+};++export const InToolbar: Story = {+ name: "Example: In Toolbar",+ parameters: {+ docs: {+ description: {+ story:+ "Use a vertical `Separator` to split a horizontal control strip into logical groups — formatting toolbars, header actions, breadcrumb chrome. Place it inside a flex row alongside the controls and it stretches to the row's height automatically."+ }+ }+ },+ render: () => (+ <div className="mx-auto flex h-9 w-fit items-center gap-1 rounded-md border border-border bg-container px-1.5">+ <IconButton variant="ghost" size="xs" aria-label="Bold">+ <BoldIcon />+ </IconButton>+ <IconButton variant="ghost" size="xs" aria-label="Italic">+ <ItalicIcon />+ </IconButton>+ <IconButton variant="ghost" size="xs" aria-label="Underline">+ <UnderlineIcon />+ </IconButton>+ <Separator orientation="vertical" className="mx-1 h-5" />+ <IconButton variant="ghost" size="xs" aria-label="Link">+ <LinkIcon />+ </IconButton>+ <IconButton variant="ghost" size="xs" aria-label="Code">+ <CodeIcon />+ </IconButton>+ <Separator orientation="vertical" className="mx-1 h-5" />+ <IconButton variant="ghost" size="xs" aria-label="Bulleted list">+ <ListIcon />+ </IconButton>+ </div>+ )+};diff --git a/frontend/src/components/v3/generic/Sheet/Sheet.stories.tsx b/frontend/src/components/v3/generic/Sheet/Sheet.stories.tsxnew file mode 100644index 0000000000..916fed2ef7--- /dev/null+++ b/frontend/src/components/v3/generic/Sheet/Sheet.stories.tsx@@ -0,0 +1,297 @@+import type { Meta, StoryObj } from "@storybook/react-vite";++import { Button } from "../Button";+import { Input } from "../Input";+import { Label } from "../Label";+import { Separator } from "../Separator";+import {+ Sheet,+ SheetClose,+ SheetContent,+ SheetDescription,+ SheetFooter,+ SheetHeader,+ SheetTitle,+ SheetTrigger+} from "./Sheet";++/**+ * Sheet renders a slide-over panel anchored to one edge of the viewport — title,+ * description, arbitrary body content, and an optional footer. Built on Radix's+ * Dialog primitive so it supports Esc / overlay click dismissal and includes a+ * close button by default.+ *+ * Reach for `Sheet` (not `Dialog`) when the content is long-form, secondary to+ * the page (e.g. detail panes, navigation drawers, filter panels, edit forms),+ * or when you want the underlying page to remain visually present. Use `Dialog`+ * for short, centered, modal-style interactions.+ */+const meta = {+ title: "Generic/Sheet",+ component: Sheet,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ children: {+ table: {+ disable: true+ }+ }+ }+} satisfies Meta<typeof Sheet>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ name: "Example: Default (Right Side)",+ parameters: {+ docs: {+ description: {+ story:+ "The baseline slide-over — `side` defaults to `right`, the most common placement for detail panes and edit flows. Wrap the footer's Cancel button in `SheetClose` so it dismisses the sheet without managing state. `SheetContent` defaults to a responsive width (`w-3/4` with `sm:max-w-md`); override via `className` when you need more or less room."+ }+ }+ },+ render: () => (+ <Sheet>+ <SheetTrigger asChild>+ <Button variant="outline">Open sheet</Button>+ </SheetTrigger>+ <SheetContent>+ <SheetHeader>+ <SheetTitle>Secret details</SheetTitle>+ <SheetDescription>+ View and update metadata for the selected secret. Changes apply on save.+ </SheetDescription>+ </SheetHeader>+ <div className="px-4 text-sm text-foreground">+ <p>+ Place primary content here — the body grows to fill available height between the header+ and footer.+ </p>+ </div>+ <SheetFooter>+ <SheetClose asChild>+ <Button variant="ghost">Cancel</Button>+ </SheetClose>+ <Button>Save changes</Button>+ </SheetFooter>+ </SheetContent>+ </Sheet>+ )+};++export const LeftSide: Story = {+ name: "Example: Left Side",+ parameters: {+ docs: {+ description: {+ story:+ 'Pass `side="left"` for navigation drawers and filter panels — the sheet slides in from the leading edge so it reads as supplementary chrome rather than a primary action. Pair with `SheetClose` on individual menu items if selecting one should close the drawer.'+ }+ }+ },+ render: () => (+ <Sheet>+ <SheetTrigger asChild>+ <Button variant="outline">Open filters</Button>+ </SheetTrigger>+ <SheetContent side="left">+ <SheetHeader>+ <SheetTitle>Filters</SheetTitle>+ <SheetDescription>Narrow the list of secrets by tag and environment.</SheetDescription>+ </SheetHeader>+ <div className="flex flex-col gap-3 px-4 text-sm text-foreground">+ <div className="flex items-center justify-between">+ <span>Production</span>+ <span className="text-accent">12</span>+ </div>+ <div className="flex items-center justify-between">+ <span>Staging</span>+ <span className="text-accent">8</span>+ </div>+ <div className="flex items-center justify-between">+ <span>Development</span>+ <span className="text-accent">23</span>+ </div>+ </div>+ <SheetFooter>+ <SheetClose asChild>+ <Button variant="ghost">Reset</Button>+ </SheetClose>+ <Button>Apply</Button>+ </SheetFooter>+ </SheetContent>+ </Sheet>+ )+};++export const BottomSheet: Story = {+ name: "Example: Bottom Sheet",+ parameters: {+ docs: {+ description: {+ story:+ 'Pass `side="bottom"` for mobile-style action sheets — the sheet height auto-fits its content (`h-auto`) rather than spanning the full viewport. Best for short menus of contextual actions where a centered Dialog would feel heavy.'+ }+ }+ },+ render: () => (+ <Sheet>+ <SheetTrigger asChild>+ <Button variant="outline">Show actions</Button>+ </SheetTrigger>+ <SheetContent side="bottom">+ <SheetHeader>+ <SheetTitle>Quick actions</SheetTitle>+ <SheetDescription>Choose an action to apply to the selected secret.</SheetDescription>+ </SheetHeader>+ <div className="flex flex-col gap-2 px-4">+ <SheetClose asChild>+ <Button variant="ghost">Copy value</Button>+ </SheetClose>+ <SheetClose asChild>+ <Button variant="ghost">Duplicate</Button>+ </SheetClose>+ <SheetClose asChild>+ <Button variant="ghost">Move to folder</Button>+ </SheetClose>+ </div>+ <SheetFooter>+ <SheetClose asChild>+ <Button variant="ghost">Cancel</Button>+ </SheetClose>+ </SheetFooter>+ </SheetContent>+ </Sheet>+ )+};++export const TopSheet: Story = {+ name: "Example: Top Sheet",+ parameters: {+ docs: {+ description: {+ story:+ 'Pass `side="top"` for banner-style announcements that slide down from the top of the viewport. The least common variant — reserve it for system-level notices (maintenance windows, breaking changes) where a non-modal alert would be too easy to miss.'+ }+ }+ },+ render: () => (+ <Sheet>+ <SheetTrigger asChild>+ <Button variant="outline">Show announcement</Button>+ </SheetTrigger>+ <SheetContent side="top">+ <SheetHeader>+ <SheetTitle>Scheduled maintenance</SheetTitle>+ <SheetDescription>+ Infisical will be briefly unavailable on Saturday at 02:00 UTC for a database upgrade.+ </SheetDescription>+ </SheetHeader>+ <SheetFooter>+ <SheetClose asChild>+ <Button variant="ghost">Dismiss</Button>+ </SheetClose>+ <Button>View details</Button>+ </SheetFooter>+ </SheetContent>+ </Sheet>+ )+};++export const WithForm: Story = {+ name: "Example: With Form",+ parameters: {+ docs: {+ description: {+ story:+ "Embed form fields between `SheetHeader` and `SheetFooter` for create / edit flows — the canonical use case for a right-side sheet. The header and footer stay anchored as the body grows, so longer forms do not push the primary action off-screen."+ }+ }+ },+ render: () => (+ <Sheet>+ <SheetTrigger asChild>+ <Button variant="outline">Edit profile</Button>+ </SheetTrigger>+ <SheetContent>+ <SheetHeader>+ <SheetTitle>Edit profile</SheetTitle>+ <SheetDescription>+ Update your display name and contact email. Changes apply immediately.+ </SheetDescription>+ </SheetHeader>+ <div className="flex flex-col gap-4 px-4">+ <div className="flex flex-col gap-2">+ <Label htmlFor="sheet-name">Name</Label>+ <Input id="sheet-name" defaultValue="Scott Wilson" />+ </div>+ <div className="flex flex-col gap-2">+ <Label htmlFor="sheet-email">Email</Label>+ <Input id="sheet-email" type="email" defaultValue="[email protected]" />+ </div>+ <div className="flex flex-col gap-2">+ <Label htmlFor="sheet-title">Job title</Label>+ <Input id="sheet-title" defaultValue="Software Engineer" />+ </div>+ </div>+ <SheetFooter>+ <SheetClose asChild>+ <Button variant="ghost">Cancel</Button>+ </SheetClose>+ <Button>Save changes</Button>+ </SheetFooter>+ </SheetContent>+ </Sheet>+ )+};++export const ScrollableContent: Story = {+ name: "Example: Scrollable Content",+ parameters: {+ docs: {+ description: {+ story:+ "For long bodies, anchor the header and footer while the middle scrolls — common for activity feeds, audit log details, and changelogs. Wrap the scroll region between two `Separator`s in a single flex column so the rules sit flush against the scrolling content; without the wrapper, `SheetContent`'s gap would push padding between them."+ }+ }+ },+ render: () => (+ <Sheet>+ <SheetTrigger asChild>+ <Button variant="outline">View activity</Button>+ </SheetTrigger>+ <SheetContent>+ <SheetHeader>+ <SheetTitle>Recent activity</SheetTitle>+ <SheetDescription>Audit events for this secret over the last 30 days.</SheetDescription>+ </SheetHeader>+ <div className="flex min-h-0 flex-1 flex-col">+ <Separator />+ <div className="flex thin-scrollbar flex-1 flex-col gap-3 overflow-y-auto px-4 text-sm text-foreground">+ {Array.from({ length: 12 }).map((_, i) => (+ // eslint-disable-next-line react/no-array-index-key+ <div key={i} className="flex flex-col gap-1 border-b border-border pb-3">+ <span className="font-medium">Event {i + 1}</span>+ <span className="text-accent">+ Secret value updated by [email protected] — {i + 1}h ago.+ </span>+ </div>+ ))}+ </div>+ <Separator />+ </div>+ <SheetFooter>+ <SheetClose asChild>+ <Button variant="ghost">Close</Button>+ </SheetClose>+ <Button>Export log</Button>+ </SheetFooter>+ </SheetContent>+ </Sheet>+ )+};diff --git a/frontend/src/components/v3/generic/Skeleton/Skeleton.stories.tsx b/frontend/src/components/v3/generic/Skeleton/Skeleton.stories.tsxnew file mode 100644index 0000000000..384442663d--- /dev/null+++ b/frontend/src/components/v3/generic/Skeleton/Skeleton.stories.tsx@@ -0,0 +1,163 @@+import type { Meta, StoryObj } from "@storybook/react-vite";++import { Card, CardContent, CardHeader } from "../Card";+import { Field, FieldGroup, FieldLabel } from "../Field";+import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../Table";+import { Skeleton } from "./Skeleton";++/**+ * `Skeleton` is the v3 loading placeholder. It renders a single pulsing block+ * with subtly rounded corners — and nothing else. There are no variants, no+ * `size` prop, and no intrinsic dimensions. Every usage shapes the placeholder+ * by passing utility classes through `className`.+ *+ * Three things to know before reaching for it:+ *+ * 1. **Set width and height explicitly.** A bare `<Skeleton />` collapses to+ * zero. Size the placeholder so it roughly matches the content it stands+ * in for — that way the layout doesn't reflow when real data swaps in.+ * 2. **Override the default shape via `className`.** The default rounded+ * rectangle is merged through `cn`, so callers can flip to a circle for+ * avatars, a pill for chips, or a darker tint when the placeholder sits on+ * an already-muted surface.+ * 3. **Use `data-slot="skeleton"`** as the hook for any consumer-level styling+ * or test queries — the attribute is set on every `Skeleton` instance.+ *+ * The example stories below show `Skeleton` slotted into the v3 primitives+ * that most often need a loading state — `Card`, `Table`, and `Field`-based+ * forms.+ */+const meta = {+ title: "Generic/Skeleton",+ component: Skeleton,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ className: {+ table: { disable: true }+ },+ children: {+ table: { disable: true }+ }+ }+} satisfies Meta<typeof Skeleton>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ parameters: {+ docs: {+ description: {+ story:+ "Baseline pulsing block. `Skeleton` has no intrinsic size — every usage sets width and height through `className`. Pick one of the *Example* stories below as a starting point and adjust dimensions to match the content being loaded."+ }+ }+ },+ render: () => <Skeleton className="h-4 w-48" />+};++export const ExampleCard: Story = {+ name: "Example: Card",+ parameters: {+ docs: {+ description: {+ story:+ "Drop `Skeleton`s inside a `Card` while the card's data fetches — title, description, and body all stand in for the real content. The card's chrome (border, padding, shadow) renders immediately, so the user sees the layout shape before the content arrives. Used while project tiles, integration cards, and dashboard widgets are loading."+ }+ }+ },+ render: () => (+ <Card className="w-sm">+ <CardHeader>+ <Skeleton className="h-5 w-2/3" />+ <Skeleton className="h-4 w-full" />+ </CardHeader>+ <CardContent className="flex flex-col gap-3">+ <Skeleton className="h-28 w-full" />+ <Skeleton className="h-4 w-full" />+ <Skeleton className="h-4 w-4/5" />+ </CardContent>+ </Card>+ )+};++export const ExampleTableRow: Story = {+ name: "Example: Table",+ decorators: [+ (Story) => (+ <div className="w-[38rem]">+ <Story />+ </div>+ )+ ],+ parameters: {+ docs: {+ description: {+ story:+ "Render a `Skeleton` in each `TableCell` while the table's rows fetch — repeat the row once per expected entry (often 5–10) so the table height stays stable through the swap. Keep the skeletons rectangular: rounded placeholders read as avatars and would mislead the user about the real cell content."+ }+ }+ },+ render: () => (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead>Name</TableHead>+ <TableHead>Email</TableHead>+ <TableHead>Role</TableHead>+ <TableHead>Last active</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {Array.from({ length: 5 }).map((_, i) => (+ // eslint-disable-next-line react/no-array-index-key+ <TableRow key={i}>+ <TableCell>+ <Skeleton className="h-4 w-32" />+ </TableCell>+ <TableCell>+ <Skeleton className="h-4 w-48" />+ </TableCell>+ <TableCell>+ <Skeleton className="h-4 w-20" />+ </TableCell>+ <TableCell>+ <Skeleton className="h-4 w-24" />+ </TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ )+};++export const ExampleFormField: Story = {+ name: "Example: Form",+ parameters: {+ docs: {+ description: {+ story:+ "Stand a `Skeleton` in for each `Input` while a settings form fetches its initial values. Real `FieldLabel` text renders immediately — the form's structure is known, only the values are loading. Match each skeleton's height to the `Input`'s height so the layout doesn't twitch when the real controls mount."+ }+ }+ },+ render: () => (+ <FieldGroup className="w-sm">+ <Field>+ <FieldLabel>Display name</FieldLabel>+ <Skeleton className="h-9 w-full" />+ </Field>+ <Field>+ <FieldLabel>Email</FieldLabel>+ <Skeleton className="h-9 w-full" />+ </Field>+ <Field>+ <FieldLabel>Role</FieldLabel>+ <Skeleton className="h-9 w-full" />+ </Field>+ </FieldGroup>+ )+};diff --git a/frontend/src/components/v3/generic/Switch/Switch.stories.tsx b/frontend/src/components/v3/generic/Switch/Switch.stories.tsxindex 80147590d8..23af9258ff 100644--- a/frontend/src/components/v3/generic/Switch/Switch.stories.tsx+++ b/frontend/src/components/v3/generic/Switch/Switch.stories.tsx@@ -1,5 +1,7 @@import type { Meta, StoryObj } from "@storybook/react-vite";+import { Field, FieldContent, FieldDescription, FieldGroup, FieldTitle } from "../Field";+import { Label } from "../Label";import { Switch } from "./Switch";/**@@ -40,7 +42,10 @@ const meta = {control: "boolean"}},- args: { checked: false, disabled: false, size: "default" }+ args: { checked: false, disabled: false, size: "default" },+ globals: {+ backgrounds: { value: "card" }+ }} satisfies Meta<typeof Switch>;export default meta;@@ -243,3 +248,87 @@ export const SizeSmall: Story = {}}};++export const WithLabel: Story = {+ name: "Example: With Label",+ parameters: {+ docs: {+ description: {+ story:+ "The minimum accessible pairing — a `Label` whose `htmlFor` matches the `Switch`'s `id`. Clicking the label toggles the switch."+ }+ }+ },+ render: () => (+ <div className="flex w-80 items-center gap-3">+ <Switch id="switch-mfa" />+ <Label htmlFor="switch-mfa">Require MFA on sign-in</Label>+ </div>+ )+};++export const WithDescription: Story = {+ name: "Example: With Description",+ parameters: {+ docs: {+ description: {+ story:+ "Pair a `Switch` with `FieldTitle` and `FieldDescription` inside a horizontal `Field` for the canonical settings-row layout — title and helper text on the left, control on the right."+ }+ }+ },+ render: () => (+ <Field orientation="horizontal" className="w-[420px]">+ <FieldContent>+ <FieldTitle>Multi-factor authentication</FieldTitle>+ <FieldDescription>+ Require a second factor when signing in from a new device.+ </FieldDescription>+ </FieldContent>+ <Switch defaultChecked />+ </Field>+ )+};++export const InFieldGroup: Story = {+ name: "Example: In Field Group",+ parameters: {+ docs: {+ description: {+ story:+ "Stack multiple toggle rows in a `FieldGroup` for consistent vertical rhythm. The canonical layout for a settings panel of binary preferences."+ }+ }+ },+ render: () => (+ <FieldGroup className="w-[420px]">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Multi-factor authentication</FieldTitle>+ <FieldDescription>+ Require a second factor when signing in from a new device.+ </FieldDescription>+ </FieldContent>+ <Switch defaultChecked />+ </Field>+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Email notifications</FieldTitle>+ <FieldDescription>+ Send a digest of audit events every Monday at 09:00 UTC.+ </FieldDescription>+ </FieldContent>+ <Switch />+ </Field>+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>Telemetry</FieldTitle>+ <FieldDescription>+ Help us improve Infisical by sharing anonymous usage data.+ </FieldDescription>+ </FieldContent>+ <Switch defaultChecked />+ </Field>+ </FieldGroup>+ )+};diff --git a/frontend/src/components/v3/generic/Table/Table.stories.tsx b/frontend/src/components/v3/generic/Table/Table.stories.tsxindex 227b2dbd38..9031abb3e9 100644--- a/frontend/src/components/v3/generic/Table/Table.stories.tsx+++ b/frontend/src/components/v3/generic/Table/Table.stories.tsx@@ -1,68 +1,486 @@+import { useState } from "react";import type { Meta, StoryObj } from "@storybook/react-vite";-import { CopyIcon, EditIcon, MoreHorizontalIcon, TrashIcon } from "lucide-react";+import {+ BoxIcon as ProjectIcon,+ ChevronDownIcon,+ ChevronsUpDownIcon,+ CopyIcon,+ EditIcon,+ MoreHorizontalIcon,+ TrashIcon+} from "lucide-react";import {Badge,+ Checkbox,DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,- IconButton+ IconButton,+ Pagination} from "@app/components/v3/generic";-import { ProjectIcon } from "@app/components/v3/platform";-import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "./Table";+import {+ Table,+ TableBody,+ TableCaption,+ TableCell,+ TableFooter,+ TableHead,+ TableHeader,+ TableRow+} from "./Table";-const identities: {+type Identity = {name: string;role: string;managedBy?: { scope: "org" | "namespace"; name: string };-}[] = [+};++const identities: Identity[] = [{name: "machine-one",role: "Admin",- managedBy: {- scope: "org",- name: "infisical"- }+ managedBy: { scope: "org", name: "infisical" }},{name: "machine-two",role: "Viewer",- managedBy: {- scope: "namespace",- name: "engineering"- }- },- {- name: "machine-three",- role: "Member"+ managedBy: { scope: "namespace", name: "engineering" }},+ { name: "machine-three", role: "Member" },{name: "machine-four",role: "Admin",- managedBy: {- scope: "namespace",- name: "dev-ops"- }+ managedBy: { scope: "namespace", name: "dev-ops" }},{name: "machine-five",role: "Viewer",- managedBy: {- scope: "org",- name: "infisical"- }+ managedBy: { scope: "org", name: "infisical" }},- {- name: "machine-six",- role: "Member"- }+ { name: "machine-six", role: "Member" }];-function TableDemo() {+/**+ * `Table` is the v3 data-table primitive — native `<table>` markup wrapped in a+ * bordered, scrollable container. Compose it from `Table` (root) → `TableHeader`+ * (with one `TableRow` of `TableHead`s) → `TableBody` (with one `TableRow` of+ * `TableCell`s per data row), plus optional `TableFooter` for summary rows and+ * `TableCaption` for an accessible description.+ *+ * **Always render a `Table` inside a `Card`, `Dialog`, or `Sheet`.** Tables sit+ * on a chrome surface, never bare on the page background — that's how a+ * settings section, a modal flow, or a slide-over panel reads as a contained+ * unit. (The stories below render the table on its own purely so the component+ * is the focus.)+ *+ * **For the empty case, use the `Empty` component above the table** (set+ * `className="border"` to activate its dashed frame). Don't render an empty+ * `Table` with a "No rows" cell — `Empty` is the v3-sanctioned empty state with+ * icon, title, description, and call-to-action slots.+ *+ * Reach for `Table` for tabular data with a known schema — members, identities,+ * audit logs, secret diffs, integration runs. For long lists with no grid+ * structure, a `<ul>` of `Item`s is usually a better fit.+ *+ * Useful per-cell flags:+ * - **`isTruncatable`** on `TableHead` / `TableCell` clips long content with+ * ellipsis instead of letting the column blow out the row width.+ * - **`data-state="selected"`** on a `TableRow` paints the selected highlight+ * for row-checkbox patterns.+ * - A `TableHead` with a child icon flips to a sortable look — clickable+ * cursor and inline icon — without any extra wiring.+ *+ * For datasets that don't fit on a single screen, pair the `Table` with the+ * `Pagination` component as a sibling below it — see *Example: With+ * Pagination*.+ */+const meta = {+ title: "Generic/Table",+ component: Table,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ decorators: [+ (Story) => (+ <div className="w-[760px]">+ <Story />+ </div>+ )+ ]+} satisfies Meta<typeof Table>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ name: "Anatomy: Default",+ parameters: {+ docs: {+ description: {+ story:+ "The baseline — `Table` wraps a `TableHeader` (one row of `TableHead`s) and a `TableBody` (one `TableRow` per data row). The bordered container and horizontal scroll behavior are built in, so a bare table is already a finished surface."+ }+ }+ },+ render: () => (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead>Name</TableHead>+ <TableHead>Role</TableHead>+ <TableHead>Status</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {identities.slice(0, 4).map((id) => (+ <TableRow key={id.name}>+ <TableCell className="font-medium">{id.name}</TableCell>+ <TableCell>{id.role}</TableCell>+ <TableCell>+ <Badge variant="success">Active</Badge>+ </TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ )+};++export const WithCaption: Story = {+ name: "Anatomy: With Caption",+ parameters: {+ docs: {+ description: {+ story:+ "`TableCaption` renders a screen-reader-accessible description below the table. Use it whenever the table needs context that isn't carried by the column headers — what the rows represent, the time window, the filter that produced them."+ }+ }+ },+ render: () => (+ <Table>+ <TableCaption>Identities created in the last 30 days.</TableCaption>+ <TableHeader>+ <TableRow>+ <TableHead>Name</TableHead>+ <TableHead>Role</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {identities.slice(0, 3).map((id) => (+ <TableRow key={id.name}>+ <TableCell className="font-medium">{id.name}</TableCell>+ <TableCell>{id.role}</TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ )+};++export const WithFooter: Story = {+ name: "Anatomy: With Footer",+ parameters: {+ docs: {+ description: {+ story:+ "`TableFooter` renders a summary row (totals, counts, aggregates) below the body, separated by its own top border. Use a single `TableRow` inside; `colSpan` whatever cells you want to merge for the summary label."+ }+ }+ },+ render: () => (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead>Project</TableHead>+ <TableHead>Active secrets</TableHead>+ <TableHead className="text-right">Reads (30d)</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {[+ { name: "infra", secrets: 142, reads: 18430 },+ { name: "api", secrets: 87, reads: 9622 },+ { name: "frontend", secrets: 24, reads: 3014 }+ ].map((p) => (+ <TableRow key={p.name}>+ <TableCell className="font-medium">{p.name}</TableCell>+ <TableCell>{p.secrets}</TableCell>+ <TableCell className="text-right">{p.reads.toLocaleString()}</TableCell>+ </TableRow>+ ))}+ </TableBody>+ <TableFooter>+ <TableRow>+ <TableCell className="font-medium">Total</TableCell>+ <TableCell>253</TableCell>+ <TableCell className="text-right">31,066</TableCell>+ </TableRow>+ </TableFooter>+ </Table>+ )+};++export const WithSelection: Story = {+ name: "Example: With Selection",+ parameters: {+ docs: {+ description: {+ story:+ 'Set `data-state="selected"` on a `TableRow` to paint the selected highlight — the same hover background, but persistent. Combine with a leading `Checkbox` cell for a row-selection pattern (bulk edit, bulk delete).'+ }+ }+ },+ render: () => (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead className="w-10" />+ <TableHead>Name</TableHead>+ <TableHead>Role</TableHead>+ <TableHead>Managed by</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {identities.slice(0, 4).map((id, i) => (+ <TableRow key={id.name} data-state={i === 1 ? "selected" : undefined}>+ <TableCell>+ <Checkbox isChecked={i === 1} aria-label={`Select ${id.name}`} />+ </TableCell>+ <TableCell className="font-medium">{id.name}</TableCell>+ <TableCell>{id.role}</TableCell>+ <TableCell>{id.managedBy?.name ?? "—"}</TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ )+};++export const SortableHeaders: Story = {+ name: "Example: Sortable Headers",+ parameters: {+ docs: {+ description: {+ story:+ "Drop a sort-indicator icon as a child of `TableHead` and the cell automatically picks up a clickable cursor and an inline icon slot. Wire `onClick` to your sort handler; rotate or fade the icon to reflect the active column and direction."+ }+ }+ },+ render: () => (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead onClick={() => {}}>+ Name+ <ChevronDownIcon />+ </TableHead>+ <TableHead onClick={() => {}}>+ Role+ <ChevronsUpDownIcon className="opacity-30" />+ </TableHead>+ <TableHead onClick={() => {}}>+ Managed by+ <ChevronsUpDownIcon className="opacity-30" />+ </TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {identities.slice(0, 4).map((id) => (+ <TableRow key={id.name}>+ <TableCell className="font-medium">{id.name}</TableCell>+ <TableCell>{id.role}</TableCell>+ <TableCell>{id.managedBy?.name ?? "—"}</TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ )+};++export const TruncatedCells: Story = {+ name: "Example: Truncated Cells",+ parameters: {+ docs: {+ description: {+ story:+ "Pass `isTruncatable` to `TableHead` and `TableCell` for any column that can carry long, single-line content (descriptions, paths, signatures). The column collapses to whatever space the row gives it, with the overflow clipped behind an ellipsis. Pair with the cell's `title` attribute so the full value is hover-discoverable."+ }+ }+ },+ render: () => (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead className="w-32">Identity</TableHead>+ <TableHead isTruncatable>Description</TableHead>+ <TableHead className="w-28">Role</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {[+ {+ name: "machine-one",+ description:+ "Long-running CI worker in the infrastructure project, used by automation jobs that publish release artefacts to internal mirrors.",+ role: "Admin"+ },+ {+ name: "machine-two",+ description:+ "Service identity for the engineering namespace's secret rotation job; rotates every Sunday at 02:00 UTC.",+ role: "Viewer"+ },+ {+ name: "machine-three",+ description: "Standby identity reserved for incident response — do not delete.",+ role: "Member"+ }+ ].map((id) => (+ <TableRow key={id.name}>+ <TableCell className="font-medium">{id.name}</TableCell>+ <TableCell isTruncatable title={id.description}>+ {id.description}+ </TableCell>+ <TableCell>{id.role}</TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ )+};++export const WithActions: Story = {+ name: "Example: With Actions",+ parameters: {+ docs: {+ description: {+ story:+ "Trailing `DropdownMenu` triggered by an `IconButton` is the canonical row-action pattern. Place the action cell at the right of the row (header empty, cell right-aligned) so the kebab sits on the trailing edge regardless of column widths."+ }+ }+ },+ render: () => (+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead>Name</TableHead>+ <TableHead>Role</TableHead>+ <TableHead className="w-12 text-right" />+ </TableRow>+ </TableHeader>+ <TableBody>+ {identities.slice(0, 4).map((id) => (+ <TableRow key={id.name}>+ <TableCell className="font-medium">{id.name}</TableCell>+ <TableCell>{id.role}</TableCell>+ <TableCell className="text-right">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <IconButton variant="ghost" size="xs" aria-label={`${id.name} actions`}>+ <MoreHorizontalIcon />+ </IconButton>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end" className="w-36">+ <DropdownMenuItem>+ <CopyIcon />+ Copy ID+ </DropdownMenuItem>+ <DropdownMenuItem>+ <EditIcon />+ Edit identity+ </DropdownMenuItem>+ <DropdownMenuItem variant="danger">+ <TrashIcon />+ Delete identity+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ )+};++function PaginationRender() {+ const [page, setPage] = useState(1);+ const [perPage, setPerPage] = useState(10);+ const TOTAL = 142;++ const start = (page - 1) * perPage;+ const rowCount = Math.min(perPage, TOTAL - start);+ const roleFor = (idx: number) => {+ if (idx % 5 === 0) return "Admin";+ if (idx % 3 === 0) return "Viewer";+ return "Member";+ };+ const rows = Array.from({ length: rowCount }, (_, i) => {+ const idx = start + i + 1;+ return { name: `machine-${String(idx).padStart(3, "0")}`, role: roleFor(idx) };+ });+return (- <Table className="w-[800px]">+ <>+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead className="w-1/2">Name</TableHead>+ <TableHead>Role</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {rows.map((row) => (+ <TableRow key={row.name}>+ <TableCell className="font-medium">{row.name}</TableCell>+ <TableCell>{row.role}</TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ <Pagination+ count={TOTAL}+ page={page}+ perPage={perPage}+ onChangePage={setPage}+ onChangePerPage={(next) => {+ setPerPage(next);+ setPage(1);+ }}+ />+ </>+ );+}++export const WithPagination: Story = {+ name: "Example: With Pagination",+ parameters: {+ docs: {+ description: {+ story:+ "Render `Pagination` as a sibling directly below the `Table`. The component handles the page / per-page controls and emits `onChangePage` / `onChangePerPage` — you supply the `count` of total rows and slice the dataset before rendering. This is the canonical pattern for any list that doesn't fit on a single screen."+ }+ }+ },+ render: () => <PaginationRender />+};++export const KitchenSink: Story = {+ name: "Example: Kitchen Sink",+ parameters: {+ docs: {+ description: {+ story:+ "A realistic identities table — a status `Badge`, a managed-by `Badge` with a `ProjectIcon`, and per-row actions in a trailing `DropdownMenu`. The composition you reach for on most management screens."+ }+ }+ },+ render: () => (+ <Table><TableHeader><TableRow><TableHead className="w-1/3">Name</TableHead>@@ -72,10 +490,10 @@ function TableDemo() {</TableRow></TableHeader><TableBody>- {identities.map((identity) => (- <TableRow key={identity.name}>- <TableCell className="font-medium">{identity.name}</TableCell>- <TableCell>{identity.role}</TableCell>+ {identities.map((id) => (+ <TableRow key={id.name}>+ <TableCell className="font-medium">{id.name}</TableCell>+ <TableCell>{id.role}</TableCell><TableCell><Badge variant="project"><ProjectIcon />@@ -85,7 +503,7 @@ function TableDemo() {<TableCell className="text-right"><DropdownMenu><DropdownMenuTrigger asChild>- <IconButton variant="ghost" size="xs">+ <IconButton variant="ghost" size="xs" aria-label={`${id.name} actions`}><MoreHorizontalIcon /></IconButton></DropdownMenuTrigger>@@ -109,23 +527,5 @@ function TableDemo() {))}</TableBody></Table>- );-}--const meta = {- title: "Generic/Table",- component: TableDemo,- parameters: {- layout: "centered"- },- tags: ["autodocs"],- argTypes: {}-} satisfies Meta<typeof TableDemo>;--export default meta;-type Story = StoryObj<typeof meta>;--export const KitchenSInk: Story = {- name: "Example: Kitchen Sink",- args: {}+ )};diff --git a/frontend/src/components/v3/generic/Table/Table.tsx b/frontend/src/components/v3/generic/Table/Table.tsxindex f4e34b6382..c7e4aea66b 100644--- a/frontend/src/components/v3/generic/Table/Table.tsx+++ b/frontend/src/components/v3/generic/Table/Table.tsx@@ -52,7 +52,11 @@ function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {return (<tfootdata-slot="table-footer"- className={cn("border-t border-border font-medium [&>tr]:last:border-b-0", className)}+ className={cn(+ "border-t border-border bg-foreground/[0.03] font-medium",+ "[&>tr:last-of-type]:border-b-0 [&>tr:last-of-type>td]:border-b-0",+ className+ )}{...props}/>);@@ -118,7 +122,10 @@ function TableCaption({ className, ...props }: React.ComponentProps<"caption">)return (<captiondata-slot="table-caption"- className={cn("text-muted-foreground mt-4 text-sm", className)}+ className={cn(+ "border-t border-border bg-foreground/[0.03] px-3 py-2 text-left text-xs text-muted",+ className+ )}{...props}/>);diff --git a/frontend/src/components/v3/generic/TextArea/TextArea.stories.tsx b/frontend/src/components/v3/generic/TextArea/TextArea.stories.tsxnew file mode 100644index 0000000000..a063b5bb14--- /dev/null+++ b/frontend/src/components/v3/generic/TextArea/TextArea.stories.tsx@@ -0,0 +1,216 @@+import type { Meta, StoryObj } from "@storybook/react-vite";++import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from "../Field";+import { TextArea } from "./TextArea";++/**+ * `TextArea` is the v3 multi-line text control. It renders a styled native+ * `<textarea>`, forwards every standard HTML textarea attribute, and adds one+ * custom prop — `isError` — which flips `aria-invalid` and applies the danger+ * border + focus ring (matching `Input`).+ *+ * The control auto-grows with the user's input — setting `rows` is rarely+ * needed, just let the content drive the height. For labels, helper text, and+ * validation errors, compose with `Field` / `FieldLabel` / `FieldDescription` /+ * `FieldError` from `../Field` rather than re-inventing the layout.+ *+ * The component fills its parent's width by design — let the parent (`Field`,+ * `FieldGroup`, or a custom container) decide how wide the textarea should be.+ */+const meta = {+ title: "Generic/TextArea",+ component: TextArea,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ rows: {+ control: "number"+ },+ isError: {+ control: "boolean"+ },+ disabled: {+ control: "boolean"+ },+ readOnly: {+ control: "boolean"+ },+ placeholder: {+ control: "text"+ },+ className: {+ table: { disable: true }+ }+ },+ args: {+ placeholder: "Tell us a little about your team...",+ isError: false,+ disabled: false,+ readOnly: false+ },+ decorators: [+ (Story) => (+ <div className="w-80">+ <Story />+ </div>+ )+ ],+ globals: {+ backgrounds: { value: "card" }+ }+} satisfies Meta<typeof TextArea>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ parameters: {+ docs: {+ description: {+ story:+ "Baseline empty textarea with placeholder text. The control auto-grows as the user types — only set `rows` when you specifically want to cap the starting height."+ }+ }+ }+};++export const Disabled: Story = {+ name: "State: Disabled",+ args: {+ defaultValue:+ "We use Infisical to manage secrets across our staging and production environments.",+ disabled: true+ },+ parameters: {+ docs: {+ description: {+ story:+ "`disabled` removes the textarea from the tab order, dims it, and signals non-interactivity through the cursor. Use for fields that aren't editable in the current state — but prefer `readOnly` when the value is still meaningful and copy-able."+ }+ }+ }+};++export const Readonly: Story = {+ name: "State: Readonly",+ args: {+ defaultValue:+ "This description was set by the workspace owner and cannot be edited from this view. Reach out to an admin if it needs to change.",+ readOnly: true+ },+ parameters: {+ docs: {+ description: {+ story:+ "`readOnly` keeps the textarea focusable and selectable but blocks edits. It looks visually identical to a normal textarea — that's intentional, since the value is still part of the form. Use for derived or immutable values (audit notes, owner-set descriptions)."+ }+ }+ }+};++export const WithError: Story = {+ name: "State: Error",+ args: {+ defaultValue: "no",+ isError: true+ },+ parameters: {+ docs: {+ description: {+ story:+ 'Setting `isError` flips `aria-invalid="true"`, which (a) styles the textarea with the danger border + ring and (b) lets assistive tech announce the error. Always render a paired `FieldError` so sighted users get the explanation too — see *Example: With Validation Error*.'+ }+ }+ }+};++export const WithLabel: Story = {+ name: "Example: With Label",+ parameters: {+ docs: {+ description: {+ story:+ "The minimum accessible pairing: a `Field` wrapper, a `FieldLabel` whose `htmlFor` matches the `TextArea`'s `id`, and the `TextArea` itself. Don't ship raw textareas without a label — use `aria-label` only when a visible label is genuinely impossible."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel htmlFor="textarea-with-label">Workspace description</FieldLabel>+ <TextArea id="textarea-with-label" placeholder="What is this workspace for?" />+ </Field>+ )+};++export const WithDescription: Story = {+ name: "Example: With Description",+ parameters: {+ docs: {+ description: {+ story:+ "Add `FieldDescription` below the textarea for helper text — format hints, character-count guidance, or cross-references. Keep it short; long-form guidance belongs in docs, not the form."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel htmlFor="textarea-with-description">Reason for access</FieldLabel>+ <TextArea+ id="textarea-with-description"+ placeholder="Briefly describe why this access is required..."+ />+ <FieldDescription>+ Visible to approvers in the audit log. Markdown is not rendered.+ </FieldDescription>+ </Field>+ )+};++export const WithValidationError: Story = {+ name: "Example: With Validation Error",+ parameters: {+ docs: {+ description: {+ story:+ "The standard validation pattern: `isError` on the textarea + a `FieldError` below it. `FieldError` accepts a string (shown here) or a `react-hook-form` `errors` array — duplicate messages are de-duplicated and multiple distinct messages render as a bulleted list."+ }+ }+ },+ render: () => (+ <Field>+ <FieldLabel htmlFor="textarea-with-validation-error">Reason for access</FieldLabel>+ <TextArea id="textarea-with-validation-error" defaultValue="no" isError />+ <FieldError>Provide at least 20 characters of context for the auditor.</FieldError>+ </Field>+ )+};++export const InFieldGroup: Story = {+ name: "Example: In Field Group",+ parameters: {+ docs: {+ description: {+ story:+ "Stack a `TextArea` alongside other fields in a `FieldGroup` for consistent vertical rhythm and to share the container-query context that `Field`'s `responsive` orientation depends on. Common in detail forms where a description sits below a name and identifier."+ }+ }+ },+ render: () => (+ <FieldGroup>+ <Field>+ <FieldLabel htmlFor="group-workspace-name">Workspace name</FieldLabel>+ <TextArea id="group-workspace-name" rows={1} defaultValue="Acme Production" />+ </Field>+ <Field>+ <FieldLabel htmlFor="group-workspace-description">Description</FieldLabel>+ <TextArea+ id="group-workspace-description"+ defaultValue="Production secrets for the Acme web app and worker pool. Owned by platform-eng."+ />+ <FieldDescription>Shown on the workspace overview and in audit exports.</FieldDescription>+ </Field>+ </FieldGroup>+ )+};diff --git a/frontend/src/components/v3/generic/TextArea/TextArea.tsx b/frontend/src/components/v3/generic/TextArea/TextArea.tsxindex 53dbbe5348..6c5f69a273 100644--- a/frontend/src/components/v3/generic/TextArea/TextArea.tsx+++ b/frontend/src/components/v3/generic/TextArea/TextArea.tsx@@ -3,21 +3,23 @@ import * as React from "react";import { cn } from "../../utils";-const TextArea = React.forwardRef<HTMLTextAreaElement, React.ComponentProps<"textarea">>(- ({ className, ...props }, ref) => {- return (- <textarea- ref={ref}- data-slot="textarea"- className={cn(- "placeholder:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex min-h-16 thin-scrollbar w-full rounded-md border border-border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",- className- )}- {...props}- />- );- }-);+const TextArea = React.forwardRef<+ HTMLTextAreaElement,+ React.ComponentProps<"textarea"> & { isError?: boolean }+>(({ className, isError, ...props }, ref) => {+ return (+ <textarea+ ref={ref}+ data-slot="textarea"+ className={cn(+ "placeholder:text-muted-foreground flex min-h-16 thin-scrollbar w-full rounded-md border border-border bg-transparent px-3 py-2 text-base text-foreground shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger aria-invalid:ring-danger/40 md:text-sm",+ className+ )}+ aria-invalid={isError}+ {...props}+ />+ );+});TextArea.displayName = "TextArea";diff --git a/frontend/src/components/v3/generic/Tooltip/Tooltip.stories.tsx b/frontend/src/components/v3/generic/Tooltip/Tooltip.stories.tsxnew file mode 100644index 0000000000..2e9e11e80d--- /dev/null+++ b/frontend/src/components/v3/generic/Tooltip/Tooltip.stories.tsx@@ -0,0 +1,391 @@+import type { Meta, StoryObj } from "@storybook/react-vite";+import { HelpCircleIcon, InfoIcon } from "lucide-react";++import { Button } from "../Button";+import { IconButton } from "../IconButton";+import { Tooltip, TooltipContent, TooltipTrigger } from "./Tooltip";++/**+ * Tooltips surface short, contextual hints anchored to a trigger element.+ * Use them to name icon-only controls, explain *why* something is disabled,+ * or expose secondary detail that isn't worth the visual weight of a label.+ *+ * The compound API is `<Tooltip><TooltipTrigger /><TooltipContent /></Tooltip>`.+ * `Tooltip` already wraps its children in a `TooltipProvider` internally, so+ * ad-hoc tooltips don't need a provider higher in the tree. Wrap your trigger+ * with `asChild` to forward the trigger props onto a `Button`, `IconButton`,+ * or any focusable element — keep tooltip content to a single short sentence,+ * and never put interactive controls inside it.+ */+const meta = {+ title: "Generic/Tooltip",+ component: Tooltip,+ parameters: {+ layout: "centered"+ },+ tags: ["autodocs"],+ argTypes: {+ delayDuration: {+ control: "number"+ },+ defaultOpen: {+ control: "boolean"+ },+ disableHoverableContent: {+ control: "boolean"+ },+ open: {+ table: {+ disable: true+ }+ },+ onOpenChange: {+ table: {+ disable: true+ }+ },+ children: {+ table: {+ disable: true+ }+ }+ },+ args: { delayDuration: 0, defaultOpen: false }+} satisfies Meta<typeof Tooltip>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {+ name: "Example: Default",+ parameters: {+ docs: {+ description: {+ story:+ "The canonical usage — `Tooltip` wraps a trigger and a content body. Use `asChild` on `TooltipTrigger` to forward props onto an existing focusable element rather than rendering an extra wrapper. `Tooltip` includes its own `TooltipProvider`, so you don't need to wrap the page."+ }+ }+ },+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ <Button variant="outline">Hover me</Button>+ </TooltipTrigger>+ <TooltipContent>This is a tooltip</TooltipContent>+ </Tooltip>+ )+};++export const IconTrigger: Story = {+ name: "Example: Icon Trigger",+ parameters: {+ docs: {+ description: {+ story:+ "Icon-only controls have no visible label, so a tooltip is what tells the user what the action does. Pair an `IconButton` with a tooltip whenever the icon's meaning isn't already obvious from context."+ }+ }+ },+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ <IconButton variant="ghost" aria-label="Help">+ <HelpCircleIcon />+ </IconButton>+ </TooltipTrigger>+ <TooltipContent>View help and documentation</TooltipContent>+ </Tooltip>+ )+};++export const SideTop: Story = {+ name: "Variant: Side — Top",+ parameters: {+ docs: {+ description: {+ story:+ '`side="top"` is the default and the safest choice for inline triggers — the tooltip rises above the cursor without obscuring the trigger or following content.'+ }+ }+ },+ decorators: [+ (Story) => (+ <div className="p-12">+ <Story />+ </div>+ )+ ],+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ <Button variant="outline">Top</Button>+ </TooltipTrigger>+ <TooltipContent side="top">Anchored above the trigger</TooltipContent>+ </Tooltip>+ )+};++export const SideRight: Story = {+ name: "Variant: Side — Right",+ parameters: {+ docs: {+ description: {+ story:+ '`side="right"` works well for triggers at the end of a row or in a left-rail nav, where there\'s horizontal room and content above/below would be cramped.'+ }+ }+ },+ decorators: [+ (Story) => (+ <div className="p-12">+ <Story />+ </div>+ )+ ],+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ <Button variant="outline">Right</Button>+ </TooltipTrigger>+ <TooltipContent side="right">Anchored to the right of the trigger</TooltipContent>+ </Tooltip>+ )+};++export const SideBottom: Story = {+ name: "Variant: Side — Bottom",+ parameters: {+ docs: {+ description: {+ story:+ '`side="bottom"` suits triggers in a top toolbar or header where content above is already busy.'+ }+ }+ },+ decorators: [+ (Story) => (+ <div className="p-12">+ <Story />+ </div>+ )+ ],+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ <Button variant="outline">Bottom</Button>+ </TooltipTrigger>+ <TooltipContent side="bottom">Anchored below the trigger</TooltipContent>+ </Tooltip>+ )+};++export const SideLeft: Story = {+ name: "Variant: Side — Left",+ parameters: {+ docs: {+ description: {+ story:+ '`side="left"` is useful for triggers on the right edge of a panel or row — Radix will still flip automatically if there isn\'t space, so this is a hint rather than a guarantee.'+ }+ }+ },+ decorators: [+ (Story) => (+ <div className="p-12">+ <Story />+ </div>+ )+ ],+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ <Button variant="outline">Left</Button>+ </TooltipTrigger>+ <TooltipContent side="left">Anchored to the left of the trigger</TooltipContent>+ </Tooltip>+ )+};++export const AlignStart: Story = {+ name: "Variant: Align — Start",+ parameters: {+ docs: {+ description: {+ story:+ '`align="start"` lines up the start edge of the tooltip with the start edge of the trigger. Use it when the trigger sits on a left margin and you want the tooltip to read flush with it.'+ }+ }+ },+ decorators: [+ (Story) => (+ <div className="p-12">+ <Story />+ </div>+ )+ ],+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ <Button variant="outline">Align start</Button>+ </TooltipTrigger>+ <TooltipContent align="start">Aligned to the trigger's start edge</TooltipContent>+ </Tooltip>+ )+};++export const AlignCenter: Story = {+ name: "Variant: Align — Center",+ parameters: {+ docs: {+ description: {+ story: '`align="center"` is the default — the tooltip is centered on the trigger.'+ }+ }+ },+ decorators: [+ (Story) => (+ <div className="p-12">+ <Story />+ </div>+ )+ ],+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ <Button variant="outline">Align center</Button>+ </TooltipTrigger>+ <TooltipContent align="center">Centered on the trigger</TooltipContent>+ </Tooltip>+ )+};++export const AlignEnd: Story = {+ name: "Variant: Align — End",+ parameters: {+ docs: {+ description: {+ story:+ '`align="end"` lines up the end edge of the tooltip with the end edge of the trigger — useful for triggers that sit against a right edge.'+ }+ }+ },+ decorators: [+ (Story) => (+ <div className="p-12">+ <Story />+ </div>+ )+ ],+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ <Button variant="outline">Align end</Button>+ </TooltipTrigger>+ <TooltipContent align="end">Aligned to the trigger's end edge</TooltipContent>+ </Tooltip>+ )+};++export const LongContent: Story = {+ name: "Example: Long Content",+ parameters: {+ docs: {+ description: {+ story:+ "`TooltipContent` is `w-fit` by default, so long single-line content will keep growing horizontally. Set a `max-w-*` on `TooltipContent` to force wrapping for multi-sentence hints."+ }+ }+ },+ decorators: [+ (Story) => (+ <div className="p-12">+ <Story />+ </div>+ )+ ],+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ <IconButton variant="ghost" aria-label="More info">+ <InfoIcon />+ </IconButton>+ </TooltipTrigger>+ <TooltipContent className="max-w-64">+ When a regex pattern is set, it takes precedence over min/max length constraints. Consider+ defining length requirements directly in your regex pattern instead.+ </TooltipContent>+ </Tooltip>+ )+};++export const CustomDelay: Story = {+ name: "Example: Custom Delay",+ parameters: {+ docs: {+ description: {+ story:+ "`delayDuration` defaults to `0` so info-style triggers feel snappy. Bump it to ~300–500ms for hover-only discoverability tooltips, where opening immediately on every passing cursor is noisy."+ }+ }+ },+ render: () => (+ <Tooltip delayDuration={500}>+ <TooltipTrigger asChild>+ <Button variant="outline">Hover (500ms delay)</Button>+ </TooltipTrigger>+ <TooltipContent>Opens after a half-second hover</TooltipContent>+ </Tooltip>+ )+};++export const DefaultOpenState: Story = {+ name: "State: Default Open",+ parameters: {+ docs: {+ description: {+ story:+ "Use `defaultOpen` for an uncontrolled tooltip that starts open (handy in this docs frame). For full control, pass `open` + `onOpenChange` and drive it from your own state — useful when you need a tooltip to react to something other than hover/focus."+ }+ }+ },+ decorators: [+ (Story) => (+ <div className="p-12">+ <Story />+ </div>+ )+ ],+ render: () => (+ <Tooltip defaultOpen>+ <TooltipTrigger asChild>+ <Button variant="outline">Already open</Button>+ </TooltipTrigger>+ <TooltipContent>This tooltip rendered open</TooltipContent>+ </Tooltip>+ )+};++export const OnDisabledTrigger: Story = {+ name: "Example: On Disabled Trigger",+ parameters: {+ docs: {+ description: {+ story:+ "Native disabled buttons don't fire pointer events, so a tooltip on a disabled `Button` will silently not open. Wrap the disabled trigger in a `<span tabIndex={0}>` so the tooltip still receives hover and keyboard focus — and use the tooltip to explain *why* the action is disabled."+ }+ }+ },+ render: () => (+ <Tooltip>+ <TooltipTrigger asChild>+ {/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}+ <span tabIndex={0}>+ <Button variant="outline" isDisabled>+ Save changes+ </Button>+ </span>+ </TooltipTrigger>+ <TooltipContent>You don't have permission to edit this resource</TooltipContent>+ </Tooltip>+ )+};diff --git a/frontend/src/components/v3/generic/Tooltip/Tooltip.tsx b/frontend/src/components/v3/generic/Tooltip/Tooltip.tsxindex fdff55dd20..6e01b0236b 100644--- a/frontend/src/components/v3/generic/Tooltip/Tooltip.tsx+++ b/frontend/src/components/v3/generic/Tooltip/Tooltip.tsx@@ -42,7 +42,7 @@ function TooltipContent({data-slot="tooltip-content"sideOffset={sideOffset}className={cn(- "z-[70] w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-sm bg-border px-3 py-1.5 text-xs text-balance text-background text-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",+ "z-[70] w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-sm bg-border px-3 py-1.5 text-xs text-balance text-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",className)}{...props}diff --git a/frontend/src/components/v3/generic/index.ts b/frontend/src/components/v3/generic/index.tsindex 6c05854490..d5ca60d35f 100644--- a/frontend/src/components/v3/generic/index.ts+++ b/frontend/src/components/v3/generic/index.ts@@ -11,7 +11,6 @@ export * from "./Checkbox";export * from "./ColorPicker";export * from "./Command";export * from "./DataGrid";-export * from "./DateRangeFilter";export * from "./Detail";export * from "./Dialog";export * from "./Dropdown";@@ -22,12 +21,10 @@ export * from "./Input";export * from "./InputGroup";export * from "./Item";export * from "./Label";-export * from "./PageLoader";export * from "./Pagination";-export * from "./PasswordGenerator";export * from "./Popover";+export * from "./RadioGroup";export * from "./ReactSelect";-export * from "./SecretInput";export * from "./Select";export * from "./Separator";export * from "./Sheet";diff --git a/frontend/src/components/v3/generic/DateRangeFilter/DateRangeFilter.tsx b/frontend/src/components/v3/platform/DateRangeFilter/DateRangeFilter.tsxsimilarity index 98%rename from frontend/src/components/v3/generic/DateRangeFilter/DateRangeFilter.tsxrename to frontend/src/components/v3/platform/DateRangeFilter/DateRangeFilter.tsxindex 6444291b7b..ee3ff30940 100644--- a/frontend/src/components/v3/generic/DateRangeFilter/DateRangeFilter.tsx+++ b/frontend/src/components/v3/platform/DateRangeFilter/DateRangeFilter.tsx@@ -6,12 +6,18 @@ import ms from "ms";import { cn } from "@app/components/v3/utils";-import { Button, type ButtonProps } from "../Button";-import { Calendar, CalendarDayButton } from "../Calendar";-import { Input } from "../Input";-import { Popover, PopoverContent, PopoverTrigger } from "../Popover";-import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../Select";-import { Switch } from "../Switch";+import { Button, type ButtonProps } from "../../generic/Button";+import { Calendar, CalendarDayButton } from "../../generic/Calendar";+import { Input } from "../../generic/Input";+import { Popover, PopoverContent, PopoverTrigger } from "../../generic/Popover";+import {+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "../../generic/Select";+import { Switch } from "../../generic/Switch";const MAX_RANGE_MONTHS = 3;diff --git a/frontend/src/components/v3/generic/DateRangeFilter/DateRangeQuickPresets.tsx b/frontend/src/components/v3/platform/DateRangeFilter/DateRangeQuickPresets.tsxsimilarity index 97%rename from frontend/src/components/v3/generic/DateRangeFilter/DateRangeQuickPresets.tsxrename to frontend/src/components/v3/platform/DateRangeFilter/DateRangeQuickPresets.tsxindex e676da3543..efa5f061ca 100644--- a/frontend/src/components/v3/generic/DateRangeFilter/DateRangeQuickPresets.tsx+++ b/frontend/src/components/v3/platform/DateRangeFilter/DateRangeQuickPresets.tsx@@ -1,6 +1,6 @@import { cn } from "@app/components/v3/utils";-import { Button } from "../Button";+import { Button } from "../../generic/Button";import type { DateRangeFilterAccent, DateRangeFilterResult } from "./DateRangeFilter";import { ACCENT_STYLES } from "./DateRangeFilter";diff --git a/frontend/src/components/v3/generic/DateRangeFilter/index.ts b/frontend/src/components/v3/platform/DateRangeFilter/index.tssimilarity index 100%rename from frontend/src/components/v3/generic/DateRangeFilter/index.tsrename to frontend/src/components/v3/platform/DateRangeFilter/index.tsdiff --git a/frontend/src/components/v3/platform/DocumentationLinkBadge/DocumentationLinkBadge.tsx b/frontend/src/components/v3/platform/DocumentationLinkBadge/DocumentationLinkBadge.tsxindex ac5d6accce..8a0c1cb981 100644--- a/frontend/src/components/v3/platform/DocumentationLinkBadge/DocumentationLinkBadge.tsx+++ b/frontend/src/components/v3/platform/DocumentationLinkBadge/DocumentationLinkBadge.tsx@@ -1,6 +1,6 @@import { ExternalLinkIcon } from "lucide-react";-import { Badge } from "@app/components/v3";+import { Badge } from "../../generic/Badge";type TDocumentationLinkBadgeProps = {href: string;diff --git a/frontend/src/components/v3/generic/PageLoader/PageLoader.tsx b/frontend/src/components/v3/platform/PageLoader/PageLoader.tsxsimilarity index 87%rename from frontend/src/components/v3/generic/PageLoader/PageLoader.tsxrename to frontend/src/components/v3/platform/PageLoader/PageLoader.tsxindex 45c477c1bc..31fcb26392 100644--- a/frontend/src/components/v3/generic/PageLoader/PageLoader.tsx+++ b/frontend/src/components/v3/platform/PageLoader/PageLoader.tsx@@ -1,6 +1,6 @@import { twMerge } from "tailwind-merge";-import { Lottie } from "@app/components/v2";+import { Lottie } from "@app/components/v2/Lottie";type PageLoaderProps = {lottieClassName?: string;diff --git a/frontend/src/components/v3/generic/PageLoader/index.ts b/frontend/src/components/v3/platform/PageLoader/index.tssimilarity index 100%rename from frontend/src/components/v3/generic/PageLoader/index.tsrename to frontend/src/components/v3/platform/PageLoader/index.tsdiff --git a/frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsx b/frontend/src/components/v3/platform/PasswordGenerator/PasswordGenerator.tsxsimilarity index 97%rename from frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsxrename to frontend/src/components/v3/platform/PasswordGenerator/PasswordGenerator.tsxindex 755705ab14..0a605d37a3 100644--- a/frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsx+++ b/frontend/src/components/v3/platform/PasswordGenerator/PasswordGenerator.tsx@@ -21,14 +21,14 @@ import {useListSecretValidationRules} from "@app/hooks/api/secretValidationRules";-import { Badge } from "../Badge";-import { Button } from "../Button";-import { Checkbox } from "../Checkbox";-import { IconButton } from "../IconButton";-import { Label } from "../Label";-import { Popover, PopoverContent, PopoverTrigger } from "../Popover";-import { FilterableSelect } from "../ReactSelect";-import { Tooltip, TooltipContent, TooltipTrigger } from "../Tooltip";+import { Badge } from "../../generic/Badge";+import { Button } from "../../generic/Button";+import { Checkbox } from "../../generic/Checkbox";+import { IconButton } from "../../generic/IconButton";+import { Label } from "../../generic/Label";+import { Popover, PopoverContent, PopoverTrigger } from "../../generic/Popover";+import { FilterableSelect } from "../../generic/ReactSelect";+import { Tooltip, TooltipContent, TooltipTrigger } from "../../generic/Tooltip";type PasswordOptionsType = {length: number;diff --git a/frontend/src/components/v3/generic/PasswordGenerator/index.ts b/frontend/src/components/v3/platform/PasswordGenerator/index.tssimilarity index 100%rename from frontend/src/components/v3/generic/PasswordGenerator/index.tsrename to frontend/src/components/v3/platform/PasswordGenerator/index.tsdiff --git a/frontend/src/components/v3/generic/SecretInput/InfisicalSecretInput.tsx b/frontend/src/components/v3/platform/SecretInput/InfisicalSecretInput.tsxsimilarity index 100%rename from frontend/src/components/v3/generic/SecretInput/InfisicalSecretInput.tsxrename to frontend/src/components/v3/platform/SecretInput/InfisicalSecretInput.tsxdiff --git a/frontend/src/components/v3/generic/SecretInput/SecretInput.tsx b/frontend/src/components/v3/platform/SecretInput/SecretInput.tsxsimilarity index 100%rename from frontend/src/components/v3/generic/SecretInput/SecretInput.tsxrename to frontend/src/components/v3/platform/SecretInput/SecretInput.tsxdiff --git a/frontend/src/components/v3/generic/SecretInput/index.ts b/frontend/src/components/v3/platform/SecretInput/index.tssimilarity index 100%rename from frontend/src/components/v3/generic/SecretInput/index.tsrename to frontend/src/components/v3/platform/SecretInput/index.tsdiff --git a/frontend/src/components/v3/platform/index.ts b/frontend/src/components/v3/platform/index.tsindex 3866b25f22..d972aea0b6 100644--- a/frontend/src/components/v3/platform/index.ts+++ b/frontend/src/components/v3/platform/index.ts@@ -1,3 +1,7 @@+export * from "./DateRangeFilter";export * from "./DocumentationLinkBadge";export * from "./GatewayPicker";+export * from "./PageLoader";+export * from "./PasswordGenerator";export * from "./ScopeIcons";+export * from "./SecretInput";