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,87 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { ValidationMessages } from '../../../shared/face-mixin';
|
|
3
|
+
import { SelectionButtonTheme, SelectionButtonSize, SelectionButtonShape } from '../../SelectionButton/core/_SelectionButton.js';
|
|
4
|
+
|
|
5
|
+
export type SelectionButtonType = 'radio' | 'checkbox';
|
|
6
|
+
export type SelectionButtonGroupTheme = SelectionButtonTheme;
|
|
7
|
+
export type SelectionButtonGroupSize = SelectionButtonSize;
|
|
8
|
+
export type SelectionButtonGroupShape = SelectionButtonShape;
|
|
9
|
+
export interface SelectionButtonChangeEventDetail {
|
|
10
|
+
/** The value of the button that triggered the change */
|
|
11
|
+
value: string;
|
|
12
|
+
/** Whether the button is now selected */
|
|
13
|
+
checked: boolean;
|
|
14
|
+
/** All currently selected values */
|
|
15
|
+
selectedValues: string[];
|
|
16
|
+
}
|
|
17
|
+
export type SelectionButtonChangeEvent = CustomEvent<SelectionButtonChangeEventDetail>;
|
|
18
|
+
export interface SelectionButtonGroupProps {
|
|
19
|
+
/** Selection mode: 'radio' (single) or 'checkbox' (multiple) */
|
|
20
|
+
type: SelectionButtonType;
|
|
21
|
+
/** Name attribute for the input elements */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Legend text for the fieldset (accessibility) */
|
|
24
|
+
legend?: string;
|
|
25
|
+
/** Visually hide the legend while keeping it accessible */
|
|
26
|
+
legendHidden?: boolean;
|
|
27
|
+
/** Theme variant for buttons */
|
|
28
|
+
theme?: SelectionButtonGroupTheme;
|
|
29
|
+
/** Size variant for buttons */
|
|
30
|
+
size?: SelectionButtonGroupSize;
|
|
31
|
+
/** Shape variant for buttons */
|
|
32
|
+
shape?: SelectionButtonGroupShape;
|
|
33
|
+
/** Controlled value for radio mode */
|
|
34
|
+
value?: string;
|
|
35
|
+
/** Controlled values for checkbox mode */
|
|
36
|
+
values?: string[];
|
|
37
|
+
/** Disable all buttons in the group */
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/** Require at least one selection before the form can be submitted */
|
|
40
|
+
required?: boolean;
|
|
41
|
+
validationMessages?: ValidationMessages;
|
|
42
|
+
/** Callback for selection changes */
|
|
43
|
+
onSelectionChange?: (event: SelectionButtonChangeEvent) => void;
|
|
44
|
+
}
|
|
45
|
+
declare const AgSelectionButtonGroup_base: (new (...args: any[]) => import('../../../shared/face-mixin').FaceMixinInterface) & typeof LitElement;
|
|
46
|
+
export declare class AgSelectionButtonGroup extends AgSelectionButtonGroup_base implements SelectionButtonGroupProps {
|
|
47
|
+
static styles: import('lit').CSSResult;
|
|
48
|
+
type: SelectionButtonType;
|
|
49
|
+
legend: string;
|
|
50
|
+
legendHidden: boolean;
|
|
51
|
+
theme: SelectionButtonGroupTheme;
|
|
52
|
+
size: SelectionButtonGroupSize;
|
|
53
|
+
shape: SelectionButtonGroupShape;
|
|
54
|
+
value: string;
|
|
55
|
+
values: string[];
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
required: boolean;
|
|
58
|
+
validationMessages: ValidationMessages | undefined;
|
|
59
|
+
onSelectionChange: ((event: SelectionButtonChangeEvent) => void) | undefined;
|
|
60
|
+
_internalSelectedValues: string[];
|
|
61
|
+
constructor();
|
|
62
|
+
private _getSelectedValues;
|
|
63
|
+
/**
|
|
64
|
+
* Sync the form value to ElementInternals.
|
|
65
|
+
* Radio: submits the selected value as a string, or null if nothing selected.
|
|
66
|
+
* Checkbox: submits all selected values via FormData overload.
|
|
67
|
+
*/
|
|
68
|
+
private _syncFormValue;
|
|
69
|
+
private _syncValidity;
|
|
70
|
+
/**
|
|
71
|
+
* FACE lifecycle: called when the parent form is reset.
|
|
72
|
+
* Clears all selections and re-syncs child buttons.
|
|
73
|
+
*/
|
|
74
|
+
formResetCallback(): void;
|
|
75
|
+
connectedCallback(): void;
|
|
76
|
+
disconnectedCallback(): void;
|
|
77
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
78
|
+
firstUpdated(): void;
|
|
79
|
+
private _getButtons;
|
|
80
|
+
private _syncChildButtons;
|
|
81
|
+
private _handleButtonChange;
|
|
82
|
+
private _handleKeyDown;
|
|
83
|
+
private _handleSlotChange;
|
|
84
|
+
render(): import('lit').TemplateResult<1>;
|
|
85
|
+
}
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=_SelectionButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_SelectionButtonGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionButtonGroup/core/_SelectionButtonGroup.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { LitElement as p, css as g, nothing as y, html as c } from "lit";
|
|
2
|
+
import { n as r } from "../../../property-CemaeiRl.js";
|
|
3
|
+
import { r as f } from "../../../state-CovhUvdr.js";
|
|
4
|
+
import { FaceMixin as _ } from "../../../shared/face-mixin.js";
|
|
5
|
+
var m = Object.defineProperty, o = (d, e, t, s) => {
|
|
6
|
+
for (var i = void 0, a = d.length - 1, n; a >= 0; a--)
|
|
7
|
+
(n = d[a]) && (i = n(e, t, i) || i);
|
|
8
|
+
return i && m(e, t, i), i;
|
|
9
|
+
};
|
|
10
|
+
const h = class h extends _(p) {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(), this._handleButtonChange = (e) => {
|
|
13
|
+
e.stopPropagation();
|
|
14
|
+
const { value: t, checked: s } = e.detail;
|
|
15
|
+
let i;
|
|
16
|
+
if (this.type === "radio")
|
|
17
|
+
i = s ? [t] : [];
|
|
18
|
+
else {
|
|
19
|
+
const n = [...this._getSelectedValues()];
|
|
20
|
+
if (s)
|
|
21
|
+
n.includes(t) || n.push(t);
|
|
22
|
+
else {
|
|
23
|
+
const u = n.indexOf(t);
|
|
24
|
+
u > -1 && n.splice(u, 1);
|
|
25
|
+
}
|
|
26
|
+
i = n;
|
|
27
|
+
}
|
|
28
|
+
this._internalSelectedValues = i, this._syncFormValue(), this._syncValidity();
|
|
29
|
+
const a = new CustomEvent("selection-change", {
|
|
30
|
+
detail: {
|
|
31
|
+
value: t,
|
|
32
|
+
checked: s,
|
|
33
|
+
selectedValues: i
|
|
34
|
+
},
|
|
35
|
+
bubbles: !0,
|
|
36
|
+
composed: !0
|
|
37
|
+
});
|
|
38
|
+
this.dispatchEvent(a), this.onSelectionChange && this.onSelectionChange(a);
|
|
39
|
+
}, this._handleKeyDown = (e) => {
|
|
40
|
+
const t = this._getButtons().filter((n) => !n.disabled);
|
|
41
|
+
if (t.length === 0) return;
|
|
42
|
+
const s = t.find((n) => {
|
|
43
|
+
try {
|
|
44
|
+
return n.shadowRoot?.activeElement || n === document.activeElement;
|
|
45
|
+
} catch {
|
|
46
|
+
return n === document.activeElement;
|
|
47
|
+
}
|
|
48
|
+
}), i = s ? t.indexOf(s) : -1;
|
|
49
|
+
let a = null;
|
|
50
|
+
switch (e.key) {
|
|
51
|
+
case "ArrowDown":
|
|
52
|
+
case "ArrowRight":
|
|
53
|
+
e.preventDefault(), a = i === -1 ? 0 : (i + 1) % t.length;
|
|
54
|
+
break;
|
|
55
|
+
case "ArrowUp":
|
|
56
|
+
case "ArrowLeft":
|
|
57
|
+
e.preventDefault(), a = i === -1 ? t.length - 1 : (i - 1 + t.length) % t.length;
|
|
58
|
+
break;
|
|
59
|
+
case "Home":
|
|
60
|
+
e.preventDefault(), a = 0;
|
|
61
|
+
break;
|
|
62
|
+
case "End":
|
|
63
|
+
e.preventDefault(), a = t.length - 1;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
if (a !== null) {
|
|
67
|
+
const n = t[a];
|
|
68
|
+
n.focus(), this.type === "radio" && this._handleButtonChange(new CustomEvent("selection-button-change", {
|
|
69
|
+
detail: { value: n.value, checked: !0 }
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
}, this.type = "radio", this.legend = "", this.legendHidden = !1, this.theme = "", this.size = "md", this.shape = "", this.value = "", this.values = [], this.disabled = !1, this.required = !1, this._internalSelectedValues = [], this.validationMessages = void 0;
|
|
73
|
+
}
|
|
74
|
+
// Get current selected values (controlled or uncontrolled)
|
|
75
|
+
_getSelectedValues() {
|
|
76
|
+
return this.type === "radio" ? this.value ? [this.value] : this._internalSelectedValues : this.values && this.values.length > 0 ? this.values : this._internalSelectedValues;
|
|
77
|
+
}
|
|
78
|
+
// ─── FACE ─────────────────────────────────────────────────────────────────
|
|
79
|
+
/**
|
|
80
|
+
* Sync the form value to ElementInternals.
|
|
81
|
+
* Radio: submits the selected value as a string, or null if nothing selected.
|
|
82
|
+
* Checkbox: submits all selected values via FormData overload.
|
|
83
|
+
*/
|
|
84
|
+
_syncFormValue() {
|
|
85
|
+
const e = this._getSelectedValues();
|
|
86
|
+
if (this.type === "radio")
|
|
87
|
+
this._internals.setFormValue(e.length > 0 ? e[0] : null);
|
|
88
|
+
else if (e.length === 0)
|
|
89
|
+
this._internals.setFormValue(null);
|
|
90
|
+
else {
|
|
91
|
+
const t = new FormData();
|
|
92
|
+
e.forEach((s) => t.append(this.name, s)), this._internals.setFormValue(t);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
_syncValidity() {
|
|
96
|
+
const e = this._getSelectedValues();
|
|
97
|
+
this.required && e.length === 0 ? this._internals.setValidity(
|
|
98
|
+
{ valueMissing: !0 },
|
|
99
|
+
this.validationMessages?.valueMissing ?? "Please select an option."
|
|
100
|
+
) : this._internals.setValidity({});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* FACE lifecycle: called when the parent form is reset.
|
|
104
|
+
* Clears all selections and re-syncs child buttons.
|
|
105
|
+
*/
|
|
106
|
+
formResetCallback() {
|
|
107
|
+
this._internalSelectedValues = [], this._internals.setFormValue(null), this._syncValidity(), this._syncChildButtons();
|
|
108
|
+
}
|
|
109
|
+
// ─── End FACE ─────────────────────────────────────────────────────────────
|
|
110
|
+
connectedCallback() {
|
|
111
|
+
super.connectedCallback(), this.addEventListener("selection-button-change", this._handleButtonChange), this.addEventListener("keydown", this._handleKeyDown);
|
|
112
|
+
}
|
|
113
|
+
disconnectedCallback() {
|
|
114
|
+
super.disconnectedCallback(), this.removeEventListener("selection-button-change", this._handleButtonChange), this.removeEventListener("keydown", this._handleKeyDown);
|
|
115
|
+
}
|
|
116
|
+
updated(e) {
|
|
117
|
+
super.updated(e), (e.has("type") || e.has("name") || e.has("theme") || e.has("size") || e.has("shape") || e.has("disabled") || e.has("value") || e.has("values") || e.has("_internalSelectedValues")) && this._syncChildButtons(), e.has("value") || e.has("values") || e.has("_internalSelectedValues") ? (this._syncFormValue(), this._syncValidity()) : e.has("required") && this._syncValidity();
|
|
118
|
+
}
|
|
119
|
+
firstUpdated() {
|
|
120
|
+
this._syncChildButtons(), this._syncFormValue(), this._syncValidity();
|
|
121
|
+
}
|
|
122
|
+
_getButtons() {
|
|
123
|
+
const e = this.shadowRoot?.querySelector("slot");
|
|
124
|
+
return e ? e.assignedElements({ flatten: !0 }).filter((t) => t.tagName.toLowerCase() === "ag-selection-button") : [];
|
|
125
|
+
}
|
|
126
|
+
_syncChildButtons() {
|
|
127
|
+
const e = this._getButtons(), t = this._getSelectedValues();
|
|
128
|
+
e.forEach((s) => {
|
|
129
|
+
s._type = this.type, s._name = this.name, s._theme = this.theme, s._size = this.size, s._shape = this.shape, s.checked = t.includes(s.value), this.disabled && (s.disabled = !0);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
_handleSlotChange() {
|
|
133
|
+
this._syncChildButtons();
|
|
134
|
+
}
|
|
135
|
+
render() {
|
|
136
|
+
const e = [
|
|
137
|
+
"selection-button-group__legend",
|
|
138
|
+
this.legendHidden ? "selection-button-group__legend--hidden" : ""
|
|
139
|
+
].filter(Boolean).join(" ");
|
|
140
|
+
return c`
|
|
141
|
+
<fieldset
|
|
142
|
+
class="selection-button-group"
|
|
143
|
+
part="ag-selection-button-group-fieldset"
|
|
144
|
+
role="${this.type === "radio" ? "radiogroup" : "group"}"
|
|
145
|
+
aria-disabled="${this.disabled ? "true" : "false"}"
|
|
146
|
+
>
|
|
147
|
+
${this.legend ? c`<legend class="${e}" part="ag-selection-button-group-legend">${this.legend}</legend>` : y}
|
|
148
|
+
<div class="selection-button-group__content" part="ag-selection-button-group-content">
|
|
149
|
+
<slot @slotchange="${this._handleSlotChange}"></slot>
|
|
150
|
+
</div>
|
|
151
|
+
</fieldset>
|
|
152
|
+
`;
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
h.styles = g`
|
|
156
|
+
:host {
|
|
157
|
+
display: block;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.selection-button-group {
|
|
161
|
+
border: 0;
|
|
162
|
+
padding: 0;
|
|
163
|
+
margin: 0;
|
|
164
|
+
min-inline-size: auto;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.selection-button-group__legend {
|
|
168
|
+
font-weight: 600;
|
|
169
|
+
font-size: var(--ag-font-size-base);
|
|
170
|
+
color: var(--ag-text-primary);
|
|
171
|
+
padding: 0;
|
|
172
|
+
margin-block-end: var(--ag-space-4);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.selection-button-group__legend--hidden {
|
|
176
|
+
position: absolute !important;
|
|
177
|
+
width: 1px !important;
|
|
178
|
+
height: 1px !important;
|
|
179
|
+
padding: 0 !important;
|
|
180
|
+
margin: -1px !important;
|
|
181
|
+
overflow: hidden !important;
|
|
182
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
183
|
+
white-space: nowrap !important;
|
|
184
|
+
border: 0 !important;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.selection-button-group__content {
|
|
188
|
+
display: flex;
|
|
189
|
+
flex-wrap: wrap;
|
|
190
|
+
gap: var(--ag-selection-button-group-gap, var(--ag-space-2));
|
|
191
|
+
}
|
|
192
|
+
`;
|
|
193
|
+
let l = h;
|
|
194
|
+
o([
|
|
195
|
+
r({ type: String, reflect: !0 })
|
|
196
|
+
], l.prototype, "type");
|
|
197
|
+
o([
|
|
198
|
+
r({ type: String })
|
|
199
|
+
], l.prototype, "legend");
|
|
200
|
+
o([
|
|
201
|
+
r({ type: Boolean, attribute: "legend-hidden" })
|
|
202
|
+
], l.prototype, "legendHidden");
|
|
203
|
+
o([
|
|
204
|
+
r({ type: String, reflect: !0 })
|
|
205
|
+
], l.prototype, "theme");
|
|
206
|
+
o([
|
|
207
|
+
r({ type: String, reflect: !0 })
|
|
208
|
+
], l.prototype, "size");
|
|
209
|
+
o([
|
|
210
|
+
r({ type: String, reflect: !0 })
|
|
211
|
+
], l.prototype, "shape");
|
|
212
|
+
o([
|
|
213
|
+
r({ type: String })
|
|
214
|
+
], l.prototype, "value");
|
|
215
|
+
o([
|
|
216
|
+
r({ type: Array })
|
|
217
|
+
], l.prototype, "values");
|
|
218
|
+
o([
|
|
219
|
+
r({ type: Boolean, reflect: !0 })
|
|
220
|
+
], l.prototype, "disabled");
|
|
221
|
+
o([
|
|
222
|
+
r({ type: Boolean, reflect: !0 })
|
|
223
|
+
], l.prototype, "required");
|
|
224
|
+
o([
|
|
225
|
+
r({ attribute: !1 })
|
|
226
|
+
], l.prototype, "validationMessages");
|
|
227
|
+
o([
|
|
228
|
+
r({ attribute: !1 })
|
|
229
|
+
], l.prototype, "onSelectionChange");
|
|
230
|
+
o([
|
|
231
|
+
f()
|
|
232
|
+
], l.prototype, "_internalSelectedValues");
|
|
233
|
+
export {
|
|
234
|
+
l as AgSelectionButtonGroup
|
|
235
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventName } from '@lit/react';
|
|
2
|
+
import { AgSelectionButtonGroup, SelectionButtonGroupProps, SelectionButtonChangeEvent } from '../core/SelectionButtonGroup';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export interface ReactSelectionButtonGroupProps extends SelectionButtonGroupProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
onSelectionChange?: (event: SelectionButtonChangeEvent) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ReactSelectionButtonGroup: import('@lit/react').ReactWebComponent<AgSelectionButtonGroup, {
|
|
10
|
+
onSelectionChange: EventName<SelectionButtonChangeEvent>;
|
|
11
|
+
}>;
|
|
12
|
+
export type { SelectionButtonGroupProps, SelectionButtonChangeEvent, SelectionButtonChangeEventDetail, SelectionButtonType, } from '../core/SelectionButtonGroup';
|
|
13
|
+
//# sourceMappingURL=ReactSelectionButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactSelectionButtonGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionButtonGroup/react/ReactSelectionButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EACL,sBAAsB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAChC,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,8BAA+B,SAAQ,yBAAyB;IAC/E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,yBAAyB;uBAKO,SAAS,CAAC,0BAA0B,CAAC;EAEhF,CAAC;AAEH,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,gCAAgC,EAChC,mBAAmB,GACpB,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
import { o as e } from "../../../create-component-BPMDMe-q.js";
|
|
3
|
+
import "../core/SelectionButtonGroup.js";
|
|
4
|
+
import { AgSelectionButtonGroup as o } from "../core/_SelectionButtonGroup.js";
|
|
5
|
+
const c = e({
|
|
6
|
+
tagName: "ag-selection-button-group",
|
|
7
|
+
elementClass: o,
|
|
8
|
+
react: t,
|
|
9
|
+
events: {
|
|
10
|
+
onSelectionChange: "selection-change"
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
c as ReactSelectionButtonGroup
|
|
15
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ReactSelectionButtonGroup, type ReactSelectionButtonGroupProps } from './ReactSelectionButtonGroup';
|
|
2
|
+
export type { SelectionButtonGroupProps, SelectionButtonChangeEvent, SelectionButtonChangeEventDetail, SelectionButtonType, } from '../core/SelectionButtonGroup';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionButtonGroup/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,KAAK,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAG7G,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,gCAAgC,EAChC,mBAAmB,GACpB,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { SelectionButtonType, SelectionButtonChangeEventDetail, SelectionButtonGroupTheme, SelectionButtonGroupSize, SelectionButtonGroupShape } from '../core/SelectionButtonGroup';
|
|
2
|
+
import { ValidationMessages } from '../../../shared/face-mixin';
|
|
3
|
+
|
|
4
|
+
export interface VueSelectionButtonGroupProps {
|
|
5
|
+
/** Selection mode: 'radio' (single) or 'checkbox' (multiple) */
|
|
6
|
+
type?: SelectionButtonType;
|
|
7
|
+
/** Name attribute for the input elements */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Legend text for the fieldset (accessibility) */
|
|
10
|
+
legend?: string;
|
|
11
|
+
/** Visually hide the legend while keeping it accessible */
|
|
12
|
+
legendHidden?: boolean;
|
|
13
|
+
/** Theme variant for buttons */
|
|
14
|
+
theme?: SelectionButtonGroupTheme;
|
|
15
|
+
/** Size variant for buttons */
|
|
16
|
+
size?: SelectionButtonGroupSize;
|
|
17
|
+
/** Shape variant for buttons */
|
|
18
|
+
shape?: SelectionButtonGroupShape;
|
|
19
|
+
/** Controlled value for radio mode */
|
|
20
|
+
value?: string;
|
|
21
|
+
/** Controlled values for checkbox mode */
|
|
22
|
+
values?: string[];
|
|
23
|
+
/** Disable all buttons in the group */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** Require at least one selection before the form can be submitted */
|
|
26
|
+
required?: boolean;
|
|
27
|
+
validationMessages?: ValidationMessages;
|
|
28
|
+
}
|
|
29
|
+
declare function __VLS_template(): {
|
|
30
|
+
default?(_: {}): any;
|
|
31
|
+
};
|
|
32
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VueSelectionButtonGroupProps>, {
|
|
33
|
+
type: string;
|
|
34
|
+
name: string;
|
|
35
|
+
legend: string;
|
|
36
|
+
legendHidden: boolean;
|
|
37
|
+
theme: string;
|
|
38
|
+
size: string;
|
|
39
|
+
shape: string;
|
|
40
|
+
value: string;
|
|
41
|
+
values: () => never[];
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
required: boolean;
|
|
44
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
45
|
+
"update:value": (value: string) => void;
|
|
46
|
+
"selection-change": (detail: SelectionButtonChangeEventDetail) => void;
|
|
47
|
+
"update:values": (values: string[]) => void;
|
|
48
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VueSelectionButtonGroupProps>, {
|
|
49
|
+
type: string;
|
|
50
|
+
name: string;
|
|
51
|
+
legend: string;
|
|
52
|
+
legendHidden: boolean;
|
|
53
|
+
theme: string;
|
|
54
|
+
size: string;
|
|
55
|
+
shape: string;
|
|
56
|
+
value: string;
|
|
57
|
+
values: () => never[];
|
|
58
|
+
disabled: boolean;
|
|
59
|
+
required: boolean;
|
|
60
|
+
}>>> & Readonly<{
|
|
61
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
62
|
+
"onSelection-change"?: ((detail: SelectionButtonChangeEventDetail) => any) | undefined;
|
|
63
|
+
"onUpdate:values"?: ((values: string[]) => any) | undefined;
|
|
64
|
+
}>, {
|
|
65
|
+
values: string[];
|
|
66
|
+
disabled: boolean;
|
|
67
|
+
name: string;
|
|
68
|
+
type: SelectionButtonType;
|
|
69
|
+
legend: string;
|
|
70
|
+
size: SelectionButtonGroupSize;
|
|
71
|
+
required: boolean;
|
|
72
|
+
value: string;
|
|
73
|
+
shape: SelectionButtonGroupShape;
|
|
74
|
+
legendHidden: boolean;
|
|
75
|
+
theme: SelectionButtonGroupTheme;
|
|
76
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
77
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
78
|
+
export default _default;
|
|
79
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
80
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
81
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
82
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
83
|
+
} : {
|
|
84
|
+
type: import('vue').PropType<T[K]>;
|
|
85
|
+
required: true;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
type __VLS_WithDefaults<P, D> = {
|
|
89
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
90
|
+
default: D[K];
|
|
91
|
+
}> : P[K];
|
|
92
|
+
};
|
|
93
|
+
type __VLS_Prettify<T> = {
|
|
94
|
+
[K in keyof T]: T[K];
|
|
95
|
+
} & {};
|
|
96
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
97
|
+
new (): {
|
|
98
|
+
$slots: S;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=VueSelectionButtonGroup.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VueSelectionButtonGroup.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.vue"],"names":[],"mappings":"AAoBA;AAEA,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,mBAAmB,EACnB,gCAAgC,EAChC,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,MAAM,WAAW,4BAA4B;IAC3C,gEAAgE;IAChE,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gCAAgC;IAChC,KAAK,CAAC,EAAE,yBAAyB,CAAC;IAClC,+BAA+B;IAC/B,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC,gCAAgC;IAChC,KAAK,CAAC,EAAE,yBAAyB,CAAC;IAClC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAmDD,iBAAS,cAAc;qBA2CM,GAAG;EAK/B;AAUD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAnHV,MAAM,EAAE;cAEN,OAAO;UAhBZ,MAAM;UAFL,mBAAmB;YAIjB,MAAM;UAMR,wBAAwB;cAUpB,OAAO;WANV,MAAM;WAFN,yBAAyB;kBANlB,OAAO;WAEd,yBAAyB;4EAkIjC,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,6 @@
|
|
|
1
|
+
import { default as VueSelectionButtonGroup } from './VueSelectionButtonGroup.vue';
|
|
2
|
+
import { SelectionButtonGroupProps as VueSelectionButtonGroupProps } from '../core/_SelectionButtonGroup';
|
|
3
|
+
|
|
4
|
+
export { VueSelectionButtonGroup };
|
|
5
|
+
export type { VueSelectionButtonGroupProps };
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionButtonGroup/vue/index.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,yBAAyB,IAAI,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAE/G,OAAO,EAAE,uBAAuB,EAAE,CAAC;AACnC,YAAY,EAAE,4BAA4B,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectionCard.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionCard/core/SelectionCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAMtD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF;AAED,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
|
|
3
|
+
export type SelectionCardTheme = 'success' | 'info' | 'error' | 'warning' | 'monochrome' | '';
|
|
4
|
+
export interface SelectionCardProps {
|
|
5
|
+
/** Unique value for this card (required) */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Accessible label for this card (required) */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Whether this card is selected */
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
/** Whether this card is disabled */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface SelectionCardInternalProps {
|
|
15
|
+
/** Input type (set by parent group) */
|
|
16
|
+
_type?: 'radio' | 'checkbox';
|
|
17
|
+
/** Input name (set by parent group) */
|
|
18
|
+
_name?: string;
|
|
19
|
+
/** Theme (set by parent group) */
|
|
20
|
+
_theme?: SelectionCardTheme;
|
|
21
|
+
}
|
|
22
|
+
export declare class AgSelectionCard extends LitElement implements SelectionCardProps, SelectionCardInternalProps {
|
|
23
|
+
static styles: import('lit').CSSResult;
|
|
24
|
+
value: string;
|
|
25
|
+
label: string;
|
|
26
|
+
checked: boolean;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
_type: 'radio' | 'checkbox';
|
|
29
|
+
_name: string;
|
|
30
|
+
_theme: SelectionCardTheme;
|
|
31
|
+
constructor();
|
|
32
|
+
focus(): void;
|
|
33
|
+
private _handleClick;
|
|
34
|
+
private _handleKeyDown;
|
|
35
|
+
private _renderIndicator;
|
|
36
|
+
render(): import('lit').TemplateResult<1>;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=_SelectionCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_SelectionCard.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionCard/core/_SelectionCard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAGrD,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,GAAG,EAAE,CAAC;AAE9F,MAAM,WAAW,kBAAkB;IACjC,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;AAGD,UAAU,0BAA0B;IAClC,uCAAuC;IACvC,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAC7B,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED,qBAAa,eAAgB,SAAQ,UAAW,YAAW,kBAAkB,EAAE,0BAA0B;IACvG,OAAgB,MAAM,0BA0NpB;IAGM,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,MAAM,CAAC;IAGd,OAAO,EAAE,OAAO,CAAC;IAGjB,QAAQ,EAAE,OAAO,CAAC;IAIlB,KAAK,EAAE,OAAO,GAAG,UAAU,CAAC;IAG5B,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,EAAE,kBAAkB,CAAC;;IAa1B,KAAK;IAKd,OAAO,CAAC,YAAY;IAsBpB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,gBAAgB;IAaf,MAAM;CAuChB"}
|