@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,85 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * Checkpoint · SegmentedControl
5
+ *
6
+ * Rounded container on the button radius (`--radius-btn`) with a raised
7
+ * active thumb whose radius nests inside the track: the thumb sits 5px in
8
+ * (1px border + 4px padding), so it uses `--radius-btn` minus 5px and the
9
+ * gap stays even around the corners. Used for binary or 3-way mode switches:
10
+ *
11
+ * - Sign in / Sign up
12
+ * - Light / Dark
13
+ * - Day / Week / Month / All
14
+ *
15
+ * Strongly typed by the value union so callers get type-checked
16
+ * options + onChange. The component is keyboard-navigable (arrow
17
+ * keys cycle through options) without bringing in a roving-tabindex
18
+ * library — the option buttons are real <button> elements.
19
+ *
20
+ * NOT for tabs that paint different content surfaces (use Tabs for
21
+ * that). Segmented control is for "switch the parameter on the
22
+ * surface I'm already looking at."
23
+ */
24
+ import * as React from 'react';
25
+ import { cn } from './lib/utils.js';
26
+ export function SegmentedControl({ value, onChange, options, label, className, disabled = false, }) {
27
+ // Hold a ref per option so arrow-key navigation can move DOM focus
28
+ // along with the value change. Without this, the focused element
29
+ // stays on the previously-selected button while `value` updates —
30
+ // tabbing onward would then exit from the wrong index, breaking
31
+ // the radiogroup focus model. The ref map is rebuilt on every
32
+ // render but keys by `opt.value`, which is stable across renders
33
+ // as long as the caller's options array is stable.
34
+ const buttonRefs = React.useRef(new Map());
35
+ // Arrow-key navigation moves the active option without losing
36
+ // focus on the control. Mirrors how native radio groups behave —
37
+ // both horizontal AND vertical axes per the ARIA radiogroup
38
+ // pattern (some users navigate with up/down by default; assistive
39
+ // tech can configure either axis). Treat Left/Up as "previous",
40
+ // Right/Down as "next".
41
+ const handleKey = (e) => {
42
+ if (disabled)
43
+ return;
44
+ let delta = 0;
45
+ if (e.key === 'ArrowLeft' || e.key === 'ArrowUp')
46
+ delta = -1;
47
+ else if (e.key === 'ArrowRight' || e.key === 'ArrowDown')
48
+ delta = 1;
49
+ else
50
+ return;
51
+ e.preventDefault();
52
+ const idx = options.findIndex((opt) => opt.value === value);
53
+ if (idx === -1)
54
+ return;
55
+ const next = options[(idx + delta + options.length) % options.length];
56
+ onChange(next.value);
57
+ // Move DOM focus to the new option so subsequent Tab presses
58
+ // continue the natural focus order from the right place.
59
+ buttonRefs.current.get(next.value)?.focus();
60
+ };
61
+ return (_jsx("div", { role: "radiogroup", "aria-label": label, onKeyDown: handleKey, "aria-disabled": disabled || undefined, className: cn('inline-flex gap-1 rounded-[var(--radius-btn)] border border-border-subtle bg-[var(--surface-subtle)] p-1', disabled && 'cursor-not-allowed opacity-50', className), children: options.map((opt) => {
62
+ const selected = opt.value === value;
63
+ return (_jsx("button", { ref: (el) => {
64
+ if (el)
65
+ buttonRefs.current.set(opt.value, el);
66
+ else
67
+ buttonRefs.current.delete(opt.value);
68
+ }, type: "button", disabled: disabled, role: "radio", "aria-checked": selected, tabIndex: selected ? 0 : -1, onClick: () => onChange(opt.value), className: cn('h-8 rounded-[calc(var(--radius-btn)-5px)] px-4 text-[length:var(--text-control)] transition-colors', 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',
69
+ // Active must be LIGHTER than the track, not darker — the old
70
+ // `bg-canvas` (#06080b) inside the `bg-surface` (#0a0d12)
71
+ // container was a ~1.5% lightness delta, effectively
72
+ // invisible on dark. `--surface-default` is the same
73
+ // translucent-white overlay token the sheet's `.cp-seg` and
74
+ // activity's WindowSelector already use for their active
75
+ // segment (see sheet.css `.cp-seg button.on` /
76
+ // activity-page-client.tsx `WindowSelector`). In light theme
77
+ // `--surface-default` is a faint ink tint over paper
78
+ // (rgba(15,15,25,.04)) — still a visible "raised chip" step
79
+ // up from the `--surface-subtle` track (rgba(15,15,25,.02)).
80
+ selected
81
+ ? 'bg-[var(--surface-default)] text-ink font-medium'
82
+ : 'font-normal text-ink-subtle hover:text-ink'), children: opt.label }, opt.value));
83
+ }) }));
84
+ }
85
+ //# sourceMappingURL=SegmentedControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.js","sourceRoot":"","sources":["../src/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAYpC,MAAM,UAAU,gBAAgB,CAAmB,EACjD,KAAK,EACL,QAAQ,EACR,OAAO,EACP,KAAK,EACL,SAAS,EACT,QAAQ,GAAG,KAAK,GACS;IACzB,mEAAmE;IACnE,iEAAiE;IACjE,kEAAkE;IAClE,gEAAgE;IAChE,8DAA8D;IAC9D,iEAAiE;IACjE,mDAAmD;IACnD,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAmC,IAAI,GAAG,EAAE,CAAC,CAAC;IAE7E,8DAA8D;IAC9D,iEAAiE;IACjE,4DAA4D;IAC5D,kEAAkE;IAClE,gEAAgE;IAChE,wBAAwB;IACxB,MAAM,SAAS,GAAG,CAAC,CAAsC,EAAE,EAAE;QAC3D,IAAI,QAAQ;YAAE,OAAO;QACrB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,CAAC,CAAC,GAAG,KAAK,WAAW,IAAI,CAAC,CAAC,GAAG,KAAK,SAAS;YAAE,KAAK,GAAG,CAAC,CAAC,CAAC;aACxD,IAAI,CAAC,CAAC,GAAG,KAAK,YAAY,IAAI,CAAC,CAAC,GAAG,KAAK,WAAW;YAAE,KAAK,GAAG,CAAC,CAAC;;YAC/D,OAAO;QACZ,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,MAAM,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,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,mFAAmF;gBACnF,8DAA8D;gBAC9D,0DAA0D;gBAC1D,qDAAqD;gBACrD,qDAAqD;gBACrD,4DAA4D;gBAC5D,yDAAyD;gBACzD,+CAA+C;gBAC/C,6DAA6D;gBAC7D,qDAAqD;gBACrD,4DAA4D;gBAC5D,6DAA6D;gBAC7D,QAAQ;oBACN,CAAC,CAAC,kDAAkD;oBACpD,CAAC,CAAC,4CAA4C,CACjD,YAEA,GAAG,CAAC,KAAK,IA9BL,GAAG,CAAC,KAAK,CA+BP,CACV,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ import * as SelectPrimitive from '@radix-ui/react-select';
3
+ export type SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>;
4
+ export declare function Select(props: SelectProps): React.JSX.Element;
5
+ export declare function SelectGroup(props: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
6
+ export declare function SelectValue(props: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
7
+ export declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
8
+ size?: 'sm' | 'default';
9
+ }): React.JSX.Element;
10
+ export declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
11
+ export declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element;
12
+ export declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
13
+ export declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): React.JSX.Element;
14
+ export declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.JSX.Element;
15
+ export declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.JSX.Element;
16
+ export interface NativeSelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
17
+ /** Visually hide the chevron — for select-inside-button compositions. */
18
+ hideChevron?: boolean;
19
+ }
20
+ export declare const NativeSelect: React.ForwardRefExoticComponent<NativeSelectProps & React.RefAttributes<HTMLSelectElement>>;
21
+ //# sourceMappingURL=Select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAM1D,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAE5E,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,qBAExC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAEpF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAEpF;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,IAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CAAE,qBAoBpF;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,QAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,qBAgCtD;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBASpD;AAED,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAoBnD;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,qBAOxD;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,cAAc,CAAC,qBAS7D;AAED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,gBAAgB,CAAC,qBAS/D;AAED,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACtF,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,6FAmCxB,CAAC"}
package/dist/Select.js ADDED
@@ -0,0 +1,52 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import * as SelectPrimitive from '@radix-ui/react-select';
5
+ import { Check, ChevronDown, ChevronUp } from 'lucide-react';
6
+ import { cn } from './lib/utils.js';
7
+ import { useThemeScope } from './theme-scope.js';
8
+ export function Select(props) {
9
+ return _jsx(SelectPrimitive.Root, { ...props });
10
+ }
11
+ export function SelectGroup(props) {
12
+ return _jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
13
+ }
14
+ export function SelectValue(props) {
15
+ return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
16
+ }
17
+ export function SelectTrigger({ className, size = 'default', children, ...props }) {
18
+ return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn('flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-[var(--radius-md)] border border-[color:var(--border-default)]', 'bg-[color:var(--bg-input)] px-3 text-sm text-[color:var(--fg-primary)]', 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:opacity-50', 'data-[size=default]:h-9 data-[size=sm]:h-8 [&_svg]:shrink-0', className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "size-4 text-[color:var(--fg-muted)]" }) })] }));
19
+ }
20
+ export function SelectContent({ className, children, position = 'popper', ...props }) {
21
+ const scope = useThemeScope();
22
+ return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { "data-slot": "select-content", "data-theme": scope.theme, position: position, className: cn(scope.mode, 'box-border max-w-[min(var(--radix-select-content-available-width,100vw),100vw)] whitespace-normal [overflow-wrap:anywhere]', 'relative z-50 max-h-[var(--radix-select-content-available-height)] min-w-32 overflow-hidden rounded-[var(--radius-md)]', 'border border-[color:var(--border-default)] bg-[color:var(--bg-elevated)] text-[color:var(--fg-primary)] shadow-[var(--shadow-md)]', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', className), ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn('p-1', position === 'popper' &&
23
+ 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'), children: children }), _jsx(SelectScrollDownButton, {})] }) }));
24
+ }
25
+ export function SelectLabel({ className, ...props }) {
26
+ return (_jsx(SelectPrimitive.Label
27
+ // Tertiary ink, like DropdownMenuLabel: muted clears the dark menu by only
28
+ // 0.04 (4.54:1).
29
+ , {
30
+ // Tertiary ink, like DropdownMenuLabel: muted clears the dark menu by only
31
+ // 0.04 (4.54:1).
32
+ className: cn('px-2 py-1.5 text-xs text-[color:var(--fg-tertiary)]', className), ...props }));
33
+ }
34
+ export function SelectItem({ className, children, ...props }) {
35
+ return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn('relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-[color:var(--surface-default)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx("span", { className: "absolute right-2 grid size-4 place-items-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "size-4" }) }) }), _jsx("span", { className: "min-w-0 max-w-[calc(100%_-_1.5rem)]", children: _jsx(SelectPrimitive.ItemText, { children: children }) })] }));
36
+ }
37
+ export function SelectSeparator({ className, ...props }) {
38
+ return (_jsx(SelectPrimitive.Separator, { className: cn('-mx-1 my-1 h-px bg-[color:var(--border-subtle)]', className), ...props }));
39
+ }
40
+ export function SelectScrollUpButton({ className, ...props }) {
41
+ return (_jsx(SelectPrimitive.ScrollUpButton, { className: cn('flex justify-center py-1', className), ...props, children: _jsx(ChevronUp, { className: "size-4" }) }));
42
+ }
43
+ export function SelectScrollDownButton({ className, ...props }) {
44
+ return (_jsx(SelectPrimitive.ScrollDownButton, { className: cn('flex justify-center py-1', className), ...props, children: _jsx(ChevronDown, { className: "size-4" }) }));
45
+ }
46
+ export const NativeSelect = React.forwardRef(function NativeSelect({ className, children, hideChevron = false, ...rest }, ref) {
47
+ return (_jsxs("span", { className: "relative inline-block w-full", children: [_jsx("select", { ref: ref, className: cn(
48
+ // Same chrome as Input — 34h, surf-1 fill, line border,
49
+ // radius-xs, focus → bg-1 lift and the --ring outline.
50
+ 'h-[34px] w-full appearance-none cursor-pointer', 'bg-[var(--surface-subtle)] text-[var(--fg-primary)]', 'border border-[color:var(--border-subtle)] rounded-[var(--radius-xs)]', 'font-sans text-[length:var(--text-control)]', 'pl-3', hideChevron ? 'pr-3' : 'pr-8', 'focus:bg-[var(--bg-surface)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring', 'disabled:opacity-50 disabled:cursor-not-allowed', 'transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]', className), ...rest, children: children }), hideChevron ? null : (_jsx("span", { "aria-hidden": true, className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 font-mono text-[length:var(--text-mono)] text-[var(--fg-tertiary)]", children: "\u25BE" }))] }));
51
+ });
52
+ //# sourceMappingURL=Select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.js","sourceRoot":"","sources":["../src/Select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,MAAM,UAAU,MAAM,CAAC,KAAkB;IACvC,OAAO,KAAC,eAAe,CAAC,IAAI,OAAK,KAAK,GAAI,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAyD;IACnF,OAAO,KAAC,eAAe,CAAC,KAAK,iBAAW,cAAc,KAAK,KAAK,GAAI,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAyD;IACnF,OAAO,KAAC,eAAe,CAAC,KAAK,iBAAW,cAAc,KAAK,KAAK,GAAI,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,EAC5B,SAAS,EACT,IAAI,GAAG,SAAS,EAChB,QAAQ,EACR,GAAG,KAAK,EAC2E;IACnF,OAAO,CACL,MAAC,eAAe,CAAC,OAAO,iBACZ,gBAAgB,eACf,IAAI,EACf,SAAS,EAAE,EAAE,CACX,wIAAwI,EACxI,wEAAwE,EACxE,uGAAuG,EACvG,6DAA6D,EAC7D,SAAS,CACV,KACG,KAAK,aAER,QAAQ,EACT,KAAC,e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,uDAAuD;gBACvD,gDAAgD,EAChD,qDAAqD,EACrD,uEAAuE,EACvE,6CAA6C,EAC7C,MAAM,EACN,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAC7B,gHAAgH,EAChH,iDAAiD,EACjD,0EAA0E,EAC1E,SAAS,CACV,KACG,IAAI,YAEP,QAAQ,GACF,EACR,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACpB,oCAEE,SAAS,EAAC,kIAAkI,uBAGvI,CACR,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+ export declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
4
+ //# sourceMappingURL=Separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAIhE,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,WAA0B,EAC1B,UAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,qBAetD"}
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
5
+ import { cn } from './lib/utils.js';
6
+ export function Separator({ className, orientation = 'horizontal', decorative = true, ...props }) {
7
+ return (_jsx(SeparatorPrimitive.Root, { "data-slot": "separator", decorative: decorative, orientation: orientation, className: cn('shrink-0 bg-[color:var(--border-subtle)]', 'data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full', 'data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px', className), ...props }));
8
+ }
9
+ //# sourceMappingURL=Separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.js","sourceRoot":"","sources":["../src/Separator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,UAAU,SAAS,CAAC,EACxB,SAAS,EACT,WAAW,GAAG,YAAY,EAC1B,UAAU,GAAG,IAAI,EACjB,GAAG,KAAK,EAC6C;IACrD,OAAO,CACL,KAAC,kBAAkB,CAAC,IAAI,iBACZ,WAAW,EACrB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,CACX,0CAA0C,EAC1C,yEAAyE,EACzE,qEAAqE,EACrE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,71 @@
1
+ import * as React from 'react';
2
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
3
+ /**
4
+ * Checkpoint · Sheet
5
+ *
6
+ * Side-anchored panel (right / left / top / bottom) wrapping the
7
+ * same Radix Dialog primitive `<Dialog>` uses, but with slide-in
8
+ * animation + edge positioning instead of centered modal chrome.
9
+ *
10
+ * Use for:
11
+ * - Detail sheets that slide in from the right (agent detail,
12
+ * session detail, event detail)
13
+ * - Navigation drawers that slide in from the left (mobile nav)
14
+ * - Settings / filter panels with a lot of content
15
+ *
16
+ * Mirrors the shadcn Sheet API (Sheet / SheetTrigger / SheetContent
17
+ * / SheetHeader / SheetTitle / SheetDescription / SheetFooter /
18
+ * SheetClose / SheetPortal / SheetOverlay) so existing consumers
19
+ * migrate via import-path swap.
20
+ *
21
+ * Chrome differs from <Dialog>:
22
+ *
23
+ * - No `--radius-lg` corners (edge-anchored — sliding from the
24
+ * viewport edge so a softened corner would look like a chip
25
+ * stuck to the side)
26
+ * - Fills the side axis (full height for left/right, full width
27
+ * for top/bottom)
28
+ * - Same `--bg-surface` + `--border-default` chrome as Dialog
29
+ * so the surfaces read as siblings, not different families
30
+ * - Slide-in animation with the same custom cubic-bezier the
31
+ * shadcn version uses — chosen because it has the right
32
+ * "settles into place" feel for panels (not the tooltip-y
33
+ * fade+zoom dialogs use)
34
+ *
35
+ * Usage:
36
+ *
37
+ * <Sheet open={open} onOpenChange={setOpen}>
38
+ * <SheetTrigger asChild><Button>Open</Button></SheetTrigger>
39
+ * <SheetContent side="right" className="w-[480px]">
40
+ * <SheetHeader>
41
+ * <SheetTitle>Agent detail</SheetTitle>
42
+ * <SheetDescription>ChatGPT · OpenAI</SheetDescription>
43
+ * </SheetHeader>
44
+ * …
45
+ * </SheetContent>
46
+ * </Sheet>
47
+ */
48
+ declare function Sheet(props: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
49
+ declare function SheetTrigger(props: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
50
+ declare function SheetClose(props: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
51
+ declare function SheetPortal(props: React.ComponentProps<typeof SheetPrimitive.Portal>): React.JSX.Element;
52
+ declare function SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>): React.JSX.Element;
53
+ interface SheetContentProps extends React.ComponentProps<typeof SheetPrimitive.Content> {
54
+ /**
55
+ * Which edge the sheet anchors to. `right` is the dashboard's
56
+ * canonical detail-sheet edge; `left` is the mobile-nav drawer
57
+ * edge; `top` / `bottom` are rarer (filter panels, command
58
+ * palettes).
59
+ */
60
+ side?: 'top' | 'right' | 'bottom' | 'left';
61
+ /** Hide the built-in X close button. */
62
+ hideCloseButton?: boolean;
63
+ }
64
+ declare function SheetContent({ className, children, side, hideCloseButton, ...props }: SheetContentProps): React.JSX.Element;
65
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
66
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
67
+ declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): React.JSX.Element;
68
+ declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): React.JSX.Element;
69
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, };
70
+ export type { SheetContentProps };
71
+ //# sourceMappingURL=Sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../src/Sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AAMzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,iBAAS,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,qBAErE;AAED,iBAAS,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,qBAE/E;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,qBAE3E;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC,qBAE7E;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,qBA6BrD;AAED,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC;IACrF;;;;;OAKG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,wCAAwC;IACxC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,QAAQ,EACR,IAAc,EACd,eAAuB,EACvB,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAwInB;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,qBAgB7F;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,qBAYzD;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,YAAY,GACb,CAAC;AACF,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
package/dist/Sheet.js ADDED
@@ -0,0 +1,173 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
5
+ import { X } from 'lucide-react';
6
+ import { cn } from './lib/utils.js';
7
+ import { useThemeScope } from './theme-scope.js';
8
+ /**
9
+ * Checkpoint · Sheet
10
+ *
11
+ * Side-anchored panel (right / left / top / bottom) wrapping the
12
+ * same Radix Dialog primitive `<Dialog>` uses, but with slide-in
13
+ * animation + edge positioning instead of centered modal chrome.
14
+ *
15
+ * Use for:
16
+ * - Detail sheets that slide in from the right (agent detail,
17
+ * session detail, event detail)
18
+ * - Navigation drawers that slide in from the left (mobile nav)
19
+ * - Settings / filter panels with a lot of content
20
+ *
21
+ * Mirrors the shadcn Sheet API (Sheet / SheetTrigger / SheetContent
22
+ * / SheetHeader / SheetTitle / SheetDescription / SheetFooter /
23
+ * SheetClose / SheetPortal / SheetOverlay) so existing consumers
24
+ * migrate via import-path swap.
25
+ *
26
+ * Chrome differs from <Dialog>:
27
+ *
28
+ * - No `--radius-lg` corners (edge-anchored — sliding from the
29
+ * viewport edge so a softened corner would look like a chip
30
+ * stuck to the side)
31
+ * - Fills the side axis (full height for left/right, full width
32
+ * for top/bottom)
33
+ * - Same `--bg-surface` + `--border-default` chrome as Dialog
34
+ * so the surfaces read as siblings, not different families
35
+ * - Slide-in animation with the same custom cubic-bezier the
36
+ * shadcn version uses — chosen because it has the right
37
+ * "settles into place" feel for panels (not the tooltip-y
38
+ * fade+zoom dialogs use)
39
+ *
40
+ * Usage:
41
+ *
42
+ * <Sheet open={open} onOpenChange={setOpen}>
43
+ * <SheetTrigger asChild><Button>Open</Button></SheetTrigger>
44
+ * <SheetContent side="right" className="w-[480px]">
45
+ * <SheetHeader>
46
+ * <SheetTitle>Agent detail</SheetTitle>
47
+ * <SheetDescription>ChatGPT · OpenAI</SheetDescription>
48
+ * </SheetHeader>
49
+ * …
50
+ * </SheetContent>
51
+ * </Sheet>
52
+ */
53
+ function Sheet(props) {
54
+ return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
55
+ }
56
+ function SheetTrigger(props) {
57
+ return _jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
58
+ }
59
+ function SheetClose(props) {
60
+ return _jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
61
+ }
62
+ function SheetPortal(props) {
63
+ return _jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
64
+ }
65
+ function SheetOverlay({ className, ...props }) {
66
+ const scope = useThemeScope();
67
+ return (_jsx(SheetPrimitive.Overlay, { "data-slot": "sheet-overlay", "data-theme": scope.theme, className: cn(scope.mode,
68
+ // SSOT v5 scrim — same recipe as DialogOverlay: the
69
+ // `--overlay-scrim` black mute over the page + `--blur-modal`
70
+ // (12 px) backdrop blur. The two surfaces share the scrim
71
+ // token so floating chrome reads as one family regardless of
72
+ // how it's anchored.
73
+ 'fixed inset-0 z-50', 'bg-[var(--overlay-scrim)]', 'backdrop-blur-[var(--blur-modal)]', 'data-[state=open]:animate-in data-[state=open]:fade-in-0', 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0', 'duration-[var(--duration-medium)]', className), ...props }));
74
+ }
75
+ function SheetContent({ className, children, side = 'right', hideCloseButton = false, ...props }) {
76
+ const scope = useThemeScope();
77
+ return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { "data-slot": "sheet-content", "data-theme": scope.theme,
78
+ // Default to NOT auto-focusing the first focusable child on
79
+ // open — matches the legacy `@/components/shared/ui/sheet` behavior
80
+ // that migrated consumers depended on. Without this, Radix
81
+ // pulls focus into whatever button or link happens to render
82
+ // first inside the sheet, which is jarring for detail panels
83
+ // (agent-detail, event-detail) where the user expects focus to
84
+ // stay on the trigger so they can quickly close + re-open.
85
+ // Consumers can pass their own `onOpenAutoFocus` to override.
86
+ onOpenAutoFocus: (e) => e.preventDefault(),
87
+ // Mirror shell-layout's `--tex-*` inline vars so the wisp /
88
+ // glow / grain inside the sheet reads at the same intensity
89
+ // as the dashboard page. Radix portals to document.body so the
90
+ // shell's inline vars don't inherit; without these the
91
+ // `.checkpoint-canvas` pseudo-elements fall back to the
92
+ // half-intensity defaults baked into tokens.css
93
+ // and the wisps render invisibly against `--bg-surface`.
94
+ //
95
+ // `--tex-vignette: 0` — the page-level vignette darkens the
96
+ // viewport edges, which on a sheet would darken the chrome's
97
+ // own corners and obscure content near the slide-in edge.
98
+ // Skipping it. `contain: paint` (on the className below)
99
+ // scopes the `.checkpoint-canvas` pseudo-elements to the
100
+ // sheet's bounds; without it `position: fixed; inset: 0` on
101
+ // the pseudo-elements would paint over the entire viewport
102
+ // (since the sheet has no permanent transform / will-change),
103
+ // stacking the wisp + grain over the dim layer + the page,
104
+ // blacking out everything outside the sheet.
105
+ style: {
106
+ '--tex-grain': 0.03,
107
+ '--tex-dots': 0.036,
108
+ '--tex-wisp-a': 0.1,
109
+ '--tex-wisp-b': 0.075,
110
+ '--tex-glow': 0.099,
111
+ '--tex-vignette': 0,
112
+ contain: 'paint',
113
+ }, className: cn(scope.mode,
114
+ // `checkpoint-canvas` paints the atmospheric wisp / dot /
115
+ // grain overlays inside the sheet's stacking context. Same
116
+ // rationale as DialogContent — Radix portals the sheet
117
+ // outside the page-level `.checkpoint-canvas` subtree, so
118
+ // without this the chrome reads as a flat solid fill.
119
+ 'checkpoint-canvas', 'fixed z-50',
120
+ // Surface — `--bg-surface` (ink-950 = #0a0d12) matches the
121
+ // dialog's floating-chrome token: one shade lighter than the
122
+ // canvas, one shade darker than `--bg-elevated` so inner
123
+ // sections (`--bg-elevated` cards) step UP from the sheet's
124
+ // surface. Heavier `--border-default` matches Dialog. No
125
+ // corner radius (edge-anchored).
126
+ 'bg-[var(--bg-surface)] text-[color:var(--fg-primary)]', 'shadow-[var(--shadow-lg)]',
127
+ // Slide-in motion — `--ease-sheet` carries the shadcn
128
+ // Apple-sheets bezier; open/close durations are asymmetric
129
+ // on purpose (slower settle-in, quicker dismiss).
130
+ '[transition-timing-function:var(--ease-sheet)]', 'data-[state=open]:animate-in data-[state=closed]:animate-out', 'data-[state=open]:duration-[var(--duration-sheet-open)]', 'data-[state=closed]:duration-[var(--duration-sheet-close)]',
131
+ // Per-side anchoring + edge slide. Width is the parity-spec
132
+ // locked rhythm: `w-full` up to the `--sheet-width` cap so
133
+ // sub-540px viewports get a full-bleed panel.
134
+ side === 'right' &&
135
+ cn('inset-y-0 right-0 h-full w-full max-w-[var(--sheet-width)] overflow-y-auto', 'border-l border-[color:var(--border-default)]', 'data-[state=closed]:slide-out-to-right', 'data-[state=open]:slide-in-from-right'), side === 'left' &&
136
+ cn('inset-y-0 left-0 h-full w-full max-w-[var(--sheet-width)] overflow-y-auto', 'border-r border-[color:var(--border-default)]', 'data-[state=closed]:slide-out-to-left', 'data-[state=open]:slide-in-from-left'),
137
+ // Top/bottom sheets cap height at 80 vh; left/right fill the
138
+ // full axis. `overflow-y-auto` ensures tall body content
139
+ // scrolls inside the cap instead of overflowing past the
140
+ // viewport edge (default `overflow: visible` would clip
141
+ // through the page chrome below/above the panel).
142
+ side === 'top' &&
143
+ cn('inset-x-0 top-0 w-full max-h-[80vh] overflow-y-auto', 'border-b border-[color:var(--border-default)]', 'data-[state=closed]:slide-out-to-top', 'data-[state=open]:slide-in-from-top'), side === 'bottom' &&
144
+ cn('inset-x-0 bottom-0 w-full max-h-[80vh] overflow-y-auto', 'border-t border-[color:var(--border-default)]', 'data-[state=closed]:slide-out-to-bottom', 'data-[state=open]:slide-in-from-bottom'),
145
+ // Type fallback so descendants read in checkpoint chrome
146
+ // even if the consumer forgets to set font-family. `--font-ui`
147
+ // is vanilla Inter, supplied globally by next/font in the
148
+ // root layout, so it resolves even though Radix portals the
149
+ // sheet to document.body.
150
+ 'font-[family-name:var(--font-ui)]', 'focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring', className), ...props, children: [children, !hideCloseButton ? (_jsx(SheetPrimitive.Close, { className: cn('absolute right-3 top-3', 'h-7 w-7 inline-grid place-items-center', 'rounded-sm text-[color:var(--fg-muted)]', 'hover:text-[color:var(--fg-primary)] hover:bg-[color:var(--surface-default)]', 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring', 'transition-colors duration-[var(--duration-fast)]'), "aria-label": "Close sheet", children: _jsx(X, { className: "h-4 w-4", strokeWidth: 2 }) })) : null] })] }));
151
+ }
152
+ function SheetHeader({ className, ...props }) {
153
+ return (_jsx("div", { "data-slot": "sheet-header", className: cn('flex flex-col gap-1.5 px-6 py-5', 'border-b border-[color:var(--border-subtle)]', className), ...props }));
154
+ }
155
+ function SheetFooter({ className, ...props }) {
156
+ return (_jsx("div", { "data-slot": "sheet-footer", className: cn('flex justify-end gap-2 px-6 py-4 mt-auto', 'border-t border-[color:var(--border-subtle)]', className), ...props }));
157
+ }
158
+ function SheetTitle({ className, ...props }) {
159
+ return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title",
160
+ // Inline style — same cascade-bypass rationale as Dialog/Tabs.
161
+ style: {
162
+ fontFamily: 'var(--font-display)',
163
+ fontSize: 'var(--text-lg)',
164
+ fontWeight: 'var(--font-weight-medium)',
165
+ letterSpacing: 'var(--tracking-tight)',
166
+ margin: 0,
167
+ }, className: cn('text-[color:var(--fg-primary)]', className), ...props }));
168
+ }
169
+ function SheetDescription({ className, ...props }) {
170
+ return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn('text-[length:var(--text-sm)] leading-normal text-[color:var(--fg-secondary)]', 'm-0', className), ...props }));
171
+ }
172
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, };
173
+ //# sourceMappingURL=Sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.js","sourceRoot":"","sources":["../src/Sheet.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4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ACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAqD;IAC5F,OAAO,CACL,KAAC,cAAc,CAAC,KAAK,iBACT,aAAa;QACvB,+DAA+D;QAC/D,KAAK,EAAE;YACL,UAAU,EAAE,qBAAqB;YACjC,QAAQ,EAAE,gBAAgB;YAC1B,UAAU,EAAE,2BAA2B;YACvC,aAAa,EAAE,uBAAuB;YACtC,MAAM,EAAE,CAAC;SACV,EACD,SAAS,EAAE,EAAE,CAAC,gCAAgC,EAAE,SAAS,CAAC,KACtD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACgD;IACxD,OAAO,CACL,KAAC,cAAc,CAAC,WAAW,iBACf,mBAAmB,EAC7B,SAAS,EAAE,EAAE,CACX,8EAA8E,EAC9E,KAAK,EACL,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,YAAY,GACb,CAAC"}
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Checkpoint · Skeleton
4
+ *
5
+ * Shimmer placeholder for loading states. Single linear-gradient
6
+ * background that slides at 1.6 s ease-in-out per the SSOT
7
+ * `.demo-skel` spec. Respects `prefers-reduced-motion: reduce` —
8
+ * the gradient stops sliding but stays visible so the layout
9
+ * doesn't collapse.
10
+ *
11
+ * Pass `width` / `height` (or Tailwind utility classes) for the
12
+ * specific shape. For circular avatars use `rounded-full`.
13
+ *
14
+ * Usage:
15
+ *
16
+ * <Skeleton style={{ height: 16, width: '55%' }} />
17
+ * <Skeleton className="h-3 w-full" />
18
+ * <Skeleton className="h-8 w-8 rounded-full" /> // avatar placeholder
19
+ *
20
+ * Defaults to a 12 px tall block — change via `height` prop or
21
+ * Tailwind class.
22
+ */
23
+ export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
24
+ }
25
+ export declare function Skeleton({ className, style, ...rest }: SkeletonProps): React.JSX.Element;
26
+ //# sourceMappingURL=Skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../src/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE9E,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,qBAepE"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cn } from './lib/utils.js';
4
+ export function Skeleton({ className, style, ...rest }) {
5
+ return (_jsx("div", { "aria-hidden": true, "data-slot": "skeleton", className: cn('checkpoint-skeleton',
6
+ // Default geometry — caller can override via className / style.
7
+ 'h-3 w-full rounded-sm', className), style: style, ...rest }));
8
+ }
9
+ //# sourceMappingURL=Skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../src/Skeleton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AA0BpC,MAAM,UAAU,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAiB;IACnE,OAAO,CACL,gDAEY,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,qBAAqB;QACrB,gEAAgE;QAChE,uBAAuB,EACvB,SAAS,CACV,EACD,KAAK,EAAE,KAAK,KACR,IAAI,GACR,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import * as SliderPrimitive from '@radix-ui/react-slider';
3
+ declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ export { Slider };
5
+ //# sourceMappingURL=Slider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../src/Slider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,QAAA,MAAM,MAAM,yJAwBV,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,CAAC"}
package/dist/Slider.js ADDED
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from 'react';
4
+ import * as SliderPrimitive from '@radix-ui/react-slider';
5
+ import { cn } from './lib/utils.js';
6
+ const Slider = React.forwardRef(({ className, value, defaultValue, ...props }, ref) => {
7
+ const thumbCount = value?.length ?? defaultValue?.length ?? 1;
8
+ return (_jsxs(SliderPrimitive.Root, { ref: ref, className: cn('relative flex w-full touch-none select-none items-center', className), value: value, defaultValue: defaultValue, ...props, children: [_jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-elevated", children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-brand" }) }), Array.from({ length: thumbCount }, (_, index) => (_jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-brand bg-[color:var(--bg-elevated)] transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50" }, index)))] }));
9
+ });
10
+ Slider.displayName = SliderPrimitive.Root.displayName;
11
+ export { Slider };
12
+ //# sourceMappingURL=Slider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slider.js","sourceRoot":"","sources":["../src/Slider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAG7B,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACtD,MAAM,UAAU,GAAG,KAAK,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,IAAI,CAAC,CAAC;IAC9D,OAAO,CACL,MAAC,eAAe,CAAC,IAAI,IACnB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0DAA0D,EAAE,SAAS,CAAC,EACpF,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,KACtB,KAAK,aAET,KAAC,eAAe,CAAC,KAAK,IAAC,SAAS,EAAC,mEAAmE,YAClG,KAAC,eAAe,CAAC,KAAK,IAAC,SAAS,EAAC,0BAA0B,GAAG,GACxC,EACvB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAChD,KAAC,eAAe,CAAC,KAAK,IAEpB,SAAS,EAAC,qOAAqO,IAD1O,KAAK,CAEV,CACH,CAAC,IACmB,CACxB,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,MAAM,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Checkpoint · StatusDot
3
+ *
4
+ * A 6px circle in a status tone. A dot alone carries no words, so it sits
5
+ * beside a label (`<StatusText dot>`) or takes a `label` of its own, which
6
+ * makes it an image with that accessible name. Without one it is hidden from
7
+ * assistive tech.
8
+ *
9
+ * `live` adds one soft ring that scales out and fades. Use it only when the
10
+ * data is streaming right now or the state needs the user now. Steady states
11
+ * (connected, configured, healthy, idle) are a still dot. The ring holds
12
+ * still under `prefers-reduced-motion`.
13
+ *
14
+ * <StatusDot tone="allow" />
15
+ * <StatusDot tone="signal" live label="Streaming" />
16
+ */
17
+ /** The status tones, named after the semantic tokens they read. Shared with StatusText. */
18
+ export declare const STATUS_TONES: readonly ["allow", "deny", "warn", "info", "signal", "brand", "neutral"];
19
+ export type StatusTone = (typeof STATUS_TONES)[number];
20
+ export interface StatusDotProps {
21
+ tone?: StatusTone;
22
+ /** Adds the slow ring. Only for live data or a state that needs the user now. */
23
+ live?: boolean;
24
+ /** Accessible name. With it the dot is `role="img"`; without it, `aria-hidden`. */
25
+ label?: string;
26
+ className?: string;
27
+ }
28
+ export declare function StatusDot({ tone, live, label, className }: StatusDotProps): import("react").JSX.Element;
29
+ //# sourceMappingURL=StatusDot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusDot.d.ts","sourceRoot":"","sources":["../src/StatusDot.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,2FAA2F;AAC3F,eAAO,MAAM,YAAY,0EAQf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAkBvD,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,iFAAiF;IACjF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAgB,EAAE,IAAY,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,cAAc,+BAwB7F"}