@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,41 @@
1
+ export interface SearchFilterOption {
2
+ value: string | number;
3
+ label: string;
4
+ }
5
+ export interface Props {
6
+ /** Placeholder text. */
7
+ placeholder?: string;
8
+ /** Milliseconds to wait after typing before emitting `search`. `0` emits on every key. */
9
+ debounce?: number;
10
+ /** `small` 32px or `normal` 36px tall. */
11
+ size?: "small" | "normal";
12
+ /** Options for a filter select attached to the right of the field, such as cluster status. Bind the choice with `v-model:filter`. No options, no filter. */
13
+ filterOptions?: SearchFilterOption[];
14
+ /** Accessible name of the filter select. */
15
+ filterLabel?: string;
16
+ }
17
+ type __VLS_Props = Props;
18
+ type __VLS_ModelProps = {
19
+ /** The search text. */
20
+ modelValue?: string;
21
+ /** The selected filter value. Starts at the first option when unset. */
22
+ "filter"?: string | number | undefined;
23
+ };
24
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
25
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ search: (value: string) => any;
27
+ "update:modelValue": (value: string) => any;
28
+ "update:filter": (value: string | number | undefined) => any;
29
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
30
+ onSearch?: ((value: string) => any) | undefined;
31
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
32
+ "onUpdate:filter"?: ((value: string | number | undefined) => any) | undefined;
33
+ }>, {
34
+ size: "small" | "normal";
35
+ placeholder: string;
36
+ debounce: number;
37
+ filterOptions: SearchFilterOption[];
38
+ filterLabel: string;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
@@ -0,0 +1,76 @@
1
+ import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, mergeModels as s, normalizeClass as c, onBeforeUnmount as l, openBlock as u, ref as d, renderList as f, toDisplayString as p, unref as m, useModel as h, vModelSelect as g, vModelText as _, watch as v, withDirectives as y, withKeys as b } from "vue";
2
+ import { ChevronDown as x, Search as S, X as C } from "@lucide/vue";
3
+ //#region src/lib/components/AcSearchBar.vue?vue&type=script&setup=true&lang.ts
4
+ var w = {
5
+ class: "flex w-full",
6
+ "data-ac-ds": "",
7
+ "data-testid": "ac-search-bar"
8
+ }, T = { class: "relative min-w-0 flex-1" }, E = ["placeholder", "aria-label"], D = {
9
+ key: 0,
10
+ class: "relative -ml-px shrink-0"
11
+ }, O = ["aria-label"], k = ["value"], A = /*@__PURE__*/ o({
12
+ __name: "AcSearchBar",
13
+ props: /*@__PURE__*/ s({
14
+ placeholder: { default: "Search" },
15
+ debounce: { default: 300 },
16
+ size: { default: "small" },
17
+ filterOptions: { default: () => [] },
18
+ filterLabel: { default: "Filter" }
19
+ }, {
20
+ modelValue: { default: "" },
21
+ modelModifiers: {},
22
+ filter: { default: void 0 },
23
+ filterModifiers: {}
24
+ }),
25
+ emits: /*@__PURE__*/ s(["search"], ["update:modelValue", "update:filter"]),
26
+ setup(o, { emit: s }) {
27
+ let A = o, j = h(o, "modelValue"), M = h(o, "filter"), N = s, P = d(null), F = t(() => A.filterOptions.length > 0), I = t(() => A.size === "small" ? "h-8" : "h-9"), L;
28
+ function R() {
29
+ j.value = "", P.value?.focus();
30
+ }
31
+ return v(j, (e) => {
32
+ clearTimeout(L), A.debounce ? L = setTimeout(() => N("search", e), A.debounce) : N("search", e);
33
+ }), v(() => A.filterOptions, (e) => {
34
+ e.length && !e.some((e) => e.value === M.value) && (M.value = e[0].value);
35
+ }, { immediate: !0 }), l(() => clearTimeout(L)), (t, s) => (u(), r("div", w, [i("div", T, [
36
+ a(m(S), {
37
+ class: "pointer-events-none absolute top-1/2 left-2.5 z-20 size-3.5 -translate-y-1/2 text-muted",
38
+ "aria-hidden": "true"
39
+ }),
40
+ y(i("input", {
41
+ ref_key: "input",
42
+ ref: P,
43
+ "onUpdate:modelValue": s[0] ||= (e) => j.value = e,
44
+ type: "search",
45
+ placeholder: o.placeholder,
46
+ "aria-label": o.placeholder,
47
+ class: c(["relative block w-full border border-border bg-surface pr-8 pl-8 text-base text-heading shadow-xs transition-[border-color,box-shadow] outline-none placeholder:text-muted hover:border-border-dark focus:z-10 focus:focus-ring [&::-webkit-search-cancel-button]:hidden", [I.value, F.value ? "rounded-l-6" : "rounded-6"]]),
48
+ onKeydown: s[1] ||= b((e) => j.value && (R(), e.stopPropagation()), ["esc"])
49
+ }, null, 42, E), [[_, j.value]]),
50
+ j.value ? (u(), r("button", {
51
+ key: 0,
52
+ type: "button",
53
+ class: "absolute top-1/2 right-1.5 z-20 inline-flex size-5.5 -translate-y-1/2 cursor-pointer items-center justify-center rounded-4 text-muted transition hover:bg-surface-sunken hover:text-heading",
54
+ "aria-label": "Clear search",
55
+ onClick: R
56
+ }, [a(m(C), {
57
+ class: "size-3",
58
+ "aria-hidden": "true"
59
+ })])) : n("", !0)
60
+ ]), F.value ? (u(), r("div", D, [y(i("select", {
61
+ "onUpdate:modelValue": s[2] ||= (e) => M.value = e,
62
+ "aria-label": o.filterLabel,
63
+ class: c(["relative block max-w-48 cursor-pointer appearance-none truncate rounded-r-6 border border-border bg-surface-muted pr-8 pl-3 text-base font-medium text-heading shadow-xs transition-[border-color,box-shadow,background-color] outline-none hover:border-border-dark hover:bg-surface-sunken focus:z-10 focus:focus-ring", I.value]),
64
+ "data-ac-ds": "",
65
+ "data-testid": "ac-search-bar-filter"
66
+ }, [(u(!0), r(e, null, f(o.filterOptions, (e) => (u(), r("option", {
67
+ key: e.value,
68
+ value: e.value
69
+ }, p(e.label), 9, k))), 128))], 10, O), [[g, M.value]]), a(m(x), {
70
+ class: "pointer-events-none absolute top-1/2 right-2.5 z-20 size-3.5 -translate-y-1/2 text-muted",
71
+ "aria-hidden": "true"
72
+ })])) : n("", !0)]));
73
+ }
74
+ });
75
+ //#endregion
76
+ export { A as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcSectionContent.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcSectionContent.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,55 @@
1
+ export interface Props {
2
+ /** Section title. */
3
+ title?: string;
4
+ /** Line under the title. */
5
+ subtitle?: string;
6
+ /** Shows a back button that emits `back`. */
7
+ backButton?: boolean;
8
+ /** Lets people collapse the body with a chevron button. */
9
+ collapsible?: boolean;
10
+ /** Pads the body. Turn off for flush tables and lists; the body then clips to the card's rounded corners. */
11
+ padded?: boolean;
12
+ /** Drops the card surface so the section blends into its parent. */
13
+ plain?: boolean;
14
+ /** `danger` draws a red border and title, for irreversible actions like deleting a database. */
15
+ tone?: "default" | "danger";
16
+ }
17
+ type __VLS_Props = Props;
18
+ type __VLS_Slots = {
19
+ /** Replaces the title area. */
20
+ header?: () => unknown;
21
+ /** Next to the title, e.g. a badge. */
22
+ "title-extra"?: () => unknown;
23
+ /** Buttons on the right of the header. */
24
+ actions?: () => unknown;
25
+ /** Section body. */
26
+ default?: () => unknown;
27
+ };
28
+ type __VLS_ModelProps = {
29
+ /** Whether the body is shown. Bind with `v-model:open`. */
30
+ "open"?: boolean;
31
+ };
32
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
33
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
+ "update:open": (value: boolean) => any;
35
+ back: () => any;
36
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
37
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
38
+ onBack?: (() => any) | undefined;
39
+ }>, {
40
+ title: string;
41
+ tone: "default" | "danger";
42
+ subtitle: string;
43
+ padded: boolean;
44
+ collapsible: boolean;
45
+ backButton: boolean;
46
+ plain: boolean;
47
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
48
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
49
+ declare const _default: typeof __VLS_export;
50
+ export default _default;
51
+ type __VLS_WithSlots<T, S> = T & {
52
+ new (): {
53
+ $slots: S;
54
+ };
55
+ };
@@ -0,0 +1,74 @@
1
+ import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, createVNode as r, defineComponent as i, mergeModels as a, normalizeClass as o, openBlock as s, renderSlot as c, toDisplayString as l, unref as u, useId as d, useModel as f, vShow as p, withDirectives as m } from "vue";
2
+ import { ArrowLeft as h, ChevronDown as g } from "@lucide/vue";
3
+ //#region src/lib/components/AcSectionContent.vue?vue&type=script&setup=true&lang.ts
4
+ var _ = { class: "flex min-w-0 items-center gap-2.5" }, v = { class: "min-w-0" }, y = { class: "flex items-center gap-2" }, b = {
5
+ key: 0,
6
+ class: "mt-0.5 truncate text-xs text-muted"
7
+ }, x = { class: "flex shrink-0 items-center gap-2" }, S = [
8
+ "aria-expanded",
9
+ "aria-controls",
10
+ "aria-label"
11
+ ], C = ["id"], w = /*@__PURE__*/ i({
12
+ __name: "AcSectionContent",
13
+ props: /*@__PURE__*/ a({
14
+ title: { default: "" },
15
+ subtitle: { default: "" },
16
+ backButton: {
17
+ type: Boolean,
18
+ default: !1
19
+ },
20
+ collapsible: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ padded: {
25
+ type: Boolean,
26
+ default: !0
27
+ },
28
+ plain: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ tone: { default: "default" }
33
+ }, {
34
+ open: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ openModifiers: {}
39
+ }),
40
+ emits: /*@__PURE__*/ a(["back"], ["update:open"]),
41
+ setup(i, { emit: a }) {
42
+ let w = a, T = f(i, "open"), E = d();
43
+ return (a, d) => (s(), t("section", {
44
+ class: o(!i.plain && ["rounded-10 border bg-surface shadow-xs", i.tone === "danger" ? "border-red-80" : "border-border"]),
45
+ "data-ac-ds": "",
46
+ "data-testid": "ac-section-content"
47
+ }, [n("header", { class: o(["flex items-center justify-between gap-4", [i.plain ? "mb-3" : "px-5 py-3.5", !i.plain && T.value && (i.tone === "danger" ? "border-b border-red-90" : "border-b border-border-light")]]) }, [n("div", _, [i.backButton ? (s(), t("button", {
48
+ key: 0,
49
+ type: "button",
50
+ class: "inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-6 text-label transition hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
51
+ "aria-label": "Back",
52
+ onClick: d[0] ||= (e) => w("back")
53
+ }, [r(u(h), {
54
+ class: "size-4",
55
+ "aria-hidden": "true"
56
+ })])) : e("", !0), n("div", v, [c(a.$slots, "header", {}, () => [n("div", y, [n("h5", { class: o(["truncate", i.tone === "danger" && "text-red-30"]) }, l(i.title), 3), c(a.$slots, "title-extra")]), i.subtitle ? (s(), t("p", b, l(i.subtitle), 1)) : e("", !0)])])]), n("div", x, [c(a.$slots, "actions"), i.collapsible ? (s(), t("button", {
57
+ key: 0,
58
+ type: "button",
59
+ class: "inline-flex size-7 cursor-pointer items-center justify-center rounded-6 border border-border bg-surface text-label shadow-xs transition hover:border-border-dark hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
60
+ "aria-expanded": T.value,
61
+ "aria-controls": u(E),
62
+ "aria-label": T.value ? "Collapse section" : "Expand section",
63
+ onClick: d[1] ||= (e) => T.value = !T.value
64
+ }, [r(u(g), {
65
+ class: o(["size-4 transition-transform duration-200", !T.value && "-rotate-90"]),
66
+ "aria-hidden": "true"
67
+ }, null, 8, ["class"])], 8, S)) : e("", !0)])], 2), m(n("div", {
68
+ id: u(E),
69
+ class: o(i.plain ? void 0 : i.padded ? "p-5" : "overflow-hidden rounded-b-10")
70
+ }, [c(a.$slots, "default")], 10, C), [[p, T.value]])], 2));
71
+ }
72
+ });
73
+ //#endregion
74
+ export { w as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcSegmentedControl.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcSegmentedControl.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,46 @@
1
+ import type { Component } from "vue";
2
+ export interface SegmentedOption<T extends string | number = string> {
3
+ value: T;
4
+ label: string;
5
+ /** A Lucide (or any) icon component shown before the label. */
6
+ icon?: Component;
7
+ disabled?: boolean;
8
+ }
9
+ export interface Props<T extends string | number> {
10
+ /** The choices, 2–5 of them: `{ value, label, icon?, disabled? }`. Plain strings are accepted too. */
11
+ options: (SegmentedOption<T> | T)[];
12
+ /** Accessible name for the group, e.g. "Chart range". Required when nothing nearby labels it. */
13
+ label?: string;
14
+ /** Height: `small` 28px (toolbars, cards) or `normal` 32px. */
15
+ size?: "small" | "normal";
16
+ /** Shows only the icons; each option's `label` becomes its accessible name and hover title. */
17
+ iconOnly?: boolean;
18
+ /** Stretches to fill the row with equal-width segments. */
19
+ block?: boolean;
20
+ /** Disables every segment. */
21
+ disabled?: boolean;
22
+ }
23
+ declare const __VLS_export: <V extends string | number>(__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<{
24
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(Props<V> & {
25
+ /** The selected option's `value`. */
26
+ modelValue?: V | null;
27
+ }) & {
28
+ "onUpdate:modelValue"?: ((value: V | null) => any) | undefined;
29
+ onChange?: ((value: V) => any) | undefined;
30
+ }> & (typeof globalThis extends {
31
+ __VLS_PROPS_FALLBACK: infer P;
32
+ } ? P : {});
33
+ expose: (exposed: {}) => void;
34
+ attrs: any;
35
+ slots: {};
36
+ emit: ((evt: "change", value: V) => void) & ((event: "update:modelValue", value: V | null) => void);
37
+ }>) => import("vue").VNode & {
38
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
39
+ };
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
42
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
43
+ [K in keyof T]: T[K];
44
+ } : {
45
+ [K in keyof T as K]: T[K];
46
+ }) & {};
@@ -0,0 +1,104 @@
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, mergeModels as o, normalizeClass as s, openBlock as c, ref as l, renderList as u, resolveDynamicComponent as d, toDisplayString as f, useModel as p } from "vue";
2
+ //#region src/lib/components/AcSegmentedControl.vue?vue&type=script&setup=true&lang.ts
3
+ var m = ["aria-label", "aria-disabled"], h = [
4
+ "aria-checked",
5
+ "aria-label",
6
+ "title",
7
+ "tabindex",
8
+ "disabled",
9
+ "onClick",
10
+ "onKeydown"
11
+ ], g = {
12
+ key: 1,
13
+ class: "truncate"
14
+ }, _ = /*@__PURE__*/ a({
15
+ __name: "AcSegmentedControl",
16
+ props: /*@__PURE__*/ o({
17
+ options: {},
18
+ label: { default: "" },
19
+ size: { default: "normal" },
20
+ iconOnly: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ block: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ disabled: {
29
+ type: Boolean,
30
+ default: !1
31
+ }
32
+ }, {
33
+ modelValue: { default: null },
34
+ modelModifiers: {}
35
+ }),
36
+ emits: /*@__PURE__*/ o(["change"], ["update:modelValue"]),
37
+ setup(a, { emit: o }) {
38
+ let _ = a, v = p(a, "modelValue"), y = o, b = l([]), x = t(() => _.options.map((e) => typeof e == "object" ? e : {
39
+ value: e,
40
+ label: String(e)
41
+ })), S = t(() => {
42
+ let e = x.value.findIndex((e) => e.value === v.value && !e.disabled);
43
+ return e >= 0 ? e : x.value.findIndex((e) => !e.disabled);
44
+ });
45
+ function C(e) {
46
+ _.disabled || e.disabled || e.value === v.value || (v.value = e.value, y("change", e.value));
47
+ }
48
+ function w(e) {
49
+ let t = x.value[e];
50
+ t && (b.value[e]?.focus(), C(t));
51
+ }
52
+ function T(e, t) {
53
+ let n = x.value.length, r = e;
54
+ for (let e = 0; e < n; e++) if (r = (r + t + n) % n, !x.value[r].disabled) return r;
55
+ return e;
56
+ }
57
+ function E(e, t) {
58
+ let n = {
59
+ ArrowRight: () => T(t, 1),
60
+ ArrowDown: () => T(t, 1),
61
+ ArrowLeft: () => T(t, -1),
62
+ ArrowUp: () => T(t, -1),
63
+ Home: () => T(-1, 1),
64
+ End: () => T(x.value.length, -1)
65
+ }[e.key];
66
+ n && (e.preventDefault(), w(n()));
67
+ }
68
+ return (t, o) => (c(), i("div", {
69
+ role: "radiogroup",
70
+ "aria-label": a.label || void 0,
71
+ "aria-disabled": a.disabled || void 0,
72
+ class: s(["items-center gap-0.5 rounded-8 border border-border bg-surface-muted p-0.5", [a.block ? "flex w-full" : "inline-flex max-w-full", a.disabled && "opacity-50"]]),
73
+ "data-ac-ds": "",
74
+ "data-testid": "ac-segmented-control"
75
+ }, [(c(!0), i(e, null, u(x.value, (e, t) => (c(), i("button", {
76
+ key: String(e.value),
77
+ ref_for: !0,
78
+ ref_key: "buttons",
79
+ ref: b,
80
+ type: "button",
81
+ role: "radio",
82
+ "aria-checked": e.value === v.value,
83
+ "aria-label": a.iconOnly ? e.label : void 0,
84
+ title: a.iconOnly ? e.label : void 0,
85
+ tabindex: t === S.value ? 0 : -1,
86
+ disabled: a.disabled || e.disabled,
87
+ class: s(["inline-flex min-w-0 cursor-pointer items-center justify-center gap-1.5 rounded-6 font-medium whitespace-nowrap transition-[background-color,color,box-shadow] duration-150 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring disabled:cursor-not-allowed", [
88
+ a.size === "small" ? "h-6 text-xs [&_svg]:size-3.5" : "h-7 text-base [&_svg]:size-4",
89
+ a.iconOnly ? a.size === "small" ? "w-7" : "w-8" : a.size === "small" ? "px-2.5" : "px-3",
90
+ a.block && "flex-1",
91
+ e.disabled && !a.disabled && "opacity-50",
92
+ e.value === v.value ? "bg-surface text-heading shadow-sm ring-1 ring-border" : "text-muted enabled:hover:text-heading"
93
+ ]]),
94
+ onClick: (t) => C(e),
95
+ onKeydown: (e) => E(e, t)
96
+ }, [e.icon ? (c(), n(d(e.icon), {
97
+ key: 0,
98
+ class: "shrink-0",
99
+ "aria-hidden": "true"
100
+ })) : r("", !0), a.iconOnly ? r("", !0) : (c(), i("span", g, f(e.label), 1))], 42, h))), 128))], 10, m));
101
+ }
102
+ });
103
+ //#endregion
104
+ export { _ as default };
@@ -0,0 +1,5 @@
1
+ import e from "./AcSelect.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcSelect.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,78 @@
1
+ import type { SelectOption } from "./types";
2
+ export interface Props<T> {
3
+ /** The choices: `{ value, label, description?, disabled?, group? }`. */
4
+ options: SelectOption<T>[];
5
+ /** How to tell whether two values are the same, for option values that are objects. A property name (`"id"`) or a function `(a, b) => boolean`. Without it values are compared with `===`, which is right for strings and numbers. */
6
+ by?: (T extends object ? keyof T & string : never) | ((a: T, b: T) => boolean);
7
+ /** Floating label. It rests inside the field and rises when a value is chosen or the list opens. */
8
+ label?: string;
9
+ /** Text shown in the field when there's no label and nothing is selected. */
10
+ placeholder?: string;
11
+ /** Allow several values; `v-model` becomes an array. */
12
+ multiple?: boolean;
13
+ /** Adds a search box to the list. Emits `search` so you can load options from an API. */
14
+ searchable?: boolean;
15
+ /** With `searchable`, lets the viewer add a value that isn't in the list: an "Add" row appears for text that matches no option, and Enter takes it. The text becomes the value, so use it with string values. Emits `create`. */
16
+ creatable?: boolean;
17
+ /** Word at the start of the add row, which reads `Add “text”`. */
18
+ createText?: string;
19
+ /** Shows a clear button when a value is selected. */
20
+ clearable?: boolean;
21
+ /** Shows a spinner and blocks the field while options load. */
22
+ loading?: boolean;
23
+ /** Shows a refresh button that emits `refresh`. */
24
+ refreshable?: boolean;
25
+ /** Disables the field. */
26
+ disabled?: boolean;
27
+ /** Marks the field required and adds a red asterisk. */
28
+ required?: boolean;
29
+ /** Error text under the field. */
30
+ errorMsg?: string;
31
+ /** Helper text under the field (hidden while `errorMsg` is set). */
32
+ hint?: string;
33
+ /** `compact` 32px (toolbars and filters, no label), `small` 36px (forms) or `normal` 40px. */
34
+ size?: "compact" | "small" | "normal";
35
+ /** Text shown when no option matches the search. */
36
+ noResultText?: string;
37
+ }
38
+ declare const __VLS_export: <V>(__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<{
39
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(Props<V> & {
40
+ modelValue?: V | V[] | null;
41
+ }) & {
42
+ onSearch?: ((query: string) => any) | undefined;
43
+ onSelect?: ((option: SelectOption<V>) => any) | undefined;
44
+ "onUpdate:modelValue"?: ((value: V | V[] | null) => any) | undefined;
45
+ onRemove?: ((option: SelectOption<V>) => any) | undefined;
46
+ onCreate?: ((text: string) => any) | undefined;
47
+ onRefresh?: (() => any) | undefined;
48
+ }> & (typeof globalThis extends {
49
+ __VLS_PROPS_FALLBACK: infer P;
50
+ } ? P : {});
51
+ expose: (exposed: import("vue").ShallowUnwrapRef<{
52
+ /** Moves focus to the select. */
53
+ focus: () => void | undefined;
54
+ }>) => void;
55
+ attrs: any;
56
+ slots: {
57
+ /** Custom option row. Receives the option and whether it's selected or highlighted. */
58
+ option?: (props: {
59
+ option: SelectOption<V>;
60
+ selected: boolean;
61
+ active: boolean;
62
+ }) => unknown;
63
+ /** Content shown when the list is empty or nothing matches. */
64
+ empty?: (props: {
65
+ query: string;
66
+ }) => unknown;
67
+ };
68
+ emit: (((evt: "search", query: string) => void) & ((evt: "select", option: SelectOption<V>) => void) & ((evt: "remove", option: SelectOption<V>) => void) & ((evt: "create", text: string) => void) & ((evt: "refresh") => void)) & ((event: "update:modelValue", value: V | V[] | null) => void);
69
+ }>) => import("vue").VNode & {
70
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
71
+ };
72
+ declare const _default: typeof __VLS_export;
73
+ export default _default;
74
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
75
+ [K in keyof T]: T[K];
76
+ } : {
77
+ [K in keyof T as K]: T[K];
78
+ }) & {};