@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
@@ -1,10 +1,12 @@
1
1
  import * as React from 'react';
2
- import { CardVariant } from '../card/index.cjs';
3
- export { CardAPI, CardProps, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants } from '../card/index.cjs';
2
+ import { CardVariant, CardPadding, CardTitleLevel } from '../card/index.cjs';
3
+ export { CardAPI, CardPadding, CardProps, CardTitleLevel, CardVariant, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants } from '../card/index.cjs';
4
4
 
5
5
  interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
6
6
  /** Visual tone of the card. Defaults to `'default'` (issue #485). */
7
7
  variant?: CardVariant;
8
+ /** Built-in inner padding. Defaults to `'none'` (compose CardHeader/CardContent for spacing). */
9
+ padding?: CardPadding;
8
10
  /** Merge the card's classes/props onto the single child element instead of
9
11
  * rendering a `<div>` (Radix-style `asChild`) — e.g.
10
12
  * `<Card asChild><a href="/x">…</a></Card>` for a clickable card. Expects
@@ -22,7 +24,11 @@ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<H
22
24
  /**
23
25
  * CardTitle -- heading within a card header.
24
26
  */
25
- declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
27
+ interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
28
+ /** Heading element. Defaults to `h3`; pick the level that fits the page outline. */
29
+ as?: CardTitleLevel;
30
+ }
31
+ declare const CardTitle: React.ForwardRefExoticComponent<CardTitleProps & React.RefAttributes<HTMLHeadingElement>>;
26
32
  /**
27
33
  * CardDescription -- subtext within a card header.
28
34
  */
@@ -36,4 +42,4 @@ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<
36
42
  */
37
43
  declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
38
44
 
39
- export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
45
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps };
@@ -1,10 +1,12 @@
1
1
  import * as React from 'react';
2
- import { CardVariant } from '../card/index.js';
3
- export { CardAPI, CardProps, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants } from '../card/index.js';
2
+ import { CardVariant, CardPadding, CardTitleLevel } from '../card/index.js';
3
+ export { CardAPI, CardPadding, CardProps, CardTitleLevel, CardVariant, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants } from '../card/index.js';
4
4
 
5
5
  interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
6
6
  /** Visual tone of the card. Defaults to `'default'` (issue #485). */
7
7
  variant?: CardVariant;
8
+ /** Built-in inner padding. Defaults to `'none'` (compose CardHeader/CardContent for spacing). */
9
+ padding?: CardPadding;
8
10
  /** Merge the card's classes/props onto the single child element instead of
9
11
  * rendering a `<div>` (Radix-style `asChild`) — e.g.
10
12
  * `<Card asChild><a href="/x">…</a></Card>` for a clickable card. Expects
@@ -22,7 +24,11 @@ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<H
22
24
  /**
23
25
  * CardTitle -- heading within a card header.
24
26
  */
25
- declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
27
+ interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
28
+ /** Heading element. Defaults to `h3`; pick the level that fits the page outline. */
29
+ as?: CardTitleLevel;
30
+ }
31
+ declare const CardTitle: React.ForwardRefExoticComponent<CardTitleProps & React.RefAttributes<HTMLHeadingElement>>;
26
32
  /**
27
33
  * CardDescription -- subtext within a card header.
28
34
  */
@@ -36,4 +42,4 @@ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<
36
42
  */
37
43
  declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
38
44
 
39
- export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
45
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps };
@@ -2,6 +2,12 @@ import * as React from 'react';
2
2
  import { CommandItemData } from '../command/index.cjs';
3
3
  export { CommandAPI, CommandItemData, CommandState, CommandProps as CoreCommandProps, commandGroupVariants, commandInputVariants, commandItemVariants, commandVariants } from '../command/index.cjs';
4
4
 
5
+ /** What a mounted CommandItem tells the root about itself. */
6
+ interface RegisteredItem {
7
+ domId: string;
8
+ disabled: boolean;
9
+ select: () => void;
10
+ }
5
11
  interface CommandContextValue {
6
12
  search: string;
7
13
  onSearch: (query: string) => void;
@@ -9,14 +15,19 @@ interface CommandContextValue {
9
15
  onSelect: (index: number) => void;
10
16
  items: CommandItemData[];
11
17
  filteredItems: CommandItemData[];
12
- registerItem: (item: CommandItemData) => void;
13
- unregisterItem: (id: string) => void;
18
+ /** Whether a value passes the current search. */
19
+ matches: (value: string) => boolean;
20
+ registerItem: (value: string, item: RegisteredItem) => void;
21
+ unregisterItem: (value: string) => void;
22
+ /** DOM id of the highlighted item, for aria-activedescendant. */
23
+ activeDescendant: string | undefined;
14
24
  listId: string;
15
25
  inputId: string;
16
26
  }
17
27
  interface CommandProps {
18
28
  open?: boolean;
19
29
  onOpenChange?: (open: boolean) => void;
30
+ /** Custom filter — receives an item value and the search, returns true to keep it. */
20
31
  filter?: (value: string, search: string) => boolean;
21
32
  className?: string;
22
33
  children?: React.ReactNode;
@@ -2,6 +2,12 @@ import * as React from 'react';
2
2
  import { CommandItemData } from '../command/index.js';
3
3
  export { CommandAPI, CommandItemData, CommandState, CommandProps as CoreCommandProps, commandGroupVariants, commandInputVariants, commandItemVariants, commandVariants } from '../command/index.js';
4
4
 
5
+ /** What a mounted CommandItem tells the root about itself. */
6
+ interface RegisteredItem {
7
+ domId: string;
8
+ disabled: boolean;
9
+ select: () => void;
10
+ }
5
11
  interface CommandContextValue {
6
12
  search: string;
7
13
  onSearch: (query: string) => void;
@@ -9,14 +15,19 @@ interface CommandContextValue {
9
15
  onSelect: (index: number) => void;
10
16
  items: CommandItemData[];
11
17
  filteredItems: CommandItemData[];
12
- registerItem: (item: CommandItemData) => void;
13
- unregisterItem: (id: string) => void;
18
+ /** Whether a value passes the current search. */
19
+ matches: (value: string) => boolean;
20
+ registerItem: (value: string, item: RegisteredItem) => void;
21
+ unregisterItem: (value: string) => void;
22
+ /** DOM id of the highlighted item, for aria-activedescendant. */
23
+ activeDescendant: string | undefined;
14
24
  listId: string;
15
25
  inputId: string;
16
26
  }
17
27
  interface CommandProps {
18
28
  open?: boolean;
19
29
  onOpenChange?: (open: boolean) => void;
30
+ /** Custom filter — receives an item value and the search, returns true to keep it. */
20
31
  filter?: (value: string, search: string) => boolean;
21
32
  className?: string;
22
33
  children?: React.ReactNode;
@@ -1,19 +1,37 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { ColumnDef, SortDirection } from '../data-table/index.cjs';
3
- export { ColumnDef, DataTableProps as CoreDataTableProps, DataTableAPI, DataTableState, SortDirection, cellVariants, headerVariants, rowVariants, tableVariants } from '../data-table/index.cjs';
4
+ export { ColumnDef, DataTableProps as CoreDataTableProps, DataTableAPI, DataTableAlign, DataTableState, SortDirection, cellVariants, headerVariants, rowVariants, tableVariants } from '../data-table/index.cjs';
4
5
 
5
- interface DataTableProps<T = Record<string, unknown>> {
6
- columns: ColumnDef<T>[];
6
+ interface DataTableColumn<T = Record<string, unknown>> extends Omit<ColumnDef<T>, 'header' | 'cell'> {
7
+ /** Header content. A string is also used for the filter input's label. */
8
+ header: React.ReactNode;
9
+ /** Render the cell. Defaults to `String(accessor(row))`. */
10
+ cell?: (row: T, index: number) => React.ReactNode;
11
+ }
12
+ interface DataTableProps<T = Record<string, unknown>> extends Omit<React.TableHTMLAttributes<HTMLTableElement>, 'children'> {
13
+ columns: DataTableColumn<T>[];
7
14
  data: T[];
8
15
  sortBy?: string;
9
16
  sortDir?: SortDirection;
10
17
  onSort?: (columnId: string, direction: SortDirection) => void;
11
18
  filters?: Record<string, string>;
12
- className?: string;
13
- emptyMessage?: string;
19
+ emptyMessage?: React.ReactNode;
20
+ /** Stable key per row. Defaults to the row index — pass one when rows can reorder. */
21
+ getRowKey?: (row: T, index: number) => string | number;
22
+ /** Extra attributes for a row (`data-*`, `aria-*`, className, handlers). */
23
+ getRowProps?: (row: T, index: number) => React.HTMLAttributes<HTMLTableRowElement>;
24
+ /**
25
+ * Row action. Makes each row focusable (Tab) and activatable with click,
26
+ * Enter or Space. Keep a real link/button in the row too when the action
27
+ * needs an accessible name beyond the row's text.
28
+ */
29
+ onRowClick?: (row: T, index: number) => void;
30
+ /** Table caption (rendered as `<caption>`). */
31
+ caption?: React.ReactNode;
32
+ /** Class for the horizontal scroll wrapper. */
33
+ wrapperClassName?: string;
14
34
  }
15
- declare function DataTable<T = Record<string, unknown>>({ columns, data, sortBy: controlledSortBy, sortDir: controlledSortDir, onSort, filters: controlledFilters, className, emptyMessage, }: DataTableProps<T>): React.DetailedReactHTMLElement<{
16
- className: string;
17
- }, HTMLElement>;
35
+ declare function DataTable<T = Record<string, unknown>>({ columns, data, sortBy: controlledSortBy, sortDir: controlledSortDir, onSort, filters: controlledFilters, className, emptyMessage, getRowKey, getRowProps, onRowClick, caption, wrapperClassName, ...tableProps }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
18
36
 
19
- export { DataTable, type DataTableProps };
37
+ export { DataTable, type DataTableColumn, type DataTableProps };
@@ -1,19 +1,37 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { ColumnDef, SortDirection } from '../data-table/index.js';
3
- export { ColumnDef, DataTableProps as CoreDataTableProps, DataTableAPI, DataTableState, SortDirection, cellVariants, headerVariants, rowVariants, tableVariants } from '../data-table/index.js';
4
+ export { ColumnDef, DataTableProps as CoreDataTableProps, DataTableAPI, DataTableAlign, DataTableState, SortDirection, cellVariants, headerVariants, rowVariants, tableVariants } from '../data-table/index.js';
4
5
 
5
- interface DataTableProps<T = Record<string, unknown>> {
6
- columns: ColumnDef<T>[];
6
+ interface DataTableColumn<T = Record<string, unknown>> extends Omit<ColumnDef<T>, 'header' | 'cell'> {
7
+ /** Header content. A string is also used for the filter input's label. */
8
+ header: React.ReactNode;
9
+ /** Render the cell. Defaults to `String(accessor(row))`. */
10
+ cell?: (row: T, index: number) => React.ReactNode;
11
+ }
12
+ interface DataTableProps<T = Record<string, unknown>> extends Omit<React.TableHTMLAttributes<HTMLTableElement>, 'children'> {
13
+ columns: DataTableColumn<T>[];
7
14
  data: T[];
8
15
  sortBy?: string;
9
16
  sortDir?: SortDirection;
10
17
  onSort?: (columnId: string, direction: SortDirection) => void;
11
18
  filters?: Record<string, string>;
12
- className?: string;
13
- emptyMessage?: string;
19
+ emptyMessage?: React.ReactNode;
20
+ /** Stable key per row. Defaults to the row index — pass one when rows can reorder. */
21
+ getRowKey?: (row: T, index: number) => string | number;
22
+ /** Extra attributes for a row (`data-*`, `aria-*`, className, handlers). */
23
+ getRowProps?: (row: T, index: number) => React.HTMLAttributes<HTMLTableRowElement>;
24
+ /**
25
+ * Row action. Makes each row focusable (Tab) and activatable with click,
26
+ * Enter or Space. Keep a real link/button in the row too when the action
27
+ * needs an accessible name beyond the row's text.
28
+ */
29
+ onRowClick?: (row: T, index: number) => void;
30
+ /** Table caption (rendered as `<caption>`). */
31
+ caption?: React.ReactNode;
32
+ /** Class for the horizontal scroll wrapper. */
33
+ wrapperClassName?: string;
14
34
  }
15
- declare function DataTable<T = Record<string, unknown>>({ columns, data, sortBy: controlledSortBy, sortDir: controlledSortDir, onSort, filters: controlledFilters, className, emptyMessage, }: DataTableProps<T>): React.DetailedReactHTMLElement<{
16
- className: string;
17
- }, HTMLElement>;
35
+ declare function DataTable<T = Record<string, unknown>>({ columns, data, sortBy: controlledSortBy, sortDir: controlledSortDir, onSort, filters: controlledFilters, className, emptyMessage, getRowKey, getRowProps, onRowClick, caption, wrapperClassName, ...tableProps }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
18
36
 
19
- export { DataTable, type DataTableProps };
37
+ export { DataTable, type DataTableColumn, type DataTableProps };
@@ -8,6 +8,11 @@ interface DialogContextValue {
8
8
  contentId: string;
9
9
  titleId: string;
10
10
  descriptionId: string;
11
+ /** Whether a DialogTitle / DialogDescription is mounted — only then is it referenced. */
12
+ hasTitle: boolean;
13
+ hasDescription: boolean;
14
+ setHasTitle: (present: boolean) => void;
15
+ setHasDescription: (present: boolean) => void;
11
16
  }
12
17
  interface DialogProps {
13
18
  open?: boolean;
@@ -8,6 +8,11 @@ interface DialogContextValue {
8
8
  contentId: string;
9
9
  titleId: string;
10
10
  descriptionId: string;
11
+ /** Whether a DialogTitle / DialogDescription is mounted — only then is it referenced. */
12
+ hasTitle: boolean;
13
+ hasDescription: boolean;
14
+ setHasTitle: (present: boolean) => void;
15
+ setHasDescription: (present: boolean) => void;
11
16
  }
12
17
  interface DialogProps {
13
18
  open?: boolean;
@@ -5,6 +5,8 @@ interface DropdownMenuContextValue {
5
5
  open: boolean;
6
6
  onOpenChange: (open: boolean) => void;
7
7
  contentId: string;
8
+ /** The trigger element, so the portalled content can anchor to it. */
9
+ triggerRef: React.MutableRefObject<HTMLElement | null>;
8
10
  }
9
11
  interface DropdownMenuProps {
10
12
  open?: boolean;
@@ -21,7 +23,23 @@ interface DropdownMenuTriggerProps extends React.ButtonHTMLAttributes<HTMLButton
21
23
  asChild?: boolean;
22
24
  }
23
25
  declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
26
+ type DropdownMenuAlign = 'start' | 'center' | 'end';
27
+ /**
28
+ * Fixed-position coordinates that place a menu under its trigger, aligned to
29
+ * the trigger's start, centre or end edge. Pure, so it is unit-testable.
30
+ */
31
+ declare function computeMenuPosition(trigger: {
32
+ top: number;
33
+ bottom: number;
34
+ left: number;
35
+ right: number;
36
+ width: number;
37
+ }, contentWidth: number, align: DropdownMenuAlign, sideOffset: number): React.CSSProperties;
24
38
  interface DropdownMenuContentProps extends React.HTMLAttributes<HTMLDivElement> {
39
+ /** Horizontal alignment to the trigger. Defaults to `start`. */
40
+ align?: DropdownMenuAlign;
41
+ /** Gap between trigger and menu in px. Defaults to 4. */
42
+ sideOffset?: number;
25
43
  }
26
44
  declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
27
45
  interface DropdownMenuItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
@@ -36,4 +54,4 @@ interface DropdownMenuLabelProps extends React.HTMLAttributes<HTMLDivElement> {
36
54
  }
37
55
  declare const DropdownMenuLabel: React.ForwardRefExoticComponent<DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
38
56
 
39
- export { DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps };
57
+ export { DropdownMenu, type DropdownMenuAlign, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, computeMenuPosition };
@@ -5,6 +5,8 @@ interface DropdownMenuContextValue {
5
5
  open: boolean;
6
6
  onOpenChange: (open: boolean) => void;
7
7
  contentId: string;
8
+ /** The trigger element, so the portalled content can anchor to it. */
9
+ triggerRef: React.MutableRefObject<HTMLElement | null>;
8
10
  }
9
11
  interface DropdownMenuProps {
10
12
  open?: boolean;
@@ -21,7 +23,23 @@ interface DropdownMenuTriggerProps extends React.ButtonHTMLAttributes<HTMLButton
21
23
  asChild?: boolean;
22
24
  }
23
25
  declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
26
+ type DropdownMenuAlign = 'start' | 'center' | 'end';
27
+ /**
28
+ * Fixed-position coordinates that place a menu under its trigger, aligned to
29
+ * the trigger's start, centre or end edge. Pure, so it is unit-testable.
30
+ */
31
+ declare function computeMenuPosition(trigger: {
32
+ top: number;
33
+ bottom: number;
34
+ left: number;
35
+ right: number;
36
+ width: number;
37
+ }, contentWidth: number, align: DropdownMenuAlign, sideOffset: number): React.CSSProperties;
24
38
  interface DropdownMenuContentProps extends React.HTMLAttributes<HTMLDivElement> {
39
+ /** Horizontal alignment to the trigger. Defaults to `start`. */
40
+ align?: DropdownMenuAlign;
41
+ /** Gap between trigger and menu in px. Defaults to 4. */
42
+ sideOffset?: number;
25
43
  }
26
44
  declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
27
45
  interface DropdownMenuItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
@@ -36,4 +54,4 @@ interface DropdownMenuLabelProps extends React.HTMLAttributes<HTMLDivElement> {
36
54
  }
37
55
  declare const DropdownMenuLabel: React.ForwardRefExoticComponent<DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
38
56
 
39
- export { DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps };
57
+ export { DropdownMenu, type DropdownMenuAlign, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, computeMenuPosition };
@@ -0,0 +1,28 @@
1
+ import * as React from 'react';
2
+ import { FunnelChartStep } from '../funnel-chart/index.js';
3
+ export { FunnelChartStep } from '../funnel-chart/index.js';
4
+
5
+ interface FunnelChartProps extends Omit<React.HTMLAttributes<HTMLOListElement>, 'children'> {
6
+ /** The funnel steps, top first. */
7
+ steps: FunnelChartStep[];
8
+ /** Formats a count. */
9
+ formatValue?: (value: number) => string;
10
+ /** Formats a percent (already 0–100). */
11
+ formatPercent?: (percent: number) => string;
12
+ /** Smallest bar width in percent, so a tiny step stays visible. Defaults to 6. */
13
+ minBarPercent?: number;
14
+ /** Copy — a step's share of the top step. */
15
+ shareLabel?: (share: string) => string;
16
+ /** Copy — continue-rate between two steps. */
17
+ conversionLabel?: (percent: string) => string;
18
+ /** Copy — count lost between two steps. */
19
+ droppedLabel?: (count: string) => string;
20
+ }
21
+ /**
22
+ * FunnelChart — a vertical conversion funnel: one bar per step, filled to its
23
+ * share of the first step, with the continue-rate and drop-off between steps.
24
+ * Renders an ordered list, so the figures are real text for assistive tech.
25
+ */
26
+ declare const FunnelChart: React.ForwardRefExoticComponent<FunnelChartProps & React.RefAttributes<HTMLOListElement>>;
27
+
28
+ export { FunnelChart, type FunnelChartProps };
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ import { LineChartSeries } from '../line-chart/index.js';
3
+ export { LineChartSeries } from '../line-chart/index.js';
4
+
5
+ interface LineChartProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
6
+ /** The series to plot, all on one shared y-scale. */
7
+ series: LineChartSeries[];
8
+ /** One category label per data point. */
9
+ labels: string[];
10
+ /** Accessible name of the chart image (required). */
11
+ ariaLabel: string;
12
+ /** Rendered height in px (also the viewBox height). Defaults to 230. */
13
+ height?: number;
14
+ /**
15
+ * Fallback width, used for the server render and before the container is
16
+ * measured. On the client the chart measures its container and draws at that
17
+ * width, so text and strokes stay at their authored size. Defaults to 760.
18
+ */
19
+ width?: number;
20
+ /** Formats a value in the tooltip. */
21
+ formatValue?: (value: number) => string;
22
+ /** Formats a y-axis tick. Defaults to `formatValue`. */
23
+ formatTick?: (value: number) => string;
24
+ /** Fill the area under each line. Defaults to on for a single series only. */
25
+ area?: boolean;
26
+ /** Show the series legend under the chart. Defaults to true. */
27
+ showLegend?: boolean;
28
+ }
29
+ /**
30
+ * LineChart — a responsive multi-series line chart on one shared y-scale, with
31
+ * gridlines, category x-labels, a hover/keyboard crosshair + tooltip and a
32
+ * legend. It measures its container and draws at that width (1:1 viewBox), so
33
+ * axis text keeps its authored size in narrow panels.
34
+ * Keyboard: focus the chart, then ←/→/Home/End move between categories.
35
+ */
36
+ declare const LineChart: React.ForwardRefExoticComponent<LineChartProps & React.RefAttributes<HTMLDivElement>>;
37
+
38
+ export { LineChart, type LineChartProps };
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import { NativeSelectSize } from '../native-select/index.js';
3
+ export { NativeSelectSize } from '../native-select/index.js';
4
+
5
+ interface NativeSelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
6
+ /** Visual size; shadows the native `size` (visible rows), which a dropdown never wants. */
7
+ size?: NativeSelectSize;
8
+ /** Classes for the positioning wrapper (width, margins); `className` styles the select. */
9
+ containerClassName?: string;
10
+ }
11
+ /**
12
+ * NativeSelect — a native `<select>` with the input look and a chevron.
13
+ * Children are ordinary `<option>`/`<optgroup>` elements; every native
14
+ * attribute and event passes through, and the ref is the select itself. Use it
15
+ * for forms and filter bars; use `Select` for a custom listbox.
16
+ */
17
+ declare const NativeSelect: React.ForwardRefExoticComponent<NativeSelectProps & React.RefAttributes<HTMLSelectElement>>;
18
+
19
+ export { NativeSelect, type NativeSelectProps };
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { PageHeaderTitleLevel } from '../page-header/index.js';
3
+ export { PageHeaderTitleLevel } from '../page-header/index.js';
4
+
5
+ interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
6
+ /** Optional eyebrow rendered above the title. */
7
+ kicker?: React.ReactNode;
8
+ /** The page title (required). */
9
+ title: React.ReactNode;
10
+ /** Optional supporting copy under the title. */
11
+ description?: React.ReactNode;
12
+ /** Optional actions (buttons, menus) on the trailing edge. */
13
+ actions?: React.ReactNode;
14
+ /** Heading element for the title. Defaults to `h1`. */
15
+ as?: PageHeaderTitleLevel;
16
+ }
17
+ /**
18
+ * PageHeader — the heading cluster at the top of an application page: kicker,
19
+ * title, description and a trailing actions row. Renders a `<header>`.
20
+ */
21
+ declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
22
+
23
+ export { PageHeader, type PageHeaderProps };
@@ -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,28 +1,39 @@
1
1
  import * as React from 'react';
2
- export { StatItem, statColumns } from '../stat-grid/index.js';
2
+ import { StatTone, StatGridColumns, StatGridVariant, StatGridLayout } from '../stat-grid/index.js';
3
+ export { StatGridColumns, StatGridLayout, StatGridVariant, StatItem, StatTone, statColumns } from '../stat-grid/index.js';
3
4
 
4
5
  interface StatGridItem {
5
6
  /** The primary value displayed prominently. Allows rich content in React. */
6
7
  value: React.ReactNode;
7
- /** The descriptive label shown below the value. */
8
+ /** The descriptive label. */
8
9
  label: React.ReactNode;
10
+ /** Stable key; defaults to the index. */
11
+ id?: string;
12
+ /** Optional line explaining the figure (how it was computed, a delta). */
13
+ description?: React.ReactNode;
14
+ /** Colour of the value. Defaults to `default`. */
15
+ tone?: StatTone;
16
+ /** Extra attributes for this item's element (`data-*`, `aria-*`, `title`, className). */
17
+ props?: React.HTMLAttributes<HTMLDivElement>;
9
18
  }
10
19
  interface StatGridProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content'> {
11
20
  /** The stat items to display in the grid. */
12
21
  items: StatGridItem[];
13
22
  /**
14
- * Number of columns. Defaults to `statColumns(items.length)`:
15
- * 1 item → 1, 2 items → 2, 3+ items → 3.
23
+ * Maximum columns (reflows to fewer on narrow screens), or `auto` to fit as
24
+ * many ~12rem items as the width allows. Defaults to
25
+ * `statColumns(items.length)`: 1 → 1, 2 → 2, 3+ → 3.
16
26
  */
17
- columns?: number;
27
+ columns?: StatGridColumns;
28
+ /** `plain` marketing callouts (default) or bordered `card` KPIs. */
29
+ variant?: StatGridVariant;
30
+ /** `value-first` (default) or `label-first` (dashboard KPI order). */
31
+ layout?: StatGridLayout;
18
32
  }
19
33
  /**
20
- * StatGrid — a marketing-style grid of stat callouts.
21
- *
22
- * Each item shows a large bold value and a small muted label. The grid
23
- * automatically computes the column count from the number of items, or you can
24
- * override it with `columns`. Uses `role="list"` / `role="listitem"` for
25
- * accessible enumeration.
34
+ * StatGrid — a responsive grid of stats: marketing callouts (`plain`) or
35
+ * dashboard KPI cards (`card`), value- or label-first, with an optional
36
+ * description and a tone per item. Uses `role="list"` / `role="listitem"`.
26
37
  */
27
38
  declare const StatGrid: React.ForwardRefExoticComponent<StatGridProps & React.RefAttributes<HTMLDivElement>>;
28
39
 
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import { TableDensity, TableHeadTone, TableAlign } from '../table/index.js';
3
+ export { TableAlign, TableDensity, TableHeadTone } from '../table/index.js';
4
+
5
+ interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
6
+ /** Cell padding for every cell. Defaults to `default`. */
7
+ density?: TableDensity;
8
+ /** Look of every header cell. Defaults to `default`. */
9
+ headTone?: TableHeadTone;
10
+ /** Fixed layout: column widths come from the header row. */
11
+ fixed?: boolean;
12
+ /** Class for the horizontal scroll container around the table. */
13
+ containerClassName?: string;
14
+ }
15
+ /**
16
+ * Table — composable, semantic table primitives for cells that hold
17
+ * components (badges, buttons, links). The parts map one-to-one to the HTML
18
+ * table elements. For a data-driven table with sorting/filtering use DataTable.
19
+ */
20
+ declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
21
+ declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
22
+ declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
23
+ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
24
+ interface TableHeadProps extends Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'align'> {
25
+ /** Horizontal alignment. Defaults to `start`. */
26
+ align?: TableAlign;
27
+ }
28
+ /** Header cell. `scope` defaults to `col`. */
29
+ declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
30
+ interface TableCellProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'align'> {
31
+ /** Horizontal alignment. Defaults to `start`. */
32
+ align?: TableAlign;
33
+ /** Tabular figures, no wrapping — for numbers. */
34
+ numeric?: boolean;
35
+ }
36
+ declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
37
+ declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
38
+
39
+ export { Table, TableBody, TableCaption, TableCell, type TableCellProps, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow };