@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,7 @@
1
+ import a from "./CuiTextarea.vue2.js";
2
+ /* empty css */
3
+ import o from "../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ o(a, [["__scopeId", "data-v-fea4b0a7"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,112 @@
1
+ import { defineComponent as k, useTemplateRef as H, computed as m, onMounted as F, nextTick as f, watch as $, withDirectives as A, openBlock as l, createElementBlock as i, createElementVNode as w, normalizeStyle as I, normalizeClass as z, toDisplayString as h, createCommentVNode as B, vShow as D } from "vue";
2
+ import { TEXTAREA_SIZE_SCALE as N } from "../utils/sizing.js";
3
+ const W = { class: "cui-textarea-wrapper" }, O = ["value", "placeholder", "disabled", "readonly", "rows", "aria-invalid"], X = {
4
+ key: 0,
5
+ class: "cui-textarea__footer"
6
+ }, Y = {
7
+ key: 0,
8
+ class: "cui-textarea__error"
9
+ }, Z = {
10
+ key: 1,
11
+ class: "cui-textarea__spacer"
12
+ }, G = /* @__PURE__ */ k({
13
+ __name: "CuiTextarea",
14
+ props: {
15
+ modelValue: { default: "" },
16
+ placeholder: {},
17
+ rows: { default: 3 },
18
+ autoResize: { type: Boolean, default: !1 },
19
+ maxRows: {},
20
+ maxLength: {},
21
+ error: { type: Boolean, default: !1 },
22
+ errorMessage: {},
23
+ readonly: { type: Boolean, default: !1 },
24
+ rounded: { default: "md" },
25
+ hidden: { type: Boolean, default: !1 },
26
+ color: { default: "primary" },
27
+ size: { default: "md" },
28
+ disabled: { type: Boolean, default: !1 }
29
+ },
30
+ emits: ["update:modelValue"],
31
+ setup(e, { expose: C, emit: L }) {
32
+ const R = {
33
+ none: "0",
34
+ sm: "0.25rem",
35
+ md: "var(--cui-button-radius, 0.375rem)",
36
+ lg: "0.5rem",
37
+ full: "9999px"
38
+ }, a = e, S = L, d = H("textareaEl"), v = m(() => a.modelValue.length), n = m(() => a.maxLength !== void 0 && v.value > a.maxLength);
39
+ function p(t) {
40
+ const o = t.target;
41
+ let r = o.value;
42
+ a.maxLength !== void 0 && r.length > a.maxLength && (r = r.slice(0, a.maxLength), o.value = r), S("update:modelValue", r), a.autoResize && f(u);
43
+ }
44
+ function u() {
45
+ const t = d.value;
46
+ if (!t) return;
47
+ t.style.height = "auto";
48
+ const o = parseFloat(getComputedStyle(t).lineHeight) || 20, r = parseFloat(getComputedStyle(t).paddingTop) || 0, g = parseFloat(getComputedStyle(t).paddingBottom) || 0, x = parseFloat(getComputedStyle(t).borderTopWidth) || 0, y = parseFloat(getComputedStyle(t).borderBottomWidth) || 0, M = o * a.rows + r + g + x + y;
49
+ let c = 1 / 0;
50
+ a.maxRows && (c = o * a.maxRows + r + g + x + y);
51
+ const b = t.scrollHeight, V = Math.min(Math.max(b, M), c);
52
+ t.style.height = `${V}px`, t.style.overflowY = b > c ? "auto" : "hidden";
53
+ }
54
+ F(() => {
55
+ a.autoResize && f(u);
56
+ }), $(() => a.modelValue, () => {
57
+ a.autoResize && f(u);
58
+ });
59
+ function T(t) {
60
+ var o;
61
+ (o = d.value) == null || o.focus(t);
62
+ }
63
+ function E() {
64
+ var t;
65
+ (t = d.value) == null || t.blur();
66
+ }
67
+ C({ el: d, focus: T, blur: E });
68
+ const s = m(() => N[a.size]);
69
+ return (t, o) => A((l(), i("div", W, [
70
+ w("div", {
71
+ class: z(["cui-textarea", {
72
+ "cui-textarea--error": e.error || n.value,
73
+ "cui-textarea--disabled": e.disabled
74
+ }]),
75
+ style: I({
76
+ borderRadius: R[e.rounded],
77
+ "--_ta-px": s.value.px,
78
+ "--_ta-py": s.value.py,
79
+ "--_ta-font-size": s.value.fontSize,
80
+ "--_ta-color": `var(--cui-${e.color})`,
81
+ "--_ta-focus-ring": `var(--cui-${e.color}-focus-ring)`,
82
+ "--_ta-border": e.error || n.value ? "var(--cui-error)" : "var(--cui-border-strong)",
83
+ "--_ta-focus-border": e.error || n.value ? "var(--cui-error)" : `var(--cui-${e.color})`
84
+ })
85
+ }, [
86
+ w("textarea", {
87
+ ref: "textareaEl",
88
+ value: e.modelValue,
89
+ placeholder: e.placeholder,
90
+ disabled: e.disabled,
91
+ readonly: e.readonly,
92
+ rows: e.rows,
93
+ "aria-invalid": e.error || void 0,
94
+ class: "cui-textarea__native",
95
+ onInput: p
96
+ }, null, 40, O)
97
+ ], 6),
98
+ e.error && e.errorMessage || e.maxLength !== void 0 ? (l(), i("div", X, [
99
+ e.error && e.errorMessage ? (l(), i("div", Y, h(e.errorMessage), 1)) : (l(), i("div", Z)),
100
+ e.maxLength !== void 0 ? (l(), i("div", {
101
+ key: 2,
102
+ class: z(["cui-textarea__counter", { "cui-textarea__counter--over": n.value }])
103
+ }, h(v.value) + "/" + h(e.maxLength), 3)) : B("", !0)
104
+ ])) : B("", !0)
105
+ ], 512)), [
106
+ [D, !e.hidden]
107
+ ]);
108
+ }
109
+ });
110
+ export {
111
+ G as default
112
+ };
@@ -0,0 +1,193 @@
1
+ import { defineComponent as H, ref as v, watch as V, onMounted as L, computed as d, useTemplateRef as O, withDirectives as j, openBlock as g, createElementBlock as h, toDisplayString as $, createCommentVNode as k, createVNode as s, withCtx as f, createElementVNode as p, normalizeStyle as x, createTextVNode as A, vShow as q } from "vue";
2
+ import F from "./CuiPopover.vue.js";
3
+ import C from "./CuiInputStepper.vue.js";
4
+ import z from "./CuiButton.vue.js";
5
+ import G from "./CuiIcon.vue.js";
6
+ const J = {
7
+ key: 0,
8
+ style: {
9
+ display: "block",
10
+ marginBottom: "calc(0.25rem * var(--cui-density-scale, 1))",
11
+ fontSize: "0.875rem",
12
+ fontWeight: "500",
13
+ color: "var(--cui-text-secondary)"
14
+ }
15
+ }, K = { style: { display: "flex", alignItems: "center", gap: "calc(0.5rem * var(--cui-density-scale, 1))", padding: "calc(0.5rem * var(--cui-density-scale, 1))" } }, Q = {
16
+ key: 0,
17
+ style: { display: "flex", flexDirection: "column", gap: "calc(0.125rem * var(--cui-density-scale, 1))", marginLeft: "calc(0.25rem * var(--cui-density-scale, 1))" }
18
+ }, te = /* @__PURE__ */ H({
19
+ __name: "CuiTimePicker",
20
+ props: {
21
+ modelValue: { default: "" },
22
+ format: { default: "12" },
23
+ minuteStep: { default: 1 },
24
+ minTime: {},
25
+ maxTime: {},
26
+ placeholder: {},
27
+ size: { default: "md" },
28
+ label: {},
29
+ hidden: { type: Boolean, default: !1 },
30
+ disabled: { type: Boolean, default: !1 }
31
+ },
32
+ emits: ["update:modelValue"],
33
+ setup(l, { expose: w, emit: P }) {
34
+ const a = l, I = P, i = v(12), o = v(0), r = v("AM"), y = v(!1);
35
+ function b(t) {
36
+ if (!t) return;
37
+ const e = t.match(/^(\d{1,2}):(\d{2})$/);
38
+ if (e) {
39
+ const u = parseInt(e[1]), D = parseInt(e[2]);
40
+ a.format === "12" ? (r.value = u >= 12 ? "PM" : "AM", i.value = u === 0 ? 12 : u > 12 ? u - 12 : u) : i.value = u, o.value = D;
41
+ return;
42
+ }
43
+ const n = t.match(/^(\d{1,2}):(\d{2})\s*(AM|PM)$/i);
44
+ n && (i.value = parseInt(n[1]), o.value = parseInt(n[2]), r.value = n[3].toUpperCase());
45
+ }
46
+ V(() => a.modelValue, b), L(() => b(a.modelValue));
47
+ function S() {
48
+ return a.format === "24" ? `${String(i.value).padStart(2, "0")}:${String(o.value).padStart(2, "0")}` : `${String(i.value).padStart(2, "0")}:${String(o.value).padStart(2, "0")} ${r.value}`;
49
+ }
50
+ function m() {
51
+ I("update:modelValue", S());
52
+ }
53
+ const M = d(() => a.modelValue ? S() : "");
54
+ d(() => a.format === "24" ? "##:##" : "##:## AA");
55
+ const T = d(
56
+ () => a.placeholder ?? (a.format === "24" ? "hh:mm" : "hh:mm AM")
57
+ );
58
+ d(() => a.modelValue ? a.format === "24" ? `${String(i.value).padStart(2, "0")}${String(o.value).padStart(2, "0")}` : `${String(i.value).padStart(2, "0")}${String(o.value).padStart(2, "0")}${r.value}` : "");
59
+ const W = d(() => a.format === "12" ? 1 : 0), B = d(() => a.format === "12" ? 12 : 23);
60
+ function E(t) {
61
+ i.value = t, m();
62
+ }
63
+ function N(t) {
64
+ o.value = t, m();
65
+ }
66
+ V(y, (t) => {
67
+ t && b(a.modelValue);
68
+ });
69
+ const c = O("rootEl");
70
+ function R(t) {
71
+ var e;
72
+ (e = c.value) == null || e.focus(t);
73
+ }
74
+ function U() {
75
+ var t;
76
+ (t = c.value) == null || t.blur();
77
+ }
78
+ return w({ el: c, focus: R, blur: U }), (t, e) => j((g(), h("div", {
79
+ ref_key: "rootEl",
80
+ ref: c
81
+ }, [
82
+ l.label ? (g(), h("label", J, $(l.label), 1)) : k("", !0),
83
+ s(F, {
84
+ visible: y.value,
85
+ "onUpdate:visible": e[2] || (e[2] = (n) => y.value = n),
86
+ placement: "bottom",
87
+ closable: !1,
88
+ "no-arrow": "",
89
+ width: "auto",
90
+ disabled: l.disabled
91
+ }, {
92
+ content: f(() => [
93
+ p("div", K, [
94
+ s(C, {
95
+ "model-value": i.value,
96
+ min: W.value,
97
+ max: B.value,
98
+ step: 1,
99
+ orientation: "vertical",
100
+ size: "sm",
101
+ pad: 2,
102
+ wrap: "",
103
+ "onUpdate:modelValue": E
104
+ }, null, 8, ["model-value", "min", "max"]),
105
+ e[5] || (e[5] = p("span", { style: { fontSize: "1.25rem", fontWeight: "700", color: "var(--cui-text-body)", lineHeight: "1" } }, ":", -1)),
106
+ s(C, {
107
+ "model-value": o.value,
108
+ min: 0,
109
+ max: 59,
110
+ step: l.minuteStep,
111
+ orientation: "vertical",
112
+ size: "sm",
113
+ pad: 2,
114
+ wrap: "",
115
+ "onUpdate:modelValue": N
116
+ }, null, 8, ["model-value", "step"]),
117
+ l.format === "12" ? (g(), h("div", Q, [
118
+ s(z, {
119
+ variant: "ghost",
120
+ size: "xs",
121
+ style: x({
122
+ fontWeight: r.value === "AM" ? "700" : "400",
123
+ color: r.value === "AM" ? "var(--cui-primary)" : "var(--cui-text-tertiary)",
124
+ background: r.value === "AM" ? "var(--cui-primary-bg)" : "transparent",
125
+ borderRadius: "0.25rem",
126
+ minWidth: "2.5rem"
127
+ }),
128
+ onClick: e[0] || (e[0] = (n) => {
129
+ r.value = "AM", m();
130
+ })
131
+ }, {
132
+ default: f(() => [...e[3] || (e[3] = [
133
+ A("AM", -1)
134
+ ])]),
135
+ _: 1
136
+ }, 8, ["style"]),
137
+ s(z, {
138
+ variant: "ghost",
139
+ size: "xs",
140
+ style: x({
141
+ fontWeight: r.value === "PM" ? "700" : "400",
142
+ color: r.value === "PM" ? "var(--cui-primary)" : "var(--cui-text-tertiary)",
143
+ background: r.value === "PM" ? "var(--cui-primary-bg)" : "transparent",
144
+ borderRadius: "0.25rem",
145
+ minWidth: "2.5rem"
146
+ }),
147
+ onClick: e[1] || (e[1] = (n) => {
148
+ r.value = "PM", m();
149
+ })
150
+ }, {
151
+ default: f(() => [...e[4] || (e[4] = [
152
+ A("PM", -1)
153
+ ])]),
154
+ _: 1
155
+ }, 8, ["style"])
156
+ ])) : k("", !0)
157
+ ])
158
+ ]),
159
+ default: f(() => [
160
+ p("div", {
161
+ style: x({
162
+ display: "inline-flex",
163
+ alignItems: "center",
164
+ gap: "calc(0.5rem * var(--cui-density-scale, 1))",
165
+ padding: "calc(0.4375rem * var(--cui-density-scale, 1)) calc(0.625rem * var(--cui-density-scale, 1))",
166
+ border: "1px solid var(--cui-border-strong, var(--cui-border))",
167
+ borderRadius: "var(--cui-button-radius, 0.375rem)",
168
+ background: "var(--cui-surface-base, white)",
169
+ cursor: l.disabled ? "default" : "pointer",
170
+ opacity: l.disabled ? "0.5" : "1",
171
+ fontSize: "0.875rem",
172
+ color: M.value ? "var(--cui-text-body)" : "var(--cui-text-tertiary)",
173
+ minWidth: l.format === "24" ? "6rem" : "8rem"
174
+ })
175
+ }, [
176
+ s(G, {
177
+ name: "clock",
178
+ size: "0.875rem",
179
+ style: { color: "var(--cui-text-tertiary)", flexShrink: "0" }
180
+ }),
181
+ p("span", null, $(M.value || T.value), 1)
182
+ ], 4)
183
+ ]),
184
+ _: 1
185
+ }, 8, ["visible", "disabled"])
186
+ ], 512)), [
187
+ [q, !l.hidden]
188
+ ]);
189
+ }
190
+ });
191
+ export {
192
+ te as default
193
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CuiTimePicker.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,25 @@
1
+ import { defineComponent as o, withDirectives as l, openBlock as i, createElementBlock as n, renderSlot as a, vShow as s } from "vue";
2
+ const r = {
3
+ style: {
4
+ display: "flex",
5
+ flexDirection: "column",
6
+ position: "relative"
7
+ },
8
+ role: "list"
9
+ }, p = /* @__PURE__ */ o({
10
+ __name: "CuiTimeline",
11
+ props: {
12
+ compact: { type: Boolean, default: !1 },
13
+ hidden: { type: Boolean, default: !1 }
14
+ },
15
+ setup(e) {
16
+ return (t, c) => l((i(), n("div", r, [
17
+ a(t.$slots, "default")
18
+ ], 512)), [
19
+ [s, !e.hidden]
20
+ ]);
21
+ }
22
+ });
23
+ export {
24
+ p as default
25
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CuiTimeline.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,113 @@
1
+ import { defineComponent as m, computed as u, withDirectives as y, openBlock as i, createElementBlock as a, normalizeStyle as o, createElementVNode as c, renderSlot as n, createBlock as f, createCommentVNode as l, toDisplayString as s, vShow as v } from "vue";
2
+ import h from "./CuiIcon.vue.js";
3
+ const x = {
4
+ key: 0,
5
+ style: {
6
+ width: "2px",
7
+ flex: "1",
8
+ background: "var(--cui-border)",
9
+ marginTop: "calc(0.375rem * var(--cui-density-scale, 1))",
10
+ borderRadius: "1px"
11
+ }
12
+ }, g = {
13
+ key: 0,
14
+ style: { display: "flex", alignItems: "baseline", gap: "calc(0.5rem * var(--cui-density-scale, 1))", flexWrap: "wrap" }
15
+ }, p = {
16
+ key: 0,
17
+ style: {
18
+ fontSize: "0.875rem",
19
+ fontWeight: "600",
20
+ color: "var(--cui-text-body)",
21
+ lineHeight: "1.4"
22
+ }
23
+ }, b = {
24
+ key: 1,
25
+ style: {
26
+ fontSize: "0.75rem",
27
+ color: "var(--cui-text-tertiary)",
28
+ whiteSpace: "nowrap"
29
+ }
30
+ }, $ = /* @__PURE__ */ m({
31
+ __name: "CuiTimelineItem",
32
+ props: {
33
+ icon: {},
34
+ title: {},
35
+ timestamp: {},
36
+ last: { type: Boolean, default: !1 },
37
+ hidden: { type: Boolean, default: !1 },
38
+ color: { default: "primary" }
39
+ },
40
+ setup(e) {
41
+ const t = e, d = u(() => ({
42
+ width: t.icon ? "1.75rem" : "0.75rem",
43
+ height: t.icon ? "1.75rem" : "0.75rem",
44
+ borderRadius: "50%",
45
+ background: t.icon ? `var(--cui-${t.color}-bg)` : `var(--cui-${t.color})`,
46
+ color: `var(--cui-${t.color})`,
47
+ border: t.icon ? `1px solid var(--cui-${t.color}-border)` : "3px solid var(--cui-surface-base, white)",
48
+ display: "flex",
49
+ alignItems: "center",
50
+ justifyContent: "center",
51
+ flexShrink: "0",
52
+ position: "relative",
53
+ zIndex: "1",
54
+ boxShadow: t.icon ? "none" : "0 0 0 3px var(--cui-surface-base, white)"
55
+ }));
56
+ return (r, k) => y((i(), a("div", {
57
+ style: o({
58
+ display: "flex",
59
+ gap: "calc(0.875rem * var(--cui-density-scale, 1))",
60
+ position: "relative",
61
+ paddingBottom: e.last ? "0" : "calc(1.5rem * var(--cui-density-scale, 1))"
62
+ }),
63
+ role: "listitem"
64
+ }, [
65
+ c("div", {
66
+ style: o({
67
+ display: "flex",
68
+ flexDirection: "column",
69
+ alignItems: "center",
70
+ flexShrink: "0",
71
+ width: e.icon ? "1.75rem" : "0.75rem"
72
+ })
73
+ }, [
74
+ c("div", {
75
+ style: o(d.value)
76
+ }, [
77
+ n(r.$slots, "icon", {}, () => [
78
+ e.icon ? (i(), f(h, {
79
+ key: 0,
80
+ name: e.icon,
81
+ size: "0.875rem"
82
+ }, null, 8, ["name"])) : l("", !0)
83
+ ])
84
+ ], 4),
85
+ e.last ? l("", !0) : (i(), a("div", x))
86
+ ], 4),
87
+ c("div", {
88
+ style: o({ flex: "1", minWidth: "0", paddingTop: e.icon ? "calc(0.125rem * var(--cui-density-scale, 1))" : "0" })
89
+ }, [
90
+ e.title || e.timestamp ? (i(), a("div", g, [
91
+ e.title ? (i(), a("span", p, s(e.title), 1)) : l("", !0),
92
+ e.timestamp ? (i(), a("span", b, s(e.timestamp), 1)) : l("", !0)
93
+ ])) : l("", !0),
94
+ r.$slots.default ? (i(), a("div", {
95
+ key: 1,
96
+ style: o({
97
+ fontSize: "0.8125rem",
98
+ color: "var(--cui-text-secondary)",
99
+ lineHeight: "1.55",
100
+ marginTop: e.title ? "calc(0.25rem * var(--cui-density-scale, 1))" : "0"
101
+ })
102
+ }, [
103
+ n(r.$slots, "default")
104
+ ], 4)) : l("", !0)
105
+ ], 4)
106
+ ], 4)), [
107
+ [v, !e.hidden]
108
+ ]);
109
+ }
110
+ });
111
+ export {
112
+ $ as default
113
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CuiTimelineItem.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./CuiToast.vue2.js";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ad2b7bea"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,129 @@
1
+ import { defineComponent as N, ref as b, computed as n, watch as P, onMounted as S, onUnmounted as T, withDirectives as V, openBlock as i, createElementBlock as a, mergeProps as z, Fragment as E, createTextVNode as g, toDisplayString as v, createBlock as L, createCommentVNode as c, createElementVNode as y, renderSlot as $, unref as O, createVNode as A, normalizeStyle as R, vShow as F } from "vue";
2
+ import h from "./CuiIcon.vue.js";
3
+ import { COLOR_ICON_MAP as K } from "../utils/colorIconMap.js";
4
+ import { resolveLiveRegion as U } from "../utils/liveRegion.js";
5
+ import { useMessages as j } from "../composables/useMessages.js";
6
+ const q = {
7
+ key: 0,
8
+ class: "cui-toast__icon"
9
+ }, G = { class: "cui-toast__body" }, H = {
10
+ key: 0,
11
+ class: "cui-toast__title"
12
+ }, J = {
13
+ key: 1,
14
+ class: "cui-toast__description"
15
+ }, Q = {
16
+ key: 2,
17
+ class: "cui-toast__actions"
18
+ }, W = ["aria-label"], X = {
19
+ key: 2,
20
+ class: "cui-toast__progress"
21
+ }, _ = 50, ot = /* @__PURE__ */ N({
22
+ __name: "CuiToast",
23
+ props: {
24
+ toastId: {},
25
+ title: {},
26
+ description: {},
27
+ variant: { default: "subtle" },
28
+ dismissible: { type: Boolean, default: !0 },
29
+ autoDismiss: { default: 5e3 },
30
+ showProgress: { type: Boolean, default: !0 },
31
+ animation: { default: "none" },
32
+ icon: {},
33
+ noIcon: { type: Boolean, default: !1 },
34
+ active: { type: Boolean, default: !0 },
35
+ hidden: { type: Boolean, default: !1 },
36
+ color: { default: "primary" },
37
+ live: {}
38
+ },
39
+ emits: ["dismiss"],
40
+ setup(s, { emit: k }) {
41
+ const o = s, D = k, u = b(!1), l = b(0);
42
+ let r = null;
43
+ const I = n(() => !o.autoDismiss || o.autoDismiss === 0 ? 0 : Math.min(l.value / o.autoDismiss * 100, 100));
44
+ function m() {
45
+ r || !o.autoDismiss || o.autoDismiss === 0 || (r = setInterval(() => {
46
+ !u.value && o.active && (l.value += _, l.value >= o.autoDismiss && f());
47
+ }, _));
48
+ }
49
+ P(
50
+ () => o.active,
51
+ (t) => {
52
+ t && !r && m();
53
+ }
54
+ );
55
+ function f() {
56
+ r && clearInterval(r), D("dismiss");
57
+ }
58
+ function p() {
59
+ u.value = !0;
60
+ }
61
+ function x() {
62
+ u.value = !1;
63
+ }
64
+ S(() => {
65
+ o.active && m();
66
+ }), T(() => {
67
+ r && clearInterval(r);
68
+ });
69
+ const B = n(() => {
70
+ const t = o.color, d = o.variant, e = {
71
+ "--_toast-focus-ring": `var(--cui-${t}-focus-ring)`
72
+ };
73
+ return d === "solid" ? (e.background = `var(--cui-${t}-solid, var(--cui-${t}))`, e.color = `var(--cui-${t}-text)`, e["--_toast-icon-color"] = `var(--cui-${t}-text)`, e["--_toast-dismiss-color"] = `var(--cui-${t}-text)`, e["--_toast-progress-bg"] = "rgb(255 255 255 / 0.2)", e["--_toast-progress-bar"] = "rgb(255 255 255 / 0.6)") : d === "outline" ? (e.background = "var(--cui-surface-base)", e.color = `var(--cui-${t})`, e.border = `1px solid var(--cui-${t}-border)`, e["--_toast-icon-color"] = `var(--cui-${t})`, e["--_toast-dismiss-color"] = "var(--cui-text-secondary)", e["--_toast-progress-bg"] = `var(--cui-${t}-bg)`, e["--_toast-progress-bar"] = `var(--cui-${t})`) : (e.background = `var(--cui-${t}-bg)`, e.color = "var(--cui-text-body)", e.border = `1px solid var(--cui-${t}-border)`, e["--_toast-icon-color"] = `var(--cui-${t})`, e["--_toast-dismiss-color"] = "var(--cui-text-secondary)", e["--_toast-progress-bg"] = `var(--cui-${t}-border)`, e["--_toast-progress-bar"] = `var(--cui-${t})`), e;
74
+ }), C = n(() => K[o.color] ?? "info"), M = n(() => U(o.color, o.live)), w = j();
75
+ return (t, d) => V((i(), a("div", z({
76
+ class: ["cui-toast", [
77
+ s.animation !== "none" ? `cui-toast--${s.animation}` : ""
78
+ ]],
79
+ style: B.value
80
+ }, M.value, {
81
+ onMouseenter: p,
82
+ onMouseleave: x
83
+ }), [
84
+ s.noIcon ? c("", !0) : (i(), a("div", q, [
85
+ s.icon ? (i(), a(E, { key: 0 }, [
86
+ g(v(s.icon), 1)
87
+ ], 64)) : (i(), L(h, {
88
+ key: 1,
89
+ name: C.value,
90
+ size: "1.25rem"
91
+ }, null, 8, ["name"]))
92
+ ])),
93
+ y("div", G, [
94
+ s.title ? (i(), a("div", H, v(s.title), 1)) : c("", !0),
95
+ s.description || t.$slots.default ? (i(), a("div", J, [
96
+ $(t.$slots, "default", {}, () => [
97
+ g(v(s.description), 1)
98
+ ], !0)
99
+ ])) : c("", !0),
100
+ t.$slots.actions ? (i(), a("div", Q, [
101
+ $(t.$slots, "actions", {}, void 0, !0)
102
+ ])) : c("", !0)
103
+ ]),
104
+ s.dismissible ? (i(), a("button", {
105
+ key: 1,
106
+ type: "button",
107
+ class: "cui-toast__dismiss",
108
+ "aria-label": O(w).dismiss,
109
+ onClick: f
110
+ }, [
111
+ A(h, {
112
+ name: "x",
113
+ size: "0.875rem"
114
+ })
115
+ ], 8, W)) : c("", !0),
116
+ s.showProgress && s.autoDismiss && s.autoDismiss > 0 && s.active ? (i(), a("div", X, [
117
+ y("div", {
118
+ class: "cui-toast__progress-bar",
119
+ style: R({ width: `${100 - I.value}%` })
120
+ }, null, 4)
121
+ ])) : c("", !0)
122
+ ], 16)), [
123
+ [F, !s.hidden]
124
+ ]);
125
+ }
126
+ });
127
+ export {
128
+ ot as default
129
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./CuiToastProvider.vue2.js";
2
+ /* empty css */
3
+ import r from "../_virtual/_plugin-vue_export-helper.js";
4
+ const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-67df253a"]]);
5
+ export {
6
+ i as default
7
+ };