@ac-design/design-system 1.0.3 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/README.md +27 -18
  2. package/dist/lib/charts/ChartFrame.js +5 -0
  3. package/dist/lib/charts/ChartFrame.vue.d.ts +71 -0
  4. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +173 -0
  5. package/dist/lib/charts/cartesian.d.ts +324 -0
  6. package/dist/lib/charts/cartesian.js +137 -0
  7. package/dist/lib/charts/echarts.d.ts +86 -0
  8. package/dist/lib/charts/echarts.js +173 -0
  9. package/dist/lib/charts/graph.d.ts +77 -0
  10. package/dist/lib/charts/graph.js +155 -0
  11. package/dist/lib/charts/index.d.ts +11 -0
  12. package/dist/lib/charts/index.js +7 -0
  13. package/dist/lib/charts/shared.d.ts +53 -0
  14. package/dist/lib/charts/shared.js +96 -0
  15. package/dist/lib/charts/xy.d.ts +69 -0
  16. package/dist/lib/charts/xy.js +73 -0
  17. package/dist/lib/compat.css +2770 -1061
  18. package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +2 -2
  19. package/dist/lib/components/AcAccordionItem.vue.d.ts +1 -1
  20. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +5 -5
  21. package/dist/lib/components/AcAlert.vue.d.ts +10 -1
  22. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +139 -45
  23. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +19 -19
  24. package/dist/lib/components/AcAreaChart.js +5 -0
  25. package/dist/lib/components/AcAreaChart.vue.d.ts +47 -0
  26. package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +205 -0
  27. package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
  28. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +66 -61
  29. package/dist/lib/components/AcBadge.vue.d.ts +20 -7
  30. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +67 -44
  31. package/dist/lib/components/AcBanner.vue.d.ts +1 -1
  32. package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +30 -30
  33. package/dist/lib/components/AcBarChart.js +5 -0
  34. package/dist/lib/components/AcBarChart.vue.d.ts +46 -0
  35. package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +213 -0
  36. package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
  37. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +36 -34
  38. package/dist/lib/components/AcBulkActionBar.js +5 -0
  39. package/dist/lib/components/AcBulkActionBar.vue.d.ts +45 -0
  40. package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
  41. package/dist/lib/components/AcButton.vue.d.ts +13 -7
  42. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +93 -47
  43. package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
  44. package/dist/lib/components/AcCard.vue.d.ts +42 -3
  45. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +175 -14
  46. package/dist/lib/components/AcCellValue.vue.d.ts +6 -3
  47. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +219 -178
  48. package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
  49. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +113 -30
  50. package/dist/lib/components/AcCheckList.js +5 -0
  51. package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
  52. package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
  53. package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
  54. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +102 -26
  55. package/dist/lib/components/AcCircularProgress.js +5 -0
  56. package/dist/lib/components/AcCircularProgress.vue.d.ts +44 -0
  57. package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +114 -0
  58. package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +142 -167
  59. package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +9 -9
  60. package/dist/lib/components/AcColorInput.js +5 -0
  61. package/dist/lib/components/AcColorInput.vue.d.ts +57 -0
  62. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +217 -0
  63. package/dist/lib/components/AcCommandBlock.js +5 -0
  64. package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
  65. package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -0
  66. package/dist/lib/components/AcConfirmModal.js +5 -0
  67. package/dist/lib/components/AcConfirmModal.vue.d.ts +56 -0
  68. package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +96 -0
  69. package/dist/lib/components/AcContentHeader.vue.d.ts +1 -1
  70. package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +5 -4
  71. package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +2 -2
  72. package/dist/lib/components/AcCopyButton.js +5 -0
  73. package/dist/lib/components/AcCopyButton.vue.d.ts +43 -0
  74. package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +92 -0
  75. package/dist/lib/components/AcCostSummary.js +5 -0
  76. package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
  77. package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
  78. package/dist/lib/components/AcDatePicker.vue.d.ts +8 -8
  79. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +634 -417
  80. package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
  81. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +57 -60
  82. package/dist/lib/components/AcDonutChart.js +5 -0
  83. package/dist/lib/components/AcDonutChart.vue.d.ts +83 -0
  84. package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +237 -0
  85. package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
  86. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +91 -78
  87. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
  88. package/dist/lib/components/AcDropdownItem.vue.d.ts +2 -2
  89. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +18 -18
  90. package/dist/lib/components/AcEmptyState.vue.d.ts +4 -1
  91. package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +50 -39
  92. package/dist/lib/components/AcErrorState.js +5 -0
  93. package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
  94. package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
  95. package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
  96. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +139 -116
  97. package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +16 -16
  98. package/dist/lib/components/AcFileUpload.vue.d.ts +2 -2
  99. package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +55 -53
  100. package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +2 -2
  101. package/dist/lib/components/AcFooter.js +5 -0
  102. package/dist/lib/components/AcFooter.vue.d.ts +37 -0
  103. package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +107 -0
  104. package/dist/lib/components/AcForm.vue.d.ts +3 -0
  105. package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +4 -2
  106. package/dist/lib/components/AcFormArray.vue.d.ts +2 -2
  107. package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +149 -147
  108. package/dist/lib/components/AcFormFooter.vue.d.ts +3 -3
  109. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
  110. package/dist/lib/components/AcFormSection.vue.d.ts +8 -1
  111. package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
  112. package/dist/lib/components/AcGraphChart.js +5 -0
  113. package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
  114. package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
  115. package/dist/lib/components/AcHeader.vue.d.ts +20 -5
  116. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +82 -28
  117. package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
  118. package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
  119. package/dist/lib/components/AcInput.vue.d.ts +4 -4
  120. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +99 -91
  121. package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +1 -1
  122. package/dist/lib/components/AcKeyValueInput.js +5 -0
  123. package/dist/lib/components/AcKeyValueInput.vue.d.ts +114 -0
  124. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +336 -0
  125. package/dist/lib/components/AcLineChart.js +5 -0
  126. package/dist/lib/components/AcLineChart.vue.d.ts +44 -0
  127. package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +175 -0
  128. package/dist/lib/components/AcLoader.js +5 -0
  129. package/dist/lib/components/AcLoader.vue.d.ts +15 -0
  130. package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
  131. package/dist/lib/components/AcLocaleSwitcher.js +5 -0
  132. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +48 -0
  133. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +111 -0
  134. package/dist/lib/components/AcMapChart.js +5 -0
  135. package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
  136. package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
  137. package/dist/lib/components/AcModal.vue.d.ts +6 -3
  138. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +88 -64
  139. package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
  140. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +29 -21
  141. package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
  142. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +23 -24
  143. package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
  144. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +139 -174
  145. package/dist/lib/components/AcNumberInput.js +5 -0
  146. package/dist/lib/components/AcNumberInput.vue.d.ts +79 -0
  147. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +241 -0
  148. package/dist/lib/components/AcPage.vue.d.ts +2 -2
  149. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +2 -2
  150. package/dist/lib/components/AcPagination.vue.d.ts +22 -5
  151. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +87 -56
  152. package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
  153. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
  154. package/dist/lib/components/AcProductHero.js +5 -0
  155. package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
  156. package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
  157. package/dist/lib/components/AcProgress.vue.d.ts +19 -4
  158. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +85 -31
  159. package/dist/lib/components/AcResourceCard.vue.d.ts +3 -3
  160. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +17 -17
  161. package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
  162. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +14 -9
  163. package/dist/lib/components/AcSectionContent.vue.d.ts +2 -2
  164. package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +8 -8
  165. package/dist/lib/components/AcSegmentedControl.vue.d.ts +1 -1
  166. package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +4 -4
  167. package/dist/lib/components/AcSelect.vue.d.ts +6 -6
  168. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +246 -254
  169. package/dist/lib/components/AcSettingsRow.js +5 -0
  170. package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
  171. package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
  172. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +32 -32
  173. package/dist/lib/components/AcSideTabs.vue.d.ts +2 -2
  174. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
  175. package/dist/lib/components/AcSidebar.vue.d.ts +6 -3
  176. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +67 -57
  177. package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
  178. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +46 -45
  179. package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
  180. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
  181. package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +8 -8
  182. package/dist/lib/components/AcSlider.vue.d.ts +1 -1
  183. package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +174 -172
  184. package/dist/lib/components/AcStatCard.vue.d.ts +3 -3
  185. package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +90 -85
  186. package/dist/lib/components/AcStatusBar.vue.d.ts +1 -1
  187. package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +6 -6
  188. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +28 -28
  189. package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
  190. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +31 -19
  191. package/dist/lib/components/AcSwitchCard.js +5 -0
  192. package/dist/lib/components/AcSwitchCard.vue.d.ts +59 -0
  193. package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +121 -0
  194. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +97 -97
  195. package/dist/lib/components/AcTabs.vue.d.ts +9 -2
  196. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +43 -28
  197. package/dist/lib/components/AcTag.vue.d.ts +2 -2
  198. package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +22 -22
  199. package/dist/lib/components/AcTagInput.js +5 -0
  200. package/dist/lib/components/AcTagInput.vue.d.ts +74 -0
  201. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +289 -0
  202. package/dist/lib/components/AcTextarea.vue.d.ts +4 -4
  203. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +85 -63
  204. package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
  205. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +56 -24
  206. package/dist/lib/components/AcTimePicker.js +5 -0
  207. package/dist/lib/components/AcTimePicker.vue.d.ts +65 -0
  208. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +455 -0
  209. package/dist/lib/components/AcToaster.vue.d.ts +6 -3
  210. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +115 -82
  211. package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
  212. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +203 -79
  213. package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
  214. package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
  215. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +166 -115
  216. package/dist/lib/components/index.d.ts +21 -2
  217. package/dist/lib/components/status.d.ts +28 -0
  218. package/dist/lib/components/status.js +125 -0
  219. package/dist/lib/composables/copyText.d.ts +2 -1
  220. package/dist/lib/composables/copyText.js +2 -2
  221. package/dist/lib/composables/useApiPagination.d.ts +55 -0
  222. package/dist/lib/composables/useApiPagination.js +58 -0
  223. package/dist/lib/composables/useBulkSelection.d.ts +44 -0
  224. package/dist/lib/composables/useBulkSelection.js +41 -0
  225. package/dist/lib/composables/useFormValidation.d.ts +65 -0
  226. package/dist/lib/composables/useFormValidation.js +148 -0
  227. package/dist/lib/composables/useTablePagination.d.ts +49 -0
  228. package/dist/lib/composables/useTablePagination.js +41 -0
  229. package/dist/lib/composables/useToast.d.ts +17 -1
  230. package/dist/lib/composables/useToast.js +10 -2
  231. package/dist/lib/editor/theme.js +65 -62
  232. package/dist/lib/index.d.ts +21 -3
  233. package/dist/lib/index.js +99 -75
  234. package/dist/lib/theme.css +377 -273
  235. package/package.json +20 -4
@@ -0,0 +1,114 @@
1
+ import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, defineComponent as a, normalizeClass as o, normalizeStyle as s, openBlock as c, renderSlot as l, toDisplayString as u } from "vue";
2
+ //#region src/lib/components/AcCircularProgress.vue?vue&type=script&setup=true&lang.ts
3
+ var d = [
4
+ "aria-label",
5
+ "aria-valuemax",
6
+ "aria-valuenow",
7
+ "aria-valuetext",
8
+ "aria-busy"
9
+ ], f = ["viewBox"], p = [
10
+ "cx",
11
+ "cy",
12
+ "r",
13
+ "stroke-width"
14
+ ], m = [
15
+ "cx",
16
+ "cy",
17
+ "r",
18
+ "stroke-width",
19
+ "stroke-dashoffset"
20
+ ], h = /*@__PURE__*/ a({
21
+ __name: "AcCircularProgress",
22
+ props: {
23
+ value: { default: 0 },
24
+ max: { default: 100 },
25
+ size: { default: "normal" },
26
+ strokeWidth: { default: void 0 },
27
+ showLabel: {
28
+ type: Boolean,
29
+ default: !0
30
+ },
31
+ valueText: { default: "" },
32
+ color: { default: "progress" },
33
+ label: { default: "" },
34
+ indeterminate: {
35
+ type: Boolean,
36
+ default: !1
37
+ }
38
+ },
39
+ setup(a) {
40
+ let h = a, g = {
41
+ small: {
42
+ px: 32,
43
+ stroke: 3,
44
+ box: "size-8",
45
+ text: "text-[9px]"
46
+ },
47
+ normal: {
48
+ px: 44,
49
+ stroke: 4,
50
+ box: "size-11",
51
+ text: "text-xm"
52
+ },
53
+ large: {
54
+ px: 80,
55
+ stroke: 6,
56
+ box: "size-20",
57
+ text: "text-xl"
58
+ }
59
+ }, _ = {
60
+ primary: "text-primary",
61
+ info: "text-info",
62
+ success: "text-success",
63
+ warning: "text-warning",
64
+ danger: "text-danger"
65
+ }, v = e(() => typeof h.size == "number" ? null : g[h.size]), y = e(() => v.value?.px ?? Math.max(16, h.size)), b = e(() => h.strokeWidth ?? v.value?.stroke ?? Math.max(2, Math.round(y.value / 11))), x = e(() => (y.value - b.value) / 2), S = e(() => v.value ? void 0 : {
66
+ width: `${y.value}px`,
67
+ height: `${y.value}px`
68
+ }), C = e(() => v.value ? void 0 : { fontSize: `${Math.min(24, Math.max(9, Math.round(y.value * .23)))}px` }), w = e(() => h.max <= 0 ? 0 : Math.min(100, Math.max(0, h.value / h.max * 100))), T = e(() => h.color === "progress" ? D() : h.color === "auto" ? w.value >= 95 ? "danger" : w.value >= 80 ? "warning" : "primary" : h.color), E = e(() => h.valueText || `${Math.round(w.value)}%`);
69
+ function D() {
70
+ return h.indeterminate ? "primary" : w.value >= 100 ? "success" : w.value >= 60 ? "info" : w.value >= 30 ? "warning" : "danger";
71
+ }
72
+ return (e, h) => (c(), n("div", {
73
+ role: "progressbar",
74
+ "aria-label": a.label || "Progress",
75
+ "aria-valuemin": "0",
76
+ "aria-valuemax": a.indeterminate ? void 0 : a.max,
77
+ "aria-valuenow": a.indeterminate ? void 0 : Math.min(a.max, Math.max(0, a.value)),
78
+ "aria-valuetext": a.indeterminate ? void 0 : E.value,
79
+ "aria-busy": a.indeterminate || void 0,
80
+ class: o(["relative inline-flex shrink-0 items-center justify-center", v.value?.box]),
81
+ style: s(S.value),
82
+ "data-ac-ds": "",
83
+ "data-testid": "ac-circular-progress"
84
+ }, [(c(), n("svg", {
85
+ class: o(["size-full -rotate-90", [_[T.value], a.indeterminate && "animate-spin motion-reduce:animate-none"]]),
86
+ viewBox: `0 0 ${y.value} ${y.value}`,
87
+ fill: "none",
88
+ "aria-hidden": "true"
89
+ }, [r("circle", {
90
+ cx: y.value / 2,
91
+ cy: y.value / 2,
92
+ r: x.value,
93
+ class: "stroke-border",
94
+ "stroke-width": b.value
95
+ }, null, 8, p), r("circle", {
96
+ cx: y.value / 2,
97
+ cy: y.value / 2,
98
+ r: x.value,
99
+ class: o(["stroke-current transition-[stroke-dashoffset,color,opacity] duration-[800ms] ease-[cubic-bezier(0.4,0,0.2,1)] motion-reduce:transition-none", !a.indeterminate && w.value === 0 && "opacity-0"]),
100
+ "stroke-width": b.value + .5,
101
+ "stroke-linecap": "round",
102
+ pathLength: "100",
103
+ "stroke-dasharray": "100",
104
+ "stroke-dashoffset": a.indeterminate ? 75 : 100 - w.value
105
+ }, null, 10, m)], 10, f)), e.$slots.default || a.showLabel && !a.indeterminate ? (c(), n("span", {
106
+ key: 0,
107
+ class: o(["pointer-events-none absolute inset-0 flex items-center justify-center leading-none font-bold tracking-[-0.03em] text-heading tabular-nums select-none", v.value?.text]),
108
+ style: s(C.value),
109
+ "aria-hidden": "true"
110
+ }, [l(e.$slots, "default", {}, () => [i(u(E.value), 1)])], 6)) : t("", !0)], 14, d));
111
+ }
112
+ });
113
+ //#endregion
114
+ export { h as default };
@@ -1,47 +1,48 @@
1
- import e from "./AcSkeleton.js";
2
- import { Fragment as t, Teleport as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, inject as f, mergeModels as p, nextTick as m, normalizeClass as h, normalizeStyle as ee, onBeforeUnmount as te, openBlock as g, ref as _, renderList as ne, renderSlot as v, resolveDynamicComponent as re, toDisplayString as y, unref as b, useId as ie, useModel as ae, vModelText as oe, watch as se, withCtx as ce, withDirectives as le, withModifiers as ue } from "vue";
3
- import { Check as de, ChevronsUpDown as fe, Cloud as pe, Plus as me, Search as he } from "@lucide/vue";
1
+ import { statusMeta as e } from "./status.js";
2
+ import t from "./AcSkeleton.js";
3
+ import { Fragment as n, Teleport as r, Transition as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, inject as ee, mergeModels as p, nextTick as m, normalizeClass as h, normalizeStyle as te, onBeforeUnmount as ne, openBlock as g, ref as _, renderList as re, renderSlot as v, resolveDynamicComponent as ie, toDisplayString as y, unref as b, useId as ae, useModel as oe, vModelText as se, watch as ce, withCtx as le, withDirectives as ue, withModifiers as de } from "vue";
4
+ import { Check as fe, ChevronsUpDown as pe, Cloud as me, Plus as he, Search as ge } from "@lucide/vue";
4
5
  //#region src/lib/components/AcClusterSwitcher.vue?vue&type=script&setup=true&lang.ts
5
- var ge = [
6
+ var _e = [
6
7
  "id",
7
8
  "aria-expanded",
8
9
  "aria-controls",
9
10
  "aria-label",
10
11
  "title",
11
12
  "disabled"
12
- ], _e = {
13
- class: "relative inline-flex size-7 shrink-0 items-center justify-center rounded-6 bg-surface ring-1 ring-border-light ring-inset",
13
+ ], ve = {
14
+ class: "relative inline-flex size-7 shrink-0 items-center justify-center rounded-8 bg-surface ring-1 ring-border ring-inset",
14
15
  "aria-hidden": "true"
15
- }, ve = ["src"], ye = { class: "min-w-0 flex-1" }, be = {
16
+ }, ye = ["src"], be = { class: "min-w-0 flex-1" }, xe = {
16
17
  key: 0,
17
18
  class: "block truncate text-sm text-muted"
18
- }, xe = {
19
+ }, Se = {
19
20
  key: 0,
20
- class: "border-b border-border-light p-1.5"
21
- }, Se = { class: "relative" }, Ce = [
21
+ class: "border-b border-border p-2"
22
+ }, Ce = { class: "relative" }, we = [
22
23
  "aria-activedescendant",
23
24
  "aria-label",
24
25
  "placeholder"
25
- ], we = ["tabindex", "aria-activedescendant"], Te = [
26
+ ], Te = ["tabindex", "aria-activedescendant"], Ee = [
26
27
  "id",
27
28
  "aria-selected",
28
29
  "aria-disabled",
29
30
  "onMouseenter",
30
31
  "onClick"
31
- ], Ee = {
32
- class: "inline-flex size-7 shrink-0 items-center justify-center rounded-6 bg-surface ring-1 ring-border ring-inset",
32
+ ], De = {
33
+ class: "inline-flex size-8 shrink-0 items-center justify-center rounded-8 bg-surface ring-1 ring-border ring-inset",
33
34
  "aria-hidden": "true"
34
- }, De = ["src", "onError"], Oe = { class: "min-w-0 flex-1" }, ke = { class: "flex min-w-0 items-center gap-1.5 text-xs text-muted" }, Ae = {
35
+ }, Oe = ["src", "onError"], ke = { class: "min-w-0 flex-1" }, Ae = { class: "block truncate text-base leading-5 font-medium text-heading" }, je = { class: "flex min-w-0 items-center gap-1.5 text-xs text-muted" }, Me = {
35
36
  key: 1,
36
37
  "aria-hidden": "true"
37
- }, je = { class: "truncate" }, Me = {
38
+ }, Ne = { class: "truncate" }, Pe = {
38
39
  key: 0,
39
40
  role: "presentation",
40
41
  class: "px-3 py-6 text-center text-base text-muted"
41
- }, Ne = {
42
+ }, Fe = {
42
43
  key: 1,
43
- class: "border-t border-border-light p-1"
44
- }, x = /*@__PURE__*/ d({
44
+ class: "border-t border-border p-2"
45
+ }, x = /*@__PURE__*/ f({
45
46
  __name: "AcClusterSwitcher",
46
47
  props: /*@__PURE__*/ p({
47
48
  clusterOptions: { default: () => [] },
@@ -76,48 +77,26 @@ var ge = [
76
77
  openModifiers: {}
77
78
  }),
78
79
  emits: /*@__PURE__*/ p(["select", "import"], ["update:modelValue", "update:open"]),
79
- setup(d, { expose: p, emit: x }) {
80
- let S = d, C = ae(d, "modelValue"), w = ae(d, "open"), T = x, Pe = {
81
- success: [
82
- "active",
83
- "ready",
84
- "connected",
85
- "running",
86
- "healthy",
87
- "true"
88
- ],
89
- danger: [
90
- "notready",
91
- "lost",
92
- "notconnected",
93
- "disconnected",
94
- "error",
95
- "failed",
96
- "critical",
97
- "unhealthy",
98
- "false"
99
- ],
100
- warning: [
101
- "pending",
102
- "connecting",
103
- "provisioning",
104
- "importing",
105
- "registered",
106
- "updating",
107
- "deleting",
108
- "unknown"
109
- ]
80
+ setup(f, { expose: p, emit: x }) {
81
+ let S = f, C = oe(f, "modelValue"), w = oe(f, "open"), T = x, Ie = {
82
+ registered: "warning",
83
+ unknown: "warning",
84
+ notconnected: "danger"
110
85
  }, E = {
111
86
  success: "bg-success",
112
87
  danger: "bg-danger",
88
+ info: "bg-info",
113
89
  warning: "bg-warning",
114
- neutral: "bg-slate-60"
115
- }, Fe = {
116
- success: "text-green-30",
117
- danger: "text-red-30",
118
- warning: "text-yellow-30",
90
+ pending: "bg-pending",
91
+ neutral: "bg-muted"
92
+ }, Le = {
93
+ success: "text-success-strong",
94
+ danger: "text-danger-strong",
95
+ info: "text-info-strong",
96
+ warning: "text-warning-strong",
97
+ pending: "text-pending-strong",
119
98
  neutral: "text-muted"
120
- }, D = f("ac-sidebar", null), O = ie(), k = `${O}-panel`, A = `${O}-list`, j = _(null), M = _(null), Ie = _(null), N = _(null), P = _(""), F = _(-1), I = _(/* @__PURE__ */ new Set()), L = _({}), R = _(!0), z = i(() => S.sidebarCollapsed ?? D?.rail.value ?? !1), B = i(() => D?.dark.value ?? !1), V = i(() => C.value ? S.clusterOptions.find((e) => e.name === C.value) ?? { name: C.value } : null), H = i(() => {
99
+ }, D = ee("ac-sidebar", null), O = ae(), k = `${O}-panel`, A = `${O}-list`, j = _(null), M = _(null), Re = _(null), N = _(null), P = _(""), F = _(-1), I = _(/* @__PURE__ */ new Set()), L = _({}), R = _(!0), z = a(() => S.sidebarCollapsed ?? D?.rail.value ?? !1), B = a(() => D?.dark.value ?? !1), V = a(() => C.value ? S.clusterOptions.find((e) => e.name === C.value) ?? { name: C.value } : null), H = a(() => {
121
100
  let e = P.value.trim().toLowerCase();
122
101
  return e ? S.clusterOptions.filter((t) => [
123
102
  t.name,
@@ -125,27 +104,23 @@ var ge = [
125
104
  t.provider,
126
105
  t.location
127
106
  ].some((t) => t?.toLowerCase().includes(e))) : S.clusterOptions;
128
- }), Le = i(() => V.value ? `Cluster: ${U(V.value)}${V.value.status ? `, ${V.value.status}` : ""}. Switch cluster` : "Select a cluster");
107
+ }), ze = a(() => V.value ? `Cluster: ${U(V.value)}${V.value.status ? `, ${V.value.status}` : ""}. Switch cluster` : "Select a cluster");
129
108
  function U(e) {
130
109
  return e.displayName || e.name;
131
110
  }
132
111
  function W(e) {
133
112
  return !!(e.disabled || e.$isDisabled);
134
113
  }
135
- function G(e) {
136
- let t = (e ?? "").toLowerCase().replace(/[^a-z]/g, "");
137
- if (!t) return "neutral";
138
- for (let e of [
139
- "success",
140
- "danger",
141
- "warning"
142
- ]) if (Pe[e].includes(t)) return e;
143
- return "neutral";
114
+ function G(t) {
115
+ let n = (t ?? "").toLowerCase().replace(/[^a-z]/g, "");
116
+ if (!n) return "neutral";
117
+ let r = Ie[n] ?? e(t).tone;
118
+ return r === "default" ? "neutral" : r;
144
119
  }
145
120
  function K(e) {
146
121
  return !S.providerIconBase || !e || I.value.has(e) ? "" : `${S.providerIconBase}/${e}.png`;
147
122
  }
148
- function Re(e) {
123
+ function Be(e) {
149
124
  e && (I.value = new Set(I.value).add(e));
150
125
  }
151
126
  function q(e) {
@@ -156,7 +131,7 @@ var ge = [
156
131
  for (let r = e; r >= 0 && r < n.length; r += t) if (!W(n[r])) return r;
157
132
  return -1;
158
133
  }
159
- function ze(e) {
134
+ function Ve(e) {
160
135
  let t = H.value;
161
136
  if (!t.length) return;
162
137
  let n = F.value;
@@ -190,79 +165,79 @@ var ge = [
190
165
  maxHeight: `${Math.max(o ? a : i, 200)}px`
191
166
  };
192
167
  }
193
- function Z() {
168
+ function He() {
194
169
  S.disabled || S.loading || (w.value = !0);
195
170
  }
196
- function Q(e = !0) {
171
+ function Z(e = !0) {
197
172
  w.value && (w.value = !1, e && j.value?.focus());
198
173
  }
199
- function Be(e) {
200
- W(e) || (C.value = e.name, T("select", e), Q());
174
+ function Ue(e) {
175
+ W(e) || (C.value = e.name, T("select", e), Z());
201
176
  }
202
- function Ve() {
203
- T("import"), Q(!1);
177
+ function We() {
178
+ T("import"), Z(!1);
204
179
  }
205
- function He(e) {
206
- !w.value && ["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(), Z());
180
+ function Ge(e) {
181
+ !w.value && ["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(), He());
207
182
  }
208
- function Ue(e) {
209
- if (e.key === "ArrowDown" || e.key === "ArrowUp") e.preventDefault(), ze(e.key === "ArrowDown" ? 1 : -1);
183
+ function Q(e) {
184
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") e.preventDefault(), Ve(e.key === "ArrowDown" ? 1 : -1);
210
185
  else if ((e.key === "Home" || e.key === "End") && !S.searchable) e.preventDefault(), F.value = e.key === "Home" ? J() : J(H.value.length - 1, -1), Y();
211
186
  else if (e.key === "Enter" || e.key === " " && !S.searchable) {
212
187
  e.preventDefault();
213
188
  let t = H.value[F.value];
214
- t && Be(t);
189
+ t && Ue(t);
215
190
  }
216
191
  }
217
- function We(e) {
218
- e.key === "Escape" ? (e.preventDefault(), Q()) : e.key === "Tab" && Ge(e);
192
+ function Ke(e) {
193
+ e.key === "Escape" ? (e.preventDefault(), Z()) : e.key === "Tab" && qe(e);
219
194
  }
220
- function Ge(e) {
195
+ function qe(e) {
221
196
  let t = [...M.value?.querySelectorAll("input, a[href], button:not([disabled]), [tabindex=\"0\"]") ?? []], n = t[0], r = t[t.length - 1];
222
- e.shiftKey && document.activeElement === n ? (e.preventDefault(), Q()) : !e.shiftKey && document.activeElement === r && Q();
197
+ e.shiftKey && document.activeElement === n ? (e.preventDefault(), Z()) : !e.shiftKey && document.activeElement === r && Z();
223
198
  }
224
- function Ke(e) {
199
+ function Je(e) {
225
200
  let t = e.target;
226
- j.value?.contains(t) || M.value?.contains(t) || Q(!1);
201
+ j.value?.contains(t) || M.value?.contains(t) || Z(!1);
227
202
  }
228
- function qe(e) {
229
- e && M.value?.contains(e.target) || X();
203
+ function Ye(e) {
204
+ e?.target instanceof Node && M.value?.contains(e.target) || X();
230
205
  }
231
206
  function $(e) {
232
207
  let t = e ? "addEventListener" : "removeEventListener";
233
- document[t]("pointerdown", Ke, !0), window[t]("scroll", qe, !0), window[t]("resize", qe);
208
+ document[t]("pointerdown", Je, !0), window[t]("scroll", Ye, !0), window[t]("resize", Ye);
234
209
  }
235
- return se(w, async (e) => {
210
+ return ce(w, async (e) => {
236
211
  if ($(e), !e) return;
237
212
  P.value = "";
238
213
  let t = H.value.findIndex((e) => e.name === C.value);
239
- F.value = t >= 0 ? t : J(), await m(), X(), (S.searchable ? Ie.value : N.value)?.focus(), Y();
240
- }), se(P, () => {
214
+ F.value = t >= 0 ? t : J(), await m(), X(), (S.searchable ? Re.value : N.value)?.focus(), Y();
215
+ }), ce(P, () => {
241
216
  F.value = J(), m(X);
242
- }), te(() => $(!1)), p({ focus: () => j.value?.focus() }), (i, f) => (g(), s("div", {
217
+ }), ne(() => $(!1)), p({ focus: () => j.value?.focus() }), (e, a) => (g(), c("div", {
243
218
  class: h(["min-w-0", z.value ? "inline-flex" : "flex w-full"]),
244
219
  "data-ac-ds": "",
245
220
  "data-testid": "ac-cluster-switcher"
246
- }, [d.loading ? (g(), s("div", {
221
+ }, [f.loading ? (g(), c("div", {
247
222
  key: 0,
248
223
  role: "status",
249
224
  "aria-label": "Loading clusters",
250
- class: h(["flex h-10 items-center rounded-8 border", [z.value ? "size-10 justify-center" : "w-full gap-2.5 px-2", B.value ? "border-white/10" : "border-border"]]),
225
+ class: h(["flex h-10 items-center rounded-10 border", [z.value ? "size-10 justify-center" : "w-full gap-2.5 px-2", B.value ? "border-white/10" : "border-border"]]),
251
226
  "data-ac-ds": "",
252
227
  "data-testid": "ac-cluster-switcher-loading"
253
- }, [u(e, {
228
+ }, [d(t, {
254
229
  shape: "rect",
255
230
  width: "28px",
256
231
  height: "28px",
257
232
  label: "",
258
233
  class: "shrink-0"
259
- }), z.value ? o("", !0) : (g(), a(e, {
234
+ }), z.value ? s("", !0) : (g(), o(t, {
260
235
  key: 0,
261
236
  shape: "text",
262
237
  width: "60%",
263
238
  height: "10px",
264
239
  label: ""
265
- }))], 2)) : (g(), s("button", {
240
+ }))], 2)) : (g(), c("button", {
266
241
  key: 1,
267
242
  id: `${b(O)}-trigger`,
268
243
  ref_key: "trigger",
@@ -271,143 +246,143 @@ var ge = [
271
246
  "aria-haspopup": "dialog",
272
247
  "aria-expanded": w.value,
273
248
  "aria-controls": w.value ? k : void 0,
274
- "aria-label": Le.value,
249
+ "aria-label": ze.value,
275
250
  title: z.value && V.value ? U(V.value) : void 0,
276
- disabled: d.disabled,
277
- class: h(["group relative flex h-10 min-w-0 cursor-pointer items-center rounded-8 border text-left transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60", [
278
- z.value ? "size-10 justify-center" : "w-full gap-2.5 pr-2 pl-2",
279
- B.value ? "border-white/10 bg-white/4 enabled:hover:bg-white/8" : "border-border bg-surface shadow-xs enabled:hover:border-border-dark",
280
- w.value && (B.value ? "bg-white/8" : "border-border-dark")
251
+ disabled: f.disabled,
252
+ class: h(["group relative flex h-10 min-w-0 cursor-pointer items-center rounded-10 border text-left transition-[color,background-color,border-color,box-shadow] duration-200 disabled:cursor-not-allowed disabled:opacity-50", [
253
+ z.value ? "size-10 justify-center" : "w-full gap-2.5 pr-2.5 pl-1.5",
254
+ B.value ? "border-white/10 bg-white/4 enabled:hover:bg-white/8 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" : "border-border bg-background enabled:hover:border-accent-active focus-visible:focus-ring",
255
+ w.value && (B.value ? "bg-white/8" : "focus-ring")
281
256
  ]]),
282
257
  "data-ac-ds": "",
283
258
  "data-testid": "ac-cluster-switcher-trigger",
284
- onClick: f[1] ||= (e) => w.value ? Q() : Z(),
285
- onKeydown: He
286
- }, [c("span", _e, [K(V.value?.provider) ? (g(), s("img", {
259
+ onClick: a[1] ||= (e) => w.value ? Z() : He(),
260
+ onKeydown: Ge
261
+ }, [l("span", ve, [K(V.value?.provider) ? (g(), c("img", {
287
262
  key: 0,
288
263
  src: K(V.value?.provider),
289
264
  alt: "",
290
265
  class: "size-5 object-contain",
291
- onError: f[0] ||= (e) => Re(V.value?.provider)
292
- }, null, 40, ve)) : (g(), a(b(pe), {
266
+ onError: a[0] ||= (e) => Be(V.value?.provider)
267
+ }, null, 40, ye)) : (g(), o(b(me), {
293
268
  key: 1,
294
269
  class: "size-4 text-muted"
295
- })), V.value ? (g(), s("span", {
270
+ })), V.value ? (g(), c("span", {
296
271
  key: 2,
297
272
  class: h(["absolute -right-0.5 -bottom-0.5 size-2.5 rounded-full ring-2", [E[G(V.value.status)], B.value ? "ring-sidebar" : "ring-surface"]])
298
- }, null, 2)) : o("", !0)]), z.value ? o("", !0) : (g(), s(t, { key: 0 }, [c("span", ye, [c("span", { class: h(["block truncate text-base leading-5 font-medium", V.value ? "text-heading" : "text-muted"]) }, y(V.value ? U(V.value) : d.placeholder), 3), V.value?.location ? (g(), s("span", be, y(V.value.location), 1)) : o("", !0)]), u(b(fe), {
273
+ }, null, 2)) : s("", !0)]), z.value ? s("", !0) : (g(), c(n, { key: 0 }, [l("span", be, [l("span", { class: h(["block truncate text-base leading-5 font-medium", V.value ? "text-heading" : "text-muted"]) }, y(V.value ? U(V.value) : f.placeholder), 3), V.value?.location ? (g(), c("span", xe, y(V.value.location), 1)) : s("", !0)]), d(b(pe), {
299
274
  class: "size-4 shrink-0 text-muted transition-colors group-hover:text-heading",
300
275
  "aria-hidden": "true"
301
- })], 64))], 42, ge)), (g(), a(n, { to: "body" }, [u(r, {
276
+ })], 64))], 42, _e)), (g(), o(r, { to: "body" }, [d(i, {
302
277
  "enter-active-class": "transition duration-150 ease-out",
303
278
  "enter-from-class": `opacity-0 motion-safe:scale-[0.98] ${z.value ? "motion-safe:-translate-x-1" : R.value ? "motion-safe:-translate-y-1" : "motion-safe:translate-y-1"}`,
304
279
  "leave-active-class": "transition duration-100 ease-in",
305
280
  "leave-to-class": "opacity-0"
306
281
  }, {
307
- default: ce(() => [w.value ? (g(), s("div", {
282
+ default: le(() => [w.value ? (g(), c("div", {
308
283
  key: 0,
309
284
  id: k,
310
285
  ref_key: "panel",
311
286
  ref: M,
312
287
  role: "dialog",
313
288
  "aria-label": "Switch cluster",
314
- class: h(["fixed z-[90] flex max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-10 border border-border bg-surface shadow-lg", z.value ? "origin-left" : R.value ? "origin-top" : "origin-bottom"]),
315
- style: ee(L.value),
289
+ class: h(["fixed z-[90] flex max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-14 border border-border bg-surface shadow-lg", z.value ? "origin-left" : R.value ? "origin-top" : "origin-bottom"]),
290
+ style: te(L.value),
316
291
  "data-ac-ds": "",
317
292
  "data-testid": "ac-cluster-switcher-panel",
318
- onKeydown: We
293
+ onKeydown: Ke
319
294
  }, [
320
- d.searchable ? (g(), s("div", xe, [c("div", Se, [u(b(he), {
321
- class: "pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted",
295
+ f.searchable ? (g(), c("div", Se, [l("div", Ce, [d(b(ge), {
296
+ class: "pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted",
322
297
  "aria-hidden": "true"
323
- }), le(c("input", {
298
+ }), ue(l("input", {
324
299
  ref_key: "searchInput",
325
- ref: Ie,
326
- "onUpdate:modelValue": f[2] ||= (e) => P.value = e,
300
+ ref: Re,
301
+ "onUpdate:modelValue": a[2] ||= (e) => P.value = e,
327
302
  type: "text",
328
303
  role: "combobox",
329
304
  "aria-autocomplete": "list",
330
305
  "aria-expanded": "true",
331
306
  "aria-controls": A,
332
307
  "aria-activedescendant": F.value >= 0 ? q(F.value) : void 0,
333
- "aria-label": d.searchPlaceholder,
334
- placeholder: d.searchPlaceholder,
308
+ "aria-label": f.searchPlaceholder,
309
+ placeholder: f.searchPlaceholder,
335
310
  autocomplete: "off",
336
311
  spellcheck: "false",
337
- class: "h-8 w-full rounded-6 bg-surface-muted pr-2 pl-8 text-base text-heading outline-none placeholder:text-muted focus:bg-surface focus:ring-1 focus:ring-border",
312
+ class: "h-9 w-full rounded-10 border border-border bg-background pr-3 pl-9 text-base text-heading outline-none transition-[border-color,box-shadow] duration-200 placeholder:text-muted/80 hover:border-accent-active focus:focus-ring",
338
313
  "data-ac-ds": "",
339
314
  "data-testid": "ac-cluster-switcher-search",
340
- onKeydown: Ue
341
- }, null, 40, Ce), [[oe, P.value]])])])) : o("", !0),
342
- c("ul", {
315
+ onKeydown: Q
316
+ }, null, 40, we), [[se, P.value]])])])) : s("", !0),
317
+ l("ul", {
343
318
  id: A,
344
319
  ref_key: "listEl",
345
320
  ref: N,
346
321
  role: "listbox",
347
322
  "aria-label": "Clusters",
348
- tabindex: d.searchable ? -1 : 0,
349
- "aria-activedescendant": !d.searchable && F.value >= 0 ? q(F.value) : void 0,
350
- class: "ac-scrollbar max-h-72 min-h-0 flex-1 p-1 outline-none",
351
- onKeydown: Ue
352
- }, [(g(!0), s(t, null, ne(H.value, (e, t) => (g(), s("li", {
353
- id: q(t),
354
- key: e.name,
323
+ tabindex: f.searchable ? -1 : 0,
324
+ "aria-activedescendant": !f.searchable && F.value >= 0 ? q(F.value) : void 0,
325
+ class: "ac-scrollbar max-h-72 min-h-0 flex-1 p-2 outline-none",
326
+ onKeydown: Q
327
+ }, [(g(!0), c(n, null, re(H.value, (t, n) => (g(), c("li", {
328
+ id: q(n),
329
+ key: t.name,
355
330
  role: "option",
356
- "aria-selected": e.name === C.value,
357
- "aria-disabled": W(e) || void 0,
358
- class: h(["flex items-center gap-2.5 rounded-6 px-2 py-1.5 transition-colors duration-75", [W(e) ? "cursor-not-allowed opacity-50" : "cursor-pointer", t === F.value && "bg-surface-muted"]]),
331
+ "aria-selected": t.name === C.value,
332
+ "aria-disabled": W(t) || void 0,
333
+ class: h(["flex items-center gap-2.5 rounded-8 px-2.5 py-2 transition-colors duration-75", [W(t) ? "cursor-not-allowed opacity-50" : "cursor-pointer", n === F.value ? "bg-accent-hover" : t.name === C.value && "bg-accent"]]),
359
334
  "data-ac-ds": "",
360
335
  "data-testid": "ac-cluster-switcher-option",
361
- onMouseenter: (n) => !W(e) && (F.value = t),
362
- onMousedown: f[3] ||= ue(() => {}, ["prevent"]),
363
- onClick: (t) => Be(e)
364
- }, [v(i.$slots, "option", {
365
- cluster: e,
366
- selected: e.name === C.value,
367
- active: t === F.value
336
+ onMouseenter: (e) => !W(t) && (F.value = n),
337
+ onMousedown: a[3] ||= de(() => {}, ["prevent"]),
338
+ onClick: (e) => Ue(t)
339
+ }, [v(e.$slots, "option", {
340
+ cluster: t,
341
+ selected: t.name === C.value,
342
+ active: n === F.value
368
343
  }, () => [
369
- c("span", Ee, [K(e.provider) ? (g(), s("img", {
344
+ l("span", De, [K(t.provider) ? (g(), c("img", {
370
345
  key: 0,
371
- src: K(e.provider),
346
+ src: K(t.provider),
372
347
  alt: "",
373
348
  class: "size-5 object-contain",
374
- onError: (t) => Re(e.provider)
375
- }, null, 40, De)) : (g(), a(b(pe), {
349
+ onError: (e) => Be(t.provider)
350
+ }, null, 40, Oe)) : (g(), o(b(me), {
376
351
  key: 1,
377
352
  class: "size-4 text-muted"
378
353
  }))]),
379
- c("span", Oe, [c("span", { class: h(["block truncate text-base leading-5 text-heading", e.name === C.value && "font-medium"]) }, y(U(e)), 3), c("span", ke, [
380
- e.status ? (g(), s("span", {
354
+ l("span", ke, [l("span", Ae, y(U(t)), 1), l("span", je, [
355
+ t.status ? (g(), c("span", {
381
356
  key: 0,
382
- class: h(["inline-flex shrink-0 items-center gap-1", Fe[G(e.status)]])
383
- }, [c("span", {
384
- class: h(["size-1.5 rounded-full", E[G(e.status)]]),
357
+ class: h(["inline-flex shrink-0 items-center gap-1", Le[G(t.status)]])
358
+ }, [l("span", {
359
+ class: h(["size-1.5 rounded-full", E[G(t.status)]]),
385
360
  "aria-hidden": "true"
386
- }, null, 2), l(" " + y(e.status), 1)], 2)) : o("", !0),
387
- e.status && (e.location || e.provider) ? (g(), s("span", Ae, "·")) : o("", !0),
388
- c("span", je, y([e.provider, e.location].filter(Boolean).join(" · ")), 1)
361
+ }, null, 2), u(" " + y(t.status), 1)], 2)) : s("", !0),
362
+ t.status && (t.location || t.provider) ? (g(), c("span", Me, "·")) : s("", !0),
363
+ l("span", Ne, y([t.provider, t.location].filter(Boolean).join(" · ")), 1)
389
364
  ])]),
390
- e.name === C.value ? (g(), a(b(de), {
365
+ t.name === C.value ? (g(), o(b(fe), {
391
366
  key: 0,
392
- class: "size-4 shrink-0 text-primary",
367
+ class: "size-4 shrink-0 text-primary-strong",
393
368
  "aria-hidden": "true"
394
- })) : o("", !0)
395
- ])], 42, Te))), 128)), H.value.length ? o("", !0) : (g(), s("li", Me, [v(i.$slots, "empty", { query: P.value }, () => [l(y(P.value ? `No clusters match “${P.value}”` : "No clusters yet"), 1)])]))], 40, we),
396
- i.$slots.footer || d.importLabel ? (g(), s("div", Ne, [v(i.$slots, "footer", { close: Q }, () => [(g(), a(re(d.importUrl ? "a" : "button"), {
397
- href: d.importUrl || void 0,
398
- type: d.importUrl ? void 0 : "button",
399
- class: "flex h-8 w-full cursor-pointer items-center gap-2.5 rounded-6 px-2 text-base text-body no-underline outline-none transition-colors hover:bg-surface-muted hover:text-heading focus-visible:bg-surface-muted focus-visible:text-heading focus-visible:ring-[3px] focus-visible:ring-ring",
369
+ })) : s("", !0)
370
+ ])], 42, Ee))), 128)), H.value.length ? s("", !0) : (g(), c("li", Pe, [v(e.$slots, "empty", { query: P.value }, () => [u(y(P.value ? `No clusters match “${P.value}”` : "No clusters yet"), 1)])]))], 40, Te),
371
+ e.$slots.footer || f.importLabel ? (g(), c("div", Fe, [v(e.$slots, "footer", { close: Z }, () => [(g(), o(ie(f.importUrl ? "a" : "button"), {
372
+ href: f.importUrl || void 0,
373
+ type: f.importUrl ? void 0 : "button",
374
+ class: "flex min-h-9 w-full cursor-pointer items-center gap-2.5 rounded-8 px-3 py-2 text-base font-medium text-heading no-underline outline-none transition-colors duration-150 hover:bg-accent-hover focus-visible:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
400
375
  "data-ac-ds": "",
401
376
  "data-testid": "ac-cluster-switcher-import",
402
- onClick: Ve
377
+ onClick: We
403
378
  }, {
404
- default: ce(() => [u(b(me), {
379
+ default: le(() => [d(b(he), {
405
380
  class: "size-4 shrink-0 text-muted",
406
381
  "aria-hidden": "true"
407
- }), l(" " + y(d.importLabel), 1)]),
382
+ }), u(" " + y(f.importLabel), 1)]),
408
383
  _: 1
409
- }, 8, ["href", "type"]))])])) : o("", !0)
410
- ], 38)) : o("", !0)]),
384
+ }, 8, ["href", "type"]))])])) : s("", !0)
385
+ ], 38)) : s("", !0)]),
411
386
  _: 3
412
387
  }, 8, ["enter-from-class"])]))], 2));
413
388
  }