@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,274 @@
1
+ import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeModels as c, nextTick as ee, normalizeClass as l, openBlock as u, ref as d, renderList as f, toDisplayString as p, unref as m, useId as h, useModel as g, withModifiers as _ } from "vue";
2
+ import { CircleAlert as v, FileText as y, Upload as b, X as x } from "@lucide/vue";
3
+ //#region src/lib/components/AcFileUpload.vue?vue&type=script&setup=true&lang.ts
4
+ var S = ["id"], te = {
5
+ key: 0,
6
+ class: "text-danger",
7
+ "aria-hidden": "true"
8
+ }, ne = [
9
+ "id",
10
+ "name",
11
+ "accept",
12
+ "multiple",
13
+ "disabled"
14
+ ], re = [
15
+ "disabled",
16
+ "aria-describedby",
17
+ "aria-label"
18
+ ], ie = ["title"], ae = ["aria-label"], C = { class: "pointer-events-none text-base text-heading" }, w = { class: "font-medium" }, oe = {
19
+ key: 0,
20
+ class: "text-muted"
21
+ }, T = [
22
+ "disabled",
23
+ "aria-describedby",
24
+ "aria-label"
25
+ ], E = {
26
+ key: 0,
27
+ class: "pointer-events-none -mt-1 text-xs text-muted"
28
+ }, D = ["id"], O = ["id"], se = ["aria-label"], ce = ["title"], le = { class: "shrink-0 text-xs text-muted tabular-nums" }, ue = [
29
+ "aria-label",
30
+ "disabled",
31
+ "onClick"
32
+ ], de = {
33
+ class: "sr-only",
34
+ "aria-live": "polite"
35
+ }, k = /*@__PURE__*/ s({
36
+ __name: "AcFileUpload",
37
+ props: /*@__PURE__*/ c({
38
+ label: { default: "" },
39
+ accept: { default: "" },
40
+ multiple: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ maxSize: { default: 0 },
45
+ small: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ description: { default: "" },
50
+ name: { default: "" },
51
+ required: {
52
+ type: Boolean,
53
+ default: !1
54
+ },
55
+ disabled: {
56
+ type: Boolean,
57
+ default: !1
58
+ },
59
+ errorMsg: { default: "" },
60
+ hint: { default: "" }
61
+ }, {
62
+ modelValue: { default: () => [] },
63
+ modelModifiers: {}
64
+ }),
65
+ emits: /*@__PURE__*/ c([
66
+ "add",
67
+ "remove",
68
+ "reject"
69
+ ], ["update:modelValue"]),
70
+ setup(s, { expose: c, emit: k }) {
71
+ let A = s, j = g(s, "modelValue"), M = k, N = h(), P = d(null), F = d(null), I = d(null), L = d(0), R = d([]), z = d(""), B = t(() => L.value > 0), V = t(() => A.accept.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean)), fe = t(() => {
72
+ let e = [];
73
+ return V.value.length && e.push(V.value.join(", ")), A.maxSize && e.push(`up to ${q(A.maxSize)}`), e.join(" · ");
74
+ }), H = t(() => A.description || fe.value), U = t(() => R.value.map((e) => e.message).join(" ")), W = t(() => A.errorMsg || U.value), G = t(() => W.value || A.hint ? `${N}-msg` : void 0), K = t(() => j.value.length ? j.value.length === 1 ? j.value[0].name : `${j.value.length} files` : "");
75
+ function q(e) {
76
+ if (e < 1024) return `${e} B`;
77
+ let t = [
78
+ "KB",
79
+ "MB",
80
+ "GB"
81
+ ], n = e / 1024, r = 0;
82
+ for (; n >= 1024 && r < t.length - 1;) n /= 1024, r++;
83
+ return `${n >= 10 || Number.isInteger(n) ? Math.round(n) : n.toFixed(1)} ${t[r]}`;
84
+ }
85
+ function pe(e) {
86
+ if (!V.value.length) return !0;
87
+ let t = e.name.toLowerCase(), n = e.type.toLowerCase();
88
+ return V.value.some((e) => e.startsWith(".") ? t.endsWith(e) : e.endsWith("/*") ? n.startsWith(e.slice(0, -1)) : n === e);
89
+ }
90
+ function me(e, t) {
91
+ return e.name === t.name && e.size === t.size && e.lastModified === t.lastModified;
92
+ }
93
+ function J(e) {
94
+ if (A.disabled || !e.length) return;
95
+ let t = [], n = [];
96
+ for (let r of A.multiple ? e : e.slice(0, 1)) pe(r) ? A.maxSize && r.size > A.maxSize ? n.push({
97
+ file: r,
98
+ reason: "size",
99
+ message: `${r.name} is larger than ${q(A.maxSize)}.`
100
+ }) : t.push(r) : n.push({
101
+ file: r,
102
+ reason: "type",
103
+ message: `${r.name} isn't an allowed file type.`
104
+ });
105
+ if (R.value = n, n.length && M("reject", n), !t.length) {
106
+ z.value = U.value;
107
+ return;
108
+ }
109
+ let r = A.multiple ? t.filter((e) => !j.value.some((t) => me(t, e))) : t;
110
+ j.value = A.multiple ? [...j.value, ...r] : t, M("add", r), z.value = `${r.length === 1 ? r[0].name : `${r.length} files`} added. ${U.value}`.trim();
111
+ }
112
+ function Y() {
113
+ A.disabled || P.value?.click();
114
+ }
115
+ function he(e) {
116
+ let t = e.target;
117
+ J([...t.files ?? []]), t.value = "";
118
+ }
119
+ function X(e) {
120
+ !A.disabled && e.dataTransfer?.types.includes("Files") && (e.preventDefault(), L.value++);
121
+ }
122
+ function Z(e) {
123
+ !A.disabled && e.dataTransfer?.types.includes("Files") && (e.preventDefault(), e.dataTransfer.dropEffect = "copy");
124
+ }
125
+ function Q() {
126
+ L.value = Math.max(0, L.value - 1);
127
+ }
128
+ function $(e) {
129
+ A.disabled || (e.preventDefault(), L.value = 0, J([...e.dataTransfer?.files ?? []]));
130
+ }
131
+ async function ge(e) {
132
+ let t = j.value[e];
133
+ if (!t || A.disabled) return;
134
+ j.value = j.value.filter((t, n) => n !== e), R.value = [], M("remove", t), z.value = `${t.name} removed.`, await ee();
135
+ let n = I.value?.querySelectorAll("button");
136
+ (n?.[Math.min(e, n.length - 1)] ?? F.value)?.focus();
137
+ }
138
+ function _e() {
139
+ let e = [...j.value];
140
+ j.value = [], R.value = [], e.forEach((e) => M("remove", e)), z.value = "File removed.", F.value?.focus();
141
+ }
142
+ return c({ open: Y }), (t, c) => (u(), r("div", {
143
+ class: l(["w-full", s.disabled && "opacity-60"]),
144
+ "data-ac-ds": "",
145
+ "data-testid": "ac-file-upload"
146
+ }, [
147
+ s.label ? (u(), r("p", {
148
+ key: 0,
149
+ id: `${m(N)}-label`,
150
+ class: "mb-1.5 text-xs font-medium text-label"
151
+ }, [a(p(s.label), 1), s.required ? (u(), r("span", te, " *")) : n("", !0)], 8, S)) : n("", !0),
152
+ i("input", {
153
+ id: `${m(N)}-input`,
154
+ ref_key: "input",
155
+ ref: P,
156
+ type: "file",
157
+ class: "hidden",
158
+ tabindex: "-1",
159
+ "aria-hidden": "true",
160
+ name: s.name || void 0,
161
+ accept: s.accept || void 0,
162
+ multiple: s.multiple,
163
+ disabled: s.disabled,
164
+ onChange: he
165
+ }, null, 40, ne),
166
+ s.small ? (u(), r("div", {
167
+ key: 1,
168
+ class: l(["flex h-9 w-full items-center rounded-6 border bg-surface shadow-xs transition-[border-color,box-shadow] duration-150", [W.value ? "border-red-60" : B.value ? "border-primary shadow-[0_0_0_3px_var(--color-ring)]" : "border-border hover:border-border-dark", s.disabled && "bg-surface-muted"]]),
169
+ onDragenter: X,
170
+ onDragover: Z,
171
+ onDragleave: Q,
172
+ onDrop: $
173
+ }, [
174
+ i("button", {
175
+ ref_key: "browseButton",
176
+ ref: F,
177
+ type: "button",
178
+ class: "ml-1 inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-4 border border-border bg-surface-muted px-2.5 text-xs font-medium text-heading transition hover:bg-surface-sunken focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed",
179
+ disabled: s.disabled,
180
+ "aria-describedby": G.value,
181
+ "aria-label": s.label ? `${s.multiple ? "Choose files" : "Choose file"} for ${s.label}` : void 0,
182
+ onClick: Y
183
+ }, [o(m(b), {
184
+ class: "size-3.5",
185
+ "aria-hidden": "true"
186
+ }), a(" " + p(s.multiple ? "Choose files" : "Choose file"), 1)], 8, re),
187
+ i("span", {
188
+ class: l(["min-w-0 flex-1 truncate px-2.5 text-base", K.value ? "text-heading" : "text-muted"]),
189
+ title: j.value.map((e) => e.name).join(", ")
190
+ }, p(K.value || (s.multiple ? "No files chosen" : "No file chosen")), 11, ie),
191
+ j.value.length && !s.disabled ? (u(), r("button", {
192
+ key: 0,
193
+ type: "button",
194
+ class: "mr-1.5 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-4 text-muted transition hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
195
+ "aria-label": j.value.length === 1 ? `Remove ${j.value[0].name}` : "Remove all files",
196
+ onClick: _e
197
+ }, [o(m(x), {
198
+ class: "size-3.5",
199
+ "aria-hidden": "true"
200
+ })], 8, ae)) : n("", !0)
201
+ ], 34)) : (u(), r("div", {
202
+ key: 2,
203
+ class: l(["flex flex-col items-center justify-center gap-3 rounded-10 border border-dashed px-6 py-7 text-center transition-colors duration-150", [s.disabled ? "cursor-not-allowed border-border bg-surface-muted" : "cursor-pointer", !s.disabled && (B.value ? "border-primary bg-primary-97" : W.value ? "border-red-60 bg-surface hover:bg-surface-muted" : "border-border-dark bg-surface hover:bg-surface-muted")]]),
204
+ onClick: _(Y, ["self"]),
205
+ onDragenter: X,
206
+ onDragover: Z,
207
+ onDragleave: Q,
208
+ onDrop: $
209
+ }, [
210
+ i("span", {
211
+ class: l(["pointer-events-none inline-flex size-10 items-center justify-center rounded-10 border shadow-xs transition-colors", B.value ? "border-primary-80 bg-surface text-primary" : "border-border bg-surface text-muted"]),
212
+ "aria-hidden": "true"
213
+ }, [o(m(b), { class: "size-4.5" })], 2),
214
+ i("p", C, [i("span", w, p(B.value ? "Drop to upload" : s.multiple ? "Drag and drop files here" : "Drag and drop a file here"), 1), B.value ? n("", !0) : (u(), r("span", oe, " or"))]),
215
+ i("button", {
216
+ ref_key: "browseButton",
217
+ ref: F,
218
+ type: "button",
219
+ class: "inline-flex h-8 cursor-pointer items-center gap-2 rounded-6 border border-border bg-surface px-3 text-base font-medium text-heading shadow-xs transition hover:border-border-dark hover:bg-surface-muted focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed",
220
+ disabled: s.disabled,
221
+ "aria-describedby": G.value,
222
+ "aria-label": s.label ? `Browse files for ${s.label}` : void 0,
223
+ onClick: Y
224
+ }, " Browse files ", 8, T),
225
+ H.value ? (u(), r("p", E, p(H.value), 1)) : n("", !0)
226
+ ], 34)),
227
+ W.value ? (u(), r("p", {
228
+ key: 3,
229
+ id: `${m(N)}-msg`,
230
+ class: "mt-1.5 flex items-start gap-1 text-xs text-red-30"
231
+ }, [o(m(v), {
232
+ class: "mt-px size-3.5 shrink-0",
233
+ "aria-hidden": "true"
234
+ }), a(" " + p(W.value), 1)], 8, D)) : s.hint ? (u(), r("p", {
235
+ key: 4,
236
+ id: `${m(N)}-msg`,
237
+ class: "mt-1.5 text-xs text-muted"
238
+ }, p(s.hint), 9, O)) : n("", !0),
239
+ !s.small && j.value.length ? (u(), r("ul", {
240
+ key: 5,
241
+ ref_key: "list",
242
+ ref: I,
243
+ class: "mt-3 divide-y divide-border-light overflow-hidden rounded-8 border border-border bg-surface",
244
+ "aria-label": s.label ? `${s.label} files` : "Chosen files"
245
+ }, [(u(!0), r(e, null, f(j.value, (e, t) => (u(), r("li", {
246
+ key: `${e.name}-${e.size}-${e.lastModified}`,
247
+ class: "flex items-center gap-3 py-2 pr-2 pl-3"
248
+ }, [
249
+ o(m(y), {
250
+ class: "size-4 shrink-0 text-muted",
251
+ "aria-hidden": "true"
252
+ }),
253
+ i("span", {
254
+ class: "min-w-0 flex-1 truncate text-base text-heading",
255
+ title: e.name
256
+ }, p(e.name), 9, ce),
257
+ i("span", le, p(q(e.size)), 1),
258
+ i("button", {
259
+ type: "button",
260
+ class: "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-4 text-muted transition hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed",
261
+ "aria-label": `Remove ${e.name}`,
262
+ disabled: s.disabled,
263
+ onClick: (e) => ge(t)
264
+ }, [o(m(x), {
265
+ class: "size-3.5",
266
+ "aria-hidden": "true"
267
+ })], 8, ue)
268
+ ]))), 128))], 8, se)) : n("", !0),
269
+ i("span", de, p(z.value), 1)
270
+ ], 2));
271
+ }
272
+ });
273
+ //#endregion
274
+ export { k as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcFontScale.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcFontScale.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,17 @@
1
+ import type { FontScale } from "../composables/useFontScale";
2
+ export interface Props {
3
+ /** Used until the viewer picks a size: a preset name or a number (0.8–1.5). */
4
+ defaultScale?: FontScale | number;
5
+ /** `icons` is a compact switch of four "A"s; `labels` adds the words, for menus and settings pages. */
6
+ display?: "icons" | "labels";
7
+ }
8
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "set:scale": (scale: number) => any;
10
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
11
+ "onSet:scale"?: ((scale: number) => any) | undefined;
12
+ }>, {
13
+ display: "icons" | "labels";
14
+ defaultScale: FontScale | number;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,65 @@
1
+ import { FONT_SCALES as e, useFontScale as t } from "../composables/useFontScale.js";
2
+ import { Fragment as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, renderList as c, toDisplayString as l, unref as u } from "vue";
3
+ //#region src/lib/components/AcFontScale.vue?vue&type=script&setup=true&lang.ts
4
+ var d = {
5
+ role: "radiogroup",
6
+ "aria-label": "Text size",
7
+ class: "inline-flex items-center gap-0.5 rounded-8 border border-border bg-surface-muted p-0.5",
8
+ "data-ac-ds": "",
9
+ "data-testid": "ac-font-scale"
10
+ }, f = [
11
+ "aria-checked",
12
+ "aria-label",
13
+ "title",
14
+ "onClick"
15
+ ], p = { key: 1 }, m = /*@__PURE__*/ a({
16
+ __name: "AcFontScale",
17
+ props: {
18
+ defaultScale: { default: "default" },
19
+ display: { default: "icons" }
20
+ },
21
+ emits: ["set:scale"],
22
+ setup(a, { emit: m }) {
23
+ let h = a, g = m, _ = [
24
+ {
25
+ value: "small",
26
+ label: "Small",
27
+ glyph: "text-xs"
28
+ },
29
+ {
30
+ value: "default",
31
+ label: "Default",
32
+ glyph: "text-base"
33
+ },
34
+ {
35
+ value: "large",
36
+ label: "Large",
37
+ glyph: "text-xl"
38
+ },
39
+ {
40
+ value: "larger",
41
+ label: "Larger",
42
+ glyph: "text-2xl"
43
+ }
44
+ ], { scale: v, preset: y, setScale: b } = t({ defaultScale: typeof h.defaultScale == "number" ? h.defaultScale : e[h.defaultScale] });
45
+ function x(e) {
46
+ b(e), g("set:scale", v.value);
47
+ }
48
+ return (e, t) => (s(), r("div", d, [(s(), r(n, null, c(_, (e) => i("button", {
49
+ key: e.value,
50
+ type: "button",
51
+ role: "radio",
52
+ "aria-checked": u(y) === e.value,
53
+ "aria-label": a.display === "icons" ? `${e.label} text` : void 0,
54
+ title: a.display === "icons" ? `${e.label} text` : void 0,
55
+ class: o(["inline-flex h-6.5 cursor-pointer items-center justify-center gap-1.5 rounded-6 text-xs font-medium transition focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring", [a.display === "icons" ? "w-7" : "px-2.5", u(y) === e.value ? "bg-surface text-heading shadow-sm ring-1 ring-border" : "text-muted hover:text-heading"]]),
56
+ onClick: (t) => x(e.value)
57
+ }, [a.display === "icons" ? (s(), r("span", {
58
+ key: 0,
59
+ class: o(["leading-none font-semibold", e.glyph]),
60
+ "aria-hidden": "true"
61
+ }, "A", 2)) : (s(), r("span", p, l(e.label), 1))], 10, f)), 64))]));
62
+ }
63
+ });
64
+ //#endregion
65
+ export { m as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcForm.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcForm.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,31 @@
1
+ export interface Props {
2
+ /** Maximum width of the fields: `narrow` 640px, `normal` 800px (the old `.form-content`), `wide` 1000px, `full` no limit. Defaults to `wide` for the `aside` layout, `normal` otherwise. */
3
+ width?: "narrow" | "normal" | "wide" | "full";
4
+ /** Default layout of every AcFormSection inside: `stacked` puts the title above the fields, `aside` puts it on the left from 768px up. */
5
+ layout?: "stacked" | "aside";
6
+ /** Lets the browser block submit on empty `required` fields. Off by default so `@submit` always fires and your own validation shows its messages. */
7
+ nativeValidation?: boolean;
8
+ }
9
+ type __VLS_Slots = {
10
+ /** AcFormSection groups, or fields directly. */
11
+ default?: () => unknown;
12
+ /** An AcFormFooter. It's placed after the fields and spans the whole form. */
13
+ footer?: () => unknown;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ submit: (event: SubmitEvent) => any;
17
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
18
+ onSubmit?: ((event: SubmitEvent) => any) | undefined;
19
+ }>, {
20
+ width: "narrow" | "normal" | "wide" | "full";
21
+ layout: "stacked" | "aside";
22
+ nativeValidation: boolean;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,38 @@
1
+ import { computed as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, provide as o, renderSlot as s, withModifiers as c } from "vue";
2
+ //#region src/lib/components/AcForm.vue?vue&type=script&setup=true&lang.ts
3
+ var l = ["novalidate"], u = /*@__PURE__*/ r({
4
+ __name: "AcForm",
5
+ props: {
6
+ width: { default: void 0 },
7
+ layout: { default: "stacked" },
8
+ nativeValidation: {
9
+ type: Boolean,
10
+ default: !1
11
+ }
12
+ },
13
+ emits: ["submit"],
14
+ setup(r, { emit: u }) {
15
+ let d = r, f = u, p = {
16
+ narrow: "max-w-160",
17
+ normal: "max-w-200",
18
+ wide: "max-w-250",
19
+ full: ""
20
+ }, m = e(() => p[d.width ?? (d.layout === "aside" ? "wide" : "normal")]);
21
+ o("ac-form", {
22
+ layout: e(() => d.layout),
23
+ widthClass: m
24
+ });
25
+ function h(e) {
26
+ f("submit", e);
27
+ }
28
+ return (e, o) => (a(), t("form", {
29
+ class: "w-full",
30
+ novalidate: !r.nativeValidation,
31
+ "data-ac-ds": "",
32
+ "data-testid": "ac-form",
33
+ onSubmit: c(h, ["prevent"])
34
+ }, [n("div", { class: i(["flex w-full flex-col", m.value]) }, [s(e.$slots, "default")], 2), s(e.$slots, "footer")], 40, l));
35
+ }
36
+ });
37
+ //#endregion
38
+ export { u as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcFormArray.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcFormArray.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,124 @@
1
+ import type { CellType } from "./AcCellValue.vue";
2
+ /** A column of the item table. */
3
+ export interface FormArrayColumn<I = Record<string, unknown>> {
4
+ /** Item property shown in this column. Also names the `cell-<key>` and `field-<key>` slots. */
5
+ key: string;
6
+ /** Header text. */
7
+ label: string;
8
+ /** Shows the value with AcCellValue as this type, e.g. `date` or `labels`. Defaults to `auto`. */
9
+ type?: CellType;
10
+ /** Turns the value into text, e.g. to add a unit. */
11
+ format?: (value: unknown, item: I) => string;
12
+ /** CSS width of the column. */
13
+ width?: string;
14
+ }
15
+ export interface Props<I> {
16
+ /** Name of the field, e.g. “Quotas” or “Environment Variables”. */
17
+ label: string;
18
+ /** Columns of the item table: `{ key, label, type?, format?, width? }`. */
19
+ columns: FormArrayColumn<I>[];
20
+ /** Singular name of one item, used in buttons and screen-reader text: “Add quota”, “Edit quota cpu-limit”. */
21
+ itemName?: string;
22
+ /** Creates the starting value of a new item. */
23
+ newItem?: () => I;
24
+ /** `form` opens a panel under the row for the `form` slot; `inline` edits in the row itself through `field-<key>` slots. */
25
+ mode?: "form" | "inline";
26
+ /** Checks an item before it's saved. Return errors by field key, or one message. `index` is -1 for a new item. */
27
+ validate?: (item: I, index: number) => Record<string, string> | string | null | undefined | void;
28
+ /** Runs after validation and before the list changes, e.g. to save to the API. Return `false` (or throw) to keep the form open. */
29
+ beforeSave?: (item: I, index: number) => boolean | void | Promise<boolean | void>;
30
+ /** Runs before an item is removed, e.g. to ask for confirmation. Return `false` to keep it. */
31
+ beforeRemove?: (item: I, index: number) => boolean | void | Promise<boolean | void>;
32
+ /** Marks the field required and adds a red asterisk. Show `errorMsg` when it's empty. */
33
+ required?: boolean;
34
+ /** Disables adding, editing and removing. */
35
+ disabled?: boolean;
36
+ /** Hides every action and shows the items only. */
37
+ readonly?: boolean;
38
+ /** Shows the Edit button on each row. */
39
+ editable?: boolean;
40
+ /** Disables the Add button only, e.g. until a namespace is chosen. */
41
+ addDisabled?: boolean;
42
+ /** Most items allowed. The Add button disables at the limit. */
43
+ max?: number;
44
+ /** Shows a spinner on Save and blocks the actions, e.g. while you save outside `beforeSave`. */
45
+ loading?: boolean;
46
+ /** Lets people collapse the field to its header. */
47
+ collapsible?: boolean;
48
+ /** Starts collapsed. Needs `collapsible`. */
49
+ defaultCollapsed?: boolean;
50
+ /** Error for the whole field, e.g. “Add at least one quota”. A list shows one per line. */
51
+ errorMsg?: string | string[];
52
+ /** Helper text under the label (hidden while `errorMsg` is set). */
53
+ hint?: string;
54
+ /** Text of the Add button. Defaults to “Add <itemName>”. */
55
+ addLabel?: string;
56
+ /** Heading of the form. Defaults to “New <itemName>” or “Edit <itemName>”. */
57
+ formTitle?: string;
58
+ /** Text shown when there are no items (or use the `empty` slot). */
59
+ emptyText?: string;
60
+ }
61
+ declare const __VLS_export: <T extends Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
62
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(Props<T> & {
63
+ /** The items. Bind with `v-model`; it's replaced with a new array on every change. */
64
+ modelValue?: T[];
65
+ }) & {
66
+ "onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
67
+ onAdd?: ((item: T) => any) | undefined;
68
+ onRemove?: ((item: T, index: number) => any) | undefined;
69
+ onUpdate?: ((item: T, index: number) => any) | undefined;
70
+ }> & (typeof globalThis extends {
71
+ __VLS_PROPS_FALLBACK: infer P;
72
+ } ? P : {});
73
+ expose: (exposed: import("vue").ShallowUnwrapRef<{
74
+ /** Opens the form for a new item. */
75
+ add: () => void;
76
+ /** Opens the form for the item at `index`. */
77
+ edit: (index: number) => void;
78
+ /** Closes the form without saving. */
79
+ cancel: () => void;
80
+ }>) => void;
81
+ attrs: any;
82
+ slots: {
83
+ [name: `field-${string}`]: (props: {
84
+ item: T;
85
+ index: number;
86
+ error: string;
87
+ errors: Record<string, string>;
88
+ }) => unknown;
89
+ [name: `cell-${string}`]: (props: {
90
+ item: T;
91
+ index: number;
92
+ value: unknown;
93
+ }) => unknown;
94
+ /** The editor in `form` mode. Bind fields to `item` (a copy, saved on Save) and show `errors[key]` under them. `index` is -1 for a new item. */
95
+ form?: (props: {
96
+ item: T;
97
+ index: number;
98
+ errors: Record<string, string>;
99
+ isNew: boolean;
100
+ }) => unknown;
101
+ /** More about an item, shown under its row behind a toggle button. */
102
+ details?: (props: {
103
+ item: T;
104
+ index: number;
105
+ }) => unknown;
106
+ /** Extra buttons before Edit and Remove on each row. */
107
+ "row-actions"?: (props: {
108
+ item: T;
109
+ index: number;
110
+ }) => unknown;
111
+ /** Replaces the empty text, e.g. to explain what to add. */
112
+ empty?: () => unknown;
113
+ };
114
+ emit: (((evt: "add", item: T) => void) & ((evt: "remove", item: T, index: number) => void) & ((evt: "update", item: T, index: number) => void)) & ((event: "update:modelValue", value: T[]) => void);
115
+ }>) => import("vue").VNode & {
116
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
117
+ };
118
+ declare const _default: typeof __VLS_export;
119
+ export default _default;
120
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
121
+ [K in keyof T]: T[K];
122
+ } : {
123
+ [K in keyof T as K]: T[K];
124
+ }) & {};