@refraction-ui/react 0.21.0 → 0.23.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 (235) hide show
  1. package/dist/{chunk-ZF3OHCGV.js → chunk-2Q6HHFAN.js} +1 -1
  2. package/dist/chunk-2Q6HHFAN.js.map +7 -0
  3. package/dist/{chunk-533MCMSU.js → chunk-3I3DYDHR.js} +2 -2
  4. package/dist/{chunk-H54FLNAF.js → chunk-63N4PZUJ.js} +2 -2
  5. package/dist/chunk-7P7EJ56S.js +7 -0
  6. package/dist/{chunk-Y2FNNAIL.js → chunk-EGVPAMQU.js} +2 -2
  7. package/dist/chunk-EGVPAMQU.js.map +1 -0
  8. package/dist/{chunk-WK2IIUFO.js → chunk-QDMLIDYN.js} +2 -2
  9. package/dist/{chunk-BOLFYVI6.js → chunk-QPCKJ2YR.js} +2 -2
  10. package/dist/{chunk-TOZBR4GL.js → chunk-RSWOLRIC.js} +4 -4
  11. package/dist/{chunk-TOZBR4GL.js.map → chunk-RSWOLRIC.js.map} +1 -1
  12. package/dist/{chunk-UNEM2TRI.js → chunk-SDAJVXD4.js} +2 -2
  13. package/dist/{chunk-VK3EQ34F.js → chunk-V24GDHUX.js} +2 -2
  14. package/dist/{chunk-XWP763SH.js → chunk-V727VZOE.js} +4 -2
  15. package/dist/{chunk-XWP763SH.js.map → chunk-V727VZOE.js.map} +2 -2
  16. package/dist/{chunk-AMK4VCBG.js → chunk-WYKPPK3W.js} +2 -2
  17. package/dist/{chunk-ONACRMG4.js → chunk-XMFNBOPO.js} +2 -2
  18. package/dist/{chunk-NKCWOPNX.js → chunk-Z5IHYNQD.js} +12 -8
  19. package/dist/chunk-Z5IHYNQD.js.map +7 -0
  20. package/dist/faro-engine-VIUXJAPH-FSARIABU.js +3 -0
  21. package/dist/{faro-engine-47HGRAQH-JKINJPMH.js.map → faro-engine-VIUXJAPH-FSARIABU.js.map} +1 -1
  22. package/dist/form.cjs.map +1 -1
  23. package/dist/form.js +1 -1
  24. package/dist/index.cjs +1305 -302
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +7 -0
  27. package/dist/index.d.ts +7 -0
  28. package/dist/index.js +7 -0
  29. package/dist/internal/action-list/index.d.ts +39 -0
  30. package/dist/internal/avatar/index.d.cts +4 -1
  31. package/dist/internal/avatar/index.d.ts +4 -1
  32. package/dist/internal/button/index.d.cts +2 -2
  33. package/dist/internal/button/index.d.ts +2 -2
  34. package/dist/internal/card/index.d.cts +5 -1
  35. package/dist/internal/card/index.d.ts +5 -1
  36. package/dist/internal/data-table/index.d.cts +48 -3
  37. package/dist/internal/data-table/index.d.ts +48 -3
  38. package/dist/internal/funnel-chart/index.d.ts +60 -0
  39. package/dist/internal/line-chart/index.d.ts +124 -0
  40. package/dist/internal/native-select/index.d.ts +21 -0
  41. package/dist/internal/page-header/index.d.ts +35 -0
  42. package/dist/internal/react-action-list/index.d.ts +28 -0
  43. package/dist/internal/react-avatar/index.d.cts +4 -2
  44. package/dist/internal/react-avatar/index.d.ts +4 -2
  45. package/dist/internal/react-card/index.d.cts +10 -4
  46. package/dist/internal/react-card/index.d.ts +10 -4
  47. package/dist/internal/react-command/index.d.cts +13 -2
  48. package/dist/internal/react-command/index.d.ts +13 -2
  49. package/dist/internal/react-data-table/index.d.cts +27 -9
  50. package/dist/internal/react-data-table/index.d.ts +27 -9
  51. package/dist/internal/react-dialog/index.d.cts +5 -0
  52. package/dist/internal/react-dialog/index.d.ts +5 -0
  53. package/dist/internal/react-dropdown-menu/index.d.cts +19 -1
  54. package/dist/internal/react-dropdown-menu/index.d.ts +19 -1
  55. package/dist/internal/react-funnel-chart/index.d.ts +28 -0
  56. package/dist/internal/react-line-chart/index.d.ts +38 -0
  57. package/dist/internal/react-native-select/index.d.ts +19 -0
  58. package/dist/internal/react-page-header/index.d.ts +23 -0
  59. package/dist/internal/react-select/index.d.cts +21 -3
  60. package/dist/internal/react-select/index.d.ts +21 -3
  61. package/dist/internal/react-stat-grid/index.d.ts +22 -11
  62. package/dist/internal/react-table/index.d.ts +39 -0
  63. package/dist/internal/select/index.d.cts +14 -1
  64. package/dist/internal/select/index.d.ts +14 -1
  65. package/dist/internal/shared/index.d.cts +6 -3
  66. package/dist/internal/shared/index.d.ts +6 -3
  67. package/dist/internal/stat-grid/index.d.ts +49 -7
  68. package/dist/internal/table/index.d.ts +46 -0
  69. package/dist/internal/tabs/index.d.cts +8 -1
  70. package/dist/internal/tabs/index.d.ts +8 -1
  71. package/dist/react-accordion.js +1 -1
  72. package/dist/react-action-list.js +74 -0
  73. package/dist/react-action-list.js.map +7 -0
  74. package/dist/react-ai.js +1 -1
  75. package/dist/react-analytics.js +16 -4
  76. package/dist/react-analytics.js.map +2 -2
  77. package/dist/react-animated-text.js +1 -1
  78. package/dist/react-app-shell.js +1 -1
  79. package/dist/react-audience-feature-card.js +1 -1
  80. package/dist/react-audio-room.js +1 -1
  81. package/dist/react-auth.js +1 -1
  82. package/dist/react-avatar-group.js +1 -1
  83. package/dist/react-avatar.js +13 -9
  84. package/dist/react-avatar.js.map +2 -2
  85. package/dist/react-badge.js +2 -2
  86. package/dist/react-badge.js.map +1 -1
  87. package/dist/react-bottom-nav.js +1 -1
  88. package/dist/react-brand-network-cell.js +1 -1
  89. package/dist/react-breadcrumbs.js +1 -1
  90. package/dist/react-browser-chrome-mock.js +1 -1
  91. package/dist/react-button.js +3 -3
  92. package/dist/react-calendar.js +1 -1
  93. package/dist/react-call-controls.js +1 -1
  94. package/dist/react-callout.js +8 -3
  95. package/dist/react-callout.js.map +2 -2
  96. package/dist/react-card-grid.js +1 -1
  97. package/dist/react-card.js +5 -5
  98. package/dist/react-card.js.map +2 -2
  99. package/dist/react-carousel.js +1 -1
  100. package/dist/react-charts.js +1 -1
  101. package/dist/react-checkbox.js +1 -1
  102. package/dist/react-checklist.js +1 -1
  103. package/dist/react-code-block.js +1 -1
  104. package/dist/react-code-editor.js +1 -1
  105. package/dist/react-collapsible.js +1 -1
  106. package/dist/react-combobox.js +1 -1
  107. package/dist/react-command-input.js +1 -1
  108. package/dist/react-command.js +115 -70
  109. package/dist/react-command.js.map +3 -3
  110. package/dist/react-composer.js +3 -3
  111. package/dist/react-content-protection.js +1 -1
  112. package/dist/react-conversation.js +5 -5
  113. package/dist/react-cookie-consent.js +1 -1
  114. package/dist/react-data-table.js +125 -114
  115. package/dist/react-data-table.js.map +2 -2
  116. package/dist/react-date-picker.js +1 -1
  117. package/dist/react-device-frame.js +1 -1
  118. package/dist/react-dialog.js +33 -9
  119. package/dist/react-dialog.js.map +2 -2
  120. package/dist/react-diff-viewer.js +1 -1
  121. package/dist/react-dropdown-menu.js +61 -8
  122. package/dist/react-dropdown-menu.js.map +3 -3
  123. package/dist/react-editor-status-bar.js +1 -1
  124. package/dist/react-editor-tabs.js +1 -1
  125. package/dist/react-emoji-picker.js +2 -2
  126. package/dist/react-empty-state.js +1 -1
  127. package/dist/react-feedback-dialog.js +2 -2
  128. package/dist/react-file-tree.js +1 -1
  129. package/dist/react-file-upload.js +1 -1
  130. package/dist/react-floating-reactions.js +1 -1
  131. package/dist/react-flow-editor.js +2 -2
  132. package/dist/react-footer.js +1 -1
  133. package/dist/react-funnel-chart.js +105 -0
  134. package/dist/react-funnel-chart.js.map +7 -0
  135. package/dist/react-graph-view.js +2 -2
  136. package/dist/react-infinite-canvas.js +2 -2
  137. package/dist/react-inline-editor.js +1 -1
  138. package/dist/react-input-group.js +1 -1
  139. package/dist/react-input.js +2 -2
  140. package/dist/react-install-prompt.js +1 -1
  141. package/dist/react-kanban-board.js +1 -1
  142. package/dist/react-keyboard-shortcut.js +2 -2
  143. package/dist/react-language-selector.js +1 -1
  144. package/dist/react-line-chart.js +280 -0
  145. package/dist/react-line-chart.js.map +7 -0
  146. package/dist/react-link-card.js +1 -1
  147. package/dist/react-live-captions.js +1 -1
  148. package/dist/react-live-cursors.js +1 -1
  149. package/dist/react-live-transcript.js +1 -1
  150. package/dist/react-location-selector.js +1 -1
  151. package/dist/react-logger.js +3 -3
  152. package/dist/react-markdown-renderer.js +2 -2
  153. package/dist/react-marquee-strip.js +1 -1
  154. package/dist/react-mascot.js +1 -1
  155. package/dist/react-mastery-bar.js +1 -1
  156. package/dist/react-mini-map.js +1 -1
  157. package/dist/react-mobile-nav.js +1 -1
  158. package/dist/react-native-select.js +52 -0
  159. package/dist/react-native-select.js.map +7 -0
  160. package/dist/react-navbar.js +1 -1
  161. package/dist/react-numbered-steps.js +1 -1
  162. package/dist/react-otp-input.js +1 -1
  163. package/dist/react-page-header.js +40 -0
  164. package/dist/react-page-header.js.map +7 -0
  165. package/dist/react-pagination.js +1 -1
  166. package/dist/react-password-input.js +2 -2
  167. package/dist/react-payment.js +1 -1
  168. package/dist/react-popover.js +1 -1
  169. package/dist/react-pre-call-lobby.js +1 -1
  170. package/dist/react-presence-indicator.js +1 -1
  171. package/dist/react-pricing-card.js +1 -1
  172. package/dist/react-progress-display.js +2 -2
  173. package/dist/react-progress-display.js.map +1 -1
  174. package/dist/react-radial-gauge.js +1 -1
  175. package/dist/react-radio.js +1 -1
  176. package/dist/react-rating-scale.js +1 -1
  177. package/dist/react-reaction-bar.js +1 -1
  178. package/dist/react-resizable-layout.js +1 -1
  179. package/dist/react-search-bar.js +1 -1
  180. package/dist/react-section-head.js +1 -1
  181. package/dist/react-segmented-control.js +1 -1
  182. package/dist/react-select.js +94 -20
  183. package/dist/react-select.js.map +3 -3
  184. package/dist/react-separator.js +1 -1
  185. package/dist/react-sheet.js +1 -1
  186. package/dist/react-sidebar.js +1 -1
  187. package/dist/react-skeleton.js +1 -1
  188. package/dist/react-skip-to-content.js +1 -1
  189. package/dist/react-slide-viewer.js +1 -1
  190. package/dist/react-slider.js +1 -1
  191. package/dist/react-slot-picker.js +1 -1
  192. package/dist/react-social-auth-button.js +3 -3
  193. package/dist/react-sortable-list.js +1 -1
  194. package/dist/react-stat-grid.js +91 -22
  195. package/dist/react-stat-grid.js.map +2 -2
  196. package/dist/react-status-indicator.js +1 -1
  197. package/dist/react-steps.js +1 -1
  198. package/dist/react-sticky-note.js +1 -1
  199. package/dist/react-switch.js +1 -1
  200. package/dist/react-table-of-contents.js +1 -1
  201. package/dist/react-table.js +148 -0
  202. package/dist/react-table.js.map +7 -0
  203. package/dist/react-tabs.js +84 -7
  204. package/dist/react-tabs.js.map +2 -2
  205. package/dist/react-terminal.js +1 -1
  206. package/dist/react-test-results.js +1 -1
  207. package/dist/react-textarea.js +3 -3
  208. package/dist/react-textarea.js.map +1 -1
  209. package/dist/react-thread-view.js +2 -2
  210. package/dist/react-timeline.js +1 -1
  211. package/dist/react-toast.js +1 -1
  212. package/dist/react-tooltip.js +1 -1
  213. package/dist/react-version-selector.js +1 -1
  214. package/dist/react-video-grid.js +2 -2
  215. package/dist/react-video-player.js +1 -1
  216. package/dist/react-video-tile.js +2 -2
  217. package/dist/react-voice-pill.js +1 -1
  218. package/dist/react-waveform.js +1 -1
  219. package/dist/react-wizard.js +1 -1
  220. package/dist/theme.js +1 -1
  221. package/package.json +7 -1
  222. package/dist/chunk-NKCWOPNX.js.map +0 -7
  223. package/dist/chunk-SDZ3LROZ.js +0 -7
  224. package/dist/chunk-Y2FNNAIL.js.map +0 -1
  225. package/dist/chunk-ZF3OHCGV.js.map +0 -7
  226. package/dist/faro-engine-47HGRAQH-JKINJPMH.js +0 -3
  227. /package/dist/{chunk-533MCMSU.js.map → chunk-3I3DYDHR.js.map} +0 -0
  228. /package/dist/{chunk-H54FLNAF.js.map → chunk-63N4PZUJ.js.map} +0 -0
  229. /package/dist/{chunk-SDZ3LROZ.js.map → chunk-7P7EJ56S.js.map} +0 -0
  230. /package/dist/{chunk-WK2IIUFO.js.map → chunk-QDMLIDYN.js.map} +0 -0
  231. /package/dist/{chunk-BOLFYVI6.js.map → chunk-QPCKJ2YR.js.map} +0 -0
  232. /package/dist/{chunk-UNEM2TRI.js.map → chunk-SDAJVXD4.js.map} +0 -0
  233. /package/dist/{chunk-VK3EQ34F.js.map → chunk-V24GDHUX.js.map} +0 -0
  234. /package/dist/{chunk-AMK4VCBG.js.map → chunk-WYKPPK3W.js.map} +0 -0
  235. /package/dist/{chunk-ONACRMG4.js.map → chunk-XMFNBOPO.js.map} +0 -0
@@ -12,6 +12,15 @@ interface SelectProps {
12
12
  disabled?: boolean;
13
13
  open?: boolean;
14
14
  name?: string;
15
+ /**
16
+ * Element ids to link trigger and listbox. Adapters should pass ids that
17
+ * are stable across renders (e.g. React `useId`); when omitted, fresh ids
18
+ * are generated on every call.
19
+ */
20
+ ids?: {
21
+ trigger: string;
22
+ content: string;
23
+ };
15
24
  }
16
25
  interface SelectAPI {
17
26
  /** Trigger element ARIA + keyboard props */
@@ -65,5 +74,9 @@ declare const selectItemVariants: (props?: ({
65
74
  } & {
66
75
  className?: string;
67
76
  }) | undefined) => string;
77
+ /** Positioning context: the listbox floats under the trigger. */
78
+ declare const selectRootClass = "relative";
79
+ /** The selected label inside the trigger; truncates, dims the placeholder. */
80
+ declare const selectValueClass = "truncate text-left data-[placeholder]:text-muted-foreground";
68
81
 
69
- export { type SelectAPI, type SelectOption, type SelectProps, createSelect, selectContentVariants, selectItemVariants, selectTokens, selectTriggerVariants };
82
+ export { type SelectAPI, type SelectOption, type SelectProps, createSelect, selectContentVariants, selectItemVariants, selectRootClass, selectTokens, selectTriggerVariants, selectValueClass };
@@ -12,6 +12,15 @@ interface SelectProps {
12
12
  disabled?: boolean;
13
13
  open?: boolean;
14
14
  name?: string;
15
+ /**
16
+ * Element ids to link trigger and listbox. Adapters should pass ids that
17
+ * are stable across renders (e.g. React `useId`); when omitted, fresh ids
18
+ * are generated on every call.
19
+ */
20
+ ids?: {
21
+ trigger: string;
22
+ content: string;
23
+ };
15
24
  }
16
25
  interface SelectAPI {
17
26
  /** Trigger element ARIA + keyboard props */
@@ -65,5 +74,9 @@ declare const selectItemVariants: (props?: ({
65
74
  } & {
66
75
  className?: string;
67
76
  }) | undefined) => string;
77
+ /** Positioning context: the listbox floats under the trigger. */
78
+ declare const selectRootClass = "relative";
79
+ /** The selected label inside the trigger; truncates, dims the placeholder. */
80
+ declare const selectValueClass = "truncate text-left data-[placeholder]:text-muted-foreground";
68
81
 
69
- export { type SelectAPI, type SelectOption, type SelectProps, createSelect, selectContentVariants, selectItemVariants, selectTokens, selectTriggerVariants };
82
+ export { type SelectAPI, type SelectOption, type SelectProps, createSelect, selectContentVariants, selectItemVariants, selectRootClass, selectTokens, selectTriggerVariants, selectValueClass };
@@ -373,9 +373,12 @@ declare function resetIdCounter(): void;
373
373
  * Handles conditional classes, arrays, and falsy values.
374
374
  * No external dependencies (no clsx, no tailwind-merge).
375
375
  *
376
- * For Tailwind class conflict resolution (e.g., 'p-2 p-4' → 'p-4'),
377
- * consumers can use @refraction-ui/tailwind-config which provides
378
- * a tw-merge-aware variant of this function.
376
+ * It does NOT resolve Tailwind conflicts: `cn('p-2', 'p-4')` keeps both and
377
+ * the stylesheet order decides. Components therefore keep size-owned
378
+ * utilities (height, text size, padding) out of their cva `base` and only in
379
+ * the matching variant, so a variant prop always wins; a consumer `className`
380
+ * that must beat a component utility can use Tailwind's `!` important
381
+ * modifier (e.g. `!h-7`).
379
382
  */
380
383
  type ClassValue = string | number | boolean | undefined | null | ClassValue[];
381
384
  type ClassRecord = Record<string, boolean | undefined | null>;
@@ -373,9 +373,12 @@ declare function resetIdCounter(): void;
373
373
  * Handles conditional classes, arrays, and falsy values.
374
374
  * No external dependencies (no clsx, no tailwind-merge).
375
375
  *
376
- * For Tailwind class conflict resolution (e.g., 'p-2 p-4' → 'p-4'),
377
- * consumers can use @refraction-ui/tailwind-config which provides
378
- * a tw-merge-aware variant of this function.
376
+ * It does NOT resolve Tailwind conflicts: `cn('p-2', 'p-4')` keeps both and
377
+ * the stylesheet order decides. Components therefore keep size-owned
378
+ * utilities (height, text size, padding) out of their cva `base` and only in
379
+ * the matching variant, so a variant prop always wins; a consumer `className`
380
+ * that must beat a component utility can use Tailwind's `!` important
381
+ * modifier (e.g. `!h-7`).
379
382
  */
380
383
  type ClassValue = string | number | boolean | undefined | null | ClassValue[];
381
384
  type ClassRecord = Record<string, boolean | undefined | null>;
@@ -1,9 +1,23 @@
1
+ /** Semantic colour of a stat's value. */
2
+ type StatTone = 'default' | 'positive' | 'negative' | 'caution';
3
+ /** `plain` = marketing callouts; `card` = bordered dashboard KPI cards. */
4
+ type StatGridVariant = 'plain' | 'card';
5
+ /** Whether the label sits under the value (callout) or above it (KPI). */
6
+ type StatGridLayout = 'value-first' | 'label-first';
7
+ /** Column count: a fixed maximum that reflows down on narrow screens, or `auto`. */
8
+ type StatGridColumns = 1 | 2 | 3 | 4 | 'auto';
1
9
  /** A single stat callout displayed in the grid. */
2
10
  type StatItem = {
3
11
  /** The primary value displayed prominently (e.g. "10k+", "$4.2M"). */
4
12
  value: string;
5
- /** The descriptive label shown below the value. */
13
+ /** The descriptive label. */
6
14
  label: string;
15
+ /** Stable key; defaults to the index. */
16
+ id?: string;
17
+ /** Optional line explaining the figure (how it was computed, a delta). */
18
+ description?: string;
19
+ /** Colour of the value. Defaults to `default`. */
20
+ tone?: StatTone;
7
21
  };
8
22
  interface StatGridAPI {
9
23
  /** ARIA attributes to spread on the grid container element (`role="list"`). */
@@ -20,7 +34,9 @@ interface StatGridAPI {
20
34
  * - 2 items → 2 columns
21
35
  * - 3 or more items → capped at `max` (default 3)
22
36
  */
23
- declare function statColumns(count: number, max?: number): number;
37
+ declare function statColumns(count: number, max?: number): 1 | 2 | 3 | 4;
38
+ /** The cva key for a column setting (clamped to the supported 1–4). */
39
+ declare function statColumnsKey(columns: StatGridColumns): '1' | '2' | '3' | '4' | 'auto';
24
40
  /**
25
41
  * Build the framework-agnostic container props for a stat grid.
26
42
  *
@@ -29,17 +45,43 @@ declare function statColumns(count: number, max?: number): number;
29
45
  */
30
46
  declare function createStatGrid(): StatGridAPI;
31
47
 
32
- /** Grid container that lays out stat items. */
48
+ /**
49
+ * Grid container. Column counts are responsive (one column on a phone, more
50
+ * as the width allows) — never a fixed inline template that cannot reflow.
51
+ * `auto` fits as many ~12rem items per row as the width allows.
52
+ */
33
53
  declare const statGridVariants: (props?: ({
34
- columns?: "1" | "2" | "3" | undefined;
54
+ columns?: "auto" | "1" | "2" | "3" | "4" | undefined;
55
+ variant?: "plain" | "card" | undefined;
35
56
  } & {
36
57
  className?: string;
37
58
  }) | undefined) => string;
38
59
  /** Individual stat item container (role="listitem"). */
60
+ declare const statItemVariants: (props?: ({
61
+ variant?: "plain" | "card" | undefined;
62
+ } & {
63
+ className?: string;
64
+ }) | undefined) => string;
65
+ /** @deprecated Use `statItemVariants()`; kept for existing imports. */
39
66
  declare const statItemClass = "flex flex-col";
40
- /** The large bold value of the stat. */
67
+ /** The value of a stat, by variant and tone. */
68
+ declare const statValueVariants: (props?: ({
69
+ variant?: "plain" | "card" | undefined;
70
+ tone?: "default" | "positive" | "negative" | "caution" | undefined;
71
+ } & {
72
+ className?: string;
73
+ }) | undefined) => string;
74
+ /** @deprecated Use `statValueVariants()`; kept for existing imports. */
41
75
  declare const statValueClass = "text-xl sm:text-2xl font-bold text-primary";
42
- /** The descriptive label below the value. */
76
+ /** The descriptive label. Above the value it reads as a small caption. */
77
+ declare const statLabelVariants: (props?: ({
78
+ layout?: "value-first" | "label-first" | undefined;
79
+ } & {
80
+ className?: string;
81
+ }) | undefined) => string;
82
+ /** @deprecated Use `statLabelVariants()`; kept for existing imports. */
43
83
  declare const statLabelClass = "mt-1 text-sm text-muted-foreground leading-snug";
84
+ /** Optional line under a stat explaining how it was computed. */
85
+ declare const statDescriptionClass = "text-xs leading-snug text-muted-foreground";
44
86
 
45
- export { type StatGridAPI, type StatItem, createStatGrid, statColumns, statGridVariants, statItemClass, statLabelClass, statValueClass };
87
+ export { type StatGridAPI, type StatGridColumns, type StatGridLayout, type StatGridVariant, type StatItem, type StatTone, createStatGrid, statColumns, statColumnsKey, statDescriptionClass, statGridVariants, statItemClass, statItemVariants, statLabelClass, statLabelVariants, statValueClass, statValueVariants };
@@ -0,0 +1,46 @@
1
+ /** Cell padding for every cell of a table. */
2
+ type TableDensity = 'compact' | 'default';
3
+ /** Horizontal alignment of a header or data cell (logical, RTL-safe). */
4
+ type TableAlign = 'start' | 'center' | 'end';
5
+ /** Look of header cells: `eyebrow` is small uppercase tracked text. */
6
+ type TableHeadTone = 'default' | 'eyebrow';
7
+ interface TableAPI {
8
+ /** Data attributes for styling hooks. */
9
+ dataAttributes: Record<string, string>;
10
+ }
11
+ /** Framework-agnostic data attributes for the table root. */
12
+ declare function createTable(props?: {
13
+ density?: TableDensity;
14
+ headTone?: TableHeadTone;
15
+ }): TableAPI;
16
+
17
+ /** Scroll container: a wide table scrolls inside it instead of the page. */
18
+ declare const tableContainerClass = "relative w-full overflow-x-auto";
19
+ /** The `<table>`. `fixed` pins column widths to the header row. */
20
+ declare const tableRootVariants: (props?: ({
21
+ fixed?: "true" | "false" | undefined;
22
+ } & {
23
+ className?: string;
24
+ }) | undefined) => string;
25
+ /** Caption under the table. */
26
+ declare const tableCaptionClass = "mt-2 text-xs text-muted-foreground";
27
+ /** Body rows: a hairline between rows, none after the last. */
28
+ declare const tableRowClass = "border-b border-border-subtle last:border-b-0";
29
+ /** Header cell: subtle surface, rule under it. */
30
+ declare const tableHeadVariants: (props?: ({
31
+ align?: "start" | "center" | "end" | undefined;
32
+ tone?: "default" | "eyebrow" | undefined;
33
+ density?: "compact" | "default" | undefined;
34
+ } & {
35
+ className?: string;
36
+ }) | undefined) => string;
37
+ /** Data cell. */
38
+ declare const tableCellVariants: (props?: ({
39
+ align?: "start" | "center" | "end" | undefined;
40
+ density?: "compact" | "default" | undefined;
41
+ numeric?: "true" | "false" | undefined;
42
+ } & {
43
+ className?: string;
44
+ }) | undefined) => string;
45
+
46
+ export { type TableAPI, type TableAlign, type TableDensity, type TableHeadTone, createTable, tableCaptionClass, tableCellVariants, tableContainerClass, tableHeadVariants, tableRootVariants, tableRowClass };
@@ -30,6 +30,13 @@ interface TabsAPI {
30
30
  idPrefix: string;
31
31
  }
32
32
  declare function createTabs(props?: TabsProps): TabsAPI;
33
+ /**
34
+ * Roving-focus target for a key press inside a tab list (WAI-ARIA Tabs
35
+ * pattern). Given the index of the focused tab among the ENABLED tabs, returns
36
+ * the index to move to, or `null` when the key is not a navigation key for this
37
+ * orientation. Arrow keys wrap; Home/End jump to the ends.
38
+ */
39
+ declare function getNextTabIndex(current: number, key: string, count: number, orientation?: 'horizontal' | 'vertical'): number | null;
33
40
 
34
41
  declare const tabsListVariants: (props?: ({
35
42
  [x: string]: string | undefined;
@@ -42,4 +49,4 @@ declare const tabsTriggerVariants: (props?: ({
42
49
  className?: string;
43
50
  }) | undefined) => string;
44
51
 
45
- export { type TabsAPI, type TabsProps, type TabsState, createTabs, tabsListVariants, tabsTriggerVariants };
52
+ export { type TabsAPI, type TabsProps, type TabsState, createTabs, getNextTabIndex, tabsListVariants, tabsTriggerVariants };
@@ -30,6 +30,13 @@ interface TabsAPI {
30
30
  idPrefix: string;
31
31
  }
32
32
  declare function createTabs(props?: TabsProps): TabsAPI;
33
+ /**
34
+ * Roving-focus target for a key press inside a tab list (WAI-ARIA Tabs
35
+ * pattern). Given the index of the focused tab among the ENABLED tabs, returns
36
+ * the index to move to, or `null` when the key is not a navigation key for this
37
+ * orientation. Arrow keys wrap; Home/End jump to the ends.
38
+ */
39
+ declare function getNextTabIndex(current: number, key: string, count: number, orientation?: 'horizontal' | 'vertical'): number | null;
33
40
 
34
41
  declare const tabsListVariants: (props?: ({
35
42
  [x: string]: string | undefined;
@@ -42,4 +49,4 @@ declare const tabsTriggerVariants: (props?: ({
42
49
  className?: string;
43
50
  }) | undefined) => string;
44
51
 
45
- export { type TabsAPI, type TabsProps, type TabsState, createTabs, tabsListVariants, tabsTriggerVariants };
52
+ export { type TabsAPI, type TabsProps, type TabsState, createTabs, getNextTabIndex, tabsListVariants, tabsTriggerVariants };
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  cn,
7
7
  devWarn
8
- } from "./chunk-ZF3OHCGV.js";
8
+ } from "./chunk-2Q6HHFAN.js";
9
9
 
10
10
  // ../react-accordion/dist/index.js
11
11
  import * as React from "react";
@@ -0,0 +1,74 @@
1
+ import {
2
+ cn,
3
+ cva
4
+ } from "./chunk-2Q6HHFAN.js";
5
+
6
+ // ../react-action-list/dist/index.js
7
+ import * as React from "react";
8
+
9
+ // ../action-list/dist/index.js
10
+ function createActionListItem(props = {}) {
11
+ const { disabled = false, density = "default" } = props;
12
+ const dataAttributes = {
13
+ "data-slot": "action-list-item",
14
+ "data-density": density
15
+ };
16
+ if (disabled) dataAttributes["data-disabled"] = "";
17
+ const ariaProps = {};
18
+ if (disabled) ariaProps["aria-disabled"] = true;
19
+ return { ariaProps, dataAttributes };
20
+ }
21
+ var actionListClass = "m-0 flex list-none flex-col divide-y divide-border-subtle p-0";
22
+ var actionListItemVariants = cva({
23
+ base: "flex w-full items-center gap-4 bg-transparent text-left text-sm text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
24
+ variants: {
25
+ density: {
26
+ default: "px-4 py-3",
27
+ compact: "px-3 py-2"
28
+ }
29
+ },
30
+ defaultVariants: {
31
+ density: "default"
32
+ }
33
+ });
34
+ var actionListItemBodyClass = "flex min-w-0 flex-1 flex-col gap-0.5";
35
+ var actionListItemTitleClass = "break-words font-semibold text-foreground";
36
+ var actionListItemDescriptionClass = "break-words text-xs text-muted-foreground";
37
+ var actionListItemMetaClass = "break-words text-xs text-muted-foreground";
38
+ var actionListItemTrailingClass = "flex flex-none items-center gap-4 text-xs tabular-nums text-muted-foreground";
39
+
40
+ // ../react-action-list/dist/index.js
41
+ import { jsx, jsxs } from "react/jsx-runtime";
42
+ var ActionList = React.forwardRef(function ActionList2({ className, ...props }, ref) {
43
+ return /* @__PURE__ */ jsx("ul", { ref, className: cn(actionListClass, className), "data-slot": "action-list", ...props });
44
+ });
45
+ var ActionListItem = React.forwardRef(
46
+ function ActionListItem2({ title, description, meta, trailing, density = "default", disabled, className, ...props }, ref) {
47
+ const api = createActionListItem({ disabled, density });
48
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
49
+ "button",
50
+ {
51
+ ref,
52
+ type: "button",
53
+ disabled,
54
+ className: cn(actionListItemVariants({ density }), className),
55
+ ...api.ariaProps,
56
+ ...api.dataAttributes,
57
+ ...props,
58
+ children: [
59
+ /* @__PURE__ */ jsxs("span", { className: actionListItemBodyClass, children: [
60
+ /* @__PURE__ */ jsx("span", { className: actionListItemTitleClass, children: title }),
61
+ description != null && /* @__PURE__ */ jsx("span", { className: actionListItemDescriptionClass, children: description }),
62
+ meta != null && /* @__PURE__ */ jsx("span", { className: actionListItemMetaClass, children: meta })
63
+ ] }),
64
+ trailing != null && /* @__PURE__ */ jsx("span", { className: actionListItemTrailingClass, children: trailing })
65
+ ]
66
+ }
67
+ ) });
68
+ }
69
+ );
70
+ export {
71
+ ActionList,
72
+ ActionListItem
73
+ };
74
+ //# sourceMappingURL=react-action-list.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../action-list/src/action-list.ts", "../../action-list/src/action-list.styles.ts", "../../react-action-list/src/action-list.tsx"],
4
+ "sourcesContent": ["/** Row padding. */\nexport type ActionListDensity = 'default' | 'compact'\n\nexport interface ActionListItemProps {\n disabled?: boolean\n density?: ActionListDensity\n}\n\nexport interface ActionListItemAPI {\n /** ARIA attributes for the row button. */\n ariaProps: Record<string, string | number | boolean>\n /** Data attributes for styling hooks. */\n dataAttributes: Record<string, string>\n}\n\n/**\n * Build the framework-agnostic props for one ActionList row. Each row is ONE\n * action (open, select, go to) rendered as a native button, so it is reachable\n * by Tab and activated by Enter / Space — unlike a clickable table row.\n */\nexport function createActionListItem(props: ActionListItemProps = {}): ActionListItemAPI {\n const { disabled = false, density = 'default' } = props\n const dataAttributes: Record<string, string> = {\n 'data-slot': 'action-list-item',\n 'data-density': density,\n }\n if (disabled) dataAttributes['data-disabled'] = ''\n const ariaProps: Record<string, string | number | boolean> = {}\n if (disabled) ariaProps['aria-disabled'] = true\n return { ariaProps, dataAttributes }\n}\n", "import { cva } from '@refraction-ui/shared'\n\n/** The list: rows separated by hairlines, no bullets. */\nexport const actionListClass = 'm-0 flex list-none flex-col divide-y divide-border-subtle p-0'\n\n/** A row button: full width, whole row is the hit target. */\nexport const actionListItemVariants = cva({\n base:\n 'flex w-full items-center gap-4 bg-transparent text-left text-sm text-foreground transition-colors ' +\n 'hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring ' +\n 'disabled:pointer-events-none disabled:opacity-50',\n variants: {\n density: {\n default: 'px-4 py-3',\n compact: 'px-3 py-2',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n})\n\n/** Leading text column (title, description, meta). */\nexport const actionListItemBodyClass = 'flex min-w-0 flex-1 flex-col gap-0.5'\n/** Primary line. */\nexport const actionListItemTitleClass = 'break-words font-semibold text-foreground'\n/** Supporting line under the title. */\nexport const actionListItemDescriptionClass = 'break-words text-xs text-muted-foreground'\n/** Tertiary line (owner, tags, ids). */\nexport const actionListItemMetaClass = 'break-words text-xs text-muted-foreground'\n/** Trailing column (dates, sizes, counts). */\nexport const actionListItemTrailingClass =\n 'flex flex-none items-center gap-4 text-xs tabular-nums text-muted-foreground'\n", "import * as React from 'react'\nimport {\n createActionListItem,\n actionListClass,\n actionListItemVariants,\n actionListItemBodyClass,\n actionListItemTitleClass,\n actionListItemDescriptionClass,\n actionListItemMetaClass,\n actionListItemTrailingClass,\n type ActionListDensity,\n} from '@refraction-ui/action-list'\nimport { cn } from '@refraction-ui/shared'\n\nexport type { ActionListDensity }\n\nexport interface ActionListProps extends React.HTMLAttributes<HTMLUListElement> {}\n\n/** ActionList — a vertical list whose rows are each one action. Renders a `<ul>`. */\nexport const ActionList = React.forwardRef<HTMLUListElement, ActionListProps>(function ActionList(\n { className, ...props },\n ref,\n) {\n return <ul ref={ref} className={cn(actionListClass, className)} data-slot=\"action-list\" {...props} />\n})\n\nexport interface ActionListItemProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'title' | 'type'> {\n /** Primary line (required). */\n title: React.ReactNode\n /** Optional supporting line under the title. */\n description?: React.ReactNode\n /** Optional tertiary line (owner, tags, ids). */\n meta?: React.ReactNode\n /** Optional trailing column (dates, sizes, counts). */\n trailing?: React.ReactNode\n /** Row padding. Defaults to `default`. */\n density?: ActionListDensity\n}\n\n/**\n * ActionListItem — one row: an `<li>` holding a full-width native button with\n * a title, optional supporting lines and a trailing column. The ref and all\n * button props go to the button.\n */\nexport const ActionListItem = React.forwardRef<HTMLButtonElement, ActionListItemProps>(\n function ActionListItem(\n { title, description, meta, trailing, density = 'default', disabled, className, ...props },\n ref,\n ) {\n const api = createActionListItem({ disabled, density })\n return (\n <li>\n <button\n ref={ref}\n type=\"button\"\n disabled={disabled}\n className={cn(actionListItemVariants({ density }), className)}\n {...api.ariaProps}\n {...api.dataAttributes}\n {...props}\n >\n <span className={actionListItemBodyClass}>\n <span className={actionListItemTitleClass}>{title}</span>\n {description != null && (\n <span className={actionListItemDescriptionClass}>{description}</span>\n )}\n {meta != null && <span className={actionListItemMetaClass}>{meta}</span>}\n </span>\n {trailing != null && <span className={actionListItemTrailingClass}>{trailing}</span>}\n </button>\n </li>\n )\n },\n)\n"],
5
+ "mappings": ";;;;;;;;;AAoBO,SAAS,qBAAqB,QAA6B,CAAA,GAAuB;AACvF,QAAM,EAAE,WAAW,OAAO,UAAU,UAAA,IAAc;AAClD,QAAM,iBAAyC;IAC7C,aAAa;IACb,gBAAgB;EAAA;AAElB,MAAI,SAAU,gBAAe,eAAe,IAAI;AAChD,QAAM,YAAuD,CAAA;AAC7D,MAAI,SAAU,WAAU,eAAe,IAAI;AAC3C,SAAO,EAAE,WAAW,eAAA;AACtB;AC3BO,IAAM,kBAAkB;AAGxB,IAAM,yBAAyB,IAAI;EACxC,MACE;EAGF,UAAU;IACR,SAAS;MACP,SAAS;MACT,SAAS;IAAA;EACX;EAEF,iBAAiB;IACf,SAAS;EAAA;AAEb,CAAC;AAGM,IAAM,0BAA0B;AAEhC,IAAM,2BAA2B;AAEjC,IAAM,iCAAiC;AAEvC,IAAM,0BAA0B;AAEhC,IAAM,8BACX;;;;ACbK,IAAM,aAAmB,iBAA8C,SAASA,YACrF,EAAE,WAAW,GAAG,MAAA,GAChB,KACA;AACA,SAAO,oBAAC,MAAA,EAAG,KAAU,WAAW,GAAG,iBAAiB,SAAS,GAAG,aAAU,eAAe,GAAG,MAAA,CAAO;AACrG,CAAC;AAqBM,IAAM,iBAAuB;EAClC,SAASC,gBACP,EAAE,OAAO,aAAa,MAAM,UAAU,UAAU,WAAW,UAAU,WAAW,GAAG,MAAA,GACnF,KACA;AACA,UAAM,MAAM,qBAAqB,EAAE,UAAU,QAAA,CAAS;AACtD,WAAA,oBACG,MAAA,EACC,UAAA;MAAC;MAAA;QACC;QACA,MAAK;QACL;QACA,WAAW,GAAG,uBAAuB,EAAE,QAAA,CAAS,GAAG,SAAS;QAC3D,GAAG,IAAI;QACP,GAAG,IAAI;QACP,GAAG;QAEJ,UAAA;UAAA,qBAAC,QAAA,EAAK,WAAW,yBACf,UAAA;YAAA,oBAAC,QAAA,EAAK,WAAW,0BAA2B,UAAA,MAAA,CAAM;YACjD,eAAe,QACd,oBAAC,QAAA,EAAK,WAAW,gCAAiC,UAAA,YAAA,CAAY;YAE/D,QAAQ,QAAQ,oBAAC,QAAA,EAAK,WAAW,yBAA0B,UAAA,KAAA,CAAK;UAAA,EAAA,CACnE;UACC,YAAY,QAAQ,oBAAC,QAAA,EAAK,WAAW,6BAA8B,UAAA,SAAA,CAAS;QAAA;MAAA;IAAA,EAC/E,CACF;EAEJ;AACF;",
6
+ "names": ["ActionList", "ActionListItem"]
7
+ }
package/dist/react-ai.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  devWarn
3
- } from "./chunk-ZF3OHCGV.js";
3
+ } from "./chunk-2Q6HHFAN.js";
4
4
 
5
5
  // ../react-ai/dist/index.js
6
6
  import * as React from "react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  devWarn
3
- } from "./chunk-ZF3OHCGV.js";
3
+ } from "./chunk-2Q6HHFAN.js";
4
4
 
5
5
  // ../react-analytics/dist/index.js
6
6
  import * as React from "react";
@@ -1144,7 +1144,11 @@ function createClientSdkSink(opts) {
1144
1144
  });
1145
1145
  return instance;
1146
1146
  }
1147
- const mod = await import(appInsightsWebSpecifier);
1147
+ const mod = await import(
1148
+ /* webpackIgnore: true */
1149
+ /* @vite-ignore */
1150
+ appInsightsWebSpecifier
1151
+ );
1148
1152
  const ai = new mod.ApplicationInsights({
1149
1153
  config: {
1150
1154
  connectionString: opts.connectionString,
@@ -1495,7 +1499,11 @@ function createPostHogHttpSink(options) {
1495
1499
  }
1496
1500
  var posthogJsSpecifier = "posthog-js";
1497
1501
  async function defaultLoad() {
1498
- const mod = await import(posthogJsSpecifier);
1502
+ const mod = await import(
1503
+ /* webpackIgnore: true */
1504
+ /* @vite-ignore */
1505
+ posthogJsSpecifier
1506
+ );
1499
1507
  return "default" in mod ? mod.default : mod;
1500
1508
  }
1501
1509
  function createPostHogClientSdkSink(options) {
@@ -1587,7 +1595,11 @@ function createPostHogSink(options) {
1587
1595
  // ../analytics-sink-posthog/dist/replay.js
1588
1596
  var posthogJsSpecifier2 = "posthog-js";
1589
1597
  async function defaultLoad2() {
1590
- const mod = await import(posthogJsSpecifier2);
1598
+ const mod = await import(
1599
+ /* webpackIgnore: true */
1600
+ /* @vite-ignore */
1601
+ posthogJsSpecifier2
1602
+ );
1591
1603
  return "default" in mod ? mod.default : mod;
1592
1604
  }
1593
1605
  async function startSessionReplay(options) {