@ac-design/design-system 0.0.0-stage → 1.0.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 (247) hide show
  1. package/README.md +160 -2
  2. package/dist/lib/compat.css +4441 -0
  3. package/dist/lib/components/AcAccordion.js +5 -0
  4. package/dist/lib/components/AcAccordion.vue.d.ts +35 -0
  5. package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +61 -0
  6. package/dist/lib/components/AcAccordionItem.js +5 -0
  7. package/dist/lib/components/AcAccordionItem.vue.d.ts +49 -0
  8. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +81 -0
  9. package/dist/lib/components/AcAlert.js +5 -0
  10. package/dist/lib/components/AcAlert.vue.d.ts +52 -0
  11. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +121 -0
  12. package/dist/lib/components/AcAppSwitcher.js +5 -0
  13. package/dist/lib/components/AcAppSwitcher.vue.d.ts +83 -0
  14. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +303 -0
  15. package/dist/lib/components/AcAvatar.js +5 -0
  16. package/dist/lib/components/AcAvatar.vue.d.ts +27 -0
  17. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +116 -0
  18. package/dist/lib/components/AcBadge.js +5 -0
  19. package/dist/lib/components/AcBadge.vue.d.ts +32 -0
  20. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +88 -0
  21. package/dist/lib/components/AcBanner.js +5 -0
  22. package/dist/lib/components/AcBanner.vue.d.ts +57 -0
  23. package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +114 -0
  24. package/dist/lib/components/AcBreadcrumb.js +5 -0
  25. package/dist/lib/components/AcBreadcrumb.vue.d.ts +25 -0
  26. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +88 -0
  27. package/dist/lib/components/AcButton.js +5 -0
  28. package/dist/lib/components/AcButton.vue.d.ts +49 -0
  29. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +103 -0
  30. package/dist/lib/components/AcButtons.js +5 -0
  31. package/dist/lib/components/AcButtons.vue.d.ts +31 -0
  32. package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +44 -0
  33. package/dist/lib/components/AcCard.js +5 -0
  34. package/dist/lib/components/AcCard.vue.d.ts +27 -0
  35. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +28 -0
  36. package/dist/lib/components/AcCellValue.js +5 -0
  37. package/dist/lib/components/AcCellValue.vue.d.ts +139 -0
  38. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +386 -0
  39. package/dist/lib/components/AcCheckBox.js +5 -0
  40. package/dist/lib/components/AcCheckBox.vue.d.ts +31 -0
  41. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +49 -0
  42. package/dist/lib/components/AcCheckRadio.js +5 -0
  43. package/dist/lib/components/AcCheckRadio.vue.d.ts +35 -0
  44. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +56 -0
  45. package/dist/lib/components/AcClusterSwitcher.js +5 -0
  46. package/dist/lib/components/AcClusterSwitcher.vue.d.ts +95 -0
  47. package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +416 -0
  48. package/dist/lib/components/AcCodeEditor.js +5 -0
  49. package/dist/lib/components/AcCodeEditor.vue.d.ts +88 -0
  50. package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +375 -0
  51. package/dist/lib/components/AcContentHeader.js +5 -0
  52. package/dist/lib/components/AcContentHeader.vue.d.ts +29 -0
  53. package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +31 -0
  54. package/dist/lib/components/AcContentLayout.js +5 -0
  55. package/dist/lib/components/AcContentLayout.vue.d.ts +21 -0
  56. package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +18 -0
  57. package/dist/lib/components/AcContentTable.js +5 -0
  58. package/dist/lib/components/AcContentTable.vue.d.ts +54 -0
  59. package/dist/lib/components/AcContentTable.vue_vue_type_script_setup_true_lang.js +67 -0
  60. package/dist/lib/components/AcDatePicker.js +5 -0
  61. package/dist/lib/components/AcDatePicker.vue.d.ts +88 -0
  62. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +794 -0
  63. package/dist/lib/components/AcDeleteModal.js +5 -0
  64. package/dist/lib/components/AcDeleteModal.vue.d.ts +51 -0
  65. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +110 -0
  66. package/dist/lib/components/AcDivider.js +5 -0
  67. package/dist/lib/components/AcDivider.vue.d.ts +25 -0
  68. package/dist/lib/components/AcDivider.vue_vue_type_script_setup_true_lang.js +39 -0
  69. package/dist/lib/components/AcDropdown.js +5 -0
  70. package/dist/lib/components/AcDropdown.vue.d.ts +45 -0
  71. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +152 -0
  72. package/dist/lib/components/AcDropdownDivider.js +5 -0
  73. package/dist/lib/components/AcDropdownDivider.vue.d.ts +9 -0
  74. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +20 -0
  75. package/dist/lib/components/AcDropdownItem.js +5 -0
  76. package/dist/lib/components/AcDropdownItem.vue.d.ts +50 -0
  77. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +86 -0
  78. package/dist/lib/components/AcEmptyState.js +5 -0
  79. package/dist/lib/components/AcEmptyState.vue.d.ts +42 -0
  80. package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +81 -0
  81. package/dist/lib/components/AcFeatureCard.js +5 -0
  82. package/dist/lib/components/AcFeatureCard.vue.d.ts +84 -0
  83. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +218 -0
  84. package/dist/lib/components/AcFileEditor.js +5 -0
  85. package/dist/lib/components/AcFileEditor.vue.d.ts +95 -0
  86. package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +556 -0
  87. package/dist/lib/components/AcFileUpload.js +5 -0
  88. package/dist/lib/components/AcFileUpload.vue.d.ts +67 -0
  89. package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +274 -0
  90. package/dist/lib/components/AcFontScale.js +5 -0
  91. package/dist/lib/components/AcFontScale.vue.d.ts +17 -0
  92. package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +65 -0
  93. package/dist/lib/components/AcForm.js +5 -0
  94. package/dist/lib/components/AcForm.vue.d.ts +31 -0
  95. package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +38 -0
  96. package/dist/lib/components/AcFormArray.js +5 -0
  97. package/dist/lib/components/AcFormArray.vue.d.ts +124 -0
  98. package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +485 -0
  99. package/dist/lib/components/AcFormFooter.js +5 -0
  100. package/dist/lib/components/AcFormFooter.vue.d.ts +48 -0
  101. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +86 -0
  102. package/dist/lib/components/AcFormSection.js +5 -0
  103. package/dist/lib/components/AcFormSection.vue.d.ts +32 -0
  104. package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +38 -0
  105. package/dist/lib/components/AcHeader.js +5 -0
  106. package/dist/lib/components/AcHeader.vue.d.ts +46 -0
  107. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +60 -0
  108. package/dist/lib/components/AcHeaderItem.js +5 -0
  109. package/dist/lib/components/AcHeaderItem.vue.d.ts +13 -0
  110. package/dist/lib/components/AcHeaderItem.vue_vue_type_script_setup_true_lang.js +14 -0
  111. package/dist/lib/components/AcHeaderItems.js +5 -0
  112. package/dist/lib/components/AcHeaderItems.vue.d.ts +13 -0
  113. package/dist/lib/components/AcHeaderItems.vue_vue_type_script_setup_true_lang.js +14 -0
  114. package/dist/lib/components/AcInfoTable.js +5 -0
  115. package/dist/lib/components/AcInfoTable.vue.d.ts +59 -0
  116. package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +125 -0
  117. package/dist/lib/components/AcInput.js +5 -0
  118. package/dist/lib/components/AcInput.vue.d.ts +68 -0
  119. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +143 -0
  120. package/dist/lib/components/AcKbd.js +5 -0
  121. package/dist/lib/components/AcKbd.vue.d.ts +25 -0
  122. package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +134 -0
  123. package/dist/lib/components/AcLogo.js +5 -0
  124. package/dist/lib/components/AcLogo.vue.d.ts +18 -0
  125. package/dist/lib/components/AcLogo.vue_vue_type_script_setup_true_lang.js +67 -0
  126. package/dist/lib/components/AcModal.js +5 -0
  127. package/dist/lib/components/AcModal.vue.d.ts +54 -0
  128. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +125 -0
  129. package/dist/lib/components/AcNavbar.js +5 -0
  130. package/dist/lib/components/AcNavbar.vue.d.ts +41 -0
  131. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +60 -0
  132. package/dist/lib/components/AcNavbarItem.js +5 -0
  133. package/dist/lib/components/AcNavbarItem.vue.d.ts +44 -0
  134. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +65 -0
  135. package/dist/lib/components/AcNotificationMenu.js +5 -0
  136. package/dist/lib/components/AcNotificationMenu.vue.d.ts +90 -0
  137. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +345 -0
  138. package/dist/lib/components/AcPage.js +5 -0
  139. package/dist/lib/components/AcPage.vue.d.ts +25 -0
  140. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +36 -0
  141. package/dist/lib/components/AcPagination.js +5 -0
  142. package/dist/lib/components/AcPagination.vue.d.ts +51 -0
  143. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +160 -0
  144. package/dist/lib/components/AcPreloader.js +5 -0
  145. package/dist/lib/components/AcPreloader.vue.d.ts +28 -0
  146. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +39 -0
  147. package/dist/lib/components/AcProgress.js +5 -0
  148. package/dist/lib/components/AcProgress.vue.d.ts +31 -0
  149. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +76 -0
  150. package/dist/lib/components/AcResourceCard.js +5 -0
  151. package/dist/lib/components/AcResourceCard.vue.d.ts +106 -0
  152. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +203 -0
  153. package/dist/lib/components/AcSearchBar.js +5 -0
  154. package/dist/lib/components/AcSearchBar.vue.d.ts +41 -0
  155. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +76 -0
  156. package/dist/lib/components/AcSectionContent.js +5 -0
  157. package/dist/lib/components/AcSectionContent.vue.d.ts +55 -0
  158. package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +74 -0
  159. package/dist/lib/components/AcSegmentedControl.js +5 -0
  160. package/dist/lib/components/AcSegmentedControl.vue.d.ts +46 -0
  161. package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +104 -0
  162. package/dist/lib/components/AcSelect.js +5 -0
  163. package/dist/lib/components/AcSelect.vue.d.ts +78 -0
  164. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +441 -0
  165. package/dist/lib/components/AcSidePanel.js +5 -0
  166. package/dist/lib/components/AcSidePanel.vue.d.ts +57 -0
  167. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +128 -0
  168. package/dist/lib/components/AcSideTabs.js +5 -0
  169. package/dist/lib/components/AcSideTabs.vue.d.ts +93 -0
  170. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +373 -0
  171. package/dist/lib/components/AcSidebar.js +5 -0
  172. package/dist/lib/components/AcSidebar.vue.d.ts +63 -0
  173. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +221 -0
  174. package/dist/lib/components/AcSidebarItem.js +5 -0
  175. package/dist/lib/components/AcSidebarItem.vue.d.ts +55 -0
  176. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +155 -0
  177. package/dist/lib/components/AcSidebarSection.js +5 -0
  178. package/dist/lib/components/AcSidebarSection.vue.d.ts +32 -0
  179. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +48 -0
  180. package/dist/lib/components/AcSkeleton.js +5 -0
  181. package/dist/lib/components/AcSkeleton.vue.d.ts +27 -0
  182. package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +142 -0
  183. package/dist/lib/components/AcSlider.js +5 -0
  184. package/dist/lib/components/AcSlider.vue.d.ts +72 -0
  185. package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +327 -0
  186. package/dist/lib/components/AcSpinner.js +5 -0
  187. package/dist/lib/components/AcSpinner.vue.d.ts +12 -0
  188. package/dist/lib/components/AcSpinner.vue_vue_type_script_setup_true_lang.js +45 -0
  189. package/dist/lib/components/AcStatCard.js +5 -0
  190. package/dist/lib/components/AcStatCard.vue.d.ts +84 -0
  191. package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +225 -0
  192. package/dist/lib/components/AcStatusBar.js +5 -0
  193. package/dist/lib/components/AcStatusBar.vue.d.ts +66 -0
  194. package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +145 -0
  195. package/dist/lib/components/AcSteps.js +5 -0
  196. package/dist/lib/components/AcSteps.vue.d.ts +28 -0
  197. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +91 -0
  198. package/dist/lib/components/AcSwitch.js +5 -0
  199. package/dist/lib/components/AcSwitch.vue.d.ts +44 -0
  200. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +67 -0
  201. package/dist/lib/components/AcTable.js +5 -0
  202. package/dist/lib/components/AcTable.vue.d.ts +98 -0
  203. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +272 -0
  204. package/dist/lib/components/AcTabs.js +5 -0
  205. package/dist/lib/components/AcTabs.vue.d.ts +40 -0
  206. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +72 -0
  207. package/dist/lib/components/AcTag.js +5 -0
  208. package/dist/lib/components/AcTag.vue.d.ts +41 -0
  209. package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +99 -0
  210. package/dist/lib/components/AcTextarea.js +5 -0
  211. package/dist/lib/components/AcTextarea.vue.d.ts +53 -0
  212. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +120 -0
  213. package/dist/lib/components/AcThemeMode.js +5 -0
  214. package/dist/lib/components/AcThemeMode.vue.d.ts +17 -0
  215. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +60 -0
  216. package/dist/lib/components/AcToaster.js +5 -0
  217. package/dist/lib/components/AcToaster.vue.d.ts +15 -0
  218. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +166 -0
  219. package/dist/lib/components/AcTooltip.js +5 -0
  220. package/dist/lib/components/AcTooltip.vue.d.ts +30 -0
  221. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +117 -0
  222. package/dist/lib/components/AcUsageCard.js +5 -0
  223. package/dist/lib/components/AcUsageCard.vue.d.ts +85 -0
  224. package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +230 -0
  225. package/dist/lib/components/AcUserMenu.js +5 -0
  226. package/dist/lib/components/AcUserMenu.vue.d.ts +77 -0
  227. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +258 -0
  228. package/dist/lib/components/index.d.ts +76 -0
  229. package/dist/lib/components/types.d.ts +16 -0
  230. package/dist/lib/composables/useBrandColor.d.ts +53 -0
  231. package/dist/lib/composables/useBrandColor.js +148 -0
  232. package/dist/lib/composables/useColorMode.d.ts +12 -0
  233. package/dist/lib/composables/useColorMode.js +40 -0
  234. package/dist/lib/composables/useFontScale.d.ts +16 -0
  235. package/dist/lib/composables/useFontScale.js +43 -0
  236. package/dist/lib/composables/useToast.d.ts +68 -0
  237. package/dist/lib/composables/useToast.js +36 -0
  238. package/dist/lib/editor/index.d.ts +4 -0
  239. package/dist/lib/editor/index.js +3 -0
  240. package/dist/lib/editor/theme.d.ts +3 -0
  241. package/dist/lib/editor/theme.js +309 -0
  242. package/dist/lib/editor/validate.d.ts +19 -0
  243. package/dist/lib/editor/validate.js +127 -0
  244. package/dist/lib/index.d.ts +29 -0
  245. package/dist/lib/index.js +78 -0
  246. package/dist/lib/theme.css +556 -0
  247. package/package.json +82 -4
@@ -0,0 +1,56 @@
1
+ import { Fragment as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, mergeModels as a, normalizeClass as o, openBlock as s, renderList as c, toDisplayString as l, unref as u, useId as d, useModel as f, vModelRadio as p, withDirectives as m } from "vue";
2
+ //#region src/lib/components/AcCheckRadio.vue?vue&type=script&setup=true&lang.ts
3
+ var h = {
4
+ role: "radiogroup",
5
+ "data-ac-ds": "",
6
+ "data-testid": "ac-check-radio"
7
+ }, g = ["for"], _ = [
8
+ "id",
9
+ "name",
10
+ "value",
11
+ "disabled"
12
+ ], v = { class: "flex flex-col" }, y = ["title"], b = {
13
+ key: 0,
14
+ class: "mt-2 text-xs text-red-30"
15
+ }, x = /*@__PURE__*/ i({
16
+ __name: "AcCheckRadio",
17
+ props: /*@__PURE__*/ a({
18
+ options: {},
19
+ name: { default: "radio" },
20
+ row: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ cards: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ errorMsg: { default: "" }
29
+ }, {
30
+ modelValue: {},
31
+ modelModifiers: {}
32
+ }),
33
+ emits: ["update:modelValue"],
34
+ setup(i) {
35
+ let a = f(i, "modelValue"), x = d();
36
+ return (d, f) => (s(), n("div", h, [r("div", { class: o(i.cards ? "grid gap-3 sm:grid-cols-2" : i.row ? "flex flex-row flex-wrap gap-x-6 gap-y-2" : "flex flex-col gap-2.5") }, [(s(!0), n(e, null, c(i.options, (e, c) => (s(), n("label", {
37
+ key: e.label,
38
+ for: `${u(x)}-${c}`,
39
+ class: o(["group flex cursor-pointer gap-2.5 text-base text-heading", [e.disabled && "cursor-not-allowed opacity-50", i.cards && "rounded-10 border border-border bg-surface p-4 shadow-xs transition-[border-color,box-shadow,background-color] duration-150 hover:border-border-dark has-checked:border-primary has-checked:bg-primary-97/60 has-checked:shadow-[0_0_0_1px_var(--color-primary)] has-focus-visible:shadow-[0_0_0_3px_var(--color-ring)]"]])
40
+ }, [m(r("input", {
41
+ id: `${u(x)}-${c}`,
42
+ "onUpdate:modelValue": f[0] ||= (e) => a.value = e,
43
+ type: "radio",
44
+ name: `${i.name}-${u(x)}`,
45
+ value: e.value,
46
+ disabled: e.disabled,
47
+ class: "mt-0.5 size-4 shrink-0 cursor-pointer appearance-none rounded-full border border-border-dark bg-surface shadow-xs transition-[border-color,border-width] duration-150 group-hover:border-slate-60 checked:border-[5px] checked:border-primary focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed"
48
+ }, null, 8, _), [[p, a.value]]), r("span", v, [r("span", { class: o(i.cards && "font-medium") }, l(e.label), 3), i.cards && e.description ? (s(), n("span", {
49
+ key: 0,
50
+ class: "mt-0.5 line-clamp-2 text-xs text-muted",
51
+ title: e.description
52
+ }, l(e.description), 9, y)) : t("", !0)])], 10, g))), 128))], 2), i.errorMsg ? (s(), n("p", b, l(i.errorMsg), 1)) : t("", !0)]));
53
+ }
54
+ });
55
+ //#endregion
56
+ export { x as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcClusterSwitcher.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,95 @@
1
+ export interface SwitchCluster {
2
+ /** Cluster name; the `v-model` value. */
3
+ name: string;
4
+ /** Name shown in the list. Falls back to `name`. */
5
+ displayName?: string;
6
+ /** Cloud provider, e.g. `AWS`, `GKE`, `Akamai`, `Generic`. Picks the provider icon. */
7
+ provider?: string;
8
+ /** Region or zone, shown under the name. */
9
+ location?: string;
10
+ /** Cluster status such as `Active`, `NotReady`, `Lost` or `NotImported`. Sets the status dot. */
11
+ status?: string;
12
+ /** Shows the cluster but blocks choosing it, e.g. while it isn't `Active`. */
13
+ disabled?: boolean;
14
+ /** Old vue-multiselect name for `disabled`. Still honoured. */
15
+ $isDisabled?: boolean;
16
+ }
17
+ export interface Props {
18
+ /** The clusters to choose from. */
19
+ clusterOptions?: SwitchCluster[];
20
+ /** Shows only the provider icon, for the collapsed sidebar rail. Inside `AcSidebar` it follows the rail on its own. */
21
+ sidebarCollapsed?: boolean;
22
+ /** Shows a skeleton while the cluster list loads. Old `ClusterSwitcherLoader`. */
23
+ loading?: boolean;
24
+ /** Blocks opening the list, e.g. on pages where the cluster can't change. */
25
+ disabled?: boolean;
26
+ /** Adds a search box above the list. */
27
+ searchable?: boolean;
28
+ /** Placeholder of the search box. */
29
+ searchPlaceholder?: string;
30
+ /** Text in the trigger when no cluster is selected. */
31
+ placeholder?: string;
32
+ /** Text of the footer action. Pass an empty string to hide it. Emits `import`. */
33
+ importLabel?: string;
34
+ /** Makes the footer action a link, e.g. to the import-cluster page. `import` is emitted either way. */
35
+ importUrl?: string;
36
+ /** Base URL of the provider PNGs: `${providerIconBase}/${provider}.png`. Pass an empty string (offline installers) to use a generic icon. */
37
+ providerIconBase?: string;
38
+ }
39
+ type __VLS_Props = Props;
40
+ type __VLS_Slots = {
41
+ /** Custom row content. */
42
+ option?: (props: {
43
+ cluster: SwitchCluster;
44
+ selected: boolean;
45
+ active: boolean;
46
+ }) => unknown;
47
+ /** Replaces the footer action, e.g. with several links. Receives `close`. */
48
+ footer?: (props: {
49
+ close: () => void;
50
+ }) => unknown;
51
+ /** Shown when no cluster matches the search, or the list is empty. */
52
+ empty?: (props: {
53
+ query: string;
54
+ }) => unknown;
55
+ };
56
+ type __VLS_ModelProps = {
57
+ /** Name of the active cluster. */
58
+ modelValue?: string;
59
+ /** Whether the list is open. Bind with `v-model:open`. */
60
+ "open"?: boolean;
61
+ };
62
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
63
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
64
+ /** Moves focus to the trigger. */
65
+ focus: () => void | undefined;
66
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
67
+ select: (cluster: SwitchCluster) => any;
68
+ "update:modelValue": (value: string) => any;
69
+ "update:open": (value: boolean) => any;
70
+ import: () => any;
71
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
72
+ onSelect?: ((cluster: SwitchCluster) => any) | undefined;
73
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
74
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
75
+ onImport?: (() => any) | undefined;
76
+ }>, {
77
+ disabled: boolean;
78
+ loading: boolean;
79
+ placeholder: string;
80
+ searchable: boolean;
81
+ clusterOptions: SwitchCluster[];
82
+ sidebarCollapsed: boolean;
83
+ searchPlaceholder: string;
84
+ importLabel: string;
85
+ importUrl: string;
86
+ providerIconBase: string;
87
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
88
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
89
+ declare const _default: typeof __VLS_export;
90
+ export default _default;
91
+ type __VLS_WithSlots<T, S> = T & {
92
+ new (): {
93
+ $slots: S;
94
+ };
95
+ };
@@ -0,0 +1,416 @@
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";
4
+ //#region src/lib/components/AcClusterSwitcher.vue?vue&type=script&setup=true&lang.ts
5
+ var ge = [
6
+ "id",
7
+ "aria-expanded",
8
+ "aria-controls",
9
+ "aria-label",
10
+ "title",
11
+ "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",
14
+ "aria-hidden": "true"
15
+ }, ve = ["src"], ye = { class: "min-w-0 flex-1" }, be = {
16
+ key: 0,
17
+ class: "block truncate text-sm text-muted"
18
+ }, xe = {
19
+ key: 0,
20
+ class: "border-b border-border-light p-1.5"
21
+ }, Se = { class: "relative" }, Ce = [
22
+ "aria-activedescendant",
23
+ "aria-label",
24
+ "placeholder"
25
+ ], we = ["tabindex", "aria-activedescendant"], Te = [
26
+ "id",
27
+ "aria-selected",
28
+ "aria-disabled",
29
+ "onMouseenter",
30
+ "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",
33
+ "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
+ key: 1,
36
+ "aria-hidden": "true"
37
+ }, je = { class: "truncate" }, Me = {
38
+ key: 0,
39
+ role: "presentation",
40
+ class: "px-3 py-6 text-center text-base text-muted"
41
+ }, Ne = {
42
+ key: 1,
43
+ class: "border-t border-border-light p-1"
44
+ }, x = /*@__PURE__*/ d({
45
+ __name: "AcClusterSwitcher",
46
+ props: /*@__PURE__*/ p({
47
+ clusterOptions: { default: () => [] },
48
+ sidebarCollapsed: {
49
+ type: Boolean,
50
+ default: void 0
51
+ },
52
+ loading: {
53
+ type: Boolean,
54
+ default: !1
55
+ },
56
+ disabled: {
57
+ type: Boolean,
58
+ default: !1
59
+ },
60
+ searchable: {
61
+ type: Boolean,
62
+ default: !0
63
+ },
64
+ searchPlaceholder: { default: "Search clusters" },
65
+ placeholder: { default: "Select a cluster" },
66
+ importLabel: { default: "Import cluster" },
67
+ importUrl: { default: "" },
68
+ providerIconBase: { default: "https://cdn.appscode.com/images/cloud-provider-icons" }
69
+ }, {
70
+ modelValue: { default: "" },
71
+ modelModifiers: {},
72
+ open: {
73
+ type: Boolean,
74
+ default: !1
75
+ },
76
+ openModifiers: {}
77
+ }),
78
+ 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
+ ]
110
+ }, E = {
111
+ success: "bg-success",
112
+ danger: "bg-danger",
113
+ 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",
119
+ 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(() => {
121
+ let e = P.value.trim().toLowerCase();
122
+ return e ? S.clusterOptions.filter((t) => [
123
+ t.name,
124
+ t.displayName,
125
+ t.provider,
126
+ t.location
127
+ ].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");
129
+ function U(e) {
130
+ return e.displayName || e.name;
131
+ }
132
+ function W(e) {
133
+ return !!(e.disabled || e.$isDisabled);
134
+ }
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";
144
+ }
145
+ function K(e) {
146
+ return !S.providerIconBase || !e || I.value.has(e) ? "" : `${S.providerIconBase}/${e}.png`;
147
+ }
148
+ function Re(e) {
149
+ e && (I.value = new Set(I.value).add(e));
150
+ }
151
+ function q(e) {
152
+ return `${O}-opt-${e}`;
153
+ }
154
+ function J(e = 0, t = 1) {
155
+ let n = H.value;
156
+ for (let r = e; r >= 0 && r < n.length; r += t) if (!W(n[r])) return r;
157
+ return -1;
158
+ }
159
+ function ze(e) {
160
+ let t = H.value;
161
+ if (!t.length) return;
162
+ let n = F.value;
163
+ for (let r = 0; r < t.length && (n = (n + e + t.length) % t.length, W(t[n])); r++);
164
+ F.value = n, Y();
165
+ }
166
+ function Y() {
167
+ m(() => N.value?.querySelector(`#${CSS.escape(q(F.value))}`)?.scrollIntoView({ block: "nearest" }));
168
+ }
169
+ function X() {
170
+ let e = j.value;
171
+ if (!e || !M.value) return;
172
+ let t = e.getBoundingClientRect(), n = Math.min(Math.max(z.value ? 288 : t.width, 288), window.innerWidth - 16);
173
+ M.value.style.width = `${n}px`;
174
+ let r = M.value.offsetHeight;
175
+ if (z.value) {
176
+ let e = t.top + r <= window.innerHeight - 8;
177
+ R.value = e, L.value = {
178
+ ...e ? { top: `${t.top}px` } : { bottom: "8px" },
179
+ left: `${Math.min(t.right + 6, window.innerWidth - n - 8)}px`,
180
+ width: `${n}px`,
181
+ maxHeight: `${window.innerHeight - 16}px`
182
+ };
183
+ return;
184
+ }
185
+ let i = window.innerHeight - t.bottom - 6 - 8, a = t.top - 6 - 8, o = i < r && a > i;
186
+ R.value = !o, L.value = {
187
+ [o ? "bottom" : "top"]: `${o ? window.innerHeight - t.top + 6 : t.bottom + 6}px`,
188
+ left: `${Math.max(8, Math.min(t.left, window.innerWidth - n - 8))}px`,
189
+ width: `${n}px`,
190
+ maxHeight: `${Math.max(o ? a : i, 200)}px`
191
+ };
192
+ }
193
+ function Z() {
194
+ S.disabled || S.loading || (w.value = !0);
195
+ }
196
+ function Q(e = !0) {
197
+ w.value && (w.value = !1, e && j.value?.focus());
198
+ }
199
+ function Be(e) {
200
+ W(e) || (C.value = e.name, T("select", e), Q());
201
+ }
202
+ function Ve() {
203
+ T("import"), Q(!1);
204
+ }
205
+ function He(e) {
206
+ !w.value && ["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(), Z());
207
+ }
208
+ function Ue(e) {
209
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") e.preventDefault(), ze(e.key === "ArrowDown" ? 1 : -1);
210
+ 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
+ else if (e.key === "Enter" || e.key === " " && !S.searchable) {
212
+ e.preventDefault();
213
+ let t = H.value[F.value];
214
+ t && Be(t);
215
+ }
216
+ }
217
+ function We(e) {
218
+ e.key === "Escape" ? (e.preventDefault(), Q()) : e.key === "Tab" && Ge(e);
219
+ }
220
+ function Ge(e) {
221
+ 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();
223
+ }
224
+ function Ke(e) {
225
+ let t = e.target;
226
+ j.value?.contains(t) || M.value?.contains(t) || Q(!1);
227
+ }
228
+ function qe(e) {
229
+ e && M.value?.contains(e.target) || X();
230
+ }
231
+ function $(e) {
232
+ let t = e ? "addEventListener" : "removeEventListener";
233
+ document[t]("pointerdown", Ke, !0), window[t]("scroll", qe, !0), window[t]("resize", qe);
234
+ }
235
+ return se(w, async (e) => {
236
+ if ($(e), !e) return;
237
+ P.value = "";
238
+ 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, () => {
241
+ F.value = J(), m(X);
242
+ }), te(() => $(!1)), p({ focus: () => j.value?.focus() }), (i, f) => (g(), s("div", {
243
+ class: h(["min-w-0", z.value ? "inline-flex" : "flex w-full"]),
244
+ "data-ac-ds": "",
245
+ "data-testid": "ac-cluster-switcher"
246
+ }, [d.loading ? (g(), s("div", {
247
+ key: 0,
248
+ role: "status",
249
+ "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"]]),
251
+ "data-ac-ds": "",
252
+ "data-testid": "ac-cluster-switcher-loading"
253
+ }, [u(e, {
254
+ shape: "rect",
255
+ width: "28px",
256
+ height: "28px",
257
+ label: "",
258
+ class: "shrink-0"
259
+ }), z.value ? o("", !0) : (g(), a(e, {
260
+ key: 0,
261
+ shape: "text",
262
+ width: "60%",
263
+ height: "10px",
264
+ label: ""
265
+ }))], 2)) : (g(), s("button", {
266
+ key: 1,
267
+ id: `${b(O)}-trigger`,
268
+ ref_key: "trigger",
269
+ ref: j,
270
+ type: "button",
271
+ "aria-haspopup": "dialog",
272
+ "aria-expanded": w.value,
273
+ "aria-controls": w.value ? k : void 0,
274
+ "aria-label": Le.value,
275
+ 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")
281
+ ]]),
282
+ "data-ac-ds": "",
283
+ "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", {
287
+ key: 0,
288
+ src: K(V.value?.provider),
289
+ alt: "",
290
+ class: "size-5 object-contain",
291
+ onError: f[0] ||= (e) => Re(V.value?.provider)
292
+ }, null, 40, ve)) : (g(), a(b(pe), {
293
+ key: 1,
294
+ class: "size-4 text-muted"
295
+ })), V.value ? (g(), s("span", {
296
+ key: 2,
297
+ 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), {
299
+ class: "size-4 shrink-0 text-muted transition-colors group-hover:text-heading",
300
+ "aria-hidden": "true"
301
+ })], 64))], 42, ge)), (g(), a(n, { to: "body" }, [u(r, {
302
+ "enter-active-class": "transition duration-150 ease-out",
303
+ "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
+ "leave-active-class": "transition duration-100 ease-in",
305
+ "leave-to-class": "opacity-0"
306
+ }, {
307
+ default: ce(() => [w.value ? (g(), s("div", {
308
+ key: 0,
309
+ id: k,
310
+ ref_key: "panel",
311
+ ref: M,
312
+ role: "dialog",
313
+ "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),
316
+ "data-ac-ds": "",
317
+ "data-testid": "ac-cluster-switcher-panel",
318
+ onKeydown: We
319
+ }, [
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",
322
+ "aria-hidden": "true"
323
+ }), le(c("input", {
324
+ ref_key: "searchInput",
325
+ ref: Ie,
326
+ "onUpdate:modelValue": f[2] ||= (e) => P.value = e,
327
+ type: "text",
328
+ role: "combobox",
329
+ "aria-autocomplete": "list",
330
+ "aria-expanded": "true",
331
+ "aria-controls": A,
332
+ "aria-activedescendant": F.value >= 0 ? q(F.value) : void 0,
333
+ "aria-label": d.searchPlaceholder,
334
+ placeholder: d.searchPlaceholder,
335
+ autocomplete: "off",
336
+ 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",
338
+ "data-ac-ds": "",
339
+ "data-testid": "ac-cluster-switcher-search",
340
+ onKeydown: Ue
341
+ }, null, 40, Ce), [[oe, P.value]])])])) : o("", !0),
342
+ c("ul", {
343
+ id: A,
344
+ ref_key: "listEl",
345
+ ref: N,
346
+ role: "listbox",
347
+ "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,
355
+ 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"]]),
359
+ "data-ac-ds": "",
360
+ "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
368
+ }, () => [
369
+ c("span", Ee, [K(e.provider) ? (g(), s("img", {
370
+ key: 0,
371
+ src: K(e.provider),
372
+ alt: "",
373
+ class: "size-5 object-contain",
374
+ onError: (t) => Re(e.provider)
375
+ }, null, 40, De)) : (g(), a(b(pe), {
376
+ key: 1,
377
+ class: "size-4 text-muted"
378
+ }))]),
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", {
381
+ 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)]]),
385
+ "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)
389
+ ])]),
390
+ e.name === C.value ? (g(), a(b(de), {
391
+ key: 0,
392
+ class: "size-4 shrink-0 text-primary",
393
+ "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",
400
+ "data-ac-ds": "",
401
+ "data-testid": "ac-cluster-switcher-import",
402
+ onClick: Ve
403
+ }, {
404
+ default: ce(() => [u(b(me), {
405
+ class: "size-4 shrink-0 text-muted",
406
+ "aria-hidden": "true"
407
+ }), l(" " + y(d.importLabel), 1)]),
408
+ _: 1
409
+ }, 8, ["href", "type"]))])])) : o("", !0)
410
+ ], 38)) : o("", !0)]),
411
+ _: 3
412
+ }, 8, ["enter-from-class"])]))], 2));
413
+ }
414
+ });
415
+ //#endregion
416
+ export { x as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcCodeEditor.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcCodeEditor.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,88 @@
1
+ import { EditorView } from "@codemirror/view";
2
+ import type { EditorLanguage, EditorProblem } from "../editor/validate";
3
+ export interface Props {
4
+ /** `yaml`, `json`, `shell` for install scripts, or `text` for plain text. */
5
+ language?: EditorLanguage;
6
+ /** The saved version to compare against. Adds an Edit / Changes switch; with `readonly` only the diff shows. */
7
+ original?: string;
8
+ /** Text can be selected, searched and copied but not changed. */
9
+ readonly?: boolean;
10
+ /** Any CSS height, e.g. `320px` or `60vh`. `auto` grows with the content up to `max-height`. */
11
+ height?: string;
12
+ /** Where an `auto` editor stops growing and scrolls. */
13
+ maxHeight?: string;
14
+ /** JSON Schema that YAML or JSON is checked against, e.g. a CRD's `openAPIV3Schema`. */
15
+ schema?: object;
16
+ /** Checks YAML and JSON as you type and underlines problems. Turn off for templates that aren't valid until rendered. */
17
+ validate?: boolean;
18
+ /** Wraps long lines instead of scrolling sideways. */
19
+ wrap?: boolean;
20
+ /** Shows the line-number and fold gutter. */
21
+ lineNumbers?: boolean;
22
+ /** Text shown while the editor is empty. */
23
+ placeholder?: string;
24
+ /** Header text, usually the file name. */
25
+ title?: string;
26
+ /** Adds a copy button to the header. */
27
+ copyable?: boolean;
28
+ /** `unified` shows changes in one column; `split` puts the saved version on the left. */
29
+ diffLayout?: "unified" | "split";
30
+ /** Accessible name for the text area when there's no `title`, e.g. "Custom values". */
31
+ label?: string;
32
+ /** Draws the border and rounded corners. Turn off inside a card or modal body that has its own. */
33
+ bordered?: boolean;
34
+ }
35
+ type __VLS_Props = Props;
36
+ type __VLS_Slots = {
37
+ /** Buttons at the right of the header, e.g. a YAML/JSON switch or Reset. */
38
+ actions?: () => unknown;
39
+ };
40
+ declare function focus(): void;
41
+ type __VLS_ModelProps = {
42
+ modelValue?: string;
43
+ /** Which pane shows when `original` is set: `edit` or `changes`. */
44
+ "view"?: "edit" | "changes";
45
+ };
46
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
47
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
48
+ /** Moves the cursor into the editor. */
49
+ focus: typeof focus;
50
+ /** The CodeMirror `EditorView`, for anything the props don't cover. */
51
+ editor: import("vue").ShallowRef<EditorView | undefined, EditorView | undefined>;
52
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
53
+ "update:modelValue": (value: string) => any;
54
+ blur: () => any;
55
+ focus: () => any;
56
+ validate: (problems: EditorProblem[]) => any;
57
+ "update:view": (value: "edit" | "changes") => any;
58
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
59
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
60
+ onBlur?: (() => any) | undefined;
61
+ onFocus?: (() => any) | undefined;
62
+ onValidate?: ((problems: EditorProblem[]) => any) | undefined;
63
+ "onUpdate:view"?: ((value: "edit" | "changes") => any) | undefined;
64
+ }>, {
65
+ bordered: boolean;
66
+ label: string;
67
+ title: string;
68
+ height: string;
69
+ maxHeight: string;
70
+ wrap: boolean;
71
+ schema: object;
72
+ language: EditorLanguage;
73
+ original: string;
74
+ readonly: boolean;
75
+ validate: boolean;
76
+ lineNumbers: boolean;
77
+ placeholder: string;
78
+ copyable: boolean;
79
+ diffLayout: "unified" | "split";
80
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
81
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
82
+ declare const _default: typeof __VLS_export;
83
+ export default _default;
84
+ type __VLS_WithSlots<T, S> = T & {
85
+ new (): {
86
+ $slots: S;
87
+ };
88
+ };