@ctrl-ui/react 0.8.1 → 0.8.4

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 (377) hide show
  1. package/README.md +32 -23
  2. package/dist/action-bar.d.ts +11 -12
  3. package/dist/activity.d.ts +24 -25
  4. package/dist/audio-recorder.d.ts +16 -16
  5. package/dist/audio-visualizer.d.ts +3 -4
  6. package/dist/blocks/chat.d.ts +3 -4
  7. package/dist/blocks/chat.js +6 -3
  8. package/dist/blocks/coding-agent.d.ts +11 -12
  9. package/dist/blocks/coding-agent.js +10 -9
  10. package/dist/blocks/file-explorer-data.d.ts +11 -12
  11. package/dist/blocks/file-explorer.d.ts +3 -3
  12. package/dist/blocks/settings-data.d.ts +8 -9
  13. package/dist/blocks/settings.d.ts +4 -4
  14. package/dist/blocks/theme-toggle.d.ts +11 -12
  15. package/dist/blocks/theme-toggle.js +14 -4
  16. package/dist/chat-composer-attachment.d.ts +20 -21
  17. package/dist/chat-composer-attachment.js +24 -20
  18. package/dist/chat-composer-editor/extensions/mention.d.ts +5 -6
  19. package/dist/chat-composer-editor/ghost.d.ts +3 -4
  20. package/dist/chat-composer-editor/schema.d.ts +2 -3
  21. package/dist/chat-composer-editor/serialize.d.ts +3 -4
  22. package/dist/chat-composer-editor/types.d.ts +5 -6
  23. package/dist/chat-composer-editor.d.ts +2 -3
  24. package/dist/chat-composer-editor.js +18 -4
  25. package/dist/chat-composer.d.ts +17 -18
  26. package/dist/chat-composer.js +14 -8
  27. package/dist/chat-layout.d.ts +12 -21
  28. package/dist/chat-layout.js +28 -83
  29. package/dist/chat-message.d.ts +14 -15
  30. package/dist/context-model.d.ts +7 -8
  31. package/dist/context.d.ts +21 -22
  32. package/dist/control-props.d.ts +10 -11
  33. package/dist/control-variants.d.ts +6 -7
  34. package/dist/dynamic-notification-glass.d.ts +3 -4
  35. package/dist/dynamic-notification-liquid.d.ts +3 -4
  36. package/dist/dynamic-notification-siri-wave.d.ts +2 -3
  37. package/dist/dynamic-notification.d.ts +28 -29
  38. package/dist/email/email.d.ts +6 -7
  39. package/dist/email/email.js +12 -3
  40. package/dist/email/length.d.ts +3 -0
  41. package/dist/email/length.js +34 -0
  42. package/dist/email/templates.d.ts +7 -8
  43. package/dist/email/templates.js +5 -5
  44. package/dist/email/theme.d.ts +16 -5
  45. package/dist/email/theme.js +21 -6
  46. package/dist/environment-variables.d.ts +35 -36
  47. package/dist/extensions/create-track-highlight.d.ts +3 -4
  48. package/dist/extensions/supports-anchor-transitions.d.ts +2 -3
  49. package/dist/extensions/track-highlight.d.ts +3 -4
  50. package/dist/hooks/use-audio-recorder.d.ts +14 -15
  51. package/dist/hooks/use-chat-composer.d.ts +5 -6
  52. package/dist/hooks/use-chat-message.d.ts +7 -8
  53. package/dist/hooks/use-color-area.d.ts +5 -6
  54. package/dist/hooks/use-copy-to-clipboard.d.ts +7 -8
  55. package/dist/hooks/use-dropzone.d.ts +11 -12
  56. package/dist/hooks/use-dynamic-notification.d.ts +6 -7
  57. package/dist/hooks/use-environment-variables.d.ts +9 -10
  58. package/dist/hooks/use-keyboard-navigation.d.ts +3 -0
  59. package/dist/hooks/use-keyboard-navigation.js +22 -0
  60. package/dist/hooks/use-mobile.d.ts +2 -3
  61. package/dist/hooks/use-textarea-trigger-menu.d.ts +2 -3
  62. package/dist/hooks/use-trigger-menu.d.ts +7 -8
  63. package/dist/hooks/use-user-ask.d.ts +6 -7
  64. package/dist/inline-attachment.d.ts +16 -17
  65. package/dist/inline-citation.d.ts +22 -23
  66. package/dist/knob-contracts/accordion-knobs.d.ts +3 -4
  67. package/dist/knob-contracts/accordion-knobs.js +1 -0
  68. package/dist/knob-contracts/action-bar-knobs.d.ts +3 -4
  69. package/dist/knob-contracts/activity-knobs.d.ts +3 -4
  70. package/dist/knob-contracts/alert-knobs.d.ts +3 -4
  71. package/dist/knob-contracts/alert-knobs.js +12 -1
  72. package/dist/knob-contracts/audio-recorder-knobs.d.ts +3 -4
  73. package/dist/knob-contracts/audio-visualizer-knobs.d.ts +3 -4
  74. package/dist/knob-contracts/avatar-knobs.d.ts +3 -4
  75. package/dist/knob-contracts/avatar-knobs.js +2 -1
  76. package/dist/knob-contracts/badge-knobs.d.ts +3 -4
  77. package/dist/knob-contracts/button-group-knobs.d.ts +3 -4
  78. package/dist/knob-contracts/button-knobs.d.ts +3 -4
  79. package/dist/knob-contracts/button-knobs.js +1 -0
  80. package/dist/knob-contracts/calendar-knobs.d.ts +3 -4
  81. package/dist/knob-contracts/card-knobs.d.ts +3 -4
  82. package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +3 -4
  83. package/dist/knob-contracts/chat-composer-attachment-knobs.js +3 -1
  84. package/dist/knob-contracts/chat-composer-knobs.d.ts +3 -4
  85. package/dist/knob-contracts/chat-composer-knobs.js +1 -0
  86. package/dist/knob-contracts/chat-layout-knobs.d.ts +3 -4
  87. package/dist/knob-contracts/chat-layout-knobs.js +2 -3
  88. package/dist/knob-contracts/chat-message-knobs.d.ts +3 -4
  89. package/dist/knob-contracts/choice-knobs.d.ts +3 -4
  90. package/dist/knob-contracts/choice-knobs.js +2 -1
  91. package/dist/knob-contracts/code-diff-knobs.d.ts +3 -4
  92. package/dist/knob-contracts/code-diff-knobs.js +1 -0
  93. package/dist/knob-contracts/code-knobs.d.ts +3 -4
  94. package/dist/knob-contracts/code-knobs.js +3 -1
  95. package/dist/knob-contracts/collapsible-knobs.d.ts +3 -4
  96. package/dist/knob-contracts/color-picker-knobs.d.ts +3 -4
  97. package/dist/knob-contracts/context-knobs.d.ts +3 -4
  98. package/dist/knob-contracts/dockable-panel-knobs.d.ts +3 -4
  99. package/dist/knob-contracts/dockable-panel-knobs.js +1 -0
  100. package/dist/knob-contracts/dropzone-knobs.d.ts +3 -4
  101. package/dist/knob-contracts/dropzone-knobs.js +1 -0
  102. package/dist/knob-contracts/dynamic-notification-knobs.d.ts +3 -4
  103. package/dist/knob-contracts/empty-knobs.d.ts +3 -4
  104. package/dist/knob-contracts/empty-knobs.js +14 -1
  105. package/dist/knob-contracts/environment-variables-knobs.d.ts +3 -4
  106. package/dist/knob-contracts/environment-variables-knobs.js +2 -1
  107. package/dist/knob-contracts/field-knobs.d.ts +3 -4
  108. package/dist/knob-contracts/gradient-editor-knobs.d.ts +3 -4
  109. package/dist/knob-contracts/gradient-editor-knobs.js +3 -1
  110. package/dist/knob-contracts/infinite-canvas-knobs.d.ts +3 -4
  111. package/dist/knob-contracts/inline-attachment-knobs.d.ts +3 -4
  112. package/dist/knob-contracts/inline-attachment-knobs.js +2 -1
  113. package/dist/knob-contracts/inline-citation-knobs.d.ts +3 -4
  114. package/dist/knob-contracts/inline-citation-knobs.js +1 -0
  115. package/dist/knob-contracts/item-knobs.d.ts +3 -4
  116. package/dist/knob-contracts/kbd-knobs.d.ts +3 -4
  117. package/dist/knob-contracts/markdown-block-knobs.d.ts +3 -4
  118. package/dist/knob-contracts/markdown-block-knobs.js +2 -0
  119. package/dist/knob-contracts/markdown-knobs.d.ts +3 -4
  120. package/dist/knob-contracts/markdown-knobs.js +1 -0
  121. package/dist/knob-contracts/morphing-panel-knobs.d.ts +3 -4
  122. package/dist/knob-contracts/pagination-knobs.d.ts +3 -4
  123. package/dist/knob-contracts/phone-input-knobs.d.ts +3 -4
  124. package/dist/knob-contracts/phone-input-knobs.js +1 -0
  125. package/dist/knob-contracts/popup-knobs.d.ts +3 -4
  126. package/dist/knob-contracts/progressive-blur-knobs.d.ts +3 -4
  127. package/dist/knob-contracts/progressive-blur-knobs.js +1 -0
  128. package/dist/knob-contracts/range-knobs.d.ts +3 -4
  129. package/dist/knob-contracts/resizable-knobs.d.ts +3 -4
  130. package/dist/knob-contracts/resizable-knobs.js +1 -0
  131. package/dist/knob-contracts/rich-tooltip-knobs.d.ts +3 -4
  132. package/dist/knob-contracts/scroll-area-knobs.d.ts +3 -4
  133. package/dist/knob-contracts/separator-knobs.d.ts +3 -4
  134. package/dist/knob-contracts/sidebar-knobs.d.ts +3 -4
  135. package/dist/knob-contracts/sidebar-knobs.js +1 -0
  136. package/dist/knob-contracts/skeleton-knobs.d.ts +3 -4
  137. package/dist/knob-contracts/skeleton-knobs.js +9 -1
  138. package/dist/knob-contracts/source-badge-knobs.d.ts +3 -4
  139. package/dist/knob-contracts/spinner-knobs.d.ts +3 -4
  140. package/dist/knob-contracts/stepper-knobs.d.ts +3 -4
  141. package/dist/knob-contracts/stepper-knobs.js +1 -0
  142. package/dist/knob-contracts/switch-knobs.d.ts +3 -4
  143. package/dist/knob-contracts/switch-knobs.js +7 -1
  144. package/dist/knob-contracts/table-knobs.d.ts +3 -4
  145. package/dist/knob-contracts/table-of-contents-knobs.d.ts +3 -4
  146. package/dist/knob-contracts/table-of-contents-knobs.js +25 -0
  147. package/dist/knob-contracts/tabs-knobs.d.ts +3 -4
  148. package/dist/knob-contracts/tabs-knobs.js +2 -1
  149. package/dist/knob-contracts/task-list-knobs.d.ts +3 -4
  150. package/dist/knob-contracts/task-list-knobs.js +1 -0
  151. package/dist/knob-contracts/thread-rail-knobs.d.ts +3 -4
  152. package/dist/knob-contracts/timeline-knobs.d.ts +3 -4
  153. package/dist/knob-contracts/toolbar-knobs.d.ts +3 -4
  154. package/dist/knob-contracts/toolbar-knobs.js +1 -0
  155. package/dist/knob-contracts/track-highlight-knobs.d.ts +3 -4
  156. package/dist/knob-contracts/transcript-divider-knobs.d.ts +3 -4
  157. package/dist/knob-contracts/tree-knobs.d.ts +3 -4
  158. package/dist/knob-contracts/user-ask-knobs.d.ts +3 -4
  159. package/dist/knob-contracts/user-ask-knobs.js +1 -0
  160. package/dist/lib/cn.d.ts +2 -3
  161. package/dist/lib/code-tokens.d.ts +12 -13
  162. package/dist/lib/color.d.ts +26 -27
  163. package/dist/lib/contrast.d.ts +12 -13
  164. package/dist/lib/diff.d.ts +14 -15
  165. package/dist/lib/dropzone-validation.d.ts +25 -26
  166. package/dist/lib/env-file.d.ts +12 -13
  167. package/dist/lib/format-audio-recorder-duration.d.ts +2 -3
  168. package/dist/lib/liquid-glass-optics.d.ts +2 -3
  169. package/dist/lib/phone-input-format.d.ts +3 -4
  170. package/dist/lib/phone-input-format.js +1 -1
  171. package/dist/lib/phone-number.d.ts +8 -9
  172. package/dist/lib/trigger-detect.d.ts +4 -5
  173. package/dist/markdown-block.d.ts +11 -12
  174. package/dist/scripts/contrast-eval.d.ts +16 -17
  175. package/dist/scripts/contrast-eval.js +13 -7
  176. package/dist/skin-provider.d.ts +14 -0
  177. package/dist/skin-provider.js +21 -0
  178. package/dist/skin.d.ts +14 -33
  179. package/dist/skin.js +3 -46
  180. package/dist/source-badge.d.ts +7 -8
  181. package/dist/styles/index.css +2 -4
  182. package/dist/styles/recipes/accordion.css +8 -2
  183. package/dist/styles/recipes/action-bar.css +5 -2
  184. package/dist/styles/recipes/alert.css +95 -16
  185. package/dist/styles/recipes/avatar.css +17 -1
  186. package/dist/styles/recipes/badge.css +0 -1
  187. package/dist/styles/recipes/button.css +34 -8
  188. package/dist/styles/recipes/calendar.css +0 -6
  189. package/dist/styles/recipes/chat-composer-attachment.css +51 -53
  190. package/dist/styles/recipes/chat-composer.css +26 -21
  191. package/dist/styles/recipes/chat-layout.css +21 -62
  192. package/dist/styles/recipes/chat-message.css +11 -5
  193. package/dist/styles/recipes/choice.css +9 -2
  194. package/dist/styles/recipes/code-diff.css +8 -1
  195. package/dist/styles/recipes/code.css +39 -17
  196. package/dist/styles/recipes/collapsible.css +0 -3
  197. package/dist/styles/recipes/color-picker-details.css +1 -2
  198. package/dist/styles/recipes/color-picker-values.css +0 -4
  199. package/dist/styles/recipes/dockable-panel.css +8 -1
  200. package/dist/styles/recipes/dropzone.css +9 -2
  201. package/dist/styles/recipes/empty.css +118 -17
  202. package/dist/styles/recipes/environment-variables.css +8 -1
  203. package/dist/styles/recipes/field-parts.css +1 -6
  204. package/dist/styles/recipes/field.css +9 -5
  205. package/dist/styles/recipes/gradient-editor.css +16 -5
  206. package/dist/styles/recipes/inline-attachment.css +13 -8
  207. package/dist/styles/recipes/inline-citation.css +8 -4
  208. package/dist/styles/recipes/item.css +1 -1
  209. package/dist/styles/recipes/kbd.css +8 -0
  210. package/dist/styles/recipes/markdown-block.css +16 -2
  211. package/dist/styles/recipes/markdown.css +12 -0
  212. package/dist/styles/recipes/morphing-panel.css +1 -1
  213. package/dist/styles/recipes/pagination.css +0 -4
  214. package/dist/styles/recipes/phone-input.css +8 -4
  215. package/dist/styles/recipes/popup-lists.css +11 -0
  216. package/dist/styles/recipes/popup-toast.css +1 -29
  217. package/dist/styles/recipes/popup.css +2 -2
  218. package/dist/styles/recipes/progressive-blur.css +28 -7
  219. package/dist/styles/recipes/range.css +50 -1
  220. package/dist/styles/recipes/resizable.css +8 -10
  221. package/dist/styles/recipes/rich-tooltip.css +0 -4
  222. package/dist/styles/recipes/scroll-area.css +8 -2
  223. package/dist/styles/recipes/sidebar-menu.css +150 -0
  224. package/dist/styles/recipes/sidebar.css +56 -110
  225. package/dist/styles/recipes/skeleton.css +85 -3
  226. package/dist/styles/recipes/source-badge.css +0 -3
  227. package/dist/styles/recipes/stepper.css +8 -1
  228. package/dist/styles/recipes/switch.css +89 -17
  229. package/dist/styles/recipes/table-of-contents.css +211 -45
  230. package/dist/styles/recipes/table.css +0 -1
  231. package/dist/styles/recipes/tabs.css +19 -2
  232. package/dist/styles/recipes/task-list.css +8 -2
  233. package/dist/styles/recipes/thread-rail.css +0 -4
  234. package/dist/styles/recipes/toolbar.css +18 -4
  235. package/dist/styles/recipes/track-highlight.css +63 -5
  236. package/dist/styles/recipes/tree.css +2 -0
  237. package/dist/styles/recipes/user-ask.css +8 -4
  238. package/dist/styles/theme.css +130 -138
  239. package/dist/surface-variants.d.ts +4 -5
  240. package/dist/task-list.d.ts +16 -17
  241. package/dist/thread-rail.d.ts +21 -22
  242. package/dist/transcript-divider.d.ts +6 -7
  243. package/dist/ui/accordion.d.ts +10 -11
  244. package/dist/ui/alert-dialog.d.ts +11 -12
  245. package/dist/ui/alert-dialog.js +8 -6
  246. package/dist/ui/alert.d.ts +9 -10
  247. package/dist/ui/alert.js +3 -3
  248. package/dist/ui/aspect-ratio.d.ts +3 -4
  249. package/dist/ui/autocomplete.d.ts +19 -20
  250. package/dist/ui/autocomplete.js +5 -3
  251. package/dist/ui/avatar.d.ts +9 -10
  252. package/dist/ui/badge.d.ts +9 -10
  253. package/dist/ui/button-group.d.ts +7 -8
  254. package/dist/ui/button-group.js +3 -2
  255. package/dist/ui/button.d.ts +17 -18
  256. package/dist/ui/button.js +20 -5
  257. package/dist/ui/calendar.d.ts +3 -4
  258. package/dist/ui/card.d.ts +16 -17
  259. package/dist/ui/checkbox-group.d.ts +4 -5
  260. package/dist/ui/checkbox-group.js +3 -2
  261. package/dist/ui/checkbox.d.ts +3 -4
  262. package/dist/ui/code-diff.d.ts +8 -9
  263. package/dist/ui/code.d.ts +32 -23
  264. package/dist/ui/code.js +41 -20
  265. package/dist/ui/collapsible.d.ts +7 -8
  266. package/dist/ui/color-picker.d.ts +40 -41
  267. package/dist/ui/color-picker.js +5 -3
  268. package/dist/ui/combobox-disabled-selection.d.ts +3 -4
  269. package/dist/ui/combobox.d.ts +21 -20
  270. package/dist/ui/combobox.js +5 -3
  271. package/dist/ui/command.d.ts +19 -18
  272. package/dist/ui/command.js +38 -12
  273. package/dist/ui/context-menu.d.ts +30 -31
  274. package/dist/ui/context-menu.js +8 -5
  275. package/dist/ui/dialog.d.ts +13 -13
  276. package/dist/ui/dialog.js +10 -8
  277. package/dist/ui/dockable-panel-geometry.d.ts +7 -8
  278. package/dist/ui/dockable-panel.d.ts +21 -22
  279. package/dist/ui/drawer.d.ts +17 -18
  280. package/dist/ui/drawer.js +7 -6
  281. package/dist/ui/dropdown-menu.d.ts +36 -29
  282. package/dist/ui/dropdown-menu.js +116 -9
  283. package/dist/ui/dropzone.d.ts +24 -24
  284. package/dist/ui/empty.d.ts +14 -14
  285. package/dist/ui/empty.js +3 -3
  286. package/dist/ui/field.d.ts +26 -27
  287. package/dist/ui/form.d.ts +4 -5
  288. package/dist/ui/gradient-editor.d.ts +16 -17
  289. package/dist/ui/hover-card.d.ts +6 -7
  290. package/dist/ui/hover-card.js +5 -3
  291. package/dist/ui/infinite-canvas.d.ts +11 -12
  292. package/dist/ui/input-group.d.ts +6 -7
  293. package/dist/ui/input-otp.d.ts +7 -8
  294. package/dist/ui/input.d.ts +3 -4
  295. package/dist/ui/item.d.ts +20 -21
  296. package/dist/ui/kbd.d.ts +7 -5
  297. package/dist/ui/kbd.js +4 -2
  298. package/dist/ui/markdown-elements.d.ts +20 -21
  299. package/dist/ui/markdown.d.ts +5 -6
  300. package/dist/ui/menubar.d.ts +25 -26
  301. package/dist/ui/menubar.js +8 -5
  302. package/dist/ui/meter.d.ts +11 -12
  303. package/dist/ui/morphing-panel.d.ts +8 -9
  304. package/dist/ui/native-select.d.ts +3 -4
  305. package/dist/ui/native-select.js +1 -1
  306. package/dist/ui/navigation-menu.d.ts +17 -18
  307. package/dist/ui/navigation-menu.js +5 -3
  308. package/dist/ui/number-field.d.ts +15 -16
  309. package/dist/ui/pagination.d.ts +10 -11
  310. package/dist/ui/phone-input.d.ts +5 -6
  311. package/dist/ui/phone-input.js +40 -37
  312. package/dist/ui/popover.d.ts +11 -12
  313. package/dist/ui/popover.js +5 -3
  314. package/dist/ui/progress.d.ts +11 -12
  315. package/dist/ui/progressive-blur.d.ts +4 -5
  316. package/dist/ui/radio-group.d.ts +5 -6
  317. package/dist/ui/resizable.d.ts +12 -13
  318. package/dist/ui/responsive-dialog.d.ts +11 -12
  319. package/dist/ui/rich-tooltip-tour.d.ts +5 -6
  320. package/dist/ui/rich-tooltip.d.ts +21 -23
  321. package/dist/ui/rich-tooltip.js +5 -5
  322. package/dist/ui/scroll-area.d.ts +7 -8
  323. package/dist/ui/scroll-area.js +9 -6
  324. package/dist/ui/select.d.ts +21 -14
  325. package/dist/ui/select.js +7 -4
  326. package/dist/ui/separator.d.ts +2 -3
  327. package/dist/ui/sheet.d.ts +8 -9
  328. package/dist/ui/sheet.js +7 -5
  329. package/dist/ui/sidebar-menu.d.ts +24 -15
  330. package/dist/ui/sidebar-menu.js +30 -4
  331. package/dist/ui/sidebar-provider.d.ts +32 -7
  332. package/dist/ui/sidebar-provider.js +82 -22
  333. package/dist/ui/sidebar-resize-rail.d.ts +8 -0
  334. package/dist/ui/sidebar-resize-rail.js +192 -0
  335. package/dist/ui/sidebar.d.ts +20 -14
  336. package/dist/ui/sidebar.js +122 -57
  337. package/dist/ui/skeleton.d.ts +7 -4
  338. package/dist/ui/skeleton.js +9 -2
  339. package/dist/ui/slider.d.ts +6 -5
  340. package/dist/ui/slider.js +16 -13
  341. package/dist/ui/spinner.d.ts +3 -4
  342. package/dist/ui/stepper.d.ts +22 -23
  343. package/dist/ui/switch.d.ts +3 -4
  344. package/dist/ui/switch.js +12 -1
  345. package/dist/ui/table-of-contents.d.ts +7 -8
  346. package/dist/ui/table-of-contents.js +4 -2
  347. package/dist/ui/table.d.ts +17 -18
  348. package/dist/ui/tabs.d.ts +14 -11
  349. package/dist/ui/textarea.d.ts +3 -4
  350. package/dist/ui/timeline.d.ts +18 -19
  351. package/dist/ui/toast.d.ts +9 -9
  352. package/dist/ui/toast.js +21 -14
  353. package/dist/ui/toggle.d.ts +5 -6
  354. package/dist/ui/toggle.js +3 -2
  355. package/dist/ui/toolbar.d.ts +15 -16
  356. package/dist/ui/toolbar.js +15 -4
  357. package/dist/ui/tooltip.d.ts +6 -13
  358. package/dist/ui/tooltip.js +7 -8
  359. package/dist/ui/tree.d.ts +18 -19
  360. package/dist/ui/tree.js +3 -2
  361. package/dist/ui/trigger-menu.d.ts +15 -16
  362. package/dist/ui/trigger-menu.js +5 -3
  363. package/dist/ui/use-switch-drag.d.ts +7 -0
  364. package/dist/ui/use-switch-drag.js +104 -0
  365. package/dist/user-ask.d.ts +24 -25
  366. package/package.json +15 -15
  367. package/dist/code-block-editor.d.ts +0 -59
  368. package/dist/code-block-editor.js +0 -250
  369. package/dist/knob-contracts/code-block-editor-knobs.d.ts +0 -5
  370. package/dist/knob-contracts/code-block-editor-knobs.js +0 -11
  371. package/dist/lib/code-block-shiki.d.ts +0 -9
  372. package/dist/lib/code-block-shiki.js +0 -6
  373. package/dist/skin.config.d.ts +0 -5
  374. package/dist/skin.config.js +0 -12
  375. package/dist/styles/recipes/code-block-editor.css +0 -136
  376. package/dist/styles/skin-theme.css +0 -137
  377. package/dist/styles/skin.css +0 -143
@@ -4,33 +4,32 @@ import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
4
4
  import { CSSProperties, ComponentProps, ReactNode } from "react";
5
5
  import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
6
6
  //#region src/ui/alert-dialog.d.ts
7
- type AlertDialogProps = {
7
+ export type AlertDialogProps = {
8
8
  children?: ReactNode;
9
9
  open?: boolean;
10
10
  defaultOpen?: boolean;
11
11
  onOpenChange?: (open: boolean, eventDetails: OpenChangeEventDetails) => void;
12
12
  };
13
- type AlertDialogContentProps = Omit<ComponentProps<"div">, "style"> & {
13
+ export type AlertDialogContentProps = Omit<ComponentProps<"div">, "style"> & {
14
14
  style?: CSSProperties & PopupKnobStyle;
15
15
  };
16
- declare function AlertDialog(props: AlertDialogProps): import("react").JSX.Element;
17
- declare function AlertDialogTrigger({ className, ...props }: ComponentProps<typeof AlertDialog$1.Trigger> & {
16
+ export declare function AlertDialog(props: AlertDialogProps): import("react").JSX.Element;
17
+ export declare function AlertDialogTrigger({ className, ...props }: ComponentProps<typeof AlertDialog$1.Trigger> & {
18
18
  style?: CSSProperties & PopupKnobStyle;
19
19
  }): import("react").JSX.Element;
20
20
  type AlertDialogCloseProps = Omit<ComponentProps<typeof AlertDialog$1.Close>, "render"> & Pick<ButtonProps, "variant" | "size" | "tone" | "iconOnly">;
21
- declare function AlertDialogClose({ className, children, variant, size, tone, iconOnly, ...props }: AlertDialogCloseProps): import("react").JSX.Element;
22
- declare function AlertDialogContent({ className, children, ...props }: AlertDialogContentProps): import("react").JSX.Element;
23
- declare function AlertDialogHeader({ className, ...props }: ComponentProps<"div"> & {
21
+ export declare function AlertDialogClose({ className, children, variant, size, tone, iconOnly, ...props }: AlertDialogCloseProps): import("react").JSX.Element;
22
+ export declare function AlertDialogContent({ className, children, ...props }: AlertDialogContentProps): import("react").JSX.Element;
23
+ export declare function AlertDialogHeader({ className, ...props }: ComponentProps<"div"> & {
24
24
  style?: CSSProperties & PopupKnobStyle;
25
25
  }): import("react").JSX.Element;
26
- declare function AlertDialogFooter({ className, ...props }: ComponentProps<"div"> & {
26
+ export declare function AlertDialogFooter({ className, ...props }: ComponentProps<"div"> & {
27
27
  style?: CSSProperties & PopupKnobStyle;
28
28
  }): import("react").JSX.Element;
29
- declare function AlertDialogTitle({ className, ...props }: ComponentProps<"h2"> & {
29
+ export declare function AlertDialogTitle({ className, ...props }: ComponentProps<"h2"> & {
30
30
  style?: CSSProperties & PopupKnobStyle;
31
31
  }): import("react").JSX.Element;
32
- declare function AlertDialogDescription({ className, ...props }: ComponentProps<"p"> & {
32
+ export declare function AlertDialogDescription({ className, ...props }: ComponentProps<"p"> & {
33
33
  style?: CSSProperties & PopupKnobStyle;
34
34
  }): import("react").JSX.Element;
35
- //#endregion
36
- export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogProps, AlertDialogTitle, AlertDialogTrigger };
35
+ //#endregion
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/cn.js";
3
- import { skinEffects, skinId } from "../skin.js";
3
+ import { controlEffectsAttribute } from "../skin.js";
4
+ import { useSkin } from "../skin-provider.js";
4
5
  import { Button } from "./button.js";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
@@ -33,25 +34,26 @@ function AlertDialogClose({ className, children, variant = "surface", size = "sm
33
34
  });
34
35
  }
35
36
  function AlertDialogContent({ className, children, ...props }) {
37
+ const skin = useSkin();
36
38
  return /* @__PURE__ */ jsxs(AlertDialog$1.Portal, { children: [/* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
37
39
  "data-control-ui": "alert-dialog",
38
40
  "data-popup-kind": "alert-dialog",
39
41
  "data-slot": "backdrop",
40
42
  "data-control-family": "popup",
41
43
  "data-popup-part": "backdrop",
42
- "data-skin": skinId(),
43
- "data-effects": skinEffects(),
44
+ "data-skin": skin.id,
45
+ "data-effects": controlEffectsAttribute(skin.effects),
44
46
  className: "fixed inset-0 z-[70]"
45
47
  }), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
46
- "data-skin": skinId(),
47
- "data-effects": skinEffects(),
48
+ "data-skin": skin.id,
49
+ "data-effects": controlEffectsAttribute(skin.effects),
48
50
  "data-control-ui": "alert-dialog",
49
51
  "data-popup-kind": "alert-dialog",
50
52
  "data-slot": "content",
51
53
  "data-control-family": "popup",
52
54
  "data-popup-part": "surface",
53
55
  "data-surface": "modal",
54
- className: cn("fixed left-1/2 top-[12vh] z-[71] grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 p-0", className),
56
+ className: cn("fixed left-1/2 top-[12vh] z-[71] grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2", className),
55
57
  ...props,
56
58
  children
57
59
  })] });
@@ -1,21 +1,20 @@
1
1
  import { AlertKnobStyle } from "../knob-contracts/alert-knobs.js";
2
2
  import { CSSProperties, ComponentProps } from "react";
3
3
  //#region src/ui/alert.d.ts
4
- declare const alertVariants: readonly ["default", "destructive"];
5
- type AlertVariant = (typeof alertVariants)[number];
6
- type AlertProps = Omit<ComponentProps<"div">, "style"> & {
4
+ export declare const alertVariants: readonly ["default", "destructive"];
5
+ export type AlertVariant = (typeof alertVariants)[number];
6
+ export type AlertProps = Omit<ComponentProps<"div">, "style"> & {
7
7
  style?: CSSProperties & AlertKnobStyle;
8
8
  } & {
9
9
  variant?: AlertVariant;
10
10
  };
11
- type AlertTitleProps = Omit<ComponentProps<"div">, "style"> & {
11
+ export type AlertTitleProps = Omit<ComponentProps<"div">, "style"> & {
12
12
  style?: CSSProperties & AlertKnobStyle;
13
13
  };
14
- type AlertDescriptionProps = Omit<ComponentProps<"div">, "style"> & {
14
+ export type AlertDescriptionProps = Omit<ComponentProps<"div">, "style"> & {
15
15
  style?: CSSProperties & AlertKnobStyle;
16
16
  };
17
- declare function Alert({ variant, className, ...props }: AlertProps): import("react").JSX.Element;
18
- declare function AlertTitle({ className, ...props }: AlertTitleProps): import("react").JSX.Element;
19
- declare function AlertDescription({ className, ...props }: AlertDescriptionProps): import("react").JSX.Element;
20
- //#endregion
21
- export { Alert, AlertDescription, AlertDescriptionProps, AlertProps, AlertTitle, AlertTitleProps, AlertVariant, alertVariants };
17
+ export declare function Alert({ variant, className, ...props }: AlertProps): import("react").JSX.Element;
18
+ export declare function AlertTitle({ className, ...props }: AlertTitleProps): import("react").JSX.Element;
19
+ export declare function AlertDescription({ className, ...props }: AlertDescriptionProps): import("react").JSX.Element;
20
+ //#endregion
package/dist/ui/alert.js CHANGED
@@ -10,7 +10,7 @@ function Alert({ variant = "default", className, ...props }) {
10
10
  "data-slot": "root",
11
11
  "data-surface": "panel",
12
12
  "data-variant": variant,
13
- className: cn("relative grid w-full grid-cols-[0_1fr] items-start has-[>svg]:grid-cols-[1rem_1fr] [&>svg]:size-4", className),
13
+ className: cn("relative grid w-full items-start", className),
14
14
  ...props
15
15
  });
16
16
  }
@@ -19,7 +19,7 @@ function AlertTitle({ className, ...props }) {
19
19
  "data-control-ui": "alert",
20
20
  "data-control-family": "alert",
21
21
  "data-slot": "title",
22
- className: cn("col-start-2 line-clamp-1", className),
22
+ className: cn("col-start-2 min-w-0", className),
23
23
  ...props
24
24
  });
25
25
  }
@@ -28,7 +28,7 @@ function AlertDescription({ className, ...props }) {
28
28
  "data-control-ui": "alert",
29
29
  "data-control-family": "alert",
30
30
  "data-slot": "description",
31
- className: cn("col-start-2 grid justify-items-start", className),
31
+ className: cn("col-start-2 grid min-w-0 justify-items-start", className),
32
32
  ...props
33
33
  });
34
34
  }
@@ -1,8 +1,7 @@
1
1
  import { ComponentProps } from "react";
2
2
  //#region src/ui/aspect-ratio.d.ts
3
- type AspectRatioProps = ComponentProps<"div"> & {
3
+ export type AspectRatioProps = ComponentProps<"div"> & {
4
4
  ratio?: number;
5
5
  };
6
- declare function AspectRatio({ ratio, className, style, ...props }: AspectRatioProps): import("react").JSX.Element;
7
- //#endregion
8
- export { AspectRatio, AspectRatioProps };
6
+ export declare function AspectRatio({ ratio, className, style, ...props }: AspectRatioProps): import("react").JSX.Element;
7
+ //#endregion
@@ -4,7 +4,7 @@ import { PopupKnobStyle } from "../knob-contracts/popup-knobs.js";
4
4
  import { FieldKnobStyle } from "../knob-contracts/field-knobs.js";
5
5
  import { CSSProperties, ComponentProps, ReactNode } from "react";
6
6
  //#region src/ui/autocomplete.d.ts
7
- type AutocompleteProps<Value = string> = {
7
+ export type AutocompleteProps<Value = string> = {
8
8
  children?: ReactNode;
9
9
  items?: readonly Value[];
10
10
  value?: string;
@@ -24,47 +24,46 @@ type AutocompleteProps<Value = string> = {
24
24
  filter?: ((itemValue: Value, query: string, itemToString?: (itemValue: Value) => string) => boolean) | null;
25
25
  itemToStringValue?: (itemValue: Value) => string;
26
26
  };
27
- type AutocompleteInputProps = Omit<Omit<ComponentProps<"input">, "size">, "style"> & {
27
+ export type AutocompleteInputProps = Omit<Omit<ComponentProps<"input">, "size">, "style"> & {
28
28
  style?: CSSProperties & FieldKnobStyle;
29
29
  } & {
30
30
  size?: ControlSize;
31
31
  };
32
- type AutocompleteClearProps = ComponentProps<"button"> & {
32
+ export type AutocompleteClearProps = ComponentProps<"button"> & {
33
33
  style?: CSSProperties & FieldKnobStyle;
34
34
  };
35
- type AutocompleteContentProps = Omit<ComponentProps<"div"> & {
35
+ export type AutocompleteContentProps = Omit<ComponentProps<"div"> & {
36
36
  sideOffset?: number;
37
37
  }, "style"> & {
38
38
  style?: CSSProperties & PopupKnobStyle;
39
39
  };
40
- type AutocompleteListProps<Value = unknown> = Omit<ComponentProps<"div">, "children"> & {
40
+ export type AutocompleteListProps<Value = unknown> = Omit<ComponentProps<"div">, "children"> & {
41
41
  children?: ReactNode | ((item: Value, index: number) => ReactNode);
42
42
  } & {
43
43
  style?: CSSProperties & PopupKnobStyle;
44
44
  };
45
- type AutocompleteItemProps<Value = unknown> = Omit<Omit<ComponentProps<"div">, "value"> & {
45
+ export type AutocompleteItemProps<Value = unknown> = Omit<Omit<ComponentProps<"div">, "value"> & {
46
46
  value?: Value;
47
47
  disabled?: boolean;
48
48
  }, "style"> & {
49
49
  style?: CSSProperties & PopupKnobStyle;
50
50
  };
51
- type AutocompleteEmptyProps = Omit<ComponentProps<"div">, "style"> & {
51
+ export type AutocompleteEmptyProps = Omit<ComponentProps<"div">, "style"> & {
52
52
  style?: CSSProperties & FieldKnobStyle;
53
53
  };
54
- type AutocompleteGroupProps = ComponentProps<"div"> & {
54
+ export type AutocompleteGroupProps = ComponentProps<"div"> & {
55
55
  style?: CSSProperties & FieldKnobStyle;
56
56
  };
57
- type AutocompleteGroupLabelProps = Omit<ComponentProps<"div">, "style"> & {
57
+ export type AutocompleteGroupLabelProps = Omit<ComponentProps<"div">, "style"> & {
58
58
  style?: CSSProperties & PopupKnobStyle;
59
59
  };
60
- declare function Autocomplete<Value = string>({ children, autoHighlight, ...props }: AutocompleteProps<Value>): import("react").JSX.Element;
61
- declare function AutocompleteClear({ className, children, ...props }: AutocompleteClearProps): import("react").JSX.Element;
62
- declare function AutocompleteInput({ size, className, ...props }: AutocompleteInputProps): import("react").JSX.Element;
63
- declare function AutocompleteContent({ className, children, sideOffset, ...props }: AutocompleteContentProps): import("react").JSX.Element;
64
- declare function AutocompleteList<Value = unknown>({ className, children, ...props }: AutocompleteListProps<Value>): import("react").JSX.Element;
65
- declare function AutocompleteEmpty({ className, children, ...props }: AutocompleteEmptyProps): import("react").JSX.Element;
66
- declare function AutocompleteItem<Value = unknown>({ className, children, disabled, ...props }: AutocompleteItemProps<Value>): import("react").JSX.Element;
67
- declare function AutocompleteGroup({ className, children, ...props }: AutocompleteGroupProps): import("react").JSX.Element;
68
- declare function AutocompleteGroupLabel({ className, children, ...props }: AutocompleteGroupLabelProps): import("react").JSX.Element;
69
- //#endregion
70
- export { Autocomplete, AutocompleteClear, AutocompleteClearProps, AutocompleteContent, AutocompleteContentProps, AutocompleteEmpty, AutocompleteEmptyProps, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteGroupLabelProps, AutocompleteGroupProps, AutocompleteInput, AutocompleteInputProps, AutocompleteItem, AutocompleteItemProps, AutocompleteList, AutocompleteListProps, AutocompleteProps };
60
+ export declare function Autocomplete<Value = string>({ children, autoHighlight, ...props }: AutocompleteProps<Value>): import("react").JSX.Element;
61
+ export declare function AutocompleteClear({ className, children, ...props }: AutocompleteClearProps): import("react").JSX.Element;
62
+ export declare function AutocompleteInput({ size, className, ...props }: AutocompleteInputProps): import("react").JSX.Element;
63
+ export declare function AutocompleteContent({ className, children, sideOffset, ...props }: AutocompleteContentProps): import("react").JSX.Element;
64
+ export declare function AutocompleteList<Value = unknown>({ className, children, ...props }: AutocompleteListProps<Value>): import("react").JSX.Element;
65
+ export declare function AutocompleteEmpty({ className, children, ...props }: AutocompleteEmptyProps): import("react").JSX.Element;
66
+ export declare function AutocompleteItem<Value = unknown>({ className, children, disabled, ...props }: AutocompleteItemProps<Value>): import("react").JSX.Element;
67
+ export declare function AutocompleteGroup({ className, children, ...props }: AutocompleteGroupProps): import("react").JSX.Element;
68
+ export declare function AutocompleteGroupLabel({ className, children, ...props }: AutocompleteGroupLabelProps): import("react").JSX.Element;
69
+ //#endregion
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/cn.js";
3
- import { skinEffects, skinId } from "../skin.js";
3
+ import { controlEffectsAttribute } from "../skin.js";
4
+ import { useSkin } from "../skin-provider.js";
4
5
  import { ScrollArea } from "./scroll-area.js";
5
6
  import { popupItemStructureClasses } from "../surface-variants.js";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -56,13 +57,14 @@ function AutocompleteInput({ size = "md", className, ...props }) {
56
57
  });
57
58
  }
58
59
  function AutocompleteContent({ className, children, sideOffset = 6, ...props }) {
60
+ const skin = useSkin();
59
61
  return /* @__PURE__ */ jsx(Autocomplete$1.Portal, { children: /* @__PURE__ */ jsx(Autocomplete$1.Positioner, {
60
62
  "data-control-ui": "autocomplete",
61
63
  "data-popup-kind": "autocomplete",
62
64
  "data-control-family": "popup",
63
65
  "data-slot": "positioner",
64
- "data-skin": skinId(),
65
- "data-effects": skinEffects(),
66
+ "data-skin": skin.id,
67
+ "data-effects": controlEffectsAttribute(skin.effects),
66
68
  side: "bottom",
67
69
  align: "start",
68
70
  sideOffset,
@@ -1,24 +1,23 @@
1
1
  import { AvatarKnobStyle } from "../knob-contracts/avatar-knobs.js";
2
2
  import { CSSProperties, ComponentProps } from "react";
3
3
  //#region src/ui/avatar.d.ts
4
- type AvatarProps = Omit<ComponentProps<"span">, "style"> & {
4
+ export type AvatarProps = Omit<ComponentProps<"span">, "style"> & {
5
5
  style?: CSSProperties & AvatarKnobStyle;
6
6
  };
7
- type AvatarGroupProps = Omit<ComponentProps<"div">, "style"> & {
7
+ export type AvatarGroupProps = Omit<ComponentProps<"div">, "style"> & {
8
8
  style?: CSSProperties & AvatarKnobStyle;
9
9
  };
10
- type AvatarImageProps = ComponentProps<"img"> & {
10
+ export type AvatarImageProps = ComponentProps<"img"> & {
11
11
  onLoadingStatusChange?: (status: "idle" | "loading" | "loaded" | "error") => void;
12
12
  } & {
13
13
  style?: CSSProperties & AvatarKnobStyle;
14
14
  };
15
- type AvatarFallbackProps = Omit<ComponentProps<"span">, "style"> & {
15
+ export type AvatarFallbackProps = Omit<ComponentProps<"span">, "style"> & {
16
16
  delay?: number;
17
17
  style?: CSSProperties & AvatarKnobStyle;
18
18
  };
19
- declare function Avatar({ className, ...props }: AvatarProps): import("react").JSX.Element;
20
- declare function AvatarGroup({ className, ...props }: AvatarGroupProps): import("react").JSX.Element;
21
- declare function AvatarImage({ className, ...props }: AvatarImageProps): import("react").JSX.Element;
22
- declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): import("react").JSX.Element;
23
- //#endregion
24
- export { Avatar, AvatarFallback, AvatarFallbackProps, AvatarGroup, AvatarGroupProps, AvatarImage, AvatarImageProps, AvatarProps };
19
+ export declare function Avatar({ className, ...props }: AvatarProps): import("react").JSX.Element;
20
+ export declare function AvatarGroup({ className, ...props }: AvatarGroupProps): import("react").JSX.Element;
21
+ export declare function AvatarImage({ className, ...props }: AvatarImageProps): import("react").JSX.Element;
22
+ export declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): import("react").JSX.Element;
23
+ //#endregion
@@ -2,19 +2,18 @@ import { RenderProp } from "../control-props.js";
2
2
  import { BadgeKnobStyle } from "../knob-contracts/badge-knobs.js";
3
3
  import { CSSProperties, ComponentProps } from "react";
4
4
  //#region src/ui/badge.d.ts
5
- declare const badgeVariants: readonly ["default", "outline"];
6
- type BadgeVariant = (typeof badgeVariants)[number];
7
- declare const badgeSizes: readonly ["sm", "md"];
8
- type BadgeSize = (typeof badgeSizes)[number];
9
- declare const BADGE_COLORS: readonly ["neutral", "red", "orange", "yellow", "green", "blue", "purple", "pink"];
10
- type BadgeColor = (typeof BADGE_COLORS)[number];
11
- type BadgeProps = Omit<ComponentProps<"span">, "style"> & {
5
+ export declare const badgeVariants: readonly ["default", "outline"];
6
+ export type BadgeVariant = (typeof badgeVariants)[number];
7
+ export declare const badgeSizes: readonly ["sm", "md"];
8
+ export type BadgeSize = (typeof badgeSizes)[number];
9
+ export declare const BADGE_COLORS: readonly ["neutral", "red", "orange", "yellow", "green", "blue", "purple", "pink"];
10
+ export type BadgeColor = (typeof BADGE_COLORS)[number];
11
+ export type BadgeProps = Omit<ComponentProps<"span">, "style"> & {
12
12
  variant?: BadgeVariant;
13
13
  size?: BadgeSize;
14
14
  color?: BadgeColor;
15
15
  render?: RenderProp<ComponentProps<"span">>;
16
16
  style?: CSSProperties & BadgeKnobStyle;
17
17
  };
18
- declare function Badge({ variant, size, color, render, className, children, ...props }: BadgeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
19
- //#endregion
20
- export { BADGE_COLORS, Badge, BadgeColor, BadgeProps, BadgeSize, BadgeVariant, badgeSizes, badgeVariants };
18
+ export declare function Badge({ variant, size, color, render, className, children, ...props }: BadgeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
19
+ //#endregion
@@ -3,24 +3,23 @@ import { ControlSize } from "../control-variants.js";
3
3
  import { ButtonGroupKnobStyle } from "../knob-contracts/button-group-knobs.js";
4
4
  import { CSSProperties, ComponentProps } from "react";
5
5
  //#region src/ui/button-group.d.ts
6
- type ButtonGroupTextProps = Omit<ComponentProps<"div"> & {
6
+ export type ButtonGroupTextProps = Omit<ComponentProps<"div"> & {
7
7
  size?: ControlSize;
8
8
  }, "style"> & {
9
9
  style?: CSSProperties & ButtonGroupKnobStyle;
10
10
  };
11
- type ButtonGroupProps = ComponentProps<"div"> & {
11
+ export type ButtonGroupProps = ComponentProps<"div"> & {
12
12
  orientation?: "horizontal" | "vertical";
13
13
  indicator?: HoverIndicator;
14
14
  } & {
15
15
  style?: CSSProperties & ButtonGroupKnobStyle;
16
16
  };
17
- type ButtonGroupSeparatorProps = Omit<ComponentProps<"div"> & {
17
+ export type ButtonGroupSeparatorProps = Omit<ComponentProps<"div"> & {
18
18
  orientation?: "horizontal" | "vertical";
19
19
  }, "style"> & {
20
20
  style?: CSSProperties & ButtonGroupKnobStyle;
21
21
  };
22
- declare function ButtonGroup({ orientation, indicator, className, children, ...props }: ButtonGroupProps): import("react").JSX.Element;
23
- declare function ButtonGroupText({ size, className, ...props }: ButtonGroupTextProps): import("react").JSX.Element;
24
- declare function ButtonGroupSeparator({ orientation, className, ...props }: ButtonGroupSeparatorProps): import("react").JSX.Element;
25
- //#endregion
26
- export { ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupSeparatorProps, ButtonGroupText, ButtonGroupTextProps };
22
+ export declare function ButtonGroup({ orientation, indicator, className, children, ...props }: ButtonGroupProps): import("react").JSX.Element;
23
+ export declare function ButtonGroupText({ size, className, ...props }: ButtonGroupTextProps): import("react").JSX.Element;
24
+ export declare function ButtonGroupSeparator({ orientation, className, ...props }: ButtonGroupSeparatorProps): import("react").JSX.Element;
25
+ //#endregion
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/cn.js";
3
- import { skinIndicator } from "../skin.js";
3
+ import { useSkin } from "../skin-provider.js";
4
4
  import { ButtonTrackContext, buttonTrackStructureClasses } from "./button.js";
5
5
  import { TrackHighlight } from "../extensions/track-highlight.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/ui/button-group.tsx
8
8
  function ButtonGroup({ orientation = "horizontal", indicator, className, children, ...props }) {
9
- const resolvedIndicator = indicator ?? skinIndicator("button-group") ?? "none";
9
+ const skin = useSkin();
10
+ const resolvedIndicator = indicator ?? skin.indicators?.["button-group"] ?? "none";
10
11
  const tracksHover = resolvedIndicator === "hover";
11
12
  return /* @__PURE__ */ jsx(ButtonTrackContext, {
12
13
  value: tracksHover,
@@ -3,13 +3,13 @@ import { ControlSize, ControlTone, ControlVariant } from "../control-variants.js
3
3
  import { ButtonKnobStyle } from "../knob-contracts/button-knobs.js";
4
4
  import { CSSProperties, ComponentProps } from "react";
5
5
  //#region src/ui/button.d.ts
6
- type ButtonVariant = ControlVariant;
7
- type ButtonSize = ControlSize;
8
- type ButtonTone = ControlTone;
9
- declare const ButtonTrackContext: import("react").Context<boolean>;
10
- declare const buttonShapes: readonly ["default", "circle"];
11
- type ButtonShape = (typeof buttonShapes)[number];
12
- type ButtonAppearanceProps = {
6
+ export type ButtonVariant = ControlVariant;
7
+ export type ButtonSize = ControlSize;
8
+ export type ButtonTone = ControlTone;
9
+ export declare const ButtonTrackContext: import("react").Context<boolean>;
10
+ export declare const buttonShapes: readonly ["default", "circle"];
11
+ export type ButtonShape = (typeof buttonShapes)[number];
12
+ export type ButtonAppearanceProps = {
13
13
  variant?: ButtonVariant;
14
14
  size?: ButtonSize;
15
15
  tone?: ButtonTone;
@@ -18,21 +18,20 @@ type ButtonAppearanceProps = {
18
18
  shape?: ButtonShape;
19
19
  style?: CSSProperties & ButtonKnobStyle;
20
20
  };
21
- type ButtonProps = ComponentProps<"button"> & ButtonAppearanceProps & {
21
+ export type ButtonProps = ComponentProps<"button"> & ButtonAppearanceProps & {
22
22
  render?: RenderProp<ComponentProps<"button">, {
23
23
  disabled: boolean;
24
24
  }>;
25
25
  nativeButton?: boolean;
26
26
  };
27
- type ButtonLinkProps = ComponentProps<"a"> & ButtonAppearanceProps & {
27
+ export type ButtonLinkProps = ComponentProps<"a"> & ButtonAppearanceProps & {
28
28
  render?: RenderProp<ComponentProps<"a">>;
29
29
  };
30
- type ButtonLabelProps = ComponentProps<"label"> & ButtonAppearanceProps;
31
- declare const buttonStructureClasses = "relative isolate inline-flex shrink-0 items-center justify-center overflow-visible whitespace-nowrap";
32
- declare const buttonTrackStructureClasses = "data-[track=hover]:relative data-[track=hover]:isolate [&_[data-track-item]]:[isolation:auto]";
33
- declare const buttonContentClasses = "relative z-[1] inline-flex min-w-0 items-center justify-center gap-[inherit]";
34
- declare function Button({ variant, size, tone, active, iconOnly, shape, type, disabled, render, nativeButton, className, children, ...props }: ButtonProps): import("react").JSX.Element;
35
- declare function ButtonLink({ variant, size, tone, active, iconOnly, shape, render, className, children, ...props }: ButtonLinkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
36
- declare function ButtonLabel({ variant, size, tone, active, iconOnly, shape, className, children, ...props }: ButtonLabelProps): import("react").JSX.Element;
37
- //#endregion
38
- export { Button, ButtonAppearanceProps, ButtonLabel, ButtonLabelProps, ButtonLink, ButtonLinkProps, ButtonProps, ButtonShape, ButtonSize, ButtonTone, ButtonTrackContext, ButtonVariant, buttonContentClasses, buttonShapes, buttonStructureClasses, buttonTrackStructureClasses };
30
+ export type ButtonLabelProps = ComponentProps<"label"> & ButtonAppearanceProps;
31
+ export declare const buttonStructureClasses = "relative isolate inline-flex shrink-0 items-center justify-center overflow-visible whitespace-nowrap";
32
+ export declare const buttonTrackStructureClasses = "data-[track=hover]:relative data-[track=hover]:isolate [&_[data-track-item]]:[isolation:auto]";
33
+ export declare const buttonContentClasses = "relative z-[1] inline-flex min-w-0 items-center justify-center gap-[inherit]";
34
+ export declare function Button({ variant, size, tone, active, iconOnly, shape, type, disabled, render, nativeButton, className, children, ...props }: ButtonProps): import("react").JSX.Element;
35
+ export declare function ButtonLink({ variant, size, tone, active, iconOnly, shape, render, className, children, ...props }: ButtonLinkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
36
+ export declare function ButtonLabel({ variant, size, tone, active, iconOnly, shape, className, children, ...props }: ButtonLabelProps): import("react").JSX.Element;
37
+ //#endregion
package/dist/ui/button.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/cn.js";
3
3
  import { skinAdornment } from "../skin.js";
4
- import { createContext, useContext } from "react";
4
+ import { useSkin } from "../skin-provider.js";
5
+ import { Children, Fragment, createContext, isValidElement, useContext } from "react";
5
6
  import { Button as Button$1 } from "@base-ui/react/button";
6
7
  import { useRender } from "@base-ui/react/use-render";
7
8
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -11,6 +12,16 @@ const buttonShapes = ["default", "circle"];
11
12
  const buttonStructureClasses = "relative isolate inline-flex shrink-0 items-center justify-center overflow-visible whitespace-nowrap";
12
13
  const buttonTrackStructureClasses = "data-[track=hover]:relative data-[track=hover]:isolate [&_[data-track-item]]:[isolation:auto]";
13
14
  const buttonContentClasses = "relative z-[1] inline-flex min-w-0 items-center justify-center gap-[inherit]";
15
+ function wrapButtonText(children) {
16
+ return Children.map(children, (child) => {
17
+ if (typeof child === "string" || typeof child === "number") return /* @__PURE__ */ jsx("span", {
18
+ className: "contents",
19
+ children: child
20
+ });
21
+ if (isValidElement(child) && child.type === Fragment) return /* @__PURE__ */ jsx(Fragment, { children: wrapButtonText(child.props.children) });
22
+ return child;
23
+ });
24
+ }
14
25
  function ButtonContent({ children }) {
15
26
  return /* @__PURE__ */ jsx("span", {
16
27
  "data-control-ui": "button",
@@ -22,10 +33,12 @@ function ButtonContent({ children }) {
22
33
  }
23
34
  function ButtonBody({ layer, wrap = true, children }) {
24
35
  const wrapsContent = useContext(ButtonTrackContext) || wrap && Boolean(layer);
25
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [layer, wrapsContent ? /* @__PURE__ */ jsx(ButtonContent, { children }) : children] });
36
+ const content = wrapButtonText(children);
37
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [layer, wrapsContent ? /* @__PURE__ */ jsx(ButtonContent, { children: content }) : content] });
26
38
  }
27
39
  function Button({ variant = "quiet", size = "sm", tone = "neutral", active = false, iconOnly = false, shape = "default", type = "button", disabled, render, nativeButton, className, children, ...props }) {
28
- const layer = skinAdornment("button", "layer", {
40
+ const skin = useSkin();
41
+ const layer = skinAdornment(skin, "button", "layer", {
29
42
  variant,
30
43
  tone
31
44
  });
@@ -56,6 +69,7 @@ function Button({ variant = "quiet", size = "sm", tone = "neutral", active = fal
56
69
  });
57
70
  }
58
71
  function ButtonLink({ variant = "quiet", size = "sm", tone = "neutral", active = false, iconOnly = false, shape = "default", render, className, children, ...props }) {
72
+ const skin = useSkin();
59
73
  const tracksHover = useContext(ButtonTrackContext);
60
74
  return useRender({
61
75
  defaultTagName: "a",
@@ -75,7 +89,7 @@ function ButtonLink({ variant = "quiet", size = "sm", tone = "neutral", active =
75
89
  "data-size": size,
76
90
  className: cn(buttonStructureClasses, className),
77
91
  children: /* @__PURE__ */ jsx(ButtonBody, {
78
- layer: skinAdornment("button", "layer", {
92
+ layer: skinAdornment(skin, "button", "layer", {
79
93
  variant,
80
94
  tone
81
95
  }),
@@ -85,6 +99,7 @@ function ButtonLink({ variant = "quiet", size = "sm", tone = "neutral", active =
85
99
  });
86
100
  }
87
101
  function ButtonLabel({ variant = "quiet", size = "sm", tone = "neutral", active = false, iconOnly = false, shape = "default", className, children, ...props }) {
102
+ const skin = useSkin();
88
103
  const tracksHover = useContext(ButtonTrackContext);
89
104
  return /* @__PURE__ */ jsx("label", {
90
105
  "data-track-item": tracksHover ? "" : void 0,
@@ -101,7 +116,7 @@ function ButtonLabel({ variant = "quiet", size = "sm", tone = "neutral", active
101
116
  "data-size": size,
102
117
  className: cn(buttonStructureClasses, className),
103
118
  children: /* @__PURE__ */ jsx(ButtonBody, {
104
- layer: skinAdornment("button", "layer", {
119
+ layer: skinAdornment(skin, "button", "layer", {
105
120
  variant,
106
121
  tone
107
122
  }),
@@ -5,7 +5,6 @@ import { DayPicker } from "react-day-picker";
5
5
  type CalendarPropsWithStyle<Props> = Props extends unknown ? Omit<Props, "style"> & {
6
6
  style?: CSSProperties & CalendarKnobStyle;
7
7
  } : never;
8
- type CalendarProps = CalendarPropsWithStyle<ComponentProps<typeof DayPicker>>;
9
- declare function Calendar({ className, showOutsideDays, style, ...props }: CalendarProps): import("react").JSX.Element;
10
- //#endregion
11
- export { Calendar, CalendarProps };
8
+ export type CalendarProps = CalendarPropsWithStyle<ComponentProps<typeof DayPicker>>;
9
+ export declare function Calendar({ className, showOutsideDays, style, ...props }: CalendarProps): import("react").JSX.Element;
10
+ //#endregion
package/dist/ui/card.d.ts CHANGED
@@ -1,36 +1,35 @@
1
1
  import { CardKnobStyle } from "../knob-contracts/card-knobs.js";
2
2
  import { CSSProperties, ComponentProps } from "react";
3
3
  //#region src/ui/card.d.ts
4
- type CardVariant = "default" | "sectioned";
5
- type CardProps = Omit<ComponentProps<"div">, "style"> & {
4
+ export type CardVariant = "default" | "sectioned";
5
+ export type CardProps = Omit<ComponentProps<"div">, "style"> & {
6
6
  style?: CSSProperties & CardKnobStyle;
7
7
  } & {
8
8
  variant?: CardVariant;
9
9
  };
10
- type CardHeaderProps = ComponentProps<"div"> & {
10
+ export type CardHeaderProps = ComponentProps<"div"> & {
11
11
  style?: CSSProperties & CardKnobStyle;
12
12
  };
13
- type CardTitleProps = Omit<ComponentProps<"div">, "style"> & {
13
+ export type CardTitleProps = Omit<ComponentProps<"div">, "style"> & {
14
14
  style?: CSSProperties & CardKnobStyle;
15
15
  };
16
- type CardDescriptionProps = ComponentProps<"div"> & {
16
+ export type CardDescriptionProps = ComponentProps<"div"> & {
17
17
  style?: CSSProperties & CardKnobStyle;
18
18
  };
19
- type CardActionProps = ComponentProps<"div"> & {
19
+ export type CardActionProps = ComponentProps<"div"> & {
20
20
  style?: CSSProperties & CardKnobStyle;
21
21
  };
22
- type CardContentProps = ComponentProps<"div"> & {
22
+ export type CardContentProps = ComponentProps<"div"> & {
23
23
  style?: CSSProperties & CardKnobStyle;
24
24
  };
25
- type CardFooterProps = ComponentProps<"div"> & {
25
+ export type CardFooterProps = ComponentProps<"div"> & {
26
26
  style?: CSSProperties & CardKnobStyle;
27
27
  };
28
- declare function Card({ variant, className, ...props }: CardProps): import("react").JSX.Element;
29
- declare function CardHeader({ className, ...props }: CardHeaderProps): import("react").JSX.Element;
30
- declare function CardTitle({ className, ...props }: CardTitleProps): import("react").JSX.Element;
31
- declare function CardDescription({ className, ...props }: CardDescriptionProps): import("react").JSX.Element;
32
- declare function CardAction({ className, ...props }: CardActionProps): import("react").JSX.Element;
33
- declare function CardContent({ className, ...props }: CardContentProps): import("react").JSX.Element;
34
- declare function CardFooter({ className, ...props }: CardFooterProps): import("react").JSX.Element;
35
- //#endregion
36
- export { Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, CardVariant };
28
+ export declare function Card({ variant, className, ...props }: CardProps): import("react").JSX.Element;
29
+ export declare function CardHeader({ className, ...props }: CardHeaderProps): import("react").JSX.Element;
30
+ export declare function CardTitle({ className, ...props }: CardTitleProps): import("react").JSX.Element;
31
+ export declare function CardDescription({ className, ...props }: CardDescriptionProps): import("react").JSX.Element;
32
+ export declare function CardAction({ className, ...props }: CardActionProps): import("react").JSX.Element;
33
+ export declare function CardContent({ className, ...props }: CardContentProps): import("react").JSX.Element;
34
+ export declare function CardFooter({ className, ...props }: CardFooterProps): import("react").JSX.Element;
35
+ //#endregion
@@ -1,13 +1,12 @@
1
1
  import { ControlledMultiChoice, HoverIndicator } from "../control-props.js";
2
2
  import { ComponentProps } from "react";
3
3
  //#region src/ui/checkbox-group.d.ts
4
- type CheckboxGroupProps = Omit<ComponentProps<"div">, "defaultValue" | "onChange"> & ControlledMultiChoice & {
4
+ export type CheckboxGroupProps = Omit<ComponentProps<"div">, "defaultValue" | "onChange"> & ControlledMultiChoice & {
5
5
  allValues?: string[];
6
6
  disabled?: boolean;
7
7
  orientation?: "horizontal" | "vertical";
8
8
  indicator?: HoverIndicator;
9
9
  };
10
- declare function CheckboxGroup({ className, orientation, indicator, children, ...props }: CheckboxGroupProps): import("react").JSX.Element;
11
- declare function CheckboxGroupItem({ className, htmlFor, children, ...props }: ComponentProps<"label">): import("react").JSX.Element;
12
- //#endregion
13
- export { CheckboxGroup, CheckboxGroupItem, CheckboxGroupProps };
10
+ export declare function CheckboxGroup({ className, orientation, indicator, children, ...props }: CheckboxGroupProps): import("react").JSX.Element;
11
+ export declare function CheckboxGroupItem({ className, htmlFor, children, ...props }: ComponentProps<"label">): import("react").JSX.Element;
12
+ //#endregion
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import { cn } from "../lib/cn.js";
3
- import { skinIndicator } from "../skin.js";
3
+ import { useSkin } from "../skin-provider.js";
4
4
  import { TrackHighlight } from "../extensions/track-highlight.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { CheckboxGroup as CheckboxGroup$1 } from "@base-ui/react/checkbox-group";
7
7
  //#region src/ui/checkbox-group.tsx
8
8
  function CheckboxGroup({ className, orientation = "vertical", indicator, children, ...props }) {
9
- const resolvedIndicator = indicator ?? skinIndicator("checkbox-group") ?? "none";
9
+ const skin = useSkin();
10
+ const resolvedIndicator = indicator ?? skin.indicators?.["checkbox-group"] ?? "none";
10
11
  return /* @__PURE__ */ jsxs(CheckboxGroup$1, {
11
12
  "data-control-ui": "checkbox-group",
12
13
  "data-control-family": "checkbox-group",