@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,160 @@
1
+ import e from "./AcSelect.js";
2
+ import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l, normalizeClass as u, openBlock as d, renderList as f, toDisplayString as p, unref as m, useModel as h, watch as g } from "vue";
3
+ import { ChevronLeft as _, ChevronRight as v } from "@lucide/vue";
4
+ //#region src/lib/components/AcPagination.vue?vue&type=script&setup=true&lang.ts
5
+ var y = {
6
+ class: "flex flex-wrap items-center justify-between gap-x-6 gap-y-3 text-base",
7
+ "data-ac-ds": "",
8
+ "data-testid": "ac-pagination"
9
+ }, b = { class: "flex min-w-0 flex-wrap items-center gap-x-5 gap-y-2" }, x = {
10
+ key: 0,
11
+ class: "flex items-center gap-2"
12
+ }, S = { class: "w-18" }, C = {
13
+ class: "text-xs whitespace-nowrap text-muted tabular-nums",
14
+ "aria-live": "polite"
15
+ }, w = {
16
+ "aria-label": "Pagination",
17
+ class: "ml-auto"
18
+ }, T = { class: "flex items-center gap-1" }, E = ["disabled"], D = { class: "px-2 text-xs whitespace-nowrap text-body tabular-nums" }, O = { class: "font-medium text-heading" }, k = [
19
+ "aria-label",
20
+ "aria-current",
21
+ "disabled",
22
+ "onClick"
23
+ ], A = ["disabled"], j = /*@__PURE__*/ c({
24
+ __name: "AcPagination",
25
+ props: /*@__PURE__*/ l({
26
+ total: {},
27
+ pageSizes: { default: () => [
28
+ 10,
29
+ 20,
30
+ 50,
31
+ 100
32
+ ] },
33
+ hidePageSize: {
34
+ type: Boolean,
35
+ default: !1
36
+ },
37
+ siblings: { default: 1 },
38
+ compact: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ itemLabel: { default: "" },
43
+ disabled: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ size: { default: "normal" }
48
+ }, {
49
+ page: { default: 1 },
50
+ pageModifiers: {},
51
+ pageSize: { default: 10 },
52
+ pageSizeModifiers: {}
53
+ }),
54
+ emits: /*@__PURE__*/ l(["range"], ["update:page", "update:pageSize"]),
55
+ setup(c, { emit: l }) {
56
+ let j = c, M = h(c, "page"), N = h(c, "pageSize"), P = l, F = n(() => j.size === "small" ? "size-7" : "size-8"), I = n(() => j.size === "small" ? "h-7 min-w-7 text-sm" : "h-8 min-w-8 text-base"), L = n(() => Math.max(1, Math.ceil(j.total / Math.max(1, N.value)))), R = n(() => Math.min(Math.max(1, M.value), L.value)), z = n(() => ({
57
+ start: Math.min((R.value - 1) * N.value, j.total),
58
+ end: Math.min(R.value * N.value, j.total)
59
+ })), B = n(() => {
60
+ let e = j.itemLabel ? ` ${j.itemLabel}` : "";
61
+ return j.total ? `Showing ${z.value.start + 1}–${z.value.end} of ${j.total}${e}` : `0${e || " items"}`;
62
+ }), V = n(() => (j.pageSizes.includes(N.value) ? j.pageSizes : [...j.pageSizes, N.value].sort((e, t) => e - t)).map((e) => ({
63
+ value: e,
64
+ label: String(e)
65
+ }))), H = n(() => {
66
+ let e = L.value, t = R.value, n = Math.max(0, j.siblings);
67
+ if (e <= 5 + 2 * n) return Array.from({ length: e }, (e, t) => t + 1);
68
+ let r = Math.max(t - n, 1), i = Math.min(t + n, e), a = r > 3, o = i < e - 2, s = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n);
69
+ return a ? o ? [
70
+ 1,
71
+ "start-ellipsis",
72
+ ...s(r, i),
73
+ "end-ellipsis",
74
+ e
75
+ ] : [
76
+ 1,
77
+ "start-ellipsis",
78
+ ...s(e - (2 + 2 * n), e)
79
+ ] : [
80
+ ...s(1, 3 + 2 * n),
81
+ "end-ellipsis",
82
+ e
83
+ ];
84
+ });
85
+ function U(e) {
86
+ j.disabled || (M.value = Math.min(Math.max(1, e), L.value));
87
+ }
88
+ function W(e) {
89
+ let t = Number(e);
90
+ if (!t || t === N.value) return;
91
+ let n = z.value.start;
92
+ N.value = t, M.value = Math.floor(n / t) + 1;
93
+ }
94
+ return g(L, (e) => {
95
+ M.value > e && (M.value = e);
96
+ }), g(z, (e) => P("range", { ...e }), { immediate: !0 }), (n, l) => (d(), i("div", y, [a("div", b, [c.hidePageSize ? r("", !0) : (d(), i("div", x, [l[2] ||= a("span", {
97
+ class: "text-xs whitespace-nowrap text-muted",
98
+ "aria-hidden": "true"
99
+ }, "Rows per page", -1), a("div", S, [s(e, {
100
+ "model-value": N.value,
101
+ options: V.value,
102
+ size: "compact",
103
+ placeholder: "Rows per page",
104
+ disabled: c.disabled,
105
+ "onUpdate:modelValue": W
106
+ }, null, 8, [
107
+ "model-value",
108
+ "options",
109
+ "disabled"
110
+ ])])])), a("p", C, p(B.value), 1)]), a("nav", w, [a("ul", T, [
111
+ a("li", null, [a("button", {
112
+ type: "button",
113
+ class: u(["inline-flex cursor-pointer items-center justify-center rounded-6 border border-border bg-surface text-body shadow-xs transition hover:border-border-dark hover:bg-surface-muted hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40 disabled:shadow-none disabled:hover:bg-surface", F.value]),
114
+ "aria-label": "Previous page",
115
+ disabled: c.disabled || R.value <= 1,
116
+ "data-ac-ds": "",
117
+ "data-testid": "ac-pagination-prev",
118
+ onClick: l[0] ||= (e) => U(R.value - 1)
119
+ }, [s(m(_), {
120
+ class: "size-4",
121
+ "aria-hidden": "true"
122
+ })], 10, E)]),
123
+ a("li", { class: u(c.compact ? "flex" : "flex sm:hidden") }, [a("span", D, [
124
+ l[3] ||= a("span", { class: "sr-only" }, "Page ", -1),
125
+ a("span", O, p(R.value), 1),
126
+ o(" / " + p(L.value), 1)
127
+ ])], 2),
128
+ c.compact ? r("", !0) : (d(!0), i(t, { key: 0 }, f(H.value, (e) => (d(), i("li", {
129
+ key: e,
130
+ class: "hidden sm:flex"
131
+ }, [typeof e == "string" ? (d(), i("span", {
132
+ key: 0,
133
+ class: u(["inline-flex w-6 items-end justify-center text-xs text-muted", c.size === "small" ? "h-7 pb-1.5" : "h-8 pb-2"]),
134
+ "aria-hidden": "true"
135
+ }, "…", 2)) : (d(), i("button", {
136
+ key: 1,
137
+ type: "button",
138
+ class: u(["inline-flex cursor-pointer items-center justify-center rounded-6 border px-2 font-medium tabular-nums transition focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40", [I.value, e === R.value ? "border-primary bg-primary-95 text-primary-20" : "border-transparent text-body hover:bg-surface-sunken hover:text-heading"]]),
139
+ "aria-label": `Page ${e}`,
140
+ "aria-current": e === R.value ? "page" : void 0,
141
+ disabled: c.disabled,
142
+ onClick: (t) => U(e)
143
+ }, p(e), 11, k))]))), 128)),
144
+ a("li", null, [a("button", {
145
+ type: "button",
146
+ class: u(["inline-flex cursor-pointer items-center justify-center rounded-6 border border-border bg-surface text-body shadow-xs transition hover:border-border-dark hover:bg-surface-muted hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40 disabled:shadow-none disabled:hover:bg-surface", F.value]),
147
+ "aria-label": "Next page",
148
+ disabled: c.disabled || R.value >= L.value,
149
+ "data-ac-ds": "",
150
+ "data-testid": "ac-pagination-next",
151
+ onClick: l[1] ||= (e) => U(R.value + 1)
152
+ }, [s(m(v), {
153
+ class: "size-4",
154
+ "aria-hidden": "true"
155
+ })], 10, A)])
156
+ ])])]));
157
+ }
158
+ });
159
+ //#endregion
160
+ export { j as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcPreloader.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcPreloader.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,28 @@
1
+ export interface Props {
2
+ /** Text under the spinner, e.g. "Fetching resource layout". Also announced to screen readers. */
3
+ message?: string;
4
+ /** Shows the spinner. Turn off to show the message alone. */
5
+ showSpinner?: boolean;
6
+ /** Covers the whole viewport on a plain surface, for app start-up and sign-in checks. */
7
+ fullPage?: boolean;
8
+ /** CSS minimum height when not `fullPage`. The preloader also grows to fill its container. */
9
+ minHeight?: string;
10
+ }
11
+ type __VLS_Slots = {
12
+ /** Replaces the message, e.g. with a message and a Cancel button. */
13
+ default?: () => unknown;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
16
+ message: string;
17
+ showSpinner: boolean;
18
+ fullPage: boolean;
19
+ minHeight: string;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,39 @@
1
+ import e from "./AcSpinner.js";
2
+ import { Teleport as t, createBlock as n, createCommentVNode as r, createElementVNode as i, createTextVNode as a, defineComponent as o, mergeProps as s, openBlock as c, renderSlot as l, toDisplayString as u } from "vue";
3
+ //#region src/lib/components/AcPreloader.vue?vue&type=script&setup=true&lang.ts
4
+ var d = { class: "max-w-80 text-base text-muted" }, f = /*@__PURE__*/ o({
5
+ inheritAttrs: !1,
6
+ __name: "AcPreloader",
7
+ props: {
8
+ message: { default: "Loading…" },
9
+ showSpinner: {
10
+ type: Boolean,
11
+ default: !0
12
+ },
13
+ fullPage: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ minHeight: { default: "240px" }
18
+ },
19
+ setup(o) {
20
+ return (f, p) => (c(), n(t, {
21
+ to: "body",
22
+ disabled: !o.fullPage
23
+ }, [i("div", s(f.$attrs, {
24
+ role: "status",
25
+ "aria-live": "polite",
26
+ class: ["flex flex-col items-center justify-center gap-3 px-4 text-center", o.fullPage ? "fixed inset-0 z-[80] bg-surface" : "size-full"],
27
+ style: o.fullPage ? void 0 : { minHeight: o.minHeight },
28
+ "data-ac-ds": "",
29
+ "data-testid": "ac-preloader"
30
+ }), [o.showSpinner ? (c(), n(e, {
31
+ key: 0,
32
+ size: "normal",
33
+ class: "text-primary",
34
+ label: ""
35
+ })) : r("", !0), i("div", d, [l(f.$slots, "default", {}, () => [a(u(o.message), 1)])])], 16)], 8, ["disabled"]));
36
+ }
37
+ });
38
+ //#endregion
39
+ export { f as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcProgress.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcProgress.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,31 @@
1
+ import type { Tone } from "./types";
2
+ export interface Props {
3
+ /** Current amount, from 0 to `max`. Ignored while `indeterminate`. */
4
+ value?: number;
5
+ /** The amount that fills the bar. */
6
+ max?: number;
7
+ /** Text above the bar, e.g. "Storage". Also the bar's accessible name. */
8
+ label?: string;
9
+ /** Shows the value to the right of the label: the percentage, or `valueText` when set. */
10
+ showValue?: boolean;
11
+ /** Replaces the percentage, e.g. "7.2 GiB of 10 GiB". Also read by screen readers. */
12
+ valueText?: string;
13
+ /** Bar colour. `auto` is for quotas: primary, then warning from 80% and danger from 95%. */
14
+ color?: Tone | "auto";
15
+ /** For work of unknown length: a sliding bar with no value. */
16
+ indeterminate?: boolean;
17
+ /** Bar height: `small` 4px, `normal` 6px, `large` 10px. */
18
+ size?: "small" | "normal" | "large";
19
+ }
20
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
21
+ label: string;
22
+ value: number;
23
+ color: Tone | "auto";
24
+ max: number;
25
+ size: "small" | "normal" | "large";
26
+ showValue: boolean;
27
+ valueText: string;
28
+ indeterminate: boolean;
29
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
@@ -0,0 +1,76 @@
1
+ import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, openBlock as s, toDisplayString as c, unref as l, useId as u } from "vue";
2
+ //#region src/lib/components/AcProgress.vue?vue&type=script&setup=true&lang.ts
3
+ var d = {
4
+ class: "w-full",
5
+ "data-ac-ds": "",
6
+ "data-testid": "ac-progress"
7
+ }, f = {
8
+ key: 0,
9
+ class: "mb-1.5 flex items-baseline justify-between gap-3 text-xs"
10
+ }, p = ["id"], m = [
11
+ "aria-labelledby",
12
+ "aria-label",
13
+ "aria-valuemax",
14
+ "aria-valuenow",
15
+ "aria-valuetext",
16
+ "aria-busy"
17
+ ], h = /*@__PURE__*/ i({
18
+ __name: "AcProgress",
19
+ props: {
20
+ value: { default: 0 },
21
+ max: { default: 100 },
22
+ label: { default: "" },
23
+ showValue: {
24
+ type: Boolean,
25
+ default: !1
26
+ },
27
+ valueText: { default: "" },
28
+ color: { default: "primary" },
29
+ indeterminate: {
30
+ type: Boolean,
31
+ default: !1
32
+ },
33
+ size: { default: "normal" }
34
+ },
35
+ setup(i) {
36
+ let h = i, g = {
37
+ primary: "bg-primary",
38
+ info: "bg-info",
39
+ success: "bg-success",
40
+ warning: "bg-warning",
41
+ danger: "bg-danger"
42
+ }, _ = {
43
+ small: "h-1",
44
+ normal: "h-1.5",
45
+ large: "h-2.5"
46
+ }, v = u(), y = e(() => h.max <= 0 ? 0 : Math.min(100, Math.max(0, h.value / h.max * 100))), b = e(() => h.color === "auto" ? y.value >= 95 ? "danger" : y.value >= 80 ? "warning" : "primary" : h.color), x = e(() => h.valueText || `${Math.round(y.value)}%`), S = e(() => !!h.label || h.showValue && !h.indeterminate);
47
+ return (e, u) => (s(), n("div", d, [S.value ? (s(), n("div", f, [i.label ? (s(), n("span", {
48
+ key: 0,
49
+ id: `${l(v)}-label`,
50
+ class: "min-w-0 truncate font-medium text-label"
51
+ }, c(i.label), 9, p)) : t("", !0), i.showValue && !i.indeterminate ? (s(), n("span", {
52
+ key: 1,
53
+ class: a(["ml-auto shrink-0 tabular-nums", i.color === "auto" && b.value !== "primary" ? b.value === "danger" ? "text-red-30" : "text-yellow-20" : "text-muted"]),
54
+ "aria-hidden": "true"
55
+ }, c(x.value), 3)) : t("", !0)])) : t("", !0), r("div", {
56
+ role: "progressbar",
57
+ "aria-labelledby": i.label ? `${l(v)}-label` : void 0,
58
+ "aria-label": i.label ? void 0 : "Progress",
59
+ "aria-valuemin": "0",
60
+ "aria-valuemax": i.indeterminate ? void 0 : i.max,
61
+ "aria-valuenow": i.indeterminate ? void 0 : Math.min(i.max, Math.max(0, i.value)),
62
+ "aria-valuetext": i.indeterminate ? void 0 : x.value,
63
+ "aria-busy": i.indeterminate || void 0,
64
+ class: a(["relative w-full overflow-hidden rounded-full bg-slate-90", _[i.size]])
65
+ }, [i.indeterminate ? (s(), n("div", {
66
+ key: 0,
67
+ class: a(["ac-progress-indeterminate absolute inset-y-0 left-0 w-2/5 rounded-full motion-reduce:w-full motion-reduce:opacity-40", g[b.value]])
68
+ }, null, 2)) : (s(), n("div", {
69
+ key: 1,
70
+ class: a(["h-full rounded-full transition-[width,background-color] duration-300 ease-out motion-reduce:transition-none", g[b.value]]),
71
+ style: o({ width: `${y.value}%` })
72
+ }, null, 6))], 10, m)]));
73
+ }
74
+ });
75
+ //#endregion
76
+ export { h as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcResourceCard.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcResourceCard.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,106 @@
1
+ import type { Component } from "vue";
2
+ import type { Tone } from "./types";
3
+ export interface ResourceTag {
4
+ /** Tag text, or the value of a key–value tag. */
5
+ label: string;
6
+ /** Makes it a key–value tag, e.g. `env` for `env=prod`. */
7
+ key?: string;
8
+ /** Tag colour, e.g. `warning` for an outdated version. */
9
+ color?: Tone | "neutral";
10
+ /** Shows a spinner before the text, e.g. while the status is still loading. */
11
+ loading?: boolean;
12
+ }
13
+ export interface ResourceDetail {
14
+ /** Name of the detail, e.g. "Provider" or "Nodes". Old `title`. */
15
+ label: string;
16
+ /** The value. Empty values show as "—". */
17
+ value?: string | number;
18
+ /** Slot name for a custom value: `#detail-<key>`. */
19
+ key?: string;
20
+ /** Sets the value in Geist Mono, for versions, IPs and IDs. */
21
+ mono?: boolean;
22
+ }
23
+ export interface Props {
24
+ /** Name of the cluster, database, node or organization. Also the card's accessible name. Old `clusterData.name`. */
25
+ name: string;
26
+ /** A muted line under the name, e.g. "Postgres 16.1 · demo" or "Last active 2 days ago". */
27
+ subtitle?: string;
28
+ /** Logo image URL, e.g. the cloud provider or database engine. Old `clusterData.providerIcon`. */
29
+ logo?: string;
30
+ /** Alt text for `logo`. Leave empty when `subtitle` or a detail already names it. */
31
+ logoAlt?: string;
32
+ /** A Lucide icon to show instead of a logo. */
33
+ icon?: Component;
34
+ /** Status shown as a badge before the tags, e.g. "Ready" or "Provisioning". */
35
+ status?: string;
36
+ /** Colour of the `status` badge. */
37
+ statusColor?: Tone | "default";
38
+ /** Shows a spinner in the status badge while the status is being worked out. */
39
+ statusLoading?: boolean;
40
+ /** Tags after the status: `{ label, key?, color?, loading? }`, or plain strings. Old `clusterData.tags`. */
41
+ tags?: (ResourceTag | string)[];
42
+ /** Key facts as label–value pairs: `{ label, value?, key?, mono? }`. Keep it to about four. Old `clusterData.details`. */
43
+ details?: ResourceDetail[];
44
+ /** Columns of the details grid. Three and four drop to two on phones. */
45
+ columns?: 1 | 2 | 3 | 4;
46
+ /** Sets `name` in Geist Mono, for Kubernetes object names. */
47
+ mono?: boolean;
48
+ /** Shows a skeleton card while the resource loads. */
49
+ loading?: boolean;
50
+ /** Greys the card out and turns off its link and click, e.g. for a cluster that isn't active yet. */
51
+ disabled?: boolean;
52
+ /** Makes the card a `RouterLink` to this route. Needs vue-router in the app; without it a string is used as `href`. */
53
+ to?: string | Record<string, unknown>;
54
+ /** Makes the card a plain link. */
55
+ href?: string;
56
+ /** Link target for `href`, e.g. `_blank`. */
57
+ target?: string;
58
+ }
59
+ type __VLS_Slots = {
60
+ /** Replaces the logo or icon. */
61
+ logo?: () => unknown;
62
+ /** Replaces the status badge and tags. */
63
+ tags?: () => unknown;
64
+ /** Buttons at the top right, e.g. a "Trigger drill" button. Old `custom-option` / `header-right`. */
65
+ actions?: () => unknown;
66
+ /** `AcDropdownItem`s for the ⋮ actions menu. The card renders the menu. Old `options` with `showOptions`. */
67
+ menu?: () => unknown;
68
+ /** Custom value for the detail with that key, e.g. `#detail-age`. */
69
+ [name: `detail-${string}`]: (props: {
70
+ detail: ResourceDetail;
71
+ }) => unknown;
72
+ /** Extra content under the details. */
73
+ default?: () => unknown;
74
+ /** A row at the bottom, above a divider, e.g. a compliance note and a link. */
75
+ footer?: () => unknown;
76
+ };
77
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
78
+ click: (e: MouseEvent) => any;
79
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
80
+ onClick?: ((e: MouseEvent) => any) | undefined;
81
+ }>, {
82
+ details: ResourceDetail[];
83
+ disabled: boolean;
84
+ icon: Component;
85
+ target: string;
86
+ href: string;
87
+ to: string | Record<string, unknown>;
88
+ status: string;
89
+ loading: boolean;
90
+ subtitle: string;
91
+ mono: boolean;
92
+ logo: string;
93
+ logoAlt: string;
94
+ statusColor: Tone | "default";
95
+ columns: 1 | 2 | 3 | 4;
96
+ statusLoading: boolean;
97
+ tags: (ResourceTag | string)[];
98
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
99
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
100
+ declare const _default: typeof __VLS_export;
101
+ export default _default;
102
+ type __VLS_WithSlots<T, S> = T & {
103
+ new (): {
104
+ $slots: S;
105
+ };
106
+ };
@@ -0,0 +1,203 @@
1
+ import e from "./AcSpinner.js";
2
+ import t from "./AcBadge.js";
3
+ import n from "./AcSkeleton.js";
4
+ import r from "./AcTag.js";
5
+ import i from "./AcDropdown.js";
6
+ import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, defineComponent as m, getCurrentInstance as h, mergeProps as g, normalizeClass as _, openBlock as v, renderList as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as S, unref as C, useId as w, useSlots as T, withCtx as E } from "vue";
7
+ //#region src/lib/components/AcResourceCard.vue?vue&type=script&setup=true&lang.ts
8
+ var D = ["aria-labelledby", "aria-disabled"], O = { class: "flex min-w-0 items-start gap-3 p-4" }, k = ["aria-hidden"], A = ["src", "alt"], j = { class: "min-w-0 flex-1" }, M = ["id", "title"], N = ["title"], P = {
9
+ key: 1,
10
+ class: "mt-2 flex flex-wrap items-center gap-1.5"
11
+ }, F = {
12
+ key: 1,
13
+ class: "relative z-10 -mt-1 -mr-1.5 flex shrink-0 items-center gap-1.5"
14
+ }, I = { class: "truncate text-xs text-muted" }, L = { class: "mt-0.5 flex min-w-0 flex-wrap items-center gap-1.5 text-base font-medium text-heading" }, R = {
15
+ key: 0,
16
+ class: "text-muted",
17
+ "aria-label": "Not set"
18
+ }, z = {
19
+ key: 2,
20
+ class: "relative z-10 mt-auto flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-1.5 border-t border-border-light px-4 py-3 text-xs text-muted"
21
+ }, B = /*@__PURE__*/ m({
22
+ __name: "AcResourceCard",
23
+ props: {
24
+ name: {},
25
+ subtitle: { default: "" },
26
+ logo: { default: "" },
27
+ logoAlt: { default: "" },
28
+ icon: { default: void 0 },
29
+ status: { default: "" },
30
+ statusColor: { default: "default" },
31
+ statusLoading: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ tags: { default: () => [] },
36
+ details: { default: () => [] },
37
+ columns: { default: 2 },
38
+ mono: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ loading: {
43
+ type: Boolean,
44
+ default: !1
45
+ },
46
+ disabled: {
47
+ type: Boolean,
48
+ default: !1
49
+ },
50
+ to: { default: void 0 },
51
+ href: { default: void 0 },
52
+ target: { default: void 0 }
53
+ },
54
+ emits: ["click"],
55
+ setup(m, { emit: B }) {
56
+ let V = m, H = B, U = T(), W = {
57
+ 1: "",
58
+ 2: "grid-cols-2",
59
+ 3: "grid-cols-2 sm:grid-cols-3",
60
+ 4: "grid-cols-2 sm:grid-cols-4"
61
+ }, G = h(), K = G?.appContext.components.RouterLink, q = w(), J = o(() => V.tags.map((e) => typeof e == "string" ? { label: e } : e)), Y = o(() => {
62
+ if (V.disabled) return null;
63
+ if (V.to !== void 0 && K) return {
64
+ is: K,
65
+ to: V.to
66
+ };
67
+ let e = V.href ?? (typeof V.to == "string" ? V.to : void 0);
68
+ return e ? {
69
+ is: "a",
70
+ href: e,
71
+ target: V.target,
72
+ rel: V.target === "_blank" ? "noopener noreferrer" : void 0
73
+ } : null;
74
+ });
75
+ function X() {
76
+ return !Y.value && !V.disabled && !!G?.vnode.props?.onClick;
77
+ }
78
+ function Z(e) {
79
+ return e == null || e === "";
80
+ }
81
+ function Q(e) {
82
+ H("click", e);
83
+ }
84
+ return (o, h) => m.loading ? (v(), s(n, {
85
+ key: 0,
86
+ shape: "info-card",
87
+ label: `Loading ${m.name || "resource"}`,
88
+ "data-ac-ds": "",
89
+ "data-testid": "ac-resource-card"
90
+ }, null, 8, ["label"])) : (v(), l("article", {
91
+ key: 1,
92
+ class: _(["group relative flex min-w-0 flex-col rounded-10 border border-border bg-surface shadow-xs transition-[border-color,box-shadow] duration-150 has-[[data-ac-card-link]:focus-visible]:ring-[3px] has-[[data-ac-card-link]:focus-visible]:ring-ring", [(Y.value || X()) && "hover:border-border-dark hover:shadow-sm", m.disabled && "opacity-60"]]),
93
+ "aria-labelledby": `${C(q)}-name`,
94
+ "aria-disabled": m.disabled || void 0,
95
+ "data-ac-ds": "",
96
+ "data-testid": "ac-resource-card"
97
+ }, [
98
+ u("div", O, [
99
+ U.logo || m.logo || m.icon ? (v(), l("span", {
100
+ key: 0,
101
+ class: _(["inline-flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-8 border border-border-light bg-surface-muted", m.logo ? "p-1.5" : "text-label [&_svg]:size-5"]),
102
+ "aria-hidden": m.logo && m.logoAlt ? void 0 : "true"
103
+ }, [b(o.$slots, "logo", {}, () => [m.logo ? (v(), l("img", {
104
+ key: 0,
105
+ src: m.logo,
106
+ alt: m.logoAlt,
107
+ class: "size-full object-contain"
108
+ }, null, 8, A)) : (v(), s(x(m.icon), { key: 1 }))])], 10, k)) : c("", !0),
109
+ u("div", j, [
110
+ u("h3", {
111
+ id: `${C(q)}-name`,
112
+ class: _(["truncate text-lg leading-6 font-semibold tracking-[-0.01em] text-heading", m.mono && "font-mono text-base tracking-tight"]),
113
+ title: m.name
114
+ }, [Y.value ? (v(), s(x(Y.value.is), g({ key: 0 }, {
115
+ ...Y.value,
116
+ is: void 0
117
+ }, {
118
+ "data-ac-card-link": "",
119
+ class: "outline-none after:absolute after:inset-0 after:rounded-10",
120
+ onClick: Q
121
+ }), {
122
+ default: E(() => [f(S(m.name), 1)]),
123
+ _: 1
124
+ }, 16)) : X() ? (v(), l("button", {
125
+ key: 1,
126
+ type: "button",
127
+ "data-ac-card-link": "",
128
+ class: "max-w-full cursor-pointer truncate text-left outline-none after:absolute after:inset-0 after:rounded-10",
129
+ onClick: Q
130
+ }, S(m.name), 1)) : (v(), l(a, { key: 2 }, [f(S(m.name), 1)], 64))], 10, M),
131
+ m.subtitle ? (v(), l("p", {
132
+ key: 0,
133
+ class: "line-clamp-2 text-xs text-muted",
134
+ title: m.subtitle
135
+ }, S(m.subtitle), 9, N)) : c("", !0),
136
+ U.tags || m.status || m.statusLoading || J.value.length ? (v(), l("div", P, [b(o.$slots, "tags", {}, () => [m.statusLoading ? (v(), s(t, {
137
+ key: 0,
138
+ color: "default",
139
+ variant: "light",
140
+ rounded: ""
141
+ }, {
142
+ default: E(() => [p(e, {
143
+ size: "xs",
144
+ label: ""
145
+ }), f(" " + S(m.status || "Loading"), 1)]),
146
+ _: 1
147
+ })) : m.status ? (v(), s(t, {
148
+ key: 1,
149
+ label: m.status,
150
+ color: m.statusColor,
151
+ variant: "light",
152
+ rounded: "",
153
+ dot: ""
154
+ }, null, 8, ["label", "color"])) : c("", !0), (v(!0), l(a, null, y(J.value, (t, n) => (v(), s(r, {
155
+ key: `${t.key ?? ""}${t.label}${n}`,
156
+ label: t.key ? "" : t.label,
157
+ "key-label": t.key ?? "",
158
+ "value-label": t.key ? t.label : "",
159
+ color: t.color ?? "neutral",
160
+ rounded: ""
161
+ }, d({ _: 2 }, [t.loading ? {
162
+ name: "icon",
163
+ fn: E(() => [p(e, {
164
+ size: "xs",
165
+ label: ""
166
+ })]),
167
+ key: "0"
168
+ } : void 0]), 1032, [
169
+ "label",
170
+ "key-label",
171
+ "value-label",
172
+ "color"
173
+ ]))), 128))])])) : c("", !0)
174
+ ]),
175
+ U.actions || U.menu ? (v(), l("div", F, [b(o.$slots, "actions"), U.menu ? (v(), s(i, {
176
+ key: 0,
177
+ align: "end",
178
+ "menu-label": `Actions for ${m.name}`
179
+ }, {
180
+ default: E(() => [b(o.$slots, "menu")]),
181
+ _: 3
182
+ }, 8, ["menu-label"])) : c("", !0)])) : c("", !0)
183
+ ]),
184
+ m.details.length ? (v(), l("dl", {
185
+ key: 0,
186
+ class: _(["grid gap-x-4 gap-y-3 border-t border-border-light px-4 py-3.5", W[m.columns]])
187
+ }, [(v(!0), l(a, null, y(m.details, (e, t) => (v(), l("div", {
188
+ key: e.key ?? `${e.label}${t}`,
189
+ class: "min-w-0"
190
+ }, [u("dt", I, S(e.label), 1), u("dd", L, [b(o.$slots, `detail-${e.key}`, { detail: e }, () => [Z(e.value) ? (v(), l("span", R, "—")) : (v(), l("span", {
191
+ key: 1,
192
+ class: _(["min-w-0 break-words", e.mono && "font-mono text-[length:calc(12.5px*var(--ac-scale))]"])
193
+ }, S(e.value), 3))])])]))), 128))], 2)) : c("", !0),
194
+ U.default ? (v(), l("div", {
195
+ key: 1,
196
+ class: _(["border-t border-border-light px-4 py-3.5 text-base text-body", m.details.length > 0 && "border-t-0 pt-0"])
197
+ }, [b(o.$slots, "default")], 2)) : c("", !0),
198
+ U.footer ? (v(), l("div", z, [b(o.$slots, "footer")])) : c("", !0)
199
+ ], 10, D));
200
+ }
201
+ });
202
+ //#endregion
203
+ export { B as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcSearchBar.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcSearchBar.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };