@ttt-productions/ui-core 0.11.28 → 0.11.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,8 +11,9 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
11
11
  * click, a key press, a form's implicit submit — sets `aria-disabled` and
12
12
  * `aria-busy`, and shows the canonical spinner: an icon button (`size="icon"`)
13
13
  * swaps its icon for it; any other button shows it in place of its `icon`. It is
14
- * never natively disabled for being pending, so the button the user just pressed
15
- * keeps focus (FRONTEND-203).
14
+ * never natively disabled while pending — a `disabled` passed alongside `pending`
15
+ * applies once pending ends — so the button the user just pressed keeps focus
16
+ * (FRONTEND-203).
16
17
  */
17
18
  pending?: boolean;
18
19
  /** Leading icon, rendered before the label. While `pending`, the spinner takes its place. */
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/react/components/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE,QAAA,MAAM,cAAc;;;8EAgCnB,CAAA;AAED,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6FAA6F;IAC7F,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,QAAA,MAAM,MAAM,uFAmDX,CAAA;AAID,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/react/components/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE,QAAA,MAAM,cAAc;;;8EAgCnB,CAAA;AAED,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6FAA6F;IAC7F,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,QAAA,MAAM,MAAM,uFAmDX,CAAA;AAID,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
@@ -48,7 +48,7 @@ const Button = React.forwardRef(({ className, variant, size, asChild = false, pe
48
48
  onKeyDownCapture: blockActivationKey,
49
49
  }
50
50
  : {}),
51
- disabled: disabled || undefined,
51
+ disabled: (disabled && !pending) || undefined,
52
52
  className: cn(buttonVariants({ variant, size, className })),
53
53
  };
54
54
  const spinner = _jsx(Spinner, { size: size === "lg" ? "sm" : "xs" });
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/react/components/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEnE,kGAAkG;AAClG,6EAA6E;AAC7E,MAAM,cAAc,GAAG,GAAG,CACxB,mWAAmW,EACnW;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,O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AAC,IAAI,GAAI,CAAA;IAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA;IAExC,IAAI,OAAO,EAAE,CAAC;QACZ,kFAAkF;QAClF,iEAAiE;QACjE,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,MAAC,IAAI,IAAC,GAAG,EAAE,GAAG,KAAM,MAAM,aACvB,OAAO,EACR,KAAC,SAAS,cAAE,QAAQ,GAAa,IAC5B,CACR,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,KAAM,MAAM,YACvB,QAAQ,GACJ,CACR,CAAA;IACH,CAAC;IAED,OAAO,CACL,iBAAQ,GAAG,EAAE,GAAG,KAAM,MAAM,YACzB,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACjB,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAC7B,CAAC,CAAC,CAAC,CACF,8BACG,OAAO,EACP,QAAQ,IACR,CACJ,GACM,CACV,CAAA;AACH,CAAC,CACF,CAAA;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE7B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Slot, Slottable } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils.js\"\nimport { Spinner } from \"./spinner.js\"\nimport { blockActivationKey, blockEvent } from \"./pending-guard.js\"\n\n// `ui-button` is the stable hook an app's own stylesheet keys a rule for every button on (a press\n// effect), so it never has to match this component's private utility string.\nconst buttonVariants = cva(\n \"ui-button inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-bold ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"button-default bg-primary text-primary-foreground hover:bg-primary/90 border-2 border-[hsl(var(--brand-primary-deep))]\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90 border-2 border-[hsl(var(--destructive-border))]\",\n success:\n \"bg-[color:var(--button-success)] text-[hsl(var(--success-foreground))] hover:bg-[color:var(--button-success)]/90 border-2 border-[hsl(var(--status-success-border))]\",\n outline:\n \"border-2 border-border bg-background hover:bg-accent hover:text-accent-foreground text-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80 border-2 border-border\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n inverted:\n \"bg-[hsl(var(--inverted-background))] text-[hsl(var(--inverted-foreground))] hover:bg-[hsl(var(--inverted-background))]/90 border-2 border-[hsl(var(--inverted-border))]\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n /**\n * Async work this button started is in flight. The button ignores activation — a\n * click, a key press, a form's implicit submit — sets `aria-disabled` and\n * `aria-busy`, and shows the canonical spinner: an icon button (`size=\"icon\"`)\n * swaps its icon for it; any other button shows it in place of its `icon`. It is\n * never natively disabled for being pending, so the button the user just pressed\n * keeps focus (FRONTEND-203).\n */\n pending?: boolean\n /** Leading icon, rendered before the label. While `pending`, the spinner takes its place. */\n icon?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, pending = false, icon, disabled, children, ...props }, ref) => {\n const shared = {\n ...props,\n ...(pending\n ? {\n \"aria-busy\": true,\n \"aria-disabled\": true,\n \"data-pending\": \"\",\n // Stopped before any handler runs — the caller's, an `asChild` child's own, or a Radix\n // trigger's — so a click submits nothing, a link goes nowhere, and neither a pointer\n // press nor an activation key opens what the button triggers.\n onClickCapture: blockEvent,\n onPointerDownCapture: blockEvent,\n onKeyDownCapture: blockActivationKey,\n }\n : {}),\n disabled: disabled || undefined,\n className: cn(buttonVariants({ variant, size, className })),\n }\n const spinner = <Spinner size={size === \"lg\" ? \"sm\" : \"xs\"} />\n const leading = pending ? spinner : icon\n\n if (asChild) {\n // Slot finds the Slottable among its DIRECT children, so the leading slot and the\n // Slottable must be siblings here — never wrapped in a fragment.\n return leading ? (\n <Slot ref={ref} {...shared}>\n {leading}\n <Slottable>{children}</Slottable>\n </Slot>\n ) : (\n <Slot ref={ref} {...shared}>\n {children}\n </Slot>\n )\n }\n\n return (\n <button ref={ref} {...shared}>\n {size === \"icon\" ? (\n pending ? spinner : children\n ) : (\n <>\n {leading}\n {children}\n </>\n )}\n </button>\n )\n }\n)\n\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n"]}
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/react/components/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEnE,kGAAkG;AAClG,6EAA6E;AAC7E,MAAM,cAAc,GAAG,GAAG,CACxB,mWAAmW,EACnW;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,wHAAwH;YAC1H,WA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,CAAC,IAAI,GAAI,CAAA;IAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA;IAExC,IAAI,OAAO,EAAE,CAAC;QACZ,kFAAkF;QAClF,iEAAiE;QACjE,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,MAAC,IAAI,IAAC,GAAG,EAAE,GAAG,KAAM,MAAM,aACvB,OAAO,EACR,KAAC,SAAS,cAAE,QAAQ,GAAa,IAC5B,CACR,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,KAAM,MAAM,YACvB,QAAQ,GACJ,CACR,CAAA;IACH,CAAC;IAED,OAAO,CACL,iBAAQ,GAAG,EAAE,GAAG,KAAM,MAAM,YACzB,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACjB,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAC7B,CAAC,CAAC,CAAC,CACF,8BACG,OAAO,EACP,QAAQ,IACR,CACJ,GACM,CACV,CAAA;AACH,CAAC,CACF,CAAA;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE7B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Slot, Slottable } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../../lib/utils.js\"\nimport { Spinner } from \"./spinner.js\"\nimport { blockActivationKey, blockEvent } from \"./pending-guard.js\"\n\n// `ui-button` is the stable hook an app's own stylesheet keys a rule for every button on (a press\n// effect), so it never has to match this component's private utility string.\nconst buttonVariants = cva(\n \"ui-button inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-bold ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"button-default bg-primary text-primary-foreground hover:bg-primary/90 border-2 border-[hsl(var(--brand-primary-deep))]\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90 border-2 border-[hsl(var(--destructive-border))]\",\n success:\n \"bg-[color:var(--button-success)] text-[hsl(var(--success-foreground))] hover:bg-[color:var(--button-success)]/90 border-2 border-[hsl(var(--status-success-border))]\",\n outline:\n \"border-2 border-border bg-background hover:bg-accent hover:text-accent-foreground text-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80 border-2 border-border\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n inverted:\n \"bg-[hsl(var(--inverted-background))] text-[hsl(var(--inverted-foreground))] hover:bg-[hsl(var(--inverted-background))]/90 border-2 border-[hsl(var(--inverted-border))]\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n /**\n * Async work this button started is in flight. The button ignores activation — a\n * click, a key press, a form's implicit submit — sets `aria-disabled` and\n * `aria-busy`, and shows the canonical spinner: an icon button (`size=\"icon\"`)\n * swaps its icon for it; any other button shows it in place of its `icon`. It is\n * never natively disabled while pending — a `disabled` passed alongside `pending`\n * applies once pending ends — so the button the user just pressed keeps focus\n * (FRONTEND-203).\n */\n pending?: boolean\n /** Leading icon, rendered before the label. While `pending`, the spinner takes its place. */\n icon?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, pending = false, icon, disabled, children, ...props }, ref) => {\n const shared = {\n ...props,\n ...(pending\n ? {\n \"aria-busy\": true,\n \"aria-disabled\": true,\n \"data-pending\": \"\",\n // Stopped before any handler runs — the caller's, an `asChild` child's own, or a Radix\n // trigger's — so a click submits nothing, a link goes nowhere, and neither a pointer\n // press nor an activation key opens what the button triggers.\n onClickCapture: blockEvent,\n onPointerDownCapture: blockEvent,\n onKeyDownCapture: blockActivationKey,\n }\n : {}),\n disabled: (disabled && !pending) || undefined,\n className: cn(buttonVariants({ variant, size, className })),\n }\n const spinner = <Spinner size={size === \"lg\" ? \"sm\" : \"xs\"} />\n const leading = pending ? spinner : icon\n\n if (asChild) {\n // Slot finds the Slottable among its DIRECT children, so the leading slot and the\n // Slottable must be siblings here — never wrapped in a fragment.\n return leading ? (\n <Slot ref={ref} {...shared}>\n {leading}\n <Slottable>{children}</Slottable>\n </Slot>\n ) : (\n <Slot ref={ref} {...shared}>\n {children}\n </Slot>\n )\n }\n\n return (\n <button ref={ref} {...shared}>\n {size === \"icon\" ? (\n pending ? spinner : children\n ) : (\n <>\n {leading}\n {children}\n </>\n )}\n </button>\n )\n }\n)\n\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n"]}
@@ -16,7 +16,8 @@ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMen
16
16
  /**
17
17
  * The action this item started is in flight: the item ignores selection, sets
18
18
  * `aria-disabled` and `aria-busy`, and shows the spinner in place of its `icon`. It is
19
- * never disabled for being pending, so it keeps focus (FRONTEND-203). Keeping the menu
19
+ * never natively disabled while pending (a `disabled` passed alongside applies once pending
20
+ * ends), so it keeps focus (FRONTEND-203). Keeping the menu
20
21
  * open meanwhile is the caller's `onSelect` (`event.preventDefault()`, close on settle).
21
22
  */
22
23
  pending?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/react/components/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qBA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,CAAA;AAC/C,QAAA,MAAM,mBAAmB,0HAAgC,CAAA;AACzD,QAAA,MAAM,iBAAiB,qHAA8B,CAAA;AACrD,QAAA,MAAM,kBAAkB,yDAA+B,CAAA;AACvD,QAAA,MAAM,eAAe,sDAA4B,CAAA;AACjD,QAAA,MAAM,sBAAsB,0HAAmC,CAAA;AAE/D,QAAA,MAAM,sBAAsB;YAGhB,OAAO;wCAejB,CAAA;AAGF,QAAA,MAAM,sBAAsB,6KAY1B,CAAA;AAGF,QAAA,MAAM,mBAAmB,0KAevB,CAAA;AAUF,QAAA,MAAM,gBAAgB;YAGV,OAAO;IACf;;;;;;OAMG;cACO,OAAO;IACjB,kEAAkE;WAC3D,KAAK,CAAC,SAAS;wCAqBxB,CAAA;AAGF,QAAA,MAAM,wBAAwB,+KAoB5B,CAAA;AAGF,QAAA,MAAM,qBAAqB,4KAmBzB,CAAA;AAGF,QAAA,MAAM,iBAAiB;YAGX,OAAO;wCAQjB,CAAA;AAGF,QAAA,MAAM,qBAAqB,4KASzB,CAAA;AAGF,QAAA,MAAM,oBAAoB;8BAGvB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAEvC,CAAA;AAGD,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAA"}
@@ -26,7 +26,7 @@ function blockActivation(event) {
26
26
  }
27
27
  const DropdownMenuItem = React.forwardRef(({ className, inset, pending = false, icon, disabled, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 app-dropdown-item", inset && "pl-8", className), ...props, ...(pending
28
28
  ? { "aria-busy": true, "aria-disabled": true, "data-pending": "", onClickCapture: blockActivation }
29
- : {}), disabled: disabled || undefined, children: [pending ? _jsx(Spinner, { size: "xs" }) : icon, _jsx(Slottable, { children: children })] })));
29
+ : {}), disabled: (disabled && !pending) || undefined, children: [pending ? _jsx(Spinner, { size: "xs" }) : icon, _jsx(Slottable, { children: children })] })));
30
30
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
31
31
  const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
32
32
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../src/react/components/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEt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EAAE,KAAK,IAAI,MAAM,EAAE,SAAS,CAAC,KAC1E,KAAK,GACT,CACH,CAAC,CAAA;AACF,iBAAiB,CAAC,WAAW,GAAG,qBAAqB,CAAC,KAAK,CAAC,WAAW,CAAA;AAEvE,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,qBAAqB,CAAC,SAAS,IAC9B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAA;AACF,qBAAqB,CAAC,WAAW,GAAG,qBAAqB,CAAC,SAAS,CAAC,WAAW,CAAA;AAE/E,MAAM,oBAAoB,GAAG,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EAC8B,EAAE,EAAE,CAAC,CAC3C,eAAM,SAAS,EAAE,EAAE,CAAC,4CAA4C,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAC5F,CAAA;AACD,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAA;AAEzD,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Slottable } from \"@radix-ui/react-slot\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils.js\"\nimport { Spinner } from \"./spinner.js\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-raised data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border !bg-card p-1 text-popover-foreground elevation-popover data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\n// Every selection — a pointer, Enter, or Space — reaches the item as a click; stopping it in the\n// capture phase keeps the item's select (and an `asChild` link's navigation) from running.\nfunction blockActivation(event: React.MouseEvent<HTMLElement>) {\n event.preventDefault()\n event.stopPropagation()\n}\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n /**\n * The action this item started is in flight: the item ignores selection, sets\n * `aria-disabled` and `aria-busy`, and shows the spinner in place of its `icon`. It is\n * never disabled for being pending, so it keeps focus (FRONTEND-203). Keeping the menu\n * open meanwhile is the caller's `onSelect` (`event.preventDefault()`, close on settle).\n */\n pending?: boolean\n /** Leading icon. While `pending`, the spinner takes its place. */\n icon?: React.ReactNode\n }\n>(({ className, inset, pending = false, icon, disabled, children, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 app-dropdown-item\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n {...(pending\n ? { \"aria-busy\": true, \"aria-disabled\": true, \"data-pending\": \"\", onClickCapture: blockActivation }\n : {})}\n disabled={disabled || undefined}\n >\n {/* Direct siblings, never a fragment: under `asChild` Radix Slot finds the Slottable\n among its direct children and renders the icon/spinner inside the child element. */}\n {pending ? <Spinner size=\"xs\" /> : icon}\n <Slottable>{children}</Slottable>\n </DropdownMenuPrimitive.Item>\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)} {...props} />\n)\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"]}
1
+ {"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../src/react/components/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,YAAY,GAAG,qBAAqB,CAAC,IAAI,CAAA;AAC/C,MAAM,mBAAmB,GAAG,qBAAqB,CAAC,OAAO,CAAA;AACzD,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,KAAK,CAAA;AACrD,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,MAAM,CAAA;AACvD,MAAM,eAAe,GAAG,qBAAqB,CAAC,GAAG,CAAA;AACjD,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,UAAU,CAAA;AAE/D,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAK7C,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnD,MAAC,qBAAqB,CAAC,UAAU,IAC/B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,0MAA0M,EAC1M,KAAK,IAAI,MAAM,EACf,SAAS,CACV,KACG,KAAK,aAER,QAAQ,EACT,KAAC,YAAY,IAAC,SAAS,EAAC,SAAS,GAAG,IACH,CACpC,CAAC,CAAA;AACF,sBAAsB,CAAC,WAAW,GAAG,qBAAqB,CAAC,UAAU,CAAC,WAAW,CAAA;AAEjF,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YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Slottable } from \"@radix-ui/react-slot\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils.js\"\nimport { Spinner } from \"./spinner.js\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-raised data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border !bg-card p-1 text-popover-foreground elevation-popover data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\n// Every selection — a pointer, Enter, or Space — reaches the item as a click; stopping it in the\n// capture phase keeps the item's select (and an `asChild` link's navigation) from running.\nfunction blockActivation(event: React.MouseEvent<HTMLElement>) {\n event.preventDefault()\n event.stopPropagation()\n}\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n /**\n * The action this item started is in flight: the item ignores selection, sets\n * `aria-disabled` and `aria-busy`, and shows the spinner in place of its `icon`. It is\n * never natively disabled while pending (a `disabled` passed alongside applies once pending\n * ends), so it keeps focus (FRONTEND-203). Keeping the menu\n * open meanwhile is the caller's `onSelect` (`event.preventDefault()`, close on settle).\n */\n pending?: boolean\n /** Leading icon. While `pending`, the spinner takes its place. */\n icon?: React.ReactNode\n }\n>(({ className, inset, pending = false, icon, disabled, children, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 app-dropdown-item\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n {...(pending\n ? { \"aria-busy\": true, \"aria-disabled\": true, \"data-pending\": \"\", onClickCapture: blockActivation }\n : {})}\n disabled={(disabled && !pending) || undefined}\n >\n {/* Direct siblings, never a fragment: under `asChild` Radix Slot finds the Slottable\n among its direct children and renders the icon/spinner inside the child element. */}\n {pending ? <Spinner size=\"xs\" /> : icon}\n <Slottable>{children}</Slottable>\n </DropdownMenuPrimitive.Item>\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)} {...props} />\n)\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"]}
@@ -7,7 +7,8 @@ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitiv
7
7
  /**
8
8
  * The change this select started is in flight: the trigger ignores opening and typeahead,
9
9
  * sets `aria-disabled` and `aria-busy`, and shows the spinner in place of its chevron. It
10
- * is never disabled for being pending, so it keeps focus (FRONTEND-203). It keeps showing
10
+ * is never natively disabled while pending (a `disabled` passed alongside applies once
11
+ * pending ends), so it keeps focus (FRONTEND-203). It keeps showing
11
12
  * the COMMITTED value — the caller changes `value` only once the write lands.
12
13
  */
13
14
  pending?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/react/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAOzD,QAAA,MAAM,MAAM,uCAAuB,CAAA;AACnC,QAAA,MAAM,WAAW,yGAAwB,CAAA;AACzC,QAAA,MAAM,WAAW,0GAAwB,CAAA;AAIzC,QAAA,MAAM,aAAa;IAGf;;;;;OAKG;cACO,OAAO;2CA+BnB,CAAA;AAGF,QAAA,MAAM,oBAAoB,qKAWxB,CAAA;AAGF,QAAA,MAAM,sBAAsB,uKAW1B,CAAA;AAGF,QAAA,MAAM,aAAa,8JA6BjB,CAAA;AAGF,QAAA,MAAM,WAAW,4JASf,CAAA;AAGF,QAAA,MAAM,UAAU,2JAoBd,CAAA;AAGF,QAAA,MAAM,eAAe,gKASnB,CAAA;AAGF,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAA"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/react/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAOzD,QAAA,MAAM,MAAM,uCAAuB,CAAA;AACnC,QAAA,MAAM,WAAW,yGAAwB,CAAA;AACzC,QAAA,MAAM,WAAW,0GAAwB,CAAA;AAIzC,QAAA,MAAM,aAAa;IAGf;;;;;;OAMG;cACO,OAAO;2CA+BnB,CAAA;AAGF,QAAA,MAAM,oBAAoB,qKAWxB,CAAA;AAGF,QAAA,MAAM,sBAAsB,uKAW1B,CAAA;AAGF,QAAA,MAAM,aAAa,8JA6BjB,CAAA;AAGF,QAAA,MAAM,WAAW,4JASf,CAAA;AAGF,QAAA,MAAM,UAAU,2JAoBd,CAAA;AAGF,QAAA,MAAM,eAAe,gKASnB,CAAA;AAGF,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAA"}
@@ -20,7 +20,7 @@ const SelectTrigger = React.forwardRef(({ className, children, pending = false,
20
20
  onClickCapture: blockEvent,
21
21
  onKeyDownCapture: blockActivationKey,
22
22
  }
23
- : {}), disabled: disabled || undefined, children: [children, pending ? (_jsx(Spinner, { size: "xs" })) : (_jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) }))] })));
23
+ : {}), disabled: (disabled && !pending) || undefined, children: [children, pending ? (_jsx(Spinner, { size: "xs" })) : (_jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) }))] })));
24
24
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
25
25
  const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUp, { className: "h-4 w-4" }) })));
26
26
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/react/components/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEnE,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAA;AACnC,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAA;AACzC,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAA;AAEzC,yFAAyF;AACzF,gGAAgG;AAChG,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAWpC,CAAC,EAA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AC,KAC9D,KAAK,GACT,CACH,CAAC,CAAA;AACF,WAAW,CAAC,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,WAAW,CAAA;AAE3D,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5C,MAAC,eAAe,CAAC,IAAI,IACnB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,6NAA6N,EAC7N,SAAS,CACV,KACG,KAAK,aAET,eAAM,SAAS,EAAC,8DAA8D,YAC5E,KAAC,eAAe,CAAC,aAAa,cAC5B,KAAC,KAAK,IAAC,SAAS,EAAC,SAAS,GAAG,GACC,GAC3B,EAEP,KAAC,eAAe,CAAC,QAAQ,cAAE,QAAQ,GAA4B,IAC1C,CACxB,CAAC,CAAA;AACF,UAAU,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,WAAW,CAAA;AAEzD,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAGtC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,SAAS,IACxB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAA;AACF,eAAe,CAAC,WAAW,GAAG,eAAe,CAAC,SAAS,CAAC,WAAW,CAAA;AAEnE,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils.js\"\nimport { Spinner } from \"./spinner.js\"\nimport { blockActivationKey, blockEvent } from \"./pending-guard.js\"\n\nconst Select = SelectPrimitive.Root\nconst SelectGroup = SelectPrimitive.Group\nconst SelectValue = SelectPrimitive.Value\n\n// A pending trigger opens on nothing: it opens on a pointer press or a key, and a closed\n// trigger's typeahead changes the value, so both are stopped before the trigger's own handlers.\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & {\n /**\n * The change this select started is in flight: the trigger ignores opening and typeahead,\n * sets `aria-disabled` and `aria-busy`, and shows the spinner in place of its chevron. It\n * is never disabled for being pending, so it keeps focus (FRONTEND-203). It keeps showing\n * the COMMITTED value — the caller changes `value` only once the write lands.\n */\n pending?: boolean\n }\n>(({ className, children, pending = false, disabled, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-10 w-full items-center justify-between rounded-md border-2 border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 [&>span]:line-clamp-1\",\n className\n )}\n {...props}\n {...(pending\n ? {\n \"aria-busy\": true,\n \"aria-disabled\": true,\n \"data-pending\": \"\",\n onPointerDownCapture: blockEvent,\n onClickCapture: blockEvent,\n onKeyDownCapture: blockActivationKey,\n }\n : {})}\n disabled={disabled || undefined}\n >\n {children}\n {pending ? (\n <Spinner size=\"xs\" />\n ) : (\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n )}\n </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground elevation-popover data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n {...props}\n />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n}\n"]}
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/react/components/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEnE,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAA;AACnC,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAA;AACzC,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAA;AAEzC,yFAAyF;AACzF,gGAAgG;AAChG,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAYpC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACvE,MAAC,eAAe,CAAC,OAAO,IACtB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,+WAA+W,EAC/W,SAAS,CACV,KACG,KAAK,KACL,CAAC,OAAO;QACV,CAAC,CAAC;YACE,WAAW,EAAE,IAAI;YACjB,eAAe,EAAE,IAAI;YACrB,cAAc,EAAE,EAAE;YAClB,oBAAoB,EAAE,UAAU;YAChC,cAAc,EAAE,UAAU;YAC1B,gBAAgB,EAAE,kBAAkB;SACrC;QACH,CAAC,CAAC,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,SAAS,aAE5C,QAAQ,EAC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,QAAQ,cAAE,QAAQ,GAA4B,IAC1C,CACxB,CAAC,CAAA;AACF,UAAU,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,WAAW,CAAA;AAEzD,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAGtC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,SAAS,IACxB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAA;AACF,eAAe,CAAC,WAAW,GAAG,eAAe,CAAC,SAAS,CAAC,WAAW,CAAA;AAEnE,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils.js\"\nimport { Spinner } from \"./spinner.js\"\nimport { blockActivationKey, blockEvent } from \"./pending-guard.js\"\n\nconst Select = SelectPrimitive.Root\nconst SelectGroup = SelectPrimitive.Group\nconst SelectValue = SelectPrimitive.Value\n\n// A pending trigger opens on nothing: it opens on a pointer press or a key, and a closed\n// trigger's typeahead changes the value, so both are stopped before the trigger's own handlers.\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & {\n /**\n * The change this select started is in flight: the trigger ignores opening and typeahead,\n * sets `aria-disabled` and `aria-busy`, and shows the spinner in place of its chevron. It\n * is never natively disabled while pending (a `disabled` passed alongside applies once\n * pending ends), so it keeps focus (FRONTEND-203). It keeps showing\n * the COMMITTED value — the caller changes `value` only once the write lands.\n */\n pending?: boolean\n }\n>(({ className, children, pending = false, disabled, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-10 w-full items-center justify-between rounded-md border-2 border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 [&>span]:line-clamp-1\",\n className\n )}\n {...props}\n {...(pending\n ? {\n \"aria-busy\": true,\n \"aria-disabled\": true,\n \"data-pending\": \"\",\n onPointerDownCapture: blockEvent,\n onClickCapture: blockEvent,\n onKeyDownCapture: blockActivationKey,\n }\n : {})}\n disabled={(disabled && !pending) || undefined}\n >\n {children}\n {pending ? (\n <Spinner size=\"xs\" />\n ) : (\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n )}\n </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground elevation-popover data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n {...props}\n />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n}\n"]}
@@ -5,8 +5,8 @@ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.Swit
5
5
  * The change this switch started is in flight: the switch ignores toggling, sets
6
6
  * `aria-disabled` and `aria-busy`, and spins inside its thumb. It keeps showing the
7
7
  * COMMITTED state — the caller flips `checked` only once the write lands. It is never
8
- * natively disabled for being pending, so the switch the user just pressed keeps focus
9
- * (FRONTEND-203).
8
+ * natively disabled while pending (a `disabled` passed alongside applies once pending
9
+ * ends), so the switch the user just pressed keeps focus (FRONTEND-203).
10
10
  */
11
11
  pending?: boolean;
12
12
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -12,7 +12,7 @@ function blockToggle(event) {
12
12
  }
13
13
  const Switch = React.forwardRef(({ className, pending = false, disabled, ...props }, ref) => (_jsx(SwitchPrimitives.Root, { className: cn("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className), ...props, ...(pending
14
14
  ? { "aria-busy": true, "aria-disabled": true, "data-pending": "", onClickCapture: blockToggle }
15
- : {}), disabled: disabled || undefined, ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none flex h-5 w-5 items-center justify-center rounded-full bg-background elevation-raised transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"), children: pending ? _jsx(Spinner, { size: "xs" }) : null }) })));
15
+ : {}), disabled: (disabled && !pending) || undefined, ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none flex h-5 w-5 items-center justify-center rounded-full bg-background elevation-raised transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"), children: pending ? _jsx(Spinner, { size: "xs" }) : null }) })));
16
16
  Switch.displayName = SwitchPrimitives.Root.displayName;
17
17
  export { Switch };
18
18
  //# sourceMappingURL=switch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/react/components/switch.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,0FAA0F;AAC1F,2CAA2C;AAC3C,SAAS,WAAW,CAAC,KAA0C;IAC7D,KAAK,CAAC,cAAc,EAAE,CAAA;IACtB,KAAK,CAAC,eAAe,EAAE,CAAA;AACzB,CAAC;AAED,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAY7B,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC7D,KAAC,gBAAgB,CAAC,IAAI,IACpB,SAAS,EAAE,EAAE,CACX,gbAAgb,EAChb,SAAS,CACV,KACG,KAAK,KACL,CAAC,OAAO;QACV,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE;QAC/F,CAAC,CAAC,EAAE,CAAC,EACP,QAAQ,EAAE,QAAQ,IAAI,SAAS,EAC/B,GAAG,EAAE,GAAG,YAER,KAAC,gBAAgB,CAAC,KAAK,IACrB,SAAS,EAAE,EAAE,CACX,uMAAuM,CACxM,YAEA,OAAO,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,GAChB,GACH,CACzB,CAAC,CAAA;AACF,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAA;AAEtD,OAAO,EAAE,MAAM,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\n\nimport { cn } from \"../../lib/utils.js\"\nimport { Spinner } from \"./spinner.js\"\n\n// Stopped in the capture phase so neither the caller's click handler nor the switch's own\n// toggle runs while a change is in flight.\nfunction blockToggle(event: React.MouseEvent<HTMLButtonElement>) {\n event.preventDefault()\n event.stopPropagation()\n}\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> & {\n /**\n * The change this switch started is in flight: the switch ignores toggling, sets\n * `aria-disabled` and `aria-busy`, and spins inside its thumb. It keeps showing the\n * COMMITTED state — the caller flips `checked` only once the write lands. It is never\n * natively disabled for being pending, so the switch the user just pressed keeps focus\n * (FRONTEND-203).\n */\n pending?: boolean\n }\n>(({ className, pending = false, disabled, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n \"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className\n )}\n {...props}\n {...(pending\n ? { \"aria-busy\": true, \"aria-disabled\": true, \"data-pending\": \"\", onClickCapture: blockToggle }\n : {})}\n disabled={disabled || undefined}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none flex h-5 w-5 items-center justify-center rounded-full bg-background elevation-raised transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0\"\n )}\n >\n {pending ? <Spinner size=\"xs\" /> : null}\n </SwitchPrimitives.Thumb>\n </SwitchPrimitives.Root>\n))\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch }\n"]}
1
+ {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/react/components/switch.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,0FAA0F;AAC1F,2CAA2C;AAC3C,SAAS,WAAW,CAAC,KAA0C;IAC7D,KAAK,CAAC,cAAc,EAAE,CAAA;IACtB,KAAK,CAAC,eAAe,EAAE,CAAA;AACzB,CAAC;AAED,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAY7B,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC7D,KAAC,gBAAgB,CAAC,IAAI,IACpB,SAAS,EAAE,EAAE,CACX,gbAAgb,EAChb,SAAS,CACV,KACG,KAAK,KACL,CAAC,OAAO;QACV,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE;QAC/F,CAAC,CAAC,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,SAAS,EAC7C,GAAG,EAAE,GAAG,YAER,KAAC,gBAAgB,CAAC,KAAK,IACrB,SAAS,EAAE,EAAE,CACX,uMAAuM,CACxM,YAEA,OAAO,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,GAChB,GACH,CACzB,CAAC,CAAA;AACF,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAA;AAEtD,OAAO,EAAE,MAAM,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\n\nimport { cn } from \"../../lib/utils.js\"\nimport { Spinner } from \"./spinner.js\"\n\n// Stopped in the capture phase so neither the caller's click handler nor the switch's own\n// toggle runs while a change is in flight.\nfunction blockToggle(event: React.MouseEvent<HTMLButtonElement>) {\n event.preventDefault()\n event.stopPropagation()\n}\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> & {\n /**\n * The change this switch started is in flight: the switch ignores toggling, sets\n * `aria-disabled` and `aria-busy`, and spins inside its thumb. It keeps showing the\n * COMMITTED state — the caller flips `checked` only once the write lands. It is never\n * natively disabled while pending (a `disabled` passed alongside applies once pending\n * ends), so the switch the user just pressed keeps focus (FRONTEND-203).\n */\n pending?: boolean\n }\n>(({ className, pending = false, disabled, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n \"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className\n )}\n {...props}\n {...(pending\n ? { \"aria-busy\": true, \"aria-disabled\": true, \"data-pending\": \"\", onClickCapture: blockToggle }\n : {})}\n disabled={(disabled && !pending) || undefined}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none flex h-5 w-5 items-center justify-center rounded-full bg-background elevation-raised transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0\"\n )}\n >\n {pending ? <Spinner size=\"xs\" /> : null}\n </SwitchPrimitives.Thumb>\n </SwitchPrimitives.Root>\n))\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch }\n"]}
@@ -60,8 +60,6 @@ export { ScrollToTopButton } from "./components/scroll-to-top-button.js";
60
60
  export type { ScrollToTopButtonProps } from "./components/scroll-to-top-button.js";
61
61
  export { ShowMoreToggle } from "./components/show-more-toggle.js";
62
62
  export type { ShowMoreToggleProps } from "./components/show-more-toggle.js";
63
- export { ChunkErrorRecovery } from "./components/chunk-error-recovery.js";
64
- export type { ChunkErrorRecoveryProps } from "./components/chunk-error-recovery.js";
65
63
  export { ReloadRecoveryNotice } from "./components/reload-recovery-notice.js";
66
64
  export type { ReloadRecoveryNoticeProps } from "./components/reload-recovery-notice.js";
67
65
  export { ListPagination } from "./components/list-pagination.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrI,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACpL,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,+BAA+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D,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErG,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAKhG,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACtH,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -44,7 +44,6 @@ export { RelativeTime } from "./components/relative-time.js";
44
44
  export { EndOfListIndicator } from "./components/end-of-list-indicator.js";
45
45
  export { ScrollToTopButton } from "./components/scroll-to-top-button.js";
46
46
  export { ShowMoreToggle } from "./components/show-more-toggle.js";
47
- export { ChunkErrorRecovery } from "./components/chunk-error-recovery.js";
48
47
  export { ReloadRecoveryNotice } from "./components/reload-recovery-notice.js";
49
48
  // List pagination — the one Previous / counter / Next control plus the page-state
50
49
  // hooks for its two flavors (known total, and cursor/`hasMore`).
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,YAAY,EA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AE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["\"use client\";\n\nexport type { ButtonProps } from \"./components/button.js\";\nexport { Button, buttonVariants } from \"./components/button.js\";\nexport type { SpinnerProps, SpinnerSize } from \"./components/spinner.js\";\nexport { Spinner } from \"./components/spinner.js\";\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from \"./components/card.js\";\nexport { Label } from \"./components/label.js\";\nexport type { TextareaProps, FreeTextTextareaProps, NonFreeTextTextareaProps, NonFreeTextareaEntry } from \"./components/textarea.js\";\nexport { Textarea } from \"./components/textarea.js\";\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from \"./components/dialog.js\";\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from \"./components/popover.js\";\nexport { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup } from \"./components/dropdown-menu.js\";\nexport { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut } from \"./components/menubar.js\";\nexport { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel } from \"./components/alert-dialog.js\";\nexport { Alert, AlertTitle, AlertDescription } from \"./components/alert.js\";\nexport type { ToastProps, ToastActionElement } from \"./components/toast.js\";\nexport { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction } from \"./components/toast.js\";\nexport { Toaster } from \"./components/toaster.js\";\nexport type { ToastVariant, ToasterToast } from \"./hooks/use-toast.js\";\nexport { toast, useToast } from \"./hooks/use-toast.js\";\nexport type { InputProps, FreeTextInputProps, NonFreeTextInputProps, NonFreeTextEntry, BuiltInFormatInputProps, BuiltInFormatInputType } from \"./components/input.js\";\nexport { Input } from \"./components/input.js\";\nexport { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton } from \"./components/select.js\";\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from \"./components/tabs.js\";\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from \"./components/tooltip.js\";\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField } from \"./components/form.js\";\nexport { Checkbox } from \"./components/checkbox.js\";\nexport { Switch } from \"./components/switch.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport { Avatar, AvatarImage, AvatarFallback } from \"./components/avatar.js\";\nexport { Separator } from \"./components/separator.js\";\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from \"./components/accordion.js\";\nexport { RadioGroup, RadioGroupItem } from \"./components/radio-group.js\";\nexport { Progress } from \"./components/progress.js\";\nexport { Slider } from \"./components/slider.js\";\nexport type { DatePickerProps } from \"./components/date-picker.js\";\nexport { DatePicker } from \"./components/date-picker.js\";\nexport type { DateTimePickerProps, DateTimePickerTime } from \"./components/date-time-picker.js\";\nexport { DateTimePicker } from \"./components/date-time-picker.js\";\nexport { ScrollArea, ScrollBar } from \"./components/scroll-area.js\";\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, SortableTableHead, TableRow, TableCell, TableCaption } from \"./components/table.js\";\nexport type { SortableTableHeadProps, SortDirection } from \"./components/table.js\";\nexport { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription } from \"./components/sheet.js\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./components/collapsible.js\";\nexport type { SearchDropdownProps } from \"./components/search-dropdown.js\";\nexport { SearchDropdown } from \"./components/search-dropdown.js\";\n\nexport type { ConsequenceDialogProps, ConsequenceDialogReason, ConsequenceDialogTypedConfirmation } from \"./components/consequence-dialog.js\";\nexport { ConsequenceDialog } from \"./components/consequence-dialog.js\";\n\nexport type { MaxWidthOption, ScreenAdaptiveViewProps } from \"./components/layout/screen-adaptive-view.js\";\nexport { ScreenAdaptiveView } from \"./components/layout/screen-adaptive-view.js\";\n\nexport { useMediaQuery } from \"./hooks/use-media-query.js\";\n\nexport { useAsyncAction } from \"./hooks/use-async-action.js\";\nexport type { AsyncAction, UseAsyncActionOptions } from \"./hooks/use-async-action.js\";\n\n// Shared building blocks\nexport { RelativeTime } from \"./components/relative-time.js\";\nexport type { RelativeTimeProps } from \"./components/relative-time.js\";\n\nexport { EndOfListIndicator } from \"./components/end-of-list-indicator.js\";\nexport type { EndOfListIndicatorProps } from \"./components/end-of-list-indicator.js\";\n\nexport { ScrollToTopButton } from \"./components/scroll-to-top-button.js\";\nexport type { ScrollToTopButtonProps } from \"./components/scroll-to-top-button.js\";\n\nexport { ShowMoreToggle } from \"./components/show-more-toggle.js\";\nexport type { ShowMoreToggleProps } from \"./components/show-more-toggle.js\";\n\nexport { ChunkErrorRecovery } from \"./components/chunk-error-recovery.js\";\nexport type { ChunkErrorRecoveryProps } from \"./components/chunk-error-recovery.js\";\n\nexport { ReloadRecoveryNotice } from \"./components/reload-recovery-notice.js\";\nexport type { ReloadRecoveryNoticeProps } from \"./components/reload-recovery-notice.js\";\n\n// List pagination — the one Previous / counter / Next control plus the page-state\n// hooks for its two flavors (known total, and cursor/`hasMore`).\nexport { ListPagination } from \"./components/list-pagination.js\";\nexport type { ListPaginationProps } from \"./components/list-pagination.js\";\n\nexport { usePagedList } from \"./hooks/use-paged-list.js\";\nexport type { ListPaginationState, PagedList, UsePagedListOptions } from \"./hooks/use-paged-list.js\";\n\nexport { useCursorPage } from \"./hooks/use-cursor-page.js\";\nexport type { CursorPage, CursorPager, UseCursorPageOptions } from \"./hooks/use-cursor-page.js\";\n\n// Return-scroll: restore a list's window offset when the user comes back to it after a\n// route change (save on leave, restore once on an eligible + ready return, keyed by the\n// caller's canonical list URL).\nexport { useReturnScroll, saveReturnScroll, clearReturnScroll, readReturnScroll } from \"./hooks/use-return-scroll.js\";\nexport type { ReturnScrollEntry, UseReturnScrollOptions, UseReturnScrollResult } from \"./hooks/use-return-scroll.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACpL,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,YAAY,EAAE,mBAAmB,EA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AE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzK,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAElG,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAEjF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,yBAAyB;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAG3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAIlE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAG9E,kFAAkF;AAClF,iEAAiE;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,uFAAuF;AACvF,wFAAwF;AACxF,gCAAgC;AAChC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["\"use client\";\n\nexport type { ButtonProps } from \"./components/button.js\";\nexport { Button, buttonVariants } from \"./components/button.js\";\nexport type { SpinnerProps, SpinnerSize } from \"./components/spinner.js\";\nexport { Spinner } from \"./components/spinner.js\";\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from \"./components/card.js\";\nexport { Label } from \"./components/label.js\";\nexport type { TextareaProps, FreeTextTextareaProps, NonFreeTextTextareaProps, NonFreeTextareaEntry } from \"./components/textarea.js\";\nexport { Textarea } from \"./components/textarea.js\";\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from \"./components/dialog.js\";\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from \"./components/popover.js\";\nexport { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup } from \"./components/dropdown-menu.js\";\nexport { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut } from \"./components/menubar.js\";\nexport { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel } from \"./components/alert-dialog.js\";\nexport { Alert, AlertTitle, AlertDescription } from \"./components/alert.js\";\nexport type { ToastProps, ToastActionElement } from \"./components/toast.js\";\nexport { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction } from \"./components/toast.js\";\nexport { Toaster } from \"./components/toaster.js\";\nexport type { ToastVariant, ToasterToast } from \"./hooks/use-toast.js\";\nexport { toast, useToast } from \"./hooks/use-toast.js\";\nexport type { InputProps, FreeTextInputProps, NonFreeTextInputProps, NonFreeTextEntry, BuiltInFormatInputProps, BuiltInFormatInputType } from \"./components/input.js\";\nexport { Input } from \"./components/input.js\";\nexport { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton } from \"./components/select.js\";\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from \"./components/tabs.js\";\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from \"./components/tooltip.js\";\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField } from \"./components/form.js\";\nexport { Checkbox } from \"./components/checkbox.js\";\nexport { Switch } from \"./components/switch.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport { Avatar, AvatarImage, AvatarFallback } from \"./components/avatar.js\";\nexport { Separator } from \"./components/separator.js\";\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from \"./components/accordion.js\";\nexport { RadioGroup, RadioGroupItem } from \"./components/radio-group.js\";\nexport { Progress } from \"./components/progress.js\";\nexport { Slider } from \"./components/slider.js\";\nexport type { DatePickerProps } from \"./components/date-picker.js\";\nexport { DatePicker } from \"./components/date-picker.js\";\nexport type { DateTimePickerProps, DateTimePickerTime } from \"./components/date-time-picker.js\";\nexport { DateTimePicker } from \"./components/date-time-picker.js\";\nexport { ScrollArea, ScrollBar } from \"./components/scroll-area.js\";\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, SortableTableHead, TableRow, TableCell, TableCaption } from \"./components/table.js\";\nexport type { SortableTableHeadProps, SortDirection } from \"./components/table.js\";\nexport { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription } from \"./components/sheet.js\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./components/collapsible.js\";\nexport type { SearchDropdownProps } from \"./components/search-dropdown.js\";\nexport { SearchDropdown } from \"./components/search-dropdown.js\";\n\nexport type { ConsequenceDialogProps, ConsequenceDialogReason, ConsequenceDialogTypedConfirmation } from \"./components/consequence-dialog.js\";\nexport { ConsequenceDialog } from \"./components/consequence-dialog.js\";\n\nexport type { MaxWidthOption, ScreenAdaptiveViewProps } from \"./components/layout/screen-adaptive-view.js\";\nexport { ScreenAdaptiveView } from \"./components/layout/screen-adaptive-view.js\";\n\nexport { useMediaQuery } from \"./hooks/use-media-query.js\";\n\nexport { useAsyncAction } from \"./hooks/use-async-action.js\";\nexport type { AsyncAction, UseAsyncActionOptions } from \"./hooks/use-async-action.js\";\n\n// Shared building blocks\nexport { RelativeTime } from \"./components/relative-time.js\";\nexport type { RelativeTimeProps } from \"./components/relative-time.js\";\n\nexport { EndOfListIndicator } from \"./components/end-of-list-indicator.js\";\nexport type { EndOfListIndicatorProps } from \"./components/end-of-list-indicator.js\";\n\nexport { ScrollToTopButton } from \"./components/scroll-to-top-button.js\";\nexport type { ScrollToTopButtonProps } from \"./components/scroll-to-top-button.js\";\n\nexport { ShowMoreToggle } from \"./components/show-more-toggle.js\";\nexport type { ShowMoreToggleProps } from \"./components/show-more-toggle.js\";\n\n\nexport { ReloadRecoveryNotice } from \"./components/reload-recovery-notice.js\";\nexport type { ReloadRecoveryNoticeProps } from \"./components/reload-recovery-notice.js\";\n\n// List pagination — the one Previous / counter / Next control plus the page-state\n// hooks for its two flavors (known total, and cursor/`hasMore`).\nexport { ListPagination } from \"./components/list-pagination.js\";\nexport type { ListPaginationProps } from \"./components/list-pagination.js\";\n\nexport { usePagedList } from \"./hooks/use-paged-list.js\";\nexport type { ListPaginationState, PagedList, UsePagedListOptions } from \"./hooks/use-paged-list.js\";\n\nexport { useCursorPage } from \"./hooks/use-cursor-page.js\";\nexport type { CursorPage, CursorPager, UseCursorPageOptions } from \"./hooks/use-cursor-page.js\";\n\n// Return-scroll: restore a list's window offset when the user comes back to it after a\n// route change (save on leave, restore once on an eligible + ready return, keyed by the\n// caller's canonical list URL).\nexport { useReturnScroll, saveReturnScroll, clearReturnScroll, readReturnScroll } from \"./hooks/use-return-scroll.js\";\nexport type { ReturnScrollEntry, UseReturnScrollOptions, UseReturnScrollResult } from \"./hooks/use-return-scroll.js\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttt-productions/ui-core",
3
- "version": "0.11.28",
3
+ "version": "0.11.30",
4
4
  "description": "Shared UI components for TTT Productions projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- export interface ChunkErrorRecoveryProps {
3
- children: React.ReactNode;
4
- /** Custom message shown during recovery reload. */
5
- loadingMessage?: React.ReactNode;
6
- /**
7
- * Predicate to decide whether an error event indicates a stale-chunk failure.
8
- * Defaults to matching "Failed to load chunk" in the message.
9
- */
10
- isChunkError?: (event: ErrorEvent) => boolean;
11
- }
12
- export declare function ChunkErrorRecovery({ children, loadingMessage, isChunkError, }: ChunkErrorRecoveryProps): React.JSX.Element;
13
- //# sourceMappingURL=chunk-error-recovery.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk-error-recovery.d.ts","sourceRoot":"","sources":["../../../src/react/components/chunk-error-recovery.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,mDAAmD;IACnD,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC;CAC/C;AAYD,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,cAA4B,EAC5B,YAAkC,GACnC,EAAE,uBAAuB,qBA0BzB"}
@@ -1,34 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { Spinner } from "./spinner.js";
5
- function defaultIsChunkError(event) {
6
- const msg = event.message ?? "";
7
- if (msg.includes("Failed to load chunk"))
8
- return true;
9
- const nested = event.error && typeof event.error === "object"
10
- ? event.error.message
11
- : undefined;
12
- return typeof nested === "string" && nested.includes("Failed to load chunk");
13
- }
14
- export function ChunkErrorRecovery({ children, loadingMessage = "Updating…", isChunkError = defaultIsChunkError, }) {
15
- const [hasError, setHasError] = React.useState(false);
16
- React.useEffect(() => {
17
- const handler = (event) => {
18
- if (!isChunkError(event))
19
- return;
20
- console.error("Stale chunk detected — reloading.");
21
- setHasError(true);
22
- window.location.reload();
23
- event.preventDefault();
24
- event.stopPropagation();
25
- };
26
- window.addEventListener("error", handler);
27
- return () => window.removeEventListener("error", handler);
28
- }, [isChunkError]);
29
- if (hasError) {
30
- return (_jsxs("div", { className: "flex flex-col h-screen w-screen items-center justify-center gap-4 bg-background", children: [_jsx(Spinner, { size: "xl" }), _jsx("p", { className: "text-muted-foreground", children: loadingMessage })] }));
31
- }
32
- return _jsx(_Fragment, { children: children });
33
- }
34
- //# sourceMappingURL=chunk-error-recovery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk-error-recovery.js","sourceRoot":"","sources":["../../../src/react/components/chunk-error-recovery.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAavC,SAAS,mBAAmB,CAAC,KAAiB;IAC5C,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;IAChC,IAAI,GAAG,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QAAE,OAAO,IAAI,CAAC;IACtD,MAAM,MAAM,GACV,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ;QAC5C,CAAC,CAAE,KAAK,CAAC,KAA8B,CAAC,OAAO;QAC/C,CAAC,CAAC,SAAS,CAAC;IAChB,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EACjC,QAAQ,EACR,cAAc,GAAG,WAAW,EAC5B,YAAY,GAAG,mBAAmB,GACV;IACxB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEtD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,OAAO,GAAG,CAAC,KAAiB,EAAE,EAAE;YACpC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;gBAAE,OAAO;YAEjC,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;YACnD,WAAW,CAAC,IAAI,CAAC,CAAC;YAClB,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACzB,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1B,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1C,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CACL,eAAK,SAAS,EAAC,iFAAiF,aAC9F,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,GAAG,EACrB,YAAG,SAAS,EAAC,uBAAuB,YAAE,cAAc,GAAK,IACrD,CACP,CAAC;IACJ,CAAC;IACD,OAAO,4BAAG,QAAQ,GAAI,CAAC;AACzB,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Spinner } from \"./spinner.js\";\n\nexport interface ChunkErrorRecoveryProps {\n children: React.ReactNode;\n /** Custom message shown during recovery reload. */\n loadingMessage?: React.ReactNode;\n /**\n * Predicate to decide whether an error event indicates a stale-chunk failure.\n * Defaults to matching \"Failed to load chunk\" in the message.\n */\n isChunkError?: (event: ErrorEvent) => boolean;\n}\n\nfunction defaultIsChunkError(event: ErrorEvent): boolean {\n const msg = event.message ?? \"\";\n if (msg.includes(\"Failed to load chunk\")) return true;\n const nested =\n event.error && typeof event.error === \"object\"\n ? (event.error as { message?: string }).message\n : undefined;\n return typeof nested === \"string\" && nested.includes(\"Failed to load chunk\");\n}\n\nexport function ChunkErrorRecovery({\n children,\n loadingMessage = \"Updating…\",\n isChunkError = defaultIsChunkError,\n}: ChunkErrorRecoveryProps) {\n const [hasError, setHasError] = React.useState(false);\n\n React.useEffect(() => {\n const handler = (event: ErrorEvent) => {\n if (!isChunkError(event)) return;\n \n console.error(\"Stale chunk detected — reloading.\");\n setHasError(true);\n window.location.reload();\n event.preventDefault();\n event.stopPropagation();\n };\n window.addEventListener(\"error\", handler);\n return () => window.removeEventListener(\"error\", handler);\n }, [isChunkError]);\n\n if (hasError) {\n return (\n <div className=\"flex flex-col h-screen w-screen items-center justify-center gap-4 bg-background\">\n <Spinner size=\"xl\" />\n <p className=\"text-muted-foreground\">{loadingMessage}</p>\n </div>\n );\n }\n return <>{children}</>;\n}\n"]}