@livestorm/ui-vue 1.1.2 → 2.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 (399) hide show
  1. package/README.md +164 -32
  2. package/components-vite.js +5 -5
  3. package/components.d.ts +3 -3
  4. package/dist/UiTimelineItem.vue_vue_type_style_index_0_lang-DOLFRKcb.mjs +5565 -0
  5. package/dist/a11y-DIdrv5Mn.mjs +66 -0
  6. package/dist/breakpoints.mjs +9 -0
  7. package/dist/bus.mjs +5 -0
  8. package/dist/components.mjs +213 -1550
  9. package/dist/index.mjs +84 -166
  10. package/dist/integrations.mjs +8 -0
  11. package/dist/layouts.mjs +236 -0
  12. package/dist/responsive.mjs +25 -0
  13. package/dist/slot.mjs +21 -0
  14. package/dist/toastDSV2-wMh-UMzW.mjs +74 -0
  15. package/dist/types/index.d.ts +84 -0
  16. package/dist/types/src/components/Toast/LayoutToasts.vue.d.ts +3 -0
  17. package/dist/types/src/components/Toast/ToastMessage.vue.d.ts +21 -0
  18. package/dist/types/src/components/Toast/toastDSV2.d.ts +102 -0
  19. package/dist/types/src/components/UiActionBar/UiActionBar.vue.d.ts +44 -0
  20. package/dist/types/src/components/UiActionBar/UiActionBarItem.vue.d.ts +47 -0
  21. package/dist/types/src/components/UiActionBar/UiActionBarSeparator.vue.d.ts +3 -0
  22. package/dist/types/src/components/UiActionBar/index.d.ts +4 -0
  23. package/dist/types/src/components/UiActionBar/types.d.ts +14 -0
  24. package/dist/types/src/components/UiAnimatedLogo/UiAnimatedLogo.vue.d.ts +10 -0
  25. package/dist/types/src/components/UiAnimatedLogo/animations-links.d.ts +3 -0
  26. package/dist/types/src/components/UiAvatar/UiAvatar.vue.d.ts +55 -0
  27. package/dist/types/src/components/UiAvatar/index.d.ts +1 -0
  28. package/dist/types/src/components/UiAvatarList/UiAvatarList.vue.d.ts +28 -0
  29. package/dist/types/src/components/UiAvatarList/index.d.ts +1 -0
  30. package/dist/types/src/components/UiBadge/UiBadge.vue.d.ts +47 -0
  31. package/dist/types/src/components/UiBadge/index.d.ts +1 -0
  32. package/dist/types/src/components/UiBanner/UiBanner.vue.d.ts +96 -0
  33. package/dist/types/src/components/UiBanner/index.d.ts +2 -0
  34. package/dist/types/src/components/UiBreadcrumb/UiBreadcrumb.vue.d.ts +15 -0
  35. package/dist/types/src/components/UiBreadcrumb/index.d.ts +2 -0
  36. package/dist/types/src/components/UiButton/UiButton.vue.d.ts +249 -0
  37. package/dist/types/src/components/UiButtonGroup/UiButtonGroup.vue.d.ts +42 -0
  38. package/dist/types/src/components/UiButtonGroup/UiButtonGroupItem.vue.d.ts +21 -0
  39. package/dist/types/src/components/UiButtonGroup/index.d.ts +3 -0
  40. package/dist/types/src/components/UiButtonGroup/types.d.ts +10 -0
  41. package/dist/types/src/components/UiCard/UiCard.vue.d.ts +31 -0
  42. package/dist/types/src/components/UiCarousel/UiCarousel.vue.d.ts +63 -0
  43. package/dist/types/src/components/UiCarousel/index.d.ts +2 -0
  44. package/dist/types/src/components/UiColorField/UiColorField.vue.d.ts +19 -0
  45. package/dist/types/src/components/UiColorField/index.d.ts +2 -0
  46. package/dist/types/src/components/UiColorField/types.d.ts +29 -0
  47. package/dist/types/src/components/UiColorPicker/UiColorPicker.vue.d.ts +35 -0
  48. package/dist/types/src/components/UiColorPicker/index.d.ts +2 -0
  49. package/dist/types/src/components/UiColorPicker/types.d.ts +97 -0
  50. package/dist/types/src/components/UiDialog/MarketplaceHeaderExample.vue.d.ts +28 -0
  51. package/dist/types/src/components/UiDialog/UiDialog.vue.d.ts +18 -0
  52. package/dist/types/src/components/UiDialog/UiDialogClose.vue.d.ts +10 -0
  53. package/dist/types/src/components/UiDialog/UiDialogContent.vue.d.ts +54 -0
  54. package/dist/types/src/components/UiDialog/UiDialogFooter.vue.d.ts +13 -0
  55. package/dist/types/src/components/UiDialog/UiDialogTrigger.vue.d.ts +14 -0
  56. package/dist/types/src/components/UiDialog/index.d.ts +7 -0
  57. package/dist/types/src/components/UiDropdown/UiDropdown.vue.d.ts +42 -0
  58. package/dist/types/src/components/UiDropdown/UiDropdownContent.vue.d.ts +32 -0
  59. package/dist/types/src/components/UiDropdown/UiDropdownItem.vue.d.ts +27 -0
  60. package/dist/types/src/components/UiDropdown/UiDropdownSeparator.vue.d.ts +3 -0
  61. package/dist/types/src/components/UiDropdown/UiDropdownTrigger.vue.d.ts +45 -0
  62. package/dist/types/src/components/UiDropdown/context.d.ts +7 -0
  63. package/dist/types/src/components/UiDropdown/index.d.ts +6 -0
  64. package/dist/types/src/components/UiEmptyState/UiEmptyState.vue.d.ts +29 -0
  65. package/dist/types/src/components/UiFieldWrapper/UiFieldWrapper.vue.d.ts +36 -0
  66. package/dist/types/src/components/UiFieldWrapper/index.d.ts +1 -0
  67. package/dist/types/src/components/UiForm/UiFormField.types.d.ts +22 -0
  68. package/dist/types/src/components/UiForm/UiFormField.vue.d.ts +34 -0
  69. package/dist/types/src/components/UiForm/index.d.ts +3 -0
  70. package/dist/types/src/components/UiHorizontalSeparator/UiHorizontalSeparator.vue.d.ts +6 -0
  71. package/dist/types/src/components/UiInputCheckbox/UiInputCheckbox.vue.d.ts +108 -0
  72. package/dist/types/src/components/UiInputCheckbox/index.d.ts +2 -0
  73. package/dist/types/src/components/UiInputCheckbox/types.d.ts +1 -0
  74. package/dist/types/src/components/UiInputSelect/UiInputSelect.vue.d.ts +66 -0
  75. package/dist/types/src/components/UiInputSelect/index.d.ts +2 -0
  76. package/dist/types/src/components/UiInputSelect/types.d.ts +1 -0
  77. package/dist/types/src/components/UiInputTextarea/UiInputTextarea.vue.d.ts +49 -0
  78. package/dist/types/src/components/UiInputTextarea/index.d.ts +2 -0
  79. package/dist/types/src/components/UiInputTextarea/types.d.ts +1 -0
  80. package/dist/types/src/components/UiLabel/UiLabel.vue.d.ts +17 -0
  81. package/dist/types/src/components/UiList/UiList.vue.d.ts +27 -0
  82. package/dist/types/src/components/UiListItem/UiListItem.vue.d.ts +35 -0
  83. package/dist/types/src/components/UiLoader/UiLoader.vue.d.ts +17 -0
  84. package/dist/types/src/components/UiLogo/UiLogo.vue.d.ts +20 -0
  85. package/dist/types/src/components/UiLogo/variants/PulseVariant.vue.d.ts +3 -0
  86. package/dist/types/src/components/UiLogo/variants/TornadoVariant.vue.d.ts +3 -0
  87. package/dist/types/src/components/UiMenu/UiMenu.vue.d.ts +18 -0
  88. package/dist/types/src/components/UiMenu/UiMenuContent.vue.d.ts +30 -0
  89. package/dist/types/src/components/UiMenu/UiMenuGroup.vue.d.ts +16 -0
  90. package/dist/types/src/components/UiMenu/UiMenuItem.vue.d.ts +18 -0
  91. package/dist/types/src/components/UiMenu/UiMenuLabel.vue.d.ts +13 -0
  92. package/dist/types/src/components/UiMenu/UiMenuSeparator.vue.d.ts +13 -0
  93. package/dist/types/src/components/UiMenu/UiMenuSub.vue.d.ts +18 -0
  94. package/dist/types/src/components/UiMenu/UiMenuSubContent.vue.d.ts +32 -0
  95. package/dist/types/src/components/UiMenu/UiMenuSubTrigger.vue.d.ts +14 -0
  96. package/dist/types/src/components/UiMenu/UiMenuTrigger.vue.d.ts +14 -0
  97. package/dist/types/src/components/UiMenu/index.d.ts +10 -0
  98. package/dist/types/src/components/UiPage/UiPage.vue.d.ts +37 -0
  99. package/dist/types/src/components/UiPageHeader/UiPageHeader.vue.d.ts +33 -0
  100. package/dist/types/src/components/UiPopover/UiPopover.vue.d.ts +18 -0
  101. package/dist/types/src/components/UiPopover/UiPopoverAnchor.vue.d.ts +14 -0
  102. package/dist/types/src/components/UiPopover/UiPopoverContent.vue.d.ts +28 -0
  103. package/dist/types/src/components/UiPopover/UiPopoverTrigger.vue.d.ts +14 -0
  104. package/dist/types/src/components/UiProgress/UiProgress.vue.d.ts +15 -0
  105. package/dist/types/src/components/UiProgress/index.d.ts +2 -0
  106. package/dist/types/src/components/UiProgress/types.d.ts +4 -0
  107. package/dist/types/src/components/UiRoomButton/UiRoomButton.vue.d.ts +29 -0
  108. package/dist/types/src/components/UiShell/UiShell.vue.d.ts +24 -0
  109. package/dist/types/src/components/UiSideMenu/UiSideMenu.vue.d.ts +64 -0
  110. package/dist/types/src/components/UiSideMenu/UiSideMenuBottom.vue.d.ts +7 -0
  111. package/dist/types/src/components/UiSideMenu/UiSideMenuItem.vue.d.ts +53 -0
  112. package/dist/types/src/components/UiSideMenu/UiSideMenuItemContent.vue.d.ts +43 -0
  113. package/dist/types/src/components/UiSideMenu/UiSideMenuTop.vue.d.ts +7 -0
  114. package/dist/types/src/components/UiSideMenu/injection.d.ts +7 -0
  115. package/dist/types/src/components/UiSideMenu/types.d.ts +39 -0
  116. package/dist/types/src/components/UiSideMenu/useLabelHidden.d.ts +2 -0
  117. package/dist/types/src/components/UiSideMenu/useSideMenuLayout.d.ts +7 -0
  118. package/dist/types/src/components/UiStepper/UiStepper.vue.d.ts +18 -0
  119. package/dist/types/src/components/UiStepper/UiStepperDescription.vue.d.ts +14 -0
  120. package/dist/types/src/components/UiStepper/UiStepperIndicator.vue.d.ts +20 -0
  121. package/dist/types/src/components/UiStepper/UiStepperItem.vue.d.ts +19 -0
  122. package/dist/types/src/components/UiStepper/UiStepperSeparator.vue.d.ts +10 -0
  123. package/dist/types/src/components/UiStepper/UiStepperTitle.vue.d.ts +14 -0
  124. package/dist/types/src/components/UiStepper/index.d.ts +7 -0
  125. package/dist/types/src/components/UiTable/UiTable.vue.d.ts +20 -0
  126. package/dist/types/src/components/UiTable/UiTableBody.vue.d.ts +13 -0
  127. package/dist/types/src/components/UiTable/UiTableCell.vue.d.ts +13 -0
  128. package/dist/types/src/components/UiTable/UiTableHeader.vue.d.ts +13 -0
  129. package/dist/types/src/components/UiTable/UiTableHeaderCell.vue.d.ts +13 -0
  130. package/dist/types/src/components/UiTable/UiTableRow.vue.d.ts +16 -0
  131. package/dist/types/src/components/UiTable/index.d.ts +6 -0
  132. package/dist/types/src/components/UiTabs/UiTabs.vue.d.ts +37 -0
  133. package/dist/types/src/components/UiTabs/index.d.ts +2 -0
  134. package/dist/types/src/components/UiTag/UiTag.vue.d.ts +43 -0
  135. package/dist/types/src/components/UiTag/index.d.ts +1 -0
  136. package/dist/types/src/components/UiTextField/UiTextField.vue.d.ts +65 -0
  137. package/dist/types/src/components/UiTextField/index.d.ts +2 -0
  138. package/dist/types/src/components/UiTextField/types.d.ts +2 -0
  139. package/dist/types/src/components/UiTimeline/UiTimeline.vue.d.ts +19 -0
  140. package/dist/types/src/components/UiTimeline/UiTimelineItem.vue.d.ts +28 -0
  141. package/dist/types/src/components/UiTimeline/index.d.ts +2 -0
  142. package/dist/types/src/components/UiTooltip/UiTooltip.vue.d.ts +18 -0
  143. package/dist/types/src/components/UiTooltip/UiTooltipContent.vue.d.ts +54 -0
  144. package/dist/types/src/components/UiTooltip/UiTooltipProvider.vue.d.ts +17 -0
  145. package/dist/types/src/components/UiTooltip/UiTooltipTrigger.vue.d.ts +14 -0
  146. package/dist/types/src/components/UiTooltip/index.d.ts +4 -0
  147. package/dist/types/src/composables/useButtonStyles.d.ts +20 -0
  148. package/dist/types/src/composables/useMobileMenu.d.ts +11 -0
  149. package/dist/types/src/composables/useThemeAndModes.d.ts +34 -0
  150. package/dist/types/src/constants/index.d.ts +2 -0
  151. package/dist/types/src/constants/sizes.d.ts +2 -0
  152. package/dist/types/src/constants/themes.d.ts +22 -0
  153. package/dist/types/src/integrations/index.d.ts +1 -0
  154. package/dist/types/src/layouts/index.d.ts +2 -0
  155. package/dist/types/src/mixins/DynamicAction.d.ts +30 -0
  156. package/dist/types/src/primitives.d.ts +6 -0
  157. package/dist/types/src/theme.d.ts +1 -0
  158. package/dist/types/src/utils/a11y.d.ts +2 -0
  159. package/dist/types/src/utils/breakpoints.d.ts +9 -0
  160. package/dist/types/src/utils/bus.d.ts +2 -0
  161. package/dist/types/src/utils/clipboard.d.ts +4 -0
  162. package/dist/types/src/utils/devices.d.ts +19 -0
  163. package/dist/types/src/utils/elements.d.ts +1 -0
  164. package/dist/types/src/utils/index.d.ts +9 -0
  165. package/dist/types/src/utils/numbers.d.ts +30 -0
  166. package/dist/types/src/utils/responsive.d.ts +5 -0
  167. package/dist/types/src/utils/responsive.types.d.ts +12 -0
  168. package/dist/types/src/utils/router.d.ts +1 -0
  169. package/dist/types/src/utils/slot.d.ts +8 -0
  170. package/dist/types/src/utils/stack-view.d.ts +10 -0
  171. package/dist/types/src/utils/uid.d.ts +1 -0
  172. package/dist/types/style.d.ts +1 -0
  173. package/dist/ui-vue.css +1 -0
  174. package/dist/useThemeAndModes-DY5SDC0a.mjs +109 -0
  175. package/dist/utils.mjs +111 -0
  176. package/index.d.ts +88 -2
  177. package/index.js +169 -16
  178. package/integrations.d.ts +10 -0
  179. package/package.json +127 -58
  180. package/src/components/Toast/LayoutToasts.vue +63 -0
  181. package/src/components/Toast/ToastMessage.vue +208 -0
  182. package/src/components/Toast/toastDSV2.ts +151 -0
  183. package/src/components/UiActionBar/UiActionBar.vue +86 -0
  184. package/src/components/UiActionBar/UiActionBarItem.vue +179 -0
  185. package/src/components/UiActionBar/UiActionBarSeparator.vue +18 -0
  186. package/src/components/UiActionBar/index.ts +4 -0
  187. package/src/components/UiActionBar/types.ts +24 -0
  188. package/src/components/UiAnimatedLogo/UiAnimatedLogo.vue +47 -0
  189. package/src/components/UiAnimatedLogo/animations-links.ts +6 -0
  190. package/src/components/UiAvatar/UiAvatar.vue +186 -0
  191. package/src/components/UiAvatar/index.js +1 -0
  192. package/src/components/UiAvatarList/UiAvatarList.vue +109 -0
  193. package/src/components/UiAvatarList/index.js +1 -0
  194. package/src/components/UiBadge/UiBadge.vue +161 -0
  195. package/src/components/UiBadge/index.ts +2 -0
  196. package/src/components/UiBanner/UiBanner.vue +363 -0
  197. package/src/components/UiBanner/index.ts +2 -0
  198. package/src/components/UiBreadcrumb/UiBreadcrumb.vue +93 -0
  199. package/src/components/UiBreadcrumb/index.ts +2 -0
  200. package/src/components/UiButton/UiButton.vue +319 -0
  201. package/src/components/UiButtonGroup/UiButtonGroup.vue +198 -0
  202. package/src/components/UiButtonGroup/UiButtonGroupItem.vue +123 -0
  203. package/src/components/UiButtonGroup/index.ts +3 -0
  204. package/src/components/UiButtonGroup/types.ts +24 -0
  205. package/src/components/UiCard/UiCard.vue +112 -0
  206. package/src/components/UiCarousel/UiCarousel.vue +215 -0
  207. package/src/components/UiCarousel/index.ts +2 -0
  208. package/src/components/UiColorField/UiColorField.vue +158 -0
  209. package/src/components/UiColorField/index.ts +2 -0
  210. package/src/components/UiColorField/types.ts +30 -0
  211. package/src/components/UiColorPicker/UiColorPicker.vue +487 -0
  212. package/src/components/UiColorPicker/index.ts +2 -0
  213. package/src/components/UiColorPicker/types.ts +103 -0
  214. package/src/components/UiDialog/MarketplaceHeaderExample.vue +217 -0
  215. package/src/components/UiDialog/UiDialog.md +97 -0
  216. package/src/components/UiDialog/UiDialog.vue +16 -0
  217. package/src/components/UiDialog/UiDialogClose.vue +29 -0
  218. package/src/components/UiDialog/UiDialogContent.vue +238 -0
  219. package/src/components/UiDialog/UiDialogFooter.vue +9 -0
  220. package/src/components/UiDialog/UiDialogTrigger.vue +12 -0
  221. package/src/components/UiDialog/index.ts +18 -0
  222. package/src/components/UiDropdown/UiDropdown.vue +48 -0
  223. package/src/components/UiDropdown/UiDropdownContent.vue +72 -0
  224. package/src/components/UiDropdown/UiDropdownItem.vue +75 -0
  225. package/src/components/UiDropdown/UiDropdownSeparator.vue +7 -0
  226. package/src/components/UiDropdown/UiDropdownTrigger.vue +239 -0
  227. package/src/components/UiDropdown/context.ts +9 -0
  228. package/src/components/UiDropdown/index.ts +21 -0
  229. package/src/components/UiEmptyState/UiEmptyState.vue +80 -0
  230. package/src/components/UiFieldWrapper/UiFieldWrapper.vue +79 -0
  231. package/src/components/UiFieldWrapper/index.ts +1 -0
  232. package/src/components/UiForm/UiFormField.types.ts +24 -0
  233. package/src/components/UiForm/UiFormField.vue +66 -0
  234. package/src/components/UiForm/index.ts +3 -0
  235. package/src/components/UiHorizontalSeparator/UiHorizontalSeparator.vue +28 -0
  236. package/src/components/UiInputCheckbox/UiInputCheckbox.vue +477 -0
  237. package/src/components/UiInputCheckbox/index.ts +2 -0
  238. package/src/components/UiInputCheckbox/types.ts +1 -0
  239. package/src/components/UiInputSelect/UiInputSelect.vue +166 -0
  240. package/src/components/UiInputSelect/index.ts +2 -0
  241. package/src/components/UiInputSelect/types.ts +1 -0
  242. package/src/components/UiInputTextarea/UiInputTextarea.vue +219 -0
  243. package/src/components/UiInputTextarea/index.ts +2 -0
  244. package/src/components/UiInputTextarea/types.ts +1 -0
  245. package/src/components/UiLabel/UiLabel.vue +34 -0
  246. package/src/components/UiList/UiList.vue +45 -0
  247. package/src/components/UiListItem/UiListItem.vue +108 -0
  248. package/src/components/UiLoader/UiLoader.vue +45 -0
  249. package/src/components/UiLogo/UiLogo.vue +99 -0
  250. package/src/components/UiLogo/variants/PulseVariant.vue +51 -0
  251. package/src/components/UiLogo/variants/TornadoVariant.vue +147 -0
  252. package/src/components/UiMenu/UiMenu.vue +15 -0
  253. package/src/components/UiMenu/UiMenuContent.vue +25 -0
  254. package/src/components/UiMenu/UiMenuGroup.vue +19 -0
  255. package/src/components/UiMenu/UiMenuItem.vue +18 -0
  256. package/src/components/UiMenu/UiMenuLabel.vue +9 -0
  257. package/src/components/UiMenu/UiMenuSeparator.vue +9 -0
  258. package/src/components/UiMenu/UiMenuSub.vue +15 -0
  259. package/src/components/UiMenu/UiMenuSubContent.vue +23 -0
  260. package/src/components/UiMenu/UiMenuSubTrigger.vue +17 -0
  261. package/src/components/UiMenu/UiMenuTrigger.vue +13 -0
  262. package/src/components/UiMenu/index.ts +10 -0
  263. package/src/components/UiPage/UiPage.vue +201 -0
  264. package/src/components/UiPageHeader/UiPageHeader.vue +128 -0
  265. package/src/components/UiPopover/UiPopover.vue +16 -0
  266. package/src/components/UiPopover/UiPopoverAnchor.vue +12 -0
  267. package/src/components/UiPopover/UiPopoverContent.vue +26 -0
  268. package/src/components/UiPopover/UiPopoverTrigger.vue +19 -0
  269. package/src/components/UiProgress/UiProgress.vue +92 -0
  270. package/src/components/UiProgress/index.ts +2 -0
  271. package/src/components/UiProgress/types.ts +5 -0
  272. package/src/components/UiRoomButton/UiRoomButton.vue +240 -0
  273. package/src/components/UiShell/UiShell.vue +88 -0
  274. package/src/components/UiSideMenu/UiSideMenu.vue +513 -0
  275. package/src/components/UiSideMenu/UiSideMenuBottom.vue +27 -0
  276. package/src/components/UiSideMenu/UiSideMenuItem.vue +102 -0
  277. package/src/components/UiSideMenu/UiSideMenuItemContent.vue +172 -0
  278. package/src/components/UiSideMenu/UiSideMenuTop.vue +29 -0
  279. package/src/components/UiSideMenu/injection.ts +9 -0
  280. package/src/components/UiSideMenu/types.ts +41 -0
  281. package/src/components/UiSideMenu/useLabelHidden.ts +33 -0
  282. package/src/components/UiSideMenu/useSideMenuLayout.ts +12 -0
  283. package/src/components/UiStepper/UiStepper.vue +40 -0
  284. package/src/components/UiStepper/UiStepperDescription.vue +27 -0
  285. package/src/components/UiStepper/UiStepperIndicator.vue +93 -0
  286. package/src/components/UiStepper/UiStepperItem.vue +30 -0
  287. package/src/components/UiStepper/UiStepperSeparator.vue +49 -0
  288. package/src/components/UiStepper/UiStepperTitle.vue +24 -0
  289. package/src/components/UiStepper/index.ts +17 -0
  290. package/src/components/UiTable/UiTable.vue +24 -0
  291. package/src/components/UiTable/UiTableBody.vue +5 -0
  292. package/src/components/UiTable/UiTableCell.vue +26 -0
  293. package/src/components/UiTable/UiTableHeader.vue +17 -0
  294. package/src/components/UiTable/UiTableHeaderCell.vue +19 -0
  295. package/src/components/UiTable/UiTableRow.vue +27 -0
  296. package/src/components/UiTable/index.ts +6 -0
  297. package/src/components/UiTabs/UiTabs.vue +218 -0
  298. package/src/components/UiTabs/index.ts +5 -0
  299. package/src/components/UiTag/UiTag.vue +187 -0
  300. package/src/components/UiTag/index.js +1 -0
  301. package/src/components/UiTextField/UiTextField.vue +370 -0
  302. package/src/components/UiTextField/index.ts +2 -0
  303. package/src/components/UiTextField/types.ts +2 -0
  304. package/src/components/UiTimeline/README.md +169 -0
  305. package/src/components/UiTimeline/UiTimeline.vue +58 -0
  306. package/src/components/UiTimeline/UiTimelineItem.vue +141 -0
  307. package/src/components/UiTimeline/index.ts +2 -0
  308. package/src/components/UiTooltip/UiTooltip.vue +16 -0
  309. package/src/components/UiTooltip/UiTooltipContent.vue +86 -0
  310. package/src/components/UiTooltip/UiTooltipProvider.vue +15 -0
  311. package/src/components/UiTooltip/UiTooltipTrigger.vue +19 -0
  312. package/src/components/UiTooltip/index.js +4 -0
  313. package/src/composables/useButtonStyles.ts +242 -0
  314. package/src/composables/useMobileMenu.ts +57 -0
  315. package/src/composables/useThemeAndModes.ts +225 -0
  316. package/src/constants/index.ts +2 -0
  317. package/src/constants/sizes.ts +2 -0
  318. package/src/constants/themes.ts +34 -0
  319. package/src/css/{body.postcss → body.css} +3 -2
  320. package/src/css/reka-animations.css +209 -0
  321. package/src/css/{transitions.postcss → transitions.css} +12 -5
  322. package/src/global.d.ts +181 -0
  323. package/src/integrations/index.js +1 -0
  324. package/src/layouts/index.js +5 -0
  325. package/src/mixins/DynamicAction.js +5 -3
  326. package/src/primitives.ts +6 -0
  327. package/src/theme.ts +1 -0
  328. package/src/utils/a11y.ts +8 -0
  329. package/src/utils/{breakpoints.js → breakpoints.ts} +1 -0
  330. package/src/utils/clipboard.js +2 -2
  331. package/src/utils/devices.js +0 -3
  332. package/src/utils/index.js +2 -1
  333. package/src/utils/numbers.ts +61 -0
  334. package/src/utils/responsive.types.ts +12 -0
  335. package/src/utils/{slot.js → slot.ts} +18 -1
  336. package/style.js +3 -12
  337. package/theme.d.ts +1 -0
  338. package/.env +0 -1
  339. package/.eslintignore +0 -4
  340. package/.eslintrc.js +0 -47
  341. package/.pkg +0 -11
  342. package/babel.config.js +0 -5
  343. package/build/Dockerfile +0 -31
  344. package/ci/ci.yml +0 -54
  345. package/components-webpack.js +0 -29
  346. package/dist/environment-e70e5768.mjs +0 -1664
  347. package/dist/style.css +0 -1
  348. package/plugins.js +0 -17
  349. package/postcss.config.js +0 -1
  350. package/src/components/BaseAutocomplete/BaseAutocomplete.spec.js +0 -506
  351. package/src/components/BaseAutocomplete/BaseAutocomplete.stories.js +0 -184
  352. package/src/components/BaseAutocomplete/BaseAutocomplete.vue +0 -431
  353. package/src/components/BaseBanner/BaseBanner.spec.js +0 -32
  354. package/src/components/BaseBanner/BaseBanner.stories.js +0 -133
  355. package/src/components/BaseBanner/BaseBanner.vue +0 -229
  356. package/src/components/BaseButton/BaseButton.spec.js +0 -98
  357. package/src/components/BaseButton/BaseButton.stories.js +0 -291
  358. package/src/components/BaseButton/BaseButton.vue +0 -193
  359. package/src/components/BaseButton/__snapshots__/BaseButton.spec.js.snap +0 -37
  360. package/src/components/BaseButton/__snapshots__/BaseButton.spec.js.snap.old +0 -31
  361. package/src/components/BaseCheckbox/BaseCheckbox.stories.js +0 -82
  362. package/src/components/BaseCheckbox/BaseCheckbox.vue +0 -161
  363. package/src/components/BaseDropdownMenu/BaseDropdownMenu.stories.js +0 -84
  364. package/src/components/BaseDropdownMenu/BaseDropdownMenu.vue +0 -251
  365. package/src/components/BaseDropdownMenu/BaseDropdownMenuButton.vue +0 -26
  366. package/src/components/BaseDropdownMenu/BaseDropdownMenuDivider.vue +0 -10
  367. package/src/components/BaseDropdownMenu/BaseDropdownMenuItem.vue +0 -206
  368. package/src/components/BaseDropdownMenu/BaseDropdownMenuSearch.vue +0 -49
  369. package/src/components/BaseDropdownMenu/BaseDropdownMenuTitle.vue +0 -26
  370. package/src/components/BaseModal/BaseModal.stories.js +0 -143
  371. package/src/components/BaseModal/BaseModal.vue +0 -187
  372. package/src/components/BaseModal/BaseModalContent.vue +0 -164
  373. package/src/components/BaseModal/BaseModalContentOld.vue +0 -242
  374. package/src/components/BaseRating/BaseRating.spec.js +0 -46
  375. package/src/components/BaseRating/BaseRating.stories.js +0 -46
  376. package/src/components/BaseRating/BaseRating.vue +0 -119
  377. package/src/components/BaseSelect/BaseSelect.stories.js +0 -177
  378. package/src/components/BaseSelect/BaseSelect.vue +0 -443
  379. package/src/components/BaseSelect/BaseSelectGroup.vue +0 -34
  380. package/src/components/BaseSelect/BaseSelectOption.vue +0 -219
  381. package/src/components/BaseSwitch/BaseSwitch.stories.js +0 -44
  382. package/src/components/BaseSwitch/BaseSwitch.vue +0 -114
  383. package/src/components/BaseTag/BaseTag.stories.js +0 -123
  384. package/src/components/BaseTag/BaseTag.vue +0 -244
  385. package/src/css/button.postcss +0 -354
  386. package/src/css/checkbox-radio.postcss +0 -152
  387. package/src/css/icon.postcss +0 -9
  388. package/src/css/loader.postcss +0 -120
  389. package/src/css/popper.postcss +0 -143
  390. package/src/css/tailwind-utilities.postcss +0 -1
  391. package/src/css/tailwind.postcss +0 -2
  392. package/style-postcss.d.ts +0 -3
  393. package/style-postcss.js +0 -2
  394. package/tailwind.config.base.cjs +0 -88
  395. package/tailwind.config.js +0 -9
  396. package/tsconfig.check.json +0 -13
  397. package/tsconfig.json +0 -66
  398. package/vite.config.js +0 -43
  399. package/vitest.setup.js +0 -26
@@ -0,0 +1,18 @@
1
+ <script setup lang="ts">
2
+ import { computed, inject } from 'vue'
3
+ import { ACTION_BAR_CONTEXT_KEY } from './types'
4
+
5
+ const ctx = inject(ACTION_BAR_CONTEXT_KEY, null)
6
+ const isVertical = computed(() => ctx?.orientation.value === 'vertical')
7
+ </script>
8
+
9
+ <template>
10
+ <div
11
+ role="separator"
12
+ :aria-orientation="isVertical ? 'horizontal' : 'vertical'"
13
+ data-testid="ui-action-bar-separator"
14
+ aria-hidden="true"
15
+ class="shrink-0 bg-borders-neutral-light"
16
+ :class="isVertical ? 'h-px w-full my-0.5' : 'w-px h-5 mx-0.5 self-center'"
17
+ />
18
+ </template>
@@ -0,0 +1,4 @@
1
+ export { default as UiActionBar } from './UiActionBar.vue'
2
+ export { default as UiActionBarItem } from './UiActionBarItem.vue'
3
+ export { default as UiActionBarSeparator } from './UiActionBarSeparator.vue'
4
+ export type { ActionBarOrientation, ActionBarSize } from './types'
@@ -0,0 +1,24 @@
1
+ import type { ComputedRef, InjectionKey } from 'vue'
2
+
3
+ export type ActionBarOrientation = 'horizontal' | 'vertical'
4
+ export type ActionBarSize = 'sm' | 'md'
5
+ export type ActionBarPosition =
6
+ | 'top-left'
7
+ | 'top-right'
8
+ | 'center-left'
9
+ | 'center-right'
10
+ | 'bottom-left'
11
+ | 'bottom-right'
12
+
13
+ export interface ActionBarContext {
14
+ orientation: ComputedRef<ActionBarOrientation>
15
+ size: ComputedRef<ActionBarSize>
16
+ }
17
+
18
+ /**
19
+ * Injected by UiActionBar so child items and separators can adapt their
20
+ * layout (icon size, hover-tooltip side, separator direction) without the
21
+ * consumer threading props down manually.
22
+ */
23
+ export const ACTION_BAR_CONTEXT_KEY: InjectionKey<ActionBarContext> =
24
+ Symbol('ui-action-bar-context')
@@ -0,0 +1,47 @@
1
+ <script lang="ts" setup>
2
+ import { computed } from "vue";
3
+ import { DotLottieVue } from "@lottiefiles/dotlottie-vue";
4
+ import {
5
+ LIVESTORM_ANIMATED_LOGO_TORNADO_URL,
6
+ LIVESTORM_ANIMATED_LOGO_STAIR_URL,
7
+ LIVESTORM_ANIMATED_LOGO_STREAMING_URL,
8
+ } from "./animations-links";
9
+
10
+ type AnimatedLogo = "tornado" | "stair" | "streaming";
11
+
12
+ interface Props {
13
+ animatedLogo: AnimatedLogo;
14
+ loop?: boolean;
15
+ height: number;
16
+ width: number;
17
+ }
18
+
19
+ const props = defineProps<Props>();
20
+
21
+ const animatedLogoUrl = computed(() => {
22
+ switch (props.animatedLogo) {
23
+ case "tornado":
24
+ return LIVESTORM_ANIMATED_LOGO_TORNADO_URL;
25
+ case "stair":
26
+ return LIVESTORM_ANIMATED_LOGO_STAIR_URL;
27
+ case "streaming":
28
+ return LIVESTORM_ANIMATED_LOGO_STREAMING_URL;
29
+ default:
30
+ return "";
31
+ }
32
+ });
33
+ </script>
34
+
35
+ <template>
36
+ <div class="ui-logo-loader">
37
+ <DotLottieVue
38
+ :style="{
39
+ height: props.height + 'rem',
40
+ width: props.width + 'rem',
41
+ }"
42
+ autoplay
43
+ :loop="props.loop"
44
+ :src="animatedLogoUrl"
45
+ />
46
+ </div>
47
+ </template>
@@ -0,0 +1,6 @@
1
+ export const LIVESTORM_ANIMATED_LOGO_TORNADO_URL =
2
+ "https://lottie.host/ba46e3f4-5e79-4762-9c20-405348ee3387/zHDFDAAD5F.lottie";
3
+ export const LIVESTORM_ANIMATED_LOGO_STAIR_URL =
4
+ "https://lottie.host/81c2307c-1cbd-4594-b978-fd5eaf342bf6/4XKfuEedla.lottie";
5
+ export const LIVESTORM_ANIMATED_LOGO_STREAMING_URL =
6
+ "https://lottie.host/d1427490-2228-4dc4-94e9-bf73a4851b3f/eAMtMNYScd.lottie";
@@ -0,0 +1,186 @@
1
+ <template>
2
+ <span
3
+ :class="rootClasses"
4
+ :style="hasBadge ? undefined : customStyle"
5
+ :data-size="size"
6
+ :data-variant="variant"
7
+ >
8
+ <span
9
+ :class="surfaceClasses"
10
+ :style="hasBadge ? customStyle : undefined"
11
+ >
12
+ <img
13
+ v-if="src && !imageFailed"
14
+ :src="src"
15
+ :alt="alt ?? fullName"
16
+ class="w-full h-full object-cover"
17
+ @error="imageFailed = true"
18
+ >
19
+ <span
20
+ v-else-if="initials"
21
+ class="px-0.5 overflow-hidden text-ellipsis whitespace-nowrap"
22
+ data-recording-sensitive
23
+ >
24
+ {{ initials }}
25
+ </span>
26
+ <span
27
+ v-else
28
+ :class="[icon, iconSizeClass]"
29
+ />
30
+ </span>
31
+ <slot
32
+ v-if="hasBadge"
33
+ name="badge"
34
+ />
35
+ </span>
36
+ </template>
37
+
38
+ <script setup lang="ts">
39
+ import { computed, ref, useSlots, watch } from 'vue'
40
+
41
+ interface Props {
42
+ /** Image URL. Initials are shown when missing or when the image fails to load. */
43
+ src?: string | null
44
+ firstName?: string | null
45
+ lastName?: string | null
46
+ /** Custom text rendered instead of initials (e.g. `+4` for overflow chips). */
47
+ customText?: string | null
48
+ /**
49
+ * Avatar size. Maps to the `--spacing-component-*` tokens:
50
+ * `xs` 24, `sm` 32, `md` 40, `lg` 48, `xl` 64, `10xl` 128.
51
+ */
52
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '10xl'
53
+ /**
54
+ * `default` is light-on-dark (used standalone or inside an avatar list);
55
+ * `more` is the light-grey `+N` chip used by `UiAvatarList` overflow.
56
+ */
57
+ variant?: 'default' | 'more'
58
+ /** Optional `<img>` alt — falls back to the full name. */
59
+ alt?: string
60
+ /**
61
+ * Custom background color (hex or any CSS color). Used for initials
62
+ * avatars when the backend stores a per-user color (legacy
63
+ * `BaseUserAvatar` parity). Ignored when `src` resolves or when the
64
+ * `more` variant is used.
65
+ */
66
+ color?: string | null
67
+ /**
68
+ * Icon class shown when there is no image and no name to derive
69
+ * initials from. Accepts any `i-ls-*` UnoCSS icon name.
70
+ */
71
+ icon?: string
72
+ }
73
+
74
+ const props = withDefaults(defineProps<Props>(), {
75
+ src: null,
76
+ firstName: null,
77
+ lastName: null,
78
+ customText: null,
79
+ size: 'md',
80
+ variant: 'default',
81
+ alt: undefined,
82
+ color: null,
83
+ icon: 'i-ls-user-fill',
84
+ })
85
+
86
+ const customStyle = computed(() => {
87
+ // Custom color only applies to the initials/icon state. When an image
88
+ // resolves it covers the background, and the `more` variant uses its own
89
+ // light-grey background.
90
+ if (props.variant === 'more') return undefined
91
+ if (props.src && !imageFailed.value) return undefined
92
+ if (!props.color) return undefined
93
+ return { backgroundColor: props.color }
94
+ })
95
+
96
+ const imageFailed = ref(false)
97
+ watch(() => props.src, () => { imageFailed.value = false })
98
+
99
+ const initials = computed(() => {
100
+ if (props.customText) return props.customText
101
+ const f = props.firstName?.trim()?.[0] ?? ''
102
+ const l = props.lastName?.trim()?.[0] ?? ''
103
+ return (f + l).toUpperCase() || null
104
+ })
105
+
106
+ const fullName = computed(() => `${props.firstName ?? ''} ${props.lastName ?? ''}`.trim())
107
+
108
+ // Pixel sizes match the `--spacing-component-*` tokens; font sizes pick the
109
+ // closest typography token for each diameter so we stay aligned with the
110
+ // design system instead of using raw Tailwind text scales.
111
+ const sizeClasses = computed(() => {
112
+ switch (props.size) {
113
+ case 'sm':
114
+ return 'w-8 h-8 text-content-legends-bold-md'
115
+ case 'md':
116
+ return 'w-10 h-10 text-content-text-md-bold'
117
+ case 'lg':
118
+ return 'w-12 h-12 text-content-text-lg-bold'
119
+ case 'xl':
120
+ return 'w-16 h-16 text-title-md-bold'
121
+ case '10xl':
122
+ return 'w-32 h-32 text-title-lg-bold'
123
+ case 'xs':
124
+ default:
125
+ return 'w-6 h-6 text-content-badges-bold-md'
126
+ }
127
+ })
128
+
129
+ // Match the icon to the text size at each avatar size so the fallback glyph
130
+ // reads at the same optical weight as the initials it replaces.
131
+ // xs=10px, sm=12px, md=14px, lg=16px, xl=24px, 10xl=32px.
132
+ const iconSizeClass = computed(() => {
133
+ switch (props.size) {
134
+ case 'sm':
135
+ return 'w-3 h-3'
136
+ case 'md':
137
+ return 'w-3.5 h-3.5'
138
+ case 'lg':
139
+ return 'w-4 h-4'
140
+ case 'xl':
141
+ return 'w-6 h-6'
142
+ case '10xl':
143
+ return 'w-8 h-8'
144
+ case 'xs':
145
+ default:
146
+ return 'w-2.5 h-2.5'
147
+ }
148
+ })
149
+
150
+ const variantClasses = computed(() => {
151
+ switch (props.variant) {
152
+ case 'more':
153
+ return 'bg-surface-neutral-100 text-text-neutral-base'
154
+ case 'default':
155
+ default:
156
+ return 'bg-surface-neutral-invert-bg-main text-text-neutral-invert-base'
157
+ }
158
+ })
159
+
160
+ // A `badge` slot opts the avatar into a `relative` root (so the corner badge
161
+ // can overflow) and moves the circular clip + background to an inner surface.
162
+ const slots = useSlots()
163
+ const hasBadge = computed(() => !!slots.badge)
164
+
165
+ // Root element classes. Without a badge the root is the clipped circle itself
166
+ // (identical to the original markup, so `UiAvatarList` is unaffected). With a
167
+ // badge the root only positions; the clip lives on the surface below.
168
+ const rootClasses = computed(() =>
169
+ hasBadge.value
170
+ ? ['ui-avatar relative inline-flex shrink-0', sizeClasses.value]
171
+ : [
172
+ 'ui-avatar inline-flex items-center justify-center shrink-0 rounded-full overflow-hidden text-center',
173
+ sizeClasses.value,
174
+ variantClasses.value,
175
+ ],
176
+ )
177
+
178
+ // Inner surface. `contents` when there's no badge (the element vanishes from
179
+ // layout, leaving the root as the only box). When badged it becomes the
180
+ // clipped, background-painted circle filling the root.
181
+ const surfaceClasses = computed(() =>
182
+ hasBadge.value
183
+ ? ['inline-flex items-center justify-center w-full h-full rounded-full overflow-hidden text-center', variantClasses.value]
184
+ : 'contents',
185
+ )
186
+ </script>
@@ -0,0 +1 @@
1
+ export { default } from './UiAvatar.vue'
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <div
3
+ :class="['ui-avatar-list inline-flex items-center', containerPaddingClass]"
4
+ :data-size="size"
5
+ >
6
+ <div
7
+ v-for="(item, idx) in visibleItems"
8
+ :key="item.id ?? idx"
9
+ :class="['flex border border-actions-neutral-invert-idle-alpha-strong rounded-full overflow-hidden', overlapClass]"
10
+ >
11
+ <UiAvatar
12
+ :src="item.src"
13
+ :first-name="item.firstName"
14
+ :last-name="item.lastName"
15
+ :color="item.color"
16
+ :size="size"
17
+ />
18
+ </div>
19
+ <div
20
+ v-if="overflowCount > 0"
21
+ :class="['flex border border-actions-neutral-invert-idle-alpha-strong rounded-full overflow-hidden', overlapClass]"
22
+ >
23
+ <UiAvatar
24
+ :custom-text="`+${overflowCount}`"
25
+ :size="size"
26
+ variant="more"
27
+ />
28
+ </div>
29
+ </div>
30
+ </template>
31
+
32
+ <script setup lang="ts">
33
+ import { computed } from 'vue'
34
+ import UiAvatar from '../UiAvatar/UiAvatar.vue'
35
+
36
+ export interface AvatarListItem {
37
+ id?: string | number
38
+ firstName?: string | null
39
+ lastName?: string | null
40
+ src?: string | null
41
+ /** Per-user background color (hex/CSS) used for the initials state. */
42
+ color?: string | null
43
+ }
44
+
45
+ interface Props {
46
+ items: AvatarListItem[]
47
+ /**
48
+ * Total number of items represented by this list. Defaults to `items.length`.
49
+ * Set when `items` is already truncated server-side and you want the overflow
50
+ * count to reflect the true total.
51
+ */
52
+ total?: number | null
53
+ /** Maximum visible avatars before showing the `+N` overflow chip. */
54
+ max?: number
55
+ /** Mirrors `UiAvatar`'s size scale. The overlap scales with the size. */
56
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '10xl'
57
+ }
58
+
59
+ const props = withDefaults(defineProps<Props>(), {
60
+ total: null,
61
+ max: 5,
62
+ size: 'md',
63
+ })
64
+
65
+ const effectiveTotal = computed(() => props.total ?? props.items.length)
66
+
67
+ const visibleItems = computed(() => props.items.slice(0, props.max))
68
+
69
+ const overflowCount = computed(() => Math.max(0, effectiveTotal.value - props.max))
70
+
71
+ // Overlap scales with the avatar diameter so larger sizes don't look
72
+ // disproportionately stacked. The container reserves matching right padding so
73
+ // the rightmost avatar is fully visible.
74
+ const overlapClass = computed(() => {
75
+ switch (props.size) {
76
+ case 'sm':
77
+ return '-mr-2'
78
+ case 'md':
79
+ return '-mr-2.5'
80
+ case 'lg':
81
+ return '-mr-3'
82
+ case 'xl':
83
+ return '-mr-4'
84
+ case '10xl':
85
+ return '-mr-8'
86
+ case 'xs':
87
+ default:
88
+ return '-mr-1.5'
89
+ }
90
+ })
91
+
92
+ const containerPaddingClass = computed(() => {
93
+ switch (props.size) {
94
+ case 'sm':
95
+ return 'pr-2'
96
+ case 'md':
97
+ return 'pr-2.5'
98
+ case 'lg':
99
+ return 'pr-3'
100
+ case 'xl':
101
+ return 'pr-4'
102
+ case '10xl':
103
+ return 'pr-8'
104
+ case 'xs':
105
+ default:
106
+ return 'pr-1.5'
107
+ }
108
+ })
109
+ </script>
@@ -0,0 +1 @@
1
+ export { default } from './UiAvatarList.vue'
@@ -0,0 +1,161 @@
1
+ <template>
2
+ <div
3
+ :class="badgeClasses"
4
+ :data-color="color"
5
+ :data-variant="variant"
6
+ >
7
+ <span
8
+ v-if="count !== undefined"
9
+ >
10
+ {{ displayCount }}
11
+ </span>
12
+ </div>
13
+ </template>
14
+
15
+ <script setup lang="ts">
16
+ import { computed } from 'vue'
17
+
18
+ interface Props {
19
+ /**
20
+ * Optional count to display (if provided, shows number; if not, shows dot indicator)
21
+ */
22
+ count?: number | string
23
+ /**
24
+ * Color variant of the badge
25
+ */
26
+ color?: 'primary' | 'neutral' | 'danger' | 'warning' | 'success'
27
+ /**
28
+ * Visual variant of the badge
29
+ */
30
+ variant?: 'light' | 'strong'
31
+ /**
32
+ * Maximum count to display before showing "+"
33
+ */
34
+ maxCount?: number
35
+ /**
36
+ * Badge size:
37
+ * - `md` (default): standard badge metrics + bold badge type.
38
+ * - `sm`: tighter 12px metrics with a smaller, regular-weight glyph — for
39
+ * single-character indicators (e.g. a role initial).
40
+ */
41
+ size?: 'sm' | 'md'
42
+ /**
43
+ * Force equal width/height (a fixed circle) instead of a pill that grows
44
+ * with its content. Use for single-character indicators that shouldn't
45
+ * stretch. Independent of `size`.
46
+ */
47
+ square?: boolean
48
+ /**
49
+ * Show the `help` cursor on hover. Set this when the consumer attaches a
50
+ * tooltip to the badge (the badge itself doesn't own the tooltip).
51
+ */
52
+ hasTooltip?: boolean
53
+ }
54
+
55
+ const props = withDefaults(defineProps<Props>(), {
56
+ count: undefined,
57
+ color: 'neutral',
58
+ variant: 'light',
59
+ maxCount: 99,
60
+ size: 'md',
61
+ square: false,
62
+ hasTooltip: false,
63
+ })
64
+
65
+ const hasCount = computed(() => props.count !== undefined)
66
+
67
+ const displayCount = computed(() => {
68
+ if (props.count === undefined) return ''
69
+
70
+ const numCount = typeof props.count === 'string' ? parseInt(props.count, 10) : props.count
71
+
72
+ if (isNaN(numCount)) return props.count
73
+ if (numCount > props.maxCount) return `${props.maxCount}+`
74
+
75
+ return String(numCount)
76
+ })
77
+
78
+ const badgeClasses = computed(() => {
79
+ const baseClasses = [
80
+ 'inline-flex',
81
+ 'items-center',
82
+ 'justify-center',
83
+ 'rounded-2xl',
84
+ 'shrink-0',
85
+ // Only hint interactivity when a tooltip is attached by the consumer.
86
+ props.hasTooltip ? 'cursor-help' : 'cursor-default',
87
+ ]
88
+
89
+ // Size classes (only matter when there's a count — the dot indicator is
90
+ // always a fixed 12px circle). `square` forces equal w/h (no growth);
91
+ // otherwise the badge is a pill that grows with its content. `sm` uses
92
+ // tighter 12px metrics, `md` the standard ones.
93
+ const dotClasses = ['w-3', 'h-3']
94
+ const squareCountClasses = props.size === 'sm' ? ['w-3', 'h-3'] : ['w-4', 'h-4']
95
+ const pillCountClasses = props.size === 'sm'
96
+ ? ['min-w-3', 'min-h-3', 'px-1']
97
+ : ['min-w-4', 'min-h-4', 'px-1', 'py-0.5']
98
+ const sizeClasses = hasCount.value
99
+ ? props.square ? squareCountClasses : pillCountClasses
100
+ : dotClasses
101
+
102
+ // Text classes (only for count badges). The `sm` size forces a smaller,
103
+ // regular-weight glyph; `md` keeps the default bold badge type.
104
+ const textClasses = hasCount.value
105
+ ? props.size === 'sm'
106
+ ? ['text-[8px]', 'font-normal', 'leading-none', 'text-center'] // @TODO: apply text style token
107
+ : ['text-content-badges-bold-md', 'text-center']
108
+ : []
109
+
110
+ // Color and variant classes
111
+ const colorVariantClasses = {
112
+ primary: {
113
+ light: hasCount.value
114
+ ? ['bg-surface-primary-alpha-300', 'text-text-primary-base']
115
+ : ['bg-surface-primary-alpha-300'],
116
+ strong: hasCount.value
117
+ ? ['bg-surface-primary-bg-alpha', 'text-text-neutral-invert-base']
118
+ : ['bg-surface-primary-bg-alpha'],
119
+ },
120
+ neutral: {
121
+ light: hasCount.value
122
+ ? ['bg-surface-neutral-alpha-300', 'text-text-neutral-base']
123
+ : ['bg-surface-neutral-alpha-300'],
124
+ strong: hasCount.value
125
+ ? ['bg-surface-neutral-invert-bg-alpha', 'text-text-neutral-invert-base']
126
+ : ['bg-surface-neutral-invert-bg-alpha'],
127
+ },
128
+ danger: {
129
+ light: hasCount.value
130
+ ? ['bg-surface-danger-alpha-300', 'text-text-danger-base']
131
+ : ['bg-surface-danger-alpha-300'],
132
+ strong: hasCount.value
133
+ ? ['bg-surface-danger-bg-alpha', 'text-text-neutral-invert-base']
134
+ : ['bg-surface-danger-bg-alpha'],
135
+ },
136
+ warning: {
137
+ light: hasCount.value
138
+ ? ['bg-surface-warning-alpha-300', 'text-text-warning-base']
139
+ : ['bg-surface-warning-alpha-300'],
140
+ strong: hasCount.value
141
+ ? ['bg-surface-warning-bg-alpha', 'text-text-neutral-invert-base']
142
+ : ['bg-surface-warning-bg-alpha'],
143
+ },
144
+ success: {
145
+ light: hasCount.value
146
+ ? ['bg-surface-success-alpha-300', 'text-text-success-base']
147
+ : ['bg-surface-success-alpha-300'],
148
+ strong: hasCount.value
149
+ ? ['bg-surface-success-bg-alpha', 'text-text-neutral-invert-base']
150
+ : ['bg-surface-success-bg-alpha'],
151
+ },
152
+ }
153
+
154
+ return [
155
+ ...baseClasses,
156
+ ...sizeClasses,
157
+ ...textClasses,
158
+ ...colorVariantClasses[props.color][props.variant],
159
+ ]
160
+ })
161
+ </script>
@@ -0,0 +1,2 @@
1
+ // UiBadge exports
2
+ export { default as UiBadge } from './UiBadge.vue'