@ac-design/design-system 2.3.0 → 2.4.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 (60) hide show
  1. package/dist/lib/compat.css +211 -0
  2. package/dist/lib/components/AcAppSwitcher.vue.d.ts +1 -1
  3. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +23 -23
  4. package/dist/lib/components/AcAreaChart.vue.d.ts +1 -1
  5. package/dist/lib/components/AcBarChart.vue.d.ts +1 -1
  6. package/dist/lib/components/AcButton.vue.d.ts +7 -1
  7. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +90 -69
  8. package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
  9. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +20 -20
  10. package/dist/lib/components/AcCheckBox.vue.d.ts +4 -1
  11. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +50 -50
  12. package/dist/lib/components/AcCircularProgress.vue.d.ts +1 -1
  13. package/dist/lib/components/AcCodeEditor.vue.d.ts +12 -0
  14. package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +240 -207
  15. package/dist/lib/components/AcColorInput.vue.d.ts +3 -3
  16. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +72 -66
  17. package/dist/lib/components/AcCostSummary.vue.d.ts +1 -1
  18. package/dist/lib/components/AcDatePicker.vue.d.ts +14 -7
  19. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +417 -372
  20. package/dist/lib/components/AcDeleteModal.vue.d.ts +1 -1
  21. package/dist/lib/components/AcDonutChart.vue.d.ts +2 -2
  22. package/dist/lib/components/AcDropdown.vue.d.ts +1 -1
  23. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +8 -8
  24. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +8 -8
  25. package/dist/lib/components/AcGraphChart.vue.d.ts +2 -2
  26. package/dist/lib/components/AcInput.vue.d.ts +75 -54
  27. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +253 -89
  28. package/dist/lib/components/AcKeyValueInput.vue.d.ts +34 -54
  29. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +134 -106
  30. package/dist/lib/components/AcLineChart.vue.d.ts +1 -1
  31. package/dist/lib/components/AcMapChart.vue.d.ts +2 -2
  32. package/dist/lib/components/AcModal.vue.d.ts +1 -1
  33. package/dist/lib/components/AcNotificationMenu.vue.d.ts +1 -1
  34. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +24 -24
  35. package/dist/lib/components/AcNumberInput.vue.d.ts +55 -45
  36. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +159 -99
  37. package/dist/lib/components/AcRadioCard.vue.d.ts +2 -2
  38. package/dist/lib/components/AcRadioCard.vue_vue_type_script_setup_true_lang.js +1 -1
  39. package/dist/lib/components/AcSelect.vue.d.ts +35 -6
  40. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +272 -176
  41. package/dist/lib/components/AcSidePanel.vue.d.ts +1 -1
  42. package/dist/lib/components/AcSlider.vue.d.ts +2 -2
  43. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +23 -23
  44. package/dist/lib/components/AcTable.vue.d.ts +37 -4
  45. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +239 -131
  46. package/dist/lib/components/AcTagInput.vue.d.ts +22 -3
  47. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +126 -114
  48. package/dist/lib/components/AcTaintInput.js +5 -0
  49. package/dist/lib/components/AcTaintInput.vue.d.ts +44 -0
  50. package/dist/lib/components/AcTaintInput.vue_vue_type_script_setup_true_lang.js +208 -0
  51. package/dist/lib/components/AcTextarea.vue.d.ts +38 -4
  52. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +113 -53
  53. package/dist/lib/components/AcTimePicker.vue.d.ts +15 -8
  54. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +102 -70
  55. package/dist/lib/components/AcTooltip.vue.d.ts +3 -3
  56. package/dist/lib/components/index.d.ts +1 -0
  57. package/dist/lib/composables/useToast.d.ts +2 -2
  58. package/dist/lib/index.d.ts +2 -1
  59. package/dist/lib/index.js +31 -30
  60. package/package.json +1 -1
@@ -1,14 +1,11 @@
1
1
  import { fixedFrame as e } from "./fixedFrame.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, createVNode as l, defineComponent as u, mergeModels as d, mergeProps as f, nextTick as p, normalizeClass as m, onBeforeUnmount as ee, onMounted as te, openBlock as h, ref as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, useAttrs as ne, useId as re, useModel as x, watch as ie, withCtx as ae } from "vue";
3
- import { Clock as oe, X as se } 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, createVNode as l, defineComponent as u, mergeModels as d, mergeProps as f, nextTick as p, normalizeClass as m, onBeforeUnmount as ee, onMounted as te, openBlock as h, ref as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, useAttrs as ne, useId as re, useModel as ie, watch as ae, withCtx as oe } from "vue";
3
+ import { Clock as se, X as ce } from "@lucide/vue";
4
4
  //#region src/lib/components/AcTimePicker.vue?vue&type=script&setup=true&lang.ts
5
- var ce = ["for"], le = { key: 0 }, ue = {
5
+ var le = ["for"], ue = { key: 0 }, de = {
6
6
  key: 1,
7
7
  class: "text-danger",
8
8
  "aria-hidden": "true"
9
- }, de = {
10
- key: 2,
11
- class: "relative"
12
9
  }, fe = [
13
10
  "id",
14
11
  "disabled",
@@ -40,7 +37,7 @@ var ce = ["for"], le = { key: 0 }, ue = {
40
37
  "aria-selected",
41
38
  "aria-disabled",
42
39
  "onClick"
43
- ], Ce = { class: "mt-4 flex shrink-0 justify-center gap-2 border-t border-border pt-4" }, we = ["disabled"], Te = ["name", "value"], S = 86399, C = /*@__PURE__*/ u({
40
+ ], Ce = { class: "mt-4 flex shrink-0 justify-center gap-2 border-t border-border pt-4" }, we = ["disabled"], Te = ["name", "value"], x = 86399, S = /*@__PURE__*/ u({
44
41
  inheritAttrs: !1,
45
42
  __name: "AcTimePicker",
46
43
  props: /*@__PURE__*/ d({
@@ -73,6 +70,17 @@ var ce = ["for"], le = { key: 0 }, ue = {
73
70
  inline: {
74
71
  type: Boolean,
75
72
  default: !1
73
+ },
74
+ valueType: { default: "string" },
75
+ fieldClass: {
76
+ type: [
77
+ Boolean,
78
+ null,
79
+ String,
80
+ Object,
81
+ Array
82
+ ],
83
+ default: void 0
76
84
  }
77
85
  }, {
78
86
  modelValue: { default: null },
@@ -85,17 +93,38 @@ var ce = ["for"], le = { key: 0 }, ue = {
85
93
  }),
86
94
  emits: ["update:modelValue", "update:open"],
87
95
  setup(u, { expose: d }) {
88
- let C = u, w = x(u, "modelValue"), T = x(u, "open"), Ee = /^(\d{1,2}):(\d{2})(?::(\d{2}))?$/, E = re(), D = ne(), De = i(() => ({
96
+ let S = u, C = ie(u, "modelValue"), w = ie(u, "open"), T = /^(\d{1,2}):(\d{2})(?::(\d{2}))?$/, E = re(), D = ne(), Ee = i(() => ({
89
97
  class: D.class,
90
98
  style: D.style
91
99
  })), O = i(() => {
92
100
  let { class: e, style: t, ...n } = D;
93
101
  return n;
94
- }), k = `${E}-label`, A = `${E}-value`, j = `${E}-msg`, M = `${E}-hint`, N = g(null), P = g(null), F = g(null), I = g({
102
+ }), k = `${E}-label`, A = `${E}-value`, j = `${E}-msg`, M = `${E}-hint`, De = g(null), N = g(null), P = g(null), F = g({
95
103
  left: 0,
96
104
  maxHeight: 400,
97
105
  minWidth: 0
98
- }), L = g(!1), Oe = i(() => T.value || L.value), R = i(() => U(w.value)), z = i(() => U(C.min) ?? 0), ke = i(() => U(C.max) ?? S), Ae = i(() => R.value === null ? null : W(R.value)), B = i(() => C.hourCycle === 12), je = i(() => R.value === null ? "" : Le(R.value)), Me = i(() => [C.hint && M, C.errorMsg && j].filter(Boolean).join(" ") || void 0), Ne = i(() => C.label ? `${C.label}: choose time` : "Choose time"), Pe = i(() => G(ze())), Fe = i(() => {
106
+ }), I = g(!1), L = i({
107
+ get() {
108
+ let e = C.value;
109
+ if (!(e instanceof Date)) return e ?? null;
110
+ if (Number.isNaN(e.getTime())) return null;
111
+ let t = `${V(e.getHours())}:${V(e.getMinutes())}`;
112
+ return S.showSeconds ? `${t}:${V(e.getSeconds())}` : t;
113
+ },
114
+ set(e) {
115
+ if (S.valueType !== "date" && !(C.value instanceof Date)) {
116
+ C.value = e;
117
+ return;
118
+ }
119
+ let t = e ? T.exec(e) : null;
120
+ if (!t) {
121
+ C.value = null;
122
+ return;
123
+ }
124
+ let n = C.value instanceof Date && !Number.isNaN(C.value.getTime()) ? new Date(C.value) : /* @__PURE__ */ new Date();
125
+ t[3] === void 0 ? n.setHours(Number(t[1]), Number(t[2])) : n.setHours(Number(t[1]), Number(t[2]), Number(t[3])), C.value = n;
126
+ }
127
+ }), Oe = i(() => w.value || I.value), R = i(() => U(L.value)), z = i(() => U(S.min) ?? 0), ke = i(() => U(S.max) ?? x), Ae = i(() => R.value === null ? null : W(R.value)), B = i(() => S.hourCycle === 12), je = i(() => R.value === null ? "" : Le(R.value)), Me = i(() => [S.hint && M, S.errorMsg && j].filter(Boolean).join(" ") || void 0), Ne = i(() => S.label ? `${S.label}: choose time` : "Choose time"), Pe = i(() => G(ze())), Fe = i(() => {
99
128
  let e = Ae.value, t = e?.h ?? null, n = e?.m ?? null, r = t === null ? 0 : t >= 12 ? 12 : 0, i = [], a = B.value ? [
100
129
  0,
101
130
  1,
@@ -127,15 +156,15 @@ var ce = ["for"], le = { key: 0 }, ue = {
127
156
  heading: "Min",
128
157
  name: "Minutes",
129
158
  selected: n,
130
- cells: H(0, 59, Math.max(1, C.minuteStep)).map((e) => {
159
+ cells: H(0, 59, Math.max(1, S.minuteStep)).map((e) => {
131
160
  let t = o * 3600 + e * 60;
132
161
  return {
133
162
  value: e,
134
163
  text: V(e),
135
- disabled: !K(t, C.showSeconds ? t + 59 : t)
164
+ disabled: !K(t, S.showSeconds ? t + 59 : t)
136
165
  };
137
166
  })
138
- }), C.showSeconds) {
167
+ }), S.showSeconds) {
139
168
  let t = n ?? 0;
140
169
  i.push({
141
170
  unit: "s",
@@ -161,7 +190,7 @@ var ce = ["for"], le = { key: 0 }, ue = {
161
190
  }, {
162
191
  value: 12,
163
192
  text: "PM",
164
- disabled: !K(43200, S)
193
+ disabled: !K(43200, x)
165
194
  }]
166
195
  }), i;
167
196
  });
@@ -174,7 +203,7 @@ var ce = ["for"], le = { key: 0 }, ue = {
174
203
  return r;
175
204
  }
176
205
  function U(e) {
177
- let t = e ? Ee.exec(e.trim()) : null;
206
+ let t = e ? T.exec(e.trim()) : null;
178
207
  if (!t) return null;
179
208
  let [n, r, i] = [
180
209
  Number(t[1]),
@@ -192,10 +221,10 @@ var ce = ["for"], le = { key: 0 }, ue = {
192
221
  }
193
222
  function Ie(e) {
194
223
  let { h: t, m: n, s: r } = W(e);
195
- return C.showSeconds ? `${V(t)}:${V(n)}:${V(r)}` : `${V(t)}:${V(n)}`;
224
+ return S.showSeconds ? `${V(t)}:${V(n)}:${V(r)}` : `${V(t)}:${V(n)}`;
196
225
  }
197
226
  function Le(e) {
198
- let { h: t, m: n, s: r } = W(e), i = C.showSeconds ? `${V(n)}:${V(r)}` : V(n);
227
+ let { h: t, m: n, s: r } = W(e), i = S.showSeconds ? `${V(n)}:${V(r)}` : V(n);
199
228
  return B.value ? `${V(t % 12 || 12)}:${i} ${t >= 12 ? "PM" : "AM"}` : `${V(t)}:${i}`;
200
229
  }
201
230
  function G(e) {
@@ -208,39 +237,39 @@ var ce = ["for"], le = { key: 0 }, ue = {
208
237
  return Math.floor(z.value / 3600);
209
238
  }
210
239
  function ze() {
211
- let e = /* @__PURE__ */ new Date(), t = Math.max(1, C.minuteStep), n = Math.floor(e.getMinutes() / t) * t;
212
- return e.getHours() * 3600 + n * 60 + (C.showSeconds ? e.getSeconds() : 0);
240
+ let e = /* @__PURE__ */ new Date(), t = Math.max(1, S.minuteStep), n = Math.floor(e.getMinutes() / t) * t;
241
+ return e.getHours() * 3600 + n * 60 + (S.showSeconds ? e.getSeconds() : 0);
213
242
  }
214
243
  function Be(e) {
215
244
  if (G(e) && Ve(e)) return e;
216
- let { h: t } = W(e), n = Math.max(1, C.minuteStep) * 60, r = [];
217
- for (let e = t * 3600; e < (t + 1) * 3600; e += n) if (C.showSeconds) for (let t = 0; t < 60; t++) r.push(e + t);
245
+ let { h: t } = W(e), n = Math.max(1, S.minuteStep) * 60, r = [];
246
+ for (let e = t * 3600; e < (t + 1) * 3600; e += n) if (S.showSeconds) for (let t = 0; t < 60; t++) r.push(e + t);
218
247
  else r.push(e);
219
248
  let i = r.filter(G);
220
249
  return i.length ? i.reduce((t, n) => Math.abs(n - e) < Math.abs(t - e) ? n : t) : null;
221
250
  }
222
251
  function Ve(e) {
223
252
  let { m: t, s: n } = W(e);
224
- return t % Math.max(1, C.minuteStep) === 0 && (C.showSeconds || n === 0);
253
+ return t % Math.max(1, S.minuteStep) === 0 && (S.showSeconds || n === 0);
225
254
  }
226
255
  function He(e, t) {
227
- if (C.disabled) return;
256
+ if (S.disabled) return;
228
257
  let { h: n, m: r, s: i } = Ae.value ?? W(Be(z.value) ?? z.value);
229
258
  e === "h" ? n = t : e === "m" ? r = t : e === "s" ? i = t : n = n % 12 + t;
230
- let a = Be(n * 3600 + r * 60 + (C.showSeconds ? i : 0));
231
- a !== null && (w.value = Ie(a));
259
+ let a = Be(n * 3600 + r * 60 + (S.showSeconds ? i : 0));
260
+ a !== null && (L.value = Ie(a));
232
261
  }
233
262
  function Ue() {
234
- C.disabled || (w.value = Ie(ze()), p(() => X("smooth")));
263
+ S.disabled || (L.value = Ie(ze()), p(() => X("smooth")));
235
264
  }
236
265
  function We() {
237
- w.value = null, P.value?.focus();
266
+ L.value = null, N.value?.focus();
238
267
  }
239
268
  function q() {
240
- let t = P.value;
269
+ let t = N.value;
241
270
  if (!t) return;
242
- let n = t.getBoundingClientRect(), r = e(), i = F.value?.offsetWidth ?? 240, a = F.value?.offsetHeight ?? 320, o = r.bottom - n.bottom - 6 - 8, s = n.top - r.top - 6 - 8, c = o < a && s > o, l = Math.max(8, Math.min(n.left - r.left, r.width - i - 8)), u = Math.min(n.width, 448);
243
- I.value = c ? {
271
+ let n = t.getBoundingClientRect(), r = e(), i = P.value?.offsetWidth ?? 240, a = P.value?.offsetHeight ?? 320, o = r.bottom - n.bottom - 6 - 8, s = n.top - r.top - 6 - 8, c = o < a && s > o, l = Math.max(8, Math.min(n.left - r.left, r.width - i - 8)), u = Math.min(n.width, 448);
272
+ F.value = c ? {
244
273
  bottom: r.bottom - n.top + 6,
245
274
  left: l,
246
275
  maxHeight: Math.max(200, s),
@@ -253,17 +282,17 @@ var ce = ["for"], le = { key: 0 }, ue = {
253
282
  };
254
283
  }
255
284
  function Ge() {
256
- C.disabled || T.value || (T.value = !0);
285
+ S.disabled || w.value || (w.value = !0);
257
286
  }
258
287
  function J(e = !0) {
259
- T.value && (T.value = !1, e && P.value?.focus());
288
+ w.value && (w.value = !1, e && N.value?.focus());
260
289
  }
261
290
  async function Y() {
262
291
  q(), $e(), await p(), q(), X("instant"), Z(0);
263
292
  }
264
293
  function X(e) {
265
294
  let t = e === "smooth" && !window.matchMedia("(prefers-reduced-motion: reduce)").matches;
266
- F.value?.querySelectorAll("[role=listbox]").forEach((e) => {
295
+ P.value?.querySelectorAll("[role=listbox]").forEach((e) => {
267
296
  let n = e.querySelector("[aria-selected=true]") ?? e.querySelector("[aria-disabled=false]");
268
297
  n && e.scrollTo({
269
298
  top: n.offsetTop - (e.clientHeight - n.offsetHeight) / 2,
@@ -272,7 +301,7 @@ var ce = ["for"], le = { key: 0 }, ue = {
272
301
  });
273
302
  }
274
303
  function Ke(e) {
275
- return [...F.value?.querySelectorAll(`[data-col="${e}"] [role=option]`) ?? []];
304
+ return [...P.value?.querySelectorAll(`[data-col="${e}"] [role=option]`) ?? []];
276
305
  }
277
306
  function Z(e) {
278
307
  let t = Ke(e);
@@ -315,13 +344,13 @@ var ce = ["for"], le = { key: 0 }, ue = {
315
344
  Je(t, n, o);
316
345
  }
317
346
  function Xe(e) {
318
- if (C.inline) return;
347
+ if (S.inline) return;
319
348
  if (e.key === "Escape") {
320
349
  e.preventDefault(), e.stopPropagation(), J();
321
350
  return;
322
351
  }
323
- if (e.key !== "Tab" || !F.value) return;
324
- let t = [...F.value.querySelectorAll("button:not([disabled])")].filter((e) => e.tabIndex >= 0);
352
+ if (e.key !== "Tab" || !P.value) return;
353
+ let t = [...P.value.querySelectorAll("button:not([disabled])")].filter((e) => e.tabIndex >= 0);
325
354
  if (!t.length) return;
326
355
  let n = t[0], r = t[t.length - 1];
327
356
  e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
@@ -331,10 +360,10 @@ var ce = ["for"], le = { key: 0 }, ue = {
331
360
  }
332
361
  function Qe(e) {
333
362
  let t = e.target;
334
- N.value?.contains(t) || F.value?.contains(t) || J(!1);
363
+ De.value?.contains(t) || P.value?.contains(t) || J(!1);
335
364
  }
336
365
  function Q(e) {
337
- e?.target instanceof Node && F.value?.contains(e.target) || q();
366
+ e?.target instanceof Node && P.value?.contains(e.target) || q();
338
367
  }
339
368
  function $e() {
340
369
  document.addEventListener("pointerdown", Qe, !0), window.addEventListener("scroll", Q, !0), window.addEventListener("resize", Q);
@@ -345,15 +374,15 @@ var ce = ["for"], le = { key: 0 }, ue = {
345
374
  async function et() {
346
375
  await p(), X("instant");
347
376
  }
348
- return ie(T, (e) => e ? Y() : $()), ie(w, () => C.inline && p(() => X("smooth"))), te(() => {
349
- C.inline ? X("instant") : T.value && Y();
377
+ return ae(w, (e) => e ? Y() : $()), ae(L, () => S.inline && p(() => X("smooth"))), te(() => {
378
+ S.inline ? X("instant") : w.value && Y();
350
379
  }), ee($), d({
351
- focus: () => C.inline ? Z(0) : P.value?.focus(),
380
+ focus: () => S.inline ? Z(0) : N.value?.focus(),
352
381
  scrollToSelected: et
353
382
  }), (e, i) => (h(), s("div", f({
354
383
  ref_key: "root",
355
- ref: N
356
- }, De.value, {
384
+ ref: De
385
+ }, Ee.value, {
357
386
  class: ["w-full", u.disabled && "opacity-50"],
358
387
  "data-ac-ds": "",
359
388
  "data-testid": "ac-time-picker"
@@ -365,54 +394,57 @@ var ce = ["for"], le = { key: 0 }, ue = {
365
394
  class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
366
395
  }, [
367
396
  v(e.$slots, "label-icon"),
368
- u.label ? (h(), s("span", le, y(u.label), 1)) : o("", !0),
397
+ u.label ? (h(), s("span", ue, y(u.label), 1)) : o("", !0),
369
398
  v(e.$slots, "label-extra"),
370
- u.required ? (h(), s("span", ue, "*")) : o("", !0)
371
- ], 8, ce)) : o("", !0),
399
+ u.required ? (h(), s("span", de, "*")) : o("", !0)
400
+ ], 8, le)) : o("", !0),
372
401
  u.hint ? (h(), s("p", {
373
402
  key: 1,
374
403
  id: M,
375
404
  class: "mb-2 text-base text-muted"
376
405
  }, y(u.hint), 1)) : o("", !0),
377
- u.inline ? o("", !0) : (h(), s("div", de, [c("button", f({
406
+ u.inline ? o("", !0) : (h(), s("div", {
407
+ key: 2,
408
+ class: m(["relative", u.fieldClass])
409
+ }, [c("button", f({
378
410
  id: `${b(E)}-trigger`,
379
411
  ref_key: "trigger",
380
- ref: P
412
+ ref: N
381
413
  }, O.value, {
382
414
  type: "button",
383
415
  disabled: u.disabled,
384
416
  "aria-haspopup": "dialog",
385
- "aria-expanded": T.value,
417
+ "aria-expanded": w.value,
386
418
  "aria-labelledby": u.label || e.$slots["label-icon"] || e.$slots["label-extra"] ? `${k} ${A}` : A,
387
419
  "aria-describedby": Me.value,
388
420
  "aria-invalid": !!u.errorMsg || void 0,
389
421
  "aria-required": u.required || void 0,
390
- class: ["flex w-full items-center 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 disabled:cursor-not-allowed", [
391
- u.size === "small" ? "h-9 pl-3" : "h-10.5 pl-4",
392
- u.clearable && w.value ? "pr-20" : "pr-10",
422
+ class: ["flex w-full items-center rounded-10 border bg-background text-left text-heading transition-[color,background-color,border-color,box-shadow] duration-200 outline-none disabled:cursor-not-allowed", [
423
+ u.size === "small" ? "h-9 pl-3 text-base font-normal" : u.size === "large" ? "h-[50px] pl-4 text-lg font-medium" : "h-10.5 pl-4 text-base font-normal",
424
+ u.clearable && L.value ? "pr-20" : "pr-10",
393
425
  u.disabled ? "" : "cursor-pointer hover:bg-accent-hover",
394
426
  u.errorMsg ? ["border-danger/60", Oe.value && "border-danger shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]"] : Oe.value ? "focus-ring" : ["border-border", !u.disabled && "hover:border-accent-active"]
395
427
  ]],
396
- onClick: i[0] ||= (e) => T.value ? J() : Ge(),
428
+ onClick: i[0] ||= (e) => w.value ? J() : Ge(),
397
429
  onKeydown: Ze,
398
- onFocus: i[1] ||= (e) => L.value = !0,
399
- onBlur: i[2] ||= (e) => L.value = !1
430
+ onFocus: i[1] ||= (e) => I.value = !0,
431
+ onBlur: i[2] ||= (e) => I.value = !1
400
432
  }), [c("span", {
401
433
  id: A,
402
434
  class: m(["truncate tabular-nums", !je.value && "text-muted/80"])
403
- }, y(je.value || w.value || u.placeholder), 3)], 16, fe), c("span", { class: m(["pointer-events-none absolute inset-y-0 flex items-center gap-4 text-muted", u.size === "small" ? "right-3" : "right-4"]) }, [u.clearable && w.value && !u.disabled ? (h(), s("button", {
435
+ }, y(je.value || L.value || u.placeholder), 3)], 16, fe), c("span", { class: m(["pointer-events-none absolute inset-y-0 flex items-center gap-4 text-muted", u.size === "small" ? "right-3" : "right-4"]) }, [u.clearable && L.value && !u.disabled ? (h(), s("button", {
404
436
  key: 0,
405
437
  type: "button",
406
438
  class: "pointer-events-auto inline-flex cursor-pointer items-center justify-center rounded-full p-1 transition-colors duration-200 hover:bg-accent-hover hover:text-primary active:bg-accent-active focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
407
439
  "aria-label": u.label ? `Clear ${u.label}` : "Clear",
408
440
  onClick: We
409
- }, [l(b(se), {
441
+ }, [l(b(ce), {
410
442
  class: "size-4",
411
443
  "aria-hidden": "true"
412
- })], 8, pe)) : o("", !0), l(b(oe), {
413
- class: m(["size-4", T.value && "text-heading"]),
444
+ })], 8, pe)) : o("", !0), l(b(se), {
445
+ class: m(["size-4", w.value && "text-heading"]),
414
446
  "aria-hidden": "true"
415
- }, null, 8, ["class"])], 2)])),
447
+ }, null, 8, ["class"])], 2)], 2)),
416
448
  (h(), a(n, {
417
449
  to: "body",
418
450
  disabled: u.inline
@@ -422,10 +454,10 @@ var ce = ["for"], le = { key: 0 }, ue = {
422
454
  "leave-active-class": "transition duration-100 ease-in",
423
455
  "leave-to-class": "opacity-0"
424
456
  }, {
425
- default: ae(() => [T.value || u.inline ? (h(), s("div", f({
457
+ default: oe(() => [w.value || u.inline ? (h(), s("div", f({
426
458
  key: 0,
427
459
  ref_key: "panel",
428
- ref: F,
460
+ ref: P,
429
461
  role: u.inline ? "group" : "dialog",
430
462
  "aria-modal": u.inline ? void 0 : "true",
431
463
  "aria-label": Ne.value,
@@ -434,11 +466,11 @@ var ce = ["for"], le = { key: 0 }, ue = {
434
466
  }, u.inline ? O.value : void 0, {
435
467
  class: ["flex flex-col overflow-hidden p-3", !u.inline && "fixed z-[90] max-w-[calc(100vw-16px)] rounded-10 border border-border bg-surface shadow-sm"],
436
468
  style: u.inline ? void 0 : {
437
- top: I.value.top === void 0 ? void 0 : `${I.value.top}px`,
438
- bottom: I.value.bottom === void 0 ? void 0 : `${I.value.bottom}px`,
439
- left: `${I.value.left}px`,
440
- maxHeight: `${I.value.maxHeight}px`,
441
- minWidth: `${I.value.minWidth}px`
469
+ top: F.value.top === void 0 ? void 0 : `${F.value.top}px`,
470
+ bottom: F.value.bottom === void 0 ? void 0 : `${F.value.bottom}px`,
471
+ left: `${F.value.left}px`,
472
+ maxHeight: `${F.value.maxHeight}px`,
473
+ minWidth: `${F.value.minWidth}px`
442
474
  },
443
475
  "data-ac-ds": "",
444
476
  "data-testid": "ac-time-picker-panel",
@@ -479,10 +511,10 @@ var ce = ["for"], le = { key: 0 }, ue = {
479
511
  key: 4,
480
512
  type: "hidden",
481
513
  name: u.name,
482
- value: w.value ?? ""
514
+ value: L.value ?? ""
483
515
  }, null, 8, Te)) : o("", !0)
484
516
  ], 16));
485
517
  }
486
518
  });
487
519
  //#endregion
488
- export { C as default };
520
+ export { S as default };
@@ -28,15 +28,15 @@ export default _default;
28
28
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
29
29
  title: string;
30
30
  disabled: boolean;
31
- tone: "neutral" | "info" | "success" | "warning" | "danger";
32
- align: "start" | "center" | "end";
33
- maxWidth: string;
34
31
  content: string;
35
32
  placement: Side;
33
+ align: "start" | "center" | "end";
34
+ tone: "neutral" | "info" | "success" | "warning" | "danger";
36
35
  shortcut: string[];
37
36
  delay: number;
38
37
  interactive: boolean;
39
38
  overflowOnly: boolean;
39
+ maxWidth: string;
40
40
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
41
41
  /** The trigger: a button, icon button, link or any focusable element. It gets `aria-describedby`. */
42
42
  default?: () => unknown;
@@ -85,6 +85,7 @@ export { default as AcTable } from "./AcTable.vue";
85
85
  export { default as AcTabs } from "./AcTabs.vue";
86
86
  export { default as AcTag } from "./AcTag.vue";
87
87
  export { default as AcTagInput } from "./AcTagInput.vue";
88
+ export { default as AcTaintInput } from "./AcTaintInput.vue";
88
89
  export { default as AcTextarea } from "./AcTextarea.vue";
89
90
  export { default as AcThemeMode } from "./AcThemeMode.vue";
90
91
  export { default as AcTimePicker } from "./AcTimePicker.vue";
@@ -47,8 +47,8 @@ export declare function useToast(): {
47
47
  } | undefined;
48
48
  readonly progress?: boolean | undefined;
49
49
  readonly version: number;
50
- readonly dismissible: boolean;
51
50
  readonly duration: number;
51
+ readonly dismissible: boolean;
52
52
  }[], readonly {
53
53
  readonly id: string;
54
54
  readonly tone: ToastTone;
@@ -60,8 +60,8 @@ export declare function useToast(): {
60
60
  } | undefined;
61
61
  readonly progress?: boolean | undefined;
62
62
  readonly version: number;
63
- readonly dismissible: boolean;
64
63
  readonly duration: number;
64
+ readonly dismissible: boolean;
65
65
  }[]>>;
66
66
  toast: (title: string, options?: ToastOptions) => string;
67
67
  success: (title: string, options?: ToastOptions) => string;
@@ -37,7 +37,8 @@ export type { SideTabItem } from "./components/AcSideTabs.vue";
37
37
  export type { SliderMark } from "./components/AcSlider.vue";
38
38
  export type { StatusBarItem, StatusBarStatus } from "./components/AcStatusBar.vue";
39
39
  export type { Step, SubStep } from "./components/AcSteps.vue";
40
- export type { Column } from "./components/AcTable.vue";
40
+ export type { TaintItem } from "./components/AcTaintInput.vue";
41
+ export type { Column, TableSearch } from "./components/AcTable.vue";
41
42
  export type { TabItem } from "./components/AcTabs.vue";
42
43
  export type { UsageBreakdownRow } from "./components/AcUsageCard.vue";
43
44
  export type { UserMenuItem, UserMenuWorkspace } from "./components/AcUserMenu.vue";
package/dist/lib/index.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import ee from "./components/AcAccordion.js";
2
2
  import te from "./components/AcAccordionItem.js";
3
3
  import e from "./components/AcSpinner.js";
4
- import t from "./components/AcButton.js";
5
- import n from "./components/AcAlert.js";
6
- import r from "./components/AcLogo.js";
7
- import i from "./components/AcNavbarItem.js";
8
- import a from "./components/AcAppSwitcher.js";
9
- import o from "./components/AcAvatar.js";
10
- import { humanizeState as s, normalizeState as c, statusMeta as l } from "./components/status.js";
11
- import u from "./components/AcBadge.js";
12
- import d from "./components/AcBanner.js";
13
- import f from "./components/AcBreadcrumb.js";
14
- import p from "./components/AcBulkActionBar.js";
15
- import m from "./components/AcButtons.js";
16
- import h from "./components/AcCard.js";
17
- import g from "./components/AcModal.js";
18
- import _ from "./components/AcSkeleton.js";
19
- import v from "./components/AcTooltip.js";
4
+ import t from "./components/AcTooltip.js";
5
+ import n from "./components/AcButton.js";
6
+ import r from "./components/AcAlert.js";
7
+ import i from "./components/AcLogo.js";
8
+ import a from "./components/AcNavbarItem.js";
9
+ import o from "./components/AcAppSwitcher.js";
10
+ import s from "./components/AcAvatar.js";
11
+ import { humanizeState as c, normalizeState as l, statusMeta as u } from "./components/status.js";
12
+ import d from "./components/AcBadge.js";
13
+ import f from "./components/AcBanner.js";
14
+ import p from "./components/AcBreadcrumb.js";
15
+ import m from "./components/AcBulkActionBar.js";
16
+ import h from "./components/AcButtons.js";
17
+ import g from "./components/AcCard.js";
18
+ import _ from "./components/AcModal.js";
19
+ import v from "./components/AcSkeleton.js";
20
20
  import y from "./components/AcCellValue.js";
21
21
  import b from "./components/AcCheckBox.js";
22
22
  import x from "./components/AcCheckList.js";
@@ -87,17 +87,18 @@ import Pe from "./components/AcSwitchCard.js";
87
87
  import Fe from "./components/AcTable.js";
88
88
  import Ie from "./components/AcTabs.js";
89
89
  import Le from "./components/AcTagInput.js";
90
- import Re from "./components/AcTextarea.js";
91
- import { useColorMode as ze } from "./composables/useColorMode.js";
92
- import Be from "./components/AcThemeMode.js";
93
- import Ve from "./components/AcTimePicker.js";
94
- import { showToast as He, useToast as Ue } from "./composables/useToast.js";
95
- import We from "./components/AcToaster.js";
96
- import Ge from "./components/AcUsageCard.js";
97
- import Ke from "./components/AcUserMenu.js";
98
- import { useTablePagination as qe } from "./composables/useTablePagination.js";
99
- import { useApiPagination as Je } from "./composables/useApiPagination.js";
100
- import { useBulkSelection as Ye } from "./composables/useBulkSelection.js";
101
- import { useFormValidation as Xe } from "./composables/useFormValidation.js";
102
- import { HSLToHex as Ze, HexToHSL as Qe, MIN_CONTRAST as $e, contrastOnWhite as et, getThemeHSL as tt, hexToHsl as nt, hslToHex as rt, readableLightness as it, setThemeHSL as at, useBrandColor as ot } from "./composables/useBrandColor.js";
103
- export { ee as AcAccordion, te as AcAccordionItem, n as AcAlert, a as AcAppSwitcher, o as AcAvatar, u as AcBadge, d as AcBanner, f as AcBreadcrumb, p as AcBulkActionBar, t as AcButton, m as AcButtons, h as AcCard, y as AcCellValue, b as AcCheckBox, x as AcCheckList, S as AcCheckRadio, C as AcCircularProgress, w as AcClusterSwitcher, T as AcColorInput, E as AcCommandBlock, D as AcConfirmModal, O as AcContentHeader, k as AcContentLayout, j as AcContentTable, M as AcCopyButton, N as AcCostSummary, P as AcDatePicker, I as AcDeleteConfirmationModal, I as AcDeleteModal, L as AcDivider, R as AcDropdown, z as AcDropdownDivider, B as AcDropdownItem, V as AcEmptyState, H as AcErrorState, U as AcFeatureCard, W as AcFileUpload, q as AcFontScale, J as AcFooter, Y as AcForm, X as AcFormArray, Z as AcFormFooter, Q as AcFormSection, ne as AcHeader, re as AcHeaderItem, ie as AcHeaderItems, ae as AcInfoTable, F as AcInput, oe as AcKbd, se as AcKeyValueInput, ce as AcLoader, le as AcLocaleSwitcher, r as AcLogo, g as AcModal, ue as AcNavbar, i as AcNavbarItem, de as AcNotificationMenu, fe as AcNumberInput, pe as AcPage, me as AcPagination, he as AcPreloader, _e as AcProductHero, ge as AcProgress, ve as AcRadioCard, be as AcResourceCard, A as AcSearchBar, xe as AcSectionContent, Se as AcSegmentedControl, $ as AcSelect, Ce as AcSettingsRow, De as AcSidePanel, Oe as AcSideTabs, we as AcSidebar, Te as AcSidebarItem, Ee as AcSidebarSection, _ as AcSkeleton, ke as AcSlider, e as AcSpinner, Ae as AcStatCard, je as AcStatusBar, Me as AcSteps, Ne as AcSwitch, Pe as AcSwitchCard, Fe as AcTable, Ie as AcTabs, ye as AcTag, Le as AcTagInput, Re as AcTextarea, Be as AcThemeMode, Ve as AcTimePicker, We as AcToaster, v as AcTooltip, Ge as AcUsageCard, Ke as AcUserMenu, G as FONT_SCALES, Ze as HSLToHex, Qe as HexToHSL, $e as MIN_CONTRAST, et as contrastOnWhite, tt as getThemeHSL, nt as hexToHsl, rt as hslToHex, s as humanizeState, c as normalizeState, it as readableLightness, at as setThemeHSL, He as showToast, l as statusMeta, Je as useApiPagination, ot as useBrandColor, Ye as useBulkSelection, ze as useColorMode, K as useFontScale, Xe as useFormValidation, qe as useTablePagination, Ue as useToast };
90
+ import Re from "./components/AcTaintInput.js";
91
+ import ze from "./components/AcTextarea.js";
92
+ import { useColorMode as Be } from "./composables/useColorMode.js";
93
+ import Ve from "./components/AcThemeMode.js";
94
+ import He from "./components/AcTimePicker.js";
95
+ import { showToast as Ue, useToast as We } from "./composables/useToast.js";
96
+ import Ge from "./components/AcToaster.js";
97
+ import Ke from "./components/AcUsageCard.js";
98
+ import qe from "./components/AcUserMenu.js";
99
+ import { useTablePagination as Je } from "./composables/useTablePagination.js";
100
+ import { useApiPagination as Ye } from "./composables/useApiPagination.js";
101
+ import { useBulkSelection as Xe } from "./composables/useBulkSelection.js";
102
+ import { useFormValidation as Ze } from "./composables/useFormValidation.js";
103
+ import { HSLToHex as Qe, HexToHSL as $e, MIN_CONTRAST as et, contrastOnWhite as tt, getThemeHSL as nt, hexToHsl as rt, hslToHex as it, readableLightness as at, setThemeHSL as ot, useBrandColor as st } from "./composables/useBrandColor.js";
104
+ export { ee as AcAccordion, te as AcAccordionItem, r as AcAlert, o as AcAppSwitcher, s as AcAvatar, d as AcBadge, f as AcBanner, p as AcBreadcrumb, m as AcBulkActionBar, n as AcButton, h as AcButtons, g as AcCard, y as AcCellValue, b as AcCheckBox, x as AcCheckList, S as AcCheckRadio, C as AcCircularProgress, w as AcClusterSwitcher, T as AcColorInput, E as AcCommandBlock, D as AcConfirmModal, O as AcContentHeader, k as AcContentLayout, j as AcContentTable, M as AcCopyButton, N as AcCostSummary, P as AcDatePicker, I as AcDeleteConfirmationModal, I as AcDeleteModal, L as AcDivider, R as AcDropdown, z as AcDropdownDivider, B as AcDropdownItem, V as AcEmptyState, H as AcErrorState, U as AcFeatureCard, W as AcFileUpload, q as AcFontScale, J as AcFooter, Y as AcForm, X as AcFormArray, Z as AcFormFooter, Q as AcFormSection, ne as AcHeader, re as AcHeaderItem, ie as AcHeaderItems, ae as AcInfoTable, F as AcInput, oe as AcKbd, se as AcKeyValueInput, ce as AcLoader, le as AcLocaleSwitcher, i as AcLogo, _ as AcModal, ue as AcNavbar, a as AcNavbarItem, de as AcNotificationMenu, fe as AcNumberInput, pe as AcPage, me as AcPagination, he as AcPreloader, _e as AcProductHero, ge as AcProgress, ve as AcRadioCard, be as AcResourceCard, A as AcSearchBar, xe as AcSectionContent, Se as AcSegmentedControl, $ as AcSelect, Ce as AcSettingsRow, De as AcSidePanel, Oe as AcSideTabs, we as AcSidebar, Te as AcSidebarItem, Ee as AcSidebarSection, v as AcSkeleton, ke as AcSlider, e as AcSpinner, Ae as AcStatCard, je as AcStatusBar, Me as AcSteps, Ne as AcSwitch, Pe as AcSwitchCard, Fe as AcTable, Ie as AcTabs, ye as AcTag, Le as AcTagInput, Re as AcTaintInput, ze as AcTextarea, Ve as AcThemeMode, He as AcTimePicker, Ge as AcToaster, t as AcTooltip, Ke as AcUsageCard, qe as AcUserMenu, G as FONT_SCALES, Qe as HSLToHex, $e as HexToHSL, et as MIN_CONTRAST, tt as contrastOnWhite, nt as getThemeHSL, rt as hexToHsl, it as hslToHex, c as humanizeState, l as normalizeState, at as readableLightness, ot as setThemeHSL, Ue as showToast, u as statusMeta, Ye as useApiPagination, st as useBrandColor, Xe as useBulkSelection, Be as useColorMode, K as useFontScale, Ze as useFormValidation, Je as useTablePagination, We as useToast };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ac-design/design-system",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "AppsCode design system: Tailwind CSS v4 theme and Vue 3 components.",
5
5
  "repository": {
6
6
  "type": "git",