@warp-ds/elements 2.10.0-next.14 → 2.10.0-next.17
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/dist/.storybook/utilities.js +4 -4
- package/dist/api.js.map +2 -2
- package/dist/custom-elements.json +437 -53
- package/dist/docs/affix/affix.md +2 -2
- package/dist/docs/affix/api.md +2 -2
- package/dist/docs/alert/alert.md +4 -4
- package/dist/docs/alert/api.md +4 -4
- package/dist/docs/attention/api.md +50 -2
- package/dist/docs/attention/attention.md +50 -2
- package/dist/docs/badge/api.md +50 -4
- package/dist/docs/badge/badge.md +50 -4
- package/dist/docs/box/api.md +2 -2
- package/dist/docs/box/box.md +2 -2
- package/dist/docs/button/api.md +8 -0
- package/dist/docs/button/button.md +8 -0
- package/dist/docs/card/api.md +8 -0
- package/dist/docs/card/card.md +8 -0
- package/dist/docs/checkbox/api.md +50 -2
- package/dist/docs/checkbox/checkbox.md +224 -2
- package/dist/docs/checkbox/styling.md +173 -0
- package/dist/docs/checkbox-group/api.md +24 -0
- package/dist/docs/checkbox-group/checkbox-group.md +67 -30
- package/dist/docs/checkbox-group/styling.md +31 -29
- package/dist/docs/combobox/api.md +20 -12
- package/dist/docs/combobox/combobox.md +20 -12
- package/dist/docs/datepicker/api.md +14 -6
- package/dist/docs/datepicker/datepicker.md +14 -6
- package/dist/docs/icon/api.md +3 -3
- package/dist/docs/icon/icon.md +3 -3
- package/dist/docs/index.md +3 -1
- package/dist/docs/modal/api.md +16 -0
- package/dist/docs/modal/modal.md +16 -0
- package/dist/docs/radio-group/api.md +4 -4
- package/dist/docs/radio-group/radio-group.md +183 -68
- package/dist/docs/radio-group/styling.md +179 -64
- package/dist/docs/slider-thumb/api.md +16 -0
- package/dist/docs/slider-thumb/slider-thumb.md +16 -0
- package/dist/docs/snackbar/accessibility.md +20 -0
- package/dist/docs/snackbar/api.md +30 -0
- package/dist/docs/snackbar/examples.md +191 -0
- package/dist/docs/snackbar/snackbar.md +385 -0
- package/dist/docs/snackbar/styling.md +72 -0
- package/dist/docs/snackbar/usage.md +60 -0
- package/dist/docs/snackbar-item/api.md +41 -0
- package/dist/docs/snackbar-item/snackbar-item.md +49 -0
- package/dist/docs/step/api.md +16 -0
- package/dist/docs/step/step.md +16 -0
- package/dist/docs/switch/api.md +8 -0
- package/dist/docs/switch/switch.md +8 -0
- package/dist/docs/textarea/api.md +40 -0
- package/dist/docs/textarea/textarea.md +40 -0
- package/dist/docs/textfield/api.md +32 -0
- package/dist/docs/textfield/textfield.md +32 -0
- package/dist/index.d.ts +316 -3
- package/dist/packages/affix/affix.d.ts +4 -4
- package/dist/packages/affix/affix.hydration.test.d.ts +1 -1
- package/dist/packages/affix/affix.hydration.test.js +15 -15
- package/dist/packages/affix/affix.js +346 -316
- package/dist/packages/affix/affix.js.map +2 -2
- package/dist/packages/affix/affix.react.stories.d.ts +2 -2
- package/dist/packages/affix/affix.react.stories.js +3 -3
- package/dist/packages/affix/affix.react.test.js +5 -3
- package/dist/packages/affix/affix.stories.d.ts +3 -3
- package/dist/packages/affix/affix.stories.js +10 -10
- package/dist/packages/affix/affix.test.d.ts +1 -1
- package/dist/packages/affix/affix.test.js +10 -10
- package/dist/packages/affix/react.d.ts +2 -2
- package/dist/packages/affix/react.js +6 -6
- package/dist/packages/affix/styles.js +1 -1
- package/dist/packages/alert/alert.d.ts +3 -3
- package/dist/packages/alert/alert.hydration.test.d.ts +1 -1
- package/dist/packages/alert/alert.hydration.test.js +21 -21
- package/dist/packages/alert/alert.js +345 -320
- package/dist/packages/alert/alert.js.map +2 -2
- package/dist/packages/alert/alert.react.stories.d.ts +2 -2
- package/dist/packages/alert/alert.react.stories.js +13 -13
- package/dist/packages/alert/alert.stories.d.ts +4 -4
- package/dist/packages/alert/alert.stories.js +29 -27
- package/dist/packages/alert/alert.test.d.ts +1 -1
- package/dist/packages/alert/alert.test.js +34 -21
- package/dist/packages/alert/react.d.ts +1 -1
- package/dist/packages/alert/react.js +4 -4
- package/dist/packages/alert/styles.js +1 -1
- package/dist/packages/attention/attention.d.ts +11 -6
- package/dist/packages/attention/attention.hydration.test.d.ts +1 -1
- package/dist/packages/attention/attention.hydration.test.js +29 -29
- package/dist/packages/attention/attention.js +1737 -1695
- package/dist/packages/attention/attention.js.map +2 -2
- package/dist/packages/attention/attention.react.stories.d.ts +3 -3
- package/dist/packages/attention/attention.react.stories.js +13 -13
- package/dist/packages/attention/attention.react.test.js +11 -7
- package/dist/packages/attention/attention.stories.d.ts +4 -4
- package/dist/packages/attention/attention.stories.js +126 -117
- package/dist/packages/attention/attention.test.d.ts +1 -1
- package/dist/packages/attention/attention.test.js +18 -10
- package/dist/packages/attention/layout-styles.js +900 -900
- package/dist/packages/attention/react.d.ts +4 -4
- package/dist/packages/attention/react.js +13 -11
- package/dist/packages/attention/styles.js +1 -1
- package/dist/packages/badge/badge.d.ts +3 -3
- package/dist/packages/badge/badge.hydration.test.d.ts +1 -1
- package/dist/packages/badge/badge.hydration.test.js +25 -25
- package/dist/packages/badge/badge.js +276 -276
- package/dist/packages/badge/badge.js.map +2 -2
- package/dist/packages/badge/badge.react.stories.d.ts +3 -3
- package/dist/packages/badge/badge.react.stories.js +17 -17
- package/dist/packages/badge/badge.stories.d.ts +3 -3
- package/dist/packages/badge/badge.stories.js +22 -20
- package/dist/packages/badge/badge.test.d.ts +1 -1
- package/dist/packages/badge/badge.test.js +13 -11
- package/dist/packages/badge/react.d.ts +1 -1
- package/dist/packages/badge/react.js +4 -4
- package/dist/packages/badge/styles.js +1 -1
- package/dist/packages/box/box.d.ts +1 -1
- package/dist/packages/box/box.hydration.test.d.ts +1 -1
- package/dist/packages/box/box.hydration.test.js +14 -14
- package/dist/packages/box/box.js +283 -283
- package/dist/packages/box/box.js.map +2 -2
- package/dist/packages/box/box.react.stories.d.ts +3 -3
- package/dist/packages/box/box.react.stories.js +8 -8
- package/dist/packages/box/box.stories.d.ts +3 -3
- package/dist/packages/box/box.stories.js +25 -19
- package/dist/packages/box/box.test.d.ts +1 -1
- package/dist/packages/box/box.test.js +6 -6
- package/dist/packages/box/react.d.ts +1 -1
- package/dist/packages/box/react.js +4 -4
- package/dist/packages/box/slot.test.d.ts +1 -1
- package/dist/packages/box/slot.test.js +6 -6
- package/dist/packages/box/styles.js +1 -1
- package/dist/packages/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.d.ts +1 -1
- package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.js +55 -49
- package/dist/packages/breadcrumbs/breadcrumbs.js +284 -278
- package/dist/packages/breadcrumbs/breadcrumbs.js.map +2 -2
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +3 -3
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.js +6 -6
- package/dist/packages/breadcrumbs/breadcrumbs.stories.d.ts +3 -3
- package/dist/packages/breadcrumbs/breadcrumbs.stories.js +27 -26
- package/dist/packages/breadcrumbs/breadcrumbs.test.d.ts +1 -1
- package/dist/packages/breadcrumbs/breadcrumbs.test.js +19 -17
- package/dist/packages/breadcrumbs/react.d.ts +1 -1
- package/dist/packages/breadcrumbs/react.js +4 -4
- package/dist/packages/breadcrumbs/styles.js +1 -1
- package/dist/packages/button/button.d.ts +9 -4
- package/dist/packages/button/button.hydration.test.d.ts +1 -1
- package/dist/packages/button/button.hydration.test.js +19 -19
- package/dist/packages/button/button.js +743 -717
- package/dist/packages/button/button.js.map +2 -2
- package/dist/packages/button/button.react.stories.d.ts +5 -5
- package/dist/packages/button/button.react.stories.js +30 -30
- package/dist/packages/button/button.react.test.js +13 -13
- package/dist/packages/button/button.stories.d.ts +4 -4
- package/dist/packages/button/button.stories.js +276 -167
- package/dist/packages/button/button.test.d.ts +1 -1
- package/dist/packages/button/button.test.js +36 -35
- package/dist/packages/button/react.d.ts +3 -3
- package/dist/packages/button/react.js +7 -7
- package/dist/packages/button/styles.js +373 -347
- package/dist/packages/card/card.d.ts +1 -1
- package/dist/packages/card/card.hydration.test.d.ts +1 -1
- package/dist/packages/card/card.hydration.test.js +14 -14
- package/dist/packages/card/card.js +305 -290
- package/dist/packages/card/card.js.map +2 -2
- package/dist/packages/card/card.react.stories.d.ts +3 -3
- package/dist/packages/card/card.react.stories.js +11 -11
- package/dist/packages/card/card.stories.d.ts +3 -3
- package/dist/packages/card/card.stories.js +36 -24
- package/dist/packages/card/card.test.d.ts +1 -1
- package/dist/packages/card/card.test.js +6 -6
- package/dist/packages/card/react.d.ts +1 -1
- package/dist/packages/card/react.js +4 -4
- package/dist/packages/card/styles.js +1 -1
- package/dist/packages/checkbox/checkbox.a11y.test.d.ts +1 -1
- package/dist/packages/checkbox/checkbox.a11y.test.js +47 -33
- package/dist/packages/checkbox/checkbox.d.ts +2 -2
- package/dist/packages/checkbox/checkbox.hydration.test.d.ts +1 -1
- package/dist/packages/checkbox/checkbox.hydration.test.js +21 -21
- package/dist/packages/checkbox/checkbox.js +475 -424
- package/dist/packages/checkbox/checkbox.js.map +2 -2
- package/dist/packages/checkbox/checkbox.react.stories.d.ts +2 -2
- package/dist/packages/checkbox/checkbox.react.stories.js +3 -3
- package/dist/packages/checkbox/checkbox.stories.d.ts +4 -4
- package/dist/packages/checkbox/checkbox.stories.js +99 -91
- package/dist/packages/checkbox/checkbox.test.d.ts +1 -1
- package/dist/packages/checkbox/checkbox.test.js +64 -64
- package/dist/packages/checkbox/react.d.ts +1 -1
- package/dist/packages/checkbox/react.js +6 -6
- package/dist/packages/checkbox/styles.js +183 -132
- package/dist/packages/checkbox-group/checkbox-group.a11y.test.d.ts +2 -2
- package/dist/packages/checkbox-group/checkbox-group.a11y.test.js +83 -73
- package/dist/packages/checkbox-group/checkbox-group.d.ts +16 -2
- package/dist/packages/checkbox-group/checkbox-group.hydration.test.d.ts +2 -2
- package/dist/packages/checkbox-group/checkbox-group.hydration.test.js +36 -19
- package/dist/packages/checkbox-group/checkbox-group.js +60 -55
- package/dist/packages/checkbox-group/checkbox-group.js.map +2 -2
- package/dist/packages/checkbox-group/checkbox-group.react.test.js +4 -4
- package/dist/packages/checkbox-group/checkbox-group.test.d.ts +2 -2
- package/dist/packages/checkbox-group/checkbox-group.test.js +96 -90
- package/dist/packages/checkbox-group/react.d.ts +2 -2
- package/dist/packages/checkbox-group/react.js +6 -6
- package/dist/packages/combobox/combobox.a11y.test.d.ts +2 -2
- package/dist/packages/combobox/combobox.a11y.test.js +72 -49
- package/dist/packages/combobox/combobox.d.ts +2 -2
- package/dist/packages/combobox/combobox.hydration.test.d.ts +1 -1
- package/dist/packages/combobox/combobox.hydration.test.js +45 -45
- package/dist/packages/combobox/combobox.js +332 -332
- package/dist/packages/combobox/combobox.js.map +3 -3
- package/dist/packages/combobox/combobox.react.stories.d.ts +3 -3
- package/dist/packages/combobox/combobox.react.stories.js +29 -29
- package/dist/packages/combobox/combobox.react.test.js +8 -8
- package/dist/packages/combobox/combobox.stories.d.ts +4 -4
- package/dist/packages/combobox/combobox.stories.js +100 -94
- package/dist/packages/combobox/combobox.test.d.ts +2 -2
- package/dist/packages/combobox/combobox.test.js +148 -133
- package/dist/packages/combobox/react.d.ts +2 -2
- package/dist/packages/combobox/react.js +14 -14
- package/dist/packages/combobox/styles.js +1 -1
- package/dist/packages/datepicker/DatePicker.test.d.ts +2 -2
- package/dist/packages/datepicker/DatePicker.test.js +46 -41
- package/dist/packages/datepicker/datepicker.d.ts +3 -3
- package/dist/packages/datepicker/datepicker.hydration.test.d.ts +1 -1
- package/dist/packages/datepicker/datepicker.hydration.test.js +21 -21
- package/dist/packages/datepicker/datepicker.js +665 -625
- package/dist/packages/datepicker/datepicker.js.map +3 -3
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +3 -3
- package/dist/packages/datepicker/datepicker.react.stories.js +9 -9
- package/dist/packages/datepicker/datepicker.react.test.js +6 -6
- package/dist/packages/datepicker/datepicker.stories.d.ts +4 -4
- package/dist/packages/datepicker/datepicker.stories.js +32 -32
- package/dist/packages/datepicker/datepicker.test.d.ts +2 -2
- package/dist/packages/datepicker/datepicker.test.js +77 -79
- package/dist/packages/datepicker/react.d.ts +2 -2
- package/dist/packages/datepicker/react.js +16 -14
- package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.js +13 -12
- package/dist/packages/datepicker/styles/w-datepicker-day.styles.js +58 -55
- package/dist/packages/datepicker/styles/w-datepicker-month.styles.js +60 -57
- package/dist/packages/datepicker/styles/w-datepicker.styles.js +87 -87
- package/dist/packages/datepicker/utils.d.ts +1 -1
- package/dist/packages/datepicker/utils.js +25 -19
- package/dist/packages/datepicker/utils.test.js +20 -20
- package/dist/packages/expandable/expandable.d.ts +4 -4
- package/dist/packages/expandable/expandable.hydration.test.d.ts +1 -1
- package/dist/packages/expandable/expandable.hydration.test.js +21 -21
- package/dist/packages/expandable/expandable.js +357 -330
- package/dist/packages/expandable/expandable.js.map +4 -4
- package/dist/packages/expandable/expandable.react.stories.d.ts +3 -3
- package/dist/packages/expandable/expandable.react.stories.js +7 -7
- package/dist/packages/expandable/expandable.react.test.js +15 -7
- package/dist/packages/expandable/expandable.stories.d.ts +5 -5
- package/dist/packages/expandable/expandable.stories.js +51 -45
- package/dist/packages/expandable/expandable.test.d.ts +1 -1
- package/dist/packages/expandable/expandable.test.js +19 -17
- package/dist/packages/expandable/react.d.ts +2 -2
- package/dist/packages/expandable/react.js +9 -9
- package/dist/packages/expandable/styles.js +1 -1
- package/dist/packages/global.d.ts +1 -0
- package/dist/packages/global.js +5 -0
- package/dist/packages/i18n.d.ts +1 -1
- package/dist/packages/i18n.js +37 -29
- package/dist/packages/icon/icon.d.ts +7 -2
- package/dist/packages/icon/icon.hydration.test.d.ts +1 -1
- package/dist/packages/icon/icon.hydration.test.js +25 -25
- package/dist/packages/icon/icon.js +31 -26
- package/dist/packages/icon/icon.js.map +2 -2
- package/dist/packages/icon/icon.react.stories.d.ts +1 -1
- package/dist/packages/icon/icon.react.stories.js +283 -284
- package/dist/packages/icon/icon.stories.d.ts +3 -3
- package/dist/packages/icon/icon.stories.js +299 -298
- package/dist/packages/icon/icon.test.d.ts +1 -1
- package/dist/packages/icon/icon.test.js +36 -28
- package/dist/packages/icon/react.d.ts +1 -1
- package/dist/packages/icon/react.js +4 -4
- package/dist/packages/icon/style.js +24 -25
- package/dist/packages/interaction-type-detection.d.ts +22 -0
- package/dist/packages/interaction-type-detection.js +38 -0
- package/dist/packages/link/link.d.ts +2 -2
- package/dist/packages/link/link.hydration.test.d.ts +1 -1
- package/dist/packages/link/link.hydration.test.js +27 -27
- package/dist/packages/link/link.js +709 -683
- package/dist/packages/link/link.js.map +2 -2
- package/dist/packages/link/link.react.stories.d.ts +3 -3
- package/dist/packages/link/link.react.stories.js +42 -42
- package/dist/packages/link/link.react.test.js +5 -3
- package/dist/packages/link/link.stories.d.ts +3 -3
- package/dist/packages/link/link.stories.js +51 -51
- package/dist/packages/link/link.test.d.ts +1 -1
- package/dist/packages/link/link.test.js +11 -7
- package/dist/packages/link/react.d.ts +2 -2
- package/dist/packages/link/react.js +6 -6
- package/dist/packages/link/styles.js +57 -57
- package/dist/packages/modal/index.d.ts +7 -7
- package/dist/packages/modal/index.js +7 -7
- package/dist/packages/modal/modal.d.ts +1 -1
- package/dist/packages/modal/modal.hydration.test.d.ts +1 -1
- package/dist/packages/modal/modal.hydration.test.js +12 -12
- package/dist/packages/modal/modal.js +405 -405
- package/dist/packages/modal/modal.js.map +2 -2
- package/dist/packages/modal/modal.react.stories.d.ts +3 -3
- package/dist/packages/modal/modal.react.stories.js +7 -6
- package/dist/packages/modal/modal.react.test.js +5 -5
- package/dist/packages/modal/modal.stories.d.ts +6 -6
- package/dist/packages/modal/modal.stories.js +253 -238
- package/dist/packages/modal/react.d.ts +4 -4
- package/dist/packages/modal/react.js +13 -13
- package/dist/packages/modal/util.js +2 -2
- package/dist/packages/modal-footer/modal-footer.d.ts +1 -1
- package/dist/packages/modal-footer/modal-footer.js +291 -291
- package/dist/packages/modal-footer/modal-footer.js.map +2 -2
- package/dist/packages/modal-footer/react.d.ts +1 -1
- package/dist/packages/modal-footer/react.js +4 -4
- package/dist/packages/modal-header/modal-header.d.ts +2 -2
- package/dist/packages/modal-header/modal-header.js +439 -418
- package/dist/packages/modal-header/modal-header.js.map +2 -2
- package/dist/packages/modal-header/modal-header.react.test.js +5 -3
- package/dist/packages/modal-header/react.d.ts +2 -2
- package/dist/packages/modal-header/react.js +8 -8
- package/dist/packages/page-indicator/page-indicator.d.ts +1 -1
- package/dist/packages/page-indicator/page-indicator.hydration.test.d.ts +1 -1
- package/dist/packages/page-indicator/page-indicator.hydration.test.js +22 -22
- package/dist/packages/page-indicator/page-indicator.js +26 -26
- package/dist/packages/page-indicator/page-indicator.js.map +2 -2
- package/dist/packages/page-indicator/page-indicator.react.stories.d.ts +3 -3
- package/dist/packages/page-indicator/page-indicator.react.stories.js +11 -11
- package/dist/packages/page-indicator/page-indicator.react.test.js +5 -5
- package/dist/packages/page-indicator/page-indicator.stories.d.ts +3 -3
- package/dist/packages/page-indicator/page-indicator.stories.js +56 -27
- package/dist/packages/page-indicator/page-indicator.test.d.ts +1 -1
- package/dist/packages/page-indicator/page-indicator.test.js +110 -70
- package/dist/packages/page-indicator/react.d.ts +2 -2
- package/dist/packages/page-indicator/react.js +7 -7
- package/dist/packages/page-indicator/style.js +21 -21
- package/dist/packages/pagination/pagination.a11y.test.d.ts +1 -1
- package/dist/packages/pagination/pagination.a11y.test.js +59 -25
- package/dist/packages/pagination/pagination.d.ts +3 -3
- package/dist/packages/pagination/pagination.hydration.test.d.ts +1 -1
- package/dist/packages/pagination/pagination.hydration.test.js +19 -19
- package/dist/packages/pagination/pagination.js +380 -349
- package/dist/packages/pagination/pagination.js.map +2 -2
- package/dist/packages/pagination/pagination.react.stories.d.ts +5 -5
- package/dist/packages/pagination/pagination.react.stories.js +8 -8
- package/dist/packages/pagination/pagination.react.test.js +6 -6
- package/dist/packages/pagination/pagination.stories.d.ts +3 -3
- package/dist/packages/pagination/pagination.stories.js +18 -18
- package/dist/packages/pagination/pagination.test.d.ts +1 -1
- package/dist/packages/pagination/pagination.test.js +146 -69
- package/dist/packages/pagination/react.d.ts +3 -3
- package/dist/packages/pagination/react.js +12 -10
- package/dist/packages/pagination/styles.js +1 -1
- package/dist/packages/pill/pill.d.ts +2 -2
- package/dist/packages/pill/pill.hydration.test.d.ts +1 -1
- package/dist/packages/pill/pill.hydration.test.js +14 -14
- package/dist/packages/pill/pill.js +334 -311
- package/dist/packages/pill/pill.js.map +2 -2
- package/dist/packages/pill/pill.react.stories.d.ts +3 -3
- package/dist/packages/pill/pill.react.stories.js +3 -3
- package/dist/packages/pill/pill.react.test.js +8 -8
- package/dist/packages/pill/pill.stories.d.ts +3 -3
- package/dist/packages/pill/pill.stories.js +8 -8
- package/dist/packages/pill/pill.test.d.ts +1 -1
- package/dist/packages/pill/pill.test.js +17 -15
- package/dist/packages/pill/react.d.ts +2 -2
- package/dist/packages/pill/react.js +18 -14
- package/dist/packages/pill/styles.js +1 -1
- package/dist/packages/radio/base-element.d.ts +3 -3
- package/dist/packages/radio/base-element.js +3 -3
- package/dist/packages/radio/custom-error-validator.d.ts +1 -1
- package/dist/packages/radio/custom-error-validator.js +3 -3
- package/dist/packages/radio/form-associated-element.d.ts +8 -8
- package/dist/packages/radio/form-associated-element.js +27 -26
- package/dist/packages/radio/host-styles.js +9 -9
- package/dist/packages/radio/invalid.d.ts +1 -1
- package/dist/packages/radio/invalid.js +1 -1
- package/dist/packages/radio/radio-styles.js +199 -160
- package/dist/packages/radio/radio.a11y.test.d.ts +2 -2
- package/dist/packages/radio/radio.a11y.test.js +60 -58
- package/dist/packages/radio/radio.d.ts +3 -3
- package/dist/packages/radio/radio.hydration.test.d.ts +1 -1
- package/dist/packages/radio/radio.hydration.test.js +23 -14
- package/dist/packages/radio/radio.js +485 -446
- package/dist/packages/radio/radio.js.map +3 -3
- package/dist/packages/radio/radio.react.stories.d.ts +2 -2
- package/dist/packages/radio/radio.react.stories.js +3 -3
- package/dist/packages/radio/radio.stories.d.ts +4 -4
- package/dist/packages/radio/radio.stories.js +152 -136
- package/dist/packages/radio/radio.test.d.ts +1 -1
- package/dist/packages/radio/radio.test.js +74 -73
- package/dist/packages/radio/react.d.ts +1 -1
- package/dist/packages/radio/react.js +4 -4
- package/dist/packages/radio/required-validator.d.ts +1 -1
- package/dist/packages/radio/required-validator.js +12 -7
- package/dist/packages/radio/slot.d.ts +1 -1
- package/dist/packages/radio/slot.js +11 -8
- package/dist/packages/radio/watch.d.ts +1 -1
- package/dist/packages/radio/watch.js +3 -1
- package/dist/packages/radio-group/radio-group-styles.js +121 -88
- package/dist/packages/radio-group/radio-group.a11y.test.d.ts +2 -2
- package/dist/packages/radio-group/radio-group.a11y.test.js +81 -79
- package/dist/packages/radio-group/radio-group.d.ts +14 -5
- package/dist/packages/radio-group/radio-group.hydration.test.d.ts +2 -2
- package/dist/packages/radio-group/radio-group.hydration.test.js +29 -18
- package/dist/packages/radio-group/radio-group.js +648 -560
- package/dist/packages/radio-group/radio-group.js.map +3 -3
- package/dist/packages/radio-group/radio-group.react.test.js +4 -4
- package/dist/packages/radio-group/radio-group.test.d.ts +2 -2
- package/dist/packages/radio-group/radio-group.test.js +234 -229
- package/dist/packages/radio-group/react.d.ts +2 -2
- package/dist/packages/radio-group/react.js +10 -10
- package/dist/packages/select/react.d.ts +2 -2
- package/dist/packages/select/react.js +11 -11
- package/dist/packages/select/select.a11y.test.d.ts +1 -1
- package/dist/packages/select/select.a11y.test.js +98 -91
- package/dist/packages/select/select.d.ts +4 -4
- package/dist/packages/select/select.hydration.test.d.ts +1 -1
- package/dist/packages/select/select.hydration.test.js +16 -16
- package/dist/packages/select/select.js +350 -331
- package/dist/packages/select/select.js.map +2 -2
- package/dist/packages/select/select.react.stories.d.ts +3 -3
- package/dist/packages/select/select.react.stories.js +7 -7
- package/dist/packages/select/select.react.test.js +6 -6
- package/dist/packages/select/select.stories.d.ts +3 -3
- package/dist/packages/select/select.stories.js +51 -48
- package/dist/packages/select/select.test.d.ts +1 -1
- package/dist/packages/select/select.test.js +175 -178
- package/dist/packages/select/styles.js +1 -1
- package/dist/packages/slider/Slider.d.ts +1 -1
- package/dist/packages/slider/Slider.js +4 -4
- package/dist/packages/slider/index.d.ts +2 -2
- package/dist/packages/slider/index.js +2 -2
- package/dist/packages/slider/react.d.ts +3 -3
- package/dist/packages/slider/react.js +9 -9
- package/dist/packages/slider/slider.d.ts +3 -3
- package/dist/packages/slider/slider.hydration.test.d.ts +1 -1
- package/dist/packages/slider/slider.hydration.test.js +39 -20
- package/dist/packages/slider/slider.js +480 -462
- package/dist/packages/slider/slider.js.map +2 -2
- package/dist/packages/slider/slider.react.stories.d.ts +3 -3
- package/dist/packages/slider/slider.react.stories.js +31 -34
- package/dist/packages/slider/slider.react.test.js +6 -6
- package/dist/packages/slider/slider.stories.d.ts +7 -7
- package/dist/packages/slider/slider.stories.js +332 -340
- package/dist/packages/slider/slider.test.d.ts +5 -5
- package/dist/packages/slider/slider.test.js +367 -334
- package/dist/packages/slider/styles/w-slider.styles.js +166 -148
- package/dist/packages/slider/styles.js +1 -1
- package/dist/packages/slider-thumb/SliderThumb.d.ts +1 -1
- package/dist/packages/slider-thumb/SliderThumb.js +4 -4
- package/dist/packages/slider-thumb/oddbird-css-anchor-positioning.d.ts +1 -1
- package/dist/packages/slider-thumb/oddbird-css-anchor-positioning.js +1 -1
- package/dist/packages/slider-thumb/react.d.ts +3 -3
- package/dist/packages/slider-thumb/react.js +11 -9
- package/dist/packages/slider-thumb/slider-thumb.d.ts +3 -3
- package/dist/packages/slider-thumb/slider-thumb.hydration.test.d.ts +1 -1
- package/dist/packages/slider-thumb/slider-thumb.hydration.test.js +26 -17
- package/dist/packages/slider-thumb/slider-thumb.js +545 -548
- package/dist/packages/slider-thumb/slider-thumb.js.map +3 -3
- package/dist/packages/slider-thumb/slider-thumb.react.test.js +9 -5
- package/dist/packages/slider-thumb/styles/w-slider-thumb.styles.js +189 -188
- package/dist/packages/slider-thumb/styles.js +1 -1
- package/dist/packages/snackbar/locales/da/messages.d.mts +1 -0
- package/dist/packages/snackbar/locales/da/messages.mjs +1 -0
- package/dist/packages/snackbar/locales/en/messages.d.mts +1 -0
- package/dist/packages/snackbar/locales/en/messages.mjs +1 -0
- package/dist/packages/snackbar/locales/fi/messages.d.mts +1 -0
- package/dist/packages/snackbar/locales/fi/messages.mjs +1 -0
- package/dist/packages/snackbar/locales/nb/messages.d.mts +1 -0
- package/dist/packages/snackbar/locales/nb/messages.mjs +1 -0
- package/dist/packages/snackbar/locales/sv/messages.d.mts +1 -0
- package/dist/packages/snackbar/locales/sv/messages.mjs +1 -0
- package/dist/packages/snackbar/react.d.ts +2 -0
- package/dist/packages/snackbar/react.js +11 -0
- package/dist/packages/snackbar/snackbar.d.ts +132 -0
- package/dist/packages/snackbar/snackbar.hydration.test.d.ts +1 -0
- package/dist/packages/snackbar/snackbar.hydration.test.js +13 -0
- package/dist/packages/snackbar/snackbar.js +2665 -0
- package/dist/packages/snackbar/snackbar.js.map +7 -0
- package/dist/packages/snackbar/snackbar.react.stories.d.ts +12 -0
- package/dist/packages/snackbar/snackbar.react.stories.js +160 -0
- package/dist/packages/snackbar/snackbar.stories.d.ts +20 -0
- package/dist/packages/snackbar/snackbar.stories.js +363 -0
- package/dist/packages/snackbar/snackbar.test.d.ts +4 -0
- package/dist/packages/snackbar/snackbar.test.js +17 -0
- package/dist/packages/snackbar/styles.d.ts +1 -0
- package/dist/packages/snackbar/styles.js +35 -0
- package/dist/packages/snackbar-item/react.d.ts +5 -0
- package/dist/packages/snackbar-item/react.js +16 -0
- package/dist/packages/snackbar-item/snackbar-item.d.ts +69 -0
- package/dist/packages/snackbar-item/snackbar-item.js +2620 -0
- package/dist/packages/snackbar-item/snackbar-item.js.map +7 -0
- package/dist/packages/snackbar-item/snackbar-item.react.test.d.ts +1 -0
- package/dist/packages/snackbar-item/snackbar-item.react.test.js +5 -0
- package/dist/packages/snackbar-item/styles.d.ts +1 -0
- package/dist/packages/snackbar-item/styles.js +133 -0
- package/dist/packages/step/react.d.ts +1 -1
- package/dist/packages/step/react.js +4 -4
- package/dist/packages/step/step.d.ts +2 -2
- package/dist/packages/step/step.hydration.test.d.ts +1 -1
- package/dist/packages/step/step.hydration.test.js +10 -10
- package/dist/packages/step/step.js +334 -312
- package/dist/packages/step/step.js.map +2 -2
- package/dist/packages/step-indicator/index.d.ts +2 -2
- package/dist/packages/step-indicator/index.js +2 -2
- package/dist/packages/step-indicator/react.d.ts +2 -2
- package/dist/packages/step-indicator/react.js +5 -5
- package/dist/packages/step-indicator/step-indicator.a11y.test.d.ts +2 -2
- package/dist/packages/step-indicator/step-indicator.a11y.test.js +48 -46
- package/dist/packages/step-indicator/step-indicator.d.ts +1 -1
- package/dist/packages/step-indicator/step-indicator.hydration.test.d.ts +1 -1
- package/dist/packages/step-indicator/step-indicator.hydration.test.js +10 -10
- package/dist/packages/step-indicator/step-indicator.js +280 -276
- package/dist/packages/step-indicator/step-indicator.js.map +2 -2
- package/dist/packages/step-indicator/stepindicator.react.stories.d.ts +2 -2
- package/dist/packages/step-indicator/stepindicator.react.stories.js +3 -3
- package/dist/packages/step-indicator/stepindicator.stories.d.ts +3 -3
- package/dist/packages/step-indicator/stepindicator.stories.js +129 -129
- package/dist/packages/step-indicator/styles.js +1 -1
- package/dist/packages/styles.js +274 -274
- package/dist/packages/switch/react.d.ts +1 -1
- package/dist/packages/switch/react.js +6 -6
- package/dist/packages/switch/styles.js +1 -1
- package/dist/packages/switch/switch.a11y.test.d.ts +1 -1
- package/dist/packages/switch/switch.a11y.test.js +46 -38
- package/dist/packages/switch/switch.d.ts +1 -1
- package/dist/packages/switch/switch.hydration.test.d.ts +1 -1
- package/dist/packages/switch/switch.hydration.test.js +23 -23
- package/dist/packages/switch/switch.js +299 -299
- package/dist/packages/switch/switch.js.map +2 -2
- package/dist/packages/switch/switch.react.stories.d.ts +2 -2
- package/dist/packages/switch/switch.react.stories.js +2 -2
- package/dist/packages/switch/switch.stories.d.ts +2 -2
- package/dist/packages/switch/switch.stories.js +42 -37
- package/dist/packages/switch/switch.test.d.ts +1 -1
- package/dist/packages/switch/switch.test.js +30 -35
- package/dist/packages/tab/react.d.ts +6 -4
- package/dist/packages/tab/react.js +11 -10
- package/dist/packages/tab/styles.d.ts +1 -0
- package/dist/packages/tab/styles.js +2 -0
- package/dist/packages/tab/tab.d.ts +5 -5
- package/dist/packages/tab/tab.hydration.test.d.ts +1 -1
- package/dist/packages/tab/tab.hydration.test.js +18 -12
- package/dist/packages/tab/tab.js +305 -304
- package/dist/packages/tab/tab.js.map +3 -3
- package/dist/packages/tab/tab.react.test.js +5 -3
- package/dist/packages/tab-panel/react.d.ts +3 -2
- package/dist/packages/tab-panel/react.js +11 -5
- package/dist/packages/tab-panel/tab-panel.d.ts +3 -3
- package/dist/packages/tab-panel/tab-panel.hydration.test.d.ts +1 -1
- package/dist/packages/tab-panel/tab-panel.hydration.test.js +13 -10
- package/dist/packages/tab-panel/tab-panel.js +289 -287
- package/dist/packages/tab-panel/tab-panel.js.map +2 -2
- package/dist/packages/tabs/index.d.ts +4 -4
- package/dist/packages/tabs/index.js +3 -3
- package/dist/packages/tabs/react.d.ts +27 -8
- package/dist/packages/tabs/react.js +30 -9
- package/dist/packages/tabs/styles.js +1 -1
- package/dist/packages/tabs/tabs.a11y.test.d.ts +3 -3
- package/dist/packages/tabs/tabs.a11y.test.js +188 -169
- package/dist/packages/tabs/tabs.d.ts +3 -3
- package/dist/packages/tabs/tabs.hydration.test.d.ts +3 -1
- package/dist/packages/tabs/tabs.hydration.test.js +22 -8
- package/dist/packages/tabs/tabs.js +289 -282
- package/dist/packages/tabs/tabs.js.map +2 -2
- package/dist/packages/tabs/tabs.react.stories.d.ts +12 -10
- package/dist/packages/tabs/tabs.react.stories.js +28 -28
- package/dist/packages/tabs/tabs.stories.d.ts +4 -4
- package/dist/packages/tabs/tabs.stories.js +101 -95
- package/dist/packages/tabs/tabs.test.d.ts +3 -3
- package/dist/packages/tabs/tabs.test.js +136 -122
- package/dist/packages/textarea/react.d.ts +2 -2
- package/dist/packages/textarea/react.js +17 -17
- package/dist/packages/textarea/styles.js +1 -1
- package/dist/packages/textarea/textarea.a11y.test.d.ts +1 -1
- package/dist/packages/textarea/textarea.a11y.test.js +89 -57
- package/dist/packages/textarea/textarea.d.ts +1 -1
- package/dist/packages/textarea/textarea.hydration.test.d.ts +1 -1
- package/dist/packages/textarea/textarea.hydration.test.js +19 -19
- package/dist/packages/textarea/textarea.js +300 -298
- package/dist/packages/textarea/textarea.js.map +2 -2
- package/dist/packages/textarea/textarea.react.stories.d.ts +3 -3
- package/dist/packages/textarea/textarea.react.stories.js +13 -13
- package/dist/packages/textarea/textarea.react.test.js +7 -7
- package/dist/packages/textarea/textarea.stories.d.ts +3 -3
- package/dist/packages/textarea/textarea.stories.js +44 -42
- package/dist/packages/textarea/textarea.test.d.ts +1 -1
- package/dist/packages/textarea/textarea.test.js +124 -88
- package/dist/packages/textfield/react.d.ts +2 -2
- package/dist/packages/textfield/react.js +17 -17
- package/dist/packages/textfield/styles/w-textfield.styles.js +60 -58
- package/dist/packages/textfield/styles.js +1 -1
- package/dist/packages/textfield/textfield.d.ts +3 -3
- package/dist/packages/textfield/textfield.hydration.test.d.ts +1 -1
- package/dist/packages/textfield/textfield.hydration.test.js +19 -19
- package/dist/packages/textfield/textfield.js +376 -368
- package/dist/packages/textfield/textfield.js.map +3 -3
- package/dist/packages/textfield/textfield.react.stories.d.ts +3 -3
- package/dist/packages/textfield/textfield.react.stories.js +31 -31
- package/dist/packages/textfield/textfield.react.test.js +7 -7
- package/dist/packages/textfield/textfield.stories.d.ts +4 -4
- package/dist/packages/textfield/textfield.stories.js +107 -89
- package/dist/packages/textfield/textfield.test.d.ts +2 -2
- package/dist/packages/textfield/textfield.test.js +103 -71
- package/dist/packages/toast/api.d.ts +1 -1
- package/dist/packages/toast/api.js +3 -3
- package/dist/packages/toast/index.d.ts +5 -5
- package/dist/packages/toast/index.js +5 -5
- package/dist/packages/toast/toast.d.ts +4 -4
- package/dist/packages/toast/toast.js +346 -317
- package/dist/packages/toast/toast.js.map +4 -4
- package/dist/packages/toast/toast.stories.d.ts +4 -4
- package/dist/packages/toast/toast.stories.js +37 -16
- package/dist/packages/toast/toast.test.d.ts +1 -1
- package/dist/packages/toast/toast.test.js +48 -31
- package/dist/packages/toast/types.d.ts +1 -1
- package/dist/packages/toast-container/styles.js +1 -1
- package/dist/packages/toast-container/toast-container.d.ts +2 -2
- package/dist/packages/toast-container/toast-container.js +291 -290
- package/dist/packages/toast-container/toast-container.js.map +2 -2
- package/dist/packages/utils/element-collapse.d.ts +12 -0
- package/dist/packages/utils/element-collapse.js +102 -0
- package/dist/packages/utils/expand-transition.d.ts +1 -1
- package/dist/packages/utils/expand-transition.js +12 -10
- package/dist/packages/utils/unstyled-heading.d.ts +1 -1
- package/dist/packages/utils/unstyled-heading.js +4 -4
- package/dist/packages/utils/window-exists.js +1 -1
- package/dist/packages/utils.js +2 -2
- package/dist/setup-tests.d.ts +3 -3
- package/dist/setup-tests.js +16 -13
- package/dist/tests/react-hydration.js +29 -30
- package/dist/tests/react-ssr-attributes.d.ts +1 -1
- package/dist/tests/react-ssr-attributes.js +4 -4
- package/dist/web-types.json +110 -22
- package/eik/index.js +12 -12
- package/package.json +11 -18
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ import type {
|
|
|
37
37
|
import type { WarpSelect } from "./packages/select/select.ts";
|
|
38
38
|
import type { WarpSliderThumb } from "./packages/slider-thumb/slider-thumb.ts";
|
|
39
39
|
import type { WarpSlider } from "./packages/slider/slider.ts";
|
|
40
|
+
import type { WarpSnackbarItem } from "./packages/snackbar-item/snackbar-item.ts";
|
|
41
|
+
import type { WarpSnackbar } from "./packages/snackbar/snackbar.ts";
|
|
40
42
|
import type { WarpStep } from "./packages/step/step.ts";
|
|
41
43
|
import type { WarpStepIndicator } from "./packages/step-indicator/step-indicator.ts";
|
|
42
44
|
import type { WarpSwitch } from "./packages/switch/switch.ts";
|
|
@@ -2000,6 +2002,38 @@ Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the
|
|
|
2000
2002
|
textContent?: string | number;
|
|
2001
2003
|
};
|
|
2002
2004
|
|
|
2005
|
+
export type WarpSnackbarItemProps = {
|
|
2006
|
+
/** The placement of the action and close buttons. */
|
|
2007
|
+
"action-placement"?: WarpSnackbarItem["actionPlacement"];
|
|
2008
|
+
/** The placement of the action and close buttons. */
|
|
2009
|
+
actionPlacement?: WarpSnackbarItem["actionPlacement"];
|
|
2010
|
+
/** How long the message should stay in the document before removing itself. */
|
|
2011
|
+
duration?: WarpSnackbarItem["duration"];
|
|
2012
|
+
};
|
|
2013
|
+
|
|
2014
|
+
export type WarpSnackbarItemSolidJsProps = {
|
|
2015
|
+
/** The placement of the action and close buttons. */
|
|
2016
|
+
"attr:action-placement"?: WarpSnackbarItem["actionPlacement"];
|
|
2017
|
+
/** The placement of the action and close buttons. */
|
|
2018
|
+
"prop:actionPlacement"?: WarpSnackbarItem["actionPlacement"];
|
|
2019
|
+
/** How long the message should stay in the document before removing itself. */
|
|
2020
|
+
"prop:duration"?: WarpSnackbarItem["duration"];
|
|
2021
|
+
|
|
2022
|
+
/** Set the innerHTML of the element */
|
|
2023
|
+
innerHTML?: string;
|
|
2024
|
+
/** Set the textContent of the element */
|
|
2025
|
+
textContent?: string | number;
|
|
2026
|
+
};
|
|
2027
|
+
|
|
2028
|
+
export type WarpSnackbarProps = {};
|
|
2029
|
+
|
|
2030
|
+
export type WarpSnackbarSolidJsProps = {
|
|
2031
|
+
/** Set the innerHTML of the element */
|
|
2032
|
+
innerHTML?: string;
|
|
2033
|
+
/** Set the textContent of the element */
|
|
2034
|
+
textContent?: string | number;
|
|
2035
|
+
};
|
|
2036
|
+
|
|
2003
2037
|
export type WarpStepProps = {
|
|
2004
2038
|
/** Whether this step is active.
|
|
2005
2039
|
|
|
@@ -2637,7 +2671,18 @@ export type CustomElements = {
|
|
|
2637
2671
|
>;
|
|
2638
2672
|
|
|
2639
2673
|
/**
|
|
2674
|
+
* Checkboxes allow users to select multiple options from a list of choices.
|
|
2675
|
+
*
|
|
2676
|
+
* Use with `w-checkbox`.
|
|
2640
2677
|
*
|
|
2678
|
+
* ## Architecture Note
|
|
2679
|
+
* This component uses a <div> wrapper instead of the more semantic <fieldset> element.
|
|
2680
|
+
* Note that w-radio-group uses <fieldset>, which provides better accessibility and follows
|
|
2681
|
+
* HTML best practices. This inconsistency exists for historical reasons and may be addressed
|
|
2682
|
+
* in a future major version to align both on the more semantic approach.
|
|
2683
|
+
*
|
|
2684
|
+
* TODO: Align w-checkbox-group to use <fieldset> in a future major version after assessing
|
|
2685
|
+
* backwards compatibility implications (CSS selectors, etc.).
|
|
2641
2686
|
*
|
|
2642
2687
|
* ## Attributes & Properties
|
|
2643
2688
|
*
|
|
@@ -3004,7 +3049,7 @@ export type CustomElements = {
|
|
|
3004
3049
|
* Areas where markup can be added to the component.
|
|
3005
3050
|
*
|
|
3006
3051
|
* - `label`: Alternative to the `label` attribute should you need custom HTML.
|
|
3007
|
-
* - `help-text`: Alternative to the `help-text` attribute should you need custom HTML.
|
|
3052
|
+
* - `help-text`: Alternative to the `help-text` attribute should you need custom HTML. ## Architecture Note This component uses semantic <fieldset> element for grouping radio controls, which provides better accessibility and follows HTML best practices. Note that w-checkbox-group currently uses <div> instead - this inconsistency exists for historical reasons and may be addressed in a future major version to align both on the more semantic approach. TODO: Align w-checkbox-group to also use <fieldset> in a future major version after assessing backwards compatibility implications (CSS selectors, etc.).
|
|
3008
3053
|
*/
|
|
3009
3054
|
"w-radio-group": Partial<
|
|
3010
3055
|
WarpRadioGroupProps & BaseProps<WarpRadioGroup> & BaseEvents
|
|
@@ -3114,6 +3159,112 @@ export type CustomElements = {
|
|
|
3114
3159
|
*/
|
|
3115
3160
|
"w-slider": Partial<WarpSliderProps & BaseProps<WarpSlider> & BaseEvents>;
|
|
3116
3161
|
|
|
3162
|
+
/**
|
|
3163
|
+
* An item to show in a `w-snackbar`.
|
|
3164
|
+
*
|
|
3165
|
+
* See the `create` function on `w-snackbar` for a convenience API which helps you make snackbar items.
|
|
3166
|
+
*
|
|
3167
|
+
* ## Attributes & Properties
|
|
3168
|
+
*
|
|
3169
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3170
|
+
*
|
|
3171
|
+
* - `action-placement`/`actionPlacement`: The placement of the action and close buttons.
|
|
3172
|
+
* - `duration`: How long the message should stay in the document before removing itself.
|
|
3173
|
+
*
|
|
3174
|
+
* ## Slots
|
|
3175
|
+
*
|
|
3176
|
+
* Areas where markup can be added to the component.
|
|
3177
|
+
*
|
|
3178
|
+
* - `default`: the snackbar message.
|
|
3179
|
+
* - `icon`: icon preceeding the message.
|
|
3180
|
+
* - `action`: action following the message.
|
|
3181
|
+
*
|
|
3182
|
+
* ## Methods
|
|
3183
|
+
*
|
|
3184
|
+
* Methods that can be called to access component functionality.
|
|
3185
|
+
*
|
|
3186
|
+
* - `close() => void`: Remove the snackbar item from the document.
|
|
3187
|
+
*
|
|
3188
|
+
* Moves focus to the last focused element outside of the snackbar item, if available.
|
|
3189
|
+
*
|
|
3190
|
+
* ## CSS Custom Properties
|
|
3191
|
+
*
|
|
3192
|
+
* CSS variables available for styling the component.
|
|
3193
|
+
*
|
|
3194
|
+
* - `--w-c-snackbar-item-radius`: undefined (default: `undefined`)
|
|
3195
|
+
* - `--w-c-snackbar-item-max-width`: undefined (default: `undefined`)
|
|
3196
|
+
* - `--w-c-snackbar-item-min-width`: undefined (default: `undefined`)
|
|
3197
|
+
* - `--w-c-snackbar-item-padding`: undefined (default: `undefined`)
|
|
3198
|
+
* - `--w-c-snackbar-item-bg`: undefined (default: `undefined`)
|
|
3199
|
+
* - `--w-c-snackbar-item-action-bg-active`: undefined (default: `undefined`)
|
|
3200
|
+
* - `--w-c-snackbar-item-action-bg-hover`: undefined (default: `undefined`)
|
|
3201
|
+
* - `--w-c-snackbar-item-color`: undefined (default: `undefined`)
|
|
3202
|
+
* - `--w-c-snackbar-item-action-color-active`: undefined (default: `undefined`)
|
|
3203
|
+
* - `--w-c-snackbar-item-action-color-hover`: undefined (default: `undefined`)
|
|
3204
|
+
* - `--w-c-snackbar-item-box-shadow`: undefined (default: `undefined`)
|
|
3205
|
+
*
|
|
3206
|
+
* ## CSS Parts
|
|
3207
|
+
*
|
|
3208
|
+
* Custom selectors for styling elements within the component.
|
|
3209
|
+
*
|
|
3210
|
+
* - `item`: the container wrapping the message, icon and actions.
|
|
3211
|
+
* - `icon`: the icon for the variant.
|
|
3212
|
+
* - `message`: the default slot, body of the snackbar item.
|
|
3213
|
+
* - `action`: close and action button.
|
|
3214
|
+
*/
|
|
3215
|
+
"w-snackbar-item": Partial<
|
|
3216
|
+
WarpSnackbarItemProps & BaseProps<WarpSnackbarItem> & BaseEvents
|
|
3217
|
+
>;
|
|
3218
|
+
|
|
3219
|
+
/**
|
|
3220
|
+
* A Snackbar shows brief user feedback messages that overlay content, with an optional action such as Undo.
|
|
3221
|
+
*
|
|
3222
|
+
* Include one `<w-snackbar></w-snackbar>` in the document `<body>`. Use the `create` function to create messages.
|
|
3223
|
+
*
|
|
3224
|
+
* ## Slots
|
|
3225
|
+
*
|
|
3226
|
+
* Areas where markup can be added to the component.
|
|
3227
|
+
*
|
|
3228
|
+
* - `default`: `w-snackbar-item` gets placed inside the default slot by the `create` function.
|
|
3229
|
+
*
|
|
3230
|
+
* ## Methods
|
|
3231
|
+
*
|
|
3232
|
+
* Methods that can be called to access component functionality.
|
|
3233
|
+
*
|
|
3234
|
+
* - `create(message: string, options: CreateSnackbarOptions = {}) => void`: Creates a snackbar item and immediately adds it to the snackbar.
|
|
3235
|
+
*
|
|
3236
|
+
* By default the snackbar item automatically closes after 4 seconds (`SnackbarDuration.Short`).
|
|
3237
|
+
*
|
|
3238
|
+
* If you include an `action` in the options the default `duration` is
|
|
3239
|
+
* set to 10 seconds (`SnackbarDuration.Long`) and can not be made shorter.
|
|
3240
|
+
*
|
|
3241
|
+
* A `duration` of 10 seconds or longer forces the close button to be visible.
|
|
3242
|
+
*
|
|
3243
|
+
* The default `variant` is `neutral` which does not have an icon.
|
|
3244
|
+
*
|
|
3245
|
+
* Set `duration` to `SnackbarDuration.Infinite` if you want a persistent message.
|
|
3246
|
+
*
|
|
3247
|
+
* ## CSS Custom Properties
|
|
3248
|
+
*
|
|
3249
|
+
* CSS variables available for styling the component.
|
|
3250
|
+
*
|
|
3251
|
+
* - `--w-c-snackbar-container-gap`: undefined (default: `undefined`)
|
|
3252
|
+
* - `--w-c-snackbar-position-bottom`: undefined (default: `undefined`)
|
|
3253
|
+
* - `--w-c-snackbar-position-left`: undefined (default: `undefined`)
|
|
3254
|
+
* - `--w-c-snackbar-position-right`: undefined (default: `undefined`)
|
|
3255
|
+
* - `--w-c-snackbar-position-top`: undefined (default: `undefined`)
|
|
3256
|
+
* - `--w-c-snackbar-z-index`: undefined (default: `undefined`)
|
|
3257
|
+
*
|
|
3258
|
+
* ## CSS Parts
|
|
3259
|
+
*
|
|
3260
|
+
* Custom selectors for styling elements within the component.
|
|
3261
|
+
*
|
|
3262
|
+
* - `container`: the live region that positions messages on the screen.
|
|
3263
|
+
*/
|
|
3264
|
+
"w-snackbar": Partial<
|
|
3265
|
+
WarpSnackbarProps & BaseProps<WarpSnackbar> & BaseEvents
|
|
3266
|
+
>;
|
|
3267
|
+
|
|
3117
3268
|
/**
|
|
3118
3269
|
* Individual step component that shows a single step in a process
|
|
3119
3270
|
*
|
|
@@ -3323,6 +3474,8 @@ type CustomElementInstances = {
|
|
|
3323
3474
|
"w-select": WarpSelect;
|
|
3324
3475
|
"w-slider-thumb": WarpSliderThumb;
|
|
3325
3476
|
"w-slider": WarpSlider;
|
|
3477
|
+
"w-snackbar-item": WarpSnackbarItem;
|
|
3478
|
+
"w-snackbar": WarpSnackbar;
|
|
3326
3479
|
"w-step": WarpStep;
|
|
3327
3480
|
"w-step-indicator": WarpStepIndicator;
|
|
3328
3481
|
"w-switch": WarpSwitch;
|
|
@@ -3360,6 +3513,8 @@ type CustomElementComponentProps = {
|
|
|
3360
3513
|
"w-select": WarpSelectProps;
|
|
3361
3514
|
"w-slider-thumb": WarpSliderThumbProps;
|
|
3362
3515
|
"w-slider": WarpSliderProps;
|
|
3516
|
+
"w-snackbar-item": WarpSnackbarItemProps;
|
|
3517
|
+
"w-snackbar": WarpSnackbarProps;
|
|
3363
3518
|
"w-step": WarpStepProps;
|
|
3364
3519
|
"w-step-indicator": WarpStepIndicatorProps;
|
|
3365
3520
|
"w-switch": WarpSwitchProps;
|
|
@@ -3796,7 +3951,18 @@ export type CustomElementsSolidJs = {
|
|
|
3796
3951
|
>;
|
|
3797
3952
|
|
|
3798
3953
|
/**
|
|
3954
|
+
* Checkboxes allow users to select multiple options from a list of choices.
|
|
3955
|
+
*
|
|
3956
|
+
* Use with `w-checkbox`.
|
|
3957
|
+
*
|
|
3958
|
+
* ## Architecture Note
|
|
3959
|
+
* This component uses a <div> wrapper instead of the more semantic <fieldset> element.
|
|
3960
|
+
* Note that w-radio-group uses <fieldset>, which provides better accessibility and follows
|
|
3961
|
+
* HTML best practices. This inconsistency exists for historical reasons and may be addressed
|
|
3962
|
+
* in a future major version to align both on the more semantic approach.
|
|
3799
3963
|
*
|
|
3964
|
+
* TODO: Align w-checkbox-group to use <fieldset> in a future major version after assessing
|
|
3965
|
+
* backwards compatibility implications (CSS selectors, etc.).
|
|
3800
3966
|
*
|
|
3801
3967
|
* ## Attributes & Properties
|
|
3802
3968
|
*
|
|
@@ -4193,7 +4359,7 @@ export type CustomElementsSolidJs = {
|
|
|
4193
4359
|
* Areas where markup can be added to the component.
|
|
4194
4360
|
*
|
|
4195
4361
|
* - `label`: Alternative to the `label` attribute should you need custom HTML.
|
|
4196
|
-
* - `help-text`: Alternative to the `help-text` attribute should you need custom HTML.
|
|
4362
|
+
* - `help-text`: Alternative to the `help-text` attribute should you need custom HTML. ## Architecture Note This component uses semantic <fieldset> element for grouping radio controls, which provides better accessibility and follows HTML best practices. Note that w-checkbox-group currently uses <div> instead - this inconsistency exists for historical reasons and may be addressed in a future major version to align both on the more semantic approach. TODO: Align w-checkbox-group to also use <fieldset> in a future major version after assessing backwards compatibility implications (CSS selectors, etc.).
|
|
4197
4363
|
*/
|
|
4198
4364
|
"w-radio-group": Partial<
|
|
4199
4365
|
WarpRadioGroupProps &
|
|
@@ -4319,6 +4485,118 @@ export type CustomElementsSolidJs = {
|
|
|
4319
4485
|
BaseEvents
|
|
4320
4486
|
>;
|
|
4321
4487
|
|
|
4488
|
+
/**
|
|
4489
|
+
* An item to show in a `w-snackbar`.
|
|
4490
|
+
*
|
|
4491
|
+
* See the `create` function on `w-snackbar` for a convenience API which helps you make snackbar items.
|
|
4492
|
+
*
|
|
4493
|
+
* ## Attributes & Properties
|
|
4494
|
+
*
|
|
4495
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
4496
|
+
*
|
|
4497
|
+
* - `action-placement`/`actionPlacement`: The placement of the action and close buttons.
|
|
4498
|
+
* - `duration`: How long the message should stay in the document before removing itself.
|
|
4499
|
+
*
|
|
4500
|
+
* ## Slots
|
|
4501
|
+
*
|
|
4502
|
+
* Areas where markup can be added to the component.
|
|
4503
|
+
*
|
|
4504
|
+
* - `default`: the snackbar message.
|
|
4505
|
+
* - `icon`: icon preceeding the message.
|
|
4506
|
+
* - `action`: action following the message.
|
|
4507
|
+
*
|
|
4508
|
+
* ## Methods
|
|
4509
|
+
*
|
|
4510
|
+
* Methods that can be called to access component functionality.
|
|
4511
|
+
*
|
|
4512
|
+
* - `close() => void`: Remove the snackbar item from the document.
|
|
4513
|
+
*
|
|
4514
|
+
* Moves focus to the last focused element outside of the snackbar item, if available.
|
|
4515
|
+
*
|
|
4516
|
+
* ## CSS Custom Properties
|
|
4517
|
+
*
|
|
4518
|
+
* CSS variables available for styling the component.
|
|
4519
|
+
*
|
|
4520
|
+
* - `--w-c-snackbar-item-radius`: undefined (default: `undefined`)
|
|
4521
|
+
* - `--w-c-snackbar-item-max-width`: undefined (default: `undefined`)
|
|
4522
|
+
* - `--w-c-snackbar-item-min-width`: undefined (default: `undefined`)
|
|
4523
|
+
* - `--w-c-snackbar-item-padding`: undefined (default: `undefined`)
|
|
4524
|
+
* - `--w-c-snackbar-item-bg`: undefined (default: `undefined`)
|
|
4525
|
+
* - `--w-c-snackbar-item-action-bg-active`: undefined (default: `undefined`)
|
|
4526
|
+
* - `--w-c-snackbar-item-action-bg-hover`: undefined (default: `undefined`)
|
|
4527
|
+
* - `--w-c-snackbar-item-color`: undefined (default: `undefined`)
|
|
4528
|
+
* - `--w-c-snackbar-item-action-color-active`: undefined (default: `undefined`)
|
|
4529
|
+
* - `--w-c-snackbar-item-action-color-hover`: undefined (default: `undefined`)
|
|
4530
|
+
* - `--w-c-snackbar-item-box-shadow`: undefined (default: `undefined`)
|
|
4531
|
+
*
|
|
4532
|
+
* ## CSS Parts
|
|
4533
|
+
*
|
|
4534
|
+
* Custom selectors for styling elements within the component.
|
|
4535
|
+
*
|
|
4536
|
+
* - `item`: the container wrapping the message, icon and actions.
|
|
4537
|
+
* - `icon`: the icon for the variant.
|
|
4538
|
+
* - `message`: the default slot, body of the snackbar item.
|
|
4539
|
+
* - `action`: close and action button.
|
|
4540
|
+
*/
|
|
4541
|
+
"w-snackbar-item": Partial<
|
|
4542
|
+
WarpSnackbarItemProps &
|
|
4543
|
+
WarpSnackbarItemSolidJsProps &
|
|
4544
|
+
BaseProps<WarpSnackbarItem> &
|
|
4545
|
+
BaseEvents
|
|
4546
|
+
>;
|
|
4547
|
+
|
|
4548
|
+
/**
|
|
4549
|
+
* A Snackbar shows brief user feedback messages that overlay content, with an optional action such as Undo.
|
|
4550
|
+
*
|
|
4551
|
+
* Include one `<w-snackbar></w-snackbar>` in the document `<body>`. Use the `create` function to create messages.
|
|
4552
|
+
*
|
|
4553
|
+
* ## Slots
|
|
4554
|
+
*
|
|
4555
|
+
* Areas where markup can be added to the component.
|
|
4556
|
+
*
|
|
4557
|
+
* - `default`: `w-snackbar-item` gets placed inside the default slot by the `create` function.
|
|
4558
|
+
*
|
|
4559
|
+
* ## Methods
|
|
4560
|
+
*
|
|
4561
|
+
* Methods that can be called to access component functionality.
|
|
4562
|
+
*
|
|
4563
|
+
* - `create(message: string, options: CreateSnackbarOptions = {}) => void`: Creates a snackbar item and immediately adds it to the snackbar.
|
|
4564
|
+
*
|
|
4565
|
+
* By default the snackbar item automatically closes after 4 seconds (`SnackbarDuration.Short`).
|
|
4566
|
+
*
|
|
4567
|
+
* If you include an `action` in the options the default `duration` is
|
|
4568
|
+
* set to 10 seconds (`SnackbarDuration.Long`) and can not be made shorter.
|
|
4569
|
+
*
|
|
4570
|
+
* A `duration` of 10 seconds or longer forces the close button to be visible.
|
|
4571
|
+
*
|
|
4572
|
+
* The default `variant` is `neutral` which does not have an icon.
|
|
4573
|
+
*
|
|
4574
|
+
* Set `duration` to `SnackbarDuration.Infinite` if you want a persistent message.
|
|
4575
|
+
*
|
|
4576
|
+
* ## CSS Custom Properties
|
|
4577
|
+
*
|
|
4578
|
+
* CSS variables available for styling the component.
|
|
4579
|
+
*
|
|
4580
|
+
* - `--w-c-snackbar-container-gap`: undefined (default: `undefined`)
|
|
4581
|
+
* - `--w-c-snackbar-position-bottom`: undefined (default: `undefined`)
|
|
4582
|
+
* - `--w-c-snackbar-position-left`: undefined (default: `undefined`)
|
|
4583
|
+
* - `--w-c-snackbar-position-right`: undefined (default: `undefined`)
|
|
4584
|
+
* - `--w-c-snackbar-position-top`: undefined (default: `undefined`)
|
|
4585
|
+
* - `--w-c-snackbar-z-index`: undefined (default: `undefined`)
|
|
4586
|
+
*
|
|
4587
|
+
* ## CSS Parts
|
|
4588
|
+
*
|
|
4589
|
+
* Custom selectors for styling elements within the component.
|
|
4590
|
+
*
|
|
4591
|
+
* - `container`: the live region that positions messages on the screen.
|
|
4592
|
+
*/
|
|
4593
|
+
"w-snackbar": Partial<
|
|
4594
|
+
WarpSnackbarProps &
|
|
4595
|
+
WarpSnackbarSolidJsProps &
|
|
4596
|
+
BaseProps<WarpSnackbar> &
|
|
4597
|
+
BaseEvents
|
|
4598
|
+
>;
|
|
4599
|
+
|
|
4322
4600
|
/**
|
|
4323
4601
|
* Individual step component that shows a single step in a process
|
|
4324
4602
|
*
|
|
@@ -4500,7 +4778,42 @@ export type CustomElementsSolidJs = {
|
|
|
4500
4778
|
>;
|
|
4501
4779
|
};
|
|
4502
4780
|
|
|
4503
|
-
export type CustomCssProperties = {
|
|
4781
|
+
export type CustomCssProperties = {
|
|
4782
|
+
/** */
|
|
4783
|
+
"--w-c-snackbar-item-radius"?: string;
|
|
4784
|
+
/** */
|
|
4785
|
+
"--w-c-snackbar-item-max-width"?: string;
|
|
4786
|
+
/** */
|
|
4787
|
+
"--w-c-snackbar-item-min-width"?: string;
|
|
4788
|
+
/** */
|
|
4789
|
+
"--w-c-snackbar-item-padding"?: string;
|
|
4790
|
+
/** */
|
|
4791
|
+
"--w-c-snackbar-item-bg"?: string;
|
|
4792
|
+
/** */
|
|
4793
|
+
"--w-c-snackbar-item-action-bg-active"?: string;
|
|
4794
|
+
/** */
|
|
4795
|
+
"--w-c-snackbar-item-action-bg-hover"?: string;
|
|
4796
|
+
/** */
|
|
4797
|
+
"--w-c-snackbar-item-color"?: string;
|
|
4798
|
+
/** */
|
|
4799
|
+
"--w-c-snackbar-item-action-color-active"?: string;
|
|
4800
|
+
/** */
|
|
4801
|
+
"--w-c-snackbar-item-action-color-hover"?: string;
|
|
4802
|
+
/** */
|
|
4803
|
+
"--w-c-snackbar-item-box-shadow"?: string;
|
|
4804
|
+
/** */
|
|
4805
|
+
"--w-c-snackbar-container-gap"?: string;
|
|
4806
|
+
/** */
|
|
4807
|
+
"--w-c-snackbar-position-bottom"?: string;
|
|
4808
|
+
/** */
|
|
4809
|
+
"--w-c-snackbar-position-left"?: string;
|
|
4810
|
+
/** */
|
|
4811
|
+
"--w-c-snackbar-position-right"?: string;
|
|
4812
|
+
/** */
|
|
4813
|
+
"--w-c-snackbar-position-top"?: string;
|
|
4814
|
+
/** */
|
|
4815
|
+
"--w-c-snackbar-z-index"?: string;
|
|
4816
|
+
};
|
|
4504
4817
|
|
|
4505
4818
|
declare module "react" {
|
|
4506
4819
|
namespace JSX {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LitElement } from
|
|
2
|
-
import
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "../icon/icon.js";
|
|
3
3
|
declare const WarpAffix_base: import("@open-wc/form-control").Constructor<import("@open-wc/form-control").FormControlInterface> & typeof LitElement;
|
|
4
4
|
/**
|
|
5
5
|
* This component is usually used in other components like form elements to show a prefix or suffix. See for example `w-textfield`.
|
|
@@ -19,14 +19,14 @@ declare class WarpAffix extends WarpAffix_base {
|
|
|
19
19
|
*
|
|
20
20
|
* @summary Renders a clear icon button.
|
|
21
21
|
* @description Shows a clickable close icon meant for reset/clear actions, typically in a suffix slot.
|
|
22
|
-
|
|
22
|
+
*/
|
|
23
23
|
clear: boolean;
|
|
24
24
|
/**
|
|
25
25
|
* Add this property to render a clickable Warp search icon.
|
|
26
26
|
*
|
|
27
27
|
* @summary Renders a search icon button.
|
|
28
28
|
* @description Shows a clickable search icon, typically in a prefix slot for search fields.
|
|
29
|
-
|
|
29
|
+
*/
|
|
30
30
|
search: boolean;
|
|
31
31
|
/**
|
|
32
32
|
* @summary Text label shown as prefix/suffix content.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./affix.js";
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { afterEach, beforeEach, describe, expect, test } from
|
|
2
|
-
import { setupHydrationWarningCapture, testHydration } from
|
|
3
|
-
import
|
|
4
|
-
describe(
|
|
1
|
+
import { afterEach, beforeEach, describe, expect, test } from "vitest";
|
|
2
|
+
import { setupHydrationWarningCapture, testHydration, } from "../../tests/react-hydration";
|
|
3
|
+
import "./affix.js";
|
|
4
|
+
describe("w-affix React SSR hydration", () => {
|
|
5
5
|
beforeEach(() => setupHydrationWarningCapture());
|
|
6
6
|
afterEach(() => {
|
|
7
7
|
window.__HYDRATION_WARNINGS__ = [];
|
|
8
8
|
});
|
|
9
|
-
test(
|
|
10
|
-
const warnings = await testHydration(
|
|
9
|
+
test("default (no attributes) hydrates without warnings", async () => {
|
|
10
|
+
const warnings = await testHydration("w-affix", {});
|
|
11
11
|
expect(warnings).toEqual([]);
|
|
12
12
|
});
|
|
13
|
-
test(
|
|
14
|
-
const warnings = await testHydration(
|
|
15
|
-
label:
|
|
13
|
+
test("with label hydrates without warnings", async () => {
|
|
14
|
+
const warnings = await testHydration("w-affix", {
|
|
15
|
+
label: "kr",
|
|
16
16
|
});
|
|
17
17
|
expect(warnings).toEqual([]);
|
|
18
18
|
});
|
|
19
|
-
test(
|
|
20
|
-
const warnings = await testHydration(
|
|
19
|
+
test("with search hydrates without warnings", async () => {
|
|
20
|
+
const warnings = await testHydration("w-affix", {
|
|
21
21
|
search: true,
|
|
22
|
-
|
|
22
|
+
"aria-label": "Search",
|
|
23
23
|
});
|
|
24
24
|
expect(warnings).toEqual([]);
|
|
25
25
|
});
|
|
26
|
-
test(
|
|
27
|
-
const warnings = await testHydration(
|
|
26
|
+
test("with clear hydrates without warnings", async () => {
|
|
27
|
+
const warnings = await testHydration("w-affix", {
|
|
28
28
|
clear: true,
|
|
29
|
-
|
|
29
|
+
"aria-label": "Clear",
|
|
30
30
|
});
|
|
31
31
|
expect(warnings).toEqual([]);
|
|
32
32
|
});
|