@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
@@ -1,26 +1,22 @@
1
1
  import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, getCurrentInstance as s, mergeProps as c, normalizeClass as l, normalizeStyle as u, openBlock as d, renderSlot as f, resolveDynamicComponent as p, toDisplayString as m, unref as h, useId as g, withCtx as _ } from "vue";
2
2
  import { ArrowDownRight as v, ArrowUpRight as y, Minus as b } from "@lucide/vue";
3
3
  //#region src/lib/components/AcStatCard.vue?vue&type=script&setup=true&lang.ts
4
- var x = ["aria-busy"], ee = {
4
+ var x = ["aria-busy"], S = {
5
5
  key: 0,
6
6
  class: "-mt-0.5 flex shrink-0 items-center gap-2"
7
- }, te = {
8
- key: 0,
9
- class: "inline-flex size-8 items-center justify-center rounded-8 bg-primary-95 text-primary-30 [&_svg]:size-4",
10
- "aria-hidden": "true"
11
- }, ne = ["id"], S = {
7
+ }, C = ["id"], w = {
12
8
  key: 1,
13
9
  class: "min-w-0"
14
- }, C = { class: "flex flex-wrap items-baseline gap-x-1.5 gap-y-0.5" }, w = {
10
+ }, T = { class: "flex flex-wrap items-baseline gap-x-1.5 gap-y-0.5" }, E = {
15
11
  key: 0,
16
- class: "text-base text-muted"
17
- }, T = ["viewBox", "aria-label"], E = ["d"], D = ["d"], O = ["cx", "cy"], k = ["aria-labelledby", "aria-valuenow"], A = {
12
+ class: "text-xs font-medium text-muted"
13
+ }, D = ["viewBox", "aria-label"], O = ["d"], ee = ["d"], te = ["cx", "cy"], ne = ["aria-labelledby", "aria-valuenow"], k = {
18
14
  key: 1,
19
- class: "flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-1 text-xs text-muted"
20
- }, j = {
15
+ class: "flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-1 text-sm text-muted"
16
+ }, A = {
21
17
  key: 0,
22
- class: "inline-flex items-center gap-1"
23
- }, M = { class: "sr-only" }, N = { key: 0 }, P = 88, F = 28, I = /*@__PURE__*/ o({
18
+ class: "inline-flex items-center gap-1.5"
19
+ }, j = { class: "sr-only" }, M = { key: 0 }, N = 88, P = 28, F = /*@__PURE__*/ o({
24
20
  __name: "AcStatCard",
25
21
  props: {
26
22
  label: {},
@@ -56,80 +52,85 @@ var x = ["aria-busy"], ee = {
56
52
  target: { default: void 0 }
57
53
  },
58
54
  emits: ["click"],
59
- setup(o, { emit: I }) {
60
- let L = o, R = I, z = {
55
+ setup(o, { emit: F }) {
56
+ let I = o, L = F, R = {
61
57
  default: {
62
58
  card: "border-border bg-surface",
63
59
  value: "text-heading",
64
- label: "text-muted"
60
+ label: "text-muted",
61
+ tile: "bg-primary/10 text-primary-strong ring-primary/20"
65
62
  },
66
63
  success: {
67
64
  card: "border-border bg-surface",
68
- value: "text-green-30",
69
- label: "text-muted"
65
+ value: "text-success-strong",
66
+ label: "text-muted",
67
+ tile: "bg-success/10 text-success-strong ring-success/20"
70
68
  },
71
69
  info: {
72
70
  card: "border-border bg-surface",
73
- value: "text-blue-30",
74
- label: "text-muted"
71
+ value: "text-info-strong",
72
+ label: "text-muted",
73
+ tile: "bg-info/10 text-info-strong ring-info/20"
75
74
  },
76
75
  warning: {
77
- card: "border-yellow-80 bg-yellow-97",
78
- value: "text-yellow-20",
79
- label: "text-yellow-20"
76
+ card: "border-warning/30 bg-warning/5",
77
+ value: "text-warning-strong",
78
+ label: "text-warning-strong",
79
+ tile: "bg-warning/10 text-warning-strong ring-warning/25"
80
80
  },
81
81
  danger: {
82
- card: "border-red-80 bg-red-97",
83
- value: "text-red-30",
84
- label: "text-red-30"
82
+ card: "border-danger/25 bg-danger/5",
83
+ value: "text-danger-strong",
84
+ label: "text-danger-strong",
85
+ tile: "bg-danger/10 text-danger-strong ring-danger/20"
85
86
  }
86
- }, B = {
87
+ }, z = {
87
88
  primary: "bg-primary",
88
89
  info: "bg-info",
89
90
  success: "bg-success",
90
91
  warning: "bg-warning",
91
92
  danger: "bg-danger"
92
- }, V = s(), H = V?.appContext.components.RouterLink, U = g(), W = e(() => z[L.status]), G = e(() => {
93
- if (L.trend) return L.trend;
94
- if (L.delta === void 0 || L.delta === "") return;
95
- if (typeof L.delta == "number") return L.delta > 0 ? "up" : L.delta < 0 ? "down" : "flat";
96
- let e = L.delta.trim()[0];
93
+ }, B = s(), V = B?.appContext.components.RouterLink, H = g(), U = e(() => R[I.status]), W = e(() => {
94
+ if (I.trend) return I.trend;
95
+ if (I.delta === void 0 || I.delta === "") return;
96
+ if (typeof I.delta == "number") return I.delta > 0 ? "up" : I.delta < 0 ? "down" : "flat";
97
+ let e = I.delta.trim()[0];
97
98
  return e === "+" ? "up" : e === "-" || e === "−" ? "down" : "flat";
98
- }), K = e(() => typeof L.delta == "number" ? `${L.delta > 0 ? "+" : L.delta < 0 ? "−" : ""}${Math.abs(L.delta).toLocaleString(void 0, { maximumFractionDigits: 1 })}%` : L.delta ?? ""), q = e(() => G.value === "flat" || !G.value ? "text-muted" : G.value === "up" === L.invertTrend ? "text-red-30" : "text-green-30"), J = e(() => !!G.value && K.value !== ""), Y = e(() => Math.min(100, Math.max(0, L.progress ?? 0))), X = e(() => L.progressColor === "auto" ? Y.value >= 95 ? B.danger : Y.value >= 80 ? B.warning : B.primary : B[L.progressColor]), re = e(() => G.value === "up" ? y : G.value === "down" ? v : b), Z = e(() => {
99
- let e = L.sparkline.filter((e) => Number.isFinite(e));
99
+ }), G = e(() => typeof I.delta == "number" ? `${I.delta > 0 ? "+" : I.delta < 0 ? "−" : ""}${Math.abs(I.delta).toLocaleString(void 0, { maximumFractionDigits: 1 })}%` : I.delta ?? ""), K = e(() => W.value === "flat" || !W.value ? "bg-surface-sunken text-muted" : W.value === "up" === I.invertTrend ? "bg-danger/10 text-danger-strong" : "bg-success/10 text-success-strong"), q = e(() => !!W.value && G.value !== ""), J = e(() => Math.min(100, Math.max(0, I.progress ?? 0))), Y = e(() => I.progressColor === "auto" ? J.value >= 95 ? z.danger : J.value >= 80 ? z.warning : z.primary : z[I.progressColor]), X = e(() => W.value === "up" ? y : W.value === "down" ? v : b), Z = e(() => {
100
+ let e = I.sparkline.filter((e) => Number.isFinite(e));
100
101
  if (e.length < 2) return null;
101
102
  let t = Math.min(...e), n = Math.max(...e), r = n - t || 1, i = e.map((n, i) => [i / (e.length - 1) * 82 + 3, 25 - (n - t) / r * 22]), a = i.map(([e, t], n) => `${n ? "L" : "M"}${e.toFixed(1)} ${t.toFixed(1)}`).join(" "), o = i[i.length - 1], s = (e) => e.toLocaleString(), c = `Trend over ${e.length} points: from ${s(e[0])} to ${s(e[e.length - 1])}, low ${s(t)}, high ${s(n)}`;
102
103
  return {
103
104
  line: a,
104
- area: `${a} L${o[0].toFixed(1)} ${F} L3 ${F} Z`,
105
+ area: `${a} L${o[0].toFixed(1)} ${P} L3 ${P} Z`,
105
106
  last: o,
106
107
  summary: c
107
108
  };
108
- }), ie = e(() => L.inline || L.size === "small" ? "text-lg font-semibold" : "text-3xl font-semibold"), Q = e(() => {
109
- if (L.to !== void 0 && H) return {
110
- is: H,
111
- to: L.to
109
+ }), re = e(() => I.inline || I.size === "small" ? "text-lg font-semibold tabular-nums" : "text-3xl font-bold tracking-tight tabular-nums"), Q = e(() => {
110
+ if (I.to !== void 0 && V) return {
111
+ is: V,
112
+ to: I.to
112
113
  };
113
- let e = L.href ?? (typeof L.to == "string" ? L.to : void 0);
114
+ let e = I.href ?? (typeof I.to == "string" ? I.to : void 0);
114
115
  return e ? {
115
116
  is: "a",
116
117
  href: e,
117
- target: L.target,
118
- rel: L.target === "_blank" ? "noopener noreferrer" : void 0
118
+ target: I.target,
119
+ rel: I.target === "_blank" ? "noopener noreferrer" : void 0
119
120
  } : null;
120
121
  });
121
122
  function $() {
122
- return !Q.value && !!V?.vnode.props?.onClick;
123
+ return !Q.value && !!B?.vnode.props?.onClick;
123
124
  }
124
- function ae(e) {
125
- R("click", e);
125
+ function ie(e) {
126
+ L("click", e);
126
127
  }
127
128
  return (e, s) => (d(), r("div", {
128
- class: l(["relative flex min-w-0 rounded-10 border shadow-xs transition-[border-color,box-shadow] duration-150 has-[[data-ac-card-link]:focus-visible]:ring-[3px] has-[[data-ac-card-link]:focus-visible]:ring-ring", [
129
- W.value.card,
130
- o.inline ? "items-center justify-between gap-3 px-4 py-2.5" : "flex-col gap-2",
131
- !o.inline && (o.size === "small" ? "px-3.5 py-3" : "p-4"),
132
- (Q.value || $()) && "hover:border-border-dark hover:shadow-sm"
129
+ class: l(["relative flex min-w-0 rounded-14 border transition-[background-color,border-color,box-shadow,translate] duration-200 has-[[data-ac-card-link]:focus-visible]:ring-2 has-[[data-ac-card-link]:focus-visible]:ring-ring has-[[data-ac-card-link]:focus-visible]:ring-offset-2 has-[[data-ac-card-link]:focus-visible]:ring-offset-surface motion-reduce:transition-none", [
130
+ U.value.card,
131
+ o.inline ? "items-center justify-between gap-3 px-4 py-3" : "flex-col gap-2",
132
+ !o.inline && (o.size === "small" ? "px-4 py-3.5" : "p-5"),
133
+ (Q.value || $()) && "hover:-translate-y-0.5 hover:border-primary/30 hover:bg-accent-hover/60 hover:shadow-card motion-reduce:hover:translate-y-0"
133
134
  ]]),
134
135
  "aria-busy": o.loading || void 0,
135
136
  "data-ac-ds": "",
@@ -139,16 +140,16 @@ var x = ["aria-busy"], ee = {
139
140
  ...Q.value,
140
141
  is: void 0
141
142
  } : {}, {
142
- id: `${h(U)}-label`,
143
+ id: `${h(H)}-label`,
143
144
  type: $() ? "button" : void 0,
144
- "aria-describedby": Q.value || $() ? `${h(U)}-value` : void 0,
145
+ "aria-describedby": Q.value || $() ? `${h(H)}-value` : void 0,
145
146
  "data-ac-card-link": Q.value || $() ? "" : void 0,
146
- class: ["min-w-0 truncate text-left font-medium outline-none after:absolute after:inset-0 after:rounded-10", [
147
- o.inline ? "text-base text-body" : o.size === "small" ? "text-sm tracking-wide uppercase" : "text-xs",
148
- !o.inline && W.value.label,
147
+ class: ["min-w-0 truncate text-left outline-none after:absolute after:inset-0 after:rounded-14", [
148
+ o.inline ? "text-base font-medium text-body" : ["font-semibold tracking-wide uppercase", o.size === "small" ? "text-sm" : "text-xs"],
149
+ !o.inline && U.value.label,
149
150
  (Q.value || $()) && "cursor-pointer"
150
151
  ]],
151
- onClick: s[0] ||= (e) => Q.value || $() ? ae(e) : void 0
152
+ onClick: s[0] ||= (e) => Q.value || $() ? ie(e) : void 0
152
153
  }), {
153
154
  default: _(() => [a(m(o.label), 1)]),
154
155
  _: 1
@@ -158,68 +159,72 @@ var x = ["aria-busy"], ee = {
158
159
  "aria-describedby",
159
160
  "data-ac-card-link",
160
161
  "class"
161
- ])), !o.inline && (e.$slots.badge || e.$slots.icon || o.icon) ? (d(), r("div", ee, [f(e.$slots, "badge"), e.$slots.icon || o.icon ? (d(), r("span", te, [f(e.$slots, "icon", {}, () => [(d(), t(p(o.icon)))])])) : n("", !0)])) : n("", !0)], 2),
162
+ ])), !o.inline && (e.$slots.badge || e.$slots.icon || o.icon) ? (d(), r("div", S, [f(e.$slots, "badge"), e.$slots.icon || o.icon ? (d(), r("span", {
163
+ key: 0,
164
+ class: l(["inline-flex items-center justify-center rounded-full ring-1 ring-inset [&_svg]:size-4", [U.value.tile, o.size === "small" ? "size-8" : "size-9"]]),
165
+ "aria-hidden": "true"
166
+ }, [f(e.$slots, "icon", {}, () => [(d(), t(p(o.icon)))])], 2)) : n("", !0)])) : n("", !0)], 2),
162
167
  i("div", {
163
- id: `${h(U)}-value`,
168
+ id: `${h(H)}-value`,
164
169
  class: l(["flex min-w-0 items-end justify-between gap-3", o.inline ? "shrink-0" : "flex-1"])
165
170
  }, [o.loading ? (d(), r("span", {
166
171
  key: 0,
167
- class: l(["ac-skeleton-bone block rounded-4", o.inline ? "h-4 w-12" : o.size === "small" ? "h-4 w-2/5" : "mt-1 h-6 w-1/2"])
168
- }, null, 2)) : (d(), r("div", S, [f(e.$slots, "default", {}, () => [i("p", C, [i("span", { class: l(["min-w-0 break-words", [
169
- ie.value,
170
- W.value.value,
172
+ class: l(["ac-skeleton-bone block rounded-6", o.inline ? "h-4 w-12" : o.size === "small" ? "h-4 w-2/5" : "mt-1 h-7 w-1/2"])
173
+ }, null, 2)) : (d(), r("div", w, [f(e.$slots, "default", {}, () => [i("p", T, [i("span", { class: l(["min-w-0 break-words", [
174
+ re.value,
175
+ U.value.value,
171
176
  o.mono && "font-mono tracking-tight"
172
- ]]) }, m(o.value), 3), o.suffix ? (d(), r("span", w, m(o.suffix), 1)) : n("", !0)])])])), Z.value && !o.inline && !o.loading ? (d(), r("svg", {
177
+ ]]) }, m(o.value), 3), o.suffix ? (d(), r("span", E, m(o.suffix), 1)) : n("", !0)])])])), Z.value && !o.inline && !o.loading ? (d(), r("svg", {
173
178
  key: 2,
174
- width: P,
175
- height: F,
176
- viewBox: `0 0 ${P} ${F}`,
179
+ width: N,
180
+ height: P,
181
+ viewBox: `0 0 ${N} ${P}`,
177
182
  class: "mb-1 shrink-0 overflow-visible",
178
183
  role: "img",
179
184
  "aria-label": Z.value.summary
180
185
  }, [
181
186
  i("path", {
182
187
  d: Z.value.area,
183
- class: "fill-primary-97"
184
- }, null, 8, E),
188
+ class: "fill-primary/10"
189
+ }, null, 8, O),
185
190
  i("path", {
186
191
  d: Z.value.line,
187
192
  fill: "none",
188
- class: "stroke-slate-60",
193
+ class: "stroke-primary",
189
194
  "stroke-width": "1.5",
190
195
  "stroke-linecap": "round",
191
196
  "stroke-linejoin": "round"
192
- }, null, 8, D),
197
+ }, null, 8, ee),
193
198
  i("circle", {
194
199
  cx: Z.value.last[0],
195
200
  cy: Z.value.last[1],
196
201
  r: "3",
197
202
  class: "fill-primary stroke-surface",
198
203
  "stroke-width": "1.5"
199
- }, null, 8, O)
200
- ], 8, T)) : n("", !0)], 10, ne),
204
+ }, null, 8, te)
205
+ ], 8, D)) : n("", !0)], 10, C),
201
206
  o.progress !== void 0 && !o.inline ? (d(), r("div", {
202
207
  key: 0,
203
208
  role: "progressbar",
204
- "aria-labelledby": `${h(U)}-label`,
209
+ "aria-labelledby": `${h(H)}-label`,
205
210
  "aria-valuemin": "0",
206
211
  "aria-valuemax": "100",
207
- "aria-valuenow": Math.round(Y.value),
208
- class: "h-1 w-full overflow-hidden rounded-full bg-slate-90"
212
+ "aria-valuenow": Math.round(J.value),
213
+ class: "h-1 w-full overflow-hidden rounded-full bg-surface-sunken"
209
214
  }, [i("div", {
210
- class: l(["h-full rounded-full transition-[width] duration-300 ease-out motion-reduce:transition-none", X.value]),
211
- style: u({ width: `${Y.value}%` })
212
- }, null, 6)], 8, k)) : n("", !0),
213
- !o.inline && (J.value || e.$slots.footer) ? (d(), r("div", A, [J.value ? (d(), r("span", j, [i("span", { class: l(["inline-flex items-center gap-0.5 font-medium", q.value]) }, [
214
- (d(), t(p(re.value), {
215
- class: "size-3.5",
215
+ class: l(["h-full rounded-full transition-[width] duration-700 ease-out motion-reduce:transition-none", Y.value]),
216
+ style: u({ width: `${J.value}%` })
217
+ }, null, 6)], 8, ne)) : n("", !0),
218
+ !o.inline && (q.value || e.$slots.footer) ? (d(), r("div", k, [q.value ? (d(), r("span", A, [i("span", { class: l(["inline-flex items-center gap-0.5 rounded-full px-2 py-0.5 text-sm font-semibold tabular-nums", K.value]) }, [
219
+ (d(), t(p(X.value), {
220
+ class: "size-3",
216
221
  "aria-hidden": "true"
217
222
  })),
218
- i("span", M, m(G.value === "up" ? "Up" : G.value === "down" ? "Down" : "No change"), 1),
219
- a(" " + m(K.value), 1)
220
- ], 2), o.deltaLabel ? (d(), r("span", N, m(o.deltaLabel), 1)) : n("", !0)])) : n("", !0), f(e.$slots, "footer")])) : n("", !0)
223
+ i("span", j, m(W.value === "up" ? "Up" : W.value === "down" ? "Down" : "No change"), 1),
224
+ a(" " + m(G.value), 1)
225
+ ], 2), o.deltaLabel ? (d(), r("span", M, m(o.deltaLabel), 1)) : n("", !0)])) : n("", !0), f(e.$slots, "footer")])) : n("", !0)
221
226
  ], 10, x));
222
227
  }
223
228
  });
224
229
  //#endregion
225
- export { I as default };
230
+ export { F as default };
@@ -39,7 +39,7 @@ export interface Props {
39
39
  items?: StatusBarItem[];
40
40
  /** Accessible name of the bar. */
41
41
  label?: string;
42
- /** Dark bar on `bg-sidebar` in both themes, like the old footer. Everything inside uses the dark tokens. */
42
+ /** Dark bar on `bg-sidebar` (#171717) in both themes, to sit under a `dark` sidebar. Everything inside uses the dark tokens. */
43
43
  dark?: boolean;
44
44
  /** Sticks the bar to the bottom of its scroll area. */
45
45
  sticky?: boolean;
@@ -44,14 +44,14 @@ var C = ["aria-label"], w = { class: "flex h-7 items-center justify-between gap-
44
44
  danger: "bg-danger",
45
45
  info: "bg-info",
46
46
  pending: "bg-warning",
47
- neutral: "bg-slate-60"
47
+ neutral: "bg-muted/60"
48
48
  }, M = {
49
49
  success: "bg-success",
50
50
  warning: "bg-warning",
51
51
  danger: "bg-danger",
52
52
  info: "bg-info",
53
- pending: "bg-slate-60",
54
- neutral: "bg-slate-60"
53
+ pending: "bg-muted/60",
54
+ neutral: "bg-muted/60"
55
55
  }, N = {
56
56
  high: "",
57
57
  normal: "@max-lg:hidden",
@@ -90,7 +90,7 @@ var C = ["aria-label"], w = { class: "flex h-7 items-center justify-between gap-
90
90
  }
91
91
  return (n, c) => (f(), a("footer", {
92
92
  "aria-label": s.label,
93
- class: u(["@container z-10 w-full border-t", [s.dark ? "dark border-border-light bg-sidebar text-body" : "border-border-light bg-surface-muted text-body", s.sticky && "sticky bottom-0"]]),
93
+ class: u(["@container z-10 w-full border-t", [s.dark ? "dark border-border bg-sidebar text-body" : "border-border bg-surface-muted text-body", s.sticky && "sticky bottom-0"]]),
94
94
  "data-ac-ds": "",
95
95
  "data-testid": "ac-status-bar"
96
96
  }, [o("div", w, [(f(), a(t, null, p(["left", "right"], (s) => o("div", {
@@ -100,7 +100,7 @@ var C = ["aria-label"], w = { class: "flex h-7 items-center justify-between gap-
100
100
  key: L(n, s),
101
101
  class: u(["flex min-w-0 shrink-0 items-center", N[n.priority ?? "normal"]])
102
102
  }, [(f(), r(h(R(n)), l({ ref_for: !0 }, B(n), {
103
- class: ["inline-flex h-6 min-w-0 items-center gap-1.5 rounded-4 px-1.5 text-xs whitespace-nowrap no-underline", z(n) && (n.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring")],
103
+ class: ["inline-flex h-6 min-w-0 items-center gap-1.5 rounded-6 px-1.5 text-xs whitespace-nowrap no-underline", z(n) && (n.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset")],
104
104
  onClick: (e) => z(n) && V(n, e)
105
105
  }), {
106
106
  default: _(() => [
@@ -131,7 +131,7 @@ var C = ["aria-label"], w = { class: "flex h-7 items-center justify-between gap-
131
131
  "aria-valuemin": "0",
132
132
  "aria-valuemax": "100",
133
133
  "aria-label": n.label ? `${n.label} usage` : "Usage",
134
- class: "h-1.5 w-8 shrink-0 overflow-hidden rounded-full bg-slate-80"
134
+ class: "h-1.5 w-8 shrink-0 overflow-hidden rounded-full bg-border-dark"
135
135
  }, [o("span", {
136
136
  class: u(["block h-full rounded-full", H(n)]),
137
137
  style: d({ width: `${U(n.meter)}%` })
@@ -7,18 +7,24 @@ var f = {
7
7
  "data-ac-ds": "",
8
8
  "data-testid": "ac-steps"
9
9
  }, p = ["aria-current"], m = { key: 1 }, h = {
10
+ key: 1,
11
+ class: "mt-0.5 text-xs text-muted"
12
+ }, g = {
10
13
  key: 1,
11
14
  class: "flex w-full flex-col",
12
15
  "data-ac-ds": "",
13
16
  "data-testid": "ac-steps"
14
- }, g = ["aria-current"], _ = { key: 1 }, v = { class: "min-w-0 flex-1 pt-1" }, y = {
17
+ }, _ = ["aria-current"], v = { key: 1 }, y = { class: "min-w-0 flex-1 pt-1.5" }, b = {
18
+ key: 0,
19
+ class: "mt-0.5 text-xs text-muted"
20
+ }, x = {
15
21
  key: 1,
16
22
  class: "mt-2 space-y-0.5 border-l border-dashed border-border-dark pl-3",
17
23
  "data-testid": "ac-steps-substeps"
18
- }, b = ["aria-current"], x = {
24
+ }, S = ["aria-current"], C = {
19
25
  key: 1,
20
26
  class: "size-1.5 rounded-full bg-primary"
21
- }, S = /*@__PURE__*/ a({
27
+ }, w = /*@__PURE__*/ a({
22
28
  __name: "AcSteps",
23
29
  props: {
24
30
  options: {},
@@ -27,65 +33,59 @@ var f = {
27
33
  activeSubstep: { default: void 0 }
28
34
  },
29
35
  setup(a) {
30
- let S = a, C = (e) => S.activeSubstep === void 0 ? -1 : (e.substeps ?? []).findIndex((e) => e.id === S.activeSubstep);
31
- return (S, w) => a.orientation === "horizontal" ? (s(), r("ol", f, [(s(!0), r(e, null, c(a.options, (e, c) => (s(), r("li", {
36
+ let w = a, T = (e) => w.activeSubstep === void 0 ? -1 : (e.substeps ?? []).findIndex((e) => e.id === w.activeSubstep);
37
+ return (w, E) => a.orientation === "horizontal" ? (s(), r("ol", f, [(s(!0), r(e, null, c(a.options, (e, c) => (s(), r("li", {
32
38
  key: e.id,
33
39
  class: "relative flex flex-1 flex-col items-center px-2 text-center",
34
40
  "aria-current": a.active === e.id ? "step" : void 0
35
41
  }, [
36
42
  c < a.options.length - 1 ? (s(), r("span", {
37
43
  key: 0,
38
- class: o(["absolute top-3.5 left-[calc(50%+22px)] h-0.5 w-[calc(100%-44px)] -translate-y-1/2 rounded-full transition-colors duration-300", a.active > e.id ? "bg-primary" : "bg-border"]),
44
+ class: o(["absolute top-4 left-[calc(50%+26px)] h-0.5 w-[calc(100%-52px)] -translate-y-1/2 rounded-full transition-colors duration-300 motion-reduce:transition-none", a.active > e.id ? "bg-primary" : "bg-border"]),
39
45
  "aria-hidden": "true"
40
46
  }, null, 2)) : n("", !0),
41
- i("span", { class: o(["relative inline-flex size-7 items-center justify-center rounded-full text-xs font-semibold tabular-nums transition-all duration-200", a.active > e.id ? "bg-primary text-white shadow-button" : a.active === e.id ? "bg-surface text-primary-20 ring-2 ring-primary shadow-[0_0_0_5px_var(--color-ring)]" : "bg-surface text-muted ring-1 ring-border-dark"]) }, [a.active > e.id ? (s(), t(u(d), {
47
+ i("span", { class: o(["relative inline-flex size-8 items-center justify-center rounded-full text-base font-semibold tabular-nums transition-[background-color,color,box-shadow] duration-200 motion-reduce:transition-none", a.active > e.id ? "bg-primary text-white shadow-button" : a.active === e.id ? "bg-surface text-primary-strong ring-2 ring-primary shadow-[0_0_0_6px_color-mix(in_srgb,var(--color-primary)_15%,transparent)]" : "bg-surface text-muted ring-1 ring-border-dark"]) }, [a.active > e.id ? (s(), t(u(d), {
42
48
  key: 0,
43
- class: "size-3.5",
49
+ class: "size-4",
44
50
  "stroke-width": 2.5,
45
51
  "aria-hidden": "true"
46
52
  })) : (s(), r("span", m, l(e.id), 1))], 2),
47
53
  i("p", { class: o(["mt-3 text-base font-medium", a.active >= e.id ? "text-heading" : "text-muted"]) }, l(e.title), 3),
48
- e.description ? (s(), r("p", {
49
- key: 1,
50
- class: o(["mt-0.5 text-xs", a.active >= e.id ? "text-label" : "text-muted"])
51
- }, l(e.description), 3)) : n("", !0)
52
- ], 8, p))), 128))])) : (s(), r("ol", h, [(s(!0), r(e, null, c(a.options, (f, p) => (s(), r("li", {
54
+ e.description ? (s(), r("p", h, l(e.description), 1)) : n("", !0)
55
+ ], 8, p))), 128))])) : (s(), r("ol", g, [(s(!0), r(e, null, c(a.options, (f, p) => (s(), r("li", {
53
56
  key: f.id,
54
57
  class: "relative flex gap-3 pb-6 last:pb-0",
55
58
  "aria-current": a.active === f.id ? "step" : void 0
56
59
  }, [
57
60
  p < a.options.length - 1 ? (s(), r("span", {
58
61
  key: 0,
59
- class: o(["absolute top-9 bottom-1 left-3.5 w-0.5 -translate-x-1/2 rounded-full transition-colors duration-300", a.active > f.id ? "bg-primary" : "bg-border"]),
62
+ class: o(["absolute top-10 bottom-2 left-4 w-0.5 -translate-x-1/2 rounded-full transition-colors duration-300 motion-reduce:transition-none", a.active > f.id ? "bg-primary" : "bg-border"]),
60
63
  "aria-hidden": "true"
61
64
  }, null, 2)) : n("", !0),
62
- i("span", { class: o(["relative inline-flex size-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold tabular-nums transition-all duration-200", a.active > f.id ? "bg-primary text-white shadow-button" : a.active === f.id ? "bg-surface text-primary-20 ring-2 ring-primary shadow-[0_0_0_5px_var(--color-ring)]" : "bg-surface text-muted ring-1 ring-border-dark"]) }, [a.active > f.id ? (s(), t(u(d), {
65
+ i("span", { class: o(["relative inline-flex size-8 shrink-0 items-center justify-center rounded-full text-base font-semibold tabular-nums transition-[background-color,color,box-shadow] duration-200 motion-reduce:transition-none", a.active > f.id ? "bg-primary text-white shadow-button" : a.active === f.id ? "bg-surface text-primary-strong ring-2 ring-primary shadow-[0_0_0_6px_color-mix(in_srgb,var(--color-primary)_15%,transparent)]" : "bg-surface text-muted ring-1 ring-border-dark"]) }, [a.active > f.id ? (s(), t(u(d), {
63
66
  key: 0,
64
- class: "size-3.5",
67
+ class: "size-4",
65
68
  "stroke-width": 2.5,
66
69
  "aria-hidden": "true"
67
- })) : (s(), r("span", _, l(f.id), 1))], 2),
68
- i("div", v, [
70
+ })) : (s(), r("span", v, l(f.id), 1))], 2),
71
+ i("div", y, [
69
72
  i("p", { class: o(["text-base font-medium", a.active >= f.id ? "text-heading" : "text-muted"]) }, l(f.title), 3),
70
- f.description ? (s(), r("p", {
71
- key: 0,
72
- class: o(["mt-0.5 text-xs", a.active >= f.id ? "text-label" : "text-muted"])
73
- }, l(f.description), 3)) : n("", !0),
74
- f.substeps?.length && a.active === f.id ? (s(), r("ul", y, [(s(!0), r(e, null, c(f.substeps, (e, c) => (s(), r("li", {
73
+ f.description ? (s(), r("p", b, l(f.description), 1)) : n("", !0),
74
+ f.substeps?.length && a.active === f.id ? (s(), r("ul", x, [(s(!0), r(e, null, c(f.substeps, (e, c) => (s(), r("li", {
75
75
  key: e.id,
76
76
  class: "flex items-center gap-2 py-1",
77
77
  "aria-current": e.id === a.activeSubstep ? "step" : void 0
78
78
  }, [i("span", {
79
- class: o(["inline-flex size-5 shrink-0 items-center justify-center rounded-full transition-colors duration-200", c < C(f) ? "bg-primary text-white" : c === C(f) ? "bg-surface text-primary ring-2 ring-primary" : "bg-surface text-muted ring-1 ring-border-dark"]),
79
+ class: o(["inline-flex size-5 shrink-0 items-center justify-center rounded-full transition-colors duration-200", c < T(f) ? "bg-primary text-white" : c === T(f) ? "bg-surface text-primary-strong ring-2 ring-primary" : "bg-surface text-muted ring-1 ring-border-dark"]),
80
80
  "aria-hidden": "true"
81
- }, [c < C(f) ? (s(), t(u(d), {
81
+ }, [c < T(f) ? (s(), t(u(d), {
82
82
  key: 0,
83
83
  class: "size-3",
84
84
  "stroke-width": 3
85
- })) : c === C(f) ? (s(), r("span", x)) : n("", !0)], 2), i("span", { class: o(["min-w-0 truncate text-base", c < C(f) ? "text-label" : c === C(f) ? "font-medium text-heading" : "text-muted"]) }, l(e.title), 3)], 8, b))), 128))])) : n("", !0)
85
+ })) : c === T(f) ? (s(), r("span", C)) : n("", !0)], 2), i("span", { class: o(["min-w-0 truncate text-base", c < T(f) ? "text-heading/80" : c === T(f) ? "font-medium text-heading" : "text-muted"]) }, l(e.title), 3)], 8, S))), 128))])) : n("", !0)
86
86
  ])
87
- ], 8, g))), 128))]));
87
+ ], 8, _))), 128))]));
88
88
  }
89
89
  });
90
90
  //#endregion
91
- export { S as default };
91
+ export { w as default };
@@ -7,6 +7,8 @@ export interface Props {
7
7
  disabled?: boolean;
8
8
  /** Error text under the switch. */
9
9
  errorMsg?: string;
10
+ /** Pulses the track and blocks changes, e.g. while the new value is saved. Sets `aria-busy`. */
11
+ loading?: boolean;
10
12
  }
11
13
  type __VLS_Props = Props;
12
14
  type __VLS_Slots = {
@@ -32,6 +34,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
32
34
  label: string;
33
35
  disabled: boolean;
34
36
  name: string;
37
+ loading: boolean;
35
38
  errorMsg: string;
36
39
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
37
40
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -4,10 +4,13 @@ var g = { class: "flex items-center gap-2" }, _ = ["for"], v = [
4
4
  "id",
5
5
  "name",
6
6
  "aria-checked",
7
+ "aria-busy",
8
+ "aria-disabled",
7
9
  "disabled"
8
10
  ], y = {
9
11
  key: 0,
10
- class: "mt-1.5 text-xs text-red-30"
12
+ class: "mt-1 text-base text-danger-strong",
13
+ role: "alert"
11
14
  }, b = /*@__PURE__*/ i({
12
15
  inheritAttrs: !1,
13
16
  __name: "AcSwitch",
@@ -18,7 +21,11 @@ var g = { class: "flex items-center gap-2" }, _ = ["for"], v = [
18
21
  type: Boolean,
19
22
  default: !1
20
23
  },
21
- errorMsg: { default: "" }
24
+ errorMsg: { default: "" },
25
+ loading: {
26
+ type: Boolean,
27
+ default: !1
28
+ }
22
29
  }, {
23
30
  modelValue: {
24
31
  type: Boolean,
@@ -28,37 +35,42 @@ var g = { class: "flex items-center gap-2" }, _ = ["for"], v = [
28
35
  }),
29
36
  emits: ["update:modelValue"],
30
37
  setup(i, { expose: a }) {
31
- let b = h(i, "modelValue"), x = m(), S = p(), C = e(() => ({
32
- class: S.class,
33
- style: S.style
34
- })), w = e(() => {
35
- let { class: e, style: t, ...n } = S;
38
+ let b = i, x = h(i, "modelValue"), S = m(), C = p(), w = e(() => ({
39
+ class: C.class,
40
+ style: C.style
41
+ })), T = e(() => {
42
+ let { class: e, style: t, ...n } = C;
36
43
  return n;
37
- }), T = l(null);
38
- return a({ focus: () => T.value?.focus() }), (e, a) => (c(), n("div", o(C.value, {
44
+ }), E = l(null);
45
+ function D() {
46
+ b.disabled || b.loading || (x.value = !x.value);
47
+ }
48
+ return a({ focus: () => E.value?.focus() }), (e, a) => (c(), n("div", o(w.value, {
39
49
  "data-ac-ds": "",
40
50
  "data-testid": "ac-switch"
41
51
  }), [r("div", g, [
42
52
  u(e.$slots, "left"),
43
53
  i.label ? (c(), n("label", {
44
54
  key: 0,
45
- for: f(x),
46
- class: "cursor-pointer text-base text-heading"
47
- }, d(i.label), 9, _)) : t("", !0),
55
+ for: f(S),
56
+ class: s(["cursor-pointer text-base font-medium text-heading", i.disabled && "cursor-not-allowed opacity-50"])
57
+ }, d(i.label), 11, _)) : t("", !0),
48
58
  u(e.$slots, "middle"),
49
59
  r("button", o({
50
- id: f(x),
60
+ id: f(S),
51
61
  ref_key: "button",
52
- ref: T
53
- }, w.value, {
62
+ ref: E
63
+ }, T.value, {
54
64
  type: "button",
55
65
  role: "switch",
56
66
  name: i.name,
57
- "aria-checked": b.value,
67
+ "aria-checked": x.value,
68
+ "aria-busy": i.loading || void 0,
69
+ "aria-disabled": i.loading && !i.disabled || void 0,
58
70
  disabled: i.disabled,
59
- class: ["relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-50 p-0.5 inset-shadow-xs transition-colors duration-200 ease-out focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", b.value ? "bg-primary" : "bg-slate-70 hover:bg-slate-60"],
60
- onClick: a[0] ||= (e) => b.value = !b.value
61
- }), [r("span", { class: s(["inline-block size-4 rounded-full bg-white shadow-md ring-1 ring-black/5 transition-transform duration-200 ease-out-soft", b.value ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 16, v),
71
+ class: ["relative h-6 w-11 shrink-0 rounded-full transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none motion-reduce:transition-none", [x.value ? "bg-primary" : "bg-slate-80", i.disabled ? "cursor-not-allowed opacity-50" : i.loading ? "cursor-wait animate-pulse motion-reduce:animate-none" : "cursor-pointer"]],
72
+ onClick: D
73
+ }), [r("span", { class: s(["pointer-events-none absolute top-0.5 left-0.5 size-5 rounded-full border bg-white transition-transform duration-200 ease-out motion-reduce:transition-none", x.value ? "translate-x-5 border-white" : "translate-x-0 border-slate-70"]) }, null, 2)], 16, v),
62
74
  u(e.$slots, "right")
63
75
  ]), i.errorMsg ? (c(), n("p", y, d(i.errorMsg), 1)) : t("", !0)], 16));
64
76
  }
@@ -0,0 +1,5 @@
1
+ import e from "./AcSwitchCard.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcSwitchCard.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,59 @@
1
+ import type { Component } from "vue";
2
+ export interface Props {
3
+ /** Name of the feature the switch turns on, e.g. "Automated backups". Also the switch's accessible name. */
4
+ title: string;
5
+ /** One line on what the current position does, e.g. "Runs a Stash backup every 6 hours." */
6
+ description?: string;
7
+ /** Bold text beside the switch, e.g. the cost or result of the choice: "Free", "+$15.00", "3 nodes". */
8
+ status?: string;
9
+ /** A small line under `status`, e.g. "per month" or "if enabled". */
10
+ statusDetail?: string;
11
+ /** A Lucide icon shown in a 32px tile before the title. */
12
+ icon?: Component;
13
+ /** Adds a "Recommended" pill after the title. */
14
+ recommended?: boolean;
15
+ /** The choice won't take effect yet: tints the card and status amber instead of primary, on or off. Explain why in the default slot. */
16
+ warning?: boolean;
17
+ /** Turns the switch and the card click off. */
18
+ disabled?: boolean;
19
+ /** Shows a spinner beside the switch, pulses it and blocks changes, e.g. while the change is saved. */
20
+ loading?: boolean;
21
+ }
22
+ type __VLS_Props = Props;
23
+ type __VLS_Slots = {
24
+ /** Pills after the title, beside the built-in Recommended one, e.g. "Coming soon". */
25
+ badges?: () => unknown;
26
+ /** Replaces the `status` text, e.g. a price with a muted unit. */
27
+ status?: () => unknown;
28
+ /** Content under the row, e.g. a warning about the choice. Wrap it in `v-if="model"` to show settings only while the switch is on. */
29
+ default?: () => unknown;
30
+ };
31
+ type __VLS_ModelProps = {
32
+ modelValue?: boolean;
33
+ };
34
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
35
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
36
+ /** Moves focus to the switch. */
37
+ focus: () => void | undefined;
38
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
39
+ "update:modelValue": (value: boolean) => any;
40
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
41
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
42
+ }>, {
43
+ description: string;
44
+ disabled: boolean;
45
+ icon: Component;
46
+ status: string;
47
+ warning: boolean;
48
+ loading: boolean;
49
+ recommended: boolean;
50
+ statusDetail: string;
51
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
52
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
53
+ declare const _default: typeof __VLS_export;
54
+ export default _default;
55
+ type __VLS_WithSlots<T, S> = T & {
56
+ new (): {
57
+ $slots: S;
58
+ };
59
+ };