@itguy614/clean-ui 0.9.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) 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.js +7 -0
  8. package/dist/components/CuiAlert.vue2.js +110 -0
  9. package/dist/components/CuiAvatar.vue.js +99 -0
  10. package/dist/components/CuiAvatar.vue3.js +5 -0
  11. package/dist/components/CuiAvatarGroup.vue.js +22 -0
  12. package/dist/components/CuiAvatarGroup.vue3.js +5 -0
  13. package/dist/components/CuiBackdrop.vue.js +7 -0
  14. package/dist/components/CuiBackdrop.vue2.js +49 -0
  15. package/dist/components/CuiBadge.vue.js +7 -0
  16. package/dist/components/CuiBadge.vue2.js +79 -0
  17. package/dist/components/CuiBanner.vue.js +81 -0
  18. package/dist/components/CuiBanner.vue2.js +4 -0
  19. package/dist/components/CuiBreadcrumb.vue.js +7 -0
  20. package/dist/components/CuiBreadcrumb.vue2.js +29 -0
  21. package/dist/components/CuiBreadcrumbItem.vue.js +7 -0
  22. package/dist/components/CuiBreadcrumbItem.vue2.js +46 -0
  23. package/dist/components/CuiButton.vue.js +7 -0
  24. package/dist/components/CuiButton.vue2.js +133 -0
  25. package/dist/components/CuiButtonGroup.vue.js +7 -0
  26. package/dist/components/CuiButtonGroup.vue2.js +21 -0
  27. package/dist/components/CuiCard.vue.js +35 -0
  28. package/dist/components/CuiCard.vue2.js +4 -0
  29. package/dist/components/CuiCardBody.vue.js +20 -0
  30. package/dist/components/CuiCardBody.vue2.js +4 -0
  31. package/dist/components/CuiCardFooter.vue.js +32 -0
  32. package/dist/components/CuiCardFooter.vue2.js +4 -0
  33. package/dist/components/CuiCardHeader.vue.js +51 -0
  34. package/dist/components/CuiCardHeader.vue2.js +4 -0
  35. package/dist/components/CuiCardMedia.vue.js +7 -0
  36. package/dist/components/CuiCardMedia.vue2.js +38 -0
  37. package/dist/components/CuiCheckbox.vue.js +7 -0
  38. package/dist/components/CuiCheckbox.vue2.js +105 -0
  39. package/dist/components/CuiCheckboxGroup.vue.js +7 -0
  40. package/dist/components/CuiCheckboxGroup.vue2.js +59 -0
  41. package/dist/components/CuiCodeBlock.vue.js +129 -0
  42. package/dist/components/CuiCodeBlock.vue2.js +4 -0
  43. package/dist/components/CuiColorPicker.vue.js +348 -0
  44. package/dist/components/CuiColorPicker.vue2.js +4 -0
  45. package/dist/components/CuiCombobox.vue.js +332 -0
  46. package/dist/components/CuiCombobox.vue2.js +4 -0
  47. package/dist/components/CuiConfigProvider.vue.js +18 -0
  48. package/dist/components/CuiConfigProvider.vue2.js +4 -0
  49. package/dist/components/CuiConfirmDialog.vue.js +208 -0
  50. package/dist/components/CuiConfirmDialog.vue2.js +4 -0
  51. package/dist/components/CuiContainer.vue.js +35 -0
  52. package/dist/components/CuiContainer.vue2.js +4 -0
  53. package/dist/components/CuiContextMenu.vue.js +7 -0
  54. package/dist/components/CuiContextMenu.vue2.js +136 -0
  55. package/dist/components/CuiCopyButton.vue.js +63 -0
  56. package/dist/components/CuiCopyButton.vue2.js +4 -0
  57. package/dist/components/CuiDataGrid.vue.js +176 -0
  58. package/dist/components/CuiDataGrid.vue3.js +5 -0
  59. package/dist/components/CuiDataGridActiveFilters.vue.js +47 -0
  60. package/dist/components/CuiDataGridActiveFilters.vue3.js +5 -0
  61. package/dist/components/CuiDataGridBulkBar.vue.d.ts.map +1 -1
  62. package/dist/components/CuiDataGridBulkBar.vue.js +70 -0
  63. package/dist/components/CuiDataGridBulkBar.vue3.js +5 -0
  64. package/dist/components/CuiDataGridCardView.vue.js +31 -0
  65. package/dist/components/CuiDataGridCardView.vue2.js +4 -0
  66. package/dist/components/CuiDataGridColumnManager.vue.js +86 -0
  67. package/dist/components/CuiDataGridColumnManager.vue2.js +4 -0
  68. package/dist/components/CuiDataGridFilterPanel.vue.js +181 -0
  69. package/dist/components/CuiDataGridFilterPanel.vue3.js +5 -0
  70. package/dist/components/CuiDataGridPagination.vue.js +28 -0
  71. package/dist/components/CuiDataGridPagination.vue2.js +4 -0
  72. package/dist/components/CuiDataGridSearch.vue.js +69 -0
  73. package/dist/components/CuiDataGridSearch.vue2.js +4 -0
  74. package/dist/components/CuiDataGridTable.vue.js +336 -0
  75. package/dist/components/CuiDataGridTable.vue2.js +4 -0
  76. package/dist/components/CuiDataGridToolbar.vue.js +73 -0
  77. package/dist/components/CuiDataGridToolbar.vue3.js +5 -0
  78. package/dist/components/CuiDataGridViewManager.vue.js +209 -0
  79. package/dist/components/CuiDataGridViewManager.vue2.js +4 -0
  80. package/dist/components/CuiDataGridViewToggle.vue.js +43 -0
  81. package/dist/components/CuiDataGridViewToggle.vue3.js +5 -0
  82. package/dist/components/CuiDatePicker.vue.js +382 -0
  83. package/dist/components/CuiDatePicker.vue2.js +4 -0
  84. package/dist/components/CuiDateRangePicker.vue.js +376 -0
  85. package/dist/components/CuiDateRangePicker.vue2.js +4 -0
  86. package/dist/components/CuiDivider.vue.js +124 -0
  87. package/dist/components/CuiDivider.vue2.js +4 -0
  88. package/dist/components/CuiDropdown.vue.js +7 -0
  89. package/dist/components/CuiDropdown.vue2.js +110 -0
  90. package/dist/components/CuiDropdownCheckItem.vue.js +7 -0
  91. package/dist/components/CuiDropdownCheckItem.vue2.js +45 -0
  92. package/dist/components/CuiDropdownDivider.vue.js +14 -0
  93. package/dist/components/CuiDropdownHeader.vue.js +16 -0
  94. package/dist/components/CuiDropdownItem.vue.js +7 -0
  95. package/dist/components/CuiDropdownItem.vue2.js +55 -0
  96. package/dist/components/CuiDropdownMenu.vue.js +7 -0
  97. package/dist/components/CuiDropdownMenu.vue2.js +79 -0
  98. package/dist/components/CuiDropdownRadioGroup.vue.js +23 -0
  99. package/dist/components/CuiDropdownRadioGroup.vue2.js +4 -0
  100. package/dist/components/CuiDropdownRadioItem.vue.js +7 -0
  101. package/dist/components/CuiDropdownRadioItem.vue2.js +43 -0
  102. package/dist/components/CuiDropdownSub.vue.js +7 -0
  103. package/dist/components/CuiDropdownSub.vue2.js +91 -0
  104. package/dist/components/CuiDropdownTrigger.vue.js +7 -0
  105. package/dist/components/CuiDropdownTrigger.vue2.js +25 -0
  106. package/dist/components/CuiEmptyState.vue.js +7 -0
  107. package/dist/components/CuiEmptyState.vue2.js +70 -0
  108. package/dist/components/CuiFieldset.vue.js +7 -0
  109. package/dist/components/CuiFieldset.vue2.js +79 -0
  110. package/dist/components/CuiFileUpload.vue.js +254 -0
  111. package/dist/components/CuiFileUpload.vue2.js +4 -0
  112. package/dist/components/CuiFlex.vue.js +7 -0
  113. package/dist/components/CuiFlex.vue2.js +72 -0
  114. package/dist/components/CuiFlexItem.vue.js +35 -0
  115. package/dist/components/CuiFlexItem.vue2.js +4 -0
  116. package/dist/components/CuiForm.vue.js +116 -0
  117. package/dist/components/CuiForm.vue2.js +4 -0
  118. package/dist/components/CuiFormField.vue.js +7 -0
  119. package/dist/components/CuiFormField.vue2.js +73 -0
  120. package/dist/components/CuiGrid.vue.js +7 -0
  121. package/dist/components/CuiGrid.vue2.js +51 -0
  122. package/dist/components/CuiGridItem.vue.js +30 -0
  123. package/dist/components/CuiGridItem.vue2.js +4 -0
  124. package/dist/components/CuiIcon.vue.js +7 -0
  125. package/dist/components/CuiIcon.vue2.js +72 -0
  126. package/dist/components/CuiInput.vue.js +7 -0
  127. package/dist/components/CuiInput.vue2.js +148 -0
  128. package/dist/components/CuiInputStepper.vue.js +189 -0
  129. package/dist/components/CuiInputStepper.vue2.js +4 -0
  130. package/dist/components/CuiKbd.vue.js +44 -0
  131. package/dist/components/CuiKbd.vue2.js +4 -0
  132. package/dist/components/CuiMaskedInput.vue.js +256 -0
  133. package/dist/components/CuiMaskedInput.vue2.js +4 -0
  134. package/dist/components/CuiModal.vue.js +7 -0
  135. package/dist/components/CuiModal.vue2.js +98 -0
  136. package/dist/components/CuiModalBody.vue.js +50 -0
  137. package/dist/components/CuiModalBody.vue2.js +4 -0
  138. package/dist/components/CuiModalFooter.vue.js +36 -0
  139. package/dist/components/CuiModalFooter.vue2.js +4 -0
  140. package/dist/components/CuiModalHeader.vue.js +85 -0
  141. package/dist/components/CuiModalHeader.vue2.js +4 -0
  142. package/dist/components/CuiPagination.vue.js +7 -0
  143. package/dist/components/CuiPagination.vue2.js +136 -0
  144. package/dist/components/CuiPopover.vue.js +227 -0
  145. package/dist/components/CuiPopover.vue2.js +4 -0
  146. package/dist/components/CuiProgress.vue.js +7 -0
  147. package/dist/components/CuiProgress.vue2.js +132 -0
  148. package/dist/components/CuiRadio.vue.d.ts.map +1 -1
  149. package/dist/components/CuiRadio.vue.js +7 -0
  150. package/dist/components/CuiRadio.vue2.js +139 -0
  151. package/dist/components/CuiRadioGroup.vue.js +7 -0
  152. package/dist/components/CuiRadioGroup.vue2.js +78 -0
  153. package/dist/components/CuiRating.vue.js +129 -0
  154. package/dist/components/CuiRating.vue2.js +4 -0
  155. package/dist/components/CuiResizablePanels.vue.js +147 -0
  156. package/dist/components/CuiResizablePanels.vue2.js +4 -0
  157. package/dist/components/CuiSelect.vue.d.ts.map +1 -1
  158. package/dist/components/CuiSelect.vue.js +7 -0
  159. package/dist/components/CuiSelect.vue2.js +359 -0
  160. package/dist/components/CuiSkeleton.vue.js +7 -0
  161. package/dist/components/CuiSkeleton.vue2.js +80 -0
  162. package/dist/components/CuiSlideover.vue.js +109 -0
  163. package/dist/components/CuiSlideover.vue2.js +4 -0
  164. package/dist/components/CuiSlider.vue.js +156 -0
  165. package/dist/components/CuiSlider.vue2.js +4 -0
  166. package/dist/components/CuiSpacer.vue.js +32 -0
  167. package/dist/components/CuiSpacer.vue2.js +4 -0
  168. package/dist/components/CuiSpinner.vue.js +99 -0
  169. package/dist/components/CuiSpinner.vue3.js +5 -0
  170. package/dist/components/CuiStack.vue.js +30 -0
  171. package/dist/components/CuiStack.vue2.js +4 -0
  172. package/dist/components/CuiStepper.vue.js +153 -0
  173. package/dist/components/CuiStepper.vue2.js +4 -0
  174. package/dist/components/CuiTab.vue.js +7 -0
  175. package/dist/components/CuiTab.vue2.js +73 -0
  176. package/dist/components/CuiTable.vue.js +90 -0
  177. package/dist/components/CuiTable.vue3.js +5 -0
  178. package/dist/components/CuiTableBody.vue.js +18 -0
  179. package/dist/components/CuiTableBody.vue2.js +4 -0
  180. package/dist/components/CuiTableCell.vue.js +36 -0
  181. package/dist/components/CuiTableCell.vue2.js +4 -0
  182. package/dist/components/CuiTableFoot.vue.js +18 -0
  183. package/dist/components/CuiTableFoot.vue2.js +4 -0
  184. package/dist/components/CuiTableHead.vue.js +18 -0
  185. package/dist/components/CuiTableHead.vue2.js +4 -0
  186. package/dist/components/CuiTableRow.vue.js +23 -0
  187. package/dist/components/CuiTableRow.vue2.js +4 -0
  188. package/dist/components/CuiTabs.vue.js +7 -0
  189. package/dist/components/CuiTabs.vue2.js +124 -0
  190. package/dist/components/CuiTagInput.vue.js +296 -0
  191. package/dist/components/CuiTagInput.vue2.js +4 -0
  192. package/dist/components/CuiTextarea.vue.js +7 -0
  193. package/dist/components/CuiTextarea.vue2.js +112 -0
  194. package/dist/components/CuiTimePicker.vue.js +193 -0
  195. package/dist/components/CuiTimePicker.vue2.js +4 -0
  196. package/dist/components/CuiTimeline.vue.js +25 -0
  197. package/dist/components/CuiTimeline.vue2.js +4 -0
  198. package/dist/components/CuiTimelineItem.vue.js +113 -0
  199. package/dist/components/CuiTimelineItem.vue2.js +4 -0
  200. package/dist/components/CuiToast.vue.js +7 -0
  201. package/dist/components/CuiToast.vue2.js +129 -0
  202. package/dist/components/CuiToastProvider.vue.js +7 -0
  203. package/dist/components/CuiToastProvider.vue2.js +87 -0
  204. package/dist/components/CuiToggle.vue.d.ts.map +1 -1
  205. package/dist/components/CuiToggle.vue.js +7 -0
  206. package/dist/components/CuiToggle.vue2.js +116 -0
  207. package/dist/components/CuiToggleGroup.vue.js +7 -0
  208. package/dist/components/CuiToggleGroup.vue2.js +59 -0
  209. package/dist/components/CuiTooltip.vue.js +7 -0
  210. package/dist/components/CuiTooltip.vue2.js +128 -0
  211. package/dist/components/CuiTransferList.vue.js +442 -0
  212. package/dist/components/CuiTransferList.vue2.js +4 -0
  213. package/dist/components/CuiTreeNode.vue.js +180 -0
  214. package/dist/components/CuiTreeNode.vue2.js +4 -0
  215. package/dist/components/CuiTreeView.vue.js +73 -0
  216. package/dist/components/CuiTreeView.vue2.js +4 -0
  217. package/dist/components/accordion-context.js +4 -0
  218. package/dist/components/breadcrumb-context.js +4 -0
  219. package/dist/components/config-context.js +4 -0
  220. package/dist/components/data-grid-context.js +4 -0
  221. package/dist/components/dropdown-context.js +30 -0
  222. package/dist/components/form-context.js +4 -0
  223. package/dist/components/multi-select-group-context.js +5 -0
  224. package/dist/components/radio-context.js +4 -0
  225. package/dist/components/table-context.js +5 -0
  226. package/dist/components/tabs-context.js +4 -0
  227. package/dist/components/toast-context.js +45 -0
  228. package/dist/composables/useBreakpoint.js +34 -0
  229. package/dist/composables/useClickOutside.js +14 -0
  230. package/dist/composables/useCopyToClipboard.js +25 -0
  231. package/dist/composables/useDataGrid.js +269 -0
  232. package/dist/composables/useDataGridInertia.js +35 -0
  233. package/dist/composables/useDataGridViews.js +67 -0
  234. package/dist/composables/useDensity.js +42 -0
  235. package/dist/composables/useLayoutContext.js +21 -0
  236. package/dist/composables/useMessages.js +10 -0
  237. package/dist/composables/useOverlay.js +57 -0
  238. package/dist/composables/usePopover.js +53 -0
  239. package/dist/composables/useScrollShadows.js +56 -0
  240. package/dist/composables/useTheme.js +57 -0
  241. package/dist/composables/useToast.js +23 -0
  242. package/dist/composables/useVirtualScroll.js +69 -0
  243. package/dist/index.js +290 -0
  244. package/dist/messages.js +57 -0
  245. package/dist/ssr-theme-init.js +13 -0
  246. package/dist/utils/color.js +195 -0
  247. package/dist/utils/colorIconMap.js +11 -0
  248. package/dist/utils/date.js +114 -0
  249. package/dist/utils/liveRegion.js +12 -0
  250. package/dist/utils/resolvers.js +28 -0
  251. package/dist/utils/responsive.js +68 -0
  252. package/dist/utils/sizing.js +39 -0
  253. package/package.json +8 -7
  254. package/dist/clean-ui.js +0 -11937
  255. package/dist/clean-ui.umd.cjs +0 -11
@@ -0,0 +1,136 @@
1
+ import { defineComponent as F, computed as n, withDirectives as L, openBlock as r, createElementBlock as u, normalizeClass as p, toDisplayString as x, unref as T, createCommentVNode as $, createElementVNode as v, createVNode as k, Fragment as B, renderList as U, normalizeStyle as R, vShow as W } from "vue";
2
+ import N from "./CuiIcon.vue.js";
3
+ import Z from "./CuiSelect.vue.js";
4
+ import { clampSize as j } from "../utils/sizing.js";
5
+ import { useMessages as q } from "../composables/useMessages.js";
6
+ const G = {
7
+ key: 0,
8
+ class: "cui-pagination__info"
9
+ }, H = { class: "cui-pagination__controls" }, J = {
10
+ key: 0,
11
+ class: "cui-pagination__per-page"
12
+ }, K = {
13
+ class: "cui-pagination__nav",
14
+ "aria-label": "Pagination"
15
+ }, Q = ["disabled"], X = {
16
+ key: 0,
17
+ class: "cui-pagination__ellipsis"
18
+ }, Y = ["aria-label", "aria-current", "onClick"], ee = ["disabled"], le = /* @__PURE__ */ F({
19
+ __name: "CuiPagination",
20
+ props: {
21
+ meta: {},
22
+ currentPage: {},
23
+ totalPages: {},
24
+ perPage: {},
25
+ total: {},
26
+ perPageOptions: { default: () => [10, 15, 25, 50, 100] },
27
+ hidePerPage: { type: Boolean, default: !1 },
28
+ hideInfo: { type: Boolean, default: !1 },
29
+ maxButtons: { default: 5 },
30
+ hidden: { type: Boolean, default: !1 },
31
+ color: { default: "primary" },
32
+ size: { default: "md" }
33
+ },
34
+ emits: ["update:currentPage", "update:perPage"],
35
+ setup(s, { emit: I }) {
36
+ const a = s, f = I, M = ["sm", "md"], m = n(() => j(a.size, M)), i = n(() => {
37
+ var e;
38
+ return a.currentPage ?? ((e = a.meta) == null ? void 0 : e.current_page) ?? 1;
39
+ }), _ = n(() => {
40
+ var e;
41
+ return a.totalPages ?? ((e = a.meta) == null ? void 0 : e.last_page) ?? 1;
42
+ }), b = n(() => {
43
+ var e;
44
+ return a.perPage ?? ((e = a.meta) == null ? void 0 : e.per_page) ?? 15;
45
+ }), d = n(() => {
46
+ var e;
47
+ return a.total ?? ((e = a.meta) == null ? void 0 : e.total) ?? 0;
48
+ }), E = n(() => {
49
+ var e;
50
+ return ((e = a.meta) == null ? void 0 : e.from) != null ? a.meta.from : d.value === 0 ? 0 : (i.value - 1) * b.value + 1;
51
+ }), O = n(() => {
52
+ var e;
53
+ return ((e = a.meta) == null ? void 0 : e.to) != null ? a.meta.to : Math.min(i.value * b.value, d.value);
54
+ }), z = n(() => i.value <= 1), C = n(() => i.value >= _.value), V = n(() => {
55
+ const e = _.value, o = i.value, t = a.maxButtons;
56
+ if (e <= t + 2)
57
+ return Array.from({ length: e }, (g, w) => w + 1);
58
+ const l = [], c = Math.floor(t / 2);
59
+ let h = Math.max(2, o - c), y = Math.min(e - 1, o + c);
60
+ o <= c + 1 && (y = t), o >= e - c && (h = e - t + 1), l.push(1), h > 2 && l.push("ellipsis");
61
+ for (let g = h; g <= y; g++)
62
+ l.push(g);
63
+ return y < e - 1 && l.push("ellipsis"), e > 1 && l.push(e), l;
64
+ });
65
+ function P(e) {
66
+ e < 1 || e > _.value || e === i.value || f("update:currentPage", e);
67
+ }
68
+ function A(e) {
69
+ e != null && !Array.isArray(e) && (f("update:perPage", Number(e)), f("update:currentPage", 1));
70
+ }
71
+ const S = q(), D = n(
72
+ () => a.perPageOptions.map((e) => ({ value: e, label: S.value.pagination.perPage(e) }))
73
+ );
74
+ return (e, o) => L((r(), u("div", {
75
+ class: p(["cui-pagination", `cui-pagination--${m.value}`])
76
+ }, [
77
+ !s.hideInfo && d.value > 0 ? (r(), u("div", G, x(T(S).pagination.summary({ from: E.value, to: O.value, total: d.value })), 1)) : $("", !0),
78
+ v("div", H, [
79
+ s.hidePerPage ? $("", !0) : (r(), u("div", J, [
80
+ k(Z, {
81
+ "model-value": b.value,
82
+ options: D.value,
83
+ size: m.value === "sm" ? "xs" : "sm",
84
+ "onUpdate:modelValue": A
85
+ }, null, 8, ["model-value", "options", "size"])
86
+ ])),
87
+ v("nav", K, [
88
+ v("button", {
89
+ class: p(["cui-pagination__btn cui-pagination__btn--nav", { "cui-pagination__btn--disabled": z.value }]),
90
+ disabled: z.value,
91
+ "aria-label": "Previous page",
92
+ onClick: o[0] || (o[0] = (t) => P(i.value - 1))
93
+ }, [
94
+ k(N, {
95
+ name: "caret-left",
96
+ size: m.value === "sm" ? "0.75rem" : "1rem"
97
+ }, null, 8, ["size"])
98
+ ], 10, Q),
99
+ (r(!0), u(B, null, U(V.value, (t, l) => (r(), u(B, { key: l }, [
100
+ t === "ellipsis" ? (r(), u("span", X, "...")) : (r(), u("button", {
101
+ key: 1,
102
+ class: p(["cui-pagination__btn", {
103
+ "cui-pagination__btn--active": t === i.value
104
+ }]),
105
+ style: R(t === i.value ? {
106
+ background: `var(--cui-${s.color}-bg)`,
107
+ color: `var(--cui-${s.color})`,
108
+ borderColor: `var(--cui-${s.color}-border)`,
109
+ fontWeight: "600"
110
+ } : {}),
111
+ "aria-label": `Page ${t}`,
112
+ "aria-current": t === i.value ? "page" : void 0,
113
+ onClick: (c) => P(t)
114
+ }, x(t), 15, Y))
115
+ ], 64))), 128)),
116
+ v("button", {
117
+ class: p(["cui-pagination__btn cui-pagination__btn--nav", { "cui-pagination__btn--disabled": C.value }]),
118
+ disabled: C.value,
119
+ "aria-label": "Next page",
120
+ onClick: o[1] || (o[1] = (t) => P(i.value + 1))
121
+ }, [
122
+ k(N, {
123
+ name: "caret-right",
124
+ size: m.value === "sm" ? "0.75rem" : "1rem"
125
+ }, null, 8, ["size"])
126
+ ], 10, ee)
127
+ ])
128
+ ])
129
+ ], 2)), [
130
+ [W, !s.hidden]
131
+ ]);
132
+ }
133
+ });
134
+ export {
135
+ le as default
136
+ };
@@ -0,0 +1,227 @@
1
+ import { defineComponent as K, useSlots as U, ref as S, watch as M, computed as l, onUnmounted as q, withDirectives as G, openBlock as a, createElementBlock as s, createElementVNode as y, renderSlot as f, createBlock as J, Teleport as Q, normalizeStyle as p, unref as g, toDisplayString as X, withModifiers as Y, createVNode as Z, createCommentVNode as u, vShow as ee } from "vue";
2
+ import { usePopover as te } from "../composables/usePopover.js";
3
+ import { useClickOutside as oe } from "../composables/useClickOutside.js";
4
+ import re from "./CuiIcon.vue.js";
5
+ import { useMessages as ie } from "../composables/useMessages.js";
6
+ const le = ["aria-labelledby"], ae = {
7
+ key: 0,
8
+ style: {
9
+ display: "flex",
10
+ alignItems: "flex-start",
11
+ justifyContent: "space-between",
12
+ gap: "calc(0.5rem * var(--cui-density-scale, 1))",
13
+ padding: "calc(0.75rem * var(--cui-density-scale, 1)) calc(0.875rem * var(--cui-density-scale, 1)) calc(0.25rem * var(--cui-density-scale, 1))"
14
+ }
15
+ }, ne = ["id"], se = ["aria-label"], ce = {
16
+ key: 1,
17
+ style: {
18
+ padding: "0 calc(0.875rem * var(--cui-density-scale, 1)) calc(0.75rem * var(--cui-density-scale, 1))"
19
+ }
20
+ }, pe = /* @__PURE__ */ K({
21
+ __name: "CuiPopover",
22
+ props: {
23
+ title: {},
24
+ placement: { default: "bottom" },
25
+ trigger: { default: "click" },
26
+ showDelay: { default: 0 },
27
+ hideDelay: { default: 100 },
28
+ noArrow: { type: Boolean, default: !1 },
29
+ offset: {},
30
+ width: {},
31
+ visible: { type: Boolean },
32
+ closable: { type: Boolean, default: !0 },
33
+ rounded: { default: "lg" },
34
+ hidden: { type: Boolean, default: !1 },
35
+ disabled: { type: Boolean, default: !1 }
36
+ },
37
+ emits: ["update:visible"],
38
+ setup(c, { emit: R }) {
39
+ const e = c, T = {
40
+ none: "0",
41
+ sm: "0.25rem",
42
+ md: "var(--cui-button-radius, 0.375rem)",
43
+ lg: "0.5rem",
44
+ full: "9999px"
45
+ }, d = R, h = U(), o = S(!1);
46
+ let n = null, r = null;
47
+ M(
48
+ () => e.visible,
49
+ (t) => {
50
+ t !== void 0 && (o.value = t);
51
+ }
52
+ );
53
+ const { referenceRef: C, floatingRef: b, arrowRef: E, floatingStyles: D, arrowStyle: B, currentSide: _ } = te({
54
+ placement: l(() => e.placement),
55
+ offsetDistance: l(() => e.offset ?? 10),
56
+ arrow: !e.noArrow
57
+ }), w = S(null);
58
+ oe(
59
+ () => [w.value, b.value],
60
+ () => {
61
+ o.value && e.trigger === "click" && i();
62
+ }
63
+ ), M(o, (t) => {
64
+ typeof document > "u" || (t ? document.addEventListener("keydown", m) : document.removeEventListener("keydown", m));
65
+ });
66
+ function v() {
67
+ e.disabled || (r && (clearTimeout(r), r = null), e.showDelay > 0 ? n = setTimeout(() => {
68
+ o.value = !0, d("update:visible", !0);
69
+ }, e.showDelay) : (o.value = !0, d("update:visible", !0)));
70
+ }
71
+ function i() {
72
+ n && (clearTimeout(n), n = null), e.hideDelay > 0 ? r = setTimeout(() => {
73
+ o.value = !1, d("update:visible", !1);
74
+ }, e.hideDelay) : (o.value = !1, d("update:visible", !1));
75
+ }
76
+ function I() {
77
+ o.value ? i() : v();
78
+ }
79
+ function P() {
80
+ (e.trigger === "hover" || e.trigger === "hover-focus") && v();
81
+ }
82
+ function z() {
83
+ (e.trigger === "hover" || e.trigger === "hover-focus") && i();
84
+ }
85
+ function F() {
86
+ (e.trigger === "focus" || e.trigger === "hover-focus") && v();
87
+ }
88
+ function L() {
89
+ (e.trigger === "focus" || e.trigger === "hover-focus") && i();
90
+ }
91
+ function V() {
92
+ e.trigger === "click" && I();
93
+ }
94
+ function m(t) {
95
+ t.key === "Escape" && o.value && i();
96
+ }
97
+ function $() {
98
+ (e.trigger === "hover" || e.trigger === "hover-focus") && r && (clearTimeout(r), r = null);
99
+ }
100
+ function A() {
101
+ (e.trigger === "hover" || e.trigger === "hover-focus") && i();
102
+ }
103
+ q(() => {
104
+ n && clearTimeout(n), r && clearTimeout(r), typeof document < "u" && document.removeEventListener("keydown", m);
105
+ });
106
+ const k = l(() => e.title || h.header), H = l(() => !!h.footer), x = l(() => e.title ? "cui-popover-title" : void 0), N = l(() => {
107
+ const t = {
108
+ zIndex: "9998",
109
+ background: "var(--cui-surface-base)",
110
+ border: "1px solid var(--cui-border)",
111
+ borderRadius: T[e.rounded],
112
+ boxShadow: "0 8px 24px -4px rgba(0, 0, 0, 0.12), 0 2px 8px -2px rgba(0, 0, 0, 0.08)",
113
+ minWidth: "12rem",
114
+ maxWidth: "24rem",
115
+ pointerEvents: "auto",
116
+ animation: "cui-scale-in 0.15s ease",
117
+ overflow: "hidden"
118
+ };
119
+ return e.width && (t.width = e.width), t;
120
+ }), W = l(() => ({
121
+ width: "8px",
122
+ height: "8px",
123
+ background: "var(--cui-surface-base)",
124
+ border: "1px solid var(--cui-border)",
125
+ transform: "rotate(45deg)",
126
+ position: "absolute",
127
+ ...B.value
128
+ })), j = {
129
+ top: "polygon(0% 0%, 100% 0%, 100% 100%)",
130
+ bottom: "polygon(0% 0%, 0% 100%, 100% 100%)",
131
+ left: "polygon(0% 0%, 100% 0%, 100% 100%)",
132
+ right: "polygon(0% 0%, 0% 100%, 100% 100%)"
133
+ }, O = ie();
134
+ return (t, ue) => G((a(), s("div", {
135
+ ref_key: "wrapperRef",
136
+ ref: w,
137
+ style: { display: "inline-flex" },
138
+ onMouseenter: P,
139
+ onMouseleave: z,
140
+ onFocusin: F,
141
+ onFocusout: L,
142
+ onClick: V
143
+ }, [
144
+ y("div", {
145
+ ref_key: "referenceRef",
146
+ ref: C,
147
+ style: { display: "inline-flex" }
148
+ }, [
149
+ f(t.$slots, "default")
150
+ ], 512),
151
+ (a(), J(Q, { to: "body" }, [
152
+ o.value ? (a(), s("div", {
153
+ key: 0,
154
+ ref_key: "floatingRef",
155
+ ref: b,
156
+ style: p({ ...g(D), ...N.value }),
157
+ role: "dialog",
158
+ "aria-labelledby": x.value,
159
+ onMouseenter: $,
160
+ onMouseleave: A
161
+ }, [
162
+ k.value ? (a(), s("div", ae, [
163
+ f(t.$slots, "header", {}, () => [
164
+ y("span", {
165
+ id: x.value,
166
+ style: { fontSize: "0.875rem", fontWeight: "600", color: "var(--cui-text-body)" }
167
+ }, X(c.title), 9, ne)
168
+ ]),
169
+ c.closable ? (a(), s("button", {
170
+ key: 0,
171
+ type: "button",
172
+ style: {
173
+ display: "inline-flex",
174
+ alignItems: "center",
175
+ justifyContent: "center",
176
+ width: "1.375rem",
177
+ height: "1.375rem",
178
+ border: "none",
179
+ background: "none",
180
+ borderRadius: "0.25rem",
181
+ color: "var(--cui-text-tertiary)",
182
+ cursor: "pointer",
183
+ flexShrink: "0",
184
+ marginTop: "calc(-0.0625rem * var(--cui-density-scale, 1))",
185
+ marginRight: "calc(-0.125rem * var(--cui-density-scale, 1))"
186
+ },
187
+ "aria-label": g(O).close,
188
+ onClick: Y(i, ["stop"])
189
+ }, [
190
+ Z(re, {
191
+ name: "x",
192
+ size: "0.8125rem"
193
+ })
194
+ ], 8, se)) : u("", !0)
195
+ ])) : u("", !0),
196
+ y("div", {
197
+ style: p({
198
+ padding: k.value ? "calc(0.25rem * var(--cui-density-scale, 1)) calc(0.875rem * var(--cui-density-scale, 1)) calc(0.75rem * var(--cui-density-scale, 1))" : "calc(0.75rem * var(--cui-density-scale, 1)) calc(0.875rem * var(--cui-density-scale, 1))",
199
+ fontSize: "0.875rem",
200
+ lineHeight: "1.55",
201
+ color: "var(--cui-text-secondary)"
202
+ })
203
+ }, [
204
+ f(t.$slots, "content")
205
+ ], 4),
206
+ H.value ? (a(), s("div", ce, [
207
+ f(t.$slots, "footer")
208
+ ])) : u("", !0),
209
+ c.noArrow ? u("", !0) : (a(), s("div", {
210
+ key: 2,
211
+ ref_key: "arrowRef",
212
+ ref: E,
213
+ style: p({
214
+ ...W.value,
215
+ clipPath: j[g(_)] || void 0
216
+ })
217
+ }, null, 4))
218
+ ], 44, le)) : u("", !0)
219
+ ]))
220
+ ], 544)), [
221
+ [ee, !c.hidden]
222
+ ]);
223
+ }
224
+ });
225
+ export {
226
+ pe as default
227
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CuiPopover.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./CuiProgress.vue2.js";
2
+ /* empty css */
3
+ import r from "../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-5650346e"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,132 @@
1
+ import { defineComponent as D, computed as o, withDirectives as f, openBlock as l, createElementBlock as t, normalizeStyle as s, createElementVNode as u, normalizeClass as v, renderSlot as b, createTextVNode as k, toDisplayString as y, createCommentVNode as x, vShow as z } from "vue";
2
+ import { clampSize as E } from "../utils/sizing.js";
3
+ const M = ["aria-valuenow", "aria-valuemax"], P = {
4
+ key: 0,
5
+ class: "cui-progress-bar__label"
6
+ }, N = ["aria-valuenow", "aria-valuemax"], O = ["width", "height"], V = ["cx", "cy", "r", "stroke-width"], I = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], R = /* @__PURE__ */ D({
7
+ __name: "CuiProgress",
8
+ props: {
9
+ value: { default: 0 },
10
+ max: { default: 100 },
11
+ variant: { default: "bar" },
12
+ showLabel: { type: Boolean, default: !1 },
13
+ indeterminate: { type: Boolean, default: !1 },
14
+ animation: { default: "none" },
15
+ hidden: { type: Boolean, default: !1 },
16
+ color: { default: "primary" },
17
+ size: { default: "md" }
18
+ },
19
+ setup(e) {
20
+ const c = e, r = o(() => c.indeterminate ? 0 : Math.min(Math.max(c.value / c.max * 100, 0), 100)), h = o(() => `${Math.round(r.value)}%`), w = ["sm", "md", "lg"], n = o(() => E(c.size, w)), S = {
21
+ sm: "0.375rem",
22
+ md: "0.625rem",
23
+ lg: "1rem"
24
+ }, $ = {
25
+ sm: 40,
26
+ md: 64,
27
+ lg: 96
28
+ }, B = {
29
+ sm: 4,
30
+ md: 5,
31
+ lg: 6
32
+ }, a = o(() => {
33
+ const i = $[n.value], d = B[n.value], g = (i - d) / 2, m = 2 * Math.PI * g, C = m - r.value / 100 * m;
34
+ return { size: i, stroke: d, radius: g, circumference: m, dashOffset: C };
35
+ }), L = {
36
+ sm: "0.625rem",
37
+ md: "0.875rem",
38
+ lg: "1.25rem"
39
+ };
40
+ return (i, d) => e.variant === "bar" ? f((l(), t("div", {
41
+ key: 0,
42
+ class: "cui-progress-bar",
43
+ style: s({ "--_progress-color": `var(--cui-${e.color})`, "--_progress-bg": `var(--cui-${e.color}-bg)` }),
44
+ role: "progressbar",
45
+ "aria-valuenow": e.indeterminate ? void 0 : e.value,
46
+ "aria-valuemin": 0,
47
+ "aria-valuemax": e.max
48
+ }, [
49
+ u("div", {
50
+ class: "cui-progress-bar__track",
51
+ style: s({ height: S[n.value] })
52
+ }, [
53
+ u("div", {
54
+ class: v(["cui-progress-bar__fill", {
55
+ "cui-progress-bar__fill--indeterminate": e.indeterminate,
56
+ "cui-progress-bar__fill--stripe": e.animation === "stripe" && !e.indeterminate,
57
+ "cui-progress-bar__fill--shimmer": e.animation === "shimmer" && !e.indeterminate
58
+ }]),
59
+ style: s(e.indeterminate ? {} : { width: `${r.value}%` })
60
+ }, null, 6)
61
+ ], 4),
62
+ e.showLabel || i.$slots.label ? (l(), t("div", P, [
63
+ b(i.$slots, "label", {
64
+ value: e.value,
65
+ max: e.max,
66
+ percent: r.value
67
+ }, () => [
68
+ k(y(h.value), 1)
69
+ ], !0)
70
+ ])) : x("", !0)
71
+ ], 12, M)), [
72
+ [z, !e.hidden]
73
+ ]) : f((l(), t("div", {
74
+ key: 1,
75
+ class: "cui-progress-circle",
76
+ style: s({
77
+ width: `${a.value.size}px`,
78
+ height: `${a.value.size}px`,
79
+ "--_progress-color": `var(--cui-${e.color})`,
80
+ "--_progress-bg": `var(--cui-${e.color}-bg)`
81
+ }),
82
+ role: "progressbar",
83
+ "aria-valuenow": e.indeterminate ? void 0 : e.value,
84
+ "aria-valuemin": 0,
85
+ "aria-valuemax": e.max
86
+ }, [
87
+ (l(), t("svg", {
88
+ width: a.value.size,
89
+ height: a.value.size,
90
+ class: v(["cui-progress-circle__svg", { "cui-progress-circle__svg--indeterminate": e.indeterminate }])
91
+ }, [
92
+ u("circle", {
93
+ class: "cui-progress-circle__track",
94
+ cx: a.value.size / 2,
95
+ cy: a.value.size / 2,
96
+ r: a.value.radius,
97
+ fill: "none",
98
+ "stroke-width": a.value.stroke
99
+ }, null, 8, V),
100
+ u("circle", {
101
+ class: v(["cui-progress-circle__fill", { "cui-progress-circle__fill--indeterminate": e.indeterminate }]),
102
+ cx: a.value.size / 2,
103
+ cy: a.value.size / 2,
104
+ r: a.value.radius,
105
+ fill: "none",
106
+ "stroke-width": a.value.stroke,
107
+ "stroke-dasharray": a.value.circumference,
108
+ "stroke-dashoffset": e.indeterminate ? a.value.circumference * 0.75 : a.value.dashOffset,
109
+ "stroke-linecap": "round"
110
+ }, null, 10, I)
111
+ ], 10, O)),
112
+ (e.showLabel || i.$slots.label) && !e.indeterminate ? (l(), t("div", {
113
+ key: 0,
114
+ class: "cui-progress-circle__label",
115
+ style: s({ fontSize: L[n.value] })
116
+ }, [
117
+ b(i.$slots, "label", {
118
+ value: e.value,
119
+ max: e.max,
120
+ percent: r.value
121
+ }, () => [
122
+ k(y(h.value), 1)
123
+ ], !0)
124
+ ], 4)) : x("", !0)
125
+ ], 12, N)), [
126
+ [z, !e.hidden]
127
+ ]);
128
+ }
129
+ });
130
+ export {
131
+ R as default
132
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"CuiRadio.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiRadio.vue"],"names":[],"mappings":"AAgVA,OAAO,KAAK,EAAY,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGjG,MAAM,WAAW,aAAc,SAAQ,aAAa,EAAE,cAAc,EAAE,gBAAgB;IACpF,sCAAsC;IACtC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACvC,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA8ND,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC9D,KAAK,WAAW,GAAG,EAAE,GACnB;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,GAC5C;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA+BnD,QAAA,MAAM,eAAe;;;;;;;;cAlQR,OAAO;;;6EA2QlB,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":"CuiRadio.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiRadio.vue"],"names":[],"mappings":"AAkVA,OAAO,KAAK,EAAY,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGjG,MAAM,WAAW,aAAc,SAAQ,aAAa,EAAE,cAAc,EAAE,gBAAgB;IACpF,sCAAsC;IACtC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACvC,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA8ND,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC9D,KAAK,WAAW,GAAG,EAAE,GACnB;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,GAC5C;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA+BnD,QAAA,MAAM,eAAe;;;;;;;;cAlQR,OAAO;;;6EA2QlB,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 "./CuiRadio.vue2.js";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-76a00504"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,139 @@
1
+ import { defineComponent as D, inject as T, computed as u, ref as K, withDirectives as $, openBlock as b, createElementBlock as f, normalizeStyle as y, normalizeClass as S, createElementVNode as d, withModifiers as C, renderSlot as h, createTextVNode as _, toDisplayString as p, vShow as B, createCommentVNode as V } from "vue";
2
+ import { RadioGroupKey as L } from "./radio-context.js";
3
+ import { BUTTON_SIZE_SCALE as g } from "../utils/sizing.js";
4
+ const j = ["disabled", "aria-checked"], A = ["name", "value", "checked", "disabled"], G = ["aria-checked", "aria-disabled", "tabindex"], I = ["name", "value", "checked", "disabled", "readonly"], M = {
5
+ key: 0,
6
+ class: "cui-radio__dot"
7
+ }, O = { class: "cui-radio__label-wrap" }, U = { class: "cui-radio__label" }, Z = {
8
+ key: 0,
9
+ class: "cui-radio__description"
10
+ }, J = /* @__PURE__ */ D({
11
+ __name: "CuiRadio",
12
+ props: {
13
+ value: { type: [String, Number, Boolean] },
14
+ modelValue: { type: [String, Number, Boolean] },
15
+ label: {},
16
+ description: {},
17
+ name: {},
18
+ readonly: { type: Boolean, default: !1 },
19
+ hidden: { type: Boolean, default: !1 },
20
+ color: {},
21
+ disabled: { type: Boolean, default: !1 }
22
+ },
23
+ emits: ["update:modelValue"],
24
+ setup(i, { expose: x, emit: z }) {
25
+ const t = i, N = z, e = T(L, null), o = u(() => e ? e.modelValue.value === t.value : t.modelValue === t.value), r = u(() => e != null && e.disabled.value ? !0 : t.disabled), n = u(() => e != null && e.readonly.value ? !0 : t.readonly), a = u(() => t.color ?? (e == null ? void 0 : e.color.value) ?? "primary"), k = u(() => (e == null ? void 0 : e.name) ?? t.name ?? ""), R = u(() => (e == null ? void 0 : e.variant.value) === "buttons"), w = u(() => (e == null ? void 0 : e.size.value) ?? "md"), s = u(() => g[w.value] ?? g.md), c = K();
26
+ function m() {
27
+ r.value || n.value || (e ? e.select(t.value) : N("update:modelValue", t.value));
28
+ }
29
+ function E(l) {
30
+ (l.key === " " || l.key === "Enter") && (l.preventDefault(), m());
31
+ }
32
+ return x({ el: c, focus: () => {
33
+ var l;
34
+ return (l = c.value) == null ? void 0 : l.focus();
35
+ } }), (l, v) => R.value ? $((b(), f("button", {
36
+ key: 0,
37
+ ref_key: "elRef",
38
+ ref: c,
39
+ type: "button",
40
+ class: S(["cui-radio-button cui-button", {
41
+ "cui-radio-button--active": o.value,
42
+ "cui-radio-button--disabled": r.value
43
+ }]),
44
+ style: y({
45
+ "--_rb-color": `var(--cui-${a.value})`,
46
+ "--_rb-hover": `var(--cui-${a.value}-hover)`,
47
+ "--_rb-active": `var(--cui-${a.value}-active)`,
48
+ "--_rb-bg": `var(--cui-${a.value}-bg)`,
49
+ "--_rb-text": `var(--cui-${a.value}-text)`,
50
+ "--_rb-border": `var(--cui-${a.value}-border)`,
51
+ "--_rb-solid": `var(--cui-${a.value}-solid, var(--cui-${a.value}))`,
52
+ "--_rb-focus-ring": `var(--cui-${a.value}-focus-ring)`,
53
+ height: s.value.height,
54
+ paddingLeft: s.value.px,
55
+ paddingRight: s.value.px,
56
+ fontSize: s.value.fontSize
57
+ }),
58
+ disabled: r.value,
59
+ role: "radio",
60
+ "aria-checked": o.value,
61
+ onClick: m
62
+ }, [
63
+ d("input", {
64
+ type: "radio",
65
+ name: k.value,
66
+ value: String(i.value),
67
+ checked: o.value,
68
+ disabled: r.value,
69
+ tabindex: "-1",
70
+ "aria-hidden": "true",
71
+ class: "cui-radio__input",
72
+ onClick: v[0] || (v[0] = C(() => {
73
+ }, ["stop", "prevent"]))
74
+ }, null, 8, A),
75
+ h(l.$slots, "default", {}, () => [
76
+ _(p(i.label), 1)
77
+ ], !0)
78
+ ], 14, j)), [
79
+ [B, !i.hidden]
80
+ ]) : $((b(), f("label", {
81
+ key: 1,
82
+ ref_key: "elRef",
83
+ ref: c,
84
+ class: S(["cui-radio", {
85
+ "cui-radio--checked": o.value,
86
+ "cui-radio--disabled": r.value,
87
+ "cui-radio--readonly": n.value
88
+ }]),
89
+ style: y({ "--_radio-focus-ring": `var(--cui-${a.value}-focus-ring)` }),
90
+ role: "radio",
91
+ "aria-checked": o.value,
92
+ "aria-disabled": r.value || n.value || void 0,
93
+ tabindex: r.value ? -1 : 0,
94
+ onClick: m,
95
+ onKeydown: E
96
+ }, [
97
+ d("input", {
98
+ type: "radio",
99
+ name: k.value,
100
+ value: String(i.value),
101
+ checked: o.value,
102
+ disabled: r.value,
103
+ readonly: n.value,
104
+ tabindex: "-1",
105
+ "aria-hidden": "true",
106
+ class: "cui-radio__input",
107
+ onClick: v[1] || (v[1] = C(() => {
108
+ }, ["stop", "prevent"]))
109
+ }, null, 8, I),
110
+ d("span", {
111
+ class: "cui-radio__indicator",
112
+ style: y({
113
+ "--_radio-color": `var(--cui-${a.value})`,
114
+ "--_radio-border": o.value ? `var(--cui-${a.value}-border)` : "var(--cui-border-strong)",
115
+ "--_radio-bg": o.value ? `var(--cui-${a.value}-bg)` : "transparent"
116
+ })
117
+ }, [
118
+ o.value ? (b(), f("span", M)) : V("", !0)
119
+ ], 4),
120
+ d("span", O, [
121
+ d("span", U, [
122
+ h(l.$slots, "default", {}, () => [
123
+ _(p(i.label), 1)
124
+ ], !0)
125
+ ]),
126
+ i.description || l.$slots.description ? (b(), f("span", Z, [
127
+ h(l.$slots, "description", {}, () => [
128
+ _(p(i.description), 1)
129
+ ], !0)
130
+ ])) : V("", !0)
131
+ ])
132
+ ], 46, G)), [
133
+ [B, !i.hidden]
134
+ ]);
135
+ }
136
+ });
137
+ export {
138
+ J as default
139
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./CuiRadioGroup.vue2.js";
2
+ /* empty css */
3
+ import a from "../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ a(o, [["__scopeId", "data-v-f0a06a49"]]);
5
+ export {
6
+ f as default
7
+ };