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