@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,19 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import FormField from '../form-field/form-field.js';
|
|
2
2
|
/**
|
|
3
3
|
* Numeric amount stepper input. Renders a readonly `<input type="number">` flanked by
|
|
4
4
|
* increment (`+`) and decrement (`-`) buttons, with optional `min` and `max` bounds.
|
|
5
|
-
* Extends `FormField`
|
|
5
|
+
* Extends `FormField`: the `label` is rendered above the stepper and names the input, the help
|
|
6
|
+
* message between the two, and the error message below the stepper while the field is touched and
|
|
7
|
+
* not valid. The input names both messages in `aria-describedby`.
|
|
6
8
|
*
|
|
7
|
-
*
|
|
9
|
+
* The field renders into the page, as every field does. Its input belongs to the form around it and
|
|
10
|
+
* is submitted with it, under the `name` of the field.
|
|
8
11
|
*
|
|
9
|
-
* @
|
|
10
|
-
* @slot minus - Replaces the default `-` glyph in the decrement button.
|
|
12
|
+
* @element el-amount-field
|
|
11
13
|
*
|
|
12
|
-
* @
|
|
13
|
-
* @
|
|
14
|
-
* @csspart plus - Applied to the increment button (in addition to `button`).
|
|
15
|
-
* @csspart minus - Applied to the decrement button (in addition to `button`).
|
|
16
|
-
* @csspart input - The numeric input element.
|
|
14
|
+
* @cssprop [--el-amount-field-plus='+'] - The sign of the increment button, a CSS string.
|
|
15
|
+
* @cssprop [--el-amount-field-minus='-'] - The sign of the decrement button, a CSS string.
|
|
17
16
|
*
|
|
18
17
|
* @property {string} name - Form name for the underlying `<input>` element.
|
|
19
18
|
* @property {number} value - Current numeric value of the field.
|
|
@@ -21,14 +20,14 @@ export function define(): void;
|
|
|
21
20
|
* above.
|
|
22
21
|
* @property {number | false} min - Lower bound. Set to `false` to leave the value unbounded
|
|
23
22
|
* below.
|
|
23
|
+
* @property {string} plusLabel - The accessible name of the increment button. Default
|
|
24
|
+
* `'Increase'`.
|
|
25
|
+
* @property {string} minusLabel - The accessible name of the decrement button. Default
|
|
26
|
+
* `'Decrease'`.
|
|
24
27
|
*/
|
|
25
28
|
export default class AmountField extends FormField {
|
|
26
|
-
constructor();
|
|
29
|
+
constructor(options: any);
|
|
27
30
|
properties(): {
|
|
28
|
-
name: string;
|
|
29
|
-
value: number;
|
|
30
|
-
max: boolean;
|
|
31
|
-
min: number;
|
|
32
31
|
required: boolean;
|
|
33
32
|
disabled: boolean;
|
|
34
33
|
label: string;
|
|
@@ -37,6 +36,12 @@ export default class AmountField extends FormField {
|
|
|
37
36
|
helpMessage: string;
|
|
38
37
|
valid: boolean;
|
|
39
38
|
touched: boolean;
|
|
39
|
+
name: string;
|
|
40
|
+
value: number;
|
|
41
|
+
max: boolean;
|
|
42
|
+
min: number;
|
|
43
|
+
plusLabel: string;
|
|
44
|
+
minusLabel: string;
|
|
40
45
|
};
|
|
41
46
|
events(): {
|
|
42
47
|
'[ref=plus]': {
|
|
@@ -49,5 +54,14 @@ export default class AmountField extends FormField {
|
|
|
49
54
|
change: () => any;
|
|
50
55
|
};
|
|
51
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* The stepper: the two buttons around the input. The buttons are of the type `button`, a button
|
|
59
|
+
* without a type submits the form it is in. Their signs are drawn by the stylesheet, so each
|
|
60
|
+
* has its name as a label.
|
|
61
|
+
*
|
|
62
|
+
* A bound that is not set leaves its attribute out of the input. A button is disabled at its
|
|
63
|
+
* bound, and both are with the field.
|
|
64
|
+
*/
|
|
65
|
+
fieldTemplate(): any;
|
|
52
66
|
}
|
|
53
|
-
|
|
67
|
+
export declare function define(): void;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { TemplateElement } from '@webtides/element-js';
|
|
2
|
+
/**
|
|
3
|
+
* An avatar: the picture that stands for a person or a thing. It shows the first of these that it
|
|
4
|
+
* has: the image, the initials, an icon. An image that cannot be loaded makes way for the next.
|
|
5
|
+
* With a `label` it is an image with that name for assistive technology; without one it is a
|
|
6
|
+
* decoration beside a name that is written out.
|
|
7
|
+
*
|
|
8
|
+
* @element el-avatar
|
|
9
|
+
*
|
|
10
|
+
* @slot icon - The icon that is shown without an image and without initials. Unset, it is the
|
|
11
|
+
* outline of a person.
|
|
12
|
+
*
|
|
13
|
+
* @csspart base - The shape of the avatar: background, radius. It carries the role and the label.
|
|
14
|
+
* @csspart image - The image.
|
|
15
|
+
* @csspart initials - The initials.
|
|
16
|
+
* @csspart icon - The region of the `icon` slot.
|
|
17
|
+
*
|
|
18
|
+
* @cssproperty --el-avatar-size - The width and the height of the avatar. Unset, the `size`
|
|
19
|
+
* decides.
|
|
20
|
+
*
|
|
21
|
+
* @property {string} image - The address of the image.
|
|
22
|
+
* @property {string} label - The accessible name of the avatar, the name of the person for
|
|
23
|
+
* example. Without it the avatar is hidden from assistive technology.
|
|
24
|
+
* @property {string} initials - One or two letters that are shown without an image.
|
|
25
|
+
* @property {'circle'|'square'|'rounded'} shape - The shape of the avatar. Default `'circle'`.
|
|
26
|
+
* Reflected to the `shape` attribute.
|
|
27
|
+
* @property {'small'|'medium'|'large'} size - The width and the height: the control height of that
|
|
28
|
+
* size, `--el-control-height` times 0.8, 1 or 1.25.
|
|
29
|
+
* Default `'medium'`. Reflected to the `size` attribute.
|
|
30
|
+
*/
|
|
31
|
+
export default class Avatar extends TemplateElement {
|
|
32
|
+
_failedImage: any;
|
|
33
|
+
constructor();
|
|
34
|
+
properties(): {
|
|
35
|
+
image: string;
|
|
36
|
+
label: string;
|
|
37
|
+
initials: string;
|
|
38
|
+
shape: string;
|
|
39
|
+
size: string;
|
|
40
|
+
};
|
|
41
|
+
connected(): void;
|
|
42
|
+
events(): {
|
|
43
|
+
'[ref=image]': {
|
|
44
|
+
error: () => void;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Remembers the image that could not be loaded, so that the next thing the avatar has is
|
|
49
|
+
* shown instead. Another address in `image` is tried again.
|
|
50
|
+
* @private
|
|
51
|
+
*/
|
|
52
|
+
private _giveUpOnImage;
|
|
53
|
+
/** @private */
|
|
54
|
+
private _contentTemplate;
|
|
55
|
+
template(): any;
|
|
56
|
+
}
|
|
57
|
+
export declare function define(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TemplateElement } from '@webtides/element-js';
|
|
2
|
+
/**
|
|
3
|
+
* A badge: a short label that marks something with a status or a count ("New", "3"). Pure
|
|
4
|
+
* presentation, without a role and without behaviour. It speaks the library's shared vocabulary
|
|
5
|
+
* for its colours, a semantic `variant` and an `appearance`, and is sized by the font size of the
|
|
6
|
+
* text it stands in.
|
|
7
|
+
*
|
|
8
|
+
* @element el-badge
|
|
9
|
+
*
|
|
10
|
+
* @slot - The text of the badge.
|
|
11
|
+
*
|
|
12
|
+
* @csspart base - The surface of the badge: background, border, radius.
|
|
13
|
+
*
|
|
14
|
+
* @property {'neutral'|'brand'|'success'|'warning'|'danger'} variant - Semantic variant, which
|
|
15
|
+
* picks the colours. Default `'neutral'`. Reflected to the `variant` attribute.
|
|
16
|
+
* @property {'filled'|'outlined'|'plain'} appearance - How the colours of the variant are painted:
|
|
17
|
+
* as a fill, as a border around a transparent badge, or as text only. Default `'filled'`.
|
|
18
|
+
* Reflected to the `appearance` attribute.
|
|
19
|
+
* @property {boolean} pill - Fully rounded ends. A badge with a single character is a circle.
|
|
20
|
+
* @property {boolean} pulse - Draws attention: a ring spreads from the badge, again and again.
|
|
21
|
+
*/
|
|
22
|
+
export default class Badge extends TemplateElement {
|
|
23
|
+
constructor();
|
|
24
|
+
properties(): {
|
|
25
|
+
variant: string;
|
|
26
|
+
appearance: string;
|
|
27
|
+
pill: boolean;
|
|
28
|
+
pulse: boolean;
|
|
29
|
+
};
|
|
30
|
+
template(): any;
|
|
31
|
+
}
|
|
32
|
+
export declare function define(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TemplateElement } from '@webtides/element-js';
|
|
2
|
+
/**
|
|
3
|
+
* A breadcrumb: the trail from the start page to the current page, for a page deep inside of a
|
|
4
|
+
* site. The breadcrumb is the landmark and the list; every `el-breadcrumb-item` slotted into it is
|
|
5
|
+
* one entry of the trail. A trail that does not fit breaks into a second line.
|
|
6
|
+
*
|
|
7
|
+
* @element el-breadcrumb
|
|
8
|
+
*
|
|
9
|
+
* @slot - The entries of the trail: `el-breadcrumb-item` elements, from the start page to the
|
|
10
|
+
* current page.
|
|
11
|
+
*
|
|
12
|
+
* @csspart base - The `nav` landmark.
|
|
13
|
+
* @csspart list - The list of the entries.
|
|
14
|
+
*
|
|
15
|
+
* @cssproperty --el-breadcrumb-separator - What stands between two entries, as a CSS string.
|
|
16
|
+
* Unset, it is `'/'`. Read by the items, so it can be set on the breadcrumb or for the page.
|
|
17
|
+
*
|
|
18
|
+
* @property {string} label - The name of the landmark. Default `'Breadcrumb'`.
|
|
19
|
+
*/
|
|
20
|
+
export default class Breadcrumb extends TemplateElement {
|
|
21
|
+
constructor();
|
|
22
|
+
properties(): {
|
|
23
|
+
label: string;
|
|
24
|
+
};
|
|
25
|
+
template(): any;
|
|
26
|
+
}
|
|
27
|
+
export declare function define(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { TemplateElement } from '@webtides/element-js';
|
|
2
|
+
/**
|
|
3
|
+
* One entry of a breadcrumb: a link to a page on the way to the current one with `href`, plain
|
|
4
|
+
* text without. `current` marks the entry of the page the user is on. Every entry but the first
|
|
5
|
+
* brings the separator that stands in front of it.
|
|
6
|
+
*
|
|
7
|
+
* @element el-breadcrumb-item
|
|
8
|
+
*
|
|
9
|
+
* @slot - The name of the page.
|
|
10
|
+
*
|
|
11
|
+
* @csspart base - The entry: an item of the list of the breadcrumb.
|
|
12
|
+
* @csspart separator - What stands in front of the entry. Hidden for the first one, and from
|
|
13
|
+
* assistive technology.
|
|
14
|
+
* @csspart label - The name of the page: an `<a>` with `href`, a `<span>` without.
|
|
15
|
+
*
|
|
16
|
+
* @cssproperty --el-breadcrumb-separator - What stands in front of the entry, as a CSS string.
|
|
17
|
+
* Unset, it is `'/'`.
|
|
18
|
+
*
|
|
19
|
+
* @property {string} href - The address of the page. Unset, the entry is text and no link.
|
|
20
|
+
* @property {string} target - Where to open the page (only with `href`).
|
|
21
|
+
* @property {string} rel - `rel` attribute for the link, written when `target` is set. Default
|
|
22
|
+
* `'noreferrer noopener'`.
|
|
23
|
+
* @property {boolean} current - The entry is the page the user is on: it gets
|
|
24
|
+
* `aria-current="page"`. Default `false`.
|
|
25
|
+
*/
|
|
26
|
+
export default class BreadcrumbItem extends TemplateElement {
|
|
27
|
+
constructor();
|
|
28
|
+
properties(): {
|
|
29
|
+
href: string;
|
|
30
|
+
target: string;
|
|
31
|
+
rel: string;
|
|
32
|
+
current: boolean;
|
|
33
|
+
};
|
|
34
|
+
/** @private */
|
|
35
|
+
private labelTemplate;
|
|
36
|
+
template(): any;
|
|
37
|
+
}
|
|
38
|
+
export declare function define(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import { TemplateElement } from '@webtides/element-js';
|
|
2
2
|
/**
|
|
3
3
|
* A themeable button that renders a native `<button>` — or an `<a>` when `href` is set — and
|
|
4
|
-
* decorates it with the `--el-*` design tokens.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* decorates it with the `--el-*` design tokens. Speaks the library's shared vocabulary: a semantic
|
|
5
|
+
* `variant`, an `appearance` and a `size`. Also supports pill / circle shapes, an optional
|
|
6
|
+
* dropdown caret and a loading spinner.
|
|
7
|
+
*
|
|
8
|
+
* ARIA attributes on the element reach the control inside it, which is what has the focus and what
|
|
9
|
+
* a screen reader announces: `aria-label`, `aria-description`, `aria-expanded`, `aria-haspopup`,
|
|
10
|
+
* `aria-pressed` and `aria-current` as they are, `aria-labelledby`, `aria-describedby` and
|
|
11
|
+
* `aria-controls` as references to the elements they name.
|
|
12
|
+
*
|
|
13
|
+
* The element is form-associated: a `<fieldset disabled>` around it disables it, and it is listed in
|
|
14
|
+
* the `elements` of its form. A button of the type `submit` submits its form with a hidden native
|
|
15
|
+
* `<button type="submit">` in its content: it is the `submitter` of the `submit` event, its `name`
|
|
16
|
+
* and `value` are in the data of the form, and Enter in a field of the form finds it. The element
|
|
17
|
+
* makes that button when the form is first submitted with it, by a click or by Enter in a field.
|
|
18
|
+
* Until then its content is what the page wrote, so a framework can hydrate a server-rendered
|
|
19
|
+
* button, also when the element has started before the framework does. The attributes `form`,
|
|
20
|
+
* `formaction`, `formenctype`, `formmethod`, `formnovalidate` and `formtarget` of the element do
|
|
21
|
+
* what they do on a native button. A `click` listener of the page that calls `preventDefault()`
|
|
22
|
+
* keeps the button from submitting or resetting.
|
|
7
23
|
*
|
|
8
24
|
* @element el-button
|
|
9
25
|
*
|
|
@@ -18,29 +34,55 @@ export function define(): void;
|
|
|
18
34
|
* @csspart caret - The dropdown caret, present only while `caret` is `true`.
|
|
19
35
|
* @csspart spinner - The loading spinner, present only while `loading` is `true`.
|
|
20
36
|
*
|
|
21
|
-
* @property {'
|
|
22
|
-
*
|
|
23
|
-
* @property {'
|
|
24
|
-
*
|
|
37
|
+
* @property {'neutral'|'brand'|'success'|'warning'|'danger'} variant - Semantic variant, which
|
|
38
|
+
* picks the colours. Default `'neutral'`. Reflected to the `variant` attribute.
|
|
39
|
+
* @property {'filled'|'outlined'|'plain'} appearance - How the colours of the variant are painted:
|
|
40
|
+
* as a fill, as a border around a transparent button, or as text only. Default `'filled'`.
|
|
41
|
+
* Reflected to the `appearance` attribute.
|
|
42
|
+
* @property {'small'|'medium'|'large'} size - Button size. Default `'medium'`. Reflected to the
|
|
43
|
+
* `size` attribute.
|
|
25
44
|
* @property {boolean} pill - Fully rounded ends.
|
|
26
45
|
* @property {boolean} circle - Renders a square, fully-rounded icon button (use with a single icon).
|
|
27
46
|
* @property {boolean} caret - Appends a dropdown caret after the label.
|
|
28
47
|
* @property {boolean} loading - Shows a spinner and blocks interaction.
|
|
29
|
-
* @property {boolean} disabled - Disables the button.
|
|
48
|
+
* @property {boolean} disabled - Disables the button. Reflected to the `disabled` attribute, which is
|
|
49
|
+
* there while the button is disabled and gone while it is not.
|
|
30
50
|
* @property {'button'|'submit'|'reset'} type - Behaviour when activated. `submit` / `reset` act on
|
|
31
|
-
* the nearest ancestor `<form
|
|
32
|
-
*
|
|
33
|
-
* @property {string}
|
|
51
|
+
* the form of the button: the nearest ancestor `<form>`, or the one its `form` attribute names.
|
|
52
|
+
* Ignored when `href` is set. Default `'button'`.
|
|
53
|
+
* @property {string} name - Name submitted with the form, when the form is submitted with this
|
|
54
|
+
* button (button mode only).
|
|
55
|
+
* @property {string} value - Value submitted under that name (button mode only).
|
|
34
56
|
* @property {string} href - When set, the button renders as a link to this URL.
|
|
35
57
|
* @property {string} target - Where to open the linked URL (link mode only).
|
|
36
58
|
* @property {string} rel - `rel` attribute for the link (link mode only). Default `'noreferrer noopener'`.
|
|
37
59
|
* @property {string} download - Tells the browser to download the linked URL (link mode only).
|
|
38
60
|
*/
|
|
39
|
-
export default class Button {
|
|
61
|
+
export default class Button extends TemplateElement {
|
|
62
|
+
disabled: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* The platform tells a form-associated element when a `<fieldset disabled>` around it disables
|
|
65
|
+
* it, and resolves its `form` attribute.
|
|
66
|
+
*/
|
|
67
|
+
static formAssociated: boolean;
|
|
68
|
+
static get observedAttributes(): string[];
|
|
69
|
+
/**
|
|
70
|
+
* The native submit button of a button of the type `submit`, see `_syncSubmitter()`.
|
|
71
|
+
* @private
|
|
72
|
+
* @type {HTMLButtonElement | undefined}
|
|
73
|
+
*/
|
|
74
|
+
private _submitter;
|
|
75
|
+
/**
|
|
76
|
+
* Where the element listens for Enter in a field of its form, see `afterUpdate()`.
|
|
77
|
+
* @private
|
|
78
|
+
* @type {Node | undefined}
|
|
79
|
+
*/
|
|
80
|
+
private _keydownRoot;
|
|
81
|
+
constructor();
|
|
40
82
|
properties(): {
|
|
41
83
|
variant: string;
|
|
84
|
+
appearance: string;
|
|
42
85
|
size: string;
|
|
43
|
-
outline: boolean;
|
|
44
86
|
pill: boolean;
|
|
45
87
|
circle: boolean;
|
|
46
88
|
caret: boolean;
|
|
@@ -56,6 +98,46 @@ export default class Button {
|
|
|
56
98
|
};
|
|
57
99
|
/** Whether the button renders as a link rather than a native button. */
|
|
58
100
|
get isLink(): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* An ARIA attribute of the element, or one it shares with a native submit button, was set,
|
|
103
|
+
* changed or removed. They are no properties of the component: the template and the submit
|
|
104
|
+
* button read them from the element, so a change asks for a new render. Before the first render
|
|
105
|
+
* there is nothing to do, it reads them anyway.
|
|
106
|
+
*
|
|
107
|
+
* `disabled` is a property. For the platform an attribute that is there disables a
|
|
108
|
+
* form-associated element, whatever it says: the browser then keeps every click from it. The
|
|
109
|
+
* library reads `disabled="false"` and an attribute without a value as not disabled, so those
|
|
110
|
+
* are taken off the element.
|
|
111
|
+
*/
|
|
112
|
+
attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
|
|
113
|
+
/**
|
|
114
|
+
* The platform says that the element is disabled, or no longer is: by its own attribute, or by a
|
|
115
|
+
* `<fieldset disabled>` around it. The template asks the platform, see `_isDisabled()`.
|
|
116
|
+
*/
|
|
117
|
+
formDisabledCallback(): void;
|
|
118
|
+
/**
|
|
119
|
+
* `disabled` is reflected as the platform reads it: the attribute is there while the button is
|
|
120
|
+
* disabled, and gone while it is not. element-js would write `disabled="false"`.
|
|
121
|
+
* @param {{ property: string, newValue: unknown }} options
|
|
122
|
+
*/
|
|
123
|
+
reflectProperty(options: {
|
|
124
|
+
property: string;
|
|
125
|
+
newValue: unknown;
|
|
126
|
+
}): void;
|
|
127
|
+
afterUpdate(): void;
|
|
128
|
+
disconnected(): void;
|
|
129
|
+
/**
|
|
130
|
+
* Enter in a field of the form submits the form with its first submit button, and without one
|
|
131
|
+
* only a form with a single field. The browser looks for that button once every listener has
|
|
132
|
+
* had the key, so the native submit button of the element is made here, if it is not there yet.
|
|
133
|
+
*
|
|
134
|
+
* Only for a key the browser may submit with: Enter in an `<input>` or a `<select>` of the
|
|
135
|
+
* form, and not while a text is being composed. Enter in a `<textarea>` is a line break, and
|
|
136
|
+
* leaves the content of the element as it is.
|
|
137
|
+
* @private
|
|
138
|
+
* @param {KeyboardEvent} event
|
|
139
|
+
*/
|
|
140
|
+
private _onRootKeydown;
|
|
59
141
|
/** Focuses the underlying control. */
|
|
60
142
|
focus(options: any): void;
|
|
61
143
|
/** Removes focus from the underlying control. */
|
|
@@ -67,7 +149,69 @@ export default class Button {
|
|
|
67
149
|
click: (event: any) => void;
|
|
68
150
|
};
|
|
69
151
|
};
|
|
152
|
+
/**
|
|
153
|
+
* Runs `action` once every listener has had `event`, and not when one of them has prevented it:
|
|
154
|
+
* what the platform does with the activation of a native control. The listener of the control
|
|
155
|
+
* is the first on the path of a click, before every listener of the page.
|
|
156
|
+
*
|
|
157
|
+
* The last target on the path is the window, and a listener that is added there now comes after
|
|
158
|
+
* the ones it has: `action` runs inside of the click, as a caller of `click()` expects. A
|
|
159
|
+
* listener on the way that stops the event keeps it from getting there. The platform acts all
|
|
160
|
+
* the same, so `action` runs a task later then.
|
|
161
|
+
* @private
|
|
162
|
+
* @param {Event} event
|
|
163
|
+
* @param {() => void} action
|
|
164
|
+
*/
|
|
165
|
+
private _afterListeners;
|
|
166
|
+
/**
|
|
167
|
+
* Whether the button is disabled: by its own `disabled`, or by a `<fieldset disabled>` around
|
|
168
|
+
* it. The platform knows the second, and counts the attribute of the element as well. On the
|
|
169
|
+
* server there is no tree to ask.
|
|
170
|
+
* @private
|
|
171
|
+
* @returns {boolean}
|
|
172
|
+
*/
|
|
173
|
+
private _isDisabled;
|
|
174
|
+
/**
|
|
175
|
+
* Keeps the native submit button of a button of the type `submit`: a hidden
|
|
176
|
+
* `<button type="submit">` in the content of the element, in the page, where it belongs to the
|
|
177
|
+
* form. A form is submitted with a submit button that belongs to it, and with nothing else: the
|
|
178
|
+
* button is the `submitter` of the `submit` event, its `name` and `value` are in the data, it
|
|
179
|
+
* says how to submit (`formmethod`, `formnovalidate`, …), and Enter in a field looks for it.
|
|
180
|
+
* The control in the shadow root has no form, and the element itself is no submit button for the
|
|
181
|
+
* platform.
|
|
182
|
+
*
|
|
183
|
+
* The button takes over `name`, `value` and the attributes of the element that a native submit
|
|
184
|
+
* button has. It is disabled while the element is disabled or loading, which keeps Enter from
|
|
185
|
+
* submitting as well. One that is in the content already is taken: written by the page, for a
|
|
186
|
+
* form that is submitted with Enter before the script has run, or copied with the element.
|
|
187
|
+
*
|
|
188
|
+
* The element makes the button only when the form is about to be submitted with it (`create`):
|
|
189
|
+
* with a click, or with Enter in a field. A render does not. The content of the element is what
|
|
190
|
+
* the page wrote until then: a framework that hydrates a server-rendered page after the element
|
|
191
|
+
* has started finds the children it rendered, and no other.
|
|
192
|
+
* @private
|
|
193
|
+
* @param {boolean} [create] - Whether to make the button when there is none.
|
|
194
|
+
* @returns {HTMLButtonElement | null} The submit button, or `null`: for a button of another
|
|
195
|
+
* type, and while there is none and none was asked for.
|
|
196
|
+
*/
|
|
197
|
+
private _syncSubmitter;
|
|
198
|
+
/**
|
|
199
|
+
* The ARIA attributes of the element, for the control. An empty one counts as not set: none of
|
|
200
|
+
* them has an empty value, and element-js writes an attribute that was there from the start
|
|
201
|
+
* back as an empty one when it is removed.
|
|
202
|
+
* @private
|
|
203
|
+
* @returns {Object<string, string | undefined>}
|
|
204
|
+
*/
|
|
205
|
+
private _ariaAttributes;
|
|
206
|
+
/**
|
|
207
|
+
* Hands the control the elements that the element names by id in `aria-labelledby`,
|
|
208
|
+
* `aria-describedby` and `aria-controls`. They are looked up when the button renders, so an
|
|
209
|
+
* element that comes into the page later is found once the attribute is set again.
|
|
210
|
+
* @private
|
|
211
|
+
*/
|
|
212
|
+
private _syncAriaRelations;
|
|
70
213
|
/** @private */
|
|
71
214
|
private contentTemplate;
|
|
72
215
|
template(): any;
|
|
73
216
|
}
|
|
217
|
+
export declare function define(): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TemplateElement } from '@webtides/element-js';
|
|
2
|
+
/**
|
|
3
|
+
* A button group: a row of `el-button` that reads as one control, the actions of a toolbar, a
|
|
4
|
+
* button with a second one for more options, the steps back and forward. The buttons touch, only
|
|
5
|
+
* the outer corners of the row are rounded, and a line divides two neighbours. To assistive
|
|
6
|
+
* technology it is a group, with a name.
|
|
7
|
+
*
|
|
8
|
+
* The group joins its buttons with its stylesheet alone. It runs no script on them, so a
|
|
9
|
+
* server-rendered group does not change when the elements take over.
|
|
10
|
+
*
|
|
11
|
+
* @element el-button-group
|
|
12
|
+
*
|
|
13
|
+
* @slot - The buttons of the group: `el-button` elements, or elements that hold one (an
|
|
14
|
+
* `el-popover` with its anchor).
|
|
15
|
+
*
|
|
16
|
+
* @csspart base - The row. It carries `role="group"` and the label.
|
|
17
|
+
*
|
|
18
|
+
* @property {string} label - The accessible name of the group, "Text alignment". Unset, the group
|
|
19
|
+
* has no name. Default `''`.
|
|
20
|
+
*/
|
|
21
|
+
export default class ButtonGroup extends TemplateElement {
|
|
22
|
+
constructor();
|
|
23
|
+
properties(): {
|
|
24
|
+
label: string;
|
|
25
|
+
};
|
|
26
|
+
template(): any;
|
|
27
|
+
}
|
|
28
|
+
export declare function define(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TemplateElement } from '@webtides/element-js';
|
|
2
|
+
/**
|
|
3
|
+
* A card: a surface that groups what belongs together, a form, a section of settings, an entry of
|
|
4
|
+
* a list. It has four regions, each of them a slot: `media` at the top, then `header`, the body and
|
|
5
|
+
* `footer`. A region that nothing is slotted into takes no space. Pure presentation, without a role
|
|
6
|
+
* and without behaviour.
|
|
7
|
+
*
|
|
8
|
+
* @element el-card
|
|
9
|
+
*
|
|
10
|
+
* @slot - The body of the card.
|
|
11
|
+
* @slot media - An image or a video at the top of the card, from edge to edge.
|
|
12
|
+
* @slot header - The title of the card, and what stands beside it, an action for example.
|
|
13
|
+
* @slot footer - What closes the card: actions, a note.
|
|
14
|
+
*
|
|
15
|
+
* @csspart base - The surface of the card: background, border, radius, shadow.
|
|
16
|
+
* @csspart media - The region of the `media` slot.
|
|
17
|
+
* @csspart header - The region of the `header` slot.
|
|
18
|
+
* @csspart body - The region of the default slot.
|
|
19
|
+
* @csspart footer - The region of the `footer` slot.
|
|
20
|
+
*
|
|
21
|
+
* @cssproperty --el-card-padding - The padding of the header, the body and the footer. Unset, it
|
|
22
|
+
* is `--el-space-4`, and `1rem` without a theme.
|
|
23
|
+
*
|
|
24
|
+
* @property {'outlined'|'filled'|'plain'} appearance - How the surface is painted: with the
|
|
25
|
+
* background of the page and a border, with a muted fill and a border, or not at all. Default
|
|
26
|
+
* `'outlined'`. Reflected to the `appearance` attribute.
|
|
27
|
+
*/
|
|
28
|
+
export default class Card extends TemplateElement {
|
|
29
|
+
constructor();
|
|
30
|
+
properties(): {
|
|
31
|
+
appearance: string;
|
|
32
|
+
};
|
|
33
|
+
events(): {
|
|
34
|
+
"[part~='base']": {
|
|
35
|
+
slotchange: () => any;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
template(): any;
|
|
39
|
+
}
|
|
40
|
+
export declare function define(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { TemplateElement, html, defineElement } from '@webtides/element-js';
|
|
2
|
+
import CarouselEvents from './carousel.events.js';
|
|
2
3
|
/**
|
|
3
4
|
* Carousel/slider component backed by Glide.js. Direct children of the host element are
|
|
4
5
|
* treated as slides; the component renders Glide's controls (navigation arrows and bullet
|
|
5
|
-
* pager) inside the shadow DOM around them.
|
|
6
|
+
* pager) inside the shadow DOM around them. A bullet is a button named by `dotLabel` and the
|
|
7
|
+
* number of its slide, and `aria-pressed` marks the one of the slide that shows.
|
|
8
|
+
*
|
|
9
|
+
* The children of the element stay what the page wrote. The copies of the first and the last
|
|
10
|
+
* slides that Glide needs for looping are kept in the shadow root, so a framework can hydrate
|
|
11
|
+
* server-rendered slides. Rules of the page's style sheets reach those copies as far as they
|
|
12
|
+
* select them without an ancestor outside the carousel (a class on the slide does, `el-carousel >
|
|
13
|
+
* .slide` does not).
|
|
6
14
|
*
|
|
7
15
|
* @element el-carousel
|
|
8
16
|
*
|
|
@@ -10,9 +18,11 @@ export function define(): void;
|
|
|
10
18
|
* `detail` is the new active slide index.
|
|
11
19
|
*
|
|
12
20
|
* @slot - Default slot. Direct children become slides (unless they have a `slot`
|
|
13
|
-
* attribute
|
|
14
|
-
* @slot arrow-left - Content of the "previous" navigation button.
|
|
15
|
-
*
|
|
21
|
+
* attribute).
|
|
22
|
+
* @slot arrow-left - Content of the "previous" navigation button; it names the button. Left
|
|
23
|
+
* empty, the button shows an arrow head and is named "Previous slide" for screen readers.
|
|
24
|
+
* @slot arrow-right - Content of the "next" navigation button; it names the button. Left empty,
|
|
25
|
+
* the button shows an arrow head and is named "Next slide" for screen readers.
|
|
16
26
|
*
|
|
17
27
|
* @csspart track - The Glide track wrapper.
|
|
18
28
|
* @csspart slides - The slides container.
|
|
@@ -31,9 +41,13 @@ export function define(): void;
|
|
|
31
41
|
* plain list (useful for SSR or feature-flagging the carousel off).
|
|
32
42
|
* @property {string} slidePrefix - Prefix used when generating per-slide identifiers.
|
|
33
43
|
* @property {boolean} bullets - Whether to render the bullet pager.
|
|
44
|
+
* @property {string} dotLabel - Accessible label of a bullet, followed by the number of its slide
|
|
45
|
+
* (`'Go to slide 2'`). Default `'Go to slide'`.
|
|
34
46
|
* @property {boolean} arrows - Whether to render the previous/next navigation arrows.
|
|
35
47
|
*/
|
|
36
|
-
export default class Carousel {
|
|
48
|
+
export default class Carousel extends TemplateElement {
|
|
49
|
+
#private;
|
|
50
|
+
constructor();
|
|
37
51
|
/**
|
|
38
52
|
* Returns the underlying Glide instance for external navigation/configuration. Falls
|
|
39
53
|
* back to a no-op `{ go() }` stub while Glide is not mounted (e.g. when `disabled`).
|
|
@@ -44,6 +58,7 @@ export default class Carousel {
|
|
|
44
58
|
disabled: boolean;
|
|
45
59
|
slidePrefix: string;
|
|
46
60
|
bullets: boolean;
|
|
61
|
+
dotLabel: string;
|
|
47
62
|
arrows: boolean;
|
|
48
63
|
};
|
|
49
64
|
connected(): void;
|
|
@@ -73,7 +88,6 @@ export default class Carousel {
|
|
|
73
88
|
/** @private */
|
|
74
89
|
private renderSlides;
|
|
75
90
|
template(): any;
|
|
76
|
-
#private;
|
|
77
91
|
}
|
|
78
|
-
|
|
92
|
+
export declare function define(): void;
|
|
79
93
|
export { html, defineElement, CarouselEvents };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
}
|
|
1
|
+
declare const _default: {
|
|
2
|
+
CAROUSEL_RUN: string;
|
|
3
|
+
};
|
|
4
4
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function (Glide: any, Components: any, Events: any): any;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Glide's clones of the first and the last slides, which a carousel needs to loop.
|
|
3
|
+
*
|
|
4
|
+
* They live in the shadow root, before and after the slot of the slides, and not among the
|
|
5
|
+
* children of the element. Those belong to the page: a framework that hydrates server-rendered
|
|
6
|
+
* slides finds nodes it did not render otherwise.
|
|
7
|
+
*/
|
|
8
|
+
export default function (Glide: any, Components: any, Events: any): any;
|