@itguy614/clean-ui 0.9.0 → 1.0.1

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 (268) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/clean-ui.css +1 -1
  3. package/dist/components/CuiAccordion.vue.js +7 -0
  4. package/dist/components/CuiAccordion.vue2.js +55 -0
  5. package/dist/components/CuiAccordionItem.vue.js +7 -0
  6. package/dist/components/CuiAccordionItem.vue2.js +91 -0
  7. package/dist/components/CuiAlert.vue.d.ts.map +1 -1
  8. package/dist/components/CuiAlert.vue.js +7 -0
  9. package/dist/components/CuiAlert.vue2.js +113 -0
  10. package/dist/components/CuiAvatar.vue.js +99 -0
  11. package/dist/components/CuiAvatar.vue3.js +5 -0
  12. package/dist/components/CuiAvatarGroup.vue.js +22 -0
  13. package/dist/components/CuiAvatarGroup.vue3.js +5 -0
  14. package/dist/components/CuiBackdrop.vue.js +7 -0
  15. package/dist/components/CuiBackdrop.vue2.js +49 -0
  16. package/dist/components/CuiBadge.vue.d.ts.map +1 -1
  17. package/dist/components/CuiBadge.vue.js +7 -0
  18. package/dist/components/CuiBadge.vue2.js +82 -0
  19. package/dist/components/CuiBanner.vue.js +81 -0
  20. package/dist/components/CuiBanner.vue2.js +4 -0
  21. package/dist/components/CuiBreadcrumb.vue.js +7 -0
  22. package/dist/components/CuiBreadcrumb.vue2.js +29 -0
  23. package/dist/components/CuiBreadcrumbItem.vue.js +7 -0
  24. package/dist/components/CuiBreadcrumbItem.vue2.js +46 -0
  25. package/dist/components/CuiButton.vue.d.ts.map +1 -1
  26. package/dist/components/CuiButton.vue.js +7 -0
  27. package/dist/components/CuiButton.vue2.js +136 -0
  28. package/dist/components/CuiButtonGroup.vue.js +7 -0
  29. package/dist/components/CuiButtonGroup.vue2.js +21 -0
  30. package/dist/components/CuiCard.vue.js +35 -0
  31. package/dist/components/CuiCard.vue2.js +4 -0
  32. package/dist/components/CuiCardBody.vue.js +20 -0
  33. package/dist/components/CuiCardBody.vue2.js +4 -0
  34. package/dist/components/CuiCardFooter.vue.js +32 -0
  35. package/dist/components/CuiCardFooter.vue2.js +4 -0
  36. package/dist/components/CuiCardHeader.vue.js +51 -0
  37. package/dist/components/CuiCardHeader.vue2.js +4 -0
  38. package/dist/components/CuiCardMedia.vue.js +7 -0
  39. package/dist/components/CuiCardMedia.vue2.js +38 -0
  40. package/dist/components/CuiCheckbox.vue.js +7 -0
  41. package/dist/components/CuiCheckbox.vue2.js +105 -0
  42. package/dist/components/CuiCheckboxGroup.vue.js +7 -0
  43. package/dist/components/CuiCheckboxGroup.vue2.js +59 -0
  44. package/dist/components/CuiCodeBlock.vue.js +129 -0
  45. package/dist/components/CuiCodeBlock.vue2.js +4 -0
  46. package/dist/components/CuiColorPicker.vue.js +348 -0
  47. package/dist/components/CuiColorPicker.vue2.js +4 -0
  48. package/dist/components/CuiCombobox.vue.js +332 -0
  49. package/dist/components/CuiCombobox.vue2.js +4 -0
  50. package/dist/components/CuiConfigProvider.vue.js +18 -0
  51. package/dist/components/CuiConfigProvider.vue2.js +4 -0
  52. package/dist/components/CuiConfirmDialog.vue.js +208 -0
  53. package/dist/components/CuiConfirmDialog.vue2.js +4 -0
  54. package/dist/components/CuiContainer.vue.js +35 -0
  55. package/dist/components/CuiContainer.vue2.js +4 -0
  56. package/dist/components/CuiContextMenu.vue.js +7 -0
  57. package/dist/components/CuiContextMenu.vue2.js +136 -0
  58. package/dist/components/CuiCopyButton.vue.js +63 -0
  59. package/dist/components/CuiCopyButton.vue2.js +4 -0
  60. package/dist/components/CuiDataGrid.vue.d.ts +53 -79
  61. package/dist/components/CuiDataGrid.vue.d.ts.map +1 -1
  62. package/dist/components/CuiDataGrid.vue.js +178 -0
  63. package/dist/components/CuiDataGrid.vue3.js +5 -0
  64. package/dist/components/CuiDataGridActiveFilters.vue.js +47 -0
  65. package/dist/components/CuiDataGridActiveFilters.vue3.js +5 -0
  66. package/dist/components/CuiDataGridBulkBar.vue.d.ts.map +1 -1
  67. package/dist/components/CuiDataGridBulkBar.vue.js +70 -0
  68. package/dist/components/CuiDataGridBulkBar.vue3.js +5 -0
  69. package/dist/components/CuiDataGridCardView.vue.js +31 -0
  70. package/dist/components/CuiDataGridCardView.vue2.js +4 -0
  71. package/dist/components/CuiDataGridColumnManager.vue.js +86 -0
  72. package/dist/components/CuiDataGridColumnManager.vue2.js +4 -0
  73. package/dist/components/CuiDataGridFilterPanel.vue.js +181 -0
  74. package/dist/components/CuiDataGridFilterPanel.vue3.js +5 -0
  75. package/dist/components/CuiDataGridPagination.vue.js +28 -0
  76. package/dist/components/CuiDataGridPagination.vue2.js +4 -0
  77. package/dist/components/CuiDataGridSearch.vue.js +69 -0
  78. package/dist/components/CuiDataGridSearch.vue2.js +4 -0
  79. package/dist/components/CuiDataGridTable.vue.js +336 -0
  80. package/dist/components/CuiDataGridTable.vue2.js +4 -0
  81. package/dist/components/CuiDataGridToolbar.vue.js +73 -0
  82. package/dist/components/CuiDataGridToolbar.vue3.js +5 -0
  83. package/dist/components/CuiDataGridViewManager.vue.js +209 -0
  84. package/dist/components/CuiDataGridViewManager.vue2.js +4 -0
  85. package/dist/components/CuiDataGridViewToggle.vue.js +43 -0
  86. package/dist/components/CuiDataGridViewToggle.vue3.js +5 -0
  87. package/dist/components/CuiDatePicker.vue.js +382 -0
  88. package/dist/components/CuiDatePicker.vue2.js +4 -0
  89. package/dist/components/CuiDateRangePicker.vue.js +376 -0
  90. package/dist/components/CuiDateRangePicker.vue2.js +4 -0
  91. package/dist/components/CuiDivider.vue.js +124 -0
  92. package/dist/components/CuiDivider.vue2.js +4 -0
  93. package/dist/components/CuiDropdown.vue.js +7 -0
  94. package/dist/components/CuiDropdown.vue2.js +110 -0
  95. package/dist/components/CuiDropdownCheckItem.vue.js +7 -0
  96. package/dist/components/CuiDropdownCheckItem.vue2.js +45 -0
  97. package/dist/components/CuiDropdownDivider.vue.js +14 -0
  98. package/dist/components/CuiDropdownHeader.vue.js +16 -0
  99. package/dist/components/CuiDropdownItem.vue.js +7 -0
  100. package/dist/components/CuiDropdownItem.vue2.js +55 -0
  101. package/dist/components/CuiDropdownMenu.vue.js +7 -0
  102. package/dist/components/CuiDropdownMenu.vue2.js +79 -0
  103. package/dist/components/CuiDropdownRadioGroup.vue.js +23 -0
  104. package/dist/components/CuiDropdownRadioGroup.vue2.js +4 -0
  105. package/dist/components/CuiDropdownRadioItem.vue.js +7 -0
  106. package/dist/components/CuiDropdownRadioItem.vue2.js +43 -0
  107. package/dist/components/CuiDropdownSub.vue.js +7 -0
  108. package/dist/components/CuiDropdownSub.vue2.js +91 -0
  109. package/dist/components/CuiDropdownTrigger.vue.js +7 -0
  110. package/dist/components/CuiDropdownTrigger.vue2.js +25 -0
  111. package/dist/components/CuiEmptyState.vue.js +7 -0
  112. package/dist/components/CuiEmptyState.vue2.js +70 -0
  113. package/dist/components/CuiFieldset.vue.js +7 -0
  114. package/dist/components/CuiFieldset.vue2.js +79 -0
  115. package/dist/components/CuiFileUpload.vue.js +254 -0
  116. package/dist/components/CuiFileUpload.vue2.js +4 -0
  117. package/dist/components/CuiFlex.vue.js +7 -0
  118. package/dist/components/CuiFlex.vue2.js +72 -0
  119. package/dist/components/CuiFlexItem.vue.js +35 -0
  120. package/dist/components/CuiFlexItem.vue2.js +4 -0
  121. package/dist/components/CuiForm.vue.js +116 -0
  122. package/dist/components/CuiForm.vue2.js +4 -0
  123. package/dist/components/CuiFormField.vue.js +7 -0
  124. package/dist/components/CuiFormField.vue2.js +73 -0
  125. package/dist/components/CuiGrid.vue.js +7 -0
  126. package/dist/components/CuiGrid.vue2.js +51 -0
  127. package/dist/components/CuiGridItem.vue.js +30 -0
  128. package/dist/components/CuiGridItem.vue2.js +4 -0
  129. package/dist/components/CuiIcon.vue.js +7 -0
  130. package/dist/components/CuiIcon.vue2.js +72 -0
  131. package/dist/components/CuiInput.vue.d.ts +6 -6
  132. package/dist/components/CuiInput.vue.d.ts.map +1 -1
  133. package/dist/components/CuiInput.vue.js +7 -0
  134. package/dist/components/CuiInput.vue2.js +150 -0
  135. package/dist/components/CuiInputStepper.vue.js +189 -0
  136. package/dist/components/CuiInputStepper.vue2.js +4 -0
  137. package/dist/components/CuiKbd.vue.js +44 -0
  138. package/dist/components/CuiKbd.vue2.js +4 -0
  139. package/dist/components/CuiMaskedInput.vue.d.ts +8 -8
  140. package/dist/components/CuiMaskedInput.vue.js +256 -0
  141. package/dist/components/CuiMaskedInput.vue2.js +4 -0
  142. package/dist/components/CuiModal.vue.js +7 -0
  143. package/dist/components/CuiModal.vue2.js +98 -0
  144. package/dist/components/CuiModalBody.vue.js +50 -0
  145. package/dist/components/CuiModalBody.vue2.js +4 -0
  146. package/dist/components/CuiModalFooter.vue.js +36 -0
  147. package/dist/components/CuiModalFooter.vue2.js +4 -0
  148. package/dist/components/CuiModalHeader.vue.js +85 -0
  149. package/dist/components/CuiModalHeader.vue2.js +4 -0
  150. package/dist/components/CuiPagination.vue.js +7 -0
  151. package/dist/components/CuiPagination.vue2.js +136 -0
  152. package/dist/components/CuiPopover.vue.js +227 -0
  153. package/dist/components/CuiPopover.vue2.js +4 -0
  154. package/dist/components/CuiProgress.vue.js +7 -0
  155. package/dist/components/CuiProgress.vue2.js +132 -0
  156. package/dist/components/CuiRadio.vue.d.ts.map +1 -1
  157. package/dist/components/CuiRadio.vue.js +7 -0
  158. package/dist/components/CuiRadio.vue2.js +139 -0
  159. package/dist/components/CuiRadioGroup.vue.js +7 -0
  160. package/dist/components/CuiRadioGroup.vue2.js +78 -0
  161. package/dist/components/CuiRating.vue.js +129 -0
  162. package/dist/components/CuiRating.vue2.js +4 -0
  163. package/dist/components/CuiResizablePanels.vue.js +147 -0
  164. package/dist/components/CuiResizablePanels.vue2.js +4 -0
  165. package/dist/components/CuiSelect.vue.d.ts.map +1 -1
  166. package/dist/components/CuiSelect.vue.js +7 -0
  167. package/dist/components/CuiSelect.vue2.js +359 -0
  168. package/dist/components/CuiSkeleton.vue.js +7 -0
  169. package/dist/components/CuiSkeleton.vue2.js +80 -0
  170. package/dist/components/CuiSlideover.vue.js +109 -0
  171. package/dist/components/CuiSlideover.vue2.js +4 -0
  172. package/dist/components/CuiSlider.vue.js +156 -0
  173. package/dist/components/CuiSlider.vue2.js +4 -0
  174. package/dist/components/CuiSpacer.vue.js +32 -0
  175. package/dist/components/CuiSpacer.vue2.js +4 -0
  176. package/dist/components/CuiSpinner.vue.js +99 -0
  177. package/dist/components/CuiSpinner.vue3.js +5 -0
  178. package/dist/components/CuiStack.vue.js +30 -0
  179. package/dist/components/CuiStack.vue2.js +4 -0
  180. package/dist/components/CuiStepper.vue.js +153 -0
  181. package/dist/components/CuiStepper.vue2.js +4 -0
  182. package/dist/components/CuiTab.vue.js +7 -0
  183. package/dist/components/CuiTab.vue2.js +73 -0
  184. package/dist/components/CuiTable.vue.d.ts.map +1 -1
  185. package/dist/components/CuiTable.vue.js +90 -0
  186. package/dist/components/CuiTable.vue3.js +5 -0
  187. package/dist/components/CuiTableBody.vue.js +18 -0
  188. package/dist/components/CuiTableBody.vue2.js +4 -0
  189. package/dist/components/CuiTableCell.vue.js +36 -0
  190. package/dist/components/CuiTableCell.vue2.js +4 -0
  191. package/dist/components/CuiTableFoot.vue.js +18 -0
  192. package/dist/components/CuiTableFoot.vue2.js +4 -0
  193. package/dist/components/CuiTableHead.vue.js +18 -0
  194. package/dist/components/CuiTableHead.vue2.js +4 -0
  195. package/dist/components/CuiTableRow.vue.js +23 -0
  196. package/dist/components/CuiTableRow.vue2.js +4 -0
  197. package/dist/components/CuiTabs.vue.js +7 -0
  198. package/dist/components/CuiTabs.vue2.js +124 -0
  199. package/dist/components/CuiTagInput.vue.js +296 -0
  200. package/dist/components/CuiTagInput.vue2.js +4 -0
  201. package/dist/components/CuiTextarea.vue.js +7 -0
  202. package/dist/components/CuiTextarea.vue2.js +112 -0
  203. package/dist/components/CuiTimePicker.vue.js +193 -0
  204. package/dist/components/CuiTimePicker.vue2.js +4 -0
  205. package/dist/components/CuiTimeline.vue.js +25 -0
  206. package/dist/components/CuiTimeline.vue2.js +4 -0
  207. package/dist/components/CuiTimelineItem.vue.js +113 -0
  208. package/dist/components/CuiTimelineItem.vue2.js +4 -0
  209. package/dist/components/CuiToast.vue.js +7 -0
  210. package/dist/components/CuiToast.vue2.js +129 -0
  211. package/dist/components/CuiToastProvider.vue.js +7 -0
  212. package/dist/components/CuiToastProvider.vue2.js +87 -0
  213. package/dist/components/CuiToggle.vue.d.ts.map +1 -1
  214. package/dist/components/CuiToggle.vue.js +7 -0
  215. package/dist/components/CuiToggle.vue2.js +116 -0
  216. package/dist/components/CuiToggleGroup.vue.js +7 -0
  217. package/dist/components/CuiToggleGroup.vue2.js +59 -0
  218. package/dist/components/CuiTooltip.vue.js +7 -0
  219. package/dist/components/CuiTooltip.vue2.js +128 -0
  220. package/dist/components/CuiTransferList.vue.js +442 -0
  221. package/dist/components/CuiTransferList.vue2.js +4 -0
  222. package/dist/components/CuiTreeNode.vue.js +180 -0
  223. package/dist/components/CuiTreeNode.vue2.js +4 -0
  224. package/dist/components/CuiTreeView.vue.js +73 -0
  225. package/dist/components/CuiTreeView.vue2.js +4 -0
  226. package/dist/components/accordion-context.js +4 -0
  227. package/dist/components/breadcrumb-context.js +4 -0
  228. package/dist/components/config-context.js +4 -0
  229. package/dist/components/data-grid-context.js +4 -0
  230. package/dist/components/dropdown-context.js +30 -0
  231. package/dist/components/form-context.js +4 -0
  232. package/dist/components/multi-select-group-context.js +5 -0
  233. package/dist/components/radio-context.js +4 -0
  234. package/dist/components/table-context.js +5 -0
  235. package/dist/components/tabs-context.js +4 -0
  236. package/dist/components/toast-context.js +45 -0
  237. package/dist/composables/useBreakpoint.js +34 -0
  238. package/dist/composables/useClickOutside.js +14 -0
  239. package/dist/composables/useCopyToClipboard.js +25 -0
  240. package/dist/composables/useDataGrid.js +269 -0
  241. package/dist/composables/useDataGridInertia.js +35 -0
  242. package/dist/composables/useDataGridViews.js +67 -0
  243. package/dist/composables/useDensity.js +42 -0
  244. package/dist/composables/useLayoutContext.js +21 -0
  245. package/dist/composables/useMessages.js +10 -0
  246. package/dist/composables/useOverlay.d.ts.map +1 -1
  247. package/dist/composables/useOverlay.js +59 -0
  248. package/dist/composables/usePopover.js +53 -0
  249. package/dist/composables/useScrollShadows.js +56 -0
  250. package/dist/composables/useTheme.js +57 -0
  251. package/dist/composables/useToast.js +23 -0
  252. package/dist/composables/useVirtualScroll.js +69 -0
  253. package/dist/index.js +290 -0
  254. package/dist/messages.js +57 -0
  255. package/dist/ssr-theme-init.js +13 -0
  256. package/dist/utils/color.js +195 -0
  257. package/dist/utils/colorIconMap.js +11 -0
  258. package/dist/utils/date.js +114 -0
  259. package/dist/utils/devWarn.d.ts +15 -0
  260. package/dist/utils/devWarn.d.ts.map +1 -0
  261. package/dist/utils/devWarn.js +20 -0
  262. package/dist/utils/liveRegion.js +12 -0
  263. package/dist/utils/resolvers.js +28 -0
  264. package/dist/utils/responsive.js +68 -0
  265. package/dist/utils/sizing.js +39 -0
  266. package/package.json +8 -7
  267. package/dist/clean-ui.js +0 -11937
  268. package/dist/clean-ui.umd.cjs +0 -11
@@ -0,0 +1,91 @@
1
+ import { defineComponent as y, inject as _, computed as p, ref as b, onMounted as x, nextTick as H, watch as k, withDirectives as C, openBlock as E, createElementBlock as O, normalizeClass as d, createElementVNode as c, renderSlot as g, createTextVNode as $, toDisplayString as w, createVNode as B, vShow as A } from "vue";
2
+ import I from "./CuiIcon.vue.js";
3
+ import { AccordionContextKey as z } from "./accordion-context.js";
4
+ const D = ["aria-expanded", "aria-disabled", "tabindex"], N = { class: "cui-accordion-item__header" }, S = { class: "cui-accordion-item__content" }, R = /* @__PURE__ */ y({
5
+ __name: "CuiAccordionItem",
6
+ props: {
7
+ value: {},
8
+ label: {},
9
+ defaultOpen: { type: Boolean, default: !1 },
10
+ hidden: { type: Boolean, default: !1 },
11
+ disabled: { type: Boolean, default: !1 }
12
+ },
13
+ setup(a) {
14
+ const n = a, e = _(z), l = p(() => (e == null ? void 0 : e.isOpen(n.value)) ?? !1), s = p(() => (e == null ? void 0 : e.noAnimation.value) ?? !1), o = b();
15
+ let r = !1;
16
+ x(() => {
17
+ n.defaultOpen && e && !e.isOpen(n.value) && e.toggle(n.value), H(() => {
18
+ e != null && e.isOpen(n.value) && o.value && (o.value.style.maxHeight = "none"), r = !0;
19
+ });
20
+ }), k(l, (t) => {
21
+ if (!r) return;
22
+ if (s.value) {
23
+ o.value && (o.value.style.maxHeight = t ? "none" : "0px");
24
+ return;
25
+ }
26
+ const i = o.value;
27
+ if (i)
28
+ if (t) {
29
+ i.style.maxHeight = "0px", i.offsetHeight, i.style.maxHeight = `${i.scrollHeight}px`;
30
+ const v = () => {
31
+ i.style.maxHeight = "none", i.removeEventListener("transitionend", v);
32
+ };
33
+ i.addEventListener("transitionend", v);
34
+ } else
35
+ i.style.maxHeight = `${i.scrollHeight}px`, i.offsetHeight, i.style.maxHeight = "0px";
36
+ }, { flush: "post" });
37
+ function u() {
38
+ n.disabled || e == null || e.toggle(n.value);
39
+ }
40
+ function h(t) {
41
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), u());
42
+ }
43
+ const f = `cui-accordion-panel-${n.value}`, m = `cui-accordion-trigger-${n.value}`;
44
+ return (t, i) => C((E(), O("div", {
45
+ class: d(["cui-accordion-item", { "cui-accordion-item--open": l.value, "cui-accordion-item--disabled": a.disabled }])
46
+ }, [
47
+ c("button", {
48
+ id: m,
49
+ type: "button",
50
+ class: "cui-accordion-item__trigger",
51
+ "aria-expanded": l.value,
52
+ "aria-controls": f,
53
+ "aria-disabled": a.disabled || void 0,
54
+ tabindex: a.disabled ? -1 : 0,
55
+ onClick: u,
56
+ onKeydown: h
57
+ }, [
58
+ c("span", N, [
59
+ g(t.$slots, "header", {}, () => [
60
+ $(w(a.label), 1)
61
+ ], !0)
62
+ ]),
63
+ B(I, {
64
+ name: "caret-down",
65
+ size: "1rem",
66
+ class: d(["cui-accordion-item__chevron", { "cui-accordion-item__chevron--open": l.value }])
67
+ }, null, 8, ["class"])
68
+ ], 40, D),
69
+ c("div", {
70
+ id: f,
71
+ ref_key: "contentRef",
72
+ ref: o,
73
+ class: d(["cui-accordion-item__panel", {
74
+ "cui-accordion-item__panel--open": l.value,
75
+ "cui-accordion-item__panel--no-animation": s.value
76
+ }]),
77
+ role: "region",
78
+ "aria-labelledby": m
79
+ }, [
80
+ c("div", S, [
81
+ g(t.$slots, "default", {}, void 0, !0)
82
+ ])
83
+ ], 2)
84
+ ], 2)), [
85
+ [A, !a.hidden]
86
+ ]);
87
+ }
88
+ });
89
+ export {
90
+ R as default
91
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"CuiAlert.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiAlert.vue"],"names":[],"mappings":"AA0SA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAclG,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,MAAM,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE,MAAM,WAAW,aAAc,SAAQ,aAAa,EAAE,cAAc,EAAE,eAAe;IACnF,qBAAqB;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,yCAAyC;IACzC,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,oBAAoB;IACpB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAqND,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC9D,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACzC;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA6B/C,QAAA,MAAM,eAAe;;;;;;;aArQT,YAAY;aAcZ,UAAU;eAFR,cAAc;YARjB,OAAO;iBAEF,OAAO;cAIV,aAAa;6EAmQxB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CuiAlert.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiAlert.vue"],"names":[],"mappings":"AA6SA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAelG,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,MAAM,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE,MAAM,WAAW,aAAc,SAAQ,aAAa,EAAE,cAAc,EAAE,eAAe;IACnF,qBAAqB;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,yCAAyC;IACzC,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,oBAAoB;IACpB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAuND,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC9D,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACzC;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA6B/C,QAAA,MAAM,eAAe;;;;;;;aAvQT,YAAY;aAcZ,UAAU;eAFR,cAAc;YARjB,OAAO;iBAEF,OAAO;cAIV,aAAa;6EAqQxB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import o from "./CuiAlert.vue2.js";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-568c7fd8"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,113 @@
1
+ import { defineComponent as x, ref as f, onMounted as D, onUnmounted as A, computed as c, withDirectives as B, openBlock as r, createElementBlock as s, mergeProps as I, renderSlot as d, createVNode as b, createCommentVNode as a, createElementVNode as N, toDisplayString as w, unref as M, vShow as S } from "vue";
2
+ import $ from "./CuiIcon.vue.js";
3
+ import { COLOR_ICON_MAP as V } from "../utils/colorIconMap.js";
4
+ import { resolveLiveRegion as O } from "../utils/liveRegion.js";
5
+ import { warnVariantColor as R } from "../utils/devWarn.js";
6
+ import { useMessages as T } from "../composables/useMessages.js";
7
+ const z = {
8
+ key: 0,
9
+ class: "cui-alert__icon"
10
+ }, E = { class: "cui-alert__body" }, L = {
11
+ key: 0,
12
+ class: "cui-alert__title"
13
+ }, P = {
14
+ key: 1,
15
+ class: "cui-alert__description"
16
+ }, q = {
17
+ key: 2,
18
+ class: "cui-alert__actions"
19
+ }, F = ["aria-label"], Q = /* @__PURE__ */ x({
20
+ __name: "CuiAlert",
21
+ props: {
22
+ variant: { default: "subtle" },
23
+ title: {},
24
+ noIcon: { type: Boolean, default: !1 },
25
+ dismissible: { type: Boolean, default: !1 },
26
+ autoDismiss: {},
27
+ entrance: { default: "fade" },
28
+ animation: { default: "none" },
29
+ rounded: { default: "md" },
30
+ hidden: { type: Boolean, default: !1 },
31
+ color: { default: "info" },
32
+ live: {}
33
+ },
34
+ emits: ["dismiss"],
35
+ setup(i, { emit: _ }) {
36
+ const y = {
37
+ none: "0",
38
+ sm: "0.25rem",
39
+ md: "var(--cui-button-radius, 0.375rem)",
40
+ lg: "0.5rem",
41
+ full: "9999px"
42
+ }, o = i;
43
+ R("CuiAlert", { value: o.variant, allowed: ["solid", "subtle", "outline"] }, o.color);
44
+ const p = _, m = f(!0), l = f(!1);
45
+ let n = null;
46
+ D(() => {
47
+ requestAnimationFrame(() => {
48
+ l.value = !0;
49
+ }), o.autoDismiss && o.autoDismiss > 0 && (n = setTimeout(() => {
50
+ v();
51
+ }, o.autoDismiss));
52
+ }), A(() => {
53
+ n && clearTimeout(n);
54
+ });
55
+ function v() {
56
+ l.value = !1, setTimeout(() => {
57
+ m.value = !1, p("dismiss");
58
+ }, 300);
59
+ }
60
+ const g = c(() => {
61
+ const e = o.color, u = o.variant, t = {
62
+ borderRadius: y[o.rounded],
63
+ "--_alert-color": `var(--cui-${e})`,
64
+ "--_alert-focus-ring": `var(--cui-${e}-focus-ring)`
65
+ };
66
+ return u === "solid" ? (t.background = `var(--cui-${e}-solid, var(--cui-${e}))`, t.color = `var(--cui-${e}-text)`, t.border = "1px solid transparent", t["--_alert-icon-color"] = `var(--cui-${e}-text)`, t["--_alert-dismiss-color"] = `var(--cui-${e}-text)`) : u === "outline" ? (t.background = "transparent", t.color = `var(--cui-${e})`, t.border = `1px solid var(--cui-${e}-border)`, t["--_alert-icon-color"] = `var(--cui-${e})`, t["--_alert-dismiss-color"] = `var(--cui-${e})`) : (t.background = `var(--cui-${e}-bg)`, t.color = "var(--cui-text-body)", t.border = `1px solid var(--cui-${e}-border)`, t["--_alert-icon-color"] = `var(--cui-${e})`, t["--_alert-dismiss-color"] = "var(--cui-text-secondary)"), t;
67
+ }), k = c(() => V[o.color] ?? "info"), h = c(() => O(o.color, o.live)), C = T();
68
+ return (e, u) => m.value ? B((r(), s("div", I({
69
+ key: 0,
70
+ class: ["cui-alert", [
71
+ `cui-alert--entrance-${i.entrance}`,
72
+ { "cui-alert--mounted": l.value },
73
+ i.animation !== "none" ? `cui-alert--${i.animation}` : ""
74
+ ]],
75
+ style: g.value
76
+ }, h.value), [
77
+ i.noIcon ? a("", !0) : (r(), s("div", z, [
78
+ d(e.$slots, "icon", {}, () => [
79
+ b($, {
80
+ name: k.value,
81
+ size: "1.25rem"
82
+ }, null, 8, ["name"])
83
+ ], !0)
84
+ ])),
85
+ N("div", E, [
86
+ i.title ? (r(), s("div", L, w(i.title), 1)) : a("", !0),
87
+ e.$slots.default ? (r(), s("div", P, [
88
+ d(e.$slots, "default", {}, void 0, !0)
89
+ ])) : a("", !0),
90
+ e.$slots.actions ? (r(), s("div", q, [
91
+ d(e.$slots, "actions", {}, void 0, !0)
92
+ ])) : a("", !0)
93
+ ]),
94
+ i.dismissible ? (r(), s("button", {
95
+ key: 1,
96
+ type: "button",
97
+ class: "cui-alert__dismiss",
98
+ "aria-label": M(C).dismiss,
99
+ onClick: v
100
+ }, [
101
+ b($, {
102
+ name: "x",
103
+ size: "0.875rem"
104
+ })
105
+ ], 8, F)) : a("", !0)
106
+ ], 16)), [
107
+ [S, !i.hidden]
108
+ ]) : a("", !0);
109
+ }
110
+ });
111
+ export {
112
+ Q as default
113
+ };
@@ -0,0 +1,99 @@
1
+ import { defineComponent as y, ref as x, computed as i, withDirectives as D, openBlock as o, createElementBlock as n, normalizeStyle as u, toDisplayString as k, createBlock as w, createCommentVNode as p, vShow as O } from "vue";
2
+ import z from "./CuiIcon.vue.js";
3
+ import { scaleDensity as t } from "../utils/sizing.js";
4
+ const C = ["src", "alt"], S = {
5
+ key: 1,
6
+ class: "cui-avatar__initials"
7
+ }, I = /* @__PURE__ */ y({
8
+ __name: "CuiAvatar",
9
+ props: {
10
+ src: {},
11
+ alt: {},
12
+ name: {},
13
+ initials: {},
14
+ icon: {},
15
+ shape: { default: "circle" },
16
+ statusAnimation: {},
17
+ status: {},
18
+ hidden: { type: Boolean, default: !1 },
19
+ color: { default: "primary" },
20
+ size: { default: "md" }
21
+ },
22
+ setup(s) {
23
+ const e = s, c = x(!1), l = i(() => e.src && !c.value), m = i(() => e.initials ? e.initials : e.name ? e.name.split(" ").filter(Boolean).slice(0, 2).map((r) => r[0].toUpperCase()).join("") : ""), b = {
24
+ xs: { box: t("1.5rem"), font: "0.5rem", icon: t("0.75rem"), statusDot: t("0.5rem"), statusOffset: t("-2px") },
25
+ sm: { box: t("2rem"), font: "0.625rem", icon: t("0.875rem"), statusDot: t("0.625rem"), statusOffset: t("-2px") },
26
+ md: { box: t("2.5rem"), font: "0.75rem", icon: t("1rem"), statusDot: t("0.625rem"), statusOffset: t("-1px") },
27
+ lg: { box: t("3.5rem"), font: "1rem", icon: t("1.25rem"), statusDot: t("0.75rem"), statusOffset: t("0px") },
28
+ xl: { box: t("5rem"), font: "1.375rem", icon: t("1.75rem"), statusDot: t("1rem"), statusOffset: t("2px") }
29
+ }, a = i(() => b[e.size]), g = i(() => ({
30
+ width: a.value.box,
31
+ height: a.value.box,
32
+ borderRadius: e.shape === "circle" ? "50%" : "20%",
33
+ fontSize: a.value.font,
34
+ background: l.value ? "transparent" : `var(--cui-${e.color}-bg)`,
35
+ color: l.value ? "transparent" : `var(--cui-${e.color})`
36
+ })), f = {
37
+ online: "var(--cui-success)",
38
+ offline: "var(--cui-text-tertiary, #999)",
39
+ away: "var(--cui-warning)",
40
+ busy: "var(--cui-error)"
41
+ }, h = i(() => {
42
+ if (!e.status) return {};
43
+ const r = {
44
+ width: a.value.statusDot,
45
+ height: a.value.statusDot,
46
+ background: f[e.status],
47
+ border: "2px solid var(--cui-surface-base, white)",
48
+ borderRadius: "50%",
49
+ position: "absolute",
50
+ bottom: a.value.statusOffset,
51
+ right: a.value.statusOffset
52
+ };
53
+ return e.statusAnimation === "pulse" && (r.animation = "cui-pulse 2s ease-in-out infinite"), r;
54
+ }), v = i(() => {
55
+ if (!(!e.status || e.statusAnimation !== "ping"))
56
+ return {
57
+ width: a.value.statusDot,
58
+ height: a.value.statusDot,
59
+ background: f[e.status],
60
+ borderRadius: "50%",
61
+ position: "absolute",
62
+ bottom: a.value.statusOffset,
63
+ right: a.value.statusOffset,
64
+ opacity: "0.75",
65
+ animation: "cui-avatar-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite"
66
+ };
67
+ });
68
+ return (r, d) => D((o(), n("div", {
69
+ class: "cui-avatar",
70
+ style: u(g.value)
71
+ }, [
72
+ l.value ? (o(), n("img", {
73
+ key: 0,
74
+ src: s.src,
75
+ alt: s.alt || s.name || "Avatar",
76
+ class: "cui-avatar__img",
77
+ style: u({ borderRadius: s.shape === "circle" ? "50%" : "20%" }),
78
+ onError: d[0] || (d[0] = (A) => c.value = !0)
79
+ }, null, 44, C)) : m.value ? (o(), n("span", S, k(m.value), 1)) : (o(), w(z, {
80
+ key: 2,
81
+ name: s.icon || "user",
82
+ size: a.value.icon
83
+ }, null, 8, ["name", "size"])),
84
+ v.value ? (o(), n("span", {
85
+ key: 3,
86
+ style: u(v.value)
87
+ }, null, 4)) : p("", !0),
88
+ s.status ? (o(), n("span", {
89
+ key: 4,
90
+ style: u(h.value)
91
+ }, null, 4)) : p("", !0)
92
+ ], 4)), [
93
+ [O, !s.hidden]
94
+ ]);
95
+ }
96
+ });
97
+ export {
98
+ I as default
99
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./CuiAvatar.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -0,0 +1,22 @@
1
+ import { defineComponent as t, withDirectives as r, openBlock as n, createElementBlock as o, normalizeStyle as i, renderSlot as l, vShow as s } from "vue";
2
+ const u = /* @__PURE__ */ t({
3
+ __name: "CuiAvatarGroup",
4
+ props: {
5
+ spacing: { default: "-0.5rem" },
6
+ max: {},
7
+ hidden: { type: Boolean, default: !1 }
8
+ },
9
+ setup(e) {
10
+ return (a, c) => r((n(), o("div", {
11
+ class: "cui-avatar-group",
12
+ style: i({ "--_avatar-group-spacing": e.spacing })
13
+ }, [
14
+ l(a.$slots, "default")
15
+ ], 4)), [
16
+ [s, !e.hidden]
17
+ ]);
18
+ }
19
+ });
20
+ export {
21
+ u as default
22
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./CuiAvatarGroup.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./CuiBackdrop.vue2.js";
2
+ /* empty css */
3
+ import r from "../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-96035f2e"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,49 @@
1
+ import { defineComponent as m, ref as k, onMounted as f, computed as c, withDirectives as v, openBlock as g, createElementBlock as y, normalizeStyle as h, normalizeClass as B, vShow as x } from "vue";
2
+ import { resolveColor as C } from "../utils/color.js";
3
+ const w = /* @__PURE__ */ m({
4
+ __name: "CuiBackdrop",
5
+ props: {
6
+ opacity: { default: 0.5 },
7
+ blur: { default: "none" },
8
+ color: { default: "black" },
9
+ image: {},
10
+ gradient: {},
11
+ visible: { type: Boolean },
12
+ hidden: { type: Boolean, default: !1 }
13
+ },
14
+ emits: ["click"],
15
+ setup(l, { emit: s }) {
16
+ const e = l, u = s, d = {
17
+ none: "none",
18
+ sm: "2px",
19
+ md: "4px",
20
+ lg: "8px"
21
+ }, r = k(!1);
22
+ f(() => {
23
+ requestAnimationFrame(() => {
24
+ r.value = !0;
25
+ });
26
+ });
27
+ const b = c(() => e.visible !== void 0 ? e.visible : r.value), p = c(() => {
28
+ const i = d[e.blur] ?? e.blur, n = i !== "none", o = {}, t = [];
29
+ e.gradient && t.push(e.gradient), e.image && t.push(`url("${e.image}") repeat`);
30
+ const a = C(e.color, "black");
31
+ return n ? (t.push(`color-mix(in srgb, ${a} ${Math.round(e.opacity * 100)}%, transparent)`), o.backdropFilter = `blur(${i})`, o.webkitBackdropFilter = `blur(${i})`) : t.push(a), o.background = t.join(", "), o;
32
+ });
33
+ return (i, n) => v((g(), y("div", {
34
+ class: B(["cui-backdrop", { "cui-backdrop--visible": b.value }]),
35
+ style: h({
36
+ ...p.value,
37
+ // When no blur, use element opacity for the fade-in
38
+ ...!l.blur || l.blur === "none" ? { "--_backdrop-opacity": String(l.opacity) } : {}
39
+ }),
40
+ "aria-hidden": "true",
41
+ onClick: n[0] || (n[0] = (o) => u("click", o))
42
+ }, null, 6)), [
43
+ [x, !l.hidden]
44
+ ]);
45
+ }
46
+ });
47
+ export {
48
+ w as default
49
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"CuiBadge.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiBadge.vue"],"names":[],"mappings":"AA6NA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKhG,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAIlE,MAAM,WAAW,aAAc,SAAQ,aAAa,EAAE,cAAc,EAAE,aAAa;IACjF,qBAAqB;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,yCAAyC;IACzC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,oCAAoC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB;IAChB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,oBAAoB;IACpB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAoKD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA0B/C,QAAA,MAAM,eAAe;;;;;;;;aAzMT,YAAY;aAQZ,UAAU;SANd,OAAO;eAED,OAAO;eAEP,cAAc;6EA2M1B,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CuiBadge.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiBadge.vue"],"names":[],"mappings":"AAgOA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAMhG,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAIlE,MAAM,WAAW,aAAc,SAAQ,aAAa,EAAE,cAAc,EAAE,aAAa;IACjF,qBAAqB;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,yCAAyC;IACzC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,oCAAoC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB;IAChB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,oBAAoB;IACpB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAsKD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA0B/C,QAAA,MAAM,eAAe;;;;;;;;aA3MT,YAAY;aAQZ,UAAU;SANd,OAAO;eAED,OAAO;eAEP,cAAc;6EA6M1B,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import o from "./CuiBadge.vue2.js";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b21f1636"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,82 @@
1
+ import { defineComponent as z, computed as s, withDirectives as c, openBlock as i, createElementBlock as l, normalizeClass as m, createElementVNode as b, normalizeStyle as d, createCommentVNode as v, vShow as f, renderSlot as C, withModifiers as h, unref as x, createVNode as B } from "vue";
2
+ import { clampSize as w } from "../utils/sizing.js";
3
+ import { warnVariantColor as E } from "../utils/devWarn.js";
4
+ import V from "./CuiIcon.vue.js";
5
+ import { useMessages as M } from "../composables/useMessages.js";
6
+ const N = { class: "cui-badge__content" }, D = ["aria-label"], U = /* @__PURE__ */ z({
7
+ __name: "CuiBadge",
8
+ props: {
9
+ variant: { default: "subtle" },
10
+ dot: { type: Boolean, default: !1 },
11
+ removable: { type: Boolean, default: !1 },
12
+ animation: { default: "none" },
13
+ rounded: { default: "full" },
14
+ hidden: { type: Boolean, default: !1 },
15
+ color: { default: "primary" },
16
+ size: { default: "sm" }
17
+ },
18
+ emits: ["remove"],
19
+ setup(a, { emit: g }) {
20
+ const p = ["sm", "md"], t = a;
21
+ E("CuiBadge", { value: t.variant, allowed: ["solid", "subtle", "outline"] }, t.color);
22
+ const y = {
23
+ none: "0",
24
+ sm: "0.25rem",
25
+ md: "var(--cui-button-radius, 0.375rem)",
26
+ lg: "0.5rem",
27
+ full: "9999px"
28
+ }, $ = g, k = s(() => {
29
+ const o = t.color, n = t.variant, e = {};
30
+ return n === "solid" ? (e.background = `var(--cui-${o}-solid, var(--cui-${o}))`, e.color = `var(--cui-${o}-text)`, e.border = "1px solid transparent") : n === "outline" ? (e.background = "transparent", e.color = `var(--cui-${o})`, e.border = `1px solid var(--cui-${o}-border)`) : (e.background = `var(--cui-${o}-bg)`, e.color = `var(--cui-${o})`, e.border = "1px solid transparent"), e.borderRadius = y[t.rounded], e;
31
+ }), u = s(() => ({
32
+ background: `var(--cui-${t.color})`
33
+ })), r = s(() => w(t.size, p)), S = M();
34
+ return (o, n) => a.dot ? c((i(), l("span", {
35
+ key: 0,
36
+ class: m(["cui-badge cui-badge--dot", [
37
+ `cui-badge--${r.value}`,
38
+ a.animation !== "none" ? `cui-badge--${a.animation}` : ""
39
+ ]])
40
+ }, [
41
+ b("span", {
42
+ class: "cui-badge__dot",
43
+ style: d(u.value)
44
+ }, null, 4),
45
+ a.animation === "ping" ? (i(), l("span", {
46
+ key: 0,
47
+ class: "cui-badge__ping",
48
+ style: d(u.value)
49
+ }, null, 4)) : v("", !0)
50
+ ], 2)), [
51
+ [f, !a.hidden]
52
+ ]) : c((i(), l("span", {
53
+ key: 1,
54
+ class: m(["cui-badge", [
55
+ `cui-badge--${r.value}`,
56
+ a.animation !== "none" ? `cui-badge--${a.animation}` : ""
57
+ ]]),
58
+ style: d(k.value)
59
+ }, [
60
+ b("span", N, [
61
+ C(o.$slots, "default", {}, void 0, !0)
62
+ ]),
63
+ a.removable ? (i(), l("button", {
64
+ key: 0,
65
+ type: "button",
66
+ class: "cui-badge__remove",
67
+ "aria-label": x(S).remove,
68
+ onClick: n[0] || (n[0] = h((e) => $("remove"), ["stop"]))
69
+ }, [
70
+ B(V, {
71
+ name: "x",
72
+ size: r.value === "sm" ? "0.625rem" : "0.75rem"
73
+ }, null, 8, ["size"])
74
+ ], 8, D)) : v("", !0)
75
+ ], 6)), [
76
+ [f, !a.hidden]
77
+ ]);
78
+ }
79
+ });
80
+ export {
81
+ U as default
82
+ };
@@ -0,0 +1,81 @@
1
+ import { defineComponent as g, ref as h, computed as s, withDirectives as k, openBlock as i, createElementBlock as l, mergeProps as b, createBlock as a, createCommentVNode as r, createElementVNode as x, renderSlot as c, withCtx as $, createVNode as C, vShow as B } from "vue";
2
+ import d from "./CuiIcon.vue.js";
3
+ import I from "./CuiButton.vue.js";
4
+ import { COLOR_ICON_MAP as w } from "../utils/colorIconMap.js";
5
+ import { resolveLiveRegion as z } from "../utils/liveRegion.js";
6
+ const K = { style: { flex: "1", "font-size": "0.875rem", "font-weight": "500", "text-align": "center" } }, N = {
7
+ key: 1,
8
+ style: { "flex-shrink": "0", display: "flex", "align-items": "center", gap: "calc(0.5rem * var(--cui-density-scale, 1))" }
9
+ }, L = /* @__PURE__ */ g({
10
+ __name: "CuiBanner",
11
+ props: {
12
+ variant: { default: "subtle" },
13
+ position: { default: "top" },
14
+ dismissible: { type: Boolean, default: !0 },
15
+ noIcon: { type: Boolean, default: !1 },
16
+ storageKey: {},
17
+ hidden: { type: Boolean, default: !1 },
18
+ color: { default: "primary" },
19
+ live: {}
20
+ },
21
+ emits: ["dismiss"],
22
+ setup(t, { emit: u }) {
23
+ const e = t, m = u, n = h(
24
+ e.storageKey ? localStorage.getItem(`cui-banner-${e.storageKey}`) === "1" : !1
25
+ );
26
+ function f() {
27
+ n.value = !0, e.storageKey && localStorage.setItem(`cui-banner-${e.storageKey}`, "1"), m("dismiss");
28
+ }
29
+ const p = s(() => w[e.color] ?? "info"), v = s(() => z(e.color, e.live)), y = s(() => {
30
+ const o = {
31
+ position: "sticky",
32
+ left: "0",
33
+ right: "0",
34
+ zIndex: "50",
35
+ display: "flex",
36
+ alignItems: "center",
37
+ justifyContent: "center",
38
+ gap: "calc(0.75rem * var(--cui-density-scale, 1))",
39
+ padding: "calc(0.625rem * var(--cui-density-scale, 1)) calc(1rem * var(--cui-density-scale, 1))"
40
+ };
41
+ return o[e.position] = "0", e.variant === "solid" ? (o.background = `var(--cui-${e.color}-solid, var(--cui-${e.color}))`, o.color = `var(--cui-${e.color}-text, white)`) : (o.background = `var(--cui-${e.color}-bg)`, o.color = `var(--cui-${e.color})`, o.borderBottom = e.position === "top" ? `1px solid var(--cui-${e.color}-border)` : "none", o.borderTop = e.position === "bottom" ? `1px solid var(--cui-${e.color}-border)` : "none"), o;
42
+ });
43
+ return (o, S) => n.value ? r("", !0) : k((i(), l("div", b({
44
+ key: 0,
45
+ style: y.value
46
+ }, v.value), [
47
+ t.noIcon ? r("", !0) : (i(), a(d, {
48
+ key: 0,
49
+ name: p.value,
50
+ size: "1.125rem",
51
+ style: { "flex-shrink": "0" }
52
+ }, null, 8, ["name"])),
53
+ x("div", K, [
54
+ c(o.$slots, "default")
55
+ ]),
56
+ o.$slots.actions ? (i(), l("div", N, [
57
+ c(o.$slots, "actions")
58
+ ])) : r("", !0),
59
+ t.dismissible ? (i(), a(I, {
60
+ key: 2,
61
+ variant: "ghost",
62
+ size: "xs",
63
+ style: { "flex-shrink": "0", color: "currentColor", opacity: "0.7" },
64
+ onClick: f
65
+ }, {
66
+ default: $(() => [
67
+ C(d, {
68
+ name: "x",
69
+ size: "0.875rem"
70
+ })
71
+ ]),
72
+ _: 1
73
+ })) : r("", !0)
74
+ ], 16)), [
75
+ [B, !t.hidden]
76
+ ]);
77
+ }
78
+ });
79
+ export {
80
+ L as default
81
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CuiBanner.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./CuiBreadcrumb.vue2.js";
2
+ /* empty css */
3
+ import r from "../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a605b513"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,29 @@
1
+ import { defineComponent as t, provide as o, withDirectives as s, openBlock as c, createElementBlock as l, unref as n, createElementVNode as d, renderSlot as i, vShow as u } from "vue";
2
+ import { BreadcrumbContextKey as m } from "./breadcrumb-context.js";
3
+ import { useMessages as p } from "../composables/useMessages.js";
4
+ const b = ["aria-label"], f = { class: "cui-breadcrumb__list" }, g = /* @__PURE__ */ t({
5
+ __name: "CuiBreadcrumb",
6
+ props: {
7
+ separator: { default: "/" },
8
+ hidden: { type: Boolean, default: !1 }
9
+ },
10
+ setup(e) {
11
+ o(m, {
12
+ separator: e.separator
13
+ });
14
+ const r = p();
15
+ return (a, h) => s((c(), l("nav", {
16
+ "aria-label": n(r).breadcrumb.label,
17
+ class: "cui-breadcrumb"
18
+ }, [
19
+ d("ol", f, [
20
+ i(a.$slots, "default", {}, void 0, !0)
21
+ ])
22
+ ], 8, b)), [
23
+ [u, !e.hidden]
24
+ ]);
25
+ }
26
+ });
27
+ export {
28
+ g as default
29
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./CuiBreadcrumbItem.vue2.js";
2
+ /* empty css */
3
+ import r from "../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-956ad9cf"]]);
5
+ export {
6
+ c as default
7
+ };