@lerianstudio/sindarian-ui 1.3.0 → 1.4.0-beta.2

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.
Files changed (160) hide show
  1. package/README.md +93 -12
  2. package/dist/components/card/account-card/index.d.ts.map +1 -1
  3. package/dist/components/card/account-card/index.js +2 -2
  4. package/dist/components/card/entity-card/index.d.ts.map +1 -1
  5. package/dist/components/card/entity-card/index.js +5 -1
  6. package/dist/components/dialog/confirmation-dialog/index.d.ts +10 -2
  7. package/dist/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
  8. package/dist/components/dialog/confirmation-dialog/index.js +72 -7
  9. package/dist/components/page-header/index.d.ts +14 -2
  10. package/dist/components/page-header/index.d.ts.map +1 -1
  11. package/dist/components/page-header/index.js +4 -4
  12. package/dist/components/ui/accordion/index.js +1 -1
  13. package/dist/components/ui/alert/index.d.ts +1 -1
  14. package/dist/components/ui/alert/styles.css +3 -3
  15. package/dist/components/ui/alert-dialog/index.d.ts +8 -2
  16. package/dist/components/ui/alert-dialog/index.d.ts.map +1 -1
  17. package/dist/components/ui/alert-dialog/index.js +4 -4
  18. package/dist/components/ui/autocomplete/index.d.ts +1 -1
  19. package/dist/components/ui/autocomplete/index.d.ts.map +1 -1
  20. package/dist/components/ui/autocomplete/index.js +42 -6
  21. package/dist/components/ui/badge/index.d.ts +10 -2
  22. package/dist/components/ui/badge/index.d.ts.map +1 -1
  23. package/dist/components/ui/badge/index.js +24 -4
  24. package/dist/components/ui/breadcrumb/styles.css +1 -1
  25. package/dist/components/ui/button/index.d.ts +2 -2
  26. package/dist/components/ui/button/index.d.ts.map +1 -1
  27. package/dist/components/ui/button/index.js +2 -1
  28. package/dist/components/ui/button/styles.css +17 -4
  29. package/dist/components/ui/card/index.d.ts +10 -2
  30. package/dist/components/ui/card/index.d.ts.map +1 -1
  31. package/dist/components/ui/card/index.js +2 -2
  32. package/dist/components/ui/command/index.js +1 -1
  33. package/dist/components/ui/dialog/styles.css +3 -3
  34. package/dist/components/ui/dropdown-menu/index.js +2 -2
  35. package/dist/components/ui/hover-card/index.js +1 -1
  36. package/dist/components/ui/input/adornment.d.ts +1 -1
  37. package/dist/components/ui/loading-button/index.js +1 -1
  38. package/dist/components/ui/multiple-select/index.js +1 -1
  39. package/dist/components/ui/otp-input/index.js +1 -1
  40. package/dist/components/ui/paper-collapsible/index.js +1 -1
  41. package/dist/components/ui/popover/index.js +1 -1
  42. package/dist/components/ui/select/styles.css +1 -1
  43. package/dist/components/ui/sheet/index.d.ts +1 -1
  44. package/dist/components/ui/sheet/index.js +2 -2
  45. package/dist/components/ui/sidebar/sidebar-expand-button.d.ts +5 -0
  46. package/dist/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
  47. package/dist/components/ui/sidebar/sidebar-expand-button.js +1 -1
  48. package/dist/components/ui/sidebar/sidebar-item-collapsible.js +1 -1
  49. package/dist/components/ui/skeleton/index.js +1 -1
  50. package/dist/components/ui/toast/toaster.d.ts +5 -0
  51. package/dist/components/ui/toast/toaster.d.ts.map +1 -1
  52. package/dist/components/ui/toast/toaster.js +6 -2
  53. package/dist/components/ui/tooltip/index.js +1 -1
  54. package/dist/domain/blotter/index.d.ts +7 -1
  55. package/dist/domain/blotter/index.d.ts.map +1 -1
  56. package/dist/domain/blotter/index.js +7 -3
  57. package/dist/domain/delinquency-aging/aging-buckets.d.ts +4 -1
  58. package/dist/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
  59. package/dist/domain/delinquency-aging/aging-buckets.js +7 -2
  60. package/dist/domain/delinquency-aging/index.d.ts +11 -1
  61. package/dist/domain/delinquency-aging/index.d.ts.map +1 -1
  62. package/dist/domain/delinquency-aging/index.js +7 -3
  63. package/dist/domain/figure/index.d.ts +13 -6
  64. package/dist/domain/figure/index.d.ts.map +1 -1
  65. package/dist/domain/figure/index.js +1 -0
  66. package/dist/domain/section-label/index.d.ts +7 -1
  67. package/dist/domain/section-label/index.d.ts.map +1 -1
  68. package/dist/domain/section-label/index.js +6 -2
  69. package/dist/enterprise/app-shell/index.d.ts +14 -0
  70. package/dist/enterprise/app-shell/index.d.ts.map +1 -1
  71. package/dist/enterprise/app-shell/index.js +2 -2
  72. package/dist/enterprise/data-table/index.d.ts +13 -1
  73. package/dist/enterprise/data-table/index.d.ts.map +1 -1
  74. package/dist/enterprise/data-table/index.js +7 -3
  75. package/dist/enterprise/search-input/index.d.ts +7 -1
  76. package/dist/enterprise/search-input/index.d.ts.map +1 -1
  77. package/dist/enterprise/search-input/index.js +2 -2
  78. package/dist/esm/components/card/account-card/index.d.ts.map +1 -1
  79. package/dist/esm/components/card/account-card/index.js +2 -2
  80. package/dist/esm/components/card/entity-card/index.d.ts.map +1 -1
  81. package/dist/esm/components/card/entity-card/index.js +5 -1
  82. package/dist/esm/components/dialog/confirmation-dialog/index.d.ts +10 -2
  83. package/dist/esm/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
  84. package/dist/esm/components/dialog/confirmation-dialog/index.js +39 -7
  85. package/dist/esm/components/page-header/index.d.ts +14 -2
  86. package/dist/esm/components/page-header/index.d.ts.map +1 -1
  87. package/dist/esm/components/page-header/index.js +4 -4
  88. package/dist/esm/components/ui/accordion/index.js +1 -1
  89. package/dist/esm/components/ui/alert/index.d.ts +1 -1
  90. package/dist/esm/components/ui/alert-dialog/index.d.ts +8 -2
  91. package/dist/esm/components/ui/alert-dialog/index.d.ts.map +1 -1
  92. package/dist/esm/components/ui/alert-dialog/index.js +4 -4
  93. package/dist/esm/components/ui/autocomplete/index.d.ts +1 -1
  94. package/dist/esm/components/ui/autocomplete/index.d.ts.map +1 -1
  95. package/dist/esm/components/ui/autocomplete/index.js +42 -6
  96. package/dist/esm/components/ui/badge/index.d.ts +10 -2
  97. package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
  98. package/dist/esm/components/ui/badge/index.js +24 -4
  99. package/dist/esm/components/ui/button/index.d.ts +2 -2
  100. package/dist/esm/components/ui/button/index.d.ts.map +1 -1
  101. package/dist/esm/components/ui/button/index.js +2 -1
  102. package/dist/esm/components/ui/card/index.d.ts +10 -2
  103. package/dist/esm/components/ui/card/index.d.ts.map +1 -1
  104. package/dist/esm/components/ui/card/index.js +2 -2
  105. package/dist/esm/components/ui/command/index.js +1 -1
  106. package/dist/esm/components/ui/dropdown-menu/index.js +2 -2
  107. package/dist/esm/components/ui/hover-card/index.js +1 -1
  108. package/dist/esm/components/ui/input/adornment.d.ts +1 -1
  109. package/dist/esm/components/ui/loading-button/index.js +1 -1
  110. package/dist/esm/components/ui/multiple-select/index.js +1 -1
  111. package/dist/esm/components/ui/otp-input/index.js +1 -1
  112. package/dist/esm/components/ui/paper-collapsible/index.js +1 -1
  113. package/dist/esm/components/ui/popover/index.js +1 -1
  114. package/dist/esm/components/ui/sheet/index.d.ts +1 -1
  115. package/dist/esm/components/ui/sheet/index.js +2 -2
  116. package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts +5 -0
  117. package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
  118. package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +1 -1
  119. package/dist/esm/components/ui/sidebar/sidebar-item-collapsible.js +1 -1
  120. package/dist/esm/components/ui/skeleton/index.js +1 -1
  121. package/dist/esm/components/ui/toast/toaster.d.ts +5 -0
  122. package/dist/esm/components/ui/toast/toaster.d.ts.map +1 -1
  123. package/dist/esm/components/ui/toast/toaster.js +6 -2
  124. package/dist/esm/components/ui/tooltip/index.js +1 -1
  125. package/dist/esm/domain/blotter/index.d.ts +7 -1
  126. package/dist/esm/domain/blotter/index.d.ts.map +1 -1
  127. package/dist/esm/domain/blotter/index.js +7 -3
  128. package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts +4 -1
  129. package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
  130. package/dist/esm/domain/delinquency-aging/aging-buckets.js +7 -2
  131. package/dist/esm/domain/delinquency-aging/index.d.ts +11 -1
  132. package/dist/esm/domain/delinquency-aging/index.d.ts.map +1 -1
  133. package/dist/esm/domain/delinquency-aging/index.js +7 -3
  134. package/dist/esm/domain/figure/index.d.ts +13 -6
  135. package/dist/esm/domain/figure/index.d.ts.map +1 -1
  136. package/dist/esm/domain/figure/index.js +1 -0
  137. package/dist/esm/domain/section-label/index.d.ts +7 -1
  138. package/dist/esm/domain/section-label/index.d.ts.map +1 -1
  139. package/dist/esm/domain/section-label/index.js +6 -2
  140. package/dist/esm/enterprise/app-shell/index.d.ts +14 -0
  141. package/dist/esm/enterprise/app-shell/index.d.ts.map +1 -1
  142. package/dist/esm/enterprise/app-shell/index.js +2 -2
  143. package/dist/esm/enterprise/data-table/index.d.ts +13 -1
  144. package/dist/esm/enterprise/data-table/index.d.ts.map +1 -1
  145. package/dist/esm/enterprise/data-table/index.js +8 -4
  146. package/dist/esm/enterprise/search-input/index.d.ts +7 -1
  147. package/dist/esm/enterprise/search-input/index.d.ts.map +1 -1
  148. package/dist/esm/enterprise/search-input/index.js +2 -2
  149. package/dist/esm/lib/utils.d.ts.map +1 -1
  150. package/dist/esm/lib/utils.js +27 -1
  151. package/dist/esm/theme/theme-provider.d.ts +8 -0
  152. package/dist/esm/theme/theme-provider.d.ts.map +1 -1
  153. package/dist/esm/theme/theme-provider.js +10 -0
  154. package/dist/globals.css +85 -58
  155. package/dist/lib/utils.d.ts.map +1 -1
  156. package/dist/lib/utils.js +27 -1
  157. package/dist/theme/theme-provider.d.ts +8 -0
  158. package/dist/theme/theme-provider.d.ts.map +1 -1
  159. package/dist/theme/theme-provider.js +11 -0
  160. package/package.json +1 -1
@@ -1,5 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
3
+ import { type VariantProps } from 'class-variance-authority';
4
+ import { buttonVariants } from '../../../components/ui/button/index.js';
3
5
  declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): React.JSX.Element;
4
6
  declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): React.JSX.Element;
5
7
  declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): React.JSX.Element;
@@ -9,7 +11,11 @@ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps
9
11
  declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
10
12
  declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
11
13
  declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
12
- declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): React.JSX.Element;
13
- declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): React.JSX.Element;
14
+ declare function AlertDialogAction({ className, variant, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & {
15
+ variant?: VariantProps<typeof buttonVariants>['variant'];
16
+ }): React.JSX.Element;
17
+ declare function AlertDialogCancel({ className, variant, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & {
18
+ variant?: VariantProps<typeof buttonVariants>['variant'];
19
+ }): React.JSX.Element;
14
20
  export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel };
15
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/alert-dialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AAKpE,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAA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KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,qBAQ1D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,qBAQ1D;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EAClB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/alert-dialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AACpE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAGvD,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,qBAExD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,qBAI3D;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,qBAI1D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,qBAQ3D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,SAAS,EACT,UAAU,EACV,GAAG,KAA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B,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EAClB,CAAA"}
@@ -30,10 +30,10 @@ function AlertDialogTitle({ className, ...props }) {
30
30
  function AlertDialogDescription({ className, ...props }) {
31
31
  return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn('dialog-description', className), ...props }));
32
32
  }
33
- function AlertDialogAction({ className, ...props }) {
34
- return (_jsx(AlertDialogPrimitive.Action, { "data-slot": "alert-dialog-action", className: cn(buttonVariants(), className), ...props }));
33
+ function AlertDialogAction({ className, variant = 'default', ...props }) {
34
+ return (_jsx(AlertDialogPrimitive.Action, { "data-slot": "alert-dialog-action", className: cn(buttonVariants({ variant }), className), ...props }));
35
35
  }
36
- function AlertDialogCancel({ className, ...props }) {
37
- return (_jsx(AlertDialogPrimitive.Cancel, { "data-slot": "alert-dialog-cancel", className: cn(buttonVariants({ variant: 'outline' }), className), ...props }));
36
+ function AlertDialogCancel({ className, variant = 'outline', ...props }) {
37
+ return (_jsx(AlertDialogPrimitive.Cancel, { "data-slot": "alert-dialog-cancel", className: cn(buttonVariants({ variant }), className), ...props }));
38
38
  }
39
39
  export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel };
@@ -34,7 +34,7 @@ export type AutocompleteContentProps = React.ComponentProps<typeof CommandPrimit
34
34
  side?: Side;
35
35
  onPointerDownOutside?: (event: MouseEvent | TouchEvent) => void;
36
36
  };
37
- export declare function AutocompleteContent({ className, position, side, ref, children, onMouseEnter, onMouseLeave, onPointerDownOutside, ...props }: AutocompleteContentProps): React.JSX.Element | null;
37
+ export declare function AutocompleteContent({ className, position, side, ref, children, onMouseEnter, onMouseLeave, onPointerDownOutside, ...props }: AutocompleteContentProps): React.JSX.Element;
38
38
  export declare function AutocompleteGroup({ className, ...props }: React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>): React.JSX.Element;
39
39
  export declare function AutocompleteItem({ className, value, onSelect, ...props }: React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>): React.JSX.Element;
40
40
  export type AutocompleteProps = React.ComponentProps<typeof CommandPrimitive> & {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/autocomplete/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAmB,MAAM,MAAM,CAAA;AAInE,MAAM,MAAM,uBAAuB,GACjC,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,GAAG;IAC3C,sCAAsC;IACtC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,CAAA;IAC7B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAA;IAEnD,2BAA2B;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAA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SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAmInB"}
@@ -109,7 +109,7 @@ export function AutocompleteEmpty({ className, ...props }) {
109
109
  return (_jsx("div", { "data-slot": "autocomplete-empty", className: cn('py-6 text-center text-sm', className), "cmdk-empty": "", role: "presentation", ...props }));
110
110
  }
111
111
  export function AutocompleteLoading({ className, ref, ...props }) {
112
- return (_jsx(CommandPrimitive.Loading, { ref: ref, "data-slot": "autocomplete-loading", className: cn('flex items-center justify-center py-6 text-center text-sm', className), ...props, children: _jsx(Loader2, { className: "text-muted-foreground h-5 w-5 animate-spin" }) }));
112
+ return (_jsx(CommandPrimitive.Loading, { ref: ref, "data-slot": "autocomplete-loading", className: cn('flex items-center justify-center py-6 text-center text-sm', className), ...props, children: _jsx(Loader2, { className: "text-muted-foreground h-5 w-5 motion-safe:animate-spin" }) }));
113
113
  }
114
114
  export const SIDE_OPTIONS = ['top', 'right', 'bottom', 'left'];
115
115
  export function AutocompleteContent({ className, position = 'popper', side = 'bottom', ref, children, onMouseEnter, onMouseLeave, onPointerDownOutside, ...props }) {
@@ -117,6 +117,17 @@ export function AutocompleteContent({ className, position = 'popper', side = 'bo
117
117
  const { open, addOption, setOpen, onScrollbar, setOnScrollbar, inputRef } = useAutocomplete();
118
118
  React.useImperativeHandle(ref, () => _ref.current);
119
119
  useClickAway(_ref, (event) => {
120
+ /**
121
+ * ⛔ THE `open` GUARD IS LOAD-BEARING SINCE THIS LIST STOPPED UNMOUNTING.
122
+ * While the panel returned `null` this handler was inert by accident: its
123
+ * ref pointed at nothing. Now that the list stays in the DOM (see the return
124
+ * below), every click anywhere on the page reaches here — and without this
125
+ * line each one would call `setOpen(false)` and blur the input. A consumer
126
+ * form carrying ten of these would run ten handlers per click.
127
+ */
128
+ if (!open) {
129
+ return;
130
+ }
120
131
  // Should not close when clicking on the scrollbar
121
132
  if (onScrollbar) {
122
133
  return;
@@ -159,17 +170,42 @@ export function AutocompleteContent({ className, position = 'popper', side = 'bo
159
170
  React.useEffect(() => {
160
171
  _searchChildren(children);
161
172
  }, [children]);
162
- if (!open) {
163
- return null;
164
- }
165
- return (_jsx("div", { className: "relative", children: _jsx(CommandPrimitive.List, { ref: _ref, className: cn('bg-popover text-popover-foreground animate-in absolute top-1 z-50 max-h-96 w-full min-w-32 overflow-x-hidden overflow-y-auto rounded-md border shadow-md outline-hidden', position === 'popper' &&
173
+ /**
174
+ * ⛔ THE LIST STAYS IN THE DOM, THE OPTIONS DO NOT — and the split is the whole
175
+ * fix (#150).
176
+ *
177
+ * cmdk puts `aria-controls={listId}` on the input it renders and `id={listId}`
178
+ * on this list. Returning `null` while closed therefore left the input naming
179
+ * an element that did not exist, which axe-core reports as a CRITICAL
180
+ * `aria-valid-attr-value` violation — measured as 10 failing cases across five
181
+ * forms in a consumer, in both the populated and the empty state. A screen
182
+ * reader following the reference resolved it to nothing.
183
+ *
184
+ * ⛔ AND NOT "KEEP EVERYTHING MOUNTED", which is the obvious reading of the
185
+ * fix and is too expensive. Only the LIST carries the id; the options carry
186
+ * the cost. One consumer form puts up to ten of these on screen, each holding
187
+ * a page of up to a hundred options — roughly a thousand permanently present
188
+ * nodes for an id that is one element. `{open ? children : null}` keeps the
189
+ * reference resolvable and the DOM the size it was.
190
+ *
191
+ * ⚠️ `hidden` AND NOT A CLASS. It removes the subtree from the accessibility
192
+ * tree as well as from view, so a closed panel is not an empty `listbox` that
193
+ * a screen reader can reach into.
194
+ *
195
+ * ⚠️ THE ENTRY ANIMATION IS NOT LOST, because there was none to lose: the
196
+ * className carries `animate-in` with no `fade-in-*` / `zoom-in-*` / `slide-in-*`
197
+ * companion, so every `--tw-enter-*` variable sits at its default and the
198
+ * keyframe is a no-op today. Should a real one be added later, it belongs on a
199
+ * wrapper INSIDE this list — that subtree still mounts with the children.
200
+ */
201
+ return (_jsx("div", { className: "relative", hidden: !open, children: _jsx(CommandPrimitive.List, { ref: _ref, className: cn('bg-popover text-popover-foreground motion-safe:animate-in absolute top-1 z-50 max-h-96 w-full min-w-32 overflow-x-hidden overflow-y-auto rounded-md border shadow-md outline-hidden', position === 'popper' &&
166
202
  'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), "data-side": side, ...props, onMouseEnter: (e) => {
167
203
  onMouseEnter?.(e);
168
204
  setOnScrollbar(true);
169
205
  }, onMouseLeave: (e) => {
170
206
  onMouseLeave?.(e);
171
207
  setOnScrollbar(false);
172
- }, children: children }) }));
208
+ }, children: open ? children : null }) }));
173
209
  }
174
210
  export function AutocompleteGroup({ className, ...props }) {
175
211
  return (_jsx(CommandPrimitive.Group, { "data-slot": "autocomplete-group", className: cn('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className), ...props }));
@@ -1,11 +1,19 @@
1
1
  import * as React from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
+ /**
4
+ * `credit` is the accounting reading of a credit amount, NOT an alias of
5
+ * `destructive` (an error/alarm). The credit role is a tint-and-ink pair:
6
+ * `--credit-foreground` mirrors `--credit` by contract, so the red carries the
7
+ * role as text over a tinted surface. Do not "fix" this into a solid
8
+ * `bg-credit` fill — that renders red-on-red and is invisible.
9
+ */
3
10
  declare const badgeVariants: (props?: ({
4
- variant?: "default" | "secondary" | "outline" | "alert" | "destructive" | "success" | "active" | "inactive" | "error" | "info" | "purple" | null | undefined;
11
+ variant?: "default" | "secondary" | "outline" | "destructive" | "alert" | "success" | "active" | "inactive" | "credit" | "error" | "info" | "purple" | null | undefined;
12
+ size?: "default" | "sm" | null | undefined;
5
13
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
14
  export type BadgeProps = React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
7
15
  asChild?: boolean;
8
16
  };
9
- declare function Badge({ className, variant, asChild, ...props }: BadgeProps): React.JSX.Element;
17
+ declare function Badge({ className, variant, size, asChild, ...props }: BadgeProps): React.JSX.Element;
10
18
  export { Badge, badgeVariants };
11
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,aAAa;;8EA+BlB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GACnD,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAE5D,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBAUnE;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE;;;;;;GAMG;AACH,QAAA,MAAM,aAAa;;;8EA6ClB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GACnD,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAE5D,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBAUzE;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
@@ -2,6 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cva } from 'class-variance-authority';
3
3
  import { cn } from '../../../lib/utils.js';
4
4
  import { Slot } from '@radix-ui/react-slot';
5
+ /**
6
+ * `credit` is the accounting reading of a credit amount, NOT an alias of
7
+ * `destructive` (an error/alarm). The credit role is a tint-and-ink pair:
8
+ * `--credit-foreground` mirrors `--credit` by contract, so the red carries the
9
+ * role as text over a tinted surface. Do not "fix" this into a solid
10
+ * `bg-credit` fill — that renders red-on-red and is invisible.
11
+ */
5
12
  const badgeVariants = cva('inline-flex items-center rounded-full border border-border px-2.5 py-0.5 text-sm font-medium transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2', {
6
13
  variants: {
7
14
  variant: {
@@ -9,21 +16,34 @@ const badgeVariants = cva('inline-flex items-center rounded-full border border-b
9
16
  active: 'bg-system-success-surface text-system-success-h1a border-system-success-border py-[2px] px-3',
10
17
  inactive: 'bg-muted text-foreground border-muted-foreground/40 py-[2px] px-3',
11
18
  secondary: 'border-transparent bg-muted-foreground text-white dark:text-black',
12
- destructive: 'border-transparent bg-red-500 text-primary-foreground hover:bg-red-500/80',
19
+ destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
20
+ credit: 'border-credit/30 bg-credit/10 text-credit-foreground px-[10px] py-1',
13
21
  error: 'border-system-error-border bg-system-error-surface text-system-error-text px-[10px] py-1',
14
22
  success: 'border-system-success-border bg-system-success-surface text-system-success-text px-[10px] py-1',
15
23
  info: 'border-system-info-border bg-system-info-surface text-system-info-text px-[10px] py-1',
16
24
  alert: 'border-system-alert-border bg-system-alert-surface text-system-alert-text px-[10px] py-1',
17
25
  purple: 'border-system-purple-border bg-system-purple-surface text-system-purple-text px-[10px] py-1',
18
26
  outline: 'text-foreground'
27
+ },
28
+ /**
29
+ * Font size only. Padding is baked per-variant above, so a `sm` that also
30
+ * shrank the box would fight every variant that sets its own; scoping the
31
+ * axis to type keeps `sm` composable with all of them. 11px is the canon
32
+ * for fine print — the one micro-badge size, replacing the per-consumer
33
+ * 0.7rem/10px/11px anarchy.
34
+ */
35
+ size: {
36
+ default: '',
37
+ sm: 'text-[11px]'
19
38
  }
20
39
  },
21
40
  defaultVariants: {
22
- variant: 'default'
41
+ variant: 'default',
42
+ size: 'default'
23
43
  }
24
44
  });
25
- function Badge({ className, variant, asChild, ...props }) {
45
+ function Badge({ className, variant, size, asChild, ...props }) {
26
46
  const Comp = asChild ? Slot : 'span';
27
- return (_jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant }), className), ...props }));
47
+ return (_jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant, size }), className), ...props }));
28
48
  }
29
49
  export { Badge, badgeVariants };
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "plain" | "hoverLink" | "default" | "primary" | "secondary" | "tertiary" | "outline" | "link" | null | undefined;
4
+ variant?: "plain" | "hoverLink" | "default" | "primary" | "secondary" | "tertiary" | "outline" | "link" | "destructive" | null | undefined;
5
5
  fullWidth?: boolean | null | undefined;
6
6
  size?: "default" | "small" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  declare const iconVariants: (props?: ({
9
- position?: "start" | "end" | "far-end" | null | undefined;
9
+ position?: "end" | "start" | "far-end" | null | undefined;
10
10
  size?: "default" | "small" | null | undefined;
11
11
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
12
  export type ButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B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AAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAEH,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAe,EACf,IAAI,EACJ,aAAuB,EACvB,SAAiB,EACjB,QAAgB,EAChB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,WAAW,qBAqCb;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,CAAA"}
@@ -12,7 +12,8 @@ const buttonVariants = cva('button-base button-disabled button-read-only', {
12
12
  secondary: 'button-secondary',
13
13
  tertiary: 'button-tertiary',
14
14
  outline: 'button-outline',
15
- link: 'button-link'
15
+ link: 'button-link',
16
+ destructive: 'button-destructive'
16
17
  },
17
18
  fullWidth: {
18
19
  true: 'w-full',
@@ -1,8 +1,16 @@
1
1
  import * as React from 'react';
2
2
  declare function Card({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
3
3
  declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
4
- declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
5
- declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
4
+ type CardTitleProps = React.ComponentProps<'h3'> & {
5
+ /**
6
+ * Heading level to render. Defaults to `h3`, which is correct for a card
7
+ * nested under a section heading. Set it when the card sits directly under
8
+ * the page `h1` (or deeper), so the document heading order stays valid.
9
+ */
10
+ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
11
+ };
12
+ declare function CardTitle({ className, as: Comp, ...props }: CardTitleProps): React.JSX.Element;
13
+ declare function CardDescription({ className, ...props }: React.ComponentProps<'p'>): React.JSX.Element;
6
14
  declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
7
15
  declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
8
16
  declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWjE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACZ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWjE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,KAAK,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACjD;;;;OAIG;IACH,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC7C,CAAA;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,IAAW,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,qBAW1E;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAQ1E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACZ,CAAA"}
@@ -6,8 +6,8 @@ function Card({ className, ...props }) {
6
6
  function CardHeader({ className, ...props }) {
7
7
  return (_jsx("div", { "data-slot": "card-header", className: cn('flex flex-col space-y-1.5', className), ...props }));
8
8
  }
9
- function CardTitle({ className, ...props }) {
10
- return (_jsx("h3", { "data-slot": "card-title", className: cn('text-sm leading-none font-medium tracking-tight', className), ...props }));
9
+ function CardTitle({ className, as: Comp = 'h3', ...props }) {
10
+ return (_jsx(Comp, { "data-slot": "card-title", className: cn('text-sm leading-none font-medium tracking-tight', className), ...props }));
11
11
  }
12
12
  function CardDescription({ className, ...props }) {
13
13
  return (_jsx("p", { "data-slot": "card-description", className: cn('text-muted-foreground text-sm', className), ...props }));
@@ -9,7 +9,7 @@ function Command({ className, ...props }) {
9
9
  return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn('bg-card text-foreground flex h-full w-full flex-col overflow-hidden rounded-md', className), ...props }));
10
10
  }
11
11
  const CommandDialog = ({ children, ...props }) => {
12
- return (_jsx(Dialog, { ...props, children: _jsx(DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: _jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) }) }));
12
+ return (_jsx(Dialog, { ...props, children: _jsx(DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: _jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) }) }));
13
13
  };
14
14
  function CommandInput({ className, ...props }) {
15
15
  return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex items-center border-b px-3", children: [_jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn('placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className), ...props })] }));
@@ -14,7 +14,7 @@ function DropdownMenuTrigger({ className, ...props }) {
14
14
  return (_jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", className: cn('flex items-center justify-center outline-hidden', className), ...props }));
15
15
  }
16
16
  function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
17
- return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground 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 z-50 min-w-32 overflow-hidden rounded-lg border shadow-md', className), ...props }) }));
17
+ return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground motion-safe:data-[state=open]:animate-in motion-safe: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 z-50 min-w-32 overflow-hidden rounded-lg border shadow-md', className), ...props }) }));
18
18
  }
19
19
  function DropdownMenuGroup({ ...props }) {
20
20
  return (_jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props }));
@@ -52,6 +52,6 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
52
52
  return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn('focus:bg-shadcn-100 data-[state=open]:bg-accent text-muted-foreground flex cursor-default items-center gap-3 px-3 py-2 text-sm font-medium outline-hidden select-none', className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] }));
53
53
  }
54
54
  function DropdownMenuSubContent({ className, ...props }) {
55
- return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn('bg-popover text-popover-foreground 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 z-50 min-w-32 overflow-hidden rounded-md border p-1 shadow-lg', className), ...props }));
55
+ return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn('bg-popover text-popover-foreground motion-safe:data-[state=open]:animate-in motion-safe: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 z-50 min-w-32 overflow-hidden rounded-md border p-1 shadow-lg', className), ...props }));
56
56
  }
57
57
  export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemIcon, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup };
@@ -9,6 +9,6 @@ function HoverCardTrigger({ ...props }) {
9
9
  return (_jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props }));
10
10
  }
11
11
  function HoverCardContent({ className, align = 'center', sideOffset = 4, ...props }) {
12
- return (_jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(HoverCardPrimitive.Content, { "data-slot": "hover-card-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground 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 border-border z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden', className), ...props }) }));
12
+ return (_jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(HoverCardPrimitive.Content, { "data-slot": "hover-card-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground motion-safe:data-[state=open]:animate-in motion-safe: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 border-border z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden', className), ...props }) }));
13
13
  }
14
14
  export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  export declare const inputAdornmentVariants: (props?: ({
3
- position?: "start" | "end" | null | undefined;
3
+ position?: "end" | "start" | null | undefined;
4
4
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
5
  export type InputAdornmentProps = React.ComponentProps<'span'> & VariantProps<typeof inputAdornmentVariants> & {
6
6
  position?: 'start' | 'end';
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button } from '../button/index.js';
3
3
  import { Loader2 } from 'lucide-react';
4
4
  function LoadingButton({ loading, disabled, children, ...props }) {
5
- return (_jsxs(Button, { ...props, disabled: loading || disabled, children: [loading && _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), children] }));
5
+ return (_jsxs(Button, { ...props, disabled: loading || disabled, children: [loading && _jsx(Loader2, { className: "mr-2 h-4 w-4 motion-safe:animate-spin" }), children] }));
6
6
  }
7
7
  export { LoadingButton };
@@ -103,7 +103,7 @@ export const MultipleSelectContent = React.forwardRef(({ className, position = '
103
103
  if (!open) {
104
104
  return null;
105
105
  }
106
- return (_jsx("div", { className: "relative", children: _jsx(CommandPrimitive.List, { ref: ref, className: cn('bg-popover text-popover-foreground animate-in absolute top-1 z-50 max-h-96 w-full min-w-32 overflow-x-hidden overflow-y-auto rounded-md border shadow-md outline-hidden', position === 'popper' &&
106
+ return (_jsx("div", { className: "relative", children: _jsx(CommandPrimitive.List, { ref: ref, className: cn('bg-popover text-popover-foreground motion-safe:animate-in absolute top-1 z-50 max-h-96 w-full min-w-32 overflow-x-hidden overflow-y-auto rounded-md border shadow-md outline-hidden', position === 'popper' &&
107
107
  'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), ...props, onMouseEnter: (e) => {
108
108
  onMouseEnter?.(e);
109
109
  setOnScrollbar(true);
@@ -12,7 +12,7 @@ function InputOTPGroup({ className, ...props }) {
12
12
  function InputOTPSlot({ index, className, ...props }) {
13
13
  const inputOTPContext = React.useContext(OTPInputContext);
14
14
  const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
15
- return (_jsxs("div", { "data-slot": "input-otp-slot", "data-active": isActive, className: cn('border-input-border bg-background text-foreground', 'relative flex h-14 w-12 items-center justify-center border-y border-r text-2xl font-semibold shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md', 'data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:z-10 data-[active=true]:ring-2', className), ...props, children: [char, hasFakeCaret && (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "animate-caret-blink bg-foreground h-6 w-px duration-1000" }) }))] }));
15
+ return (_jsxs("div", { "data-slot": "input-otp-slot", "data-active": isActive, className: cn('border-input-border bg-background text-foreground', 'relative flex h-14 w-12 items-center justify-center border-y border-r text-2xl font-semibold shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md', 'data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:z-10 data-[active=true]:ring-2', className), ...props, children: [char, hasFakeCaret && (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "motion-safe:animate-caret-blink bg-foreground h-6 w-px duration-1000" }) }))] }));
16
16
  }
17
17
  function InputOTPSeparator({ ...props }) {
18
18
  return (_jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: _jsx(MinusIcon, {}) }));
@@ -14,6 +14,6 @@ function PaperCollapsibleTrigger({ className, children: _children, ...props }) {
14
14
  return (_jsx(CollapsibleTrigger, { "data-slot": "paper-collapsible-trigger", className: cn('transition-all hover:underline [&[data-state=open]>svg]:rotate-180', className), ...props, children: _jsx(ChevronDown, { className: "text-foreground size-6 shrink-0 cursor-pointer transition-transform duration-200" }) }));
15
15
  }
16
16
  function PaperCollapsibleContent({ className, children, ...props }) {
17
- return (_jsxs(CollapsibleContent, { "data-slot": "paper-collapsible-content", className: cn('data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden transition-all duration-200 ease-in-out', className), ...props, children: [_jsx(Separator, {}), children] }));
17
+ return (_jsxs(CollapsibleContent, { "data-slot": "paper-collapsible-content", className: cn('motion-safe:data-[state=closed]:animate-collapsible-up motion-safe:data-[state=open]:animate-collapsible-down overflow-hidden transition-all duration-200 ease-in-out', className), ...props, children: [_jsx(Separator, {}), children] }));
18
18
  }
19
19
  export { PaperCollapsible, PaperCollapsibleBanner, PaperCollapsibleTrigger, PaperCollapsibleContent };
@@ -9,7 +9,7 @@ function PopoverTrigger({ ...props }) {
9
9
  return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
10
10
  }
11
11
  function PopoverContent({ className, align = 'center', sideOffset = 4, ...props }) {
12
- return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground 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 border-border z-50 w-72 rounded-md border p-4 shadow-md outline-hidden', className), ...props }) }));
12
+ return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground motion-safe:data-[state=open]:animate-in motion-safe: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 border-border z-50 w-72 rounded-md border p-4 shadow-md outline-hidden', className), ...props }) }));
13
13
  }
14
14
  function PopoverAnchor({ ...props }) {
15
15
  return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
@@ -7,7 +7,7 @@ declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimi
7
7
  declare function SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>): React.JSX.Element;
8
8
  declare function SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>): React.JSX.Element;
9
9
  declare const sheetVariants: (props?: ({
10
- side?: "top" | "right" | "bottom" | "left" | null | undefined;
10
+ side?: "bottom" | "left" | "right" | "top" | null | undefined;
11
11
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
12
  type SheetContentProps = React.ComponentProps<typeof SheetPrimitive.Content> & VariantProps<typeof sheetVariants>;
13
13
  declare function SheetContent({ side, className, children, onInteractOutside, ...props }: SheetContentProps): React.JSX.Element;
@@ -18,9 +18,9 @@ function SheetPortal({ ...props }) {
18
18
  return _jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
19
19
  }
20
20
  function SheetOverlay({ className, ...props }) {
21
- return (_jsx(SheetPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80', className), ...props }));
21
+ return (_jsx(SheetPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn('motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80', className), ...props }));
22
22
  }
23
- const sheetVariants = cva('fixed z-50 gap-4 bg-background p-12 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500', {
23
+ const sheetVariants = cva('fixed z-50 gap-4 bg-background p-12 shadow-lg transition ease-in-out motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500', {
24
24
  variants: {
25
25
  side: {
26
26
  top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
2
  type SidebarExpandButtonProps = {
3
+ /**
4
+ * Overrides the button's accessible name in BOTH states, and the visible
5
+ * tooltip copy in the collapsed state. Without it each state falls back to
6
+ * its own English default.
7
+ */
3
8
  tooltip?: string;
4
9
  };
5
10
  export declare const SidebarExpandButton: ({ tooltip }: SidebarExpandButtonProps) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-expand-button.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/sidebar/sidebar-expand-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,KAAK,wBAAwB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,aAAa,wBAAwB,sBAqCxE,CAAA"}
1
+ {"version":3,"file":"sidebar-expand-button.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/sidebar/sidebar-expand-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,KAAK,wBAAwB,GAAG;IAC9B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,aAAa,wBAAwB,sBA6CxE,CAAA"}
@@ -8,5 +8,5 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../
8
8
  import { IconButton } from '../icon-button/index.js';
9
9
  export const SidebarExpandButton = ({ tooltip }) => {
10
10
  const { isCollapsed, toggleSidebar } = useSidebar();
11
- return (_jsxs(React.Fragment, { children: [!isCollapsed && (_jsx("div", { "data-slot": "sidebar-expand-button", className: "border-border bg-card flex w-full", children: _jsx("div", { className: "absolute right-[-20px] bottom-4", children: _jsx(IconButton, { variant: "secondary", rounded: true, onClick: toggleSidebar, children: _jsx(PanelLeftClose, { className: "text-shadcn-400" }) }) }) })), isCollapsed && (_jsx(SidebarFooter, { children: _jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { className: "group/expand-button text-shadcn-400 hover:bg-accent rounded-sm bg-transparent p-2", onClick: toggleSidebar, children: _jsx(PanelRightClose, { className: "group-hover/expand-button:text-white dark:text-white" }) }), _jsx(TooltipContent, { side: "right", children: tooltip || 'Expand' })] }) }) }))] }));
11
+ return (_jsxs(React.Fragment, { children: [!isCollapsed && (_jsx("div", { "data-slot": "sidebar-expand-button", className: "border-border bg-card flex w-full", children: _jsx("div", { className: "absolute right-[-20px] bottom-4", children: _jsx(IconButton, { variant: "secondary", rounded: true, onClick: toggleSidebar, "aria-label": tooltip || 'Collapse sidebar', "aria-expanded": true, children: _jsx(PanelLeftClose, { className: "text-shadcn-400" }) }) }) })), isCollapsed && (_jsx(SidebarFooter, { children: _jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { className: "group/expand-button text-shadcn-400 hover:bg-accent rounded-sm bg-transparent p-2", onClick: toggleSidebar, "aria-label": tooltip || 'Expand sidebar', "aria-expanded": false, children: _jsx(PanelRightClose, { className: "group-hover/expand-button:text-white dark:text-white" }) }), _jsx(TooltipContent, { side: "right", children: tooltip || 'Expand' })] }) }) }))] }));
12
12
  };
@@ -38,7 +38,7 @@ export function SidebarItemCollapsibleTrigger({ className, icon, title, children
38
38
  }
39
39
  export function SidebarItemCollapsibleContent({ className, children, ...props }) {
40
40
  const { isCollapsed } = useSidebar();
41
- return (_jsx(CollapsibleContent, { "data-slot": "sidebar-item-collapsible-content", className: cn('mt-1 flex flex-col gap-1', 'data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden transition-all duration-200 ease-in-out', {
41
+ return (_jsx(CollapsibleContent, { "data-slot": "sidebar-item-collapsible-content", className: cn('mt-1 flex flex-col gap-1', 'motion-safe:data-[state=closed]:animate-collapsible-up motion-safe:data-[state=open]:animate-collapsible-down overflow-hidden transition-all duration-200 ease-in-out', {
42
42
  'items-center': isCollapsed
43
43
  }, className), ...props, children: isCollapsed ? (children) : (_jsxs("div", { className: "flex items-stretch gap-3", children: [_jsx(Separator, { className: "ml-5 h-auto", orientation: "vertical" }), _jsx("div", { className: "flex w-full flex-col gap-1", children: children })] })) }));
44
44
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from '../../../lib/utils.js';
3
3
  function Skeleton({ className, ...props }) {
4
- return (_jsx("div", { "data-slot": "skeleton", className: cn('bg-muted animate-pulse rounded-md', className), ...props }));
4
+ return (_jsx("div", { "data-slot": "skeleton", className: cn('bg-muted rounded-md motion-safe:animate-pulse', className), ...props }));
5
5
  }
6
6
  export { Skeleton };
@@ -1,4 +1,9 @@
1
1
  type ToasterProps = {
2
+ /**
3
+ * Forces the toast theme. Omit it inside a `ThemeProvider` to follow the
4
+ * resolved theme automatically; with no provider the fallback is `'system'`,
5
+ * leaving the light/dark call to sonner's own media query.
6
+ */
2
7
  theme?: 'light' | 'dark' | 'system';
3
8
  };
4
9
  export declare function Toaster({ theme }: ToasterProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/toast/toaster.tsx"],"names":[],"mappings":"AAIA,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;CACpC,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAgB,EAAE,EAAE,YAAY,+BAiBzD"}
1
+ {"version":3,"file":"toaster.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/toast/toaster.tsx"],"names":[],"mappings":"AAMA,KAAK,YAAY,GAAG;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;CACpC,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,YAAY,+BAqB9C"}
@@ -1,8 +1,12 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Toaster as SonnerToaster } from 'sonner';
4
- export function Toaster({ theme = 'system' }) {
5
- return (_jsx(SonnerToaster, { theme: theme, position: "bottom-right", visibleToasts: 3, duration: 10000, expand: false, closeButton: true, richColors: false, offset: 16, gap: 8, toastOptions: {
4
+ import { useOptionalTheme } from '../../../theme/theme-provider.js';
5
+ export function Toaster({ theme }) {
6
+ // Optional read: a Toaster mounted outside any ThemeProvider must still
7
+ // render, so this cannot go through `useTheme`, which throws.
8
+ const themeContext = useOptionalTheme();
9
+ return (_jsx(SonnerToaster, { theme: theme ?? themeContext?.resolvedTheme ?? 'system', position: "bottom-right", visibleToasts: 3, duration: 10000, expand: false, closeButton: true, richColors: false, offset: 16, gap: 8, toastOptions: {
6
10
  className: 'font-sans !text-sm !font-medium'
7
11
  } }));
8
12
  }
@@ -23,6 +23,6 @@ function TooltipTrigger({ ...props }) {
23
23
  return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
24
24
  }
25
25
  function TooltipContent({ className, sideOffset = 0, children, ...props }) {
26
- return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('bg-shadcn-600 text-shadcn-400 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 rounded-md px-3 py-1.5 text-sm shadow-md', className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "bg-shadcn-600 fill-shadcn-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })] }) }));
26
+ return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('bg-shadcn-600 text-shadcn-400 motion-safe:animate-in fade-in-0 zoom-in-95 motion-safe:data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 rounded-md px-3 py-1.5 text-sm shadow-md', className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "bg-shadcn-600 fill-shadcn-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })] }) }));
27
27
  }
28
28
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -35,6 +35,12 @@ export type BlotterRowProps = {
35
35
  * used by inline rows.
36
36
  */
37
37
  stacked?: boolean;
38
+ /**
39
+ * Render a skeleton in the value slot and mark the row `aria-busy`. The label
40
+ * is known before the figure is, so it keeps rendering — a loading blotter
41
+ * still reads as the same set of rows. Default off.
42
+ */
43
+ loading?: boolean;
38
44
  };
39
- export declare function BlotterRow({ label, value, valueClassName, className, stacked }: BlotterRowProps): import("react").JSX.Element;
45
+ export declare function BlotterRow({ label, value, valueClassName, className, stacked, loading }: BlotterRowProps): import("react").JSX.Element;
40
46
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/domain/blotter/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,YAAY,+BAE5D;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;IAChB,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,cAAc,EACd,SAAS,EACT,OAAe,EAChB,EAAE,eAAe,+BAwCjB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/domain/blotter/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,YAAY,+BAE5D;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;IAChB,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,cAAc,EACd,SAAS,EACT,OAAe,EACf,OAAe,EAChB,EAAE,eAAe,+BAkDjB"}