@webtides/element-library 0.2.0 → 0.3.0
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 +384 -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 +16604 -3420
- 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 +34 -1
- package/src/components/button/button.js +285 -29
- package/src/components/button/button.readme.md +130 -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 +19 -0
- package/src/components/checkbox-field/checkbox-field.js +25 -10
- 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 +16 -0
- package/src/components/switch-field/switch-field.js +17 -9
- 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 +129 -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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a component paints the colours of its variant: `filled` (the default), `outlined` or
|
|
3
|
+
* `plain`, chosen with the `appearance` attribute of the host. The component declares
|
|
4
|
+
* `appearance` as a reflected property, so that an appearance set from a script reaches the
|
|
5
|
+
* attribute. Goes together with the `variants` module, which provides the colours.
|
|
6
|
+
*
|
|
7
|
+
* - `filled`: the fill of the variant, with its border and the text colour for that fill
|
|
8
|
+
* - `outlined`: no fill, the border and the text of the variant
|
|
9
|
+
* - `plain`: no fill and no border, the text of the variant
|
|
10
|
+
*
|
|
11
|
+
* The module sets the background, the border colour and the text colour of the surface. The width
|
|
12
|
+
* and the style of the border, and what a state like hover does, belong to the component.
|
|
13
|
+
* @param {string} surface - Selector of the element inside the host that is painted, `'.button'`
|
|
14
|
+
* for example.
|
|
15
|
+
* @param {string} [host] - `':host'` (the default), or the tag of a component without a shadow root.
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
export default function appearanceStyle(surface: string, host?: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The arrow of a floating surface, which points to its anchor: an element with the class `arrow`
|
|
3
|
+
* inside the surface. It is a square with the background and the border of the surface, turned by
|
|
4
|
+
* 45 degrees, with its middle on the outer edge of the surface. Only the two sides of the square
|
|
5
|
+
* that stick out have a border.
|
|
6
|
+
*
|
|
7
|
+
* The surface carries `data-placement` with the side of the anchor it is at, and the arrow sits on
|
|
8
|
+
* the edge that faces the anchor. `placeAtAnchor()` in `utils/floating.js` sets that attribute and
|
|
9
|
+
* the place of the arrow along the edge. The surface has to be positioned and must not clip
|
|
10
|
+
* (`overflow: visible`), because the arrow sticks out.
|
|
11
|
+
* @param {string} [surface] - Selector of the floating surface: `':host'` (the default) when the
|
|
12
|
+
* component is the surface itself, or the element inside it, `"[part~='panel']"` for example.
|
|
13
|
+
* @returns {string}
|
|
14
|
+
*/
|
|
15
|
+
export default function arrowStyle(surface?: string): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A group of choices in a field: a fieldset with a legend that holds the options, each of them a
|
|
3
|
+
* label around a native radio or checkbox (`el-radio-field`, `el-checkbox-group-field`,
|
|
4
|
+
* `el-rating-field`).
|
|
5
|
+
*
|
|
6
|
+
* - The fieldset is the column of the field. It loses the border and the padding of the browser
|
|
7
|
+
* and stacks the legend, the help message, the options and the error message: all of them are
|
|
8
|
+
* inside the group, for a screen reader.
|
|
9
|
+
* - An option (`.option`) is the hit area of its control: a label with the control, the element
|
|
10
|
+
* that is drawn in its place, and the text. On a touch screen it is at least `--el-touch-target`
|
|
11
|
+
* in both directions.
|
|
12
|
+
* - The native control is hidden from the eye. It stays focusable and in the accessibility tree.
|
|
13
|
+
* The element after it shows the keyboard focus, and fades while the control is disabled.
|
|
14
|
+
*
|
|
15
|
+
* How the options lie beside each other (`.options`) and what is drawn in the place of a control
|
|
16
|
+
* are the business of the field.
|
|
17
|
+
*
|
|
18
|
+
* It goes together with `formControlStyle()`, which makes `.field` a flex container and gives the
|
|
19
|
+
* texts their look.
|
|
20
|
+
* @param {string} [host] - `':host'` (the default), or the tag of a field without a shadow root.
|
|
21
|
+
* @returns {string}
|
|
22
|
+
*/
|
|
23
|
+
export default function choiceGroupStyle(host?: string): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The layout every form field shares, around whatever control it renders: the label, the help
|
|
3
|
+
* message, the row with the control (`.field`) and the error message stack in a column, with the
|
|
4
|
+
* same gap between them in every field.
|
|
5
|
+
*
|
|
6
|
+
* It also is the look of the texts around the control, so that no field has one of its own:
|
|
7
|
+
*
|
|
8
|
+
* - a label, and the legend of a group, has the text colour of the theme;
|
|
9
|
+
* - the messages are set in the small font size;
|
|
10
|
+
* - the help message has the muted colour of the theme, the error message its danger colour.
|
|
11
|
+
*
|
|
12
|
+
* Without a theme each of them has the colour of the text, which can be read on any background.
|
|
13
|
+
*
|
|
14
|
+
* The row is as high as its control. The mark of a touched field (\`.validity\`, a check mark or a
|
|
15
|
+
* cross beside the control) does not add to that height.
|
|
16
|
+
*
|
|
17
|
+
* The control itself is not touched. Without a theme a native control keeps the look of the
|
|
18
|
+
* browser.
|
|
19
|
+
*
|
|
20
|
+
* Every rule names the host itself, and none is nested in the rule of the host. A rule nested in
|
|
21
|
+
* `:host` does not reach the content of a shadow root in every browser that knows nesting (Safari
|
|
22
|
+
* before 18.1), so the module also works for a field that composes it for a shadow root.
|
|
23
|
+
* @param {string} [host] - `':host'` (the default), or the tag of a field without a shadow root.
|
|
24
|
+
* @returns {string}
|
|
25
|
+
*/
|
|
26
|
+
export default function formControlStyle(host?: string): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The selector of a component's host, with a condition on it if one is given. A component with a
|
|
3
|
+
* shadow root is `:host` in its own stylesheet, a component that renders into the page is its tag:
|
|
4
|
+
*
|
|
5
|
+
* - `hostSelector(':host', "[size='small']")` is `:host([size='small'])`
|
|
6
|
+
* - `hostSelector('el-input-field', "[size='small']")` is `el-input-field[size='small']`
|
|
7
|
+
*
|
|
8
|
+
* The shared style modules take the host as their argument, so one module serves both kinds.
|
|
9
|
+
* @param {string} host - `':host'`, or the tag of a component without a shadow root.
|
|
10
|
+
* @param {string} [condition] - A compound selector for the host, an attribute selector for example.
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
export declare function hostSelector(host: string, condition?: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* What every component needs on its host: the `hidden` attribute hides it. A component sets a
|
|
16
|
+
* `display` of its own on the host, and that would win over the rule of the browser.
|
|
17
|
+
*
|
|
18
|
+
* In a shadow root the sizes also count from the border (`box-sizing: border-box`), for the host
|
|
19
|
+
* and everything inside. A component that renders into the page leaves the box model of its
|
|
20
|
+
* content alone: a native control keeps the one the page gives it.
|
|
21
|
+
* @param {string} [host] - `':host'` (the default), or the tag of a component without a shadow root.
|
|
22
|
+
* @returns {string}
|
|
23
|
+
*/
|
|
24
|
+
export default function hostStyle(host?: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A native `<dialog>` as a modal surface with a header, a body and a footer, which `el-dialog` and
|
|
3
|
+
* `el-drawer` both are. The module has what the two share:
|
|
4
|
+
*
|
|
5
|
+
* - the paint of the surface from the tokens: background, text colour, shadow
|
|
6
|
+
* - the backdrop (`--el-dialog-overlay-background`)
|
|
7
|
+
* - the way from closed to shown: the component adds the class `showing` to the dialog, and the
|
|
8
|
+
* opacity and the transform of the dialog go to their resting values in `--el-duration-md`
|
|
9
|
+
* - the parts: `header`, `title`, `header-actions`, `close-button`, `body`, `footer`
|
|
10
|
+
*
|
|
11
|
+
* The component adds where the surface is and how large, its border and its corners, and what it
|
|
12
|
+
* looks like before it is shown: an opacity, a transform or both, on the selector `dialog`. Those
|
|
13
|
+
* are different properties from the ones set here, so the order of the two stylesheets does not
|
|
14
|
+
* decide anything.
|
|
15
|
+
*
|
|
16
|
+
* The module takes no host: a dialog with slots needs a shadow root, and the host of one is
|
|
17
|
+
* `:host`.
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
export default function modalStyle(): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sizes of a control: `small`, `medium` (the default) and `large`, chosen with the `size`
|
|
3
|
+
* attribute of the host. The component declares `size` as a reflected property, so that a size
|
|
4
|
+
* set from a script reaches the attribute.
|
|
5
|
+
*
|
|
6
|
+
* The module resolves the size to properties on the host, and the stylesheet that paints the
|
|
7
|
+
* control applies them. They are internal (`--_el-`), not tokens for a theme:
|
|
8
|
+
*
|
|
9
|
+
* - `--_el-size-scale`: the factor for the height, 0.8 for small and 1.25 for large
|
|
10
|
+
* - `--_el-size-height`: the height of the control, `--el-control-height` times that factor
|
|
11
|
+
* - `--_el-size-padding-block`, `--_el-size-padding-inline`: from the spacing scale
|
|
12
|
+
* - `--_el-size-font-size`: from `--el-font-size-sm` and `--el-font-size-md`
|
|
13
|
+
*
|
|
14
|
+
* Without a theme they fall back to fixed values, so a sized control keeps its proportions. A
|
|
15
|
+
* control that has no size without a theme, a native input for example, takes the factor and
|
|
16
|
+
* multiplies it with a fallback of its own.
|
|
17
|
+
* @param {string} [host] - `':host'` (the default), or the tag of a component without a shadow root.
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
export default function sizeStyle(host?: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The controls of a component that shows a part of its content at a time (carousel, slider): an
|
|
3
|
+
* arrow at each side of the track, and under the track a dot for every stop.
|
|
4
|
+
*
|
|
5
|
+
* The component marks the elements with parts, and the module selects them by those: `arrows`
|
|
6
|
+
* around two `arrow`, and `dots` around a `dot` for every stop, with `selected-dot` on the one of
|
|
7
|
+
* the stop that shows. An arrow that cannot be used is `:disabled`, or what the third argument
|
|
8
|
+
* selects. A text for screen readers only has the class `visually-hidden`.
|
|
9
|
+
*
|
|
10
|
+
* Nothing says what a slide shows, so no colour of a control can be told to stand out from it. The
|
|
11
|
+
* dots are in a row of their own under the track for that reason, on the page. The arrows lie on
|
|
12
|
+
* the track and have a surface of their own.
|
|
13
|
+
* @param {string} container - Selector of the element that has the track, the arrows and the dots
|
|
14
|
+
* as its children: `':host'`, or an element in the shadow root.
|
|
15
|
+
* @param {string} track - Selector of the track, the child that shows the slides.
|
|
16
|
+
* @param {string} [disabledArrow] - Selector of an arrow that cannot be used, beside `:disabled`:
|
|
17
|
+
* the part `arrow-disabled` by default, or what a library that drives the component marks it with.
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
export default function slideControlsStyle(container: string, track: string, disabledArrow?: string): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The semantic variants of a component: `neutral` (the default), `brand`, `success`, `warning` and
|
|
3
|
+
* `danger`, chosen with the `variant` attribute of the host. The component declares `variant` as a
|
|
4
|
+
* reflected property, so that a variant set from a script reaches the attribute.
|
|
5
|
+
*
|
|
6
|
+
* The module resolves the variant to the colours of five roles on the host. The `appearance`
|
|
7
|
+
* module, or the component's own stylesheet, decides which of them it paints. They are internal
|
|
8
|
+
* (`--_el-`), not tokens for a theme:
|
|
9
|
+
*
|
|
10
|
+
* - `--_el-variant-fill`: the background of a filled surface
|
|
11
|
+
* - `--_el-variant-fill-border`: the border around that fill
|
|
12
|
+
* - `--_el-variant-on-fill`: text and icons on that fill
|
|
13
|
+
* - `--_el-variant-border`: the border of a surface without a fill
|
|
14
|
+
* - `--_el-variant-text`: text and icons on the page background
|
|
15
|
+
*
|
|
16
|
+
* A theme sets one colour per variant: `--el-color-accent` (brand), `--el-color-success`,
|
|
17
|
+
* `--el-color-warning` and `--el-color-danger`. `neutral` reads the surface tokens
|
|
18
|
+
* (`--el-color-bg-muted`, `--el-color-border`, `--el-color-fg`).
|
|
19
|
+
*
|
|
20
|
+
* The text on a brand, success or danger fill is `--el-color-bg`: light in a light scheme, dark in
|
|
21
|
+
* a dark one, like the fills themselves are the other way round. A warning colour stays light in
|
|
22
|
+
* both schemes, so its fill carries dark text, and as text on the page it is mixed half and half
|
|
23
|
+
* with `--el-color-fg`.
|
|
24
|
+
*
|
|
25
|
+
* Without a theme a fill and the text on it are a pair that does not depend on the page: the text
|
|
26
|
+
* colour of the page is made for the background of the page, not for a fill. The neutral pair
|
|
27
|
+
* follows the colour scheme (`light-dark()`), the others are one pair for both. Text without a
|
|
28
|
+
* fill stands on the page and has its text colour, and a warning colour is mixed with that one.
|
|
29
|
+
* @param {string} [host] - `':host'` (the default), or the tag of a component without a shadow root.
|
|
30
|
+
* @returns {string}
|
|
31
|
+
*/
|
|
32
|
+
export default function variantsStyle(host?: string): string;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ref-counted body-scroll lock. The first caller to lock takes the lock (hiding overflow on the
|
|
3
|
+
* document element); it is only released once every caller has unlocked. This lets stacked overlays
|
|
4
|
+
* (e.g. multiple open dialogs) cooperate without one closing dialog re-enabling scrolling for
|
|
5
|
+
* another that is still open.
|
|
6
|
+
*
|
|
7
|
+
* Hiding the root overflow removes the scrollbar, which would otherwise widen the page content and
|
|
8
|
+
* cause a visible layout shift. To prevent that, the lock pads the document element by the width of
|
|
9
|
+
* the scrollbar it just removed (a no-op on overlay-scrollbar systems, where the width is 0).
|
|
10
|
+
*/
|
|
1
11
|
/** Locks scrolling on the document element, compensating for the removed scrollbar width. */
|
|
2
|
-
export function lockBodyScroll(): void;
|
|
12
|
+
export declare function lockBodyScroll(): void;
|
|
3
13
|
/** Releases one lock; restores the original overflow and padding once the last lock is released. */
|
|
4
|
-
export function unlockBodyScroll(): void;
|
|
14
|
+
export declare function unlockBodyScroll(): void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Places a floating element at its anchor: at the side that `placement` names, on the opposite side
|
|
3
|
+
* when it has no room there, and pushed back along the edge of the viewport when it would leave it.
|
|
4
|
+
*
|
|
5
|
+
* The floating element is positioned `fixed`. It gets `left` and `top` in the coordinates of the
|
|
6
|
+
* viewport and `data-placement` with the side it ended up at, which is not the one asked for when
|
|
7
|
+
* it had no room there. The stylesheet puts the arrow on the edge that faces the anchor by that
|
|
8
|
+
* attribute (see the `arrow` style module); its place along the edge is set here.
|
|
9
|
+
* @param {Element} anchor - The element to place at.
|
|
10
|
+
* @param {HTMLElement} floating - The element to place.
|
|
11
|
+
* @param {object} options
|
|
12
|
+
* @param {string} options.placement - `top`, `bottom`, `left` or `right`, each also with `-start`
|
|
13
|
+
* or `-end`.
|
|
14
|
+
* @param {number} [options.distance] - The gap between the anchor and the floating element, or the
|
|
15
|
+
* tip of its arrow, in pixels.
|
|
16
|
+
* @param {HTMLElement} [options.arrowElement] - The arrow of the floating element, if it has one.
|
|
17
|
+
* @returns {Promise<{ placement: string, gap: number }>} The side the element ended up at, and the
|
|
18
|
+
* gap between it and its anchor in pixels, the arrow included.
|
|
19
|
+
*/
|
|
20
|
+
export declare function placeAtAnchor(anchor: Element, floating: HTMLElement, { placement, distance, arrowElement }: {
|
|
21
|
+
placement: string;
|
|
22
|
+
distance?: number;
|
|
23
|
+
arrowElement?: HTMLElement;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
placement: string;
|
|
26
|
+
gap: number;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Calls `update` now, and again whenever a floating element has to be placed anew: on scroll, on
|
|
30
|
+
* resize, when the anchor or the floating element changes its size.
|
|
31
|
+
* @param {Element} anchor
|
|
32
|
+
* @param {HTMLElement} floating
|
|
33
|
+
* @param {() => void} update - Places the floating element, with `placeAtAnchor()` as a rule.
|
|
34
|
+
* @returns {() => void} Stops it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function followAnchor(anchor: Element, floating: HTMLElement, update: () => void): () => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the focus has left a group of controls, asked when one of them loses it (`blur`).
|
|
3
|
+
*
|
|
4
|
+
* The focus is still in the group while it moves from one control to the next, with Tab or the
|
|
5
|
+
* arrow keys: the event names the control that gets it. It is also on its way to another control
|
|
6
|
+
* of the group while a pointer is pressed inside: the control that had the focus loses it when the
|
|
7
|
+
* pointer goes down, and a click on a label gives it to the control of that label only when the
|
|
8
|
+
* pointer goes up.
|
|
9
|
+
*
|
|
10
|
+
* A group takes itself as touched once the user has left it. Asked on every `blur`, it would show
|
|
11
|
+
* "choose one" while the user is choosing.
|
|
12
|
+
* @param {Element} group - The element around the controls.
|
|
13
|
+
* @param {FocusEvent} event - The `blur` of one of the controls.
|
|
14
|
+
* @returns {boolean}
|
|
15
|
+
*/
|
|
16
|
+
export declare function focusLeft(group: Element, event: FocusEvent): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The progress a component shows, from a `value` and a `max` that may hold anything:
|
|
3
|
+
* `progressOf(this.value, this.max)`. The progress bar and the progress ring ask this in their
|
|
4
|
+
* templates, so both read the two properties the same way.
|
|
5
|
+
*
|
|
6
|
+
* - `max` is a number above zero, or 100 where it is none.
|
|
7
|
+
* - `value` is a number from 0 to `max`. A value outside of that range is the nearest one inside,
|
|
8
|
+
* a value that is no number is 0.
|
|
9
|
+
* - `percent` is the share `value` is of `max`, from 0 to 100, in hundredths: a third of the way
|
|
10
|
+
* is 33.33, not 33.
|
|
11
|
+
* @param {*} value
|
|
12
|
+
* @param {*} max
|
|
13
|
+
* @returns {{ value: number, max: number, percent: number }}
|
|
14
|
+
*/
|
|
15
|
+
export declare function progressOf(value: any, max: any): {
|
|
16
|
+
value: number;
|
|
17
|
+
max: number;
|
|
18
|
+
percent: number;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether an element is slotted into a named slot of a component: `hasSlotted(this, 'header')`.
|
|
3
|
+
* A component that leaves a region out while its slot is empty asks this in its template.
|
|
4
|
+
*
|
|
5
|
+
* The children of the host are asked, not the slot. A template is rendered on a server too, where
|
|
6
|
+
* there are no slots to ask, and the markup rendered there has to leave the same regions out as
|
|
7
|
+
* the browser does, or the page moves when the element takes over.
|
|
8
|
+
*
|
|
9
|
+
* A template element of element-js does not render again when its children change. The component
|
|
10
|
+
* listens for `slotchange` and asks for an update: the event tells of a child that comes, goes or
|
|
11
|
+
* changes its `slot` attribute.
|
|
12
|
+
*
|
|
13
|
+
* A `<slot>` of another component that is passed on (`<slot name="title" slot="header">`) counts,
|
|
14
|
+
* also while nothing is slotted into it.
|
|
15
|
+
* @param {Element} host - The component.
|
|
16
|
+
* @param {string} name - The name of the slot.
|
|
17
|
+
* @returns {boolean}
|
|
18
|
+
*/
|
|
19
|
+
export declare function hasSlotted(host: Element, name: string): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Some of the names already exist as properties on every HTMLElement and have a value there without
|
|
3
|
+
* being set (`spellcheck` is `true`). element-js takes a value it finds on the element as the
|
|
4
|
+
* initial value of a property, so an attribute that was never set would look set. An own, empty
|
|
5
|
+
* property on the instance hides the native one until element-js defines the property.
|
|
6
|
+
*
|
|
7
|
+
* A property the instance already owns is left alone: it holds a value that was set before the
|
|
8
|
+
* element was defined.
|
|
9
|
+
* @param {HTMLElement} element
|
|
10
|
+
*/
|
|
11
|
+
export declare function shadowNativeTextEntryProperties(element: HTMLElement): void;
|
|
12
|
+
/**
|
|
13
|
+
* The attributes for the control, to be handed to `spreadAttributes()`, which leaves out the ones
|
|
14
|
+
* that are `null`.
|
|
15
|
+
* @param {HTMLElement} element
|
|
16
|
+
* @returns {Record<string, unknown>}
|
|
17
|
+
*/
|
|
18
|
+
export declare function textEntryAttributes(element: HTMLElement): Record<string, unknown>;
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* @param {Element} element
|
|
5
5
|
* @returns {Promise<void>}
|
|
6
6
|
*/
|
|
7
|
-
export function afterTransition(element: Element): Promise<void>;
|
|
7
|
+
export declare function afterTransition(element: Element): Promise<void>;
|
|
8
8
|
/** Resolves after two animation frames — long enough for an enter starting-style to be committed. */
|
|
9
|
-
export function nextFrame(): Promise<any>;
|
|
9
|
+
export declare function nextFrame(): Promise<any>;
|