@vouched-id/ui 0.0.0-stage → 0.1.0

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 (228) hide show
  1. package/dist/Accordion.d.ts +8 -0
  2. package/dist/Accordion.d.ts.map +1 -0
  3. package/dist/Accordion.js +20 -0
  4. package/dist/Accordion.js.map +1 -0
  5. package/dist/Alert.d.ts +12 -0
  6. package/dist/Alert.d.ts.map +1 -0
  7. package/dist/Alert.js +64 -0
  8. package/dist/Alert.js.map +1 -0
  9. package/dist/AlertDialog.d.ts +90 -0
  10. package/dist/AlertDialog.d.ts.map +1 -0
  11. package/dist/AlertDialog.js +148 -0
  12. package/dist/AlertDialog.js.map +1 -0
  13. package/dist/Avatar.d.ts +43 -0
  14. package/dist/Avatar.d.ts.map +1 -0
  15. package/dist/Avatar.js +29 -0
  16. package/dist/Avatar.js.map +1 -0
  17. package/dist/Badge.d.ts +31 -0
  18. package/dist/Badge.d.ts.map +1 -0
  19. package/dist/Badge.js +22 -0
  20. package/dist/Badge.js.map +1 -0
  21. package/dist/Banner.d.ts +57 -0
  22. package/dist/Banner.d.ts.map +1 -0
  23. package/dist/Banner.js +30 -0
  24. package/dist/Banner.js.map +1 -0
  25. package/dist/Button.d.ts +56 -0
  26. package/dist/Button.d.ts.map +1 -0
  27. package/dist/Button.js +106 -0
  28. package/dist/Button.js.map +1 -0
  29. package/dist/Card.d.ts +79 -0
  30. package/dist/Card.d.ts.map +1 -0
  31. package/dist/Card.js +50 -0
  32. package/dist/Card.js.map +1 -0
  33. package/dist/Chart.d.ts +63 -0
  34. package/dist/Chart.d.ts.map +1 -0
  35. package/dist/Chart.js +120 -0
  36. package/dist/Chart.js.map +1 -0
  37. package/dist/Checkbox.d.ts +4 -0
  38. package/dist/Checkbox.d.ts.map +1 -0
  39. package/dist/Checkbox.js +10 -0
  40. package/dist/Checkbox.js.map +1 -0
  41. package/dist/CodeBlock.d.ts +101 -0
  42. package/dist/CodeBlock.d.ts.map +1 -0
  43. package/dist/CodeBlock.js +99 -0
  44. package/dist/CodeBlock.js.map +1 -0
  45. package/dist/Collapsible.d.ts +6 -0
  46. package/dist/Collapsible.d.ts.map +1 -0
  47. package/dist/Collapsible.js +14 -0
  48. package/dist/Collapsible.js.map +1 -0
  49. package/dist/DataTable.d.ts +59 -0
  50. package/dist/DataTable.d.ts.map +1 -0
  51. package/dist/DataTable.js +162 -0
  52. package/dist/DataTable.js.map +1 -0
  53. package/dist/Dialog.d.ts +71 -0
  54. package/dist/Dialog.d.ts.map +1 -0
  55. package/dist/Dialog.js +185 -0
  56. package/dist/Dialog.js.map +1 -0
  57. package/dist/DropdownMenu.d.ts +82 -0
  58. package/dist/DropdownMenu.d.ts.map +1 -0
  59. package/dist/DropdownMenu.js +111 -0
  60. package/dist/DropdownMenu.js.map +1 -0
  61. package/dist/EditorialHeading.d.ts +42 -0
  62. package/dist/EditorialHeading.d.ts.map +1 -0
  63. package/dist/EditorialHeading.js +36 -0
  64. package/dist/EditorialHeading.js.map +1 -0
  65. package/dist/EmptyState.d.ts +40 -0
  66. package/dist/EmptyState.d.ts.map +1 -0
  67. package/dist/EmptyState.js +7 -0
  68. package/dist/EmptyState.js.map +1 -0
  69. package/dist/Eyebrow.d.ts +27 -0
  70. package/dist/Eyebrow.d.ts.map +1 -0
  71. package/dist/Eyebrow.js +23 -0
  72. package/dist/Eyebrow.js.map +1 -0
  73. package/dist/Field.d.ts +33 -0
  74. package/dist/Field.d.ts.map +1 -0
  75. package/dist/Field.js +26 -0
  76. package/dist/Field.js.map +1 -0
  77. package/dist/HoverCard.d.ts +7 -0
  78. package/dist/HoverCard.d.ts.map +1 -0
  79. package/dist/HoverCard.js +17 -0
  80. package/dist/HoverCard.js.map +1 -0
  81. package/dist/Input.d.ts +20 -0
  82. package/dist/Input.d.ts.map +1 -0
  83. package/dist/Input.js +17 -0
  84. package/dist/Input.js.map +1 -0
  85. package/dist/InstallCommand.d.ts +48 -0
  86. package/dist/InstallCommand.d.ts.map +1 -0
  87. package/dist/InstallCommand.js +60 -0
  88. package/dist/InstallCommand.js.map +1 -0
  89. package/dist/Kbd.d.ts +23 -0
  90. package/dist/Kbd.d.ts.map +1 -0
  91. package/dist/Kbd.js +7 -0
  92. package/dist/Kbd.js.map +1 -0
  93. package/dist/Label.d.ts +5 -0
  94. package/dist/Label.d.ts.map +1 -0
  95. package/dist/Label.js +9 -0
  96. package/dist/Label.js.map +1 -0
  97. package/dist/Popover.d.ts +41 -0
  98. package/dist/Popover.d.ts.map +1 -0
  99. package/dist/Popover.js +27 -0
  100. package/dist/Popover.js.map +1 -0
  101. package/dist/Progress.d.ts +6 -0
  102. package/dist/Progress.d.ts.map +1 -0
  103. package/dist/Progress.js +9 -0
  104. package/dist/Progress.js.map +1 -0
  105. package/dist/RadioGroup.d.ts +5 -0
  106. package/dist/RadioGroup.d.ts.map +1 -0
  107. package/dist/RadioGroup.js +15 -0
  108. package/dist/RadioGroup.js.map +1 -0
  109. package/dist/ScrollArea.d.ts +32 -0
  110. package/dist/ScrollArea.d.ts.map +1 -0
  111. package/dist/ScrollArea.js +13 -0
  112. package/dist/ScrollArea.js.map +1 -0
  113. package/dist/SegmentedControl.d.ts +37 -0
  114. package/dist/SegmentedControl.d.ts.map +1 -0
  115. package/dist/SegmentedControl.js +85 -0
  116. package/dist/SegmentedControl.js.map +1 -0
  117. package/dist/Select.d.ts +21 -0
  118. package/dist/Select.d.ts.map +1 -0
  119. package/dist/Select.js +52 -0
  120. package/dist/Select.js.map +1 -0
  121. package/dist/Separator.d.ts +4 -0
  122. package/dist/Separator.d.ts.map +1 -0
  123. package/dist/Separator.js +9 -0
  124. package/dist/Separator.js.map +1 -0
  125. package/dist/Sheet.d.ts +71 -0
  126. package/dist/Sheet.d.ts.map +1 -0
  127. package/dist/Sheet.js +173 -0
  128. package/dist/Sheet.js.map +1 -0
  129. package/dist/Skeleton.d.ts +26 -0
  130. package/dist/Skeleton.d.ts.map +1 -0
  131. package/dist/Skeleton.js +9 -0
  132. package/dist/Skeleton.js.map +1 -0
  133. package/dist/Slider.d.ts +5 -0
  134. package/dist/Slider.d.ts.map +1 -0
  135. package/dist/Slider.js +12 -0
  136. package/dist/Slider.js.map +1 -0
  137. package/dist/StatusDot.d.ts +29 -0
  138. package/dist/StatusDot.d.ts.map +1 -0
  139. package/dist/StatusDot.js +55 -0
  140. package/dist/StatusDot.js.map +1 -0
  141. package/dist/StatusText.d.ts +15 -0
  142. package/dist/StatusText.d.ts.map +1 -0
  143. package/dist/StatusText.js +49 -0
  144. package/dist/StatusText.js.map +1 -0
  145. package/dist/Switch.d.ts +47 -0
  146. package/dist/Switch.d.ts.map +1 -0
  147. package/dist/Switch.js +17 -0
  148. package/dist/Switch.js.map +1 -0
  149. package/dist/Table.d.ts +22 -0
  150. package/dist/Table.d.ts.map +1 -0
  151. package/dist/Table.js +42 -0
  152. package/dist/Table.js.map +1 -0
  153. package/dist/Tabs.d.ts +96 -0
  154. package/dist/Tabs.d.ts.map +1 -0
  155. package/dist/Tabs.js +319 -0
  156. package/dist/Tabs.js.map +1 -0
  157. package/dist/Tag.d.ts +19 -0
  158. package/dist/Tag.d.ts.map +1 -0
  159. package/dist/Tag.js +50 -0
  160. package/dist/Tag.js.map +1 -0
  161. package/dist/Textarea.d.ts +32 -0
  162. package/dist/Textarea.d.ts.map +1 -0
  163. package/dist/Textarea.js +11 -0
  164. package/dist/Textarea.js.map +1 -0
  165. package/dist/Toast.d.ts +47 -0
  166. package/dist/Toast.d.ts.map +1 -0
  167. package/dist/Toast.js +110 -0
  168. package/dist/Toast.js.map +1 -0
  169. package/dist/ToggleGroup.d.ts +48 -0
  170. package/dist/ToggleGroup.d.ts.map +1 -0
  171. package/dist/ToggleGroup.js +27 -0
  172. package/dist/ToggleGroup.js.map +1 -0
  173. package/dist/Tooltip.d.ts +8 -0
  174. package/dist/Tooltip.d.ts.map +1 -0
  175. package/dist/Tooltip.js +81 -0
  176. package/dist/Tooltip.js.map +1 -0
  177. package/dist/_code-copy-button.d.ts +9 -0
  178. package/dist/_code-copy-button.d.ts.map +1 -0
  179. package/dist/_code-copy-button.js +72 -0
  180. package/dist/_code-copy-button.js.map +1 -0
  181. package/dist/_code-syntax.d.ts +81 -0
  182. package/dist/_code-syntax.d.ts.map +1 -0
  183. package/dist/_code-syntax.js +293 -0
  184. package/dist/_code-syntax.js.map +1 -0
  185. package/dist/_status-icons.d.ts +22 -0
  186. package/dist/_status-icons.d.ts.map +1 -0
  187. package/dist/_status-icons.js +40 -0
  188. package/dist/_status-icons.js.map +1 -0
  189. package/dist/index.d.ts +11 -0
  190. package/dist/index.d.ts.map +1 -0
  191. package/dist/index.js +11 -0
  192. package/dist/index.js.map +1 -0
  193. package/dist/lib/format-numbers.d.ts +51 -0
  194. package/dist/lib/format-numbers.d.ts.map +1 -0
  195. package/dist/lib/format-numbers.js +158 -0
  196. package/dist/lib/format-numbers.js.map +1 -0
  197. package/dist/lib/utils.d.ts +20 -0
  198. package/dist/lib/utils.d.ts.map +1 -0
  199. package/dist/lib/utils.js +23 -0
  200. package/dist/lib/utils.js.map +1 -0
  201. package/dist/public.d.ts +61 -0
  202. package/dist/public.d.ts.map +1 -0
  203. package/dist/public.js +65 -0
  204. package/dist/public.js.map +1 -0
  205. package/dist/theme-scope.d.ts +55 -0
  206. package/dist/theme-scope.d.ts.map +1 -0
  207. package/dist/theme-scope.js +90 -0
  208. package/dist/theme-scope.js.map +1 -0
  209. package/dist/tokens.generated.d.ts +335 -0
  210. package/dist/tokens.generated.d.ts.map +1 -0
  211. package/dist/tokens.generated.js +349 -0
  212. package/dist/tokens.generated.js.map +1 -0
  213. package/package.json +100 -3
  214. package/styles/README.md +104 -0
  215. package/styles/base.css +301 -0
  216. package/styles/canvas.css +147 -0
  217. package/styles/colors_and_type.css +136 -0
  218. package/styles/component-contracts.css +471 -0
  219. package/styles/fonts.css +28 -0
  220. package/styles/package.css +6 -0
  221. package/styles/primitive-skins.css +104 -0
  222. package/styles/semantic-bindings.css +119 -0
  223. package/styles/shell.css +50 -0
  224. package/styles/source.css +4 -0
  225. package/styles/tailwind-bridge.css +255 -0
  226. package/styles/theme.css +14 -0
  227. package/styles/tokens.css +1281 -0
  228. package/README.md +0 -3
package/dist/Banner.js ADDED
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cn } from './lib/utils.js';
4
+ import { DenyGlyph, InfoGlyph, SuccessGlyph, WarnGlyph } from './_status-icons.js';
5
+ const VARIANT_CLASSES = {
6
+ info: 'bg-[color:var(--info-soft)] border-[color:var(--info-line)] [&_.banner-icon]:text-info-text',
7
+ warn: 'bg-[color:var(--warn-soft)] border-[color:var(--warn-line)] [&_.banner-icon]:text-warn-text',
8
+ deny: 'bg-[color:var(--deny-soft)] border-[color:var(--deny-line)] [&_.banner-icon]:text-deny-text',
9
+ success: 'bg-[color:var(--allow-soft)] border-[color:var(--allow-line)] [&_.banner-icon]:text-allow-text',
10
+ };
11
+ const DEFAULT_ICONS = {
12
+ info: _jsx(InfoGlyph, {}),
13
+ warn: _jsx(WarnGlyph, {}),
14
+ deny: _jsx(DenyGlyph, {}),
15
+ success: _jsx(SuccessGlyph, {}),
16
+ };
17
+ export function Banner({ variant, icon, className, children, ...rest }) {
18
+ return (_jsxs("div", { role: variant === 'deny' ? 'alert' : 'status', className: cn('flex items-center gap-3.5', 'px-4.5 py-3.5', 'rounded-[var(--radius-md)]', 'border', 'text-[length:var(--text-sm)] text-ink leading-normal', VARIANT_CLASSES[variant], className), ...rest, children: [_jsx("span", { className: "banner-icon shrink-0 w-4 h-4 [&>svg]:w-full [&>svg]:h-full", children: icon ?? DEFAULT_ICONS[variant] }), _jsx("div", { className: "flex-1 min-w-0", children: children })] }));
19
+ }
20
+ /**
21
+ * Inline link inside a Banner body. Styled with the same underline-
22
+ * offset + on-hover underline-darken treatment as the SSOT
23
+ * `.demo-banner .lk` spec, so links read as text-with-affordance
24
+ * rather than as separate CTA chips inside the banner.
25
+ */
26
+ function BannerLink({ href, className, children, ...rest }) {
27
+ return (_jsx("a", { href: href, className: cn('text-ink underline underline-offset-[3px]', 'decoration-[color:var(--border-default)] hover:decoration-current', 'transition-[text-decoration-color] duration-[var(--duration-fast)] ease-out', 'ml-1', className), ...rest, children: children }));
28
+ }
29
+ Banner.Link = BannerLink;
30
+ //# sourceMappingURL=Banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Banner.js","sourceRoot":"","sources":["../src/Banner.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAgDnF,MAAM,eAAe,GAAkC;IACrD,IAAI,EAAE,6FAA6F;IACnG,IAAI,EAAE,6FAA6F;IACnG,IAAI,EAAE,6FAA6F;IACnG,OAAO,EACL,gGAAgG;CACnG,CAAC;AAEF,MAAM,aAAa,GAA2C;IAC5D,IAAI,EAAE,KAAC,SAAS,KAAG;IACnB,IAAI,EAAE,KAAC,SAAS,KAAG;IACnB,IAAI,EAAE,KAAC,SAAS,KAAG;IACnB,OAAO,EAAE,KAAC,YAAY,KAAG;CAC1B,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAe;IACjF,OAAO,CACL,eACE,IAAI,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAC7C,SAAS,EAAE,EAAE,CACX,2BAA2B,EAC3B,eAAe,EACf,4BAA4B,EAC5B,QAAQ,EACR,sDAAsD,EACtD,eAAe,CAAC,OAAO,CAAC,EACxB,SAAS,CACV,KACG,IAAI,aAER,eAAM,SAAS,EAAC,4DAA4D,YACzE,IAAI,IAAI,aAAa,CAAC,OAAO,CAAC,GAC1B,EACP,cAAK,SAAS,EAAC,gBAAgB,YAAE,QAAQ,GAAO,IAC5C,CACP,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAS,UAAU,CAAC,EAClB,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACuC;IAC9C,OAAO,CACL,YACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CACX,2CAA2C,EAC3C,mEAAmE,EACnE,6EAA6E,EAC7E,MAAM,EACN,SAAS,CACV,KACG,IAAI,YAEP,QAAQ,GACP,CACL,CAAC;AACJ,CAAC;AACD,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Checkpoint · Button
3
+ *
4
+ * Replaces `@/components/shared/ui/button` for new code inside the
5
+ * checkpoint design system. Six variants cover the v5 spec:
6
+ *
7
+ * - primary · brand-filled (violet on ink) — the "this is the
8
+ * default action on this surface" button
9
+ * - secondary · neutral tile — the "you can also do this" button
10
+ * - outline · transparent + hairline border — the React twin of
11
+ * the SSOT `.btn` base class (checkpoint.css §4),
12
+ * e.g. the TopNav chrome. Secondary-weight actions
13
+ * that should read lighter than the tile fill.
14
+ * - ghost · text-only — toolbar buttons, dropdown triggers
15
+ * - danger · deny color — destructive confirmations
16
+ * - action · @deprecated — was white-on-ink ("you've committed,
17
+ * fire it"). Decision B ("violet primary everywhere;
18
+ * no white primary") retired the white treatment, so
19
+ * this variant now renders the SAME brand-violet fill
20
+ * as `primary`. Use `primary`; the key is kept only so
21
+ * legacy call sites keep type-checking.
22
+ *
23
+ * Radius is `--radius-btn` (tokens.css) — the SAME token
24
+ * the SSOT `.btn` chrome consumes, so this primitive and the top-nav
25
+ * buttons cannot drift apart. NOT `rounded-md`: the checkpoint
26
+ * `--radius-md` token is also 8px, but inside the checkpoint scope the
27
+ * radius doctrine in shell.css flattens `.rounded-md` to `--radius-xs` (2px),
28
+ * which would make this component sharper than the `.btn` chrome next
29
+ * to it. The 8px fallback covers render scopes where the checkpoint tokens
30
+ * aren't mounted. Focus ring uses the brand-soft halo + brand border
31
+ * per the v5 accessibility commitment.
32
+ */
33
+ import * as React from 'react';
34
+ import { Slot } from '@radix-ui/react-slot';
35
+ import { type VariantProps } from 'class-variance-authority';
36
+ declare const button: (props?: ({
37
+ variant?: "default" | "link" | "destructive" | "primary" | "secondary" | "outline" | "ghost" | "danger" | "action" | null | undefined;
38
+ size?: "default" | "xs" | "sm" | "md" | "lg" | "xl" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-xl" | null | undefined;
39
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
40
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof button> {
41
+ /** When true, the button shows a spinner and is disabled. */
42
+ loading?: boolean;
43
+ /** Legacy spelling; prefer `loading`. */
44
+ isLoading?: boolean;
45
+ /** Label shown while loading. */
46
+ loadingText?: string;
47
+ /** Custom loading icon. */
48
+ loadingIcon?: React.ComponentType<{
49
+ className?: string;
50
+ }>;
51
+ /** Render the single child as the element (e.g. a Next.js <Link>) with the button styling. */
52
+ asChild?: boolean;
53
+ }
54
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
55
+ export { button as buttonVariants, Slot };
56
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,MAAM;;;8EA4DX,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,MAAM,CAAC;IAClF,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1D,8FAA8F;IAC9F,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,MAAM,uFAuDjB,CAAC;AAkBH,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,IAAI,EAAE,CAAC"}
package/dist/Button.js ADDED
@@ -0,0 +1,106 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Checkpoint · Button
4
+ *
5
+ * Replaces `@/components/shared/ui/button` for new code inside the
6
+ * checkpoint design system. Six variants cover the v5 spec:
7
+ *
8
+ * - primary · brand-filled (violet on ink) — the "this is the
9
+ * default action on this surface" button
10
+ * - secondary · neutral tile — the "you can also do this" button
11
+ * - outline · transparent + hairline border — the React twin of
12
+ * the SSOT `.btn` base class (checkpoint.css §4),
13
+ * e.g. the TopNav chrome. Secondary-weight actions
14
+ * that should read lighter than the tile fill.
15
+ * - ghost · text-only — toolbar buttons, dropdown triggers
16
+ * - danger · deny color — destructive confirmations
17
+ * - action · @deprecated — was white-on-ink ("you've committed,
18
+ * fire it"). Decision B ("violet primary everywhere;
19
+ * no white primary") retired the white treatment, so
20
+ * this variant now renders the SAME brand-violet fill
21
+ * as `primary`. Use `primary`; the key is kept only so
22
+ * legacy call sites keep type-checking.
23
+ *
24
+ * Radius is `--radius-btn` (tokens.css) — the SAME token
25
+ * the SSOT `.btn` chrome consumes, so this primitive and the top-nav
26
+ * buttons cannot drift apart. NOT `rounded-md`: the checkpoint
27
+ * `--radius-md` token is also 8px, but inside the checkpoint scope the
28
+ * radius doctrine in shell.css flattens `.rounded-md` to `--radius-xs` (2px),
29
+ * which would make this component sharper than the `.btn` chrome next
30
+ * to it. The 8px fallback covers render scopes where the checkpoint tokens
31
+ * aren't mounted. Focus ring uses the brand-soft halo + brand border
32
+ * per the v5 accessibility commitment.
33
+ */
34
+ import * as React from 'react';
35
+ import { Slot } from '@radix-ui/react-slot';
36
+ import { cva } from 'class-variance-authority';
37
+ import { cn } from './lib/utils.js';
38
+ const button = cva([
39
+ 'inline-flex items-center justify-center gap-2 whitespace-nowrap font-sans font-medium',
40
+ // Icons without their own size class render at 16px.
41
+ "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
42
+ 'rounded-[var(--radius-btn,8px)] transition-all duration-[var(--duration-fast)] ease-out',
43
+ 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',
44
+ 'disabled:opacity-50 disabled:cursor-not-allowed',
45
+ ].join(' '), {
46
+ variants: {
47
+ variant: {
48
+ /** @deprecated Use `primary`. Retained while legacy call sites converge. */
49
+ default: 'bg-brand text-on-brand border border-brand hover:bg-brand-hover',
50
+ primary: 'bg-brand text-on-brand border border-brand hover:bg-brand-hover',
51
+ secondary: 'bg-surface text-ink border border-border-default hover:bg-elevated',
52
+ // Mirrors the SSOT `.btn` base (checkpoint.css §4): transparent
53
+ // fill, hairline border, full-ink label; hover gains the surface
54
+ // wash. Differs from `secondary` (tile fill) and `ghost` (no
55
+ // border, muted label).
56
+ outline: 'bg-transparent text-ink border border-border-default hover:bg-surface',
57
+ ghost: 'bg-transparent text-ink-muted border border-transparent hover:bg-surface hover:text-ink',
58
+ // --deny-fill, not --deny: white on --deny reads 3.51:1 in dark.
59
+ danger: 'bg-deny-fill text-[color:var(--on-deny)] border border-deny-fill hover:opacity-90',
60
+ /** @deprecated Use `danger`. Retained while legacy call sites converge. */
61
+ destructive: 'bg-deny-fill text-[color:var(--on-deny)] border border-deny-fill hover:opacity-90',
62
+ /** Text-link button retained for existing inline actions. */
63
+ link: 'bg-transparent text-brand-text border border-transparent underline-offset-4 hover:underline',
64
+ /**
65
+ * @deprecated Use `primary`. Decision B retired the white
66
+ * "action" CTA — re-pointed to the brand-violet primary
67
+ * treatment so any straggler renders violet, never white.
68
+ * The key stays so `variant="action"` call sites keep
69
+ * type-checking; do not add new usages.
70
+ */
71
+ action: 'bg-brand text-on-brand border border-brand hover:bg-brand-hover',
72
+ },
73
+ // Heights match the v5 SSOT btn ladder verbatim: sm 26h / default
74
+ // 32h / lg 40h. The previous scale was one tier too tall across
75
+ // the board (32 / 40 / 48) — what we called "default md" was
76
+ // really "lg" per spec, which made checkpoint surfaces feel
77
+ // larger than the rest of the design system.
78
+ size: {
79
+ xs: 'h-7 px-2.5 text-[length:var(--text-control-xs)]',
80
+ sm: 'h-[26px] px-2.5 text-[length:var(--text-xs)]',
81
+ default: 'h-8 px-3.5 text-[length:var(--text-control)]',
82
+ md: 'h-8 px-3.5 text-[length:var(--text-control)]',
83
+ lg: 'h-10 px-[22px] text-[length:var(--text-sm)]',
84
+ xl: 'h-11 px-10 text-[length:var(--text-base)]',
85
+ icon: 'h-9 w-9 p-0',
86
+ 'icon-xs': 'h-6 w-6 p-0',
87
+ 'icon-sm': 'h-8 w-8 p-0',
88
+ 'icon-lg': 'h-10 w-10 p-0',
89
+ 'icon-xl': 'h-12 w-12 p-0',
90
+ },
91
+ },
92
+ defaultVariants: { variant: 'primary', size: 'default' },
93
+ });
94
+ export const Button = React.forwardRef(function Button({ variant, size, loading, isLoading, loadingText, loadingIcon: LoadingIcon = Spinner, disabled, className, children, asChild, ...rest }, ref) {
95
+ const Comp = asChild ? Slot : 'button';
96
+ const busy = loading || isLoading;
97
+ if (asChild) {
98
+ return (_jsx(Slot, { ref: ref, "data-slot": "button", "data-variant": variant ?? 'primary', "data-size": size ?? 'default', className: cn(button({ variant, size }), '[&_svg]:shrink-0', className), ...(disabled || busy ? { disabled: true } : {}), ...rest, children: children }));
99
+ }
100
+ return (_jsxs(Comp, { ref: ref, "data-slot": "button", "data-variant": variant ?? 'primary', "data-size": size ?? 'default', className: cn(button({ variant, size }), '[&_svg]:shrink-0', className), disabled: disabled || busy, "aria-busy": busy || undefined, "aria-label": busy && loadingText ? loadingText : undefined, ...rest, children: [busy ? _jsx(LoadingIcon, { className: "h-4 w-4 animate-spin" }) : null, busy ? (loadingText ?? (isLoading ? children : null)) : children] }));
101
+ });
102
+ function Spinner({ className }) {
103
+ return (_jsxs("svg", { className: className, viewBox: "0 0 24 24", fill: "none", role: "status", "aria-label": "Loading", focusable: "false", children: [_jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2", opacity: "0.25" }), _jsx("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] }));
104
+ }
105
+ export { button as buttonVariants, Slot };
106
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,MAAM,GAAG,GAAG,CAChB;IACE,uFAAuF;IACvF,qDAAqD;IACrD,kEAAkE;IAClE,yFAAyF;IACzF,mFAAmF;IACnF,iDAAiD;CAClD,CAAC,IAAI,CAAC,GAAG,CAAC,EACX;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,4EAA4E;YAC5E,OAAO,EAAE,iEAAiE;YAC1E,OAAO,EAAE,iEA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Q,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,OAAO,EAAC,MAAM,GAAG,EACrF,eAAM,CAAC,EAAC,sBAAsB,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,GAAG,IACzF,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,IAAI,EAAE,CAAC"}
package/dist/Card.d.ts ADDED
@@ -0,0 +1,79 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Checkpoint · Card
4
+ *
5
+ * The canonical surface for grouped content — stat tiles, widget
6
+ * panels, table wrappers, sidebar callouts. Mirrors the v5 ssot
7
+ * `.cp-card-soft` / `.cp-card-flat` spec.
8
+ *
9
+ * The dashboard codebase has ~30 hand-rolled card surfaces across
10
+ * three background tokens (`--bg-surface`, `--surface-subtle`,
11
+ * `--surface-default`). They resolve to similar values, but the mix
12
+ * makes the surface vocabulary noisy. This primitive ships one
13
+ * canonical shape consuming v5 tokens (`--bg-elevated`,
14
+ * `--border-subtle`) so future card surfaces use the same names, and
15
+ * existing ones can migrate per-touch.
16
+ *
17
+ * Two variants per the ssot:
18
+ *
19
+ * - `soft` (default) — `--radius-md` corners. Widgets, embeds,
20
+ * stat tiles, content cards. Reads as "card carrying content".
21
+ * - `flat` — `--radius-xs` corners. Wrapping a data table so the
22
+ * row alignment reads as continuous rather than softened tile.
23
+ * Pair: a soft card around a flat card around a table.
24
+ *
25
+ * Use `<CardLabel>` for the eyebrow ("AGENTS ON SITE NOW") and
26
+ * `<CardValue>` for the big number ("247"). Both opt-in — a card
27
+ * with arbitrary body content just uses `<Card>{children}</Card>`.
28
+ *
29
+ * Usage:
30
+ *
31
+ * <Card>
32
+ * <CardLabel>— Agents on site now</CardLabel>
33
+ * <CardValue>247</CardValue>
34
+ * </Card>
35
+ *
36
+ * <Card variant="flat">
37
+ * <table>…</table>
38
+ * </Card>
39
+ *
40
+ * <Card padding="none">
41
+ * <CustomBody /> // when the consumer manages its own padding
42
+ * </Card>
43
+ */
44
+ export type CardVariant = 'soft' | 'flat';
45
+ export interface CardProps extends React.ComponentProps<'div'> {
46
+ variant?: CardVariant;
47
+ /**
48
+ * `default` (26 24 padding per ssot) / `compact` (16 18, tighter
49
+ * surfaces) / `none` (consumer owns padding, e.g. wrapping a table
50
+ * that handles its own per-cell padding).
51
+ *
52
+ * The DEFAULT is `none` — the ui/card migration brought over shadcn
53
+ * callers whose CardHeader/CardContent own the spacing, so an implicit
54
+ * root padding would double-pad them. Direct checkpoint surfaces
55
+ * (metric tiles, ssot cards) must opt in with `padding="default"`.
56
+ */
57
+ padding?: 'default' | 'compact' | 'none';
58
+ }
59
+ export declare const Card: React.ForwardRefExoticComponent<Omit<CardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
60
+ export declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
61
+ export declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
62
+ export declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
63
+ export declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
64
+ export declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
65
+ export declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
66
+ /**
67
+ * Eyebrow label inside a Card. Mono caps with the ssot's slight
68
+ * 0.14em tracking (vs the broader 0.18em `--tracking-eyebrow`).
69
+ * The em-dash prefix is conventional ("— Agents on site now") but
70
+ * not enforced — consumer passes whatever copy they want.
71
+ */
72
+ export declare function CardLabel({ className, children, ...rest }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
73
+ /**
74
+ * Big numeric / display value inside a Card. Manrope display, 24px,
75
+ * tabular numerics so 247 and 1,284 line up vertically when stacked.
76
+ * Per ssot: `font-weight: 400` (not the heavier 500 we use on h2s).
77
+ */
78
+ export declare function CardValue({ className, children, ...rest }: React.HTMLAttributes<HTMLParagraphElement>): React.JSX.Element;
79
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1C,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC5D,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;CAC1C;AAED,eAAO,MAAM,IAAI,+FAwBf,CAAC;AAEH,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW9E;AAED,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7E;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQnF;AAED,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ9E;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAE/E;AAED,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ9E;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,qBAe/F;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,qBAc5C"}
package/dist/Card.js ADDED
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cn } from './lib/utils.js';
4
+ export const Card = React.forwardRef(function Card({ variant = 'soft', padding = 'none', className, children, ...rest }, ref) {
5
+ return (_jsx("div", { ref: ref, "data-slot": "card", className: cn('bg-[var(--bg-elevated)] border border-[color:var(--border-subtle)]', variant === 'flat' ? 'rounded-[var(--radius-xs)]' : 'rounded-[var(--radius-md)]',
6
+ // Default 26h × 24v (matches Dialog's `px-[26px] py-6` so the
7
+ // two themed surfaces share a padding rhythm). Compact 18h ×
8
+ // 16v for tighter rows. `none` lets the consumer manage.
9
+ padding === 'default' && 'px-[26px] py-6', padding === 'compact' && 'px-[18px] py-4',
10
+ // padding === 'none' — no class added; consumer owns.
11
+ className), ...rest, children: children }));
12
+ });
13
+ export function CardHeader({ className, ...props }) {
14
+ return (_jsx("div", { "data-slot": "card-header", className: cn('@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6', className), ...props }));
15
+ }
16
+ export function CardTitle({ className, ...props }) {
17
+ return (_jsx("div", { "data-slot": "card-title", className: cn('font-display font-medium leading-none text-[color:var(--fg-primary)]', className), ...props }));
18
+ }
19
+ export function CardDescription({ className, ...props }) {
20
+ return (_jsx("div", { "data-slot": "card-description", className: cn('text-sm text-[color:var(--fg-tertiary)]', className), ...props }));
21
+ }
22
+ export function CardAction({ className, ...props }) {
23
+ return (_jsx("div", { "data-slot": "card-action", className: cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className), ...props }));
24
+ }
25
+ export function CardContent({ className, ...props }) {
26
+ return _jsx("div", { "data-slot": "card-content", className: cn('px-6 pb-6 pt-4', className), ...props });
27
+ }
28
+ export function CardFooter({ className, ...props }) {
29
+ return (_jsx("div", { "data-slot": "card-footer", className: cn('flex items-center px-6 [.border-t]:pt-6', className), ...props }));
30
+ }
31
+ /**
32
+ * Eyebrow label inside a Card. Mono caps with the ssot's slight
33
+ * 0.14em tracking (vs the broader 0.18em `--tracking-eyebrow`).
34
+ * The em-dash prefix is conventional ("— Agents on site now") but
35
+ * not enforced — consumer passes whatever copy they want.
36
+ */
37
+ export function CardLabel({ className, children, ...rest }) {
38
+ return (_jsx("div", { className: cn('font-mono text-[length:var(--text-eyebrow)] uppercase tracking-[var(--tracking-label)]',
39
+ // Tertiary, not muted: muted is under 4.5:1 on hovered and most tinted dark grounds.
40
+ 'text-[color:var(--fg-tertiary)]', 'mb-2', className), ...rest, children: children }));
41
+ }
42
+ /**
43
+ * Big numeric / display value inside a Card. Manrope display, 24px,
44
+ * tabular numerics so 247 and 1,284 line up vertically when stacked.
45
+ * Per ssot: `font-weight: 400` (not the heavier 500 we use on h2s).
46
+ */
47
+ export function CardValue({ className, children, ...rest }) {
48
+ return (_jsx("p", { className: cn('font-display text-[length:var(--text-stat)] font-normal leading-tight tracking-[var(--tracking-stat)]', 'text-[color:var(--fg-primary)] tabular-nums', 'm-0', className), ...rest, children: children }));
49
+ }
50
+ //# sourceMappingURL=Card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.js","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,gBA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E,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,gEAAgE,EAAE,SAAS,CAAC,KACtF,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAC9E,OAAO,2BAAe,cAAc,EAAC,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACjG,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAC7E,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,yCAAyC,EAAE,SAAS,CAAC,KAC/D,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAwC;IAC9F,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CACX,wFAAwF;QACxF,qFAAqF;QACrF,iCAAiC,EACjC,MAAM,EACN,SAAS,CACV,KACG,IAAI,YAEP,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACoC;IAC3C,OAAO,CACL,YACE,SAAS,EAAE,EAAE,CACX,uGAAuG,EACvG,6CAA6C,EAC7C,KAAK,EACL,SAAS,CACV,KACG,IAAI,YAEP,QAAQ,GACP,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,63 @@
1
+ import * as React from 'react';
2
+ import * as RechartsPrimitive from 'recharts';
3
+ declare const THEMES: {
4
+ readonly light: "";
5
+ readonly dark: ".dark";
6
+ };
7
+ export type ChartConfig = {
8
+ [k in string]: {
9
+ label?: React.ReactNode;
10
+ icon?: React.ComponentType;
11
+ } & ({
12
+ color?: string;
13
+ theme?: never;
14
+ } | {
15
+ color?: never;
16
+ theme: Record<keyof typeof THEMES, string>;
17
+ });
18
+ };
19
+ declare const ChartContainer: React.NamedExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
20
+ config: ChartConfig;
21
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
22
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const ChartStyle: React.NamedExoticComponent<{
24
+ id: string;
25
+ config: ChartConfig;
26
+ }>;
27
+ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
28
+ declare const ChartTooltipContent: React.NamedExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<import("recharts/types/component/DefaultTooltipContent.js").ValueType, import("recharts/types/component/DefaultTooltipContent.js").NameType> & {
29
+ accessibilityLayer?: boolean;
30
+ active?: boolean | undefined;
31
+ includeHidden?: boolean | undefined;
32
+ allowEscapeViewBox?: import("recharts/types/util/types.js").AllowInDimension;
33
+ animationDuration?: import("recharts/types/util/types.js").AnimationDuration;
34
+ animationEasing?: import("recharts/types/util/types.js").AnimationTiming;
35
+ content?: import("recharts/types/component/Tooltip.js").ContentType<import("recharts/types/component/DefaultTooltipContent.js").ValueType, import("recharts/types/component/DefaultTooltipContent.js").NameType> | undefined;
36
+ coordinate?: Partial<import("recharts/types/util/types.js").Coordinate>;
37
+ cursor?: boolean | React.ReactElement | React.SVGProps<SVGElement>;
38
+ filterNull?: boolean;
39
+ defaultIndex?: number;
40
+ isAnimationActive?: boolean;
41
+ offset?: number;
42
+ payloadUniqBy?: import("recharts/types/util/payload/getUniqPayload.js").UniqueOption<import("recharts/types/component/DefaultTooltipContent.js").Payload<import("recharts/types/component/DefaultTooltipContent.js").ValueType, import("recharts/types/component/DefaultTooltipContent.js").NameType>> | undefined;
43
+ position?: Partial<import("recharts/types/util/types.js").Coordinate>;
44
+ reverseDirection?: import("recharts/types/util/types.js").AllowInDimension;
45
+ shared?: boolean;
46
+ trigger?: "hover" | "click";
47
+ useTranslate3d?: boolean;
48
+ viewBox?: import("recharts/types/util/types.js").CartesianViewBox;
49
+ wrapperStyle?: React.CSSProperties;
50
+ } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
51
+ hideLabel?: boolean;
52
+ hideIndicator?: boolean;
53
+ indicator?: "line" | "dot" | "dashed";
54
+ nameKey?: string;
55
+ labelKey?: string;
56
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
57
+ declare const ChartLegend: typeof RechartsPrimitive.Legend;
58
+ declare const ChartLegendContent: React.NamedExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
59
+ hideIcon?: boolean;
60
+ nameKey?: string;
61
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
62
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
63
+ //# sourceMappingURL=Chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../src/Chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAI9C,QAAA,MAAM,MAAM;;;CAAwC,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;KACvB,CAAC,IAAI,MAAM,GAAG;QACb,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,GAAG,CACA;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,GACjC;QAAE,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,OAAO,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAChE;CACF,CAAC;AAkBF,QAAA,MAAM,cAAc;YAIN,WAAW;cACT,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,mBAAmB,CAAC,CAAC,UAAU,CAAC;gDAyB7F,CAAC;AAGF,QAAA,MAAM,UAAU;QAIV,MAAM;YACF,WAAW;EA+BnB,CAAC;AAEH,QAAA,MAAM,YAAY,kCAA4B,CAAC;AAE/C,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;gBAKL,OAAO;oBACH,OAAO;gBACX,MAAM,GAAG,KAAK,GAAG,QAAQ;cAC3B,MAAM;eACL,MAAM;gDAsIxB,CAAC;AAGF,QAAA,MAAM,WAAW,iCAA2B,CAAC;AAE7C,QAAA,MAAM,kBAAkB;eAKL,OAAO;cACR,MAAM;gDA8CvB,CAAC;AA6BF,OAAO,EACL,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,UAAU,GACX,CAAC"}
package/dist/Chart.js ADDED
@@ -0,0 +1,120 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import * as RechartsPrimitive from 'recharts';
5
+ import { cn } from './lib/utils.js';
6
+ // Format: { THEME_NAME: CSS_SELECTOR }
7
+ const THEMES = { light: '', dark: '.dark' };
8
+ const ChartContext = React.createContext(null);
9
+ function useChart() {
10
+ const context = React.useContext(ChartContext);
11
+ if (!context) {
12
+ throw new Error('useChart must be used within a <ChartContainer />');
13
+ }
14
+ return context;
15
+ }
16
+ const ChartContainer = React.memo(React.forwardRef(({ id, className, children, config, ...props }, ref) => {
17
+ const uniqueId = React.useId();
18
+ const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;
19
+ return (_jsx(ChartContext.Provider, { value: { config }, children: _jsxs("div", { "data-slot": "chart", "data-chart": chartId, ref: ref, className: cn(
20
+ // ds-allow ds/color-literal: attribute selectors that match Recharts' own default strokes (#ccc, #fff, #666); they restyle those lines, never paint the hex
21
+ "[&_.recharts-cartesian-axis-tick_text]:fill-ink-subtle [&_.recharts-cartesian-axis-line[stroke='#666']]:stroke-ink-faint [&_.recharts-cartesian-axis-tick-line[stroke='#666']]:stroke-ink-faint [&_.recharts-default-tooltip]:!border-border-subtle [&_.recharts-default-tooltip]:!bg-elevated [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border-subtle/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border-subtle [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border-subtle [&_.recharts-radial-bar-background-sector]:fill-elevated [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-elevated [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border-subtle flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className), ...props, children: [_jsx(ChartStyle, { id: chartId, config: config }), _jsx(RechartsPrimitive.ResponsiveContainer, { children: children })] }) }));
22
+ }));
23
+ ChartContainer.displayName = 'Chart';
24
+ const ChartStyle = React.memo(function ChartStyle({ id, config, }) {
25
+ const colorConfig = React.useMemo(() => Object.entries(config).filter(([, config]) => config.theme || config.color), [config]);
26
+ if (!colorConfig.length) {
27
+ return null;
28
+ }
29
+ return (_jsx("style", { dangerouslySetInnerHTML: {
30
+ __html: Object.entries(THEMES)
31
+ .map(([theme, prefix]) => `
32
+ ${prefix} [data-chart=${id}] {
33
+ ${colorConfig
34
+ .map(([key, itemConfig]) => {
35
+ const color = itemConfig.theme?.[theme] || itemConfig.color;
36
+ return color ? ` --color-${key}: ${color};` : null;
37
+ })
38
+ .join('\n')}
39
+ }
40
+ `)
41
+ .join('\n'),
42
+ } }));
43
+ });
44
+ const ChartTooltip = RechartsPrimitive.Tooltip;
45
+ const ChartTooltipContent = React.memo(React.forwardRef(({ active, payload, className, indicator = 'dot', hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }, ref) => {
46
+ const { config } = useChart();
47
+ const tooltipLabel = React.useMemo(() => {
48
+ if (hideLabel || !payload?.length) {
49
+ return null;
50
+ }
51
+ const [item] = payload;
52
+ const key = `${labelKey || item.dataKey || item.name || 'value'}`;
53
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
54
+ const value = !labelKey && typeof label === 'string'
55
+ ? config[label]?.label || label
56
+ : itemConfig?.label;
57
+ if (labelFormatter) {
58
+ return (_jsx("div", { className: cn('font-medium', labelClassName), children: labelFormatter(value, payload) }));
59
+ }
60
+ if (!value) {
61
+ return null;
62
+ }
63
+ return _jsx("div", { className: cn('font-medium', labelClassName), children: value });
64
+ }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
65
+ if (!active || !payload?.length) {
66
+ return null;
67
+ }
68
+ const nestLabel = payload.length === 1 && indicator !== 'dot';
69
+ return (_jsxs("div", { ref: ref, className: cn('border-border-subtle/50 bg-canvas grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl', className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
70
+ const key = `${nameKey || item.name || item.dataKey || 'value'}`;
71
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
72
+ const indicatorColor = color || item.payload.fill || item.color;
73
+ return (_jsx("div", { className: cn('[&>svg]:text-ink-subtle flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5', indicator === 'dot' && 'items-center'), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (_jsxs(_Fragment, { children: [itemConfig?.icon ? (_jsx(itemConfig.icon, {})) : (!hideIndicator && (_jsx("div", { className: cn('shrink-0 rounded-(--radius-xs) border-(--color-border) bg-(--color-bg)', {
74
+ 'h-2.5 w-2.5': indicator === 'dot',
75
+ 'w-1': indicator === 'line',
76
+ 'w-0 border-[1.5px] border-dashed bg-transparent': indicator === 'dashed',
77
+ 'my-0.5': nestLabel && indicator === 'dashed',
78
+ }), style: {
79
+ '--color-bg': indicatorColor,
80
+ '--color-border': indicatorColor,
81
+ } }))), _jsxs("div", { className: cn('flex flex-1 justify-between leading-none', nestLabel ? 'items-end' : 'items-center'), children: [_jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, _jsx("span", { className: "text-ink-subtle", children: itemConfig?.label || item.name })] }), item.value && (_jsx("span", { className: "text-ink font-mono font-medium tabular-nums", children: item.value.toLocaleString() }))] })] })) }, item.dataKey));
82
+ }) })] }));
83
+ }));
84
+ ChartTooltipContent.displayName = 'ChartTooltip';
85
+ const ChartLegend = RechartsPrimitive.Legend;
86
+ const ChartLegendContent = React.memo(React.forwardRef(({ className, hideIcon = false, payload, verticalAlign = 'bottom', nameKey }, ref) => {
87
+ const { config } = useChart();
88
+ if (!payload?.length) {
89
+ return null;
90
+ }
91
+ return (_jsx("div", { ref: ref, className: cn('flex items-center justify-center gap-4', verticalAlign === 'top' ? 'pb-3' : 'pt-3', className), children: payload.map((item) => {
92
+ const key = `${nameKey || item.dataKey || 'value'}`;
93
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
94
+ return (_jsxs("div", { className: cn('[&>svg]:text-ink-subtle flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3'), children: [itemConfig?.icon && !hideIcon ? (_jsx(itemConfig.icon, {})) : (_jsx("div", { className: "h-2 w-2 shrink-0 rounded-(--radius-xs)", style: {
95
+ backgroundColor: item.color,
96
+ } })), itemConfig?.label] }, item.value));
97
+ }) }));
98
+ }));
99
+ ChartLegendContent.displayName = 'ChartLegend';
100
+ // Helper to extract item config from a payload.
101
+ function getPayloadConfigFromPayload(config, payload, key) {
102
+ if (typeof payload !== 'object' || payload === null) {
103
+ return undefined;
104
+ }
105
+ const payloadPayload = 'payload' in payload && typeof payload.payload === 'object' && payload.payload !== null
106
+ ? payload.payload
107
+ : undefined;
108
+ let configLabelKey = key;
109
+ if (key in payload && typeof payload[key] === 'string') {
110
+ configLabelKey = payload[key];
111
+ }
112
+ else if (payloadPayload &&
113
+ key in payloadPayload &&
114
+ typeof payloadPayload[key] === 'string') {
115
+ configLabelKey = payloadPayload[key];
116
+ }
117
+ return configLabelKey in config ? config[configLabelKey] : config[key];
118
+ }
119
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
120
+ //# sourceMappingURL=Chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chart.js","sourceRoot":"","sources":["../src/Chart.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,uCAAuC;AACvC,MAAM,MAAM,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAW,CAAC;AAgBrD,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAA2B,IAAI,CAAC,CAAC;AAEzE,SAAS,QAAQ;IACf,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAE/C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAC/B,KAAK,CAAC,UAAU,CAMd,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACvD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,EAAE,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AAE,KAAK,KAfb,IAAI,CAAC,KAAK,CAgBX,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CACH,CAAC;AACF,kBAAkB,CAAC,WAAW,GAAG,aAAa,CAAC;AAE/C,gDAAgD;AAChD,SAAS,2BAA2B,CAAC,MAAmB,EAAE,OAAgB,EAAE,GAAW;IACrF,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACpD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,cAAc,GAClB,SAAS,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI;QACrF,CAAC,CAAC,OAAO,CAAC,OAAO;QACjB,CAAC,CAAC,SAAS,CAAC;IAEhB,IAAI,cAAc,GAAW,GAAG,CAAC;IAEjC,IAAI,GAAG,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,GAA2B,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC/E,cAAc,GAAG,OAAO,CAAC,GAA2B,CAAW,CAAC;IAClE,CAAC;SAAM,IACL,cAAc;QACd,GAAG,IAAI,cAAc;QACrB,OAAO,cAAc,CAAC,GAAkC,CAAC,KAAK,QAAQ,EACtE,CAAC;QACD,cAAc,GAAG,cAAc,CAAC,GAAkC,CAAW,CAAC;IAChF,CAAC;IAED,OAAO,cAAc,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAA0B,CAAC,CAAC;AAChG,CAAC;AAED,OAAO,EACL,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,UAAU,GACX,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
+ export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ //# sourceMappingURL=Checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../src/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAK9D,eAAO,MAAM,QAAQ,iKAqBnB,CAAC"}
@@ -0,0 +1,10 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
5
+ import { Check } from 'lucide-react';
6
+ import { cn } from './lib/utils.js';
7
+ export const Checkbox = React.forwardRef(function Checkbox({ className, ...props }, ref) {
8
+ return (_jsx(CheckboxPrimitive.Root, { ref: ref, "data-slot": "checkbox", className: cn('peer h-4 w-4 shrink-0 rounded-sm border border-[color:var(--border-strong)] bg-[color:var(--bg-input)]', 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring', 'disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-brand data-[state=checked]:bg-brand data-[state=checked]:text-on-brand', className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: _jsx(Check, { className: "h-3.5 w-3.5" }) }) }));
9
+ });
10
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../src/Checkbox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAGtC,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IAC9C,OAAO,CACL,KAAC,iBAAiB,CAAC,IAAI,IACrB,GAAG,EAAE,GAAG,eACE,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,wGAAwG,EACxG,mFAAmF,EACnF,oJAAoJ,EACpJ,SAAS,CACV,KACG,KAAK,YAET,KAAC,iBAAiB,CAAC,SAAS,IAAC,SAAS,EAAC,+CAA+C,YACpF,KAAC,KAAK,IAAC,SAAS,EAAC,aAAa,GAAG,GACL,GACP,CAC1B,CAAC;AACJ,CAAC,CAAC,CAAC"}