agnosticui-core 2.0.0-alpha.15 → 2.0.0-alpha.17
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/{VueCombobox.vue_vue_type_script_setup_true_lang-C7gDMrYJ.js → VueCombobox.vue_vue_type_script_setup_true_lang-BSTZGX2X.js} +15 -13
- package/dist/{VueInput.vue_vue_type_script_setup_true_lang-cOALNmlO.js → VueInput.vue_vue_type_script_setup_true_lang-fMqllTsp.js} +1 -0
- package/dist/{VueRating.vue_vue_type_script_setup_true_lang-CICncp71.js → VueRating.vue_vue_type_script_setup_true_lang-Bm2nRrqr.js} +11 -9
- package/dist/{VueSelectionButtonGroup.vue_vue_type_script_setup_true_lang-CLuww2Ac.js → VueSelectionButtonGroup.vue_vue_type_script_setup_true_lang-DwYrIMVO.js} +15 -11
- package/dist/VueSelectionCardGroup.vue_vue_type_script_setup_true_lang-D5CycLY5.js +40 -0
- package/dist/{VueToggle.vue_vue_type_script_setup_true_lang-BxrvAsse.js → VueToggle.vue_vue_type_script_setup_true_lang-DLPCBOqZ.js} +18 -16
- package/dist/components/Button/core/_Button.d.ts.map +1 -1
- package/dist/components/Button/core/_Button.js +10 -1
- package/dist/components/Checkbox/core/_Checkbox.d.ts +14 -2
- package/dist/components/Checkbox/core/_Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/core/_Checkbox.js +58 -43
- package/dist/components/Combobox/core/_Combobox.d.ts +24 -1
- package/dist/components/Combobox/core/_Combobox.d.ts.map +1 -1
- package/dist/components/Combobox/core/_Combobox.js +140 -91
- package/dist/components/Combobox/vue/VueCombobox.js +1 -1
- package/dist/components/Combobox/vue/index.js +1 -1
- package/dist/components/Input/core/_Input.d.ts +21 -2
- package/dist/components/Input/core/_Input.d.ts.map +1 -1
- package/dist/components/Input/core/_Input.js +37 -9
- package/dist/components/Input/vue/VueInput.js +1 -1
- package/dist/components/Input/vue/index.js +1 -1
- package/dist/components/Radio/core/_Radio.d.ts +24 -2
- package/dist/components/Radio/core/_Radio.d.ts.map +1 -1
- package/dist/components/Radio/core/_Radio.js +119 -89
- package/dist/components/Rating/core/_Rating.d.ts +23 -2
- package/dist/components/Rating/core/_Rating.d.ts.map +1 -1
- package/dist/components/Rating/core/_Rating.js +97 -64
- package/dist/components/Rating/vue/VueRating.js +1 -1
- package/dist/components/Rating/vue/VueRating.vue.d.ts +2 -0
- package/dist/components/Rating/vue/VueRating.vue.d.ts.map +1 -1
- package/dist/components/Rating/vue/index.js +1 -1
- package/dist/components/Select/core/_Select.d.ts +20 -2
- package/dist/components/Select/core/_Select.d.ts.map +1 -1
- package/dist/components/Select/core/_Select.js +97 -67
- package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts +21 -2
- package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts.map +1 -1
- package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.js +74 -38
- package/dist/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.js +1 -1
- package/dist/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.vue.d.ts +7 -0
- package/dist/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/SelectionButtonGroup/vue/index.js +1 -1
- package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.d.ts +12 -2
- package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.d.ts.map +1 -1
- package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.js +73 -46
- package/dist/components/SelectionCardGroup/vue/VueSelectionCardGroup.js +1 -1
- package/dist/components/SelectionCardGroup/vue/VueSelectionCardGroup.vue.d.ts +7 -0
- package/dist/components/SelectionCardGroup/vue/VueSelectionCardGroup.vue.d.ts.map +1 -1
- package/dist/components/SelectionCardGroup/vue/index.js +1 -1
- package/dist/components/Slider/core/_Slider.d.ts +10 -16
- package/dist/components/Slider/core/_Slider.d.ts.map +1 -1
- package/dist/components/Slider/core/_Slider.js +28 -39
- package/dist/components/Toggle/core/_Toggle.d.ts +21 -6
- package/dist/components/Toggle/core/_Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/core/_Toggle.js +30 -9
- package/dist/components/Toggle/vue/VueToggle.js +1 -1
- package/dist/components/Toggle/vue/VueToggle.vue.d.ts.map +1 -1
- package/dist/components/Toggle/vue/index.js +1 -1
- package/dist/shared/face-mixin.d.ts +76 -0
- package/dist/shared/face-mixin.d.ts.map +1 -0
- package/dist/shared/face-mixin.js +68 -0
- package/dist/test-setup.js +340 -255
- package/package.json +1 -1
- package/src/components/Button/core/_Button.ts +12 -0
- package/src/components/Checkbox/core/_Checkbox.ts +40 -5
- package/src/components/Combobox/core/_Combobox.ts +83 -1
- package/src/components/Combobox/vue/VueCombobox.vue +1 -0
- package/src/components/Drawer/v1/dialog--drawer-bottom.hbs +48 -0
- package/src/components/Drawer/v1/dialog--drawer-end.hbs +48 -0
- package/src/components/Drawer/v1/dialog--drawer-start.hbs +48 -0
- package/src/components/Drawer/v1/dialog--drawer-top.hbs +48 -0
- package/src/components/Drawer/v1/dialog-demo.css +13 -0
- package/src/components/Drawer/v1/dialog.config.yml +5 -0
- package/src/components/Drawer/v1/dialog.css +99 -0
- package/src/components/Drawer/v1/dialog.hbs +48 -0
- package/src/components/Drawer/v1/drawer-animations.css +52 -0
- package/src/components/Drawer/v1/drawer.css +50 -0
- package/src/components/Input/core/_Input.ts +49 -2
- package/src/components/Radio/core/_Radio.ts +61 -4
- package/src/components/Rating/core/_Rating.ts +62 -5
- package/src/components/Rating/vue/VueRating.vue +3 -0
- package/src/components/Select/core/_Select.ts +53 -4
- package/src/components/SelectionButtonGroup/core/_SelectionButtonGroup.ts +78 -5
- package/src/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.vue +7 -0
- package/src/components/SelectionCardGroup/core/_SelectionCardGroup.ts +69 -5
- package/src/components/SelectionCardGroup/vue/VueSelectionCardGroup.vue +7 -0
- package/src/components/Slider/core/_Slider.ts +28 -28
- package/src/components/Toggle/core/_Toggle.ts +49 -9
- package/src/components/Toggle/vue/VueToggle.vue +2 -0
- package/src/shared/face-mixin.ts +203 -0
- package/dist/VueSelectionCardGroup.vue_vue_type_script_setup_true_lang-B2uA4jdK.js +0 -36
- package/dist/components/Input/core/_Input.BACKUP.d.ts +0 -114
- package/dist/components/Input/core/_Input.BACKUP.d.ts.map +0 -1
- package/dist/components/Input/core/_Input.BACKUP.js +0 -511
- package/src/components/Input/core/_Input.BACKUP.ts +0 -710
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, ref as m, createElementBlock as g, openBlock as h, renderSlot as x } from "vue";
|
|
2
2
|
import "./components/Combobox/core/Combobox.js";
|
|
3
|
-
const y = [".labelHidden", ".labelPosition", ".noLabel", ".disabled", ".invalid", ".clearable", ".readonly", ".required", ".loading", ".multiple", ".closeOnSelect", ".options", ".value", ".defaultValue", ".maxOptionsVisible", "placeholder", "label", "ariaLabel", "helpText", "errorMessage", "autocomplete", "filterMode", "size", "variant", "loadingText", "noResultsText"],
|
|
3
|
+
const y = [".labelHidden", ".labelPosition", ".noLabel", ".disabled", ".invalid", ".clearable", ".readonly", ".required", ".validationMessages", ".loading", ".multiple", ".closeOnSelect", ".options", ".value", ".defaultValue", ".maxOptionsVisible", "placeholder", "label", "ariaLabel", "helpText", "errorMessage", "autocomplete", "filterMode", "size", "variant", "loadingText", "noResultsText"], M = /* @__PURE__ */ v({
|
|
4
4
|
__name: "VueCombobox",
|
|
5
5
|
props: {
|
|
6
6
|
options: { default: () => [] },
|
|
@@ -30,16 +30,17 @@ const y = [".labelHidden", ".labelPosition", ".noLabel", ".disabled", ".invalid"
|
|
|
30
30
|
maxOptionsVisible: { default: 3 },
|
|
31
31
|
loading: { type: Boolean, default: !1 },
|
|
32
32
|
loadingText: { default: "Loading..." },
|
|
33
|
-
noResultsText: { default: "No results found" }
|
|
33
|
+
noResultsText: { default: "No results found" },
|
|
34
|
+
validationMessages: {}
|
|
34
35
|
},
|
|
35
36
|
emits: ["change", "select", "search", "open", "close", "focus", "blur", "update:value"],
|
|
36
|
-
setup(e, { expose: n, emit:
|
|
37
|
-
const a =
|
|
37
|
+
setup(e, { expose: n, emit: i }) {
|
|
38
|
+
const a = i, t = m(), d = (l) => {
|
|
38
39
|
const o = l;
|
|
39
40
|
a("change", o.detail), a("update:value", o.detail.value);
|
|
40
|
-
}, u = (l) => {
|
|
41
|
-
a("select", l.detail);
|
|
42
41
|
}, s = (l) => {
|
|
42
|
+
a("select", l.detail);
|
|
43
|
+
}, u = (l) => {
|
|
43
44
|
a("search", l.detail);
|
|
44
45
|
}, c = (l) => {
|
|
45
46
|
a("open", l.detail);
|
|
@@ -58,7 +59,7 @@ const y = [".labelHidden", ".labelPosition", ".noLabel", ".disabled", ".invalid"
|
|
|
58
59
|
toggle: () => t.value?.toggle?.(),
|
|
59
60
|
selectOption: (l) => t.value?.selectOption?.(l),
|
|
60
61
|
clearSelection: () => t.value?.clearSelection?.()
|
|
61
|
-
}), (l, o) => (
|
|
62
|
+
}), (l, o) => (h(), g("ag-combobox", {
|
|
62
63
|
ref_key: "comboboxRef",
|
|
63
64
|
ref: t,
|
|
64
65
|
".labelHidden": e.labelHidden,
|
|
@@ -69,6 +70,7 @@ const y = [".labelHidden", ".labelPosition", ".noLabel", ".disabled", ".invalid"
|
|
|
69
70
|
".clearable": e.clearable,
|
|
70
71
|
".readonly": e.readonly,
|
|
71
72
|
".required": e.required,
|
|
73
|
+
".validationMessages": e.validationMessages,
|
|
72
74
|
".loading": e.loading,
|
|
73
75
|
".multiple": e.multiple,
|
|
74
76
|
".closeOnSelect": e.closeOnSelect,
|
|
@@ -87,18 +89,18 @@ const y = [".labelHidden", ".labelPosition", ".noLabel", ".disabled", ".invalid"
|
|
|
87
89
|
variant: e.variant,
|
|
88
90
|
loadingText: e.loadingText,
|
|
89
91
|
noResultsText: e.noResultsText,
|
|
90
|
-
onChange:
|
|
91
|
-
onSelect:
|
|
92
|
-
onSearch:
|
|
92
|
+
onChange: d,
|
|
93
|
+
onSelect: s,
|
|
94
|
+
onSearch: u,
|
|
93
95
|
onOpen: c,
|
|
94
96
|
onClose: f,
|
|
95
97
|
onFocus: r,
|
|
96
98
|
onBlur: b
|
|
97
99
|
}, [
|
|
98
|
-
|
|
100
|
+
x(l.$slots, "default")
|
|
99
101
|
], 40, y));
|
|
100
102
|
}
|
|
101
103
|
});
|
|
102
104
|
export {
|
|
103
|
-
|
|
105
|
+
M as _
|
|
104
106
|
};
|
|
@@ -14,6 +14,7 @@ const g = [".value", ".labelHidden", ".noLabel", ".capsule", ".rounded", ".under
|
|
|
14
14
|
labelPosition: {},
|
|
15
15
|
noLabel: { type: Boolean, default: !1 },
|
|
16
16
|
ariaLabel: { default: "" },
|
|
17
|
+
name: {},
|
|
17
18
|
type: { default: "text" },
|
|
18
19
|
value: { default: "" },
|
|
19
20
|
placeholder: { default: "" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as r, ref as
|
|
1
|
+
import { defineComponent as r, ref as s, createElementBlock as u, openBlock as f, mergeProps as v, renderSlot as m } from "vue";
|
|
2
2
|
import "./components/Rating/core/Rating.js";
|
|
3
|
-
const
|
|
3
|
+
const c = [".value", ".readonly", ".allowClear", ".required", ".invalid", ".validationMessages", "max", "precision", "variant", "size", "name", "label", "labelPosition", "labelHidden", "noLabel", "errorMessage", "helpText"], h = /* @__PURE__ */ r({
|
|
4
4
|
__name: "VueRating",
|
|
5
5
|
props: {
|
|
6
6
|
value: { default: 0 },
|
|
@@ -18,24 +18,26 @@ const v = [".value", ".readonly", ".allowClear", ".required", ".invalid", "max",
|
|
|
18
18
|
required: { type: Boolean, default: !1 },
|
|
19
19
|
invalid: { type: Boolean, default: !1 },
|
|
20
20
|
errorMessage: { default: "" },
|
|
21
|
-
helpText: { default: "" }
|
|
21
|
+
helpText: { default: "" },
|
|
22
|
+
validationMessages: {}
|
|
22
23
|
},
|
|
23
24
|
emits: ["update:value", "change", "hover"],
|
|
24
25
|
setup(e, { emit: n }) {
|
|
25
|
-
const t = n,
|
|
26
|
+
const t = n, i = s(), o = (a) => {
|
|
26
27
|
const l = a;
|
|
27
28
|
t("change", l.detail), t("update:value", l.detail.newValue);
|
|
28
29
|
}, d = (a) => {
|
|
29
30
|
t("hover", a.detail);
|
|
30
31
|
};
|
|
31
|
-
return (a, l) => (f(),
|
|
32
|
+
return (a, l) => (f(), u("ag-rating", v({
|
|
32
33
|
ref_key: "ratingRef",
|
|
33
|
-
ref:
|
|
34
|
+
ref: i,
|
|
34
35
|
".value": e.value,
|
|
35
36
|
".readonly": e.readonly,
|
|
36
37
|
".allowClear": e.allowClear,
|
|
37
38
|
".required": e.required,
|
|
38
39
|
".invalid": e.invalid,
|
|
40
|
+
".validationMessages": e.validationMessages,
|
|
39
41
|
max: e.max,
|
|
40
42
|
precision: e.precision,
|
|
41
43
|
variant: e.variant,
|
|
@@ -47,11 +49,11 @@ const v = [".value", ".readonly", ".allowClear", ".required", ".invalid", "max",
|
|
|
47
49
|
noLabel: e.noLabel,
|
|
48
50
|
errorMessage: e.errorMessage,
|
|
49
51
|
helpText: e.helpText,
|
|
50
|
-
onRatingChange:
|
|
52
|
+
onRatingChange: o,
|
|
51
53
|
onRatingHover: d
|
|
52
54
|
}, a.$attrs), [
|
|
53
|
-
|
|
54
|
-
], 48,
|
|
55
|
+
m(a.$slots, "default")
|
|
56
|
+
], 48, c));
|
|
55
57
|
}
|
|
56
58
|
});
|
|
57
59
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as s, createElementBlock as u, openBlock as i, mergeProps as o, renderSlot as c } from "vue";
|
|
2
2
|
import "./components/SelectionButtonGroup/core/SelectionButtonGroup.js";
|
|
3
|
-
const
|
|
3
|
+
const g = ["type", "name", "legend", "legend-hidden", "theme", "size", "shape", "value", "values", ".disabled", ".required", ".validationMessages"], h = /* @__PURE__ */ s({
|
|
4
4
|
__name: "VueSelectionButtonGroup",
|
|
5
5
|
props: {
|
|
6
6
|
type: { default: "radio" },
|
|
@@ -12,15 +12,17 @@ const m = ["type", "name", "legend", "legend-hidden", "theme", "size", "shape",
|
|
|
12
12
|
shape: { default: "" },
|
|
13
13
|
value: { default: "" },
|
|
14
14
|
values: { default: () => [] },
|
|
15
|
-
disabled: { type: Boolean, default: !1 }
|
|
15
|
+
disabled: { type: Boolean, default: !1 },
|
|
16
|
+
required: { type: Boolean, default: !1 },
|
|
17
|
+
validationMessages: {}
|
|
16
18
|
},
|
|
17
19
|
emits: ["selection-change", "update:value", "update:values"],
|
|
18
20
|
setup(e, { emit: d }) {
|
|
19
|
-
const l = d, n = (
|
|
20
|
-
const
|
|
21
|
-
l("selection-change",
|
|
21
|
+
const l = d, n = (t) => {
|
|
22
|
+
const a = t.detail;
|
|
23
|
+
l("selection-change", a), a.selectedValues.length <= 1 && l("update:value", a.selectedValues[0] || ""), l("update:values", a.selectedValues);
|
|
22
24
|
};
|
|
23
|
-
return (
|
|
25
|
+
return (t, a) => (i(), u("ag-selection-button-group", o({
|
|
24
26
|
type: e.type,
|
|
25
27
|
name: e.name,
|
|
26
28
|
legend: e.legend,
|
|
@@ -31,12 +33,14 @@ const m = ["type", "name", "legend", "legend-hidden", "theme", "size", "shape",
|
|
|
31
33
|
value: e.value,
|
|
32
34
|
values: e.values,
|
|
33
35
|
".disabled": e.disabled,
|
|
36
|
+
".required": e.required,
|
|
37
|
+
".validationMessages": e.validationMessages,
|
|
34
38
|
onSelectionChange: n
|
|
35
|
-
},
|
|
36
|
-
c(
|
|
37
|
-
], 48,
|
|
39
|
+
}, t.$attrs), [
|
|
40
|
+
c(t.$slots, "default")
|
|
41
|
+
], 48, g));
|
|
38
42
|
}
|
|
39
43
|
});
|
|
40
44
|
export {
|
|
41
|
-
|
|
45
|
+
h as _
|
|
42
46
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent as s, createElementBlock as i, openBlock as u, mergeProps as o, renderSlot as c } from "vue";
|
|
2
|
+
import "./components/SelectionCardGroup/core/SelectionCardGroup.js";
|
|
3
|
+
const g = ["type", "name", "legend", "legend-hidden", "value", "values", ".disabled", ".required", ".validationMessages"], v = /* @__PURE__ */ s({
|
|
4
|
+
__name: "VueSelectionCardGroup",
|
|
5
|
+
props: {
|
|
6
|
+
type: { default: "radio" },
|
|
7
|
+
name: { default: "" },
|
|
8
|
+
legend: { default: "" },
|
|
9
|
+
legendHidden: { type: Boolean, default: !1 },
|
|
10
|
+
value: { default: "" },
|
|
11
|
+
values: { default: () => [] },
|
|
12
|
+
disabled: { type: Boolean, default: !1 },
|
|
13
|
+
required: { type: Boolean, default: !1 },
|
|
14
|
+
validationMessages: {}
|
|
15
|
+
},
|
|
16
|
+
emits: ["selection-change", "update:value", "update:values"],
|
|
17
|
+
setup(e, { emit: t }) {
|
|
18
|
+
const d = t, n = (l) => {
|
|
19
|
+
const a = l.detail;
|
|
20
|
+
d("selection-change", a), a.selectedValues.length <= 1 && d("update:value", a.selectedValues[0] || ""), d("update:values", a.selectedValues);
|
|
21
|
+
};
|
|
22
|
+
return (l, a) => (u(), i("ag-selection-card-group", o({
|
|
23
|
+
type: e.type,
|
|
24
|
+
name: e.name,
|
|
25
|
+
legend: e.legend,
|
|
26
|
+
"legend-hidden": e.legendHidden,
|
|
27
|
+
value: e.value,
|
|
28
|
+
values: e.values,
|
|
29
|
+
".disabled": e.disabled,
|
|
30
|
+
".required": e.required,
|
|
31
|
+
".validationMessages": e.validationMessages,
|
|
32
|
+
onSelectionChange: n
|
|
33
|
+
}, l.$attrs), [
|
|
34
|
+
c(l.$slots, "default")
|
|
35
|
+
], 48, g));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
v as _
|
|
40
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as s, ref as g, watch as u, createElementBlock as f, openBlock as r, mergeProps as h } from "vue";
|
|
2
2
|
import "./components/Toggle/core/Toggle.js";
|
|
3
|
-
const b = ["label", ".labelPosition", ".labelHidden", ".noLabel", "size", "variant", ".checked", ".disabled", ".readonly", ".required", ".invalid", "errorMessage", "helpText", "name", "value"],
|
|
3
|
+
const b = ["label", ".labelPosition", ".labelHidden", ".noLabel", "size", "variant", ".checked", ".disabled", ".readonly", ".required", ".invalid", "errorMessage", "helpText", "name", "value", ".validationMessages"], m = /* @__PURE__ */ s({
|
|
4
4
|
__name: "VueToggle",
|
|
5
5
|
props: {
|
|
6
6
|
label: {},
|
|
@@ -17,24 +17,25 @@ const b = ["label", ".labelPosition", ".labelHidden", ".noLabel", "size", "varia
|
|
|
17
17
|
errorMessage: { default: "" },
|
|
18
18
|
helpText: { default: "" },
|
|
19
19
|
name: {},
|
|
20
|
-
value: {}
|
|
20
|
+
value: {},
|
|
21
|
+
validationMessages: {}
|
|
21
22
|
},
|
|
22
23
|
emits: ["click", "toggle-change", "update:checked"],
|
|
23
24
|
setup(e, { emit: d }) {
|
|
24
|
-
const
|
|
25
|
-
t("click",
|
|
26
|
-
}, c = (
|
|
27
|
-
const n =
|
|
25
|
+
const i = e, t = d, l = g(), o = (a) => {
|
|
26
|
+
t("click", a);
|
|
27
|
+
}, c = (a) => {
|
|
28
|
+
const n = a;
|
|
28
29
|
t("toggle-change", n.detail), t("update:checked", n.detail.checked);
|
|
29
30
|
};
|
|
30
|
-
return
|
|
31
|
-
() =>
|
|
32
|
-
(
|
|
33
|
-
|
|
31
|
+
return u(
|
|
32
|
+
() => i.checked,
|
|
33
|
+
(a) => {
|
|
34
|
+
l.value && l.value.checked !== a && (l.value.checked = a);
|
|
34
35
|
}
|
|
35
|
-
), (
|
|
36
|
+
), (a, n) => (r(), f("ag-toggle", h({
|
|
36
37
|
ref_key: "toggleRef",
|
|
37
|
-
ref:
|
|
38
|
+
ref: l,
|
|
38
39
|
label: e.label,
|
|
39
40
|
".labelPosition": e.labelPosition,
|
|
40
41
|
".labelHidden": e.labelHidden,
|
|
@@ -50,11 +51,12 @@ const b = ["label", ".labelPosition", ".labelHidden", ".noLabel", "size", "varia
|
|
|
50
51
|
helpText: e.helpText,
|
|
51
52
|
name: e.name,
|
|
52
53
|
value: e.value,
|
|
53
|
-
|
|
54
|
+
".validationMessages": e.validationMessages,
|
|
55
|
+
onClick: o,
|
|
54
56
|
onToggleChange: c
|
|
55
|
-
},
|
|
57
|
+
}, a.$attrs), null, 48, b));
|
|
56
58
|
}
|
|
57
59
|
});
|
|
58
60
|
export {
|
|
59
|
-
|
|
61
|
+
m as _
|
|
60
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/core/_Button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,UAAU,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKjE,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;CAClB;AACD,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;AAGrE,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,GAAG,EAAE,CAAC;IACzF,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1C,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,gBAAgB,GAAG,EAAE,CAAC;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,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O,EAAE,OAAO,CAAC;IAEzB;;OAEG;IAEK,SAAS,EAAE,OAAO,CAAC;IAE3B;;OAEG;IAEK,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAE5C;;OAEG;IAEK,QAAQ,EAAE,OAAO,CAAC;IAE1B;;OAEG;IAEK,OAAO,EAAE,OAAO,CAAC;IAEzB;;OAEG;IAEK,MAAM,EAAE,OAAO,CAAC;IAExB;;OAEG;IAEK,OAAO,EAAE,OAAO,CAAC;IAEzB;;OAEG;IAEK,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAGtC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAGtC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAGrC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;;IAoBtD,OAAO,CAAC,YAAY;IAoCpB,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,WAAW;IAcnB;;OAEG;IACH,KAAK;IAOL;;OAEG;IACH,IAAI;IAOJ,MAAM;CAoBP"}
|
|
@@ -11,7 +11,16 @@ const d = class d extends l {
|
|
|
11
11
|
super(), this.disabled = !1, this.loading = !1, this.toggle = !1, this.pressed = !1, this.bordered = !1, this.ghost = !1, this.link = !1, this.grouped = !1, this.fullWidth = !1, this.type = "button", this.ariaLabel = "", this.variant = "", this.size = "md", this.shape = "";
|
|
12
12
|
}
|
|
13
13
|
_handleClick(a) {
|
|
14
|
-
if (this.onClick && this.onClick(a),
|
|
14
|
+
if (this.onClick && this.onClick(a), !this.disabled && !this.loading && !a.defaultPrevented) {
|
|
15
|
+
if (this.type === "submit") {
|
|
16
|
+
const e = this.closest("form");
|
|
17
|
+
e && e.requestSubmit();
|
|
18
|
+
} else if (this.type === "reset") {
|
|
19
|
+
const e = this.closest("form");
|
|
20
|
+
e && e.reset();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (this.toggle && !this.disabled && !this.loading && !a.defaultPrevented) {
|
|
15
24
|
this.pressed = !this.pressed;
|
|
16
25
|
const e = new CustomEvent("toggle", {
|
|
17
26
|
detail: { pressed: this.pressed },
|
|
@@ -32,9 +32,9 @@ export interface CheckboxProps {
|
|
|
32
32
|
onClick?: (event: MouseEvent) => void;
|
|
33
33
|
onChange?: (event: CheckboxChangeEvent) => void;
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
declare const AgCheckbox_base: (new (...args: any[]) => import('../../../shared/face-mixin').FaceMixinInterface) & typeof LitElement;
|
|
36
|
+
export declare class AgCheckbox extends AgCheckbox_base implements CheckboxProps {
|
|
36
37
|
static styles: import('lit').CSSResult[];
|
|
37
|
-
name: string;
|
|
38
38
|
value: string;
|
|
39
39
|
checked: boolean;
|
|
40
40
|
indeterminate: boolean;
|
|
@@ -56,6 +56,17 @@ export declare class AgCheckbox extends LitElement implements CheckboxProps {
|
|
|
56
56
|
* Expose the internal focusable element for FormControl ARIA wiring
|
|
57
57
|
*/
|
|
58
58
|
get controlElement(): HTMLElement | null;
|
|
59
|
+
/**
|
|
60
|
+
* FACE lifecycle: called when the parent form is reset.
|
|
61
|
+
* Restores checked and indeterminate to their default states.
|
|
62
|
+
*/
|
|
63
|
+
formResetCallback(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Sync validity to ElementInternals by delegating to the inner
|
|
66
|
+
* <input type="checkbox">. Required validation is handled natively
|
|
67
|
+
* by the inner input; we just mirror its state.
|
|
68
|
+
*/
|
|
69
|
+
private _syncValidity;
|
|
59
70
|
updated(changedProperties: Map<string, unknown>): void;
|
|
60
71
|
private handleClick;
|
|
61
72
|
private handleChange;
|
|
@@ -74,4 +85,5 @@ export declare class AgCheckbox extends LitElement implements CheckboxProps {
|
|
|
74
85
|
render(): import('lit').TemplateResult<1>;
|
|
75
86
|
firstUpdated(): void;
|
|
76
87
|
}
|
|
88
|
+
export {};
|
|
77
89
|
//# sourceMappingURL=_Checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/core/_Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"_Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/core/_Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AASrD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC;AAG7E,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,yBAAyB,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IAEhC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAA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OAAO,CAAC,mBAAmB;IASlB,MAAM;IAqEN,YAAY;CAYtB"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { LitElement as p, css as u, nothing as
|
|
1
|
+
import { LitElement as p, css as u, nothing as c, html as l } from "lit";
|
|
2
2
|
import { n as r } from "../../../property-CemaeiRl.js";
|
|
3
3
|
import { formControlStyles as f } from "../../../shared/form-control-styles.js";
|
|
4
|
-
import { createFormControlIds as g, buildAriaDescribedBy as
|
|
5
|
-
|
|
4
|
+
import { createFormControlIds as g, buildAriaDescribedBy as m } from "../../../shared/form-control-utils.js";
|
|
5
|
+
import { FaceMixin as x, syncInnerInputValidity as k } from "../../../shared/face-mixin.js";
|
|
6
|
+
var v = Object.defineProperty, a = (d, t, o, s) => {
|
|
6
7
|
for (var i = void 0, n = d.length - 1, b; n >= 0; n--)
|
|
7
|
-
(b = d[n]) && (i = b(
|
|
8
|
-
return i &&
|
|
8
|
+
(b = d[n]) && (i = b(t, o, i) || i);
|
|
9
|
+
return i && v(t, o, i), i;
|
|
9
10
|
};
|
|
10
|
-
const h = class h extends p {
|
|
11
|
+
const h = class h extends x(p) {
|
|
11
12
|
constructor() {
|
|
12
|
-
super(), this._ids = g("ag-checkbox"), this.
|
|
13
|
+
super(), this._ids = g("ag-checkbox"), this.value = "", this.checked = !1, this.indeterminate = !1, this.disabled = !1, this.size = "medium", this.theme = "primary", this.labelText = "", this.labelPosition = "end", this.required = !1, this.invalid = !1, this.errorMessage = "", this.helpText = "";
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Expose the internal focusable element for FormControl ARIA wiring
|
|
@@ -17,19 +18,36 @@ const h = class h extends p {
|
|
|
17
18
|
get controlElement() {
|
|
18
19
|
return this.inputRef || null;
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
// ─── FACE ─────────────────────────────────────────────────────────────────
|
|
22
|
+
/**
|
|
23
|
+
* FACE lifecycle: called when the parent form is reset.
|
|
24
|
+
* Restores checked and indeterminate to their default states.
|
|
25
|
+
*/
|
|
26
|
+
formResetCallback() {
|
|
27
|
+
this.checked = !1, this.indeterminate = !1, this._internals.setFormValue(null), this._internals.setValidity({});
|
|
22
28
|
}
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Sync validity to ElementInternals by delegating to the inner
|
|
31
|
+
* <input type="checkbox">. Required validation is handled natively
|
|
32
|
+
* by the inner input; we just mirror its state.
|
|
33
|
+
*/
|
|
34
|
+
_syncValidity() {
|
|
35
|
+
k(this._internals, this.inputRef);
|
|
25
36
|
}
|
|
26
|
-
|
|
37
|
+
// ─── End FACE ─────────────────────────────────────────────────────────────
|
|
38
|
+
updated(t) {
|
|
39
|
+
super.updated(t), t.has("indeterminate") && this.inputRef && (this.inputRef.indeterminate = this.indeterminate), (t.has("checked") || t.has("indeterminate")) && (this._internals.setFormValue(this.checked ? this.value || "on" : null), this._syncValidity());
|
|
40
|
+
}
|
|
41
|
+
handleClick(t) {
|
|
42
|
+
this.onClick && this.onClick(t);
|
|
43
|
+
}
|
|
44
|
+
handleChange(t) {
|
|
27
45
|
if (this.disabled) {
|
|
28
|
-
|
|
46
|
+
t.preventDefault();
|
|
29
47
|
return;
|
|
30
48
|
}
|
|
31
|
-
const o =
|
|
32
|
-
this.checked = o.checked, this.indeterminate && (this.indeterminate = !1);
|
|
49
|
+
const o = t.target;
|
|
50
|
+
this.checked = o.checked, this.indeterminate && (this.indeterminate = !1), this._internals.setFormValue(this.checked ? this.value || "on" : null), this._syncValidity();
|
|
33
51
|
const s = new CustomEvent("change", {
|
|
34
52
|
detail: {
|
|
35
53
|
checked: this.checked,
|
|
@@ -46,7 +64,7 @@ const h = class h extends p {
|
|
|
46
64
|
* Render helper text
|
|
47
65
|
*/
|
|
48
66
|
_renderHelper() {
|
|
49
|
-
return this.helpText ?
|
|
67
|
+
return this.helpText ? l`
|
|
50
68
|
<div
|
|
51
69
|
id="${this._ids.helperId}"
|
|
52
70
|
class="ag-form-control__helper ag-checkbox__helper"
|
|
@@ -54,13 +72,13 @@ const h = class h extends p {
|
|
|
54
72
|
>
|
|
55
73
|
${this.helpText}
|
|
56
74
|
</div>
|
|
57
|
-
` :
|
|
75
|
+
` : c;
|
|
58
76
|
}
|
|
59
77
|
/**
|
|
60
78
|
* Render error text
|
|
61
79
|
*/
|
|
62
80
|
_renderError() {
|
|
63
|
-
return !this.invalid || !this.errorMessage ?
|
|
81
|
+
return !this.invalid || !this.errorMessage ? c : l`
|
|
64
82
|
<div
|
|
65
83
|
id="${this._ids.errorId}"
|
|
66
84
|
class="ag-form-control__error ag-checkbox__error"
|
|
@@ -74,7 +92,7 @@ const h = class h extends p {
|
|
|
74
92
|
* Build ARIA describedby attribute
|
|
75
93
|
*/
|
|
76
94
|
_getAriaDescribedBy() {
|
|
77
|
-
return
|
|
95
|
+
return m({
|
|
78
96
|
helperId: this._ids.helperId,
|
|
79
97
|
errorId: this._ids.errorId,
|
|
80
98
|
hasHelper: !!this.helpText,
|
|
@@ -82,7 +100,7 @@ const h = class h extends p {
|
|
|
82
100
|
});
|
|
83
101
|
}
|
|
84
102
|
render() {
|
|
85
|
-
const
|
|
103
|
+
const t = `
|
|
86
104
|
checkbox-wrapper
|
|
87
105
|
${this.labelPosition === "start" ? "checkbox-wrapper--label-start" : ""}
|
|
88
106
|
`, o = `
|
|
@@ -93,11 +111,11 @@ const h = class h extends p {
|
|
|
93
111
|
checkbox-label-copy
|
|
94
112
|
checkbox-label-copy--${this.size}
|
|
95
113
|
`, i = this._getAriaDescribedBy();
|
|
96
|
-
return
|
|
114
|
+
return l`
|
|
97
115
|
<div class="ag-checkbox-container">
|
|
98
116
|
<label
|
|
99
117
|
for="${this._ids.inputId}"
|
|
100
|
-
class=${
|
|
118
|
+
class=${t.trim()}
|
|
101
119
|
part="ag-checkbox-wrapper"
|
|
102
120
|
>
|
|
103
121
|
<input
|
|
@@ -114,7 +132,7 @@ const h = class h extends p {
|
|
|
114
132
|
aria-label="${this.labelText || "Checkbox"}"
|
|
115
133
|
aria-required="${this.required ? "true" : "false"}"
|
|
116
134
|
aria-invalid="${this.invalid ? "true" : "false"}"
|
|
117
|
-
aria-describedby="${i ||
|
|
135
|
+
aria-describedby="${i || c}"
|
|
118
136
|
aria-checked=${this.indeterminate ? "mixed" : this.checked ? "true" : "false"}
|
|
119
137
|
@click=${this.handleClick}
|
|
120
138
|
@change=${this.handleChange}
|
|
@@ -125,8 +143,8 @@ const h = class h extends p {
|
|
|
125
143
|
aria-hidden="true"
|
|
126
144
|
></span>
|
|
127
145
|
<span class=${s.trim()} part="ag-checkbox-label">
|
|
128
|
-
${this.labelText ||
|
|
129
|
-
${this.required ?
|
|
146
|
+
${this.labelText || l`<slot></slot>`}
|
|
147
|
+
${this.required ? l`<span class="ag-form-control__required" aria-label="required">*</span>` : c}
|
|
130
148
|
</span>
|
|
131
149
|
</label>
|
|
132
150
|
${this._renderHelper()}
|
|
@@ -137,7 +155,7 @@ const h = class h extends p {
|
|
|
137
155
|
firstUpdated() {
|
|
138
156
|
this.inputRef = this.shadowRoot?.querySelector(
|
|
139
157
|
".checkbox-input"
|
|
140
|
-
), this.inputRef && this.indeterminate && (this.inputRef.indeterminate = this.indeterminate);
|
|
158
|
+
), this.inputRef && this.indeterminate && (this.inputRef.indeterminate = this.indeterminate), this._internals.setFormValue(this.checked ? this.value || "on" : null), this._syncValidity();
|
|
141
159
|
}
|
|
142
160
|
};
|
|
143
161
|
h.styles = [
|
|
@@ -372,49 +390,46 @@ h.styles = [
|
|
|
372
390
|
`
|
|
373
391
|
];
|
|
374
392
|
let e = h;
|
|
375
|
-
|
|
376
|
-
r({ type: String })
|
|
377
|
-
], e.prototype, "name");
|
|
378
|
-
t([
|
|
393
|
+
a([
|
|
379
394
|
r({ type: String })
|
|
380
395
|
], e.prototype, "value");
|
|
381
|
-
|
|
396
|
+
a([
|
|
382
397
|
r({ type: Boolean, reflect: !0 })
|
|
383
398
|
], e.prototype, "checked");
|
|
384
|
-
|
|
399
|
+
a([
|
|
385
400
|
r({ type: Boolean, reflect: !0 })
|
|
386
401
|
], e.prototype, "indeterminate");
|
|
387
|
-
|
|
402
|
+
a([
|
|
388
403
|
r({ type: Boolean, reflect: !0 })
|
|
389
404
|
], e.prototype, "disabled");
|
|
390
|
-
|
|
405
|
+
a([
|
|
391
406
|
r({ type: String })
|
|
392
407
|
], e.prototype, "size");
|
|
393
|
-
|
|
408
|
+
a([
|
|
394
409
|
r({ type: String })
|
|
395
410
|
], e.prototype, "theme");
|
|
396
|
-
|
|
411
|
+
a([
|
|
397
412
|
r({ type: String })
|
|
398
413
|
], e.prototype, "labelText");
|
|
399
|
-
|
|
414
|
+
a([
|
|
400
415
|
r({ type: String })
|
|
401
416
|
], e.prototype, "labelPosition");
|
|
402
|
-
|
|
417
|
+
a([
|
|
403
418
|
r({ type: Boolean, reflect: !0 })
|
|
404
419
|
], e.prototype, "required");
|
|
405
|
-
|
|
420
|
+
a([
|
|
406
421
|
r({ type: Boolean, reflect: !0 })
|
|
407
422
|
], e.prototype, "invalid");
|
|
408
|
-
|
|
423
|
+
a([
|
|
409
424
|
r({ type: String, attribute: "error-message" })
|
|
410
425
|
], e.prototype, "errorMessage");
|
|
411
|
-
|
|
426
|
+
a([
|
|
412
427
|
r({ type: String, attribute: "help-text" })
|
|
413
428
|
], e.prototype, "helpText");
|
|
414
|
-
|
|
429
|
+
a([
|
|
415
430
|
r({ attribute: !1 })
|
|
416
431
|
], e.prototype, "onClick");
|
|
417
|
-
|
|
432
|
+
a([
|
|
418
433
|
r({ attribute: !1 })
|
|
419
434
|
], e.prototype, "onChange");
|
|
420
435
|
export {
|