@refraction-ui/react 0.20.1 → 0.22.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 (208) 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-F7B64KT3.js → chunk-3Y2T26QD.js} +13 -7
  5. package/dist/chunk-3Y2T26QD.js.map +7 -0
  6. package/dist/{chunk-H54FLNAF.js → chunk-63N4PZUJ.js} +2 -2
  7. package/dist/{chunk-Y2FNNAIL.js → chunk-EGVPAMQU.js} +2 -2
  8. package/dist/chunk-EGVPAMQU.js.map +1 -0
  9. package/dist/{chunk-WK2IIUFO.js → chunk-QDMLIDYN.js} +2 -2
  10. package/dist/{chunk-BOLFYVI6.js → chunk-QPCKJ2YR.js} +2 -2
  11. package/dist/{chunk-TOZBR4GL.js → chunk-RSWOLRIC.js} +4 -4
  12. package/dist/{chunk-TOZBR4GL.js.map → chunk-RSWOLRIC.js.map} +1 -1
  13. package/dist/{chunk-UNEM2TRI.js → chunk-SDAJVXD4.js} +2 -2
  14. package/dist/{chunk-VK3EQ34F.js → chunk-V24GDHUX.js} +2 -2
  15. package/dist/{chunk-AMK4VCBG.js → chunk-WYKPPK3W.js} +2 -2
  16. package/dist/{chunk-ONACRMG4.js → chunk-XMFNBOPO.js} +2 -2
  17. package/dist/form.cjs.map +1 -1
  18. package/dist/form.js +1 -1
  19. package/dist/index.cjs +632 -47
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +4 -0
  22. package/dist/index.d.ts +4 -0
  23. package/dist/index.js +4 -0
  24. package/dist/internal/action-list/index.d.ts +39 -0
  25. package/dist/internal/badge/index.d.cts +2 -2
  26. package/dist/internal/badge/index.d.ts +2 -2
  27. package/dist/internal/button/index.d.cts +4 -4
  28. package/dist/internal/button/index.d.ts +4 -4
  29. package/dist/internal/card/index.d.cts +14 -2
  30. package/dist/internal/card/index.d.ts +14 -2
  31. package/dist/internal/funnel-chart/index.d.ts +60 -0
  32. package/dist/internal/line-chart/index.d.ts +110 -0
  33. package/dist/internal/page-header/index.d.ts +35 -0
  34. package/dist/internal/react-action-list/index.d.ts +28 -0
  35. package/dist/internal/react-card/index.d.cts +12 -3
  36. package/dist/internal/react-card/index.d.ts +12 -3
  37. package/dist/internal/react-funnel-chart/index.d.ts +28 -0
  38. package/dist/internal/react-line-chart/index.d.ts +33 -0
  39. package/dist/internal/react-page-header/index.d.ts +23 -0
  40. package/dist/internal/react-select/index.d.cts +21 -3
  41. package/dist/internal/react-select/index.d.ts +21 -3
  42. package/dist/internal/react-separator/index.d.cts +6 -1
  43. package/dist/internal/react-separator/index.d.ts +6 -1
  44. package/dist/internal/select/index.d.cts +14 -1
  45. package/dist/internal/select/index.d.ts +14 -1
  46. package/dist/internal/separator/index.d.cts +6 -1
  47. package/dist/internal/separator/index.d.ts +6 -1
  48. package/dist/internal/shared/index.d.cts +6 -3
  49. package/dist/internal/shared/index.d.ts +6 -3
  50. package/dist/internal/tabs/index.d.cts +8 -1
  51. package/dist/internal/tabs/index.d.ts +8 -1
  52. package/dist/react-accordion.js +1 -1
  53. package/dist/react-action-list.js +74 -0
  54. package/dist/react-action-list.js.map +7 -0
  55. package/dist/react-ai.js +1 -1
  56. package/dist/react-analytics.js +1 -1
  57. package/dist/react-animated-text.js +1 -1
  58. package/dist/react-app-shell.js +1 -1
  59. package/dist/react-audience-feature-card.js +1 -1
  60. package/dist/react-audio-room.js +1 -1
  61. package/dist/react-auth.js +1 -1
  62. package/dist/react-avatar-group.js +1 -1
  63. package/dist/react-avatar.js +1 -1
  64. package/dist/react-badge.js +16 -4
  65. package/dist/react-badge.js.map +2 -2
  66. package/dist/react-bottom-nav.js +1 -1
  67. package/dist/react-brand-network-cell.js +1 -1
  68. package/dist/react-breadcrumbs.js +1 -1
  69. package/dist/react-browser-chrome-mock.js +1 -1
  70. package/dist/react-browser-chrome-mock.js.map +2 -2
  71. package/dist/react-button.js +3 -3
  72. package/dist/react-calendar.js +1 -1
  73. package/dist/react-call-controls.js +1 -1
  74. package/dist/react-callout.js +8 -3
  75. package/dist/react-callout.js.map +2 -2
  76. package/dist/react-card-grid.js +1 -1
  77. package/dist/react-card.js +15 -6
  78. package/dist/react-card.js.map +2 -2
  79. package/dist/react-carousel.js +1 -1
  80. package/dist/react-charts.js +1 -1
  81. package/dist/react-checkbox.js +1 -1
  82. package/dist/react-checklist.js +1 -1
  83. package/dist/react-code-block.js +1 -1
  84. package/dist/react-code-editor.js +1 -1
  85. package/dist/react-collapsible.js +1 -1
  86. package/dist/react-combobox.js +1 -1
  87. package/dist/react-command-input.js +1 -1
  88. package/dist/react-command.js +1 -1
  89. package/dist/react-composer.js +3 -3
  90. package/dist/react-content-protection.js +1 -1
  91. package/dist/react-conversation.js +5 -5
  92. package/dist/react-cookie-consent.js +1 -1
  93. package/dist/react-data-table.js +1 -1
  94. package/dist/react-date-picker.js +1 -1
  95. package/dist/react-device-frame.js +1 -1
  96. package/dist/react-dialog.js +2 -2
  97. package/dist/react-diff-viewer.js +4 -1
  98. package/dist/react-diff-viewer.js.map +2 -2
  99. package/dist/react-dropdown-menu.js +1 -1
  100. package/dist/react-editor-status-bar.js +1 -1
  101. package/dist/react-editor-tabs.js +1 -1
  102. package/dist/react-emoji-picker.js +2 -2
  103. package/dist/react-empty-state.js +1 -1
  104. package/dist/react-feedback-dialog.js +2 -2
  105. package/dist/react-file-tree.js +1 -1
  106. package/dist/react-file-upload.js +1 -1
  107. package/dist/react-floating-reactions.js +1 -1
  108. package/dist/react-flow-editor.js +2 -2
  109. package/dist/react-footer.js +1 -1
  110. package/dist/react-funnel-chart.js +105 -0
  111. package/dist/react-funnel-chart.js.map +7 -0
  112. package/dist/react-graph-view.js +2 -2
  113. package/dist/react-infinite-canvas.js +2 -2
  114. package/dist/react-inline-editor.js +1 -1
  115. package/dist/react-input-group.js +1 -1
  116. package/dist/react-input.js +2 -2
  117. package/dist/react-install-prompt.js +1 -1
  118. package/dist/react-kanban-board.js +1 -1
  119. package/dist/react-keyboard-shortcut.js +2 -2
  120. package/dist/react-language-selector.js +1 -1
  121. package/dist/react-line-chart.js +242 -0
  122. package/dist/react-line-chart.js.map +7 -0
  123. package/dist/react-link-card.js +1 -1
  124. package/dist/react-live-captions.js +1 -1
  125. package/dist/react-live-cursors.js +1 -1
  126. package/dist/react-live-transcript.js +1 -1
  127. package/dist/react-location-selector.js +1 -1
  128. package/dist/react-logger.js +1 -1
  129. package/dist/react-markdown-renderer.js +2 -2
  130. package/dist/react-marquee-strip.js +1 -1
  131. package/dist/react-mascot.js +1 -1
  132. package/dist/react-mastery-bar.js +1 -1
  133. package/dist/react-mini-map.js +1 -1
  134. package/dist/react-mobile-nav.js +1 -1
  135. package/dist/react-navbar.js +1 -1
  136. package/dist/react-numbered-steps.js +1 -1
  137. package/dist/react-otp-input.js +1 -1
  138. package/dist/react-page-header.js +40 -0
  139. package/dist/react-page-header.js.map +7 -0
  140. package/dist/react-pagination.js +1 -1
  141. package/dist/react-password-input.js +2 -2
  142. package/dist/react-payment.js +1 -1
  143. package/dist/react-popover.js +1 -1
  144. package/dist/react-pre-call-lobby.js +1 -1
  145. package/dist/react-presence-indicator.js +1 -1
  146. package/dist/react-pricing-card.js +1 -1
  147. package/dist/react-progress-display.js +2 -2
  148. package/dist/react-progress-display.js.map +1 -1
  149. package/dist/react-radial-gauge.js +1 -1
  150. package/dist/react-radio.js +1 -1
  151. package/dist/react-rating-scale.js +1 -1
  152. package/dist/react-reaction-bar.js +1 -1
  153. package/dist/react-resizable-layout.js +1 -1
  154. package/dist/react-search-bar.js +1 -1
  155. package/dist/react-section-head.js +1 -1
  156. package/dist/react-segmented-control.js +1 -1
  157. package/dist/react-select.js +94 -20
  158. package/dist/react-select.js.map +3 -3
  159. package/dist/react-separator.js +19 -7
  160. package/dist/react-separator.js.map +2 -2
  161. package/dist/react-sheet.js +1 -1
  162. package/dist/react-sidebar.js +1 -1
  163. package/dist/react-skeleton.js +1 -1
  164. package/dist/react-skip-to-content.js +1 -1
  165. package/dist/react-slide-viewer.js +3 -1
  166. package/dist/react-slide-viewer.js.map +2 -2
  167. package/dist/react-slider.js +1 -1
  168. package/dist/react-slot-picker.js +1 -1
  169. package/dist/react-social-auth-button.js +3 -3
  170. package/dist/react-sortable-list.js +1 -1
  171. package/dist/react-stat-grid.js +1 -1
  172. package/dist/react-status-indicator.js +1 -1
  173. package/dist/react-steps.js +1 -1
  174. package/dist/react-sticky-note.js +3 -1
  175. package/dist/react-sticky-note.js.map +2 -2
  176. package/dist/react-switch.js +1 -1
  177. package/dist/react-table-of-contents.js +1 -1
  178. package/dist/react-tabs.js +50 -2
  179. package/dist/react-tabs.js.map +2 -2
  180. package/dist/react-terminal.js +1 -1
  181. package/dist/react-test-results.js +1 -1
  182. package/dist/react-textarea.js +3 -3
  183. package/dist/react-textarea.js.map +1 -1
  184. package/dist/react-thread-view.js +2 -2
  185. package/dist/react-timeline.js +1 -1
  186. package/dist/react-toast.js +1 -1
  187. package/dist/react-tooltip.js +1 -1
  188. package/dist/react-version-selector.js +1 -1
  189. package/dist/react-video-grid.js +2 -2
  190. package/dist/react-video-player.js +1 -1
  191. package/dist/react-video-tile.js +2 -2
  192. package/dist/react-voice-pill.js +1 -1
  193. package/dist/react-waveform.js +1 -1
  194. package/dist/react-wizard.js +1 -1
  195. package/dist/styles.css +48 -0
  196. package/dist/theme.js +1 -1
  197. package/package.json +5 -1
  198. package/dist/chunk-F7B64KT3.js.map +0 -7
  199. package/dist/chunk-Y2FNNAIL.js.map +0 -1
  200. package/dist/chunk-ZF3OHCGV.js.map +0 -7
  201. /package/dist/{chunk-533MCMSU.js.map → chunk-3I3DYDHR.js.map} +0 -0
  202. /package/dist/{chunk-H54FLNAF.js.map → chunk-63N4PZUJ.js.map} +0 -0
  203. /package/dist/{chunk-WK2IIUFO.js.map → chunk-QDMLIDYN.js.map} +0 -0
  204. /package/dist/{chunk-BOLFYVI6.js.map → chunk-QPCKJ2YR.js.map} +0 -0
  205. /package/dist/{chunk-UNEM2TRI.js.map → chunk-SDAJVXD4.js.map} +0 -0
  206. /package/dist/{chunk-VK3EQ34F.js.map → chunk-V24GDHUX.js.map} +0 -0
  207. /package/dist/{chunk-AMK4VCBG.js.map → chunk-WYKPPK3W.js.map} +0 -0
  208. /package/dist/{chunk-ONACRMG4.js.map → chunk-XMFNBOPO.js.map} +0 -0
@@ -3,17 +3,25 @@ import * as React from 'react';
3
3
  export { SelectAPI, SelectOption, selectContentVariants, selectItemVariants, selectTokens, selectTriggerVariants } from '../select/index.cjs';
4
4
 
5
5
  interface SelectProps {
6
+ /** Selected value (controlled). */
6
7
  value?: string;
8
+ /** Initially selected value (uncontrolled). */
9
+ defaultValue?: string;
7
10
  onValueChange?: (value: string) => void;
8
11
  disabled?: boolean;
9
12
  children?: React.ReactNode;
13
+ /** Shown by `SelectValue` while nothing is selected. */
10
14
  placeholder?: string;
15
+ /** Class for the positioning wrapper the select renders around its parts. */
16
+ className?: string;
11
17
  }
12
18
  /**
13
19
  * Select -- dropdown select with accessible keyboard and ARIA support.
14
- * Compound component: Select > SelectTrigger + SelectContent > SelectItem.
20
+ * Compound component: Select > SelectTrigger (> SelectValue) + SelectContent > SelectItem.
21
+ * Renders a `relative` wrapper so the listbox floats under the trigger, and
22
+ * closes on a pointer press outside it.
15
23
  */
16
- declare function Select({ value, onValueChange, disabled, children, placeholder, }: SelectProps): react_jsx_runtime.JSX.Element;
24
+ declare function Select({ value: controlledValue, defaultValue, onValueChange, disabled, children, placeholder, className, }: SelectProps): react_jsx_runtime.JSX.Element;
17
25
  interface SelectTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
18
26
  size?: 'sm' | 'default' | 'lg';
19
27
  }
@@ -26,5 +34,15 @@ interface SelectItemProps extends React.HTMLAttributes<HTMLDivElement> {
26
34
  disabled?: boolean;
27
35
  }
28
36
  declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
37
+ interface SelectValueProps extends React.HTMLAttributes<HTMLSpanElement> {
38
+ /** Shown while nothing is selected. Defaults to the `Select` placeholder. */
39
+ placeholder?: React.ReactNode;
40
+ }
41
+ /**
42
+ * SelectValue -- place inside `SelectTrigger` to show the selected item's
43
+ * label (its `SelectItem` children), or the placeholder when nothing is
44
+ * selected. Pass `children` to render the value yourself.
45
+ */
46
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
29
47
 
30
- export { Select, SelectContent, type SelectContentProps, SelectItem, type SelectItemProps, type SelectProps, SelectTrigger, type SelectTriggerProps };
48
+ export { Select, SelectContent, type SelectContentProps, SelectItem, type SelectItemProps, type SelectProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps };
@@ -3,17 +3,25 @@ import * as React from 'react';
3
3
  export { SelectAPI, SelectOption, selectContentVariants, selectItemVariants, selectTokens, selectTriggerVariants } from '../select/index.js';
4
4
 
5
5
  interface SelectProps {
6
+ /** Selected value (controlled). */
6
7
  value?: string;
8
+ /** Initially selected value (uncontrolled). */
9
+ defaultValue?: string;
7
10
  onValueChange?: (value: string) => void;
8
11
  disabled?: boolean;
9
12
  children?: React.ReactNode;
13
+ /** Shown by `SelectValue` while nothing is selected. */
10
14
  placeholder?: string;
15
+ /** Class for the positioning wrapper the select renders around its parts. */
16
+ className?: string;
11
17
  }
12
18
  /**
13
19
  * Select -- dropdown select with accessible keyboard and ARIA support.
14
- * Compound component: Select > SelectTrigger + SelectContent > SelectItem.
20
+ * Compound component: Select > SelectTrigger (> SelectValue) + SelectContent > SelectItem.
21
+ * Renders a `relative` wrapper so the listbox floats under the trigger, and
22
+ * closes on a pointer press outside it.
15
23
  */
16
- declare function Select({ value, onValueChange, disabled, children, placeholder, }: SelectProps): react_jsx_runtime.JSX.Element;
24
+ declare function Select({ value: controlledValue, defaultValue, onValueChange, disabled, children, placeholder, className, }: SelectProps): react_jsx_runtime.JSX.Element;
17
25
  interface SelectTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
18
26
  size?: 'sm' | 'default' | 'lg';
19
27
  }
@@ -26,5 +34,15 @@ interface SelectItemProps extends React.HTMLAttributes<HTMLDivElement> {
26
34
  disabled?: boolean;
27
35
  }
28
36
  declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
37
+ interface SelectValueProps extends React.HTMLAttributes<HTMLSpanElement> {
38
+ /** Shown while nothing is selected. Defaults to the `Select` placeholder. */
39
+ placeholder?: React.ReactNode;
40
+ }
41
+ /**
42
+ * SelectValue -- place inside `SelectTrigger` to show the selected item's
43
+ * label (its `SelectItem` children), or the placeholder when nothing is
44
+ * selected. Pass `children` to render the value yourself.
45
+ */
46
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
29
47
 
30
- export { Select, SelectContent, type SelectContentProps, SelectItem, type SelectItemProps, type SelectProps, SelectTrigger, type SelectTriggerProps };
48
+ export { Select, SelectContent, type SelectContentProps, SelectItem, type SelectItemProps, type SelectProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps };
@@ -1,9 +1,14 @@
1
1
  import * as React from 'react';
2
- import { SeparatorOrientation } from '../separator/index.cjs';
2
+ import { SeparatorOrientation, SeparatorTone } from '../separator/index.cjs';
3
3
 
4
4
  interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  /** Orientation of the separator. Defaults to `'horizontal'`. */
6
6
  orientation?: SeparatorOrientation;
7
+ /**
8
+ * Line tone. `'default'` uses the standard border token; `'subtle'` uses the
9
+ * hairline `border-subtle` token for a lighter rule (issue #485).
10
+ */
11
+ tone?: SeparatorTone;
7
12
  /**
8
13
  * Optional centered label. Only meaningful for horizontal separators —
9
14
  * renders a line on each side of the label (a "labeled divider").
@@ -1,9 +1,14 @@
1
1
  import * as React from 'react';
2
- import { SeparatorOrientation } from '../separator/index.js';
2
+ import { SeparatorOrientation, SeparatorTone } from '../separator/index.js';
3
3
 
4
4
  interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  /** Orientation of the separator. Defaults to `'horizontal'`. */
6
6
  orientation?: SeparatorOrientation;
7
+ /**
8
+ * Line tone. `'default'` uses the standard border token; `'subtle'` uses the
9
+ * hairline `border-subtle` token for a lighter rule (issue #485).
10
+ */
11
+ tone?: SeparatorTone;
7
12
  /**
8
13
  * Optional centered label. Only meaningful for horizontal separators —
9
14
  * renders a line on each side of the label (a "labeled divider").
@@ -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 };
@@ -43,13 +43,18 @@ declare function createSeparator(props?: SeparatorProps): SeparatorAPI;
43
43
  */
44
44
  declare const separatorVariants: (props?: ({
45
45
  orientation?: "horizontal" | "vertical" | undefined;
46
+ tone?: "default" | "subtle" | undefined;
46
47
  labeled?: "true" | "false" | undefined;
47
48
  } & {
48
49
  className?: string;
49
50
  }) | undefined) => string;
51
+ /** Line tone for the separator rule and labeled-divider flanks. */
52
+ type SeparatorTone = 'default' | 'subtle';
50
53
  /** Class for each flanking line in the labeled-divider variant. */
51
54
  declare const separatorLineClass = "h-px flex-1 bg-border";
55
+ /** Hairline variant of {@link separatorLineClass} (issue #485). */
56
+ declare const separatorSubtleLineClass = "h-px flex-1 bg-border-subtle";
52
57
  /** Class for the centered label in the labeled-divider variant. */
53
58
  declare const separatorLabelClass = "px-3 text-xs uppercase tracking-wide text-muted-foreground";
54
59
 
55
- export { type SeparatorAPI, type SeparatorOrientation, type SeparatorProps, createSeparator, separatorLabelClass, separatorLineClass, separatorVariants };
60
+ export { type SeparatorAPI, type SeparatorOrientation, type SeparatorProps, type SeparatorTone, createSeparator, separatorLabelClass, separatorLineClass, separatorSubtleLineClass, separatorVariants };
@@ -43,13 +43,18 @@ declare function createSeparator(props?: SeparatorProps): SeparatorAPI;
43
43
  */
44
44
  declare const separatorVariants: (props?: ({
45
45
  orientation?: "horizontal" | "vertical" | undefined;
46
+ tone?: "default" | "subtle" | undefined;
46
47
  labeled?: "true" | "false" | undefined;
47
48
  } & {
48
49
  className?: string;
49
50
  }) | undefined) => string;
51
+ /** Line tone for the separator rule and labeled-divider flanks. */
52
+ type SeparatorTone = 'default' | 'subtle';
50
53
  /** Class for each flanking line in the labeled-divider variant. */
51
54
  declare const separatorLineClass = "h-px flex-1 bg-border";
55
+ /** Hairline variant of {@link separatorLineClass} (issue #485). */
56
+ declare const separatorSubtleLineClass = "h-px flex-1 bg-border-subtle";
52
57
  /** Class for the centered label in the labeled-divider variant. */
53
58
  declare const separatorLabelClass = "px-3 text-xs uppercase tracking-wide text-muted-foreground";
54
59
 
55
- export { type SeparatorAPI, type SeparatorOrientation, type SeparatorProps, createSeparator, separatorLabelClass, separatorLineClass, separatorVariants };
60
+ export { type SeparatorAPI, type SeparatorOrientation, type SeparatorProps, type SeparatorTone, createSeparator, separatorLabelClass, separatorLineClass, separatorSubtleLineClass, separatorVariants };
@@ -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>;
@@ -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";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-ZF3OHCGV.js";
4
+ } from "./chunk-2Q6HHFAN.js";
5
5
 
6
6
  // ../react-animated-text/dist/index.js
7
7
  import * as React from "react";
@@ -2,7 +2,7 @@ import {
2
2
  cn,
3
3
  devWarn,
4
4
  generateId
5
- } from "./chunk-ZF3OHCGV.js";
5
+ } from "./chunk-2Q6HHFAN.js";
6
6
 
7
7
  // ../react-app-shell/dist/index.js
8
8
  import * as React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-ZF3OHCGV.js";
4
+ } from "./chunk-2Q6HHFAN.js";
5
5
 
6
6
  // ../react-audience-feature-card/dist/index.js
7
7
  import * as React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-ZF3OHCGV.js";
4
+ } from "./chunk-2Q6HHFAN.js";
5
5
 
6
6
  // ../react-audio-room/dist/index.js
7
7
  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-auth/dist/index.js
6
6
  import * as React2 from "react";
@@ -2,7 +2,7 @@ import {
2
2
  cn,
3
3
  cva,
4
4
  generateId
5
- } from "./chunk-ZF3OHCGV.js";
5
+ } from "./chunk-2Q6HHFAN.js";
6
6
 
7
7
  // ../react-avatar-group/dist/index.js
8
8
  import * as React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-ZF3OHCGV.js";
4
+ } from "./chunk-2Q6HHFAN.js";
5
5
 
6
6
  // ../react-avatar/dist/index.js
7
7
  import * as React from "react";
@@ -4,13 +4,20 @@ import {
4
4
  import {
5
5
  cn,
6
6
  cva
7
- } from "./chunk-ZF3OHCGV.js";
7
+ } from "./chunk-2Q6HHFAN.js";
8
8
 
9
9
  // ../react-badge/dist/index.js
10
10
  import * as React from "react";
11
11
 
12
12
  // ../badge/dist/index.js
13
- var statusVariants = ["success", "warning", "destructive"];
13
+ var statusVariants = [
14
+ "success",
15
+ "warning",
16
+ "destructive",
17
+ "positive",
18
+ "caution",
19
+ "done"
20
+ ];
14
21
  function createBadge(props = {}) {
15
22
  const { variant = "default" } = props;
16
23
  const ariaProps = {};
@@ -25,7 +32,7 @@ function createBadge(props = {}) {
25
32
  };
26
33
  }
27
34
  var badgeVariants = cva({
28
- base: "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
35
+ base: "inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
29
36
  variants: {
30
37
  variant: {
31
38
  default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
@@ -34,7 +41,12 @@ var badgeVariants = cva({
34
41
  destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80 font-semibold",
35
42
  outline: "text-foreground",
36
43
  success: "border-transparent bg-success text-success-foreground shadow hover:bg-success/80 font-semibold",
37
- warning: "border-transparent bg-warning text-warning-foreground shadow hover:bg-warning/80 font-semibold"
44
+ warning: "border-transparent bg-warning text-warning-foreground shadow hover:bg-warning/80 font-semibold",
45
+ // Second brand accent + extended status roles (issue #485).
46
+ tertiary: "border-transparent bg-tertiary text-tertiary-foreground shadow hover:bg-tertiary/80 font-semibold",
47
+ positive: "border-transparent bg-positive text-positive-foreground shadow hover:bg-positive/80 font-semibold",
48
+ caution: "border-transparent bg-caution text-caution-foreground shadow hover:bg-caution/80 font-semibold",
49
+ done: "border-transparent bg-done text-info-foreground shadow hover:bg-done/80 font-semibold"
38
50
  },
39
51
  size: {
40
52
  sm: "px-2 py-0 text-[10px]",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../badge/src/badge.ts", "../../badge/src/badge.styles.ts", "../../react-badge/src/badge.tsx"],
4
- "sourcesContent": ["import type { AccessibilityProps } from '@refraction-ui/shared'\n\nexport type BadgeVariant = 'default' | 'primary' | 'secondary' | 'destructive' | 'outline' | 'success' | 'warning'\nexport type BadgeSize = 'sm' | 'md'\n\nexport interface BadgeProps {\n variant?: BadgeVariant\n size?: BadgeSize\n}\n\nexport interface BadgeAPI {\n /** ARIA attributes to spread on the element */\n ariaProps: Partial<AccessibilityProps>\n /** Data attributes for CSS styling hooks */\n dataAttributes: Record<string, string>\n}\n\nconst statusVariants: BadgeVariant[] = ['success', 'warning', 'destructive']\n\n/** Icon name for status badge variants — non-color indicator for colorblind safety */\nconst BADGE_ICONS: Partial<Record<BadgeVariant, string>> = {\n success: 'check',\n warning: 'alert',\n destructive: 'x',\n}\n\n/** Get the icon name for a badge variant (undefined for non-status variants) */\nexport function getBadgeIcon(variant: BadgeVariant): string | undefined {\n return BADGE_ICONS[variant]\n}\n\nexport function createBadge(props: BadgeProps = {}): BadgeAPI {\n const { variant = 'default' } = props\n\n const ariaProps: Partial<AccessibilityProps> = {}\n\n if (statusVariants.includes(variant)) {\n ariaProps.role = 'status'\n }\n\n const dataAttributes: Record<string, string> = {}\n dataAttributes['data-variant'] = variant\n\n return {\n ariaProps,\n dataAttributes,\n }\n}\n", "import { cva } from '@refraction-ui/shared'\n\nexport const badgeVariants = cva({\n base: 'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n variants: {\n variant: {\n default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',\n primary: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',\n secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive: 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80 font-semibold',\n outline: 'text-foreground',\n success: 'border-transparent bg-success text-success-foreground shadow hover:bg-success/80 font-semibold',\n warning: 'border-transparent bg-warning text-warning-foreground shadow hover:bg-warning/80 font-semibold',\n },\n size: {\n sm: 'px-2 py-0 text-[10px]',\n md: 'px-2.5 py-0.5 text-xs',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n})\n", "import * as React from 'react'\nimport {\n createBadge,\n badgeVariants,\n type BadgeVariant,\n type BadgeSize,\n} from '@refraction-ui/badge'\nimport { cn } from '@refraction-ui/shared'\nimport { Slot } from '@refraction-ui/react-slot'\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: BadgeVariant\n size?: BadgeSize\n /** Merge the badge's classes/props onto the single child element instead of\n * rendering a `<div>` (Radix-style `asChild`) — e.g.\n * `<Badge asChild><a href=\"/x\">…</a></Badge>` for a linked badge. Expects\n * exactly one React element child. */\n asChild?: boolean\n}\n\n/**\n * Badge component — renders a styled badge with variant and size support.\n *\n * Uses the headless @refraction-ui/badge core for state and ARIA attributes.\n * Styling via Tailwind utility classes (no external CSS-in-JS).\n */\nexport const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n function Badge({ variant, size, asChild = false, className, children, ...props }, ref) {\n const api = createBadge({ variant, size })\n const classes = cn(badgeVariants({ variant, size }), className)\n\n if (asChild) {\n return (\n <Slot\n ref={ref as React.Ref<HTMLElement>}\n className={classes}\n {...api.ariaProps}\n {...api.dataAttributes}\n {...props}\n >\n {children}\n </Slot>\n )\n }\n\n return (\n <div\n ref={ref}\n className={classes}\n {...api.ariaProps}\n {...api.dataAttributes}\n {...props}\n >\n {children}\n </div>\n )\n },\n)\n"],
5
- "mappings": ";;;;;;;;;;;;AAiBA,IAAM,iBAAiC,CAAC,WAAW,WAAW,aAAa;AAcpE,SAAS,YAAY,QAAoB,CAAA,GAAc;AAC5D,QAAM,EAAE,UAAU,UAAA,IAAc;AAEhC,QAAM,YAAyC,CAAA;AAE/C,MAAI,eAAe,SAAS,OAAO,GAAG;AACpC,cAAU,OAAO;EACnB;AAEA,QAAM,iBAAyC,CAAA;AAC/C,iBAAe,cAAc,IAAI;AAEjC,SAAO;IACL;IACA;EAAA;AAEJ;AC7CO,IAAM,gBAAgB,IAAI;EAC/B,MAAM;EACN,UAAU;IACR,SAAS;MACP,SAAS;MACT,SAAS;MACT,WAAW;MACX,aAAa;MACb,SAAS;MACT,SAAS;MACT,SAAS;IAAA;IAEX,MAAM;MACJ,IAAI;MACJ,IAAI;IAAA;EACN;EAEF,iBAAiB;IACf,SAAS;IACT,MAAM;EAAA;AAEV,CAAC;;;;ACGM,IAAM,QAAc;EACzB,SAASA,OAAM,EAAE,SAAS,MAAM,UAAU,OAAO,WAAW,UAAU,GAAG,MAAA,GAAS,KAAK;AACrF,UAAM,MAAM,YAAY,EAAE,SAAS,KAAA,CAAM;AACzC,UAAM,UAAU,GAAG,cAAc,EAAE,SAAS,KAAA,CAAM,GAAG,SAAS;AAE9D,QAAI,SAAS;AACX,aACE;QAAC;QAAA;UACC;UACA,WAAW;UACV,GAAG,IAAI;UACP,GAAG,IAAI;UACP,GAAG;UAEH;QAAA;MAAA;IAGP;AAEA,WACE;MAAC;MAAA;QACC;QACA,WAAW;QACV,GAAG,IAAI;QACP,GAAG,IAAI;QACP,GAAG;QAEH;MAAA;IAAA;EAGP;AACF;",
4
+ "sourcesContent": ["import type { AccessibilityProps } from '@refraction-ui/shared'\n\nexport type BadgeVariant =\n | 'default'\n | 'primary'\n | 'secondary'\n | 'destructive'\n | 'outline'\n | 'success'\n | 'warning'\n // Issue #485 — second brand accent + extended status roles.\n | 'tertiary'\n | 'positive'\n | 'caution'\n | 'done'\nexport type BadgeSize = 'sm' | 'md'\n\nexport interface BadgeProps {\n variant?: BadgeVariant\n size?: BadgeSize\n}\n\nexport interface BadgeAPI {\n /** ARIA attributes to spread on the element */\n ariaProps: Partial<AccessibilityProps>\n /** Data attributes for CSS styling hooks */\n dataAttributes: Record<string, string>\n}\n\nconst statusVariants: BadgeVariant[] = [\n 'success',\n 'warning',\n 'destructive',\n 'positive',\n 'caution',\n 'done',\n]\n\n/** Icon name for status badge variants — non-color indicator for colorblind safety */\nconst BADGE_ICONS: Partial<Record<BadgeVariant, string>> = {\n success: 'check',\n warning: 'alert',\n destructive: 'x',\n positive: 'check',\n caution: 'alert',\n done: 'check',\n}\n\n/** Get the icon name for a badge variant (undefined for non-status variants) */\nexport function getBadgeIcon(variant: BadgeVariant): string | undefined {\n return BADGE_ICONS[variant]\n}\n\nexport function createBadge(props: BadgeProps = {}): BadgeAPI {\n const { variant = 'default' } = props\n\n const ariaProps: Partial<AccessibilityProps> = {}\n\n if (statusVariants.includes(variant)) {\n ariaProps.role = 'status'\n }\n\n const dataAttributes: Record<string, string> = {}\n dataAttributes['data-variant'] = variant\n\n return {\n ariaProps,\n dataAttributes,\n }\n}\n", "import { cva } from '@refraction-ui/shared'\n\nexport const badgeVariants = cva({\n base: 'inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n variants: {\n variant: {\n default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',\n primary: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',\n secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive: 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80 font-semibold',\n outline: 'text-foreground',\n success: 'border-transparent bg-success text-success-foreground shadow hover:bg-success/80 font-semibold',\n warning: 'border-transparent bg-warning text-warning-foreground shadow hover:bg-warning/80 font-semibold',\n // Second brand accent + extended status roles (issue #485).\n tertiary: 'border-transparent bg-tertiary text-tertiary-foreground shadow hover:bg-tertiary/80 font-semibold',\n positive: 'border-transparent bg-positive text-positive-foreground shadow hover:bg-positive/80 font-semibold',\n caution: 'border-transparent bg-caution text-caution-foreground shadow hover:bg-caution/80 font-semibold',\n done: 'border-transparent bg-done text-info-foreground shadow hover:bg-done/80 font-semibold',\n },\n size: {\n sm: 'px-2 py-0 text-[10px]',\n md: 'px-2.5 py-0.5 text-xs',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n})\n", "import * as React from 'react'\nimport {\n createBadge,\n badgeVariants,\n type BadgeVariant,\n type BadgeSize,\n} from '@refraction-ui/badge'\nimport { cn } from '@refraction-ui/shared'\nimport { Slot } from '@refraction-ui/react-slot'\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: BadgeVariant\n size?: BadgeSize\n /** Merge the badge's classes/props onto the single child element instead of\n * rendering a `<div>` (Radix-style `asChild`) — e.g.\n * `<Badge asChild><a href=\"/x\">…</a></Badge>` for a linked badge. Expects\n * exactly one React element child. */\n asChild?: boolean\n}\n\n/**\n * Badge component — renders a styled badge with variant and size support.\n *\n * Uses the headless @refraction-ui/badge core for state and ARIA attributes.\n * Styling via Tailwind utility classes (no external CSS-in-JS).\n */\nexport const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n function Badge({ variant, size, asChild = false, className, children, ...props }, ref) {\n const api = createBadge({ variant, size })\n const classes = cn(badgeVariants({ variant, size }), className)\n\n if (asChild) {\n return (\n <Slot\n ref={ref as React.Ref<HTMLElement>}\n className={classes}\n {...api.ariaProps}\n {...api.dataAttributes}\n {...props}\n >\n {children}\n </Slot>\n )\n }\n\n return (\n <div\n ref={ref}\n className={classes}\n {...api.ariaProps}\n {...api.dataAttributes}\n {...props}\n >\n {children}\n </div>\n )\n },\n)\n"],
5
+ "mappings": ";;;;;;;;;;;;AA6BA,IAAM,iBAAiC;EACrC;EACA;EACA;EACA;EACA;EACA;AACF;AAiBO,SAAS,YAAY,QAAoB,CAAA,GAAc;AAC5D,QAAM,EAAE,UAAU,UAAA,IAAc;AAEhC,QAAM,YAAyC,CAAA;AAE/C,MAAI,eAAe,SAAS,OAAO,GAAG;AACpC,cAAU,OAAO;EACnB;AAEA,QAAM,iBAAyC,CAAA;AAC/C,iBAAe,cAAc,IAAI;AAEjC,SAAO;IACL;IACA;EAAA;AAEJ;ACnEO,IAAM,gBAAgB,IAAI;EAC/B,MAAM;EACN,UAAU;IACR,SAAS;MACP,SAAS;MACT,SAAS;MACT,WAAW;MACX,aAAa;MACb,SAAS;MACT,SAAS;MACT,SAAS;;MAET,UAAU;MACV,UAAU;MACV,SAAS;MACT,MAAM;IAAA;IAER,MAAM;MACJ,IAAI;MACJ,IAAI;IAAA;EACN;EAEF,iBAAiB;IACf,SAAS;IACT,MAAM;EAAA;AAEV,CAAC;;;;ACFM,IAAM,QAAc;EACzB,SAASA,OAAM,EAAE,SAAS,MAAM,UAAU,OAAO,WAAW,UAAU,GAAG,MAAA,GAAS,KAAK;AACrF,UAAM,MAAM,YAAY,EAAE,SAAS,KAAA,CAAM;AACzC,UAAM,UAAU,GAAG,cAAc,EAAE,SAAS,KAAA,CAAM,GAAG,SAAS;AAE9D,QAAI,SAAS;AACX,aACE;QAAC;QAAA;UACC;UACA,WAAW;UACV,GAAG,IAAI;UACP,GAAG,IAAI;UACP,GAAG;UAEH;QAAA;MAAA;IAGP;AAEA,WACE;MAAC;MAAA;QACC;QACA,WAAW;QACV,GAAG,IAAI;QACP,GAAG,IAAI;QACP,GAAG;QAEH;MAAA;IAAA;EAGP;AACF;",
6
6
  "names": ["Badge"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-ZF3OHCGV.js";
4
+ } from "./chunk-2Q6HHFAN.js";
5
5
 
6
6
  // ../react-bottom-nav/dist/index.js
7
7
  import * as React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-ZF3OHCGV.js";
4
+ } from "./chunk-2Q6HHFAN.js";
5
5
 
6
6
  // ../react-brand-network-cell/dist/index.js
7
7
  import * as React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-ZF3OHCGV.js";
4
+ } from "./chunk-2Q6HHFAN.js";
5
5
 
6
6
  // ../react-breadcrumbs/dist/index.js
7
7
  import * as React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-ZF3OHCGV.js";
4
+ } from "./chunk-2Q6HHFAN.js";
5
5
 
6
6
  // ../react-browser-chrome-mock/dist/index.js
7
7
  import * as React from "react";