@lerianstudio/sindarian-ui 2.0.0-beta.1 → 2.0.0-beta.11

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 (140) hide show
  1. package/dist/components/breadcrumb/index.d.ts.map +1 -1
  2. package/dist/components/breadcrumb/index.js +25 -1
  3. package/dist/components/card/account-card/index.js +5 -5
  4. package/dist/components/card/basic-card/index.d.ts.map +1 -1
  5. package/dist/components/card/basic-card/index.js +2 -2
  6. package/dist/components/card/entity-card/index.js +1 -1
  7. package/dist/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
  8. package/dist/components/dialog/confirmation-dialog/index.js +4 -1
  9. package/dist/components/entity-box/index.d.ts +18 -2
  10. package/dist/components/entity-box/index.d.ts.map +1 -1
  11. package/dist/components/entity-box/index.js +32 -4
  12. package/dist/components/form/file-upload-field/index.d.ts +11 -2
  13. package/dist/components/form/file-upload-field/index.d.ts.map +1 -1
  14. package/dist/components/form/file-upload-field/index.js +8 -3
  15. package/dist/components/form/input-field/index.d.ts +41 -2
  16. package/dist/components/form/input-field/index.d.ts.map +1 -1
  17. package/dist/components/form/input-field/index.js +73 -15
  18. package/dist/components/form/password-field/index.d.ts +5 -1
  19. package/dist/components/form/password-field/index.d.ts.map +1 -1
  20. package/dist/components/form/password-field/index.js +2 -2
  21. package/dist/components/form/select-field/index.d.ts +9 -1
  22. package/dist/components/form/select-field/index.d.ts.map +1 -1
  23. package/dist/components/form/select-field/index.js +2 -2
  24. package/dist/components/page-header/index.js +1 -1
  25. package/dist/components/table/id-table-cell.d.ts +5 -1
  26. package/dist/components/table/id-table-cell.d.ts.map +1 -1
  27. package/dist/components/table/id-table-cell.js +48 -6
  28. package/dist/components/ui/autocomplete/index.d.ts +24 -0
  29. package/dist/components/ui/autocomplete/index.d.ts.map +1 -1
  30. package/dist/components/ui/autocomplete/index.js +24 -0
  31. package/dist/components/ui/badge/index.d.ts +11 -7
  32. package/dist/components/ui/badge/index.d.ts.map +1 -1
  33. package/dist/components/ui/badge/index.js +20 -8
  34. package/dist/components/ui/button/styles.css +31 -1
  35. package/dist/components/ui/calendar/index.d.ts.map +1 -1
  36. package/dist/components/ui/calendar/index.js +7 -1
  37. package/dist/components/ui/copy-field/index.d.ts.map +1 -1
  38. package/dist/components/ui/copy-field/index.js +1 -1
  39. package/dist/components/ui/file-upload/index.d.ts +235 -9
  40. package/dist/components/ui/file-upload/index.d.ts.map +1 -1
  41. package/dist/components/ui/file-upload/index.js +354 -17
  42. package/dist/components/ui/form.d.ts +4 -0
  43. package/dist/components/ui/form.d.ts.map +1 -1
  44. package/dist/components/ui/form.js +48 -6
  45. package/dist/components/ui/input/styles.css +75 -3
  46. package/dist/components/ui/sheet/index.d.ts.map +1 -1
  47. package/dist/components/ui/sheet/index.js +2 -2
  48. package/dist/components/ui/sidebar/index.d.ts +1 -0
  49. package/dist/components/ui/sidebar/index.d.ts.map +1 -1
  50. package/dist/components/ui/sidebar/index.js +1 -0
  51. package/dist/components/ui/sidebar/sidebar-expand-button.d.ts +1 -1
  52. package/dist/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
  53. package/dist/components/ui/sidebar/sidebar-expand-button.js +15 -1
  54. package/dist/components/ui/sidebar/sidebar-item.d.ts +1 -1
  55. package/dist/components/ui/sidebar/sidebar-item.d.ts.map +1 -1
  56. package/dist/components/ui/sidebar/sidebar-item.js +28 -4
  57. package/dist/components/ui/sidebar/sidebar-provider.d.ts +37 -0
  58. package/dist/components/ui/sidebar/sidebar-provider.d.ts.map +1 -1
  59. package/dist/components/ui/sidebar/sidebar-provider.js +125 -4
  60. package/dist/components/ui/sidebar/sidebar-root.d.ts +38 -1
  61. package/dist/components/ui/sidebar/sidebar-root.d.ts.map +1 -1
  62. package/dist/components/ui/sidebar/sidebar-root.js +100 -5
  63. package/dist/components/ui/sidebar/sidebar-trigger.d.ts +18 -0
  64. package/dist/components/ui/sidebar/sidebar-trigger.d.ts.map +1 -0
  65. package/dist/components/ui/sidebar/sidebar-trigger.js +30 -0
  66. package/dist/components/ui/toggle-group/index.d.ts +1 -1
  67. package/dist/components/ui/toggle-group/index.d.ts.map +1 -1
  68. package/dist/components/ui/toggle-group/index.js +73 -4
  69. package/dist/enterprise/number-input/index.d.ts.map +1 -1
  70. package/dist/enterprise/number-input/index.js +1 -1
  71. package/dist/esm/components/breadcrumb/index.d.ts.map +1 -1
  72. package/dist/esm/components/breadcrumb/index.js +25 -1
  73. package/dist/esm/components/card/account-card/index.js +5 -5
  74. package/dist/esm/components/card/basic-card/index.d.ts.map +1 -1
  75. package/dist/esm/components/card/basic-card/index.js +2 -2
  76. package/dist/esm/components/card/entity-card/index.js +1 -1
  77. package/dist/esm/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
  78. package/dist/esm/components/dialog/confirmation-dialog/index.js +4 -1
  79. package/dist/esm/components/entity-box/index.d.ts +18 -2
  80. package/dist/esm/components/entity-box/index.d.ts.map +1 -1
  81. package/dist/esm/components/entity-box/index.js +29 -4
  82. package/dist/esm/components/form/file-upload-field/index.d.ts +11 -2
  83. package/dist/esm/components/form/file-upload-field/index.d.ts.map +1 -1
  84. package/dist/esm/components/form/file-upload-field/index.js +8 -3
  85. package/dist/esm/components/form/input-field/index.d.ts +41 -2
  86. package/dist/esm/components/form/input-field/index.d.ts.map +1 -1
  87. package/dist/esm/components/form/input-field/index.js +73 -15
  88. package/dist/esm/components/form/password-field/index.d.ts +5 -1
  89. package/dist/esm/components/form/password-field/index.d.ts.map +1 -1
  90. package/dist/esm/components/form/password-field/index.js +2 -2
  91. package/dist/esm/components/form/select-field/index.d.ts +9 -1
  92. package/dist/esm/components/form/select-field/index.d.ts.map +1 -1
  93. package/dist/esm/components/form/select-field/index.js +2 -2
  94. package/dist/esm/components/page-header/index.js +1 -1
  95. package/dist/esm/components/table/id-table-cell.d.ts +5 -1
  96. package/dist/esm/components/table/id-table-cell.d.ts.map +1 -1
  97. package/dist/esm/components/table/id-table-cell.js +48 -3
  98. package/dist/esm/components/ui/autocomplete/index.d.ts +24 -0
  99. package/dist/esm/components/ui/autocomplete/index.d.ts.map +1 -1
  100. package/dist/esm/components/ui/autocomplete/index.js +24 -0
  101. package/dist/esm/components/ui/badge/index.d.ts +11 -7
  102. package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
  103. package/dist/esm/components/ui/badge/index.js +20 -8
  104. package/dist/esm/components/ui/calendar/index.d.ts.map +1 -1
  105. package/dist/esm/components/ui/calendar/index.js +8 -2
  106. package/dist/esm/components/ui/copy-field/index.d.ts.map +1 -1
  107. package/dist/esm/components/ui/copy-field/index.js +1 -1
  108. package/dist/esm/components/ui/file-upload/index.d.ts +235 -9
  109. package/dist/esm/components/ui/file-upload/index.d.ts.map +1 -1
  110. package/dist/esm/components/ui/file-upload/index.js +353 -17
  111. package/dist/esm/components/ui/form.d.ts +4 -0
  112. package/dist/esm/components/ui/form.d.ts.map +1 -1
  113. package/dist/esm/components/ui/form.js +48 -6
  114. package/dist/esm/components/ui/sheet/index.d.ts.map +1 -1
  115. package/dist/esm/components/ui/sheet/index.js +2 -2
  116. package/dist/esm/components/ui/sidebar/index.d.ts +1 -0
  117. package/dist/esm/components/ui/sidebar/index.d.ts.map +1 -1
  118. package/dist/esm/components/ui/sidebar/index.js +1 -0
  119. package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts +1 -1
  120. package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
  121. package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +15 -1
  122. package/dist/esm/components/ui/sidebar/sidebar-item.d.ts +1 -1
  123. package/dist/esm/components/ui/sidebar/sidebar-item.d.ts.map +1 -1
  124. package/dist/esm/components/ui/sidebar/sidebar-item.js +28 -4
  125. package/dist/esm/components/ui/sidebar/sidebar-provider.d.ts +37 -0
  126. package/dist/esm/components/ui/sidebar/sidebar-provider.d.ts.map +1 -1
  127. package/dist/esm/components/ui/sidebar/sidebar-provider.js +122 -1
  128. package/dist/esm/components/ui/sidebar/sidebar-root.d.ts +38 -1
  129. package/dist/esm/components/ui/sidebar/sidebar-root.d.ts.map +1 -1
  130. package/dist/esm/components/ui/sidebar/sidebar-root.js +102 -7
  131. package/dist/esm/components/ui/sidebar/sidebar-trigger.d.ts +18 -0
  132. package/dist/esm/components/ui/sidebar/sidebar-trigger.d.ts.map +1 -0
  133. package/dist/esm/components/ui/sidebar/sidebar-trigger.js +26 -0
  134. package/dist/esm/components/ui/toggle-group/index.d.ts +1 -1
  135. package/dist/esm/components/ui/toggle-group/index.d.ts.map +1 -1
  136. package/dist/esm/components/ui/toggle-group/index.js +73 -4
  137. package/dist/esm/enterprise/number-input/index.d.ts.map +1 -1
  138. package/dist/esm/enterprise/number-input/index.js +1 -1
  139. package/dist/globals.css +77 -31
  140. package/package.json +5 -3
@@ -2,6 +2,10 @@ import { TableCell } from '../../components/ui/table';
2
2
  export type IdTableCellProps = Omit<React.ComponentProps<typeof TableCell>, 'onCopy'> & {
3
3
  id?: string;
4
4
  onCopy?: (id: string) => void;
5
+ /** Characters kept from the start of the id. */
6
+ head?: number;
7
+ /** Characters kept from the end of the id. */
8
+ tail?: number;
5
9
  };
6
- export declare const IdTableCell: ({ id, onCopy, ...others }: IdTableCellProps) => import("react").JSX.Element;
10
+ export declare const IdTableCell: ({ id, onCopy, head, tail, ...others }: IdTableCellProps) => import("react").JSX.Element;
7
11
  //# sourceMappingURL=id-table-cell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"id-table-cell.d.ts","sourceRoot":"","sources":["../../../src/components/table/id-table-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGV,MAAM,uBAAuB,CAAA;AAU9B,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EACtC,QAAQ,CACT,GAAG;IACF,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,2BAA2B,gBAAgB,gCAqBtE,CAAA"}
1
+ {"version":3,"file":"id-table-cell.d.ts","sourceRoot":"","sources":["../../../src/components/table/id-table-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGV,MAAM,uBAAuB,CAAA;AAS9B,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EACtC,QAAQ,CACT,GAAG;IACF,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AA6CD,eAAO,MAAM,WAAW,GAAI,uCAMzB,gBAAgB,gCAiClB,CAAA"}
@@ -1,19 +1,61 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.IdTableCell = void 0;
7
4
  const jsx_runtime_1 = require("react/jsx-runtime");
8
5
  const table_1 = require("../../components/ui/table");
9
6
  const tooltip_1 = require("../../components/ui/tooltip");
10
- const truncate_js_1 = __importDefault(require("lodash/truncate.js"));
11
7
  const lucide_react_1 = require("lucide-react");
12
- const IdTableCell = ({ id, onCopy, ...others }) => {
8
+ /**
9
+ * ⛔ TRUNCATE IN THE MIDDLE, NEVER FROM THE START.
10
+ *
11
+ * This cell renders UUIDs, and a ledger hands out long runs of them from a
12
+ * shared prefix — `00000000-0000-0000-0000-00000000000{1,2,3}`. Keeping the
13
+ * first 13 characters, which is what `truncate(id, { length: 16 })` did,
14
+ * rendered every one of those rows as the same string: the only part that told
15
+ * them apart was the part that was dropped, and the reader had to hover each
16
+ * row in turn to find the one they wanted.
17
+ *
18
+ * Both ends carry information — the head says which family the id belongs to,
19
+ * the tail says which member — so both ends stay.
20
+ */
21
+ const DEFAULT_HEAD = 8;
22
+ const DEFAULT_TAIL = 4;
23
+ /**
24
+ * ⛔ A BAD LENGTH CANNOT THROW HERE. This runs in a render path, so refusing a
25
+ * malformed prop would unmount the whole table rather than one cell — a
26
+ * consumer computing `head` from data gets a broken cell, not a broken screen.
27
+ *
28
+ * `String.slice` reads a negative number as an offset from the END, so a
29
+ * negative `head` kept nearly the entire id and put an ellipsis in the middle
30
+ * of it, and `NaN` read as 0 and dropped the head — the exact failure middle
31
+ * truncation exists to prevent, and one character LONGER than the untruncated
32
+ * id. Clamped to a non-negative whole number; anything non-finite falls back
33
+ * to the default, which a caller passing `NaN` has already bypassed.
34
+ */
35
+ function charCount(value, fallback) {
36
+ return Number.isFinite(value) ? Math.max(0, Math.trunc(value)) : fallback;
37
+ }
38
+ function truncateMiddle(id, head, tail) {
39
+ const start = charCount(head, DEFAULT_HEAD);
40
+ const end = charCount(tail, DEFAULT_TAIL);
41
+ // No ellipsis unless it actually saves characters: at head + tail + 1 the
42
+ // truncation is the same length as the id and hides a character for nothing.
43
+ return id.length <= start + end + 1
44
+ ? id
45
+ : `${id.slice(0, start)}…${id.slice(id.length - end)}`;
46
+ }
47
+ const IdTableCell = ({ id, onCopy, head = DEFAULT_HEAD, tail = DEFAULT_TAIL, ...others }) => {
13
48
  const handleCopyToClipboard = () => {
49
+ // The WHOLE id, never what is rendered. The cell is the only place most
50
+ // consoles expose it, and a truncated id pasted into a query matches
51
+ // nothing.
14
52
  navigator.clipboard.writeText(id);
15
53
  onCopy?.(id);
16
54
  };
17
- return ((0, jsx_runtime_1.jsx)(table_1.TableCell, { onClick: handleCopyToClipboard, ...others, children: (0, jsx_runtime_1.jsxs)(table_1.TableCellWrapper, { children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { delayDuration: 300, children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipTrigger, { children: (0, truncate_js_1.default)(id, { length: 16 }) }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { children: id })] }) }), (0, jsx_runtime_1.jsx)(table_1.TableCellAction, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { className: "size-3.5" }) })] }) }));
55
+ return ((0, jsx_runtime_1.jsx)(table_1.TableCell, { onClick: handleCopyToClipboard,
56
+ // The tooltip is the styled affordance; `title` is the fallback that
57
+ // survives without it — a printed page, a portal that has not mounted,
58
+ // and the cell padding outside the trigger.
59
+ title: id, ...others, children: (0, jsx_runtime_1.jsxs)(table_1.TableCellWrapper, { children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { delayDuration: 300, children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipTrigger, { children: id ? truncateMiddle(id, head, tail) : id }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { children: id })] }) }), (0, jsx_runtime_1.jsx)(table_1.TableCellAction, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { className: "size-3.5" }) })] }) }));
18
60
  };
19
61
  exports.IdTableCell = IdTableCell;
@@ -25,14 +25,29 @@ export type AutocompleteTriggerProps = React.ComponentProps<'div'> & {
25
25
  clearLabel?: string;
26
26
  };
27
27
  export declare function AutocompleteTrigger({ ref, className, onClear, clearLabel, children }: AutocompleteTriggerProps): React.JSX.Element;
28
+ export declare namespace AutocompleteTrigger {
29
+ var displayName: string;
30
+ }
28
31
  export declare function AutocompleteValue({ ref, className, value: valueProp, onValueChange, onBlur, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
32
+ export declare namespace AutocompleteValue {
33
+ var displayName: string;
34
+ }
29
35
  export type AutocompleteMultipleValueProps = React.ComponentProps<typeof CommandPrimitive.Input> & {
30
36
  /** Accessible label for each chip's remove button, prefixed to its value. */
31
37
  clearLabel?: string;
32
38
  };
33
39
  export declare function AutocompleteMultipleValue({ ref, className, clearLabel, ...props }: AutocompleteMultipleValueProps): React.JSX.Element;
40
+ export declare namespace AutocompleteMultipleValue {
41
+ var displayName: string;
42
+ }
34
43
  export declare function AutocompleteEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element | null;
44
+ export declare namespace AutocompleteEmpty {
45
+ var displayName: string;
46
+ }
35
47
  export declare function AutocompleteLoading({ className, ref, ...props }: React.ComponentProps<typeof CommandPrimitive.Loading>): React.JSX.Element;
48
+ export declare namespace AutocompleteLoading {
49
+ var displayName: string;
50
+ }
36
51
  export declare const SIDE_OPTIONS: string[];
37
52
  type Side = (typeof SIDE_OPTIONS)[number];
38
53
  export type AutocompleteContentProps = React.ComponentProps<typeof CommandPrimitive.List> & {
@@ -41,7 +56,13 @@ export type AutocompleteContentProps = React.ComponentProps<typeof CommandPrimit
41
56
  onPointerDownOutside?: (event: MouseEvent | TouchEvent) => void;
42
57
  };
43
58
  export declare function AutocompleteContent({ className, position, side, ref, children, onMouseEnter, onMouseLeave, onPointerDownOutside, ...props }: AutocompleteContentProps): React.JSX.Element;
59
+ export declare namespace AutocompleteContent {
60
+ var displayName: string;
61
+ }
44
62
  export declare function AutocompleteGroup({ className, ...props }: React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>): React.JSX.Element;
63
+ export declare namespace AutocompleteGroup {
64
+ var displayName: string;
65
+ }
45
66
  export type AutocompleteItemProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item> & {
46
67
  /** Text this option reads as wherever it is rendered outside the list (the
47
68
  * input, a chip and its remove button). Required only when the children are
@@ -78,5 +99,8 @@ export type AutocompleteProps = Omit<React.ComponentProps<typeof CommandPrimitiv
78
99
  multiple?: boolean;
79
100
  };
80
101
  export declare function Autocomplete({ ref, value, defaultValue, onValueChange, onClear, className, open: openProp, onOpenChange, showValue, readOnly, disabled, multiple, onKeyDown, children, ...props }: AutocompleteProps): React.JSX.Element;
102
+ export declare namespace Autocomplete {
103
+ var displayName: string;
104
+ }
81
105
  export {};
82
106
  //# sourceMappingURL=index.d.ts.map
@@ -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,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CACnD,CAAA;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AG,KAAK,EACT,EAAE,qBAAqB,qBAsBvB;yBA/Be,gBAAgB;;;AA4ChC;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,EAC7C,OAAO,GAAG,cAAc,GAAG,eAAe,CAC3C,GAAG;IACF,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAChC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAA;IACnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IAEpB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAEtC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,YAAY,CAAC,EAC3B,GAAG,EACH,KAAK,EACL,YAAY,EACZ,aAAa,EACb,OAAO,EACP,SAAS,EACT,IAAI,EAAE,QAAQ,EACd,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAmInB;yBAnJe,YAAY"}
@@ -414,3 +414,27 @@ function Autocomplete({ ref, value, defaultValue, onValueChange, onClear, classN
414
414
  onKeyDown?.(e);
415
415
  }, children: children }) }));
416
416
  }
417
+ /**
418
+ * ⛔ THE REST OF THE SET, FOR THE SAME REASON AS `AutocompleteItem` ABOVE.
419
+ *
420
+ * A function component's `name` is whatever the bundler left it — one letter in
421
+ * a production build — so any lookup written against `child.type` needs an
422
+ * explicit string to compare. `AutocompleteItem` is the only part the walk
423
+ * reads TODAY, and it is the part that shipped an empty option registry to
424
+ * every consumer while it was anonymous. Naming the whole set costs a line each
425
+ * and removes the next instance of that defect before it is written; it also
426
+ * makes these parts legible in a React tree, which `MultipleSelect` next door
427
+ * has always done.
428
+ *
429
+ * `__tests__`-style enumeration lives in `autocomplete.test.tsx`: it reads the
430
+ * module's exports rather than a list, so a new part added without a name fails
431
+ * without anyone remembering to extend anything.
432
+ */
433
+ Autocomplete.displayName = 'Autocomplete';
434
+ AutocompleteTrigger.displayName = 'AutocompleteTrigger';
435
+ AutocompleteValue.displayName = 'AutocompleteValue';
436
+ AutocompleteMultipleValue.displayName = 'AutocompleteMultipleValue';
437
+ AutocompleteContent.displayName = 'AutocompleteContent';
438
+ AutocompleteGroup.displayName = 'AutocompleteGroup';
439
+ AutocompleteEmpty.displayName = 'AutocompleteEmpty';
440
+ AutocompleteLoading.displayName = 'AutocompleteLoading';
@@ -1,12 +1,5 @@
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
- */
10
3
  /**
11
4
  * `gap-1` is load-bearing, not decoration: a badge holding a label AND an
12
5
  * element child (`ID<code>ctx-123</code>`) has nothing between them otherwise —
@@ -14,6 +7,17 @@ import { type VariantProps } from 'class-variance-authority';
14
7
  * anonymous flex item — so the screen reads `IDctx-123`. Consumers were pasting
15
8
  * `className="gap-1"` per call site; `cn` runs tailwind-merge, so an explicit
16
9
  * `gap-2` still wins. Single-child badges are unaffected: gap needs two items.
10
+ *
11
+ * `whitespace-nowrap` keeps the pill a pill. `rounded-full` draws the ends as
12
+ * semicircles sized to ONE line box, so a label that wraps stretches those caps
13
+ * over two lines and the shape reads as a rounded blob, not a token. It bit a
14
+ * consumer table whose column was sized to its content: `min-content` on
15
+ * wrappable text resolves to the WIDEST WORD, so a three-word group name landed
16
+ * at 112px wide and 46px tall against the 26px of a single-line badge. Nowrap
17
+ * also pins `min-content` to the full label, which is what lets a caller cap the
18
+ * box with `max-w-*` plus a truncating child and get an ellipsis. A caller that
19
+ * genuinely wants a wrapping badge passes `whitespace-normal`; tailwind-merge
20
+ * lets it win.
17
21
  */
18
22
  declare const badgeVariants: (props?: ({
19
23
  variant?: "default" | "secondary" | "outline" | "destructive" | "alert" | "success" | "active" | "inactive" | "credit" | "error" | "info" | "purple" | null | undefined;
@@ -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;;;;;;GAMG;AACH;;;;;;;GAOG;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,qBAsBzE;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;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,aAAa;;;8EAqDlB,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,qBAsBzE;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
@@ -6,13 +6,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const class_variance_authority_1 = require("class-variance-authority");
7
7
  const utils_1 = require("../../../lib/utils");
8
8
  const react_slot_1 = require("@radix-ui/react-slot");
9
- /**
10
- * `credit` is the accounting reading of a credit amount, NOT an alias of
11
- * `destructive` (an error/alarm). The credit role is a tint-and-ink pair:
12
- * `--credit-foreground` mirrors `--credit` by contract, so the red carries the
13
- * role as text over a tinted surface. Do not "fix" this into a solid
14
- * `bg-credit` fill — that renders red-on-red and is invisible.
15
- */
16
9
  /**
17
10
  * `gap-1` is load-bearing, not decoration: a badge holding a label AND an
18
11
  * element child (`ID<code>ctx-123</code>`) has nothing between them otherwise —
@@ -20,8 +13,19 @@ const react_slot_1 = require("@radix-ui/react-slot");
20
13
  * anonymous flex item — so the screen reads `IDctx-123`. Consumers were pasting
21
14
  * `className="gap-1"` per call site; `cn` runs tailwind-merge, so an explicit
22
15
  * `gap-2` still wins. Single-child badges are unaffected: gap needs two items.
16
+ *
17
+ * `whitespace-nowrap` keeps the pill a pill. `rounded-full` draws the ends as
18
+ * semicircles sized to ONE line box, so a label that wraps stretches those caps
19
+ * over two lines and the shape reads as a rounded blob, not a token. It bit a
20
+ * consumer table whose column was sized to its content: `min-content` on
21
+ * wrappable text resolves to the WIDEST WORD, so a three-word group name landed
22
+ * at 112px wide and 46px tall against the 26px of a single-line badge. Nowrap
23
+ * also pins `min-content` to the full label, which is what lets a caller cap the
24
+ * box with `max-w-*` plus a truncating child and get an ellipsis. A caller that
25
+ * genuinely wants a wrapping badge passes `whitespace-normal`; tailwind-merge
26
+ * lets it win.
23
27
  */
24
- const badgeVariants = (0, class_variance_authority_1.cva)('inline-flex items-center gap-1 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', {
28
+ const badgeVariants = (0, class_variance_authority_1.cva)('inline-flex items-center gap-1 whitespace-nowrap 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', {
25
29
  variants: {
26
30
  variant: {
27
31
  default: 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
@@ -29,6 +33,14 @@ const badgeVariants = (0, class_variance_authority_1.cva)('inline-flex items-cen
29
33
  inactive: 'bg-muted text-foreground border-muted-foreground/40 py-[2px] px-3',
30
34
  secondary: 'border-transparent bg-muted-foreground text-white dark:text-black',
31
35
  destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
36
+ /**
37
+ * The accounting reading of a credit amount, NOT an alias of
38
+ * `destructive` (an error/alarm). The credit role is a tint-and-ink
39
+ * pair: `--credit-foreground` mirrors `--credit` by contract, so the
40
+ * red carries the role as text over a tinted surface. Do not "fix"
41
+ * this into a solid `bg-credit` fill — that renders red-on-red and is
42
+ * invisible.
43
+ */
32
44
  credit: 'border-credit/30 bg-credit/10 text-credit-foreground px-[10px] py-1',
33
45
  error: 'border-system-error-border bg-system-error-surface text-system-error-text px-[10px] py-1',
34
46
  success: 'border-system-success-border bg-system-success-surface text-system-success-text px-[10px] py-1',
@@ -34,7 +34,12 @@
34
34
  }
35
35
 
36
36
  .button-plain {
37
- @apply bg-transparent text-inherit shadow-none hover:bg-black/5;
37
+ /* The dark counterpart is not optional: black/5 over a dark ground is
38
+ invisible, so the hover affordance simply vanished in dark mode. Same
39
+ /5-light, /10-dark pairing the kit already uses for translucent state
40
+ fills (`ui/field`: `has-data-checked:bg-primary/5
41
+ dark:has-data-checked:bg-primary/10`). */
42
+ @apply bg-transparent text-inherit shadow-none hover:bg-black/5 dark:hover:bg-white/10;
38
43
  }
39
44
 
40
45
  .button-primary {
@@ -63,6 +68,31 @@
63
68
  @apply !text-button-link !h-4 !p-0 !px-0 !py-0 underline shadow-none;
64
69
  }
65
70
 
71
+ /*
72
+ WCAG 2.5.8 (AA) asks a pointer target for 24 by 24 CSS px. This variant pins
73
+ its box at 16, and pins it with `!important` on the height and all three
74
+ padding axes — so unlike an ordinary too-small target, no consumer can
75
+ correct it at the call site. That is what makes it a library defect rather
76
+ than a call-site one; the 16px itself is not new.
77
+
78
+ The hit area grows instead of the box. `.button-base` is already
79
+ `position: relative`, so an inset pseudo-element takes the target to 24px
80
+ tall at zero layout cost: the element's own box, and every line box around
81
+ it, stay at 16. Growing the box was the alternative and it was rejected —
82
+ link buttons sit inside running text, where a taller box reflows the
83
+ sentence, and in table cells and filter bars, where it shifts the row.
84
+
85
+ Horizontal size is left to the label. SC 2.5.8 exempts a target whose size
86
+ is constrained by the line-height of the text around it, and stealing
87
+ horizontal space from adjacent words would take clicks that belong to them.
88
+
89
+ Overridable: Tailwind's `utilities` layer wins over `components`, so a
90
+ consumer that needs the band gone writes `before:inset-y-0`.
91
+ */
92
+ .button-link::before {
93
+ @apply absolute inset-x-0 -inset-y-1 content-[''];
94
+ }
95
+
66
96
  .button-disabled {
67
97
  @apply disabled:pointer-events-none disabled:border-transparent disabled:opacity-50 disabled:shadow-none;
68
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/calendar/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,SAAS,EAET,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAE,MAAM,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AAE,CAAA"}
@@ -45,7 +45,13 @@ const lucide_react_1 = require("lucide-react");
45
45
  function Calendar({ className, classNames, showOutsideDays = true, captionLayout = 'label', buttonVariant = 'plain', formatters, components, ...props }) {
46
46
  const defaultClassNames = (0, react_day_picker_1.getDefaultClassNames)();
47
47
  return ((0, jsx_runtime_1.jsx)(react_day_picker_1.DayPicker, { showOutsideDays: showOutsideDays, className: (0, utils_1.cn)('bg-background group/calendar p-2 [--cell-radius:var(--radius-md)] [--cell-size:34px] [--nav-size:28px] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent', String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: {
48
- formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),
48
+ // react-day-picker's own default is dateLib.format(month, 'LLLL'), the
49
+ // full month name in the locale it was given. Shortening it has to go
50
+ // through the same dateLib: Date.toLocaleString('default') reads the
51
+ // runtime locale instead, so the dropdown fell back to English while
52
+ // the weekdays and the caption around it stayed in the consumer's
53
+ // language. 'LLL' is the abbreviated form of the same standalone month.
54
+ formatMonthDropdown: (month, dateLib = react_day_picker_1.defaultDateLib) => dateLib.format(month, 'LLL'),
49
55
  ...formatters
50
56
  }, classNames: {
51
57
  root: (0, utils_1.cn)('w-fit', defaultClassNames.root),
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/copy-field/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;;;;;;OAUG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAA;AAmCD,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,MAAc,EACd,WAAW,EACX,WAA0B,EAC1B,SAAwB,EACxB,UAA4B,EAC5B,mBAAmB,EACpB,EAAE,cAAc,qBA6JhB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/copy-field/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;;;;;;OAUG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAA;AAmCD,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,KAAK,EACL,MAAc,EACd,WAAW,EACX,WAA0B,EAC1B,SAAwB,EACxB,UAA4B,EAC5B,mBAAmB,EACpB,EAAE,cAAc,qBAkKhB"}
@@ -151,5 +151,5 @@ function CopyField({ value, label, masked = false, onCopyLabel, revealLabel = 'S
151
151
  // long value (e.g. a UUID recovery code) scrolls inside the field
152
152
  // instead of overflowing its container. No `font-mono`: the value
153
153
  // inherits the app sans font (Inter) so it matches every other field.
154
- className: "text-input-foreground h-full min-w-0 flex-1 cursor-text border-none bg-transparent text-sm outline-none select-text focus:ring-0 focus:ring-offset-0" }), masked ? ((0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { type: "button", variant: "outline", size: "small", rounded: true, "aria-pressed": revealed, "aria-label": revealed ? hideLabel : revealLabel, onClick: () => setRevealed((prev) => !prev), children: revealed ? (0, jsx_runtime_1.jsx)(lucide_react_1.EyeOff, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.Eye, {}) })) : null, (0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { type: "button", variant: "outline", size: "small", rounded: true, "aria-label": copyAccessibleName, onClick: handleCopy, children: copied ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, {}) })] })] }));
154
+ className: "text-input-foreground h-full min-w-0 flex-1 cursor-text border-none bg-transparent text-sm outline-none select-text focus:ring-0 focus:ring-offset-0" }), masked ? ((0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { type: "button", variant: "outline", size: "small", rounded: true, "aria-label": revealed ? hideLabel : revealLabel, onClick: () => setRevealed((prev) => !prev), children: revealed ? (0, jsx_runtime_1.jsx)(lucide_react_1.EyeOff, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.Eye, {}) })) : null, (0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { type: "button", variant: "outline", size: "small", rounded: true, "aria-label": copyAccessibleName, onClick: handleCopy, children: copied ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, {}) : (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, {}) })] })] }));
155
155
  }