@ac-design/design-system 1.0.3 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/README.md +27 -18
  2. package/dist/lib/charts/ChartFrame.js +5 -0
  3. package/dist/lib/charts/ChartFrame.vue.d.ts +71 -0
  4. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +173 -0
  5. package/dist/lib/charts/cartesian.d.ts +324 -0
  6. package/dist/lib/charts/cartesian.js +137 -0
  7. package/dist/lib/charts/echarts.d.ts +86 -0
  8. package/dist/lib/charts/echarts.js +173 -0
  9. package/dist/lib/charts/graph.d.ts +77 -0
  10. package/dist/lib/charts/graph.js +155 -0
  11. package/dist/lib/charts/index.d.ts +11 -0
  12. package/dist/lib/charts/index.js +7 -0
  13. package/dist/lib/charts/shared.d.ts +53 -0
  14. package/dist/lib/charts/shared.js +96 -0
  15. package/dist/lib/charts/xy.d.ts +69 -0
  16. package/dist/lib/charts/xy.js +73 -0
  17. package/dist/lib/compat.css +2770 -1061
  18. package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +2 -2
  19. package/dist/lib/components/AcAccordionItem.vue.d.ts +1 -1
  20. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +5 -5
  21. package/dist/lib/components/AcAlert.vue.d.ts +10 -1
  22. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +139 -45
  23. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +19 -19
  24. package/dist/lib/components/AcAreaChart.js +5 -0
  25. package/dist/lib/components/AcAreaChart.vue.d.ts +47 -0
  26. package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +205 -0
  27. package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
  28. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +66 -61
  29. package/dist/lib/components/AcBadge.vue.d.ts +20 -7
  30. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +67 -44
  31. package/dist/lib/components/AcBanner.vue.d.ts +1 -1
  32. package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +30 -30
  33. package/dist/lib/components/AcBarChart.js +5 -0
  34. package/dist/lib/components/AcBarChart.vue.d.ts +46 -0
  35. package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +213 -0
  36. package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
  37. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +36 -34
  38. package/dist/lib/components/AcBulkActionBar.js +5 -0
  39. package/dist/lib/components/AcBulkActionBar.vue.d.ts +45 -0
  40. package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
  41. package/dist/lib/components/AcButton.vue.d.ts +13 -7
  42. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +93 -47
  43. package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
  44. package/dist/lib/components/AcCard.vue.d.ts +42 -3
  45. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +175 -14
  46. package/dist/lib/components/AcCellValue.vue.d.ts +6 -3
  47. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +219 -178
  48. package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
  49. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +113 -30
  50. package/dist/lib/components/AcCheckList.js +5 -0
  51. package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
  52. package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
  53. package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
  54. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +102 -26
  55. package/dist/lib/components/AcCircularProgress.js +5 -0
  56. package/dist/lib/components/AcCircularProgress.vue.d.ts +44 -0
  57. package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +114 -0
  58. package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +142 -167
  59. package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +9 -9
  60. package/dist/lib/components/AcColorInput.js +5 -0
  61. package/dist/lib/components/AcColorInput.vue.d.ts +57 -0
  62. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +217 -0
  63. package/dist/lib/components/AcCommandBlock.js +5 -0
  64. package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
  65. package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -0
  66. package/dist/lib/components/AcConfirmModal.js +5 -0
  67. package/dist/lib/components/AcConfirmModal.vue.d.ts +56 -0
  68. package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +96 -0
  69. package/dist/lib/components/AcContentHeader.vue.d.ts +1 -1
  70. package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +5 -4
  71. package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +2 -2
  72. package/dist/lib/components/AcCopyButton.js +5 -0
  73. package/dist/lib/components/AcCopyButton.vue.d.ts +43 -0
  74. package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +92 -0
  75. package/dist/lib/components/AcCostSummary.js +5 -0
  76. package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
  77. package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
  78. package/dist/lib/components/AcDatePicker.vue.d.ts +8 -8
  79. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +634 -417
  80. package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
  81. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +57 -60
  82. package/dist/lib/components/AcDonutChart.js +5 -0
  83. package/dist/lib/components/AcDonutChart.vue.d.ts +83 -0
  84. package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +237 -0
  85. package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
  86. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +91 -78
  87. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
  88. package/dist/lib/components/AcDropdownItem.vue.d.ts +2 -2
  89. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +18 -18
  90. package/dist/lib/components/AcEmptyState.vue.d.ts +4 -1
  91. package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +50 -39
  92. package/dist/lib/components/AcErrorState.js +5 -0
  93. package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
  94. package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
  95. package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
  96. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +139 -116
  97. package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +16 -16
  98. package/dist/lib/components/AcFileUpload.vue.d.ts +2 -2
  99. package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +55 -53
  100. package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +2 -2
  101. package/dist/lib/components/AcFooter.js +5 -0
  102. package/dist/lib/components/AcFooter.vue.d.ts +37 -0
  103. package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +107 -0
  104. package/dist/lib/components/AcForm.vue.d.ts +3 -0
  105. package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +4 -2
  106. package/dist/lib/components/AcFormArray.vue.d.ts +2 -2
  107. package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +149 -147
  108. package/dist/lib/components/AcFormFooter.vue.d.ts +3 -3
  109. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
  110. package/dist/lib/components/AcFormSection.vue.d.ts +8 -1
  111. package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
  112. package/dist/lib/components/AcGraphChart.js +5 -0
  113. package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
  114. package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
  115. package/dist/lib/components/AcHeader.vue.d.ts +20 -5
  116. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +82 -28
  117. package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
  118. package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
  119. package/dist/lib/components/AcInput.vue.d.ts +4 -4
  120. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +99 -91
  121. package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +1 -1
  122. package/dist/lib/components/AcKeyValueInput.js +5 -0
  123. package/dist/lib/components/AcKeyValueInput.vue.d.ts +114 -0
  124. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +336 -0
  125. package/dist/lib/components/AcLineChart.js +5 -0
  126. package/dist/lib/components/AcLineChart.vue.d.ts +44 -0
  127. package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +175 -0
  128. package/dist/lib/components/AcLoader.js +5 -0
  129. package/dist/lib/components/AcLoader.vue.d.ts +15 -0
  130. package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
  131. package/dist/lib/components/AcLocaleSwitcher.js +5 -0
  132. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +48 -0
  133. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +111 -0
  134. package/dist/lib/components/AcMapChart.js +5 -0
  135. package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
  136. package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
  137. package/dist/lib/components/AcModal.vue.d.ts +6 -3
  138. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +88 -64
  139. package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
  140. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +29 -21
  141. package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
  142. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +23 -24
  143. package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
  144. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +139 -174
  145. package/dist/lib/components/AcNumberInput.js +5 -0
  146. package/dist/lib/components/AcNumberInput.vue.d.ts +79 -0
  147. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +241 -0
  148. package/dist/lib/components/AcPage.vue.d.ts +2 -2
  149. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +2 -2
  150. package/dist/lib/components/AcPagination.vue.d.ts +22 -5
  151. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +87 -56
  152. package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
  153. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
  154. package/dist/lib/components/AcProductHero.js +5 -0
  155. package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
  156. package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
  157. package/dist/lib/components/AcProgress.vue.d.ts +19 -4
  158. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +85 -31
  159. package/dist/lib/components/AcResourceCard.vue.d.ts +3 -3
  160. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +17 -17
  161. package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
  162. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +14 -9
  163. package/dist/lib/components/AcSectionContent.vue.d.ts +2 -2
  164. package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +8 -8
  165. package/dist/lib/components/AcSegmentedControl.vue.d.ts +1 -1
  166. package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +4 -4
  167. package/dist/lib/components/AcSelect.vue.d.ts +6 -6
  168. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +246 -254
  169. package/dist/lib/components/AcSettingsRow.js +5 -0
  170. package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
  171. package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
  172. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +32 -32
  173. package/dist/lib/components/AcSideTabs.vue.d.ts +2 -2
  174. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
  175. package/dist/lib/components/AcSidebar.vue.d.ts +6 -3
  176. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +67 -57
  177. package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
  178. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +46 -45
  179. package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
  180. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
  181. package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +8 -8
  182. package/dist/lib/components/AcSlider.vue.d.ts +1 -1
  183. package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +174 -172
  184. package/dist/lib/components/AcStatCard.vue.d.ts +3 -3
  185. package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +90 -85
  186. package/dist/lib/components/AcStatusBar.vue.d.ts +1 -1
  187. package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +6 -6
  188. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +28 -28
  189. package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
  190. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +31 -19
  191. package/dist/lib/components/AcSwitchCard.js +5 -0
  192. package/dist/lib/components/AcSwitchCard.vue.d.ts +59 -0
  193. package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +121 -0
  194. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +97 -97
  195. package/dist/lib/components/AcTabs.vue.d.ts +9 -2
  196. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +43 -28
  197. package/dist/lib/components/AcTag.vue.d.ts +2 -2
  198. package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +22 -22
  199. package/dist/lib/components/AcTagInput.js +5 -0
  200. package/dist/lib/components/AcTagInput.vue.d.ts +74 -0
  201. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +289 -0
  202. package/dist/lib/components/AcTextarea.vue.d.ts +4 -4
  203. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +85 -63
  204. package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
  205. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +56 -24
  206. package/dist/lib/components/AcTimePicker.js +5 -0
  207. package/dist/lib/components/AcTimePicker.vue.d.ts +65 -0
  208. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +455 -0
  209. package/dist/lib/components/AcToaster.vue.d.ts +6 -3
  210. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +115 -82
  211. package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
  212. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +203 -79
  213. package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
  214. package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
  215. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +166 -115
  216. package/dist/lib/components/index.d.ts +21 -2
  217. package/dist/lib/components/status.d.ts +28 -0
  218. package/dist/lib/components/status.js +125 -0
  219. package/dist/lib/composables/copyText.d.ts +2 -1
  220. package/dist/lib/composables/copyText.js +2 -2
  221. package/dist/lib/composables/useApiPagination.d.ts +55 -0
  222. package/dist/lib/composables/useApiPagination.js +58 -0
  223. package/dist/lib/composables/useBulkSelection.d.ts +44 -0
  224. package/dist/lib/composables/useBulkSelection.js +41 -0
  225. package/dist/lib/composables/useFormValidation.d.ts +65 -0
  226. package/dist/lib/composables/useFormValidation.js +148 -0
  227. package/dist/lib/composables/useTablePagination.d.ts +49 -0
  228. package/dist/lib/composables/useTablePagination.js +41 -0
  229. package/dist/lib/composables/useToast.d.ts +17 -1
  230. package/dist/lib/composables/useToast.js +10 -2
  231. package/dist/lib/editor/theme.js +65 -62
  232. package/dist/lib/index.d.ts +21 -3
  233. package/dist/lib/index.js +99 -75
  234. package/dist/lib/theme.css +377 -273
  235. package/package.json +20 -4
@@ -1,24 +1,28 @@
1
- import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, normalizeClass as o, normalizeStyle as s, openBlock as c, renderSlot as l, toDisplayString as u, unref as d } from "vue";
2
- import { ArrowLeft as f } from "@lucide/vue";
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, openBlock as d, renderSlot as f, resolveDynamicComponent as p, toDisplayString as m, unref as h } from "vue";
2
+ import { ArrowLeft as g, BookOpen as _, SquareArrowOutUpRight as v } from "@lucide/vue";
3
3
  //#region src/lib/components/AcHeader.vue?vue&type=script&setup=true&lang.ts
4
- var p = { class: "flex min-w-0 items-center gap-3.5" }, m = {
5
- key: 1,
6
- class: "inline-flex size-11 shrink-0 items-center justify-center overflow-hidden rounded-10 border border-border-light bg-surface p-2 text-label shadow-xs ring-1 ring-black/[0.02] [&_img]:size-full [&_img]:object-contain [&_svg]:size-5",
7
- "aria-hidden": "true"
8
- }, h = { class: "min-w-0" }, g = {
4
+ var y = {
9
5
  key: 0,
10
- class: "mb-1 text-xs text-muted"
11
- }, _ = { class: "flex min-w-0 items-center gap-2.5" }, v = {
6
+ class: "mb-4"
7
+ }, b = { class: "min-w-0" }, x = {
12
8
  key: 0,
13
- class: "mt-px truncate text-sm leading-5 text-muted"
14
- }, y = {
9
+ class: "mb-2"
10
+ }, S = { class: "flex min-w-0 flex-wrap items-center gap-2.5" }, C = {
15
11
  key: 0,
16
- class: "flex flex-wrap items-center gap-2"
17
- }, b = /*@__PURE__*/ a({
12
+ class: "inline-flex items-center rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium whitespace-nowrap text-primary-strong",
13
+ "data-testid": "ac-header-count"
14
+ }, w = {
15
+ key: 1,
16
+ class: "mt-2"
17
+ }, T = ["href"], E = /*@__PURE__*/ c({
18
18
  __name: "AcHeader",
19
19
  props: {
20
20
  title: { default: "" },
21
21
  subtitle: { default: "" },
22
+ variant: { default: "bar" },
23
+ icon: { default: void 0 },
24
+ countLabel: { default: "" },
25
+ docsHref: { default: "" },
22
26
  backButton: {
23
27
  type: Boolean,
24
28
  default: !1
@@ -31,30 +35,80 @@ var p = { class: "flex min-w-0 items-center gap-3.5" }, m = {
31
35
  size: { default: "normal" }
32
36
  },
33
37
  emits: ["back"],
34
- setup(a, { emit: b }) {
35
- let x = a, S = e(() => x.size === "compact"), C = b;
36
- return (e, b) => (c(), n("header", {
37
- class: o(["z-20 border-b border-border-light bg-surface/85 shadow-[0_1px_2px_0_rgb(15_23_42/0.03)] backdrop-blur-md backdrop-saturate-150", a.sticky && "sticky"]),
38
- style: s(a.sticky ? { top: a.top } : void 0),
38
+ setup(c, { emit: E }) {
39
+ let D = c, O = E, k = t(() => D.size === "compact"), A = t(() => D.variant === "hero"), j = t(() => D.variant === "bar" ? ["z-20 border-b border-border/80 bg-surface/90 backdrop-blur-sm", D.sticky && "sticky"] : D.sticky && "sticky z-20 bg-background/90 backdrop-blur-sm"), M = t(() => D.variant === "bar" ? ["flex-wrap items-center gap-x-6 gap-y-4", k.value ? "px-4 py-3 sm:px-6" : "px-4 py-5 sm:px-6"] : ["flex-col gap-4 sm:flex-row sm:items-center", D.variant === "plain" && k.value && "py-2"]), N = t(() => A.value ? "size-12 rounded-14 border border-primary/25 bg-surface text-primary-strong shadow-sm ring-4 ring-primary/5 [&_svg]:size-6" : ["bg-primary text-white has-[img]:border has-[img]:border-border has-[img]:bg-surface has-[img]:p-2 [&_img]:size-full [&_img]:object-contain", k.value ? "size-9 rounded-10 [&_svg]:size-5" : "size-11 rounded-14 [&_svg]:size-6"]), P = t(() => A.value ? "text-3xl text-balance sm:text-[28px]" : ["truncate", k.value ? "text-lg" : "text-2xl md:text-3xl"]);
40
+ return (t, E) => (d(), i("header", {
41
+ class: l(j.value),
42
+ style: u(c.sticky ? { top: c.top } : void 0),
39
43
  "data-ac-ds": "",
40
44
  "data-testid": "ac-header"
41
- }, [r("div", { class: o(["flex flex-wrap items-center justify-between gap-x-6 gap-y-3", S.value ? "px-5 py-2.5" : "px-6 py-3.5"]) }, [r("div", p, [
42
- a.backButton ? (c(), n("button", {
45
+ }, [A.value && t.$slots.breadcrumb ? (d(), i("div", y, [f(t.$slots, "breadcrumb")])) : r("", !0), a("div", { class: l(A.value && "relative isolate overflow-hidden rounded-16 border border-border bg-surface px-5 py-5 shadow-xs sm:px-7 sm:py-6") }, [A.value ? (d(), i(e, { key: 0 }, [
46
+ E[1] ||= a("div", {
47
+ class: "absolute inset-0 -z-10 bg-linear-to-br from-primary/10 via-primary/3 to-transparent",
48
+ "aria-hidden": "true"
49
+ }, null, -1),
50
+ E[2] ||= a("div", {
51
+ class: "absolute inset-0 -z-10 bg-[radial-gradient(circle_at_1px_1px,var(--color-border)_1px,transparent_0)] bg-size-[18px_18px] [mask-image:linear-gradient(to_left,black,transparent_60%)]",
52
+ "aria-hidden": "true"
53
+ }, null, -1),
54
+ c.icon ? (d(), n(p(c.icon), {
55
+ key: 0,
56
+ class: "absolute -right-8 -bottom-12 -z-10 size-48 text-primary/6",
57
+ "aria-hidden": "true"
58
+ })) : r("", !0)
59
+ ], 64)) : r("", !0), a("div", { class: l(["flex justify-between", M.value]) }, [a("div", { class: l(["flex min-w-0 items-center gap-3.5", A.value && "gap-4"]) }, [
60
+ c.backButton ? (d(), i("button", {
43
61
  key: 0,
44
62
  type: "button",
45
- class: "inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-8 border border-border bg-surface text-label shadow-xs transition hover:border-border-dark hover:bg-surface-muted hover:text-heading active:scale-95 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
63
+ class: "inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-10 border border-border bg-surface text-heading transition-[color,background-color,border-color,box-shadow,transform] duration-200 hover:bg-surface-sunken/70 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none active:translate-y-px motion-reduce:active:translate-y-0",
46
64
  "aria-label": "Back",
47
65
  "data-ac-ds": "",
48
66
  "data-testid": "ac-header-back",
49
- onClick: b[0] ||= (e) => C("back")
50
- }, [i(d(f), {
67
+ onClick: E[0] ||= (e) => O("back")
68
+ }, [s(h(g), {
51
69
  class: "size-4",
52
70
  "aria-hidden": "true"
53
- })])) : t("", !0),
54
- e.$slots.icon ? (c(), n("span", m, [l(e.$slots, "icon")])) : t("", !0),
55
- r("div", h, [e.$slots.breadcrumb ? (c(), n("div", g, [l(e.$slots, "breadcrumb")])) : t("", !0), l(e.$slots, "title", {}, () => [r("div", _, [r("h4", { class: o(["truncate font-semibold text-heading", S.value ? "text-lg leading-6 tracking-[-0.01em]" : "text-xl leading-7 tracking-tight"]) }, u(a.title), 3), l(e.$slots, "title-extra")]), a.subtitle ? (c(), n("p", v, u(a.subtitle), 1)) : t("", !0)])])
56
- ]), e.$slots.default ? (c(), n("div", y, [l(e.$slots, "default")])) : t("", !0)], 2)], 6));
71
+ })])) : r("", !0),
72
+ t.$slots.icon || c.icon ? (d(), i("span", {
73
+ key: 1,
74
+ class: l(["inline-flex shrink-0 items-center justify-center overflow-hidden", N.value]),
75
+ "aria-hidden": "true"
76
+ }, [f(t.$slots, "icon", {}, () => [(d(), n(p(c.icon)))])], 2)) : r("", !0),
77
+ a("div", b, [
78
+ !A.value && t.$slots.breadcrumb ? (d(), i("div", x, [f(t.$slots, "breadcrumb")])) : r("", !0),
79
+ f(t.$slots, "title", {}, () => [a("div", S, [
80
+ a("h4", { class: l(["font-heading font-semibold tracking-tight text-heading", P.value]) }, m(c.title), 3),
81
+ c.countLabel ? (d(), i("span", C, m(c.countLabel), 1)) : r("", !0),
82
+ f(t.$slots, "title-extra")
83
+ ]), c.subtitle ? (d(), i("p", {
84
+ key: 0,
85
+ class: l(["mt-1 max-w-prose text-base text-muted", c.variant === "bar" ? "truncate" : "leading-relaxed"])
86
+ }, m(c.subtitle), 3)) : r("", !0)]),
87
+ t.$slots.meta ? (d(), i("div", w, [f(t.$slots, "meta")])) : r("", !0)
88
+ ])
89
+ ], 2), t.$slots.default || c.docsHref ? (d(), i("div", {
90
+ key: 0,
91
+ class: l(["flex shrink-0 flex-wrap items-center gap-2", A.value && "self-start sm:self-center"])
92
+ }, [c.docsHref ? (d(), i("a", {
93
+ key: 0,
94
+ href: c.docsHref,
95
+ target: "_blank",
96
+ rel: "noopener noreferrer",
97
+ class: "inline-flex h-8 items-center gap-2 rounded-10 border border-border bg-background/80 px-3 text-base font-medium text-heading shadow-xs backdrop-blur-sm transition-colors duration-200 hover:border-primary/40 hover:text-primary-strong focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none",
98
+ "data-testid": "ac-header-docs"
99
+ }, [
100
+ s(h(_), {
101
+ class: "size-4",
102
+ "aria-hidden": "true"
103
+ }),
104
+ E[3] ||= o(" Documentation ", -1),
105
+ s(h(v), {
106
+ class: "size-3 text-muted",
107
+ "aria-hidden": "true"
108
+ }),
109
+ E[4] ||= a("span", { class: "sr-only" }, "(opens in a new tab)", -1)
110
+ ], 8, T)) : r("", !0), f(t.$slots, "default")], 2)) : r("", !0)], 2)], 2)], 6));
57
111
  }
58
112
  });
59
113
  //#endregion
60
- export { b as default };
114
+ export { E as default };
@@ -46,8 +46,8 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
46
46
  loading: boolean;
47
47
  items: InfoItem[];
48
48
  emptyText: string;
49
- layout: "horizontal" | "stacked";
50
49
  columns: 1 | 2;
50
+ layout: "horizontal" | "stacked";
51
51
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
52
52
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
53
53
  declare const _default: typeof __VLS_export;
@@ -5,7 +5,7 @@ import { Check as b, Copy as x, Eye as S, EyeOff as C } from "@lucide/vue";
5
5
  //#region src/lib/components/AcInfoTable.vue?vue&type=script&setup=true&lang.ts
6
6
  var w = {
7
7
  key: 0,
8
- class: "text-lg leading-6 font-semibold tracking-[-0.01em] text-heading"
8
+ class: "font-heading text-lg leading-tight font-semibold tracking-tight text-heading"
9
9
  }, T = {
10
10
  key: 1,
11
11
  class: "ml-auto flex shrink-0 items-center gap-2"
@@ -48,10 +48,14 @@ var w = {
48
48
  item: e,
49
49
  key: e.key ?? e.label
50
50
  }))), z = r(() => [
51
- "min-w-0 border-t border-border-light py-2.5 first:border-t-0",
51
+ "min-w-0 border-t border-border py-3.5 first:border-t-0",
52
52
  N.columns === 2 && "md:[&:nth-child(2)]:border-t-0",
53
- N.layout === "horizontal" ? "flex flex-col gap-0.5 sm:flex-row sm:items-baseline sm:gap-4" : "flex flex-col gap-1"
54
- ]), B = r(() => ["flex items-center gap-1.5 text-base text-muted", N.layout === "horizontal" && (N.columns === 2 ? "sm:w-36 sm:shrink-0" : "sm:w-48 sm:shrink-0")]);
53
+ N.layout === "horizontal" ? "flex flex-col gap-1 sm:flex-row sm:items-baseline sm:gap-4" : "flex flex-col gap-1"
54
+ ]), B = r(() => [
55
+ "flex items-center gap-2 text-muted",
56
+ N.layout === "stacked" ? "text-xs font-medium" : "text-base",
57
+ N.layout === "horizontal" && (N.columns === 2 ? "sm:w-36 sm:shrink-0" : "sm:w-48 sm:shrink-0")
58
+ ]);
55
59
  function V(e) {
56
60
  return e == null || e === "";
57
61
  }
@@ -65,34 +69,34 @@ var w = {
65
69
  } catch {}
66
70
  }
67
71
  return d(() => clearTimeout(L)), (t, r) => (f(), o("div", {
68
- class: u(l.bordered && "rounded-10 border border-border bg-surface shadow-xs"),
72
+ class: u(l.bordered && "rounded-14 border border-border bg-surface"),
69
73
  "data-ac-ds": "",
70
74
  "data-testid": "ac-info-table"
71
75
  }, [l.title || t.$slots.actions ? (f(), o("div", {
72
76
  key: 0,
73
- class: u(["flex items-center justify-between gap-4", l.bordered ? "border-b border-border-light px-5 py-3.5" : "mb-2"])
77
+ class: u(["flex items-center justify-between gap-4", l.bordered ? "border-b border-border px-6 pt-5 pb-3" : "mb-2"])
74
78
  }, [l.title ? (f(), o("h3", w, _(l.title), 1)) : a("", !0), t.$slots.actions ? (f(), o("div", T, [h(t.$slots, "actions")])) : a("", !0)], 2)) : a("", !0), !l.loading && !l.items.length ? (f(), o("p", {
75
79
  key: 1,
76
- class: u(["py-6 text-center text-base text-muted", l.bordered && "px-5"])
80
+ class: u(["py-10 text-center text-base text-muted", l.bordered && "px-6"])
77
81
  }, _(l.emptyText), 3)) : (f(), o("dl", {
78
82
  key: 2,
79
- class: u(["grid", [l.columns === 2 && "md:grid-cols-2 md:gap-x-10", l.bordered ? "px-5 py-2" : ""]]),
83
+ class: u(["grid", [l.columns === 2 && "md:grid-cols-2 md:gap-x-10", l.bordered ? "px-6 py-1" : ""]]),
80
84
  "aria-busy": l.loading || void 0
81
85
  }, [l.loading && !l.items.length ? (f(), o(n, { key: 0 }, m(P, (e, t) => s("div", {
82
86
  key: t,
83
87
  class: u(z.value)
84
- }, [s("dt", { class: u(B.value) }, [...r[0] ||= [s("span", { class: "h-3 w-20 animate-pulse rounded-4 bg-surface-sunken" }, null, -1)]], 2), s("dd", D, [s("span", { class: u(["h-3 animate-pulse rounded-4 bg-surface-sunken", e]) }, null, 2)])], 2)), 64)) : a("", !0), (f(!0), o(n, null, m(R.value, ({ item: n, key: r }, d) => (f(), o("div", {
88
+ }, [s("dt", { class: u(B.value) }, [...r[0] ||= [s("span", { class: "h-3 w-20 animate-pulse rounded-full bg-surface-sunken" }, null, -1)]], 2), s("dd", D, [s("span", { class: u(["h-3 animate-pulse rounded-full bg-surface-sunken", e]) }, null, 2)])], 2)), 64)) : a("", !0), (f(!0), o(n, null, m(R.value, ({ item: n, key: r }, d) => (f(), o("div", {
85
89
  key: r,
86
90
  class: u(z.value)
87
91
  }, [s("dt", { class: u(B.value) }, [h(t.$slots, `label-${r}`, { item: n }, () => [c(_(n.label), 1)])], 2), s("dd", O, [l.loading ? (f(), o("span", {
88
92
  key: 0,
89
- class: u(["h-3 animate-pulse rounded-4 bg-surface-sunken", P[d % P.length]])
93
+ class: u(["h-3 animate-pulse rounded-full bg-surface-sunken", P[d % P.length]])
90
94
  }, null, 2)) : h(t.$slots, `value-${r}`, { item: n }, () => [V(n.value) ? (f(), o("span", k, "—")) : (f(), o("span", A, [
91
95
  s("span", { class: u(["min-w-0 [overflow-wrap:anywhere]", (n.mono || n.secret) && "font-mono text-xs leading-5"]) }, _(n.secret && !I.value.has(r) ? "••••••••••••" : n.value), 3),
92
96
  n.secret ? (f(), o("button", {
93
97
  key: 0,
94
98
  type: "button",
95
- class: "-my-0.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",
99
+ class: "-my-0.5 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
96
100
  "aria-label": I.value.has(r) ? `Hide ${n.label}` : `Show ${n.label}`,
97
101
  "aria-pressed": I.value.has(r),
98
102
  onClick: (e) => H(r)
@@ -106,12 +110,12 @@ var w = {
106
110
  }, {
107
111
  default: y(() => [s("button", {
108
112
  type: "button",
109
- class: "-my-0.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",
113
+ class: "-my-0.5 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
110
114
  "aria-label": F.value === r ? `${n.label} copied` : `Copy ${n.label}`,
111
115
  onClick: (e) => U(r, n.value)
112
116
  }, [F.value === r ? (f(), i(v(b), {
113
117
  key: 0,
114
- class: "size-3.5 text-success",
118
+ class: "size-3.5 text-success-strong",
115
119
  "aria-hidden": "true"
116
120
  })) : (f(), i(v(x), {
117
121
  key: 1,
@@ -1,6 +1,6 @@
1
1
  import type { Component } from "vue";
2
2
  export interface Props {
3
- /** Floating label. It rests inside the field and rises on focus or when filled. With a `prefix`, it always sits on the top edge. */
3
+ /** Label above the field. Pass `placeholder` for an example value inside it. */
4
4
  label: string;
5
5
  /** Native `name` attribute. */
6
6
  name?: string;
@@ -10,13 +10,13 @@ export interface Props {
10
10
  required?: boolean;
11
11
  /** Disables the field. */
12
12
  disabled?: boolean;
13
- /** Read-only field with a gray background. */
13
+ /** Read-only field: a muted fill, and "(read only)" after the label. */
14
14
  readonly?: boolean;
15
15
  /** Error text under the field. Turns the border and label red and sets `aria-invalid`. */
16
16
  errorMsg?: string;
17
- /** Helper text under the field (hidden while `errorMsg` is set). */
17
+ /** Help text between the label and the field. */
18
18
  hint?: string;
19
- /** `small` 36px or `normal` 40px tall. */
19
+ /** `small` 36px or `normal` 42px tall. */
20
20
  size?: "small" | "normal";
21
21
  /** Text of a button attached to the right edge, such as "Copy", "Generate" or "Browse". It emits `addon` when clicked. Also its accessible name when `addon-icon-only` is set. */
22
22
  addonLabel?: string;
@@ -1,10 +1,14 @@
1
- import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeModels as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, renderSlot as p, resolveDynamicComponent as m, toDisplayString as h, unref as g, useAttrs as _, useId as v, useModel as y, useSlots as b, vModelDynamic as x, withDirectives as S } from "vue";
2
- import { CircleAlert as C, Eye as w, EyeOff as T } from "@lucide/vue";
1
+ import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, normalizeClass as c, openBlock as l, ref as u, renderSlot as d, resolveDynamicComponent as f, toDisplayString as p, unref as m, useAttrs as h, useId as g, useModel as _, useSlots as v, vModelDynamic as y, withDirectives as b } from "vue";
2
+ import { Eye as x, EyeOff as S } from "@lucide/vue";
3
3
  //#region src/lib/components/AcInput.vue?vue&type=script&setup=true&lang.ts
4
- var E = { class: "flex" }, D = {
4
+ var C = ["for"], w = {
5
5
  key: 0,
6
- class: "flex h-full shrink-0 items-center pl-3 text-base whitespace-nowrap text-muted select-none [&_svg]:size-4"
7
- }, O = [
6
+ class: "text-muted"
7
+ }, T = {
8
+ key: 1,
9
+ class: "text-danger",
10
+ "aria-hidden": "true"
11
+ }, E = ["id"], D = { class: "flex" }, O = [
8
12
  "id",
9
13
  "name",
10
14
  "type",
@@ -13,18 +17,14 @@ var E = { class: "flex" }, D = {
13
17
  "required",
14
18
  "aria-invalid",
15
19
  "aria-describedby"
16
- ], k = ["for"], A = {
17
- key: 0,
18
- class: "text-danger",
19
- "aria-hidden": "true"
20
- }, j = ["aria-label"], M = [
20
+ ], k = ["aria-label", "aria-pressed"], A = [
21
21
  "disabled",
22
22
  "aria-label",
23
23
  "title"
24
- ], N = { key: 1 }, P = ["id"], F = ["id"], I = /*@__PURE__*/ s({
24
+ ], j = { key: 1 }, M = ["id"], N = /*@__PURE__*/ a({
25
25
  inheritAttrs: !1,
26
26
  __name: "AcInput",
27
- props: /*@__PURE__*/ c({
27
+ props: /*@__PURE__*/ o({
28
28
  label: {},
29
29
  name: { default: "" },
30
30
  type: { default: "text" },
@@ -42,7 +42,7 @@ var E = { class: "flex" }, D = {
42
42
  },
43
43
  errorMsg: { default: "" },
44
44
  hint: { default: "" },
45
- size: { default: "small" },
45
+ size: { default: "normal" },
46
46
  addonLabel: { default: "" },
47
47
  addonIcon: { default: void 0 },
48
48
  addonIconOnly: {
@@ -53,91 +53,99 @@ var E = { class: "flex" }, D = {
53
53
  modelValue: { default: "" },
54
54
  modelModifiers: {}
55
55
  }),
56
- emits: /*@__PURE__*/ c(["addon"], ["update:modelValue"]),
57
- setup(s, { expose: c, emit: I }) {
58
- let L = s, R = y(s, "modelValue"), z = I, B = v(), V = _(), H = b(), U = e(() => ({
59
- class: V.class,
60
- style: V.style
61
- })), W = e(() => {
62
- let { class: e, style: t, ...n } = V;
56
+ emits: /*@__PURE__*/ o(["addon"], ["update:modelValue"]),
57
+ setup(a, { expose: o, emit: N }) {
58
+ let P = a, F = _(a, "modelValue"), I = N, L = g(), R = h(), z = v(), B = e(() => ({
59
+ class: R.class,
60
+ style: R.style
61
+ })), V = e(() => {
62
+ let { class: e, style: t, ...n } = R;
63
63
  return n;
64
- }), G = f(null), K = f(!1), q = e(() => L.type === "password" && K.value ? "text" : L.type), J = e(() => L.errorMsg || L.hint ? `${B}-msg` : void 0), Y = e(() => !!L.addonLabel || !!L.addonIcon), X = e(() => !!H.suffix || L.type === "password");
65
- function Z(e) {
66
- L.disabled || z("addon", e);
64
+ }), H = u(null), U = u(!1), W = e(() => P.type === "password" && U.value ? "text" : P.type), G = e(() => [P.hint && `${L}-hint`, P.errorMsg && `${L}-msg`].filter(Boolean).join(" ") || void 0), K = e(() => !!P.addonLabel || !!P.addonIcon), q = e(() => !!z.suffix || P.type === "password");
65
+ function J(e) {
66
+ P.disabled || I("addon", e);
67
67
  }
68
- return c({ focus: () => G.value?.focus() }), (e, c) => (d(), r("div", l(U.value, {
69
- class: ["w-full", s.disabled && "opacity-60"],
68
+ return o({ focus: () => H.value?.focus() }), (e, o) => (l(), r("div", s(B.value, {
69
+ class: ["w-full", a.disabled && "opacity-50"],
70
70
  "data-ac-ds": "",
71
71
  "data-testid": "ac-input"
72
- }), [i("div", E, [i("div", { class: u(["relative flex min-w-0 flex-1 items-center border shadow-xs transition-[border-color,box-shadow] duration-150", [
73
- s.size === "small" ? "h-9" : "h-10",
74
- Y.value ? "rounded-l-6" : "rounded-6",
75
- s.disabled || s.readonly ? "bg-surface-muted" : "bg-surface",
76
- s.readonly && "shadow-none",
77
- s.errorMsg ? "border-red-60 focus-within:border-danger focus-within:shadow-[0_0_0_3px_var(--color-red-90)]" : "border-border hover:border-border-dark focus-within:focus-ring"
78
- ]]) }, [
79
- e.$slots.prefix ? (d(), r("span", D, [p(e.$slots, "prefix")])) : n("", !0),
80
- S(i("input", l({
81
- id: g(B),
82
- ref_key: "input",
83
- ref: G
84
- }, W.value, {
85
- "onUpdate:modelValue": c[0] ||= (e) => R.value = e,
86
- name: s.name,
87
- type: q.value,
88
- disabled: s.disabled,
89
- readonly: s.readonly,
90
- required: s.required,
91
- "aria-invalid": !!s.errorMsg || void 0,
92
- "aria-describedby": J.value,
93
- placeholder: " ",
94
- class: ["peer block h-full w-full min-w-0 flex-1 rounded-6 bg-transparent text-base text-heading outline-none placeholder:text-transparent disabled:cursor-not-allowed", [e.$slots.prefix ? "pl-1" : "pl-3", X.value ? "pr-1.5" : "pr-3"]]
95
- }), null, 16, O), [[x, R.value]]),
72
+ }), [
96
73
  i("label", {
97
- for: g(B),
98
- class: u(["pointer-events-none absolute -top-px left-2.25 max-w-[calc(100%-20px)] -translate-y-1/2 truncate rounded-2 bg-surface px-1 text-xs font-medium whitespace-nowrap text-label transition-all duration-150 ease-out peer-focus:text-primary-20 peer-read-only:bg-linear-to-b peer-read-only:from-surface peer-read-only:from-50% peer-read-only:to-surface-muted peer-read-only:to-50% peer-disabled:bg-linear-to-b peer-disabled:from-surface peer-disabled:from-50% peer-disabled:to-surface-muted peer-disabled:to-50%", [!e.$slots.prefix && "peer-placeholder-shown:top-1/2 peer-placeholder-shown:text-base peer-placeholder-shown:font-normal peer-placeholder-shown:text-muted peer-focus:-top-px peer-focus:text-xs peer-focus:font-medium", s.errorMsg && "text-red-30! peer-focus:text-red-30!"]])
99
- }, [a(h(s.label), 1), s.required ? (d(), r("span", A, " *")) : n("", !0)], 10, k),
100
- e.$slots.suffix ? (d(), r("span", {
101
- key: 1,
102
- class: u(["relative flex h-full shrink-0 items-center bg-inherit text-base whitespace-nowrap text-muted select-none [&_svg]:size-4", s.type === "password" ? "pr-1" : "pr-3"])
103
- }, [p(e.$slots, "suffix")], 2)) : n("", !0),
104
- s.type === "password" ? (d(), r("button", {
105
- key: 2,
74
+ for: m(L),
75
+ class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
76
+ }, [
77
+ i("span", null, p(a.label), 1),
78
+ a.readonly ? (l(), r("span", w, "(read only)")) : n("", !0),
79
+ a.required ? (l(), r("span", T, "*")) : n("", !0)
80
+ ], 8, C),
81
+ a.hint ? (l(), r("p", {
82
+ key: 0,
83
+ id: `${m(L)}-hint`,
84
+ class: "mb-2 text-base text-muted"
85
+ }, p(a.hint), 9, E)) : n("", !0),
86
+ i("div", D, [i("div", { class: c(["relative flex min-w-0 flex-1 items-center border transition-[border-color,box-shadow,background-color] duration-200", [
87
+ a.size === "small" ? "h-9" : "h-10.5",
88
+ K.value ? "rounded-l-10" : "rounded-10",
89
+ a.readonly ? "bg-surface-muted" : "bg-background",
90
+ a.errorMsg ? "border-danger/50 focus-within:border-danger focus-within:shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]" : ["border-border focus-within:focus-ring", !a.disabled && "hover:border-accent-active"]
91
+ ]]) }, [
92
+ e.$slots.prefix ? (l(), r("span", {
93
+ key: 0,
94
+ class: c(["flex h-full shrink-0 items-center text-base whitespace-nowrap text-muted select-none [&_svg]:size-4", a.size === "small" ? "pl-3" : "pl-4"])
95
+ }, [d(e.$slots, "prefix")], 2)) : n("", !0),
96
+ b(i("input", s({
97
+ id: m(L),
98
+ ref_key: "input",
99
+ ref: H
100
+ }, V.value, {
101
+ "onUpdate:modelValue": o[0] ||= (e) => F.value = e,
102
+ name: a.name,
103
+ type: W.value,
104
+ disabled: a.disabled,
105
+ readonly: a.readonly,
106
+ required: a.required,
107
+ "aria-invalid": !!a.errorMsg || void 0,
108
+ "aria-describedby": G.value,
109
+ class: ["block h-full w-full min-w-0 flex-1 rounded-10 bg-transparent text-base font-normal text-heading outline-none placeholder:text-muted/80 disabled:cursor-not-allowed", [e.$slots.prefix ? "pl-2" : a.size === "small" ? "pl-4" : "pl-5", q.value ? "pr-2" : a.size === "small" ? "pr-4" : "pr-5"]]
110
+ }), null, 16, O), [[y, F.value]]),
111
+ e.$slots.suffix ? (l(), r("span", {
112
+ key: 1,
113
+ class: c(["relative flex h-full shrink-0 items-center text-base whitespace-nowrap text-muted select-none [&_svg]:size-4", a.type === "password" ? "pr-2" : a.size === "small" ? "pr-3" : "pr-4"])
114
+ }, [d(e.$slots, "suffix")], 2)) : n("", !0),
115
+ a.type === "password" ? (l(), r("button", {
116
+ key: 2,
117
+ type: "button",
118
+ class: c(["relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-4 text-muted transition-colors hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none", a.size === "small" ? "mr-3" : "mr-4"]),
119
+ "aria-label": U.value ? "Hide value" : "Show value",
120
+ "aria-pressed": U.value,
121
+ onClick: o[1] ||= (e) => U.value = !U.value
122
+ }, [(l(), t(f(U.value ? m(S) : m(x)), {
123
+ class: c(a.size === "small" ? "size-4" : "size-5"),
124
+ "aria-hidden": "true"
125
+ }, null, 8, ["class"]))], 10, k)) : n("", !0)
126
+ ], 2), K.value ? (l(), r("button", {
127
+ key: 0,
106
128
  type: "button",
107
- class: "relative 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",
108
- "aria-label": K.value ? "Hide value" : "Show value",
109
- onClick: c[1] ||= (e) => K.value = !K.value
110
- }, [(d(), t(m(K.value ? g(T) : g(w)), {
111
- class: "size-4",
129
+ class: c(["relative -ml-px inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-r-10 border border-border bg-surface text-base font-medium whitespace-nowrap text-heading transition-colors duration-200 hover:bg-surface-sunken/70 focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:hover:bg-surface", [a.size === "small" ? "h-9" : "h-10.5", a.addonIconOnly ? a.size === "small" ? "w-9" : "w-10.5" : "px-4"]]),
130
+ disabled: a.disabled,
131
+ "aria-label": a.addonIconOnly ? a.addonLabel : void 0,
132
+ title: a.addonIconOnly ? a.addonLabel : void 0,
133
+ "data-ac-ds": "",
134
+ "data-testid": "ac-input-addon",
135
+ onClick: J
136
+ }, [a.addonIcon ? (l(), t(f(a.addonIcon), {
137
+ key: 0,
138
+ class: "size-4 text-muted",
112
139
  "aria-hidden": "true"
113
- }))], 8, j)) : n("", !0)
114
- ], 2), Y.value ? (d(), r("button", {
115
- key: 0,
116
- type: "button",
117
- class: u(["relative -ml-px inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-r-6 border border-border bg-surface-muted text-base font-medium whitespace-nowrap text-heading shadow-xs transition-[background-color,border-color,box-shadow] duration-150 hover:bg-surface-sunken focus-visible:z-10 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:hover:bg-surface-muted", [s.size === "small" ? "h-9" : "h-10", s.addonIconOnly ? "w-9" : "px-3"]]),
118
- disabled: s.disabled,
119
- "aria-label": s.addonIconOnly ? s.addonLabel : void 0,
120
- title: s.addonIconOnly ? s.addonLabel : void 0,
121
- "data-ac-ds": "",
122
- "data-testid": "ac-input-addon",
123
- onClick: Z
124
- }, [s.addonIcon ? (d(), t(m(s.addonIcon), {
125
- key: 0,
126
- class: "size-4 text-label",
127
- "aria-hidden": "true"
128
- })) : n("", !0), s.addonIconOnly ? n("", !0) : (d(), r("span", N, h(s.addonLabel), 1))], 10, M)) : n("", !0)]), s.errorMsg ? (d(), r("p", {
129
- key: 0,
130
- id: `${g(B)}-msg`,
131
- class: "mt-1.5 flex items-center gap-1 text-xs text-red-30"
132
- }, [o(g(C), {
133
- class: "size-3.5 shrink-0",
134
- "aria-hidden": "true"
135
- }), a(" " + h(s.errorMsg), 1)], 8, P)) : s.hint ? (d(), r("p", {
136
- key: 1,
137
- id: `${g(B)}-msg`,
138
- class: "mt-1.5 text-xs text-muted"
139
- }, h(s.hint), 9, F)) : n("", !0)], 16));
140
+ })) : n("", !0), a.addonIconOnly ? n("", !0) : (l(), r("span", j, p(a.addonLabel), 1))], 10, A)) : n("", !0)]),
141
+ a.errorMsg ? (l(), r("p", {
142
+ key: 1,
143
+ id: `${m(L)}-msg`,
144
+ class: "mt-1 text-base text-danger-strong",
145
+ role: "alert"
146
+ }, p(a.errorMsg), 9, M)) : n("", !0)
147
+ ], 16));
140
148
  }
141
149
  });
142
150
  //#endregion
143
- export { I as default };
151
+ export { N as default };
@@ -8,7 +8,7 @@ var f = {
8
8
  }, p = {
9
9
  key: 0,
10
10
  class: "px-px text-xs text-muted"
11
- }, m = { "aria-hidden": "true" }, h = { class: "sr-only" }, g = "inline-flex items-center justify-center border border-border border-b-border-dark bg-surface-muted font-sans font-medium text-label shadow-[inset_0_-1px_0_0_var(--color-border)] select-none", _ = /*@__PURE__*/ o({
11
+ }, m = { "aria-hidden": "true" }, h = { class: "sr-only" }, g = "inline-flex items-center justify-center border border-border bg-surface-muted font-mono font-medium text-muted select-none", _ = /*@__PURE__*/ o({
12
12
  __name: "AcKbd",
13
13
  props: {
14
14
  keys: { default: () => [] },
@@ -0,0 +1,5 @@
1
+ import e from "./AcKeyValueInput.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcKeyValueInput.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,114 @@
1
+ import type { SelectOption } from "./types";
2
+ /** One row of the field. */
3
+ export interface KeyValueItem {
4
+ key: string;
5
+ value: string;
6
+ /** The third column's value, when `options` is set, e.g. a taint effect. */
7
+ option?: string;
8
+ }
9
+ /** Messages for one row, by cell. */
10
+ export interface KeyValueRowErrors {
11
+ key?: string;
12
+ value?: string;
13
+ }
14
+ export interface Props {
15
+ /** Label above the rows, e.g. “Labels” or “Taints”. Also names the group for screen readers. */
16
+ label?: string;
17
+ /** Help text between the label and the rows. */
18
+ hint?: string;
19
+ /** Error for the whole field under the rows, e.g. “Add at least one label”. */
20
+ errorMsg?: string;
21
+ /** Header of the key column. Each key field is named “<key-label> <row>” for screen readers, e.g. “Key 2”. */
22
+ keyLabel?: string;
23
+ /** Header of the value column, e.g. “Value” or “Value (optional)”. */
24
+ valueLabel?: string;
25
+ /** Example key shown in empty key fields, e.g. “e.g. app.kubernetes.io/name”. */
26
+ keyPlaceholder?: string;
27
+ /** Example value shown in empty value fields. */
28
+ valuePlaceholder?: string;
29
+ /** Singular name of one row, used in “Remove <item-name> app” and announcements. */
30
+ itemName?: string;
31
+ /** Text of the Add button. Defaults to “Add new”, as in cloud-ui. */
32
+ addLabel?: string;
33
+ /** Choices for a third column, such as taint effects. Each row then gets a small select bound to `option`. */
34
+ options?: SelectOption<string>[];
35
+ /** Header of the third column, e.g. “Effect”. */
36
+ optionLabel?: string;
37
+ /** Option a new row starts with. Defaults to the first of `options`. */
38
+ defaultOption?: string;
39
+ /** Most rows allowed. The Add button disables at the limit and a count shows next to it. */
40
+ max?: number;
41
+ /** Checks a key. Return a message to show under it. Runs on every non-empty key. */
42
+ validateKey?: (key: string, index: number, items: KeyValueItem[]) => string | void | null | undefined;
43
+ /** Checks a value. Return a message to show under it. Runs on every row with a key or a value. */
44
+ validateValue?: (value: string, key: string, index: number, items: KeyValueItem[]) => string | void | null | undefined;
45
+ /** Lets the same key appear twice. Off by default: a repeated key (key and option, with `options`) shows an error. */
46
+ allowDuplicateKeys?: boolean;
47
+ /** Shows keys in the monospace font, for label keys and env var names. */
48
+ mono?: boolean;
49
+ /** `small` 36px or `normal` 40px fields. */
50
+ size?: "small" | "normal";
51
+ /** Marks the field required and adds a red asterisk. Pass `error-msg` when it's empty on submit. Was `is-required` in cloud-ui. */
52
+ required?: boolean;
53
+ /** Disables every field and button. Was `is-disabled` in cloud-ui. */
54
+ disabled?: boolean;
55
+ /** Shows the rows as read-only fields, without the Add and Remove buttons. */
56
+ readonly?: boolean;
57
+ }
58
+ type __VLS_Props = Props;
59
+ type __VLS_Slots = {
60
+ /** Content under the rows and above the Add button, e.g. a warning about `NoExecute` taints. */
61
+ footer?: () => unknown;
62
+ };
63
+ declare function add(): void;
64
+ type __VLS_ModelProps = {
65
+ /** The rows, empty ones included, in order. Replaced with a new array on every change; drop rows with an empty key before saving. */
66
+ modelValue?: KeyValueItem[];
67
+ };
68
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
69
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
70
+ /** Adds an empty row and focuses its key. */
71
+ add: typeof add;
72
+ /** Moves focus to the first key, or to the Add button when there are no rows. */
73
+ focus: () => void;
74
+ /** Whether any row shows an error (duplicate key, missing key, or a validator's message). Check it before saving. */
75
+ hasErrors: () => boolean;
76
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
77
+ "update:modelValue": (value: KeyValueItem[]) => any;
78
+ add: (index: number) => any;
79
+ remove: (item: KeyValueItem, index: number) => any;
80
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
81
+ "onUpdate:modelValue"?: ((value: KeyValueItem[]) => any) | undefined;
82
+ onAdd?: ((index: number) => any) | undefined;
83
+ onRemove?: ((item: KeyValueItem, index: number) => any) | undefined;
84
+ }>, {
85
+ required: boolean;
86
+ label: string;
87
+ disabled: boolean;
88
+ max: number;
89
+ size: "small" | "normal";
90
+ readonly: boolean;
91
+ options: SelectOption<string>[];
92
+ hint: string;
93
+ errorMsg: string;
94
+ mono: boolean;
95
+ itemName: string;
96
+ addLabel: string;
97
+ keyLabel: string;
98
+ valueLabel: string;
99
+ keyPlaceholder: string;
100
+ valuePlaceholder: string;
101
+ optionLabel: string;
102
+ defaultOption: string;
103
+ validateKey: (key: string, index: number, items: KeyValueItem[]) => string | void | null | undefined;
104
+ validateValue: (value: string, key: string, index: number, items: KeyValueItem[]) => string | void | null | undefined;
105
+ allowDuplicateKeys: boolean;
106
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
107
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
108
+ declare const _default: typeof __VLS_export;
109
+ export default _default;
110
+ type __VLS_WithSlots<T, S> = T & {
111
+ new (): {
112
+ $slots: S;
113
+ };
114
+ };