@ac-design/design-system 1.0.3 → 2.1.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 (235) hide show
  1. package/README.md +27 -18
  2. package/dist/lib/charts/ChartFrame.js +5 -0
  3. package/dist/lib/charts/ChartFrame.vue.d.ts +71 -0
  4. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +173 -0
  5. package/dist/lib/charts/cartesian.d.ts +324 -0
  6. package/dist/lib/charts/cartesian.js +137 -0
  7. package/dist/lib/charts/echarts.d.ts +86 -0
  8. package/dist/lib/charts/echarts.js +173 -0
  9. package/dist/lib/charts/graph.d.ts +77 -0
  10. package/dist/lib/charts/graph.js +155 -0
  11. package/dist/lib/charts/index.d.ts +11 -0
  12. package/dist/lib/charts/index.js +7 -0
  13. package/dist/lib/charts/shared.d.ts +53 -0
  14. package/dist/lib/charts/shared.js +96 -0
  15. package/dist/lib/charts/xy.d.ts +69 -0
  16. package/dist/lib/charts/xy.js +73 -0
  17. package/dist/lib/compat.css +2770 -1061
  18. package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +2 -2
  19. package/dist/lib/components/AcAccordionItem.vue.d.ts +1 -1
  20. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +5 -5
  21. package/dist/lib/components/AcAlert.vue.d.ts +10 -1
  22. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +139 -45
  23. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +19 -19
  24. package/dist/lib/components/AcAreaChart.js +5 -0
  25. package/dist/lib/components/AcAreaChart.vue.d.ts +47 -0
  26. package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +205 -0
  27. package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
  28. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +66 -61
  29. package/dist/lib/components/AcBadge.vue.d.ts +20 -7
  30. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +67 -44
  31. package/dist/lib/components/AcBanner.vue.d.ts +1 -1
  32. package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +30 -30
  33. package/dist/lib/components/AcBarChart.js +5 -0
  34. package/dist/lib/components/AcBarChart.vue.d.ts +46 -0
  35. package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +213 -0
  36. package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
  37. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +36 -34
  38. package/dist/lib/components/AcBulkActionBar.js +5 -0
  39. package/dist/lib/components/AcBulkActionBar.vue.d.ts +45 -0
  40. package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
  41. package/dist/lib/components/AcButton.vue.d.ts +13 -7
  42. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +93 -47
  43. package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
  44. package/dist/lib/components/AcCard.vue.d.ts +42 -3
  45. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +175 -14
  46. package/dist/lib/components/AcCellValue.vue.d.ts +6 -3
  47. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +219 -178
  48. package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
  49. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +113 -30
  50. package/dist/lib/components/AcCheckList.js +5 -0
  51. package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
  52. package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
  53. package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
  54. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +102 -26
  55. package/dist/lib/components/AcCircularProgress.js +5 -0
  56. package/dist/lib/components/AcCircularProgress.vue.d.ts +44 -0
  57. package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +114 -0
  58. package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +142 -167
  59. package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +9 -9
  60. package/dist/lib/components/AcColorInput.js +5 -0
  61. package/dist/lib/components/AcColorInput.vue.d.ts +57 -0
  62. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +217 -0
  63. package/dist/lib/components/AcCommandBlock.js +5 -0
  64. package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
  65. package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -0
  66. package/dist/lib/components/AcConfirmModal.js +5 -0
  67. package/dist/lib/components/AcConfirmModal.vue.d.ts +56 -0
  68. package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +96 -0
  69. package/dist/lib/components/AcContentHeader.vue.d.ts +1 -1
  70. package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +5 -4
  71. package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +2 -2
  72. package/dist/lib/components/AcCopyButton.js +5 -0
  73. package/dist/lib/components/AcCopyButton.vue.d.ts +43 -0
  74. package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +92 -0
  75. package/dist/lib/components/AcCostSummary.js +5 -0
  76. package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
  77. package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
  78. package/dist/lib/components/AcDatePicker.vue.d.ts +8 -8
  79. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +634 -417
  80. package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
  81. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +57 -60
  82. package/dist/lib/components/AcDonutChart.js +5 -0
  83. package/dist/lib/components/AcDonutChart.vue.d.ts +83 -0
  84. package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +237 -0
  85. package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
  86. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +91 -78
  87. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
  88. package/dist/lib/components/AcDropdownItem.vue.d.ts +2 -2
  89. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +18 -18
  90. package/dist/lib/components/AcEmptyState.vue.d.ts +4 -1
  91. package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +50 -39
  92. package/dist/lib/components/AcErrorState.js +5 -0
  93. package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
  94. package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
  95. package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
  96. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +139 -116
  97. package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +16 -16
  98. package/dist/lib/components/AcFileUpload.vue.d.ts +2 -2
  99. package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +55 -53
  100. package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +2 -2
  101. package/dist/lib/components/AcFooter.js +5 -0
  102. package/dist/lib/components/AcFooter.vue.d.ts +37 -0
  103. package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +107 -0
  104. package/dist/lib/components/AcForm.vue.d.ts +3 -0
  105. package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +4 -2
  106. package/dist/lib/components/AcFormArray.vue.d.ts +2 -2
  107. package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +149 -147
  108. package/dist/lib/components/AcFormFooter.vue.d.ts +3 -3
  109. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
  110. package/dist/lib/components/AcFormSection.vue.d.ts +8 -1
  111. package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
  112. package/dist/lib/components/AcGraphChart.js +5 -0
  113. package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
  114. package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
  115. package/dist/lib/components/AcHeader.vue.d.ts +20 -5
  116. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +82 -28
  117. package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
  118. package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
  119. package/dist/lib/components/AcInput.vue.d.ts +4 -4
  120. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +99 -91
  121. package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +1 -1
  122. package/dist/lib/components/AcKeyValueInput.js +5 -0
  123. package/dist/lib/components/AcKeyValueInput.vue.d.ts +114 -0
  124. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +336 -0
  125. package/dist/lib/components/AcLineChart.js +5 -0
  126. package/dist/lib/components/AcLineChart.vue.d.ts +44 -0
  127. package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +175 -0
  128. package/dist/lib/components/AcLoader.js +5 -0
  129. package/dist/lib/components/AcLoader.vue.d.ts +15 -0
  130. package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
  131. package/dist/lib/components/AcLocaleSwitcher.js +5 -0
  132. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +48 -0
  133. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +111 -0
  134. package/dist/lib/components/AcMapChart.js +5 -0
  135. package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
  136. package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
  137. package/dist/lib/components/AcModal.vue.d.ts +6 -3
  138. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +88 -64
  139. package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
  140. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +29 -21
  141. package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
  142. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +23 -24
  143. package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
  144. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +139 -174
  145. package/dist/lib/components/AcNumberInput.js +5 -0
  146. package/dist/lib/components/AcNumberInput.vue.d.ts +79 -0
  147. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +241 -0
  148. package/dist/lib/components/AcPage.vue.d.ts +2 -2
  149. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +2 -2
  150. package/dist/lib/components/AcPagination.vue.d.ts +22 -5
  151. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +87 -56
  152. package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
  153. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
  154. package/dist/lib/components/AcProductHero.js +5 -0
  155. package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
  156. package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
  157. package/dist/lib/components/AcProgress.vue.d.ts +19 -4
  158. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +85 -31
  159. package/dist/lib/components/AcResourceCard.vue.d.ts +3 -3
  160. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +17 -17
  161. package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
  162. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +14 -9
  163. package/dist/lib/components/AcSectionContent.vue.d.ts +2 -2
  164. package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +8 -8
  165. package/dist/lib/components/AcSegmentedControl.vue.d.ts +1 -1
  166. package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +4 -4
  167. package/dist/lib/components/AcSelect.vue.d.ts +6 -6
  168. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +246 -254
  169. package/dist/lib/components/AcSettingsRow.js +5 -0
  170. package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
  171. package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
  172. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +32 -32
  173. package/dist/lib/components/AcSideTabs.vue.d.ts +2 -2
  174. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
  175. package/dist/lib/components/AcSidebar.vue.d.ts +6 -3
  176. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +67 -57
  177. package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
  178. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +46 -45
  179. package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
  180. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
  181. package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +8 -8
  182. package/dist/lib/components/AcSlider.vue.d.ts +1 -1
  183. package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +174 -172
  184. package/dist/lib/components/AcStatCard.vue.d.ts +3 -3
  185. package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +90 -85
  186. package/dist/lib/components/AcStatusBar.vue.d.ts +1 -1
  187. package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +6 -6
  188. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +28 -28
  189. package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
  190. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +31 -19
  191. package/dist/lib/components/AcSwitchCard.js +5 -0
  192. package/dist/lib/components/AcSwitchCard.vue.d.ts +59 -0
  193. package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +121 -0
  194. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +97 -97
  195. package/dist/lib/components/AcTabs.vue.d.ts +9 -2
  196. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +43 -28
  197. package/dist/lib/components/AcTag.vue.d.ts +2 -2
  198. package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +22 -22
  199. package/dist/lib/components/AcTagInput.js +5 -0
  200. package/dist/lib/components/AcTagInput.vue.d.ts +74 -0
  201. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +289 -0
  202. package/dist/lib/components/AcTextarea.vue.d.ts +4 -4
  203. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +85 -63
  204. package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
  205. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +56 -24
  206. package/dist/lib/components/AcTimePicker.js +5 -0
  207. package/dist/lib/components/AcTimePicker.vue.d.ts +65 -0
  208. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +455 -0
  209. package/dist/lib/components/AcToaster.vue.d.ts +6 -3
  210. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +115 -82
  211. package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
  212. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +203 -79
  213. package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
  214. package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
  215. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +166 -115
  216. package/dist/lib/components/index.d.ts +21 -2
  217. package/dist/lib/components/status.d.ts +28 -0
  218. package/dist/lib/components/status.js +125 -0
  219. package/dist/lib/composables/copyText.d.ts +2 -1
  220. package/dist/lib/composables/copyText.js +2 -2
  221. package/dist/lib/composables/useApiPagination.d.ts +55 -0
  222. package/dist/lib/composables/useApiPagination.js +58 -0
  223. package/dist/lib/composables/useBulkSelection.d.ts +44 -0
  224. package/dist/lib/composables/useBulkSelection.js +41 -0
  225. package/dist/lib/composables/useFormValidation.d.ts +65 -0
  226. package/dist/lib/composables/useFormValidation.js +148 -0
  227. package/dist/lib/composables/useTablePagination.d.ts +49 -0
  228. package/dist/lib/composables/useTablePagination.js +41 -0
  229. package/dist/lib/composables/useToast.d.ts +17 -1
  230. package/dist/lib/composables/useToast.js +10 -2
  231. package/dist/lib/editor/theme.js +65 -62
  232. package/dist/lib/index.d.ts +21 -3
  233. package/dist/lib/index.js +99 -75
  234. package/dist/lib/theme.css +377 -273
  235. package/package.json +20 -4
@@ -0,0 +1,84 @@
1
+ import e from "./AcButton.js";
2
+ import { Fragment as t, Teleport as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeProps as p, openBlock as m, ref as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, watch as y, withCtx as b } from "vue";
3
+ import { Trash2 as x } from "@lucide/vue";
4
+ //#region src/lib/components/AcBulkActionBar.vue?vue&type=script&setup=true&lang.ts
5
+ var S = { class: "min-h-0 overflow-hidden" }, C = { class: "text-base text-heading" }, w = { class: "font-semibold tabular-nums" }, T = { class: "flex flex-wrap items-center gap-2" }, E = {
6
+ class: "sr-only",
7
+ role: "status",
8
+ "data-ac-ds": "",
9
+ "data-testid": "ac-bulk-action-bar-status"
10
+ }, D = "button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", O = /*@__PURE__*/ f({
11
+ inheritAttrs: !1,
12
+ __name: "AcBulkActionBar",
13
+ props: {
14
+ count: {},
15
+ label: {},
16
+ pluralLabel: { default: "" },
17
+ actionLabel: { default: "Delete" },
18
+ actionColor: { default: "danger" },
19
+ actionIcon: { default: void 0 },
20
+ loading: {
21
+ type: Boolean,
22
+ default: !1
23
+ }
24
+ },
25
+ emits: ["clear", "action"],
26
+ setup(f, { emit: O }) {
27
+ let k = f, A = O, j = h(null), M = h(""), N = i(() => k.count === 1 ? k.label : k.pluralLabel || `${k.label}s`), P = i(() => `${k.count} ${N.value} selected`), F = i(() => k.actionIcon ?? (k.actionColor === "danger" ? x : void 0));
28
+ function I() {
29
+ let e = j.value;
30
+ if (!e || !e.contains(document.activeElement)) return;
31
+ let t = [...document.querySelectorAll(D)].find((t) => !e.contains(t) && !!(e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING) && t.offsetParent !== null);
32
+ t ? t.focus() : document.activeElement?.blur();
33
+ }
34
+ return y(() => k.count, (e, t) => {
35
+ e <= 0 && t > 0 && I(), M.value = e > 0 ? P.value : t > 0 ? "Selection cleared" : "";
36
+ }), (i, h) => (m(), s(t, null, [d(r, {
37
+ "enter-active-class": "grid transition-[grid-template-rows,opacity,translate] duration-200 ease-out motion-reduce:transition-none",
38
+ "enter-from-class": "grid-rows-[0fr] -translate-y-1 opacity-0",
39
+ "enter-to-class": "grid-rows-[1fr]",
40
+ "leave-active-class": "grid transition-[grid-template-rows,opacity] duration-150 ease-in motion-reduce:transition-none",
41
+ "leave-from-class": "grid-rows-[1fr]",
42
+ "leave-to-class": "grid-rows-[0fr] opacity-0"
43
+ }, {
44
+ default: b(() => [f.count > 0 ? (m(), s("div", p({ key: 0 }, i.$attrs, {
45
+ "data-ac-ds": "",
46
+ "data-testid": "ac-bulk-action-bar"
47
+ }), [c("div", S, [c("div", {
48
+ ref_key: "bar",
49
+ ref: j,
50
+ role: "region",
51
+ "aria-label": "Bulk actions",
52
+ class: "flex flex-wrap items-center justify-between gap-x-3 gap-y-2 rounded-14 border border-primary/30 bg-primary/5 px-4 py-2.5"
53
+ }, [c("p", C, [c("span", w, v(f.count), 1), u(" " + v(N.value) + " selected ", 1)]), c("div", T, [
54
+ g(i.$slots, "actions", {}, () => [g(i.$slots, "default")]),
55
+ d(e, {
56
+ color: "ghost",
57
+ size: "small",
58
+ title: "Clear",
59
+ "aria-label": "Clear selection",
60
+ disabled: f.loading,
61
+ onClick: h[0] ||= (e) => A("clear")
62
+ }, null, 8, ["disabled"]),
63
+ f.actionLabel ? (m(), a(e, {
64
+ key: 0,
65
+ color: f.actionColor,
66
+ variant: "light",
67
+ size: "small",
68
+ loading: f.loading,
69
+ onClick: h[1] ||= (e) => A("action")
70
+ }, l({
71
+ default: b(() => [u(" " + v(f.actionLabel), 1)]),
72
+ _: 2
73
+ }, [F.value ? {
74
+ name: "icon",
75
+ fn: b(() => [(m(), a(_(F.value)))]),
76
+ key: "0"
77
+ } : void 0]), 1032, ["color", "loading"])) : o("", !0)
78
+ ])], 512)])], 16)) : o("", !0)]),
79
+ _: 3
80
+ }), (m(), a(n, { to: "body" }, [c("div", E, v(M.value), 1)]))], 64));
81
+ }
82
+ });
83
+ //#endregion
84
+ export { O as default };
@@ -4,11 +4,13 @@ export interface Props {
4
4
  title?: string;
5
5
  /** Colour of the button. `white` and `ghost` are neutral styles for secondary actions. */
6
6
  color?: Tone | "white" | "ghost";
7
- /** `solid` fill, `light` tinted fill (-95 background, -30 text) or `outlined` border. */
8
- variant?: Variant;
9
- /** Height and padding: `small` 28px, `normal` 32px, `medium` 40px. */
10
- size?: "small" | "normal" | "medium";
11
- /** Shows a spinner, hides the label and blocks clicks. */
7
+ /** `solid` fill, `light` tinted fill (12% of the colour), `outlined` border on the page background, or `link`: coloured text with no box that underlines on hover, e.g. "Go to Health". */
8
+ variant?: Variant | "link";
9
+ /** Height and padding: `xs` 28px, `small` 36px, `normal` 42px (the field height, so a button lines up with an input), `medium` 42px with 16px text and 44px from 768px (cloud-ui's default `lg`). */
10
+ size?: "xs" | "small" | "normal" | "medium";
11
+ /** A round, square button for a single icon: 28px at `xs`, 32px at `small`, 36px at `normal`, 44px at `medium`. Put the icon in the `icon` or default slot; `title` becomes the accessible name, or add an `aria-label`. */
12
+ iconOnly?: boolean;
13
+ /** Shows a spinner before the label and blocks clicks. */
12
14
  loading?: boolean;
13
15
  /** Disables the button (50% opacity, no click events). */
14
16
  disabled?: boolean;
@@ -16,6 +18,8 @@ export interface Props {
16
18
  type?: "button" | "submit" | "reset";
17
19
  /** Renders an <a> styled as the button instead of a <button>. */
18
20
  href?: string;
21
+ /** Fully rounded pill corners at every size and variant, e.g. an empty state's "Get started". */
22
+ rounded?: boolean;
19
23
  }
20
24
  type __VLS_Slots = {
21
25
  /** Button content, after the icon and `title`. */
@@ -30,14 +34,16 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
30
34
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
31
35
  onClick?: ((e: MouseEvent) => any) | undefined;
32
36
  }>, {
33
- variant: Variant;
37
+ variant: Variant | "link";
34
38
  type: "button" | "submit" | "reset";
35
39
  title: string;
36
40
  disabled: boolean;
37
41
  color: Tone | "white" | "ghost";
38
42
  href: string;
39
- size: "small" | "normal" | "medium";
43
+ size: "xs" | "small" | "normal" | "medium";
44
+ iconOnly: boolean;
40
45
  loading: boolean;
46
+ rounded: boolean;
41
47
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
48
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
43
49
  declare const _default: typeof __VLS_export;
@@ -1,21 +1,17 @@
1
1
  import e from "./AcSpinner.js";
2
2
  import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, normalizeClass as o, openBlock as s, renderSlot as c, resolveDynamicComponent as l, toDisplayString as u, withCtx as d } from "vue";
3
3
  //#region src/lib/components/AcButton.vue?vue&type=script&setup=true&lang.ts
4
- var f = {
5
- key: 0,
6
- class: "-ml-0.5 inline-flex shrink-0 items-center justify-center",
7
- "aria-hidden": "true"
8
- }, p = { key: 1 }, m = {
9
- key: 2,
10
- class: "-mr-0.5 inline-flex shrink-0 items-center justify-center",
11
- "aria-hidden": "true"
12
- }, h = /*@__PURE__*/ a({
4
+ var f = /*@__PURE__*/ a({
13
5
  __name: "AcButton",
14
6
  props: {
15
7
  title: { default: "" },
16
8
  color: { default: "primary" },
17
9
  variant: { default: "solid" },
18
10
  size: { default: "normal" },
11
+ iconOnly: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
19
15
  loading: {
20
16
  type: Boolean,
21
17
  default: !1
@@ -25,68 +21,118 @@ var f = {
25
21
  default: !1
26
22
  },
27
23
  type: { default: "button" },
28
- href: { default: void 0 }
24
+ href: { default: void 0 },
25
+ rounded: {
26
+ type: Boolean,
27
+ default: !1
28
+ }
29
29
  },
30
30
  emits: ["click"],
31
- setup(a, { emit: h }) {
32
- let g = a, _ = h, v = {
31
+ setup(a, { emit: f }) {
32
+ let p = a, m = f, h = {
33
33
  primary: {
34
- solid: "bg-primary text-white border-black/15 shadow-button hover:bg-primary-hover",
35
- light: "bg-primary-95 text-primary-20 border-transparent hover:bg-primary-93",
36
- outlined: "bg-surface text-primary-20 border-[color-mix(in_srgb,var(--color-primary)_38%,var(--color-border))] shadow-xs hover:bg-primary-97 hover:border-[color-mix(in_srgb,var(--color-primary)_60%,var(--color-border))]"
34
+ solid: "border-transparent bg-primary text-white shadow-button hover:bg-primary-hover hover:shadow-sm",
35
+ light: "border-transparent bg-primary/12 text-primary-strong hover:bg-primary/18",
36
+ outlined: "border-primary/35 bg-background text-primary-strong hover:bg-primary/10"
37
37
  },
38
38
  info: {
39
- solid: "bg-info text-white border-black/15 shadow-button hover:bg-info-hover",
40
- light: "bg-blue-95 text-blue-30 border-transparent hover:bg-blue-93",
41
- outlined: "bg-surface text-blue-30 border-blue-80 shadow-xs hover:bg-blue-97"
39
+ solid: "border-transparent bg-info text-white shadow-button hover:bg-info-hover hover:shadow-sm",
40
+ light: "border-transparent bg-info/12 text-info-strong hover:bg-info/18",
41
+ outlined: "border-info/40 bg-background text-info-strong hover:bg-info/10"
42
42
  },
43
43
  success: {
44
- solid: "bg-success text-white border-black/15 shadow-button hover:bg-success-hover",
45
- light: "bg-green-95 text-green-20 border-transparent hover:bg-green-93",
46
- outlined: "bg-surface text-green-20 border-green-70 shadow-xs hover:bg-green-97"
44
+ solid: "border-transparent bg-success text-white shadow-button hover:bg-success-hover hover:shadow-sm",
45
+ light: "border-transparent bg-success/12 text-success-strong hover:bg-success/18",
46
+ outlined: "border-success/40 bg-background text-success-strong hover:bg-success/10"
47
47
  },
48
48
  warning: {
49
- solid: "bg-warning text-on-warning border-black/10 shadow-button hover:bg-warning-hover",
50
- light: "bg-yellow-95 text-yellow-20 border-transparent hover:bg-yellow-93",
51
- outlined: "bg-surface text-yellow-20 border-yellow-70 shadow-xs hover:bg-yellow-97"
49
+ solid: "border-transparent bg-warning text-on-warning shadow-button hover:bg-warning-hover hover:shadow-sm",
50
+ light: "border-transparent bg-warning/12 text-warning-strong hover:bg-warning/18",
51
+ outlined: "border-warning/45 bg-background text-warning-strong hover:bg-warning/10"
52
52
  },
53
53
  danger: {
54
- solid: "bg-danger text-white border-black/15 shadow-button hover:bg-danger-hover",
55
- light: "bg-red-95 text-red-30 border-transparent hover:bg-red-93",
56
- outlined: "bg-surface text-red-30 border-red-80 shadow-xs hover:bg-red-97"
54
+ solid: "border-transparent bg-red-50 text-white shadow-button hover:bg-red-40 hover:shadow-sm",
55
+ light: "border-transparent bg-danger/12 text-danger-strong hover:bg-danger/18",
56
+ outlined: "border-danger/40 bg-background text-danger-strong hover:bg-danger/10"
57
+ }
58
+ }, g = {
59
+ primary: "text-primary-strong",
60
+ info: "text-info-strong",
61
+ success: "text-success-strong",
62
+ warning: "text-warning-strong",
63
+ danger: "text-danger-strong",
64
+ white: "text-muted hover:text-heading",
65
+ ghost: "text-muted hover:text-heading"
66
+ }, _ = t(() => p.variant === "link"), v = t(() => p.variant === "link" ? g[p.color] : p.color === "white" ? "border-border bg-background text-heading hover:bg-surface-sunken/70" : p.color === "ghost" ? "border-transparent bg-transparent text-heading hover:bg-surface-sunken" : h[p.color][p.variant]), y = {
67
+ xs: {
68
+ base: "h-7 gap-1.5 px-2 text-xs",
69
+ icon: "size-7 text-xs"
70
+ },
71
+ small: {
72
+ base: "h-9 gap-2 px-3 text-base",
73
+ icon: "size-8 text-base"
74
+ },
75
+ normal: {
76
+ base: "h-10.5 gap-2 px-4 text-base",
77
+ icon: "size-9 text-base"
78
+ },
79
+ medium: {
80
+ base: "h-10.5 gap-2 px-5 text-base md:h-11 md:text-lg",
81
+ icon: "size-11 text-lg"
57
82
  }
58
- }, y = t(() => g.color === "white" ? "bg-surface text-heading border-border shadow-xs hover:bg-surface-muted hover:border-border-dark" : g.color === "ghost" ? "bg-transparent text-body border-transparent hover:bg-surface-sunken hover:text-heading" : v[g.color][g.variant]), b = t(() => ({
59
- small: "h-7 gap-1.5 px-2.5 text-xs [&_svg]:size-3.5",
60
- normal: "h-8 gap-2 px-3.5 text-base [&_svg]:size-4",
61
- medium: "h-10 gap-2 px-5 text-lg [&_svg]:size-4"
62
- })[g.size]), x = (e) => {
63
- !g.disabled && !g.loading && _("click", e);
83
+ }, b = {
84
+ xs: "gap-1 text-xs [&_svg]:size-3.5",
85
+ small: "gap-1 text-base [&_svg]:size-4",
86
+ normal: "gap-1 text-base [&_svg]:size-4",
87
+ medium: "gap-1 text-base md:text-lg [&_svg]:size-4"
88
+ }, x = t(() => {
89
+ if (_.value) return [b[p.size], p.rounded ? "rounded-full" : "rounded-4"];
90
+ let e = y[p.size];
91
+ return p.iconOnly ? [`${e.icon} rounded-full`, "[&_svg]:size-4"] : [
92
+ e.base,
93
+ p.rounded ? "rounded-full" : "rounded-10",
94
+ "[&_svg]:size-4"
95
+ ];
96
+ }), S = t(() => _.value ? "group/ac-button underline-offset-4 hover:underline" : "justify-center border active:translate-y-px disabled:shadow-none disabled:active:translate-y-0 motion-reduce:active:translate-y-0"), C = (e) => {
97
+ !p.disabled && !p.loading && m("click", e);
64
98
  };
65
- return (t, h) => (s(), n(l(a.href ? "a" : "button"), {
99
+ return (t, f) => (s(), n(l(a.href ? "a" : "button"), {
66
100
  href: a.href && !a.disabled ? a.href : void 0,
67
101
  type: a.href ? void 0 : a.type,
68
102
  disabled: !a.href && a.disabled || void 0,
69
103
  "aria-disabled": a.href && a.disabled || void 0,
70
104
  "aria-busy": a.loading || void 0,
71
- class: o(["relative inline-flex cursor-pointer items-center justify-center rounded-6 border font-medium tracking-[-0.005em] whitespace-nowrap transition-[background-color,border-color,color,box-shadow,transform] duration-150 ease-out select-none focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring active:translate-y-px disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none disabled:active:translate-y-0 aria-disabled:pointer-events-none aria-disabled:opacity-50", [
72
- y.value,
73
- b.value,
74
- a.loading && "text-transparent! pointer-events-none"
105
+ class: o(["relative inline-flex cursor-pointer items-center font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,transform] duration-200 select-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50", [
106
+ S.value,
107
+ v.value,
108
+ "focus-visible:ring-ring",
109
+ x.value,
110
+ a.loading && "pointer-events-none"
75
111
  ]]),
76
112
  "data-ac-ds": "",
77
113
  "data-testid": "ac-button",
78
- onClick: x
114
+ onClick: C
79
115
  }, {
80
116
  default: d(() => [
81
- t.$slots.icon ? (s(), i("span", f, [c(t.$slots, "icon")])) : r("", !0),
82
- a.title ? (s(), i("span", p, u(a.title), 1)) : r("", !0),
83
- c(t.$slots, "default"),
84
- t.$slots["icon-right"] ? (s(), i("span", m, [c(t.$slots, "icon-right")])) : r("", !0),
85
117
  a.loading ? (s(), n(e, {
86
- key: 3,
87
- class: o(["absolute inset-0 m-auto", a.variant === "solid" && a.color !== "white" && a.color !== "ghost" ? "text-white" : "text-primary"]),
118
+ key: 0,
119
+ class: o(!a.iconOnly && !_.value && "-ml-0.5"),
88
120
  label: ""
89
- }, null, 8, ["class"])) : r("", !0)
121
+ }, null, 8, ["class"])) : t.$slots.icon ? (s(), i("span", {
122
+ key: 1,
123
+ class: o([!a.iconOnly && !_.value && "-ml-0.5", "inline-flex shrink-0 items-center justify-center"]),
124
+ "aria-hidden": "true"
125
+ }, [c(t.$slots, "icon")], 2)) : r("", !0),
126
+ a.title ? (s(), i("span", {
127
+ key: 2,
128
+ class: o(a.iconOnly && "sr-only")
129
+ }, u(a.title), 3)) : r("", !0),
130
+ a.iconOnly && a.loading ? r("", !0) : c(t.$slots, "default", {}, void 0, void 0, 3),
131
+ t.$slots["icon-right"] ? (s(), i("span", {
132
+ key: 4,
133
+ class: o(["inline-flex shrink-0 items-center justify-center", _.value ? "transition-transform duration-200 group-hover/ac-button:translate-x-0.5 motion-reduce:transition-none motion-reduce:group-hover/ac-button:translate-x-0" : "-mr-0.5"]),
134
+ "aria-hidden": "true"
135
+ }, [c(t.$slots, "icon-right")], 2)) : r("", !0)
90
136
  ]),
91
137
  _: 3
92
138
  }, 8, [
@@ -100,4 +146,4 @@ var f = {
100
146
  }
101
147
  });
102
148
  //#endregion
103
- export { h as default };
149
+ export { f as default };
@@ -1,6 +1,6 @@
1
1
  import { computed as e, createElementBlock as t, defineComponent as n, normalizeClass as r, openBlock as i, renderSlot as a } from "vue";
2
2
  //#region src/lib/components/AcButtons.vue?vue&type=script&setup=true&lang.ts
3
- var o = ["aria-label"], s = "[&>*]:rounded-none [&>*:first-child]:rounded-l-6 [&>*:last-child]:rounded-r-6 [&>*:not(:first-child)]:-ml-px [&>*:hover]:z-[1] [&>*:focus-visible]:z-[2]", c = /*@__PURE__*/ n({
3
+ var o = ["aria-label"], s = "[&>*]:rounded-none [&>*:first-child]:rounded-l-10 [&>*:last-child]:rounded-r-10 [&>*:not(:first-child)]:-ml-px [&>*:hover]:z-[1] [&>*:focus-visible]:z-[2]", c = /*@__PURE__*/ n({
4
4
  __name: "AcButtons",
5
5
  props: {
6
6
  attached: {
@@ -1,21 +1,60 @@
1
+ import type { Component } from "vue";
1
2
  export interface Props {
2
- /** Header title. The header only renders with a title or `actions` slot. */
3
+ /** Header title. The header renders with a title, an `icon`, or the `actions` or `badges` slot. */
3
4
  title?: string;
4
5
  /** Small line under the title. */
5
6
  subtitle?: string;
6
- /** Adds 20px padding to the body. Turn off for flush tables; the body then clips to the card's rounded corners. */
7
+ /** Same as `subtitle`, under cloud-ui's name. The `description` slot replaces it. */
8
+ description?: string;
9
+ /** A Lucide icon shown in a tinted 32px tile before the title (28px with `header-size="small"`). */
10
+ icon?: Component;
11
+ /** Adds 24px padding to the body (20px with `header-size="small"`). Turn off for flush tables; the body then clips to the card's rounded corners. */
7
12
  padded?: boolean;
13
+ /** Padding on cloud-ui's scale, for body, header and footer alike: `none`, `xs` 12px, `sm` 16px, `md` 24px, `lg` 32px. Overrides `padded`. */
14
+ padding?: "none" | "xs" | "sm" | "md" | "lg";
15
+ /** `default` white card, `muted` a sunken 40% fill for secondary panels, `dashed` a transparent card with a dashed edge for placeholders, `danger` a red-tinted card for destructive settings such as a "Danger zone". */
16
+ variant?: "default" | "muted" | "dashed" | "danger";
17
+ /** Tints the header icon tile, the `accent` wash and the watermark: `primary` (green), `blue`, `violet`, `red` or `amber`. */
18
+ color?: "primary" | "blue" | "violet" | "red" | "amber";
19
+ /** `normal` header with a 16px title and a divider; `small` a compact header with a 28px icon tile, a 14px title and no divider, like cloud-ui's section cards. */
20
+ headerSize?: "normal" | "small";
21
+ /** Hover look for a card that acts as a link or button: a pointer, a primary-tinted edge and a light wash. */
22
+ hoverable?: boolean;
23
+ /** Rests the card on a faint shadow that deepens on hover; with `hoverable` the card also lifts 2px. */
24
+ shadow?: boolean;
25
+ /** A primary gradient wash behind the header, plus the `icon` as a large watermark on normal headers. */
26
+ accent?: boolean;
27
+ /** Root element, e.g. `a`, `button` or `router-link` for a card that opens something. Pass `href` or `to` as usual. */
28
+ as?: string;
8
29
  }
9
30
  type __VLS_Slots = {
10
- /** Card body. */
31
+ /** Card body. Leave it empty for a header-only card; the header then closes the card without a divider. */
11
32
  default?: () => unknown;
12
33
  /** Buttons on the right of the header. */
13
34
  actions?: () => unknown;
35
+ /** Replaces the `icon` tile's content, e.g. a logo image. */
36
+ icon?: () => unknown;
37
+ /** Replaces the line under the title, e.g. text with a link. */
38
+ description?: () => unknown;
39
+ /** Badges or tags after the title. */
40
+ badges?: () => unknown;
41
+ /** A footer row under the body, e.g. a timestamp or a link. */
42
+ footer?: () => unknown;
14
43
  };
15
44
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
45
+ variant: "default" | "muted" | "dashed" | "danger";
16
46
  title: string;
47
+ description: string;
48
+ icon: Component;
49
+ color: "primary" | "blue" | "violet" | "red" | "amber";
17
50
  subtitle: string;
18
51
  padded: boolean;
52
+ padding: "none" | "xs" | "sm" | "md" | "lg";
53
+ headerSize: "normal" | "small";
54
+ hoverable: boolean;
55
+ shadow: boolean;
56
+ accent: boolean;
57
+ as: string;
19
58
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
59
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
60
  declare const _default: typeof __VLS_export;
@@ -1,28 +1,189 @@
1
- import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, renderSlot as o, toDisplayString as s } from "vue";
1
+ import { Comment as e, Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, renderSlot as u, resolveDynamicComponent as d, toDisplayString as f, useSlots as p, withCtx as m } from "vue";
2
2
  //#region src/lib/components/AcCard.vue?vue&type=script&setup=true&lang.ts
3
- var c = {
4
- class: "rounded-10 border border-border bg-surface shadow-xs",
5
- "data-ac-ds": "",
6
- "data-testid": "ac-card"
7
- }, l = {
3
+ var h = {
8
4
  key: 0,
9
- class: "flex items-center justify-between gap-4 border-b border-border-light px-5 py-3.5"
10
- }, u = { class: "min-w-0" }, d = { class: "truncate" }, f = {
5
+ class: "pointer-events-none absolute inset-0 -z-10 overflow-hidden rounded-[inherit]",
6
+ "aria-hidden": "true"
7
+ }, g = { class: "flex min-w-0 flex-1 items-center gap-3" }, _ = { class: "min-w-0 flex-1" }, v = { class: "flex flex-wrap items-center gap-2" }, y = {
11
8
  key: 0,
12
- class: "mt-0.5 truncate text-xs text-muted"
13
- }, p = { class: "flex shrink-0 items-center gap-2" }, m = /*@__PURE__*/ r({
9
+ class: "mt-0.5 text-xs leading-4 text-muted"
10
+ }, b = {
11
+ key: 1,
12
+ class: "mt-0.5 text-xs leading-4 text-muted"
13
+ }, x = {
14
+ key: 1,
15
+ class: "flex shrink-0 flex-wrap items-center gap-2"
16
+ }, S = /*@__PURE__*/ s({
14
17
  __name: "AcCard",
15
18
  props: {
16
19
  title: { default: "" },
17
20
  subtitle: { default: "" },
21
+ description: { default: "" },
22
+ icon: { default: void 0 },
18
23
  padded: {
19
24
  type: Boolean,
20
25
  default: !0
21
- }
26
+ },
27
+ padding: { default: void 0 },
28
+ variant: { default: "default" },
29
+ color: { default: "primary" },
30
+ headerSize: { default: "normal" },
31
+ hoverable: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ shadow: {
36
+ type: Boolean,
37
+ default: !1
38
+ },
39
+ accent: {
40
+ type: Boolean,
41
+ default: !1
42
+ },
43
+ as: { default: "section" }
22
44
  },
23
- setup(r) {
24
- return (m, h) => (a(), t("section", c, [r.title || m.$slots.actions ? (a(), t("header", l, [n("div", u, [n("h5", d, s(r.title), 1), r.subtitle ? (a(), t("p", f, s(r.subtitle), 1)) : e("", !0)]), n("div", p, [o(m.$slots, "actions")])])) : e("", !0), n("div", { class: i(r.padded ? "p-5" : ["overflow-hidden rounded-b-10", !(r.title || m.$slots.actions) && "rounded-t-10"]) }, [o(m.$slots, "default")], 2)]));
45
+ setup(s) {
46
+ let S = s, C = p(), w = {
47
+ default: "border-border bg-surface",
48
+ muted: "border-border bg-surface-sunken/40",
49
+ dashed: "border-dashed border-border bg-transparent",
50
+ danger: "border-danger/30 bg-danger/5"
51
+ }, T = {
52
+ none: "",
53
+ xs: "p-3",
54
+ sm: "p-4",
55
+ md: "p-6",
56
+ lg: "p-8"
57
+ }, E = {
58
+ none: "px-4",
59
+ xs: "px-3",
60
+ sm: "px-4",
61
+ md: "px-6",
62
+ lg: "px-8"
63
+ }, D = {
64
+ none: "pt-4",
65
+ xs: "pt-3",
66
+ sm: "pt-4",
67
+ md: "pt-5",
68
+ lg: "pt-6"
69
+ }, O = {
70
+ none: "pb-4",
71
+ xs: "pb-3",
72
+ sm: "pb-4",
73
+ md: "pb-5",
74
+ lg: "pb-6"
75
+ }, k = {
76
+ primary: {
77
+ tile: "bg-primary/10 text-primary",
78
+ border: "border-primary/25",
79
+ ring: "ring-primary/20",
80
+ wash: "from-primary/10 via-primary/3",
81
+ washSm: "from-primary/[0.07]",
82
+ watermark: "text-primary/5"
83
+ },
84
+ blue: {
85
+ tile: "bg-info/10 text-info",
86
+ border: "border-info/25",
87
+ ring: "ring-info/20",
88
+ wash: "from-info/10 via-info/3",
89
+ washSm: "from-info/[0.07]",
90
+ watermark: "text-info/5"
91
+ },
92
+ violet: {
93
+ tile: "bg-pending/10 text-pending",
94
+ border: "border-pending/25",
95
+ ring: "ring-pending/20",
96
+ wash: "from-pending/10 via-pending/3",
97
+ washSm: "from-pending/[0.07]",
98
+ watermark: "text-pending/5"
99
+ },
100
+ red: {
101
+ tile: "bg-danger/10 text-danger",
102
+ border: "border-danger/25",
103
+ ring: "ring-danger/20",
104
+ wash: "from-danger/10 via-danger/3",
105
+ washSm: "from-danger/[0.07]",
106
+ watermark: "text-danger/5"
107
+ },
108
+ amber: {
109
+ tile: "bg-warning/10 text-warning",
110
+ border: "border-warning/25",
111
+ ring: "ring-warning/20",
112
+ wash: "from-warning/10 via-warning/3",
113
+ washSm: "from-warning/[0.07]",
114
+ watermark: "text-warning/5"
115
+ }
116
+ }, A = n(() => S.headerSize === "small"), j = n(() => k[S.color]), M = n(() => S.description || S.subtitle), N = n(() => [
117
+ w[S.variant],
118
+ S.as !== "section" && "w-full text-left no-underline outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
119
+ S.hoverable && "cursor-pointer hover:border-primary/30 hover:bg-accent-hover/60",
120
+ S.shadow && "shadow-xs hover:shadow-card",
121
+ S.hoverable && S.shadow && "hover:-translate-y-0.5 motion-reduce:hover:translate-y-0"
122
+ ]);
123
+ function P() {
124
+ return !!(S.title || S.icon || C.icon || C.actions || C.badges);
125
+ }
126
+ function F(n) {
127
+ return n.some((n) => n.type === e ? !1 : n.type !== t || F(n.children));
128
+ }
129
+ function I() {
130
+ return F(C.default?.() ?? []);
131
+ }
132
+ function L() {
133
+ let e = I(), t = S.padding;
134
+ return [
135
+ t ? [
136
+ "items-start gap-3",
137
+ E[t],
138
+ D[t],
139
+ !A.value && "border-border/60"
140
+ ] : A.value ? "items-start gap-3 px-5 pt-5" : "items-start gap-3 border-border/60 px-6 pt-5",
141
+ !e && (t ? O[t] : "pb-5"),
142
+ e && !A.value && "border-b pb-3",
143
+ !e && !C.footer && "rounded-b-[calc(var(--radius-14)-1px)]",
144
+ S.accent && (A.value ? ["bg-linear-to-r to-transparent", j.value.washSm] : ["bg-linear-to-br to-transparent", j.value.wash])
145
+ ];
146
+ }
147
+ function R() {
148
+ return S.padding && S.padding !== "none" ? T[S.padding] : S.padded && S.padding !== "none" ? A.value ? "p-5" : "p-6" : [
149
+ "overflow-hidden",
150
+ !C.footer && "rounded-b-14",
151
+ !P() && "rounded-t-14"
152
+ ];
153
+ }
154
+ return (e, t) => (l(), r(d(s.as), {
155
+ class: c(["flex flex-col rounded-14 border text-body transition-[background-color,border-color,box-shadow,translate] duration-200 ease-out motion-reduce:transition-none", N.value]),
156
+ "data-ac-ds": "",
157
+ "data-testid": "ac-card"
158
+ }, {
159
+ default: m(() => [
160
+ P() ? (l(), a("header", {
161
+ key: 0,
162
+ class: c(["relative isolate flex flex-wrap justify-between rounded-t-[calc(var(--radius-14)-1px)]", L()])
163
+ }, [
164
+ s.accent && s.icon && !A.value ? (l(), a("div", h, [(l(), r(d(s.icon), { class: c(["absolute -top-4 -right-4 size-24", j.value.watermark]) }, null, 8, ["class"]))])) : i("", !0),
165
+ o("div", g, [s.icon || e.$slots.icon ? (l(), a("span", {
166
+ key: 0,
167
+ class: c(["flex shrink-0 items-center justify-center", [j.value.tile, A.value ? ["size-7 rounded-8 ring-1 ring-inset", j.value.ring] : ["size-8 rounded-10 border", j.value.border]]]),
168
+ "aria-hidden": "true"
169
+ }, [u(e.$slots, "icon", {}, () => [(l(), r(d(s.icon), { class: c(A.value ? "size-3.5" : "size-4") }, null, 8, ["class"]))])], 2)) : i("", !0), o("div", _, [o("div", v, [s.title ? (l(), a("h3", {
170
+ key: 0,
171
+ class: c(["truncate font-heading font-semibold tracking-tight text-heading", A.value ? "text-base" : "text-lg leading-tight"])
172
+ }, f(s.title), 3)) : i("", !0), u(e.$slots, "badges")]), e.$slots.description ? (l(), a("div", y, [u(e.$slots, "description")])) : M.value ? (l(), a("p", b, f(M.value), 1)) : i("", !0)])]),
173
+ e.$slots.actions ? (l(), a("div", x, [u(e.$slots, "actions")])) : i("", !0)
174
+ ], 2)) : i("", !0),
175
+ I() ? (l(), a("div", {
176
+ key: 1,
177
+ class: c(["flex-1", R()])
178
+ }, [u(e.$slots, "default")], 2)) : i("", !0),
179
+ e.$slots.footer ? (l(), a("footer", {
180
+ key: 2,
181
+ class: c(["flex flex-wrap items-center gap-3 border-t border-border py-3 text-base text-muted", s.padding ? E[s.padding] : A.value ? "px-5" : "px-6"])
182
+ }, [u(e.$slots, "footer")], 2)) : i("", !0)
183
+ ]),
184
+ _: 3
185
+ }, 8, ["class"]));
25
186
  }
26
187
  });
27
188
  //#endregion
28
- export { m as default };
189
+ export { S as default };
@@ -109,10 +109,12 @@ export interface Props {
109
109
  unit?: string;
110
110
  /** Shows dates as “3d ago” with the exact time on hover. Turn off to show the exact time. */
111
111
  relative?: boolean;
112
- /** Shown for null, empty text, empty lists and maps, and the server's `<none>` / `<unknown>`. */
112
+ /** Shown for null, empty text, empty lists and maps, and the server's `<none>` / `<unknown>`. With the default dash, a label column says "No labels" instead, like cloud-ui's "No tags". */
113
113
  emptyText?: string;
114
114
  /** Shows a placeholder bar while the value loads. */
115
115
  loading?: boolean;
116
+ /** Shows a status as a coloured dot and text without the pill, for dense tables (cloud-ui's `plain` status). */
117
+ plain?: boolean;
116
118
  }
117
119
  declare const _default: typeof __VLS_export;
118
120
  export default _default;
@@ -127,13 +129,14 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
127
129
  loading: boolean;
128
130
  align: "left" | "center" | "right";
129
131
  maxItems: number;
132
+ plain: boolean;
133
+ maxWidth: string;
130
134
  tooltip: string;
131
135
  column: ResourceColumn;
132
- relative: boolean;
133
136
  emptyText: string;
134
137
  cell: ResourceCell;
135
138
  resolveLink: (link: string) => string;
136
139
  mono: boolean;
137
- maxWidth: string;
138
140
  unit: string;
141
+ relative: boolean;
139
142
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;