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,48 @@
|
|
|
1
|
+
<div class="dialog"
|
|
2
|
+
id="dialog-example"
|
|
3
|
+
aria-hidden="true"
|
|
4
|
+
aria-labelledby="dialog-example-title"
|
|
5
|
+
aria-describedby="dialog-example-description">
|
|
6
|
+
<div class="dialog-overlay"
|
|
7
|
+
data-a11y-dialog-hide></div>
|
|
8
|
+
<div class="dialog-content"
|
|
9
|
+
role="document">
|
|
10
|
+
<div class="mbs16 mbe24 mis16 mie16">
|
|
11
|
+
<button data-a11y-dialog-hide
|
|
12
|
+
class="close-button close-button-large dialog-close"
|
|
13
|
+
aria-label="Close this dialog window">
|
|
14
|
+
<svg class="close"
|
|
15
|
+
viewBox="0 0 24 24"
|
|
16
|
+
aria-hidden="true">
|
|
17
|
+
<path fill="currentColor"
|
|
18
|
+
d="M.439 21.44a1.5 1.5 0 0 0 2.122 2.121l9.262-9.261a.25.25 0 0 1 .354 0l9.262 9.263a1.5 1.5 0 1 0 2.122-2.121L14.3 12.177a.25.25 0 0 1 0-.354l9.263-9.262A1.5 1.5 0 0 0 21.439.44L12.177 9.7a.25.25 0 0 1-.354 0L2.561.44A1.5 1.5 0 0 0 .439 2.561L9.7 11.823a.25.25 0 0 1 0 .354Z" />
|
|
19
|
+
</svg>
|
|
20
|
+
</button>
|
|
21
|
+
|
|
22
|
+
<h1 id="dialog-example-title">Subscribe to our newsletter</h1>
|
|
23
|
+
<p id="dialog-example-description">
|
|
24
|
+
Fill in the form below to receive our newsletter!
|
|
25
|
+
</p>
|
|
26
|
+
<form class="dialog-form-demo">
|
|
27
|
+
<label class="label"
|
|
28
|
+
for="email">Email (required)</label>
|
|
29
|
+
<input class="input input-rounded"
|
|
30
|
+
type="email"
|
|
31
|
+
name="EMAIL"
|
|
32
|
+
id="email"
|
|
33
|
+
placeholder="john.doe@gmail.com"
|
|
34
|
+
required />
|
|
35
|
+
<button class="btn btn-primary btn-rounded btn-block"
|
|
36
|
+
type="submit"
|
|
37
|
+
name="button">Sign up</button>
|
|
38
|
+
</form>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<button type="button"
|
|
44
|
+
class="btn btn-primary btn-bordered"
|
|
45
|
+
data-a11y-dialog-show="dialog-example">
|
|
46
|
+
Open the dialog
|
|
47
|
+
</button>
|
|
48
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Place these alongside the content like:
|
|
3
|
+
* <div class="dialog-content drawer-content drawer-slide-start"...
|
|
4
|
+
*/
|
|
5
|
+
.drawer-slide-start {
|
|
6
|
+
animation: slide-start var(--agnostic-timing-fast) ease-in-out;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.drawer-slide-end {
|
|
10
|
+
animation: slide-end var(--agnostic-timing-fast) ease-in-out;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.drawer-slide-bottom {
|
|
14
|
+
animation: slide-bottom var(--agnostic-timing-fast) ease-in-out;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.drawer-slide-top {
|
|
18
|
+
animation: slide-top var(--agnostic-timing-fast) ease-in-out;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes slide-top {
|
|
22
|
+
from {
|
|
23
|
+
transform: translateY(-100%);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes slide-bottom {
|
|
28
|
+
from {
|
|
29
|
+
transform: translateY(100%);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes slide-start {
|
|
34
|
+
from {
|
|
35
|
+
transform: translateX(-100%);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes slide-end {
|
|
40
|
+
from {
|
|
41
|
+
transform: translateX(100%);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media (prefers-reduced-motion), (update: slow) {
|
|
46
|
+
.drawer-slide-top,
|
|
47
|
+
.drawer-slide-bottom,
|
|
48
|
+
.drawer-slide-start,
|
|
49
|
+
.drawer-slide-end {
|
|
50
|
+
transition-duration: 0.001ms !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.drawer-start {
|
|
2
|
+
right: initial;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.drawer-start[aria-hidden] {
|
|
6
|
+
transform: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.drawer-end {
|
|
10
|
+
left: initial;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.drawer-end[aria-hidden] {
|
|
14
|
+
transform: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.drawer-top {
|
|
18
|
+
bottom: initial;
|
|
19
|
+
transform: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.drawer-top[aria-hidden] {
|
|
23
|
+
transform: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.drawer-bottom {
|
|
27
|
+
top: initial;
|
|
28
|
+
transform: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.drawer-bottom[aria-hidden] {
|
|
32
|
+
transform: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.drawer-content {
|
|
36
|
+
margin: initial;
|
|
37
|
+
max-width: initial;
|
|
38
|
+
border-radius: initial;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.drawer-start .drawer-content,
|
|
42
|
+
.drawer-end .drawer-content {
|
|
43
|
+
width: 25rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.drawer-top .drawer-content,
|
|
47
|
+
.drawer-bottom .drawer-content {
|
|
48
|
+
height: 25vh;
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ag-icon
|
|
3
|
-
ref="agComponent"
|
|
4
3
|
.size="size"
|
|
5
4
|
.type="type"
|
|
6
5
|
.noFill="noFill"
|
|
@@ -11,13 +10,11 @@
|
|
|
11
10
|
</template>
|
|
12
11
|
|
|
13
12
|
<script setup lang="ts">
|
|
14
|
-
import {
|
|
15
|
-
import type { IconProps, AgIcon } from "../core/Icon";
|
|
13
|
+
import type { IconProps } from "../core/Icon";
|
|
16
14
|
import "../core/Icon"; // Registers <ag-icon> on wrapper load
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
withDefaults(defineProps<IconProps>(), {
|
|
19
17
|
size: "16" as const,
|
|
20
18
|
type: "" as const,
|
|
21
19
|
});
|
|
22
|
-
const agComponent = ref<InstanceType<typeof AgIcon> | null>(null);
|
|
23
20
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ag-image
|
|
3
|
-
ref="
|
|
3
|
+
ref="agImageRef"
|
|
4
4
|
:src="src"
|
|
5
5
|
:alt="alt"
|
|
6
6
|
:width="width"
|
|
@@ -29,13 +29,8 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script setup lang="ts">
|
|
32
|
-
import { ref } from "vue";
|
|
33
|
-
import type {
|
|
34
|
-
AgImageProps,
|
|
35
|
-
AgImageSource,
|
|
36
|
-
ImageLoadEvent,
|
|
37
|
-
ImageErrorEvent,
|
|
38
|
-
} from "../core/Image";
|
|
32
|
+
import { ref, watchEffect, onMounted } from "vue";
|
|
33
|
+
import type { AgImage, AgImageProps, AgImageSource } from "../core/Image";
|
|
39
34
|
import "../core/Image"; // Registers the ag-image web component
|
|
40
35
|
|
|
41
36
|
// Define props interface (omit function props since wrapper uses emits)
|
|
@@ -54,21 +49,30 @@ const props = withDefaults(defineProps<VueImageProps>(), {
|
|
|
54
49
|
duration: 200,
|
|
55
50
|
});
|
|
56
51
|
|
|
52
|
+
// Template ref for ag-image element
|
|
53
|
+
const agImageRef = ref<AgImage | null>(null);
|
|
54
|
+
|
|
55
|
+
// Sync sources array prop to web component (arrays can't be passed via attributes)
|
|
56
|
+
onMounted(() => {
|
|
57
|
+
watchEffect(() => {
|
|
58
|
+
if (agImageRef.value && props.sources) {
|
|
59
|
+
agImageRef.value.sources = props.sources;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
57
64
|
// Define emits
|
|
58
65
|
const emit = defineEmits<{
|
|
59
66
|
"ag-load": [];
|
|
60
67
|
"ag-error": [];
|
|
61
68
|
}>();
|
|
62
69
|
|
|
63
|
-
// Template ref
|
|
64
|
-
const imageRef = ref<HTMLElement>();
|
|
65
|
-
|
|
66
70
|
// Event handlers
|
|
67
|
-
const handleLoad = (
|
|
71
|
+
const handleLoad = (_event: Event) => {
|
|
68
72
|
emit("ag-load");
|
|
69
73
|
};
|
|
70
74
|
|
|
71
|
-
const handleError = (
|
|
75
|
+
const handleError = (_event: Event) => {
|
|
72
76
|
emit("ag-error");
|
|
73
77
|
};
|
|
74
78
|
</script>
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
isHorizontalLabel,
|
|
17
17
|
type LabelPosition,
|
|
18
18
|
} from '../../../shared/form-control-utils';
|
|
19
|
+
import { FaceMixin, syncInnerInputValidity } from '../../../shared/face-mixin';
|
|
19
20
|
|
|
20
21
|
export type InputType =
|
|
21
22
|
| 'text'
|
|
@@ -43,6 +44,7 @@ export interface InputProps {
|
|
|
43
44
|
labelPosition?: LabelPosition;
|
|
44
45
|
noLabel?: boolean;
|
|
45
46
|
ariaLabel?: string;
|
|
47
|
+
name?: string;
|
|
46
48
|
type?: InputType;
|
|
47
49
|
value?: string;
|
|
48
50
|
placeholder?: string;
|
|
@@ -67,7 +69,7 @@ export interface InputProps {
|
|
|
67
69
|
onBlur?: (event: FocusEvent) => void;
|
|
68
70
|
}
|
|
69
71
|
|
|
70
|
-
export class AgInput extends LitElement implements InputProps {
|
|
72
|
+
export class AgInput extends FaceMixin(LitElement) implements InputProps {
|
|
71
73
|
static styles = [
|
|
72
74
|
formControlStyles,
|
|
73
75
|
css`
|
|
@@ -110,7 +112,7 @@ export class AgInput extends LitElement implements InputProps {
|
|
|
110
112
|
box-sizing: border-box;
|
|
111
113
|
width: 100%;
|
|
112
114
|
padding: var(--ag-space-2) var(--ag-space-3);
|
|
113
|
-
font-size: var(--ag-font-size-
|
|
115
|
+
font-size: var(--ag-font-size-sm);
|
|
114
116
|
line-height: var(--ag-line-height-base);
|
|
115
117
|
color: var(--ag-text-primary);
|
|
116
118
|
background-color: var(--ag-background-primary);
|
|
@@ -121,6 +123,7 @@ export class AgInput extends LitElement implements InputProps {
|
|
|
121
123
|
|
|
122
124
|
.ag-input__input::placeholder,
|
|
123
125
|
.ag-input__textarea::placeholder {
|
|
126
|
+
font-size: var(--ag-font-size-sm);
|
|
124
127
|
color: var(--ag-text-muted);
|
|
125
128
|
opacity: 1;
|
|
126
129
|
}
|
|
@@ -210,6 +213,13 @@ export class AgInput extends LitElement implements InputProps {
|
|
|
210
213
|
border: 1px solid var(--ag-border-subtle);
|
|
211
214
|
}
|
|
212
215
|
|
|
216
|
+
/* Ensure nested content (icons, svgs) is also centered */
|
|
217
|
+
.ag-input__addon ::slotted(*) {
|
|
218
|
+
display: flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
justify-content: center;
|
|
221
|
+
}
|
|
222
|
+
|
|
213
223
|
.ag-input__addon--left {
|
|
214
224
|
border-inline-end: 0;
|
|
215
225
|
border-radius: var(--ag-radius-md) 0 0 var(--ag-radius-md);
|
|
@@ -473,6 +483,33 @@ export class AgInput extends LitElement implements InputProps {
|
|
|
473
483
|
this._inputElement?.select();
|
|
474
484
|
}
|
|
475
485
|
|
|
486
|
+
// ─── FACE: AgInput-specific overrides ────────────────────────────────────
|
|
487
|
+
// Common boilerplate (formAssociated, _internals, name, form/validity
|
|
488
|
+
// getters, checkValidity, reportValidity, formDisabledCallback) lives in
|
|
489
|
+
// FaceMixin (shared/face-mixin.ts).
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* FACE lifecycle: called when the parent form is reset.
|
|
493
|
+
* Restores value to empty and clears validity state.
|
|
494
|
+
*/
|
|
495
|
+
override formResetCallback(): void {
|
|
496
|
+
this.value = '';
|
|
497
|
+
this._internals.setFormValue('');
|
|
498
|
+
this._internals.setValidity({});
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Sync the inner input's native validity state to ElementInternals.
|
|
503
|
+
* Delegates constraint validation (required, minlength, type=email, etc.)
|
|
504
|
+
* to the inner <input> rather than reimplementing it from scratch.
|
|
505
|
+
* Uses the shared syncInnerInputValidity() helper from face-mixin.ts.
|
|
506
|
+
*/
|
|
507
|
+
private _syncValidity(): void {
|
|
508
|
+
syncInnerInputValidity(this._internals, this._inputElement);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
// ─── End FACE ─────────────────────────────────────────────────────────────
|
|
512
|
+
|
|
476
513
|
/**
|
|
477
514
|
* Handle slot changes to detect addons
|
|
478
515
|
*/
|
|
@@ -495,6 +532,10 @@ export class AgInput extends LitElement implements InputProps {
|
|
|
495
532
|
private _handleInput(e: Event) {
|
|
496
533
|
const target = e.target as HTMLInputElement | HTMLTextAreaElement;
|
|
497
534
|
this.value = target.value;
|
|
535
|
+
// FACE: keep form submission value in sync
|
|
536
|
+
this._internals.setFormValue(this.value);
|
|
537
|
+
// FACE: mirror native constraint validity (required, minlength, type, etc.)
|
|
538
|
+
this._syncValidity();
|
|
498
539
|
|
|
499
540
|
if (this.onInput) {
|
|
500
541
|
this.onInput(e as InputEvent);
|
|
@@ -507,6 +548,10 @@ export class AgInput extends LitElement implements InputProps {
|
|
|
507
548
|
private _handleChange(e: Event) {
|
|
508
549
|
const target = e.target as HTMLInputElement | HTMLTextAreaElement;
|
|
509
550
|
this.value = target.value;
|
|
551
|
+
// FACE: keep form submission value in sync
|
|
552
|
+
this._internals.setFormValue(this.value);
|
|
553
|
+
// FACE: mirror native constraint validity (required, minlength, type, etc.)
|
|
554
|
+
this._syncValidity();
|
|
510
555
|
|
|
511
556
|
if (this.onChange) {
|
|
512
557
|
this.onChange(e);
|
|
@@ -634,6 +679,10 @@ export class AgInput extends LitElement implements InputProps {
|
|
|
634
679
|
}
|
|
635
680
|
|
|
636
681
|
override firstUpdated() {
|
|
682
|
+
// FACE: set initial form value and sync validity after first render
|
|
683
|
+
this._internals.setFormValue(this.value ?? '');
|
|
684
|
+
this._syncValidity();
|
|
685
|
+
|
|
637
686
|
// Initial check for slot content
|
|
638
687
|
setTimeout(() => {
|
|
639
688
|
const leftAddonSlot = this.shadowRoot?.querySelector('slot[name="addon-left"]') as HTMLSlotElement;
|
|
@@ -705,7 +754,11 @@ export class AgInput extends LitElement implements InputProps {
|
|
|
705
754
|
}
|
|
706
755
|
|
|
707
756
|
/**
|
|
708
|
-
* Render custom error message for Input
|
|
757
|
+
* Render custom error message for Input.
|
|
758
|
+
* role="alert" + aria-atomic="true" ensures screen readers announce the
|
|
759
|
+
* message immediately when it becomes visible (e.g. after blur or submit).
|
|
760
|
+
* The live region is always in the DOM so ATs register it on page load;
|
|
761
|
+
* content is populated only when invalid so announcements fire on change.
|
|
709
762
|
*/
|
|
710
763
|
private _renderError() {
|
|
711
764
|
return html`
|
|
@@ -713,6 +766,8 @@ export class AgInput extends LitElement implements InputProps {
|
|
|
713
766
|
id="${this._ids.errorId}"
|
|
714
767
|
class="ag-form-control__error ag-input__error"
|
|
715
768
|
part="ag-input-error"
|
|
769
|
+
role="alert"
|
|
770
|
+
aria-atomic="true"
|
|
716
771
|
?hidden="${!this.invalid || !this.errorMessage}"
|
|
717
772
|
>
|
|
718
773
|
${this.errorMessage || ''}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ag-input
|
|
3
|
-
|
|
3
|
+
:name="name"
|
|
4
4
|
.value="value"
|
|
5
5
|
.labelHidden="labelHidden"
|
|
6
6
|
.noLabel="noLabel"
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
|
|
45
45
|
<script setup lang="ts">
|
|
46
|
-
import { ref } from "vue";
|
|
47
46
|
import type { InputProps } from "../core/Input";
|
|
48
47
|
import "../core/Input"; // Registers the ag-input web component
|
|
49
48
|
|
|
@@ -59,7 +58,7 @@ export interface VueInputProps
|
|
|
59
58
|
"onClick" | "onInput" | "onChange" | "onFocus" | "onBlur"
|
|
60
59
|
> {}
|
|
61
60
|
// Define props with defaults
|
|
62
|
-
|
|
61
|
+
withDefaults(defineProps<VueInputProps>(), {
|
|
63
62
|
value: "",
|
|
64
63
|
label: "",
|
|
65
64
|
labelHidden: false,
|
|
@@ -93,9 +92,6 @@ const emit = defineEmits<{
|
|
|
93
92
|
"update:value": [value: string];
|
|
94
93
|
}>();
|
|
95
94
|
|
|
96
|
-
// Template ref
|
|
97
|
-
const inputRef = ref<HTMLElement>();
|
|
98
|
-
|
|
99
95
|
// Event handlers - native events emit full event object
|
|
100
96
|
const handleClick = (event: MouseEvent) => {
|
|
101
97
|
emit("click", event);
|
|
@@ -139,24 +139,6 @@ export class Pagination extends LitElement implements PaginationProps {
|
|
|
139
139
|
return this._generatePages();
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
updated(changedProperties: Map<string, unknown>) {
|
|
143
|
-
if (
|
|
144
|
-
changedProperties.has('current') ||
|
|
145
|
-
changedProperties.has('totalPages') ||
|
|
146
|
-
changedProperties.has('offset')
|
|
147
|
-
) {
|
|
148
|
-
// Focus current page button after update using querySelector
|
|
149
|
-
this.updateComplete.then(() => {
|
|
150
|
-
const currentButton = this.shadowRoot?.querySelector(
|
|
151
|
-
`button[data-page="${this.current}"]`
|
|
152
|
-
) as HTMLButtonElement;
|
|
153
|
-
if (currentButton) {
|
|
154
|
-
currentButton.focus();
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
142
|
private _generatePages(): PageArrayItem[] {
|
|
161
143
|
if (this.totalPages <= 1) {
|
|
162
144
|
return [1];
|
|
@@ -258,6 +240,16 @@ export class Pagination extends LitElement implements PaginationProps {
|
|
|
258
240
|
if (this.onPageChange) {
|
|
259
241
|
this.onPageChange(pageChangeEvent);
|
|
260
242
|
}
|
|
243
|
+
|
|
244
|
+
// Focus the new current page button after re-render (only when user clicked)
|
|
245
|
+
this.updateComplete.then(() => {
|
|
246
|
+
const currentButton = this.shadowRoot?.querySelector(
|
|
247
|
+
`button[data-page="${this.current}"]`
|
|
248
|
+
) as HTMLButtonElement;
|
|
249
|
+
if (currentButton) {
|
|
250
|
+
currentButton.focus();
|
|
251
|
+
}
|
|
252
|
+
});
|
|
261
253
|
}
|
|
262
254
|
|
|
263
255
|
private _getJustifyClass(): string {
|