@itguy614/clean-ui 1.2.2 → 1.3.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 (245) 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 +330 -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 +213 -190
  75. package/dist/components/CuiDataGridViewManager.vue.d.ts.map +1 -1
  76. package/dist/components/CuiDataGridViewManager.vue.js +21 -20
  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 +1 -3
  84. package/dist/components/CuiDivider.vue.d.ts.map +1 -1
  85. package/dist/components/CuiDivider.vue.js +47 -59
  86. package/dist/components/CuiDropdownMenu.vue.js +2 -2
  87. package/dist/components/CuiDropdownRadioGroup.vue.d.ts +4 -1
  88. package/dist/components/CuiDropdownRadioGroup.vue.d.ts.map +1 -1
  89. package/dist/components/CuiDropdownRadioGroup.vue.js +27 -14
  90. package/dist/components/CuiDropdownSub.vue.js +2 -2
  91. package/dist/components/CuiEmptyState.vue.d.ts +5 -4
  92. package/dist/components/CuiEmptyState.vue.d.ts.map +1 -1
  93. package/dist/components/CuiEmptyState.vue.js +1 -1
  94. package/dist/components/CuiEmptyState.vue2.js +30 -24
  95. package/dist/components/CuiFieldset.vue.d.ts.map +1 -1
  96. package/dist/components/CuiFieldset.vue.js +1 -1
  97. package/dist/components/CuiFieldset.vue2.js +21 -21
  98. package/dist/components/CuiFileUpload.vue.d.ts +2 -2
  99. package/dist/components/CuiFileUpload.vue.d.ts.map +1 -1
  100. package/dist/components/CuiFileUpload.vue.js +70 -57
  101. package/dist/components/CuiFormField.vue.d.ts.map +1 -1
  102. package/dist/components/CuiFormField.vue.js +2 -2
  103. package/dist/components/CuiFormField.vue2.js +48 -42
  104. package/dist/components/CuiInput.vue.d.ts +2 -2
  105. package/dist/components/CuiInput.vue.d.ts.map +1 -1
  106. package/dist/components/CuiInput.vue.js +1 -1
  107. package/dist/components/CuiInput.vue2.js +97 -85
  108. package/dist/components/CuiInputStepper.vue.d.ts +2 -2
  109. package/dist/components/CuiInputStepper.vue.d.ts.map +1 -1
  110. package/dist/components/CuiInputStepper.vue.js +5 -187
  111. package/dist/components/CuiInputStepper.vue2.js +237 -2
  112. package/dist/components/CuiKbd.vue.d.ts.map +1 -1
  113. package/dist/components/CuiKbd.vue.js +6 -5
  114. package/dist/components/CuiMaskedInput.vue.d.ts +9 -3
  115. package/dist/components/CuiMaskedInput.vue.d.ts.map +1 -1
  116. package/dist/components/CuiMaskedInput.vue.js +132 -117
  117. package/dist/components/CuiModal.vue.d.ts +10 -2
  118. package/dist/components/CuiModal.vue.d.ts.map +1 -1
  119. package/dist/components/CuiModal.vue.js +2 -2
  120. package/dist/components/CuiModal.vue2.js +48 -44
  121. package/dist/components/CuiModalBody.vue.d.ts.map +1 -1
  122. package/dist/components/CuiModalBody.vue.js +16 -13
  123. package/dist/components/CuiModalFooter.vue.d.ts.map +1 -1
  124. package/dist/components/CuiModalFooter.vue.js +3 -2
  125. package/dist/components/CuiModalHeader.vue.d.ts +13 -4
  126. package/dist/components/CuiModalHeader.vue.d.ts.map +1 -1
  127. package/dist/components/CuiModalHeader.vue.js +54 -42
  128. package/dist/components/CuiPagination.vue.d.ts.map +1 -1
  129. package/dist/components/CuiPagination.vue.js +1 -1
  130. package/dist/components/CuiPagination.vue2.js +28 -25
  131. package/dist/components/CuiPopover.vue.d.ts.map +1 -1
  132. package/dist/components/CuiPopover.vue.js +80 -72
  133. package/dist/components/CuiRadio.vue.d.ts +2 -4
  134. package/dist/components/CuiRadio.vue.d.ts.map +1 -1
  135. package/dist/components/CuiRadio.vue.js +2 -2
  136. package/dist/components/CuiRadio.vue2.js +88 -74
  137. package/dist/components/CuiRadioGroup.vue.d.ts +2 -2
  138. package/dist/components/CuiRadioGroup.vue.d.ts.map +1 -1
  139. package/dist/components/CuiRadioGroup.vue.js +3 -3
  140. package/dist/components/CuiRadioGroup.vue2.js +47 -37
  141. package/dist/components/CuiRating.vue.d.ts.map +1 -1
  142. package/dist/components/CuiRating.vue.js +15 -14
  143. package/dist/components/CuiResizablePanels.vue.d.ts.map +1 -1
  144. package/dist/components/CuiResizablePanels.vue.js +10 -9
  145. package/dist/components/CuiSelect.vue.d.ts +2 -2
  146. package/dist/components/CuiSelect.vue.d.ts.map +1 -1
  147. package/dist/components/CuiSelect.vue.js +2 -2
  148. package/dist/components/CuiSelect.vue2.js +161 -151
  149. package/dist/components/CuiSkeleton.vue.js +2 -2
  150. package/dist/components/CuiSkeleton.vue2.js +10 -10
  151. package/dist/components/CuiSlideover.vue.d.ts +2 -2
  152. package/dist/components/CuiSlideover.vue.d.ts.map +1 -1
  153. package/dist/components/CuiSlideover.vue.js +34 -30
  154. package/dist/components/CuiSlider.vue.d.ts +2 -2
  155. package/dist/components/CuiSlider.vue.d.ts.map +1 -1
  156. package/dist/components/CuiSlider.vue.js +5 -154
  157. package/dist/components/CuiSlider.vue2.js +171 -2
  158. package/dist/components/CuiSpinner.vue.d.ts.map +1 -1
  159. package/dist/components/CuiSpinner.vue.js +5 -4
  160. package/dist/components/CuiTable.vue.d.ts.map +1 -1
  161. package/dist/components/CuiTable.vue.js +4 -1
  162. package/dist/components/CuiTableBody.vue.d.ts.map +1 -1
  163. package/dist/components/CuiTableBody.vue.js +6 -6
  164. package/dist/components/CuiTableCell.vue.d.ts.map +1 -1
  165. package/dist/components/CuiTableCell.vue.js +11 -10
  166. package/dist/components/CuiTableFoot.vue.d.ts.map +1 -1
  167. package/dist/components/CuiTableFoot.vue.js +7 -7
  168. package/dist/components/CuiTableHead.vue.d.ts.map +1 -1
  169. package/dist/components/CuiTableHead.vue.js +7 -7
  170. package/dist/components/CuiTabs.vue.d.ts.map +1 -1
  171. package/dist/components/CuiTabs.vue.js +2 -2
  172. package/dist/components/CuiTabs.vue2.js +81 -76
  173. package/dist/components/CuiTagInput.vue.d.ts +2 -2
  174. package/dist/components/CuiTagInput.vue.d.ts.map +1 -1
  175. package/dist/components/CuiTagInput.vue.js +5 -294
  176. package/dist/components/CuiTagInput.vue2.js +276 -2
  177. package/dist/components/CuiTextarea.vue.d.ts +2 -2
  178. package/dist/components/CuiTextarea.vue.d.ts.map +1 -1
  179. package/dist/components/CuiTextarea.vue.js +4 -4
  180. package/dist/components/CuiTextarea.vue2.js +73 -59
  181. package/dist/components/CuiTimePicker.vue.d.ts +2 -2
  182. package/dist/components/CuiTimePicker.vue.d.ts.map +1 -1
  183. package/dist/components/CuiTimePicker.vue.js +172 -97
  184. package/dist/components/CuiTimeline.vue.d.ts.map +1 -1
  185. package/dist/components/CuiTimeline.vue.js +6 -5
  186. package/dist/components/CuiTimelineItem.vue.d.ts.map +1 -1
  187. package/dist/components/CuiTimelineItem.vue.js +11 -10
  188. package/dist/components/CuiToast.vue.d.ts +8 -10
  189. package/dist/components/CuiToast.vue.d.ts.map +1 -1
  190. package/dist/components/CuiToast.vue.js +2 -2
  191. package/dist/components/CuiToast.vue2.js +69 -67
  192. package/dist/components/CuiToggle.vue.d.ts +2 -2
  193. package/dist/components/CuiToggle.vue.d.ts.map +1 -1
  194. package/dist/components/CuiToggle.vue.js +2 -2
  195. package/dist/components/CuiToggle.vue2.js +71 -59
  196. package/dist/components/CuiToggleGroup.vue.d.ts +2 -2
  197. package/dist/components/CuiToggleGroup.vue.d.ts.map +1 -1
  198. package/dist/components/CuiToggleGroup.vue.js +2 -2
  199. package/dist/components/CuiToggleGroup.vue2.js +45 -35
  200. package/dist/components/CuiTooltip.vue.d.ts.map +1 -1
  201. package/dist/components/CuiTooltip.vue.js +2 -2
  202. package/dist/components/CuiTooltip.vue2.js +49 -45
  203. package/dist/components/CuiTransferList.vue.d.ts.map +1 -1
  204. package/dist/components/CuiTransferList.vue.js +31 -30
  205. package/dist/components/CuiTreeNode.vue.d.ts +9 -2
  206. package/dist/components/CuiTreeNode.vue.d.ts.map +1 -1
  207. package/dist/components/CuiTreeNode.vue.js +5 -179
  208. package/dist/components/CuiTreeNode.vue2.js +198 -2
  209. package/dist/components/CuiTreeView.vue.d.ts +33 -5
  210. package/dist/components/CuiTreeView.vue.d.ts.map +1 -1
  211. package/dist/components/CuiTreeView.vue.js +187 -44
  212. package/dist/composables/useCalendarKeyboard.d.ts +48 -0
  213. package/dist/composables/useCalendarKeyboard.d.ts.map +1 -0
  214. package/dist/composables/useCalendarKeyboard.js +91 -0
  215. package/dist/composables/useFieldDescribedBy.d.ts +30 -0
  216. package/dist/composables/useFieldDescribedBy.d.ts.map +1 -0
  217. package/dist/composables/useFieldDescribedBy.js +11 -0
  218. package/dist/composables/useMessages.d.ts.map +1 -1
  219. package/dist/composables/useMessages.js +6 -6
  220. package/dist/composables/usePopover.d.ts.map +1 -1
  221. package/dist/composables/usePopover.js +10 -0
  222. package/dist/composables/useScrollShadows.d.ts +3 -0
  223. package/dist/composables/useScrollShadows.d.ts.map +1 -1
  224. package/dist/composables/useScrollShadows.js +15 -12
  225. package/dist/icons/builtin.d.ts.map +1 -1
  226. package/dist/icons/builtin.js +38 -37
  227. package/dist/index.d.ts +3 -2
  228. package/dist/index.d.ts.map +1 -1
  229. package/dist/index.js +185 -182
  230. package/dist/messages.d.ts +39 -4
  231. package/dist/messages.d.ts.map +1 -1
  232. package/dist/messages.js +8 -7
  233. package/dist/types/common.d.ts +90 -0
  234. package/dist/types/common.d.ts.map +1 -1
  235. package/dist/utils/colorIconMap.d.ts +47 -3
  236. package/dist/utils/colorIconMap.d.ts.map +1 -1
  237. package/dist/utils/colorIconMap.js +20 -5
  238. package/dist/utils/date.d.ts +13 -0
  239. package/dist/utils/date.d.ts.map +1 -1
  240. package/dist/utils/date.js +46 -40
  241. package/dist/utils/sizing.d.ts +26 -1
  242. package/dist/utils/sizing.d.ts.map +1 -1
  243. package/dist/utils/sizing.js +22 -21
  244. package/dist/version.js +1 -1
  245. package/package.json +1 -1
@@ -1,15 +1,23 @@
1
- import type { HideableProps } from "../types/common";
2
- export interface CuiModalHeaderProps extends HideableProps {
1
+ import type { HideableProps, TitleAsProps } from "../types/common";
2
+ export interface CuiModalHeaderProps extends HideableProps, TitleAsProps {
3
3
  /** Convenience: title text */
4
4
  title?: string;
5
+ /**
6
+ * id for the title element, so the dialog can point `aria-labelledby` at it.
7
+ *
8
+ * `CuiModal` and `CuiSlideover` generate one and pass it down. Without it their
9
+ * `aria-labelledby` referenced an id that was never rendered, so every titled dialog
10
+ * in the library was announced unnamed (#158).
11
+ */
12
+ titleId?: string;
5
13
  /** Hide the close button */
6
14
  noCloseButton?: boolean;
7
15
  }
8
- declare var __VLS_1: {}, __VLS_3: {};
16
+ declare var __VLS_1: {}, __VLS_7: {};
9
17
  type __VLS_Slots = {} & {
10
18
  default?: (props: typeof __VLS_1) => any;
11
19
  } & {
12
- actions?: (props: typeof __VLS_3) => any;
20
+ actions?: (props: typeof __VLS_7) => any;
13
21
  };
14
22
  declare const __VLS_component: import("vue").DefineComponent<CuiModalHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
23
  close: () => any;
@@ -18,6 +26,7 @@ declare const __VLS_component: import("vue").DefineComponent<CuiModalHeaderProps
18
26
  }>, {
19
27
  hidden: boolean;
20
28
  noCloseButton: boolean;
29
+ titleAs: import("../index.js").CuiTitleAs;
21
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
31
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
23
32
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"CuiModalHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiModalHeader.vue"],"names":[],"mappings":"AAwFA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA6GD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,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,CAAC;AAwB/C,QAAA,MAAM,eAAe;;;;;;mBAzIH,OAAO;6EAiJvB,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":"CuiModalHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiModalHeader.vue"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGnE,MAAM,WAAW,mBAAoB,SAAQ,aAAa,EAAE,YAAY;IACtE,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAmID,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,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,CAAC;AAwB/C,QAAA,MAAM,eAAe;;;;;;mBA/JH,OAAO;;6EAuKvB,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,47 +1,59 @@
1
- import { defineComponent as u, withDirectives as m, openBlock as r, createElementBlock as o, createElementVNode as y, renderSlot as n, toDisplayString as g, createCommentVNode as s, unref as f, createVNode as p, vShow as v } from "vue";
2
- import h from "./CuiIcon.vue.js";
3
- import { useMessages as b } from "../composables/useMessages.js";
4
- const k = { style: {
5
- display: "flex",
6
- alignItems: "flex-start",
7
- gap: "calc(0.75rem * var(--cui-density-scale, 1))",
8
- padding: "calc(1.25rem * var(--cui-density-scale, 1)) calc(1.5rem * var(--cui-density-scale, 1)) calc(0.25rem * var(--cui-density-scale, 1))",
9
- flexShrink: "0",
10
- background: "var(--cui-surface-base)",
11
- position: "relative",
12
- zIndex: "1"
13
- } }, x = { style: { flex: "1", "min-width": "0" } }, C = {
14
- key: 0,
1
+ import { defineComponent as u, withDirectives as m, openBlock as a, createElementBlock as o, createElementVNode as y, renderSlot as s, createBlock as g, resolveDynamicComponent as f, withCtx as v, createTextVNode as h, toDisplayString as p, createCommentVNode as l, unref as k, createVNode as x, vShow as b } from "vue";
2
+ import C from "./CuiIcon.vue.js";
3
+ import { useMessages as B } from "../composables/useMessages.js";
4
+ const I = {
5
+ class: "cui-modal-header",
15
6
  style: {
16
- fontSize: "1.125rem",
17
- fontWeight: "600",
18
- lineHeight: "1.4",
19
- color: "var(--cui-text-emphasis)",
20
- margin: "0"
7
+ display: "flex",
8
+ alignItems: "flex-start",
9
+ gap: "calc(0.75rem * var(--cui-density-scale, 1))",
10
+ padding: "calc(1.25rem * var(--cui-density-scale, 1)) calc(1.5rem * var(--cui-density-scale, 1)) calc(0.25rem * var(--cui-density-scale, 1))",
11
+ flexShrink: "0",
12
+ background: "var(--cui-surface-base)",
13
+ position: "relative",
14
+ zIndex: "1"
21
15
  }
22
- }, B = {
16
+ }, S = { style: { flex: "1", "min-width": "0" } }, w = {
23
17
  key: 0,
24
18
  style: { display: "flex", "align-items": "center", gap: "calc(0.5rem * var(--cui-density-scale, 1))", "flex-shrink": "0" }
25
- }, S = ["aria-label"], z = /* @__PURE__ */ u({
19
+ }, M = ["aria-label"], D = /* @__PURE__ */ u({
26
20
  __name: "CuiModalHeader",
27
21
  props: {
28
22
  title: {},
23
+ titleId: {},
29
24
  noCloseButton: { type: Boolean, default: !1 },
30
- hidden: { type: Boolean, default: !1 }
25
+ hidden: { type: Boolean, default: !1 },
26
+ titleAs: { default: "h2" }
31
27
  },
32
28
  emits: ["close"],
33
- setup(i, { emit: l }) {
34
- const c = l, d = b();
35
- return (a, e) => m((r(), o("div", k, [
36
- y("div", x, [
37
- n(a.$slots, "default", {}, () => [
38
- i.title ? (r(), o("h2", C, g(i.title), 1)) : s("", !0)
29
+ setup(e, { emit: n }) {
30
+ const c = n, d = B();
31
+ return (r, t) => m((a(), o("div", I, [
32
+ y("div", S, [
33
+ s(r.$slots, "default", {}, () => [
34
+ e.title ? (a(), g(f(e.titleAs), {
35
+ key: 0,
36
+ id: e.titleId,
37
+ class: "cui-modal-header__title",
38
+ style: {
39
+ fontSize: "1.125rem",
40
+ fontWeight: "600",
41
+ lineHeight: "1.4",
42
+ color: "var(--cui-text-emphasis)",
43
+ margin: "0"
44
+ }
45
+ }, {
46
+ default: v(() => [
47
+ h(p(e.title), 1)
48
+ ]),
49
+ _: 1
50
+ }, 8, ["id"])) : l("", !0)
39
51
  ])
40
52
  ]),
41
- a.$slots.actions ? (r(), o("div", B, [
42
- n(a.$slots, "actions")
43
- ])) : s("", !0),
44
- i.noCloseButton ? s("", !0) : (r(), o("button", {
53
+ r.$slots.actions ? (a(), o("div", w, [
54
+ s(r.$slots, "actions")
55
+ ])) : l("", !0),
56
+ e.noCloseButton ? l("", !0) : (a(), o("button", {
45
57
  key: 1,
46
58
  type: "button",
47
59
  style: {
@@ -61,25 +73,25 @@ const k = { style: {
61
73
  marginRight: "calc(-0.25rem * var(--cui-density-scale, 1))",
62
74
  transition: "color 0.15s ease, background 0.15s ease"
63
75
  },
64
- "aria-label": f(d).close,
65
- onClick: e[0] || (e[0] = (t) => c("close")),
66
- onMouseenter: e[1] || (e[1] = (t) => {
67
- t.target.style.color = "var(--cui-text-body)", t.target.style.background = "var(--cui-primary-bg)";
76
+ "aria-label": k(d).close,
77
+ onClick: t[0] || (t[0] = (i) => c("close")),
78
+ onMouseenter: t[1] || (t[1] = (i) => {
79
+ i.target.style.color = "var(--cui-text-body)", i.target.style.background = "var(--cui-primary-bg)";
68
80
  }),
69
- onMouseleave: e[2] || (e[2] = (t) => {
70
- t.target.style.color = "var(--cui-text-tertiary)", t.target.style.background = "none";
81
+ onMouseleave: t[2] || (t[2] = (i) => {
82
+ i.target.style.color = "var(--cui-text-tertiary)", i.target.style.background = "none";
71
83
  })
72
84
  }, [
73
- p(h, {
85
+ x(C, {
74
86
  name: "x",
75
87
  size: "1rem"
76
88
  })
77
- ], 40, S))
89
+ ], 40, M))
78
90
  ], 512)), [
79
- [v, !i.hidden]
91
+ [b, !e.hidden]
80
92
  ]);
81
93
  }
82
94
  });
83
95
  export {
84
- z as default
96
+ D as default
85
97
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CuiPagination.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiPagination.vue"],"names":[],"mappings":"AA4VA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIvG,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,aAAa,EAAE,cAAc,EAAE,aAAa;IACtF,oCAAoC;IACpC,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,iCAAiC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;;;;;;;;;;;oBAPkB,MAAM,EAAE;iBAEX,OAAO;cAEV,OAAO;gBAEL,MAAM;;AAgUrB,wBAQG"}
1
+ {"version":3,"file":"CuiPagination.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiPagination.vue"],"names":[],"mappings":"AA+VA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIvG,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,aAAa,EAAE,cAAc,EAAE,aAAa;IACtF,oCAAoC;IACpC,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,iCAAiC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;;;;;;;;;;;oBAPkB,MAAM,EAAE;iBAEX,OAAO;cAEV,OAAO;gBAEL,MAAM;;AAmUrB,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./CuiPagination.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8a10cffd"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fd425fec"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,4 +1,4 @@
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";
1
+ import { defineComponent as F, computed as i, withDirectives as L, openBlock as r, createElementBlock as u, normalizeClass as g, 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
2
  import N from "./CuiIcon.vue.js";
3
3
  import Z from "./CuiSelect.vue.js";
4
4
  import { clampSize as j } from "../utils/sizing.js";
@@ -33,46 +33,46 @@ const G = {
33
33
  },
34
34
  emits: ["update:currentPage", "update:perPage"],
35
35
  setup(s, { emit: I }) {
36
- const a = s, f = I, M = ["sm", "md"], m = n(() => j(a.size, M)), i = n(() => {
36
+ const a = s, f = I, M = ["sm", "md"], m = i(() => j(a.size, M)), n = i(() => {
37
37
  var e;
38
38
  return a.currentPage ?? ((e = a.meta) == null ? void 0 : e.current_page) ?? 1;
39
- }), _ = n(() => {
39
+ }), _ = i(() => {
40
40
  var e;
41
41
  return a.totalPages ?? ((e = a.meta) == null ? void 0 : e.last_page) ?? 1;
42
- }), b = n(() => {
42
+ }), b = i(() => {
43
43
  var e;
44
44
  return a.perPage ?? ((e = a.meta) == null ? void 0 : e.per_page) ?? 15;
45
- }), d = n(() => {
45
+ }), d = i(() => {
46
46
  var e;
47
47
  return a.total ?? ((e = a.meta) == null ? void 0 : e.total) ?? 0;
48
- }), E = n(() => {
48
+ }), E = i(() => {
49
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(() => {
50
+ return ((e = a.meta) == null ? void 0 : e.from) != null ? a.meta.from : d.value === 0 ? 0 : (n.value - 1) * b.value + 1;
51
+ }), O = i(() => {
52
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;
53
+ return ((e = a.meta) == null ? void 0 : e.to) != null ? a.meta.to : Math.min(n.value * b.value, d.value);
54
+ }), z = i(() => n.value <= 1), C = i(() => n.value >= _.value), V = i(() => {
55
+ const e = _.value, o = n.value, t = a.maxButtons;
56
56
  if (e <= t + 2)
57
- return Array.from({ length: e }, (g, w) => w + 1);
57
+ return Array.from({ length: e }, (p, w) => w + 1);
58
58
  const l = [], c = Math.floor(t / 2);
59
59
  let h = Math.max(2, o - c), y = Math.min(e - 1, o + c);
60
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);
61
+ for (let p = h; p <= y; p++)
62
+ l.push(p);
63
63
  return y < e - 1 && l.push("ellipsis"), e > 1 && l.push(e), l;
64
64
  });
65
65
  function P(e) {
66
- e < 1 || e > _.value || e === i.value || f("update:currentPage", e);
66
+ e < 1 || e > _.value || e === n.value || f("update:currentPage", e);
67
67
  }
68
68
  function A(e) {
69
69
  e != null && !Array.isArray(e) && (f("update:perPage", Number(e)), f("update:currentPage", 1));
70
70
  }
71
- const S = q(), D = n(
71
+ const S = q(), D = i(
72
72
  () => a.perPageOptions.map((e) => ({ value: e, label: S.value.pagination.perPage(e) }))
73
73
  );
74
74
  return (e, o) => L((r(), u("div", {
75
- class: p(["cui-pagination", `cui-pagination--${m.value}`])
75
+ class: g(["cui-pagination", `cui-pagination--${m.value}`])
76
76
  }, [
77
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
78
  v("div", H, [
@@ -86,10 +86,11 @@ const G = {
86
86
  ])),
87
87
  v("nav", K, [
88
88
  v("button", {
89
- class: p(["cui-pagination__btn cui-pagination__btn--nav", { "cui-pagination__btn--disabled": z.value }]),
89
+ type: "button",
90
+ class: g(["cui-pagination__btn cui-pagination__btn--nav", { "cui-pagination__btn--disabled": z.value }]),
90
91
  disabled: z.value,
91
92
  "aria-label": "Previous page",
92
- onClick: o[0] || (o[0] = (t) => P(i.value - 1))
93
+ onClick: o[0] || (o[0] = (t) => P(n.value - 1))
93
94
  }, [
94
95
  k(N, {
95
96
  name: "caret-left",
@@ -99,25 +100,27 @@ const G = {
99
100
  (r(!0), u(B, null, U(V.value, (t, l) => (r(), u(B, { key: l }, [
100
101
  t === "ellipsis" ? (r(), u("span", X, "...")) : (r(), u("button", {
101
102
  key: 1,
102
- class: p(["cui-pagination__btn", {
103
- "cui-pagination__btn--active": t === i.value
103
+ type: "button",
104
+ class: g(["cui-pagination__btn", {
105
+ "cui-pagination__btn--active": t === n.value
104
106
  }]),
105
- style: R(t === i.value ? {
107
+ style: R(t === n.value ? {
106
108
  background: `var(--cui-${s.color}-bg)`,
107
109
  color: `var(--cui-${s.color})`,
108
110
  borderColor: `var(--cui-${s.color}-border)`,
109
111
  fontWeight: "600"
110
112
  } : {}),
111
113
  "aria-label": `Page ${t}`,
112
- "aria-current": t === i.value ? "page" : void 0,
114
+ "aria-current": t === n.value ? "page" : void 0,
113
115
  onClick: (c) => P(t)
114
116
  }, x(t), 15, Y))
115
117
  ], 64))), 128)),
116
118
  v("button", {
117
- class: p(["cui-pagination__btn cui-pagination__btn--nav", { "cui-pagination__btn--disabled": C.value }]),
119
+ type: "button",
120
+ class: g(["cui-pagination__btn cui-pagination__btn--nav", { "cui-pagination__btn--disabled": C.value }]),
118
121
  disabled: C.value,
119
122
  "aria-label": "Next page",
120
- onClick: o[1] || (o[1] = (t) => P(i.value + 1))
123
+ onClick: o[1] || (o[1] = (t) => P(n.value + 1))
121
124
  }, [
122
125
  k(N, {
123
126
  name: "caret-right",
@@ -1 +1 @@
1
- {"version":3,"file":"CuiPopover.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiPopover.vue"],"names":[],"mappings":"AAsRA,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG9E,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE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B;AA+TD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACrF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAiD/C,QAAA,MAAM,eAAe;;;;;;aAtXT,UAAU;;eAlBR,gBAAgB;aAElB,cAAc;eAEZ,MAAM;eAEN,MAAM;aAER,OAAO;cAQN,OAAO;6EAgYlB,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,9 +1,9 @@
1
- import { defineComponent as U, useSlots as q, ref as S, watch as M, computed as l, onUnmounted as G, withDirectives as J, openBlock as a, createElementBlock as s, createElementVNode as p, renderSlot as f, createBlock as Q, Teleport as X, normalizeStyle as g, unref as v, toDisplayString as Y, withModifiers as Z, createVNode as ee, createCommentVNode as u, vShow as te } from "vue";
2
- import { usePopover as oe } from "../composables/usePopover.js";
3
- import { useClickOutside as ie } from "../composables/useClickOutside.js";
4
- import re from "./CuiIcon.vue.js";
1
+ import { defineComponent as q, useSlots as G, ref as S, watch as E, computed as c, onUnmounted as J, useId as Q, withDirectives as X, openBlock as n, createElementBlock as l, createElementVNode as f, renderSlot as v, createBlock as Y, Teleport as Z, normalizeStyle as g, unref as h, toDisplayString as ee, withModifiers as te, createVNode as oe, createCommentVNode as u, vShow as ie } from "vue";
2
+ import { usePopover as re } from "../composables/usePopover.js";
3
+ import { useClickOutside as ne } from "../composables/useClickOutside.js";
4
+ import ae from "./CuiIcon.vue.js";
5
5
  import { useMessages as le } from "../composables/useMessages.js";
6
- const ae = ["aria-labelledby"], ne = {
6
+ const se = ["aria-labelledby"], ce = {
7
7
  key: 0,
8
8
  style: {
9
9
  display: "flex",
@@ -12,12 +12,12 @@ const ae = ["aria-labelledby"], ne = {
12
12
  gap: "calc(0.5rem * var(--cui-density-scale, 1))",
13
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
14
  }
15
- }, se = ["id"], ce = ["aria-label"], ue = {
15
+ }, ue = { style: { fontSize: "0.875rem", fontWeight: "600", color: "var(--cui-text-body)" } }, de = ["aria-label"], fe = {
16
16
  key: 1,
17
17
  style: {
18
18
  padding: "0 calc(0.875rem * var(--cui-density-scale, 1)) calc(0.75rem * var(--cui-density-scale, 1))"
19
19
  }
20
- }, ge = /* @__PURE__ */ U({
20
+ }, be = /* @__PURE__ */ q({
21
21
  __name: "CuiPopover",
22
22
  props: {
23
23
  title: {},
@@ -35,41 +35,42 @@ const ae = ["aria-labelledby"], ne = {
35
35
  disabled: { type: Boolean, default: !1 }
36
36
  },
37
37
  emits: ["update:visible"],
38
- setup(c, { emit: R }) {
39
- const e = c, T = {
38
+ setup(s, { emit: M }) {
39
+ const e = s, R = {
40
40
  none: "0",
41
- sm: "0.25rem",
42
- md: "var(--cui-button-radius, 0.375rem)",
43
- lg: "0.5rem",
41
+ sm: "var(--cui-radius-sm, 0.25rem)",
42
+ md: "var(--cui-button-radius, var(--cui-radius-md, 0.375rem))",
43
+ lg: "var(--cui-radius-lg, 0.5rem)",
44
44
  full: "9999px"
45
- }, d = R, h = q(), o = S(!1);
46
- let n = null, i = null;
47
- M(
45
+ }, d = M, b = G(), o = S(!1);
46
+ let a = null, i = null;
47
+ E(
48
48
  () => e.visible,
49
49
  (t) => {
50
50
  t !== void 0 && (o.value = t);
51
- }
51
+ },
52
+ { immediate: !0 }
52
53
  );
53
- const { referenceRef: C, floatingRef: b, arrowRef: E, floatingStyles: D, arrowStyle: B, currentSide: _, isPositioned: P } = oe({
54
- placement: l(() => e.placement),
55
- offsetDistance: l(() => e.offset ?? 10),
54
+ const { referenceRef: T, floatingRef: w, arrowRef: C, floatingStyles: _, arrowStyle: D, currentSide: B, isPositioned: P } = re({
55
+ placement: c(() => e.placement),
56
+ offsetDistance: c(() => e.offset ?? 10),
56
57
  arrow: !e.noArrow
57
- }), w = S(null);
58
- ie(
59
- () => [w.value, b.value],
58
+ }), k = S(null);
59
+ ne(
60
+ () => [k.value, w.value],
60
61
  () => {
61
62
  o.value && e.trigger === "click" && r();
62
63
  }
63
- ), M(o, (t) => {
64
- typeof document > "u" || (t ? document.addEventListener("keydown", y) : document.removeEventListener("keydown", y));
65
- });
64
+ ), E(o, (t) => {
65
+ typeof document > "u" || (t ? document.addEventListener("keydown", p) : document.removeEventListener("keydown", p));
66
+ }, { immediate: !0 });
66
67
  function m() {
67
- e.disabled || (i && (clearTimeout(i), i = null), e.showDelay > 0 ? n = setTimeout(() => {
68
+ e.disabled || (i && (clearTimeout(i), i = null), e.showDelay > 0 ? a = setTimeout(() => {
68
69
  o.value = !0, d("update:visible", !0);
69
70
  }, e.showDelay) : (o.value = !0, d("update:visible", !0)));
70
71
  }
71
72
  function r() {
72
- n && (clearTimeout(n), n = null), e.hideDelay > 0 ? i = setTimeout(() => {
73
+ a && (clearTimeout(a), a = null), e.hideDelay > 0 ? i = setTimeout(() => {
73
74
  o.value = !1, d("update:visible", !1);
74
75
  }, e.hideDelay) : (o.value = !1, d("update:visible", !1));
75
76
  }
@@ -85,13 +86,13 @@ const ae = ["aria-labelledby"], ne = {
85
86
  function L() {
86
87
  (e.trigger === "focus" || e.trigger === "hover-focus") && m();
87
88
  }
88
- function V() {
89
+ function $() {
89
90
  (e.trigger === "focus" || e.trigger === "hover-focus") && r();
90
91
  }
91
- function $() {
92
+ function V() {
92
93
  e.trigger === "click" && I();
93
94
  }
94
- function y(t) {
95
+ function p(t) {
95
96
  t.key === "Escape" && o.value && r();
96
97
  }
97
98
  function A() {
@@ -100,15 +101,15 @@ const ae = ["aria-labelledby"], ne = {
100
101
  function H() {
101
102
  (e.trigger === "hover" || e.trigger === "hover-focus") && r();
102
103
  }
103
- G(() => {
104
- n && clearTimeout(n), i && clearTimeout(i), typeof document < "u" && document.removeEventListener("keydown", y);
104
+ J(() => {
105
+ a && clearTimeout(a), i && clearTimeout(i), typeof document < "u" && document.removeEventListener("keydown", p);
105
106
  });
106
- const k = l(() => e.title || h.header), N = l(() => !!h.footer), x = l(() => e.title ? "cui-popover-title" : void 0), W = l(() => {
107
+ const y = () => !!(e.title || b.header), N = () => !!b.footer, x = `cui-popover-title-${Q()}`, W = c(() => {
107
108
  const t = {
108
109
  zIndex: "9998",
109
110
  background: "var(--cui-surface-base)",
110
111
  border: "1px solid var(--cui-border)",
111
- borderRadius: T[e.rounded],
112
+ borderRadius: R[e.rounded],
112
113
  boxShadow: "0 8px 24px -4px rgba(0, 0, 0, 0.12), 0 2px 8px -2px rgba(0, 0, 0, 0.08)",
113
114
  minWidth: "12rem",
114
115
  maxWidth: "24rem",
@@ -117,56 +118,63 @@ const ae = ["aria-labelledby"], ne = {
117
118
  overflow: "hidden"
118
119
  };
119
120
  return e.width && (t.width = e.width), t;
120
- }), j = l(() => ({
121
+ }), j = c(() => {
122
+ const t = {};
123
+ return P.value || (t.opacity = "0", t.pointerEvents = "none", t.animation = "none"), t;
124
+ }), O = c(() => ({
121
125
  width: "8px",
122
126
  height: "8px",
123
127
  background: "var(--cui-surface-base)",
124
128
  border: "1px solid var(--cui-border)",
125
129
  transform: "rotate(45deg)",
126
130
  position: "absolute",
127
- ...B.value
128
- })), O = {
131
+ ...D.value
132
+ })), U = {
129
133
  top: "polygon(0% 0%, 100% 0%, 100% 100%)",
130
134
  bottom: "polygon(0% 0%, 0% 100%, 100% 100%)",
131
135
  left: "polygon(0% 0%, 100% 0%, 100% 100%)",
132
136
  right: "polygon(0% 0%, 0% 100%, 100% 100%)"
133
137
  }, K = le();
134
- return (t, de) => J((a(), s("div", {
138
+ return (t, ve) => X((n(), l("div", {
139
+ class: "cui-popover",
135
140
  ref_key: "wrapperRef",
136
- ref: w,
141
+ ref: k,
137
142
  style: { display: "inline-flex" },
138
143
  onMouseenter: z,
139
144
  onMouseleave: F,
140
145
  onFocusin: L,
141
- onFocusout: V,
142
- onClick: $
146
+ onFocusout: $,
147
+ onClick: V
143
148
  }, [
144
- p("div", {
149
+ f("div", {
145
150
  ref_key: "referenceRef",
146
- ref: C,
151
+ ref: T,
147
152
  style: { display: "inline-flex" }
148
153
  }, [
149
- f(t.$slots, "default")
154
+ v(t.$slots, "default")
150
155
  ], 512),
151
- (a(), Q(X, { to: "body" }, [
152
- o.value ? (a(), s("div", {
156
+ (n(), Y(Z, { to: "body" }, [
157
+ o.value ? (n(), l("div", {
153
158
  key: 0,
154
159
  ref_key: "floatingRef",
155
- ref: b,
156
- style: g({ ...v(D), ...W.value, visibility: v(P) ? "visible" : "hidden" }),
160
+ ref: w,
161
+ class: "cui-popover__panel",
162
+ style: g({ ...h(_), ...W.value, ...j.value }),
157
163
  role: "dialog",
158
- "aria-labelledby": x.value,
164
+ "aria-labelledby": y() ? x : void 0,
159
165
  onMouseenter: A,
160
166
  onMouseleave: H
161
167
  }, [
162
- k.value ? (a(), s("div", ne, [
163
- f(t.$slots, "header", {}, () => [
164
- p("span", {
165
- id: x.value,
166
- style: { fontSize: "0.875rem", fontWeight: "600", color: "var(--cui-text-body)" }
167
- }, Y(c.title), 9, se)
168
+ y() ? (n(), l("div", ce, [
169
+ f("div", {
170
+ id: x,
171
+ style: { display: "contents" }
172
+ }, [
173
+ v(t.$slots, "header", {}, () => [
174
+ f("span", ue, ee(s.title), 1)
175
+ ])
168
176
  ]),
169
- c.closable ? (a(), s("button", {
177
+ s.closable ? (n(), l("button", {
170
178
  key: 0,
171
179
  type: "button",
172
180
  style: {
@@ -184,44 +192,44 @@ const ae = ["aria-labelledby"], ne = {
184
192
  marginTop: "calc(-0.0625rem * var(--cui-density-scale, 1))",
185
193
  marginRight: "calc(-0.125rem * var(--cui-density-scale, 1))"
186
194
  },
187
- "aria-label": v(K).close,
188
- onClick: Z(r, ["stop"])
195
+ "aria-label": h(K).close,
196
+ onClick: te(r, ["stop"])
189
197
  }, [
190
- ee(re, {
198
+ oe(ae, {
191
199
  name: "x",
192
200
  size: "0.8125rem"
193
201
  })
194
- ], 8, ce)) : u("", !0)
202
+ ], 8, de)) : u("", !0)
195
203
  ])) : u("", !0),
196
- p("div", {
204
+ f("div", {
197
205
  style: g({
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))",
206
+ padding: y() ? "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
207
  fontSize: "0.875rem",
200
208
  lineHeight: "1.55",
201
209
  color: "var(--cui-text-secondary)"
202
210
  })
203
211
  }, [
204
- f(t.$slots, "content")
212
+ v(t.$slots, "content")
205
213
  ], 4),
206
- N.value ? (a(), s("div", ue, [
207
- f(t.$slots, "footer")
214
+ N() ? (n(), l("div", fe, [
215
+ v(t.$slots, "footer")
208
216
  ])) : u("", !0),
209
- c.noArrow ? u("", !0) : (a(), s("div", {
217
+ s.noArrow ? u("", !0) : (n(), l("div", {
210
218
  key: 2,
211
219
  ref_key: "arrowRef",
212
- ref: E,
220
+ ref: C,
213
221
  style: g({
214
- ...j.value,
215
- clipPath: O[v(_)] || void 0
222
+ ...O.value,
223
+ clipPath: U[h(B)] || void 0
216
224
  })
217
225
  }, null, 4))
218
- ], 44, ae)) : u("", !0)
226
+ ], 44, se)) : u("", !0)
219
227
  ]))
220
228
  ], 544)), [
221
- [te, !c.hidden]
229
+ [ie, !s.hidden]
222
230
  ]);
223
231
  }
224
232
  });
225
233
  export {
226
- ge as default
234
+ be as default
227
235
  };
@@ -1,5 +1,5 @@
1
- import type { HideableProps, ColorableProps, DisableableProps } from "../types/common";
2
- export interface CuiRadioProps extends HideableProps, ColorableProps, DisableableProps {
1
+ import type { HideableProps, ColorableProps, DisableableProps, NativeControlProps } from "../types/common";
2
+ export interface CuiRadioProps extends NativeControlProps, HideableProps, ColorableProps, DisableableProps {
3
3
  /** The value this radio represents */
4
4
  value: string | number | boolean;
5
5
  /** v-model binding (standalone mode) */
@@ -8,8 +8,6 @@ export interface CuiRadioProps extends HideableProps, ColorableProps, Disableabl
8
8
  label?: string;
9
9
  /** Description text (or use #description slot) */
10
10
  description?: string;
11
- /** Name attribute (standalone mode) */
12
- name?: string;
13
11
  /** Readonly state */
14
12
  readonly?: boolean;
15
13
  }
@@ -1 +1 @@
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,CAA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,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuOD,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;;;;;;;;cA3QR,OAAO;;;6EAoRlB,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,7 +1,7 @@
1
1
  import o from "./CuiRadio.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-76a00504"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bfe1e595"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };