tfy-web-components 0.0.33 → 0.0.35

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 (226) hide show
  1. package/README.md +49 -58
  2. package/dist/Button-C77b7jpW.js +284 -0
  3. package/dist/Button-C77b7jpW.js.map +1 -0
  4. package/dist/CompositeItem-BGwD51jI.js +33 -0
  5. package/dist/CompositeItem-BGwD51jI.js.map +1 -0
  6. package/dist/CompositeList-D4xmSZ5V.js +291 -0
  7. package/dist/CompositeList-D4xmSZ5V.js.map +1 -0
  8. package/dist/CompositeRoot-BxrPc7F6.js +351 -0
  9. package/dist/CompositeRoot-BxrPc7F6.js.map +1 -0
  10. package/dist/DirectionContext-Pb9yafF5.js +11 -0
  11. package/dist/DirectionContext-Pb9yafF5.js.map +1 -0
  12. package/dist/FieldItemContext-DRVgx-D1.js +13 -0
  13. package/dist/FieldItemContext-DRVgx-D1.js.map +1 -0
  14. package/dist/{Input-BvwIpntS.js → Input-Dhmo6L2n.js} +100 -78
  15. package/dist/Input-Dhmo6L2n.js.map +1 -0
  16. package/dist/Modal-C4MUy9GD.js +696 -0
  17. package/dist/Modal-C4MUy9GD.js.map +1 -0
  18. package/dist/{MonacoEditorCore-xfpJ6z-E.js → MonacoEditorCore-n-df5f7I.js} +2 -2
  19. package/dist/{MonacoEditorCore-xfpJ6z-E.js.map → MonacoEditorCore-n-df5f7I.js.map} +1 -1
  20. package/dist/Popover-eC_vX5By.js +1074 -0
  21. package/dist/Popover-eC_vX5By.js.map +1 -0
  22. package/dist/ToolbarRootContext-B_HxjkNI.js +11 -0
  23. package/dist/ToolbarRootContext-B_HxjkNI.js.map +1 -0
  24. package/dist/Tooltip-BuGLP-PU.js +4096 -0
  25. package/dist/Tooltip-BuGLP-PU.js.map +1 -0
  26. package/dist/classNames-B1XpQHle.js +44 -0
  27. package/dist/classNames-B1XpQHle.js.map +1 -0
  28. package/dist/components/atoms/Accordion.d.ts +19 -37
  29. package/dist/components/atoms/Accordion.es.js +847 -78
  30. package/dist/components/atoms/Accordion.es.js.map +1 -1
  31. package/dist/components/atoms/AudioPlayer.es.js +9 -9
  32. package/dist/components/atoms/AudioPlayer.es.js.map +1 -1
  33. package/dist/components/atoms/Avatar.d.ts +42 -9
  34. package/dist/components/atoms/Avatar.es.js +491 -36
  35. package/dist/components/atoms/Avatar.es.js.map +1 -1
  36. package/dist/components/atoms/Badge.d.ts +40 -35
  37. package/dist/components/atoms/Badge.es.js +163 -53
  38. package/dist/components/atoms/Badge.es.js.map +1 -1
  39. package/dist/components/atoms/Button.d.ts +37 -16
  40. package/dist/components/atoms/Button.es.js +16 -221
  41. package/dist/components/atoms/Button.es.js.map +1 -1
  42. package/dist/components/atoms/ButtonGroup.d.ts +53 -0
  43. package/dist/components/atoms/ButtonGroup.es.js +349 -0
  44. package/dist/components/atoms/ButtonGroup.es.js.map +1 -0
  45. package/dist/components/atoms/IconButton.d.ts +23 -9
  46. package/dist/components/atoms/IconButton.es.js +82 -16
  47. package/dist/components/atoms/IconButton.es.js.map +1 -1
  48. package/dist/components/atoms/IconProvider.d.ts +1 -1
  49. package/dist/components/atoms/IconProvider.es.js +48 -7
  50. package/dist/components/atoms/IconProvider.es.js.map +1 -1
  51. package/dist/components/atoms/Modal.d.ts +27 -3
  52. package/dist/components/atoms/Modal.es.js +15 -16
  53. package/dist/components/atoms/Modal.es.js.map +1 -1
  54. package/dist/components/atoms/Notification.d.ts +1 -1
  55. package/dist/components/atoms/Notification.es.js +26 -3
  56. package/dist/components/atoms/Notification.es.js.map +1 -1
  57. package/dist/components/atoms/OutlinedRadio.d.ts +6 -2
  58. package/dist/components/atoms/OutlinedRadio.es.js +12 -25
  59. package/dist/components/atoms/OutlinedRadio.es.js.map +1 -1
  60. package/dist/components/atoms/Progress.d.ts +48 -0
  61. package/dist/components/atoms/Progress.es.js +279 -0
  62. package/dist/components/atoms/Progress.es.js.map +1 -0
  63. package/dist/components/atoms/Skeleton.d.ts +9 -3
  64. package/dist/components/atoms/Skeleton.es.js +33 -3
  65. package/dist/components/atoms/Skeleton.es.js.map +1 -1
  66. package/dist/components/atoms/Spinner.d.ts +15 -4
  67. package/dist/components/atoms/Spinner.es.js +86 -22
  68. package/dist/components/atoms/Spinner.es.js.map +1 -1
  69. package/dist/components/atoms/Switch.d.ts +19 -7
  70. package/dist/components/atoms/Switch.es.js +288 -50
  71. package/dist/components/atoms/Switch.es.js.map +1 -1
  72. package/dist/components/atoms/TabButton.d.ts +17 -3
  73. package/dist/components/atoms/TabButton.es.js +647 -25
  74. package/dist/components/atoms/TabButton.es.js.map +1 -1
  75. package/dist/components/atoms/TabPanel.es.js +1 -1
  76. package/dist/components/atoms/Tag.d.ts +43 -0
  77. package/dist/components/atoms/Tag.es.js +219 -0
  78. package/dist/components/atoms/Tag.es.js.map +1 -0
  79. package/dist/components/atoms/Tooltip.d.ts +36 -14
  80. package/dist/components/atoms/Tooltip.es.js +7 -114
  81. package/dist/components/atoms/Tooltip.es.js.map +1 -1
  82. package/dist/components/molecules/Alert.d.ts +1 -1
  83. package/dist/components/molecules/Alert.es.js +13 -9
  84. package/dist/components/molecules/Alert.es.js.map +1 -1
  85. package/dist/components/molecules/CopyField.d.ts +2 -2
  86. package/dist/components/molecules/CopyField.es.js +3 -4
  87. package/dist/components/molecules/CopyField.es.js.map +1 -1
  88. package/dist/components/molecules/CustomDrawer.d.ts +5 -4
  89. package/dist/components/molecules/CustomDrawer.es.js +141 -82
  90. package/dist/components/molecules/CustomDrawer.es.js.map +1 -1
  91. package/dist/components/molecules/Dialog.d.ts +16 -8
  92. package/dist/components/molecules/Dialog.es.js +33 -31
  93. package/dist/components/molecules/Dialog.es.js.map +1 -1
  94. package/dist/components/molecules/ImagesPreview.es.js +15 -11
  95. package/dist/components/molecules/ImagesPreview.es.js.map +1 -1
  96. package/dist/components/molecules/Input.d.ts +1 -1
  97. package/dist/components/molecules/Input.es.js +3 -5
  98. package/dist/components/molecules/Input.es.js.map +1 -1
  99. package/dist/components/molecules/Markdown/ExpandableMarkdown.d.ts +8 -8
  100. package/dist/components/molecules/Markdown/components.d.ts +12 -11
  101. package/dist/components/molecules/Markdown.es.js +26 -49
  102. package/dist/components/molecules/Markdown.es.js.map +1 -1
  103. package/dist/components/molecules/Notify.d.ts +30 -1
  104. package/dist/components/molecules/Notify.es.js +91 -36
  105. package/dist/components/molecules/Notify.es.js.map +1 -1
  106. package/dist/components/molecules/SimpleCodeEditor.es.js +32 -19
  107. package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
  108. package/dist/components/molecules/ToggleButton.d.ts +3 -2
  109. package/dist/components/molecules/ToggleButton.es.js +155 -57
  110. package/dist/components/molecules/ToggleButton.es.js.map +1 -1
  111. package/dist/components/molecules/agent-chat/AgentStepsCard.d.ts +2 -2
  112. package/dist/components/molecules/agent-chat/UserMessage.es.js +2 -2
  113. package/dist/components/molecules/agent-chat/UserMessage.es.js.map +1 -1
  114. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js +5 -5
  115. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js.map +1 -1
  116. package/dist/components/molecules/agent-chat/index.d.ts +0 -6
  117. package/dist/components/molecules/agent-chat.es.js +78 -410
  118. package/dist/components/molecules/agent-chat.es.js.map +1 -1
  119. package/dist/components/molecules/monacoEditorCore/MonacoEditorCore.d.ts +0 -1
  120. package/dist/components/theme/colors.d.ts +17 -53
  121. package/dist/components/theme/colors.es.js +384 -180
  122. package/dist/components/theme/colors.es.js.map +1 -1
  123. package/dist/components/theme/theme.d.ts +14 -11
  124. package/dist/components/theme/theme.es.js +3 -64
  125. package/dist/components/theme/theme.es.js.map +1 -1
  126. package/dist/components/theme/useTheme.es.js +1 -4
  127. package/dist/components/theme/useTheme.es.js.map +1 -1
  128. package/dist/composite-CrCQWAKA.js +108 -0
  129. package/dist/composite-CrCQWAKA.js.map +1 -0
  130. package/dist/composite-DCpXNxz9.js +66 -0
  131. package/dist/composite-DCpXNxz9.js.map +1 -0
  132. package/dist/conversions-CbWPvHRE.js +14 -0
  133. package/dist/conversions-CbWPvHRE.js.map +1 -0
  134. package/dist/error-FX4R42W-.js +6 -0
  135. package/dist/error-FX4R42W-.js.map +1 -0
  136. package/dist/fonts.css +7 -0
  137. package/dist/hooks/useContainerDimensions.d.ts +1 -1
  138. package/dist/index-B806bfA-.js +257 -0
  139. package/dist/index-B806bfA-.js.map +1 -0
  140. package/dist/index-DSVg79g-.js +45 -0
  141. package/dist/index-DSVg79g-.js.map +1 -0
  142. package/dist/index.d.ts +19 -4
  143. package/dist/index.es.js +56 -9
  144. package/dist/index.es.js.map +1 -1
  145. package/dist/inertValue-IJM5NA30.js +11 -0
  146. package/dist/inertValue-IJM5NA30.js.map +1 -0
  147. package/dist/lib/utils.d.ts +1 -0
  148. package/dist/markdown.css +13 -14
  149. package/dist/new-components/atoms/Checkbox.d.ts +6 -0
  150. package/dist/new-components/atoms/Checkbox.es.js +423 -0
  151. package/dist/new-components/atoms/Checkbox.es.js.map +1 -0
  152. package/dist/new-components/atoms/Chip.d.ts +38 -0
  153. package/dist/new-components/atoms/Chip.es.js +269 -0
  154. package/dist/new-components/atoms/Chip.es.js.map +1 -0
  155. package/dist/new-components/atoms/Popover.d.ts +87 -0
  156. package/dist/new-components/atoms/Popover.es.js +21 -0
  157. package/dist/new-components/atoms/Popover.es.js.map +1 -0
  158. package/dist/new-components/atoms/Radio.d.ts +14 -0
  159. package/dist/new-components/atoms/Radio.es.js +536 -0
  160. package/dist/new-components/atoms/Radio.es.js.map +1 -0
  161. package/dist/new-components/atoms/SegmentedControl.d.ts +28 -0
  162. package/dist/new-components/atoms/SegmentedControl.es.js +326 -0
  163. package/dist/new-components/atoms/SegmentedControl.es.js.map +1 -0
  164. package/dist/new-components/atoms/Slider.d.ts +8 -0
  165. package/dist/new-components/atoms/Slider.es.js +1415 -0
  166. package/dist/new-components/atoms/Slider.es.js.map +1 -0
  167. package/dist/new-components/atoms/Toggletip.d.ts +43 -0
  168. package/dist/new-components/atoms/Toggletip.es.js +216 -0
  169. package/dist/new-components/atoms/Toggletip.es.js.map +1 -0
  170. package/dist/new-components/atoms/stories/ThemeComparison.d.ts +8 -0
  171. package/dist/shadowDom-Bq4g0Qeu.js +52 -0
  172. package/dist/shadowDom-Bq4g0Qeu.js.map +1 -0
  173. package/dist/style.css +1 -1
  174. package/dist/theme.css +9 -154
  175. package/dist/tokens.css +1136 -0
  176. package/dist/useAnimationFrame-DwhymJoW.js +108 -0
  177. package/dist/useAnimationFrame-DwhymJoW.js.map +1 -0
  178. package/dist/useAriaLabelledBy-B6n92QBS.js +49 -0
  179. package/dist/useAriaLabelledBy-B6n92QBS.js.map +1 -0
  180. package/dist/useBaseUiId-Ch7ujXpo.js +281 -0
  181. package/dist/useBaseUiId-Ch7ujXpo.js.map +1 -0
  182. package/dist/useButton-PUBhT4Vo.js +235 -0
  183. package/dist/useButton-PUBhT4Vo.js.map +1 -0
  184. package/dist/useControlled-BSyYkg5C.js +65 -0
  185. package/dist/useControlled-BSyYkg5C.js.map +1 -0
  186. package/dist/useIsoLayoutEffect-e9VA-ICd.js +499 -0
  187. package/dist/useIsoLayoutEffect-e9VA-ICd.js.map +1 -0
  188. package/dist/useLabelableId-DCLzrdD-.js +241 -0
  189. package/dist/useLabelableId-DCLzrdD-.js.map +1 -0
  190. package/dist/useOpenInteractionType-DGWLoAqp.js +1086 -0
  191. package/dist/useOpenInteractionType-DGWLoAqp.js.map +1 -0
  192. package/dist/usePopupHandleStore-BdS-xYID.js +2372 -0
  193. package/dist/usePopupHandleStore-BdS-xYID.js.map +1 -0
  194. package/dist/useTimeout-BXf1hDIL.js +46 -0
  195. package/dist/useTimeout-BXf1hDIL.js.map +1 -0
  196. package/dist/useTransitionStatus-C9gg_XJ-.js +202 -0
  197. package/dist/useTransitionStatus-C9gg_XJ-.js.map +1 -0
  198. package/dist/useValueAsRef-BfFRcMg6.js +28 -0
  199. package/dist/useValueAsRef-BfFRcMg6.js.map +1 -0
  200. package/dist/utils/classNames.d.ts +3 -2
  201. package/dist/visuallyHidden-B6H2X3_Y.js +26 -0
  202. package/dist/visuallyHidden-B6H2X3_Y.js.map +1 -0
  203. package/dist/vite-env.d.ts +18 -0
  204. package/package.json +30 -22
  205. package/dist/Input-BvwIpntS.js.map +0 -1
  206. package/dist/Notification-BT4CZ69U.js +0 -39
  207. package/dist/Notification-BT4CZ69U.js.map +0 -1
  208. package/dist/RootFontSizeContext-7vgn7Y_k.js +0 -22
  209. package/dist/RootFontSizeContext-7vgn7Y_k.js.map +0 -1
  210. package/dist/classNames-Dy-RXSjS.js +0 -9
  211. package/dist/classNames-Dy-RXSjS.js.map +0 -1
  212. package/dist/components/molecules/DropdownMenu.d.ts +0 -18
  213. package/dist/components/molecules/DropdownMenu.es.js +0 -104
  214. package/dist/components/molecules/DropdownMenu.es.js.map +0 -1
  215. package/dist/components/molecules/ThumbsFeedback.d.ts +0 -13
  216. package/dist/components/molecules/ThumbsFeedback.es.js +0 -98
  217. package/dist/components/molecules/ThumbsFeedback.es.js.map +0 -1
  218. package/dist/components/molecules/agent-chat/SandboxToolCall.d.ts +0 -15
  219. package/dist/components/molecules/agent-chat/ToolCallCard.d.ts +0 -26
  220. package/dist/components/molecules/agent-chat/ToolCallContentBlock.d.ts +0 -17
  221. package/dist/components/theme/lightColorPlugin.d.ts +0 -1
  222. package/dist/components/theme/lightColorPlugin.es.js +0 -92
  223. package/dist/components/theme/lightColorPlugin.es.js.map +0 -1
  224. package/dist/tailwindPreset.d.ts +0 -144
  225. package/dist/tailwindPreset.es.js +0 -100
  226. package/dist/tailwindPreset.es.js.map +0 -1
package/README.md CHANGED
@@ -2,9 +2,10 @@
2
2
 
3
3
  ## Structure/Elements
4
4
 
5
- - ⚛️ [React 18](https://reactjs.org/)
6
- - 📚 [Storybook 8](https://storybook.js.org/) - Components preview
7
- - 🖌️ [Tailwind CSS 3](https://tailwindcss.com/)
5
+ - ⚛️ [React 19](https://reactjs.org/)
6
+ - 📚 [Storybook 10](https://storybook.js.org/) - Components preview
7
+ - 🖌️ [Tailwind CSS 4](https://tailwindcss.com/)
8
+ - 🧩 [shadcn/ui](https://ui.shadcn.com/) - Base primitives (Base UI + CVA)
8
9
  - ⏩ [Vite](https://vitejs.dev/) - Run and build the project blazingly fast!
9
10
  - ⚡ [Vitest](https://vitest.dev/) - Components Unit Testing
10
11
  - 📐 [ESLint](https://eslint.org/) & [Prettier](https://prettier.io/) - Formatting and Linting
@@ -19,52 +20,30 @@
19
20
  yarn add tfy-web-components
20
21
  ```
21
22
 
22
- Design-system runtimes (MUI, Emotion, Font Awesome, OpenUI, Monaco) ship as
23
- dependencies of `tfy-web-components` — you do not need to install them
24
- separately. If your app already depends on MUI and needs a single shared
25
- instance/theme, use your package manager’s resolutions / overrides.
23
+ Font Awesome, OpenUI, Monaco, and Base UI ship as dependencies of
24
+ `tfy-web-components` — you do not need to install them separately. Icons are
25
+ Font Awesome and custom SVGs through `IconProvider`.
26
26
 
27
- 2. Wire up theming, matching your consumer app's Tailwind version:
27
+ 2. Wire up theming (Tailwind v4):
28
28
 
29
- ### Tailwind v3
30
-
31
- Use the exported preset — it configures the color palette, `bg-light-*`/
32
- `text-light-*` utilities, and the scrollbar plugin in one line, and re-exports
33
- `tailwindContentPaths` so Tailwind can detect the classes this package's
34
- compiled components use:
35
-
36
- ```js
37
- // tailwind.config.js
38
- import tfyPreset, { tailwindContentPaths } from 'tfy-web-components/tailwind-preset'
29
+ Import the generated theme stylesheet once in your Tailwind entry CSS — it
30
+ declares Figma-synced shadcn tokens, dark variant, fonts, and animations:
39
31
 
40
- export default {
41
- presets: [tfyPreset],
42
- content: ['./src/**/*.{js,ts,jsx,tsx}', ...tailwindContentPaths],
43
- }
32
+ ```css
33
+ @import 'tailwindcss';
34
+ @import 'tfy-web-components/theme.css';
44
35
  ```
45
36
 
46
- Then wrap your app in the theme provider (owns the `.dark` class, persists the
47
- user's preference, and injects the `--color-*` CSS variables at runtime):
37
+ Then wrap your app in the theme provider (owns the `.dark` class and persists the
38
+ user's preference):
48
39
 
49
40
  ```tsx
50
41
  import { ThemeProvider } from 'tfy-web-components/components/theme/useTheme'
51
-
52
42
  ;<ThemeProvider>
53
43
  <App />
54
44
  </ThemeProvider>
55
45
  ```
56
46
 
57
- ### Tailwind v4
58
-
59
- Import the generated theme stylesheet once in your Tailwind entry CSS — it
60
- declares the palette's `@theme inline` registrations plus an `@source`
61
- directive, so no content-path configuration is needed:
62
-
63
- ```css
64
- @import 'tailwindcss';
65
- @import 'tfy-web-components/theme.css';
66
- ```
67
-
68
47
  If a host app/SDK already owns its theme state, pass the resolved theme to
69
48
  `ThemeProvider`. It will apply the same value to its context and the document
70
49
  without persisting a separate preference or listening to system-theme changes:
@@ -78,21 +57,33 @@ without persisting a separate preference or listening to system-theme changes:
78
57
  Omit `theme` when tfy-web-components should own the preference through
79
58
  `localStorage` and the system preference.
80
59
 
81
- ### Markdown styles
60
+ ### Components
82
61
 
83
- GitHub Markdown base styles plus `.markdown-body` / `.markdown-table` overrides
84
- ship in `markdown.css`. Tailwind v4 apps already get them via `theme.css`
85
- (no extra import). Tailwind v3 apps (or anyone not using `theme.css`) should
86
- import `markdown.css` directly:
62
+ Existing deep imports are unchanged. See [DESIGN_SYSTEM.md](./DESIGN_SYSTEM.md).
87
63
 
88
- ```css
89
- /* Tailwind v4 — already included when you import theme.css */
90
- @import 'tfy-web-components/theme.css';
64
+ ```ts
65
+ import Button from 'tfy-web-components/components/atoms/Button'
66
+ ```
91
67
 
92
- /* Tailwind v3 / à-la-carte */
93
- @import 'tfy-web-components/markdown.css';
68
+ ### Design tokens
69
+
70
+ ```
71
+ Figma Variables → design-tokens/figma-variables.json → yarn tokens:build → src/components/theme/tokens.css
94
72
  ```
95
73
 
74
+ `tokens.css` is **generated** (imported via `theme.css`). To change a colour,
75
+ type scale, spacing, or radius: update Figma → export JSON (see
76
+ [`design-tokens/README.md`](./design-tokens/README.md)) → run `yarn tokens:build`
77
+ → commit JSON and `tokens.css`.
78
+
79
+ For a full changelog of the design-system base PR and how to extend it with new
80
+ components, see [**DESIGN_SYSTEM.md**](./DESIGN_SYSTEM.md).
81
+
82
+ ### Markdown styles
83
+
84
+ GitHub Markdown base styles plus `.markdown-body` / `.markdown-table` overrides
85
+ ship in `markdown.css` and are included via `theme.css`.
86
+
96
87
  KaTeX styles are pulled in by the Markdown component JS import (`katex/dist/katex.min.css`);
97
88
  ensure your bundler preserves CSS side effects from that dependency.
98
89
 
@@ -100,23 +91,17 @@ ensure your bundler preserves CSS side effects from that dependency.
100
91
  import Markdown from 'tfy-web-components/components/molecules/Markdown'
101
92
  ```
102
93
 
103
- The default wrapper class is `markdown-body` (overridable via `bodyClass`).
104
-
105
94
  ### Agent chat components
106
95
 
107
- Import agent-chat UI from the barrel or the explicit deep entries only:
108
-
109
96
  ```ts
110
- import { ToolCallCard, SubAgentCard } from 'tfy-web-components/components/molecules/agent-chat'
97
+ import { AgentStepsCard, SubAgentCard } from 'tfy-web-components/components/molecules/agent-chat'
111
98
  import UserMessage from 'tfy-web-components/components/molecules/agent-chat/UserMessage'
112
99
  ```
113
100
 
114
- Per-file `agent-chat/*` wildcards are not published; use the barrel unless you
115
- need `UserMessage` or `UserMessageEdit` as standalone entries.
116
-
117
101
  ## Package Configuration
118
102
 
119
103
  See [PACKAGE_CHANGES.md](./PACKAGE_CHANGES.md) for details on:
104
+
120
105
  - Why `sideEffects: ["**/*.css"]` is critical for proper tree-shaking
121
106
  - Why the `exports` field has no `"require"` entry
122
107
 
@@ -127,10 +112,16 @@ Always prepending yarn:
127
112
  - `dev`: Bootstrap the Storybook preview with Hot Reload.
128
113
  - `build`: Builds the static storybook project.
129
114
  - `build:lib`: Builds the component library into the **dist** folder.
130
- - `lint:fix`: Applies linting based on the rules defined in **.eslintrc.js**.
131
- - `format:prettier`: Formats files using the prettier rules defined in **.prettierrc**.
132
- - `test`: Runs testing using watch mode.
133
- - `test:cov`: Runs testing displaying a coverage report.
115
+ - `lint`: Applies linting based on the rules defined in **eslint.config.js**.
116
+ - `format:check`: Checks formatting against **.prettierrc** without writing files.
117
+ - `prettier`: Formats files using the prettier rules defined in **.prettierrc**.
118
+ - `typecheck`: Typechecks the project with `tsc --noEmit`.
119
+ - `test`: Runs Vitest in watch mode.
120
+ - `test:run`: Runs the test suite once.
121
+ - `test:cov`: Runs the suite once and writes a coverage report to **coverage/**.
122
+ - `check`: Runs lint, format, typecheck, and `test:run`.
123
+
124
+ Pull requests and pushes to `main` run **lint**, **format**, **typecheck**, **test** (`test:cov`), and **build** (`build:lib`) as separate GitHub checks. The test check uploads the `src` coverage report as an artifact. Set `lines`, `functions`, `branches`, and `statements` in `vite.config.js` when that report should gate the check.
134
125
 
135
126
  ## License
136
127
 
@@ -0,0 +1,284 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { c as cva } from "./index-DSVg79g-.js";
4
+ import { SpinnerMark } from "./components/atoms/Spinner.es.js";
5
+ import { o as overArg, a as isPrototype, g as getNative, r as root, d as baseGetTag, t as toSource, M as Map, c as isArrayLike, j as isArray, f as isBuffer, h as isTypedArray, e as isArguments } from "./isTypedArray-CLAk7Q1f.js";
6
+ import IconProvider from "./components/atoms/IconProvider.es.js";
7
+ import { L as LightTooltip, D as DarkTooltip } from "./Tooltip-BuGLP-PU.js";
8
+ import { c as classNames } from "./classNames-B1XpQHle.js";
9
+ import { b as useRenderElement } from "./useIsoLayoutEffect-e9VA-ICd.js";
10
+ function useRender(params) {
11
+ return useRenderElement(params.defaultTagName ?? "div", params, params);
12
+ }
13
+ var nativeKeys = overArg(Object.keys, Object);
14
+ var objectProto$1 = Object.prototype;
15
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
16
+ function baseKeys(object) {
17
+ if (!isPrototype(object)) {
18
+ return nativeKeys(object);
19
+ }
20
+ var result = [];
21
+ for (var key in Object(object)) {
22
+ if (hasOwnProperty$1.call(object, key) && key != "constructor") {
23
+ result.push(key);
24
+ }
25
+ }
26
+ return result;
27
+ }
28
+ var DataView = getNative(root, "DataView");
29
+ var Promise$1 = getNative(root, "Promise");
30
+ var Set = getNative(root, "Set");
31
+ var WeakMap = getNative(root, "WeakMap");
32
+ var mapTag$1 = "[object Map]", objectTag = "[object Object]", promiseTag = "[object Promise]", setTag$1 = "[object Set]", weakMapTag = "[object WeakMap]";
33
+ var dataViewTag = "[object DataView]";
34
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
35
+ var getTag = baseGetTag;
36
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag$1 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set && getTag(new Set()) != setTag$1 || WeakMap && getTag(new WeakMap()) != weakMapTag) {
37
+ getTag = function(value) {
38
+ var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
39
+ if (ctorString) {
40
+ switch (ctorString) {
41
+ case dataViewCtorString:
42
+ return dataViewTag;
43
+ case mapCtorString:
44
+ return mapTag$1;
45
+ case promiseCtorString:
46
+ return promiseTag;
47
+ case setCtorString:
48
+ return setTag$1;
49
+ case weakMapCtorString:
50
+ return weakMapTag;
51
+ }
52
+ }
53
+ return result;
54
+ };
55
+ }
56
+ var mapTag = "[object Map]", setTag = "[object Set]";
57
+ var objectProto = Object.prototype;
58
+ var hasOwnProperty = objectProto.hasOwnProperty;
59
+ function isEmpty(value) {
60
+ if (value == null) {
61
+ return true;
62
+ }
63
+ if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
64
+ return !value.length;
65
+ }
66
+ var tag = getTag(value);
67
+ if (tag == mapTag || tag == setTag) {
68
+ return !value.size;
69
+ }
70
+ if (isPrototype(value)) {
71
+ return !baseKeys(value).length;
72
+ }
73
+ for (var key in value) {
74
+ if (hasOwnProperty.call(value, key)) {
75
+ return false;
76
+ }
77
+ }
78
+ return true;
79
+ }
80
+ const buttonVariants = cva(
81
+ "cursor-pointer focus-ring inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-md transition-colors focus-visible:outline-offset-4 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
82
+ {
83
+ variants: {
84
+ variant: {
85
+ primary: "bg-button-primary-background text-button-primary-text shadow-xs hover:bg-button-primary-background-hover data-[selected=true]:bg-button-primary-background-selected [&_[data-slot=button-icon]]:text-button-primary-icon data-[selected=true]:[&_[data-slot=button-icon]]:text-button-primary-icon-selected",
86
+ default: "bg-button-primary-background text-button-primary-text shadow-xs hover:bg-button-primary-background-hover data-[selected=true]:bg-button-primary-background-selected [&_[data-slot=button-icon]]:text-button-primary-icon data-[selected=true]:[&_[data-slot=button-icon]]:text-button-primary-icon-selected",
87
+ secondary: "bg-button-secondary-background text-button-secondary-text shadow-xs ring-1 ring-inset ring-button-secondary-border hover:bg-button-secondary-background-hover hover:text-button-secondary-text-hover hover:ring-transparent data-[selected=true]:bg-button-secondary-background-selected data-[selected=true]:text-button-secondary-text-selected data-[selected=true]:ring-button-secondary-border-selected [&_[data-slot=button-icon]]:text-button-secondary-icon hover:[&_[data-slot=button-icon]]:text-button-secondary-icon-hover data-[selected=true]:[&_[data-slot=button-icon]]:text-button-secondary-icon-selected",
88
+ ghost: "bg-transparent text-button-ghost-text hover:bg-button-ghost-background-hover data-[selected=true]:bg-button-ghost-background-selected data-[selected=true]:text-button-ghost-text-selected [&_[data-slot=button-icon]]:text-button-ghost-icon hover:[&_[data-slot=button-icon]]:text-button-ghost-icon-hover data-[selected=true]:[&_[data-slot=button-icon]]:text-button-ghost-icon-selected",
89
+ link: "bg-transparent text-text-link underline-offset-4 hover:underline [&_[data-slot=button-icon]]:text-text-link",
90
+ destructive: "bg-button-destructive-background text-button-destructive-text shadow-xs ring-1 ring-inset ring-button-destructive-border hover:bg-button-destructive-background-hover hover:text-button-destructive-text-hover hover:ring-transparent data-[selected=true]:bg-button-destructive-background-hover data-[selected=true]:text-button-destructive-text-hover data-[selected=true]:ring-transparent [&_[data-slot=button-icon]]:text-button-destructive-icon hover:[&_[data-slot=button-icon]]:text-button-destructive-icon-hover data-[selected=true]:[&_[data-slot=button-icon]]:text-button-destructive-icon-hover"
91
+ },
92
+ size: {
93
+ default: "h-8 gap-space-4 px-space-10 text-label-md",
94
+ md: "h-6 gap-space-4 px-space-8 text-label-sm",
95
+ sm: "h-5 gap-space-4 px-space-8 text-label-sm",
96
+ icon: "size-8 gap-0 p-0",
97
+ "icon-md": "size-6 gap-0 p-0",
98
+ "icon-sm": "size-4 gap-0 rounded-sm p-0"
99
+ },
100
+ roundness: {
101
+ default: "",
102
+ rounded: "rounded-pill"
103
+ },
104
+ type: {
105
+ text: "",
106
+ icon: "px-0",
107
+ toggle: "",
108
+ "load-more": ""
109
+ }
110
+ },
111
+ defaultVariants: {
112
+ variant: "primary",
113
+ size: "default",
114
+ roundness: "default",
115
+ type: "text"
116
+ },
117
+ compoundVariants: [{ variant: "destructive", size: "default", className: "gap-space-6" }]
118
+ }
119
+ );
120
+ function ControlButton({
121
+ className,
122
+ variant = "primary",
123
+ size = "default",
124
+ roundness = "default",
125
+ type: controlType = "text",
126
+ htmlType = "button",
127
+ asChild = false,
128
+ selected = false,
129
+ loading = false,
130
+ disabled,
131
+ onClick,
132
+ children,
133
+ ...props
134
+ }) {
135
+ const isPrimary = variant === "primary" || variant === "default";
136
+ const spinnerSize = controlType === "icon" ? size === "icon-sm" ? "sm" : "md" : size === "md" ? "sm" : "md";
137
+ const handleClick = (event) => {
138
+ if (loading) {
139
+ event.preventDefault();
140
+ event.stopPropagation();
141
+ return;
142
+ }
143
+ onClick == null ? void 0 : onClick(event);
144
+ };
145
+ return useRender({
146
+ defaultTagName: "button",
147
+ render: asChild && React.isValidElement(children) ? children : void 0,
148
+ props: {
149
+ type: asChild ? void 0 : htmlType,
150
+ "data-slot": "button",
151
+ "data-variant": variant,
152
+ "data-size": size,
153
+ "data-selected": selected || void 0,
154
+ "data-loading": loading || void 0,
155
+ "aria-busy": loading || void 0,
156
+ "aria-disabled": disabled || loading || void 0,
157
+ "aria-pressed": selected || void 0,
158
+ disabled: asChild ? void 0 : disabled,
159
+ className: classNames(
160
+ buttonVariants({
161
+ variant,
162
+ size: controlType === "icon" && size === "default" ? "icon" : size,
163
+ roundness,
164
+ type: controlType,
165
+ className
166
+ })
167
+ ),
168
+ ...props,
169
+ onClick: handleClick,
170
+ children: asChild ? void 0 : /* @__PURE__ */ jsxs(Fragment, { children: [
171
+ loading ? /* @__PURE__ */ jsx("span", { "data-slot": "button-icon", className: "h-full flex items-center justify-center", children: /* @__PURE__ */ jsx(SpinnerMark, { size: spinnerSize, tone: isPrimary ? "inverse" : "neutral", "aria-label": "Loading" }) }) : null,
172
+ children
173
+ ] })
174
+ }
175
+ });
176
+ }
177
+ const variantMap = {
178
+ primary: "primary",
179
+ secondary: "secondary",
180
+ ghost: "ghost",
181
+ tertiary: "secondary",
182
+ destructive: "destructive",
183
+ link: "link"
184
+ };
185
+ const sizeMap = {
186
+ large: "default",
187
+ small: "md"
188
+ };
189
+ const iconSizeMap = {
190
+ large: "icon",
191
+ small: "icon-md"
192
+ };
193
+ const ButtonBase = React.forwardRef(function ButtonBase2({
194
+ text,
195
+ icon: iconProp,
196
+ block = false,
197
+ disabled = false,
198
+ loading = false,
199
+ dataTestId,
200
+ iconToRight = false,
201
+ variant = "primary",
202
+ size = "large",
203
+ onClick,
204
+ iconClasses,
205
+ tooltipProps,
206
+ iconSize,
207
+ type,
208
+ isMenuItem,
209
+ id,
210
+ useLightTooltip = false,
211
+ className = "",
212
+ autoFocus = false
213
+ }, ref) {
214
+ const isDisabled = disabled;
215
+ const icon = iconProp ?? (variant === "destructive" ? "trash" : void 0);
216
+ const isIconOnly = isEmpty(text) && !isEmpty(icon);
217
+ const useLight = disabled || useLightTooltip;
218
+ const TooltipWrap = useLight ? LightTooltip : DarkTooltip;
219
+ const tooltipTitle = useLight ? (tooltipProps == null ? void 0 : tooltipProps.disabledTitle) || (tooltipProps == null ? void 0 : tooltipProps.title) : tooltipProps == null ? void 0 : tooltipProps.title;
220
+ const iconNode = icon && !loading ? /* @__PURE__ */ jsx(
221
+ "span",
222
+ {
223
+ "data-slot": "button-icon",
224
+ "data-icon": String(icon),
225
+ className: classNames("inline-flex shrink-0 items-center justify-center", size === "small" ? "size-3" : "size-4"),
226
+ children: /* @__PURE__ */ jsx(IconProvider, { icon, size: iconSize ?? (size === "small" ? 0.75 : 1), className: iconClasses })
227
+ }
228
+ ) : null;
229
+ const button = /* @__PURE__ */ jsxs(
230
+ ControlButton,
231
+ {
232
+ id,
233
+ ref,
234
+ htmlType: type ?? "submit",
235
+ variant: variantMap[variant],
236
+ size: isIconOnly ? iconSizeMap[size] : sizeMap[size],
237
+ loading,
238
+ disabled: isDisabled,
239
+ onClick,
240
+ autoFocus,
241
+ "data-test": dataTestId,
242
+ type: isIconOnly ? "icon" : "text",
243
+ className: classNames(
244
+ variant === "tertiary" && "font-work",
245
+ block && "w-full",
246
+ isMenuItem && "w-full justify-start",
247
+ className
248
+ ),
249
+ children: [
250
+ !iconToRight && iconNode,
251
+ text,
252
+ iconToRight && iconNode
253
+ ]
254
+ }
255
+ );
256
+ if (!tooltipTitle) {
257
+ return button;
258
+ }
259
+ return /* @__PURE__ */ jsx(TooltipWrap, { title: tooltipTitle, placement: tooltipProps == null ? void 0 : tooltipProps.placement, size: tooltipProps == null ? void 0 : tooltipProps.size, children: /* @__PURE__ */ jsx("span", { className: classNames(block && "block w-full"), children: button }) });
260
+ });
261
+ const withVariant = (variant) => React.forwardRef((props, ref) => /* @__PURE__ */ jsx(ButtonBase, { ...props, ref, variant }));
262
+ const Button = ButtonBase;
263
+ Button.displayName = "Button";
264
+ Button.Ghost = withVariant("ghost");
265
+ Button.Primary = withVariant("primary");
266
+ Button.Secondary = withVariant("secondary");
267
+ Button.Tertiary = withVariant("tertiary");
268
+ Button.Destructive = withVariant("destructive");
269
+ const GhostButton = Button.Ghost;
270
+ const PrimaryButton = Button.Primary;
271
+ const SecondaryButton = Button.Secondary;
272
+ const TertiaryButton = Button.Tertiary;
273
+ const DestructiveButton = Button.Destructive;
274
+ export {
275
+ Button as B,
276
+ ControlButton as C,
277
+ DestructiveButton as D,
278
+ GhostButton as G,
279
+ PrimaryButton as P,
280
+ SecondaryButton as S,
281
+ TertiaryButton as T,
282
+ useRender as u
283
+ };
284
+ //# sourceMappingURL=Button-C77b7jpW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button-C77b7jpW.js","sources":["../node_modules/@base-ui/react/use-render/useRender.mjs","../node_modules/lodash-es/_nativeKeys.js","../node_modules/lodash-es/_baseKeys.js","../node_modules/lodash-es/_DataView.js","../node_modules/lodash-es/_Promise.js","../node_modules/lodash-es/_Set.js","../node_modules/lodash-es/_WeakMap.js","../node_modules/lodash-es/_getTag.js","../node_modules/lodash-es/isEmpty.js","../src/components/atoms/Button.tsx"],"sourcesContent":["import { useRenderElement } from \"../internals/useRenderElement.mjs\";\n/**\n * Renders a Base UI element.\n *\n * @public\n */\nexport function useRender(params) {\n return useRenderElement(params.defaultTagName ?? 'div', params, params);\n}","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n","import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLike from './isArrayLike.js';\nimport isBuffer from './isBuffer.js';\nimport isPrototype from './_isPrototype.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nexport default isEmpty;\n","import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { useRender } from '@base-ui/react/use-render'\n\nimport { cn } from '@/lib/utils'\n\nimport { SpinnerMark } from './Spinner'\n\n/**\n * Figma Button (294:8575): Variant / Size / State / Icon\n */\nconst buttonVariants = cva(\n 'cursor-pointer focus-ring inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-md transition-colors focus-visible:outline-offset-4 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n primary:\n 'bg-button-primary-background text-button-primary-text shadow-xs hover:bg-button-primary-background-hover data-[selected=true]:bg-button-primary-background-selected [&_[data-slot=button-icon]]:text-button-primary-icon data-[selected=true]:[&_[data-slot=button-icon]]:text-button-primary-icon-selected',\n default:\n 'bg-button-primary-background text-button-primary-text shadow-xs hover:bg-button-primary-background-hover data-[selected=true]:bg-button-primary-background-selected [&_[data-slot=button-icon]]:text-button-primary-icon data-[selected=true]:[&_[data-slot=button-icon]]:text-button-primary-icon-selected',\n secondary:\n 'bg-button-secondary-background text-button-secondary-text shadow-xs ring-1 ring-inset ring-button-secondary-border hover:bg-button-secondary-background-hover hover:text-button-secondary-text-hover hover:ring-transparent data-[selected=true]:bg-button-secondary-background-selected data-[selected=true]:text-button-secondary-text-selected data-[selected=true]:ring-button-secondary-border-selected [&_[data-slot=button-icon]]:text-button-secondary-icon hover:[&_[data-slot=button-icon]]:text-button-secondary-icon-hover data-[selected=true]:[&_[data-slot=button-icon]]:text-button-secondary-icon-selected',\n ghost:\n 'bg-transparent text-button-ghost-text hover:bg-button-ghost-background-hover data-[selected=true]:bg-button-ghost-background-selected data-[selected=true]:text-button-ghost-text-selected [&_[data-slot=button-icon]]:text-button-ghost-icon hover:[&_[data-slot=button-icon]]:text-button-ghost-icon-hover data-[selected=true]:[&_[data-slot=button-icon]]:text-button-ghost-icon-selected',\n link: 'bg-transparent text-text-link underline-offset-4 hover:underline [&_[data-slot=button-icon]]:text-text-link',\n destructive:\n 'bg-button-destructive-background text-button-destructive-text shadow-xs ring-1 ring-inset ring-button-destructive-border hover:bg-button-destructive-background-hover hover:text-button-destructive-text-hover hover:ring-transparent data-[selected=true]:bg-button-destructive-background-hover data-[selected=true]:text-button-destructive-text-hover data-[selected=true]:ring-transparent [&_[data-slot=button-icon]]:text-button-destructive-icon hover:[&_[data-slot=button-icon]]:text-button-destructive-icon-hover data-[selected=true]:[&_[data-slot=button-icon]]:text-button-destructive-icon-hover',\n },\n size: {\n default: 'h-8 gap-space-4 px-space-10 text-label-md',\n md: 'h-6 gap-space-4 px-space-8 text-label-sm',\n sm: 'h-5 gap-space-4 px-space-8 text-label-sm',\n icon: 'size-8 gap-0 p-0',\n 'icon-md': 'size-6 gap-0 p-0',\n 'icon-sm': 'size-4 gap-0 rounded-sm p-0',\n },\n roundness: {\n default: '',\n rounded: 'rounded-pill',\n },\n type: {\n text: '',\n icon: 'px-0',\n toggle: '',\n 'load-more': '',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'default',\n roundness: 'default',\n type: 'text',\n },\n compoundVariants: [{ variant: 'destructive', size: 'default', className: 'gap-space-6' }],\n },\n)\n\ntype ControlButtonProps = Omit<React.ComponentProps<'button'>, 'type'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n selected?: boolean\n loading?: boolean\n htmlType?: React.ComponentProps<'button'>['type']\n type?: NonNullable<VariantProps<typeof buttonVariants>['type']>\n }\n\nfunction ControlButton({\n className,\n variant = 'primary',\n size = 'default',\n roundness = 'default',\n type: controlType = 'text',\n htmlType = 'button',\n asChild = false,\n selected = false,\n loading = false,\n disabled,\n onClick,\n children,\n ...props\n}: ControlButtonProps) {\n const isPrimary = variant === 'primary' || variant === 'default'\n const spinnerSize = controlType === 'icon' ? (size === 'icon-sm' ? 'sm' : 'md') : size === 'md' ? 'sm' : 'md'\n const handleClick: React.MouseEventHandler<HTMLButtonElement> = (event) => {\n if (loading) {\n event.preventDefault()\n event.stopPropagation()\n return\n }\n onClick?.(event)\n }\n\n return useRender({\n defaultTagName: 'button',\n render: asChild && React.isValidElement(children) ? children : undefined,\n props: {\n type: asChild ? undefined : htmlType,\n 'data-slot': 'button',\n 'data-variant': variant,\n 'data-size': size,\n 'data-selected': selected || undefined,\n 'data-loading': loading || undefined,\n 'aria-busy': loading || undefined,\n 'aria-disabled': disabled || loading || undefined,\n 'aria-pressed': selected || undefined,\n disabled: asChild ? undefined : disabled,\n className: cn(\n buttonVariants({\n variant,\n size: controlType === 'icon' && size === 'default' ? 'icon' : size,\n roundness,\n type: controlType,\n className,\n }),\n ),\n ...props,\n onClick: handleClick,\n children: asChild ? undefined : (\n <>\n {loading ? (\n <span data-slot=\"button-icon\" className=\"h-full flex items-center justify-center\">\n <SpinnerMark size={spinnerSize} tone={isPrimary ? 'inverse' : 'neutral'} aria-label=\"Loading\" />\n </span>\n ) : null}\n {children}\n </>\n ),\n },\n })\n}\n\nimport _isEmpty from 'lodash-es/isEmpty'\n\nimport IconProvider, { type IconProp } from './IconProvider'\nimport { DarkTooltip, LightTooltip, TooltipProps } from './Tooltip'\n\nexport type ButtonSize = 'large' | 'small'\n\nexport interface ButtonProps {\n id?: string\n icon?: IconProp\n text?: React.ReactNode | JSX.Element | string\n block?: boolean\n disabled?: boolean\n loading?: boolean\n dataTestId?: string\n iconToRight?: boolean\n variant?: 'primary' | 'secondary' | 'ghost' | 'tertiary' | 'destructive' | 'link'\n size?: ButtonSize\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void\n iconClasses?: string\n type?: 'submit' | 'reset' | 'button'\n tooltipProps?: TooltipProps\n iconSize?: number\n removeIconContainer?: boolean\n isMenuItem?: boolean\n useLightTooltip?: boolean\n className?: string\n autoFocus?: boolean\n}\n\nconst variantMap = {\n primary: 'primary',\n secondary: 'secondary',\n ghost: 'ghost',\n tertiary: 'secondary',\n destructive: 'destructive',\n link: 'link',\n} as const satisfies Record<NonNullable<ButtonProps['variant']>, NonNullable<ControlButtonProps['variant']>>\n\n/** Legacy: large = h-8 (32px), small = h-6 (24px); icon-only keeps the same square size. */\nconst sizeMap = {\n large: 'default',\n small: 'md',\n} as const satisfies Record<ButtonSize, NonNullable<ControlButtonProps['size']>>\n\nconst iconSizeMap = {\n large: 'icon',\n small: 'icon-md',\n} as const satisfies Record<ButtonSize, NonNullable<ControlButtonProps['size']>>\n\ntype ButtonComponent = React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>> & {\n Ghost: typeof ButtonBase\n Primary: typeof ButtonBase\n Secondary: typeof ButtonBase\n Tertiary: typeof ButtonBase\n Destructive: typeof ButtonBase\n}\n\nconst ButtonBase = React.forwardRef<HTMLButtonElement, ButtonProps>(function ButtonBase(\n {\n text,\n icon: iconProp,\n block = false,\n disabled = false,\n loading = false,\n dataTestId,\n iconToRight = false,\n variant = 'primary',\n size = 'large',\n onClick,\n iconClasses,\n tooltipProps,\n iconSize,\n type,\n isMenuItem,\n id,\n useLightTooltip = false,\n className = '',\n autoFocus = false,\n },\n ref,\n) {\n const isDisabled = disabled\n const icon = iconProp ?? (variant === 'destructive' ? 'trash' : undefined)\n const isIconOnly = _isEmpty(text) && !_isEmpty(icon)\n const useLight = disabled || useLightTooltip\n const TooltipWrap = useLight ? LightTooltip : DarkTooltip\n const tooltipTitle = useLight ? tooltipProps?.disabledTitle || tooltipProps?.title : tooltipProps?.title\n\n const iconNode =\n icon && !loading ? (\n <span\n data-slot=\"button-icon\"\n data-icon={String(icon)}\n className={cn('inline-flex shrink-0 items-center justify-center', size === 'small' ? 'size-3' : 'size-4')}\n >\n <IconProvider icon={icon} size={iconSize ?? (size === 'small' ? 0.75 : 1)} className={iconClasses} />\n </span>\n ) : null\n\n const button = (\n <ControlButton\n id={id}\n ref={ref}\n // Match native / pre-migration default: unspecified type submits the form.\n htmlType={type ?? 'submit'}\n variant={variantMap[variant]}\n size={isIconOnly ? iconSizeMap[size] : sizeMap[size]}\n loading={loading}\n disabled={isDisabled}\n onClick={onClick}\n autoFocus={autoFocus}\n data-test={dataTestId}\n type={isIconOnly ? 'icon' : 'text'}\n className={cn(\n variant === 'tertiary' && 'font-work',\n block && 'w-full',\n isMenuItem && 'w-full justify-start',\n className,\n )}\n >\n {!iconToRight && iconNode}\n {text}\n {iconToRight && iconNode}\n </ControlButton>\n )\n\n if (!tooltipTitle) {\n return button\n }\n\n return (\n <TooltipWrap title={tooltipTitle} placement={tooltipProps?.placement} size={tooltipProps?.size}>\n <span className={cn(block && 'block w-full')}>{button}</span>\n </TooltipWrap>\n )\n})\n\nconst withVariant = (variant: ButtonProps['variant']): typeof ButtonBase =>\n React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => (\n <ButtonBase {...props} ref={ref} variant={variant} />\n ))\n\nconst Button = ButtonBase as ButtonComponent\nButton.displayName = 'Button'\nButton.Ghost = withVariant('ghost')\nButton.Primary = withVariant('primary')\nButton.Secondary = withVariant('secondary')\nButton.Tertiary = withVariant('tertiary')\nButton.Destructive = withVariant('destructive')\n\nexport const GhostButton = Button.Ghost\nexport const PrimaryButton = Button.Primary\nexport const SecondaryButton = Button.Secondary\nexport const TertiaryButton = Button.Tertiary\nexport const DestructiveButton = Button.Destructive\n\nexport { Button }\nexport default Button\n\nexport { ControlButton }\nexport type { ControlButtonProps }\n"],"names":["objectProto","hasOwnProperty","Promise","mapTag","setTag","cn","ButtonBase","_isEmpty"],"mappings":";;;;;;;;;AAMO,SAAS,UAAU,QAAQ;AAChC,SAAO,iBAAiB,OAAO,kBAAkB,OAAO,QAAQ,MAAM;AACxE;ACLA,IAAI,aAAa,QAAQ,OAAO,MAAM,MAAM;ACC5C,IAAIA,gBAAc,OAAO;AAGzB,IAAIC,mBAAiBD,cAAY;AASjC,SAAS,SAAS,QAAQ;AACxB,MAAI,CAAC,YAAY,MAAM,GAAG;AACxB,WAAO,WAAW,MAAM;AAAA,E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} from "./useIsoLayoutEffect-e9VA-ICd.js";
2
+ import { u as useCompositeItem } from "./CompositeRoot-BxrPc7F6.js";
3
+ function CompositeItem(componentProps) {
4
+ const {
5
+ render,
6
+ className,
7
+ style,
8
+ state = EMPTY_OBJECT,
9
+ props = EMPTY_ARRAY,
10
+ refs = EMPTY_ARRAY,
11
+ metadata,
12
+ stateAttributesMapping,
13
+ tag = "div",
14
+ ...elementProps
15
+ } = componentProps;
16
+ const {
17
+ compositeProps,
18
+ compositeRef
19
+ } = useCompositeItem({
20
+ metadata
21
+ });
22
+ return useRenderElement(tag, componentProps, {
23
+ state,
24
+ // The composite ref attaches first so an outer item wins when nested items share a DOM node.
25
+ ref: [compositeRef, ...refs],
26
+ props: [compositeProps, ...props, elementProps],
27
+ stateAttributesMapping
28
+ });
29
+ }
30
+ export {
31
+ CompositeItem as C
32
+ };
33
+ //# sourceMappingURL=CompositeItem-BGwD51jI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompositeItem-BGwD51jI.js","sources":["../node_modules/@base-ui/react/internals/composite/item/CompositeItem.mjs"],"sourcesContent":["'use client';\n\nimport { EMPTY_OBJECT, EMPTY_ARRAY } from '@base-ui/utils/empty';\nimport { useRenderElement } from \"../../useRenderElement.mjs\";\nimport { useCompositeItem } from \"./useCompositeItem.mjs\";\nexport function CompositeItem(componentProps) {\n const {\n render,\n className,\n style,\n state = EMPTY_OBJECT,\n props = EMPTY_ARRAY,\n refs = EMPTY_ARRAY,\n metadata,\n stateAttributesMapping,\n tag = 'div',\n ...elementProps\n } = componentProps;\n const {\n compositeProps,\n compositeRef\n } = useCompositeItem({\n metadata\n });\n return useRenderElement(tag, componentProps, {\n state,\n // The composite ref attaches first so an outer item wins when nested items share a DOM node.\n ref: [compositeRef, ...refs],\n props: [compositeProps, ...props, elementProps],\n stateAttributesMapping\n });\n}"],"names":[],"mappings":";;AAKO,SAAS,cAAc,gBAAgB;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN,GAAG;AAAA,EACP,IAAM;AACJ,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACJ,IAAM,iBAAiB;AAAA,IACnB;AAAA,EACJ,CAAG;AACD,SAAO,iBAAiB,KAAK,gBAAgB;AAAA,IAC3C;AAAA;AAAA,IAEA,KAAK,CAAC,cAAc,GAAG,IAAI;AAAA,IAC3B,OAAO,CAAC,gBAAgB,GAAG,OAAO,YAAY;AAAA,IAC9C;AAAA,EACJ,CAAG;AACH;","x_google_ignoreList":[0]}