@livestorm/ui-vue 2.0.5 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/README.md +9 -6
  2. package/components-vite.js +2 -2
  3. package/dist/UiButton-uyW8EHRJ.mjs +602 -0
  4. package/dist/UiTimelineItem-EiOEi1yF.mjs +7293 -0
  5. package/dist/UiTooltip-DZcPD6_N.mjs +158 -0
  6. package/dist/a11y-CaZxRWzo.mjs +6 -0
  7. package/dist/breakpoints.mjs +4 -9
  8. package/dist/bus.mjs +5 -5
  9. package/dist/components.mjs +236 -222
  10. package/dist/i18n-B8QOMuFD.mjs +46 -0
  11. package/dist/index.mjs +4 -87
  12. package/dist/integrations.mjs +3 -14
  13. package/dist/layouts.mjs +228 -236
  14. package/dist/responsive.mjs +31 -36
  15. package/dist/slot.mjs +11 -17
  16. package/dist/toastDSV2-D3xDZPe5.mjs +105 -0
  17. package/dist/types/index.d.ts +23 -1
  18. package/dist/types/src/components/Toast/ToastMessage.vue.d.ts +17 -7
  19. package/dist/types/src/components/Toast/toastDSV2.d.ts +89 -64
  20. package/dist/types/src/components/UiActionBar/UiActionBar.vue.d.ts +3 -1
  21. package/dist/types/src/components/UiActionBar/UiActionBarItem.vue.d.ts +18 -3
  22. package/dist/types/src/components/UiActionBar/types.d.ts +5 -1
  23. package/dist/types/src/components/UiAvatar/UiAvatar.vue.d.ts +4 -2
  24. package/dist/types/src/components/UiAvatarList/UiAvatarList.vue.d.ts +3 -2
  25. package/dist/types/src/components/UiBanner/UiBanner.vue.d.ts +13 -1
  26. package/dist/types/src/components/UiButton/UiButton.vue.d.ts +102 -38
  27. package/dist/types/src/components/UiButtonGroup/UiButtonGroup.vue.d.ts +8 -2
  28. package/dist/types/src/components/UiButtonGroup/UiButtonGroupItem.vue.d.ts +3 -0
  29. package/dist/types/src/components/UiButtonGroup/types.d.ts +5 -1
  30. package/dist/types/src/components/UiChoice/UiChoice.vue.d.ts +71 -0
  31. package/dist/types/src/components/UiChoice/index.d.ts +2 -0
  32. package/dist/types/src/components/UiChoice/types.d.ts +7 -0
  33. package/dist/types/src/components/UiColorField/UiColorField.vue.d.ts +1 -1
  34. package/dist/types/src/components/UiColorPicker/UiColorPicker.vue.d.ts +2 -2
  35. package/dist/types/src/components/UiCombobox/UiCombobox.types.d.ts +47 -0
  36. package/dist/types/src/components/UiCombobox/UiCombobox.vue.d.ts +40 -0
  37. package/dist/types/src/components/UiCombobox/index.d.ts +2 -0
  38. package/dist/types/src/components/UiDataTable/UiDataTable.types.d.ts +46 -0
  39. package/dist/types/src/components/UiDataTable/UiDataTable.vue.d.ts +136 -0
  40. package/dist/types/src/components/UiDataTable/index.d.ts +5 -0
  41. package/dist/types/src/components/UiDrawer/UiDrawer.vue.d.ts +28 -0
  42. package/dist/types/src/components/UiDrawer/UiDrawerContent.vue.d.ts +18 -0
  43. package/dist/types/src/components/UiDrawer/UiDrawerTrigger.vue.d.ts +14 -0
  44. package/dist/types/src/components/UiDropdown/DropdownItemCheckbox.vue.d.ts +3 -0
  45. package/dist/types/src/components/UiDropdown/UiDropdownContent.vue.d.ts +10 -0
  46. package/dist/types/src/components/UiDropdown/UiDropdownGroup.vue.d.ts +17 -0
  47. package/dist/types/src/components/UiDropdown/UiDropdownItem.vue.d.ts +9 -4
  48. package/dist/types/src/components/UiDropdown/UiDropdownTrigger.vue.d.ts +21 -5
  49. package/dist/types/src/components/UiDropdown/index.d.ts +1 -0
  50. package/dist/types/src/components/UiEmojiPickerList/UiEmojiPickerList.vue.d.ts +22 -0
  51. package/dist/types/src/components/UiEmptyState/UiEmptyState.vue.d.ts +8 -3
  52. package/dist/types/src/components/UiFieldWrapper/UiFieldWrapper.vue.d.ts +2 -2
  53. package/dist/types/src/components/UiInputCheckbox/CheckboxGlyph.vue.d.ts +17 -0
  54. package/dist/types/src/components/UiInputCheckbox/UiInputCheckbox.vue.d.ts +35 -4
  55. package/dist/types/src/components/UiInputEmoji/UiInputEmoji.vue.d.ts +45 -0
  56. package/dist/types/src/components/UiInputRadio/RadioGlyph.vue.d.ts +19 -0
  57. package/dist/types/src/components/UiInputRadio/UiInputRadio.vue.d.ts +80 -0
  58. package/dist/types/src/components/UiInputRadio/UiInputRadioGroup.vue.d.ts +86 -0
  59. package/dist/types/src/components/UiInputRadio/types.d.ts +19 -0
  60. package/dist/types/src/components/UiInputSelect/UiInputSelect.vue.d.ts +5 -5
  61. package/dist/types/src/components/UiInputTextarea/UiInputTextarea.vue.d.ts +5 -5
  62. package/dist/types/src/components/UiListItem/UiListItem.vue.d.ts +18 -4
  63. package/dist/types/src/components/UiLoader/UiLoader.vue.d.ts +6 -5
  64. package/dist/types/src/components/UiLoader/UiSpinnerIcon.vue.d.ts +3 -0
  65. package/dist/types/src/components/UiLogo/UiLogo.vue.d.ts +9 -3
  66. package/dist/types/src/components/UiMenu/UiMenuContent.vue.d.ts +15 -2
  67. package/dist/types/src/components/UiMenu/UiMenuItem.vue.d.ts +9 -3
  68. package/dist/types/src/components/UiNestedOptions/UiNestedOptions.vue.d.ts +13 -0
  69. package/dist/types/src/components/UiPage/UiPage.vue.d.ts +106 -8
  70. package/dist/types/src/components/UiPagination/UiPagination.vue.d.ts +36 -0
  71. package/dist/types/src/components/UiPagination/index.d.ts +2 -0
  72. package/dist/types/src/components/UiPagination/types.d.ts +4 -0
  73. package/dist/types/src/components/UiPane/UiPane.vue.d.ts +22 -0
  74. package/dist/types/src/components/UiPane/UiPaneContent.vue.d.ts +75 -0
  75. package/dist/types/src/components/UiPane/UiPaneTrigger.vue.d.ts +14 -0
  76. package/dist/types/src/components/UiPane/index.d.ts +5 -0
  77. package/dist/types/src/components/UiProgress/UiProgress.vue.d.ts +1 -1
  78. package/dist/types/src/components/UiRating/UiRating.vue.d.ts +62 -0
  79. package/dist/types/src/components/UiRating/types.d.ts +1 -0
  80. package/dist/types/src/components/UiRoomButton/UiRoomButton.vue.d.ts +5 -3
  81. package/dist/types/src/components/UiRoomCountdown/UiRoomCountdown.vue.d.ts +32 -0
  82. package/dist/types/src/components/UiShell/UiShell.vue.d.ts +3 -0
  83. package/dist/types/src/components/UiSideMenu/UiSideMenu.vue.d.ts +22 -1
  84. package/dist/types/src/components/UiSideMenu/UiSideMenuItemContent.vue.d.ts +2 -2
  85. package/dist/types/src/components/UiSwitch/UiSwitch.vue.d.ts +114 -0
  86. package/dist/types/src/components/UiSwitch/types.d.ts +3 -0
  87. package/dist/types/src/components/UiTable/UiTable.vue.d.ts +13 -4
  88. package/dist/types/src/components/UiTable/UiTableActionsCell.vue.d.ts +49 -0
  89. package/dist/types/src/components/UiTable/UiTableActionsHeaderCell.vue.d.ts +3 -0
  90. package/dist/types/src/components/UiTable/UiTableBody.vue.d.ts +11 -1
  91. package/dist/types/src/components/UiTable/UiTableCell.vue.d.ts +16 -1
  92. package/dist/types/src/components/UiTable/UiTableHeaderCell.vue.d.ts +31 -2
  93. package/dist/types/src/components/UiTable/UiTableRow.vue.d.ts +32 -2
  94. package/dist/types/src/components/UiTable/context.d.ts +3 -0
  95. package/dist/types/src/components/UiTable/index.d.ts +4 -0
  96. package/dist/types/src/components/UiTabs/UiTabs.vue.d.ts +8 -2
  97. package/dist/types/src/components/UiTag/UiTag.types.d.ts +25 -0
  98. package/dist/types/src/components/UiTag/UiTag.vue.d.ts +5 -26
  99. package/dist/types/src/components/UiTag/index.d.ts +2 -1
  100. package/dist/types/src/components/UiTextField/UiTextField.vue.d.ts +10 -5
  101. package/dist/types/src/components/UiTooltip/UiTooltipProvider.vue.d.ts +1 -0
  102. package/dist/types/src/components/UiTooltip/UiTooltipTrigger.vue.d.ts +2 -2
  103. package/dist/types/src/composables/storedThemingApplies.d.ts +17 -0
  104. package/dist/types/src/composables/useButtonStyles.d.ts +1 -0
  105. package/dist/types/src/composables/useChoiceboxSurface.d.ts +11 -0
  106. package/dist/types/src/composables/useContentMode.d.ts +23 -0
  107. package/dist/types/src/composables/useControlModes.d.ts +7 -0
  108. package/dist/types/src/composables/useControlShape.d.ts +24 -0
  109. package/dist/types/src/composables/useFieldFocusEvents.d.ts +12 -0
  110. package/dist/types/src/composables/useIconSize.d.ts +13 -0
  111. package/dist/types/src/composables/usePullGesture.d.ts +42 -0
  112. package/dist/types/src/composables/useThemeAndModes.d.ts +4 -0
  113. package/dist/types/src/constants/sizes.d.ts +1 -1
  114. package/dist/types/src/theming/colorScale.d.ts +165 -0
  115. package/dist/types/src/theming/legacyColorScale.d.ts +27 -0
  116. package/dist/types/src/theming/presetColors.d.ts +11 -0
  117. package/dist/types/src/theming/primitiveTokens.d.ts +2 -0
  118. package/dist/types/src/utils/effectiveOpacity.d.ts +2 -0
  119. package/dist/types/src/utils/numbers.d.ts +1 -2
  120. package/dist/types/src/utils/tokenColor.d.ts +2 -0
  121. package/dist/ui-vue.css +2 -1
  122. package/dist/utils.mjs +165 -194
  123. package/index.d.ts +22 -0
  124. package/index.js +44 -0
  125. package/package.json +28 -20
  126. package/src/components/Toast/LayoutToasts.vue +19 -11
  127. package/src/components/Toast/ToastMessage.vue +130 -73
  128. package/src/components/Toast/toastDSV2.ts +238 -67
  129. package/src/components/UiActionBar/UiActionBar.vue +15 -5
  130. package/src/components/UiActionBar/UiActionBarItem.vue +65 -38
  131. package/src/components/UiActionBar/types.ts +16 -1
  132. package/src/components/UiAvatar/UiAvatar.vue +9 -3
  133. package/src/components/UiAvatarList/UiAvatarList.vue +51 -20
  134. package/src/components/UiBadge/UiBadge.vue +1 -1
  135. package/src/components/UiBanner/UiBanner.vue +77 -27
  136. package/src/components/UiBreadcrumb/UiBreadcrumb.vue +1 -1
  137. package/src/components/UiButton/UiButton.vue +96 -29
  138. package/src/components/UiButtonGroup/UiButtonGroup.vue +22 -16
  139. package/src/components/UiButtonGroup/UiButtonGroupItem.vue +44 -14
  140. package/src/components/UiButtonGroup/types.ts +20 -1
  141. package/src/components/UiCard/UiCard.vue +20 -23
  142. package/src/components/UiCarousel/UiCarousel.vue +2 -2
  143. package/src/components/UiChoice/UiChoice.vue +187 -0
  144. package/src/components/UiChoice/index.ts +2 -0
  145. package/src/components/UiChoice/types.ts +11 -0
  146. package/src/components/UiColorField/UiColorField.vue +2 -2
  147. package/src/components/UiColorPicker/UiColorPicker.vue +16 -13
  148. package/src/components/UiCombobox/UiCombobox.types.ts +52 -0
  149. package/src/components/UiCombobox/UiCombobox.vue +296 -0
  150. package/src/components/UiCombobox/index.ts +2 -0
  151. package/src/components/UiDataTable/UiDataTable.types.ts +47 -0
  152. package/src/components/UiDataTable/UiDataTable.vue +422 -0
  153. package/src/components/UiDataTable/index.ts +12 -0
  154. package/src/components/UiDialog/UiDialogClose.vue +1 -1
  155. package/src/components/UiDialog/UiDialogContent.vue +22 -7
  156. package/src/components/UiDrawer/UiDrawer.vue +16 -0
  157. package/src/components/UiDrawer/UiDrawerContent.vue +42 -0
  158. package/src/components/UiDrawer/UiDrawerTrigger.vue +17 -0
  159. package/src/components/UiDropdown/DropdownItemCheckbox.vue +10 -0
  160. package/src/components/UiDropdown/UiDropdownContent.vue +32 -21
  161. package/src/components/UiDropdown/UiDropdownGroup.vue +23 -0
  162. package/src/components/UiDropdown/UiDropdownItem.vue +45 -18
  163. package/src/components/UiDropdown/UiDropdownSeparator.vue +1 -1
  164. package/src/components/UiDropdown/UiDropdownTrigger.vue +139 -45
  165. package/src/components/UiDropdown/index.ts +1 -0
  166. package/src/components/UiEmojiPickerList/UiEmojiPickerList.vue +122 -0
  167. package/src/components/UiEmptyState/UiEmptyState.vue +16 -4
  168. package/src/components/UiFieldWrapper/UiFieldWrapper.vue +10 -4
  169. package/src/components/UiHorizontalSeparator/UiHorizontalSeparator.vue +2 -2
  170. package/src/components/UiInputCheckbox/CheckboxGlyph.vue +78 -0
  171. package/src/components/UiInputCheckbox/UiInputCheckbox.vue +213 -177
  172. package/src/components/UiInputEmoji/UiInputEmoji.vue +96 -0
  173. package/src/components/UiInputRadio/RadioGlyph.vue +45 -0
  174. package/src/components/UiInputRadio/UiInputRadio.vue +382 -0
  175. package/src/components/UiInputRadio/UiInputRadioGroup.vue +166 -0
  176. package/src/components/UiInputRadio/types.ts +24 -0
  177. package/src/components/UiInputSelect/UiInputSelect.vue +9 -7
  178. package/src/components/UiInputTextarea/UiInputTextarea.vue +20 -35
  179. package/src/components/UiLabel/UiLabel.vue +1 -1
  180. package/src/components/UiListItem/UiListItem.vue +55 -9
  181. package/src/components/UiLoader/UiLoader.vue +11 -29
  182. package/src/components/UiLoader/UiSpinnerIcon.vue +21 -0
  183. package/src/components/UiLogo/UiLogo.vue +41 -7
  184. package/src/components/UiMenu/UiMenuContent.vue +24 -3
  185. package/src/components/UiMenu/UiMenuGroup.vue +1 -1
  186. package/src/components/UiMenu/UiMenuItem.vue +14 -3
  187. package/src/components/UiMenu/UiMenuSubContent.vue +1 -1
  188. package/src/components/UiMenu/UiMenuSubTrigger.vue +2 -2
  189. package/src/components/UiNestedOptions/UiNestedOptions.vue +6 -0
  190. package/src/components/UiPage/UiPage.vue +273 -47
  191. package/src/components/UiPageHeader/UiPageHeader.vue +29 -9
  192. package/src/components/UiPagination/UiPagination.vue +99 -0
  193. package/src/components/UiPagination/index.ts +2 -0
  194. package/src/components/UiPagination/types.ts +28 -0
  195. package/src/components/UiPane/UiPane.vue +20 -0
  196. package/src/components/UiPane/UiPaneContent.vue +232 -0
  197. package/src/components/UiPane/UiPaneTrigger.vue +14 -0
  198. package/src/components/UiPane/index.ts +12 -0
  199. package/src/components/UiPopover/UiPopoverContent.vue +21 -1
  200. package/src/components/UiProgress/UiProgress.vue +2 -2
  201. package/src/components/UiRating/UiRating.vue +258 -0
  202. package/src/components/UiRating/types.ts +1 -0
  203. package/src/components/UiRoomButton/UiRoomButton.vue +14 -45
  204. package/src/components/UiRoomCountdown/UiRoomCountdown.vue +376 -0
  205. package/src/components/UiShell/UiShell.vue +10 -4
  206. package/src/components/UiSideMenu/UiSideMenu.vue +158 -18
  207. package/src/components/UiSideMenu/UiSideMenuItemContent.vue +22 -18
  208. package/src/components/UiStepper/UiStepper.vue +3 -16
  209. package/src/components/UiStepper/UiStepperDescription.vue +1 -13
  210. package/src/components/UiStepper/UiStepperIndicator.vue +17 -57
  211. package/src/components/UiStepper/UiStepperItem.vue +1 -8
  212. package/src/components/UiStepper/UiStepperSeparator.vue +5 -16
  213. package/src/components/UiStepper/UiStepperTitle.vue +1 -10
  214. package/src/components/UiSwitch/UiSwitch.vue +375 -0
  215. package/src/components/UiSwitch/types.ts +5 -0
  216. package/src/components/UiTable/UiTable.vue +98 -8
  217. package/src/components/UiTable/UiTableActionsCell.vue +135 -0
  218. package/src/components/UiTable/UiTableActionsHeaderCell.vue +19 -0
  219. package/src/components/UiTable/UiTableBody.vue +16 -1
  220. package/src/components/UiTable/UiTableCell.vue +33 -16
  221. package/src/components/UiTable/UiTableHeader.vue +6 -5
  222. package/src/components/UiTable/UiTableHeaderCell.vue +61 -9
  223. package/src/components/UiTable/UiTableRow.vue +46 -10
  224. package/src/components/UiTable/context.ts +5 -0
  225. package/src/components/UiTable/index.ts +4 -0
  226. package/src/components/UiTabs/UiTabs.vue +61 -63
  227. package/src/components/UiTag/UiTag.types.ts +28 -0
  228. package/src/components/UiTag/UiTag.vue +24 -42
  229. package/src/components/UiTag/index.ts +2 -0
  230. package/src/components/UiTextField/UiTextField.vue +27 -47
  231. package/src/components/UiTimeline/README.md +6 -6
  232. package/src/components/UiTimeline/UiTimelineItem.vue +3 -3
  233. package/src/components/UiTooltip/UiTooltipContent.vue +1 -1
  234. package/src/components/UiTooltip/UiTooltipProvider.vue +3 -0
  235. package/src/components/UiTooltip/UiTooltipTrigger.vue +16 -1
  236. package/src/composables/storedThemingApplies.ts +19 -0
  237. package/src/composables/useButtonStyles.ts +9 -13
  238. package/src/composables/useChoiceboxSurface.ts +36 -0
  239. package/src/composables/useContentMode.ts +66 -0
  240. package/src/composables/useControlModes.ts +11 -0
  241. package/src/composables/useControlShape.ts +34 -0
  242. package/src/composables/useFieldFocusEvents.ts +30 -0
  243. package/src/composables/useIconSize.ts +43 -0
  244. package/src/composables/usePullGesture.ts +142 -0
  245. package/src/composables/useThemeAndModes.ts +28 -1
  246. package/src/constants/sizes.ts +1 -1
  247. package/src/css/body.css +16 -1
  248. package/src/css/fonts.css +39 -5
  249. package/src/global.d.ts +44 -0
  250. package/src/theming/colorScale.ts +173 -0
  251. package/src/theming/legacyColorScale.ts +58 -0
  252. package/src/theming/presetColors.ts +33 -0
  253. package/src/theming/primitiveTokens.ts +71 -0
  254. package/src/utils/effectiveOpacity.ts +8 -0
  255. package/src/utils/i18n.ts +6 -0
  256. package/src/utils/numbers.ts +1 -1
  257. package/src/utils/responsive.d.ts +14 -0
  258. package/src/utils/tokenColor.ts +9 -0
  259. package/dist/UiTimelineItem.vue_vue_type_style_index_0_lang-DJFdCn2R.mjs +0 -5456
  260. package/dist/a11y-BhF_nl7L.mjs +0 -159
  261. package/dist/i18n-Cktw9hIu.mjs +0 -49
  262. package/dist/toastDSV2-wMh-UMzW.mjs +0 -74
  263. package/dist/types/src/components/UiAvatar/index.d.ts +0 -1
  264. package/dist/types/src/components/UiAvatarList/index.d.ts +0 -1
  265. package/dist/types/src/components/UiBadge/index.d.ts +0 -1
  266. package/dist/types/src/components/UiBanner/index.d.ts +0 -2
  267. package/dist/types/src/components/UiButtonGroup/index.d.ts +0 -3
  268. package/dist/types/src/components/UiCarousel/index.d.ts +0 -2
  269. package/dist/types/src/components/UiColorField/index.d.ts +0 -2
  270. package/dist/types/src/components/UiDialog/MarketplaceHeaderExample.vue.d.ts +0 -28
  271. package/dist/types/src/components/UiDialog/index.d.ts +0 -7
  272. package/dist/types/src/components/UiFieldWrapper/index.d.ts +0 -1
  273. package/dist/types/src/components/UiInputCheckbox/index.d.ts +0 -2
  274. package/dist/types/src/components/UiInputSelect/index.d.ts +0 -2
  275. package/dist/types/src/components/UiInputTextarea/index.d.ts +0 -2
  276. package/dist/types/src/components/UiMenu/index.d.ts +0 -10
  277. package/dist/types/src/components/UiProgress/index.d.ts +0 -2
  278. package/dist/types/src/components/UiTabs/index.d.ts +0 -2
  279. package/dist/types/src/components/UiTimeline/index.d.ts +0 -2
  280. package/dist/types/src/components/UiTooltip/index.d.ts +0 -4
  281. package/dist/types/src/mixins/DynamicAction.d.ts +0 -30
  282. package/dist/useThemeAndModes-BzYwSOEv.mjs +0 -108
  283. package/src/components/UiAvatar/index.js +0 -1
  284. package/src/components/UiAvatarList/index.js +0 -1
  285. package/src/components/UiBadge/index.ts +0 -2
  286. package/src/components/UiBanner/index.ts +0 -2
  287. package/src/components/UiButtonGroup/index.ts +0 -3
  288. package/src/components/UiCarousel/index.ts +0 -2
  289. package/src/components/UiColorField/index.ts +0 -2
  290. package/src/components/UiDialog/MarketplaceHeaderExample.vue +0 -217
  291. package/src/components/UiDialog/index.ts +0 -18
  292. package/src/components/UiFieldWrapper/index.ts +0 -1
  293. package/src/components/UiInputCheckbox/index.ts +0 -2
  294. package/src/components/UiInputSelect/index.ts +0 -2
  295. package/src/components/UiInputTextarea/index.ts +0 -2
  296. package/src/components/UiMenu/index.ts +0 -10
  297. package/src/components/UiProgress/index.ts +0 -2
  298. package/src/components/UiTabs/index.ts +0 -5
  299. package/src/components/UiTag/index.js +0 -1
  300. package/src/components/UiTimeline/index.ts +0 -2
  301. package/src/components/UiTooltip/index.js +0 -4
  302. package/src/mixins/DynamicAction.js +0 -61
package/src/global.d.ts CHANGED
@@ -13,29 +13,41 @@ import type UiButtonGroup from './components/UiButtonGroup/UiButtonGroup.vue'
13
13
  import type UiButtonGroupItem from './components/UiButtonGroup/UiButtonGroupItem.vue'
14
14
  import type UiCard from './components/UiCard/UiCard.vue'
15
15
  import type UiCarousel from './components/UiCarousel/UiCarousel.vue'
16
+ import type UiChoice from './components/UiChoice/UiChoice.vue'
16
17
  import type UiColorField from './components/UiColorField/UiColorField.vue'
17
18
  import type UiColorPicker from './components/UiColorPicker/UiColorPicker.vue'
19
+ import type UiCombobox from './components/UiCombobox/UiCombobox.vue'
20
+ import type UiDataTable from './components/UiDataTable/UiDataTable.vue'
18
21
  import type UiDialog from './components/UiDialog/UiDialog.vue'
19
22
  import type UiDialogClose from './components/UiDialog/UiDialogClose.vue'
20
23
  import type UiDialogContent from './components/UiDialog/UiDialogContent.vue'
21
24
  import type UiDialogFooter from './components/UiDialog/UiDialogFooter.vue'
22
25
  import type UiDialogTrigger from './components/UiDialog/UiDialogTrigger.vue'
26
+ import type UiDrawer from './components/UiDrawer/UiDrawer.vue'
27
+ import type UiDrawerContent from './components/UiDrawer/UiDrawerContent.vue'
28
+ import type UiDrawerTrigger from './components/UiDrawer/UiDrawerTrigger.vue'
23
29
  import type UiDropdown from './components/UiDropdown/UiDropdown.vue'
24
30
  import type UiDropdownContent from './components/UiDropdown/UiDropdownContent.vue'
31
+ import type UiDropdownGroup from './components/UiDropdown/UiDropdownGroup.vue'
25
32
  import type UiDropdownItem from './components/UiDropdown/UiDropdownItem.vue'
26
33
  import type UiDropdownSeparator from './components/UiDropdown/UiDropdownSeparator.vue'
27
34
  import type UiDropdownTrigger from './components/UiDropdown/UiDropdownTrigger.vue'
35
+ import type UiEmojiPickerList from './components/UiEmojiPickerList/UiEmojiPickerList.vue'
28
36
  import type UiEmptyState from './components/UiEmptyState/UiEmptyState.vue'
29
37
  import type UiFieldWrapper from './components/UiFieldWrapper/UiFieldWrapper.vue'
30
38
  import type UiFormField from './components/UiForm/UiFormField.vue'
31
39
  import type UiHorizontalSeparator from './components/UiHorizontalSeparator/UiHorizontalSeparator.vue'
32
40
  import type UiInputCheckbox from './components/UiInputCheckbox/UiInputCheckbox.vue'
41
+ import type UiInputEmoji from './components/UiInputEmoji/UiInputEmoji.vue'
42
+ import type UiInputRadio from './components/UiInputRadio/UiInputRadio.vue'
43
+ import type UiInputRadioGroup from './components/UiInputRadio/UiInputRadioGroup.vue'
33
44
  import type UiInputSelect from './components/UiInputSelect/UiInputSelect.vue'
34
45
  import type UiInputTextarea from './components/UiInputTextarea/UiInputTextarea.vue'
35
46
  import type UiLabel from './components/UiLabel/UiLabel.vue'
36
47
  import type UiList from './components/UiList/UiList.vue'
37
48
  import type UiListItem from './components/UiListItem/UiListItem.vue'
38
49
  import type UiLoader from './components/UiLoader/UiLoader.vue'
50
+ import type UiSpinnerIcon from './components/UiLoader/UiSpinnerIcon.vue'
39
51
  import type UiLogo from './components/UiLogo/UiLogo.vue'
40
52
  import type UiMenu from './components/UiMenu/UiMenu.vue'
41
53
  import type UiMenuContent from './components/UiMenu/UiMenuContent.vue'
@@ -47,14 +59,21 @@ import type UiMenuSub from './components/UiMenu/UiMenuSub.vue'
47
59
  import type UiMenuSubContent from './components/UiMenu/UiMenuSubContent.vue'
48
60
  import type UiMenuSubTrigger from './components/UiMenu/UiMenuSubTrigger.vue'
49
61
  import type UiMenuTrigger from './components/UiMenu/UiMenuTrigger.vue'
62
+ import type UiNestedOptions from './components/UiNestedOptions/UiNestedOptions.vue'
50
63
  import type UiPage from './components/UiPage/UiPage.vue'
51
64
  import type UiPageHeader from './components/UiPageHeader/UiPageHeader.vue'
65
+ import type UiPagination from './components/UiPagination/UiPagination.vue'
66
+ import type UiPane from './components/UiPane/UiPane.vue'
67
+ import type UiPaneContent from './components/UiPane/UiPaneContent.vue'
68
+ import type UiPaneTrigger from './components/UiPane/UiPaneTrigger.vue'
52
69
  import type UiPopover from './components/UiPopover/UiPopover.vue'
53
70
  import type UiPopoverAnchor from './components/UiPopover/UiPopoverAnchor.vue'
54
71
  import type UiPopoverContent from './components/UiPopover/UiPopoverContent.vue'
55
72
  import type UiPopoverTrigger from './components/UiPopover/UiPopoverTrigger.vue'
56
73
  import type UiProgress from './components/UiProgress/UiProgress.vue'
74
+ import type UiRating from './components/UiRating/UiRating.vue'
57
75
  import type UiRoomButton from './components/UiRoomButton/UiRoomButton.vue'
76
+ import type UiRoomCountdown from './components/UiRoomCountdown/UiRoomCountdown.vue'
58
77
  import type UiShell from './components/UiShell/UiShell.vue'
59
78
  import type UiSideMenu from './components/UiSideMenu/UiSideMenu.vue'
60
79
  import type UiSideMenuBottom from './components/UiSideMenu/UiSideMenuBottom.vue'
@@ -67,7 +86,10 @@ import type UiStepperIndicator from './components/UiStepper/UiStepperIndicator.v
67
86
  import type UiStepperItem from './components/UiStepper/UiStepperItem.vue'
68
87
  import type UiStepperSeparator from './components/UiStepper/UiStepperSeparator.vue'
69
88
  import type UiStepperTitle from './components/UiStepper/UiStepperTitle.vue'
89
+ import type UiSwitch from './components/UiSwitch/UiSwitch.vue'
70
90
  import type UiTable from './components/UiTable/UiTable.vue'
91
+ import type UiTableActionsCell from './components/UiTable/UiTableActionsCell.vue'
92
+ import type UiTableActionsHeaderCell from './components/UiTable/UiTableActionsHeaderCell.vue'
71
93
  import type UiTableBody from './components/UiTable/UiTableBody.vue'
72
94
  import type UiTableCell from './components/UiTable/UiTableCell.vue'
73
95
  import type UiTableHeader from './components/UiTable/UiTableHeader.vue'
@@ -106,29 +128,41 @@ declare module 'vue' {
106
128
  UiButtonGroupItem: typeof UiButtonGroupItem
107
129
  UiCard: typeof UiCard
108
130
  UiCarousel: typeof UiCarousel
131
+ UiChoice: typeof UiChoice
109
132
  UiColorField: typeof UiColorField
110
133
  UiColorPicker: typeof UiColorPicker
134
+ UiCombobox: typeof UiCombobox
135
+ UiDataTable: typeof UiDataTable
111
136
  UiDialog: typeof UiDialog
112
137
  UiDialogClose: typeof UiDialogClose
113
138
  UiDialogContent: typeof UiDialogContent
114
139
  UiDialogFooter: typeof UiDialogFooter
115
140
  UiDialogTrigger: typeof UiDialogTrigger
141
+ UiDrawer: typeof UiDrawer
142
+ UiDrawerContent: typeof UiDrawerContent
143
+ UiDrawerTrigger: typeof UiDrawerTrigger
116
144
  UiDropdown: typeof UiDropdown
117
145
  UiDropdownContent: typeof UiDropdownContent
146
+ UiDropdownGroup: typeof UiDropdownGroup
118
147
  UiDropdownItem: typeof UiDropdownItem
119
148
  UiDropdownSeparator: typeof UiDropdownSeparator
120
149
  UiDropdownTrigger: typeof UiDropdownTrigger
150
+ UiEmojiPickerList: typeof UiEmojiPickerList
121
151
  UiEmptyState: typeof UiEmptyState
122
152
  UiFieldWrapper: typeof UiFieldWrapper
123
153
  UiFormField: typeof UiFormField
124
154
  UiHorizontalSeparator: typeof UiHorizontalSeparator
125
155
  UiInputCheckbox: typeof UiInputCheckbox
156
+ UiInputEmoji: typeof UiInputEmoji
157
+ UiInputRadio: typeof UiInputRadio
158
+ UiInputRadioGroup: typeof UiInputRadioGroup
126
159
  UiInputSelect: typeof UiInputSelect
127
160
  UiInputTextarea: typeof UiInputTextarea
128
161
  UiLabel: typeof UiLabel
129
162
  UiList: typeof UiList
130
163
  UiListItem: typeof UiListItem
131
164
  UiLoader: typeof UiLoader
165
+ UiSpinnerIcon: typeof UiSpinnerIcon
132
166
  UiLogo: typeof UiLogo
133
167
  UiMenu: typeof UiMenu
134
168
  UiMenuContent: typeof UiMenuContent
@@ -140,14 +174,21 @@ declare module 'vue' {
140
174
  UiMenuSubContent: typeof UiMenuSubContent
141
175
  UiMenuSubTrigger: typeof UiMenuSubTrigger
142
176
  UiMenuTrigger: typeof UiMenuTrigger
177
+ UiNestedOptions: typeof UiNestedOptions
143
178
  UiPage: typeof UiPage
144
179
  UiPageHeader: typeof UiPageHeader
180
+ UiPagination: typeof UiPagination
181
+ UiPane: typeof UiPane
182
+ UiPaneContent: typeof UiPaneContent
183
+ UiPaneTrigger: typeof UiPaneTrigger
145
184
  UiPopover: typeof UiPopover
146
185
  UiPopoverAnchor: typeof UiPopoverAnchor
147
186
  UiPopoverContent: typeof UiPopoverContent
148
187
  UiPopoverTrigger: typeof UiPopoverTrigger
149
188
  UiProgress: typeof UiProgress
189
+ UiRating: typeof UiRating
150
190
  UiRoomButton: typeof UiRoomButton
191
+ UiRoomCountdown: typeof UiRoomCountdown
151
192
  UiShell: typeof UiShell
152
193
  UiSideMenu: typeof UiSideMenu
153
194
  UiSideMenuBottom: typeof UiSideMenuBottom
@@ -160,7 +201,10 @@ declare module 'vue' {
160
201
  UiStepperItem: typeof UiStepperItem
161
202
  UiStepperSeparator: typeof UiStepperSeparator
162
203
  UiStepperTitle: typeof UiStepperTitle
204
+ UiSwitch: typeof UiSwitch
163
205
  UiTable: typeof UiTable
206
+ UiTableActionsCell: typeof UiTableActionsCell
207
+ UiTableActionsHeaderCell: typeof UiTableActionsHeaderCell
164
208
  UiTableBody: typeof UiTableBody
165
209
  UiTableCell: typeof UiTableCell
166
210
  UiTableHeader: typeof UiTableHeader
@@ -0,0 +1,173 @@
1
+ import { parse, converter, clampChroma, formatHex } from 'culori'
2
+
3
+ // --- OKLCH lightness & chroma targets ---
4
+ // Calibrated to reproduce the static ui-tokens palette exactly at the
5
+ // Livestorm seed (#3073ff = brand 500), pinned by colorScale.spec.ts.
6
+ // l = target lightness, cf = chroma factor (x seed chroma), hOff = hue
7
+ // offset, so other seeds keep the palette's hue drift.
8
+ //
9
+ // 500 is a fixed rung like every other step (its l happens to be the
10
+ // Livestorm seed's own). The seed only contributes hue and chroma, otherwise
11
+ // a light or dark seed would break the light-to-dark ordering of the ramp.
12
+
13
+ export const BRAND_SCALE = {
14
+ 100: { l: 0.9823, cf: 0.0376, hOff: 8.79 },
15
+ 200: { l: 0.9577, cf: 0.0906, hOff: 4.75 },
16
+ 300: { l: 0.9290, cf: 0.1542, hOff: 1.04 },
17
+ 400: { l: 0.7250, cf: 0.6476, hOff: 0.44 },
18
+ 500: { l: 0.5961, cf: 1, hOff: 0 },
19
+ 600: { l: 0.4428, cf: 0.9451, hOff: 0.66 },
20
+ 700: { l: 0.3137, cf: 0.7551, hOff: 0.89 },
21
+ 800: { l: 0.2729, cf: 0.6492, hOff: 0.79 },
22
+ 900: { l: 0.2412, cf: 0.5471, hOff: 0.34 },
23
+ } as const
24
+
25
+ export const NEUTRAL_SCALE = {
26
+ lightBg: { l: 0.9904, cf: 0.0206, hOff: -4.21 },
27
+ 100: { l: 0.9760, cf: 0.0318, hOff: 6.01 },
28
+ 200: { l: 0.9549, cf: 0.0452, hOff: 4.82 },
29
+ 300: { l: 0.9278, cf: 0.0646, hOff: 5.95 },
30
+ 400: { l: 0.7065, cf: 0.2241, hOff: 5.20 },
31
+ 500: { l: 0.5686, cf: 0.3199, hOff: 4.13 },
32
+ 600: { l: 0.4480, cf: 0.3622, hOff: 3.67 },
33
+ // 650/675: dark elevated-surface primitives (surface-neutral-elevated-200/100)
34
+ // from the 2026-09 Supernova sync; calibrated like the rest of the ramp.
35
+ 650: { l: 0.4091, cf: 0.3771, hOff: 3.65 },
36
+ 675: { l: 0.3584, cf: 0.3331, hOff: 2.93 },
37
+ 700: { l: 0.3109, cf: 0.3019, hOff: 2.71 },
38
+ 800: { l: 0.2609, cf: 0.2425, hOff: 3.52 },
39
+ 900: { l: 0.2219, cf: 0.1955, hOff: 4.56 },
40
+ darkBg: { l: 0.1847, cf: 0.1470, hOff: 4.16 },
41
+ } as const
42
+
43
+ export const ALPHA_STEPS = [0.04, 0.08, 0.12, 0.2, 0.32, 0.52, 0.72, 0.84, 0.92] as const
44
+
45
+ // --- Types ---
46
+
47
+ export interface ScaleStep {
48
+ l: number
49
+ cf: number
50
+ hOff: number
51
+ }
52
+
53
+ export interface OklchColor {
54
+ mode: 'oklch'
55
+ l: number
56
+ c: number
57
+ h: number
58
+ }
59
+
60
+ export interface BrandScale {
61
+ 100: string; 200: string; 300: string
62
+ 400: string; 500: string; 600: string
63
+ 700: string; 800: string; 900: string
64
+ }
65
+
66
+ interface NeutralScale {
67
+ lightBg: string; darkBg: string
68
+ 100: string; 200: string; 300: string
69
+ 400: string; 500: string; 600: string
70
+ 650: string; 675: string
71
+ 700: string; 800: string; 900: string
72
+ }
73
+
74
+ // --- Color math ---
75
+
76
+ const toOklch = converter('oklch')
77
+ const toRgb = converter('rgb')
78
+
79
+ export function seedToOklch(hex: string): OklchColor {
80
+ const parsed = parse(hex)
81
+ if (!parsed) throw new Error(`Invalid color: ${hex}`)
82
+ const oklch = toOklch(parsed)
83
+ return {
84
+ mode: 'oklch',
85
+ l: oklch.l ?? 0,
86
+ c: oklch.c ?? 0,
87
+ h: oklch.h ?? 0,
88
+ }
89
+ }
90
+
91
+ // Recover the seed (hue + chroma) whose brand rung `step` renders as `hex` —
92
+ // the inverse of stepOklch: undo the rung's chroma factor and hue offset.
93
+ // Generation reads only hue + chroma, so lightness is carried through but
94
+ // irrelevant. NOTE: this round-trips losslessly only for rungs whose forward
95
+ // transform stays in sRGB gamut — the cf≈1 rungs (400/500/600). Light/dark
96
+ // rungs clamp on the way out and cannot be inverted exactly, hence the narrow
97
+ // step type.
98
+ export function seedFromBrandStep(hex: string, step: 400 | 500 | 600): OklchColor {
99
+ const seed = seedToOklch(hex)
100
+ const { cf, hOff } = BRAND_SCALE[step]
101
+ return { mode: 'oklch', l: seed.l, c: seed.c / cf, h: seed.h - hOff }
102
+ }
103
+
104
+ function clampedOklch(seed: OklchColor, l: number, cf: number, hue: number = seed.h): OklchColor {
105
+ const clamped = clampChroma({ mode: 'oklch', l, c: seed.c * cf, h: hue }, 'oklch')
106
+ return { mode: 'oklch', l: clamped.l, c: clamped.c, h: clamped.h ?? hue }
107
+ }
108
+
109
+ export function oklchToHex(color: OklchColor): string {
110
+ return formatHex(color)
111
+ }
112
+
113
+ // sRGB string forms matching the ui-tokens convention (rgb / rgba). Applied
114
+ // app tokens use these so they line up exactly with the static palette and the
115
+ // hex swatch previews, instead of round-tripping through the browser's own
116
+ // oklch pipeline (which can quantize a rung differently).
117
+ function rgbChannels(color: OklchColor): [number, number, number] {
118
+ const { r, g, b } = toRgb(color)
119
+ const to255 = (v: number) => Math.round(Math.min(1, Math.max(0, v)) * 255)
120
+ return [to255(r), to255(g), to255(b)]
121
+ }
122
+
123
+ export function oklchToRgb(color: OklchColor): string {
124
+ const [r, g, b] = rgbChannels(color)
125
+ return `rgb(${r}, ${g}, ${b})`
126
+ }
127
+
128
+ export function oklchToRgba(color: OklchColor, alpha: number): string {
129
+ const [r, g, b] = rgbChannels(color)
130
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`
131
+ }
132
+
133
+ // --- Scale generators ---
134
+ // One pair of helpers drives every ramp (brand, neutral, legacy, email): a
135
+ // scale lives in its {l, cf, hOff} table and is applied to the seed here, so
136
+ // there is a single place that turns a table into colors.
137
+
138
+ export function stepOklch(seed: OklchColor, target: ScaleStep): OklchColor {
139
+ return clampedOklch(seed, target.l, target.cf, seed.h + target.hOff)
140
+ }
141
+
142
+ // Object.keys() widens to string[]; the cast restores the table's key type.
143
+ export function scaleToOklch<K extends PropertyKey>(
144
+ seed: OklchColor,
145
+ table: Record<K, ScaleStep>,
146
+ ): Record<K, OklchColor> {
147
+ const out = {} as Record<K, OklchColor>
148
+ for (const key of Object.keys(table) as unknown as K[]) {
149
+ out[key] = stepOklch(seed, table[key])
150
+ }
151
+ return out
152
+ }
153
+
154
+ export function scaleToHex<K extends PropertyKey>(
155
+ seed: OklchColor,
156
+ table: Record<K, ScaleStep>,
157
+ ): Record<K, string> {
158
+ const out = {} as Record<K, string>
159
+ for (const key of Object.keys(table) as unknown as K[]) {
160
+ out[key] = oklchToHex(stepOklch(seed, table[key]))
161
+ }
162
+ return out
163
+ }
164
+
165
+ export const generateBrandOklch = (seed: OklchColor): Record<keyof BrandScale, OklchColor> =>
166
+ scaleToOklch(seed, BRAND_SCALE)
167
+
168
+ export const generateNeutralOklch = (seed: OklchColor): Record<keyof NeutralScale, OklchColor> =>
169
+ scaleToOklch(seed, NEUTRAL_SCALE)
170
+
171
+ export const generateBrandScale = (seed: OklchColor): BrandScale => scaleToHex(seed, BRAND_SCALE)
172
+
173
+ export const generateNeutralScale = (seed: OklchColor): NeutralScale => scaleToHex(seed, NEUTRAL_SCALE)
@@ -0,0 +1,58 @@
1
+ import { scaleToOklch, scaleToHex, type OklchColor } from './colorScale'
2
+
3
+ // --- Legacy OKLCH targets ---
4
+ // Calibrated to reproduce the static legacy palette (--color-livestorm-*,
5
+ // --color-grey-*) exactly at the Livestorm seed (#3073ff). Same l/cf/hOff
6
+ // scheme as colorScale.ts.
7
+
8
+ const LEGACY_BRAND_SCALE = {
9
+ 100: { l: 0.9673, cf: 0.0697, hOff: 7.45 },
10
+ 200: { l: 0.9247, cf: 0.1567, hOff: 5.10 },
11
+ 300: { l: 0.8398, cf: 0.3526, hOff: 3.60 },
12
+ 400: { l: 0.7232, cf: 0.6433, hOff: 3.08 },
13
+ // no 500 in the legacy palette
14
+ 600: { l: 0.5316, cf: 1.1786, hOff: 0.66 },
15
+ 700: { l: 0.4428, cf: 0.9453, hOff: 0.66 },
16
+ 800: { l: 0.3595, cf: 0.8656, hOff: 1.67 },
17
+ } as const
18
+
19
+ const LEGACY_NEUTRAL_SCALE = {
20
+ 100: { l: 0.9759, cf: 0.0132, hOff: 2.00 },
21
+ 200: { l: 0.9469, cf: 0.0269, hOff: -22.72 },
22
+ 300: { l: 0.8605, cf: 0.0702, hOff: -27.13 },
23
+ 600: { l: 0.5258, cf: 0.1230, hOff: -22.05 },
24
+ 700: { l: 0.4634, cf: 0.1139, hOff: -20.73 },
25
+ 900: { l: 0.2831, cf: 0.0610, hOff: -33.07 },
26
+ } as const
27
+
28
+ // --- Types ---
29
+
30
+ type LegacyBrandStep = 100 | 200 | 300 | 400 | 600 | 700 | 800
31
+ type LegacyNeutralStep = 100 | 200 | 300 | 600 | 700 | 900
32
+
33
+ interface LegacyBrandScale {
34
+ 100: string; 200: string; 300: string; 400: string
35
+ 600: string; 700: string; 800: string
36
+ }
37
+
38
+ interface LegacyNeutralScale {
39
+ 100: string; 200: string; 300: string
40
+ 600: string; 700: string; 900: string
41
+ }
42
+
43
+ export const LEGACY_BRAND_STEPS: readonly LegacyBrandStep[] = [100, 200, 300, 400, 600, 700, 800] as const
44
+ export const LEGACY_NEUTRAL_STEPS: readonly LegacyNeutralStep[] = [100, 200, 300, 600, 700, 900] as const
45
+
46
+ // --- Generators ---
47
+
48
+ export const generateLegacyBrandOklch = (seed: OklchColor): Record<LegacyBrandStep, OklchColor> =>
49
+ scaleToOklch(seed, LEGACY_BRAND_SCALE)
50
+
51
+ export const generateLegacyNeutralOklch = (seed: OklchColor): Record<LegacyNeutralStep, OklchColor> =>
52
+ scaleToOklch(seed, LEGACY_NEUTRAL_SCALE)
53
+
54
+ export const generateLegacyBrandScale = (seed: OklchColor): LegacyBrandScale =>
55
+ scaleToHex(seed, LEGACY_BRAND_SCALE)
56
+
57
+ export const generateLegacyNeutralScale = (seed: OklchColor): LegacyNeutralScale =>
58
+ scaleToHex(seed, LEGACY_NEUTRAL_SCALE)
@@ -0,0 +1,33 @@
1
+ import { seedToOklch, generateBrandScale } from './colorScale'
2
+
3
+ const PRESET_COLORS = [
4
+ '#9b6dd7', '#4829c7', '#0b42c3', '#1e7fb8',
5
+ '#1ba8a0', '#0e7a5e', '#2d8c4e', '#5a7a11',
6
+ '#8a7b12', '#b0780e', '#d05a3a', '#a12244',
7
+ '#c41560', '#d436a8', '#9b21c4', '#6321a8',
8
+ ] as const
9
+
10
+ interface PresetSwatch {
11
+ seed: string
12
+ light: string
13
+ dark: string
14
+ }
15
+
16
+ export const presetSwatches: PresetSwatch[] = PRESET_COLORS.map((hex) => {
17
+ const brand = generateBrandScale(seedToOklch(hex))
18
+ return { seed: hex, light: brand[400], dark: brand[600] }
19
+ })
20
+
21
+ export interface BrandedPalette extends PresetSwatch {
22
+ name: string
23
+ }
24
+
25
+ // Branded workspace palettes from the Email Templates V2 figma, mirrored by
26
+ // @livestorm/ui-tokens (supernova: base = Livestorm, customer1/2/3).
27
+ // seed = brand-500, light = brand-400, dark = brand-600.
28
+ export const brandedPalettes: BrandedPalette[] = [
29
+ { name: 'Livestorm', seed: '#3073ff', light: '#76a4ff', dark: '#0b42c3' },
30
+ { name: 'Customer 1', seed: '#d04134', light: '#e5837d', dark: '#9e2114' },
31
+ { name: 'Customer 2', seed: '#1a8290', light: '#29b0c2', dark: '#115d67' },
32
+ { name: 'Customer 3', seed: '#9a51e2', light: '#bd8aef', dark: '#7420c9' },
33
+ ]
@@ -0,0 +1,71 @@
1
+ import {
2
+ seedToOklch,
3
+ generateBrandOklch,
4
+ generateNeutralOklch,
5
+ oklchToRgb,
6
+ oklchToRgba,
7
+ ALPHA_STEPS,
8
+ type OklchColor,
9
+ } from './colorScale'
10
+ import {
11
+ generateLegacyBrandOklch,
12
+ generateLegacyNeutralOklch,
13
+ } from './legacyColorScale'
14
+
15
+ // --- Token generation ---
16
+
17
+ // Emit one CSS var per rung, kebab-casing the scale key so 100 -> "100",
18
+ // lightBg -> "light-bg", darkBg -> "dark-bg".
19
+ function emitScale(map: Record<string, string>, prefix: string, scale: object): void {
20
+ for (const [key, color] of Object.entries(scale)) {
21
+ const suffix = key.replace(/([A-Z])/g, '-$1').toLowerCase()
22
+ map[`${prefix}-${suffix}`] = oklchToRgb(color as OklchColor)
23
+ }
24
+ }
25
+
26
+ export function generateTokenMap(seedHex: string): Record<string, string> {
27
+ const seed = seedToOklch(seedHex)
28
+ const brand = generateBrandOklch(seed)
29
+ const neutral = generateNeutralOklch(seed)
30
+ const map: Record<string, string> = {}
31
+
32
+ emitScale(map, '--color-brand', brand)
33
+ emitScale(map, '--color-neutral', neutral)
34
+ emitScale(map, '--color-livestorm', generateLegacyBrandOklch(seed))
35
+ emitScale(map, '--color-grey', generateLegacyNeutralOklch(seed))
36
+
37
+ // The dark neutral-alpha ramp darkens its base as the alpha grows, matching
38
+ // the static ui-tokens: neutral-800 for 100/200/300/400, neutral-900 for
39
+ // 500/600/700, darkBg for 800/900. A single base leaves the heavier steps a
40
+ // rung too light (the shell alpha-600 overlay shifts on apply), so we pick
41
+ // the base per step. Every other ramp keeps one base across all steps.
42
+ const neutralAlphaDarkBases: OklchColor[] = [
43
+ neutral[800], neutral[800], neutral[800], neutral[800],
44
+ neutral[900], neutral[900], neutral[900],
45
+ neutral.darkBg, neutral.darkBg,
46
+ ]
47
+ const sameBase = (base: OklchColor): OklchColor[] => ALPHA_STEPS.map(() => base)
48
+
49
+ const alphaRamps: Array<{ prefix: string; bases: OklchColor[] }> = [
50
+ { prefix: '--color-brand-alpha-dark', bases: sameBase(brand[600]) },
51
+ { prefix: '--color-brand-alpha-light', bases: sameBase(brand[400]) },
52
+ { prefix: '--color-neutral-alpha-dark', bases: neutralAlphaDarkBases },
53
+ { prefix: '--color-neutral-alpha-light', bases: sameBase(neutral[100]) },
54
+ ]
55
+
56
+ for (const { prefix, bases } of alphaRamps) {
57
+ bases.forEach((base, i) => {
58
+ map[`${prefix}-${(i + 1) * 100}`] = oklchToRgba(base, ALPHA_STEPS[i])
59
+ })
60
+ }
61
+
62
+ return map
63
+ }
64
+
65
+ // --- Public API ---
66
+
67
+ export function generatePrimitiveTokens(seedHex: string, selector = '[data-colors-primitive="dynamic"]'): string {
68
+ const map = generateTokenMap(seedHex)
69
+ const lines = Object.entries(map).map(([prop, val]) => ` ${prop}: ${val};`)
70
+ return `${selector} {\n${lines.join('\n')}\n}`
71
+ }
@@ -0,0 +1,8 @@
1
+ /** Opacity an element is painted with once every ancestor's opacity applies, for browser specs */
2
+ export function effectiveOpacity (target: Element): number {
3
+ let opacity = 1
4
+ for (let el: Element | null = target; el && el !== document.documentElement; el = el.parentElement) {
5
+ opacity *= Number(getComputedStyle(el).opacity)
6
+ }
7
+ return opacity
8
+ }
package/src/utils/i18n.ts CHANGED
@@ -11,13 +11,19 @@ const FALLBACK_BUNDLES: Record<string, Record<string, string>> = {
11
11
  en: {
12
12
  general_close: 'Close',
13
13
  general_dialog_title: 'Dialog',
14
+ 'general_form_multiselect-select-all': 'Select all',
14
15
  'general_misc_copied-text': 'Copied!',
16
+ 'general_table_more-actions': 'More actions',
17
+ 'general_table_select-row': 'Select row',
15
18
  'room_bottom-bar_controls-label_more': 'More',
16
19
  },
17
20
  fr: {
18
21
  general_close: 'Fermer',
19
22
  general_dialog_title: 'Dialog',
23
+ 'general_form_multiselect-select-all': 'Tout sélectionner',
20
24
  'general_misc_copied-text': 'Copié !',
25
+ 'general_table_more-actions': 'Plus d\'actions',
26
+ 'general_table_select-row': 'Sélectionner la ligne',
21
27
  'room_bottom-bar_controls-label_more': 'Plus',
22
28
  },
23
29
  }
@@ -58,4 +58,4 @@ function formatPercentage (value: number | undefined | null, options?: Percentag
58
58
  return result
59
59
  }
60
60
 
61
- export { formatNumber, formatPercentage, preventLessThanZero }
61
+ export { formatNumber, formatPercentage }
@@ -0,0 +1,14 @@
1
+ // `allowJs` does not apply to files resolved inside `node_modules`, so consumers
2
+ // importing this package's sources need declarations for its plain-JS modules.
3
+ import type { Plugin } from 'vue'
4
+ import type { ResponsiveGlobalComponentProperty } from './responsive.types'
5
+
6
+ /**
7
+ * Viewport state shared by the whole app. Lazily created on first use, so
8
+ * components work with no plugin registration: installing the plugin below is
9
+ * only needed to customize the flags or to read `$responsive` in templates.
10
+ */
11
+ export declare function useResponsive (): ResponsiveGlobalComponentProperty
12
+
13
+ declare const responsive: Plugin
14
+ export default responsive
@@ -0,0 +1,9 @@
1
+ /** Computed colour of a token as the cascade resolves it inside `scope`, for browser specs */
2
+ export function tokenColor (name: string, scope: Element = document.body): string {
3
+ const probe = document.createElement('span')
4
+ probe.style.color = `var(${name})`
5
+ scope.append(probe)
6
+ const color = getComputedStyle(probe).color
7
+ probe.remove()
8
+ return color
9
+ }