@ctrl-ui/react 0.8.2 → 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 (373) 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/length.d.ts +2 -3
  40. package/dist/email/templates.d.ts +7 -8
  41. package/dist/email/theme.d.ts +4 -5
  42. package/dist/environment-variables.d.ts +35 -36
  43. package/dist/extensions/create-track-highlight.d.ts +3 -4
  44. package/dist/extensions/supports-anchor-transitions.d.ts +2 -3
  45. package/dist/extensions/track-highlight.d.ts +3 -4
  46. package/dist/hooks/use-audio-recorder.d.ts +14 -15
  47. package/dist/hooks/use-chat-composer.d.ts +5 -6
  48. package/dist/hooks/use-chat-message.d.ts +7 -8
  49. package/dist/hooks/use-color-area.d.ts +5 -6
  50. package/dist/hooks/use-copy-to-clipboard.d.ts +7 -8
  51. package/dist/hooks/use-dropzone.d.ts +11 -12
  52. package/dist/hooks/use-dynamic-notification.d.ts +6 -7
  53. package/dist/hooks/use-environment-variables.d.ts +9 -10
  54. package/dist/hooks/use-keyboard-navigation.d.ts +3 -0
  55. package/dist/hooks/use-keyboard-navigation.js +22 -0
  56. package/dist/hooks/use-mobile.d.ts +2 -3
  57. package/dist/hooks/use-textarea-trigger-menu.d.ts +2 -3
  58. package/dist/hooks/use-trigger-menu.d.ts +7 -8
  59. package/dist/hooks/use-user-ask.d.ts +6 -7
  60. package/dist/inline-attachment.d.ts +16 -17
  61. package/dist/inline-citation.d.ts +22 -23
  62. package/dist/knob-contracts/accordion-knobs.d.ts +3 -4
  63. package/dist/knob-contracts/accordion-knobs.js +1 -0
  64. package/dist/knob-contracts/action-bar-knobs.d.ts +3 -4
  65. package/dist/knob-contracts/activity-knobs.d.ts +3 -4
  66. package/dist/knob-contracts/alert-knobs.d.ts +3 -4
  67. package/dist/knob-contracts/alert-knobs.js +12 -1
  68. package/dist/knob-contracts/audio-recorder-knobs.d.ts +3 -4
  69. package/dist/knob-contracts/audio-visualizer-knobs.d.ts +3 -4
  70. package/dist/knob-contracts/avatar-knobs.d.ts +3 -4
  71. package/dist/knob-contracts/avatar-knobs.js +2 -1
  72. package/dist/knob-contracts/badge-knobs.d.ts +3 -4
  73. package/dist/knob-contracts/button-group-knobs.d.ts +3 -4
  74. package/dist/knob-contracts/button-knobs.d.ts +3 -4
  75. package/dist/knob-contracts/button-knobs.js +1 -0
  76. package/dist/knob-contracts/calendar-knobs.d.ts +3 -4
  77. package/dist/knob-contracts/card-knobs.d.ts +3 -4
  78. package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +3 -4
  79. package/dist/knob-contracts/chat-composer-attachment-knobs.js +3 -1
  80. package/dist/knob-contracts/chat-composer-knobs.d.ts +3 -4
  81. package/dist/knob-contracts/chat-composer-knobs.js +1 -0
  82. package/dist/knob-contracts/chat-layout-knobs.d.ts +3 -4
  83. package/dist/knob-contracts/chat-layout-knobs.js +2 -3
  84. package/dist/knob-contracts/chat-message-knobs.d.ts +3 -4
  85. package/dist/knob-contracts/choice-knobs.d.ts +3 -4
  86. package/dist/knob-contracts/choice-knobs.js +2 -1
  87. package/dist/knob-contracts/code-diff-knobs.d.ts +3 -4
  88. package/dist/knob-contracts/code-diff-knobs.js +1 -0
  89. package/dist/knob-contracts/code-knobs.d.ts +3 -4
  90. package/dist/knob-contracts/code-knobs.js +3 -1
  91. package/dist/knob-contracts/collapsible-knobs.d.ts +3 -4
  92. package/dist/knob-contracts/color-picker-knobs.d.ts +3 -4
  93. package/dist/knob-contracts/context-knobs.d.ts +3 -4
  94. package/dist/knob-contracts/dockable-panel-knobs.d.ts +3 -4
  95. package/dist/knob-contracts/dockable-panel-knobs.js +1 -0
  96. package/dist/knob-contracts/dropzone-knobs.d.ts +3 -4
  97. package/dist/knob-contracts/dropzone-knobs.js +1 -0
  98. package/dist/knob-contracts/dynamic-notification-knobs.d.ts +3 -4
  99. package/dist/knob-contracts/empty-knobs.d.ts +3 -4
  100. package/dist/knob-contracts/empty-knobs.js +14 -1
  101. package/dist/knob-contracts/environment-variables-knobs.d.ts +3 -4
  102. package/dist/knob-contracts/environment-variables-knobs.js +2 -1
  103. package/dist/knob-contracts/field-knobs.d.ts +3 -4
  104. package/dist/knob-contracts/gradient-editor-knobs.d.ts +3 -4
  105. package/dist/knob-contracts/gradient-editor-knobs.js +3 -1
  106. package/dist/knob-contracts/infinite-canvas-knobs.d.ts +3 -4
  107. package/dist/knob-contracts/inline-attachment-knobs.d.ts +3 -4
  108. package/dist/knob-contracts/inline-attachment-knobs.js +2 -1
  109. package/dist/knob-contracts/inline-citation-knobs.d.ts +3 -4
  110. package/dist/knob-contracts/inline-citation-knobs.js +1 -0
  111. package/dist/knob-contracts/item-knobs.d.ts +3 -4
  112. package/dist/knob-contracts/kbd-knobs.d.ts +3 -4
  113. package/dist/knob-contracts/markdown-block-knobs.d.ts +3 -4
  114. package/dist/knob-contracts/markdown-block-knobs.js +2 -0
  115. package/dist/knob-contracts/markdown-knobs.d.ts +3 -4
  116. package/dist/knob-contracts/markdown-knobs.js +1 -0
  117. package/dist/knob-contracts/morphing-panel-knobs.d.ts +3 -4
  118. package/dist/knob-contracts/pagination-knobs.d.ts +3 -4
  119. package/dist/knob-contracts/phone-input-knobs.d.ts +3 -4
  120. package/dist/knob-contracts/phone-input-knobs.js +1 -0
  121. package/dist/knob-contracts/popup-knobs.d.ts +3 -4
  122. package/dist/knob-contracts/progressive-blur-knobs.d.ts +3 -4
  123. package/dist/knob-contracts/progressive-blur-knobs.js +1 -0
  124. package/dist/knob-contracts/range-knobs.d.ts +3 -4
  125. package/dist/knob-contracts/resizable-knobs.d.ts +3 -4
  126. package/dist/knob-contracts/resizable-knobs.js +1 -0
  127. package/dist/knob-contracts/rich-tooltip-knobs.d.ts +3 -4
  128. package/dist/knob-contracts/scroll-area-knobs.d.ts +3 -4
  129. package/dist/knob-contracts/separator-knobs.d.ts +3 -4
  130. package/dist/knob-contracts/sidebar-knobs.d.ts +3 -4
  131. package/dist/knob-contracts/sidebar-knobs.js +1 -0
  132. package/dist/knob-contracts/skeleton-knobs.d.ts +3 -4
  133. package/dist/knob-contracts/skeleton-knobs.js +9 -1
  134. package/dist/knob-contracts/source-badge-knobs.d.ts +3 -4
  135. package/dist/knob-contracts/spinner-knobs.d.ts +3 -4
  136. package/dist/knob-contracts/stepper-knobs.d.ts +3 -4
  137. package/dist/knob-contracts/stepper-knobs.js +1 -0
  138. package/dist/knob-contracts/switch-knobs.d.ts +3 -4
  139. package/dist/knob-contracts/switch-knobs.js +7 -1
  140. package/dist/knob-contracts/table-knobs.d.ts +3 -4
  141. package/dist/knob-contracts/table-of-contents-knobs.d.ts +3 -4
  142. package/dist/knob-contracts/table-of-contents-knobs.js +25 -0
  143. package/dist/knob-contracts/tabs-knobs.d.ts +3 -4
  144. package/dist/knob-contracts/tabs-knobs.js +2 -1
  145. package/dist/knob-contracts/task-list-knobs.d.ts +3 -4
  146. package/dist/knob-contracts/task-list-knobs.js +1 -0
  147. package/dist/knob-contracts/thread-rail-knobs.d.ts +3 -4
  148. package/dist/knob-contracts/timeline-knobs.d.ts +3 -4
  149. package/dist/knob-contracts/toolbar-knobs.d.ts +3 -4
  150. package/dist/knob-contracts/toolbar-knobs.js +1 -0
  151. package/dist/knob-contracts/track-highlight-knobs.d.ts +3 -4
  152. package/dist/knob-contracts/transcript-divider-knobs.d.ts +3 -4
  153. package/dist/knob-contracts/tree-knobs.d.ts +3 -4
  154. package/dist/knob-contracts/user-ask-knobs.d.ts +3 -4
  155. package/dist/knob-contracts/user-ask-knobs.js +1 -0
  156. package/dist/lib/cn.d.ts +2 -3
  157. package/dist/lib/code-tokens.d.ts +12 -13
  158. package/dist/lib/color.d.ts +26 -27
  159. package/dist/lib/contrast.d.ts +12 -13
  160. package/dist/lib/diff.d.ts +14 -15
  161. package/dist/lib/dropzone-validation.d.ts +25 -26
  162. package/dist/lib/env-file.d.ts +12 -13
  163. package/dist/lib/format-audio-recorder-duration.d.ts +2 -3
  164. package/dist/lib/liquid-glass-optics.d.ts +2 -3
  165. package/dist/lib/phone-input-format.d.ts +3 -4
  166. package/dist/lib/phone-input-format.js +1 -1
  167. package/dist/lib/phone-number.d.ts +8 -9
  168. package/dist/lib/trigger-detect.d.ts +4 -5
  169. package/dist/markdown-block.d.ts +11 -12
  170. package/dist/scripts/contrast-eval.d.ts +16 -17
  171. package/dist/scripts/contrast-eval.js +13 -7
  172. package/dist/skin-provider.d.ts +14 -0
  173. package/dist/skin-provider.js +21 -0
  174. package/dist/skin.d.ts +14 -33
  175. package/dist/skin.js +3 -46
  176. package/dist/source-badge.d.ts +7 -8
  177. package/dist/styles/index.css +1 -4
  178. package/dist/styles/recipes/accordion.css +8 -2
  179. package/dist/styles/recipes/action-bar.css +5 -2
  180. package/dist/styles/recipes/alert.css +95 -16
  181. package/dist/styles/recipes/avatar.css +17 -1
  182. package/dist/styles/recipes/badge.css +0 -1
  183. package/dist/styles/recipes/button.css +34 -8
  184. package/dist/styles/recipes/calendar.css +0 -6
  185. package/dist/styles/recipes/chat-composer-attachment.css +51 -53
  186. package/dist/styles/recipes/chat-composer.css +26 -21
  187. package/dist/styles/recipes/chat-layout.css +21 -62
  188. package/dist/styles/recipes/chat-message.css +11 -5
  189. package/dist/styles/recipes/choice.css +9 -2
  190. package/dist/styles/recipes/code-diff.css +8 -1
  191. package/dist/styles/recipes/code.css +39 -17
  192. package/dist/styles/recipes/collapsible.css +0 -3
  193. package/dist/styles/recipes/color-picker-details.css +1 -2
  194. package/dist/styles/recipes/color-picker-values.css +0 -4
  195. package/dist/styles/recipes/dockable-panel.css +8 -1
  196. package/dist/styles/recipes/dropzone.css +9 -2
  197. package/dist/styles/recipes/empty.css +118 -17
  198. package/dist/styles/recipes/environment-variables.css +8 -1
  199. package/dist/styles/recipes/field-parts.css +1 -6
  200. package/dist/styles/recipes/field.css +9 -5
  201. package/dist/styles/recipes/gradient-editor.css +16 -5
  202. package/dist/styles/recipes/inline-attachment.css +13 -8
  203. package/dist/styles/recipes/inline-citation.css +8 -4
  204. package/dist/styles/recipes/item.css +1 -1
  205. package/dist/styles/recipes/kbd.css +8 -0
  206. package/dist/styles/recipes/markdown-block.css +16 -2
  207. package/dist/styles/recipes/markdown.css +12 -0
  208. package/dist/styles/recipes/morphing-panel.css +1 -1
  209. package/dist/styles/recipes/pagination.css +0 -4
  210. package/dist/styles/recipes/phone-input.css +8 -4
  211. package/dist/styles/recipes/popup-lists.css +11 -0
  212. package/dist/styles/recipes/popup-toast.css +1 -29
  213. package/dist/styles/recipes/popup.css +2 -2
  214. package/dist/styles/recipes/progressive-blur.css +28 -7
  215. package/dist/styles/recipes/range.css +50 -1
  216. package/dist/styles/recipes/resizable.css +8 -10
  217. package/dist/styles/recipes/rich-tooltip.css +0 -4
  218. package/dist/styles/recipes/scroll-area.css +8 -2
  219. package/dist/styles/recipes/sidebar-menu.css +0 -6
  220. package/dist/styles/recipes/sidebar.css +56 -17
  221. package/dist/styles/recipes/skeleton.css +85 -3
  222. package/dist/styles/recipes/source-badge.css +0 -3
  223. package/dist/styles/recipes/stepper.css +8 -1
  224. package/dist/styles/recipes/switch.css +89 -17
  225. package/dist/styles/recipes/table-of-contents.css +211 -45
  226. package/dist/styles/recipes/table.css +0 -1
  227. package/dist/styles/recipes/tabs.css +19 -2
  228. package/dist/styles/recipes/task-list.css +8 -2
  229. package/dist/styles/recipes/thread-rail.css +0 -4
  230. package/dist/styles/recipes/toolbar.css +18 -4
  231. package/dist/styles/recipes/track-highlight.css +63 -5
  232. package/dist/styles/recipes/tree.css +2 -0
  233. package/dist/styles/recipes/user-ask.css +8 -4
  234. package/dist/styles/theme.css +130 -138
  235. package/dist/surface-variants.d.ts +4 -5
  236. package/dist/task-list.d.ts +16 -17
  237. package/dist/thread-rail.d.ts +21 -22
  238. package/dist/transcript-divider.d.ts +6 -7
  239. package/dist/ui/accordion.d.ts +10 -11
  240. package/dist/ui/alert-dialog.d.ts +11 -12
  241. package/dist/ui/alert-dialog.js +8 -6
  242. package/dist/ui/alert.d.ts +9 -10
  243. package/dist/ui/alert.js +3 -3
  244. package/dist/ui/aspect-ratio.d.ts +3 -4
  245. package/dist/ui/autocomplete.d.ts +19 -20
  246. package/dist/ui/autocomplete.js +5 -3
  247. package/dist/ui/avatar.d.ts +9 -10
  248. package/dist/ui/badge.d.ts +9 -10
  249. package/dist/ui/button-group.d.ts +7 -8
  250. package/dist/ui/button-group.js +3 -2
  251. package/dist/ui/button.d.ts +17 -18
  252. package/dist/ui/button.js +20 -5
  253. package/dist/ui/calendar.d.ts +3 -4
  254. package/dist/ui/card.d.ts +16 -17
  255. package/dist/ui/checkbox-group.d.ts +4 -5
  256. package/dist/ui/checkbox-group.js +3 -2
  257. package/dist/ui/checkbox.d.ts +3 -4
  258. package/dist/ui/code-diff.d.ts +8 -9
  259. package/dist/ui/code.d.ts +32 -23
  260. package/dist/ui/code.js +41 -20
  261. package/dist/ui/collapsible.d.ts +7 -8
  262. package/dist/ui/color-picker.d.ts +40 -41
  263. package/dist/ui/color-picker.js +6 -4
  264. package/dist/ui/combobox-disabled-selection.d.ts +3 -4
  265. package/dist/ui/combobox.d.ts +19 -20
  266. package/dist/ui/combobox.js +5 -3
  267. package/dist/ui/command.d.ts +19 -18
  268. package/dist/ui/command.js +38 -12
  269. package/dist/ui/context-menu.d.ts +30 -31
  270. package/dist/ui/context-menu.js +8 -5
  271. package/dist/ui/dialog.d.ts +13 -13
  272. package/dist/ui/dialog.js +10 -8
  273. package/dist/ui/dockable-panel-geometry.d.ts +7 -8
  274. package/dist/ui/dockable-panel.d.ts +21 -22
  275. package/dist/ui/drawer.d.ts +17 -18
  276. package/dist/ui/drawer.js +7 -6
  277. package/dist/ui/dropdown-menu.d.ts +32 -33
  278. package/dist/ui/dropdown-menu.js +5 -3
  279. package/dist/ui/dropzone.d.ts +24 -24
  280. package/dist/ui/empty.d.ts +14 -14
  281. package/dist/ui/empty.js +3 -3
  282. package/dist/ui/field.d.ts +26 -27
  283. package/dist/ui/form.d.ts +4 -5
  284. package/dist/ui/gradient-editor.d.ts +16 -17
  285. package/dist/ui/hover-card.d.ts +6 -7
  286. package/dist/ui/hover-card.js +5 -3
  287. package/dist/ui/infinite-canvas.d.ts +11 -12
  288. package/dist/ui/input-group.d.ts +6 -7
  289. package/dist/ui/input-otp.d.ts +7 -8
  290. package/dist/ui/input.d.ts +3 -4
  291. package/dist/ui/item.d.ts +20 -21
  292. package/dist/ui/kbd.d.ts +7 -5
  293. package/dist/ui/kbd.js +4 -2
  294. package/dist/ui/markdown-elements.d.ts +20 -21
  295. package/dist/ui/markdown.d.ts +5 -6
  296. package/dist/ui/menubar.d.ts +25 -26
  297. package/dist/ui/menubar.js +8 -5
  298. package/dist/ui/meter.d.ts +11 -12
  299. package/dist/ui/morphing-panel.d.ts +8 -9
  300. package/dist/ui/native-select.d.ts +3 -4
  301. package/dist/ui/native-select.js +1 -1
  302. package/dist/ui/navigation-menu.d.ts +17 -18
  303. package/dist/ui/navigation-menu.js +5 -3
  304. package/dist/ui/number-field.d.ts +15 -16
  305. package/dist/ui/pagination.d.ts +10 -11
  306. package/dist/ui/phone-input.d.ts +5 -6
  307. package/dist/ui/phone-input.js +40 -37
  308. package/dist/ui/popover.d.ts +11 -12
  309. package/dist/ui/popover.js +5 -3
  310. package/dist/ui/progress.d.ts +11 -12
  311. package/dist/ui/progressive-blur.d.ts +4 -5
  312. package/dist/ui/radio-group.d.ts +5 -6
  313. package/dist/ui/resizable.d.ts +12 -13
  314. package/dist/ui/responsive-dialog.d.ts +11 -12
  315. package/dist/ui/rich-tooltip-tour.d.ts +5 -6
  316. package/dist/ui/rich-tooltip.d.ts +21 -23
  317. package/dist/ui/rich-tooltip.js +5 -5
  318. package/dist/ui/scroll-area.d.ts +7 -8
  319. package/dist/ui/scroll-area.js +9 -6
  320. package/dist/ui/select.d.ts +21 -14
  321. package/dist/ui/select.js +7 -4
  322. package/dist/ui/separator.d.ts +2 -3
  323. package/dist/ui/sheet.d.ts +8 -9
  324. package/dist/ui/sheet.js +7 -5
  325. package/dist/ui/sidebar-menu.d.ts +18 -19
  326. package/dist/ui/sidebar-menu.js +4 -3
  327. package/dist/ui/sidebar-provider.d.ts +32 -7
  328. package/dist/ui/sidebar-provider.js +82 -22
  329. package/dist/ui/sidebar-resize-rail.d.ts +8 -0
  330. package/dist/ui/sidebar-resize-rail.js +192 -0
  331. package/dist/ui/sidebar.d.ts +19 -13
  332. package/dist/ui/sidebar.js +120 -55
  333. package/dist/ui/skeleton.d.ts +7 -4
  334. package/dist/ui/skeleton.js +9 -2
  335. package/dist/ui/slider.d.ts +6 -5
  336. package/dist/ui/slider.js +16 -13
  337. package/dist/ui/spinner.d.ts +3 -4
  338. package/dist/ui/stepper.d.ts +22 -23
  339. package/dist/ui/switch.d.ts +3 -4
  340. package/dist/ui/switch.js +12 -1
  341. package/dist/ui/table-of-contents.d.ts +7 -8
  342. package/dist/ui/table-of-contents.js +4 -2
  343. package/dist/ui/table.d.ts +17 -18
  344. package/dist/ui/tabs.d.ts +14 -11
  345. package/dist/ui/textarea.d.ts +3 -4
  346. package/dist/ui/timeline.d.ts +18 -19
  347. package/dist/ui/toast.d.ts +9 -9
  348. package/dist/ui/toast.js +21 -14
  349. package/dist/ui/toggle.d.ts +5 -6
  350. package/dist/ui/toggle.js +3 -2
  351. package/dist/ui/toolbar.d.ts +15 -16
  352. package/dist/ui/toolbar.js +15 -4
  353. package/dist/ui/tooltip.d.ts +6 -13
  354. package/dist/ui/tooltip.js +7 -8
  355. package/dist/ui/tree.d.ts +18 -19
  356. package/dist/ui/tree.js +3 -2
  357. package/dist/ui/trigger-menu.d.ts +15 -16
  358. package/dist/ui/trigger-menu.js +5 -3
  359. package/dist/ui/use-switch-drag.d.ts +7 -0
  360. package/dist/ui/use-switch-drag.js +104 -0
  361. package/dist/user-ask.d.ts +24 -25
  362. package/package.json +15 -15
  363. package/dist/code-block-editor.d.ts +0 -59
  364. package/dist/code-block-editor.js +0 -250
  365. package/dist/knob-contracts/code-block-editor-knobs.d.ts +0 -5
  366. package/dist/knob-contracts/code-block-editor-knobs.js +0 -11
  367. package/dist/lib/code-block-shiki.d.ts +0 -9
  368. package/dist/lib/code-block-shiki.js +0 -6
  369. package/dist/skin.config.d.ts +0 -5
  370. package/dist/skin.config.js +0 -12
  371. package/dist/styles/recipes/code-block-editor.css +0 -136
  372. package/dist/styles/skin-theme.css +0 -137
  373. package/dist/styles/skin.css +0 -143
@@ -1,46 +1,45 @@
1
1
  //#region src/scripts/contrast-eval.d.mts
2
- declare const stripComments: (css: any) => any;
3
- declare function parseBlocks(css: any): {
2
+ export declare const stripComments: (css: any) => any;
3
+ export declare function parseBlocks(css: any): {
4
4
  prelude: any;
5
5
  body: any;
6
6
  }[];
7
- declare function flattenBlocks(css: any): any;
8
- declare function declarations(body: any): Map<any, any>;
9
- /** Later source wins, so the order is Tailwind palette, core theme, skin theme, app overrides. */
10
- declare function tokenMaps(cssSources: any): {
7
+ export declare function flattenBlocks(css: any): any;
8
+ export declare function declarations(body: any): Map<any, any>;
9
+ export declare function themeTokenBlocks(css: any): any;
10
+ export declare function tokenMaps(cssSources: any): {
11
11
  light: Map<any, any>;
12
12
  dark: Map<any, any>;
13
13
  };
14
- declare function rgbToOklch(r255: any, g255: any, b255: any): {
14
+ export declare function rgbToOklch(r255: any, g255: any, b255: any): {
15
15
  L: number;
16
16
  C: number;
17
17
  H: number;
18
18
  };
19
- declare function oklchToRgb(L: any, C: any, H: any): {
19
+ export declare function oklchToRgb(L: any, C: any, H: any): {
20
20
  r: number;
21
21
  g: number;
22
22
  b: number;
23
23
  };
24
- declare const luminance: ({ r, g, b }: {
24
+ export declare const luminance: ({ r, g, b }: {
25
25
  b: any;
26
26
  g: any;
27
27
  r: any;
28
28
  }) => number;
29
- declare function contrastRatio(a: any, b: any): number;
30
- declare function parseHex(value: any): {
29
+ export declare function contrastRatio(a: any, b: any): number;
30
+ export declare function parseHex(value: any): {
31
31
  r: number;
32
32
  g: number;
33
33
  b: number;
34
34
  alpha: number;
35
35
  } | null;
36
- declare function resolveColor(value: any, tokens: any, seen?: Set<any>, depth?: number): any;
37
- declare function composite(over: any, under: any): {
36
+ export declare function resolveColor(value: any, tokens: any, seen?: Set<any>, depth?: number): any;
37
+ export declare function composite(over: any, under: any): {
38
38
  r: number;
39
39
  g: number;
40
40
  b: number;
41
41
  alpha: any;
42
42
  };
43
- declare function evaluatePair(pair: any, tokens: any): any;
44
- declare function evaluate(tokens: any, pairs: any): any;
45
- //#endregion
46
- export { composite, contrastRatio, declarations, evaluate, evaluatePair, flattenBlocks, luminance, oklchToRgb, parseBlocks, parseHex, resolveColor, rgbToOklch, stripComments, tokenMaps };
43
+ export declare function evaluatePair(pair: any, tokens: any): any;
44
+ export declare function evaluate(tokens: any, pairs: any): any;
45
+ //#endregion
@@ -40,20 +40,27 @@ function declarations(body) {
40
40
  }
41
41
  return properties;
42
42
  }
43
- const declaresTokens = (prelude) => prelude.includes("[data-skin") || prelude.startsWith("@theme") && !prelude.includes("inline");
43
+ function declaresTokens(prelude) {
44
+ if (prelude.startsWith("@")) return prelude.startsWith("@theme") && !prelude.includes("inline");
45
+ return prelude.includes("[data-skin") || /(^|[\s,(])(?::root|\.dark)(?=$|[\s,.):])/.test(prelude);
46
+ }
47
+ function themeTokenBlocks(css) {
48
+ return parseBlocks(stripComments(css)).flatMap((block) => {
49
+ if (/^@layer\b/.test(block.prelude)) return themeTokenBlocks(block.body);
50
+ return declaresTokens(block.prelude) ? [block] : [];
51
+ });
52
+ }
44
53
  function modesOf(prelude) {
45
54
  if (/\.dark\b/.test(prelude.replaceAll(/:not\([^)]*\)/g, ""))) return ["dark"];
46
55
  if (/:not\([^)]*\.dark\b/.test(prelude)) return ["light"];
47
56
  return ["light", "dark"];
48
57
  }
49
- /** Later source wins, so the order is Tailwind palette, core theme, skin theme, app overrides. */
50
58
  function tokenMaps(cssSources) {
51
59
  const maps = {
52
60
  light: /* @__PURE__ */ new Map(),
53
61
  dark: /* @__PURE__ */ new Map()
54
62
  };
55
- for (const css of cssSources) for (const block of flattenBlocks(stripComments(css))) {
56
- if (!declaresTokens(block.prelude)) continue;
63
+ for (const css of cssSources) for (const block of themeTokenBlocks(css)) {
57
64
  const modes = modesOf(block.prelude);
58
65
  for (const [name, value] of declarations(block.body)) for (const mode of modes) maps[mode].set(name, value);
59
66
  }
@@ -162,7 +169,6 @@ function splitTopLevel(text) {
162
169
  }
163
170
  const unresolved = (reason) => ({ unresolved: reason });
164
171
  const isUnresolved = (result) => Boolean(result?.unresolved);
165
- /** `calc(<base> <op> <n>)`, `calc(<n> * var(--x))` and `calc(<base> * <n>)` — the only calc shapes the packs write. */
166
172
  function evaluateCalc(expression, base, tokens, seen, depth) {
167
173
  const inner = expression.slice(5, -1).trim();
168
174
  const match = /^(\S+)\s*([+\-*])\s*(\S+)$/.exec(inner);
@@ -237,7 +243,7 @@ function literalOklch(inner, tokens, seen, depth) {
237
243
  const numbers = channels.map((part, index) => literalChannel(part, index === 0));
238
244
  if (numbers.some((number) => number === null)) return unresolved(`unsupported \`oklch(${inner})\``);
239
245
  const alphaText = slash === -1 ? null : parts.slice(slash + 1).join(" ");
240
- const alpha = alphaText === null ? 1 : resolveScalar(alphaText, tokens, seen, depth);
246
+ const alpha = alphaText === null ? 1 : alphaValue(alphaText, null, tokens, seen, depth);
241
247
  if (alpha === null) return unresolved(`unsupported alpha in \`oklch(${inner})\``);
242
248
  return {
243
249
  ...oklchToRgb(numbers[0], numbers[1], numbers[2]),
@@ -324,4 +330,4 @@ function evaluate(tokens, pairs) {
324
330
  return pairs.map((pair) => evaluatePair(pair, tokens));
325
331
  }
326
332
  //#endregion
327
- export { composite, contrastRatio, declarations, evaluate, evaluatePair, flattenBlocks, luminance, oklchToRgb, parseBlocks, parseHex, resolveColor, rgbToOklch, stripComments, tokenMaps };
333
+ export { composite, contrastRatio, declarations, evaluate, evaluatePair, flattenBlocks, luminance, oklchToRgb, parseBlocks, parseHex, resolveColor, rgbToOklch, stripComments, themeTokenBlocks, tokenMaps };
@@ -0,0 +1,14 @@
1
+ import { ControlUiSkin, SkinAdornmentContexts, SkinAdornmentPart, SkinAdornmentScope } from "./skin.js";
2
+ import { ReactNode } from "react";
3
+ //#region src/skin-provider.d.ts
4
+ export declare function SkinProvider({ skin, children }: {
5
+ skin: ControlUiSkin;
6
+ children: ReactNode;
7
+ }): import("react").JSX.Element;
8
+ export declare function useSkin(): ControlUiSkin;
9
+ export declare function SkinAdornment<Scope extends SkinAdornmentScope, Part extends SkinAdornmentPart<Scope>>({ scope, part, context }: {
10
+ scope: Scope;
11
+ part: Part;
12
+ context: SkinAdornmentContexts[Scope][Part];
13
+ }): ReactNode;
14
+ //#endregion
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { skinAdornment } from "./skin.js";
3
+ import { createContext, useContext } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/skin-provider.tsx
6
+ const SkinContext = createContext({});
7
+ function SkinProvider({ skin, children }) {
8
+ return /* @__PURE__ */ jsx(SkinContext, {
9
+ value: skin,
10
+ children
11
+ });
12
+ }
13
+ function useSkin() {
14
+ return useContext(SkinContext);
15
+ }
16
+ function SkinAdornment({ scope, part, context }) {
17
+ const skin = useSkin();
18
+ return skinAdornment(skin, scope, part, context);
19
+ }
20
+ //#endregion
21
+ export { SkinAdornment, SkinProvider, useSkin };
package/dist/skin.d.ts CHANGED
@@ -3,7 +3,7 @@ import { ControlTone, ControlVariant } from "./control-variants.js";
3
3
  import { ReactNode } from "react";
4
4
  //#region src/skin.d.ts
5
5
  type StatelessPart = Record<never, never>;
6
- type SkinAdornmentContexts = {
6
+ export type SkinAdornmentContexts = {
7
7
  button: {
8
8
  layer: {
9
9
  variant: ControlVariant;
@@ -13,9 +13,6 @@ type SkinAdornmentContexts = {
13
13
  "chat-layout": {
14
14
  titlebar: StatelessPart;
15
15
  };
16
- "chat-thought": {
17
- details: StatelessPart;
18
- };
19
16
  dialog: {
20
17
  titlebar: StatelessPart;
21
18
  };
@@ -25,47 +22,31 @@ type SkinAdornmentContexts = {
25
22
  };
26
23
  };
27
24
  };
28
- type SkinAdornmentScope = keyof SkinAdornmentContexts;
29
- type SkinAdornmentPart<Scope extends SkinAdornmentScope> = keyof SkinAdornmentContexts[Scope];
25
+ export type SkinAdornmentScope = keyof SkinAdornmentContexts;
26
+ export type SkinAdornmentPart<Scope extends SkinAdornmentScope> = keyof SkinAdornmentContexts[Scope];
30
27
  type AdornmentEntry<Ctx> = ReactNode | ((ctx: Ctx) => ReactNode);
31
- type SkinIndicators = {
28
+ export type SkinIndicators = {
32
29
  sidebar?: SelectionIndicator | HoverIndicator;
33
30
  tree?: SelectionIndicator;
34
31
  "button-group"?: HoverIndicator;
35
32
  "toggle-group"?: HoverIndicator;
36
33
  "checkbox-group"?: HoverIndicator;
37
34
  };
38
- type ControlUiSkin = {
39
- /** Scopes theme.css/skin.css via data-skin; components stamp it on portal containers. */
40
- id: string;
41
- /** Stamps data-motion="reduced", collapsing --duration-* to 0ms. Never `animation:none` — ripple cleanup still needs `animationend` to fire. */
35
+ export type ControlUiSkin = {
36
+ id?: string;
42
37
  motion?: "reduced";
43
- /** Locks skin to one scheme; page's .dark class must then follow it, since Shiki, native color-scheme, and dark: utilities key off .dark, not skin tokens. Undefined = adaptive, both blocks authored. */
44
38
  colorScheme?: "light" | "dark";
45
- /** Geometry, not slot restyle — padding, gap, rounding, and shadow across sidebar gap/container/inner. explicit `variant` prop wins; undefined keeps "sidebar". */
46
39
  sidebarLayout?: SidebarLayout;
40
+ scrollAreaBlur?: boolean;
47
41
  indicators?: SkinIndicators;
48
- /** Any CSS length. Seeds --sidebar-width; caller's own value still wins. Undefined keeps shadcn's 16rem. */
49
42
  sidebarWidth?: string;
50
- /** effects.css keys off data-effects ancestor attribute. top-shine is CSS-only; ripple needs runtime's document pointer listener. */
51
43
  effects?: ControlEffect[];
52
44
  adornments?: { [Scope in SkinAdornmentScope]?: { [Part in SkinAdornmentPart<Scope>]?: AdornmentEntry<SkinAdornmentContexts[Scope][Part]>; }; };
53
45
  };
54
- type SidebarLayout = "sidebar" | "floating" | "inset";
55
- type ControlEffect = "top-shine" | "ripple" | "hover-circle";
56
- type ControlEffectValue = ControlEffect | ControlEffect[];
57
- declare function controlEffectsAttribute(effects?: ControlEffectValue): string | undefined;
58
- /** Read at render time so getter-based configs stay live. Portals stamp it on their positioner, which lands outside any token-scoped ancestor. */
59
- declare function activeSkin(): ControlUiSkin;
60
- declare function skinId(): string;
61
- /** Sidebar falls back: variant prop → this → "sidebar". */
62
- declare function skinSidebarLayout(): SidebarLayout | undefined;
63
- declare function skinIndicator<Component extends keyof SkinIndicators>(component: Component): SkinIndicators[Component];
64
- /** SidebarProvider seeds --sidebar-width from this; caller-provided value still wins. */
65
- declare function skinSidebarWidth(): string | undefined;
66
- /** Portals stamp result next to data-skin; ControlEffectsRuntime mirrors it on <html>. */
67
- declare function skinEffects(): string | undefined;
68
- declare function skinAdornment<Scope extends SkinAdornmentScope, Part extends SkinAdornmentPart<Scope>>(scope: Scope, part: Part, ctx: SkinAdornmentContexts[Scope][Part]): ReactNode | undefined;
69
- declare function hasSkinAdornment<Scope extends SkinAdornmentScope, Part extends SkinAdornmentPart<Scope>>(scope: Scope, part: Part): boolean;
70
- //#endregion
71
- export { ControlEffect, ControlEffectValue, ControlUiSkin, SidebarLayout, SkinAdornmentContexts, SkinAdornmentPart, SkinAdornmentScope, SkinIndicators, activeSkin, controlEffectsAttribute, hasSkinAdornment, skinAdornment, skinEffects, skinId, skinIndicator, skinSidebarLayout, skinSidebarWidth };
46
+ export type SidebarLayout = "sidebar" | "floating" | "inset" | "page";
47
+ export type ControlEffect = "top-shine" | "ripple" | "hover-circle";
48
+ export type ControlEffectValue = ControlEffect | ControlEffect[];
49
+ export declare function controlEffectsAttribute(effects?: ControlEffectValue): string | undefined;
50
+ export declare function skinAdornment<Scope extends SkinAdornmentScope, Part extends SkinAdornmentPart<Scope>>(skin: ControlUiSkin, scope: Scope, part: Part, ctx: SkinAdornmentContexts[Scope][Part]): ReactNode | undefined;
51
+ export declare function hasSkinAdornment<Scope extends SkinAdornmentScope, Part extends SkinAdornmentPart<Scope>>(skin: ControlUiSkin, scope: Scope, part: Part): boolean;
52
+ //#endregion
package/dist/skin.js CHANGED
@@ -1,61 +1,18 @@
1
- import { skin } from "./skin.config.js";
2
1
  //#region src/skin.ts
3
2
  function controlEffectsAttribute(effects) {
4
3
  if (!effects) return void 0;
5
4
  const value = (Array.isArray(effects) ? effects : [effects]).join(" ");
6
5
  return value.length > 0 ? value : void 0;
7
6
  }
8
- /** Read at render time so getter-based configs stay live. Portals stamp it on their positioner, which lands outside any token-scoped ancestor. */
9
- function activeSkin() {
10
- return skin;
11
- }
12
- const verifiedSkinIds = /* @__PURE__ */ new Set();
13
- function skinScopeProblem(id) {
14
- const boundary = document.querySelector(`[data-skin="${id}"]`);
15
- if (!boundary) return `Control UI: skin.config id is "${id}" but no element carries data-skin="${id}" (root has ${JSON.stringify(document.documentElement.dataset.skin ?? null)}); every token is undeclared until they match.`;
16
- if (getComputedStyle(boundary).getPropertyValue("--background").trim()) return void 0;
17
- return `Control UI: skin-theme.css declares no tokens for data-skin="${id}"; check the CSS entry imports (../components/control-ui/styles/skin-theme.css) or run scripts/control-ui-doctor.mjs.`;
18
- }
19
- function verifySkinScope(id) {
20
- if (process.env.NODE_ENV === "production" || typeof document === "undefined" || verifiedSkinIds.has(id)) return;
21
- verifiedSkinIds.add(id);
22
- setTimeout(() => {
23
- if (skin.id !== id) {
24
- verifiedSkinIds.delete(id);
25
- return;
26
- }
27
- const problem = skinScopeProblem(id);
28
- if (problem) console.error(problem);
29
- }, 0);
30
- }
31
- function skinId() {
32
- verifySkinScope(skin.id);
33
- return skin.id;
34
- }
35
- /** Sidebar falls back: variant prop → this → "sidebar". */
36
- function skinSidebarLayout() {
37
- return skin.sidebarLayout;
38
- }
39
- function skinIndicator(component) {
40
- return skin.indicators?.[component];
41
- }
42
- /** SidebarProvider seeds --sidebar-width from this; caller-provided value still wins. */
43
- function skinSidebarWidth() {
44
- return skin.sidebarWidth;
45
- }
46
- /** Portals stamp result next to data-skin; ControlEffectsRuntime mirrors it on <html>. */
47
- function skinEffects() {
48
- return controlEffectsAttribute(skin.effects);
49
- }
50
7
  function resolveAdornment(entry, ctx) {
51
8
  if (entry === void 0) return void 0;
52
9
  return typeof entry === "function" ? entry(ctx) : entry;
53
10
  }
54
- function skinAdornment(scope, part, ctx) {
11
+ function skinAdornment(skin, scope, part, ctx) {
55
12
  return resolveAdornment(skin.adornments?.[scope]?.[part], ctx);
56
13
  }
57
- function hasSkinAdornment(scope, part) {
14
+ function hasSkinAdornment(skin, scope, part) {
58
15
  return skin.adornments?.[scope]?.[part] !== void 0;
59
16
  }
60
17
  //#endregion
61
- export { activeSkin, controlEffectsAttribute, hasSkinAdornment, skinAdornment, skinEffects, skinId, skinIndicator, skinSidebarLayout, skinSidebarWidth };
18
+ export { controlEffectsAttribute, hasSkinAdornment, skinAdornment };
@@ -3,21 +3,20 @@ import { SourceBadgeKnobStyle } from "./knob-contracts/source-badge-knobs.js";
3
3
  import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar.js";
4
4
  import { CSSProperties, ComponentProps } from "react";
5
5
  //#region src/source-badge.d.ts
6
- type SourceBadgeProps = Omit<ComponentProps<"a">, "href" | "style"> & {
6
+ export type SourceBadgeProps = Omit<ComponentProps<"a">, "href" | "style"> & {
7
7
  faviconSrc?: string | false;
8
8
  href: string;
9
9
  style?: CSSProperties & SourceBadgeKnobStyle & BadgeKnobStyle;
10
10
  };
11
- declare function sourceHostname(href: string): string;
12
- declare function sourceFaviconHref(href: string): string | undefined;
13
- type SourceFaviconProps = Omit<ComponentProps<typeof Avatar>, "children" | "style"> & {
11
+ export declare function sourceHostname(href: string): string;
12
+ export declare function sourceFaviconHref(href: string): string | undefined;
13
+ export type SourceFaviconProps = Omit<ComponentProps<typeof Avatar>, "children" | "style"> & {
14
14
  faviconSrc?: string | false;
15
15
  href: string;
16
16
  imageProps?: Omit<ComponentProps<typeof AvatarImage>, "src">;
17
17
  fallbackProps?: ComponentProps<typeof AvatarFallback>;
18
18
  style?: CSSProperties & SourceBadgeKnobStyle;
19
19
  };
20
- declare function SourceFavicon({ faviconSrc, href, imageProps, fallbackProps, className, ...props }: SourceFaviconProps): import("react").JSX.Element;
21
- declare function SourceBadge({ faviconSrc, href, children, className, rel, target, ...props }: SourceBadgeProps): import("react").JSX.Element;
22
- //#endregion
23
- export { SourceBadge, SourceBadgeProps, SourceFavicon, SourceFaviconProps, sourceFaviconHref, sourceHostname };
20
+ export declare function SourceFavicon({ faviconSrc, href, imageProps, fallbackProps, className, ...props }: SourceFaviconProps): import("react").JSX.Element;
21
+ export declare function SourceBadge({ faviconSrc, href, children, className, rel, target, ...props }: SourceBadgeProps): import("react").JSX.Element;
22
+ //#endregion
@@ -26,11 +26,11 @@
26
26
  @import "./recipes/chat-message.css";
27
27
  @import "./recipes/chat-composer.css";
28
28
  @import "./chat-composer-editor.css";
29
+ @import "./recipes/spinner.css";
29
30
  @import "./recipes/chat-composer-attachment.css";
30
31
  @import "./recipes/choice.css";
31
32
  @import "./code.css";
32
33
  @import "./recipes/code.css";
33
- @import "./recipes/code-block-editor.css";
34
34
  @import "./recipes/code-diff.css";
35
35
  @import "./recipes/sidebar.css";
36
36
  @import "./recipes/sidebar-menu.css";
@@ -63,7 +63,6 @@
63
63
  @import "./recipes/phone-input.css";
64
64
  @import "./recipes/rich-tooltip.css";
65
65
  @import "./recipes/skeleton.css";
66
- @import "./recipes/spinner.css";
67
66
  @import "./recipes/stepper.css";
68
67
  @import "./recipes/switch.css";
69
68
  @import "./recipes/table.css";
@@ -79,5 +78,3 @@
79
78
  @import "./type-scale.css";
80
79
  @import "./recipes/user-ask.css";
81
80
  @import "./recipes/user-ask-details.css";
82
- @import "./skin-theme.css";
83
- @import "./skin.css";
@@ -1,12 +1,13 @@
1
1
  @layer components {
2
2
  :where([data-control-family="accordion"][data-slot="root"]) {
3
3
  --cui-accordion-item-border-color: var(--border);
4
+ --cui-accordion-item-border-width: 1px;
4
5
  --cui-accordion-trigger-foreground: var(--foreground);
5
6
  --cui-accordion-trigger-hover-foreground: oklch(from var(--foreground) l c h / 0.8);
6
7
  --cui-accordion-icon-foreground: var(--muted-foreground);
7
8
  }
8
9
  :where([data-control-family="accordion"][data-slot="item"]) {
9
- border-block-end: 1px solid var(--cui-accordion-item-border-color);
10
+ border-block-end: var(--cui-accordion-item-border-width) solid var(--cui-accordion-item-border-color);
10
11
  }
11
12
 
12
13
  :where([data-control-family="accordion"][data-slot="item"]:last-child) {
@@ -19,7 +20,6 @@
19
20
  color: var(--cui-accordion-trigger-foreground);
20
21
  font-size: var(--text-body);
21
22
  outline: none;
22
- transition: color var(--duration-fast) var(--ease-standard);
23
23
  text-align: left;
24
24
  font-weight: var(--font-weight-medium);
25
25
  }
@@ -68,6 +68,12 @@
68
68
  initial-value: transparent;
69
69
  }
70
70
 
71
+ @property --cui-accordion-item-border-width {
72
+ syntax: "<length>";
73
+ inherits: true;
74
+ initial-value: 0px;
75
+ }
76
+
71
77
  @property --cui-accordion-trigger-foreground {
72
78
  syntax: "<color>";
73
79
  inherits: true;
@@ -3,11 +3,14 @@
3
3
  margin-block-start: calc(var(--spacing) * 1);
4
4
  min-block-size: calc(var(--spacing) * 8);
5
5
  gap: calc(var(--spacing) * 1);
6
- opacity: 0;
7
- transition: opacity var(--duration-base) var(--ease-standard);
6
+ opacity: 1;
8
7
  }
9
8
 
10
9
  @media (hover: hover) {
10
+ :where([data-control-family="chat-layout"][data-slot="turn"] [data-control-family="action-bar"][data-slot="root"]) {
11
+ opacity: 0;
12
+ }
13
+
11
14
  :where([data-control-family="chat-layout"][data-slot="turn"]:hover [data-control-family="action-bar"][data-slot="root"]) {
12
15
  opacity: 1;
13
16
  }
@@ -4,33 +4,45 @@
4
4
  --cui-alert-background: var(--card);
5
5
  --cui-alert-border-color: var(--border);
6
6
  --cui-alert-shadow: none;
7
- --_alert-foreground: var(--card-foreground);
8
- --_alert-description-color: var(--muted-foreground);
9
- row-gap: calc(var(--spacing) * 0.5);
10
- padding: calc(var(--spacing) * 3) calc(var(--spacing) * 4);
11
- border: 1px solid var(--cui-alert-border-color);
7
+ --cui-alert-foreground: var(--card-foreground);
8
+ --cui-alert-description-foreground: var(--muted-foreground);
9
+ --cui-alert-border-width: 1px;
10
+ --cui-alert-padding: calc(var(--spacing) * 3);
11
+ --cui-alert-padding-inline: calc(var(--spacing) * 4);
12
+ --cui-alert-gap: calc(var(--spacing) * 0.5);
13
+ --cui-alert-icon-gap: calc(var(--spacing) * 3);
14
+ --cui-alert-icon-size: calc(var(--spacing) * 4);
15
+ --cui-alert-font-size: var(--text-sm);
16
+ --cui-alert-title-font-weight: var(--font-weight-medium);
17
+ --cui-alert-description-gap: var(--spacing);
18
+ grid-template-columns: 0 minmax(0, 1fr);
19
+ row-gap: var(--cui-alert-gap);
20
+ padding: var(--cui-alert-padding) var(--cui-alert-padding-inline);
21
+ border: var(--cui-alert-border-width) solid var(--cui-alert-border-color);
12
22
  border-radius: var(--cui-alert-radius);
13
23
  background: var(--cui-alert-background);
14
24
  box-shadow: var(--cui-alert-shadow);
15
- color: var(--_alert-foreground);
16
- font-size: var(--text-sm);
25
+ color: var(--cui-alert-foreground);
26
+ font-size: var(--cui-alert-font-size);
17
27
  line-height: var(--text-sm--line-height);
28
+ overflow-wrap: anywhere;
18
29
  }
19
30
 
20
31
  :where([data-control-family="alert"][data-slot="root"][data-variant="destructive"]) {
21
- --_alert-foreground: var(--destructive-text);
32
+ --cui-alert-foreground: var(--destructive-text);
22
33
  --cui-alert-border-color: oklch(from var(--destructive) l c h / 0.5);
23
- --_alert-description-color: oklch(from var(--destructive-text) l c h / 0.9);
34
+ --cui-alert-description-foreground: oklch(from var(--destructive-text) l c h / 0.9);
24
35
  }
25
36
 
26
37
  :where([data-control-family="alert"][data-slot="root"]:has(> svg)) {
27
- column-gap: calc(var(--spacing) * 3);
38
+ grid-template-columns: var(--cui-alert-icon-size) minmax(0, 1fr);
39
+ column-gap: var(--cui-alert-icon-gap);
28
40
  }
29
41
 
30
42
  :where([data-control-family="alert"][data-slot="description"]) {
31
- gap: calc(var(--spacing) * 1);
32
- color: var(--_alert-description-color);
33
- font-size: var(--text-sm);
43
+ gap: var(--cui-alert-description-gap);
44
+ color: var(--cui-alert-description-foreground);
45
+ font-size: var(--cui-alert-font-size);
34
46
  line-height: var(--text-sm--line-height);
35
47
  }
36
48
 
@@ -39,14 +51,15 @@
39
51
  }
40
52
 
41
53
  :where([data-control-family="alert"][data-slot="title"]) {
42
- min-block-size: calc(var(--spacing) * 4);
43
- font-weight: var(--font-weight-medium);
54
+ font-weight: var(--cui-alert-title-font-weight);
44
55
  letter-spacing: var(--tracking-tight);
45
56
  }
46
57
 
47
58
  :where([data-control-family="alert"][data-slot="root"] > svg) {
48
59
  color: currentcolor;
49
- translate: 0 calc(var(--spacing) * 0.5);
60
+ inline-size: var(--cui-alert-icon-size);
61
+ block-size: var(--cui-alert-icon-size);
62
+ margin-block-start: max(0px, calc((1lh - var(--cui-alert-icon-size)) / 2));
50
63
  }
51
64
  }
52
65
 
@@ -73,3 +86,69 @@
73
86
  inherits: true;
74
87
  initial-value: none;
75
88
  }
89
+
90
+ @property --cui-alert-foreground {
91
+ syntax: "<color>";
92
+ inherits: true;
93
+ initial-value: transparent;
94
+ }
95
+
96
+ @property --cui-alert-description-foreground {
97
+ syntax: "<color>";
98
+ inherits: true;
99
+ initial-value: transparent;
100
+ }
101
+
102
+ @property --cui-alert-border-width {
103
+ syntax: "<length>";
104
+ inherits: true;
105
+ initial-value: 0px;
106
+ }
107
+
108
+ @property --cui-alert-padding {
109
+ syntax: "<length>";
110
+ inherits: true;
111
+ initial-value: 0px;
112
+ }
113
+
114
+ @property --cui-alert-padding-inline {
115
+ syntax: "<length>";
116
+ inherits: true;
117
+ initial-value: 0px;
118
+ }
119
+
120
+ @property --cui-alert-gap {
121
+ syntax: "<length>";
122
+ inherits: true;
123
+ initial-value: 0px;
124
+ }
125
+
126
+ @property --cui-alert-icon-gap {
127
+ syntax: "<length>";
128
+ inherits: true;
129
+ initial-value: 0px;
130
+ }
131
+
132
+ @property --cui-alert-icon-size {
133
+ syntax: "<length>";
134
+ inherits: true;
135
+ initial-value: 0px;
136
+ }
137
+
138
+ @property --cui-alert-font-size {
139
+ syntax: "<length>";
140
+ inherits: true;
141
+ initial-value: 0px;
142
+ }
143
+
144
+ @property --cui-alert-description-gap {
145
+ syntax: "<length>";
146
+ inherits: true;
147
+ initial-value: 0px;
148
+ }
149
+
150
+ @property --cui-alert-title-font-weight {
151
+ syntax: "<number>";
152
+ inherits: true;
153
+ initial-value: 500;
154
+ }
@@ -1,5 +1,6 @@
1
1
  @layer components {
2
2
  :where([data-control-family="avatar"][data-slot="root"]) {
3
+ --cui-avatar-image-outline-color: oklch(from var(--foreground) l c h / 0.1);
3
4
  inline-size: calc(var(--spacing) * 9);
4
5
  block-size: calc(var(--spacing) * 9);
5
6
  }
@@ -14,12 +15,21 @@
14
15
  border-radius: var(--cui-avatar-radius);
15
16
  }
16
17
 
18
+ :where([data-control-family="avatar"][data-slot="root"])::after {
19
+ content: "";
20
+ position: absolute;
21
+ inset: 0;
22
+ pointer-events: none;
23
+ border-radius: inherit;
24
+ box-shadow: inset 0 0 0 1px var(--cui-avatar-image-outline-color);
25
+ }
26
+
17
27
  :where([data-control-family="avatar"][data-slot="group"] > [data-control-family="avatar"]) {
18
28
  box-shadow: 0 0 0 2px var(--cui-avatar-group-ring-color);
19
29
  }
20
30
 
21
31
  :where([data-control-family="avatar"][data-slot="fallback"]) {
22
- border-radius: 9999px;
32
+ border-radius: inherit;
23
33
  background: var(--cui-avatar-fallback-background);
24
34
  color: var(--cui-avatar-fallback-foreground);
25
35
  font-size: var(--text-caption);
@@ -50,3 +60,9 @@
50
60
  inherits: true;
51
61
  initial-value: transparent;
52
62
  }
63
+
64
+ @property --cui-avatar-image-outline-color {
65
+ syntax: "<color>";
66
+ inherits: true;
67
+ initial-value: transparent;
68
+ }
@@ -16,7 +16,6 @@
16
16
  background: var(--cui-badge-background);
17
17
  color: var(--cui-badge-foreground);
18
18
  outline: none;
19
- transition: background-color var(--duration-fast) var(--ease-standard);
20
19
  }
21
20
 
22
21
  :where([data-control-family="badge"][data-slot="root"][data-size="sm"]) {