@itguy614/clean-ui 1.2.1 → 1.3.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 (243) hide show
  1. package/README.md +12 -0
  2. package/dist/clean-ui.css +1 -1
  3. package/dist/components/CuiAccordion.vue.js +2 -2
  4. package/dist/components/CuiAlert.vue.d.ts +3 -5
  5. package/dist/components/CuiAlert.vue.d.ts.map +1 -1
  6. package/dist/components/CuiAlert.vue.js +1 -1
  7. package/dist/components/CuiAlert.vue2.js +54 -50
  8. package/dist/components/CuiBadge.vue.js +3 -3
  9. package/dist/components/CuiBadge.vue2.js +23 -23
  10. package/dist/components/CuiBanner.vue.d.ts +15 -10
  11. package/dist/components/CuiBanner.vue.d.ts.map +1 -1
  12. package/dist/components/CuiBanner.vue.js +5 -80
  13. package/dist/components/CuiBanner.vue2.js +90 -2
  14. package/dist/components/CuiButton.vue.d.ts +9 -0
  15. package/dist/components/CuiButton.vue.d.ts.map +1 -1
  16. package/dist/components/CuiButton.vue.js +1 -1
  17. package/dist/components/CuiButton.vue2.js +77 -83
  18. package/dist/components/CuiButtonGroup.vue.d.ts +4 -2
  19. package/dist/components/CuiButtonGroup.vue.d.ts.map +1 -1
  20. package/dist/components/CuiButtonGroup.vue.js +1 -1
  21. package/dist/components/CuiButtonGroup.vue2.js +18 -9
  22. package/dist/components/CuiCard.vue.d.ts.map +1 -1
  23. package/dist/components/CuiCard.vue.js +5 -33
  24. package/dist/components/CuiCard.vue2.js +32 -2
  25. package/dist/components/CuiCardBody.vue.d.ts.map +1 -1
  26. package/dist/components/CuiCardBody.vue.js +5 -18
  27. package/dist/components/CuiCardBody.vue2.js +18 -2
  28. package/dist/components/CuiCardFooter.vue.d.ts.map +1 -1
  29. package/dist/components/CuiCardFooter.vue.js +5 -30
  30. package/dist/components/CuiCardFooter.vue2.js +25 -2
  31. package/dist/components/CuiCardHeader.vue.d.ts +5 -4
  32. package/dist/components/CuiCardHeader.vue.d.ts.map +1 -1
  33. package/dist/components/CuiCardHeader.vue.js +5 -49
  34. package/dist/components/CuiCardHeader.vue2.js +40 -2
  35. package/dist/components/CuiCardMedia.vue.d.ts.map +1 -1
  36. package/dist/components/CuiCardMedia.vue.js +3 -3
  37. package/dist/components/CuiCardMedia.vue2.js +6 -6
  38. package/dist/components/CuiCheckbox.vue.d.ts +2 -2
  39. package/dist/components/CuiCheckbox.vue.d.ts.map +1 -1
  40. package/dist/components/CuiCheckbox.vue.js +1 -1
  41. package/dist/components/CuiCheckbox.vue2.js +46 -34
  42. package/dist/components/CuiCheckboxGroup.vue.d.ts +2 -2
  43. package/dist/components/CuiCheckboxGroup.vue.d.ts.map +1 -1
  44. package/dist/components/CuiCheckboxGroup.vue.js +2 -2
  45. package/dist/components/CuiCheckboxGroup.vue2.js +45 -35
  46. package/dist/components/CuiCodeBlock.vue.d.ts.map +1 -1
  47. package/dist/components/CuiCodeBlock.vue.js +14 -11
  48. package/dist/components/CuiColorPicker.vue.d.ts +2 -2
  49. package/dist/components/CuiColorPicker.vue.d.ts.map +1 -1
  50. package/dist/components/CuiColorPicker.vue.js +117 -104
  51. package/dist/components/CuiCombobox.vue.d.ts +2 -2
  52. package/dist/components/CuiCombobox.vue.d.ts.map +1 -1
  53. package/dist/components/CuiCombobox.vue.js +5 -330
  54. package/dist/components/CuiCombobox.vue2.js +331 -2
  55. package/dist/components/CuiConfirmDialog.vue.d.ts +5 -4
  56. package/dist/components/CuiConfirmDialog.vue.d.ts.map +1 -1
  57. package/dist/components/CuiConfirmDialog.vue.js +84 -73
  58. package/dist/components/CuiContextMenu.vue.d.ts +40 -1
  59. package/dist/components/CuiContextMenu.vue.d.ts.map +1 -1
  60. package/dist/components/CuiContextMenu.vue.js +1 -1
  61. package/dist/components/CuiContextMenu.vue2.js +149 -91
  62. package/dist/components/CuiCopyButton.vue.d.ts.map +1 -1
  63. package/dist/components/CuiCopyButton.vue.js +5 -61
  64. package/dist/components/CuiCopyButton.vue2.js +68 -2
  65. package/dist/components/CuiDataGridCardView.vue.d.ts.map +1 -1
  66. package/dist/components/CuiDataGridCardView.vue.js +10 -9
  67. package/dist/components/CuiDataGridColumnManager.vue.d.ts.map +1 -1
  68. package/dist/components/CuiDataGridColumnManager.vue.js +12 -11
  69. package/dist/components/CuiDataGridPagination.vue.d.ts.map +1 -1
  70. package/dist/components/CuiDataGridPagination.vue.js +9 -8
  71. package/dist/components/CuiDataGridSearch.vue.d.ts.map +1 -1
  72. package/dist/components/CuiDataGridSearch.vue.js +12 -9
  73. package/dist/components/CuiDataGridTable.vue.d.ts.map +1 -1
  74. package/dist/components/CuiDataGridTable.vue.js +1 -0
  75. package/dist/components/CuiDataGridViewManager.vue.d.ts.map +1 -1
  76. package/dist/components/CuiDataGridViewManager.vue.js +17 -17
  77. package/dist/components/CuiDatePicker.vue.d.ts +2 -2
  78. package/dist/components/CuiDatePicker.vue.d.ts.map +1 -1
  79. package/dist/components/CuiDatePicker.vue.js +257 -173
  80. package/dist/components/CuiDateRangePicker.vue.d.ts +2 -2
  81. package/dist/components/CuiDateRangePicker.vue.d.ts.map +1 -1
  82. package/dist/components/CuiDateRangePicker.vue.js +262 -179
  83. package/dist/components/CuiDivider.vue.d.ts.map +1 -1
  84. package/dist/components/CuiDivider.vue.js +17 -13
  85. package/dist/components/CuiDropdownMenu.vue.js +2 -2
  86. package/dist/components/CuiDropdownRadioGroup.vue.d.ts +4 -1
  87. package/dist/components/CuiDropdownRadioGroup.vue.d.ts.map +1 -1
  88. package/dist/components/CuiDropdownRadioGroup.vue.js +27 -14
  89. package/dist/components/CuiDropdownSub.vue.js +2 -2
  90. package/dist/components/CuiEmptyState.vue.d.ts +5 -4
  91. package/dist/components/CuiEmptyState.vue.d.ts.map +1 -1
  92. package/dist/components/CuiEmptyState.vue.js +1 -1
  93. package/dist/components/CuiEmptyState.vue2.js +30 -24
  94. package/dist/components/CuiFieldset.vue.d.ts.map +1 -1
  95. package/dist/components/CuiFieldset.vue.js +1 -1
  96. package/dist/components/CuiFieldset.vue2.js +21 -21
  97. package/dist/components/CuiFileUpload.vue.d.ts +2 -2
  98. package/dist/components/CuiFileUpload.vue.d.ts.map +1 -1
  99. package/dist/components/CuiFileUpload.vue.js +70 -57
  100. package/dist/components/CuiFormField.vue.d.ts.map +1 -1
  101. package/dist/components/CuiFormField.vue.js +2 -2
  102. package/dist/components/CuiFormField.vue2.js +48 -42
  103. package/dist/components/CuiInput.vue.d.ts +2 -2
  104. package/dist/components/CuiInput.vue.d.ts.map +1 -1
  105. package/dist/components/CuiInput.vue.js +1 -1
  106. package/dist/components/CuiInput.vue2.js +97 -85
  107. package/dist/components/CuiInputStepper.vue.d.ts +2 -2
  108. package/dist/components/CuiInputStepper.vue.d.ts.map +1 -1
  109. package/dist/components/CuiInputStepper.vue.js +5 -187
  110. package/dist/components/CuiInputStepper.vue2.js +237 -2
  111. package/dist/components/CuiKbd.vue.d.ts.map +1 -1
  112. package/dist/components/CuiKbd.vue.js +6 -5
  113. package/dist/components/CuiMaskedInput.vue.d.ts +9 -3
  114. package/dist/components/CuiMaskedInput.vue.d.ts.map +1 -1
  115. package/dist/components/CuiMaskedInput.vue.js +132 -117
  116. package/dist/components/CuiModal.vue.d.ts +10 -2
  117. package/dist/components/CuiModal.vue.d.ts.map +1 -1
  118. package/dist/components/CuiModal.vue.js +2 -2
  119. package/dist/components/CuiModal.vue2.js +48 -44
  120. package/dist/components/CuiModalBody.vue.d.ts.map +1 -1
  121. package/dist/components/CuiModalBody.vue.js +16 -13
  122. package/dist/components/CuiModalFooter.vue.d.ts.map +1 -1
  123. package/dist/components/CuiModalFooter.vue.js +3 -2
  124. package/dist/components/CuiModalHeader.vue.d.ts +13 -4
  125. package/dist/components/CuiModalHeader.vue.d.ts.map +1 -1
  126. package/dist/components/CuiModalHeader.vue.js +54 -42
  127. package/dist/components/CuiPagination.vue.js +2 -2
  128. package/dist/components/CuiPopover.vue.d.ts.map +1 -1
  129. package/dist/components/CuiPopover.vue.js +81 -76
  130. package/dist/components/CuiRadio.vue.d.ts +2 -4
  131. package/dist/components/CuiRadio.vue.d.ts.map +1 -1
  132. package/dist/components/CuiRadio.vue.js +2 -2
  133. package/dist/components/CuiRadio.vue2.js +88 -74
  134. package/dist/components/CuiRadioGroup.vue.d.ts +2 -2
  135. package/dist/components/CuiRadioGroup.vue.d.ts.map +1 -1
  136. package/dist/components/CuiRadioGroup.vue.js +3 -3
  137. package/dist/components/CuiRadioGroup.vue2.js +47 -37
  138. package/dist/components/CuiRating.vue.d.ts.map +1 -1
  139. package/dist/components/CuiRating.vue.js +15 -14
  140. package/dist/components/CuiResizablePanels.vue.d.ts.map +1 -1
  141. package/dist/components/CuiResizablePanels.vue.js +10 -9
  142. package/dist/components/CuiSelect.vue.d.ts +2 -2
  143. package/dist/components/CuiSelect.vue.d.ts.map +1 -1
  144. package/dist/components/CuiSelect.vue.js +2 -2
  145. package/dist/components/CuiSelect.vue2.js +161 -151
  146. package/dist/components/CuiSkeleton.vue.js +2 -2
  147. package/dist/components/CuiSkeleton.vue2.js +10 -10
  148. package/dist/components/CuiSlideover.vue.d.ts +2 -2
  149. package/dist/components/CuiSlideover.vue.d.ts.map +1 -1
  150. package/dist/components/CuiSlideover.vue.js +34 -30
  151. package/dist/components/CuiSlider.vue.d.ts +2 -2
  152. package/dist/components/CuiSlider.vue.d.ts.map +1 -1
  153. package/dist/components/CuiSlider.vue.js +67 -54
  154. package/dist/components/CuiSpinner.vue.d.ts.map +1 -1
  155. package/dist/components/CuiSpinner.vue.js +5 -4
  156. package/dist/components/CuiTable.vue.d.ts.map +1 -1
  157. package/dist/components/CuiTable.vue.js +4 -1
  158. package/dist/components/CuiTableBody.vue.d.ts.map +1 -1
  159. package/dist/components/CuiTableBody.vue.js +6 -6
  160. package/dist/components/CuiTableCell.vue.d.ts.map +1 -1
  161. package/dist/components/CuiTableCell.vue.js +11 -10
  162. package/dist/components/CuiTableFoot.vue.d.ts.map +1 -1
  163. package/dist/components/CuiTableFoot.vue.js +7 -7
  164. package/dist/components/CuiTableHead.vue.d.ts.map +1 -1
  165. package/dist/components/CuiTableHead.vue.js +7 -7
  166. package/dist/components/CuiTabs.vue.d.ts.map +1 -1
  167. package/dist/components/CuiTabs.vue.js +1 -1
  168. package/dist/components/CuiTabs.vue2.js +1 -0
  169. package/dist/components/CuiTagInput.vue.d.ts +2 -2
  170. package/dist/components/CuiTagInput.vue.d.ts.map +1 -1
  171. package/dist/components/CuiTagInput.vue.js +5 -294
  172. package/dist/components/CuiTagInput.vue2.js +277 -2
  173. package/dist/components/CuiTextarea.vue.d.ts +2 -2
  174. package/dist/components/CuiTextarea.vue.d.ts.map +1 -1
  175. package/dist/components/CuiTextarea.vue.js +4 -4
  176. package/dist/components/CuiTextarea.vue2.js +73 -59
  177. package/dist/components/CuiTimePicker.vue.d.ts +2 -2
  178. package/dist/components/CuiTimePicker.vue.d.ts.map +1 -1
  179. package/dist/components/CuiTimePicker.vue.js +173 -95
  180. package/dist/components/CuiTimeline.vue.d.ts.map +1 -1
  181. package/dist/components/CuiTimeline.vue.js +6 -5
  182. package/dist/components/CuiTimelineItem.vue.d.ts.map +1 -1
  183. package/dist/components/CuiTimelineItem.vue.js +11 -10
  184. package/dist/components/CuiToast.vue.d.ts +8 -10
  185. package/dist/components/CuiToast.vue.d.ts.map +1 -1
  186. package/dist/components/CuiToast.vue.js +2 -2
  187. package/dist/components/CuiToast.vue2.js +69 -67
  188. package/dist/components/CuiToggle.vue.d.ts +2 -2
  189. package/dist/components/CuiToggle.vue.d.ts.map +1 -1
  190. package/dist/components/CuiToggle.vue.js +2 -2
  191. package/dist/components/CuiToggle.vue2.js +71 -59
  192. package/dist/components/CuiToggleGroup.vue.d.ts +2 -2
  193. package/dist/components/CuiToggleGroup.vue.d.ts.map +1 -1
  194. package/dist/components/CuiToggleGroup.vue.js +2 -2
  195. package/dist/components/CuiToggleGroup.vue2.js +45 -35
  196. package/dist/components/CuiTooltip.vue.d.ts.map +1 -1
  197. package/dist/components/CuiTooltip.vue.js +2 -2
  198. package/dist/components/CuiTooltip.vue2.js +47 -44
  199. package/dist/components/CuiTransferList.vue.d.ts.map +1 -1
  200. package/dist/components/CuiTransferList.vue.js +31 -30
  201. package/dist/components/CuiTreeNode.vue.d.ts +9 -2
  202. package/dist/components/CuiTreeNode.vue.d.ts.map +1 -1
  203. package/dist/components/CuiTreeNode.vue.js +5 -179
  204. package/dist/components/CuiTreeNode.vue2.js +198 -2
  205. package/dist/components/CuiTreeView.vue.d.ts +33 -5
  206. package/dist/components/CuiTreeView.vue.d.ts.map +1 -1
  207. package/dist/components/CuiTreeView.vue.js +187 -44
  208. package/dist/composables/useCalendarKeyboard.d.ts +48 -0
  209. package/dist/composables/useCalendarKeyboard.d.ts.map +1 -0
  210. package/dist/composables/useCalendarKeyboard.js +91 -0
  211. package/dist/composables/useFieldDescribedBy.d.ts +30 -0
  212. package/dist/composables/useFieldDescribedBy.d.ts.map +1 -0
  213. package/dist/composables/useFieldDescribedBy.js +11 -0
  214. package/dist/composables/useMessages.d.ts.map +1 -1
  215. package/dist/composables/useMessages.js +6 -6
  216. package/dist/composables/usePopover.d.ts.map +1 -1
  217. package/dist/composables/usePopover.js +10 -0
  218. package/dist/composables/useScrollShadows.d.ts +3 -0
  219. package/dist/composables/useScrollShadows.d.ts.map +1 -1
  220. package/dist/composables/useScrollShadows.js +15 -12
  221. package/dist/composables/useTheme.d.ts.map +1 -1
  222. package/dist/composables/useTheme.js +25 -21
  223. package/dist/icons/builtin.d.ts.map +1 -1
  224. package/dist/icons/builtin.js +38 -37
  225. package/dist/index.d.ts +3 -2
  226. package/dist/index.d.ts.map +1 -1
  227. package/dist/index.js +185 -182
  228. package/dist/messages.d.ts +39 -4
  229. package/dist/messages.d.ts.map +1 -1
  230. package/dist/messages.js +8 -7
  231. package/dist/types/common.d.ts +90 -0
  232. package/dist/types/common.d.ts.map +1 -1
  233. package/dist/utils/colorIconMap.d.ts +47 -3
  234. package/dist/utils/colorIconMap.d.ts.map +1 -1
  235. package/dist/utils/colorIconMap.js +20 -5
  236. package/dist/utils/date.d.ts +13 -0
  237. package/dist/utils/date.d.ts.map +1 -1
  238. package/dist/utils/date.js +46 -40
  239. package/dist/utils/sizing.d.ts +26 -1
  240. package/dist/utils/sizing.d.ts.map +1 -1
  241. package/dist/utils/sizing.js +22 -21
  242. package/dist/version.js +1 -1
  243. package/package.json +1 -2
@@ -1,15 +1,13 @@
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 = {
1
+ import { defineComponent as q, useTemplateRef as D, computed as m, onMounted as I, nextTick as v, watch as $, withDirectives as A, openBlock as i, createElementBlock as l, createElementVNode as w, normalizeStyle as N, normalizeClass as B, unref as L, toDisplayString as f, createCommentVNode as R, vShow as W } from "vue";
2
+ import { TEXTAREA_SIZE_SCALE as O } from "../utils/sizing.js";
3
+ import { useFieldDescribedBy as X } from "../composables/useFieldDescribedBy.js";
4
+ const Y = { class: "cui-textarea-wrapper" }, Z = ["id", "name", "autocomplete", "aria-describedby", "aria-required", "aria-labelledby", "value", "placeholder", "disabled", "readonly", "rows", "aria-invalid"], j = {
4
5
  key: 0,
5
6
  class: "cui-textarea__footer"
6
- }, Y = {
7
- key: 0,
8
- class: "cui-textarea__error"
9
- }, Z = {
7
+ }, G = ["id"], J = {
10
8
  key: 1,
11
9
  class: "cui-textarea__spacer"
12
- }, G = /* @__PURE__ */ k({
10
+ }, U = /* @__PURE__ */ q({
13
11
  __name: "CuiTextarea",
14
12
  props: {
15
13
  modelValue: { default: "" },
@@ -22,69 +20,81 @@ const W = { class: "cui-textarea-wrapper" }, O = ["value", "placeholder", "disab
22
20
  errorMessage: {},
23
21
  readonly: { type: Boolean, default: !1 },
24
22
  rounded: { default: "md" },
23
+ name: {},
24
+ autocomplete: {},
25
+ id: {},
26
+ ariaDescribedby: {},
27
+ ariaLabelledby: {},
28
+ ariaRequired: { type: Boolean },
25
29
  hidden: { type: Boolean, default: !1 },
26
30
  color: { default: "primary" },
27
31
  size: { default: "md" },
28
32
  disabled: { type: Boolean, default: !1 }
29
33
  },
30
34
  emits: ["update:modelValue"],
31
- setup(e, { expose: C, emit: L }) {
32
- const R = {
35
+ setup(e, { expose: z, emit: C }) {
36
+ const S = {
33
37
  none: "0",
34
- sm: "0.25rem",
35
- md: "var(--cui-button-radius, 0.375rem)",
36
- lg: "0.5rem",
38
+ sm: "var(--cui-radius-sm, 0.25rem)",
39
+ md: "var(--cui-button-radius, var(--cui-radius-md, 0.375rem))",
40
+ lg: "var(--cui-radius-lg, 0.5rem)",
37
41
  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);
42
+ }, t = e, { errorId: T, describedBy: E } = X(t), M = C, d = D("textareaEl"), h = m(() => t.modelValue.length), u = m(() => t.maxLength !== void 0 && h.value > t.maxLength);
43
+ function V(a) {
44
+ const r = a.target;
45
+ let o = r.value;
46
+ t.maxLength !== void 0 && o.length > t.maxLength && (o = o.slice(0, t.maxLength), r.value = o), M("update:modelValue", o), t.autoResize && v(n);
43
47
  }
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";
48
+ function n() {
49
+ const a = d.value;
50
+ if (!a) return;
51
+ a.style.height = "auto";
52
+ const r = parseFloat(getComputedStyle(a).lineHeight) || 20, o = parseFloat(getComputedStyle(a).paddingTop) || 0, g = parseFloat(getComputedStyle(a).paddingBottom) || 0, y = parseFloat(getComputedStyle(a).borderTopWidth) || 0, x = parseFloat(getComputedStyle(a).borderBottomWidth) || 0, F = r * t.rows + o + g + y + x;
53
+ let s = 1 / 0;
54
+ t.maxRows && (s = r * t.maxRows + o + g + y + x);
55
+ const b = a.scrollHeight, p = Math.min(Math.max(b, F), s);
56
+ a.style.height = `${p}px`, a.style.overflowY = b > s ? "auto" : "hidden";
53
57
  }
54
- F(() => {
55
- a.autoResize && f(u);
56
- }), $(() => a.modelValue, () => {
57
- a.autoResize && f(u);
58
+ I(() => {
59
+ t.autoResize && v(n);
60
+ }), $(() => t.modelValue, () => {
61
+ t.autoResize && v(n);
58
62
  });
59
- function T(t) {
60
- var o;
61
- (o = d.value) == null || o.focus(t);
63
+ function k(a) {
64
+ var r;
65
+ (r = d.value) == null || r.focus(a);
62
66
  }
63
- function E() {
64
- var t;
65
- (t = d.value) == null || t.blur();
67
+ function H() {
68
+ var a;
69
+ (a = d.value) == null || a.blur();
66
70
  }
67
- C({ el: d, focus: T, blur: E });
68
- const s = m(() => N[a.size]);
69
- return (t, o) => A((l(), i("div", W, [
71
+ z({ el: d, focus: k, blur: H });
72
+ const c = m(() => O[t.size]);
73
+ return (a, r) => A((i(), l("div", Y, [
70
74
  w("div", {
71
- class: z(["cui-textarea", {
72
- "cui-textarea--error": e.error || n.value,
75
+ class: B(["cui-textarea", {
76
+ "cui-textarea--error": e.error || u.value,
73
77
  "cui-textarea--disabled": e.disabled
74
78
  }]),
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,
79
+ style: N({
80
+ borderRadius: S[e.rounded],
81
+ "--_ta-px": c.value.px,
82
+ "--_ta-py": c.value.py,
83
+ "--_ta-font-size": c.value.fontSize,
80
84
  "--_ta-color": `var(--cui-${e.color})`,
81
85
  "--_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})`
86
+ "--_ta-border": e.error || u.value ? "var(--cui-error)" : "var(--cui-border-strong)",
87
+ "--_ta-focus-border": e.error || u.value ? "var(--cui-error)" : `var(--cui-${e.color})`
84
88
  })
85
89
  }, [
86
90
  w("textarea", {
87
91
  ref: "textareaEl",
92
+ id: e.id,
93
+ name: e.name,
94
+ autocomplete: e.autocomplete,
95
+ "aria-describedby": L(E),
96
+ "aria-required": e.ariaRequired || void 0,
97
+ "aria-labelledby": e.ariaLabelledby,
88
98
  value: e.modelValue,
89
99
  placeholder: e.placeholder,
90
100
  disabled: e.disabled,
@@ -92,21 +102,25 @@ const W = { class: "cui-textarea-wrapper" }, O = ["value", "placeholder", "disab
92
102
  rows: e.rows,
93
103
  "aria-invalid": e.error || void 0,
94
104
  class: "cui-textarea__native",
95
- onInput: p
96
- }, null, 40, O)
105
+ onInput: V
106
+ }, null, 40, Z)
97
107
  ], 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", {
108
+ e.error && e.errorMessage || e.maxLength !== void 0 ? (i(), l("div", j, [
109
+ e.error && e.errorMessage ? (i(), l("div", {
110
+ key: 0,
111
+ id: L(T),
112
+ class: "cui-textarea__error"
113
+ }, f(e.errorMessage), 9, G)) : (i(), l("div", J)),
114
+ e.maxLength !== void 0 ? (i(), l("div", {
101
115
  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)
116
+ class: B(["cui-textarea__counter", { "cui-textarea__counter--over": u.value }])
117
+ }, f(h.value) + "/" + f(e.maxLength), 3)) : R("", !0)
118
+ ])) : R("", !0)
105
119
  ], 512)), [
106
- [D, !e.hidden]
120
+ [W, !e.hidden]
107
121
  ]);
108
122
  }
109
123
  });
110
124
  export {
111
- G as default
125
+ U as default
112
126
  };
@@ -1,6 +1,6 @@
1
- import type { HideableProps, DisableableProps } from "../types/common";
1
+ import type { HideableProps, DisableableProps, NativeControlProps } from "../types/common";
2
2
  export type TimePickerFormat = "12" | "24";
3
- export interface CuiTimePickerProps extends HideableProps, DisableableProps {
3
+ export interface CuiTimePickerProps extends NativeControlProps, HideableProps, DisableableProps {
4
4
  /** Time value as "HH:mm" (24h) or "hh:mm AM/PM" (12h) */
5
5
  modelValue?: string;
6
6
  /** Clock format */
@@ -1 +1 @@
1
- {"version":3,"file":"CuiTimePicker.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTimePicker.vue"],"names":[],"mappings":"AAiRA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,MAAM,WAAW,kBAAmB,SAAQ,aAAa,EAAE,gBAAgB;IACzE,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB;IACnB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,4BAA4B;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,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GjC;AAED,iBAAS,IAAI,SAEZ;;;;;;;;;;;UAjQQ,IAAI,GAAG,IAAI,GAAG,IAAI;;gBAZZ,MAAM;YAEV,gBAAgB;gBAEZ,MAAM;;AAgkBrB,wBASG"}
@@ -1,9 +1,10 @@
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 = {
1
+ import { defineComponent as X, computed as s, ref as b, watch as z, onMounted as Y, useTemplateRef as M, nextTick as _, withDirectives as ee, openBlock as w, createElementBlock as E, toDisplayString as T, createCommentVNode as D, createVNode as c, withCtx as g, createElementVNode as h, normalizeStyle as A, withKeys as te, withModifiers as ae, createTextVNode as I, vShow as re } from "vue";
2
+ import ie from "./CuiPopover.vue.js";
3
+ import B from "./CuiInputStepper.vue.js";
4
+ import R from "./CuiButton.vue.js";
5
+ import le from "./CuiIcon.vue.js";
6
+ import { INPUT_SIZE_SCALE as ne } from "../utils/sizing.js";
7
+ const oe = {
7
8
  key: 0,
8
9
  style: {
9
10
  display: "block",
@@ -12,10 +13,10 @@ const J = {
12
13
  fontWeight: "500",
13
14
  color: "var(--cui-text-secondary)"
14
15
  }
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
+ }, ue = ["aria-expanded", "aria-disabled", "id", "aria-describedby", "aria-required", "aria-labelledby", "tabindex"], de = {
16
17
  key: 0,
17
18
  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
+ }, be = /* @__PURE__ */ X({
19
20
  __name: "CuiTimePicker",
20
21
  props: {
21
22
  modelValue: { default: "" },
@@ -26,168 +27,245 @@ const J = {
26
27
  placeholder: {},
27
28
  size: { default: "md" },
28
29
  label: {},
30
+ name: {},
31
+ autocomplete: {},
32
+ id: {},
33
+ ariaDescribedby: {},
34
+ ariaLabelledby: {},
35
+ ariaRequired: { type: Boolean },
29
36
  hidden: { type: Boolean, default: !1 },
30
37
  disabled: { type: Boolean, default: !1 }
31
38
  },
32
39
  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;
40
+ setup(a, { expose: W, emit: q }) {
41
+ const r = a, x = s(() => ne[r.size]), L = q, o = b(12), d = b(0), l = b("AM"), u = b(!1);
42
+ function S(e) {
43
+ if (!e) return;
44
+ const t = e.match(/^(\d{1,2}):(\d{2})$/);
45
+ if (t) {
46
+ const n = parseInt(t[1]), y = parseInt(t[2]);
47
+ r.format === "12" ? (l.value = n >= 12 ? "PM" : "AM", o.value = n === 0 ? 12 : n > 12 ? n - 12 : n) : o.value = n, d.value = y;
41
48
  return;
42
49
  }
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());
50
+ const i = e.match(/^(\d{1,2}):(\d{2})\s*(AM|PM)$/i);
51
+ i && (o.value = parseInt(i[1]), d.value = parseInt(i[2]), l.value = i[3].toUpperCase());
45
52
  }
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}`;
53
+ z(() => r.modelValue, S), Y(() => S(r.modelValue));
54
+ function $() {
55
+ return r.format === "24" ? `${String(o.value).padStart(2, "0")}:${String(d.value).padStart(2, "0")}` : `${String(o.value).padStart(2, "0")}:${String(d.value).padStart(2, "0")} ${l.value}`;
49
56
  }
50
57
  function m() {
51
- I("update:modelValue", S());
58
+ L("update:modelValue", $());
52
59
  }
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")
60
+ const V = s(() => r.modelValue ? $() : "");
61
+ s(() => r.format === "24" ? "##:##" : "##:## AA");
62
+ const K = s(
63
+ () => r.placeholder ?? (r.format === "24" ? "hh:mm" : "hh:mm AM")
57
64
  );
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();
65
+ s(() => r.modelValue ? r.format === "24" ? `${String(o.value).padStart(2, "0")}${String(d.value).padStart(2, "0")}` : `${String(o.value).padStart(2, "0")}${String(d.value).padStart(2, "0")}${l.value}` : "");
66
+ const N = s(() => r.format === "12" ? 1 : 0), U = s(() => r.format === "12" ? 12 : 23);
67
+ function F(e) {
68
+ o.value = e, m();
62
69
  }
63
- function N(t) {
64
- o.value = t, m();
70
+ function H(e) {
71
+ d.value = e, m();
65
72
  }
66
- V(y, (t) => {
67
- t && b(a.modelValue);
68
- });
69
- const c = O("rootEl");
70
- function R(t) {
73
+ const k = M("panelEl");
74
+ let v = [];
75
+ function P() {
71
76
  var e;
72
- (e = c.value) == null || e.focus(t);
77
+ return v.length === 0 && (v = [...((e = k.value) == null ? void 0 : e.querySelectorAll('[role="spinbutton"], .cui-time-picker__period')) ?? []]), v;
73
78
  }
74
- function U() {
79
+ function O(e) {
80
+ var y, C;
81
+ if (e.key === "Enter") {
82
+ ((y = document.activeElement) == null ? void 0 : y.classList.contains(
83
+ "cui-time-picker__period"
84
+ )) || e.preventDefault(), requestAnimationFrame(() => {
85
+ m(), u.value = !1;
86
+ });
87
+ return;
88
+ }
89
+ if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
90
+ const t = P(), i = t.indexOf(document.activeElement);
91
+ if (i === -1) return;
92
+ e.preventDefault();
93
+ const n = i + (e.key === "ArrowRight" ? 1 : -1);
94
+ (C = t[Math.min(t.length - 1, Math.max(0, n))]) == null || C.focus({ preventScroll: !0 });
95
+ }
96
+ function Z() {
97
+ var e;
98
+ v = [], (e = P()[0]) == null || e.focus({ preventScroll: !0 });
99
+ }
100
+ function j() {
101
+ var i, n;
102
+ const e = document.activeElement;
103
+ (e === document.body || e && ((i = k.value) != null && i.contains(e))) && ((n = p.value) == null || n.focus({ preventScroll: !0 }));
104
+ }
105
+ z(u, (e) => {
106
+ if (!e) {
107
+ v = [], j();
108
+ return;
109
+ }
110
+ S(r.modelValue), _(() => Z());
111
+ });
112
+ const f = M("rootEl"), p = M("triggerEl");
113
+ function G(e) {
114
+ if (!r.disabled) {
115
+ if (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") {
116
+ e.preventDefault(), u.value = !0;
117
+ return;
118
+ }
119
+ e.key === "Escape" && u.value && (e.preventDefault(), u.value = !1);
120
+ }
121
+ }
122
+ function J(e) {
75
123
  var t;
76
- (t = c.value) == null || t.blur();
124
+ (t = p.value ?? f.value) == null || t.focus(e);
125
+ }
126
+ function Q() {
127
+ var e;
128
+ (e = p.value ?? f.value) == null || e.blur();
77
129
  }
78
- return w({ el: c, focus: R, blur: U }), (t, e) => j((g(), h("div", {
130
+ return W({ el: f, focus: J, blur: Q }), (e, t) => ee((w(), E("div", {
131
+ class: "cui-time-picker",
79
132
  ref_key: "rootEl",
80
- ref: c
133
+ ref: f
81
134
  }, [
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),
135
+ a.label ? (w(), E("label", oe, T(a.label), 1)) : D("", !0),
136
+ c(ie, {
137
+ visible: u.value,
138
+ "onUpdate:visible": t[3] || (t[3] = (i) => u.value = i),
86
139
  placement: "bottom",
87
140
  closable: !1,
88
141
  "no-arrow": "",
89
142
  width: "auto",
90
- disabled: l.disabled
143
+ disabled: a.disabled
91
144
  }, {
92
- content: f(() => [
93
- p("div", K, [
94
- s(C, {
95
- "model-value": i.value,
96
- min: W.value,
97
- max: B.value,
145
+ content: g(() => [
146
+ h("div", {
147
+ ref_key: "panelEl",
148
+ ref: k,
149
+ class: "cui-time-picker__panel",
150
+ onKeydown: [
151
+ t[2] || (t[2] = te(ae((i) => u.value = !1, ["prevent", "stop"]), ["escape"])),
152
+ O
153
+ ],
154
+ style: { display: "flex", alignItems: "center", gap: "calc(0.5rem * var(--cui-density-scale, 1))", padding: "calc(0.5rem * var(--cui-density-scale, 1))" }
155
+ }, [
156
+ c(B, {
157
+ "model-value": o.value,
158
+ min: N.value,
159
+ max: U.value,
98
160
  step: 1,
99
161
  orientation: "vertical",
100
162
  size: "sm",
101
163
  pad: 2,
102
164
  wrap: "",
103
- "onUpdate:modelValue": E
165
+ "onUpdate:modelValue": F
104
166
  }, 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,
167
+ t[6] || (t[6] = h("span", { style: { fontSize: "1.25rem", fontWeight: "700", color: "var(--cui-text-body)", lineHeight: "1" } }, ":", -1)),
168
+ c(B, {
169
+ "model-value": d.value,
108
170
  min: 0,
109
171
  max: 59,
110
- step: l.minuteStep,
172
+ step: a.minuteStep,
111
173
  orientation: "vertical",
112
174
  size: "sm",
113
175
  pad: 2,
114
176
  wrap: "",
115
- "onUpdate:modelValue": N
177
+ "onUpdate:modelValue": H
116
178
  }, null, 8, ["model-value", "step"]),
117
- l.format === "12" ? (g(), h("div", Q, [
118
- s(z, {
179
+ a.format === "12" ? (w(), E("div", de, [
180
+ c(R, {
119
181
  variant: "ghost",
120
182
  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",
183
+ style: A({
184
+ fontWeight: l.value === "AM" ? "700" : "400",
185
+ color: l.value === "AM" ? "var(--cui-primary)" : "var(--cui-text-tertiary)",
186
+ background: l.value === "AM" ? "var(--cui-primary-bg)" : "transparent",
125
187
  borderRadius: "0.25rem",
126
188
  minWidth: "2.5rem"
127
189
  }),
128
- onClick: e[0] || (e[0] = (n) => {
129
- r.value = "AM", m();
190
+ class: "cui-time-picker__period",
191
+ onClick: t[0] || (t[0] = (i) => {
192
+ l.value = "AM", m();
130
193
  })
131
194
  }, {
132
- default: f(() => [...e[3] || (e[3] = [
133
- A("AM", -1)
195
+ default: g(() => [...t[4] || (t[4] = [
196
+ I("AM", -1)
134
197
  ])]),
135
198
  _: 1
136
199
  }, 8, ["style"]),
137
- s(z, {
200
+ c(R, {
138
201
  variant: "ghost",
139
202
  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",
203
+ style: A({
204
+ fontWeight: l.value === "PM" ? "700" : "400",
205
+ color: l.value === "PM" ? "var(--cui-primary)" : "var(--cui-text-tertiary)",
206
+ background: l.value === "PM" ? "var(--cui-primary-bg)" : "transparent",
144
207
  borderRadius: "0.25rem",
145
208
  minWidth: "2.5rem"
146
209
  }),
147
- onClick: e[1] || (e[1] = (n) => {
148
- r.value = "PM", m();
210
+ class: "cui-time-picker__period",
211
+ onClick: t[1] || (t[1] = (i) => {
212
+ l.value = "PM", m();
149
213
  })
150
214
  }, {
151
- default: f(() => [...e[4] || (e[4] = [
152
- A("PM", -1)
215
+ default: g(() => [...t[5] || (t[5] = [
216
+ I("PM", -1)
153
217
  ])]),
154
218
  _: 1
155
219
  }, 8, ["style"])
156
- ])) : k("", !0)
157
- ])
220
+ ])) : D("", !0)
221
+ ], 544)
158
222
  ]),
159
- default: f(() => [
160
- p("div", {
161
- style: x({
223
+ default: g(() => [
224
+ h("div", {
225
+ ref_key: "triggerEl",
226
+ ref: p,
227
+ class: "cui-time-picker__trigger",
228
+ role: "combobox",
229
+ "aria-haspopup": "dialog",
230
+ "aria-expanded": u.value,
231
+ "aria-disabled": a.disabled || void 0,
232
+ id: a.id,
233
+ "aria-describedby": a.ariaDescribedby,
234
+ "aria-required": a.ariaRequired || void 0,
235
+ "aria-labelledby": a.ariaLabelledby,
236
+ tabindex: a.disabled ? -1 : 0,
237
+ onKeydown: G,
238
+ style: A({
162
239
  display: "inline-flex",
163
240
  alignItems: "center",
164
241
  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))",
242
+ height: x.value.height,
243
+ padding: `0 ${x.value.px}`,
166
244
  border: "1px solid var(--cui-border-strong, var(--cui-border))",
167
- borderRadius: "var(--cui-button-radius, 0.375rem)",
245
+ borderRadius: "var(--cui-button-radius, var(--cui-radius-md, 0.375rem))",
168
246
  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"
247
+ cursor: a.disabled ? "default" : "pointer",
248
+ opacity: a.disabled ? "0.5" : "1",
249
+ fontSize: x.value.fontSize,
250
+ color: V.value ? "var(--cui-text-body)" : "var(--cui-text-tertiary)",
251
+ minWidth: a.format === "24" ? "6rem" : "8rem"
174
252
  })
175
253
  }, [
176
- s(G, {
254
+ c(le, {
177
255
  name: "clock",
178
256
  size: "0.875rem",
179
257
  style: { color: "var(--cui-text-tertiary)", flexShrink: "0" }
180
258
  }),
181
- p("span", null, $(M.value || T.value), 1)
182
- ], 4)
259
+ h("span", null, T(V.value || K.value), 1)
260
+ ], 44, ue)
183
261
  ]),
184
262
  _: 1
185
263
  }, 8, ["visible", "disabled"])
186
264
  ], 512)), [
187
- [q, !l.hidden]
265
+ [re, !a.hidden]
188
266
  ]);
189
267
  }
190
268
  });
191
269
  export {
192
- te as default
270
+ be as default
193
271
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CuiTimeline.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTimeline.vue"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,kCAAkC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAgCD,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;AAoB/C,QAAA,MAAM,eAAe;;aAvDT,OAAO;6EA8DjB,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":"CuiTimeline.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTimeline.vue"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,kCAAkC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAkCD,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;AAoB/C,QAAA,MAAM,eAAe;;aAzDT,OAAO;6EAgEjB,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,5 +1,6 @@
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 = {
1
+ import { defineComponent as o, withDirectives as l, openBlock as i, createElementBlock as n, renderSlot as s, vShow as a } from "vue";
2
+ const c = {
3
+ class: "cui-timeline",
3
4
  style: {
4
5
  display: "flex",
5
6
  flexDirection: "column",
@@ -13,10 +14,10 @@ const r = {
13
14
  hidden: { type: Boolean, default: !1 }
14
15
  },
15
16
  setup(e) {
16
- return (t, c) => l((i(), n("div", r, [
17
- a(t.$slots, "default")
17
+ return (t, r) => l((i(), n("div", c, [
18
+ s(t.$slots, "default")
18
19
  ], 512)), [
19
- [s, !e.hidden]
20
+ [a, !e.hidden]
20
21
  ]);
21
22
  }
22
23
  });
@@ -1 +1 @@
1
- {"version":3,"file":"CuiTimelineItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTimelineIt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