@ac-design/design-system 1.0.2 → 2.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 (186) 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 +69 -0
  4. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +168 -0
  5. package/dist/lib/charts/index.d.ts +7 -0
  6. package/dist/lib/charts/index.js +5 -0
  7. package/dist/lib/charts/shared.d.ts +60 -0
  8. package/dist/lib/charts/shared.js +114 -0
  9. package/dist/lib/charts/xy.d.ts +65 -0
  10. package/dist/lib/charts/xy.js +92 -0
  11. package/dist/lib/compat.css +1707 -1042
  12. package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +2 -2
  13. package/dist/lib/components/AcAccordionItem.vue.d.ts +1 -1
  14. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +5 -5
  15. package/dist/lib/components/AcAlert.vue.d.ts +1 -1
  16. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +19 -25
  17. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +19 -19
  18. package/dist/lib/components/AcAreaChart.js +5 -0
  19. package/dist/lib/components/AcAreaChart.vue.d.ts +44 -0
  20. package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +215 -0
  21. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +8 -8
  22. package/dist/lib/components/AcBadge.vue.d.ts +16 -7
  23. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +59 -43
  24. package/dist/lib/components/AcBanner.vue.d.ts +1 -1
  25. package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +30 -30
  26. package/dist/lib/components/AcBarChart.js +5 -0
  27. package/dist/lib/components/AcBarChart.vue.d.ts +43 -0
  28. package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +217 -0
  29. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +27 -26
  30. package/dist/lib/components/AcBulkActionBar.js +5 -0
  31. package/dist/lib/components/AcBulkActionBar.vue.d.ts +43 -0
  32. package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
  33. package/dist/lib/components/AcButton.vue.d.ts +3 -3
  34. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +42 -34
  35. package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
  36. package/dist/lib/components/AcCard.vue.d.ts +10 -2
  37. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +37 -11
  38. package/dist/lib/components/AcCellValue.vue.d.ts +4 -1
  39. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +214 -179
  40. package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
  41. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +126 -29
  42. package/dist/lib/components/AcCheckRadio.vue.d.ts +1 -1
  43. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +33 -21
  44. package/dist/lib/components/AcCircularProgress.js +5 -0
  45. package/dist/lib/components/AcCircularProgress.vue.d.ts +44 -0
  46. package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +111 -0
  47. package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +142 -167
  48. package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +9 -9
  49. package/dist/lib/components/AcColorInput.js +5 -0
  50. package/dist/lib/components/AcColorInput.vue.d.ts +54 -0
  51. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +187 -0
  52. package/dist/lib/components/AcConfirmModal.js +5 -0
  53. package/dist/lib/components/AcConfirmModal.vue.d.ts +56 -0
  54. package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +92 -0
  55. package/dist/lib/components/AcContentHeader.vue.d.ts +1 -1
  56. package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +5 -4
  57. package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +2 -2
  58. package/dist/lib/components/AcCopyButton.js +5 -0
  59. package/dist/lib/components/AcCopyButton.vue.d.ts +43 -0
  60. package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +92 -0
  61. package/dist/lib/components/AcDatePicker.vue.d.ts +5 -5
  62. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +204 -213
  63. package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
  64. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +37 -46
  65. package/dist/lib/components/AcDonutChart.js +5 -0
  66. package/dist/lib/components/AcDonutChart.vue.d.ts +73 -0
  67. package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +210 -0
  68. package/dist/lib/components/AcDropdown.vue.d.ts +1 -1
  69. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +9 -9
  70. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +2 -2
  71. package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
  72. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +3 -3
  73. package/dist/lib/components/AcEmptyState.vue.d.ts +4 -1
  74. package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +50 -39
  75. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +14 -13
  76. package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +16 -16
  77. package/dist/lib/components/AcFileUpload.vue.d.ts +2 -2
  78. package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +55 -53
  79. package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +2 -2
  80. package/dist/lib/components/AcFooter.js +5 -0
  81. package/dist/lib/components/AcFooter.vue.d.ts +37 -0
  82. package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +107 -0
  83. package/dist/lib/components/AcForm.vue.d.ts +3 -0
  84. package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +4 -2
  85. package/dist/lib/components/AcFormArray.vue.d.ts +2 -2
  86. package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +149 -147
  87. package/dist/lib/components/AcFormFooter.vue.d.ts +2 -2
  88. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
  89. package/dist/lib/components/AcFormSection.vue.d.ts +7 -0
  90. package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
  91. package/dist/lib/components/AcHeader.vue.d.ts +3 -3
  92. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +22 -22
  93. package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
  94. package/dist/lib/components/AcInput.vue.d.ts +3 -3
  95. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +98 -87
  96. package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +1 -1
  97. package/dist/lib/components/AcKeyValueInput.js +5 -0
  98. package/dist/lib/components/AcKeyValueInput.vue.d.ts +114 -0
  99. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +320 -0
  100. package/dist/lib/components/AcLineChart.js +5 -0
  101. package/dist/lib/components/AcLineChart.vue.d.ts +38 -0
  102. package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +187 -0
  103. package/dist/lib/components/AcLocaleSwitcher.js +5 -0
  104. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +46 -0
  105. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +103 -0
  106. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +23 -23
  107. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +6 -6
  108. package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
  109. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +22 -22
  110. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +26 -26
  111. package/dist/lib/components/AcNumberInput.js +5 -0
  112. package/dist/lib/components/AcNumberInput.vue.d.ts +79 -0
  113. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
  114. package/dist/lib/components/AcPage.vue.d.ts +2 -2
  115. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +2 -2
  116. package/dist/lib/components/AcPagination.vue.d.ts +20 -3
  117. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +81 -53
  118. package/dist/lib/components/AcPreloader.vue.d.ts +1 -1
  119. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +3 -3
  120. package/dist/lib/components/AcProgress.vue.d.ts +2 -2
  121. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +4 -4
  122. package/dist/lib/components/AcResourceCard.vue.d.ts +2 -2
  123. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +13 -13
  124. package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
  125. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +9 -8
  126. package/dist/lib/components/AcSectionContent.vue.d.ts +2 -2
  127. package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +8 -8
  128. package/dist/lib/components/AcSegmentedControl.vue.d.ts +1 -1
  129. package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +4 -4
  130. package/dist/lib/components/AcSelect.vue.d.ts +4 -4
  131. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +230 -227
  132. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +31 -31
  133. package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
  134. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
  135. package/dist/lib/components/AcSidebar.vue.d.ts +3 -3
  136. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +75 -75
  137. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +33 -32
  138. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +6 -6
  139. package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +8 -8
  140. package/dist/lib/components/AcSlider.vue.d.ts +1 -1
  141. package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +174 -172
  142. package/dist/lib/components/AcStatCard.vue.d.ts +3 -3
  143. package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +90 -85
  144. package/dist/lib/components/AcStatusBar.vue.d.ts +1 -1
  145. package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +6 -6
  146. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +28 -28
  147. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +39 -34
  148. package/dist/lib/components/AcSwitchCard.js +5 -0
  149. package/dist/lib/components/AcSwitchCard.vue.d.ts +59 -0
  150. package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +119 -0
  151. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +87 -87
  152. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +4 -4
  153. package/dist/lib/components/AcTag.vue.d.ts +1 -1
  154. package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +22 -22
  155. package/dist/lib/components/AcTagInput.js +5 -0
  156. package/dist/lib/components/AcTagInput.vue.d.ts +74 -0
  157. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +291 -0
  158. package/dist/lib/components/AcTextarea.vue.d.ts +3 -3
  159. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +89 -64
  160. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +3 -3
  161. package/dist/lib/components/AcTimePicker.js +5 -0
  162. package/dist/lib/components/AcTimePicker.vue.d.ts +65 -0
  163. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +463 -0
  164. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +65 -71
  165. package/dist/lib/components/AcTooltip.vue.d.ts +1 -1
  166. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +77 -67
  167. package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
  168. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +111 -103
  169. package/dist/lib/components/index.d.ts +14 -2
  170. package/dist/lib/components/status.d.ts +26 -0
  171. package/dist/lib/components/status.js +110 -0
  172. package/dist/lib/composables/copyText.d.ts +2 -1
  173. package/dist/lib/composables/copyText.js +2 -2
  174. package/dist/lib/composables/useApiPagination.d.ts +55 -0
  175. package/dist/lib/composables/useApiPagination.js +58 -0
  176. package/dist/lib/composables/useBulkSelection.d.ts +44 -0
  177. package/dist/lib/composables/useBulkSelection.js +41 -0
  178. package/dist/lib/composables/useFormValidation.d.ts +65 -0
  179. package/dist/lib/composables/useFormValidation.js +148 -0
  180. package/dist/lib/composables/useTablePagination.d.ts +49 -0
  181. package/dist/lib/composables/useTablePagination.js +41 -0
  182. package/dist/lib/editor/theme.js +65 -62
  183. package/dist/lib/index.d.ts +14 -0
  184. package/dist/lib/index.js +95 -78
  185. package/dist/lib/theme.css +391 -272
  186. package/package.json +11 -4
@@ -1,58 +1,56 @@
1
1
  import e from "./AcSpinner.js";
2
- import { Fragment as t, Teleport as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as ee, nextTick as te, normalizeClass as p, normalizeStyle as ne, onBeforeUnmount as re, openBlock as m, ref as h, renderList as g, renderSlot as ie, toDisplayString as _, unref as v, useAttrs as ae, useId as oe, useModel as se, vModelText as ce, watch as le, withCtx as ue, withDirectives as de, withModifiers as y } from "vue";
3
- import { Check as fe, ChevronDown as pe, CircleAlert as me, Plus as he, RefreshCw as ge, Search as _e, X as ve } from "@lucide/vue";
2
+ import { Fragment as t, Teleport as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as ee, nextTick as p, normalizeClass as m, normalizeStyle as te, onBeforeUnmount as ne, openBlock as h, ref as g, renderList as _, renderSlot as re, toDisplayString as v, unref as y, useAttrs as ie, useId as ae, useModel as oe, vModelText as se, watch as ce, withCtx as le, withDirectives as ue, withModifiers as b } from "vue";
3
+ import { Check as de, ChevronDown as fe, CircleAlert as pe, Plus as me, RefreshCw as he, X as ge } from "@lucide/vue";
4
4
  //#region src/lib/components/AcSelect.vue?vue&type=script&setup=true&lang.ts
5
- var ye = { class: "relative" }, be = [
5
+ var _e = {
6
+ key: 0,
7
+ class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
8
+ }, ve = {
9
+ key: 0,
10
+ class: "text-danger",
11
+ "aria-hidden": "true"
12
+ }, ye = [
6
13
  "id",
7
14
  "tabindex",
8
15
  "aria-expanded",
9
16
  "aria-labelledby",
10
17
  "aria-label",
18
+ "aria-describedby",
11
19
  "aria-disabled",
12
20
  "aria-invalid",
13
21
  "aria-required",
14
22
  "aria-activedescendant"
15
- ], xe = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-1" }, Se = { class: "truncate" }, Ce = [
23
+ ], be = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-1.5" }, xe = { class: "truncate" }, Se = [
16
24
  "aria-label",
17
25
  "disabled",
18
26
  "onClick"
19
- ], we = {
27
+ ], Ce = {
20
28
  key: 1,
21
29
  class: "truncate"
22
- }, Te = {
30
+ }, we = {
23
31
  key: 2,
24
- class: "truncate text-muted"
25
- }, Ee = { class: "flex shrink-0 items-center gap-0.5 text-muted" }, De = ["disabled"], Oe = ["for"], ke = {
26
- key: 0,
27
- class: "text-danger",
28
- "aria-hidden": "true"
29
- }, Ae = {
32
+ class: "truncate text-muted/80"
33
+ }, Te = { class: "flex shrink-0 items-center gap-1 text-muted" }, Ee = ["disabled"], De = {
30
34
  key: 0,
31
- class: "mt-1.5 flex items-center gap-1 text-xs text-red-30"
32
- }, je = {
33
- key: 1,
34
- class: "mt-1.5 text-xs text-muted"
35
- }, Me = {
36
- key: 0,
37
- class: "border-b border-border-light p-1.5"
38
- }, Ne = { class: "relative" }, Pe = ["aria-activedescendant"], Fe = ["aria-multiselectable", "aria-labelledby"], Ie = {
35
+ class: "border-b border-border p-2"
36
+ }, Oe = ["aria-activedescendant"], ke = ["aria-multiselectable", "aria-labelledby"], Ae = {
39
37
  key: 0,
40
38
  role: "presentation",
41
- class: "px-2.5 pt-2.5 pb-1 text-[11px] font-medium tracking-wide text-muted uppercase first:pt-1.5"
42
- }, Le = [
39
+ class: "px-3 pt-2 pb-1 text-sm font-semibold tracking-[0.08em] text-muted uppercase"
40
+ }, je = [
43
41
  "id",
44
42
  "aria-selected",
45
43
  "aria-disabled",
46
44
  "onMouseenter",
47
45
  "onClick"
48
- ], Re = { class: "min-w-0 flex-1" }, ze = {
46
+ ], Me = { class: "min-w-0 flex-1" }, Ne = { class: "block truncate" }, Pe = {
49
47
  key: 0,
50
- class: "block truncate text-xs text-muted"
51
- }, Be = ["id"], Ve = { class: "min-w-0 flex-1 truncate" }, He = {
48
+ class: "block truncate text-xs font-normal text-muted"
49
+ }, Fe = ["id"], Ie = { class: "min-w-0 flex-1 truncate" }, Le = {
52
50
  key: 1,
53
51
  role: "presentation",
54
- class: "px-3 py-6 text-center text-base text-muted"
55
- }, Ue = /*@__PURE__*/ d({
52
+ class: "px-4 py-3 text-center text-base text-muted"
53
+ }, x = /*@__PURE__*/ d({
56
54
  inheritAttrs: !1,
57
55
  __name: "AcSelect",
58
56
  props: /*@__PURE__*/ f({
@@ -98,7 +96,7 @@ var ye = { class: "relative" }, be = [
98
96
  },
99
97
  errorMsg: { default: "" },
100
98
  hint: { default: "" },
101
- size: { default: "small" },
99
+ size: { default: "normal" },
102
100
  noResultText: { default: "No results" }
103
101
  }, {
104
102
  modelValue: { default: null },
@@ -111,45 +109,45 @@ var ye = { class: "relative" }, be = [
111
109
  "search",
112
110
  "refresh"
113
111
  ], ["update:modelValue"]),
114
- setup(d, { expose: f, emit: Ue }) {
115
- let b = d, x = Ue, S = se(d, "modelValue"), C = oe(), w = ae(), We = i(() => ({
116
- class: w.class,
117
- style: w.style
118
- })), Ge = i(() => {
119
- let { class: e, style: t, ...n } = w;
112
+ setup(d, { expose: f, emit: x }) {
113
+ let S = d, C = x, w = oe(d, "modelValue"), T = ae(), E = ie(), Re = i(() => ({
114
+ class: E.class,
115
+ style: E.style
116
+ })), ze = i(() => {
117
+ let { class: e, style: t, ...n } = E;
120
118
  return n;
121
- }), T = `${C}-list`, E = `${C}-label`, Ke = h(null), D = h(null), O = h(null), qe = h(null), k = h(!1), A = h(""), j = h(-1), M = h({
119
+ }), D = `${T}-list`, O = `${T}-label`, Be = `${T}-hint`, Ve = `${T}-msg`, He = g(null), k = g(null), A = g(null), Ue = g(null), j = g(!1), M = g(""), N = g(-1), P = g({
122
120
  left: 0,
123
121
  width: 0,
124
122
  maxHeight: 280
125
- }), N = i(() => {
126
- let e = S.value;
123
+ }), F = i(() => {
124
+ let e = w.value;
127
125
  return e == null || e === "" ? [] : Array.isArray(e) ? e : [e];
128
- }), P = (e, t) => {
129
- let n = b.by;
126
+ }), I = (e, t) => {
127
+ let n = S.by;
130
128
  return typeof n == "function" ? n(e, t) : n && e && t && typeof e == "object" && typeof t == "object" ? e[n] === t[n] : e === t;
131
- }, F = (e) => {
132
- let t = b.by;
129
+ }, L = (e) => {
130
+ let t = S.by;
133
131
  return String(typeof t == "string" && e && typeof e == "object" ? e[t] : e);
134
- }, Je = (e, t) => {
135
- let n = b.by;
132
+ }, We = (e, t) => {
133
+ let n = S.by;
136
134
  return e && typeof e == "object" ? typeof n == "string" ? String(e[n]) : `i${t}` : String(e);
137
- }, I = (e) => N.value.some((t) => P(t, e.value)), L = i(() => N.value.map((e) => b.options.find((t) => P(t.value, e)) ?? {
135
+ }, R = (e) => F.value.some((t) => I(t, e.value)), z = i(() => F.value.map((e) => S.options.find((t) => I(t.value, e)) ?? {
138
136
  value: e,
139
- label: F(e)
140
- })), R = i(() => N.value.length > 0), Ye = (e) => {
137
+ label: L(e)
138
+ })), B = i(() => F.value.length > 0), Ge = (e) => {
141
139
  if (!e.some((e) => e.group)) return e;
142
140
  let t = [];
143
141
  return e.forEach((e) => {
144
142
  let n = e.group ?? "";
145
143
  t.includes(n) || t.push(n);
146
144
  }), [...e].sort((e, n) => t.indexOf(e.group ?? "") - t.indexOf(n.group ?? ""));
147
- }, z = i(() => {
148
- let e = A.value.trim().toLowerCase();
149
- return Ye(e ? b.options.filter((t) => t.label.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e) || t.group?.toLowerCase().includes(e)) : b.options);
150
- }), Xe = i(() => {
145
+ }, V = i(() => {
146
+ let e = M.value.trim().toLowerCase();
147
+ return Ge(e ? S.options.filter((t) => t.label.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e) || t.group?.toLowerCase().includes(e)) : S.options);
148
+ }), Ke = i(() => {
151
149
  let e = [];
152
- return z.value.forEach((t, n) => {
150
+ return V.value.forEach((t, n) => {
153
151
  let r = t.group ?? "", i = e.find((e) => e.name === r);
154
152
  i || e.push(i = {
155
153
  name: r,
@@ -159,16 +157,16 @@ var ye = { class: "relative" }, be = [
159
157
  index: n
160
158
  });
161
159
  }), e;
162
- }), B = (e) => `${C}-opt-${e}`, V = i(() => A.value.trim()), H = i(() => {
163
- let e = V.value.toLowerCase();
164
- if (!b.creatable || !b.searchable || !e) return !1;
165
- let t = b.options.some((t) => t.label.toLowerCase() === e || F(t.value).toLowerCase() === e), n = N.value.some((t) => F(t).toLowerCase() === e);
160
+ }), H = (e) => `${T}-opt-${e}`, U = i(() => M.value.trim()), W = i(() => {
161
+ let e = U.value.toLowerCase();
162
+ if (!S.creatable || !S.searchable || !e) return !1;
163
+ let t = S.options.some((t) => t.label.toLowerCase() === e || L(t.value).toLowerCase() === e), n = F.value.some((t) => L(t).toLowerCase() === e);
166
164
  return !t && !n;
167
- }), U = i(() => z.value.length + +!!H.value - 1), W = i(() => z.value.length), Ze = () => {
168
- let e = D.value;
165
+ }), G = i(() => V.value.length + +!!W.value - 1), K = i(() => V.value.length), qe = () => {
166
+ let e = k.value;
169
167
  if (!e) return;
170
168
  let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom - 6 - 8, r = t.top - 6 - 8;
171
- M.value = n < 180 && r > n ? {
169
+ P.value = n < 180 && r > n ? {
172
170
  bottom: window.innerHeight - t.top + 6,
173
171
  left: t.left,
174
172
  width: t.width,
@@ -179,263 +177,268 @@ var ye = { class: "relative" }, be = [
179
177
  width: t.width,
180
178
  maxHeight: Math.min(300, n)
181
179
  };
182
- }, G = (e = 0, t = 1) => {
183
- for (let n = e; n >= 0 && n <= U.value; n += t) if (!z.value[n]?.disabled) return n;
180
+ }, q = (e = 0, t = 1) => {
181
+ for (let n = e; n >= 0 && n <= G.value; n += t) if (!V.value[n]?.disabled) return n;
184
182
  return -1;
185
- }, Qe = async () => {
186
- if (b.disabled || b.loading || k.value) return;
187
- k.value = !0, A.value = "", Ze();
188
- let e = z.value.findIndex((e) => I(e));
189
- j.value = e >= 0 ? e : G(), await te(), b.searchable && qe.value?.focus(), Y();
190
- }, K = (e = !0) => {
191
- k.value && (k.value = !1, j.value = -1, e && D.value?.focus());
192
- }, $e = () => k.value ? K() : Qe(), et = (e) => {
183
+ }, Je = async () => {
184
+ if (S.disabled || S.loading || j.value) return;
185
+ j.value = !0, M.value = "", qe();
186
+ let e = V.value.findIndex((e) => R(e));
187
+ N.value = e >= 0 ? e : q(), await p(), S.searchable && Ue.value?.focus(), X();
188
+ }, J = (e = !0) => {
189
+ j.value && (j.value = !1, N.value = -1, e && k.value?.focus());
190
+ }, Ye = () => j.value ? J() : Je(), Xe = (e) => {
193
191
  if (!e.disabled) {
194
- if (b.multiple) {
195
- let t = [...N.value], n = t.findIndex((t) => P(t, e.value));
196
- n >= 0 ? (t.splice(n, 1), x("remove", e)) : (t.push(e.value), x("select", e)), S.value = t;
197
- } else S.value = e.value, x("select", e), K();
192
+ if (S.multiple) {
193
+ let t = [...F.value], n = t.findIndex((t) => I(t, e.value));
194
+ n >= 0 ? (t.splice(n, 1), C("remove", e)) : (t.push(e.value), C("select", e)), w.value = t;
195
+ } else w.value = e.value, C("select", e), J();
198
196
  }
199
- }, q = (e) => {
200
- S.value = b.multiple ? N.value.filter((t) => !P(t, e.value)) : null, x("remove", e);
201
- }, tt = () => {
202
- let e = V.value;
203
- if (!H.value || !e) return;
197
+ }, Ze = (e) => {
198
+ w.value = S.multiple ? F.value.filter((t) => !I(t, e.value)) : null, C("remove", e);
199
+ }, Qe = () => {
200
+ let e = U.value;
201
+ if (!W.value || !e) return;
204
202
  let t = e, n = {
205
203
  value: t,
206
204
  label: e
207
205
  };
208
- b.multiple ? (S.value = [...N.value, t], A.value = "") : (S.value = t, K()), x("select", n), x("create", e);
209
- }, nt = () => {
210
- L.value.forEach((e) => x("remove", e)), S.value = b.multiple ? [] : null, D.value?.focus();
211
- }, J = "", rt, Y = () => te(() => O.value?.querySelector(`#${CSS.escape(B(j.value))}`)?.scrollIntoView({ block: "nearest" })), it = (e) => {
212
- let t = U.value + 1;
206
+ S.multiple ? (w.value = [...F.value, t], M.value = "") : (w.value = t, J()), C("select", n), C("create", e);
207
+ }, $e = () => {
208
+ z.value.forEach((e) => C("remove", e)), w.value = S.multiple ? [] : null, k.value?.focus();
209
+ }, Y = "", et, X = () => p(() => A.value?.querySelector(`#${CSS.escape(H(N.value))}`)?.scrollIntoView({ block: "nearest" })), tt = (e) => {
210
+ let t = G.value + 1;
213
211
  if (!t) return;
214
- let n = j.value;
215
- for (let r = 0; r < t && (n = (n + e + t) % t, z.value[n]?.disabled); r++);
216
- j.value = n, Y();
217
- }, at = (e) => {
218
- if (b.disabled) return;
212
+ let n = N.value;
213
+ for (let r = 0; r < t && (n = (n + e + t) % t, V.value[n]?.disabled); r++);
214
+ N.value = n, X();
215
+ }, nt = (e) => {
216
+ if (S.disabled) return;
219
217
  let t = e.key;
220
- if (!k.value) {
218
+ if (!j.value) {
221
219
  [
222
220
  "Enter",
223
221
  " ",
224
222
  "ArrowDown",
225
223
  "ArrowUp"
226
- ].includes(t) ? (e.preventDefault(), Qe()) : t === "Backspace" && b.multiple && R.value && e.target === D.value && q(L.value[L.value.length - 1]);
224
+ ].includes(t) ? (e.preventDefault(), Je()) : t === "Backspace" && S.multiple && B.value && e.target === k.value && Ze(z.value[z.value.length - 1]);
227
225
  return;
228
226
  }
229
- if (t === "ArrowDown") e.preventDefault(), it(1);
230
- else if (t === "ArrowUp") e.preventDefault(), it(-1);
231
- else if (t === "Home") e.preventDefault(), j.value = G(), Y();
232
- else if (t === "End") e.preventDefault(), j.value = G(U.value, -1), Y();
233
- else if (t === "Enter" || t === " " && !b.searchable) {
227
+ if (t === "ArrowDown") e.preventDefault(), tt(1);
228
+ else if (t === "ArrowUp") e.preventDefault(), tt(-1);
229
+ else if (t === "Home") e.preventDefault(), N.value = q(), X();
230
+ else if (t === "End") e.preventDefault(), N.value = q(G.value, -1), X();
231
+ else if (t === "Enter" || t === " " && !S.searchable) {
234
232
  e.preventDefault();
235
- let t = z.value[j.value];
236
- t ? et(t) : H.value && tt();
237
- } else if (t === "Escape") e.preventDefault(), K();
238
- else if (t === "Tab") K(!1);
239
- else if (!b.searchable && t.length === 1 && !e.metaKey && !e.ctrlKey) {
240
- J += t.toLowerCase(), clearTimeout(rt), rt = setTimeout(() => J = "", 500);
241
- let e = z.value.findIndex((e) => !e.disabled && e.label.toLowerCase().startsWith(J));
242
- e >= 0 && (j.value = e, Y());
233
+ let t = V.value[N.value];
234
+ t ? Xe(t) : W.value && Qe();
235
+ } else if (t === "Escape") e.preventDefault(), J();
236
+ else if (t === "Tab") J(!1);
237
+ else if (!S.searchable && t.length === 1 && !e.metaKey && !e.ctrlKey) {
238
+ Y += t.toLowerCase(), clearTimeout(et), et = setTimeout(() => Y = "", 500);
239
+ let e = V.value.findIndex((e) => !e.disabled && e.label.toLowerCase().startsWith(Y));
240
+ e >= 0 && (N.value = e, X());
243
241
  }
244
- }, ot = (e) => {
242
+ }, rt = (e) => {
245
243
  let t = e.target;
246
- Ke.value?.contains(t) || O.value?.contains(t) || K(!1);
247
- }, X = (e) => {
248
- e && O.value?.contains(e.target) || Ze();
249
- }, st = () => {
250
- document.removeEventListener("pointerdown", ot, !0), window.removeEventListener("scroll", X, !0), window.removeEventListener("resize", X);
244
+ He.value?.contains(t) || A.value?.contains(t) || J(!1);
245
+ }, Z = (e) => {
246
+ e?.target instanceof Node && A.value?.contains(e.target) || qe();
247
+ }, it = () => {
248
+ document.removeEventListener("pointerdown", rt, !0), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z);
251
249
  };
252
- le(k, (e) => {
253
- if (!e) return st();
254
- document.addEventListener("pointerdown", ot, !0), window.addEventListener("scroll", X, !0), window.addEventListener("resize", X);
255
- }), le(A, (e) => {
256
- x("search", e), j.value = G();
257
- }), re(st);
258
- let Z = h(!1), Q = i(() => k.value || Z.value), ct = i(() => !!b.label && (R.value || Q.value)), $ = i(() => !b.multiple && L.value[0]?.label || "");
259
- return f({ focus: () => D.value?.focus() }), (i, f) => (m(), s("div", ee({
250
+ ce(j, (e) => {
251
+ if (!e) return it();
252
+ document.addEventListener("pointerdown", rt, !0), window.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z);
253
+ }), ce(M, (e) => {
254
+ C("search", e), N.value = q();
255
+ }), ne(it);
256
+ let Q = g(!1), at = i(() => j.value || Q.value), ot = i(() => [S.hint && Be, S.errorMsg && Ve].filter(Boolean).join(" ") || void 0), $ = i(() => !S.multiple && z.value[0]?.label || "");
257
+ return f({ focus: () => k.value?.focus() }), (i, f) => (h(), s("div", ee({
260
258
  ref_key: "root",
261
- ref: Ke
262
- }, We.value, {
263
- class: ["w-full", d.disabled && "opacity-60"],
259
+ ref: He
260
+ }, Re.value, {
261
+ class: ["w-full", d.disabled && "opacity-50"],
264
262
  "data-ac-ds": "",
265
263
  "data-testid": "ac-select"
266
264
  }), [
267
- c("div", ye, [c("div", ee({
268
- id: `${v(C)}-trigger`,
265
+ d.label ? (h(), s("div", _e, [c("label", {
266
+ id: O,
267
+ onClick: f[0] ||= (e) => k.value?.focus()
268
+ }, v(d.label), 1), d.required ? (h(), s("span", ve, "*")) : o("", !0)])) : o("", !0),
269
+ d.hint ? (h(), s("p", {
270
+ key: 1,
271
+ id: Be,
272
+ class: "mb-2 text-base text-muted"
273
+ }, v(d.hint), 1)) : o("", !0),
274
+ c("div", ee({
275
+ id: `${y(T)}-trigger`,
269
276
  ref_key: "trigger",
270
- ref: D
271
- }, Ge.value, {
277
+ ref: k
278
+ }, ze.value, {
272
279
  role: "combobox",
273
280
  tabindex: d.disabled ? -1 : 0,
274
281
  "aria-haspopup": "listbox",
275
- "aria-expanded": k.value,
276
- "aria-controls": T,
277
- "aria-labelledby": d.label ? E : void 0,
278
- "aria-label": d.label ? void 0 : d.placeholder,
282
+ "aria-expanded": j.value,
283
+ "aria-controls": D,
284
+ "aria-labelledby": d.label ? O : void 0,
285
+ "aria-label": d.label ? void 0 : y(E)["aria-label"] ?? d.placeholder,
286
+ "aria-describedby": ot.value,
279
287
  "aria-disabled": d.disabled || void 0,
280
288
  "aria-invalid": !!d.errorMsg || void 0,
281
289
  "aria-required": d.required || void 0,
282
- "aria-activedescendant": k.value && !d.searchable && j.value >= 0 ? B(j.value) : void 0,
283
- class: ["group flex w-full items-center gap-2 rounded-6 border bg-surface pr-2 pl-3 text-left text-base text-heading shadow-xs transition-[border-color,box-shadow] duration-150 outline-none", [
284
- d.size === "compact" ? "min-h-8" : d.size === "small" ? "min-h-9" : "min-h-10",
285
- d.multiple && R.value ? "py-1.5" : "",
286
- d.label && R.value && d.multiple ? "pt-2.5" : "",
290
+ "aria-activedescendant": j.value && !d.searchable && N.value >= 0 ? H(N.value) : void 0,
291
+ class: ["group flex w-full items-center gap-2 rounded-10 border bg-background text-left text-base font-normal text-heading transition-[color,background-color,border-color,box-shadow] duration-200 outline-none", [
292
+ d.size === "compact" ? "min-h-8 pr-1.5 pl-3" : d.size === "small" ? "min-h-9 pr-2 pl-3" : "min-h-10 pr-2.5 pl-4",
293
+ d.multiple && B.value && (d.size === "normal" ? "py-1.5" : "py-1"),
287
294
  d.disabled || d.loading ? "cursor-not-allowed" : "cursor-pointer",
288
- d.errorMsg ? ["border-red-60", Q.value && "border-danger shadow-[0_0_0_3px_var(--color-red-90)]"] : Q.value ? "focus-ring" : "border-border hover:border-border-dark"
295
+ d.errorMsg ? ["border-danger/60", at.value && "border-danger shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]"] : at.value ? "focus-ring" : ["border-border", !d.disabled && "hover:border-accent-active"]
289
296
  ]],
290
- onClick: $e,
291
- onKeydown: at,
292
- onFocus: f[1] ||= (e) => Z.value = !0,
293
- onBlur: f[2] ||= (e) => Z.value = !1
294
- }), [c("div", xe, [d.multiple && R.value ? (m(!0), s(t, { key: 0 }, g(L.value, (e, t) => (m(), s("span", {
295
- key: Je(e.value, t),
296
- class: "inline-flex h-6 max-w-full items-center gap-1 rounded-4 bg-surface-sunken pr-0.5 pl-2 text-xs font-medium text-heading ring-1 ring-border ring-inset"
297
- }, [c("span", Se, _(e.label), 1), c("button", {
297
+ onClick: Ye,
298
+ onKeydown: nt,
299
+ onFocus: f[2] ||= (e) => Q.value = !0,
300
+ onBlur: f[3] ||= (e) => Q.value = !1
301
+ }), [c("div", be, [d.multiple && B.value ? (h(!0), s(t, { key: 0 }, _(z.value, (e, t) => (h(), s("span", {
302
+ key: We(e.value, t),
303
+ class: "inline-flex h-6 max-w-full items-center gap-1 rounded-10 bg-accent pr-0.5 pl-2.5 text-xs text-heading"
304
+ }, [c("span", xe, v(e.label), 1), c("button", {
298
305
  type: "button",
299
- class: "inline-flex size-4.5 cursor-pointer items-center justify-center rounded-2 text-muted transition hover:bg-slate-80 hover:text-heading",
306
+ class: "inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted transition-colors hover:bg-accent-hover hover:text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
300
307
  "aria-label": `Remove ${e.label}`,
301
308
  disabled: d.disabled,
302
- onClick: y((t) => q(e), ["stop"])
303
- }, [u(v(ve), {
304
- class: "size-2.5",
305
- "stroke-width": 2.5,
309
+ onClick: b((t) => Ze(e), ["stop"])
310
+ }, [u(y(ge), {
311
+ class: "size-3.5",
306
312
  "aria-hidden": "true"
307
- })], 8, Ce)]))), 128)) : $.value ? (m(), s("span", we, _($.value), 1)) : d.label ? o("", !0) : (m(), s("span", Te, _(d.placeholder), 1))]), c("span", Ee, [
308
- d.loading ? (m(), a(e, {
313
+ })], 8, Se)]))), 128)) : $.value ? (h(), s("span", Ce, v($.value), 1)) : (h(), s("span", we, v(d.placeholder), 1))]), c("span", Te, [
314
+ d.loading ? (h(), a(e, {
309
315
  key: 0,
310
316
  class: "text-primary"
311
- })) : d.refreshable ? (m(), s("button", {
317
+ })) : d.refreshable ? (h(), s("button", {
312
318
  key: 1,
313
319
  type: "button",
314
- class: "inline-flex size-6 cursor-pointer items-center justify-center rounded-4 transition hover:bg-surface-sunken hover:text-heading",
320
+ class: "inline-flex size-6 cursor-pointer items-center justify-center rounded-full transition-colors hover:bg-accent-hover hover:text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
315
321
  "aria-label": "Refresh options",
316
322
  disabled: d.disabled,
317
- onClick: f[0] ||= y((e) => x("refresh"), ["stop"])
318
- }, [u(v(ge), {
319
- class: "size-3.5",
323
+ onClick: f[1] ||= b((e) => C("refresh"), ["stop"])
324
+ }, [u(y(he), {
325
+ class: "size-4",
320
326
  "aria-hidden": "true"
321
- })], 8, De)) : o("", !0),
322
- d.clearable && R.value && !d.disabled && !d.loading ? (m(), s("button", {
327
+ })], 8, Ee)) : o("", !0),
328
+ d.clearable && B.value && !d.disabled && !d.loading ? (h(), s("button", {
323
329
  key: 2,
324
330
  type: "button",
325
- class: "inline-flex size-6 cursor-pointer items-center justify-center rounded-4 transition hover:bg-surface-sunken hover:text-heading",
331
+ class: "inline-flex size-6 cursor-pointer items-center justify-center rounded-full transition-colors hover:bg-accent-hover hover:text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
326
332
  "aria-label": "Clear selection",
327
- onClick: y(nt, ["stop"])
328
- }, [u(v(ve), {
329
- class: "size-3.5",
333
+ onClick: b($e, ["stop"])
334
+ }, [u(y(ge), {
335
+ class: "size-4",
330
336
  "aria-hidden": "true"
331
337
  })])) : o("", !0),
332
- u(v(pe), {
333
- class: p(["size-4 transition-transform duration-200", k.value && "rotate-180 text-heading"]),
338
+ u(y(fe), {
339
+ class: m(["size-4 transition-transform duration-200 motion-reduce:transition-none", j.value && "rotate-180 text-heading"]),
334
340
  "aria-hidden": "true"
335
341
  }, null, 8, ["class"])
336
- ])], 16, be), d.label ? (m(), s("label", {
337
- key: 0,
338
- id: E,
339
- for: `${v(C)}-trigger`,
340
- class: p(["pointer-events-none absolute left-2.5 rounded-2 bg-surface px-1 transition-all duration-150 ease-out", [ct.value ? "top-0 -translate-y-1/2 text-xs font-medium" : "top-1/2 -translate-y-1/2 text-base text-muted", ct.value && (d.errorMsg ? "text-red-30" : Q.value ? "text-primary-20" : "text-label")]])
341
- }, [l(_(d.label), 1), d.required ? (m(), s("span", ke, " *")) : o("", !0)], 10, Oe)) : o("", !0)]),
342
- d.errorMsg ? (m(), s("p", Ae, [u(v(me), {
343
- class: "size-3.5 shrink-0",
342
+ ])], 16, ye),
343
+ d.errorMsg ? (h(), s("p", {
344
+ key: 2,
345
+ id: Ve,
346
+ class: "mt-1.5 flex items-center gap-1.5 text-base text-danger-strong",
347
+ role: "alert"
348
+ }, [u(y(pe), {
349
+ class: "size-4 shrink-0",
344
350
  "aria-hidden": "true"
345
- }), l(" " + _(d.errorMsg), 1)])) : d.hint ? (m(), s("p", je, _(d.hint), 1)) : o("", !0),
346
- (m(), a(n, { to: "body" }, [u(r, {
347
- "enter-active-class": "transition duration-150 ease-out",
348
- "enter-from-class": "opacity-0 -translate-y-1 scale-[0.98]",
349
- "leave-active-class": "transition duration-100 ease-in",
350
- "leave-to-class": "opacity-0"
351
+ }), l(" " + v(d.errorMsg), 1)])) : o("", !0),
352
+ (h(), a(n, { to: "body" }, [u(r, {
353
+ "enter-active-class": "transition duration-150 ease-out motion-reduce:transition-none",
354
+ "enter-from-class": "opacity-0 scale-95",
355
+ "leave-active-class": "transition duration-100 ease-in motion-reduce:transition-none",
356
+ "leave-to-class": "opacity-0 scale-95"
351
357
  }, {
352
- default: ue(() => [k.value ? (m(), s("div", {
358
+ default: le(() => [j.value ? (h(), s("div", {
353
359
  key: 0,
354
360
  ref_key: "panel",
355
- ref: O,
356
- class: "fixed z-[90] flex flex-col overflow-hidden rounded-8 border border-border bg-surface shadow-lg",
357
- style: ne({
358
- top: M.value.top === void 0 ? void 0 : `${M.value.top}px`,
359
- bottom: M.value.bottom === void 0 ? void 0 : `${M.value.bottom}px`,
360
- left: `${M.value.left}px`,
361
- width: `${M.value.width}px`,
362
- maxHeight: `${M.value.maxHeight}px`
361
+ ref: A,
362
+ class: m(["fixed z-[90] flex flex-col overflow-hidden rounded-10 border border-border bg-surface shadow-lg", P.value.bottom === void 0 ? "origin-top" : "origin-bottom"]),
363
+ style: te({
364
+ top: P.value.top === void 0 ? void 0 : `${P.value.top}px`,
365
+ bottom: P.value.bottom === void 0 ? void 0 : `${P.value.bottom}px`,
366
+ left: `${P.value.left}px`,
367
+ width: `${P.value.width}px`,
368
+ maxHeight: `${P.value.maxHeight}px`
363
369
  }),
364
370
  "data-ac-ds": "",
365
371
  "data-testid": "ac-select-panel"
366
- }, [d.searchable ? (m(), s("div", Me, [c("div", Ne, [u(v(_e), {
367
- class: "pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted",
368
- "aria-hidden": "true"
369
- }), de(c("input", {
372
+ }, [d.searchable ? (h(), s("div", De, [ue(c("input", {
370
373
  ref_key: "searchInput",
371
- ref: qe,
372
- "onUpdate:modelValue": f[3] ||= (e) => A.value = e,
374
+ ref: Ue,
375
+ "onUpdate:modelValue": f[4] ||= (e) => M.value = e,
373
376
  type: "text",
374
377
  placeholder: "Search…",
375
378
  "aria-label": "Search options",
376
- "aria-controls": T,
377
- "aria-activedescendant": j.value >= 0 ? B(j.value) : void 0,
378
- class: "h-8 w-full rounded-4 bg-surface-muted pr-2 pl-8 text-base text-heading outline-none placeholder:text-muted focus:bg-surface focus:ring-1 focus:ring-border",
379
- onKeydown: at
380
- }, null, 40, Pe), [[ce, A.value]])])])) : o("", !0), c("ul", {
381
- id: T,
379
+ "aria-controls": D,
380
+ "aria-activedescendant": N.value >= 0 ? H(N.value) : void 0,
381
+ class: "h-9 w-full rounded-10 border border-border bg-background px-3 text-base text-heading transition-[border-color,box-shadow] duration-200 outline-none placeholder:text-muted/80 focus:focus-ring",
382
+ onKeydown: nt
383
+ }, null, 40, Oe), [[se, M.value]])])) : o("", !0), c("ul", {
384
+ id: D,
382
385
  role: "listbox",
383
386
  "aria-multiselectable": d.multiple || void 0,
384
- "aria-labelledby": d.label ? E : void 0,
387
+ "aria-labelledby": d.label ? O : void 0,
385
388
  class: "ac-scrollbar min-h-0 flex-1 p-1"
386
389
  }, [
387
- (m(!0), s(t, null, g(Xe.value, (e) => (m(), s(t, { key: e.name }, [e.name ? (m(), s("li", Ie, _(e.name), 1)) : o("", !0), (m(!0), s(t, null, g(e.items, ({ option: e, index: t }) => (m(), s("li", {
388
- id: B(t),
389
- key: Je(e.value, t),
390
+ (h(!0), s(t, null, _(Ke.value, (e) => (h(), s(t, { key: e.name }, [e.name ? (h(), s("li", Ae, v(e.name), 1)) : o("", !0), (h(!0), s(t, null, _(e.items, ({ option: e, index: t }) => (h(), s("li", {
391
+ id: H(t),
392
+ key: We(e.value, t),
390
393
  role: "option",
391
- "aria-selected": I(e),
394
+ "aria-selected": R(e),
392
395
  "aria-disabled": e.disabled || void 0,
393
- class: p(["flex cursor-pointer items-start gap-2.5 rounded-6 px-2.5 py-1.5 text-base transition-colors duration-75", [e.disabled ? "cursor-not-allowed opacity-40" : "", t === j.value ? "bg-surface-muted text-heading" : "text-heading"]]),
394
- onMouseenter: (n) => !e.disabled && (j.value = t),
395
- onMousedown: f[4] ||= y(() => {}, ["prevent"]),
396
- onClick: (t) => et(e)
396
+ class: m(["flex cursor-pointer items-start gap-2.5 rounded-8 px-3 py-2 text-base text-heading transition-colors", [e.disabled && "cursor-not-allowed opacity-50", R(e) ? ["font-medium", t === N.value ? "bg-accent-active" : "bg-accent"] : t === N.value && "bg-accent-hover"]]),
397
+ onMouseenter: (n) => !e.disabled && (N.value = t),
398
+ onMousedown: f[5] ||= b(() => {}, ["prevent"]),
399
+ onClick: (t) => Xe(e)
397
400
  }, [
398
- d.multiple ? (m(), s("span", {
401
+ d.multiple ? (h(), s("span", {
399
402
  key: 0,
400
- class: p(["mt-0.5 inline-flex size-4 shrink-0 items-center justify-center rounded-4 border transition-colors", I(e) ? "border-primary bg-primary text-white shadow-button" : "border-border-dark bg-surface"]),
403
+ class: m(["mt-0.5 inline-flex size-4 shrink-0 items-center justify-center rounded-4 border transition-colors", R(e) ? "border-primary bg-primary text-white" : "border-muted/70 bg-surface"]),
401
404
  "aria-hidden": "true"
402
- }, [I(e) ? (m(), a(v(fe), {
405
+ }, [R(e) ? (h(), a(y(de), {
403
406
  key: 0,
404
407
  class: "size-3",
405
408
  "stroke-width": 3,
406
409
  "aria-hidden": "true"
407
410
  })) : o("", !0)], 2)) : o("", !0),
408
- c("span", Re, [ie(i.$slots, "option", {
411
+ c("span", Me, [re(i.$slots, "option", {
409
412
  option: e,
410
- selected: I(e),
411
- active: t === j.value
412
- }, () => [c("span", { class: p(["block truncate", I(e) && "font-medium"]) }, _(e.label), 3), e.description ? (m(), s("span", ze, _(e.description), 1)) : o("", !0)])]),
413
- !d.multiple && I(e) ? (m(), a(v(fe), {
413
+ selected: R(e),
414
+ active: t === N.value
415
+ }, () => [c("span", Ne, v(e.label), 1), e.description ? (h(), s("span", Pe, v(e.description), 1)) : o("", !0)])]),
416
+ !d.multiple && R(e) ? (h(), a(y(de), {
414
417
  key: 1,
415
- class: "mt-0.5 size-4 shrink-0 text-primary",
418
+ class: "mt-0.5 size-4 shrink-0 text-primary-strong",
416
419
  "aria-hidden": "true"
417
420
  })) : o("", !0)
418
- ], 42, Le))), 128))], 64))), 128)),
419
- H.value ? (m(), s("li", {
421
+ ], 42, je))), 128))], 64))), 128)),
422
+ W.value ? (h(), s("li", {
420
423
  key: 0,
421
- id: B(W.value),
424
+ id: H(K.value),
422
425
  role: "option",
423
426
  "aria-selected": "false",
424
- class: p(["flex cursor-pointer items-center gap-2 rounded-6 px-2.5 py-1.5 text-base text-heading transition-colors duration-75", W.value === j.value && "bg-surface-muted"]),
427
+ class: m(["flex cursor-pointer items-center gap-2.5 rounded-8 px-3 py-2 text-base text-heading transition-colors", K.value === N.value && "bg-accent-hover"]),
425
428
  "data-testid": "ac-select-create",
426
- onMouseenter: f[5] ||= (e) => j.value = W.value,
427
- onMousedown: f[6] ||= y(() => {}, ["prevent"]),
428
- onClick: tt
429
- }, [u(v(he), {
430
- class: "size-4 shrink-0 text-primary",
429
+ onMouseenter: f[6] ||= (e) => N.value = K.value,
430
+ onMousedown: f[7] ||= b(() => {}, ["prevent"]),
431
+ onClick: Qe
432
+ }, [u(y(me), {
433
+ class: "size-4 shrink-0 text-primary-strong",
431
434
  "aria-hidden": "true"
432
- }), c("span", Ve, _(d.createText) + " “" + _(V.value) + "”", 1)], 42, Be)) : o("", !0),
433
- !z.value.length && !H.value ? (m(), s("li", He, [ie(i.$slots, "empty", { query: A.value }, () => [l(_(A.value ? `${d.noResultText} for “${A.value}”` : "No options"), 1)])])) : o("", !0)
434
- ], 8, Fe)], 4)) : o("", !0)]),
435
+ }), c("span", Ie, v(d.createText) + " “" + v(U.value) + "”", 1)], 42, Fe)) : o("", !0),
436
+ !V.value.length && !W.value ? (h(), s("li", Le, [re(i.$slots, "empty", { query: M.value }, () => [l(v(M.value ? `${d.noResultText} for “${M.value}”` : "No options"), 1)])])) : o("", !0)
437
+ ], 8, ke)], 6)) : o("", !0)]),
435
438
  _: 3
436
439
  })]))
437
440
  ], 16));
438
441
  }
439
442
  });
440
443
  //#endregion
441
- export { Ue as default };
444
+ export { x as default };