@ac-design/design-system 2.2.0 → 2.3.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 (54) hide show
  1. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +89 -88
  2. package/dist/lib/compat.css +210 -0
  3. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +74 -73
  4. package/dist/lib/components/AcButton.vue.d.ts +18 -12
  5. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +62 -32
  6. package/dist/lib/components/AcCard.vue.d.ts +11 -5
  7. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +99 -51
  8. package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +151 -150
  9. package/dist/lib/components/AcColorInput.vue.d.ts +1 -1
  10. package/dist/lib/components/AcDatePicker.vue.d.ts +27 -3
  11. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +518 -454
  12. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +56 -55
  13. package/dist/lib/components/AcErrorState.vue.d.ts +1 -1
  14. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +39 -38
  15. package/dist/lib/components/AcHeader.vue.d.ts +1 -1
  16. package/dist/lib/components/AcInput.vue.d.ts +28 -7
  17. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +149 -80
  18. package/dist/lib/components/AcKeyValueInput.vue.d.ts +1 -1
  19. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +6 -0
  20. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +74 -58
  21. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +3 -1
  22. package/dist/lib/components/AcNavbar.vue.d.ts +2 -0
  23. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +31 -25
  24. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +90 -89
  25. package/dist/lib/components/AcNumberInput.vue.d.ts +1 -1
  26. package/dist/lib/components/AcRadioCard.js +5 -0
  27. package/dist/lib/components/AcRadioCard.vue.d.ts +55 -0
  28. package/dist/lib/components/AcRadioCard.vue_vue_type_script_setup_true_lang.js +135 -0
  29. package/dist/lib/components/AcSelect.vue.d.ts +12 -1
  30. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +237 -220
  31. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +3 -1
  32. package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
  33. package/dist/lib/components/AcSidebar.vue.d.ts +9 -0
  34. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +113 -94
  35. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +19 -18
  36. package/dist/lib/components/AcSlider.vue.d.ts +1 -1
  37. package/dist/lib/components/AcTable.vue.d.ts +13 -1
  38. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +106 -86
  39. package/dist/lib/components/AcTagInput.vue.d.ts +1 -1
  40. package/dist/lib/components/AcTextarea.vue.d.ts +30 -4
  41. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +92 -61
  42. package/dist/lib/components/AcThemeMode.vue.d.ts +10 -2
  43. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +53 -42
  44. package/dist/lib/components/AcTimePicker.vue.d.ts +21 -3
  45. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +234 -201
  46. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +73 -72
  47. package/dist/lib/components/AcUserMenu.vue.d.ts +8 -0
  48. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +125 -107
  49. package/dist/lib/components/fixedFrame.d.ts +11 -0
  50. package/dist/lib/components/fixedFrame.js +24 -0
  51. package/dist/lib/components/index.d.ts +1 -0
  52. package/dist/lib/components/types.d.ts +2 -0
  53. package/dist/lib/index.js +34 -33
  54. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
- import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, nextTick as c, normalizeClass as l, onMounted as u, openBlock as d, ref as f, toDisplayString as p, unref as m, useAttrs as h, useId as g, useModel as _, vModelText as v, watch as y, withDirectives as b } from "vue";
1
+ import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, nextTick as c, normalizeClass as l, onMounted as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, unref as h, useAttrs as g, useId as _, useModel as v, useSlots as y, vModelText as b, watch as x, withDirectives as S } from "vue";
2
2
  //#region src/lib/components/AcTextarea.vue?vue&type=script&setup=true&lang.ts
3
- var x = ["for"], S = {
4
- key: 0,
5
- class: "text-muted"
6
- }, C = {
3
+ var C = ["for"], w = { key: 0 }, T = {
7
4
  key: 1,
5
+ class: "text-muted"
6
+ }, E = {
7
+ key: 2,
8
8
  class: "text-danger",
9
9
  "aria-hidden": "true"
10
- }, w = ["id"], T = [
10
+ }, D = ["id"], O = [
11
11
  "id",
12
12
  "name",
13
13
  "rows",
@@ -15,19 +15,20 @@ var x = ["for"], S = {
15
15
  "disabled",
16
16
  "readonly",
17
17
  "required",
18
+ "aria-label",
18
19
  "aria-invalid",
19
20
  "aria-describedby"
20
- ], E = {
21
- key: 1,
21
+ ], k = {
22
+ key: 2,
22
23
  class: "mt-1 flex items-start gap-3"
23
- }, D = ["id"], O = {
24
+ }, A = ["id"], j = {
24
25
  key: 1,
25
26
  class: "flex-1"
26
- }, k = ["id"], A = /*@__PURE__*/ a({
27
+ }, M = ["id"], N = /*@__PURE__*/ a({
27
28
  inheritAttrs: !1,
28
29
  __name: "AcTextarea",
29
30
  props: /*@__PURE__*/ o({
30
- label: {},
31
+ label: { default: "" },
31
32
  name: { default: "" },
32
33
  rows: { default: void 0 },
33
34
  autoResize: {
@@ -44,6 +45,10 @@ var x = ["for"], S = {
44
45
  type: Boolean,
45
46
  default: !1
46
47
  },
48
+ requiredMark: {
49
+ type: Boolean,
50
+ default: !1
51
+ },
47
52
  disabled: {
48
53
  type: Boolean,
49
54
  default: !1
@@ -53,90 +58,116 @@ var x = ["for"], S = {
53
58
  default: !1
54
59
  },
55
60
  errorMsg: { default: "" },
56
- hint: { default: "" }
61
+ invalid: {
62
+ type: Boolean,
63
+ default: !1
64
+ },
65
+ hint: { default: "" },
66
+ size: { default: "normal" },
67
+ inputClass: {
68
+ type: [
69
+ Boolean,
70
+ null,
71
+ String,
72
+ Object,
73
+ Array
74
+ ],
75
+ default: void 0
76
+ }
57
77
  }, {
58
78
  modelValue: { default: "" },
59
79
  modelModifiers: {}
60
80
  }),
61
81
  emits: ["update:modelValue"],
62
82
  setup(a, { expose: o }) {
63
- let A = a, j = _(a, "modelValue"), M = g(), N = h(), P = e(() => ({
64
- class: N.class,
65
- style: N.style
66
- })), F = e(() => {
67
- let { class: e, style: t, ...n } = N;
83
+ let N = a, P = v(a, "modelValue"), F = {
84
+ xsmall: "px-3 py-1.5",
85
+ small: "px-4 py-2",
86
+ normal: "px-5 py-2.5"
87
+ }, I = _(), L = g(), R = y(), z = e(() => ({
88
+ class: L.class,
89
+ style: L.style
90
+ })), B = e(() => {
91
+ let { class: e, style: t, ...n } = L;
68
92
  return n;
69
- }), I = f(null), L = f(!1), R = e(() => A.rows ?? 4), z = e(() => (j.value ?? "").length), B = e(() => A.maxlength !== void 0 && z.value >= A.maxlength), V = e(() => [
70
- A.hint && `${M}-hint`,
71
- A.errorMsg && `${M}-msg`,
72
- A.maxlength !== void 0 && `${M}-count`
93
+ }), V = f(null), H = f(!1), U = e(() => !!N.label || !!R["label-icon"] || !!R["label-extra"]), W = e(() => U.value ? void 0 : L["aria-label"] ?? L.placeholder), G = e(() => !!N.errorMsg || N.invalid), K = e(() => N.rows ?? 4), q = e(() => (P.value ?? "").length), J = e(() => N.maxlength !== void 0 && q.value >= N.maxlength), Y = e(() => [
94
+ L["aria-describedby"],
95
+ N.hint && `${I}-hint`,
96
+ N.errorMsg && `${I}-msg`,
97
+ N.maxlength !== void 0 && `${I}-count`
73
98
  ].filter(Boolean).join(" ") || void 0);
74
- function H() {
75
- let e = I.value;
76
- if (!e || !A.autoResize) return;
77
- let t = getComputedStyle(e), n = parseFloat(t.lineHeight) || 20, r = parseFloat(t.paddingTop) + parseFloat(t.paddingBottom) + parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth), i = R.value * n + r, a = A.maxRows > 0 ? A.maxRows * n + r : Infinity;
99
+ function X() {
100
+ let e = V.value;
101
+ if (!e || !N.autoResize) return;
102
+ let t = getComputedStyle(e), n = parseFloat(t.lineHeight) || 20, r = parseFloat(t.paddingTop) + parseFloat(t.paddingBottom) + parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth), i = K.value * n + r, a = N.maxRows > 0 ? N.maxRows * n + r : Infinity;
78
103
  e.style.height = "auto";
79
104
  let o = e.scrollHeight + parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth);
80
- e.style.height = `${Math.min(Math.max(o, i), a)}px`, L.value = o > a;
105
+ e.style.height = `${Math.min(Math.max(o, i), a)}px`, H.value = o > a;
81
106
  }
82
- return y(j, () => c(H)), y(() => [
83
- A.autoResize,
84
- A.rows,
85
- A.maxRows
107
+ return x(P, () => c(X)), x(() => [
108
+ N.autoResize,
109
+ N.rows,
110
+ N.maxRows
86
111
  ], () => {
87
- !A.autoResize && I.value && (I.value.style.height = ""), c(H);
88
- }), u(H), o({ focus: () => I.value?.focus() }), (e, o) => (d(), n("div", s(P.value, {
112
+ !N.autoResize && V.value && (V.value.style.height = ""), c(X);
113
+ }), u(X), o({ focus: () => V.value?.focus() }), (e, o) => (d(), n("div", s(z.value, {
89
114
  class: ["w-full", a.disabled && "opacity-50"],
90
115
  "data-ac-ds": "",
91
116
  "data-testid": "ac-textarea"
92
117
  }), [
93
- r("label", {
94
- for: m(M),
118
+ U.value ? (d(), n("label", {
119
+ key: 0,
120
+ for: h(I),
95
121
  class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
96
122
  }, [
97
- r("span", null, p(a.label), 1),
98
- a.readonly ? (d(), n("span", S, "(read only)")) : t("", !0),
99
- a.required ? (d(), n("span", C, "*")) : t("", !0)
100
- ], 8, x),
123
+ p(e.$slots, "label-icon"),
124
+ a.label ? (d(), n("span", w, m(a.label), 1)) : t("", !0),
125
+ a.readonly ? (d(), n("span", T, "(read only)")) : t("", !0),
126
+ p(e.$slots, "label-extra"),
127
+ a.required || a.requiredMark ? (d(), n("span", E, "*")) : t("", !0)
128
+ ], 8, C)) : t("", !0),
101
129
  a.hint ? (d(), n("p", {
102
- key: 0,
103
- id: `${m(M)}-hint`,
130
+ key: 1,
131
+ id: `${h(I)}-hint`,
104
132
  class: "mb-2 text-base text-muted"
105
- }, p(a.hint), 9, w)) : t("", !0),
106
- b(r("textarea", s({
107
- id: m(M),
133
+ }, m(a.hint), 9, D)) : t("", !0),
134
+ S(r("textarea", s({
135
+ id: h(I),
108
136
  ref_key: "field",
109
- ref: I
110
- }, F.value, {
111
- "onUpdate:modelValue": o[0] ||= (e) => j.value = e,
137
+ ref: V
138
+ }, B.value, {
139
+ "onUpdate:modelValue": o[0] ||= (e) => P.value = e,
112
140
  name: a.name,
113
- rows: R.value,
141
+ rows: K.value,
114
142
  maxlength: a.maxlength,
115
143
  disabled: a.disabled,
116
144
  readonly: a.readonly,
117
145
  required: a.required,
118
- "aria-invalid": !!a.errorMsg || void 0,
119
- "aria-describedby": V.value,
120
- class: ["block w-full rounded-10 border px-5 py-2.5 text-base text-heading transition-[color,background-color,border-color,box-shadow] duration-200 outline-none placeholder:text-muted/80 disabled:cursor-not-allowed", [
146
+ "aria-label": W.value,
147
+ "aria-invalid": G.value || void 0,
148
+ "aria-describedby": Y.value,
149
+ class: ["block w-full rounded-10 border text-base text-heading transition-[color,background-color,border-color,box-shadow] duration-200 outline-none placeholder:text-muted/80 disabled:cursor-not-allowed", [
150
+ F[a.size] ?? F.normal,
121
151
  a.readonly ? "bg-surface-muted" : "bg-background",
122
- a.rows === void 0 && "min-h-40",
152
+ a.rows === void 0 && !a.inputClass && "min-h-40",
123
153
  a.mono ? "font-mono text-xs leading-5 font-normal" : "font-medium",
124
- a.autoResize ? L.value ? "ac-scrollbar resize-none" : "resize-none overflow-hidden" : "ac-scrollbar resize-y",
125
- a.errorMsg ? "border-danger/50 focus:border-danger focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]" : ["border-border focus:focus-ring", !a.disabled && "hover:border-accent-active"]
154
+ a.autoResize ? H.value ? "ac-scrollbar resize-none" : "resize-none overflow-hidden" : "ac-scrollbar resize-y",
155
+ G.value ? "border-danger/50 focus:border-danger focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]" : ["border-border focus:focus-ring", !a.disabled && "hover:border-accent-active"],
156
+ a.inputClass
126
157
  ]]
127
- }), null, 16, T), [[v, j.value]]),
128
- a.errorMsg || a.maxlength !== void 0 ? (d(), n("div", E, [a.errorMsg ? (d(), n("p", {
158
+ }), null, 16, O), [[b, P.value]]),
159
+ a.errorMsg || a.maxlength !== void 0 ? (d(), n("div", k, [a.errorMsg ? (d(), n("p", {
129
160
  key: 0,
130
- id: `${m(M)}-msg`,
161
+ id: `${h(I)}-msg`,
131
162
  class: "min-w-0 flex-1 text-base text-danger-strong",
132
163
  role: "alert"
133
- }, p(a.errorMsg), 9, D)) : (d(), n("span", O)), a.maxlength === void 0 ? t("", !0) : (d(), n("p", {
164
+ }, m(a.errorMsg), 9, A)) : (d(), n("span", j)), a.maxlength === void 0 ? t("", !0) : (d(), n("p", {
134
165
  key: 2,
135
- id: `${m(M)}-count`,
136
- class: l(["shrink-0 text-xs tabular-nums", B.value ? "font-medium text-danger-strong" : "text-muted"])
137
- }, [o[1] ||= r("span", { class: "sr-only" }, "Characters used: ", -1), i(p(z.value) + " / " + p(a.maxlength), 1)], 10, k))])) : t("", !0)
166
+ id: `${h(I)}-count`,
167
+ class: l(["shrink-0 text-xs tabular-nums", J.value ? "font-medium text-danger-strong" : "text-muted"])
168
+ }, [o[1] ||= r("span", { class: "sr-only" }, "Characters used: ", -1), i(m(q.value) + " / " + m(a.maxlength), 1)], 10, M))])) : t("", !0)
138
169
  ], 16));
139
170
  }
140
171
  });
141
172
  //#endregion
142
- export { A as default };
173
+ export { N as default };
@@ -5,10 +5,18 @@ export interface Props {
5
5
  /** `icons` is a compact 3-icon switch; `labels` adds the words, for menus and settings pages; `toggle` is cloud-ui's sun/moon switch for the navbar (64×32px), light or dark only. */
6
6
  display?: "icons" | "labels" | "toggle";
7
7
  }
8
- declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ type __VLS_Props = Props;
9
+ type __VLS_ModelProps = {
10
+ /** The theme as a boolean, for apps that keep it in their own store (e.g. cloud-ui's VueUse `useDark`). When bound, the switch only reads and writes this value and leaves the `dark` class and localStorage to the app. */
11
+ "dark"?: boolean | undefined;
12
+ };
13
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
15
  "set:theme": (theme: "light" | "dark") => any;
10
- }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
16
+ "update:dark": (value: boolean | undefined) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
18
  "onSet:theme"?: ((theme: "light" | "dark") => any) | undefined;
19
+ "onUpdate:dark"?: ((value: boolean | undefined) => any) | undefined;
12
20
  }>, {
13
21
  display: "icons" | "labels" | "toggle";
14
22
  defaultMode: ColorMode;
@@ -1,92 +1,103 @@
1
1
  import { useColorMode as e } from "../composables/useColorMode.js";
2
- import { Fragment as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, onBeforeUnmount as l, openBlock as u, ref as d, renderList as f, resolveDynamicComponent as p, toDisplayString as m, unref as h, watch as g } from "vue";
3
- import { Monitor as _, Moon as v, Sun as y } from "@lucide/vue";
2
+ import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, mergeModels as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderList as m, resolveDynamicComponent as h, toDisplayString as g, unref as _, useModel as v, watch as y } from "vue";
3
+ import { Monitor as b, Moon as x, Sun as S } from "@lucide/vue";
4
4
  //#region src/lib/components/AcThemeMode.vue?vue&type=script&setup=true&lang.ts
5
- var b = ["aria-checked", "title"], x = {
5
+ var C = ["aria-checked", "title"], w = {
6
6
  key: 1,
7
7
  role: "radiogroup",
8
8
  "aria-label": "Theme",
9
9
  class: "inline-flex items-center gap-1 rounded-10 bg-surface-sunken p-1",
10
10
  "data-ac-ds": "",
11
11
  "data-testid": "ac-theme-mode"
12
- }, S = [
12
+ }, T = [
13
13
  "aria-checked",
14
14
  "aria-label",
15
15
  "title",
16
16
  "onClick"
17
- ], C = { key: 0 }, w = /*@__PURE__*/ s({
17
+ ], E = { key: 0 }, D = /*@__PURE__*/ c({
18
18
  __name: "AcThemeMode",
19
- props: {
19
+ props: /*@__PURE__*/ l({
20
20
  defaultMode: { default: "light" },
21
21
  display: { default: "icons" }
22
- },
23
- emits: ["set:theme"],
24
- setup(s, { emit: w }) {
25
- let T = s, E = w, D = [
22
+ }, {
23
+ dark: {
24
+ type: Boolean,
25
+ default: void 0
26
+ },
27
+ darkModifiers: {}
28
+ }),
29
+ emits: /*@__PURE__*/ l(["set:theme"], ["update:dark"]),
30
+ setup(c, { emit: l }) {
31
+ let D = c, O = v(c, "dark"), k = l, A = [
26
32
  {
27
33
  value: "light",
28
34
  label: "Light",
29
- icon: y
35
+ icon: S
30
36
  },
31
37
  {
32
38
  value: "dark",
33
39
  label: "Dark",
34
- icon: v
40
+ icon: x
35
41
  },
36
42
  {
37
43
  value: "system",
38
44
  label: "System",
39
- icon: _
45
+ icon: b
40
46
  }
41
- ], { mode: O, isDark: k, setMode: A } = e({ defaultMode: T.defaultMode }), j = d(k.value), M;
42
- function N(e) {
43
- A(e), E("set:theme", k.value ? "dark" : "light");
47
+ ], j = O.value === void 0 ? e({ defaultMode: D.defaultMode }) : null, M = n(() => j ? j.isDark.value : !!O.value), N = n(() => j ? j.mode.value : O.value ? "dark" : "light"), P = p(M.value), F;
48
+ function I(e) {
49
+ if (j) {
50
+ j.setMode(e), k("set:theme", M.value ? "dark" : "light");
51
+ return;
52
+ }
53
+ let t = e === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches : e === "dark";
54
+ O.value = t, k("set:theme", t ? "dark" : "light");
44
55
  }
45
- function P() {
46
- j.value = !j.value, clearTimeout(M), M = setTimeout(() => {
47
- M = void 0, N(j.value ? "dark" : "light");
56
+ function L() {
57
+ P.value = !P.value, clearTimeout(F), F = setTimeout(() => {
58
+ F = void 0, I(P.value ? "dark" : "light");
48
59
  }, 200);
49
60
  }
50
- return g(k, (e) => {
51
- M === void 0 && (j.value = e);
52
- }), l(() => clearTimeout(M)), (e, l) => s.display === "toggle" ? (u(), i("button", {
61
+ return y(M, (e) => {
62
+ F === void 0 && (P.value = e);
63
+ }), d(() => clearTimeout(F)), (e, n) => c.display === "toggle" ? (f(), a("button", {
53
64
  key: 0,
54
65
  type: "button",
55
66
  role: "switch",
56
- "aria-checked": j.value,
67
+ "aria-checked": P.value,
57
68
  "aria-label": "Dark mode",
58
- title: j.value ? "Switch to light mode" : "Switch to dark mode",
69
+ title: P.value ? "Switch to light mode" : "Switch to dark mode",
59
70
  class: "relative inline-flex h-8 w-16 shrink-0 cursor-pointer items-center justify-center rounded-full border border-border focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none",
60
71
  "data-ac-ds": "",
61
72
  "data-testid": "ac-theme-mode",
62
- onClick: P
73
+ onClick: L
63
74
  }, [
64
- a("span", {
65
- class: c(["inline-flex transition-[translate,rotate,opacity] duration-500 ease-[cubic-bezier(0.26,2,0.46,0.71)] motion-reduce:transition-none", j.value ? "translate-x-[10px] rotate-0 opacity-0" : "translate-x-[3px] rotate-[15deg] opacity-100"]),
75
+ o("span", {
76
+ class: u(["inline-flex transition-[translate,rotate,opacity] duration-500 ease-[cubic-bezier(0.26,2,0.46,0.71)] motion-reduce:transition-none", P.value ? "translate-x-[10px] rotate-0 opacity-0" : "translate-x-[3px] rotate-[15deg] opacity-100"]),
66
77
  "aria-hidden": "true"
67
- }, [o(h(y), { class: "size-[19px] text-theme-sun" })], 2),
68
- a("span", {
69
- class: c(["size-[21px] shrink-0 rounded-full inset-ring-2 transition-[translate,background-color] duration-500 ease-[cubic-bezier(0.26,2,0.46,0.71)] motion-reduce:transition-none", j.value ? "-translate-x-[14px] bg-theme-moon inset-ring-white" : "translate-x-4 bg-theme-sun-soft inset-ring-theme-sun"]),
78
+ }, [s(_(S), { class: "size-[19px] text-theme-sun" })], 2),
79
+ o("span", {
80
+ class: u(["size-[21px] shrink-0 rounded-full inset-ring-2 transition-[translate,background-color] duration-500 ease-[cubic-bezier(0.26,2,0.46,0.71)] motion-reduce:transition-none", P.value ? "-translate-x-[14px] bg-theme-moon inset-ring-white" : "translate-x-4 bg-theme-sun-soft inset-ring-theme-sun"]),
70
81
  "aria-hidden": "true"
71
82
  }, null, 2),
72
- a("span", {
73
- class: c(["inline-flex transition-[translate,rotate,opacity] duration-500 ease-[cubic-bezier(0.26,2.5,0.46,0.71)] motion-reduce:transition-none", j.value ? "-translate-x-[3px] -rotate-[15deg] opacity-100" : "-translate-x-2 rotate-0 opacity-0"]),
83
+ o("span", {
84
+ class: u(["inline-flex transition-[translate,rotate,opacity] duration-500 ease-[cubic-bezier(0.26,2.5,0.46,0.71)] motion-reduce:transition-none", P.value ? "-translate-x-[3px] -rotate-[15deg] opacity-100" : "-translate-x-2 rotate-0 opacity-0"]),
74
85
  "aria-hidden": "true"
75
- }, [o(h(v), { class: "size-[21px] text-heading" })], 2)
76
- ], 8, b)) : (u(), i("div", x, [(u(), i(t, null, f(D, (e) => a("button", {
86
+ }, [s(_(x), { class: "size-[21px] text-heading" })], 2)
87
+ ], 8, C)) : (f(), a("div", w, [(f(), a(t, null, m(A, (e) => o("button", {
77
88
  key: e.value,
78
89
  type: "button",
79
90
  role: "radio",
80
- "aria-checked": h(O) === e.value,
81
- "aria-label": s.display === "icons" ? `${e.label} theme` : void 0,
82
- title: s.display === "icons" ? `${e.label} theme` : void 0,
83
- class: c(["inline-flex h-7 cursor-pointer items-center justify-center gap-1.5 rounded-8 text-base font-medium transition-[background-color,color,box-shadow] duration-200 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset focus-visible:outline-none", [s.display === "icons" ? "w-7" : "px-3", h(O) === e.value ? "bg-surface text-heading shadow-sm" : "text-muted hover:text-heading"]]),
84
- onClick: (t) => N(e.value)
85
- }, [(u(), n(p(e.icon), {
91
+ "aria-checked": N.value === e.value,
92
+ "aria-label": c.display === "icons" ? `${e.label} theme` : void 0,
93
+ title: c.display === "icons" ? `${e.label} theme` : void 0,
94
+ class: u(["inline-flex h-7 cursor-pointer items-center justify-center gap-1.5 rounded-8 text-base font-medium transition-[background-color,color,box-shadow] duration-200 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset focus-visible:outline-none", [c.display === "icons" ? "w-7" : "px-3", N.value === e.value ? "bg-surface text-heading shadow-sm" : "text-muted hover:text-heading"]]),
95
+ onClick: (t) => I(e.value)
96
+ }, [(f(), r(h(e.icon), {
86
97
  class: "size-4",
87
98
  "aria-hidden": "true"
88
- })), s.display === "labels" ? (u(), i("span", C, m(e.label), 1)) : r("", !0)], 10, S)), 64))]));
99
+ })), c.display === "labels" ? (f(), a("span", E, g(e.label), 1)) : i("", !0)], 10, T)), 64))]));
89
100
  }
90
101
  });
91
102
  //#endregion
92
- export { w as default };
103
+ export { D as default };
@@ -27,8 +27,17 @@ export interface Props {
27
27
  size?: "small" | "normal";
28
28
  /** Adds a hidden input with this name so plain form posts include the value. */
29
29
  name?: string;
30
+ /** Draws the hour and minute columns in place, with no field, popover or border. Each click updates `v-model` at once. */
31
+ inline?: boolean;
30
32
  }
31
33
  type __VLS_Props = Props;
34
+ type __VLS_Slots = {
35
+ /** Content before the label text, such as a 14px icon. */
36
+ "label-icon"?: () => unknown;
37
+ /** Content after the label text, such as "(Optional)" or an info tooltip. */
38
+ "label-extra"?: () => unknown;
39
+ };
40
+ declare function scrollToSelected(): Promise<void>;
32
41
  type __VLS_ModelProps = {
33
42
  /** `"14:05"`, or `"14:05:30"` with `show-seconds`, always 24-hour. `null` when empty. */
34
43
  modelValue?: string | null;
@@ -36,9 +45,11 @@ type __VLS_ModelProps = {
36
45
  "open"?: boolean;
37
46
  };
38
47
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
39
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
40
- /** Moves focus to the field. */
41
- focus: () => void | undefined;
48
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
49
+ /** Moves focus to the field, or to the hours column when `inline`. */
50
+ focus: () => void;
51
+ /** Scrolls each column to its selected value. Call it when an `inline` picker becomes visible, e.g. on a tab switch. */
52
+ scrollToSelected: typeof scrollToSelected;
42
53
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
54
  "update:modelValue": (value: string | null) => any;
44
55
  "update:open": (value: boolean) => any;
@@ -54,6 +65,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
54
65
  name: string;
55
66
  size: "small" | "normal";
56
67
  hint: string;
68
+ inline: boolean;
57
69
  placeholder: string;
58
70
  clearable: boolean;
59
71
  errorMsg: string;
@@ -61,5 +73,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
61
73
  hourCycle: 12 | 24;
62
74
  minuteStep: number;
63
75
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
76
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
64
77
  declare const _default: typeof __VLS_export;
65
78
  export default _default;
79
+ type __VLS_WithSlots<T, S> = T & {
80
+ new (): {
81
+ $slots: S;
82
+ };
83
+ };