@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
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from 'class-variance-authority';
3
+ import { cn } from './lib/utils.js';
4
+ /**
5
+ * Checkpoint · StatusDot
6
+ *
7
+ * A 6px circle in a status tone. A dot alone carries no words, so it sits
8
+ * beside a label (`<StatusText dot>`) or takes a `label` of its own, which
9
+ * makes it an image with that accessible name. Without one it is hidden from
10
+ * assistive tech.
11
+ *
12
+ * `live` adds one soft ring that scales out and fades. Use it only when the
13
+ * data is streaming right now or the state needs the user now. Steady states
14
+ * (connected, configured, healthy, idle) are a still dot. The ring holds
15
+ * still under `prefers-reduced-motion`.
16
+ *
17
+ * <StatusDot tone="allow" />
18
+ * <StatusDot tone="signal" live label="Streaming" />
19
+ */
20
+ /** The status tones, named after the semantic tokens they read. Shared with StatusText. */
21
+ export const STATUS_TONES = [
22
+ 'allow',
23
+ 'deny',
24
+ 'warn',
25
+ 'info',
26
+ 'signal',
27
+ 'brand',
28
+ 'neutral',
29
+ ];
30
+ const statusDotVariants = cva('relative inline-flex size-1.5 shrink-0 rounded-full', {
31
+ variants: {
32
+ tone: {
33
+ allow: 'bg-[color:var(--allow)]',
34
+ deny: 'bg-[color:var(--deny)]',
35
+ warn: 'bg-[color:var(--warn)]',
36
+ info: 'bg-[color:var(--info)]',
37
+ signal: 'bg-[color:var(--signal)]',
38
+ brand: 'bg-[color:var(--brand)]',
39
+ // The dot always sits beside words, so neutral can be one step quieter than neutral text.
40
+ neutral: 'bg-[color:var(--fg-tertiary)]',
41
+ },
42
+ },
43
+ defaultVariants: { tone: 'neutral' },
44
+ });
45
+ export function StatusDot({ tone = 'neutral', live = false, label, className }) {
46
+ const accessibility = label
47
+ ? { role: 'img', 'aria-label': label }
48
+ : { 'aria-hidden': true };
49
+ return (_jsx("span", { ...accessibility, "data-slot": "status-dot", "data-tone": tone, className: cn(statusDotVariants({ tone }), className), children: live ? (_jsx("span", { "aria-hidden": true, "data-slot": "status-dot-ring",
50
+ // bg-inherit keeps the ring in the dot's tone without repeating the tone map.
51
+ // opacity-0 hides it at rest, so under reduced motion only the still dot shows;
52
+ // the keyframes own its opacity while it runs.
53
+ className: "pointer-events-none absolute inset-0 rounded-full bg-inherit opacity-0 animate-status-ring motion-reduce:animate-none" })) : null }));
54
+ }
55
+ //# sourceMappingURL=StatusDot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusDot.js","sourceRoot":"","sources":["../src/StatusDot.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC;;;;;;;;;;;;;;;GAeG;AAEH,2FAA2F;AAC3F,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;IACR,OAAO;IACP,SAAS;CACD,CAAC;AAIX,MAAM,iBAAiB,GAAG,GAAG,CAAC,qDAAqD,EAAE;IACnF,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,KAAK,EAAE,yBAAyB;YAChC,IAAI,EAAE,wBAAwB;YAC9B,IAAI,EAAE,wBAAwB;YAC9B,IAAI,EAAE,wBAAwB;YAC9B,MAAM,EAAE,0BAA0B;YAClC,KAAK,EAAE,yBAAyB;YAChC,0FAA0F;YAC1F,OAAO,EAAE,+BAA+B;SACzC;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CAAC,CAAC;AAWH,MAAM,UAAU,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,IAAI,GAAG,KAAK,EAAE,KAAK,EAAE,SAAS,EAAkB;IAC5F,MAAM,aAAa,GAAG,KAAK;QACzB,CAAC,CAAE,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAY;QACjD,CAAC,CAAE,EAAE,aAAa,EAAE,IAAI,EAAY,CAAC;IAEvC,OAAO,CACL,kBACM,aAAa,eACP,YAAY,eACX,IAAI,EACf,SAAS,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,YAEpD,IAAI,CAAC,CAAC,CAAC,CACN,iDAEY,iBAAiB;YAC3B,8EAA8E;YAC9E,gFAAgF;YAChF,+CAA+C;YAC/C,SAAS,EAAC,uHAAuH,GACjI,CACH,CAAC,CAAC,CAAC,IAAI,GACH,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { type StatusTone } from './StatusDot.js';
3
+ export interface StatusTextProps extends React.HTMLAttributes<HTMLSpanElement> {
4
+ tone?: StatusTone;
5
+ /** Both sizes are 12px text. `sm` tightens the gap and the glyph for dense rows. */
6
+ size?: 'sm' | 'md';
7
+ /** Leads with a StatusDot in the same tone. */
8
+ dot?: boolean;
9
+ /** Passed to the dot: the slow ring for live data. Has no effect without `dot`. */
10
+ live?: boolean;
11
+ /** A leading glyph, such as a verdict icon. A direct `<svg>` is sized to the text. Not rendered with `dot`. */
12
+ icon?: React.ReactNode;
13
+ }
14
+ export declare function StatusText({ tone, size, dot, live, icon, className, children, ...rest }: StatusTextProps): React.JSX.Element;
15
+ //# sourceMappingURL=StatusText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusText.d.ts","sourceRoot":"","sources":["../src/StatusText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAa,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AA+C5D,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IAC5E,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,oFAAoF;IACpF,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,+CAA+C;IAC/C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,mFAAmF;IACnF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+GAA+G;IAC/G,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAgB,EAChB,IAAW,EACX,GAAW,EACX,IAAY,EACZ,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,eAAe,qBAajB"}
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cva } from 'class-variance-authority';
4
+ import { cn } from './lib/utils.js';
5
+ import { StatusDot } from './StatusDot.js';
6
+ /**
7
+ * Checkpoint · StatusText
8
+ *
9
+ * A status read as its tone color: the label, optionally led by a 6px
10
+ * `StatusDot` or a glyph. There is no border, fill, padding or radius, so
11
+ * under a column header it is the bare value and it never reads as a button.
12
+ * The words carry the state; the color and the mark only reinforce them. The
13
+ * type is the 12px step in the UI family, whatever the surrounding text is,
14
+ * so a status reads the same in a mono table row and in a sans header.
15
+ *
16
+ * Use `Pill` for the locked verdict vocabulary (it renders through this),
17
+ * `Tag` for a category, and `Badge` for a count.
18
+ *
19
+ * <StatusText tone="allow">Verified</StatusText>
20
+ * <StatusText tone="warn" dot>Degraded</StatusText>
21
+ * <StatusText tone="signal" dot live>Live</StatusText>
22
+ * <StatusText tone="deny" icon={<XIcon />}>Blocked</StatusText>
23
+ */
24
+ const statusTextVariants = cva('inline-flex items-center whitespace-nowrap font-checkpoint-sans text-xs font-medium tabular-nums [&>svg]:shrink-0', {
25
+ variants: {
26
+ tone: {
27
+ allow: 'text-allow-text',
28
+ deny: 'text-deny-text',
29
+ warn: 'text-warn-text',
30
+ info: 'text-info-text',
31
+ signal: 'text-signal-text',
32
+ // --brand reads 2.3:1 on the dark canvas; --brand-text is the brand step
33
+ // that clears 4.5:1 as text in both modes.
34
+ brand: 'text-[color:var(--brand-text)]',
35
+ // Secondary, not tertiary: a status has to stay legible at a glance.
36
+ neutral: 'text-[color:var(--fg-secondary)]',
37
+ },
38
+ // Both sizes sit on the 12px floor; sm only tightens the gap and the glyph.
39
+ size: {
40
+ sm: 'gap-1 [&>svg]:size-2.5',
41
+ md: 'gap-1.5 [&>svg]:size-3',
42
+ },
43
+ },
44
+ defaultVariants: { tone: 'neutral', size: 'md' },
45
+ });
46
+ export function StatusText({ tone = 'neutral', size = 'md', dot = false, live = false, icon, className, children, ...rest }) {
47
+ return (_jsxs("span", { ...rest, "data-slot": "status-text", "data-tone": tone, "data-size": size, className: cn(statusTextVariants({ tone, size }), className), children: [dot ? _jsx(StatusDot, { tone: tone, live: live }) : icon, children] }));
48
+ }
49
+ //# sourceMappingURL=StatusText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusText.js","sourceRoot":"","sources":["../src/StatusText.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,kBAAkB,GAAG,GAAG,CAC5B,mHAAmH,EACnH;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,kBAAkB;YAC1B,yEAAyE;YACzE,2CAA2C;YAC3C,KAAK,EAAE,gCAAgC;YACvC,qEAAqE;YACrE,OAAO,EAAE,kCAAkC;SAC5C;QACD,4EAA4E;QAC5E,IAAI,EAAE;YACJ,EAAE,EAAE,wBAAwB;YAC5B,EAAE,EAAE,wBAAwB;SAC7B;KACF;IACD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE;CACjD,CACF,CAAC;AAcF,MAAM,UAAU,UAAU,CAAC,EACzB,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,IAAI,EACX,GAAG,GAAG,KAAK,EACX,IAAI,GAAG,KAAK,EACZ,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACS;IAChB,OAAO,CACL,mBACM,IAAI,eACE,aAAa,eACZ,IAAI,eACJ,IAAI,EACf,SAAS,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,aAE3D,GAAG,CAAC,CAAC,CAAC,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,EAClD,QAAQ,IACJ,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,47 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Checkpoint · Switch
4
+ *
5
+ * Boolean toggle. Track 36×20, thumb 16×16, brand-fill on / surf-2
6
+ * off, animated thumb slide via the `--duration-base` easing curve.
7
+ *
8
+ * The SSOT v5 spec calls for 28×16 / 12×12; we ship one tier larger
9
+ * because the smaller proportions read as muted UI in the checkpoint
10
+ * context and conflict with the "deliberate state" doctrine. Treat
11
+ * 36×20 as our working spec — same deviation captured on the audit
12
+ * page.
13
+ *
14
+ * Controlled component — caller owns `checked` + `onCheckedChange`.
15
+ * Optional `label` renders inline-right of the track so the touch
16
+ * target includes the label, mirroring how toggle rows feel on
17
+ * mobile.
18
+ *
19
+ * Usage:
20
+ *
21
+ * const [on, setOn] = useState(false);
22
+ *
23
+ * <Switch checked={on} onCheckedChange={setOn} label="Shadow mode" />
24
+ *
25
+ * {/* label optional — use Field for separate label + helper *\/}
26
+ * <Field label="Notifications" hint="Pings the team's Slack on incidents.">
27
+ * <Switch checked={notif} onCheckedChange={setNotif} />
28
+ * </Field>
29
+ */
30
+ export interface SwitchProps {
31
+ checked: boolean;
32
+ onCheckedChange: (next: boolean) => void;
33
+ /** Optional inline label rendered to the right of the track. */
34
+ label?: React.ReactNode;
35
+ disabled?: boolean;
36
+ className?: string;
37
+ /** Accessibility label when no visible label is rendered. */
38
+ 'aria-label'?: string;
39
+ /** Names the switch by another element's id. */
40
+ 'aria-labelledby'?: string;
41
+ /** For a form that moves focus to the switch or links it to a message. */
42
+ id?: string;
43
+ 'aria-describedby'?: string;
44
+ 'aria-invalid'?: boolean;
45
+ }
46
+ export declare function Switch({ checked, onCheckedChange, label, disabled, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, id, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, }: SwitchProps): React.JSX.Element;
47
+ //# sourceMappingURL=Switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../src/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,gEAAgE;IAChE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,eAAe,EACf,KAAK,EACL,QAAgB,EAChB,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,EAAE,EACF,kBAAkB,EAAE,eAAe,EACnC,cAAc,EAAE,WAAW,GAC5B,EAAE,WAAW,qBAmDb"}
package/dist/Switch.js ADDED
@@ -0,0 +1,17 @@
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
+ export function Switch({ checked, onCheckedChange, label, disabled = false, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, id, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, }) {
5
+ return (_jsxs("button", { type: "button", role: "switch", id: id, "aria-checked": checked, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, disabled: disabled, onClick: () => onCheckedChange(!checked), className: cn('inline-flex items-center gap-2.5', 'bg-transparent border-0 p-0 m-0', 'cursor-pointer disabled:cursor-not-allowed disabled:opacity-50', 'font-sans text-[length:var(--text-control)] text-[var(--fg-primary)]', className), children: [_jsx("span", { "aria-hidden": true, className: cn('inline-block relative shrink-0', 'w-9 h-5 rounded-full',
6
+ // The track itself; brand fill when on, surf-2 when off.
7
+ // box-shadow doubles as a thin border ring so the off state
8
+ // has visible edges against dark canvases (the surf-2 fill
9
+ // alone is too low-contrast at rest).
10
+ checked
11
+ ? 'bg-brand shadow-[0_0_0_1px_var(--brand-line)]'
12
+ : 'bg-[var(--surface-default)] shadow-[0_0_0_1px_var(--border-subtle)]', 'transition-[background-color,box-shadow] duration-[var(--duration-base)] ease-[var(--ease-out)]'), children: _jsx("span", { "aria-hidden": true, className: cn('absolute top-0.5 w-4 h-4 rounded-full bg-[color:var(--switch-thumb)]', 'shadow-[var(--switch-thumb-shadow)]',
13
+ // Thumb slides from `left-0.5` (off) to `left-[18px]` (on).
14
+ // 18 = track width 36 - thumb width 16 - left inset 2.
15
+ checked ? 'left-[18px]' : 'left-0.5', 'transition-[left] duration-[var(--duration-base)] ease-[var(--ease-out)]') }) }), label ? _jsx("span", { children: label }) : null] }));
16
+ }
17
+ //# sourceMappingURL=Switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../src/Switch.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAgDpC,MAAM,UAAU,MAAM,CAAC,EACrB,OAAO,EACP,eAAe,EACf,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,EAAE,EACF,kBAAkB,EAAE,eAAe,EACnC,cAAc,EAAE,WAAW,GACf;IACZ,OAAO,CACL,kBACE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,EAAE,EAAE,EAAE,kBACQ,OAAO,gBACT,SAAS,qBACJ,cAAc,sBACb,eAAe,kBACnB,WAAW,EACzB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,EACxC,SAAS,EAAE,EAAE,CACX,kCAAkC,EAClC,iCAAiC,EACjC,gEAAgE,EAChE,sEAAsE,EACtE,SAAS,CACV,aAED,oCAEE,SAAS,EAAE,EAAE,CACX,gCAAgC,EAChC,sBAAsB;gBACtB,yDAAyD;gBACzD,4DAA4D;gBAC5D,2DAA2D;gBAC3D,sCAAsC;gBACtC,OAAO;oBACL,CAAC,CAAC,+CAA+C;oBACjD,CAAC,CAAC,qEAAqE,EACzE,iGAAiG,CAClG,YAED,oCAEE,SAAS,EAAE,EAAE,CACX,sEAAsE,EACtE,qCAAqC;oBACrC,4DAA4D;oBAC5D,uDAAuD;oBACvD,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,EACpC,0EAA0E,CAC3E,GACD,GACG,EACN,KAAK,CAAC,CAAC,CAAC,yBAAO,KAAK,GAAQ,CAAC,CAAC,CAAC,IAAI,IAC7B,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The data table: hairline dividers on a transparent ground, mono caps
4
+ * column heads. These classes are the whole look, so a registry consumer's
5
+ * table matches Checkpoint's. Checkpoint also styles every bare table element
6
+ * (its styles/checkpoint/tables.css); its values match these, and its
7
+ * !important rules win where a caller's className differs.
8
+ */
9
+ export declare function Table({ className, containerClassName, ...props }: React.ComponentProps<'table'> & {
10
+ /** Classes for the scroll wrapper, e.g. `overflow-visible` when an outer box scrolls. */
11
+ containerClassName?: string;
12
+ }): React.JSX.Element;
13
+ export declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): React.JSX.Element;
14
+ export declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): React.JSX.Element;
15
+ export declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): React.JSX.Element;
16
+ export declare function TableRow({ className, ...props }: React.ComponentProps<'tr'>): React.JSX.Element;
17
+ export declare function TableHead({ className, ...props }: React.ComponentProps<'th'>): React.JSX.Element;
18
+ /** Mark an empty-state cell with `data-empty-cell` for the taller, muted
19
+ * empty look. */
20
+ export declare function TableCell({ className, ...props }: React.ComponentProps<'td'>): React.JSX.Element;
21
+ export declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): React.JSX.Element;
22
+ //# sourceMappingURL=Table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,kBAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG;IACjC,yFAAyF;IACzF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,qBAgBA;AACD,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAQjF;AACD,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAE/E;AACD,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAWjF;AACD,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAW3E;AACD,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAY5E;AACD;iBACiB;AACjB,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAW5E;AACD,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,qBASpF"}
package/dist/Table.js ADDED
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import { cn } from './lib/utils.js';
5
+ /**
6
+ * The data table: hairline dividers on a transparent ground, mono caps
7
+ * column heads. These classes are the whole look, so a registry consumer's
8
+ * table matches Checkpoint's. Checkpoint also styles every bare table element
9
+ * (its styles/checkpoint/tables.css); its values match these, and its
10
+ * !important rules win where a caller's className differs.
11
+ */
12
+ export function Table({ className, containerClassName, ...props }) {
13
+ return (_jsx("div", { "data-slot": "table-container", className: cn('relative w-full overflow-x-auto', containerClassName), children: _jsx("table", { "data-slot": "table", className: cn('w-full caption-bottom font-[family-name:var(--font-ui)] text-sm tabular-nums', className), ...props }) }));
14
+ }
15
+ export function TableHeader({ className, ...props }) {
16
+ return (_jsx("thead", { "data-slot": "table-header", className: cn('[&_tr]:border-b [&_tr]:border-[color:var(--border-subtle)]', className), ...props }));
17
+ }
18
+ export function TableBody({ className, ...props }) {
19
+ return _jsx("tbody", { "data-slot": "table-body", className: className, ...props });
20
+ }
21
+ export function TableFooter({ className, ...props }) {
22
+ return (_jsx("tfoot", { "data-slot": "table-footer", className: cn('border-t border-[color:var(--border-default)] bg-[color:var(--surface-default)] font-medium', className), ...props }));
23
+ }
24
+ export function TableRow({ className, ...props }) {
25
+ return (_jsx("tr", { "data-slot": "table-row", className: cn('border-b border-[color:var(--border-subtle)] transition-colors hover:bg-[color:var(--surface-subtle)] data-[state=selected]:bg-[color:var(--surface-strong)]', className), ...props }));
26
+ }
27
+ export function TableHead({ className, ...props }) {
28
+ return (_jsx("th", { "data-slot": "table-head", className: cn(
29
+ // Tertiary, not muted: muted is under 4.5:1 on hovered and most tinted dark grounds.
30
+ 'h-8 px-4 py-2 text-left align-middle font-mono text-[length:var(--text-mono)] font-medium leading-4 uppercase tracking-wide text-[color:var(--fg-tertiary)]', className), ...props }));
31
+ }
32
+ /** Mark an empty-state cell with `data-empty-cell` for the taller, muted
33
+ * empty look. */
34
+ export function TableCell({ className, ...props }) {
35
+ return (_jsx("td", { "data-slot": "table-cell", className: cn('px-4 py-1.5 align-middle text-sm text-[color:var(--fg-primary)] data-empty-cell:py-6 data-empty-cell:text-[color:var(--fg-tertiary)]', className), ...props }));
36
+ }
37
+ export function TableCaption({ className, ...props }) {
38
+ return (_jsx("caption", { "data-slot": "table-caption",
39
+ // Tertiary, not muted: muted is under 4.5:1 on hovered and most tinted dark grounds.
40
+ className: cn('mt-4 text-sm text-[color:var(--fg-tertiary)]', className), ...props }));
41
+ }
42
+ //# sourceMappingURL=Table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.js","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,UAAU,KAAK,CAAC,EACpB,SAAS,EACT,kBAAkB,EAClB,GAAG,KAAK,EAIT;IACC,OAAO,CACL,2BACY,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,kBAAkB,CAAC,YAEpE,6BACY,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,8EAA8E,EAC9E,SAAS,CACV,KACG,KAAK,GACT,GACE,CACP,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IAChF,OAAO,CACL,6BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,4DAA4D,EAAE,SAAS,CAAC,KAClF,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IAC9E,OAAO,6BAAiB,YAAY,EAAC,SAAS,EAAE,SAAS,KAAM,KAAK,GAAI,CAAC;AAC3E,CAAC;AACD,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IAChF,OAAO,CACL,6BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,6FAA6F,EAC7F,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IAC1E,OAAO,CACL,0BACY,WAAW,EACrB,SAAS,EAAE,EAAE,CACX,8JAA8J,EAC9J,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IAC3E,OAAO,CACL,0BACY,YAAY,EACtB,SAAS,EAAE,EAAE;QACX,qFAAqF;QACrF,6JAA6J,EAC7J,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD;iBACiB;AACjB,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IAC3E,OAAO,CACL,0BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CACX,sIAAsI,EACtI,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAmC;IACnF,OAAO,CACL,+BACY,eAAe;QACzB,qFAAqF;QACrF,SAAS,EAAE,EAAE,CAAC,8CAA8C,EAAE,SAAS,CAAC,KACpE,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
package/dist/Tabs.d.ts ADDED
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Checkpoint · Tabs
3
+ *
4
+ * The canonical animated tab bar: a framer-motion underline that springs
5
+ * between the active segment's measured DOM offsets (the v1 "nice" animation,
6
+ * ported), sitting on a hairline track. The moving bar is the ONLY active
7
+ * indicator — no per-tab static border — so it can't read as a "double
8
+ * underline" (the failure mode of the earlier rejected attempt).
9
+ *
10
+ * Two modes:
11
+ * - controlled — pass `value` + `onValueChange`; renders <button role="tab">.
12
+ * - routed — give each item an `href`; renders a link so tabs drive the
13
+ * URL (nested-route tabs). Active state still comes from `value`
14
+ * (derive it from the pathname at the call site). The link is a
15
+ * plain <a> unless you pass your router's link as
16
+ * `linkComponent` (see TabLinkComponent).
17
+ *
18
+ * Casing-agnostic: `variant="ui"` (Inter, label as-passed; default) or
19
+ * `variant="mono"` (Geist Mono, uppercase tape label) — each surface keeps its
20
+ * own casing. Underline colour is `var(--tab-underline)` → cream on dark,
21
+ * violet on light (tokens.css), so it auto-swaps with the theme.
22
+ *
23
+ * Panels: each tab emits `id="${value}-tab"`. In controlled mode pair your panel
24
+ * with `aria-labelledby` that id (and, if you want full APG semantics, set
25
+ * `role="tabpanel"` + `aria-controls`). Routed mode intentionally omits tabpanel
26
+ * semantics — the panel is a separate route, not a controlled region.
27
+ *
28
+ * `badge` content is part of the tab's accessible name (a count chip reads as
29
+ * "Sessions 12"); wrap a purely decorative badge in `aria-hidden` yourself.
30
+ */
31
+ import * as React from 'react';
32
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
33
+ export interface TabItem {
34
+ /** Stable identifier; compared against `value` to find the active tab. */
35
+ value: string;
36
+ /** Visible label (string or node). Casing is the caller's — see `variant`. */
37
+ label: React.ReactNode;
38
+ /** Optional leading glyph, rendered in a 16×16 box before the label. */
39
+ icon?: React.ReactNode;
40
+ /** Optional trailing badge (count chip, "roadmap" tag, …). */
41
+ badge?: React.ReactNode;
42
+ /** Routed mode: the href this tab navigates to. Omit for controlled mode. */
43
+ href?: string;
44
+ /**
45
+ * Id of the tabpanel this tab controls. When set, the ACTIVE tab emits
46
+ * `aria-controls` (only the active one — inactive panels are often lazily
47
+ * mounted, so a static reference would dangle). Pair with a panel that has
48
+ * `role="tabpanel"` + `aria-labelledby="${value}-tab"`.
49
+ */
50
+ panelId?: string;
51
+ disabled?: boolean;
52
+ }
53
+ /** The props a routed tab passes to its link: the href, the ref and the tab's ARIA, focus and style props. */
54
+ export type TabLinkProps = React.ComponentPropsWithRef<'a'> & {
55
+ href: string;
56
+ };
57
+ /**
58
+ * The link a routed tab renders. Without one, a routed tab is a plain <a> and
59
+ * navigates with a full page load. Pass your router's link to navigate on the
60
+ * client. With next/link, wrap it so a tab switch keeps the scroll position:
61
+ *
62
+ * const TabLink = (props: TabLinkProps) => <Link scroll={false} {...props} />;
63
+ * <AnimatedTabs linkComponent={TabLink} ... />
64
+ */
65
+ export type TabLinkComponent = React.ComponentType<TabLinkProps>;
66
+ export interface AnimatedTabsProps {
67
+ items: ReadonlyArray<TabItem>;
68
+ /** The active tab's `value` (controlled, or derived from the route). */
69
+ value: string;
70
+ /** Controlled mode: fired when a tab is activated. Ignored in routed mode. */
71
+ onValueChange?: (value: string) => void;
72
+ /** Accessible name for the tablist. */
73
+ ariaLabel: string;
74
+ /** `ui` = Inter, label as-passed (default). `mono` = Geist Mono uppercase tape. */
75
+ variant?: 'ui' | 'mono';
76
+ /** Routed mode: the link each tab renders. Defaults to a plain <a>. */
77
+ linkComponent?: TabLinkComponent;
78
+ className?: string;
79
+ }
80
+ /** Neutral mono count chip for a tab `badge` — one style for every tab strip. */
81
+ export declare function TabCount({ value }: {
82
+ value: number | string;
83
+ }): React.JSX.Element;
84
+ export declare function AnimatedTabs({ items, value, onValueChange, ariaLabel, variant, linkComponent, className, }: AnimatedTabsProps): React.JSX.Element;
85
+ interface TabsRootProps extends React.ComponentProps<typeof TabsPrimitive.Root> {
86
+ /** Opt this subtree out of the app-wide underline compatibility treatment. */
87
+ hideUnderline?: boolean;
88
+ }
89
+ export declare function Tabs({ className, hideUnderline, value, defaultValue, onValueChange, ...props }: TabsRootProps): React.JSX.Element;
90
+ export declare function TabsList({ className, ref, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): React.JSX.Element;
91
+ export declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger> & {
92
+ hideFocusRing?: boolean;
93
+ }): React.JSX.Element;
94
+ export declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): React.JSX.Element;
95
+ export {};
96
+ //# sourceMappingURL=Tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../src/Tabs.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAYtD,MAAM,WAAW,OAAO;IACtB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,wEAAwE;IACxE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,8GAA8G;AAC9G,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9B,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,uEAAuE;IACvE,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,iFAAiF;AACjF,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,qBAgB7D;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,KAAK,EACL,aAAa,EACb,SAAS,EACT,OAAc,EACd,aAAa,EACb,SAAS,GACV,EAAE,iBAAiB,qBAyQnB;AAED,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC;IAC7E,8EAA8E;IAC9E,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,IAAI,CAAC,EACnB,SAAS,EACT,aAAqB,EACrB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,GAAG,KAAK,EACT,EAAE,aAAa,qBAoBf;AAED,wBAAgB,QAAQ,CAAC,EACvB,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,qBA4DjD;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,GAAG;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,qBAiBlF;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,qBAQpD"}