@ac-design/design-system 2.7.0 → 2.8.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.
- package/dist/lib/compat.css +49 -10
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +46 -43
- package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/lib/components/AcColorInput.vue.d.ts +4 -0
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +12 -2
- package/dist/lib/components/AcDatePicker.vue.d.ts +3 -0
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +12 -2
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcInput.vue.d.ts +2 -0
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +18 -8
- package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +12 -8
- package/dist/lib/components/AcMonthPicker.vue.d.ts +3 -0
- package/dist/lib/components/AcMonthPicker.vue_vue_type_script_setup_true_lang.js +12 -2
- package/dist/lib/components/AcNumberInput.vue.d.ts +3 -0
- package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +11 -1
- package/dist/lib/components/AcSelect.vue.d.ts +3 -0
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +241 -218
- package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +11 -7
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcSteps.vue.d.ts +3 -0
- package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +33 -29
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +83 -72
- package/dist/lib/components/AcTextarea.vue.d.ts +3 -0
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +11 -1
- package/dist/lib/components/AcTimePicker.vue.d.ts +3 -0
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +12 -2
- package/dist/lib/components/AcToaster.vue.d.ts +3 -0
- package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +71 -68
- package/dist/lib/theme.css +11 -0
- package/package.json +1 -1
package/dist/lib/compat.css
CHANGED
|
@@ -316,6 +316,10 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
316
316
|
display: none !important;
|
|
317
317
|
}
|
|
318
318
|
@layer ac-compat {
|
|
319
|
+
.\@container\/steps:where([data-ac-ds], [data-ac-ds] *) {
|
|
320
|
+
container-type: inline-size !important;
|
|
321
|
+
container-name: steps !important;
|
|
322
|
+
}
|
|
319
323
|
.\@container:where([data-ac-ds], [data-ac-ds] *) {
|
|
320
324
|
container-type: inline-size !important;
|
|
321
325
|
}
|
|
@@ -411,8 +415,8 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
411
415
|
.top-10:where([data-ac-ds], [data-ac-ds] *) {
|
|
412
416
|
top: calc(var(--spacing) * 10) !important;
|
|
413
417
|
}
|
|
414
|
-
.top-
|
|
415
|
-
top:
|
|
418
|
+
.top-\[var\(--ac-toaster-offset\,80px\)\]:where([data-ac-ds], [data-ac-ds] *) {
|
|
419
|
+
top: var(--ac-toaster-offset,80px) !important;
|
|
416
420
|
}
|
|
417
421
|
.top-full:where([data-ac-ds], [data-ac-ds] *) {
|
|
418
422
|
top: 100% !important;
|
|
@@ -468,8 +472,8 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
468
472
|
.bottom-3:where([data-ac-ds], [data-ac-ds] *) {
|
|
469
473
|
bottom: calc(var(--spacing) * 3) !important;
|
|
470
474
|
}
|
|
471
|
-
.bottom-
|
|
472
|
-
bottom:
|
|
475
|
+
.bottom-\[var\(--ac-toaster-offset\,20px\)\]:where([data-ac-ds], [data-ac-ds] *) {
|
|
476
|
+
bottom: var(--ac-toaster-offset,20px) !important;
|
|
473
477
|
}
|
|
474
478
|
.bottom-full:where([data-ac-ds], [data-ac-ds] *) {
|
|
475
479
|
bottom: 100% !important;
|
|
@@ -579,6 +583,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
579
583
|
margin-inline: auto !important;
|
|
580
584
|
padding-inline: calc(var(--spacing) * 4) !important;
|
|
581
585
|
}
|
|
586
|
+
.-mx-1:where([data-ac-ds], [data-ac-ds] *) {
|
|
587
|
+
margin-inline: calc(var(--spacing) * -1) !important;
|
|
588
|
+
}
|
|
582
589
|
.-mx-2:where([data-ac-ds], [data-ac-ds] *) {
|
|
583
590
|
margin-inline: calc(var(--spacing) * -2) !important;
|
|
584
591
|
}
|
|
@@ -666,24 +673,21 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
666
673
|
.-mr-2:where([data-ac-ds], [data-ac-ds] *) {
|
|
667
674
|
margin-right: calc(var(--spacing) * -2) !important;
|
|
668
675
|
}
|
|
676
|
+
.mr-0\.5:where([data-ac-ds], [data-ac-ds] *) {
|
|
677
|
+
margin-right: calc(var(--spacing) * 0.5) !important;
|
|
678
|
+
}
|
|
669
679
|
.mr-1:where([data-ac-ds], [data-ac-ds] *) {
|
|
670
680
|
margin-right: var(--spacing) !important;
|
|
671
681
|
}
|
|
672
682
|
.mr-1\.5:where([data-ac-ds], [data-ac-ds] *) {
|
|
673
683
|
margin-right: calc(var(--spacing) * 1.5) !important;
|
|
674
684
|
}
|
|
675
|
-
.mr-2:where([data-ac-ds], [data-ac-ds] *) {
|
|
676
|
-
margin-right: calc(var(--spacing) * 2) !important;
|
|
677
|
-
}
|
|
678
685
|
.mr-3:where([data-ac-ds], [data-ac-ds] *) {
|
|
679
686
|
margin-right: calc(var(--spacing) * 3) !important;
|
|
680
687
|
}
|
|
681
688
|
.mr-4:where([data-ac-ds], [data-ac-ds] *) {
|
|
682
689
|
margin-right: calc(var(--spacing) * 4) !important;
|
|
683
690
|
}
|
|
684
|
-
.mr-5:where([data-ac-ds], [data-ac-ds] *) {
|
|
685
|
-
margin-right: calc(var(--spacing) * 5) !important;
|
|
686
|
-
}
|
|
687
691
|
.mb-1:where([data-ac-ds], [data-ac-ds] *) {
|
|
688
692
|
margin-bottom: var(--spacing) !important;
|
|
689
693
|
}
|
|
@@ -1829,6 +1833,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
1829
1833
|
.overflow-auto:where([data-ac-ds], [data-ac-ds] *) {
|
|
1830
1834
|
overflow: auto !important;
|
|
1831
1835
|
}
|
|
1836
|
+
.overflow-clip:where([data-ac-ds], [data-ac-ds] *) {
|
|
1837
|
+
overflow: clip !important;
|
|
1838
|
+
}
|
|
1832
1839
|
.overflow-hidden:where([data-ac-ds], [data-ac-ds] *) {
|
|
1833
1840
|
overflow: hidden !important;
|
|
1834
1841
|
}
|
|
@@ -5351,6 +5358,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
5351
5358
|
.sm\:shrink-0:where([data-ac-ds], [data-ac-ds] *) {
|
|
5352
5359
|
flex-shrink: 0 !important;
|
|
5353
5360
|
}
|
|
5361
|
+
.sm\:basis-\[160px\]:where([data-ac-ds], [data-ac-ds] *) {
|
|
5362
|
+
flex-basis: 160px !important;
|
|
5363
|
+
}
|
|
5354
5364
|
.sm\:-translate-x-1\/2:where([data-ac-ds], [data-ac-ds] *) {
|
|
5355
5365
|
--tw-translate-x: calc(calc(1 / 2 * 100%) * -1) !important;
|
|
5356
5366
|
translate: var(--tw-translate-x) var(--tw-translate-y) !important;
|
|
@@ -5572,6 +5582,19 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
5572
5582
|
display: none !important;
|
|
5573
5583
|
}
|
|
5574
5584
|
}
|
|
5585
|
+
@container steps (width < 480px) {
|
|
5586
|
+
.\@max-\[480px\]\/steps\:sr-only:where([data-ac-ds], [data-ac-ds] *) {
|
|
5587
|
+
position: absolute !important;
|
|
5588
|
+
width: 1px !important;
|
|
5589
|
+
height: 1px !important;
|
|
5590
|
+
padding: 0 !important;
|
|
5591
|
+
margin: -1px !important;
|
|
5592
|
+
overflow: hidden !important;
|
|
5593
|
+
clip-path: inset(50%) !important;
|
|
5594
|
+
white-space: nowrap !important;
|
|
5595
|
+
border-width: 0 !important;
|
|
5596
|
+
}
|
|
5597
|
+
}
|
|
5575
5598
|
@container (width < 448px) {
|
|
5576
5599
|
.\@max-md\:-mt-1:where([data-ac-ds], [data-ac-ds] *) {
|
|
5577
5600
|
margin-top: calc(var(--spacing) * -1) !important;
|
|
@@ -5601,6 +5624,19 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
5601
5624
|
padding-left: calc(var(--spacing) * 12) !important;
|
|
5602
5625
|
}
|
|
5603
5626
|
}
|
|
5627
|
+
@container (width >= 401px) {
|
|
5628
|
+
.\@min-\[401px\]\:sr-only:where([data-ac-ds], [data-ac-ds] *) {
|
|
5629
|
+
position: absolute !important;
|
|
5630
|
+
width: 1px !important;
|
|
5631
|
+
height: 1px !important;
|
|
5632
|
+
padding: 0 !important;
|
|
5633
|
+
margin: -1px !important;
|
|
5634
|
+
overflow: hidden !important;
|
|
5635
|
+
clip-path: inset(50%) !important;
|
|
5636
|
+
white-space: nowrap !important;
|
|
5637
|
+
border-width: 0 !important;
|
|
5638
|
+
}
|
|
5639
|
+
}
|
|
5604
5640
|
@container (width >= 512px) {
|
|
5605
5641
|
.\@lg\:w-2\/5:where([data-ac-ds], [data-ac-ds] *) {
|
|
5606
5642
|
width: calc(2 / 5 * 100%) !important;
|
|
@@ -5909,6 +5945,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
5909
5945
|
.\[\&\>svg\]\:text-muted > svg:where([data-ac-ds], [data-ac-ds] *) {
|
|
5910
5946
|
color: var(--color-muted) !important;
|
|
5911
5947
|
}
|
|
5948
|
+
:where(.\[\:where\(\&\)\]\:w-full):where([data-ac-ds], [data-ac-ds] *) {
|
|
5949
|
+
width: 100% !important;
|
|
5950
|
+
}
|
|
5912
5951
|
:where(.\[\:where\(\&\)\]\:bg-danger\/5):where([data-ac-ds], [data-ac-ds] *) {
|
|
5913
5952
|
background-color: color-mix(in srgb, #ef4444 5%, transparent) !important;
|
|
5914
5953
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -12,7 +12,7 @@ var g = {
|
|
|
12
12
|
class: "mt-0.5 text-xs leading-4 text-muted"
|
|
13
13
|
}, b = {
|
|
14
14
|
key: 1,
|
|
15
|
-
class: "flex max-w-full min-w-0 shrink-0 flex-wrap items-center gap-2"
|
|
15
|
+
class: "flex max-w-full min-w-0 shrink-0 flex-wrap items-center gap-2 sm:flex-nowrap"
|
|
16
16
|
}, x = /*@__PURE__*/ c({
|
|
17
17
|
__name: "AcCard",
|
|
18
18
|
props: {
|
|
@@ -203,7 +203,7 @@ var g = {
|
|
|
203
203
|
key: 1,
|
|
204
204
|
class: l(["absolute -top-4 -right-4 [&_svg]:size-24!", M.value.watermark])
|
|
205
205
|
}, [d(e.$slots, "icon")], 2))])) : i("", !0),
|
|
206
|
-
o("div", { class: l(["flex min-w-0 flex-1 basis-[220px] items-center", A.value ? "gap-2.5" : "gap-3"]) }, [c.icon || e.$slots.icon ? (u(), a("span", {
|
|
206
|
+
o("div", { class: l(["flex min-w-0 flex-1 basis-[220px] items-center sm:basis-[160px]", A.value ? "gap-2.5" : "gap-3"]) }, [c.icon || e.$slots.icon ? (u(), a("span", {
|
|
207
207
|
key: 0,
|
|
208
208
|
class: l(["flex shrink-0 items-center justify-center", [
|
|
209
209
|
M.value.tile,
|
|
@@ -6,30 +6,30 @@ var E = { class: "flex flex-col gap-3" }, D = ["for"], O = [
|
|
|
6
6
|
"name",
|
|
7
7
|
"value",
|
|
8
8
|
"disabled"
|
|
9
|
-
], k = { class: "
|
|
9
|
+
], k = { class: "font-normal" }, A = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "text-xs text-muted"
|
|
12
|
-
},
|
|
12
|
+
}, j = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "mt-1 text-base text-danger-strong",
|
|
15
15
|
role: "alert"
|
|
16
|
-
},
|
|
16
|
+
}, M = [
|
|
17
17
|
"name",
|
|
18
18
|
"checked",
|
|
19
19
|
"indeterminate",
|
|
20
20
|
"disabled",
|
|
21
21
|
"aria-invalid",
|
|
22
22
|
"aria-describedby"
|
|
23
|
-
],
|
|
23
|
+
], N = {
|
|
24
24
|
key: 0,
|
|
25
|
-
class: "
|
|
26
|
-
},
|
|
25
|
+
class: "font-medium"
|
|
26
|
+
}, P = {
|
|
27
27
|
key: 1,
|
|
28
28
|
class: "font-medium"
|
|
29
|
-
},
|
|
29
|
+
}, F = {
|
|
30
30
|
key: 2,
|
|
31
31
|
class: "text-xs text-muted"
|
|
32
|
-
},
|
|
32
|
+
}, I = ["id"], L = /*@__PURE__*/ o({
|
|
33
33
|
inheritAttrs: !1,
|
|
34
34
|
__name: "AcCheckBox",
|
|
35
35
|
props: /*@__PURE__*/ s({
|
|
@@ -58,75 +58,78 @@ var E = { class: "flex flex-col gap-3" }, D = ["for"], O = [
|
|
|
58
58
|
}),
|
|
59
59
|
emits: ["update:modelValue", "update:checked"],
|
|
60
60
|
setup(o) {
|
|
61
|
-
let s = o,
|
|
62
|
-
class:
|
|
63
|
-
style:
|
|
64
|
-
}),
|
|
65
|
-
let { class: e, style: t, ...n } =
|
|
66
|
-
return s.label ||
|
|
61
|
+
let s = o, L = y(o, "modelValue"), R = y(o, "checked"), z = b(), B = v(), V = _(), H = f(null), U = t(() => s.size === "small"), W = t(() => s.indeterminate && !R.value), G = t(() => s.options ? V : {
|
|
62
|
+
class: V.class,
|
|
63
|
+
style: V.style
|
|
64
|
+
}), K = t(() => {
|
|
65
|
+
let { class: e, style: t, ...n } = V;
|
|
66
|
+
return s.label || z.label || n["aria-label"] || n["aria-labelledby"] ? n : {
|
|
67
67
|
"aria-label": "Select",
|
|
68
68
|
...n
|
|
69
69
|
};
|
|
70
|
-
}),
|
|
70
|
+
}), q = t(() => !!(s.label || z.label || s.description)), J = t(() => U.value ? "size-[18px]" : "size-6"), Y = t(() => [
|
|
71
71
|
"peer cursor-pointer appearance-none rounded-4 border border-muted/70 transition-colors duration-200 group-hover:enabled:not-checked:not-indeterminate:border-primary/60 checked:border-primary checked:bg-primary indeterminate:border-primary indeterminate:bg-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none disabled:cursor-not-allowed disabled:not-checked:not-indeterminate:bg-surface-sunken",
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
]),
|
|
75
|
-
async function
|
|
76
|
-
|
|
72
|
+
J.value,
|
|
73
|
+
U.value ? "bg-background" : "bg-transparent"
|
|
74
|
+
]), X = t(() => ["pointer-events-none absolute inset-0 m-auto text-white opacity-0 transition-opacity duration-150 motion-reduce:transition-none", U.value ? "size-3.5" : "size-5"]), Z = t(() => U.value ? "" : "pt-0.5"), Q = t(() => U.value ? "mt-px" : ""), $ = t(() => ["cursor-not-allowed", U.value ? "opacity-40" : "opacity-50"]);
|
|
75
|
+
async function ee(e) {
|
|
76
|
+
R.value = e.target.checked, await l(), H.value && (H.value.checked = R.value, H.value.indeterminate = W.value);
|
|
77
77
|
}
|
|
78
78
|
return (t, s) => o.options ? (d(), r("div", c({
|
|
79
79
|
key: 0,
|
|
80
80
|
"data-ac-ds": "",
|
|
81
81
|
"data-testid": "ac-checkbox"
|
|
82
|
-
},
|
|
82
|
+
}, G.value), [i("div", E, [(d(!0), r(e, null, p(o.options, (e, t) => (d(), r("label", {
|
|
83
83
|
key: e.label,
|
|
84
|
-
for: `${g(
|
|
85
|
-
class: u(["group inline-flex w-fit cursor-pointer items-start text-base text-heading select-none", [e.disabled &&
|
|
86
|
-
}, [i("span", { class: u(["relative inline-flex shrink-0",
|
|
87
|
-
id: `${g(
|
|
88
|
-
"onUpdate:modelValue": s[0] ||= (e) =>
|
|
84
|
+
for: `${g(B)}-${t}`,
|
|
85
|
+
class: u(["group inline-flex w-fit cursor-pointer items-start text-base font-normal text-heading select-none", [e.disabled && $.value, U.value ? "gap-2.5" : "gap-3"]])
|
|
86
|
+
}, [i("span", { class: u(["relative inline-flex shrink-0", [J.value, Q.value]]) }, [S(i("input", {
|
|
87
|
+
id: `${g(B)}-${t}`,
|
|
88
|
+
"onUpdate:modelValue": s[0] ||= (e) => L.value = e,
|
|
89
89
|
type: "checkbox",
|
|
90
90
|
name: o.name,
|
|
91
91
|
value: e.value,
|
|
92
92
|
disabled: e.disabled,
|
|
93
|
-
class: u(
|
|
94
|
-
}, null, 10, O), [[x,
|
|
95
|
-
class: u([
|
|
93
|
+
class: u(Y.value)
|
|
94
|
+
}, null, 10, O), [[x, L.value]]), a(g(w), {
|
|
95
|
+
class: u([X.value, "peer-checked:opacity-100"]),
|
|
96
96
|
"aria-hidden": "true"
|
|
97
|
-
}, null, 8, ["class"])], 2), i("span",
|
|
97
|
+
}, null, 8, ["class"])], 2), i("span", { class: u(["flex min-w-0 flex-col gap-1", Z.value]) }, [i("span", k, h(e.label), 1), e.description ? (d(), r("span", A, h(e.description), 1)) : n("", !0)], 2)], 10, D))), 128))]), o.errorMsg ? (d(), r("p", j, h(o.errorMsg), 1)) : n("", !0)], 16)) : (d(), r("div", c({
|
|
98
98
|
key: 1,
|
|
99
99
|
class: "inline-flex flex-col",
|
|
100
100
|
"data-ac-ds": "",
|
|
101
101
|
"data-testid": "ac-checkbox"
|
|
102
|
-
},
|
|
102
|
+
}, G.value, { onClick: s[1] ||= C(() => {}, ["stop"]) }), [i("label", { class: u(["group inline-flex w-fit cursor-pointer items-start text-base font-normal text-heading select-none", [o.disabled && $.value, U.value ? "gap-2.5" : "gap-3"]]) }, [i("span", { class: u(["relative inline-flex shrink-0", [J.value, q.value && Q.value]]) }, [
|
|
103
103
|
i("input", c({
|
|
104
104
|
ref_key: "single",
|
|
105
|
-
ref:
|
|
105
|
+
ref: H,
|
|
106
106
|
type: "checkbox",
|
|
107
107
|
name: o.name,
|
|
108
|
-
checked:
|
|
109
|
-
indeterminate:
|
|
108
|
+
checked: R.value,
|
|
109
|
+
indeterminate: W.value,
|
|
110
110
|
disabled: o.disabled,
|
|
111
111
|
"aria-invalid": o.errorMsg ? !0 : void 0,
|
|
112
|
-
"aria-describedby": o.errorMsg ? `${g(
|
|
113
|
-
class:
|
|
114
|
-
},
|
|
112
|
+
"aria-describedby": o.errorMsg ? `${g(B)}-error` : void 0,
|
|
113
|
+
class: Y.value
|
|
114
|
+
}, K.value, { onChange: ee }), null, 16, M),
|
|
115
115
|
a(g(w), {
|
|
116
|
-
class: u([
|
|
116
|
+
class: u([X.value, "peer-checked:opacity-100"]),
|
|
117
117
|
"aria-hidden": "true"
|
|
118
118
|
}, null, 8, ["class"]),
|
|
119
119
|
a(g(T), {
|
|
120
|
-
class: u([
|
|
120
|
+
class: u([X.value, "peer-indeterminate:opacity-100"]),
|
|
121
121
|
"aria-hidden": "true"
|
|
122
122
|
}, null, 8, ["class"])
|
|
123
|
-
], 2),
|
|
123
|
+
], 2), q.value ? (d(), r("span", {
|
|
124
|
+
key: 0,
|
|
125
|
+
class: u(["flex min-w-0 flex-col gap-1", Z.value])
|
|
126
|
+
}, [t.$slots.label ? (d(), r("span", N, [m(t.$slots, "label")])) : o.label ? (d(), r("span", P, h(o.label), 1)) : n("", !0), o.description ? (d(), r("span", F, h(o.description), 1)) : n("", !0)], 2)) : n("", !0)], 2), o.errorMsg ? (d(), r("p", {
|
|
124
127
|
key: 0,
|
|
125
|
-
id: `${g(
|
|
128
|
+
id: `${g(B)}-error`,
|
|
126
129
|
class: "mt-1 text-base text-danger-strong",
|
|
127
130
|
role: "alert"
|
|
128
|
-
}, h(o.errorMsg), 9,
|
|
131
|
+
}, h(o.errorMsg), 9, I)) : n("", !0)], 16));
|
|
129
132
|
}
|
|
130
133
|
});
|
|
131
134
|
//#endregion
|
|
132
|
-
export {
|
|
135
|
+
export { L as default };
|
|
@@ -66,8 +66,8 @@ var w = {
|
|
|
66
66
|
return (n, _) => (d(), a("div", w, [o("div", { class: u(c.cards ? ["grid gap-3", !L.value && "sm:grid-cols-2"] : c.row ? "flex flex-row flex-wrap gap-x-6 gap-y-3" : "flex flex-col gap-3") }, [(d(!0), a(e, null, f(c.options, (e, f) => (d(), r(m(L.value ? "div" : "label"), {
|
|
67
67
|
key: e.label,
|
|
68
68
|
for: L.value ? void 0 : `${g(I)}-${f}`,
|
|
69
|
-
class: u(["group flex cursor-pointer gap-3 text-base text-heading select-none", [
|
|
70
|
-
c.cards ? "relative items-start rounded-14 border border-border bg-surface
|
|
69
|
+
class: u(["group flex cursor-pointer gap-3 text-base font-normal text-heading select-none", [
|
|
70
|
+
c.cards ? "relative items-start rounded-14 border border-border bg-surface px-4 py-3 transition-[border-color,background-color,box-shadow] duration-200 ease-out has-checked:border-primary has-checked:bg-primary/5 has-checked:shadow-[inset_0_0_0_1px_var(--color-primary)] has-focus-visible:ring-2 has-focus-visible:ring-ring has-focus-visible:ring-offset-2 has-focus-visible:ring-offset-background motion-reduce:transition-none" : L.value ? "relative items-center" : "w-fit items-center",
|
|
71
71
|
e.disabled && ["cursor-not-allowed", c.cards ? "opacity-60" : "opacity-50"],
|
|
72
72
|
L.value && "flex-wrap",
|
|
73
73
|
c.cards && !e.disabled && "hover:border-primary/40 hover:bg-accent-hover has-checked:hover:border-primary has-checked:hover:bg-primary/5"
|
|
@@ -77,7 +77,7 @@ var w = {
|
|
|
77
77
|
(d(), r(m(L.value ? "label" : "span"), {
|
|
78
78
|
for: L.value ? `${g(I)}-${f}` : void 0,
|
|
79
79
|
class: u(L.value ? [
|
|
80
|
-
"flex min-w-0 flex-1 basis-[240px] gap-3 after:absolute after:inset-0",
|
|
80
|
+
"flex min-w-0 flex-1 basis-[240px] gap-3 font-normal after:absolute after:inset-0",
|
|
81
81
|
c.cards ? "items-start" : "items-center",
|
|
82
82
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
83
83
|
] : "contents")
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
1
2
|
export interface ColorPreset {
|
|
2
3
|
/** Hex colour, `#rgb` or `#rrggbb`. */
|
|
3
4
|
value: string;
|
|
@@ -7,6 +8,8 @@ export interface ColorPreset {
|
|
|
7
8
|
export interface Props {
|
|
8
9
|
/** Label above the field. Without one, pass `aria-label` so the field still has a name. */
|
|
9
10
|
label?: string;
|
|
11
|
+
/** Classes for the label above the field, e.g. `@min-[401px]:sr-only` to hide it on wide layouts while screen readers still read it. */
|
|
12
|
+
labelClass?: HTMLAttributes["class"];
|
|
10
13
|
/** Native `name` attribute of the hex field. */
|
|
11
14
|
name?: string;
|
|
12
15
|
/** Quick-pick swatches under the field: hex strings or `{ value, label }`. */
|
|
@@ -50,6 +53,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
50
53
|
hint: string;
|
|
51
54
|
readonly: boolean;
|
|
52
55
|
errorMsg: string;
|
|
56
|
+
labelClass: string | false | Record<string, any> | import("vue").ClassValue[] | null;
|
|
53
57
|
presets: (string | ColorPreset)[];
|
|
54
58
|
swatchOnly: boolean;
|
|
55
59
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -40,6 +40,16 @@ var b = ["for"], x = {
|
|
|
40
40
|
__name: "AcColorInput",
|
|
41
41
|
props: /*@__PURE__*/ o({
|
|
42
42
|
label: { default: "" },
|
|
43
|
+
labelClass: {
|
|
44
|
+
type: [
|
|
45
|
+
Boolean,
|
|
46
|
+
null,
|
|
47
|
+
String,
|
|
48
|
+
Object,
|
|
49
|
+
Array
|
|
50
|
+
],
|
|
51
|
+
default: void 0
|
|
52
|
+
},
|
|
43
53
|
name: { default: "" },
|
|
44
54
|
presets: { default: () => [] },
|
|
45
55
|
required: {
|
|
@@ -124,12 +134,12 @@ var b = ["for"], x = {
|
|
|
124
134
|
a.label ? (u(), r("label", {
|
|
125
135
|
key: 0,
|
|
126
136
|
for: a.swatchOnly ? `${m(P)}-picker` : m(P),
|
|
127
|
-
class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
|
|
137
|
+
class: c(["mb-2 flex items-center gap-1 text-base font-medium text-heading", a.labelClass])
|
|
128
138
|
}, [
|
|
129
139
|
i("span", null, p(a.label), 1),
|
|
130
140
|
a.readonly ? (u(), r("span", x, "(read only)")) : n("", !0),
|
|
131
141
|
a.required ? (u(), r("span", S, "*")) : n("", !0)
|
|
132
|
-
],
|
|
142
|
+
], 10, b)) : n("", !0),
|
|
133
143
|
a.hint ? (u(), r("p", {
|
|
134
144
|
key: 1,
|
|
135
145
|
id: `${m(P)}-hint`,
|
|
@@ -10,6 +10,8 @@ export interface DatePickerPreset {
|
|
|
10
10
|
export interface Props {
|
|
11
11
|
/** Label above the field. Doubles as the accessible name of the trigger and the popover. */
|
|
12
12
|
label?: string;
|
|
13
|
+
/** Classes for the label above the field, e.g. `@min-[401px]:sr-only` to hide it on wide layouts while screen readers still read it. */
|
|
14
|
+
labelClass?: HTMLAttributes["class"];
|
|
13
15
|
/** Text shown in the field while there's no value. Defaults to "Choose date" (or "Choose duration"). */
|
|
14
16
|
placeholder?: string;
|
|
15
17
|
/** `date` for a calendar day (`YYYY-MM-DD`), `datetime` for an instant with hours and minutes (UTC ISO 8601), or `duration` for a Go/Kubernetes duration such as `26h30m`. */
|
|
@@ -94,6 +96,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
94
96
|
placeholder: string;
|
|
95
97
|
errorMsg: string;
|
|
96
98
|
range: boolean;
|
|
99
|
+
labelClass: string | false | Record<string, any> | import("vue").ClassValue[] | null;
|
|
97
100
|
clearable: boolean;
|
|
98
101
|
presets: DatePickerPreset[];
|
|
99
102
|
locale: string;
|
|
@@ -112,6 +112,16 @@ var be = ["for"], xe = { key: 0 }, Se = {
|
|
|
112
112
|
__name: "AcDatePicker",
|
|
113
113
|
props: /*@__PURE__*/ te({
|
|
114
114
|
label: { default: "" },
|
|
115
|
+
labelClass: {
|
|
116
|
+
type: [
|
|
117
|
+
Boolean,
|
|
118
|
+
null,
|
|
119
|
+
String,
|
|
120
|
+
Object,
|
|
121
|
+
Array
|
|
122
|
+
],
|
|
123
|
+
default: void 0
|
|
124
|
+
},
|
|
115
125
|
placeholder: { default: "" },
|
|
116
126
|
mode: { default: "date" },
|
|
117
127
|
range: {
|
|
@@ -844,13 +854,13 @@ var be = ["for"], xe = { key: 0 }, Se = {
|
|
|
844
854
|
key: 0,
|
|
845
855
|
id: vt,
|
|
846
856
|
for: d.inline ? void 0 : `${v(x)}-trigger`,
|
|
847
|
-
class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
|
|
857
|
+
class: p(["mb-2 flex items-center gap-1 text-base font-medium text-heading", d.labelClass])
|
|
848
858
|
}, [
|
|
849
859
|
oe(e.$slots, "label-icon"),
|
|
850
860
|
d.label ? (m(), c("span", xe, _(d.label), 1)) : s("", !0),
|
|
851
861
|
oe(e.$slots, "label-extra"),
|
|
852
862
|
d.required ? (m(), c("span", Se, "*")) : s("", !0)
|
|
853
|
-
],
|
|
863
|
+
], 10, be)) : s("", !0),
|
|
854
864
|
d.hint ? (m(), c("p", {
|
|
855
865
|
key: 1,
|
|
856
866
|
id: St,
|
|
@@ -43,7 +43,7 @@ var b = {
|
|
|
43
43
|
style: u(c.sticky ? { top: c.top } : void 0),
|
|
44
44
|
"data-ac-ds": "",
|
|
45
45
|
"data-testid": "ac-header"
|
|
46
|
-
}, [j.value && t.$slots.breadcrumb ? (d(), i("div", b, [f(t.$slots, "breadcrumb")])) : r("", !0), a("div", { class: l(j.value && "relative isolate overflow-
|
|
46
|
+
}, [j.value && t.$slots.breadcrumb ? (d(), i("div", b, [f(t.$slots, "breadcrumb")])) : r("", !0), a("div", { class: l(j.value && "relative isolate overflow-clip rounded-16 border border-border bg-surface px-5 py-5 shadow-xs sm:px-7 sm:py-6") }, [j.value ? (d(), i(e, { key: 0 }, [
|
|
47
47
|
D[1] ||= a("div", {
|
|
48
48
|
class: "absolute inset-0 -z-10 bg-linear-to-br from-primary/10 via-primary/3 to-transparent",
|
|
49
49
|
"aria-hidden": "true"
|
|
@@ -2,6 +2,8 @@ import type { Component, HTMLAttributes } from "vue";
|
|
|
2
2
|
export interface Props {
|
|
3
3
|
/** Label above the field. Pass `placeholder` for an example value inside it. Without a label, pass `aria-label`; the placeholder is the accessible name otherwise. */
|
|
4
4
|
label?: string;
|
|
5
|
+
/** Classes for the label above the field, e.g. `@min-[401px]:sr-only` to hide it on wide layouts while screen readers still read it. */
|
|
6
|
+
labelClass?: HTMLAttributes["class"];
|
|
5
7
|
/** Native `name` attribute. */
|
|
6
8
|
name?: string;
|
|
7
9
|
/** Example value shown inside the empty field. */
|
|
@@ -28,6 +28,16 @@ var x = ["for"], S = { key: 0 }, C = ["id"], w = { class: "flex" }, re = [
|
|
|
28
28
|
__name: "AcInput",
|
|
29
29
|
props: /*@__PURE__*/ s({
|
|
30
30
|
label: { default: "" },
|
|
31
|
+
labelClass: {
|
|
32
|
+
type: [
|
|
33
|
+
Boolean,
|
|
34
|
+
null,
|
|
35
|
+
String,
|
|
36
|
+
Object,
|
|
37
|
+
Array
|
|
38
|
+
],
|
|
39
|
+
default: void 0
|
|
40
|
+
},
|
|
31
41
|
name: { default: "" },
|
|
32
42
|
placeholder: { default: void 0 },
|
|
33
43
|
autocomplete: { default: void 0 },
|
|
@@ -194,12 +204,12 @@ var x = ["for"], S = { key: 0 }, C = ["id"], w = { class: "flex" }, re = [
|
|
|
194
204
|
normal: "pr-4",
|
|
195
205
|
large: "pr-5"
|
|
196
206
|
}, me = {
|
|
197
|
-
xs: "mr-
|
|
198
|
-
xsmall: "mr-
|
|
199
|
-
small: "mr-
|
|
200
|
-
medium: "mr-
|
|
201
|
-
normal: "mr-
|
|
202
|
-
large: "mr-
|
|
207
|
+
xs: "mr-0.5 size-6 rounded-6",
|
|
208
|
+
xsmall: "mr-1.5 size-7 rounded-8",
|
|
209
|
+
small: "mr-1.5 size-7 rounded-8",
|
|
210
|
+
medium: "mr-1.5 size-7 rounded-8",
|
|
211
|
+
normal: "mr-3 size-7 rounded-8",
|
|
212
|
+
large: "mr-4 size-8 rounded-8"
|
|
203
213
|
}, he = {
|
|
204
214
|
xs: "size-3",
|
|
205
215
|
xsmall: "size-4",
|
|
@@ -267,7 +277,7 @@ var x = ["for"], S = { key: 0 }, C = ["id"], w = { class: "flex" }, re = [
|
|
|
267
277
|
U.value ? (u(), i("label", {
|
|
268
278
|
key: 0,
|
|
269
279
|
for: h(P),
|
|
270
|
-
class: l(["mb-2 flex items-center text-base font-medium text-heading", !o.flushLabelSlots && "gap-1"])
|
|
280
|
+
class: l(["mb-2 flex items-center text-base font-medium text-heading", [!o.flushLabelSlots && "gap-1", o.labelClass]])
|
|
271
281
|
}, [
|
|
272
282
|
f(t.$slots, "label-icon"),
|
|
273
283
|
o.label ? (u(), i("span", S, m(o.label), 1)) : r("", !0),
|
|
@@ -340,7 +350,7 @@ var x = ["for"], S = { key: 0 }, C = ["id"], w = { class: "flex" }, re = [
|
|
|
340
350
|
o.type === "password" ? (u(), i("button", {
|
|
341
351
|
key: 3,
|
|
342
352
|
type: "button",
|
|
343
|
-
class: l(["relative inline-flex shrink-0 cursor-pointer items-center justify-center
|
|
353
|
+
class: l(["relative inline-flex shrink-0 cursor-pointer items-center justify-center text-muted transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-wait disabled:hover:bg-transparent", me[Z.value]]),
|
|
344
354
|
disabled: q.value,
|
|
345
355
|
"aria-label": M.value ? "Hide value" : "Show value",
|
|
346
356
|
"aria-pressed": M.value,
|
|
@@ -68,6 +68,10 @@ var w = [
|
|
|
68
68
|
B.closable && (V.value = !1, H("close"));
|
|
69
69
|
}
|
|
70
70
|
function Z(e) {
|
|
71
|
+
let t = e.currentTarget;
|
|
72
|
+
e.clientX >= t.getBoundingClientRect().left + t.clientWidth || (e.preventDefault(), B.closeOnOutsideClick && X());
|
|
73
|
+
}
|
|
74
|
+
function Q(e) {
|
|
71
75
|
if (e.key === "Escape") {
|
|
72
76
|
if (e.defaultPrevented) return;
|
|
73
77
|
e.stopPropagation(), X();
|
|
@@ -78,7 +82,7 @@ var w = [
|
|
|
78
82
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
|
-
function
|
|
85
|
+
function $(e) {
|
|
82
86
|
let t = document.body, n = Number(t.dataset.acModals ?? 0) + (e ? 1 : -1);
|
|
83
87
|
if (t.dataset.acModals = String(Math.max(n, 0)), e && n === 1) {
|
|
84
88
|
let e = window.innerWidth - document.documentElement.clientWidth;
|
|
@@ -89,16 +93,16 @@ var w = [
|
|
|
89
93
|
}
|
|
90
94
|
return b(V, async (e, t) => {
|
|
91
95
|
if (e) {
|
|
92
|
-
J = document.activeElement, Y = !0,
|
|
96
|
+
J = document.activeElement, Y = !0, $(!0), await u();
|
|
93
97
|
let e = q.value?.querySelector("[autofocus]");
|
|
94
98
|
((e && (e.matches(z) ? e : e.querySelector(z))) ?? q.value?.querySelector(U) ?? q.value)?.focus();
|
|
95
|
-
} else t && Y && (Y = !1,
|
|
99
|
+
} else t && Y && (Y = !1, $(!1), J?.isConnected && J.focus());
|
|
96
100
|
}, { immediate: !0 }), f(() => {
|
|
97
|
-
Y && (Y = !1,
|
|
101
|
+
Y && (Y = !1, $(!1), J?.isConnected && J.focus());
|
|
98
102
|
}), (l, u) => (p(), r(t, { to: "body" }, [s(n, {
|
|
99
103
|
"enter-active-class": "transition-opacity duration-200 ease-out",
|
|
100
104
|
"enter-from-class": "opacity-0",
|
|
101
|
-
"leave-active-class": "transition-opacity duration-150 ease-in",
|
|
105
|
+
"leave-active-class": "pointer-events-none transition-opacity duration-150 ease-in",
|
|
102
106
|
"leave-to-class": "opacity-0"
|
|
103
107
|
}, {
|
|
104
108
|
default: x(() => [V.value ? (p(), a("div", {
|
|
@@ -106,11 +110,11 @@ var w = [
|
|
|
106
110
|
class: "fixed inset-0 z-[80] overflow-y-auto bg-black/50",
|
|
107
111
|
"data-ac-ds": "",
|
|
108
112
|
"data-testid": "ac-modal",
|
|
109
|
-
onKeydown:
|
|
110
|
-
onMousedown:
|
|
113
|
+
onKeydown: Q,
|
|
114
|
+
onMousedown: S(Z, ["self"])
|
|
111
115
|
}, [o("div", {
|
|
112
116
|
class: "flex min-h-full items-start justify-center p-4 sm:items-center sm:p-8",
|
|
113
|
-
onMousedown:
|
|
117
|
+
onMousedown: S(Z, ["self"])
|
|
114
118
|
}, [o("div", {
|
|
115
119
|
ref_key: "panel",
|
|
116
120
|
ref: q,
|
|
@@ -8,6 +8,8 @@ export interface MonthPickerPreset {
|
|
|
8
8
|
export interface Props {
|
|
9
9
|
/** Label above the field. Doubles as the accessible name of the trigger and the popover. */
|
|
10
10
|
label?: string;
|
|
11
|
+
/** Classes for the label above the field, e.g. `@min-[401px]:sr-only` to hide it on wide layouts while screen readers still read it. */
|
|
12
|
+
labelClass?: HTMLAttributes["class"];
|
|
11
13
|
/** Text shown in the field while there's no value. Defaults to "Choose month" (or "Choose months" with `range`). */
|
|
12
14
|
placeholder?: string;
|
|
13
15
|
/** Pick a start and an end month; `v-model` becomes `[start, end]`, swapped so start ≤ end. */
|
|
@@ -81,6 +83,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
81
83
|
placeholder: string;
|
|
82
84
|
errorMsg: string;
|
|
83
85
|
range: boolean;
|
|
86
|
+
labelClass: string | false | Record<string, any> | import("vue").ClassValue[] | null;
|
|
84
87
|
clearable: boolean;
|
|
85
88
|
presets: MonthPickerPreset[];
|
|
86
89
|
locale: string;
|
|
@@ -54,6 +54,16 @@ var he = ["for"], ge = { key: 0 }, _e = {
|
|
|
54
54
|
__name: "AcMonthPicker",
|
|
55
55
|
props: /*@__PURE__*/ ee({
|
|
56
56
|
label: { default: "" },
|
|
57
|
+
labelClass: {
|
|
58
|
+
type: [
|
|
59
|
+
Boolean,
|
|
60
|
+
null,
|
|
61
|
+
String,
|
|
62
|
+
Object,
|
|
63
|
+
Array
|
|
64
|
+
],
|
|
65
|
+
default: void 0
|
|
66
|
+
},
|
|
57
67
|
placeholder: { default: "" },
|
|
58
68
|
range: {
|
|
59
69
|
type: Boolean,
|
|
@@ -384,13 +394,13 @@ var he = ["for"], ge = { key: 0 }, _e = {
|
|
|
384
394
|
key: 0,
|
|
385
395
|
id: Ve,
|
|
386
396
|
for: u.inline ? void 0 : `${v(C)}-trigger`,
|
|
387
|
-
class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
|
|
397
|
+
class: p(["mb-2 flex items-center gap-1 text-base font-medium text-heading", u.labelClass])
|
|
388
398
|
}, [
|
|
389
399
|
re(e.$slots, "label-icon"),
|
|
390
400
|
u.label ? (m(), s("span", ge, _(u.label), 1)) : o("", !0),
|
|
391
401
|
re(e.$slots, "label-extra"),
|
|
392
402
|
u.required ? (m(), s("span", _e, "*")) : o("", !0)
|
|
393
|
-
],
|
|
403
|
+
], 10, he)) : o("", !0),
|
|
394
404
|
u.hint ? (m(), s("p", {
|
|
395
405
|
key: 1,
|
|
396
406
|
id: We,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
1
2
|
export interface Props<K extends "null" | "undefined" = "null"> {
|
|
2
3
|
/** Label above the field. Without one, pass `aria-label` so the field still has a name. */
|
|
3
4
|
label?: string;
|
|
5
|
+
/** Classes for the label above the field, e.g. `@min-[401px]:sr-only` to hide it on wide layouts while screen readers still read it. */
|
|
6
|
+
labelClass?: HTMLAttributes["class"];
|
|
4
7
|
/** Native `name` attribute. */
|
|
5
8
|
name?: string;
|
|
6
9
|
/** Text shown inside the empty field, e.g. "Enter number". */
|