@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
@@ -5,14 +5,14 @@ var te = [
5
5
  "role",
6
6
  "aria-modal",
7
7
  "aria-label"
8
- ], ne = ["aria-label"], re = {
8
+ ], D = ["aria-label"], ne = {
9
9
  role: "list",
10
- class: "flex flex-col gap-0.5"
11
- }, ie = {
10
+ class: "flex flex-col gap-1"
11
+ }, re = {
12
12
  key: 0,
13
13
  role: "list",
14
- class: "flex flex-col gap-0.5"
15
- }, ae = ["aria-label", "title"], D = { key: 0 }, O = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", k = 120, A = 180, j = /*@__PURE__*/ c({
14
+ class: "flex flex-col"
15
+ }, ie = ["aria-label", "title"], O = { key: 0 }, k = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", ae = 120, A = 180, j = /*@__PURE__*/ c({
16
16
  inheritAttrs: !1,
17
17
  __name: "AcSidebar",
18
18
  props: /*@__PURE__*/ l({
@@ -49,9 +49,9 @@ var te = [
49
49
  }),
50
50
  emits: ["update:collapsed", "update:mobileOpen"],
51
51
  setup(c, { expose: l }) {
52
- let j = c, M = x(c, "collapsed"), N = x(c, "mobileOpen"), P = g(null), F = g(null), I = g(!j.contained && typeof window < "u" && window.matchMedia(X()).matches), L = null, R = null, z = null, B = g(!1), V = n(() => j.hoverExpand && M.value && !I.value && B.value), H = n(() => M.value && !I.value && !V.value), U = n(() => M.value && !I.value), W = !1, G;
52
+ let j = c, M = x(c, "collapsed"), N = x(c, "mobileOpen"), P = g(null), F = g(null), I = g(!j.contained && typeof window < "u" && window.matchMedia(Y()).matches), L = null, R = null, z = null, B = g(!1), V = n(() => j.hoverExpand && M.value && !I.value && B.value), H = n(() => M.value && !I.value && !V.value), U = n(() => M.value && !I.value), W = !1, G;
53
53
  function K(e) {
54
- j.hoverExpand && (e && W || (clearTimeout(G), G = setTimeout(() => B.value = e, e ? k : A)));
54
+ j.hoverExpand && (e && W || (clearTimeout(G), G = setTimeout(() => B.value = e, e ? ae : A)));
55
55
  }
56
56
  function q() {
57
57
  W = !0, clearTimeout(G), B.value = !1, M.value = !M.value;
@@ -62,57 +62,57 @@ var te = [
62
62
  function se(e) {
63
63
  P.value?.contains(e.relatedTarget) || K(!1);
64
64
  }
65
- let J = n(() => I.value && N.value), Y = n(() => j.dark), ce = n(() => I.value || j.contained ? void 0 : {
65
+ let J = n(() => I.value && N.value), ce = n(() => j.dark), le = n(() => I.value || j.contained ? void 0 : {
66
66
  top: j.top,
67
67
  height: `calc(100dvh - ${j.top})`
68
- }), le = n(() => {
69
- let e = j.dark ? "dark border-r border-border-light bg-sidebar text-body" : "border-r border-border-light bg-surface-muted text-body";
68
+ }), ue = n(() => {
69
+ let e = j.dark ? "dark border-r border-border bg-sidebar text-body shadow-sm" : "border-r border-border bg-sidebar-panel/95 text-body shadow-sm backdrop-blur-sm";
70
70
  return I.value ? [
71
71
  e,
72
72
  j.contained ? "absolute" : "fixed",
73
- "inset-y-0 left-0 z-[80] w-60 max-w-[85%] shadow-xl duration-200 ease-out-soft motion-reduce:transition-none",
73
+ "inset-y-0 left-0 z-[80] w-64 duration-300 ease-out-soft motion-reduce:transition-none",
74
74
  N.value ? "visible translate-x-0 transition-[translate]" : "invisible -translate-x-full transition-[translate,visibility]"
75
75
  ] : [
76
76
  e,
77
77
  V.value ? [j.contained ? "absolute inset-y-0 left-0" : "fixed left-0", "z-30 shadow-xl"] : j.contained ? "relative h-full" : "sticky",
78
78
  "transition-[width] duration-200 ease-out-soft motion-reduce:transition-none",
79
- H.value ? "w-14" : "w-60"
79
+ H.value ? "w-14" : j.contained ? "w-64" : "w-64 lg:w-52 xl:w-64"
80
80
  ];
81
81
  });
82
- function X() {
82
+ function Y() {
83
83
  return `(max-width: ${j.breakpoint - .02}px)`;
84
84
  }
85
- function ue() {
85
+ function de() {
86
86
  I.value ? N.value = !N.value : M.value = !M.value;
87
87
  }
88
- function de() {
88
+ function fe() {
89
89
  M.value = !1;
90
90
  }
91
- function fe() {
91
+ function pe() {
92
92
  I.value && (N.value = !1);
93
93
  }
94
- function Z() {
94
+ function X() {
95
95
  N.value = !1;
96
96
  }
97
- function pe(e) {
97
+ function me(e) {
98
98
  if (J.value && P.value) {
99
- if (e.key === "Escape") e.stopPropagation(), Z();
99
+ if (e.key === "Escape") e.stopPropagation(), X();
100
100
  else if (e.key === "Tab") {
101
- let t = [...P.value.querySelectorAll(O)].filter((e) => e.offsetParent !== null);
101
+ let t = [...P.value.querySelectorAll(k)].filter((e) => e.offsetParent !== null);
102
102
  if (!t.length) return;
103
103
  let n = t[0], r = t[t.length - 1];
104
104
  e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
105
105
  }
106
106
  }
107
107
  }
108
- function Q(e) {
108
+ function Z(e) {
109
109
  I.value = e.matches;
110
110
  }
111
- function $(e) {
111
+ function Q(e) {
112
112
  let t = document.body, n = Number(t.dataset.acModals ?? 0) + (e ? 1 : -1);
113
113
  t.dataset.acModals = String(Math.max(n, 0)), e && n === 1 ? t.style.overflow = "hidden" : !e && n <= 0 && (t.style.overflow = "");
114
114
  }
115
- function me() {
115
+ function $() {
116
116
  let e = F.value, t = e?.querySelector("[aria-current=\"page\"]");
117
117
  if (!e || !t) return;
118
118
  let n = t.getBoundingClientRect().top - e.getBoundingClientRect().top;
@@ -121,22 +121,25 @@ var te = [
121
121
  return h("ac-sidebar", {
122
122
  rail: H,
123
123
  isMobile: I,
124
- dark: Y,
125
- expand: de,
126
- navigate: fe
124
+ dark: ce,
125
+ expand: fe,
126
+ navigate: pe
127
127
  }), S(J, async (e, t) => {
128
- e ? (L = document.activeElement, j.contained || $(!0), await ee(), (P.value?.querySelector("[aria-current=\"page\"]") ?? P.value?.querySelector(O))?.focus()) : t && (j.contained || $(!1), L?.focus?.());
128
+ e ? (L = document.activeElement, j.contained || Q(!0), await ee(), (P.value?.querySelector("[aria-current=\"page\"]") ?? P.value?.querySelector(k))?.focus()) : t && (j.contained || Q(!1), L?.focus?.());
129
129
  }), S(I, (e) => {
130
130
  e || (N.value = !1);
131
131
  }), p(() => {
132
132
  if (j.contained) {
133
133
  let e = P.value?.parentElement;
134
134
  e && (z = new ResizeObserver(([e]) => I.value = (e?.contentRect.width ?? 0) < j.breakpoint), z.observe(e));
135
- } else R = window.matchMedia(X()), I.value = R.matches, R.addEventListener("change", Q);
136
- me();
135
+ } else R = window.matchMedia(Y()), I.value = R.matches, R.addEventListener("change", Z);
136
+ $();
137
137
  }), f(() => {
138
- clearTimeout(G), R?.removeEventListener("change", Q), z?.disconnect(), J.value && !j.contained && $(!1);
139
- }), l({ toggle: ue }), (n, l) => (m(), a(e, null, [
138
+ clearTimeout(G), R?.removeEventListener("change", Z), z?.disconnect(), J.value && !j.contained && Q(!1);
139
+ }), l({
140
+ toggle: de,
141
+ revealActive: $
142
+ }), (n, l) => (m(), a(e, null, [
140
143
  s(t, {
141
144
  "enter-active-class": "transition-opacity duration-200",
142
145
  "enter-from-class": "opacity-0",
@@ -145,11 +148,11 @@ var te = [
145
148
  }, {
146
149
  default: C(() => [J.value ? (m(), a("div", {
147
150
  key: 0,
148
- class: d(["inset-0 z-[79] bg-overlay", c.contained ? "absolute" : "fixed"]),
151
+ class: d(["inset-0 z-[79] bg-overlay backdrop-blur-[2px]", c.contained ? "absolute" : "fixed"]),
149
152
  "aria-hidden": "true",
150
153
  "data-ac-ds": "",
151
154
  "data-testid": "ac-sidebar-backdrop",
152
- onClick: Z
155
+ onClick: X
153
156
  }, null, 2)) : i("", !0)]),
154
157
  _: 1
155
158
  }),
@@ -163,14 +166,14 @@ var te = [
163
166
  ref_key: "root",
164
167
  ref: P
165
168
  }, n.$attrs, {
166
- class: ["flex shrink-0 flex-col overflow-hidden", le.value],
167
- style: ce.value,
169
+ class: ["flex shrink-0 flex-col overflow-hidden", ue.value],
170
+ style: le.value,
168
171
  role: J.value ? "dialog" : void 0,
169
172
  "aria-modal": J.value || void 0,
170
173
  "aria-label": J.value ? c.label : void 0,
171
174
  "data-ac-ds": "",
172
175
  "data-testid": "ac-sidebar",
173
- onKeydown: pe,
176
+ onKeydown: me,
174
177
  onMouseenter: l[0] ||= (e) => K(!0),
175
178
  onMouseleave: oe,
176
179
  onFocusin: l[1] ||= (e) => K(!0),
@@ -178,41 +181,48 @@ var te = [
178
181
  }), [
179
182
  n.$slots.header || I.value ? (m(), a("div", {
180
183
  key: 0,
181
- class: d(["flex h-14 shrink-0 items-center gap-2 overflow-hidden border-b border-border-light", H.value ? "justify-center px-2" : "px-4"])
184
+ class: d(["flex min-h-17 shrink-0 items-center gap-2 overflow-hidden border-b border-border/70 pt-5 pb-4", H.value ? "mx-2 justify-center" : "mx-4 px-1"])
182
185
  }, [o("div", { class: d(["flex min-w-0 flex-1 items-center", H.value && "justify-center"]) }, [_(n.$slots, "header", { collapsed: H.value })], 2), I.value ? (m(), a("button", {
183
186
  key: 0,
184
187
  type: "button",
185
- class: d(["-mr-1.5 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-6 text-muted transition hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring", Y.value ? "hover:bg-white/8" : "hover:bg-slate-90"]),
188
+ class: "-mr-1.5 inline-flex size-8.5 shrink-0 cursor-pointer items-center justify-center rounded-10 border border-transparent text-muted transition-colors duration-200 hover:border-border hover:bg-surface-sunken/50 hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
186
189
  "aria-label": "Close navigation",
187
190
  "data-ac-ds": "",
188
191
  "data-testid": "ac-sidebar-close",
189
- onClick: Z
192
+ onClick: X
190
193
  }, [s(b(E), {
191
- class: "size-4",
194
+ class: "size-5",
192
195
  "aria-hidden": "true"
193
- })], 2)) : i("", !0)], 2)) : i("", !0),
196
+ })])) : i("", !0)], 2)) : i("", !0),
194
197
  o("nav", {
195
198
  ref_key: "nav",
196
199
  ref: F,
197
200
  "aria-label": c.label,
198
- class: d(["ac-scrollbar min-h-0 flex-1 overflow-x-hidden py-3", H.value ? "px-2" : "px-3"])
199
- }, [o("ul", re, [_(n.$slots, "default")])], 10, ne),
201
+ class: d(["ac-scrollbar min-h-0 flex-1 overflow-x-hidden py-5", H.value ? "px-2" : "px-4"])
202
+ }, [o("ul", ne, [_(n.$slots, "default")])], 10, D),
200
203
  n.$slots.footer || c.collapsible && !I.value ? (m(), a("div", {
201
204
  key: 1,
202
- class: d(["flex shrink-0 flex-col gap-0.5 border-t border-border-light py-2", H.value ? "px-2" : "px-3"])
203
- }, [n.$slots.footer ? (m(), a("ul", ie, [_(n.$slots, "footer", { collapsed: H.value })])) : i("", !0), c.collapsible && !I.value ? (m(), a("button", {
204
- key: 1,
205
- type: "button",
206
- class: d(["flex h-8 w-full cursor-pointer items-center gap-2.5 rounded-6 text-base text-label transition-colors hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring", [H.value ? "justify-center" : "px-2.5", Y.value ? "hover:bg-white/8" : "hover:bg-slate-90"]]),
207
- "aria-label": U.value ? "Expand sidebar" : "Collapse sidebar",
208
- title: H.value ? "Expand sidebar" : void 0,
209
- "data-ac-ds": "",
210
- "data-testid": "ac-sidebar-collapse",
211
- onClick: q
212
- }, [(m(), r(v(U.value ? b(T) : b(w)), {
213
- class: "size-4 shrink-0 text-muted",
214
- "aria-hidden": "true"
215
- })), H.value ? i("", !0) : (m(), a("span", D, y(U.value ? "Expand" : "Collapse"), 1))], 10, ae)) : i("", !0)], 2)) : i("", !0)
205
+ class: d(["flex shrink-0 flex-col pb-4", H.value ? "px-2" : "px-4"])
206
+ }, [
207
+ o("div", {
208
+ class: d(["border-t border-muted/20", H.value ? "mb-3" : "mt-5 mb-6"]),
209
+ "aria-hidden": "true"
210
+ }, null, 2),
211
+ n.$slots.footer ? (m(), a("ul", re, [_(n.$slots, "footer", { collapsed: H.value })])) : i("", !0),
212
+ c.collapsible && !I.value ? (m(), a("button", {
213
+ key: 1,
214
+ type: "button",
215
+ class: d(["group flex w-full cursor-pointer items-center gap-3 rounded-10 border border-transparent py-2 text-base font-medium text-heading/80 transition-all duration-200 hover:border-border hover:bg-accent-hover hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset motion-reduce:transition-none", H.value ? "justify-center" : "px-3"]),
216
+ "aria-label": U.value ? "Expand sidebar" : "Collapse sidebar",
217
+ title: H.value ? "Expand sidebar" : void 0,
218
+ "data-ac-ds": "",
219
+ "data-testid": "ac-sidebar-collapse",
220
+ onClick: q
221
+ }, [(m(), r(v(U.value ? b(T) : b(w)), {
222
+ class: "size-4 shrink-0 text-muted group-hover:text-heading",
223
+ "aria-hidden": "true"
224
+ })), H.value ? i("", !0) : (m(), a("span", O, y(U.value ? "Expand" : "Collapse"), 1))], 10, ie)) : i("", !0)
225
+ ], 2)) : i("", !0)
216
226
  ], 16, te)
217
227
  ], 64));
218
228
  }
@@ -13,7 +13,7 @@ export interface Props {
13
13
  active?: boolean;
14
14
  /** A count or short word after the label, e.g. `3` or `"New"`. Shown as a dot in the collapsed rail. */
15
15
  badge?: string | number;
16
- /** Colour of the badge. */
16
+ /** Colour of the badge. Defaults to cloud-ui's solid primary chip. */
17
17
  badgeColor?: Tone | "neutral";
18
18
  /** Greys the item out and blocks clicks. */
19
19
  disabled?: boolean;
@@ -6,21 +6,17 @@ var D = {
6
6
  "data-ac-ds": "",
7
7
  "data-testid": "ac-sidebar-item"
8
8
  }, O = {
9
- key: 0,
10
- class: "inline-flex size-4 shrink-0 items-center justify-center text-muted transition-colors group-hover:text-heading group-aria-[current=page]:text-primary-30! [&>img]:size-4",
11
- "aria-hidden": "true"
12
- }, k = {
13
9
  key: 1,
14
10
  class: "text-xs font-semibold"
15
- }, A = [
11
+ }, k = [
16
12
  "disabled",
17
13
  "aria-expanded",
18
14
  "aria-controls",
19
15
  "title"
20
- ], j = {
16
+ ], A = {
21
17
  key: 1,
22
18
  class: "text-xs font-semibold"
23
- }, M = ["id"], N = /*@__PURE__*/ o({
19
+ }, j = ["id"], M = /*@__PURE__*/ o({
24
20
  __name: "AcSidebarItem",
25
21
  props: /*@__PURE__*/ l({
26
22
  label: {},
@@ -32,7 +28,7 @@ var D = {
32
28
  default: !1
33
29
  },
34
30
  badge: { default: void 0 },
35
- badgeColor: { default: "neutral" },
31
+ badgeColor: { default: "primary" },
36
32
  disabled: {
37
33
  type: Boolean,
38
34
  default: !1
@@ -46,39 +42,39 @@ var D = {
46
42
  }),
47
43
  emits: /*@__PURE__*/ l(["click"], ["update:open"]),
48
44
  setup(o, { emit: l }) {
49
- let N = o, P = S(o, "open"), F = l, I = C(), L = {
50
- neutral: "bg-slate-90 text-label ring-1 ring-border ring-inset",
51
- primary: "bg-primary-95 text-primary-20",
52
- info: "bg-blue-95 text-blue-20",
53
- success: "bg-green-95 text-green-20",
54
- warning: "bg-yellow-95 text-yellow-20",
55
- danger: "bg-red-95 text-red-30"
56
- }, R = {
57
- neutral: "bg-slate-60",
45
+ let M = o, N = S(o, "open"), P = l, F = C(), I = {
46
+ neutral: "border border-border bg-surface-sunken text-muted",
47
+ primary: "bg-primary text-white",
48
+ info: "bg-info text-white",
49
+ success: "bg-success text-white",
50
+ warning: "bg-warning text-on-warning",
51
+ danger: "bg-danger text-white"
52
+ }, L = {
53
+ neutral: "bg-muted",
58
54
  primary: "bg-primary",
59
55
  info: "bg-info",
60
56
  success: "bg-success",
61
57
  warning: "bg-warning",
62
58
  danger: "bg-danger"
63
- }, z = c("ac-sidebar", null), B = c("ac-sidebar-depth", 0), V = s()?.appContext.components.RouterLink, H = x(), U = g(null), W = g(!1), G = null, K = t(() => !!I.default), q = t(() => (z?.rail.value ?? !1) && B === 0), J = t(() => z?.dark.value ? "not-aria-[current=page]:hover:bg-white/8 not-aria-[current=page]:hover:text-heading" : "not-aria-[current=page]:hover:bg-slate-90 not-aria-[current=page]:hover:text-heading"), Y = t(() => N.to && V && !N.disabled ? V : N.to || N.href ? "a" : "button"), X = t(() => {
59
+ }, R = c("ac-sidebar", null), z = c("ac-sidebar-depth", 0), B = c("ac-sidebar-subgroup", !1), V = s()?.appContext.components.RouterLink, H = x(), U = g(null), W = g(!1), G = null, K = t(() => !!F.default), q = t(() => (R?.rail.value ?? !1) && z === 0), J = B || z > 0 ? "size-4 [&>img]:size-4" : "size-[17px] [&>img]:size-[17px]", Y = t(() => M.to && V && !M.disabled ? V : M.to || M.href ? "a" : "button"), X = t(() => {
64
60
  let e = {};
65
- return Y.value === V ? e.to = N.to : Y.value === "a" ? N.disabled ? (e.role = "link", e["aria-disabled"] = "true") : e.href = N.href ?? (typeof N.to == "string" ? N.to : void 0) : (e.type = "button", e.disabled = N.disabled || void 0), N.active && (e["aria-current"] = "page"), e;
66
- }), Z = t(() => N.badge === void 0 || N.badge === "" ? "" : String(N.badge));
61
+ return Y.value === V ? e.to = M.to : Y.value === "a" ? M.disabled ? (e.role = "link", e["aria-disabled"] = "true") : e.href = M.href ?? (typeof M.to == "string" ? M.to : void 0) : (e.type = "button", e.disabled = M.disabled || void 0), M.active && (e["aria-current"] = "page"), e;
62
+ }), Z = t(() => M.badge === void 0 || M.badge === "" ? "" : String(M.badge));
67
63
  function Q(e) {
68
- if (N.disabled) {
64
+ if (M.disabled) {
69
65
  e.preventDefault();
70
66
  return;
71
67
  }
72
- F("click", e), z?.navigate();
68
+ P("click", e), R?.navigate();
73
69
  }
74
70
  function ee() {
75
- q.value ? (z?.expand(), P.value = !0) : P.value = !P.value;
71
+ q.value ? (R?.expand(), N.value = !0) : N.value = !N.value;
76
72
  }
77
73
  function $() {
78
74
  W.value = !!U.value?.querySelector("[aria-current=\"page\"]");
79
75
  }
80
- return h("ac-sidebar-depth", B + 1), w(W, (e) => {
81
- e && (P.value = !0);
76
+ return h("ac-sidebar-depth", z + 1), w(W, (e) => {
77
+ e && (N.value = !0);
82
78
  }), p(() => {
83
79
  U.value && ($(), G = new MutationObserver($), G.observe(U.value, {
84
80
  subtree: !0,
@@ -88,13 +84,14 @@ var D = {
88
84
  }));
89
85
  }), f(() => G?.disconnect()), (t, s) => (m(), i("li", D, [K.value ? (m(), i(e, { key: 1 }, [a("button", {
90
86
  type: "button",
91
- class: d(["group relative flex w-full items-center gap-2.5 rounded-6 text-left text-base transition-colors duration-100 select-none focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring", [
92
- q.value ? "h-9 justify-center" : "h-8 px-2.5",
93
- q.value && W.value ? "bg-primary-95 text-primary-20" : W.value ? "font-medium text-heading" : "text-body",
94
- o.disabled ? "cursor-not-allowed opacity-50" : ["cursor-pointer", J.value]
87
+ class: d(["group relative flex w-full items-center gap-3 rounded-10 border py-2 text-left text-base font-medium transition-all duration-200 select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset motion-reduce:transition-none", [
88
+ q.value ? "h-9.5 justify-center" : "px-3",
89
+ q.value && W.value ? "border-primary/35 bg-primary/10 text-heading shadow-xs shadow-primary/10" : ["border-transparent", W.value ? "text-heading" : "text-heading/80"],
90
+ o.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
91
+ !o.disabled && !(q.value && W.value) && "hover:border-border hover:bg-accent-hover hover:text-heading"
95
92
  ]]),
96
93
  disabled: o.disabled || void 0,
97
- "aria-expanded": q.value ? void 0 : P.value,
94
+ "aria-expanded": q.value ? void 0 : N.value,
98
95
  "aria-controls": `${b(H)}-list`,
99
96
  title: q.value ? o.label : void 0,
100
97
  "data-ac-ds": "",
@@ -103,48 +100,52 @@ var D = {
103
100
  }, [
104
101
  t.$slots.icon || o.icon || q.value ? (m(), i("span", {
105
102
  key: 0,
106
- class: d(["inline-flex size-4 shrink-0 items-center justify-center transition-colors group-hover:text-heading [&>img]:size-4", W.value ? "text-primary-30" : "text-muted"]),
103
+ class: d(["inline-flex shrink-0 items-center justify-center transition-colors duration-200", [b(J), W.value ? "text-primary" : "text-muted group-hover:text-heading"]]),
107
104
  "aria-hidden": "true"
108
105
  }, [_(t.$slots, "icon", {}, () => [o.icon ? (m(), n(v(o.icon), {
109
106
  key: 0,
110
- class: "size-4"
111
- })) : (m(), i("span", j, y(o.label.charAt(0)), 1))])], 2)) : r("", !0),
107
+ class: "size-full"
108
+ })) : (m(), i("span", A, y(o.label.charAt(0)), 1))])], 2)) : r("", !0),
112
109
  a("span", { class: d(q.value ? "sr-only" : "min-w-0 flex-1 truncate") }, y(o.label), 3),
113
110
  Z.value && !q.value ? (m(), i("span", {
114
111
  key: 1,
115
- class: d(["inline-flex h-4.5 min-w-4.5 shrink-0 items-center justify-center rounded-50 px-1.5 text-sm font-medium tabular-nums", L[o.badgeColor]])
112
+ class: d(["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-6 px-2 text-xs leading-none font-medium tabular-nums", I[o.badgeColor]])
116
113
  }, y(Z.value), 3)) : r("", !0),
117
114
  q.value ? r("", !0) : (m(), n(b(E), {
118
115
  key: 2,
119
- class: d(["size-3.5 shrink-0 text-muted transition-transform duration-150 motion-reduce:transition-none", P.value && "rotate-90"]),
116
+ class: d(["size-4 shrink-0 text-muted transition-transform duration-200 motion-reduce:transition-none", N.value && "rotate-90"]),
120
117
  "aria-hidden": "true"
121
118
  }, null, 8, ["class"]))
122
- ], 10, A), a("ul", {
119
+ ], 10, k), a("ul", {
123
120
  id: `${b(H)}-list`,
124
121
  ref_key: "list",
125
122
  ref: U,
126
123
  role: "list",
127
- class: d(["mt-0.5 ml-4.5 flex-col gap-0.5 border-l border-border pl-2", P.value && !q.value ? "flex" : "hidden"])
128
- }, [_(t.$slots, "default")], 10, M)], 64)) : (m(), n(v(Y.value), u({ key: 0 }, X.value, {
129
- class: ["group relative flex w-full items-center gap-2.5 rounded-6 text-left text-base font-normal text-body no-underline transition-colors duration-100 select-none focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring aria-[current=page]:bg-primary-95 aria-[current=page]:font-medium aria-[current=page]:text-primary-20", [q.value ? "h-9 justify-center" : "h-8 px-2.5", o.disabled ? "pointer-events-none cursor-not-allowed opacity-50" : ["cursor-pointer", J.value]]],
124
+ class: d(["mt-1 ml-5 flex-col gap-1 border-l border-border pl-2", N.value && !q.value ? "flex" : "hidden"])
125
+ }, [_(t.$slots, "default")], 10, j)], 64)) : (m(), n(v(Y.value), u({ key: 0 }, X.value, {
126
+ class: ["group relative flex w-full items-center gap-3 rounded-10 border border-transparent py-2 text-left text-base font-medium text-heading/80 no-underline transition-all duration-200 select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset motion-reduce:transition-none aria-[current=page]:border-primary/35 aria-[current=page]:bg-primary/10 aria-[current=page]:text-heading aria-[current=page]:shadow-xs aria-[current=page]:shadow-primary/10", [q.value ? "h-9.5 justify-center" : "px-3", o.disabled ? "pointer-events-none cursor-not-allowed opacity-50" : "cursor-pointer not-aria-[current=page]:hover:border-border not-aria-[current=page]:hover:bg-accent-hover not-aria-[current=page]:hover:text-heading"]],
130
127
  title: q.value ? Z.value ? `${o.label} (${Z.value})` : o.label : void 0,
131
128
  "data-ac-ds": "",
132
129
  "data-testid": "ac-sidebar-link",
133
130
  onClick: Q
134
131
  }), {
135
132
  default: T(() => [
136
- t.$slots.icon || o.icon || q.value ? (m(), i("span", O, [_(t.$slots, "icon", {}, () => [o.icon ? (m(), n(v(o.icon), {
133
+ t.$slots.icon || o.icon || q.value ? (m(), i("span", {
137
134
  key: 0,
138
- class: "size-4"
139
- })) : (m(), i("span", k, y(o.label.charAt(0)), 1))])])) : r("", !0),
135
+ class: d(["inline-flex shrink-0 items-center justify-center text-muted transition-colors duration-200 group-hover:text-heading group-aria-[current=page]:text-primary!", b(J)]),
136
+ "aria-hidden": "true"
137
+ }, [_(t.$slots, "icon", {}, () => [o.icon ? (m(), n(v(o.icon), {
138
+ key: 0,
139
+ class: "size-full"
140
+ })) : (m(), i("span", O, y(o.label.charAt(0)), 1))])], 2)) : r("", !0),
140
141
  a("span", { class: d(q.value ? "sr-only" : "min-w-0 flex-1 truncate") }, y(o.label), 3),
141
142
  Z.value ? (m(), i(e, { key: 1 }, [q.value ? (m(), i("span", {
142
143
  key: 0,
143
- class: d(["absolute top-1 right-1 size-1.5 rounded-full", R[o.badgeColor]]),
144
+ class: d(["absolute top-1 right-1 size-2 rounded-full", L[o.badgeColor]]),
144
145
  "aria-hidden": "true"
145
146
  }, null, 2)) : (m(), i("span", {
146
147
  key: 1,
147
- class: d(["inline-flex h-4.5 min-w-4.5 shrink-0 items-center justify-center rounded-50 px-1.5 text-sm font-medium tabular-nums", L[o.badgeColor]])
148
+ class: d(["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-6 px-2 text-xs leading-none font-medium tabular-nums", I[o.badgeColor]])
148
149
  }, y(Z.value), 3))], 64)) : r("", !0)
149
150
  ]),
150
151
  _: 3
@@ -152,4 +153,4 @@ var D = {
152
153
  }
153
154
  });
154
155
  //#endregion
155
- export { N as default };
156
+ export { M as default };
@@ -1,12 +1,12 @@
1
1
  export interface Props {
2
- /** Small uppercase heading above the items. Hidden in the collapsed rail, where a divider takes its place. */
2
+ /** Small uppercase heading above the items. Hidden in the collapsed rail, where a divider takes its place. A section inside another section is a sub-group, like cloud-ui's Networking → VPC. */
3
3
  label?: string;
4
4
  /** Turns the heading into a button that shows and hides the items. */
5
5
  collapsible?: boolean;
6
6
  }
7
7
  type __VLS_Props = Props;
8
8
  type __VLS_Slots = {
9
- /** The section's `AcSidebarItem`s. */
9
+ /** The section's `AcSidebarItem`s, or nested `AcSidebarSection`s for sub-groups. */
10
10
  default?: () => unknown;
11
11
  };
12
12
  type __VLS_ModelProps = {
@@ -1,10 +1,7 @@
1
- import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, inject as s, mergeModels as c, normalizeClass as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p, useId as m, useModel as h } from "vue";
2
- import { ChevronDown as g } from "@lucide/vue";
1
+ import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, inject as s, mergeModels as c, normalizeClass as l, openBlock as u, provide as d, renderSlot as f, toDisplayString as p, unref as m, useId as h, useModel as g } from "vue";
2
+ import { ChevronRight as _ } from "@lucide/vue";
3
3
  //#region src/lib/components/AcSidebarSection.vue?vue&type=script&setup=true&lang.ts
4
- var _ = ["aria-expanded", "aria-controls"], v = { class: "truncate" }, y = {
5
- key: 1,
6
- class: "h-7 truncate px-2.5 text-sm leading-7 font-medium tracking-wider text-muted uppercase"
7
- }, b = ["id", "aria-label"], x = /*@__PURE__*/ o({
4
+ var v = ["aria-expanded", "aria-controls"], y = { class: "truncate" }, b = ["inert"], x = ["id", "aria-label"], S = /*@__PURE__*/ o({
8
5
  __name: "AcSidebarSection",
9
6
  props: /*@__PURE__*/ c({
10
7
  label: { default: "" },
@@ -21,28 +18,36 @@ var _ = ["aria-expanded", "aria-controls"], v = { class: "truncate" }, y = {
21
18
  }),
22
19
  emits: ["update:open"],
23
20
  setup(o) {
24
- let c = h(o, "open"), x = s("ac-sidebar", null), S = m(), C = t(() => x?.rail.value ?? !1);
21
+ let c = g(o, "open"), S = s("ac-sidebar", null), C = s("ac-sidebar-section", !1);
22
+ d("ac-sidebar-section", !0), d("ac-sidebar-subgroup", C);
23
+ let w = h(), T = t(() => S?.rail.value ?? !1), E = t(() => c.value || T.value), D = t(() => C ? "mt-2 first:mt-0" : T.value ? "mt-2 border-t border-muted/20 pt-2 first:mt-0 first:border-0 first:pt-0" : "mt-4 first:mt-0 [[data-testid=ac-sidebar-section]+&]:mt-5 [[data-testid=ac-sidebar-section]+&]:border-t [[data-testid=ac-sidebar-section]+&]:border-muted/20 [[data-testid=ac-sidebar-section]+&]:pt-4");
25
24
  return (t, s) => (u(), r("li", {
26
- class: l(["list-none", C.value ? "mt-2 border-t border-border-light pt-2 first:mt-0 first:border-0 first:pt-0" : "mt-4 first:mt-0"]),
25
+ class: l(["list-none", D.value]),
27
26
  "data-ac-ds": "",
28
27
  "data-testid": "ac-sidebar-section"
29
- }, [o.label && !C.value ? (u(), r(e, { key: 0 }, [o.collapsible ? (u(), r("button", {
28
+ }, [o.label && !T.value ? (u(), r(e, { key: 0 }, [o.collapsible ? (u(), r("button", {
30
29
  key: 0,
31
30
  type: "button",
32
- class: "group flex h-7 w-full cursor-pointer items-center justify-between gap-2 rounded-6 px-2.5 text-sm font-medium tracking-wider text-muted uppercase transition-colors hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
31
+ class: l(["flex w-full cursor-pointer items-center justify-between gap-2 rounded-8 px-1 py-0.5 text-left font-semibold tracking-[0.08em] uppercase transition-colors duration-200 hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset", m(C) ? "mb-1 text-xm text-muted/80" : "mb-2 text-sm text-muted"]),
33
32
  "aria-expanded": c.value,
34
- "aria-controls": `${p(S)}-items`,
33
+ "aria-controls": `${m(w)}-items`,
35
34
  onClick: s[0] ||= (e) => c.value = !c.value
36
- }, [i("span", v, f(o.label), 1), a(p(g), {
37
- class: l(["size-3.5 shrink-0 transition-transform duration-150 motion-reduce:transition-none", !c.value && "-rotate-90"]),
35
+ }, [i("span", y, p(o.label), 1), a(m(_), {
36
+ class: l(["shrink-0 text-muted/70 transition-transform duration-200 ease-out motion-reduce:transition-none", [m(C) ? "size-3.5" : "size-4", c.value && "rotate-90"]]),
38
37
  "aria-hidden": "true"
39
- }, null, 8, ["class"])], 8, _)) : (u(), r("p", y, f(o.label), 1))], 64)) : n("", !0), i("ul", {
40
- id: `${p(S)}-items`,
38
+ }, null, 8, ["class"])], 10, v)) : (u(), r("p", {
39
+ key: 1,
40
+ class: l(["truncate px-1 py-0.5 font-semibold tracking-[0.08em] uppercase", m(C) ? "mb-1 text-xm text-muted/80" : "mb-2 text-sm text-muted"])
41
+ }, p(o.label), 3))], 64)) : n("", !0), i("div", {
42
+ class: l(["grid transition-[grid-template-rows,opacity] duration-300 ease-out-soft motion-reduce:transition-none", E.value ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"]),
43
+ inert: !E.value || void 0
44
+ }, [i("ul", {
45
+ id: `${m(w)}-items`,
41
46
  role: "list",
42
47
  "aria-label": o.label || void 0,
43
- class: l(["flex-col gap-0.5", c.value || C.value || !o.collapsible ? "flex" : "hidden"])
44
- }, [d(t.$slots, "default")], 10, b)], 2));
48
+ class: l(["flex min-h-0 flex-col gap-1 overflow-hidden", [m(C) && !T.value && "pl-1", E.value && "pb-0.5"]])
49
+ }, [f(t.$slots, "default")], 10, x)], 10, b)], 2));
45
50
  }
46
51
  });
47
52
  //#endregion
48
- export { x as default };
53
+ export { S as default };
@@ -8,19 +8,19 @@ var d = ["aria-busy", "aria-hidden"], f = {
8
8
  key: 3,
9
9
  class: "w-full",
10
10
  "aria-hidden": "true"
11
- }, m = { class: "flex h-9 items-center gap-4 border-b border-border px-4" }, h = {
11
+ }, m = { class: "flex h-11 items-center gap-4 border-b border-border bg-surface-sunken/50 px-6" }, h = {
12
12
  key: 4,
13
- class: "flex size-full overflow-hidden rounded-10 border border-border bg-surface shadow-xs",
13
+ class: "flex size-full overflow-hidden rounded-10 border border-border bg-surface",
14
14
  "aria-hidden": "true"
15
- }, g = { class: "flex w-11 shrink-0 flex-col items-end gap-2 border-r border-border-light bg-surface-muted px-2.5 py-3" }, _ = { class: "flex min-w-0 flex-1 flex-col gap-2 px-3 py-3" }, v = {
15
+ }, g = { class: "flex w-11 shrink-0 flex-col items-end gap-2 border-r border-border bg-surface-muted px-2.5 py-3" }, _ = { class: "flex min-w-0 flex-1 flex-col gap-2 px-3 py-3" }, v = {
16
16
  key: 5,
17
- class: "rounded-10 border border-border bg-surface p-5 shadow-xs",
17
+ class: "rounded-14 border border-border bg-surface p-6",
18
18
  "aria-hidden": "true"
19
19
  }, y = { class: "mt-5 flex flex-col gap-2" }, b = {
20
20
  key: 6,
21
- class: "rounded-10 border border-border bg-surface p-4 shadow-xs",
21
+ class: "rounded-14 border border-border bg-surface p-5",
22
22
  "aria-hidden": "true"
23
- }, x = { class: "flex items-center gap-3" }, S = { class: "min-w-0 flex-1" }, C = { class: "mt-4 grid grid-cols-2 gap-x-4 gap-y-2.5 border-t border-border-light pt-4" }, w = {
23
+ }, x = { class: "flex items-center gap-3" }, S = { class: "min-w-0 flex-1" }, C = { class: "mt-4 grid grid-cols-2 gap-x-4 gap-y-2.5 border-t border-border pt-4" }, w = {
24
24
  key: 7,
25
25
  class: "sr-only"
26
26
  }, T = "ac-skeleton-bone block rounded-4", E = /*@__PURE__*/ a({
@@ -105,7 +105,7 @@ var d = ["aria-busy", "aria-hidden"], f = {
105
105
  class: "flex-1"
106
106
  }, [i("span", { class: o([T, "h-2.5 w-1/2 opacity-70"]) })]))), 128))]), (c(!0), r(e, null, l(a.rows, (t) => (c(), r("div", {
107
107
  key: t,
108
- class: "flex h-12 items-center gap-4 border-b border-border-light px-4 last:border-0"
108
+ class: "flex h-12 items-center gap-4 border-b border-border px-6 last:border-0"
109
109
  }, [(c(!0), r(e, null, l(a.cols, (e) => (c(), r("span", {
110
110
  key: e,
111
111
  class: "flex-1"
@@ -130,7 +130,7 @@ var d = ["aria-busy", "aria-hidden"], f = {
130
130
  i("span", { class: o([T, "h-3 w-full"]) }),
131
131
  i("span", { class: o([T, "h-3 w-3/5"]) })
132
132
  ])
133
- ])) : (c(), r("div", b, [i("div", x, [i("span", { class: o([T, "size-10 shrink-0 rounded-8"]) }), i("div", S, [i("span", { class: o([T, "h-3.5 w-1/2"]) }), i("span", { class: o([T, "mt-2 h-2.5 w-1/3"]) })])]), i("div", C, [
133
+ ])) : (c(), r("div", b, [i("div", x, [i("span", { class: o([T, "size-10 shrink-0 rounded-10"]) }), i("div", S, [i("span", { class: o([T, "h-3.5 w-1/2"]) }), i("span", { class: o([T, "mt-2 h-2.5 w-1/3"]) })])]), i("div", C, [
134
134
  i("span", { class: o([T, "h-2.5 w-3/5"]) }),
135
135
  i("span", { class: o([T, "h-2.5 w-2/5 justify-self-end"]) }),
136
136
  i("span", { class: o([T, "h-2.5 w-1/2"]) }),
@@ -33,7 +33,7 @@ export interface Props {
33
33
  required?: boolean;
34
34
  /** Error text under the slider. Turns the track red and sets `aria-invalid`. */
35
35
  errorMsg?: string;
36
- /** Helper text under the slider (hidden while `errorMsg` is set). */
36
+ /** Help text between the label and the slider. */
37
37
  hint?: string;
38
38
  }
39
39
  type __VLS_Props = Props;