@lerianstudio/sindarian-ui 1.4.0-beta.8 → 2.0.0-beta.10

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 (196) 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.d.ts.map +1 -1
  4. package/dist/components/card/account-card/index.js +5 -5
  5. package/dist/components/card/basic-card/index.d.ts.map +1 -1
  6. package/dist/components/card/basic-card/index.js +2 -2
  7. package/dist/components/card/entity-card/index.js +4 -4
  8. package/dist/components/dialog/confirmation-dialog/index.d.ts +36 -5
  9. package/dist/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
  10. package/dist/components/dialog/confirmation-dialog/index.js +5 -2
  11. package/dist/components/entity-box/index.d.ts +18 -2
  12. package/dist/components/entity-box/index.d.ts.map +1 -1
  13. package/dist/components/entity-box/index.js +33 -5
  14. package/dist/components/entity-data-table/index.d.ts.map +1 -1
  15. package/dist/components/entity-data-table/index.js +1 -1
  16. package/dist/components/form/file-upload-field/index.d.ts +11 -2
  17. package/dist/components/form/file-upload-field/index.d.ts.map +1 -1
  18. package/dist/components/form/file-upload-field/index.js +8 -3
  19. package/dist/components/form/input-field/index.d.ts +41 -2
  20. package/dist/components/form/input-field/index.d.ts.map +1 -1
  21. package/dist/components/form/input-field/index.js +73 -15
  22. package/dist/components/form/password-field/index.d.ts +5 -1
  23. package/dist/components/form/password-field/index.d.ts.map +1 -1
  24. package/dist/components/form/password-field/index.js +2 -2
  25. package/dist/components/form/select-field/index.d.ts +9 -1
  26. package/dist/components/form/select-field/index.d.ts.map +1 -1
  27. package/dist/components/form/select-field/index.js +2 -2
  28. package/dist/components/page-header/index.d.ts.map +1 -1
  29. package/dist/components/page-header/index.js +2 -2
  30. package/dist/components/table/id-table-cell.d.ts +5 -1
  31. package/dist/components/table/id-table-cell.d.ts.map +1 -1
  32. package/dist/components/table/id-table-cell.js +48 -6
  33. package/dist/components/ui/autocomplete/index.d.ts +58 -6
  34. package/dist/components/ui/autocomplete/index.d.ts.map +1 -1
  35. package/dist/components/ui/autocomplete/index.js +96 -16
  36. package/dist/components/ui/badge/index.d.ts +11 -7
  37. package/dist/components/ui/badge/index.d.ts.map +1 -1
  38. package/dist/components/ui/badge/index.js +31 -9
  39. package/dist/components/ui/button/styles.css +31 -1
  40. package/dist/components/ui/calendar/index.d.ts.map +1 -1
  41. package/dist/components/ui/calendar/index.js +7 -1
  42. package/dist/components/ui/card/index.d.ts.map +1 -1
  43. package/dist/components/ui/card/index.js +1 -1
  44. package/dist/components/ui/copy-field/index.d.ts.map +1 -1
  45. package/dist/components/ui/copy-field/index.js +1 -1
  46. package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -1
  47. package/dist/components/ui/dropdown-menu/index.js +4 -1
  48. package/dist/components/ui/field/index.d.ts.map +1 -1
  49. package/dist/components/ui/field/index.js +5 -2
  50. package/dist/components/ui/file-upload/index.d.ts +235 -9
  51. package/dist/components/ui/file-upload/index.d.ts.map +1 -1
  52. package/dist/components/ui/file-upload/index.js +354 -17
  53. package/dist/components/ui/form.d.ts +4 -0
  54. package/dist/components/ui/form.d.ts.map +1 -1
  55. package/dist/components/ui/form.js +53 -8
  56. package/dist/components/ui/input/styles.css +30 -2
  57. package/dist/components/ui/multiple-select/index.js +2 -2
  58. package/dist/components/ui/progress/index.d.ts +15 -1
  59. package/dist/components/ui/progress/index.d.ts.map +1 -1
  60. package/dist/components/ui/progress/index.js +25 -2
  61. package/dist/components/ui/sheet/index.d.ts.map +1 -1
  62. package/dist/components/ui/sheet/index.js +2 -2
  63. package/dist/components/ui/sidebar/index.d.ts +1 -0
  64. package/dist/components/ui/sidebar/index.d.ts.map +1 -1
  65. package/dist/components/ui/sidebar/index.js +1 -0
  66. package/dist/components/ui/sidebar/sidebar-expand-button.d.ts +1 -1
  67. package/dist/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
  68. package/dist/components/ui/sidebar/sidebar-expand-button.js +32 -2
  69. package/dist/components/ui/sidebar/sidebar-item.d.ts +1 -1
  70. package/dist/components/ui/sidebar/sidebar-item.d.ts.map +1 -1
  71. package/dist/components/ui/sidebar/sidebar-item.js +28 -4
  72. package/dist/components/ui/sidebar/sidebar-provider.d.ts +37 -0
  73. package/dist/components/ui/sidebar/sidebar-provider.d.ts.map +1 -1
  74. package/dist/components/ui/sidebar/sidebar-provider.js +125 -4
  75. package/dist/components/ui/sidebar/sidebar-root.d.ts +38 -1
  76. package/dist/components/ui/sidebar/sidebar-root.d.ts.map +1 -1
  77. package/dist/components/ui/sidebar/sidebar-root.js +100 -5
  78. package/dist/components/ui/sidebar/sidebar-trigger.d.ts +18 -0
  79. package/dist/components/ui/sidebar/sidebar-trigger.d.ts.map +1 -0
  80. package/dist/components/ui/sidebar/sidebar-trigger.js +30 -0
  81. package/dist/components/ui/toggle-group/index.d.ts +1 -1
  82. package/dist/components/ui/toggle-group/index.d.ts.map +1 -1
  83. package/dist/components/ui/toggle-group/index.js +73 -4
  84. package/dist/components/ui/tooltip/index.d.ts +15 -0
  85. package/dist/components/ui/tooltip/index.d.ts.map +1 -1
  86. package/dist/components/ui/tooltip/index.js +16 -1
  87. package/dist/domain/blotter/index.d.ts +4 -2
  88. package/dist/domain/blotter/index.d.ts.map +1 -1
  89. package/dist/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
  90. package/dist/domain/delinquency-aging/aging-buckets.js +8 -3
  91. package/dist/domain/delinquency-aging/index.d.ts.map +1 -1
  92. package/dist/domain/delinquency-aging/index.js +8 -3
  93. package/dist/domain/key-id/index.js +1 -1
  94. package/dist/domain/status-rail/index.js +1 -1
  95. package/dist/domain/threshold-gauge/index.d.ts.map +1 -1
  96. package/dist/domain/threshold-gauge/index.js +9 -5
  97. package/dist/enterprise/stat-card/index.d.ts.map +1 -1
  98. package/dist/enterprise/stat-card/index.js +12 -4
  99. package/dist/esm/components/breadcrumb/index.d.ts.map +1 -1
  100. package/dist/esm/components/breadcrumb/index.js +25 -1
  101. package/dist/esm/components/card/account-card/index.d.ts.map +1 -1
  102. package/dist/esm/components/card/account-card/index.js +5 -5
  103. package/dist/esm/components/card/basic-card/index.d.ts.map +1 -1
  104. package/dist/esm/components/card/basic-card/index.js +2 -2
  105. package/dist/esm/components/card/entity-card/index.js +4 -4
  106. package/dist/esm/components/dialog/confirmation-dialog/index.d.ts +36 -5
  107. package/dist/esm/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
  108. package/dist/esm/components/dialog/confirmation-dialog/index.js +5 -2
  109. package/dist/esm/components/entity-box/index.d.ts +18 -2
  110. package/dist/esm/components/entity-box/index.d.ts.map +1 -1
  111. package/dist/esm/components/entity-box/index.js +30 -5
  112. package/dist/esm/components/entity-data-table/index.d.ts.map +1 -1
  113. package/dist/esm/components/entity-data-table/index.js +1 -1
  114. package/dist/esm/components/form/file-upload-field/index.d.ts +11 -2
  115. package/dist/esm/components/form/file-upload-field/index.d.ts.map +1 -1
  116. package/dist/esm/components/form/file-upload-field/index.js +8 -3
  117. package/dist/esm/components/form/input-field/index.d.ts +41 -2
  118. package/dist/esm/components/form/input-field/index.d.ts.map +1 -1
  119. package/dist/esm/components/form/input-field/index.js +73 -15
  120. package/dist/esm/components/form/password-field/index.d.ts +5 -1
  121. package/dist/esm/components/form/password-field/index.d.ts.map +1 -1
  122. package/dist/esm/components/form/password-field/index.js +2 -2
  123. package/dist/esm/components/form/select-field/index.d.ts +9 -1
  124. package/dist/esm/components/form/select-field/index.d.ts.map +1 -1
  125. package/dist/esm/components/form/select-field/index.js +2 -2
  126. package/dist/esm/components/page-header/index.d.ts.map +1 -1
  127. package/dist/esm/components/page-header/index.js +2 -2
  128. package/dist/esm/components/table/id-table-cell.d.ts +5 -1
  129. package/dist/esm/components/table/id-table-cell.d.ts.map +1 -1
  130. package/dist/esm/components/table/id-table-cell.js +48 -3
  131. package/dist/esm/components/ui/autocomplete/index.d.ts +58 -6
  132. package/dist/esm/components/ui/autocomplete/index.d.ts.map +1 -1
  133. package/dist/esm/components/ui/autocomplete/index.js +96 -16
  134. package/dist/esm/components/ui/badge/index.d.ts +11 -7
  135. package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
  136. package/dist/esm/components/ui/badge/index.js +31 -9
  137. package/dist/esm/components/ui/calendar/index.d.ts.map +1 -1
  138. package/dist/esm/components/ui/calendar/index.js +8 -2
  139. package/dist/esm/components/ui/card/index.d.ts.map +1 -1
  140. package/dist/esm/components/ui/card/index.js +1 -1
  141. package/dist/esm/components/ui/copy-field/index.d.ts.map +1 -1
  142. package/dist/esm/components/ui/copy-field/index.js +1 -1
  143. package/dist/esm/components/ui/dropdown-menu/index.d.ts.map +1 -1
  144. package/dist/esm/components/ui/dropdown-menu/index.js +4 -1
  145. package/dist/esm/components/ui/field/index.d.ts.map +1 -1
  146. package/dist/esm/components/ui/field/index.js +5 -2
  147. package/dist/esm/components/ui/file-upload/index.d.ts +235 -9
  148. package/dist/esm/components/ui/file-upload/index.d.ts.map +1 -1
  149. package/dist/esm/components/ui/file-upload/index.js +353 -17
  150. package/dist/esm/components/ui/form.d.ts +4 -0
  151. package/dist/esm/components/ui/form.d.ts.map +1 -1
  152. package/dist/esm/components/ui/form.js +53 -8
  153. package/dist/esm/components/ui/multiple-select/index.js +2 -2
  154. package/dist/esm/components/ui/progress/index.d.ts +15 -1
  155. package/dist/esm/components/ui/progress/index.d.ts.map +1 -1
  156. package/dist/esm/components/ui/progress/index.js +25 -2
  157. package/dist/esm/components/ui/sheet/index.d.ts.map +1 -1
  158. package/dist/esm/components/ui/sheet/index.js +2 -2
  159. package/dist/esm/components/ui/sidebar/index.d.ts +1 -0
  160. package/dist/esm/components/ui/sidebar/index.d.ts.map +1 -1
  161. package/dist/esm/components/ui/sidebar/index.js +1 -0
  162. package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts +1 -1
  163. package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
  164. package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +32 -2
  165. package/dist/esm/components/ui/sidebar/sidebar-item.d.ts +1 -1
  166. package/dist/esm/components/ui/sidebar/sidebar-item.d.ts.map +1 -1
  167. package/dist/esm/components/ui/sidebar/sidebar-item.js +28 -4
  168. package/dist/esm/components/ui/sidebar/sidebar-provider.d.ts +37 -0
  169. package/dist/esm/components/ui/sidebar/sidebar-provider.d.ts.map +1 -1
  170. package/dist/esm/components/ui/sidebar/sidebar-provider.js +122 -1
  171. package/dist/esm/components/ui/sidebar/sidebar-root.d.ts +38 -1
  172. package/dist/esm/components/ui/sidebar/sidebar-root.d.ts.map +1 -1
  173. package/dist/esm/components/ui/sidebar/sidebar-root.js +102 -7
  174. package/dist/esm/components/ui/sidebar/sidebar-trigger.d.ts +18 -0
  175. package/dist/esm/components/ui/sidebar/sidebar-trigger.d.ts.map +1 -0
  176. package/dist/esm/components/ui/sidebar/sidebar-trigger.js +26 -0
  177. package/dist/esm/components/ui/toggle-group/index.d.ts +1 -1
  178. package/dist/esm/components/ui/toggle-group/index.d.ts.map +1 -1
  179. package/dist/esm/components/ui/toggle-group/index.js +73 -4
  180. package/dist/esm/components/ui/tooltip/index.d.ts +15 -0
  181. package/dist/esm/components/ui/tooltip/index.d.ts.map +1 -1
  182. package/dist/esm/components/ui/tooltip/index.js +16 -1
  183. package/dist/esm/domain/blotter/index.d.ts +4 -2
  184. package/dist/esm/domain/blotter/index.d.ts.map +1 -1
  185. package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
  186. package/dist/esm/domain/delinquency-aging/aging-buckets.js +8 -3
  187. package/dist/esm/domain/delinquency-aging/index.d.ts.map +1 -1
  188. package/dist/esm/domain/delinquency-aging/index.js +8 -3
  189. package/dist/esm/domain/key-id/index.js +1 -1
  190. package/dist/esm/domain/status-rail/index.js +1 -1
  191. package/dist/esm/domain/threshold-gauge/index.d.ts.map +1 -1
  192. package/dist/esm/domain/threshold-gauge/index.js +9 -5
  193. package/dist/esm/enterprise/stat-card/index.d.ts.map +1 -1
  194. package/dist/esm/enterprise/stat-card/index.js +12 -4
  195. package/dist/globals.css +101 -32
  196. package/package.json +5 -3
@@ -6,19 +6,114 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const class_variance_authority_1 = require("class-variance-authority");
7
7
  const sidebar_provider_1 = require("./sidebar-provider");
8
8
  const utils_1 = require("../../../lib/utils");
9
+ const sheet_1 = require("../sheet");
10
+ /**
11
+ * ⛔ THE WIDTHS ARE TOKENS, NOT LITERALS.
12
+ *
13
+ * They were `w-[72px]` and `w-[244px]`, which a consumer could only override by
14
+ * winning a specificity argument with `cn`. `--sidebar-width` and
15
+ * `--sidebar-width-collapsed` are declared in `globals.css`, so the default
16
+ * still ships with the stylesheet, and a consumer re-points either one with
17
+ * `className="[--sidebar-width:280px]"` ON THE RAIL, which moves the rail and
18
+ * the mobile drawer together (see `liftWidthOverrides` below), or with a rule
19
+ * on `:root`/`html`.
20
+ *
21
+ * ⚠️ A DECLARATION ON A REACT-TREE ANCESTOR REACHES THE RAIL AND NOT THE
22
+ * DRAWER. Custom properties inherit down the DOM tree, and the drawer is
23
+ * portalled to `document.body`, so a layout wrapper is not an ancestor of it.
24
+ * `:root` is, which is why it is named above and a wrapper is not.
25
+ */
9
26
  const sidebarVariants = (0, class_variance_authority_1.cva)('group/sidebar shadow-sidebar relative flex flex-col transition-[width] duration-300 ease-in-out', {
10
27
  variants: {
11
28
  collapsed: {
12
- true: 'w-[72px]',
13
- false: 'w-[244px]'
29
+ true: 'w-[var(--sidebar-width-collapsed)]',
30
+ false: 'w-[var(--sidebar-width)]'
14
31
  }
15
32
  },
16
33
  defaultVariants: {
17
34
  collapsed: false
18
35
  }
19
36
  });
20
- const SidebarRoot = ({ className, ...props }) => {
21
- const { isCollapsed } = (0, sidebar_provider_1.useSidebar)();
22
- return ((0, jsx_runtime_1.jsx)("nav", { "data-slot": "sidebar-root", className: (0, utils_1.cn)(sidebarVariants({ collapsed: isCollapsed }), className), "data-collapsed": isCollapsed, ...props }));
37
+ /**
38
+ * Tailwind arbitrary-property classes that re-point the sidebar geometry, e.g.
39
+ * `[--sidebar-width:320px]` or `[--sidebar-width-collapsed:88px]`.
40
+ *
41
+ * ⚠️ ANCHORED TO A CLASS BOUNDARY, WHICH IS THE WHOLE POINT OF THE LOOKBEHIND.
42
+ * Unanchored it also matched the tail of `md:[--sidebar-width:320px]` and
43
+ * lifted it with the prefix stripped — an override a consumer scoped to
44
+ * ≥768px, applied unconditionally to the drawer that only exists below it.
45
+ */
46
+ const WIDTH_OVERRIDE = /(?<=^|\s)\[--sidebar-width(?:-collapsed)?:[^\]]+\]/g;
47
+ /**
48
+ * ⛔ THE ONE PART OF THE CONSUMER'S className THAT HAS TO CROSS THE PORTAL.
49
+ *
50
+ * `SheetContent` mounts through `SheetPortal` into `document.body`, and custom
51
+ * properties inherit down the DOM tree rather than the React tree. So the
52
+ * documented override — a class on the rail — set `--sidebar-width` on an
53
+ * element the drawer is not a descendant of, and the whole className that DOES
54
+ * travel lands on the inner `<nav>`, which is BELOW the element that reads the
55
+ * variable. Measured in Chromium: rail 320px, drawer 244px. Following the
56
+ * instruction handed to product-console produced a 280px rail on desktop and a
57
+ * 244px drawer on a phone, silently.
58
+ *
59
+ * ⚠️ ONLY THE GEOMETRY TOKENS. The rest of a rail className is rail-shaped —
60
+ * `h-full`, and the `data-[collapsed=false]:min-w-70` all eight console
61
+ * sidebars pass — and putting that on the sheet would reinstate the
62
+ * 280px-inside-a-244px-sheet overflow from the other side.
63
+ */
64
+ function liftWidthOverrides(className) {
65
+ return className?.match(WIDTH_OVERRIDE)?.join(' ');
66
+ }
67
+ /**
68
+ * ⛔ BELOW 768px A RAIL IS NOT A LAYOUT — once a consumer opts in.
69
+ *
70
+ * The widths above are a fixed share of a flex row, so at 390px the expanded
71
+ * rail took 63% of the screen and left the page 146px, and the only affordance
72
+ * — `SidebarExpandButton` — shrinks it to 72px, which is still 18% and still
73
+ * permanently on screen. There was nothing that removed it.
74
+ *
75
+ * With `mobile="drawer"` the rail is replaced below the breakpoint by an
76
+ * overlay drawer. Escape, the backdrop click, the focus trap and returning
77
+ * focus to whatever opened it are Radix Dialog's, through the kit's own
78
+ * `Sheet`; none of that is re-implemented here.
79
+ */
80
+ const SidebarRoot = ({ className, id, mobile = 'inline', mobileTitle = 'Navigation', ...props }) => {
81
+ const context = (0, sidebar_provider_1.useSidebar)();
82
+ const { isCollapsed, isMobile, openMobile, setOpenMobile, restoreDrawerFocus, sidebarId } = context;
83
+ if (!isMobile || mobile === 'inline') {
84
+ return ((0, jsx_runtime_1.jsx)("nav", { "data-slot": "sidebar-root", className: (0, utils_1.cn)(sidebarVariants({ collapsed: isCollapsed }), className), "data-collapsed": isCollapsed, ...props, id: mobile === 'drawer' ? sidebarId : id }));
85
+ }
86
+ return ((0, jsx_runtime_1.jsx)(sidebar_provider_1.SidebarContext.Provider, { value: { ...context, isCollapsed: false, isDrawer: true }, children: (0, jsx_runtime_1.jsx)(sheet_1.Sheet, { open: openMobile, onOpenChange: setOpenMobile, children: (0, jsx_runtime_1.jsxs)(sheet_1.SheetContent, { side: "left",
87
+ // The Sheet's own paddings are built for a form panel; a rail brings
88
+ // its own. `max-w-full` so a consumer widening `--sidebar-width` past
89
+ // the viewport still cannot push the drawer off screen. The lifted
90
+ // override goes LAST so it re-points the variable this element reads.
91
+ className: (0, utils_1.cn)('w-[var(--sidebar-width)] max-w-full gap-0 p-0', liftWidthOverrides(className)), "aria-describedby": undefined,
92
+ // ⛔ RADIX'S OWN RESTORE GOES NOWHERE HERE. `DialogContent`
93
+ // preventDefaults the focus scope's restore and focuses the ref a
94
+ // `SheetTrigger` would have filled; this drawer is opened from provider
95
+ // state, so that ref is null and closing dropped focus onto `<body>`.
96
+ // Running first means `composeEventHandlers` skips Radix's half.
97
+ onCloseAutoFocus: (event) => {
98
+ event.preventDefault();
99
+ restoreDrawerFocus();
100
+ }, children: [(0, jsx_runtime_1.jsx)(sheet_1.SheetTitle, { className: "sr-only", children: mobileTitle }), (0, jsx_runtime_1.jsx)("nav", { "data-slot": "sidebar-root", "data-mobile": "true",
101
+ /* ⛔ NO `data-collapsed` HERE. The consumer className is forwarded
102
+ verbatim, and all eight console sidebars pass
103
+ `data-[collapsed=false]:min-w-70`; stamping the attribute armed
104
+ it, giving the navigation a 280px min-width inside a 244px sheet.
105
+ `min-width` resolves after `max-width`, so the sheet could not
106
+ claw it back and the contents were 36px wider than the drawer.
107
+ `data-mobile` already names this surface and a drawer is never
108
+ collapsed, so the attribute had nothing left to say. */
109
+ className: (0, utils_1.cn)(sidebarVariants({ collapsed: false }), 'h-full w-full shadow-none', className), ...props,
110
+ /* ⛔ AFTER THE SPREAD, AND NOT THE CALLER'S. This is the target of
111
+ `SidebarTrigger`'s `aria-controls` and the handle the provider
112
+ uses to put focus back into the navigation when the viewport
113
+ grows. Spread first, a caller that set `id` replaced it and left
114
+ a dangling `aria-controls` — which axe reports as a CRITICAL
115
+ `aria-valid-attr-value` — and a focus restore that lands on
116
+ `<body>`. Both silent. */
117
+ id: sidebarId })] }) }) }));
23
118
  };
24
119
  exports.SidebarRoot = SidebarRoot;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { IconButton } from '../icon-button';
3
+ export type SidebarTriggerProps = React.ComponentProps<typeof IconButton>;
4
+ /**
5
+ * The control that opens the mobile drawer.
6
+ *
7
+ * `md:hidden` by default because above 768px the rail is already on screen and
8
+ * a second way to reach it is a second thing to explain; a consumer that wants
9
+ * it everywhere passes its own display class.
10
+ *
11
+ * ⚠️ `aria-controls` IS SET ONLY WHILE THE DRAWER EXISTS. Radix unmounts the
12
+ * dialog content when closed, and a reference to an element that is not in the
13
+ * DOM is what axe-core reports as a CRITICAL `aria-valid-attr-value` — the same
14
+ * defect the Autocomplete panel was repaired for (console-sdk#150). A toggle
15
+ * with `aria-expanded="false"` and no `aria-controls` is complete on its own.
16
+ */
17
+ export declare const SidebarTrigger: ({ className, onClick, "aria-label": ariaLabel, ...props }: SidebarTriggerProps) => React.JSX.Element;
18
+ //# sourceMappingURL=sidebar-trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-trigger.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/sidebar/sidebar-trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAG3C,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAA;AAEzE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,GAAI,2DAK5B,mBAAmB,sBAqBrB,CAAA"}
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SidebarTrigger = void 0;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const lucide_react_1 = require("lucide-react");
7
+ const utils_1 = require("../../../lib/utils");
8
+ const icon_button_1 = require("../icon-button");
9
+ const sidebar_provider_1 = require("./sidebar-provider");
10
+ /**
11
+ * The control that opens the mobile drawer.
12
+ *
13
+ * `md:hidden` by default because above 768px the rail is already on screen and
14
+ * a second way to reach it is a second thing to explain; a consumer that wants
15
+ * it everywhere passes its own display class.
16
+ *
17
+ * ⚠️ `aria-controls` IS SET ONLY WHILE THE DRAWER EXISTS. Radix unmounts the
18
+ * dialog content when closed, and a reference to an element that is not in the
19
+ * DOM is what axe-core reports as a CRITICAL `aria-valid-attr-value` — the same
20
+ * defect the Autocomplete panel was repaired for (console-sdk#150). A toggle
21
+ * with `aria-expanded="false"` and no `aria-controls` is complete on its own.
22
+ */
23
+ const SidebarTrigger = ({ className, onClick, 'aria-label': ariaLabel = 'Open navigation', ...props }) => {
24
+ const { openMobile, setOpenMobile, sidebarId } = (0, sidebar_provider_1.useSidebar)();
25
+ return ((0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { type: "button", variant: "outline", "data-slot": "sidebar-trigger", "aria-label": ariaLabel, "aria-expanded": openMobile, "aria-controls": openMobile ? sidebarId : undefined, className: (0, utils_1.cn)('md:hidden', className), onClick: (event) => {
26
+ onClick?.(event);
27
+ setOpenMobile(!openMobile);
28
+ }, ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Menu, { "aria-hidden": true }) }));
29
+ };
30
+ exports.SidebarTrigger = SidebarTrigger;
@@ -13,6 +13,6 @@ declare const toggleVariants: (props?: ({
13
13
  declare function ToggleGroup({ className, variant, size, spacing, children, style, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & {
14
14
  spacing?: number;
15
15
  }): React.JSX.Element;
16
- declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): React.JSX.Element;
16
+ declare function ToggleGroupItem({ className, children, variant, size, onFocus, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): React.JSX.Element;
17
17
  export { ToggleGroup, ToggleGroupItem };
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/toggle-group/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AACpE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE;;;;GAIG;AACH,QAAA,MAAM,cAAc;;;8EAoBnB,CAAA;AAYD,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAW,EACX,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACvD,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,qBAwBF;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACvD,YAAY,CAAC,OAAO,cAAc,CAAC,qBAuBpC;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/toggle-group/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AACpE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE;;;;GAIG;AACH,QAAA,MAAM,cAAc;;;8EAoBnB,CAAA;AA4DD,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAW,EACX,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACvD,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,qBA+BF;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GACvD,YAAY,CAAC,OAAO,cAAc,CAAC,qBAiDpC;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAA"}
@@ -63,12 +63,58 @@ const toggleVariants = (0, class_variance_authority_1.cva)("hover:bg-muted hover
63
63
  size: 'default'
64
64
  }
65
65
  });
66
+ const ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];
67
+ /**
68
+ * Is an arrow key down right now?
69
+ *
70
+ * This is how an item tells keyboard navigation apart from a pointer press or a
71
+ * programmatic focus, and it is the seam Radix uses for the same job in its own
72
+ * `RadioGroup`. It works because `RovingFocusGroup` defers the focus move to a
73
+ * `setTimeout`: the keydown has already bubbled to `document` and set the flag
74
+ * by the time the item receives `focus`.
75
+ *
76
+ * The distinction is not cosmetic. A pointer press focuses BEFORE the click
77
+ * lands, so selecting on every focus would turn one click into
78
+ * select-then-deselect and break mouse selection outright.
79
+ *
80
+ * Returns null when disabled, so `type="multiple"` carries no flag to read.
81
+ */
82
+ function useArrowKeyPressed(enabled) {
83
+ const arrowKeyPressed = React.useRef(false);
84
+ React.useEffect(() => {
85
+ if (!enabled)
86
+ return;
87
+ const onKeyDown = (event) => {
88
+ if (ARROW_KEYS.includes(event.key))
89
+ arrowKeyPressed.current = true;
90
+ };
91
+ const onKeyUp = () => {
92
+ arrowKeyPressed.current = false;
93
+ };
94
+ document.addEventListener('keydown', onKeyDown);
95
+ document.addEventListener('keyup', onKeyUp);
96
+ window.addEventListener('blur', onKeyUp);
97
+ return () => {
98
+ document.removeEventListener('keydown', onKeyDown);
99
+ document.removeEventListener('keyup', onKeyUp);
100
+ window.removeEventListener('blur', onKeyUp);
101
+ // A group unmounted mid-keystroke never sees the keyup.
102
+ arrowKeyPressed.current = false;
103
+ };
104
+ }, [enabled]);
105
+ return enabled ? arrowKeyPressed : null;
106
+ }
66
107
  const ToggleGroupContext = React.createContext({
67
108
  size: 'default',
68
109
  variant: 'default',
69
- spacing: 0
110
+ spacing: 0,
111
+ arrowKeyPressed: null
70
112
  });
71
113
  function ToggleGroup({ className, variant, size, spacing = 0, children, style, ...props }) {
114
+ // Read, never destructured: `type` is the discriminant of the Radix props
115
+ // union, and pulling it out then spreading it back widens the union so the
116
+ // single/multiple props stop resolving.
117
+ const arrowKeyPressed = useArrowKeyPressed(props.type === 'single');
72
118
  return ((0, jsx_runtime_1.jsx)(ToggleGroupPrimitive.Root, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing,
73
119
  // Caller style first: `--gap` is ours and must survive, but everything
74
120
  // else the caller passes has to reach the element.
@@ -76,12 +122,35 @@ function ToggleGroup({ className, variant, size, spacing = 0, children, style, .
76
122
  // Legacy carried a `data-[spacing=default]:...:shadow-xs` rule here that
77
123
  // never matched — `data-spacing` is always a number. Removed rather than
78
124
  // activated, so the rendered pixels stay identical to sindarian-x.
79
- 'group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md', className), ...props, children: (0, jsx_runtime_1.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children: children }) }));
125
+ 'group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md', className), ...props, children: (0, jsx_runtime_1.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing, arrowKeyPressed }, children: children }) }));
80
126
  }
81
- function ToggleGroupItem({ className, children, variant, size, ...props }) {
127
+ function ToggleGroupItem({ className, children, variant, size, onFocus, ...props }) {
82
128
  const context = React.useContext(ToggleGroupContext);
129
+ /**
130
+ * Selection follows focus, which is what `role="radio"` promises.
131
+ *
132
+ * With `type="single"` Radix puts the group on the ARIA radio pattern: the
133
+ * root is a `radiogroup`, each item a `radio` with `aria-checked`. Under that
134
+ * pattern an arrow key both moves focus and checks the item it lands on.
135
+ * Radix only moves focus, so a screen-reader operator used to arrow across
136
+ * "radio, not checked, 2 of 3" with nothing ever selected.
137
+ *
138
+ * `type="multiple"` is a `toolbar` of `aria-pressed` buttons and keeps its
139
+ * current behavior, where moving focus without pressing is correct: the flag
140
+ * is null there.
141
+ *
142
+ * Clicking the element rather than writing the value keeps a single
143
+ * activation path, so Radix's own toggle and any caller `onClick` both fire
144
+ * exactly as they do for a real click.
145
+ */
146
+ const handleFocus = (event) => {
147
+ onFocus?.(event);
148
+ if (context.arrowKeyPressed?.current) {
149
+ event.currentTarget.click();
150
+ }
151
+ };
83
152
  return ((0, jsx_runtime_1.jsx)(ToggleGroupPrimitive.Item, { "data-slot": "toggle-group-item", "data-variant": context.variant || variant, "data-size": context.size || size, "data-spacing": context.spacing, className: (0, utils_1.cn)(toggleVariants({
84
153
  variant: context.variant || variant,
85
154
  size: context.size || size
86
- }), 'w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10', 'data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l', className), ...props, children: children }));
155
+ }), 'w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10', 'data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l', className), ...props, onFocus: handleFocus, children: children }));
87
156
  }
@@ -6,6 +6,21 @@ export type TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root> &
6
6
  };
7
7
  declare function Tooltip({ open: _open, onOpenChange, disabled, ...props }: TooltipProps): React.JSX.Element;
8
8
  declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
9
+ /**
10
+ * The fill is a RAW palette step, not a theme token: `--color-shadcn-600` is a
11
+ * flat hex, so an inverted tooltip stays #27272A under both themes. The ink has
12
+ * to be theme-fixed too, which rules out `--primary-foreground` and
13
+ * `--background`: both invert, and both land on 1.00:1 against this fill in
14
+ * dark.
15
+ *
16
+ * base/400 was not unreadable here (5.81:1 on this fill; the 2.56:1 figure that
17
+ * class earns elsewhere is against a LIGHT ground, which this is not). It moved
18
+ * one step to base/300 because base/400 is banned kit-wide in
19
+ * `__tests__/ink-classes.test.ts`: its only safe ground is a fixed-dark fill,
20
+ * and that narrow exception had already leaked into eight slots that were not
21
+ * one. base/300 reads 10.08:1 here, and keeps this line quieter than the
22
+ * `text-white` a consumer puts beside it (`page-header/index.tsx:226`).
23
+ */
9
24
  declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element;
10
25
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
11
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,eAAe,CAAC,EACvB,aAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,qBAQxD;AAED,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,CAC7C,OAAO,gBAAgB,CAAC,IAAI,CAC7B,GAAG;IACF,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,iBAAS,OAAO,CAAC,EACf,IAAI,EAAE,KAAK,EACX,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,YAAY,qBAwBd;AAED,iBAAS,cAAc,CAAC,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,qBAEvD;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,UAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,qBAiBvD;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,eAAe,CAAC,EACvB,aAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,qBAQxD;AAED,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,CAC7C,OAAO,gBAAgB,CAAC,IAAI,CAC7B,GAAG;IACF,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,iBAAS,OAAO,CAAC,EACf,IAAI,EAAE,KAAK,EACX,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,YAAY,qBAwBd;AAED,iBAAS,cAAc,CAAC,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,qBAEvD;AAED;;;;;;;;;;;;;;GAcG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,UAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,qBAiBvD;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
@@ -61,6 +61,21 @@ function Tooltip({ open: _open, onOpenChange, disabled, ...props }) {
61
61
  function TooltipTrigger({ ...props }) {
62
62
  return (0, jsx_runtime_1.jsx)(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
63
63
  }
64
+ /**
65
+ * The fill is a RAW palette step, not a theme token: `--color-shadcn-600` is a
66
+ * flat hex, so an inverted tooltip stays #27272A under both themes. The ink has
67
+ * to be theme-fixed too, which rules out `--primary-foreground` and
68
+ * `--background`: both invert, and both land on 1.00:1 against this fill in
69
+ * dark.
70
+ *
71
+ * base/400 was not unreadable here (5.81:1 on this fill; the 2.56:1 figure that
72
+ * class earns elsewhere is against a LIGHT ground, which this is not). It moved
73
+ * one step to base/300 because base/400 is banned kit-wide in
74
+ * `__tests__/ink-classes.test.ts`: its only safe ground is a fixed-dark fill,
75
+ * and that narrow exception had already leaked into eight slots that were not
76
+ * one. base/300 reads 10.08:1 here, and keeps this line quieter than the
77
+ * `text-white` a consumer puts beside it (`page-header/index.tsx:226`).
78
+ */
64
79
  function TooltipContent({ className, sideOffset = 0, children, ...props }) {
65
- return ((0, jsx_runtime_1.jsx)(TooltipPrimitive.Portal, { children: (0, jsx_runtime_1.jsxs)(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: (0, utils_1.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, (0, jsx_runtime_1.jsx)(TooltipPrimitive.Arrow, { className: "bg-shadcn-600 fill-shadcn-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })] }) }));
80
+ return ((0, jsx_runtime_1.jsx)(TooltipPrimitive.Portal, { children: (0, jsx_runtime_1.jsxs)(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: (0, utils_1.cn)('bg-shadcn-600 text-shadcn-300 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, (0, jsx_runtime_1.jsx)(TooltipPrimitive.Arrow, { className: "bg-shadcn-600 fill-shadcn-600 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })] }) }));
66
81
  }
@@ -5,8 +5,10 @@
5
5
  * — no zebra fills. Each row: a quiet sentence-case sans label on the left, a mono
6
6
  * `tabular-nums` value on the right, `hover:bg-body-surface` as the quiet row
7
7
  * affordance (the recessed page surface, one step behind `bg-card`, in both
8
- * themes). Escalate the value color (`text-credit`, `text-system-alert`) only
9
- * when a metric crosses a threshold.
8
+ * themes). Escalate the value color (`text-credit`, `text-system-alert-h1a`)
9
+ * only when a metric crosses a threshold — the INK tokens, never the bare
10
+ * `text-system-*` fills, which are picked to carry white and read as low as
11
+ * 1.78:1 on this surface in light.
10
12
  *
11
13
  * <Blotter>
12
14
  * <BlotterRow label="Resolved on time" value="128" />
@@ -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;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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/blotter/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;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"}
@@ -1 +1 @@
1
- {"version":3,"file":"aging-buckets.d.ts","sourceRoot":"","sources":["../../../src/domain/delinquency-aging/aging-buckets.tsx"],"names":[],"mappings":"AAyCA,MAAM,WAAW,WAAW;IAC1B,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AAElE;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAA;IAC1C,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,iFAAiF;IACjF,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oEAAoE;IACpE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,yEAAyE;IACzE,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B;oFACgF;IAChF,WAAW,CAAC,EAAE,SAAS,GAAG,KAAK,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA2BD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAMlE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,EAAE,EACtB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,IAAI,CAMf;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAiB,EACjB,MAAM,EACN,WAAuB,EACvB,SAAS,EACV,EAAE,iBAAiB,+BAkHnB"}
1
+ {"version":3,"file":"aging-buckets.d.ts","sourceRoot":"","sources":["../../../src/domain/delinquency-aging/aging-buckets.tsx"],"names":[],"mappings":"AAyCA,MAAM,WAAW,WAAW;IAC1B,iEAAiE;IACjE,KAAK,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V,EAAE,iBAAiB,+BAkHnB"}
@@ -43,11 +43,16 @@ const money_math_1 = require("../money-math");
43
43
  const money_text_1 = require("../money-text");
44
44
  /** Band → glyph + tint + accessible word. The glyph (and the sr-only word) is
45
45
  * the load-bearing severity cue; the tint only reinforces it, so the
46
- * escalation survives grayscale and color-vision deficiency. */
46
+ * escalation survives grayscale and color-vision deficiency.
47
+ *
48
+ * The tint is an INK token (`-h1a`). A load-bearing glyph answers to the 3:1
49
+ * floor of SC 1.4.11, and the bare fill token `--system-alert` reads 1.78:1 on
50
+ * `--card` and 1.62:1 on `--body-surface` in light — the cue was invisible on
51
+ * the row it escalates. */
47
52
  const BAND = {
48
53
  current: {
49
54
  Icon: lucide_react_1.CircleDot,
50
- tint: 'text-system-success',
55
+ tint: 'text-system-success-h1a',
51
56
  word: 'Em dia'
52
57
  },
53
58
  recent: {
@@ -57,7 +62,7 @@ const BAND = {
57
62
  },
58
63
  aging: {
59
64
  Icon: lucide_react_1.AlertTriangle,
60
- tint: 'text-system-alert',
65
+ tint: 'text-system-alert-h1a',
61
66
  word: 'Em atraso'
62
67
  },
63
68
  overdue: { Icon: lucide_react_1.AlertOctagon, tint: 'text-credit', word: 'Vencido' }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/delinquency-aging/index.tsx"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAKtE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAOpE;;wEAEwE;AACxE,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;oEACoE;AACpE,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,IAAI,EAAE,MAAM,GAAG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AAC,EAAE,MAAM,CAAA;IAC3B;;oBAEgB;IAChB,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC;;;mDAG+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;yEACqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,SAAS,GAAG,KAAK,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAA2B,EAC3B,cAAc,EACd,UAA2B,EAC3B,kBAAoC,EACpC,YAAY,EACZ,IAAW,EACX,MAAY,EACZ,SAAiB,EACjB,WAAuB,EACvB,SAAS,EACV,EAAE,qBAAqB,+BA6EvB"}
@@ -182,10 +182,15 @@ function exactBand(overdue, total, warn, breach) {
182
182
  /** Band → glyph + tint + accessible word. The glyph and sr-only word are the
183
183
  * load-bearing cue; the tint only reinforces, so the band survives grayscale
184
184
  * and color-vision deficiency. Mirrors the gauge's three-band canon, renamed
185
- * to the delinquency vocabulary. */
185
+ * to the delinquency vocabulary.
186
+ *
187
+ * The tint is an INK token (`-h1a`), because it is painted on the `Figure`
188
+ * below as well as on the glyph. The bare fill tokens read 1.78:1
189
+ * (`--system-alert`) and 3.35:1 (`--system-success`) on every light surface in
190
+ * the kit — the alert one under even the 3:1 floor a glyph answers to. */
186
191
  const RATE_BAND = {
187
- low: { Icon: lucide_react_1.ShieldCheck, tint: 'text-system-success', word: 'Saudável' },
188
- warn: { Icon: lucide_react_1.TriangleAlert, tint: 'text-system-alert', word: 'Elevada' },
192
+ low: { Icon: lucide_react_1.ShieldCheck, tint: 'text-system-success-h1a', word: 'Saudável' },
193
+ warn: { Icon: lucide_react_1.TriangleAlert, tint: 'text-system-alert-h1a', word: 'Elevada' },
189
194
  breach: { Icon: lucide_react_1.AlertOctagon, tint: 'text-credit', word: 'Em estresse' }
190
195
  };
191
196
  function DelinquencyAging({ buckets, currency, locale, rateLabel = 'Inadimplência', rateBandLabels, emptyLabel = 'sem carteira', indeterminateLabel = 'indeterminada', bucketLabels, warn = 0.05, breach = 0.1, showTotal = false, healthyTone = 'success', className }) {
@@ -170,5 +170,5 @@ function CopyValue({ value }) {
170
170
  setCopied(false);
171
171
  });
172
172
  };
173
- return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: copy, "aria-label": copied ? 'Copiado para a área de transferência' : 'Copiar valor', className: "text-muted-foreground hover:text-foreground focus:ring-ring inline-flex size-5 shrink-0 items-center justify-center rounded-sm transition-colors duration-150 ease-out focus:ring-2 focus:outline-none", children: copied ? ((0, jsx_runtime_1.jsx)(lucide_react_1.Check, { "aria-hidden": true, className: "text-system-success size-3" })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { "aria-hidden": true, className: "size-3" })) }));
173
+ return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: copy, "aria-label": copied ? 'Copiado para a área de transferência' : 'Copiar valor', className: "text-muted-foreground hover:text-foreground focus:ring-ring inline-flex size-5 shrink-0 items-center justify-center rounded-sm transition-colors duration-150 ease-out focus:ring-2 focus:outline-none", children: copied ? ((0, jsx_runtime_1.jsx)(lucide_react_1.Check, { "aria-hidden": true, className: "text-system-success-h1a size-3" })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { "aria-hidden": true, className: "size-3" })) }));
174
174
  }
@@ -50,7 +50,7 @@ function StatusRail({ lead, items = [], chips = [], className }) {
50
50
  // Tiny mono token: raised a hair off the sunken tape by the
51
51
  // card surface + whisper shadow.
52
52
  'inline-flex items-center gap-1 rounded-sm border px-1.5 py-0.5 shadow-sm', chip.alarm
53
- ? 'border-destructive/40 bg-destructive/10 text-destructive'
53
+ ? 'border-destructive/40 bg-destructive/10 text-system-error-h1a'
54
54
  : 'border-border bg-card text-foreground'), children: [chip.alarm ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(lucide_react_1.TriangleAlert, { "aria-hidden": true, className: "size-3" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "(alarme)" })] })) : null, chip.value] })] }, chip.id ?? i))) })) : null] }));
55
55
  }
56
56
  /** A tape item preceded by a separator dot when it is not the first token. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/threshold-gauge/index.tsx"],"names":[],"mappings":"AAiDA,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEjD;gFACgF;AAChF,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,gBAAgB,CAAA;AAEjE;;gDAEgD;AAChD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE;;;;wEAIwE;AACxE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,CAAA;AAE/C,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAA;IACd,8EAA8E;IAC9E,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC;oEACgE;IAChE,KAAK,EAAE,MAAM,CAAA;IACb;;;;iDAI6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0CAA0C;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,wBAAwB;IACxB,GAAG,EAAE,MAAM,CAAA;IACX,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,kEAAkE;IAClE,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,qEAAqE;IACrE,SAAS,EAAE,cAAc,CAAA;IACzB,qDAAq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EAAE,mBAAmB,+BA8ErB"}
@@ -55,22 +55,26 @@ const money_text_1 = require("../money-text");
55
55
  const BAND = {
56
56
  low: {
57
57
  Icon: lucide_react_1.ShieldCheck,
58
- tint: 'text-system-success',
58
+ tint: 'text-system-success-h1a',
59
59
  word: 'Dentro do limite'
60
60
  },
61
61
  warn: {
62
62
  Icon: lucide_react_1.TriangleAlert,
63
- tint: 'text-system-alert',
63
+ tint: 'text-system-alert-h1a',
64
64
  word: 'Próximo do limite'
65
65
  },
66
66
  breach: {
67
67
  Icon: lucide_react_1.OctagonX,
68
- tint: 'text-destructive',
68
+ tint: 'text-system-error-h1a',
69
69
  word: 'Limite ultrapassado'
70
70
  }
71
71
  };
72
- /** Track fill tint per band — kept distinct from the glyph tint so the bar can
73
- * use the softer wash while the glyph carries the full tint. */
72
+ /** Track fill tint per band, and the reason it is a SEPARATE map from the
73
+ * tint above: these are the fill tokens, and a fill answers to no text floor.
74
+ * The tint above is painted on the band glyph AND on the `Figure`, so it has
75
+ * to be the ink family. Light `--system-alert` is #EAB308, about 1.9:1 on
76
+ * white, and `--system-success` about 3.3:1 — both were readable only as a
77
+ * bar wash, never as the number the reader is here to read. */
74
78
  const BAND_FILL = {
75
79
  low: 'bg-system-success',
76
80
  warn: 'bg-system-alert',
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/stat-card/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAA;AAoB5E,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAA;I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,MAAM,GAAG,IAAI,CAAC,CAAC,CAAA;IAC7D,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yCAAyC;IACzC,IAAI,CAAC,EAAE,WAAW,EAAE,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAwED,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAgB,EAChB,KAAK,EACL,QAAkB,EAClB,IAAI,EACJ,SAAS,EACV,EAAE,aAAa,+BAgCf"}
@@ -8,12 +8,20 @@ const ledger_sheet_1 = require("../../domain/ledger-sheet");
8
8
  const section_label_1 = require("../../domain/section-label");
9
9
  const utils_1 = require("../../lib/utils");
10
10
  /** Value/delta color per tone. `default` keeps the high-contrast foreground;
11
- * the rest escalate to a semantic theme token that tracks light/dark. */
11
+ * the rest escalate to a semantic theme token that tracks light/dark.
12
+ *
13
+ * All three escalations read the `-h1a` family, not a mix of `-h1a` and
14
+ * `-text`. `--system-*-text` is the ink of a tinted PILL, measured against its
15
+ * own surface; this card paints on the panel, and `-h1a` is the family gated
16
+ * against `--card` and `--background` in `__tests__/tokens-contract.test.ts`.
17
+ * The two differ by one palette step in dark, so a mixed table gave the three
18
+ * deltas three different weights on the same surface for no reason a reader
19
+ * could see. */
12
20
  const TONE_VALUE = {
13
21
  default: 'text-foreground',
14
- success: 'text-system-success-text',
15
- warning: 'text-system-alert-text',
16
- destructive: 'text-destructive'
22
+ success: 'text-system-success-h1a',
23
+ warning: 'text-system-alert-h1a',
24
+ destructive: 'text-system-error-h1a'
17
25
  };
18
26
  /** Trend stroke color per tone. Resolved through the `--color-*` wrappers (the
19
27
  * raw `--chart-N` tokens are bare HSL triples, not usable colors). */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/breadcrumb/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,cAAc,EAAE,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,WAAW,eAAe,sBAoBpD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/breadcrumb/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,cAAc,EAAE,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,WAAW,eAAe,sBAmDpD,CAAA"}
@@ -2,5 +2,29 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { Breadcrumb as BaseBreadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from '../../components/ui/breadcrumb/index.js';
4
4
  export const Breadcrumb = ({ paths }) => {
5
- return (_jsx(BaseBreadcrumb, { children: _jsx(BreadcrumbList, { children: paths.map((path, index) => (_jsxs(React.Fragment, { children: [_jsx(BreadcrumbItem, { children: path.href ? (_jsx(BreadcrumbLink, { href: path.href, children: path.name })) : (_jsx(BreadcrumbPage, { children: path.name })) }), _jsx(BreadcrumbSeparator, {})] }, index))) }) }));
5
+ const last = paths.length - 1;
6
+ return (_jsx(BaseBreadcrumb, { children: _jsx(BreadcrumbList, { children: paths.map((path, index) => {
7
+ /**
8
+ * ⛔ THE LAST CRUMB IS THE PAGE, whatever the caller passed.
9
+ *
10
+ * The page marker used to be a side effect of the caller omitting
11
+ * `href`, and nothing in `getBreadcrumbPaths` makes the last entry
12
+ * omit one. A trail whose final entry carried an href therefore had
13
+ * no `aria-current="page"` anywhere — a screen reader could not tell
14
+ * which of three links was the page being read — and the crumb was a
15
+ * live link back to the page the reader is already on.
16
+ *
17
+ * ⚠️ AND AN HREF-LESS ANCESTOR IS NOT A SWITCHED-OFF LINK. It used
18
+ * to reach `BreadcrumbPage` too, which hard-codes `role="link"
19
+ * aria-disabled="true"` — the right shape for the page you are ON,
20
+ * a destination that exists and simply is not navigable from here.
21
+ * An ancestor with no href is a grouping label: there is no page
22
+ * behind it, so "Settings, link, dimmed" told the reader a
23
+ * destination was unavailable to them rather than that it was never
24
+ * a destination, and inflated the link count of the trail. It is
25
+ * plain text now, and only the last crumb is the page.
26
+ */
27
+ const isLast = index === last;
28
+ return (_jsxs(React.Fragment, { children: [_jsx(BreadcrumbItem, { children: path.href && !isLast ? (_jsx(BreadcrumbLink, { href: path.href, children: path.name })) : isLast ? (_jsx(BreadcrumbPage, { children: path.name })) : (_jsx("span", { className: "breadcrumb-page", children: path.name })) }), !isLast && _jsx(BreadcrumbSeparator, {})] }, index));
29
+ }) }) }));
6
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/account-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAGzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAgB,WAAW,EAA0B,MAAM,cAAc,CAAA;AAChF,OAAO,EACL,kBAAkB,EAEnB,MAAM,6BAA6B,CAAA;AAUpC,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,qBAc1C;AAED,wBAAgB,sBAAsB,CAAC,EAAE,SAAS,EAAE,GAA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YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,SAAS,EAAE,UAAU,EACrB,OAAO,EACP,SAAS,EACT,YAA4B,EAC5B,cAA6B,EAC7B,YAAwB,EACxB,SAAS,EACT,QAAQ,EAAE,SAAS,EACnB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,mCAAmC,qBAkCrC;AAED,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EAAE,SAAS,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,qBAeA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/account-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAGzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAgB,WAAW,EAA0B,MAAM,cAAc,CAAA;AAChF,OAAO,EACL,kBAAkB,EAEnB,MAAM,6BAA6B,CAAA;AAUpC,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,qBAc1C;AAED,wBAAgB,sBAAsB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAS1E;AAED,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED,wBAAgB,uB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