@webtides/element-library 0.2.0 → 0.3.1
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/CHANGELOG.md +399 -3
- package/README.md +61 -41
- package/all.js +28 -0
- package/catalog.d.ts +14 -0
- package/catalog.js +55 -27
- package/custom-elements.json +16676 -3457
- package/package.json +35 -28
- package/src/components/accordion/accordion.changelog.md +10 -0
- package/src/components/accordion/accordion.js +10 -7
- package/src/components/accordion/accordion.readme.md +2 -0
- package/src/components/accordion/accordion.style.js +8 -0
- package/src/components/amount-field/amount-field.changelog.md +23 -3
- package/src/components/amount-field/amount-field.js +53 -26
- package/src/components/amount-field/amount-field.readme.md +82 -20
- package/src/components/amount-field/amount-field.style.js +111 -47
- package/src/components/avatar/avatar.changelog.md +23 -0
- package/src/components/avatar/avatar.define.js +3 -0
- package/src/components/avatar/avatar.js +115 -0
- package/src/components/avatar/avatar.readme.md +132 -0
- package/src/components/avatar/avatar.style.js +67 -0
- package/src/components/badge/badge.changelog.md +23 -0
- package/src/components/badge/badge.define.js +3 -0
- package/src/components/badge/badge.js +59 -0
- package/src/components/badge/badge.readme.md +109 -0
- package/src/components/badge/badge.style.js +63 -0
- package/src/components/breadcrumb/breadcrumb.changelog.md +22 -0
- package/src/components/breadcrumb/breadcrumb.define.js +3 -0
- package/src/components/breadcrumb/breadcrumb.js +47 -0
- package/src/components/breadcrumb/breadcrumb.readme.md +108 -0
- package/src/components/breadcrumb/breadcrumb.style.js +20 -0
- package/src/components/breadcrumb-item/breadcrumb-item.changelog.md +23 -0
- package/src/components/breadcrumb-item/breadcrumb-item.define.js +3 -0
- package/src/components/breadcrumb-item/breadcrumb-item.js +82 -0
- package/src/components/breadcrumb-item/breadcrumb-item.readme.md +106 -0
- package/src/components/breadcrumb-item/breadcrumb-item.style.js +92 -0
- package/src/components/button/button.changelog.md +44 -1
- package/src/components/button/button.js +338 -29
- package/src/components/button/button.readme.md +138 -10
- package/src/components/button/button.style.js +99 -120
- package/src/components/button-group/button-group.changelog.md +24 -0
- package/src/components/button-group/button-group.define.js +3 -0
- package/src/components/button-group/button-group.js +53 -0
- package/src/components/button-group/button-group.readme.md +114 -0
- package/src/components/button-group/button-group.style.js +41 -0
- package/src/components/card/card.changelog.md +23 -0
- package/src/components/card/card.define.js +3 -0
- package/src/components/card/card.js +73 -0
- package/src/components/card/card.readme.md +136 -0
- package/src/components/card/card.style.js +99 -0
- package/src/components/carousel/carousel.changelog.md +20 -0
- package/src/components/carousel/carousel.js +89 -40
- package/src/components/carousel/carousel.readme.md +39 -6
- package/src/components/carousel/carousel.style.js +21 -77
- package/src/components/carousel/glide/components/ShadowAnchors.js +3 -1
- package/src/components/carousel/glide/components/ShadowClones.js +21 -24
- package/src/components/carousel/glide/components/ShadowGaps.js +2 -2
- package/src/components/carousel/glide/components/ShadowHtml.js +22 -3
- package/src/components/checkbox-field/checkbox-field.changelog.md +25 -0
- package/src/components/checkbox-field/checkbox-field.js +32 -11
- package/src/components/checkbox-field/checkbox-field.readme.md +17 -4
- package/src/components/checkbox-field/checkbox-field.style.js +15 -3
- package/src/components/checkbox-group-field/checkbox-group-field.changelog.md +25 -0
- package/src/components/checkbox-group-field/checkbox-group-field.define.js +3 -0
- package/src/components/checkbox-group-field/checkbox-group-field.js +217 -0
- package/src/components/checkbox-group-field/checkbox-group-field.readme.md +95 -0
- package/src/components/checkbox-group-field/checkbox-group-field.style.js +62 -0
- package/src/components/color-field/color-field.changelog.md +24 -0
- package/src/components/color-field/color-field.define.js +3 -0
- package/src/components/color-field/color-field.js +184 -0
- package/src/components/color-field/color-field.readme.md +95 -0
- package/src/components/color-field/color-field.style.js +39 -0
- package/src/components/combobox-field/combobox-field.changelog.md +23 -0
- package/src/components/combobox-field/combobox-field.define.js +3 -0
- package/src/components/combobox-field/combobox-field.js +97 -0
- package/src/components/combobox-field/combobox-field.readme.md +93 -0
- package/src/components/combobox-field/combobox-field.style.js +56 -0
- package/src/components/copy-button/copy-button.changelog.md +24 -0
- package/src/components/copy-button/copy-button.define.js +3 -0
- package/src/components/copy-button/copy-button.events.js +4 -0
- package/src/components/copy-button/copy-button.js +237 -0
- package/src/components/copy-button/copy-button.readme.md +134 -0
- package/src/components/copy-button/copy-button.style.js +109 -0
- package/src/components/date-field/date-field.changelog.md +24 -0
- package/src/components/date-field/date-field.define.js +3 -0
- package/src/components/date-field/date-field.js +119 -0
- package/src/components/date-field/date-field.readme.md +110 -0
- package/src/components/date-field/date-field.style.js +53 -0
- package/src/components/dialog/dialog.changelog.md +16 -1
- package/src/components/dialog/dialog.js +252 -57
- package/src/components/dialog/dialog.readme.md +36 -4
- package/src/components/dialog/dialog.style.js +9 -109
- package/src/components/divider/divider.changelog.md +23 -0
- package/src/components/divider/divider.define.js +3 -0
- package/src/components/divider/divider.js +48 -0
- package/src/components/divider/divider.readme.md +101 -0
- package/src/components/divider/divider.style.js +50 -0
- package/src/components/drawer/drawer.changelog.md +25 -0
- package/src/components/drawer/drawer.define.js +3 -0
- package/src/components/drawer/drawer.events.js +8 -0
- package/src/components/drawer/drawer.js +80 -0
- package/src/components/drawer/drawer.readme.md +194 -0
- package/src/components/drawer/drawer.style.js +83 -0
- package/src/components/dropdown/dropdown.js +9 -7
- package/src/components/empty-state/empty-state.changelog.md +22 -0
- package/src/components/empty-state/empty-state.define.js +3 -0
- package/src/components/empty-state/empty-state.js +55 -0
- package/src/components/empty-state/empty-state.readme.md +114 -0
- package/src/components/empty-state/empty-state.style.js +60 -0
- package/src/components/file-field/file-field.changelog.md +24 -0
- package/src/components/file-field/file-field.define.js +3 -0
- package/src/components/file-field/file-field.js +205 -0
- package/src/components/file-field/file-field.readme.md +103 -0
- package/src/components/file-field/file-field.style.js +28 -0
- package/src/components/form-field/form-field.changelog.md +25 -0
- package/src/components/form-field/form-field.js +212 -15
- package/src/components/form-field/form-field.readme.md +82 -18
- package/src/components/form-field/form-field.style.js +6 -24
- package/src/components/input-field/input-field.changelog.md +24 -0
- package/src/components/input-field/input-field.js +82 -6
- package/src/components/input-field/input-field.readme.md +34 -5
- package/src/components/input-field/input-field.style.js +32 -13
- package/src/components/notification/notification.changelog.md +21 -1
- package/src/components/notification/notification.js +80 -74
- package/src/components/notification/notification.readme.md +54 -13
- package/src/components/notification/notification.style.js +37 -22
- package/src/components/otp-field/otp-field.changelog.md +23 -0
- package/src/components/otp-field/otp-field.define.js +3 -0
- package/src/components/otp-field/otp-field.events.js +3 -0
- package/src/components/otp-field/otp-field.js +172 -0
- package/src/components/otp-field/otp-field.readme.md +111 -0
- package/src/components/otp-field/otp-field.style.js +53 -0
- package/src/components/pagination/pagination.changelog.md +30 -0
- package/src/components/pagination/pagination.define.js +3 -0
- package/src/components/pagination/pagination.events.js +3 -0
- package/src/components/pagination/pagination.js +282 -0
- package/src/components/pagination/pagination.readme.md +167 -0
- package/src/components/pagination/pagination.style.js +162 -0
- package/src/components/password-field/password-field.changelog.md +24 -0
- package/src/components/password-field/password-field.js +7 -1
- package/src/components/password-field/password-field.readme.md +15 -6
- package/src/components/password-field/password-field.style.js +36 -13
- package/src/components/popover/popover.changelog.md +24 -0
- package/src/components/popover/popover.define.js +3 -0
- package/src/components/popover/popover.events.js +4 -0
- package/src/components/popover/popover.js +255 -0
- package/src/components/popover/popover.readme.md +132 -0
- package/src/components/popover/popover.style.js +41 -0
- package/src/components/progress-bar/progress-bar.changelog.md +23 -0
- package/src/components/progress-bar/progress-bar.define.js +3 -0
- package/src/components/progress-bar/progress-bar.js +80 -0
- package/src/components/progress-bar/progress-bar.readme.md +110 -0
- package/src/components/progress-bar/progress-bar.style.js +93 -0
- package/src/components/progress-ring/progress-ring.changelog.md +23 -0
- package/src/components/progress-ring/progress-ring.define.js +3 -0
- package/src/components/progress-ring/progress-ring.js +83 -0
- package/src/components/progress-ring/progress-ring.readme.md +115 -0
- package/src/components/progress-ring/progress-ring.style.js +85 -0
- package/src/components/radio-field/radio-field.changelog.md +16 -0
- package/src/components/radio-field/radio-field.js +34 -11
- package/src/components/radio-field/radio-field.readme.md +13 -8
- package/src/components/radio-field/radio-field.style.js +17 -65
- package/src/components/range-field/range-field.changelog.md +24 -0
- package/src/components/range-field/range-field.define.js +3 -0
- package/src/components/range-field/range-field.js +167 -0
- package/src/components/range-field/range-field.readme.md +87 -0
- package/src/components/range-field/range-field.style.js +41 -0
- package/src/components/rating-field/rating-field.changelog.md +24 -0
- package/src/components/rating-field/rating-field.define.js +3 -0
- package/src/components/rating-field/rating-field.js +195 -0
- package/src/components/rating-field/rating-field.readme.md +82 -0
- package/src/components/rating-field/rating-field.style.js +79 -0
- package/src/components/select-field/select-field.changelog.md +17 -0
- package/src/components/select-field/select-field.js +100 -8
- package/src/components/select-field/select-field.readme.md +32 -6
- package/src/components/select-field/select-field.style.js +19 -9
- package/src/components/skeleton/skeleton.changelog.md +22 -0
- package/src/components/skeleton/skeleton.define.js +3 -0
- package/src/components/skeleton/skeleton.js +49 -0
- package/src/components/skeleton/skeleton.readme.md +115 -0
- package/src/components/skeleton/skeleton.style.js +79 -0
- package/src/components/slider/slider.changelog.md +15 -0
- package/src/components/slider/slider.js +37 -5
- package/src/components/slider/slider.readme.md +28 -6
- package/src/components/slider/slider.style.js +7 -71
- package/src/components/spinner/spinner.changelog.md +22 -0
- package/src/components/spinner/spinner.define.js +3 -0
- package/src/components/spinner/spinner.js +48 -0
- package/src/components/spinner/spinner.readme.md +98 -0
- package/src/components/spinner/spinner.style.js +44 -0
- package/src/components/switch-field/switch-field.changelog.md +22 -0
- package/src/components/switch-field/switch-field.js +24 -10
- package/src/components/switch-field/switch-field.readme.md +11 -4
- package/src/components/switch-field/switch-field.style.js +13 -13
- package/src/components/tab-group/tab-group.changelog.md +19 -0
- package/src/components/tab-group/tab-group.js +122 -10
- package/src/components/tab-group/tab-group.readme.md +25 -4
- package/src/components/tab-link/tab-link.changelog.md +16 -0
- package/src/components/tab-link/tab-link.js +51 -8
- package/src/components/tab-link/tab-link.readme.md +14 -8
- package/src/components/tab-link/tab-link.style.js +13 -0
- package/src/components/tab-panel/tab-panel.changelog.md +8 -2
- package/src/components/tab-panel/tab-panel.js +7 -3
- package/src/components/tab-panel/tab-panel.readme.md +7 -5
- package/src/components/tag/tag.changelog.md +24 -0
- package/src/components/tag/tag.define.js +3 -0
- package/src/components/tag/tag.events.js +3 -0
- package/src/components/tag/tag.js +116 -0
- package/src/components/tag/tag.readme.md +119 -0
- package/src/components/tag/tag.style.js +101 -0
- package/src/components/tag-field/tag-field.changelog.md +25 -0
- package/src/components/tag-field/tag-field.define.js +3 -0
- package/src/components/tag-field/tag-field.js +359 -0
- package/src/components/tag-field/tag-field.readme.md +113 -0
- package/src/components/tag-field/tag-field.style.js +62 -0
- package/src/components/textarea-field/textarea-field.changelog.md +28 -4
- package/src/components/textarea-field/textarea-field.js +68 -14
- package/src/components/textarea-field/textarea-field.readme.md +45 -9
- package/src/components/textarea-field/textarea-field.style.js +45 -2
- package/src/components/toast/toast.changelog.md +24 -0
- package/src/components/toast/toast.define.js +3 -0
- package/src/components/toast/toast.js +193 -0
- package/src/components/toast/toast.readme.md +189 -0
- package/src/components/toast/toast.style.js +74 -0
- package/src/components/tooltip/tooltip.changelog.md +24 -0
- package/src/components/tooltip/tooltip.define.js +3 -0
- package/src/components/tooltip/tooltip.events.js +4 -0
- package/src/components/tooltip/tooltip.js +377 -0
- package/src/components/tooltip/tooltip.readme.md +172 -0
- package/src/components/tooltip/tooltip.style.js +107 -0
- package/src/components/transition-classes/transition-classes.js +6 -6
- package/src/styles/appearance.style.js +42 -0
- package/src/styles/arrow.style.js +65 -0
- package/src/styles/choice-group.style.js +94 -0
- package/src/styles/form-control.style.js +79 -0
- package/src/styles/host.style.js +55 -0
- package/src/styles/layers.css +31 -0
- package/src/styles/modal.style.js +146 -0
- package/src/styles/native.css +275 -0
- package/src/styles/size.style.js +48 -0
- package/src/styles/slide-controls.style.js +225 -0
- package/src/styles/utilities.css +30 -0
- package/src/styles/variants.style.js +78 -0
- package/src/themes/default.css +86 -142
- package/src/themes/high-contrast.css +72 -129
- package/src/themes/sketchy.css +95 -175
- package/src/utils/floating.js +71 -0
- package/src/utils/focus.js +18 -0
- package/src/utils/progress.js +25 -0
- package/src/utils/slots.js +21 -0
- package/src/utils/text-entry-attributes.js +51 -0
- package/types/all.d.ts +54 -1
- package/types/index.d.ts +1 -0
- package/types/src/components/accordion/accordion.d.ts +6 -4
- package/types/src/components/accordion/accordion.events.d.ts +3 -3
- package/types/src/components/accordion-group/accordion-group.d.ts +4 -3
- package/types/src/components/amount-field/amount-field.d.ts +30 -16
- package/types/src/components/avatar/avatar.d.ts +57 -0
- package/types/src/components/avatar/avatar.define.d.ts +1 -0
- package/types/src/components/avatar/avatar.style.d.ts +2 -0
- package/types/src/components/badge/badge.d.ts +32 -0
- package/types/src/components/badge/badge.define.d.ts +1 -0
- package/types/src/components/badge/badge.style.d.ts +2 -0
- package/types/src/components/breadcrumb/breadcrumb.d.ts +27 -0
- package/types/src/components/breadcrumb/breadcrumb.define.d.ts +1 -0
- package/types/src/components/breadcrumb/breadcrumb.style.d.ts +2 -0
- package/types/src/components/breadcrumb-item/breadcrumb-item.d.ts +38 -0
- package/types/src/components/breadcrumb-item/breadcrumb-item.define.d.ts +1 -0
- package/types/src/components/breadcrumb-item/breadcrumb-item.style.d.ts +2 -0
- package/types/src/components/button/button.d.ts +158 -14
- package/types/src/components/button-group/button-group.d.ts +28 -0
- package/types/src/components/button-group/button-group.define.d.ts +1 -0
- package/types/src/components/button-group/button-group.style.d.ts +2 -0
- package/types/src/components/card/card.d.ts +40 -0
- package/types/src/components/card/card.define.d.ts +1 -0
- package/types/src/components/card/card.style.d.ts +2 -0
- package/types/src/components/carousel/carousel.d.ts +22 -8
- package/types/src/components/carousel/carousel.events.d.ts +3 -3
- package/types/src/components/carousel/glide/components/ShadowAnchors.d.ts +1 -1
- package/types/src/components/carousel/glide/components/ShadowClones.d.ts +8 -1
- package/types/src/components/carousel/glide/components/ShadowGaps.d.ts +1 -1
- package/types/src/components/carousel/glide/components/ShadowHtml.d.ts +1 -1
- package/types/src/components/carousel/glide/components/glide-html.d.ts +1 -1
- package/types/src/components/checkbox-field/checkbox-field.d.ts +22 -15
- package/types/src/components/checkbox-group-field/checkbox-group-field.d.ts +100 -0
- package/types/src/components/checkbox-group-field/checkbox-group-field.define.d.ts +1 -0
- package/types/src/components/checkbox-group-field/checkbox-group-field.style.d.ts +2 -0
- package/types/src/components/color-field/color-field.d.ts +102 -0
- package/types/src/components/color-field/color-field.define.d.ts +1 -0
- package/types/src/components/color-field/color-field.style.d.ts +2 -0
- package/types/src/components/combobox-field/combobox-field.d.ts +84 -0
- package/types/src/components/combobox-field/combobox-field.define.d.ts +1 -0
- package/types/src/components/combobox-field/combobox-field.style.d.ts +2 -0
- package/types/src/components/copy-button/copy-button.d.ts +93 -0
- package/types/src/components/copy-button/copy-button.define.d.ts +1 -0
- package/types/src/components/copy-button/copy-button.events.d.ts +5 -0
- package/types/src/components/copy-button/copy-button.style.d.ts +2 -0
- package/types/src/components/date-field/date-field.d.ts +102 -0
- package/types/src/components/date-field/date-field.define.d.ts +1 -0
- package/types/src/components/date-field/date-field.style.d.ts +2 -0
- package/types/src/components/dialog/dialog.d.ts +101 -19
- package/types/src/components/dialog/dialog.events.d.ts +8 -8
- package/types/src/components/divider/divider.d.ts +27 -0
- package/types/src/components/divider/divider.define.d.ts +1 -0
- package/types/src/components/divider/divider.style.d.ts +2 -0
- package/types/src/components/drawer/drawer.d.ts +70 -0
- package/types/src/components/drawer/drawer.define.d.ts +1 -0
- package/types/src/components/drawer/drawer.events.d.ts +9 -0
- package/types/src/components/drawer/drawer.style.d.ts +2 -0
- package/types/src/components/dropdown/dropdown.d.ts +5 -3
- package/types/src/components/empty-state/empty-state.d.ts +29 -0
- package/types/src/components/empty-state/empty-state.define.d.ts +1 -0
- package/types/src/components/empty-state/empty-state.style.d.ts +2 -0
- package/types/src/components/file-field/file-field.d.ts +115 -0
- package/types/src/components/file-field/file-field.define.d.ts +1 -0
- package/types/src/components/file-field/file-field.style.d.ts +2 -0
- package/types/src/components/form-field/form-field.d.ts +129 -14
- package/types/src/components/form-field/form-field.events.d.ts +4 -4
- package/types/src/components/input-field/input-field.d.ts +52 -5
- package/types/src/components/lazy-src/lazy-src.d.ts +7 -5
- package/types/src/components/lazy-src/lazy-src.events.d.ts +5 -5
- package/types/src/components/notification/notification.d.ts +18 -18
- package/types/src/components/notification/notification.events.d.ts +6 -6
- package/types/src/components/otp-field/otp-field.d.ts +130 -0
- package/types/src/components/otp-field/otp-field.define.d.ts +1 -0
- package/types/src/components/otp-field/otp-field.events.d.ts +4 -0
- package/types/src/components/otp-field/otp-field.style.d.ts +2 -0
- package/types/src/components/pagination/pagination.d.ts +117 -0
- package/types/src/components/pagination/pagination.define.d.ts +1 -0
- package/types/src/components/pagination/pagination.events.d.ts +4 -0
- package/types/src/components/pagination/pagination.style.d.ts +2 -0
- package/types/src/components/password-field/password-field.d.ts +29 -12
- package/types/src/components/popover/popover.d.ts +123 -0
- package/types/src/components/popover/popover.define.d.ts +1 -0
- package/types/src/components/popover/popover.events.d.ts +5 -0
- package/types/src/components/popover/popover.style.d.ts +2 -0
- package/types/src/components/progress-bar/progress-bar.d.ts +35 -0
- package/types/src/components/progress-bar/progress-bar.define.d.ts +1 -0
- package/types/src/components/progress-bar/progress-bar.style.d.ts +2 -0
- package/types/src/components/progress-ring/progress-ring.d.ts +40 -0
- package/types/src/components/progress-ring/progress-ring.define.d.ts +1 -0
- package/types/src/components/progress-ring/progress-ring.style.d.ts +2 -0
- package/types/src/components/radio-field/radio-field.d.ts +21 -9
- package/types/src/components/range-field/range-field.d.ts +94 -0
- package/types/src/components/range-field/range-field.define.d.ts +1 -0
- package/types/src/components/range-field/range-field.style.d.ts +2 -0
- package/types/src/components/rating-field/rating-field.d.ts +96 -0
- package/types/src/components/rating-field/rating-field.define.d.ts +1 -0
- package/types/src/components/rating-field/rating-field.style.d.ts +2 -0
- package/types/src/components/scroll-to/scroll-to.d.ts +3 -2
- package/types/src/components/scroll-to-top/scroll-to-top.d.ts +4 -2
- package/types/src/components/select-field/select-field.d.ts +55 -5
- package/types/src/components/skeleton/skeleton.d.ts +29 -0
- package/types/src/components/skeleton/skeleton.define.d.ts +1 -0
- package/types/src/components/skeleton/skeleton.style.d.ts +2 -0
- package/types/src/components/slider/slider.d.ts +14 -8
- package/types/src/components/slider/slider.events.d.ts +4 -4
- package/types/src/components/spinner/spinner.d.ts +28 -0
- package/types/src/components/spinner/spinner.define.d.ts +1 -0
- package/types/src/components/spinner/spinner.style.d.ts +2 -0
- package/types/src/components/sticky/sticky.d.ts +4 -2
- package/types/src/components/svg-use/svg-use.d.ts +4 -2
- package/types/src/components/switch-field/switch-field.d.ts +17 -15
- package/types/src/components/tab-group/tab-group.d.ts +44 -3
- package/types/src/components/tab-link/tab-link.d.ts +33 -10
- package/types/src/components/tab-panel/tab-panel.d.ts +8 -5
- package/types/src/components/tag/tag.d.ts +53 -0
- package/types/src/components/tag/tag.define.d.ts +1 -0
- package/types/src/components/tag/tag.events.d.ts +4 -0
- package/types/src/components/tag/tag.style.d.ts +2 -0
- package/types/src/components/tag-field/tag-field.d.ts +178 -0
- package/types/src/components/tag-field/tag-field.define.d.ts +1 -0
- package/types/src/components/tag-field/tag-field.style.d.ts +2 -0
- package/types/src/components/textarea-field/textarea-field.d.ts +44 -4
- package/types/src/components/toast/toast.d.ts +110 -0
- package/types/src/components/toast/toast.define.d.ts +1 -0
- package/types/src/components/toast/toast.style.d.ts +2 -0
- package/types/src/components/tooltip/tooltip.d.ts +161 -0
- package/types/src/components/tooltip/tooltip.define.d.ts +1 -0
- package/types/src/components/tooltip/tooltip.events.d.ts +5 -0
- package/types/src/components/tooltip/tooltip.style.d.ts +2 -0
- package/types/src/components/transition-classes/transition-classes.d.ts +9 -8
- package/types/src/styles/appearance.style.d.ts +18 -0
- package/types/src/styles/arrow.style.d.ts +15 -0
- package/types/src/styles/choice-group.style.d.ts +23 -0
- package/types/src/styles/form-control.style.d.ts +26 -0
- package/types/src/styles/host.style.d.ts +24 -0
- package/types/src/styles/modal.style.d.ts +20 -0
- package/types/src/styles/size.style.d.ts +20 -0
- package/types/src/styles/slide-controls.style.d.ts +20 -0
- package/types/src/styles/variants.style.d.ts +32 -0
- package/types/src/utils/body-scroll.d.ts +12 -2
- package/types/src/utils/floating.d.ts +36 -0
- package/types/src/utils/focus.d.ts +16 -0
- package/types/src/utils/progress.d.ts +19 -0
- package/types/src/utils/slots.d.ts +19 -0
- package/types/src/utils/text-entry-attributes.d.ts +18 -0
- package/types/src/utils/transitions.d.ts +2 -2
- package/web-types.json +6590 -1584
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function (Glide: any, Components: any, Events: any): any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import FormField from '../form-field/form-field.js';
|
|
2
2
|
/**
|
|
3
3
|
* Styled checkbox input with a custom checkmark indicator, label, and validation. Extends
|
|
4
4
|
* `FormField` and inherits its label / help / error / required surface.
|
|
@@ -16,10 +16,9 @@ export function define(): void;
|
|
|
16
16
|
* attribute.
|
|
17
17
|
*/
|
|
18
18
|
export default class CheckboxField extends FormField {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
checked: any;
|
|
20
|
+
constructor(options: any);
|
|
21
21
|
properties(): {
|
|
22
|
-
checked: boolean;
|
|
23
22
|
name: string;
|
|
24
23
|
value: any;
|
|
25
24
|
required: boolean;
|
|
@@ -30,22 +29,24 @@ export default class CheckboxField extends FormField {
|
|
|
30
29
|
helpMessage: string;
|
|
31
30
|
valid: boolean;
|
|
32
31
|
touched: boolean;
|
|
32
|
+
checked: boolean;
|
|
33
33
|
};
|
|
34
|
+
connected(): void;
|
|
35
|
+
/** @private */
|
|
36
|
+
private _stateForReset;
|
|
34
37
|
watch(): {
|
|
35
|
-
checked: (checked: any) => void;
|
|
36
|
-
value: (value: any) => void;
|
|
37
38
|
valid: () => void;
|
|
38
39
|
touched: () => void;
|
|
40
|
+
value: () => void;
|
|
41
|
+
checked: (checked: any) => void;
|
|
39
42
|
};
|
|
40
43
|
events(): {
|
|
41
|
-
input: {
|
|
42
|
-
change: () => void;
|
|
43
|
-
};
|
|
44
44
|
'[ref=input]': {
|
|
45
45
|
focus: () => void;
|
|
46
46
|
blur: () => void;
|
|
47
47
|
keyup: (event: any) => void;
|
|
48
48
|
change: () => void;
|
|
49
|
+
invalid: (event: any) => void;
|
|
49
50
|
};
|
|
50
51
|
'.is-invalid': {
|
|
51
52
|
focus: () => void;
|
|
@@ -54,16 +55,22 @@ export default class CheckboxField extends FormField {
|
|
|
54
55
|
click: () => void;
|
|
55
56
|
touchstart: () => void;
|
|
56
57
|
};
|
|
58
|
+
input: {
|
|
59
|
+
change: () => void;
|
|
60
|
+
};
|
|
57
61
|
};
|
|
58
|
-
checked: any;
|
|
59
62
|
/**
|
|
60
|
-
* The checkbox
|
|
61
|
-
*
|
|
62
|
-
|
|
63
|
+
* The checkbox has its label next to the box, in the row of the control (see `fieldTemplate`),
|
|
64
|
+
* and none in front of it. The help message explains that label, so it comes after the row.
|
|
65
|
+
*/
|
|
66
|
+
template(): any;
|
|
67
|
+
/**
|
|
68
|
+
* The box with its check mark is inside the label, in front of the text. It is hidden from
|
|
69
|
+
* assistive technology: the checkbox itself says whether it is checked, and the mark would be
|
|
70
|
+
* part of its name, checked or not.
|
|
63
71
|
*/
|
|
64
|
-
labelTemplate(): null;
|
|
65
72
|
fieldTemplate(): any;
|
|
66
73
|
/** @private */
|
|
67
74
|
private selectedIndicatorTemplate;
|
|
68
75
|
}
|
|
69
|
-
|
|
76
|
+
export declare function define(): void;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import FormField from '../form-field/form-field.js';
|
|
2
|
+
/**
|
|
3
|
+
* A choice of any number of options: a group of checkboxes with a custom box, label, help text and
|
|
4
|
+
* validation. Renders a native `<fieldset>`/`<legend>` wrapping one `<input type="checkbox">` per
|
|
5
|
+
* option, all under one name, so the grouping, the keyboard and the form submission are native.
|
|
6
|
+
* Extends `FormField` and inherits its help / error / required / touched-state surface; the `label`
|
|
7
|
+
* becomes the `<legend>` of the group.
|
|
8
|
+
*
|
|
9
|
+
* It is the group of checkboxes that `el-radio-field` is for radios.
|
|
10
|
+
*
|
|
11
|
+
* @element el-checkbox-group-field
|
|
12
|
+
*
|
|
13
|
+
* @fires {CustomEvent<string[]>} input-change - Fired when the checked options change. `detail` is
|
|
14
|
+
* the list of the checked values. Bubbles.
|
|
15
|
+
*
|
|
16
|
+
* @cssstate touched - Set once the user has left the group, or the browser has refused a submit
|
|
17
|
+
* because of it. Inherits `valid` and `invalid` from `FormField`.
|
|
18
|
+
*
|
|
19
|
+
* @property {string[]} value - The values of the checked options, in the order of the options. As
|
|
20
|
+
* an attribute it is JSON: `value='["news", "offers"]'`.
|
|
21
|
+
* @property {Array<string | { value: string, label?: string, disabled?: boolean }>} options -
|
|
22
|
+
* Options to render. Accepts plain strings (`['News', 'Offers']`) or option objects
|
|
23
|
+
* (`[{ value, label, disabled? }]`). Strings are used as both value and label.
|
|
24
|
+
* @property {boolean} required - Whether at least one option has to be checked.
|
|
25
|
+
*/
|
|
26
|
+
export default class CheckboxGroupField extends FormField {
|
|
27
|
+
constructor(options: any);
|
|
28
|
+
properties(): {
|
|
29
|
+
name: string;
|
|
30
|
+
required: boolean;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
label: string;
|
|
33
|
+
labelScreenReaderOnly: boolean;
|
|
34
|
+
errorMessage: string;
|
|
35
|
+
helpMessage: string;
|
|
36
|
+
valid: boolean;
|
|
37
|
+
touched: boolean;
|
|
38
|
+
value: any[];
|
|
39
|
+
options: any[];
|
|
40
|
+
};
|
|
41
|
+
connected(): void;
|
|
42
|
+
afterUpdate(): void;
|
|
43
|
+
events(): {
|
|
44
|
+
'input[type="checkbox"]': {
|
|
45
|
+
change: () => void;
|
|
46
|
+
focus: () => void;
|
|
47
|
+
blur: (event: any) => void;
|
|
48
|
+
invalid: (event: any) => void;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* The values of the checked options as text. `value` is a list; a single value, as an attribute
|
|
53
|
+
* that is no JSON list gives it, is a list of one.
|
|
54
|
+
* @private
|
|
55
|
+
* @returns {string[]}
|
|
56
|
+
*/
|
|
57
|
+
private _values;
|
|
58
|
+
/**
|
|
59
|
+
* @private
|
|
60
|
+
* @returns {HTMLInputElement[]}
|
|
61
|
+
*/
|
|
62
|
+
private _boxes;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the group currently passes validation: required means at least one checked option.
|
|
65
|
+
* @private
|
|
66
|
+
*/
|
|
67
|
+
private _computeValid;
|
|
68
|
+
/**
|
|
69
|
+
* Makes the checkboxes say what the field says, after every render.
|
|
70
|
+
*
|
|
71
|
+
* The `checked` attribute the template writes is only the default of a checkbox: once the user
|
|
72
|
+
* has checked or unchecked it, the browser no longer follows the attribute. So a value from
|
|
73
|
+
* outside is written to the checkboxes as well.
|
|
74
|
+
*
|
|
75
|
+
* A native checkbox knows no "at least one of the group". The first checkbox that is not
|
|
76
|
+
* disabled carries that for the group, as a validity of its own: the browser then refuses to
|
|
77
|
+
* submit the form, focuses that checkbox and shows its bubble there, as it does for every other
|
|
78
|
+
* field that is required and empty.
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
private _syncControls;
|
|
82
|
+
onFocus(): void;
|
|
83
|
+
onBlur(): void;
|
|
84
|
+
/**
|
|
85
|
+
* The label is rendered as the group's `<legend>` (see `template`), so the base FormField
|
|
86
|
+
* `<label>` is suppressed.
|
|
87
|
+
* @returns {null}
|
|
88
|
+
*/
|
|
89
|
+
labelTemplate(): null;
|
|
90
|
+
template(): any;
|
|
91
|
+
/** @private */
|
|
92
|
+
private legendTemplate;
|
|
93
|
+
/**
|
|
94
|
+
* The box that is drawn in the place of a checkbox is hidden from assistive technology: the
|
|
95
|
+
* checkbox itself says whether it is checked.
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
private fieldTemplate;
|
|
99
|
+
}
|
|
100
|
+
export declare function define(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import FormField from '../form-field/form-field.js';
|
|
2
|
+
/**
|
|
3
|
+
* A colour, picked in the picker of the browser. Renders a native `<input type="color">`, so the
|
|
4
|
+
* picker, the keyboard and the form submission are the ones of the browser. Extends `FormField`
|
|
5
|
+
* and inherits its label / help / error surface.
|
|
6
|
+
*
|
|
7
|
+
* The control always has a value: without one it is black. The field takes that value over, so
|
|
8
|
+
* that `value` says what the form submits.
|
|
9
|
+
*
|
|
10
|
+
* @element el-color-field
|
|
11
|
+
*
|
|
12
|
+
* @fires {CustomEvent<string>} input-change - Fired when the value changes, also while the user
|
|
13
|
+
* goes through the picker. `detail` is the new value. Bubbles.
|
|
14
|
+
*
|
|
15
|
+
* @cssstate touched - Set on the host once the user has focused and left the control. Inherits
|
|
16
|
+
* `valid` and `invalid` from `FormField`.
|
|
17
|
+
*
|
|
18
|
+
* @property {string | null} value - The colour, as the text the form submits: `#rrggbb`. A field
|
|
19
|
+
* without one takes over the value of the control, `#000000`.
|
|
20
|
+
* @property {'small'|'medium'|'large'} size - Size of the control. Default `'medium'`. Reflected to
|
|
21
|
+
* the `size` attribute. It shows once the control is decorated (`styles/native.css`); a control
|
|
22
|
+
* with the look of the browser keeps its size.
|
|
23
|
+
* @property {boolean} showValue - Shows the value beside the control. Default `false`.
|
|
24
|
+
* @property {Array<string | { value: string, label?: string }>} options - Colours the picker of the
|
|
25
|
+
* browser offers: plain strings (`['#2563eb', '#16a34a']`) or option objects. Without options the
|
|
26
|
+
* control has no list.
|
|
27
|
+
*/
|
|
28
|
+
export default class ColorField extends FormField {
|
|
29
|
+
/**
|
|
30
|
+
* The value that `input-change` last reported, or that the field started with. See `watch()`.
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
private _reportedValue;
|
|
34
|
+
constructor(options: any);
|
|
35
|
+
properties(): {
|
|
36
|
+
name: string;
|
|
37
|
+
value: any;
|
|
38
|
+
required: boolean;
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
label: string;
|
|
41
|
+
labelScreenReaderOnly: boolean;
|
|
42
|
+
errorMessage: string;
|
|
43
|
+
helpMessage: string;
|
|
44
|
+
valid: boolean;
|
|
45
|
+
touched: boolean;
|
|
46
|
+
size: string;
|
|
47
|
+
showValue: boolean;
|
|
48
|
+
options: any[];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* A form field takes a control with a value as touched: someone has filled it in. The control
|
|
52
|
+
* of this field always has a value, so that says nothing here.
|
|
53
|
+
*/
|
|
54
|
+
connected(): void;
|
|
55
|
+
afterUpdate(): void;
|
|
56
|
+
watch(): {
|
|
57
|
+
valid: () => void;
|
|
58
|
+
touched: () => void;
|
|
59
|
+
value: () => void;
|
|
60
|
+
};
|
|
61
|
+
events(): {
|
|
62
|
+
'[ref=input]': {
|
|
63
|
+
input: () => void;
|
|
64
|
+
focus: () => void;
|
|
65
|
+
blur: () => void;
|
|
66
|
+
invalid: (event: any) => void;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Makes the control and `value` say the same, after every render and every change of `value`.
|
|
71
|
+
*
|
|
72
|
+
* The `value` attribute of the control is only its default: once the user has picked a colour,
|
|
73
|
+
* a value from outside has to be written to the control. The control in turn keeps a colour in
|
|
74
|
+
* its own format: it writes `#F00` as `#ff0000`, and is black for a text that is no colour and
|
|
75
|
+
* when it is given none. The field takes over what the control made of the value: that is what
|
|
76
|
+
* the form submits.
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
private _matchControl;
|
|
80
|
+
/**
|
|
81
|
+
* The colours of `options`, as the options of the list.
|
|
82
|
+
* @private
|
|
83
|
+
* @returns {Array<{ value: string, label: string | null }>}
|
|
84
|
+
*/
|
|
85
|
+
private _colors;
|
|
86
|
+
/** @private */
|
|
87
|
+
private fieldTemplate;
|
|
88
|
+
/**
|
|
89
|
+
* The colours the picker of the browser offers. A control without them has no list: an empty
|
|
90
|
+
* one would be an offer of nothing.
|
|
91
|
+
* @private
|
|
92
|
+
* @param {Array<{ value: string, label: string | null }>} colors
|
|
93
|
+
*/
|
|
94
|
+
private listTemplate;
|
|
95
|
+
/**
|
|
96
|
+
* The value beside the control. It is hidden from assistive technology: the control says its
|
|
97
|
+
* value itself, and would be heard twice.
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
private valueTemplate;
|
|
101
|
+
}
|
|
102
|
+
export declare function define(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import InputField from '../input-field/input-field.js';
|
|
2
|
+
/**
|
|
3
|
+
* A text the user writes, with suggestions the browser offers while they type: a city, a job
|
|
4
|
+
* title, the name of a product. Extends `InputField` (and therefore `FormField`), inheriting the
|
|
5
|
+
* label / help / error / validation surface and the look from `styles/native.css`.
|
|
6
|
+
*
|
|
7
|
+
* The suggestions are a native `<datalist>`: the browser filters and shows them, and the keyboard
|
|
8
|
+
* and a screen reader work as the browser has them. A suggestion is an offer, not a limit: the
|
|
9
|
+
* value is free text. For a choice from a fixed list there is `el-select-field`.
|
|
10
|
+
*
|
|
11
|
+
* @element el-combobox-field
|
|
12
|
+
*
|
|
13
|
+
* @fires {CustomEvent<string>} input-change - Fired when the value changes: typed, or picked from
|
|
14
|
+
* the suggestions. `detail` is the new value. Bubbles.
|
|
15
|
+
*
|
|
16
|
+
* @property {Array<string | { value: string, label?: string }>} options - The suggestions: plain
|
|
17
|
+
* strings (`['Berlin', 'Bern']`) or option objects. The `value` is what a pick writes into the
|
|
18
|
+
* control; a `label` is a text the browser may show with it. Without options the control has no
|
|
19
|
+
* list and is a plain text input.
|
|
20
|
+
*/
|
|
21
|
+
export default class ComboboxField extends InputField {
|
|
22
|
+
constructor(options: any);
|
|
23
|
+
properties(): {
|
|
24
|
+
name: string;
|
|
25
|
+
value: any;
|
|
26
|
+
required: boolean;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
label: string;
|
|
29
|
+
labelScreenReaderOnly: boolean;
|
|
30
|
+
errorMessage: string;
|
|
31
|
+
helpMessage: string;
|
|
32
|
+
valid: boolean;
|
|
33
|
+
touched: boolean;
|
|
34
|
+
type: string;
|
|
35
|
+
size: string;
|
|
36
|
+
placeholder: string;
|
|
37
|
+
pattern: boolean;
|
|
38
|
+
autocomplete: any;
|
|
39
|
+
inputmode: any;
|
|
40
|
+
enterkeyhint: any;
|
|
41
|
+
autocapitalize: any;
|
|
42
|
+
autocorrect: any;
|
|
43
|
+
spellcheck: any;
|
|
44
|
+
options: any[];
|
|
45
|
+
};
|
|
46
|
+
events(): {
|
|
47
|
+
'.is-invalid': {
|
|
48
|
+
focus: () => void;
|
|
49
|
+
};
|
|
50
|
+
'[data-clear-input]': {
|
|
51
|
+
click: () => void;
|
|
52
|
+
touchstart: () => void;
|
|
53
|
+
};
|
|
54
|
+
'[ref=input]': {
|
|
55
|
+
focus: () => void;
|
|
56
|
+
blur: () => void;
|
|
57
|
+
keyup: (event: any) => void;
|
|
58
|
+
change: () => void;
|
|
59
|
+
invalid: (event: any) => void;
|
|
60
|
+
input: () => void;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* The suggestions of `options`, as the options of the list.
|
|
65
|
+
* @private
|
|
66
|
+
* @returns {Array<{ value: string, label: string | null }>}
|
|
67
|
+
*/
|
|
68
|
+
private _suggestions;
|
|
69
|
+
/**
|
|
70
|
+
* The control names its list. Without suggestions it has none: a list that is empty would
|
|
71
|
+
* still make the control a combobox for a screen reader, one that offers nothing.
|
|
72
|
+
* @private
|
|
73
|
+
*/
|
|
74
|
+
private _controlAttributes;
|
|
75
|
+
/** @private */
|
|
76
|
+
private fieldTemplate;
|
|
77
|
+
/**
|
|
78
|
+
* The suggestions, in the list the control names. The id is the one of this field alone, so
|
|
79
|
+
* two fields of a page do not offer the suggestions of each other.
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
private listTemplate;
|
|
83
|
+
}
|
|
84
|
+
export declare function define(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { TemplateElement } from '@webtides/element-js';
|
|
2
|
+
import Events from './copy-button.events.js';
|
|
3
|
+
/**
|
|
4
|
+
* A copy button: a button that copies a text to the clipboard and says whether that worked. The
|
|
5
|
+
* text is `value`, or the content of another element of the page named by `from`, a code block or
|
|
6
|
+
* an input. After a press the icon shows the outcome for a moment, and a screen reader hears it.
|
|
7
|
+
*
|
|
8
|
+
* @element el-copy-button
|
|
9
|
+
*
|
|
10
|
+
* @fires {CustomEvent<{ value: string }>} copy-button-copy - Fired when the text was copied.
|
|
11
|
+
* `detail.value` is the text.
|
|
12
|
+
* @fires {CustomEvent<{ error: Error }>} copy-button-error - Fired when the text could not be
|
|
13
|
+
* copied: there was nothing to copy, the browser has no clipboard for the page, or it refused.
|
|
14
|
+
* `detail.error` says which.
|
|
15
|
+
*
|
|
16
|
+
* @slot copy-icon - The icon of the button. Unset, two sheets.
|
|
17
|
+
* @slot success-icon - The icon after the text was copied. Unset, a check mark.
|
|
18
|
+
* @slot error-icon - The icon after the text could not be copied. Unset, a cross.
|
|
19
|
+
*
|
|
20
|
+
* @csspart base - The native `<button>`.
|
|
21
|
+
* @csspart icon - The icon, around the slot that is shown.
|
|
22
|
+
* @csspart feedback - The text of the outcome, a live region that is not shown.
|
|
23
|
+
*
|
|
24
|
+
* @property {string} value - The text to copy.
|
|
25
|
+
* @property {string} from - The id of an element whose content is copied in the place of `value`:
|
|
26
|
+
* its `value` if it has one, its text otherwise.
|
|
27
|
+
* @property {boolean} disabled - Disables the button.
|
|
28
|
+
* @property {'small'|'medium'|'large'} size - The size of the button. Default `'medium'`.
|
|
29
|
+
* Reflected to the `size` attribute.
|
|
30
|
+
* @property {number} feedbackDuration - How long the outcome is shown, in milliseconds. Default
|
|
31
|
+
* `1500`.
|
|
32
|
+
* @property {string} label - The accessible name of the button. Default `'Copy'`.
|
|
33
|
+
* @property {string} successLabel - What a screen reader hears after the text was copied. Default
|
|
34
|
+
* `'Copied'`.
|
|
35
|
+
* @property {string} errorLabel - What a screen reader hears after the text could not be copied.
|
|
36
|
+
* Default `'Could not copy'`.
|
|
37
|
+
* @property {'idle'|'success'|'error'} status - The outcome that is shown right now, set by the
|
|
38
|
+
* button. Reflected to the `status` attribute, so that a stylesheet can select it.
|
|
39
|
+
*/
|
|
40
|
+
export default class CopyButton extends TemplateElement {
|
|
41
|
+
status: string;
|
|
42
|
+
_feedbackTimer: number;
|
|
43
|
+
constructor();
|
|
44
|
+
properties(): {
|
|
45
|
+
value: string;
|
|
46
|
+
from: string;
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
size: string;
|
|
49
|
+
feedbackDuration: number;
|
|
50
|
+
label: string;
|
|
51
|
+
successLabel: string;
|
|
52
|
+
errorLabel: string;
|
|
53
|
+
status: string;
|
|
54
|
+
};
|
|
55
|
+
disconnected(): void;
|
|
56
|
+
events(): {
|
|
57
|
+
'[part~="base"]': {
|
|
58
|
+
click: () => Promise<boolean>;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
/** Focuses the button. */
|
|
62
|
+
focus(options: any): void;
|
|
63
|
+
/** Removes focus from the button. */
|
|
64
|
+
blur(): void;
|
|
65
|
+
/** Simulates a click on the button. */
|
|
66
|
+
click(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Copies the text to the clipboard, shows the outcome and fires `copy-button-copy` or
|
|
69
|
+
* `copy-button-error`. Does nothing while the button is disabled.
|
|
70
|
+
* @returns {Promise<boolean>} Whether the text was copied.
|
|
71
|
+
*/
|
|
72
|
+
copy(): Promise<boolean>;
|
|
73
|
+
/**
|
|
74
|
+
* The text to copy: from the element that `from` names, or `value`. An element with a `value`
|
|
75
|
+
* of its own, an input or a field, gives that, any other one its text without the white space
|
|
76
|
+
* around it.
|
|
77
|
+
* @private
|
|
78
|
+
* @returns {string}
|
|
79
|
+
*/
|
|
80
|
+
private _text;
|
|
81
|
+
/**
|
|
82
|
+
* Shows an outcome, and takes it back after `feedbackDuration`. An outcome that is shown
|
|
83
|
+
* already starts its time again.
|
|
84
|
+
* @private
|
|
85
|
+
* @param {'success'|'error'} status
|
|
86
|
+
*/
|
|
87
|
+
private _show;
|
|
88
|
+
/** @private */
|
|
89
|
+
private iconTemplate;
|
|
90
|
+
template(): any;
|
|
91
|
+
}
|
|
92
|
+
export declare function define(): void;
|
|
93
|
+
export { Events };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import InputField from '../input-field/input-field.js';
|
|
2
|
+
/**
|
|
3
|
+
* A date, a time or both, entered in the control of the browser and picked in its picker. Extends
|
|
4
|
+
* `InputField` (and therefore `FormField`), inheriting the label / help / error / validation
|
|
5
|
+
* surface and the look from `styles/native.css`.
|
|
6
|
+
*
|
|
7
|
+
* It adds what a date needs and a text does not: the earliest and the latest value, and the step
|
|
8
|
+
* between two values. The value is text in the one format of the control, whatever the language of
|
|
9
|
+
* the user, and the field takes over what the control makes of a value: `value` says what the form
|
|
10
|
+
* submits.
|
|
11
|
+
*
|
|
12
|
+
* @element el-date-field
|
|
13
|
+
*
|
|
14
|
+
* @fires {CustomEvent<string>} input-change - Fired when the value changes: entered, picked, or set
|
|
15
|
+
* by a script. `detail` is the new value. Bubbles.
|
|
16
|
+
*
|
|
17
|
+
* @property {'date'|'time'|'datetime-local'|'month'|'week'} type - What the field takes. Default
|
|
18
|
+
* `'date'`.
|
|
19
|
+
* @property {string | null} value - The value, in the format of the control: `2026-11-15` for a
|
|
20
|
+
* date, `14:30` for a time, `2026-11-15T14:30` for both, `2026-11` for a month, `2026-W46` for a
|
|
21
|
+
* week. A value in another format is empty for the control, and the field takes that over.
|
|
22
|
+
* @property {string | null} min - The earliest value, in the format of the control. `null` (the
|
|
23
|
+
* default) is no limit.
|
|
24
|
+
* @property {string | null} max - The latest value, in the format of the control. `null` (the
|
|
25
|
+
* default) is no limit.
|
|
26
|
+
* @property {number | 'any' | null} step - The distance between two values: days for a date, weeks
|
|
27
|
+
* for a week, months for a month, seconds for a time. `null` (the default) is the step of the
|
|
28
|
+
* browser: a day, a week, a month, a minute.
|
|
29
|
+
*/
|
|
30
|
+
export default class DateField extends InputField {
|
|
31
|
+
constructor(options: any);
|
|
32
|
+
properties(): {
|
|
33
|
+
name: string;
|
|
34
|
+
value: any;
|
|
35
|
+
required: boolean;
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
label: string;
|
|
38
|
+
labelScreenReaderOnly: boolean;
|
|
39
|
+
errorMessage: string;
|
|
40
|
+
helpMessage: string;
|
|
41
|
+
valid: boolean;
|
|
42
|
+
touched: boolean;
|
|
43
|
+
size: string;
|
|
44
|
+
placeholder: string;
|
|
45
|
+
pattern: boolean;
|
|
46
|
+
autocomplete: any;
|
|
47
|
+
inputmode: any;
|
|
48
|
+
enterkeyhint: any;
|
|
49
|
+
autocapitalize: any;
|
|
50
|
+
autocorrect: any;
|
|
51
|
+
spellcheck: any;
|
|
52
|
+
type: string;
|
|
53
|
+
min: any;
|
|
54
|
+
max: any;
|
|
55
|
+
step: any;
|
|
56
|
+
};
|
|
57
|
+
afterUpdate(): void;
|
|
58
|
+
watch(): {
|
|
59
|
+
valid: () => void;
|
|
60
|
+
touched: () => void;
|
|
61
|
+
value: (value: any, oldValue: any) => void;
|
|
62
|
+
};
|
|
63
|
+
events(): {
|
|
64
|
+
'.is-invalid': {
|
|
65
|
+
focus: () => void;
|
|
66
|
+
};
|
|
67
|
+
'[data-clear-input]': {
|
|
68
|
+
click: () => void;
|
|
69
|
+
touchstart: () => void;
|
|
70
|
+
};
|
|
71
|
+
'[ref=input]': {
|
|
72
|
+
focus: () => void;
|
|
73
|
+
blur: () => void;
|
|
74
|
+
keyup: (event: any) => void;
|
|
75
|
+
change: () => void;
|
|
76
|
+
invalid: (event: any) => void;
|
|
77
|
+
input: () => void;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Makes the control and `value` say the same, after every render and every change of `value`.
|
|
82
|
+
*
|
|
83
|
+
* The `value` attribute of the control is only its default: once the user has entered a date,
|
|
84
|
+
* a value from outside has to be written to the control. The control in turn takes a value in
|
|
85
|
+
* its own format only and is empty for every other, `15.11.2026` for example, or a date for a
|
|
86
|
+
* field that has become one for a time. The field takes over what the control made of the
|
|
87
|
+
* value: that is what the form submits.
|
|
88
|
+
*
|
|
89
|
+
* The field hears every change the user makes (`input`), so the control never has a value of
|
|
90
|
+
* the user that this would write over. While the two say the same nothing is written: the
|
|
91
|
+
* control would drop a date that is half entered.
|
|
92
|
+
* @private
|
|
93
|
+
*/
|
|
94
|
+
private _matchControl;
|
|
95
|
+
/**
|
|
96
|
+
* The limits and the step, for the control. An empty one is none: a page that renders
|
|
97
|
+
* `min=""` for "no limit" means the same as one that leaves the attribute out.
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
private _controlAttributes;
|
|
101
|
+
}
|
|
102
|
+
export declare function define(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|