agnosticui-core 2.0.0-alpha.2 → 2.0.0-alpha.21
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/README.md +67 -33
- package/dist/{VueButton.vue_vue_type_script_setup_true_lang-Bq8IPXqd.js → VueButton.vue_vue_type_script_setup_true_lang-D1jGatE9.js} +17 -15
- package/dist/{VueButtonFx.vue_vue_type_script_setup_true_lang-BUudF-lg.js → VueButtonFx.vue_vue_type_script_setup_true_lang-BRrt6Nxs.js} +1 -0
- package/dist/{VueCheckbox.vue_vue_type_script_setup_true_lang-DERDRO2P.js → VueCheckbox.vue_vue_type_script_setup_true_lang-VtQfJ-6f.js} +9 -10
- 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/VueIcon.vue_vue_type_script_setup_true_lang-C2Sky3bU.js +22 -0
- package/dist/{VueImage.vue_vue_type_script_setup_true_lang-CUwbK3NF.js → VueImage.vue_vue_type_script_setup_true_lang-SddK93SB.js} +23 -17
- package/dist/{VueInput.vue_vue_type_script_setup_true_lang-Dsxo7DuX.js → VueInput.vue_vue_type_script_setup_true_lang-wYdAqg-i.js} +19 -19
- package/dist/{VueMenu.vue_vue_type_script_setup_true_lang-bnn7ochj.js → VueMenu.vue_vue_type_script_setup_true_lang-BXc7397e.js} +5 -4
- package/dist/{VueRadio.vue_vue_type_script_setup_true_lang-DxNhH12d.js → VueRadio.vue_vue_type_script_setup_true_lang-C7Z-sWpa.js} +10 -12
- 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/VueSelectionButton.vue_vue_type_script_setup_true_lang-DJN-Uk6n.js +24 -0
- package/dist/VueSelectionButtonGroup.vue_vue_type_script_setup_true_lang-DwYrIMVO.js +46 -0
- package/dist/VueSelectionCard.vue_vue_type_script_setup_true_lang-DJiyPsXH.js +24 -0
- 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/Alert/core/_Alert.d.ts.map +1 -1
- package/dist/components/Alert/core/_Alert.js +38 -19
- package/dist/components/Button/core/_Button.d.ts +5 -0
- package/dist/components/Button/core/_Button.d.ts.map +1 -1
- package/dist/components/Button/core/_Button.js +147 -65
- package/dist/components/Button/vue/VueButton.js +1 -1
- package/dist/components/Button/vue/VueButton.vue.d.ts +3 -0
- package/dist/components/Button/vue/VueButton.vue.d.ts.map +1 -1
- package/dist/components/Button/vue/index.js +1 -1
- package/dist/components/ButtonFx/vue/VueButtonFx.js +1 -1
- package/dist/components/ButtonFx/vue/index.js +1 -1
- package/dist/components/Card/core/_Card.d.ts +9 -1
- package/dist/components/Card/core/_Card.d.ts.map +1 -1
- package/dist/components/Card/core/_Card.js +83 -29
- package/dist/components/Card/vue/VueCard.js +29 -16
- package/dist/components/Card/vue/VueCard.vue.d.ts +25 -5
- package/dist/components/Card/vue/VueCard.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/core/_Checkbox.d.ts +37 -11
- package/dist/components/Checkbox/core/_Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/core/_Checkbox.js +73 -42
- package/dist/components/Checkbox/vue/VueCheckbox.js +1 -1
- package/dist/components/Checkbox/vue/VueCheckbox.vue.d.ts +3 -3
- package/dist/components/Checkbox/vue/VueCheckbox.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/vue/index.js +1 -1
- 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 +141 -92
- package/dist/components/Combobox/vue/VueCombobox.js +1 -1
- package/dist/components/Combobox/vue/index.js +1 -1
- package/dist/components/Fieldset/vue/VueFieldset.vue.d.ts +1 -1
- package/dist/components/Icon/vue/VueIcon.js +1 -1
- package/dist/components/Icon/vue/VueIcon.vue.d.ts.map +1 -1
- package/dist/components/Icon/vue/index.js +1 -1
- package/dist/components/Image/vue/VueImage.js +1 -1
- package/dist/components/Image/vue/VueImage.vue.d.ts.map +1 -1
- package/dist/components/Image/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 +71 -35
- package/dist/components/Input/vue/VueInput.js +1 -1
- package/dist/components/Input/vue/VueInput.vue.d.ts.map +1 -1
- package/dist/components/Input/vue/index.js +1 -1
- package/dist/components/Link/core/_Link.d.ts.map +1 -1
- package/dist/components/Link/core/_Link.js +1 -0
- package/dist/components/Link/vue/VueLink.js +6 -5
- package/dist/components/Link/vue/VueLink.vue.d.ts.map +1 -1
- package/dist/components/Menu/vue/VueMenu.js +1 -1
- package/dist/components/Menu/vue/index.js +1 -1
- package/dist/components/Pagination/core/_Pagination.d.ts +0 -1
- package/dist/components/Pagination/core/_Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/core/_Pagination.js +6 -9
- package/dist/components/Radio/core/_Radio.d.ts +55 -10
- package/dist/components/Radio/core/_Radio.d.ts.map +1 -1
- package/dist/components/Radio/core/_Radio.js +165 -116
- package/dist/components/Radio/vue/VueRadio.js +1 -1
- package/dist/components/Radio/vue/VueRadio.vue.d.ts.map +1 -1
- package/dist/components/Radio/vue/index.js +1 -1
- 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 +99 -69
- package/dist/components/SelectionButton/core/SelectionButton.d.ts +9 -0
- package/dist/components/SelectionButton/core/SelectionButton.d.ts.map +1 -0
- package/dist/components/SelectionButton/core/SelectionButton.js +5 -0
- package/dist/components/SelectionButton/core/_SelectionButton.d.ts +47 -0
- package/dist/components/SelectionButton/core/_SelectionButton.d.ts.map +1 -0
- package/dist/components/SelectionButton/core/_SelectionButton.js +474 -0
- package/dist/components/SelectionButton/react/ReactSelectionButton.d.ts +9 -0
- package/dist/components/SelectionButton/react/ReactSelectionButton.d.ts.map +1 -0
- package/dist/components/SelectionButton/react/ReactSelectionButton.js +12 -0
- package/dist/components/SelectionButton/react/index.d.ts +3 -0
- package/dist/components/SelectionButton/react/index.d.ts.map +1 -0
- package/dist/components/SelectionButton/react/index.js +4 -0
- package/dist/components/SelectionButton/vue/VueSelectionButton.js +4 -0
- package/dist/components/SelectionButton/vue/VueSelectionButton.vue.d.ts +55 -0
- package/dist/components/SelectionButton/vue/VueSelectionButton.vue.d.ts.map +1 -0
- package/dist/components/SelectionButton/vue/index.d.ts +6 -0
- package/dist/components/SelectionButton/vue/index.d.ts.map +1 -0
- package/dist/components/SelectionButton/vue/index.js +4 -0
- package/dist/components/SelectionButtonGroup/core/SelectionButtonGroup.d.ts +9 -0
- package/dist/components/SelectionButtonGroup/core/SelectionButtonGroup.d.ts.map +1 -0
- package/dist/components/SelectionButtonGroup/core/SelectionButtonGroup.js +5 -0
- package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts +87 -0
- package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts.map +1 -0
- package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.js +235 -0
- package/dist/components/SelectionButtonGroup/react/ReactSelectionButtonGroup.d.ts +13 -0
- package/dist/components/SelectionButtonGroup/react/ReactSelectionButtonGroup.d.ts.map +1 -0
- package/dist/components/SelectionButtonGroup/react/ReactSelectionButtonGroup.js +15 -0
- package/dist/components/SelectionButtonGroup/react/index.d.ts +3 -0
- package/dist/components/SelectionButtonGroup/react/index.d.ts.map +1 -0
- package/dist/components/SelectionButtonGroup/react/index.js +4 -0
- package/dist/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.js +4 -0
- package/dist/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.vue.d.ts +101 -0
- package/dist/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.vue.d.ts.map +1 -0
- package/dist/components/SelectionButtonGroup/vue/index.d.ts +6 -0
- package/dist/components/SelectionButtonGroup/vue/index.d.ts.map +1 -0
- package/dist/components/SelectionButtonGroup/vue/index.js +4 -0
- package/dist/components/SelectionCard/core/SelectionCard.d.ts +9 -0
- package/dist/components/SelectionCard/core/SelectionCard.d.ts.map +1 -0
- package/dist/components/SelectionCard/core/SelectionCard.js +5 -0
- package/dist/components/SelectionCard/core/_SelectionCard.d.ts +39 -0
- package/dist/components/SelectionCard/core/_SelectionCard.d.ts.map +1 -0
- package/dist/components/SelectionCard/core/_SelectionCard.js +318 -0
- package/dist/components/SelectionCard/react/ReactSelectionCard.d.ts +9 -0
- package/dist/components/SelectionCard/react/ReactSelectionCard.d.ts.map +1 -0
- package/dist/components/SelectionCard/react/ReactSelectionCard.js +12 -0
- package/dist/components/SelectionCard/react/index.d.ts +3 -0
- package/dist/components/SelectionCard/react/index.d.ts.map +1 -0
- package/dist/components/SelectionCard/react/index.js +4 -0
- package/dist/components/SelectionCard/vue/VueSelectionCard.js +4 -0
- package/dist/components/SelectionCard/vue/VueSelectionCard.vue.d.ts +55 -0
- package/dist/components/SelectionCard/vue/VueSelectionCard.vue.d.ts.map +1 -0
- package/dist/components/SelectionCard/vue/index.d.ts +6 -0
- package/dist/components/SelectionCard/vue/index.d.ts.map +1 -0
- package/dist/components/SelectionCard/vue/index.js +4 -0
- package/dist/components/SelectionCardGroup/core/SelectionCardGroup.d.ts +9 -0
- package/dist/components/SelectionCardGroup/core/SelectionCardGroup.d.ts.map +1 -0
- package/dist/components/SelectionCardGroup/core/SelectionCardGroup.js +5 -0
- package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.d.ts +69 -0
- package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.d.ts.map +1 -0
- package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.js +220 -0
- package/dist/components/SelectionCardGroup/react/ReactSelectionCardGroup.d.ts +13 -0
- package/dist/components/SelectionCardGroup/react/ReactSelectionCardGroup.d.ts.map +1 -0
- package/dist/components/SelectionCardGroup/react/ReactSelectionCardGroup.js +15 -0
- package/dist/components/SelectionCardGroup/react/index.d.ts +3 -0
- package/dist/components/SelectionCardGroup/react/index.d.ts.map +1 -0
- package/dist/components/SelectionCardGroup/react/index.js +4 -0
- package/dist/components/SelectionCardGroup/vue/VueSelectionCardGroup.js +4 -0
- package/dist/components/SelectionCardGroup/vue/VueSelectionCardGroup.vue.d.ts +86 -0
- package/dist/components/SelectionCardGroup/vue/VueSelectionCardGroup.vue.d.ts.map +1 -0
- package/dist/components/SelectionCardGroup/vue/index.d.ts +6 -0
- package/dist/components/SelectionCardGroup/vue/index.d.ts.map +1 -0
- package/dist/components/SelectionCardGroup/vue/index.js +4 -0
- 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/Timeline/core/_Timeline.d.ts.map +1 -1
- package/dist/components/Timeline/core/_Timeline.js +8 -3
- package/dist/components/Timeline/react/ReactTimeline.d.ts +23 -9
- package/dist/components/Timeline/react/ReactTimeline.d.ts.map +1 -1
- package/dist/components/Timeline/react/ReactTimeline.js +18 -14
- package/dist/components/Toggle/core/_Toggle.d.ts +36 -6
- package/dist/components/Toggle/core/_Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/core/_Toggle.js +117 -77
- 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 +82 -0
- package/dist/shared/face-mixin.d.ts.map +1 -0
- package/dist/shared/face-mixin.js +86 -0
- package/dist/shared/form-control-styles.js +1 -1
- package/dist/styles/ag-tokens-dark.css +4 -0
- package/dist/styles/ag-tokens.css +18 -13
- package/dist/test-setup.js +340 -255
- package/package.json +51 -13
- package/src/components/Alert/core/_Alert.ts +21 -2
- package/src/components/Button/core/_Button.ts +111 -21
- package/src/components/Button/vue/VueButton.vue +2 -0
- package/src/components/Card/core/_Card.ts +70 -3
- package/src/components/Card/vue/VueCard.vue +19 -3
- package/src/components/Checkbox/core/_Checkbox.ts +78 -18
- package/src/components/Checkbox/vue/VueCheckbox.vue +0 -6
- package/src/components/Combobox/core/_Combobox.ts +84 -2
- 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/Icon/vue/VueIcon.vue +2 -5
- package/src/components/Image/vue/VueImage.vue +17 -13
- package/src/components/Input/core/_Input.ts +58 -3
- package/src/components/Input/vue/VueInput.vue +2 -6
- package/src/components/Link/core/_Link.ts +1 -0
- package/src/components/Link/vue/VueLink.vue +1 -0
- package/src/components/Pagination/core/_Pagination.ts +10 -18
- package/src/components/Radio/core/_Radio.ts +131 -41
- package/src/components/Radio/vue/VueRadio.vue +1 -5
- 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 +55 -6
- package/src/components/SelectionButton/core/SelectionButton.ts +13 -0
- package/src/components/SelectionButton/core/_SelectionButton.ts +551 -0
- package/src/components/SelectionButton/react/ReactSelectionButton.tsx +16 -0
- package/src/components/SelectionButton/react/index.ts +4 -0
- package/src/components/SelectionButton/vue/VueSelectionButton.vue +33 -0
- package/src/components/SelectionButton/vue/index.ts +5 -0
- package/src/components/SelectionButtonGroup/core/SelectionButtonGroup.ts +13 -0
- package/src/components/SelectionButtonGroup/core/_SelectionButtonGroup.ts +423 -0
- package/src/components/SelectionButtonGroup/react/ReactSelectionButtonGroup.tsx +29 -0
- package/src/components/SelectionButtonGroup/react/index.ts +9 -0
- package/src/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.vue +89 -0
- package/src/components/SelectionButtonGroup/vue/index.ts +5 -0
- package/src/components/SelectionCard/core/SelectionCard.ts +13 -0
- package/src/components/SelectionCard/core/_SelectionCard.ts +384 -0
- package/src/components/SelectionCard/react/ReactSelectionCard.tsx +16 -0
- package/src/components/SelectionCard/react/index.ts +4 -0
- package/src/components/SelectionCard/vue/VueSelectionCard.vue +33 -0
- package/src/components/SelectionCard/vue/index.ts +5 -0
- package/src/components/SelectionCardGroup/core/SelectionCardGroup.ts +13 -0
- package/src/components/SelectionCardGroup/core/_SelectionCardGroup.ts +396 -0
- package/src/components/SelectionCardGroup/react/ReactSelectionCardGroup.tsx +29 -0
- package/src/components/SelectionCardGroup/react/index.ts +9 -0
- package/src/components/SelectionCardGroup/vue/VueSelectionCardGroup.vue +71 -0
- package/src/components/SelectionCardGroup/vue/index.ts +5 -0
- package/src/components/Slider/core/_Slider.ts +28 -28
- package/src/components/Timeline/core/_Timeline.ts +5 -0
- package/src/components/Timeline/react/ReactTimeline.tsx +47 -24
- package/src/components/Toggle/core/_Toggle.ts +83 -9
- package/src/components/Toggle/vue/VueToggle.vue +2 -0
- package/src/shared/face-mixin.ts +233 -0
- package/src/shared/form-control-styles.ts +1 -1
- package/src/styles/ag-tokens-dark.css +4 -0
- package/src/styles/ag-tokens.css +18 -13
- package/RTL_IMPLEMENTATION_PLAN.md +0 -295
- package/dist/VueIcon.vue_vue_type_script_setup_true_lang-kC-nzMyu.js +0 -25
- 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/dist/global.d.js +0 -1
- package/src/components/Input/core/_Input.BACKUP.ts +0 -710
- package/src/global.d.ts +0 -43
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { LitElement as g, css as h, html as n, nothing as u } from "lit";
|
|
2
|
+
import { n as r } from "../../../property-CemaeiRl.js";
|
|
3
|
+
var p = Object.defineProperty, o = (s, e, c, b) => {
|
|
4
|
+
for (var t = void 0, i = s.length - 1, l; i >= 0; i--)
|
|
5
|
+
(l = s[i]) && (t = l(e, c, t) || t);
|
|
6
|
+
return t && p(e, c, t), t;
|
|
7
|
+
};
|
|
8
|
+
const d = class d extends g {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(), this.value = "", this.label = "", this.checked = !1, this.disabled = !1, this._type = "radio", this._name = "", this._theme = "";
|
|
11
|
+
}
|
|
12
|
+
focus() {
|
|
13
|
+
this.shadowRoot?.querySelector(".selection-card")?.focus();
|
|
14
|
+
}
|
|
15
|
+
_handleClick(e) {
|
|
16
|
+
if (e.preventDefault(), this.disabled)
|
|
17
|
+
return;
|
|
18
|
+
const c = this._type === "radio" ? !0 : !this.checked;
|
|
19
|
+
this.dispatchEvent(new CustomEvent("selection-card-change", {
|
|
20
|
+
detail: {
|
|
21
|
+
value: this.value,
|
|
22
|
+
checked: c
|
|
23
|
+
},
|
|
24
|
+
bubbles: !0,
|
|
25
|
+
composed: !0
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
_handleKeyDown(e) {
|
|
29
|
+
this.disabled || (e.key === " " || e.key === "Enter") && (e.preventDefault(), this._handleClick(e));
|
|
30
|
+
}
|
|
31
|
+
_renderIndicator() {
|
|
32
|
+
return this._type === "checkbox" ? n`
|
|
33
|
+
<svg class="selection-card__checkmark" viewBox="0 0 24 24">
|
|
34
|
+
<polyline points="4 12 10 18 20 6"></polyline>
|
|
35
|
+
</svg>
|
|
36
|
+
` : n`<div class="selection-card__radio-dot"></div>`;
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
const c = [
|
|
40
|
+
"selection-card",
|
|
41
|
+
`selection-card--${this._theme || "default"}`,
|
|
42
|
+
this.checked ? "selection-card--checked" : "",
|
|
43
|
+
this.disabled ? "selection-card--disabled" : ""
|
|
44
|
+
].filter(Boolean).join(" ");
|
|
45
|
+
return n`
|
|
46
|
+
<label
|
|
47
|
+
class="${c}"
|
|
48
|
+
part="ag-selection-card-container"
|
|
49
|
+
tabindex="${this.disabled ? -1 : 0}"
|
|
50
|
+
@click="${this._handleClick}"
|
|
51
|
+
@keydown="${this._handleKeyDown}"
|
|
52
|
+
>
|
|
53
|
+
<input
|
|
54
|
+
type="${this._type}"
|
|
55
|
+
class="selection-card__input"
|
|
56
|
+
part="ag-selection-card-control"
|
|
57
|
+
name="${this._name || u}"
|
|
58
|
+
value="${this.value}"
|
|
59
|
+
.checked="${this.checked}"
|
|
60
|
+
?disabled="${this.disabled}"
|
|
61
|
+
aria-checked="${this.checked ? "true" : "false"}"
|
|
62
|
+
tabindex="-1"
|
|
63
|
+
/>
|
|
64
|
+
<span class="selection-card__label-sr">${this.label}</span>
|
|
65
|
+
<div class="selection-card__indicator" part="ag-selection-card-indicator" aria-hidden="true">
|
|
66
|
+
${this._renderIndicator()}
|
|
67
|
+
</div>
|
|
68
|
+
<div class="selection-card__content" part="ag-selection-card-content">
|
|
69
|
+
<slot></slot>
|
|
70
|
+
</div>
|
|
71
|
+
</label>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
d.styles = h`
|
|
76
|
+
:host {
|
|
77
|
+
display: block;
|
|
78
|
+
--_selection-card-padding: var(--ag-selection-card-padding, var(--ag-space-4));
|
|
79
|
+
--_selection-card-gap: var(--ag-selection-card-gap, var(--ag-space-3));
|
|
80
|
+
--_selection-card-border-radius: var(--ag-selection-card-border-radius, var(--ag-radius-md));
|
|
81
|
+
--_selection-card-indicator-size: var(--ag-selection-card-indicator-size, var(--ag-space-5));
|
|
82
|
+
--_selection-card-background: var(--ag-selection-card-background, var(--ag-background-primary));
|
|
83
|
+
--_selection-card-border-color: var(--ag-selection-card-border-color, var(--ag-border));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.selection-card {
|
|
87
|
+
position: relative;
|
|
88
|
+
display: block;
|
|
89
|
+
padding: var(--_selection-card-padding);
|
|
90
|
+
background: var(--_selection-card-background);
|
|
91
|
+
/* Always use border-width-2 to prevent CLS when selected */
|
|
92
|
+
border: var(--ag-border-width-2) solid var(--_selection-card-border-color);
|
|
93
|
+
border-radius: var(--_selection-card-border-radius);
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
transition:
|
|
96
|
+
border-color var(--ag-motion-fast) var(--ag-fx-ease-ease-out),
|
|
97
|
+
background-color var(--ag-motion-fast) var(--ag-fx-ease-ease-out),
|
|
98
|
+
box-shadow var(--ag-motion-fast) var(--ag-fx-ease-ease-out),
|
|
99
|
+
transform var(--ag-motion-fast) var(--ag-fx-ease-ease-out);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Subtle hover effect for all cards */
|
|
103
|
+
.selection-card:hover:not(.selection-card--disabled) {
|
|
104
|
+
transform: scale(1.02);
|
|
105
|
+
box-shadow: var(--ag-shadow-sm);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Theme: default/empty (primary blue) */
|
|
109
|
+
.selection-card--default:hover:not(.selection-card--disabled) {
|
|
110
|
+
border-color: var(--ag-primary);
|
|
111
|
+
}
|
|
112
|
+
.selection-card--default.selection-card--checked {
|
|
113
|
+
background: var(--ag-primary-background);
|
|
114
|
+
border-color: var(--ag-primary);
|
|
115
|
+
}
|
|
116
|
+
.selection-card--default .selection-card__indicator {
|
|
117
|
+
background: var(--ag-primary);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Theme: success (green) */
|
|
121
|
+
.selection-card--success:hover:not(.selection-card--disabled) {
|
|
122
|
+
border-color: var(--ag-success);
|
|
123
|
+
}
|
|
124
|
+
.selection-card--success.selection-card--checked {
|
|
125
|
+
background: var(--ag-success-background);
|
|
126
|
+
border-color: var(--ag-success);
|
|
127
|
+
color: var(--ag-success-text);
|
|
128
|
+
}
|
|
129
|
+
.selection-card--success .selection-card__indicator {
|
|
130
|
+
background: var(--ag-success);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Theme: info (blue/cyan) */
|
|
134
|
+
.selection-card--info:hover:not(.selection-card--disabled) {
|
|
135
|
+
border-color: var(--ag-info);
|
|
136
|
+
}
|
|
137
|
+
.selection-card--info.selection-card--checked {
|
|
138
|
+
background: var(--ag-info-background);
|
|
139
|
+
border-color: var(--ag-info);
|
|
140
|
+
color: var(--ag-info-text);
|
|
141
|
+
}
|
|
142
|
+
.selection-card--info .selection-card__indicator {
|
|
143
|
+
background: var(--ag-info);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Theme: warning (yellow/orange) */
|
|
147
|
+
.selection-card--warning:hover:not(.selection-card--disabled) {
|
|
148
|
+
border-color: var(--ag-warning);
|
|
149
|
+
}
|
|
150
|
+
.selection-card--warning.selection-card--checked {
|
|
151
|
+
background: var(--ag-warning-background);
|
|
152
|
+
border-color: var(--ag-warning);
|
|
153
|
+
color: var(--ag-warning-text);
|
|
154
|
+
}
|
|
155
|
+
.selection-card--warning .selection-card__indicator {
|
|
156
|
+
background: var(--ag-warning);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Theme: error (red) */
|
|
160
|
+
.selection-card--error:hover:not(.selection-card--disabled) {
|
|
161
|
+
border-color: var(--ag-danger);
|
|
162
|
+
}
|
|
163
|
+
.selection-card--error.selection-card--checked {
|
|
164
|
+
background: var(--ag-danger-background);
|
|
165
|
+
border-color: var(--ag-danger);
|
|
166
|
+
color: var(--ag-danger-text);
|
|
167
|
+
}
|
|
168
|
+
.selection-card--error .selection-card__indicator {
|
|
169
|
+
background: var(--ag-danger);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Theme: monochrome (black/white) */
|
|
173
|
+
.selection-card--monochrome:hover:not(.selection-card--disabled) {
|
|
174
|
+
border-color: var(--ag-black);
|
|
175
|
+
}
|
|
176
|
+
.selection-card--monochrome.selection-card--checked {
|
|
177
|
+
background: var(--ag-background-primary-inverted);
|
|
178
|
+
border-color: var(--ag-black);
|
|
179
|
+
color: var(--ag-text-primary-inverted);
|
|
180
|
+
}
|
|
181
|
+
.selection-card--monochrome .selection-card__indicator {
|
|
182
|
+
background: var(--ag-black);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* Focus state */
|
|
186
|
+
.selection-card:focus-within:not(.selection-card--disabled) {
|
|
187
|
+
outline: var(--ag-focus-width) solid var(--ag-focus-ring-color, rgba(var(--ag-focus), 0.5));
|
|
188
|
+
outline-offset: var(--ag-focus-offset);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* Disabled state */
|
|
192
|
+
.selection-card--disabled {
|
|
193
|
+
cursor: not-allowed;
|
|
194
|
+
opacity: 0.6;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* Hidden input */
|
|
198
|
+
.selection-card__input {
|
|
199
|
+
position: absolute;
|
|
200
|
+
width: 1px;
|
|
201
|
+
height: 1px;
|
|
202
|
+
padding: 0;
|
|
203
|
+
margin: -1px;
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
clip: rect(0, 0, 0, 0);
|
|
206
|
+
white-space: nowrap;
|
|
207
|
+
border: 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Indicator (badge in top-right corner) */
|
|
211
|
+
.selection-card__indicator {
|
|
212
|
+
position: absolute;
|
|
213
|
+
top: var(--ag-space-2);
|
|
214
|
+
right: var(--ag-space-2);
|
|
215
|
+
width: var(--_selection-card-indicator-size);
|
|
216
|
+
height: var(--_selection-card-indicator-size);
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
justify-content: center;
|
|
220
|
+
border-radius: var(--ag-radius-full);
|
|
221
|
+
opacity: 0;
|
|
222
|
+
transform: scale(0.8);
|
|
223
|
+
transition:
|
|
224
|
+
opacity var(--ag-motion-fast) ease-in-out,
|
|
225
|
+
transform var(--ag-motion-fast) ease-in-out;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.selection-card--checked .selection-card__indicator {
|
|
229
|
+
opacity: 1;
|
|
230
|
+
transform: scale(1);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* Radio indicator - filled circle */
|
|
234
|
+
.selection-card__radio-dot {
|
|
235
|
+
width: 40%;
|
|
236
|
+
height: 40%;
|
|
237
|
+
background: var(--ag-white);
|
|
238
|
+
border-radius: var(--ag-radius-full);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* Checkbox indicator - checkmark */
|
|
242
|
+
.selection-card__checkmark {
|
|
243
|
+
width: 60%;
|
|
244
|
+
height: 60%;
|
|
245
|
+
fill: none;
|
|
246
|
+
stroke: var(--ag-white);
|
|
247
|
+
stroke-width: 3;
|
|
248
|
+
stroke-linecap: round;
|
|
249
|
+
stroke-linejoin: round;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Content wrapper */
|
|
253
|
+
.selection-card__content {
|
|
254
|
+
display: block;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* Visually hidden label for screen readers */
|
|
258
|
+
.selection-card__label-sr {
|
|
259
|
+
position: absolute !important;
|
|
260
|
+
width: 1px !important;
|
|
261
|
+
height: 1px !important;
|
|
262
|
+
padding: 0 !important;
|
|
263
|
+
margin: -1px !important;
|
|
264
|
+
overflow: hidden !important;
|
|
265
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
266
|
+
white-space: nowrap !important;
|
|
267
|
+
border: 0 !important;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* Respect reduced motion preferences */
|
|
271
|
+
@media (prefers-reduced-motion: reduce) {
|
|
272
|
+
.selection-card,
|
|
273
|
+
.selection-card__indicator {
|
|
274
|
+
transition: none;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* High contrast mode support */
|
|
279
|
+
@media (forced-colors: active) {
|
|
280
|
+
.selection-card--checked {
|
|
281
|
+
outline: 2px solid CanvasText;
|
|
282
|
+
}
|
|
283
|
+
.selection-card__indicator {
|
|
284
|
+
background: CanvasText;
|
|
285
|
+
}
|
|
286
|
+
.selection-card__checkmark {
|
|
287
|
+
stroke: Canvas;
|
|
288
|
+
}
|
|
289
|
+
.selection-card__radio-dot {
|
|
290
|
+
background: Canvas;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
`;
|
|
294
|
+
let a = d;
|
|
295
|
+
o([
|
|
296
|
+
r({ type: String, reflect: !0 })
|
|
297
|
+
], a.prototype, "value");
|
|
298
|
+
o([
|
|
299
|
+
r({ type: String })
|
|
300
|
+
], a.prototype, "label");
|
|
301
|
+
o([
|
|
302
|
+
r({ type: Boolean, reflect: !0 })
|
|
303
|
+
], a.prototype, "checked");
|
|
304
|
+
o([
|
|
305
|
+
r({ type: Boolean, reflect: !0 })
|
|
306
|
+
], a.prototype, "disabled");
|
|
307
|
+
o([
|
|
308
|
+
r({ type: String, attribute: !1 })
|
|
309
|
+
], a.prototype, "_type");
|
|
310
|
+
o([
|
|
311
|
+
r({ type: String, attribute: !1 })
|
|
312
|
+
], a.prototype, "_name");
|
|
313
|
+
o([
|
|
314
|
+
r({ type: String, attribute: !1 })
|
|
315
|
+
], a.prototype, "_theme");
|
|
316
|
+
export {
|
|
317
|
+
a as AgSelectionCard
|
|
318
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AgSelectionCard, SelectionCardProps } from '../core/SelectionCard';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface ReactSelectionCardProps extends SelectionCardProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const ReactSelectionCard: import('@lit/react').ReactWebComponent<AgSelectionCard, {}>;
|
|
8
|
+
export type { SelectionCardProps } from '../core/SelectionCard';
|
|
9
|
+
//# sourceMappingURL=ReactSelectionCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactSelectionCard.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionCard/react/ReactSelectionCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEjF,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,6DAI7B,CAAC;AAEH,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { o as t } from "../../../create-component-BPMDMe-q.js";
|
|
3
|
+
import "../core/SelectionCard.js";
|
|
4
|
+
import { AgSelectionCard as o } from "../core/_SelectionCard.js";
|
|
5
|
+
const c = t({
|
|
6
|
+
tagName: "ag-selection-card",
|
|
7
|
+
elementClass: o,
|
|
8
|
+
react: e
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
c as ReactSelectionCard
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionCard/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAGxF,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
export interface VueSelectionCardProps {
|
|
3
|
+
/** Unique value for this card (required) */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Accessible label for this card (required) */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Whether this card is selected */
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
/** Whether this card is disabled */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function __VLS_template(): {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VueSelectionCardProps>, {
|
|
16
|
+
value: string;
|
|
17
|
+
label: string;
|
|
18
|
+
checked: boolean;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VueSelectionCardProps>, {
|
|
21
|
+
value: string;
|
|
22
|
+
label: string;
|
|
23
|
+
checked: boolean;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
}>>> & Readonly<{}>, {
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
label: string;
|
|
28
|
+
checked: boolean;
|
|
29
|
+
value: string;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
31
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
34
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
35
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
36
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
37
|
+
} : {
|
|
38
|
+
type: import('vue').PropType<T[K]>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
type __VLS_WithDefaults<P, D> = {
|
|
43
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
44
|
+
default: D[K];
|
|
45
|
+
}> : P[K];
|
|
46
|
+
};
|
|
47
|
+
type __VLS_Prettify<T> = {
|
|
48
|
+
[K in keyof T]: T[K];
|
|
49
|
+
} & {};
|
|
50
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=VueSelectionCard.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VueSelectionCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionCard/vue/VueSelectionCard.vue"],"names":[],"mappings":"AAWA;AAEA,OAAO,uBAAuB,CAAC;AAE/B,MAAM,WAAW,qBAAqB;IACpC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAoBD,iBAAS,cAAc;qBAyCM,GAAG;EAK/B;AAQD,QAAA,MAAM,eAAe;;;;;;;;;;;cA3ER,OAAO;WAJX,MAAM;aAEH,OAAO;WAJV,MAAM;4EAuFb,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionCard/vue/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,IAAI,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE1F,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AgSelectionCardGroup } from './_SelectionCardGroup.js';
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
interface HTMLElementTagNameMap {
|
|
5
|
+
'ag-selection-card-group': AgSelectionCardGroup;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export * from './_SelectionCardGroup.js';
|
|
9
|
+
//# sourceMappingURL=SelectionCardGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectionCardGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionCardGroup/core/SelectionCardGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAMhE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,yBAAyB,EAAE,oBAAoB,CAAC;KACjD;CACF;AAED,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { ValidationMessages } from '../../../shared/face-mixin';
|
|
3
|
+
|
|
4
|
+
export type SelectionType = 'radio' | 'checkbox';
|
|
5
|
+
export type SelectionCardGroupTheme = 'success' | 'info' | 'error' | 'warning' | 'monochrome' | '';
|
|
6
|
+
export interface SelectionChangeEventDetail {
|
|
7
|
+
/** The value of the card that triggered the change */
|
|
8
|
+
value: string;
|
|
9
|
+
/** Whether the card is now selected */
|
|
10
|
+
checked: boolean;
|
|
11
|
+
/** All currently selected values */
|
|
12
|
+
selectedValues: string[];
|
|
13
|
+
}
|
|
14
|
+
export type SelectionChangeEvent = CustomEvent<SelectionChangeEventDetail>;
|
|
15
|
+
export interface SelectionCardGroupProps {
|
|
16
|
+
/** Selection mode: 'radio' (single) or 'checkbox' (multiple) */
|
|
17
|
+
type: SelectionType;
|
|
18
|
+
/** Name attribute for the input elements */
|
|
19
|
+
name: string;
|
|
20
|
+
/** Legend text for the fieldset (accessibility) */
|
|
21
|
+
legend?: string;
|
|
22
|
+
/** Visually hide the legend while keeping it accessible */
|
|
23
|
+
legendHidden?: boolean;
|
|
24
|
+
/** Theme variant for cards */
|
|
25
|
+
theme?: SelectionCardGroupTheme;
|
|
26
|
+
/** Controlled value for radio mode */
|
|
27
|
+
value?: string;
|
|
28
|
+
/** Controlled values for checkbox mode */
|
|
29
|
+
values?: string[];
|
|
30
|
+
/** Disable all cards in the group */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** Require at least one selection before the form can be submitted */
|
|
33
|
+
required?: boolean;
|
|
34
|
+
validationMessages?: ValidationMessages;
|
|
35
|
+
/** Callback for selection changes */
|
|
36
|
+
onSelectionChange?: (event: SelectionChangeEvent) => void;
|
|
37
|
+
}
|
|
38
|
+
declare const AgSelectionCardGroup_base: (new (...args: any[]) => import('../../../shared/face-mixin').FaceMixinInterface) & typeof LitElement;
|
|
39
|
+
export declare class AgSelectionCardGroup extends AgSelectionCardGroup_base implements SelectionCardGroupProps {
|
|
40
|
+
static styles: import('lit').CSSResult;
|
|
41
|
+
type: SelectionType;
|
|
42
|
+
legend: string;
|
|
43
|
+
legendHidden: boolean;
|
|
44
|
+
theme: SelectionCardGroupTheme;
|
|
45
|
+
value: string;
|
|
46
|
+
values: string[];
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
required: boolean;
|
|
49
|
+
validationMessages: ValidationMessages | undefined;
|
|
50
|
+
onSelectionChange: ((event: SelectionChangeEvent) => void) | undefined;
|
|
51
|
+
_internalSelectedValues: string[];
|
|
52
|
+
constructor();
|
|
53
|
+
private _getSelectedValues;
|
|
54
|
+
private _syncFormValue;
|
|
55
|
+
private _syncValidity;
|
|
56
|
+
formResetCallback(): void;
|
|
57
|
+
connectedCallback(): void;
|
|
58
|
+
disconnectedCallback(): void;
|
|
59
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
60
|
+
firstUpdated(): void;
|
|
61
|
+
private _getCards;
|
|
62
|
+
private _syncChildCards;
|
|
63
|
+
private _handleCardChange;
|
|
64
|
+
private _handleKeyDown;
|
|
65
|
+
private _handleSlotChange;
|
|
66
|
+
render(): import('lit').TemplateResult<1>;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=_SelectionCardGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_SelectionCardGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionCardGroup/core/_SelectionCardGroup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhF,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,CAAC;AACjD,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,GAAG,EAAE,CAAC;AAEnG,MAAM,WAAW,0BAA0B;IACzC,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,0BAA0B,CAAC,CAAC;AAE3E,MAAM,WAAW,uBAAuB;IACtC,gEAAgE;IAChE,IAAI,EAAE,aAAa,CAAC;IACpB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,uBAAuB,CAAC;IAChC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,qCAAqC;IACrC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC3D;;AAED,qBAAa,oBAAqB,SAAQ,yBAAsB,YAAW,uBAAuB;IAChG,OAAgB,MAAM,0BAqCpB;IAGM,IAAI,EAAE,aAAa,CAAC;IAGpB,MAAM,EAAE,MAAM,CAAC;IAGf,YAAY,EAAE,OAAO,CAAC;IAGtB,KAAK,EAAE,uBAAuB,CAAC;IAG/B,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,EAAE,MAAM,EAAE,CAAC;IAGjB,QAAQ,EAAE,OAAO,CAAC;IAGlB,QAAQ,EAAE,OAAO,CAAC;IAGlB,kBAAkB,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAGnD,iBAAiB,EAAE,CAAC,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAIvE,uBAAuB,EAAE,MAAM,EAAE,CAAC;;IAiB1C,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,aAAa;IAYZ,iBAAiB,IAAI,IAAI;IASzB,iBAAiB;IAMjB,oBAAoB;IAMpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IA6B/C,YAAY;IAMrB,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,eAAe;IAevB,OAAO,CAAC,iBAAiB,CAgDvB;IAEF,OAAO,CAAC,cAAc,CAgDpB;IAEF,OAAO,CAAC,iBAAiB;IAIhB,MAAM;CAsBhB"}
|