@warp-ds/elements 2.10.0-next.2 → 2.10.0-next.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/.storybook/utilities.js +4 -4
- package/dist/api.js +1 -1
- package/dist/api.js.map +2 -2
- package/dist/custom-elements.json +1341 -619
- package/dist/docs/affix/affix.md +120 -3
- package/dist/docs/affix/api.md +2 -2
- package/dist/docs/affix/styling.md +108 -0
- package/dist/docs/alert/alert.md +6 -6
- package/dist/docs/alert/api.md +4 -4
- package/dist/docs/alert/styling.md +1 -0
- package/dist/docs/attention/api.md +50 -2
- package/dist/docs/attention/attention.md +52 -2
- package/dist/docs/attention/styling.md +1 -0
- package/dist/docs/badge/api.md +50 -4
- package/dist/docs/badge/badge.md +52 -4
- package/dist/docs/badge/styling.md +1 -0
- package/dist/docs/box/api.md +2 -2
- package/dist/docs/box/box.md +24 -42
- package/dist/docs/box/examples.md +20 -38
- package/dist/docs/box/styling.md +1 -0
- package/dist/docs/breadcrumb-item/api.md +27 -0
- package/dist/docs/breadcrumb-item/breadcrumb-item.md +34 -0
- package/dist/docs/breadcrumbs/accessibility.md +8 -18
- package/dist/docs/breadcrumbs/breadcrumbs.md +128 -36
- package/dist/docs/breadcrumbs/examples.md +15 -9
- package/dist/docs/breadcrumbs/styling.md +97 -0
- package/dist/docs/breadcrumbs/usage.md +8 -8
- package/dist/docs/button/api.md +32 -24
- package/dist/docs/button/button.md +105 -26
- package/dist/docs/button/styling.md +72 -0
- package/dist/docs/card/api.md +8 -0
- package/dist/docs/card/card.md +10 -2
- package/dist/docs/card/styling.md +1 -0
- package/dist/docs/checkbox/api.md +176 -0
- package/dist/docs/checkbox/checkbox.md +356 -0
- package/dist/docs/checkbox/styling.md +173 -0
- package/dist/docs/checkbox-group/accessibility.md +71 -0
- package/dist/docs/checkbox-group/api.md +103 -0
- package/dist/docs/checkbox-group/checkbox-group.md +529 -0
- package/dist/docs/checkbox-group/examples.md +105 -0
- package/dist/docs/checkbox-group/styling.md +134 -0
- package/dist/docs/checkbox-group/usage.md +95 -0
- package/dist/docs/combobox/accessibility.md +71 -0
- package/dist/docs/combobox/api.md +74 -36
- package/dist/docs/combobox/combobox.md +219 -38
- package/dist/docs/combobox/examples.md +44 -0
- package/dist/docs/combobox/styling.md +1 -0
- package/dist/docs/combobox/usage.md +28 -0
- package/dist/docs/datepicker/accessibility.md +25 -0
- package/dist/docs/datepicker/api.md +37 -21
- package/dist/docs/datepicker/datepicker.md +223 -23
- package/dist/docs/datepicker/examples.md +75 -0
- package/dist/docs/datepicker/styling.md +1 -0
- package/dist/docs/datepicker/usage.md +84 -0
- package/dist/docs/expandable/api.md +23 -35
- package/dist/docs/expandable/examples.md +54 -0
- package/dist/docs/expandable/expandable.md +77 -35
- package/dist/docs/expandable/styling.md +1 -0
- package/dist/docs/icon/accessibility.md +5 -0
- package/dist/docs/icon/api.md +43 -0
- package/dist/docs/icon/examples.md +45 -0
- package/dist/docs/icon/icon.md +115 -0
- package/dist/docs/icon/styling.md +1 -0
- package/dist/docs/icon/usage.md +11 -0
- package/dist/docs/index.md +49 -0
- package/dist/docs/link/api.md +24 -28
- package/dist/docs/link/examples.md +75 -0
- package/dist/docs/link/link.md +119 -30
- package/dist/docs/link/styling.md +1 -0
- package/dist/docs/link/usage.md +18 -0
- package/dist/docs/modal/api.md +18 -2
- package/dist/docs/modal/modal.md +20 -2
- package/dist/docs/modal/styling.md +1 -0
- package/dist/docs/modal-footer/modal-footer.md +0 -6
- package/dist/docs/modal-header/modal-header.md +0 -6
- package/dist/docs/page-indicator/page-indicator.md +2 -0
- package/dist/docs/page-indicator/styling.md +1 -0
- package/dist/docs/pagination/api.md +4 -4
- package/dist/docs/pagination/pagination.md +6 -4
- package/dist/docs/pagination/styling.md +1 -0
- package/dist/docs/pill/api.md +8 -8
- package/dist/docs/pill/pill.md +10 -8
- package/dist/docs/pill/styling.md +1 -0
- package/dist/docs/radio/radio.md +1 -7
- 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/select/api.md +10 -10
- package/dist/docs/select/select.md +103 -10
- package/dist/docs/select/styling.md +92 -0
- package/dist/docs/slider/api.md +38 -22
- package/dist/docs/slider/slider.md +40 -22
- package/dist/docs/slider/styling.md +1 -0
- package/dist/docs/slider-thumb/api.md +28 -12
- package/dist/docs/slider-thumb/slider-thumb.md +30 -12
- package/dist/docs/slider-thumb/styling.md +1 -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/step-indicator/step-indicator.md +2 -0
- package/dist/docs/step-indicator/styling.md +1 -0
- package/dist/docs/switch/api.md +8 -0
- package/dist/docs/switch/styling.md +1 -0
- package/dist/docs/switch/switch.md +10 -0
- package/dist/docs/tabs/api.md +2 -2
- package/dist/docs/tabs/styling.md +1 -0
- package/dist/docs/tabs/tabs.md +4 -2
- package/dist/docs/textarea/api.md +54 -14
- package/dist/docs/textarea/styling.md +92 -0
- package/dist/docs/textarea/textarea.md +147 -14
- package/dist/docs/textfield/api.md +74 -34
- package/dist/docs/textfield/styling.md +96 -0
- package/dist/docs/textfield/textfield.md +171 -34
- package/dist/index.d.ts +1369 -370
- package/dist/packages/affix/affix-styles.d.ts +8 -0
- package/dist/packages/affix/affix-styles.js +108 -0
- package/dist/packages/affix/affix.d.ts +16 -13
- 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 +451 -320
- package/dist/packages/affix/affix.js.map +4 -4
- package/dist/packages/affix/affix.react.stories.d.ts +3 -3
- 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 +3 -3
- package/dist/packages/affix/react.js +6 -6
- package/dist/packages/affix/styles.js +2 -2
- 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 +349 -324
- package/dist/packages/alert/alert.js.map +3 -3
- 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 +2 -2
- 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 +1795 -1781
- package/dist/packages/attention/attention.js.map +4 -4
- 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 +2 -2
- 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 +281 -281
- package/dist/packages/badge/badge.js.map +3 -3
- 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 +2 -2
- 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 +288 -288
- package/dist/packages/box/box.js.map +3 -3
- 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 +2 -2
- package/dist/packages/breadcrumb-item/breadcrumb-item.d.ts +29 -0
- package/dist/packages/breadcrumb-item/breadcrumb-item.js +2529 -0
- package/dist/packages/breadcrumb-item/breadcrumb-item.js.map +7 -0
- package/dist/packages/breadcrumb-item/react.d.ts +2 -0
- package/dist/packages/breadcrumb-item/react.js +11 -0
- package/dist/packages/breadcrumb-item/styles.d.ts +4 -0
- package/dist/packages/breadcrumb-item/styles.js +81 -0
- package/dist/packages/breadcrumbs/breadcrumbs.d.ts +4 -3
- package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.d.ts +1 -1
- package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.js +57 -50
- package/dist/packages/breadcrumbs/breadcrumbs.js +287 -283
- package/dist/packages/breadcrumbs/breadcrumbs.js.map +4 -4
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +4 -4
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.js +17 -16
- package/dist/packages/breadcrumbs/breadcrumbs.stories.d.ts +7 -8
- package/dist/packages/breadcrumbs/breadcrumbs.stories.js +30 -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 +2 -2
- package/dist/packages/button/button.d.ts +20 -15
- 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 +809 -811
- package/dist/packages/button/button.js.map +4 -4
- 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 +33 -4
- package/dist/packages/button/button.stories.js +353 -70
- 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.d.ts +22 -1
- package/dist/packages/button/styles.js +433 -2
- 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 +311 -296
- package/dist/packages/card/card.js.map +4 -4
- 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 +2 -2
- 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 +48 -17
- 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 +481 -430
- package/dist/packages/checkbox/checkbox.js.map +3 -3
- package/dist/packages/checkbox/checkbox.react.stories.d.ts +3 -3
- package/dist/packages/checkbox/checkbox.react.stories.js +3 -3
- package/dist/packages/checkbox/checkbox.stories.d.ts +5 -5
- 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 +2 -2
- 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 +54 -13
- 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 +62 -57
- package/dist/packages/checkbox-group/checkbox-group.js.map +4 -4
- 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 +183 -90
- package/dist/packages/checkbox-group/react.d.ts +4 -4
- 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 +80 -33
- package/dist/packages/combobox/combobox.d.ts +67 -47
- package/dist/packages/combobox/combobox.hydration.test.d.ts +1 -1
- package/dist/packages/combobox/combobox.hydration.test.js +73 -35
- package/dist/packages/combobox/combobox.js +338 -339
- package/dist/packages/combobox/combobox.js.map +4 -4
- package/dist/packages/combobox/combobox.react.stories.d.ts +29 -13
- 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 +104 -85
- package/dist/packages/combobox/combobox.test.d.ts +2 -2
- package/dist/packages/combobox/combobox.test.js +295 -69
- package/dist/packages/combobox/react.d.ts +15 -7
- package/dist/packages/combobox/react.js +14 -14
- package/dist/packages/combobox/styles.js +2 -3
- package/dist/packages/datepicker/DatePicker.test.d.ts +2 -2
- package/dist/packages/datepicker/DatePicker.test.js +49 -42
- package/dist/packages/datepicker/datepicker.d.ts +30 -38
- 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 +673 -632
- package/dist/packages/datepicker/datepicker.js.map +4 -4
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +17 -17
- 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 +9 -9
- 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 +3 -0
- package/dist/packages/datepicker/utils.js +40 -1
- package/dist/packages/datepicker/utils.test.d.ts +1 -0
- package/dist/packages/datepicker/utils.test.js +29 -0
- package/dist/packages/expandable/expandable.d.ts +18 -39
- 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 +359 -332
- package/dist/packages/expandable/expandable.js.map +4 -4
- package/dist/packages/expandable/expandable.react.stories.d.ts +5 -5
- 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 +3 -3
- package/dist/packages/expandable/react.js +9 -9
- package/dist/packages/expandable/styles.js +2 -2
- 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 +22 -5
- 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 +3 -3
- package/dist/packages/icon/icon.react.stories.d.ts +4 -3
- package/dist/packages/icon/icon.react.stories.js +284 -283
- package/dist/packages/icon/icon.stories.d.ts +7 -30
- package/dist/packages/icon/icon.stories.js +307 -297
- 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 +2 -2
- 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 +22 -23
- 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 +775 -498
- package/dist/packages/link/link.js.map +4 -4
- 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.d.ts +5 -0
- package/dist/packages/link/styles.js +85 -0
- package/dist/packages/modal/index.d.ts +7 -7
- package/dist/packages/modal/index.js +7 -7
- package/dist/packages/modal/modal.d.ts +3 -2
- 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 +409 -409
- package/dist/packages/modal/modal.js.map +3 -3
- package/dist/packages/modal/modal.react.stories.d.ts +7 -7
- package/dist/packages/modal/modal.react.stories.js +15 -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 +38 -8
- package/dist/packages/modal/react.js +43 -13
- package/dist/packages/modal/util.js +3 -1
- package/dist/packages/modal-footer/modal-footer.d.ts +1 -1
- package/dist/packages/modal-footer/modal-footer.js +296 -296
- package/dist/packages/modal-footer/modal-footer.js.map +3 -3
- 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 +443 -422
- package/dist/packages/modal-header/modal-header.js.map +4 -4
- package/dist/packages/modal-header/modal-header.react.test.js +5 -3
- package/dist/packages/modal-header/react.d.ts +4 -4
- package/dist/packages/modal-header/react.js +8 -8
- package/dist/packages/page-indicator/page-indicator.d.ts +1 -5
- 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 +29 -29
- package/dist/packages/page-indicator/page-indicator.js.map +4 -4
- 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 +9 -27
- package/dist/packages/page-indicator/page-indicator.stories.js +63 -32
- 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 +10 -11
- 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 +385 -354
- package/dist/packages/pagination/pagination.js.map +4 -4
- package/dist/packages/pagination/pagination.react.stories.d.ts +11 -11
- 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 -72
- package/dist/packages/pagination/react.d.ts +6 -6
- package/dist/packages/pagination/react.js +12 -10
- package/dist/packages/pagination/styles.js +2 -2
- package/dist/packages/pill/pill.d.ts +6 -6
- 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 +337 -314
- package/dist/packages/pill/pill.js.map +4 -4
- package/dist/packages/pill/pill.react.stories.d.ts +11 -11
- 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 +6 -6
- package/dist/packages/pill/react.js +18 -14
- package/dist/packages/pill/styles.js +2 -2
- 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 +9 -9
- 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 +4 -4
- 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 +491 -452
- 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 +83 -77
- package/dist/packages/radio-group/radio-group.d.ts +16 -7
- package/dist/packages/radio-group/radio-group.hydration.test.d.ts +2 -2
- package/dist/packages/radio-group/radio-group.hydration.test.js +30 -15
- package/dist/packages/radio-group/radio-group.js +655 -567
- package/dist/packages/radio-group/radio-group.js.map +4 -4
- 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 +304 -230
- package/dist/packages/radio-group/react.d.ts +7 -7
- package/dist/packages/radio-group/react.js +10 -10
- package/dist/packages/select/input-styles.d.ts +11 -0
- package/dist/packages/select/input-styles.js +88 -0
- package/dist/packages/select/locales/da/messages.mjs +1 -1
- package/dist/packages/select/locales/en/messages.mjs +1 -1
- package/dist/packages/select/locales/fi/messages.mjs +1 -1
- package/dist/packages/select/locales/nb/messages.mjs +1 -1
- package/dist/packages/select/locales/sv/messages.mjs +1 -1
- package/dist/packages/select/react.d.ts +5 -5
- 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 +100 -89
- package/dist/packages/select/select.d.ts +10 -11
- 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 +432 -336
- package/dist/packages/select/select.js.map +4 -4
- package/dist/packages/select/select.react.stories.d.ts +10 -10
- package/dist/packages/select/select.react.stories.js +19 -14
- 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 +230 -179
- package/dist/packages/select/styles.js +2 -2
- 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/locales/da/messages.mjs +1 -1
- package/dist/packages/slider/locales/en/messages.mjs +1 -1
- package/dist/packages/slider/locales/fi/messages.mjs +1 -1
- package/dist/packages/slider/locales/nb/messages.mjs +1 -1
- package/dist/packages/slider/locales/sv/messages.mjs +1 -1
- package/dist/packages/slider/react.d.ts +4 -4
- package/dist/packages/slider/react.js +9 -9
- package/dist/packages/slider/slider.d.ts +25 -17
- package/dist/packages/slider/slider.hydration.test.d.ts +1 -1
- package/dist/packages/slider/slider.hydration.test.js +40 -16
- package/dist/packages/slider/slider.js +524 -467
- package/dist/packages/slider/slider.js.map +4 -4
- package/dist/packages/slider/slider.react.stories.d.ts +4 -4
- package/dist/packages/slider/slider.react.stories.js +29 -32
- package/dist/packages/slider/slider.react.test.js +6 -6
- package/dist/packages/slider/slider.stories.d.ts +9 -7
- package/dist/packages/slider/slider.stories.js +369 -340
- package/dist/packages/slider/slider.test.d.ts +5 -5
- package/dist/packages/slider/slider.test.js +476 -336
- package/dist/packages/slider/styles/w-slider.styles.js +166 -148
- package/dist/packages/slider/styles.js +2 -2
- 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 +5 -5
- package/dist/packages/slider-thumb/react.js +11 -9
- package/dist/packages/slider-thumb/slider-thumb.d.ts +17 -17
- 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 +550 -553
- package/dist/packages/slider-thumb/slider-thumb.js.map +4 -4
- 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 +2 -0
- 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 +337 -315
- package/dist/packages/step/step.js.map +4 -4
- 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 +285 -281
- package/dist/packages/step-indicator/step-indicator.js.map +3 -3
- 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 +2 -2
- package/dist/packages/styles.js +277 -275
- package/dist/packages/switch/react.d.ts +1 -1
- package/dist/packages/switch/react.js +6 -6
- package/dist/packages/switch/styles.js +2 -2
- 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 +3 -3
- 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 +304 -304
- package/dist/packages/switch/switch.js.map +3 -3
- 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 +9 -7
- 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 +6 -6
- 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 +309 -308
- package/dist/packages/tab/tab.js.map +4 -4
- 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 +293 -291
- package/dist/packages/tab-panel/tab-panel.js.map +3 -3
- 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 +2 -2
- 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 +6 -5
- 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 +293 -286
- package/dist/packages/tabs/tabs.js.map +3 -3
- 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 +137 -123
- package/dist/packages/textarea/input-styles.d.ts +11 -0
- package/dist/packages/textarea/input-styles.js +88 -0
- package/dist/packages/textarea/locales/da/messages.mjs +1 -1
- package/dist/packages/textarea/locales/en/messages.mjs +1 -1
- package/dist/packages/textarea/locales/fi/messages.mjs +1 -1
- package/dist/packages/textarea/locales/nb/messages.mjs +1 -1
- package/dist/packages/textarea/locales/sv/messages.mjs +1 -1
- package/dist/packages/textarea/react.d.ts +11 -11
- package/dist/packages/textarea/react.js +17 -17
- package/dist/packages/textarea/styles.js +2 -2
- package/dist/packages/textarea/textarea.a11y.test.d.ts +1 -1
- package/dist/packages/textarea/textarea.a11y.test.js +90 -58
- package/dist/packages/textarea/textarea.d.ts +12 -11
- 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 +385 -304
- package/dist/packages/textarea/textarea.js.map +4 -4
- package/dist/packages/textarea/textarea.react.stories.d.ts +21 -21
- 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 +197 -88
- package/dist/packages/textfield/input-styles.d.ts +11 -0
- package/dist/packages/textfield/input-styles.js +88 -0
- package/dist/packages/textfield/locales/da/messages.d.mts +1 -0
- package/dist/packages/textfield/locales/da/messages.mjs +1 -0
- package/dist/packages/textfield/locales/en/messages.d.mts +1 -0
- package/dist/packages/textfield/locales/en/messages.mjs +1 -0
- package/dist/packages/textfield/locales/fi/messages.d.mts +1 -0
- package/dist/packages/textfield/locales/fi/messages.mjs +1 -0
- package/dist/packages/textfield/locales/nb/messages.d.mts +1 -0
- package/dist/packages/textfield/locales/nb/messages.mjs +1 -0
- package/dist/packages/textfield/locales/sv/messages.d.mts +1 -0
- package/dist/packages/textfield/locales/sv/messages.mjs +1 -0
- package/dist/packages/textfield/react.d.ts +11 -11
- 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 +2 -2
- package/dist/packages/textfield/textfield.d.ts +36 -26
- 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 +468 -373
- package/dist/packages/textfield/textfield.js.map +4 -4
- package/dist/packages/textfield/textfield.react.stories.d.ts +21 -21
- 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 +174 -71
- package/dist/packages/toast/api.d.ts +2 -2
- 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/styles.js +2 -2
- package/dist/packages/toast/toast.d.ts +5 -5
- package/dist/packages/toast/toast.js +349 -320
- package/dist/packages/toast/toast.js.map +4 -4
- package/dist/packages/toast/toast.stories.d.ts +5 -9
- package/dist/packages/toast/toast.stories.js +37 -33
- 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.d.ts +1 -0
- package/dist/packages/toast-container/styles.js +2 -0
- package/dist/packages/toast-container/toast-container.d.ts +2 -2
- package/dist/packages/toast-container/toast-container.js +295 -294
- package/dist/packages/toast-container/toast-container.js.map +4 -4
- 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 +577 -301
- package/eik/index.js +96 -0
- package/package.json +35 -29
- package/dist/docs/modal-footer/accessibility.md +0 -1
- package/dist/docs/modal-footer/examples.md +0 -1
- package/dist/docs/modal-footer/usage.md +0 -1
- package/dist/docs/modal-header/accessibility.md +0 -1
- package/dist/docs/modal-header/examples.md +0 -1
- package/dist/docs/modal-header/usage.md +0 -1
- package/dist/docs/radio/accessibility.md +0 -1
- package/dist/docs/radio/examples.md +0 -1
- package/dist/docs/radio/usage.md +0 -1
- package/dist/packages/button/styles/w-button.styles.d.ts +0 -1
- package/dist/packages/button/styles/w-button.styles.js +0 -282
- package/dist/packages/link/styles/w-link.styles.js +0 -213
- /package/dist/packages/{link/styles/w-link.styles.d.ts → slider-thumb/styles.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { WIcon } from "./packages/icon/icon.ts";
|
|
2
1
|
import type { WarpTextField } from "./packages/textfield/textfield.ts";
|
|
2
|
+
import type { WarpIcon, WIcon } from "./packages/icon/icon.ts";
|
|
3
3
|
import type { WarpAffix } from "./packages/affix/affix.ts";
|
|
4
4
|
import type { WarpAlert } from "./packages/alert/alert.ts";
|
|
5
5
|
import type { WarpLink } from "./packages/link/link.ts";
|
|
@@ -8,9 +8,13 @@ import type { WarpAttention } from "./packages/attention/attention.ts";
|
|
|
8
8
|
import type { WarpBadge } from "./packages/badge/badge.ts";
|
|
9
9
|
import type { WarpBox } from "./packages/box/box.ts";
|
|
10
10
|
import type { WarpBreadcrumbs } from "./packages/breadcrumbs/breadcrumbs.ts";
|
|
11
|
+
import type { WarpBreadcrumbItem } from "./packages/breadcrumb-item/breadcrumb-item.ts";
|
|
11
12
|
import type { WarpCard } from "./packages/card/card.ts";
|
|
12
|
-
import type { WCheckbox } from "./packages/checkbox/checkbox.ts";
|
|
13
|
-
import type {
|
|
13
|
+
import type { WarpCheckbox, WCheckbox } from "./packages/checkbox/checkbox.ts";
|
|
14
|
+
import type {
|
|
15
|
+
WarpCheckboxGroup,
|
|
16
|
+
WCheckboxGroup,
|
|
17
|
+
} from "./packages/checkbox-group/checkbox-group.ts";
|
|
14
18
|
import type { WarpCombobox } from "./packages/combobox/combobox.ts";
|
|
15
19
|
import type { WarpDatepicker } from "./packages/datepicker/datepicker.ts";
|
|
16
20
|
import type { WarpExpandable } from "./packages/expandable/expandable.ts";
|
|
@@ -34,6 +38,8 @@ import type {
|
|
|
34
38
|
import type { WarpSelect } from "./packages/select/select.ts";
|
|
35
39
|
import type { WarpSliderThumb } from "./packages/slider-thumb/slider-thumb.ts";
|
|
36
40
|
import type { WarpSlider } from "./packages/slider/slider.ts";
|
|
41
|
+
import type { WarpSnackbarItem } from "./packages/snackbar-item/snackbar-item.ts";
|
|
42
|
+
import type { WarpSnackbar } from "./packages/snackbar/snackbar.ts";
|
|
37
43
|
import type { WarpStep } from "./packages/step/step.ts";
|
|
38
44
|
import type { WarpStepIndicator } from "./packages/step-indicator/step-indicator.ts";
|
|
39
45
|
import type { WarpSwitch } from "./packages/switch/switch.ts";
|
|
@@ -67,6 +73,15 @@ export type ScopedElements<
|
|
|
67
73
|
[Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
|
|
68
74
|
};
|
|
69
75
|
|
|
76
|
+
/**
|
|
77
|
+
* A generic type for strongly typing custom events with their targets
|
|
78
|
+
* @template T - The type of the event target (extends EventTarget)
|
|
79
|
+
* @template D - The type of the detail payload for the custom event
|
|
80
|
+
*/
|
|
81
|
+
type TypedEvent<T extends EventTarget, E = Event> = E & {
|
|
82
|
+
target: T;
|
|
83
|
+
};
|
|
84
|
+
|
|
70
85
|
type BaseProps<T extends HTMLElement> = {
|
|
71
86
|
/** Content added between the opening and closing tags of the element */
|
|
72
87
|
children?: any;
|
|
@@ -90,6 +105,8 @@ type BaseProps<T extends HTMLElement> = {
|
|
|
90
105
|
key?: string | number;
|
|
91
106
|
/** Specifies the language of the element. */
|
|
92
107
|
lang?: string;
|
|
108
|
+
/** Defines the element's semantic role for accessibility APIs. */
|
|
109
|
+
role?: string;
|
|
93
110
|
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
94
111
|
part?: string;
|
|
95
112
|
/** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
|
|
@@ -112,29 +129,112 @@ type BaseProps<T extends HTMLElement> = {
|
|
|
112
129
|
popovertargetaction?: "show" | "hide" | "toggle";
|
|
113
130
|
};
|
|
114
131
|
|
|
115
|
-
type BaseEvents = {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
|
|
132
|
+
type BaseEvents = {
|
|
133
|
+
// Mouse Events
|
|
134
|
+
|
|
135
|
+
/** Triggered when the element is clicked by the user by mouse or keyboard. */
|
|
136
|
+
onClick?: (event: MouseEvent) => void;
|
|
137
|
+
/** Fired when the context menu is triggered, often by right-clicking. */
|
|
138
|
+
onContextMenu?: (event: MouseEvent) => void;
|
|
139
|
+
/** Fired when the element is double-clicked. */
|
|
140
|
+
onDoubleClick?: (event: MouseEvent) => void;
|
|
141
|
+
/** Fired repeatedly as the draggable element is being dragged. */
|
|
142
|
+
onDrag?: (event: DragEvent) => void;
|
|
143
|
+
/** Fired when the dragging of a draggable element is finished. */
|
|
144
|
+
onDragEnd?: (event: DragEvent) => void;
|
|
145
|
+
/** Fired when a dragged element or text selection enters a valid drop target. */
|
|
146
|
+
onDragEnter?: (event: DragEvent) => void;
|
|
147
|
+
/** Fired when a dragged element or text selection leaves a valid drop target. */
|
|
148
|
+
onDragExit?: (event: DragEvent) => void;
|
|
149
|
+
/** Fired when a dragged element or text selection leaves a valid drop target. */
|
|
150
|
+
onDragLeave?: (event: DragEvent) => void;
|
|
151
|
+
/** Fired when an element or text selection is being dragged over a valid drop target (every few hundred milliseconds). */
|
|
152
|
+
onDragOver?: (event: DragEvent) => void;
|
|
153
|
+
/** Fired when a draggable element starts being dragged. */
|
|
154
|
+
onDragStart?: (event: DragEvent) => void;
|
|
155
|
+
/** Fired when a dragged element is dropped onto a drop target. */
|
|
156
|
+
onDrop?: (event: DragEvent) => void;
|
|
157
|
+
/** Fired when a mouse button is pressed down on the element. */
|
|
158
|
+
onMouseDown?: (event: MouseEvent) => void;
|
|
159
|
+
/** Fired when the mouse cursor enters the element. */
|
|
160
|
+
onMouseEnter?: (event: MouseEvent) => void;
|
|
161
|
+
/** Triggered when the mouse cursor leaves the element. */
|
|
162
|
+
onMouseLeave?: (event: MouseEvent) => void;
|
|
163
|
+
/** Fired at an element when a pointing device (usually a mouse) is moved while the cursor's hotspot is inside it. */
|
|
164
|
+
onMouseMove?: (event: MouseEvent) => void;
|
|
165
|
+
/** Fired at an Element when a pointing device (usually a mouse) is used to move the cursor so that it is no longer contained within the element or one of its children. */
|
|
166
|
+
onMouseOut?: (event: MouseEvent) => void;
|
|
167
|
+
/** Fired at an Element when a pointing device (such as a mouse or trackpad) is used to move the cursor onto the element or one of its child elements. */
|
|
168
|
+
onMouseOver?: (event: MouseEvent) => void;
|
|
169
|
+
/** Fired when a mouse button is released on the element. */
|
|
170
|
+
onMouseUp?: (event: MouseEvent) => void;
|
|
171
|
+
|
|
172
|
+
// Keyboard Events
|
|
173
|
+
|
|
174
|
+
/** Fired when a key is pressed down. */
|
|
175
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
|
176
|
+
/** Fired when a key is released.. */
|
|
177
|
+
onKeyUp?: (event: KeyboardEvent) => void;
|
|
178
|
+
/** Fired when a key is pressed down. */
|
|
179
|
+
onKeyPressed?: (event: KeyboardEvent) => void;
|
|
180
|
+
|
|
181
|
+
// Focus Events
|
|
182
|
+
|
|
183
|
+
/** Fired when the element receives focus, often triggered by tab navigation. */
|
|
184
|
+
onFocus?: (event: FocusEvent) => void;
|
|
185
|
+
/** Fired when the element loses focus. */
|
|
186
|
+
onBlur?: (event: FocusEvent) => void;
|
|
187
|
+
|
|
188
|
+
// Form Events
|
|
189
|
+
|
|
190
|
+
/** Fired when the value of an input element changes, such as with text inputs or select elements. */
|
|
191
|
+
onChange?: (event: Event) => void;
|
|
192
|
+
/** Fires when the value of an <input>, <select>, or <textarea> element has been changed. */
|
|
193
|
+
onInput?: (event: Event) => void;
|
|
194
|
+
/** Fired when a form is submitted, usually on pressing Enter in a text input. */
|
|
195
|
+
onSubmit?: (event: Event) => void;
|
|
196
|
+
/** Fired when a form is reset. */
|
|
197
|
+
onReset?: (event: Event) => void;
|
|
198
|
+
|
|
199
|
+
// UI Events
|
|
200
|
+
|
|
201
|
+
/** Fired when the content of an element is scrolled. */
|
|
202
|
+
onScroll?: (event: UIEvent) => void;
|
|
203
|
+
|
|
204
|
+
// Wheel Events
|
|
205
|
+
|
|
206
|
+
/** Fired when the mouse wheel is scrolled while the element is focused. */
|
|
207
|
+
onWheel?: (event: WheelEvent) => void;
|
|
208
|
+
|
|
209
|
+
// Animation Events
|
|
210
|
+
|
|
211
|
+
/** Fired when a CSS animation starts. */
|
|
212
|
+
onAnimationStart?: (event: AnimationEvent) => void;
|
|
213
|
+
/** Fired when a CSS animation completes. */
|
|
214
|
+
onAnimationEnd?: (event: AnimationEvent) => void;
|
|
215
|
+
/** Fired when a CSS animation completes one iteration. */
|
|
216
|
+
onAnimationIteration?: (event: AnimationEvent) => void;
|
|
217
|
+
|
|
218
|
+
// Transition Events
|
|
219
|
+
|
|
220
|
+
/** Fired when a CSS transition has completed. */
|
|
221
|
+
onTransitionEnd?: (event: TransitionEvent) => void;
|
|
222
|
+
|
|
223
|
+
// Media Events
|
|
224
|
+
|
|
225
|
+
/** Fired when an element (usually an image) finishes loading */
|
|
226
|
+
onLoad?: (event: Event) => void;
|
|
227
|
+
/** Fired when an error occurs during the loading of an element, like an image not being found. */
|
|
228
|
+
onError?: (event: Event) => void;
|
|
229
|
+
|
|
230
|
+
// Clipboard Events
|
|
231
|
+
|
|
232
|
+
/** Fires when the user initiates a copy action through the browser's user interface. */
|
|
233
|
+
onCopy?: (event: ClipboardEvent) => void;
|
|
234
|
+
/** Fired when the user has initiated a "cut" action through the browser's user interface. */
|
|
235
|
+
onCut?: (event: ClipboardEvent) => void;
|
|
236
|
+
/** Fired when the user has initiated a "paste" action through the browser's user interface. */
|
|
237
|
+
onPaste?: (event: ClipboardEvent) => void;
|
|
138
238
|
};
|
|
139
239
|
|
|
140
240
|
export type WarpTextFieldProps = {
|
|
@@ -154,6 +254,8 @@ or on its own to show a help text. */
|
|
|
154
254
|
/** Use in combination with `invalid` to show as a validation error message,
|
|
155
255
|
or on its own to show a help text. */
|
|
156
256
|
helpText?: WarpTextField["helpText"];
|
|
257
|
+
/** Whether to show the optional indicator after the label. */
|
|
258
|
+
optional?: WarpTextField["optional"];
|
|
157
259
|
/** Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs. */
|
|
158
260
|
size?: WarpTextField["size"];
|
|
159
261
|
/** Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength). */
|
|
@@ -223,6 +325,8 @@ or on its own to show a help text. */
|
|
|
223
325
|
/** Use in combination with `invalid` to show as a validation error message,
|
|
224
326
|
or on its own to show a help text. */
|
|
225
327
|
"prop:helpText"?: WarpTextField["helpText"];
|
|
328
|
+
/** Whether to show the optional indicator after the label. */
|
|
329
|
+
"prop:optional"?: WarpTextField["optional"];
|
|
226
330
|
/** Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs. */
|
|
227
331
|
"prop:size"?: WarpTextField["size"];
|
|
228
332
|
/** Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength). */
|
|
@@ -280,6 +384,33 @@ similar to the accessible input [masking example from Filament Group](https://fi
|
|
|
280
384
|
textContent?: string | number;
|
|
281
385
|
};
|
|
282
386
|
|
|
387
|
+
export type WarpIconProps = {
|
|
388
|
+
/** Icon filename (without .svg) */
|
|
389
|
+
name?: WarpIcon["name"];
|
|
390
|
+
/** Size: small, medium, large or pixel value (e.g. "32px"). */
|
|
391
|
+
size?: WarpIcon["size"];
|
|
392
|
+
/** Locale used for `<title>` text.
|
|
393
|
+
|
|
394
|
+
Reads the `lang` attribute from `<html>`, falls back to 'en'. */
|
|
395
|
+
locale?: WarpIcon["locale"];
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
export type WarpIconSolidJsProps = {
|
|
399
|
+
/** Icon filename (without .svg) */
|
|
400
|
+
"prop:name"?: WarpIcon["name"];
|
|
401
|
+
/** Size: small, medium, large or pixel value (e.g. "32px"). */
|
|
402
|
+
"prop:size"?: WarpIcon["size"];
|
|
403
|
+
/** Locale used for `<title>` text.
|
|
404
|
+
|
|
405
|
+
Reads the `lang` attribute from `<html>`, falls back to 'en'. */
|
|
406
|
+
"prop:locale"?: WarpIcon["locale"];
|
|
407
|
+
|
|
408
|
+
/** Set the innerHTML of the element */
|
|
409
|
+
innerHTML?: string;
|
|
410
|
+
/** Set the textContent of the element */
|
|
411
|
+
textContent?: string | number;
|
|
412
|
+
};
|
|
413
|
+
|
|
283
414
|
export type WarpAffixProps = {
|
|
284
415
|
/** */
|
|
285
416
|
"aria-label"?: WarpAffix["ariaLabel"];
|
|
@@ -343,44 +474,52 @@ export type WarpAlertSolidJsProps = {
|
|
|
343
474
|
};
|
|
344
475
|
|
|
345
476
|
export type WarpLinkProps = {
|
|
346
|
-
/**
|
|
477
|
+
/** Focus the link after it is rendered */
|
|
347
478
|
autofocus?: WarpLink["autofocus"];
|
|
348
|
-
/**
|
|
479
|
+
/** Visual style for the link/button. */
|
|
349
480
|
variant?: WarpLink["variant"];
|
|
350
|
-
/**
|
|
481
|
+
/** Render a smaller version */
|
|
351
482
|
small?: WarpLink["small"];
|
|
352
|
-
/**
|
|
483
|
+
/** The URL the link points to */
|
|
353
484
|
href?: WarpLink["href"];
|
|
354
|
-
/**
|
|
485
|
+
/** Applies disabled styling, but you need to disable clicks on your own.
|
|
486
|
+
|
|
487
|
+
The component renders an `<a>` element; `disabled` affects styling, but does not inherently prevent navigation. If you need to fully disable interaction, omit `href` and/or prevent default click behavior. */
|
|
355
488
|
disabled?: WarpLink["disabled"];
|
|
356
|
-
/**
|
|
489
|
+
/** Where to display the linked URL (e.g. `_blank`) */
|
|
357
490
|
target?: WarpLink["target"];
|
|
358
|
-
/**
|
|
491
|
+
/** Relationship of the linked URL.
|
|
492
|
+
|
|
493
|
+
If `target="_blank"` and `rel` is not provided, the component uses `noopener`. */
|
|
359
494
|
rel?: WarpLink["rel"];
|
|
360
|
-
/**
|
|
495
|
+
/** Makes the link take up the full width of its parent */
|
|
361
496
|
"full-width"?: WarpLink["fullWidth"];
|
|
362
|
-
/**
|
|
497
|
+
/** Makes the link take up the full width of its parent */
|
|
363
498
|
fullWidth?: WarpLink["fullWidth"];
|
|
364
499
|
};
|
|
365
500
|
|
|
366
501
|
export type WarpLinkSolidJsProps = {
|
|
367
|
-
/**
|
|
502
|
+
/** Focus the link after it is rendered */
|
|
368
503
|
"prop:autofocus"?: WarpLink["autofocus"];
|
|
369
|
-
/**
|
|
504
|
+
/** Visual style for the link/button. */
|
|
370
505
|
"prop:variant"?: WarpLink["variant"];
|
|
371
|
-
/**
|
|
506
|
+
/** Render a smaller version */
|
|
372
507
|
"prop:small"?: WarpLink["small"];
|
|
373
|
-
/**
|
|
508
|
+
/** The URL the link points to */
|
|
374
509
|
"prop:href"?: WarpLink["href"];
|
|
375
|
-
/**
|
|
510
|
+
/** Applies disabled styling, but you need to disable clicks on your own.
|
|
511
|
+
|
|
512
|
+
The component renders an `<a>` element; `disabled` affects styling, but does not inherently prevent navigation. If you need to fully disable interaction, omit `href` and/or prevent default click behavior. */
|
|
376
513
|
"prop:disabled"?: WarpLink["disabled"];
|
|
377
|
-
/**
|
|
514
|
+
/** Where to display the linked URL (e.g. `_blank`) */
|
|
378
515
|
"prop:target"?: WarpLink["target"];
|
|
379
|
-
/**
|
|
516
|
+
/** Relationship of the linked URL.
|
|
517
|
+
|
|
518
|
+
If `target="_blank"` and `rel` is not provided, the component uses `noopener`. */
|
|
380
519
|
"prop:rel"?: WarpLink["rel"];
|
|
381
|
-
/**
|
|
520
|
+
/** Makes the link take up the full width of its parent */
|
|
382
521
|
"bool:full-width"?: WarpLink["fullWidth"];
|
|
383
|
-
/**
|
|
522
|
+
/** Makes the link take up the full width of its parent */
|
|
384
523
|
"prop:fullWidth"?: WarpLink["fullWidth"];
|
|
385
524
|
|
|
386
525
|
/** Set the innerHTML of the element */
|
|
@@ -722,6 +861,35 @@ Defaults to the localized "You are here" label. Set `aria-label` when the defaul
|
|
|
722
861
|
textContent?: string | number;
|
|
723
862
|
};
|
|
724
863
|
|
|
864
|
+
export type WarpBreadcrumbItemProps = {
|
|
865
|
+
/** Marks this item as the current page.
|
|
866
|
+
Use this on the final breadcrumb item so it exposes `aria-current="page"` and does not render a trailing separator. */
|
|
867
|
+
"current-page"?: WarpBreadcrumbItem["currentPage"];
|
|
868
|
+
/** Marks this item as the current page.
|
|
869
|
+
Use this on the final breadcrumb item so it exposes `aria-current="page"` and does not render a trailing separator. */
|
|
870
|
+
currentPage?: WarpBreadcrumbItem["currentPage"];
|
|
871
|
+
/** URL for linked breadcrumb items.
|
|
872
|
+
When omitted, the item renders as non-focusable text. */
|
|
873
|
+
href?: WarpBreadcrumbItem["href"];
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
export type WarpBreadcrumbItemSolidJsProps = {
|
|
877
|
+
/** Marks this item as the current page.
|
|
878
|
+
Use this on the final breadcrumb item so it exposes `aria-current="page"` and does not render a trailing separator. */
|
|
879
|
+
"bool:current-page"?: WarpBreadcrumbItem["currentPage"];
|
|
880
|
+
/** Marks this item as the current page.
|
|
881
|
+
Use this on the final breadcrumb item so it exposes `aria-current="page"` and does not render a trailing separator. */
|
|
882
|
+
"prop:currentPage"?: WarpBreadcrumbItem["currentPage"];
|
|
883
|
+
/** URL for linked breadcrumb items.
|
|
884
|
+
When omitted, the item renders as non-focusable text. */
|
|
885
|
+
"prop:href"?: WarpBreadcrumbItem["href"];
|
|
886
|
+
|
|
887
|
+
/** Set the innerHTML of the element */
|
|
888
|
+
innerHTML?: string;
|
|
889
|
+
/** Set the textContent of the element */
|
|
890
|
+
textContent?: string | number;
|
|
891
|
+
};
|
|
892
|
+
|
|
725
893
|
export type WarpCardProps = {
|
|
726
894
|
/** Whether the card is visually selected.
|
|
727
895
|
|
|
@@ -761,47 +929,78 @@ When set, the card becomes keyboard focusable and Enter or Space triggers a clic
|
|
|
761
929
|
textContent?: string | number;
|
|
762
930
|
};
|
|
763
931
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
/**
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
932
|
+
/** `WarpCheckbox` component event */
|
|
933
|
+
export type WarpCheckboxElementEvent<E = Event> = TypedEvent<WarpCheckbox, E>;
|
|
934
|
+
|
|
935
|
+
export type WarpCheckboxProps = {
|
|
936
|
+
/** The name of the checkbox.
|
|
937
|
+
|
|
938
|
+
When the checkbox is checked and belongs to a form, this name is submitted with the checkbox value. If the checkbox is inside a `w-checkbox-group` with a name, the group name is used when the checkbox does not have its own name. */
|
|
939
|
+
name?: WarpCheckbox["name"];
|
|
940
|
+
/** The value submitted when the checkbox is checked.
|
|
941
|
+
|
|
942
|
+
If no value attribute is set, the checkbox defaults to `on`. Unchecked and disabled checkboxes do not submit a value. */
|
|
943
|
+
value?: WarpCheckbox["value"];
|
|
944
|
+
/** Whether the checkbox is visually indeterminate.
|
|
945
|
+
|
|
946
|
+
Use this for parent options that represent a mixed set of child selections. Clicking the checkbox clears the indeterminate state and sets the checkbox to checked. */
|
|
947
|
+
indeterminate?: WarpCheckbox["indeterminate"];
|
|
948
|
+
/** Whether the checkbox is checked.
|
|
949
|
+
|
|
950
|
+
Checked checkboxes submit their value with form data. The property is reflected to the `checked` attribute. */
|
|
951
|
+
checked?: WarpCheckbox["checked"];
|
|
952
|
+
/** Whether the checkbox is disabled.
|
|
953
|
+
|
|
954
|
+
Disabled checkboxes cannot be focused, changed, or submitted with form data. */
|
|
955
|
+
disabled?: WarpCheckbox["disabled"];
|
|
956
|
+
/** Whether the checkbox must be checked before form submission.
|
|
957
|
+
|
|
958
|
+
A required checkbox is invalid until it is checked. For requiring at least one option in a set, use `required` on `w-checkbox-group`. */
|
|
959
|
+
required?: WarpCheckbox["required"];
|
|
960
|
+
/** Whether the checkbox is visually invalid.
|
|
961
|
+
|
|
962
|
+
Use this to show an externally managed validation error. Required validation also sets the invalid state after the user interacts with the checkbox or tries to submit the form. */
|
|
963
|
+
invalid?: WarpCheckbox["invalid"];
|
|
964
|
+
/** */
|
|
965
|
+
input?: WarpCheckbox["input"];
|
|
966
|
+
|
|
967
|
+
/** */
|
|
968
|
+
onchange?: (e: WarpCheckboxElementEvent) => void;
|
|
969
|
+
};
|
|
970
|
+
|
|
971
|
+
export type WarpCheckboxSolidJsProps = {
|
|
972
|
+
/** The name of the checkbox.
|
|
973
|
+
|
|
974
|
+
When the checkbox is checked and belongs to a form, this name is submitted with the checkbox value. If the checkbox is inside a `w-checkbox-group` with a name, the group name is used when the checkbox does not have its own name. */
|
|
975
|
+
"prop:name"?: WarpCheckbox["name"];
|
|
976
|
+
/** The value submitted when the checkbox is checked.
|
|
977
|
+
|
|
978
|
+
If no value attribute is set, the checkbox defaults to `on`. Unchecked and disabled checkboxes do not submit a value. */
|
|
979
|
+
"prop:value"?: WarpCheckbox["value"];
|
|
980
|
+
/** Whether the checkbox is visually indeterminate.
|
|
981
|
+
|
|
982
|
+
Use this for parent options that represent a mixed set of child selections. Clicking the checkbox clears the indeterminate state and sets the checkbox to checked. */
|
|
983
|
+
"prop:indeterminate"?: WarpCheckbox["indeterminate"];
|
|
984
|
+
/** Whether the checkbox is checked.
|
|
985
|
+
|
|
986
|
+
Checked checkboxes submit their value with form data. The property is reflected to the `checked` attribute. */
|
|
987
|
+
"prop:checked"?: WarpCheckbox["checked"];
|
|
988
|
+
/** Whether the checkbox is disabled.
|
|
989
|
+
|
|
990
|
+
Disabled checkboxes cannot be focused, changed, or submitted with form data. */
|
|
991
|
+
"prop:disabled"?: WarpCheckbox["disabled"];
|
|
992
|
+
/** Whether the checkbox must be checked before form submission.
|
|
993
|
+
|
|
994
|
+
A required checkbox is invalid until it is checked. For requiring at least one option in a set, use `required` on `w-checkbox-group`. */
|
|
995
|
+
"prop:required"?: WarpCheckbox["required"];
|
|
996
|
+
/** Whether the checkbox is visually invalid.
|
|
997
|
+
|
|
998
|
+
Use this to show an externally managed validation error. Required validation also sets the invalid state after the user interacts with the checkbox or tries to submit the form. */
|
|
999
|
+
"prop:invalid"?: WarpCheckbox["invalid"];
|
|
1000
|
+
/** */
|
|
1001
|
+
"prop:input"?: WarpCheckbox["input"];
|
|
1002
|
+
/** */
|
|
1003
|
+
"on:change"?: (e: WarpCheckboxElementEvent) => void;
|
|
805
1004
|
|
|
806
1005
|
/** Set the innerHTML of the element */
|
|
807
1006
|
innerHTML?: string;
|
|
@@ -809,38 +1008,66 @@ export type WCheckboxSolidJsProps = {
|
|
|
809
1008
|
textContent?: string | number;
|
|
810
1009
|
};
|
|
811
1010
|
|
|
812
|
-
export type
|
|
813
|
-
/** The group label displayed above the checkboxes.
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
/**
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
/**
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
/**
|
|
826
|
-
|
|
1011
|
+
export type WarpCheckboxGroupProps = {
|
|
1012
|
+
/** The group label displayed above the checkboxes.
|
|
1013
|
+
|
|
1014
|
+
Use this to describe the shared question or topic for the checkbox options. The label is connected to the internal group for assistive technologies. */
|
|
1015
|
+
label?: WarpCheckboxGroup["label"];
|
|
1016
|
+
/** The name applied to child checkboxes when they do not provide one.
|
|
1017
|
+
|
|
1018
|
+
Use this when the grouped checkboxes should submit values under the same form field name. Individual checkboxes can still override the group name with their own `name`. */
|
|
1019
|
+
name?: WarpCheckboxGroup["name"];
|
|
1020
|
+
/** Whether to show optional text next to the label.
|
|
1021
|
+
|
|
1022
|
+
Use this to indicate that selecting an option from the group is not required. */
|
|
1023
|
+
optional?: WarpCheckboxGroup["optional"];
|
|
1024
|
+
/** Help text displayed below the checkbox group.
|
|
1025
|
+
|
|
1026
|
+
Use this for supporting guidance or validation feedback. When required validation fails, the group replaces this text with the localized required message. */
|
|
1027
|
+
"help-text"?: WarpCheckboxGroup["helpText"];
|
|
1028
|
+
/** Help text displayed below the checkbox group.
|
|
1029
|
+
|
|
1030
|
+
Use this for supporting guidance or validation feedback. When required validation fails, the group replaces this text with the localized required message. */
|
|
1031
|
+
helpText?: WarpCheckboxGroup["helpText"];
|
|
1032
|
+
/** Whether at least one checkbox in the group must be selected.
|
|
1033
|
+
|
|
1034
|
+
Required validation is managed by the group. The individual checkboxes provide the submitted form values. */
|
|
1035
|
+
required?: WarpCheckboxGroup["required"];
|
|
1036
|
+
/** Whether the checkbox group is visually invalid.
|
|
1037
|
+
|
|
1038
|
+
Use this to show an externally managed validation error for the group. The invalid state is also shared with child checkboxes for consistent styling and accessibility state. */
|
|
1039
|
+
invalid?: WarpCheckboxGroup["invalid"];
|
|
827
1040
|
};
|
|
828
1041
|
|
|
829
|
-
export type
|
|
830
|
-
/** The group label displayed above the checkboxes.
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
"prop:
|
|
834
|
-
/**
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
"
|
|
838
|
-
/**
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
"prop:
|
|
842
|
-
/**
|
|
843
|
-
|
|
1042
|
+
export type WarpCheckboxGroupSolidJsProps = {
|
|
1043
|
+
/** The group label displayed above the checkboxes.
|
|
1044
|
+
|
|
1045
|
+
Use this to describe the shared question or topic for the checkbox options. The label is connected to the internal group for assistive technologies. */
|
|
1046
|
+
"prop:label"?: WarpCheckboxGroup["label"];
|
|
1047
|
+
/** The name applied to child checkboxes when they do not provide one.
|
|
1048
|
+
|
|
1049
|
+
Use this when the grouped checkboxes should submit values under the same form field name. Individual checkboxes can still override the group name with their own `name`. */
|
|
1050
|
+
"prop:name"?: WarpCheckboxGroup["name"];
|
|
1051
|
+
/** Whether to show optional text next to the label.
|
|
1052
|
+
|
|
1053
|
+
Use this to indicate that selecting an option from the group is not required. */
|
|
1054
|
+
"prop:optional"?: WarpCheckboxGroup["optional"];
|
|
1055
|
+
/** Help text displayed below the checkbox group.
|
|
1056
|
+
|
|
1057
|
+
Use this for supporting guidance or validation feedback. When required validation fails, the group replaces this text with the localized required message. */
|
|
1058
|
+
"attr:help-text"?: WarpCheckboxGroup["helpText"];
|
|
1059
|
+
/** Help text displayed below the checkbox group.
|
|
1060
|
+
|
|
1061
|
+
Use this for supporting guidance or validation feedback. When required validation fails, the group replaces this text with the localized required message. */
|
|
1062
|
+
"prop:helpText"?: WarpCheckboxGroup["helpText"];
|
|
1063
|
+
/** Whether at least one checkbox in the group must be selected.
|
|
1064
|
+
|
|
1065
|
+
Required validation is managed by the group. The individual checkboxes provide the submitted form values. */
|
|
1066
|
+
"prop:required"?: WarpCheckboxGroup["required"];
|
|
1067
|
+
/** Whether the checkbox group is visually invalid.
|
|
1068
|
+
|
|
1069
|
+
Use this to show an externally managed validation error for the group. The invalid state is also shared with child checkboxes for consistent styling and accessibility state. */
|
|
1070
|
+
"prop:invalid"?: WarpCheckboxGroup["invalid"];
|
|
844
1071
|
|
|
845
1072
|
/** Set the innerHTML of the element */
|
|
846
1073
|
innerHTML?: string;
|
|
@@ -849,88 +1076,168 @@ export type WCheckboxGroupSolidJsProps = {
|
|
|
849
1076
|
};
|
|
850
1077
|
|
|
851
1078
|
export type WarpComboboxProps = {
|
|
852
|
-
/** The available options to select from
|
|
1079
|
+
/** The available options to select from.
|
|
1080
|
+
|
|
1081
|
+
Use this for framework usage, application state, or remote search results. When `options` contains entries, it is used instead of child `<option>` elements. */
|
|
853
1082
|
options?: WarpCombobox["options"];
|
|
854
|
-
/**
|
|
1083
|
+
/** The label displayed above the input.
|
|
1084
|
+
|
|
1085
|
+
Use this to give the combobox a visible and accessible name. */
|
|
855
1086
|
label?: WarpCombobox["label"];
|
|
856
|
-
/**
|
|
1087
|
+
/** Placeholder text displayed when the input is empty.
|
|
1088
|
+
|
|
1089
|
+
Use this as a short hint for the expected input. Do not use placeholder text as a replacement for a label. */
|
|
857
1090
|
placeholder?: WarpCombobox["placeholder"];
|
|
858
|
-
/** The
|
|
1091
|
+
/** The selected or typed value.
|
|
1092
|
+
|
|
1093
|
+
When an option is selected, this is set to the option value. The displayed text may differ when the option has a separate label. */
|
|
859
1094
|
value?: WarpCombobox["value"];
|
|
860
|
-
/** Whether the
|
|
1095
|
+
/** Whether the option list opens when the input receives focus.
|
|
1096
|
+
|
|
1097
|
+
Use this when users should see available options before they start typing. */
|
|
861
1098
|
"open-on-focus"?: WarpCombobox["openOnFocus"];
|
|
862
|
-
/** Whether the
|
|
1099
|
+
/** Whether the option list opens when the input receives focus.
|
|
1100
|
+
|
|
1101
|
+
Use this when users should see available options before they start typing. */
|
|
863
1102
|
openOnFocus?: WarpCombobox["openOnFocus"];
|
|
864
|
-
/**
|
|
1103
|
+
/** Whether the active option is selected when the input loses focus.
|
|
1104
|
+
|
|
1105
|
+
When enabled, the combobox selects the keyboard-highlighted option, or an option whose value exactly matches the current input value, on blur. */
|
|
865
1106
|
"select-on-blur"?: WarpCombobox["selectOnBlur"];
|
|
866
|
-
/**
|
|
1107
|
+
/** Whether the active option is selected when the input loses focus.
|
|
1108
|
+
|
|
1109
|
+
When enabled, the combobox selects the keyboard-highlighted option, or an option whose value exactly matches the current input value, on blur. */
|
|
867
1110
|
selectOnBlur?: WarpCombobox["selectOnBlur"];
|
|
868
|
-
/** Whether
|
|
1111
|
+
/** Whether matching text segments in options are highlighted.
|
|
1112
|
+
|
|
1113
|
+
Use this to visually emphasize the part of each option that matches the current input value. */
|
|
869
1114
|
"match-text-segments"?: WarpCombobox["matchTextSegments"];
|
|
870
|
-
/** Whether
|
|
1115
|
+
/** Whether matching text segments in options are highlighted.
|
|
1116
|
+
|
|
1117
|
+
Use this to visually emphasize the part of each option that matches the current input value. */
|
|
871
1118
|
matchTextSegments?: WarpCombobox["matchTextSegments"];
|
|
872
|
-
/**
|
|
1119
|
+
/** Whether built-in client-side filtering is disabled.
|
|
1120
|
+
|
|
1121
|
+
Use this for remote search or externally filtered results. When disabled, all entries in `options` are rendered as provided. */
|
|
873
1122
|
"disable-static-filtering"?: WarpCombobox["disableStaticFiltering"];
|
|
874
|
-
/**
|
|
1123
|
+
/** Whether built-in client-side filtering is disabled.
|
|
1124
|
+
|
|
1125
|
+
Use this for remote search or externally filtered results. When disabled, all entries in `options` are rendered as provided. */
|
|
875
1126
|
disableStaticFiltering?: WarpCombobox["disableStaticFiltering"];
|
|
876
|
-
/**
|
|
1127
|
+
/** Whether the combobox is visually invalid.
|
|
1128
|
+
|
|
1129
|
+
Use this to show an externally managed validation error. Pair it with `help-text` to explain how to fix the error. */
|
|
877
1130
|
invalid?: WarpCombobox["invalid"];
|
|
878
|
-
/**
|
|
1131
|
+
/** Help text displayed below the input.
|
|
1132
|
+
|
|
1133
|
+
Use this for supporting guidance or validation feedback. */
|
|
879
1134
|
"help-text"?: WarpCombobox["helpText"];
|
|
880
|
-
/**
|
|
1135
|
+
/** Help text displayed below the input.
|
|
1136
|
+
|
|
1137
|
+
Use this for supporting guidance or validation feedback. */
|
|
881
1138
|
helpText?: WarpCombobox["helpText"];
|
|
882
|
-
/** Whether the
|
|
1139
|
+
/** Whether the combobox is disabled.
|
|
1140
|
+
|
|
1141
|
+
Disabled comboboxes cannot be focused, changed, or submitted with form data. */
|
|
883
1142
|
disabled?: WarpCombobox["disabled"];
|
|
884
|
-
/** Whether the
|
|
1143
|
+
/** Whether the combobox is required before form submission.
|
|
1144
|
+
|
|
1145
|
+
Use this when the user must provide a value before submitting the form. */
|
|
885
1146
|
required?: WarpCombobox["required"];
|
|
886
|
-
/** Whether to show optional text
|
|
1147
|
+
/** Whether to show optional text next to the label.
|
|
1148
|
+
|
|
1149
|
+
Use this to indicate that the combobox is not required. */
|
|
887
1150
|
optional?: WarpCombobox["optional"];
|
|
888
|
-
/**
|
|
1151
|
+
/** The name submitted with the combobox value.
|
|
1152
|
+
|
|
1153
|
+
Use this when the combobox belongs to a form and its value should be included in form data. */
|
|
889
1154
|
name?: WarpCombobox["name"];
|
|
890
|
-
/**
|
|
1155
|
+
/** The autocomplete attribute passed to the internal input.
|
|
1156
|
+
|
|
1157
|
+
Defaults to `off`. Set this when browser autocomplete should be enabled or scoped to a specific autocomplete token. */
|
|
891
1158
|
autocomplete?: WarpCombobox["autocomplete"];
|
|
892
1159
|
};
|
|
893
1160
|
|
|
894
1161
|
export type WarpComboboxSolidJsProps = {
|
|
895
|
-
/** The available options to select from
|
|
1162
|
+
/** The available options to select from.
|
|
1163
|
+
|
|
1164
|
+
Use this for framework usage, application state, or remote search results. When `options` contains entries, it is used instead of child `<option>` elements. */
|
|
896
1165
|
"prop:options"?: WarpCombobox["options"];
|
|
897
|
-
/**
|
|
1166
|
+
/** The label displayed above the input.
|
|
1167
|
+
|
|
1168
|
+
Use this to give the combobox a visible and accessible name. */
|
|
898
1169
|
"prop:label"?: WarpCombobox["label"];
|
|
899
|
-
/**
|
|
1170
|
+
/** Placeholder text displayed when the input is empty.
|
|
1171
|
+
|
|
1172
|
+
Use this as a short hint for the expected input. Do not use placeholder text as a replacement for a label. */
|
|
900
1173
|
"prop:placeholder"?: WarpCombobox["placeholder"];
|
|
901
|
-
/** The
|
|
1174
|
+
/** The selected or typed value.
|
|
1175
|
+
|
|
1176
|
+
When an option is selected, this is set to the option value. The displayed text may differ when the option has a separate label. */
|
|
902
1177
|
"prop:value"?: WarpCombobox["value"];
|
|
903
|
-
/** Whether the
|
|
1178
|
+
/** Whether the option list opens when the input receives focus.
|
|
1179
|
+
|
|
1180
|
+
Use this when users should see available options before they start typing. */
|
|
904
1181
|
"bool:open-on-focus"?: WarpCombobox["openOnFocus"];
|
|
905
|
-
/** Whether the
|
|
1182
|
+
/** Whether the option list opens when the input receives focus.
|
|
1183
|
+
|
|
1184
|
+
Use this when users should see available options before they start typing. */
|
|
906
1185
|
"prop:openOnFocus"?: WarpCombobox["openOnFocus"];
|
|
907
|
-
/**
|
|
1186
|
+
/** Whether the active option is selected when the input loses focus.
|
|
1187
|
+
|
|
1188
|
+
When enabled, the combobox selects the keyboard-highlighted option, or an option whose value exactly matches the current input value, on blur. */
|
|
908
1189
|
"bool:select-on-blur"?: WarpCombobox["selectOnBlur"];
|
|
909
|
-
/**
|
|
1190
|
+
/** Whether the active option is selected when the input loses focus.
|
|
1191
|
+
|
|
1192
|
+
When enabled, the combobox selects the keyboard-highlighted option, or an option whose value exactly matches the current input value, on blur. */
|
|
910
1193
|
"prop:selectOnBlur"?: WarpCombobox["selectOnBlur"];
|
|
911
|
-
/** Whether
|
|
1194
|
+
/** Whether matching text segments in options are highlighted.
|
|
1195
|
+
|
|
1196
|
+
Use this to visually emphasize the part of each option that matches the current input value. */
|
|
912
1197
|
"bool:match-text-segments"?: WarpCombobox["matchTextSegments"];
|
|
913
|
-
/** Whether
|
|
1198
|
+
/** Whether matching text segments in options are highlighted.
|
|
1199
|
+
|
|
1200
|
+
Use this to visually emphasize the part of each option that matches the current input value. */
|
|
914
1201
|
"prop:matchTextSegments"?: WarpCombobox["matchTextSegments"];
|
|
915
|
-
/**
|
|
1202
|
+
/** Whether built-in client-side filtering is disabled.
|
|
1203
|
+
|
|
1204
|
+
Use this for remote search or externally filtered results. When disabled, all entries in `options` are rendered as provided. */
|
|
916
1205
|
"bool:disable-static-filtering"?: WarpCombobox["disableStaticFiltering"];
|
|
917
|
-
/**
|
|
1206
|
+
/** Whether built-in client-side filtering is disabled.
|
|
1207
|
+
|
|
1208
|
+
Use this for remote search or externally filtered results. When disabled, all entries in `options` are rendered as provided. */
|
|
918
1209
|
"prop:disableStaticFiltering"?: WarpCombobox["disableStaticFiltering"];
|
|
919
|
-
/**
|
|
1210
|
+
/** Whether the combobox is visually invalid.
|
|
1211
|
+
|
|
1212
|
+
Use this to show an externally managed validation error. Pair it with `help-text` to explain how to fix the error. */
|
|
920
1213
|
"prop:invalid"?: WarpCombobox["invalid"];
|
|
921
|
-
/**
|
|
1214
|
+
/** Help text displayed below the input.
|
|
1215
|
+
|
|
1216
|
+
Use this for supporting guidance or validation feedback. */
|
|
922
1217
|
"attr:help-text"?: WarpCombobox["helpText"];
|
|
923
|
-
/**
|
|
1218
|
+
/** Help text displayed below the input.
|
|
1219
|
+
|
|
1220
|
+
Use this for supporting guidance or validation feedback. */
|
|
924
1221
|
"prop:helpText"?: WarpCombobox["helpText"];
|
|
925
|
-
/** Whether the
|
|
1222
|
+
/** Whether the combobox is disabled.
|
|
1223
|
+
|
|
1224
|
+
Disabled comboboxes cannot be focused, changed, or submitted with form data. */
|
|
926
1225
|
"prop:disabled"?: WarpCombobox["disabled"];
|
|
927
|
-
/** Whether the
|
|
1226
|
+
/** Whether the combobox is required before form submission.
|
|
1227
|
+
|
|
1228
|
+
Use this when the user must provide a value before submitting the form. */
|
|
928
1229
|
"prop:required"?: WarpCombobox["required"];
|
|
929
|
-
/** Whether to show optional text
|
|
1230
|
+
/** Whether to show optional text next to the label.
|
|
1231
|
+
|
|
1232
|
+
Use this to indicate that the combobox is not required. */
|
|
930
1233
|
"prop:optional"?: WarpCombobox["optional"];
|
|
931
|
-
/**
|
|
1234
|
+
/** The name submitted with the combobox value.
|
|
1235
|
+
|
|
1236
|
+
Use this when the combobox belongs to a form and its value should be included in form data. */
|
|
932
1237
|
"prop:name"?: WarpCombobox["name"];
|
|
933
|
-
/**
|
|
1238
|
+
/** The autocomplete attribute passed to the internal input.
|
|
1239
|
+
|
|
1240
|
+
Defaults to `off`. Set this when browser autocomplete should be enabled or scoped to a specific autocomplete token. */
|
|
934
1241
|
"prop:autocomplete"?: WarpCombobox["autocomplete"];
|
|
935
1242
|
|
|
936
1243
|
/** Set the innerHTML of the element */
|
|
@@ -940,41 +1247,49 @@ export type WarpComboboxSolidJsProps = {
|
|
|
940
1247
|
};
|
|
941
1248
|
|
|
942
1249
|
export type WarpDatepickerProps = {
|
|
943
|
-
/**
|
|
1250
|
+
/** The label displayed above the date input.
|
|
1251
|
+
|
|
1252
|
+
Use this to give the datepicker a visible and accessible name. */
|
|
944
1253
|
label?: WarpDatepicker["label"];
|
|
945
|
-
/**
|
|
1254
|
+
/** The locale used for calendar labels and date formatting.
|
|
1255
|
+
|
|
1256
|
+
This takes precedence over the `<html>` `lang` attribute. Supported built-in locales are `en`, `nb`, `sv`, `da`, and `fi`. */
|
|
946
1257
|
lang?: WarpDatepicker["lang"];
|
|
947
|
-
/**
|
|
1258
|
+
/** The name submitted with the date value.
|
|
1259
|
+
|
|
1260
|
+
Use this when the datepicker belongs to a form and its value should be included in form data. */
|
|
948
1261
|
name?: WarpDatepicker["name"];
|
|
949
|
-
/**
|
|
1262
|
+
/** The selected date value.
|
|
1263
|
+
|
|
1264
|
+
Use an ISO date string in `YYYY-MM-DD` format. The value is submitted with the form and is reset to its initial value when the form resets. */
|
|
950
1265
|
value?: WarpDatepicker["value"];
|
|
951
|
-
/**
|
|
1266
|
+
/** The date format used in the calendar header.
|
|
952
1267
|
|
|
953
1268
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
954
1269
|
"header-format"?: WarpDatepicker["headerFormat"];
|
|
955
|
-
/**
|
|
1270
|
+
/** The date format used in the calendar header.
|
|
956
1271
|
|
|
957
1272
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
958
1273
|
headerFormat?: WarpDatepicker["headerFormat"];
|
|
959
|
-
/**
|
|
1274
|
+
/** The weekday format shown above the calendar grid.
|
|
960
1275
|
|
|
961
1276
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
962
1277
|
"weekday-format"?: WarpDatepicker["weekdayFormat"];
|
|
963
|
-
/**
|
|
1278
|
+
/** The weekday format shown above the calendar grid.
|
|
964
1279
|
|
|
965
1280
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
966
1281
|
weekdayFormat?: WarpDatepicker["weekdayFormat"];
|
|
967
|
-
/**
|
|
1282
|
+
/** The date format used for calendar day accessible names.
|
|
968
1283
|
|
|
969
1284
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
970
1285
|
"day-format"?: WarpDatepicker["dayFormat"];
|
|
971
|
-
/**
|
|
1286
|
+
/** The date format used for calendar day accessible names.
|
|
972
1287
|
|
|
973
1288
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
974
1289
|
dayFormat?: WarpDatepicker["dayFormat"];
|
|
975
|
-
/**
|
|
1290
|
+
/** Function used to disable dates in the calendar.
|
|
976
1291
|
|
|
977
|
-
|
|
1292
|
+
Set this on the element instance in JavaScript, not as an HTML attribute. Disabled dates cannot be selected from the calendar. */
|
|
978
1293
|
isDayDisabled?: WarpDatepicker["isDayDisabled"];
|
|
979
1294
|
/** */
|
|
980
1295
|
isCalendarOpen?: WarpDatepicker["isCalendarOpen"];
|
|
@@ -1001,41 +1316,49 @@ the query will point to an element that doesn't exist anymore. */
|
|
|
1001
1316
|
};
|
|
1002
1317
|
|
|
1003
1318
|
export type WarpDatepickerSolidJsProps = {
|
|
1004
|
-
/**
|
|
1319
|
+
/** The label displayed above the date input.
|
|
1320
|
+
|
|
1321
|
+
Use this to give the datepicker a visible and accessible name. */
|
|
1005
1322
|
"prop:label"?: WarpDatepicker["label"];
|
|
1006
|
-
/**
|
|
1323
|
+
/** The locale used for calendar labels and date formatting.
|
|
1324
|
+
|
|
1325
|
+
This takes precedence over the `<html>` `lang` attribute. Supported built-in locales are `en`, `nb`, `sv`, `da`, and `fi`. */
|
|
1007
1326
|
"prop:lang"?: WarpDatepicker["lang"];
|
|
1008
|
-
/**
|
|
1327
|
+
/** The name submitted with the date value.
|
|
1328
|
+
|
|
1329
|
+
Use this when the datepicker belongs to a form and its value should be included in form data. */
|
|
1009
1330
|
"prop:name"?: WarpDatepicker["name"];
|
|
1010
|
-
/**
|
|
1331
|
+
/** The selected date value.
|
|
1332
|
+
|
|
1333
|
+
Use an ISO date string in `YYYY-MM-DD` format. The value is submitted with the form and is reset to its initial value when the form resets. */
|
|
1011
1334
|
"prop:value"?: WarpDatepicker["value"];
|
|
1012
|
-
/**
|
|
1335
|
+
/** The date format used in the calendar header.
|
|
1013
1336
|
|
|
1014
1337
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
1015
1338
|
"attr:header-format"?: WarpDatepicker["headerFormat"];
|
|
1016
|
-
/**
|
|
1339
|
+
/** The date format used in the calendar header.
|
|
1017
1340
|
|
|
1018
1341
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
1019
1342
|
"prop:headerFormat"?: WarpDatepicker["headerFormat"];
|
|
1020
|
-
/**
|
|
1343
|
+
/** The weekday format shown above the calendar grid.
|
|
1021
1344
|
|
|
1022
1345
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
1023
1346
|
"attr:weekday-format"?: WarpDatepicker["weekdayFormat"];
|
|
1024
|
-
/**
|
|
1347
|
+
/** The weekday format shown above the calendar grid.
|
|
1025
1348
|
|
|
1026
1349
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
1027
1350
|
"prop:weekdayFormat"?: WarpDatepicker["weekdayFormat"];
|
|
1028
|
-
/**
|
|
1351
|
+
/** The date format used for calendar day accessible names.
|
|
1029
1352
|
|
|
1030
1353
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
1031
1354
|
"attr:day-format"?: WarpDatepicker["dayFormat"];
|
|
1032
|
-
/**
|
|
1355
|
+
/** The date format used for calendar day accessible names.
|
|
1033
1356
|
|
|
1034
1357
|
The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format). */
|
|
1035
1358
|
"prop:dayFormat"?: WarpDatepicker["dayFormat"];
|
|
1036
|
-
/**
|
|
1359
|
+
/** Function used to disable dates in the calendar.
|
|
1037
1360
|
|
|
1038
|
-
|
|
1361
|
+
Set this on the element instance in JavaScript, not as an HTML attribute. Disabled dates cannot be selected from the calendar. */
|
|
1039
1362
|
"prop:isDayDisabled"?: WarpDatepicker["isDayDisabled"];
|
|
1040
1363
|
/** */
|
|
1041
1364
|
"prop:isCalendarOpen"?: WarpDatepicker["isCalendarOpen"];
|
|
@@ -1067,31 +1390,31 @@ the query will point to an element that doesn't exist anymore. */
|
|
|
1067
1390
|
};
|
|
1068
1391
|
|
|
1069
1392
|
export type WarpExpandableProps = {
|
|
1070
|
-
/**
|
|
1393
|
+
/** Controls component's expanded state */
|
|
1071
1394
|
expanded?: WarpExpandable["expanded"];
|
|
1072
|
-
/**
|
|
1395
|
+
/** Component title. Used to display the title value which is always present regardless of whether the component is open or closed. */
|
|
1073
1396
|
title?: WarpExpandable["title"];
|
|
1074
|
-
/**
|
|
1397
|
+
/** Will make the expandable a Box */
|
|
1075
1398
|
box?: WarpExpandable["box"];
|
|
1076
|
-
/**
|
|
1399
|
+
/** Will make the expandable full-width on the sm breakpoint size */
|
|
1077
1400
|
bleed?: WarpExpandable["bleed"];
|
|
1078
|
-
/** */
|
|
1401
|
+
/** @deprecated Probably does not work the way you expect. The class must exist inside the shadow DOM of the component. */
|
|
1079
1402
|
"button-class"?: WarpExpandable["buttonClass"];
|
|
1080
|
-
/** */
|
|
1403
|
+
/** @deprecated Probably does not work the way you expect. The class must exist inside the shadow DOM of the component. */
|
|
1081
1404
|
buttonClass?: WarpExpandable["buttonClass"];
|
|
1082
|
-
/** */
|
|
1405
|
+
/** @deprecated Probably does not work the way you expect. The class must exist inside the shadow DOM of the component. */
|
|
1083
1406
|
"content-class"?: WarpExpandable["contentClass"];
|
|
1084
|
-
/** */
|
|
1407
|
+
/** @deprecated Probably does not work the way you expect. The class must exist inside the shadow DOM of the component. */
|
|
1085
1408
|
contentClass?: WarpExpandable["contentClass"];
|
|
1086
|
-
/**
|
|
1409
|
+
/** Controls chevron visibility */
|
|
1087
1410
|
"no-chevron"?: WarpExpandable["noChevron"];
|
|
1088
|
-
/**
|
|
1411
|
+
/** Controls chevron visibility */
|
|
1089
1412
|
noChevron?: WarpExpandable["noChevron"];
|
|
1090
|
-
/**
|
|
1413
|
+
/** Will animate the expansion/collapse */
|
|
1091
1414
|
animated?: WarpExpandable["animated"];
|
|
1092
|
-
/**
|
|
1415
|
+
/** Wrap the toggle button in a heading element with the specified level. If headingLevel is not specified, the button will not be wrapped by a heading element. */
|
|
1093
1416
|
"heading-level"?: WarpExpandable["headingLevel"];
|
|
1094
|
-
/**
|
|
1417
|
+
/** Wrap the toggle button in a heading element with the specified level. If headingLevel is not specified, the button will not be wrapped by a heading element. */
|
|
1095
1418
|
headingLevel?: WarpExpandable["headingLevel"];
|
|
1096
1419
|
/** */
|
|
1097
1420
|
_hasTitle?: WarpExpandable["_hasTitle"];
|
|
@@ -1100,31 +1423,31 @@ export type WarpExpandableProps = {
|
|
|
1100
1423
|
};
|
|
1101
1424
|
|
|
1102
1425
|
export type WarpExpandableSolidJsProps = {
|
|
1103
|
-
/**
|
|
1426
|
+
/** Controls component's expanded state */
|
|
1104
1427
|
"prop:expanded"?: WarpExpandable["expanded"];
|
|
1105
|
-
/**
|
|
1428
|
+
/** Component title. Used to display the title value which is always present regardless of whether the component is open or closed. */
|
|
1106
1429
|
"prop:title"?: WarpExpandable["title"];
|
|
1107
|
-
/**
|
|
1430
|
+
/** Will make the expandable a Box */
|
|
1108
1431
|
"prop:box"?: WarpExpandable["box"];
|
|
1109
|
-
/**
|
|
1432
|
+
/** Will make the expandable full-width on the sm breakpoint size */
|
|
1110
1433
|
"prop:bleed"?: WarpExpandable["bleed"];
|
|
1111
|
-
/** */
|
|
1434
|
+
/** @deprecated Probably does not work the way you expect. The class must exist inside the shadow DOM of the component. */
|
|
1112
1435
|
"attr:button-class"?: WarpExpandable["buttonClass"];
|
|
1113
|
-
/** */
|
|
1436
|
+
/** @deprecated Probably does not work the way you expect. The class must exist inside the shadow DOM of the component. */
|
|
1114
1437
|
"prop:buttonClass"?: WarpExpandable["buttonClass"];
|
|
1115
|
-
/** */
|
|
1438
|
+
/** @deprecated Probably does not work the way you expect. The class must exist inside the shadow DOM of the component. */
|
|
1116
1439
|
"attr:content-class"?: WarpExpandable["contentClass"];
|
|
1117
|
-
/** */
|
|
1440
|
+
/** @deprecated Probably does not work the way you expect. The class must exist inside the shadow DOM of the component. */
|
|
1118
1441
|
"prop:contentClass"?: WarpExpandable["contentClass"];
|
|
1119
|
-
/**
|
|
1442
|
+
/** Controls chevron visibility */
|
|
1120
1443
|
"bool:no-chevron"?: WarpExpandable["noChevron"];
|
|
1121
|
-
/**
|
|
1444
|
+
/** Controls chevron visibility */
|
|
1122
1445
|
"prop:noChevron"?: WarpExpandable["noChevron"];
|
|
1123
|
-
/**
|
|
1446
|
+
/** Will animate the expansion/collapse */
|
|
1124
1447
|
"prop:animated"?: WarpExpandable["animated"];
|
|
1125
|
-
/**
|
|
1448
|
+
/** Wrap the toggle button in a heading element with the specified level. If headingLevel is not specified, the button will not be wrapped by a heading element. */
|
|
1126
1449
|
"attr:heading-level"?: WarpExpandable["headingLevel"];
|
|
1127
|
-
/**
|
|
1450
|
+
/** Wrap the toggle button in a heading element with the specified level. If headingLevel is not specified, the button will not be wrapped by a heading element. */
|
|
1128
1451
|
"prop:headingLevel"?: WarpExpandable["headingLevel"];
|
|
1129
1452
|
/** */
|
|
1130
1453
|
"prop:_hasTitle"?: WarpExpandable["_hasTitle"];
|
|
@@ -1137,6 +1460,9 @@ export type WarpExpandableSolidJsProps = {
|
|
|
1137
1460
|
textContent?: string | number;
|
|
1138
1461
|
};
|
|
1139
1462
|
|
|
1463
|
+
/** `WarpModal` component event */
|
|
1464
|
+
export type WarpModalElementEvent<E = Event> = TypedEvent<WarpModal, E>;
|
|
1465
|
+
|
|
1140
1466
|
export type WarpModalProps = {
|
|
1141
1467
|
/** Controls if the modal should show or hide.
|
|
1142
1468
|
|
|
@@ -1152,9 +1478,9 @@ You can also call the `open()` and `close()` methods. */
|
|
|
1152
1478
|
ignoreBackdropClicks?: WarpModal["ignoreBackdropClicks"];
|
|
1153
1479
|
|
|
1154
1480
|
/** */
|
|
1155
|
-
onshown?: (e:
|
|
1481
|
+
onshown?: (e: WarpModalElementEvent) => void;
|
|
1156
1482
|
/** */
|
|
1157
|
-
onhidden?: (e:
|
|
1483
|
+
onhidden?: (e: WarpModalElementEvent) => void;
|
|
1158
1484
|
};
|
|
1159
1485
|
|
|
1160
1486
|
export type WarpModalSolidJsProps = {
|
|
@@ -1171,9 +1497,9 @@ You can also call the `open()` and `close()` methods. */
|
|
|
1171
1497
|
/** Ignores clicks to the backdrop when set */
|
|
1172
1498
|
"prop:ignoreBackdropClicks"?: WarpModal["ignoreBackdropClicks"];
|
|
1173
1499
|
/** */
|
|
1174
|
-
"on:shown"?: (e:
|
|
1500
|
+
"on:shown"?: (e: WarpModalElementEvent) => void;
|
|
1175
1501
|
/** */
|
|
1176
|
-
"on:hidden"?: (e:
|
|
1502
|
+
"on:hidden"?: (e: WarpModalElementEvent) => void;
|
|
1177
1503
|
|
|
1178
1504
|
/** Set the innerHTML of the element */
|
|
1179
1505
|
innerHTML?: string;
|
|
@@ -1190,6 +1516,12 @@ export type WarpModalFooterSolidJsProps = {
|
|
|
1190
1516
|
textContent?: string | number;
|
|
1191
1517
|
};
|
|
1192
1518
|
|
|
1519
|
+
/** `WarpModalHeader` component event */
|
|
1520
|
+
export type WarpModalHeaderElementEvent<E = Event> = TypedEvent<
|
|
1521
|
+
WarpModalHeader,
|
|
1522
|
+
E
|
|
1523
|
+
>;
|
|
1524
|
+
|
|
1193
1525
|
export type WarpModalHeaderProps = {
|
|
1194
1526
|
/** A short but descriptive title for the modal */
|
|
1195
1527
|
title?: WarpModalHeader["title"];
|
|
@@ -1201,7 +1533,7 @@ export type WarpModalHeaderProps = {
|
|
|
1201
1533
|
noClose?: WarpModalHeader["noClose"];
|
|
1202
1534
|
|
|
1203
1535
|
/** */
|
|
1204
|
-
onbackClicked?: (e:
|
|
1536
|
+
onbackClicked?: (e: WarpModalHeaderElementEvent) => void;
|
|
1205
1537
|
};
|
|
1206
1538
|
|
|
1207
1539
|
export type WarpModalHeaderSolidJsProps = {
|
|
@@ -1214,7 +1546,7 @@ export type WarpModalHeaderSolidJsProps = {
|
|
|
1214
1546
|
/** Lets you hide the close button in the header */
|
|
1215
1547
|
"prop:noClose"?: WarpModalHeader["noClose"];
|
|
1216
1548
|
/** */
|
|
1217
|
-
"on:backClicked"?: (e:
|
|
1549
|
+
"on:backClicked"?: (e: WarpModalHeaderElementEvent) => void;
|
|
1218
1550
|
|
|
1219
1551
|
/** Set the innerHTML of the element */
|
|
1220
1552
|
innerHTML?: string;
|
|
@@ -1249,6 +1581,12 @@ export type WarpPageIndicatorSolidJsProps = {
|
|
|
1249
1581
|
textContent?: string | number;
|
|
1250
1582
|
};
|
|
1251
1583
|
|
|
1584
|
+
/** `WarpPagination` component event */
|
|
1585
|
+
export type WarpPaginationElementEvent<E = Event> = TypedEvent<
|
|
1586
|
+
WarpPagination,
|
|
1587
|
+
E
|
|
1588
|
+
>;
|
|
1589
|
+
|
|
1252
1590
|
export type WarpPaginationProps = {
|
|
1253
1591
|
/** The base URL used to construct page links, for example `/search?page=`.
|
|
1254
1592
|
|
|
@@ -1270,7 +1608,7 @@ The page number is appended to this URL. */
|
|
|
1270
1608
|
visiblePages?: WarpPagination["visiblePages"];
|
|
1271
1609
|
|
|
1272
1610
|
/** Triggered when a link in the pagination is clicked. Contains the page number in `string` form. */
|
|
1273
|
-
"onpage-click"?: (e:
|
|
1611
|
+
"onpage-click"?: (e: WarpPaginationElementEvent) => void;
|
|
1274
1612
|
};
|
|
1275
1613
|
|
|
1276
1614
|
export type WarpPaginationSolidJsProps = {
|
|
@@ -1293,7 +1631,7 @@ The page number is appended to this URL. */
|
|
|
1293
1631
|
/** The maximum number of page numbers visible. */
|
|
1294
1632
|
"prop:visiblePages"?: WarpPagination["visiblePages"];
|
|
1295
1633
|
/** Triggered when a link in the pagination is clicked. Contains the page number in `string` form. */
|
|
1296
|
-
"on:page-click"?: (e:
|
|
1634
|
+
"on:page-click"?: (e: WarpPaginationElementEvent) => void;
|
|
1297
1635
|
|
|
1298
1636
|
/** Set the innerHTML of the element */
|
|
1299
1637
|
innerHTML?: string;
|
|
@@ -1301,6 +1639,9 @@ The page number is appended to this URL. */
|
|
|
1301
1639
|
textContent?: string | number;
|
|
1302
1640
|
};
|
|
1303
1641
|
|
|
1642
|
+
/** `WarpPill` component event */
|
|
1643
|
+
export type WarpPillElementEvent<E = Event> = TypedEvent<WarpPill, E>;
|
|
1644
|
+
|
|
1304
1645
|
export type WarpPillProps = {
|
|
1305
1646
|
/** Whether the pill should be removable via a close button. */
|
|
1306
1647
|
"can-close"?: WarpPill["canClose"];
|
|
@@ -1326,9 +1667,9 @@ export type WarpPillProps = {
|
|
|
1326
1667
|
closeAriaLabel?: WarpPill["closeAriaLabel"];
|
|
1327
1668
|
|
|
1328
1669
|
/** Fires when the pill itself is clicked. */
|
|
1329
|
-
"onw-pill-click"?: (e:
|
|
1670
|
+
"onw-pill-click"?: (e: WarpPillElementEvent) => void;
|
|
1330
1671
|
/** Fires when the pill's close button is clicked. */
|
|
1331
|
-
"onw-pill-close"?: (e:
|
|
1672
|
+
"onw-pill-close"?: (e: WarpPillElementEvent) => void;
|
|
1332
1673
|
};
|
|
1333
1674
|
|
|
1334
1675
|
export type WarpPillSolidJsProps = {
|
|
@@ -1355,9 +1696,9 @@ export type WarpPillSolidJsProps = {
|
|
|
1355
1696
|
/** Label read by screen readers when targeting the close button. */
|
|
1356
1697
|
"prop:closeAriaLabel"?: WarpPill["closeAriaLabel"];
|
|
1357
1698
|
/** Fires when the pill itself is clicked. */
|
|
1358
|
-
"on:w-pill-click"?: (e:
|
|
1699
|
+
"on:w-pill-click"?: (e: WarpPillElementEvent) => void;
|
|
1359
1700
|
/** Fires when the pill's close button is clicked. */
|
|
1360
|
-
"on:w-pill-close"?: (e:
|
|
1701
|
+
"on:w-pill-close"?: (e: WarpPillElementEvent) => void;
|
|
1361
1702
|
|
|
1362
1703
|
/** Set the innerHTML of the element */
|
|
1363
1704
|
innerHTML?: string;
|
|
@@ -1451,6 +1792,9 @@ If you set `required` and `invalid` the group gets a default error message, but
|
|
|
1451
1792
|
textContent?: string | number;
|
|
1452
1793
|
};
|
|
1453
1794
|
|
|
1795
|
+
/** `WarpSelect` component event */
|
|
1796
|
+
export type WarpSelectElementEvent<E = Event> = TypedEvent<WarpSelect, E>;
|
|
1797
|
+
|
|
1454
1798
|
export type WarpSelectProps = {
|
|
1455
1799
|
/** @deprecated Use the native `autofocus` attribute instead. - Whether the element should receive focus on render. */
|
|
1456
1800
|
"auto-focus"?: WarpSelect["autoFocus"];
|
|
@@ -1492,7 +1836,7 @@ Paired with `help-text` to provide feedback about the error. */
|
|
|
1492
1836
|
value?: WarpSelect["value"];
|
|
1493
1837
|
|
|
1494
1838
|
/** */
|
|
1495
|
-
onchange?: (e:
|
|
1839
|
+
onchange?: (e: WarpSelectElementEvent) => void;
|
|
1496
1840
|
};
|
|
1497
1841
|
|
|
1498
1842
|
export type WarpSelectSolidJsProps = {
|
|
@@ -1535,7 +1879,7 @@ Paired with `help-text` to provide feedback about the error. */
|
|
|
1535
1879
|
/** Lets you set the current value. */
|
|
1536
1880
|
"prop:value"?: WarpSelect["value"];
|
|
1537
1881
|
/** */
|
|
1538
|
-
"on:change"?: (e:
|
|
1882
|
+
"on:change"?: (e: WarpSelectElementEvent) => void;
|
|
1539
1883
|
|
|
1540
1884
|
/** Set the innerHTML of the element */
|
|
1541
1885
|
innerHTML?: string;
|
|
@@ -1543,6 +1887,12 @@ Paired with `help-text` to provide feedback about the error. */
|
|
|
1543
1887
|
textContent?: string | number;
|
|
1544
1888
|
};
|
|
1545
1889
|
|
|
1890
|
+
/** `WarpSliderThumb` component event */
|
|
1891
|
+
export type WarpSliderThumbElementEvent<E = Event> = TypedEvent<
|
|
1892
|
+
WarpSliderThumb,
|
|
1893
|
+
E
|
|
1894
|
+
>;
|
|
1895
|
+
|
|
1546
1896
|
export type WarpSliderThumbProps = {
|
|
1547
1897
|
/** Label for the range input. */
|
|
1548
1898
|
"aria-label"?: WarpSliderThumb["ariaLabel"];
|
|
@@ -1560,9 +1910,9 @@ export type WarpSliderThumbProps = {
|
|
|
1560
1910
|
placeholder?: WarpSliderThumb["placeholder"];
|
|
1561
1911
|
|
|
1562
1912
|
/** Internal event used by (and stopped by) `w-slider`. */
|
|
1563
|
-
onthumbreset?: (e:
|
|
1913
|
+
onthumbreset?: (e: WarpSliderThumbElementEvent) => void;
|
|
1564
1914
|
/** Internal event used by (and stopped by) `w-slider`. */
|
|
1565
|
-
onslidervalidity?: (e:
|
|
1915
|
+
onslidervalidity?: (e: WarpSliderThumbElementEvent) => void;
|
|
1566
1916
|
};
|
|
1567
1917
|
|
|
1568
1918
|
export type WarpSliderThumbSolidJsProps = {
|
|
@@ -1581,9 +1931,9 @@ export type WarpSliderThumbSolidJsProps = {
|
|
|
1581
1931
|
/** Placeholder in empty text fields */
|
|
1582
1932
|
"prop:placeholder"?: WarpSliderThumb["placeholder"];
|
|
1583
1933
|
/** Internal event used by (and stopped by) `w-slider`. */
|
|
1584
|
-
"on:thumbreset"?: (e:
|
|
1934
|
+
"on:thumbreset"?: (e: WarpSliderThumbElementEvent) => void;
|
|
1585
1935
|
/** Internal event used by (and stopped by) `w-slider`. */
|
|
1586
|
-
"on:slidervalidity"?: (e:
|
|
1936
|
+
"on:slidervalidity"?: (e: WarpSliderThumbElementEvent) => void;
|
|
1587
1937
|
|
|
1588
1938
|
/** Set the innerHTML of the element */
|
|
1589
1939
|
innerHTML?: string;
|
|
@@ -1612,6 +1962,8 @@ If you need to display HTML, use the `label` slot instead (f. ex. `<legend class
|
|
|
1612
1962
|
invalid?: WarpSlider["invalid"];
|
|
1613
1963
|
/** Ensures a child slider thumb has a value before allowing the containing form to submit */
|
|
1614
1964
|
required?: WarpSlider["required"];
|
|
1965
|
+
/** Whether to show the optional indicator after the label. */
|
|
1966
|
+
optional?: WarpSlider["optional"];
|
|
1615
1967
|
/** The minimum allowed value in the range inputs */
|
|
1616
1968
|
min?: WarpSlider["min"];
|
|
1617
1969
|
/** The maximum allowed value in the range inputs */
|
|
@@ -1657,6 +2009,8 @@ If you need to display HTML, use the `label` slot instead (f. ex. `<legend class
|
|
|
1657
2009
|
"prop:invalid"?: WarpSlider["invalid"];
|
|
1658
2010
|
/** Ensures a child slider thumb has a value before allowing the containing form to submit */
|
|
1659
2011
|
"prop:required"?: WarpSlider["required"];
|
|
2012
|
+
/** Whether to show the optional indicator after the label. */
|
|
2013
|
+
"prop:optional"?: WarpSlider["optional"];
|
|
1660
2014
|
/** The minimum allowed value in the range inputs */
|
|
1661
2015
|
"prop:min"?: WarpSlider["min"];
|
|
1662
2016
|
/** The maximum allowed value in the range inputs */
|
|
@@ -1686,6 +2040,38 @@ Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the
|
|
|
1686
2040
|
textContent?: string | number;
|
|
1687
2041
|
};
|
|
1688
2042
|
|
|
2043
|
+
export type WarpSnackbarItemProps = {
|
|
2044
|
+
/** The placement of the action and close buttons. */
|
|
2045
|
+
"action-placement"?: WarpSnackbarItem["actionPlacement"];
|
|
2046
|
+
/** The placement of the action and close buttons. */
|
|
2047
|
+
actionPlacement?: WarpSnackbarItem["actionPlacement"];
|
|
2048
|
+
/** How long the message should stay in the document before removing itself. */
|
|
2049
|
+
duration?: WarpSnackbarItem["duration"];
|
|
2050
|
+
};
|
|
2051
|
+
|
|
2052
|
+
export type WarpSnackbarItemSolidJsProps = {
|
|
2053
|
+
/** The placement of the action and close buttons. */
|
|
2054
|
+
"attr:action-placement"?: WarpSnackbarItem["actionPlacement"];
|
|
2055
|
+
/** The placement of the action and close buttons. */
|
|
2056
|
+
"prop:actionPlacement"?: WarpSnackbarItem["actionPlacement"];
|
|
2057
|
+
/** How long the message should stay in the document before removing itself. */
|
|
2058
|
+
"prop:duration"?: WarpSnackbarItem["duration"];
|
|
2059
|
+
|
|
2060
|
+
/** Set the innerHTML of the element */
|
|
2061
|
+
innerHTML?: string;
|
|
2062
|
+
/** Set the textContent of the element */
|
|
2063
|
+
textContent?: string | number;
|
|
2064
|
+
};
|
|
2065
|
+
|
|
2066
|
+
export type WarpSnackbarProps = {};
|
|
2067
|
+
|
|
2068
|
+
export type WarpSnackbarSolidJsProps = {
|
|
2069
|
+
/** Set the innerHTML of the element */
|
|
2070
|
+
innerHTML?: string;
|
|
2071
|
+
/** Set the textContent of the element */
|
|
2072
|
+
textContent?: string | number;
|
|
2073
|
+
};
|
|
2074
|
+
|
|
1689
2075
|
export type WarpStepProps = {
|
|
1690
2076
|
/** Whether this step is active.
|
|
1691
2077
|
|
|
@@ -1732,6 +2118,12 @@ export type WarpStepIndicatorSolidJsProps = {
|
|
|
1732
2118
|
textContent?: string | number;
|
|
1733
2119
|
};
|
|
1734
2120
|
|
|
2121
|
+
/** `WarpSwitch` component event */
|
|
2122
|
+
export type WarpSwitchElementEvent<E = Event> = TypedEvent<WarpSwitch, E>;
|
|
2123
|
+
/** `change` event type */
|
|
2124
|
+
export type WarpSwitchChangeElementEvent =
|
|
2125
|
+
WarpSwitchElementEvent<WarpSwitchChangeEvent>;
|
|
2126
|
+
|
|
1735
2127
|
export type WarpSwitchProps = {
|
|
1736
2128
|
/** Name used when submitting an HTML form. */
|
|
1737
2129
|
name?: WarpSwitch["name"];
|
|
@@ -1745,7 +2137,7 @@ The component reports `null` as the value in the `change` event when `value` is
|
|
|
1745
2137
|
disabled?: WarpSwitch["disabled"];
|
|
1746
2138
|
|
|
1747
2139
|
/** Dispatched when the switch toggles. Includes boolean `checked` and string/null `value` on `details`. */
|
|
1748
|
-
onchange?: (e:
|
|
2140
|
+
onchange?: (e: WarpSwitchChangeElementEvent) => void;
|
|
1749
2141
|
};
|
|
1750
2142
|
|
|
1751
2143
|
export type WarpSwitchSolidJsProps = {
|
|
@@ -1760,7 +2152,7 @@ The component reports `null` as the value in the `change` event when `value` is
|
|
|
1760
2152
|
/** Whether the switch is disabled. */
|
|
1761
2153
|
"prop:disabled"?: WarpSwitch["disabled"];
|
|
1762
2154
|
/** Dispatched when the switch toggles. Includes boolean `checked` and string/null `value` on `details`. */
|
|
1763
|
-
"on:change"?: (e:
|
|
2155
|
+
"on:change"?: (e: WarpSwitchChangeElementEvent) => void;
|
|
1764
2156
|
|
|
1765
2157
|
/** Set the innerHTML of the element */
|
|
1766
2158
|
innerHTML?: string;
|
|
@@ -1802,19 +2194,25 @@ export type WarpTabPanelSolidJsProps = {
|
|
|
1802
2194
|
textContent?: string | number;
|
|
1803
2195
|
};
|
|
1804
2196
|
|
|
2197
|
+
/** `WarpTabs` component event */
|
|
2198
|
+
export type WarpTabsElementEvent<E = Event> = TypedEvent<WarpTabs, E>;
|
|
2199
|
+
/** `change` event type */
|
|
2200
|
+
export type WarpTabsChangeElementEvent =
|
|
2201
|
+
WarpTabsElementEvent<WarpTabsChangeEvent>;
|
|
2202
|
+
|
|
1805
2203
|
export type WarpTabsProps = {
|
|
1806
2204
|
/** The `id` of the panel that should be active. */
|
|
1807
2205
|
active?: WarpTabs["active"];
|
|
1808
2206
|
|
|
1809
2207
|
/** Includes `details.panelId` with the now active tab's ID */
|
|
1810
|
-
onchange?: (e:
|
|
2208
|
+
onchange?: (e: WarpTabsChangeElementEvent) => void;
|
|
1811
2209
|
};
|
|
1812
2210
|
|
|
1813
2211
|
export type WarpTabsSolidJsProps = {
|
|
1814
2212
|
/** The `id` of the panel that should be active. */
|
|
1815
2213
|
"prop:active"?: WarpTabs["active"];
|
|
1816
2214
|
/** Includes `details.panelId` with the now active tab's ID */
|
|
1817
|
-
"on:change"?: (e:
|
|
2215
|
+
"on:change"?: (e: WarpTabsChangeElementEvent) => void;
|
|
1818
2216
|
|
|
1819
2217
|
/** Set the innerHTML of the element */
|
|
1820
2218
|
innerHTML?: string;
|
|
@@ -1922,19 +2320,6 @@ Placeholder text should not be used as a substitute for labeling the element wit
|
|
|
1922
2320
|
};
|
|
1923
2321
|
|
|
1924
2322
|
export type CustomElements = {
|
|
1925
|
-
/**
|
|
1926
|
-
*
|
|
1927
|
-
*
|
|
1928
|
-
* ## Attributes & Properties
|
|
1929
|
-
*
|
|
1930
|
-
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
1931
|
-
*
|
|
1932
|
-
* - `name`: Icon filename (without .svg)
|
|
1933
|
-
* - `size`: Size: small, medium, large or pixel value (e.g. "32px")
|
|
1934
|
-
* - `locale`: Locale used in CDN URL
|
|
1935
|
-
*/
|
|
1936
|
-
"w-icon": Partial<WIconProps & BaseProps<WIcon> & BaseEvents>;
|
|
1937
|
-
|
|
1938
2323
|
/**
|
|
1939
2324
|
* A single-line input component used for entering and editing textual or numeric data.
|
|
1940
2325
|
*
|
|
@@ -1951,6 +2336,7 @@ export type CustomElements = {
|
|
|
1951
2336
|
* - `label`: Either a `label` or an `aria-label` must be provided.
|
|
1952
2337
|
* - `help-text`/`helpText`: Use in combination with `invalid` to show as a validation error message,
|
|
1953
2338
|
* or on its own to show a help text.
|
|
2339
|
+
* - `optional`: Whether to show the optional indicator after the label.
|
|
1954
2340
|
* - `size`: Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs.
|
|
1955
2341
|
* - `max`: Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength).
|
|
1956
2342
|
* - `min`: Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength).
|
|
@@ -1983,7 +2369,7 @@ export type CustomElements = {
|
|
|
1983
2369
|
* Areas where markup can be added to the component.
|
|
1984
2370
|
*
|
|
1985
2371
|
* - `suffix`: Use with `<w-affix>` to include a suffix, for example the unit for a number (e. g. km or sek).
|
|
1986
|
-
* - `prefix`: Use with `<w-affix>` to include a prefix, for example a search icon.
|
|
2372
|
+
* - `prefix`: Use with `<w-affix>` to include a prefix, for example a search icon. ## Accessibility Note for Affixes Due to shadow DOM boundaries, affix content cannot be connected to the input via ARIA references. For non-interactive affixes (text labels like currency symbols), consider including that information in the main label or placeholder text instead for better screen reader support.
|
|
1987
2373
|
*
|
|
1988
2374
|
* ## Methods
|
|
1989
2375
|
*
|
|
@@ -1998,9 +2384,34 @@ export type CustomElements = {
|
|
|
1998
2384
|
WarpTextFieldProps & BaseProps<WarpTextField> & BaseEvents
|
|
1999
2385
|
>;
|
|
2000
2386
|
|
|
2387
|
+
/**
|
|
2388
|
+
*
|
|
2389
|
+
*
|
|
2390
|
+
* ## Attributes & Properties
|
|
2391
|
+
*
|
|
2392
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2393
|
+
*
|
|
2394
|
+
* - `name`: Icon filename (without .svg)
|
|
2395
|
+
* - `size`: Size: small, medium, large or pixel value (e.g. "32px").
|
|
2396
|
+
* - `locale`: Locale used for `<title>` text.
|
|
2397
|
+
*
|
|
2398
|
+
* Reads the `lang` attribute from `<html>`, falls back to 'en'.
|
|
2399
|
+
*/
|
|
2400
|
+
"w-icon": Partial<WarpIconProps & BaseProps<WarpIcon> & BaseEvents>;
|
|
2401
|
+
|
|
2001
2402
|
/**
|
|
2002
2403
|
* This component is usually used in other components like form elements to show a prefix or suffix. See for example `w-textfield`.
|
|
2003
2404
|
*
|
|
2405
|
+
* ## Accessibility Note
|
|
2406
|
+
* Due to shadow DOM encapsulation, ARIA attributes (like `aria-describedby`, `aria-labelledby`)
|
|
2407
|
+
* cannot reference elements across shadow boundaries. This means:
|
|
2408
|
+
* - Non-interactive affixes (text labels, icons) cannot be connected to the parent input via ARIA
|
|
2409
|
+
* - Interactive affixes (buttons) must have their own `aria-label` (already implemented)
|
|
2410
|
+
* - Do NOT attempt to reference affix content from parent components via ARIA ID references - it won't work
|
|
2411
|
+
*
|
|
2412
|
+
* For non-interactive labels (e.g., currency symbols), consider including the information in the
|
|
2413
|
+
* main label or placeholder instead of relying on ARIA to announce affix content.
|
|
2414
|
+
*
|
|
2004
2415
|
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-affix--docs)
|
|
2005
2416
|
*
|
|
2006
2417
|
* ## Attributes & Properties
|
|
@@ -2044,14 +2455,18 @@ export type CustomElements = {
|
|
|
2044
2455
|
*
|
|
2045
2456
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2046
2457
|
*
|
|
2047
|
-
* - `autofocus`:
|
|
2048
|
-
* - `variant`:
|
|
2049
|
-
* - `small`:
|
|
2050
|
-
* - `href`:
|
|
2051
|
-
* - `disabled`:
|
|
2052
|
-
*
|
|
2053
|
-
*
|
|
2054
|
-
* - `
|
|
2458
|
+
* - `autofocus`: Focus the link after it is rendered
|
|
2459
|
+
* - `variant`: Visual style for the link/button.
|
|
2460
|
+
* - `small`: Render a smaller version
|
|
2461
|
+
* - `href`: The URL the link points to
|
|
2462
|
+
* - `disabled`: Applies disabled styling, but you need to disable clicks on your own.
|
|
2463
|
+
*
|
|
2464
|
+
* The component renders an `<a>` element; `disabled` affects styling, but does not inherently prevent navigation. If you need to fully disable interaction, omit `href` and/or prevent default click behavior.
|
|
2465
|
+
* - `target`: Where to display the linked URL (e.g. `_blank`)
|
|
2466
|
+
* - `rel`: Relationship of the linked URL.
|
|
2467
|
+
*
|
|
2468
|
+
* If `target="_blank"` and `rel` is not provided, the component uses `noopener`.
|
|
2469
|
+
* - `full-width`/`fullWidth`: Makes the link take up the full width of its parent
|
|
2055
2470
|
*/
|
|
2056
2471
|
"w-link": Partial<WarpLinkProps & BaseProps<WarpLink> & BaseEvents>;
|
|
2057
2472
|
|
|
@@ -2222,6 +2637,31 @@ export type CustomElements = {
|
|
|
2222
2637
|
WarpBreadcrumbsProps & BaseProps<WarpBreadcrumbs> & BaseEvents
|
|
2223
2638
|
>;
|
|
2224
2639
|
|
|
2640
|
+
/**
|
|
2641
|
+
* Represents one item in a `w-breadcrumbs` trail.
|
|
2642
|
+
* Renders the slotted label as a link when `href` is set, or as text when it is not, and adds a separator after non-current items.
|
|
2643
|
+
*
|
|
2644
|
+
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-breadcrumbs--docs)
|
|
2645
|
+
*
|
|
2646
|
+
* ## Attributes & Properties
|
|
2647
|
+
*
|
|
2648
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2649
|
+
*
|
|
2650
|
+
* - `current-page`/`currentPage`: Marks this item as the current page.
|
|
2651
|
+
* Use this on the final breadcrumb item so it exposes `aria-current="page"` and does not render a trailing separator.
|
|
2652
|
+
* - `href`: URL for linked breadcrumb items.
|
|
2653
|
+
* When omitted, the item renders as non-focusable text.
|
|
2654
|
+
*
|
|
2655
|
+
* ## Slots
|
|
2656
|
+
*
|
|
2657
|
+
* Areas where markup can be added to the component.
|
|
2658
|
+
*
|
|
2659
|
+
* - `(default)`: The breadcrumb label content.
|
|
2660
|
+
*/
|
|
2661
|
+
"w-breadcrumb-item": Partial<
|
|
2662
|
+
WarpBreadcrumbItemProps & BaseProps<WarpBreadcrumbItem> & BaseEvents
|
|
2663
|
+
>;
|
|
2664
|
+
|
|
2225
2665
|
/**
|
|
2226
2666
|
* Card is a layout component used for separating content areas on a page.
|
|
2227
2667
|
*
|
|
@@ -2257,15 +2697,29 @@ export type CustomElements = {
|
|
|
2257
2697
|
*
|
|
2258
2698
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2259
2699
|
*
|
|
2260
|
-
* - `name`: The name of the checkbox
|
|
2261
|
-
*
|
|
2262
|
-
*
|
|
2263
|
-
* - `
|
|
2264
|
-
*
|
|
2265
|
-
*
|
|
2266
|
-
* - `
|
|
2267
|
-
*
|
|
2268
|
-
*
|
|
2700
|
+
* - `name`: The name of the checkbox.
|
|
2701
|
+
*
|
|
2702
|
+
* When the checkbox is checked and belongs to a form, this name is submitted with the checkbox value. If the checkbox is inside a `w-checkbox-group` with a name, the group name is used when the checkbox does not have its own name.
|
|
2703
|
+
* - `value`: The value submitted when the checkbox is checked.
|
|
2704
|
+
*
|
|
2705
|
+
* If no value attribute is set, the checkbox defaults to `on`. Unchecked and disabled checkboxes do not submit a value.
|
|
2706
|
+
* - `indeterminate`: Whether the checkbox is visually indeterminate.
|
|
2707
|
+
*
|
|
2708
|
+
* Use this for parent options that represent a mixed set of child selections. Clicking the checkbox clears the indeterminate state and sets the checkbox to checked.
|
|
2709
|
+
* - `checked`: Whether the checkbox is checked.
|
|
2710
|
+
*
|
|
2711
|
+
* Checked checkboxes submit their value with form data. The property is reflected to the `checked` attribute.
|
|
2712
|
+
* - `disabled`: Whether the checkbox is disabled.
|
|
2713
|
+
*
|
|
2714
|
+
* Disabled checkboxes cannot be focused, changed, or submitted with form data.
|
|
2715
|
+
* - `required`: Whether the checkbox must be checked before form submission.
|
|
2716
|
+
*
|
|
2717
|
+
* A required checkbox is invalid until it is checked. For requiring at least one option in a set, use `required` on `w-checkbox-group`.
|
|
2718
|
+
* - `invalid`: Whether the checkbox is visually invalid.
|
|
2719
|
+
*
|
|
2720
|
+
* Use this to show an externally managed validation error. Required validation also sets the invalid state after the user interacts with the checkbox or tries to submit the form.
|
|
2721
|
+
* - `input`: undefined (property only)
|
|
2722
|
+
* - `_computedInvalid`: Computed invalid state: combines own invalid with group invalid (property only) (readonly)
|
|
2269
2723
|
* - `validationMessage`: Returns the validation message if the checkbox is invalid, otherwise an empty string (property only) (readonly)
|
|
2270
2724
|
* - `validity`: Returns the validity state of the checkbox (property only) (readonly)
|
|
2271
2725
|
*
|
|
@@ -2286,21 +2740,46 @@ export type CustomElements = {
|
|
|
2286
2740
|
* - `checkValidity() => boolean`: Checks whether the checkbox passes constraint validation
|
|
2287
2741
|
* - `reportValidity() => boolean`: Checks validity and shows the browser's validation message if invalid
|
|
2288
2742
|
*/
|
|
2289
|
-
"w-checkbox": Partial<
|
|
2743
|
+
"w-checkbox": Partial<
|
|
2744
|
+
WarpCheckboxProps & BaseProps<WarpCheckbox> & BaseEvents
|
|
2745
|
+
>;
|
|
2290
2746
|
|
|
2291
2747
|
/**
|
|
2748
|
+
* Checkboxes allow users to select multiple options from a list of choices.
|
|
2749
|
+
*
|
|
2750
|
+
* Use with `w-checkbox`.
|
|
2751
|
+
*
|
|
2752
|
+
* ## Architecture Note
|
|
2753
|
+
* This component uses a <div> wrapper instead of the more semantic <fieldset> element.
|
|
2754
|
+
* Note that w-radio-group uses <fieldset>, which provides better accessibility and follows
|
|
2755
|
+
* HTML best practices. This inconsistency exists for historical reasons and may be addressed
|
|
2756
|
+
* in a future major version to align both on the more semantic approach.
|
|
2292
2757
|
*
|
|
2758
|
+
* TODO: Align w-checkbox-group to use <fieldset> in a future major version after assessing
|
|
2759
|
+
* backwards compatibility implications (CSS selectors, etc.).
|
|
2293
2760
|
*
|
|
2294
2761
|
* ## Attributes & Properties
|
|
2295
2762
|
*
|
|
2296
2763
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2297
2764
|
*
|
|
2298
2765
|
* - `label`: The group label displayed above the checkboxes.
|
|
2766
|
+
*
|
|
2767
|
+
* Use this to describe the shared question or topic for the checkbox options. The label is connected to the internal group for assistive technologies.
|
|
2299
2768
|
* - `name`: The name applied to child checkboxes when they do not provide one.
|
|
2769
|
+
*
|
|
2770
|
+
* Use this when the grouped checkboxes should submit values under the same form field name. Individual checkboxes can still override the group name with their own `name`.
|
|
2300
2771
|
* - `optional`: Whether to show optional text next to the label.
|
|
2301
|
-
*
|
|
2302
|
-
*
|
|
2303
|
-
* - `
|
|
2772
|
+
*
|
|
2773
|
+
* Use this to indicate that selecting an option from the group is not required.
|
|
2774
|
+
* - `help-text`/`helpText`: Help text displayed below the checkbox group.
|
|
2775
|
+
*
|
|
2776
|
+
* Use this for supporting guidance or validation feedback. When required validation fails, the group replaces this text with the localized required message.
|
|
2777
|
+
* - `required`: Whether at least one checkbox in the group must be selected.
|
|
2778
|
+
*
|
|
2779
|
+
* Required validation is managed by the group. The individual checkboxes provide the submitted form values.
|
|
2780
|
+
* - `invalid`: Whether the checkbox group is visually invalid.
|
|
2781
|
+
*
|
|
2782
|
+
* Use this to show an externally managed validation error for the group. The invalid state is also shared with child checkboxes for consistent styling and accessibility state.
|
|
2304
2783
|
*
|
|
2305
2784
|
* ## Methods
|
|
2306
2785
|
*
|
|
@@ -2311,7 +2790,7 @@ export type CustomElements = {
|
|
|
2311
2790
|
* - `focus(options?: FocusOptions) => void`: Sets focus on the checkbox group.
|
|
2312
2791
|
*/
|
|
2313
2792
|
"w-checkbox-group": Partial<
|
|
2314
|
-
|
|
2793
|
+
WarpCheckboxGroupProps & BaseProps<WarpCheckboxGroup> & BaseEvents
|
|
2315
2794
|
>;
|
|
2316
2795
|
|
|
2317
2796
|
/**
|
|
@@ -2323,21 +2802,51 @@ export type CustomElements = {
|
|
|
2323
2802
|
*
|
|
2324
2803
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2325
2804
|
*
|
|
2326
|
-
* - `options`: The available options to select from
|
|
2327
|
-
*
|
|
2328
|
-
*
|
|
2329
|
-
* - `
|
|
2330
|
-
*
|
|
2331
|
-
*
|
|
2332
|
-
* - `
|
|
2333
|
-
*
|
|
2334
|
-
*
|
|
2335
|
-
* - `
|
|
2336
|
-
*
|
|
2337
|
-
*
|
|
2338
|
-
* - `
|
|
2339
|
-
*
|
|
2340
|
-
*
|
|
2805
|
+
* - `options`: The available options to select from.
|
|
2806
|
+
*
|
|
2807
|
+
* Use this for framework usage, application state, or remote search results. When `options` contains entries, it is used instead of child `<option>` elements.
|
|
2808
|
+
* - `label`: The label displayed above the input.
|
|
2809
|
+
*
|
|
2810
|
+
* Use this to give the combobox a visible and accessible name.
|
|
2811
|
+
* - `placeholder`: Placeholder text displayed when the input is empty.
|
|
2812
|
+
*
|
|
2813
|
+
* Use this as a short hint for the expected input. Do not use placeholder text as a replacement for a label.
|
|
2814
|
+
* - `value`: The selected or typed value.
|
|
2815
|
+
*
|
|
2816
|
+
* When an option is selected, this is set to the option value. The displayed text may differ when the option has a separate label.
|
|
2817
|
+
* - `open-on-focus`/`openOnFocus`: Whether the option list opens when the input receives focus.
|
|
2818
|
+
*
|
|
2819
|
+
* Use this when users should see available options before they start typing.
|
|
2820
|
+
* - `select-on-blur`/`selectOnBlur`: Whether the active option is selected when the input loses focus.
|
|
2821
|
+
*
|
|
2822
|
+
* When enabled, the combobox selects the keyboard-highlighted option, or an option whose value exactly matches the current input value, on blur.
|
|
2823
|
+
* - `match-text-segments`/`matchTextSegments`: Whether matching text segments in options are highlighted.
|
|
2824
|
+
*
|
|
2825
|
+
* Use this to visually emphasize the part of each option that matches the current input value.
|
|
2826
|
+
* - `disable-static-filtering`/`disableStaticFiltering`: Whether built-in client-side filtering is disabled.
|
|
2827
|
+
*
|
|
2828
|
+
* Use this for remote search or externally filtered results. When disabled, all entries in `options` are rendered as provided.
|
|
2829
|
+
* - `invalid`: Whether the combobox is visually invalid.
|
|
2830
|
+
*
|
|
2831
|
+
* Use this to show an externally managed validation error. Pair it with `help-text` to explain how to fix the error.
|
|
2832
|
+
* - `help-text`/`helpText`: Help text displayed below the input.
|
|
2833
|
+
*
|
|
2834
|
+
* Use this for supporting guidance or validation feedback.
|
|
2835
|
+
* - `disabled`: Whether the combobox is disabled.
|
|
2836
|
+
*
|
|
2837
|
+
* Disabled comboboxes cannot be focused, changed, or submitted with form data.
|
|
2838
|
+
* - `required`: Whether the combobox is required before form submission.
|
|
2839
|
+
*
|
|
2840
|
+
* Use this when the user must provide a value before submitting the form.
|
|
2841
|
+
* - `optional`: Whether to show optional text next to the label.
|
|
2842
|
+
*
|
|
2843
|
+
* Use this to indicate that the combobox is not required.
|
|
2844
|
+
* - `name`: The name submitted with the combobox value.
|
|
2845
|
+
*
|
|
2846
|
+
* Use this when the combobox belongs to a form and its value should be included in form data.
|
|
2847
|
+
* - `autocomplete`: The autocomplete attribute passed to the internal input.
|
|
2848
|
+
*
|
|
2849
|
+
* Defaults to `off`. Set this when browser autocomplete should be enabled or scoped to a specific autocomplete token.
|
|
2341
2850
|
*
|
|
2342
2851
|
* ## Methods
|
|
2343
2852
|
*
|
|
@@ -2360,22 +2869,30 @@ export type CustomElements = {
|
|
|
2360
2869
|
*
|
|
2361
2870
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2362
2871
|
*
|
|
2363
|
-
* - `label`:
|
|
2364
|
-
*
|
|
2365
|
-
*
|
|
2366
|
-
* - `
|
|
2367
|
-
*
|
|
2872
|
+
* - `label`: The label displayed above the date input.
|
|
2873
|
+
*
|
|
2874
|
+
* Use this to give the datepicker a visible and accessible name.
|
|
2875
|
+
* - `lang`: The locale used for calendar labels and date formatting.
|
|
2876
|
+
*
|
|
2877
|
+
* This takes precedence over the `<html>` `lang` attribute. Supported built-in locales are `en`, `nb`, `sv`, `da`, and `fi`.
|
|
2878
|
+
* - `name`: The name submitted with the date value.
|
|
2879
|
+
*
|
|
2880
|
+
* Use this when the datepicker belongs to a form and its value should be included in form data.
|
|
2881
|
+
* - `value`: The selected date value.
|
|
2882
|
+
*
|
|
2883
|
+
* Use an ISO date string in `YYYY-MM-DD` format. The value is submitted with the form and is reset to its initial value when the form resets.
|
|
2884
|
+
* - `header-format`/`headerFormat`: The date format used in the calendar header.
|
|
2368
2885
|
*
|
|
2369
2886
|
* The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
|
|
2370
|
-
* - `weekday-format`/`weekdayFormat`:
|
|
2887
|
+
* - `weekday-format`/`weekdayFormat`: The weekday format shown above the calendar grid.
|
|
2371
2888
|
*
|
|
2372
2889
|
* The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
|
|
2373
|
-
* - `day-format`/`dayFormat`:
|
|
2890
|
+
* - `day-format`/`dayFormat`: The date format used for calendar day accessible names.
|
|
2374
2891
|
*
|
|
2375
2892
|
* The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
|
|
2376
|
-
* - `isDayDisabled`:
|
|
2893
|
+
* - `isDayDisabled`: Function used to disable dates in the calendar.
|
|
2377
2894
|
*
|
|
2378
|
-
*
|
|
2895
|
+
* Set this on the element instance in JavaScript, not as an HTML attribute. Disabled dates cannot be selected from the calendar. (property only)
|
|
2379
2896
|
* - `isCalendarOpen`: undefined (property only)
|
|
2380
2897
|
* - `navigationDate`: undefined (property only)
|
|
2381
2898
|
* - `selectedDate`: undefined (property only) (readonly)
|
|
@@ -2406,21 +2923,19 @@ export type CustomElements = {
|
|
|
2406
2923
|
/**
|
|
2407
2924
|
* Expandable is a layout component used for creating expandable content areas on a page.
|
|
2408
2925
|
*
|
|
2409
|
-
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/layout-expandable--docs)
|
|
2410
|
-
*
|
|
2411
2926
|
* ## Attributes & Properties
|
|
2412
2927
|
*
|
|
2413
2928
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
2414
2929
|
*
|
|
2415
|
-
* - `expanded`:
|
|
2416
|
-
* - `title`:
|
|
2417
|
-
* - `box`:
|
|
2418
|
-
* - `bleed`:
|
|
2930
|
+
* - `expanded`: Controls component's expanded state
|
|
2931
|
+
* - `title`: Component title. Used to display the title value which is always present regardless of whether the component is open or closed.
|
|
2932
|
+
* - `box`: Will make the expandable a Box
|
|
2933
|
+
* - `bleed`: Will make the expandable full-width on the sm breakpoint size
|
|
2419
2934
|
* - `button-class`/`buttonClass`: undefined
|
|
2420
2935
|
* - `content-class`/`contentClass`: undefined
|
|
2421
|
-
* - `no-chevron`/`noChevron`:
|
|
2422
|
-
* - `animated`:
|
|
2423
|
-
* - `heading-level`/`headingLevel`:
|
|
2936
|
+
* - `no-chevron`/`noChevron`: Controls chevron visibility
|
|
2937
|
+
* - `animated`: Will animate the expansion/collapse
|
|
2938
|
+
* - `heading-level`/`headingLevel`: Wrap the toggle button in a heading element with the specified level. If headingLevel is not specified, the button will not be wrapped by a heading element.
|
|
2424
2939
|
* - `_hasTitle`: undefined
|
|
2425
2940
|
* - `_showChevronUp`: undefined
|
|
2426
2941
|
*
|
|
@@ -2608,7 +3123,7 @@ export type CustomElements = {
|
|
|
2608
3123
|
* Areas where markup can be added to the component.
|
|
2609
3124
|
*
|
|
2610
3125
|
* - `label`: Alternative to the `label` attribute should you need custom HTML.
|
|
2611
|
-
* - `help-text`: Alternative to the `help-text` attribute should you need custom HTML.
|
|
3126
|
+
* - `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.).
|
|
2612
3127
|
*/
|
|
2613
3128
|
"w-radio-group": Partial<
|
|
2614
3129
|
WarpRadioGroupProps & BaseProps<WarpRadioGroup> & BaseEvents
|
|
@@ -2694,6 +3209,7 @@ export type CustomElements = {
|
|
|
2694
3209
|
* - `help-text`/`helpText`: Additional description to show below the fieldset
|
|
2695
3210
|
* - `invalid`: Sets the form fields and fieldset in an invalid state
|
|
2696
3211
|
* - `required`: Ensures a child slider thumb has a value before allowing the containing form to submit
|
|
3212
|
+
* - `optional`: Whether to show the optional indicator after the label.
|
|
2697
3213
|
* - `min`: The minimum allowed value in the range inputs
|
|
2698
3214
|
* - `max`: The maximum allowed value in the range inputs
|
|
2699
3215
|
* - `markers`: Pass a value similar to step to create visual markers at that interval
|
|
@@ -2705,6 +3221,7 @@ export type CustomElements = {
|
|
|
2705
3221
|
*
|
|
2706
3222
|
* Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the tooltip. (property only)
|
|
2707
3223
|
* - `labelFormatter`: Formatter for the min and max labels below the range. (property only)
|
|
3224
|
+
* - `_label`: undefined (property only) (readonly)
|
|
2708
3225
|
*
|
|
2709
3226
|
* ## Slots
|
|
2710
3227
|
*
|
|
@@ -2718,6 +3235,112 @@ export type CustomElements = {
|
|
|
2718
3235
|
*/
|
|
2719
3236
|
"w-slider": Partial<WarpSliderProps & BaseProps<WarpSlider> & BaseEvents>;
|
|
2720
3237
|
|
|
3238
|
+
/**
|
|
3239
|
+
* An item to show in a `w-snackbar`.
|
|
3240
|
+
*
|
|
3241
|
+
* See the `create` function on `w-snackbar` for a convenience API which helps you make snackbar items.
|
|
3242
|
+
*
|
|
3243
|
+
* ## Attributes & Properties
|
|
3244
|
+
*
|
|
3245
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3246
|
+
*
|
|
3247
|
+
* - `action-placement`/`actionPlacement`: The placement of the action and close buttons.
|
|
3248
|
+
* - `duration`: How long the message should stay in the document before removing itself.
|
|
3249
|
+
*
|
|
3250
|
+
* ## Slots
|
|
3251
|
+
*
|
|
3252
|
+
* Areas where markup can be added to the component.
|
|
3253
|
+
*
|
|
3254
|
+
* - `default`: the snackbar message.
|
|
3255
|
+
* - `icon`: icon preceeding the message.
|
|
3256
|
+
* - `action`: action following the message.
|
|
3257
|
+
*
|
|
3258
|
+
* ## Methods
|
|
3259
|
+
*
|
|
3260
|
+
* Methods that can be called to access component functionality.
|
|
3261
|
+
*
|
|
3262
|
+
* - `close() => void`: Remove the snackbar item from the document.
|
|
3263
|
+
*
|
|
3264
|
+
* Moves focus to the last focused element outside of the snackbar item, if available.
|
|
3265
|
+
*
|
|
3266
|
+
* ## CSS Custom Properties
|
|
3267
|
+
*
|
|
3268
|
+
* CSS variables available for styling the component.
|
|
3269
|
+
*
|
|
3270
|
+
* - `--w-c-snackbar-item-radius`: undefined (default: `undefined`)
|
|
3271
|
+
* - `--w-c-snackbar-item-max-width`: undefined (default: `undefined`)
|
|
3272
|
+
* - `--w-c-snackbar-item-min-width`: undefined (default: `undefined`)
|
|
3273
|
+
* - `--w-c-snackbar-item-padding`: undefined (default: `undefined`)
|
|
3274
|
+
* - `--w-c-snackbar-item-bg`: undefined (default: `undefined`)
|
|
3275
|
+
* - `--w-c-snackbar-item-action-bg-active`: undefined (default: `undefined`)
|
|
3276
|
+
* - `--w-c-snackbar-item-action-bg-hover`: undefined (default: `undefined`)
|
|
3277
|
+
* - `--w-c-snackbar-item-color`: undefined (default: `undefined`)
|
|
3278
|
+
* - `--w-c-snackbar-item-action-color-active`: undefined (default: `undefined`)
|
|
3279
|
+
* - `--w-c-snackbar-item-action-color-hover`: undefined (default: `undefined`)
|
|
3280
|
+
* - `--w-c-snackbar-item-box-shadow`: undefined (default: `undefined`)
|
|
3281
|
+
*
|
|
3282
|
+
* ## CSS Parts
|
|
3283
|
+
*
|
|
3284
|
+
* Custom selectors for styling elements within the component.
|
|
3285
|
+
*
|
|
3286
|
+
* - `item`: the container wrapping the message, icon and actions.
|
|
3287
|
+
* - `icon`: the icon for the variant.
|
|
3288
|
+
* - `message`: the default slot, body of the snackbar item.
|
|
3289
|
+
* - `action`: close and action button.
|
|
3290
|
+
*/
|
|
3291
|
+
"w-snackbar-item": Partial<
|
|
3292
|
+
WarpSnackbarItemProps & BaseProps<WarpSnackbarItem> & BaseEvents
|
|
3293
|
+
>;
|
|
3294
|
+
|
|
3295
|
+
/**
|
|
3296
|
+
* A Snackbar shows brief user feedback messages that overlay content, with an optional action such as Undo.
|
|
3297
|
+
*
|
|
3298
|
+
* Include one `<w-snackbar></w-snackbar>` in the document `<body>`. Use the `create` function to create messages.
|
|
3299
|
+
*
|
|
3300
|
+
* ## Slots
|
|
3301
|
+
*
|
|
3302
|
+
* Areas where markup can be added to the component.
|
|
3303
|
+
*
|
|
3304
|
+
* - `default`: `w-snackbar-item` gets placed inside the default slot by the `create` function.
|
|
3305
|
+
*
|
|
3306
|
+
* ## Methods
|
|
3307
|
+
*
|
|
3308
|
+
* Methods that can be called to access component functionality.
|
|
3309
|
+
*
|
|
3310
|
+
* - `create(message: string, options: CreateSnackbarOptions = {}) => void`: Creates a snackbar item and immediately adds it to the snackbar.
|
|
3311
|
+
*
|
|
3312
|
+
* By default the snackbar item automatically closes after 4 seconds (`SnackbarDuration.Short`).
|
|
3313
|
+
*
|
|
3314
|
+
* If you include an `action` in the options the default `duration` is
|
|
3315
|
+
* set to 10 seconds (`SnackbarDuration.Long`) and can not be made shorter.
|
|
3316
|
+
*
|
|
3317
|
+
* A `duration` of 10 seconds or longer forces the close button to be visible.
|
|
3318
|
+
*
|
|
3319
|
+
* The default `variant` is `neutral` which does not have an icon.
|
|
3320
|
+
*
|
|
3321
|
+
* Set `duration` to `SnackbarDuration.Infinite` if you want a persistent message.
|
|
3322
|
+
*
|
|
3323
|
+
* ## CSS Custom Properties
|
|
3324
|
+
*
|
|
3325
|
+
* CSS variables available for styling the component.
|
|
3326
|
+
*
|
|
3327
|
+
* - `--w-c-snackbar-container-gap`: undefined (default: `undefined`)
|
|
3328
|
+
* - `--w-c-snackbar-position-bottom`: undefined (default: `undefined`)
|
|
3329
|
+
* - `--w-c-snackbar-position-left`: undefined (default: `undefined`)
|
|
3330
|
+
* - `--w-c-snackbar-position-right`: undefined (default: `undefined`)
|
|
3331
|
+
* - `--w-c-snackbar-position-top`: undefined (default: `undefined`)
|
|
3332
|
+
* - `--w-c-snackbar-z-index`: undefined (default: `undefined`)
|
|
3333
|
+
*
|
|
3334
|
+
* ## CSS Parts
|
|
3335
|
+
*
|
|
3336
|
+
* Custom selectors for styling elements within the component.
|
|
3337
|
+
*
|
|
3338
|
+
* - `container`: the live region that positions messages on the screen.
|
|
3339
|
+
*/
|
|
3340
|
+
"w-snackbar": Partial<
|
|
3341
|
+
WarpSnackbarProps & BaseProps<WarpSnackbar> & BaseEvents
|
|
3342
|
+
>;
|
|
3343
|
+
|
|
2721
3344
|
/**
|
|
2722
3345
|
* Individual step component that shows a single step in a process
|
|
2723
3346
|
*
|
|
@@ -2879,22 +3502,113 @@ export type CustomElements = {
|
|
|
2879
3502
|
>;
|
|
2880
3503
|
};
|
|
2881
3504
|
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
* - `size`: Size: small, medium, large or pixel value (e.g. "32px")
|
|
2892
|
-
* - `locale`: Locale used in CDN URL
|
|
2893
|
-
*/
|
|
2894
|
-
"w-icon": Partial<
|
|
2895
|
-
WIconProps & WIconSolidJsProps & BaseProps<WIcon> & BaseEvents
|
|
3505
|
+
type ReactElementProps<T extends HTMLElement> = import("react").DOMAttributes<T> &
|
|
3506
|
+
import("react").AriaAttributes &
|
|
3507
|
+
import("react").RefAttributes<T> &
|
|
3508
|
+
Pick<
|
|
3509
|
+
import("react").HTMLAttributes<T>,
|
|
3510
|
+
| "className"
|
|
3511
|
+
| "style"
|
|
3512
|
+
| "suppressContentEditableWarning"
|
|
3513
|
+
| "suppressHydrationWarning"
|
|
2896
3514
|
>;
|
|
2897
3515
|
|
|
3516
|
+
// Merge order matters: component props must win over React/global/base props
|
|
3517
|
+
// when names collide, e.g. w-attention's boolean popover prop.
|
|
3518
|
+
type ReactCustomElementProps<T extends HTMLElement, Props> = Omit<
|
|
3519
|
+
BaseProps<T> & BaseEvents,
|
|
3520
|
+
keyof ReactElementProps<T> | keyof Props
|
|
3521
|
+
> &
|
|
3522
|
+
Omit<ReactElementProps<T>, keyof Props> &
|
|
3523
|
+
Props;
|
|
3524
|
+
|
|
3525
|
+
type CustomElementInstances = {
|
|
3526
|
+
"w-textfield": WarpTextField;
|
|
3527
|
+
"w-icon": WarpIcon;
|
|
3528
|
+
"w-affix": WarpAffix;
|
|
3529
|
+
"w-alert": WarpAlert;
|
|
3530
|
+
"w-link": WarpLink;
|
|
3531
|
+
"w-button": WarpButton;
|
|
3532
|
+
"w-attention": WarpAttention;
|
|
3533
|
+
"w-badge": WarpBadge;
|
|
3534
|
+
"w-box": WarpBox;
|
|
3535
|
+
"w-breadcrumbs": WarpBreadcrumbs;
|
|
3536
|
+
"w-breadcrumb-item": WarpBreadcrumbItem;
|
|
3537
|
+
"w-card": WarpCard;
|
|
3538
|
+
"w-checkbox": WarpCheckbox;
|
|
3539
|
+
"w-checkbox-group": WarpCheckboxGroup;
|
|
3540
|
+
"w-combobox": WarpCombobox;
|
|
3541
|
+
"w-datepicker": WarpDatepicker;
|
|
3542
|
+
"w-expandable": WarpExpandable;
|
|
3543
|
+
"w-modal": WarpModal;
|
|
3544
|
+
"w-modal-footer": WarpModalFooter;
|
|
3545
|
+
"w-modal-header": WarpModalHeader;
|
|
3546
|
+
"w-page-indicator": WarpPageIndicator;
|
|
3547
|
+
"w-pagination": WarpPagination;
|
|
3548
|
+
"w-pill": WarpPill;
|
|
3549
|
+
"w-radio": WarpRadio;
|
|
3550
|
+
"w-radio-group": WarpRadioGroup;
|
|
3551
|
+
"w-select": WarpSelect;
|
|
3552
|
+
"w-slider-thumb": WarpSliderThumb;
|
|
3553
|
+
"w-slider": WarpSlider;
|
|
3554
|
+
"w-snackbar-item": WarpSnackbarItem;
|
|
3555
|
+
"w-snackbar": WarpSnackbar;
|
|
3556
|
+
"w-step": WarpStep;
|
|
3557
|
+
"w-step-indicator": WarpStepIndicator;
|
|
3558
|
+
"w-switch": WarpSwitch;
|
|
3559
|
+
"w-tab": WarpTab;
|
|
3560
|
+
"w-tab-panel": WarpTabPanel;
|
|
3561
|
+
"w-tabs": WarpTabs;
|
|
3562
|
+
"w-textarea": WarpTextarea;
|
|
3563
|
+
};
|
|
3564
|
+
|
|
3565
|
+
type CustomElementComponentProps = {
|
|
3566
|
+
"w-textfield": WarpTextFieldProps;
|
|
3567
|
+
"w-icon": WarpIconProps;
|
|
3568
|
+
"w-affix": WarpAffixProps;
|
|
3569
|
+
"w-alert": WarpAlertProps;
|
|
3570
|
+
"w-link": WarpLinkProps;
|
|
3571
|
+
"w-button": WarpButtonProps;
|
|
3572
|
+
"w-attention": WarpAttentionProps;
|
|
3573
|
+
"w-badge": WarpBadgeProps;
|
|
3574
|
+
"w-box": WarpBoxProps;
|
|
3575
|
+
"w-breadcrumbs": WarpBreadcrumbsProps;
|
|
3576
|
+
"w-breadcrumb-item": WarpBreadcrumbItemProps;
|
|
3577
|
+
"w-card": WarpCardProps;
|
|
3578
|
+
"w-checkbox": WarpCheckboxProps;
|
|
3579
|
+
"w-checkbox-group": WarpCheckboxGroupProps;
|
|
3580
|
+
"w-combobox": WarpComboboxProps;
|
|
3581
|
+
"w-datepicker": WarpDatepickerProps;
|
|
3582
|
+
"w-expandable": WarpExpandableProps;
|
|
3583
|
+
"w-modal": WarpModalProps;
|
|
3584
|
+
"w-modal-footer": WarpModalFooterProps;
|
|
3585
|
+
"w-modal-header": WarpModalHeaderProps;
|
|
3586
|
+
"w-page-indicator": WarpPageIndicatorProps;
|
|
3587
|
+
"w-pagination": WarpPaginationProps;
|
|
3588
|
+
"w-pill": WarpPillProps;
|
|
3589
|
+
"w-radio": WarpRadioProps;
|
|
3590
|
+
"w-radio-group": WarpRadioGroupProps;
|
|
3591
|
+
"w-select": WarpSelectProps;
|
|
3592
|
+
"w-slider-thumb": WarpSliderThumbProps;
|
|
3593
|
+
"w-slider": WarpSliderProps;
|
|
3594
|
+
"w-snackbar-item": WarpSnackbarItemProps;
|
|
3595
|
+
"w-snackbar": WarpSnackbarProps;
|
|
3596
|
+
"w-step": WarpStepProps;
|
|
3597
|
+
"w-step-indicator": WarpStepIndicatorProps;
|
|
3598
|
+
"w-switch": WarpSwitchProps;
|
|
3599
|
+
"w-tab": WarpTabProps;
|
|
3600
|
+
"w-tab-panel": WarpTabPanelProps;
|
|
3601
|
+
"w-tabs": WarpTabsProps;
|
|
3602
|
+
"w-textarea": WarpTextareaProps;
|
|
3603
|
+
};
|
|
3604
|
+
|
|
3605
|
+
export type ReactCustomElements = {
|
|
3606
|
+
[Tag in keyof CustomElementComponentProps]: Tag extends keyof CustomElementInstances
|
|
3607
|
+
? Partial<ReactCustomElementProps<CustomElementInstances[Tag], CustomElementComponentProps[Tag]>>
|
|
3608
|
+
: never;
|
|
3609
|
+
};
|
|
3610
|
+
|
|
3611
|
+
export type CustomElementsSolidJs = {
|
|
2898
3612
|
/**
|
|
2899
3613
|
* A single-line input component used for entering and editing textual or numeric data.
|
|
2900
3614
|
*
|
|
@@ -2911,6 +3625,7 @@ export type CustomElementsSolidJs = {
|
|
|
2911
3625
|
* - `label`: Either a `label` or an `aria-label` must be provided.
|
|
2912
3626
|
* - `help-text`/`helpText`: Use in combination with `invalid` to show as a validation error message,
|
|
2913
3627
|
* or on its own to show a help text.
|
|
3628
|
+
* - `optional`: Whether to show the optional indicator after the label.
|
|
2914
3629
|
* - `size`: Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs.
|
|
2915
3630
|
* - `max`: Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength).
|
|
2916
3631
|
* - `min`: Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength).
|
|
@@ -2943,7 +3658,7 @@ export type CustomElementsSolidJs = {
|
|
|
2943
3658
|
* Areas where markup can be added to the component.
|
|
2944
3659
|
*
|
|
2945
3660
|
* - `suffix`: Use with `<w-affix>` to include a suffix, for example the unit for a number (e. g. km or sek).
|
|
2946
|
-
* - `prefix`: Use with `<w-affix>` to include a prefix, for example a search icon.
|
|
3661
|
+
* - `prefix`: Use with `<w-affix>` to include a prefix, for example a search icon. ## Accessibility Note for Affixes Due to shadow DOM boundaries, affix content cannot be connected to the input via ARIA references. For non-interactive affixes (text labels like currency symbols), consider including that information in the main label or placeholder text instead for better screen reader support.
|
|
2947
3662
|
*
|
|
2948
3663
|
* ## Methods
|
|
2949
3664
|
*
|
|
@@ -2961,9 +3676,36 @@ export type CustomElementsSolidJs = {
|
|
|
2961
3676
|
BaseEvents
|
|
2962
3677
|
>;
|
|
2963
3678
|
|
|
3679
|
+
/**
|
|
3680
|
+
*
|
|
3681
|
+
*
|
|
3682
|
+
* ## Attributes & Properties
|
|
3683
|
+
*
|
|
3684
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3685
|
+
*
|
|
3686
|
+
* - `name`: Icon filename (without .svg)
|
|
3687
|
+
* - `size`: Size: small, medium, large or pixel value (e.g. "32px").
|
|
3688
|
+
* - `locale`: Locale used for `<title>` text.
|
|
3689
|
+
*
|
|
3690
|
+
* Reads the `lang` attribute from `<html>`, falls back to 'en'.
|
|
3691
|
+
*/
|
|
3692
|
+
"w-icon": Partial<
|
|
3693
|
+
WarpIconProps & WarpIconSolidJsProps & BaseProps<WarpIcon> & BaseEvents
|
|
3694
|
+
>;
|
|
3695
|
+
|
|
2964
3696
|
/**
|
|
2965
3697
|
* This component is usually used in other components like form elements to show a prefix or suffix. See for example `w-textfield`.
|
|
2966
3698
|
*
|
|
3699
|
+
* ## Accessibility Note
|
|
3700
|
+
* Due to shadow DOM encapsulation, ARIA attributes (like `aria-describedby`, `aria-labelledby`)
|
|
3701
|
+
* cannot reference elements across shadow boundaries. This means:
|
|
3702
|
+
* - Non-interactive affixes (text labels, icons) cannot be connected to the parent input via ARIA
|
|
3703
|
+
* - Interactive affixes (buttons) must have their own `aria-label` (already implemented)
|
|
3704
|
+
* - Do NOT attempt to reference affix content from parent components via ARIA ID references - it won't work
|
|
3705
|
+
*
|
|
3706
|
+
* For non-interactive labels (e.g., currency symbols), consider including the information in the
|
|
3707
|
+
* main label or placeholder instead of relying on ARIA to announce affix content.
|
|
3708
|
+
*
|
|
2967
3709
|
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-affix--docs)
|
|
2968
3710
|
*
|
|
2969
3711
|
* ## Attributes & Properties
|
|
@@ -3011,14 +3753,18 @@ export type CustomElementsSolidJs = {
|
|
|
3011
3753
|
*
|
|
3012
3754
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3013
3755
|
*
|
|
3014
|
-
* - `autofocus`:
|
|
3015
|
-
* - `variant`:
|
|
3016
|
-
* - `small`:
|
|
3017
|
-
* - `href`:
|
|
3018
|
-
* - `disabled`:
|
|
3019
|
-
*
|
|
3020
|
-
*
|
|
3021
|
-
* - `
|
|
3756
|
+
* - `autofocus`: Focus the link after it is rendered
|
|
3757
|
+
* - `variant`: Visual style for the link/button.
|
|
3758
|
+
* - `small`: Render a smaller version
|
|
3759
|
+
* - `href`: The URL the link points to
|
|
3760
|
+
* - `disabled`: Applies disabled styling, but you need to disable clicks on your own.
|
|
3761
|
+
*
|
|
3762
|
+
* The component renders an `<a>` element; `disabled` affects styling, but does not inherently prevent navigation. If you need to fully disable interaction, omit `href` and/or prevent default click behavior.
|
|
3763
|
+
* - `target`: Where to display the linked URL (e.g. `_blank`)
|
|
3764
|
+
* - `rel`: Relationship of the linked URL.
|
|
3765
|
+
*
|
|
3766
|
+
* If `target="_blank"` and `rel` is not provided, the component uses `noopener`.
|
|
3767
|
+
* - `full-width`/`fullWidth`: Makes the link take up the full width of its parent
|
|
3022
3768
|
*/
|
|
3023
3769
|
"w-link": Partial<
|
|
3024
3770
|
WarpLinkProps & WarpLinkSolidJsProps & BaseProps<WarpLink> & BaseEvents
|
|
@@ -3206,6 +3952,34 @@ export type CustomElementsSolidJs = {
|
|
|
3206
3952
|
BaseEvents
|
|
3207
3953
|
>;
|
|
3208
3954
|
|
|
3955
|
+
/**
|
|
3956
|
+
* Represents one item in a `w-breadcrumbs` trail.
|
|
3957
|
+
* Renders the slotted label as a link when `href` is set, or as text when it is not, and adds a separator after non-current items.
|
|
3958
|
+
*
|
|
3959
|
+
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-breadcrumbs--docs)
|
|
3960
|
+
*
|
|
3961
|
+
* ## Attributes & Properties
|
|
3962
|
+
*
|
|
3963
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3964
|
+
*
|
|
3965
|
+
* - `current-page`/`currentPage`: Marks this item as the current page.
|
|
3966
|
+
* Use this on the final breadcrumb item so it exposes `aria-current="page"` and does not render a trailing separator.
|
|
3967
|
+
* - `href`: URL for linked breadcrumb items.
|
|
3968
|
+
* When omitted, the item renders as non-focusable text.
|
|
3969
|
+
*
|
|
3970
|
+
* ## Slots
|
|
3971
|
+
*
|
|
3972
|
+
* Areas where markup can be added to the component.
|
|
3973
|
+
*
|
|
3974
|
+
* - `(default)`: The breadcrumb label content.
|
|
3975
|
+
*/
|
|
3976
|
+
"w-breadcrumb-item": Partial<
|
|
3977
|
+
WarpBreadcrumbItemProps &
|
|
3978
|
+
WarpBreadcrumbItemSolidJsProps &
|
|
3979
|
+
BaseProps<WarpBreadcrumbItem> &
|
|
3980
|
+
BaseEvents
|
|
3981
|
+
>;
|
|
3982
|
+
|
|
3209
3983
|
/**
|
|
3210
3984
|
* Card is a layout component used for separating content areas on a page.
|
|
3211
3985
|
*
|
|
@@ -3243,13 +4017,27 @@ export type CustomElementsSolidJs = {
|
|
|
3243
4017
|
*
|
|
3244
4018
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3245
4019
|
*
|
|
3246
|
-
* - `name`: The name of the checkbox
|
|
3247
|
-
*
|
|
3248
|
-
*
|
|
3249
|
-
* - `
|
|
3250
|
-
*
|
|
3251
|
-
*
|
|
3252
|
-
* - `
|
|
4020
|
+
* - `name`: The name of the checkbox.
|
|
4021
|
+
*
|
|
4022
|
+
* When the checkbox is checked and belongs to a form, this name is submitted with the checkbox value. If the checkbox is inside a `w-checkbox-group` with a name, the group name is used when the checkbox does not have its own name.
|
|
4023
|
+
* - `value`: The value submitted when the checkbox is checked.
|
|
4024
|
+
*
|
|
4025
|
+
* If no value attribute is set, the checkbox defaults to `on`. Unchecked and disabled checkboxes do not submit a value.
|
|
4026
|
+
* - `indeterminate`: Whether the checkbox is visually indeterminate.
|
|
4027
|
+
*
|
|
4028
|
+
* Use this for parent options that represent a mixed set of child selections. Clicking the checkbox clears the indeterminate state and sets the checkbox to checked.
|
|
4029
|
+
* - `checked`: Whether the checkbox is checked.
|
|
4030
|
+
*
|
|
4031
|
+
* Checked checkboxes submit their value with form data. The property is reflected to the `checked` attribute.
|
|
4032
|
+
* - `disabled`: Whether the checkbox is disabled.
|
|
4033
|
+
*
|
|
4034
|
+
* Disabled checkboxes cannot be focused, changed, or submitted with form data.
|
|
4035
|
+
* - `required`: Whether the checkbox must be checked before form submission.
|
|
4036
|
+
*
|
|
4037
|
+
* A required checkbox is invalid until it is checked. For requiring at least one option in a set, use `required` on `w-checkbox-group`.
|
|
4038
|
+
* - `invalid`: Whether the checkbox is visually invalid.
|
|
4039
|
+
*
|
|
4040
|
+
* Use this to show an externally managed validation error. Required validation also sets the invalid state after the user interacts with the checkbox or tries to submit the form.
|
|
3253
4041
|
* - `input`: undefined (property only)
|
|
3254
4042
|
* - `_computedInvalid`: Computed invalid state: combines own invalid with group invalid (property only) (readonly)
|
|
3255
4043
|
* - `validationMessage`: Returns the validation message if the checkbox is invalid, otherwise an empty string (property only) (readonly)
|
|
@@ -3273,22 +4061,48 @@ export type CustomElementsSolidJs = {
|
|
|
3273
4061
|
* - `reportValidity() => boolean`: Checks validity and shows the browser's validation message if invalid
|
|
3274
4062
|
*/
|
|
3275
4063
|
"w-checkbox": Partial<
|
|
3276
|
-
|
|
4064
|
+
WarpCheckboxProps &
|
|
4065
|
+
WarpCheckboxSolidJsProps &
|
|
4066
|
+
BaseProps<WarpCheckbox> &
|
|
4067
|
+
BaseEvents
|
|
3277
4068
|
>;
|
|
3278
4069
|
|
|
3279
4070
|
/**
|
|
4071
|
+
* Checkboxes allow users to select multiple options from a list of choices.
|
|
4072
|
+
*
|
|
4073
|
+
* Use with `w-checkbox`.
|
|
3280
4074
|
*
|
|
4075
|
+
* ## Architecture Note
|
|
4076
|
+
* This component uses a <div> wrapper instead of the more semantic <fieldset> element.
|
|
4077
|
+
* Note that w-radio-group uses <fieldset>, which provides better accessibility and follows
|
|
4078
|
+
* HTML best practices. This inconsistency exists for historical reasons and may be addressed
|
|
4079
|
+
* in a future major version to align both on the more semantic approach.
|
|
4080
|
+
*
|
|
4081
|
+
* TODO: Align w-checkbox-group to use <fieldset> in a future major version after assessing
|
|
4082
|
+
* backwards compatibility implications (CSS selectors, etc.).
|
|
3281
4083
|
*
|
|
3282
4084
|
* ## Attributes & Properties
|
|
3283
4085
|
*
|
|
3284
4086
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3285
4087
|
*
|
|
3286
4088
|
* - `label`: The group label displayed above the checkboxes.
|
|
4089
|
+
*
|
|
4090
|
+
* Use this to describe the shared question or topic for the checkbox options. The label is connected to the internal group for assistive technologies.
|
|
3287
4091
|
* - `name`: The name applied to child checkboxes when they do not provide one.
|
|
4092
|
+
*
|
|
4093
|
+
* Use this when the grouped checkboxes should submit values under the same form field name. Individual checkboxes can still override the group name with their own `name`.
|
|
3288
4094
|
* - `optional`: Whether to show optional text next to the label.
|
|
3289
|
-
*
|
|
3290
|
-
*
|
|
3291
|
-
* - `
|
|
4095
|
+
*
|
|
4096
|
+
* Use this to indicate that selecting an option from the group is not required.
|
|
4097
|
+
* - `help-text`/`helpText`: Help text displayed below the checkbox group.
|
|
4098
|
+
*
|
|
4099
|
+
* Use this for supporting guidance or validation feedback. When required validation fails, the group replaces this text with the localized required message.
|
|
4100
|
+
* - `required`: Whether at least one checkbox in the group must be selected.
|
|
4101
|
+
*
|
|
4102
|
+
* Required validation is managed by the group. The individual checkboxes provide the submitted form values.
|
|
4103
|
+
* - `invalid`: Whether the checkbox group is visually invalid.
|
|
4104
|
+
*
|
|
4105
|
+
* Use this to show an externally managed validation error for the group. The invalid state is also shared with child checkboxes for consistent styling and accessibility state.
|
|
3292
4106
|
*
|
|
3293
4107
|
* ## Methods
|
|
3294
4108
|
*
|
|
@@ -3299,9 +4113,9 @@ export type CustomElementsSolidJs = {
|
|
|
3299
4113
|
* - `focus(options?: FocusOptions) => void`: Sets focus on the checkbox group.
|
|
3300
4114
|
*/
|
|
3301
4115
|
"w-checkbox-group": Partial<
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
BaseProps<
|
|
4116
|
+
WarpCheckboxGroupProps &
|
|
4117
|
+
WarpCheckboxGroupSolidJsProps &
|
|
4118
|
+
BaseProps<WarpCheckboxGroup> &
|
|
3305
4119
|
BaseEvents
|
|
3306
4120
|
>;
|
|
3307
4121
|
|
|
@@ -3314,21 +4128,51 @@ export type CustomElementsSolidJs = {
|
|
|
3314
4128
|
*
|
|
3315
4129
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3316
4130
|
*
|
|
3317
|
-
* - `options`: The available options to select from
|
|
3318
|
-
*
|
|
3319
|
-
*
|
|
3320
|
-
* - `
|
|
3321
|
-
*
|
|
3322
|
-
*
|
|
3323
|
-
* - `
|
|
3324
|
-
*
|
|
3325
|
-
*
|
|
3326
|
-
* - `
|
|
3327
|
-
*
|
|
3328
|
-
*
|
|
3329
|
-
* - `
|
|
3330
|
-
*
|
|
3331
|
-
*
|
|
4131
|
+
* - `options`: The available options to select from.
|
|
4132
|
+
*
|
|
4133
|
+
* Use this for framework usage, application state, or remote search results. When `options` contains entries, it is used instead of child `<option>` elements.
|
|
4134
|
+
* - `label`: The label displayed above the input.
|
|
4135
|
+
*
|
|
4136
|
+
* Use this to give the combobox a visible and accessible name.
|
|
4137
|
+
* - `placeholder`: Placeholder text displayed when the input is empty.
|
|
4138
|
+
*
|
|
4139
|
+
* Use this as a short hint for the expected input. Do not use placeholder text as a replacement for a label.
|
|
4140
|
+
* - `value`: The selected or typed value.
|
|
4141
|
+
*
|
|
4142
|
+
* When an option is selected, this is set to the option value. The displayed text may differ when the option has a separate label.
|
|
4143
|
+
* - `open-on-focus`/`openOnFocus`: Whether the option list opens when the input receives focus.
|
|
4144
|
+
*
|
|
4145
|
+
* Use this when users should see available options before they start typing.
|
|
4146
|
+
* - `select-on-blur`/`selectOnBlur`: Whether the active option is selected when the input loses focus.
|
|
4147
|
+
*
|
|
4148
|
+
* When enabled, the combobox selects the keyboard-highlighted option, or an option whose value exactly matches the current input value, on blur.
|
|
4149
|
+
* - `match-text-segments`/`matchTextSegments`: Whether matching text segments in options are highlighted.
|
|
4150
|
+
*
|
|
4151
|
+
* Use this to visually emphasize the part of each option that matches the current input value.
|
|
4152
|
+
* - `disable-static-filtering`/`disableStaticFiltering`: Whether built-in client-side filtering is disabled.
|
|
4153
|
+
*
|
|
4154
|
+
* Use this for remote search or externally filtered results. When disabled, all entries in `options` are rendered as provided.
|
|
4155
|
+
* - `invalid`: Whether the combobox is visually invalid.
|
|
4156
|
+
*
|
|
4157
|
+
* Use this to show an externally managed validation error. Pair it with `help-text` to explain how to fix the error.
|
|
4158
|
+
* - `help-text`/`helpText`: Help text displayed below the input.
|
|
4159
|
+
*
|
|
4160
|
+
* Use this for supporting guidance or validation feedback.
|
|
4161
|
+
* - `disabled`: Whether the combobox is disabled.
|
|
4162
|
+
*
|
|
4163
|
+
* Disabled comboboxes cannot be focused, changed, or submitted with form data.
|
|
4164
|
+
* - `required`: Whether the combobox is required before form submission.
|
|
4165
|
+
*
|
|
4166
|
+
* Use this when the user must provide a value before submitting the form.
|
|
4167
|
+
* - `optional`: Whether to show optional text next to the label.
|
|
4168
|
+
*
|
|
4169
|
+
* Use this to indicate that the combobox is not required.
|
|
4170
|
+
* - `name`: The name submitted with the combobox value.
|
|
4171
|
+
*
|
|
4172
|
+
* Use this when the combobox belongs to a form and its value should be included in form data.
|
|
4173
|
+
* - `autocomplete`: The autocomplete attribute passed to the internal input.
|
|
4174
|
+
*
|
|
4175
|
+
* Defaults to `off`. Set this when browser autocomplete should be enabled or scoped to a specific autocomplete token.
|
|
3332
4176
|
*
|
|
3333
4177
|
* ## Methods
|
|
3334
4178
|
*
|
|
@@ -3354,22 +4198,30 @@ export type CustomElementsSolidJs = {
|
|
|
3354
4198
|
*
|
|
3355
4199
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3356
4200
|
*
|
|
3357
|
-
* - `label`:
|
|
3358
|
-
*
|
|
3359
|
-
*
|
|
3360
|
-
* - `
|
|
3361
|
-
*
|
|
4201
|
+
* - `label`: The label displayed above the date input.
|
|
4202
|
+
*
|
|
4203
|
+
* Use this to give the datepicker a visible and accessible name.
|
|
4204
|
+
* - `lang`: The locale used for calendar labels and date formatting.
|
|
4205
|
+
*
|
|
4206
|
+
* This takes precedence over the `<html>` `lang` attribute. Supported built-in locales are `en`, `nb`, `sv`, `da`, and `fi`.
|
|
4207
|
+
* - `name`: The name submitted with the date value.
|
|
4208
|
+
*
|
|
4209
|
+
* Use this when the datepicker belongs to a form and its value should be included in form data.
|
|
4210
|
+
* - `value`: The selected date value.
|
|
4211
|
+
*
|
|
4212
|
+
* Use an ISO date string in `YYYY-MM-DD` format. The value is submitted with the form and is reset to its initial value when the form resets.
|
|
4213
|
+
* - `header-format`/`headerFormat`: The date format used in the calendar header.
|
|
3362
4214
|
*
|
|
3363
4215
|
* The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
|
|
3364
|
-
* - `weekday-format`/`weekdayFormat`:
|
|
4216
|
+
* - `weekday-format`/`weekdayFormat`: The weekday format shown above the calendar grid.
|
|
3365
4217
|
*
|
|
3366
4218
|
* The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
|
|
3367
|
-
* - `day-format`/`dayFormat`:
|
|
4219
|
+
* - `day-format`/`dayFormat`: The date format used for calendar day accessible names.
|
|
3368
4220
|
*
|
|
3369
4221
|
* The syntax is defined by [date-fns/format](https://date-fns.org/v4.1.0/docs/format).
|
|
3370
|
-
* - `isDayDisabled`:
|
|
4222
|
+
* - `isDayDisabled`: Function used to disable dates in the calendar.
|
|
3371
4223
|
*
|
|
3372
|
-
*
|
|
4224
|
+
* Set this on the element instance in JavaScript, not as an HTML attribute. Disabled dates cannot be selected from the calendar. (property only)
|
|
3373
4225
|
* - `isCalendarOpen`: undefined (property only)
|
|
3374
4226
|
* - `navigationDate`: undefined (property only)
|
|
3375
4227
|
* - `selectedDate`: undefined (property only) (readonly)
|
|
@@ -3403,21 +4255,19 @@ export type CustomElementsSolidJs = {
|
|
|
3403
4255
|
/**
|
|
3404
4256
|
* Expandable is a layout component used for creating expandable content areas on a page.
|
|
3405
4257
|
*
|
|
3406
|
-
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/layout-expandable--docs)
|
|
3407
|
-
*
|
|
3408
4258
|
* ## Attributes & Properties
|
|
3409
4259
|
*
|
|
3410
4260
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
3411
4261
|
*
|
|
3412
|
-
* - `expanded`:
|
|
3413
|
-
* - `title`:
|
|
3414
|
-
* - `box`:
|
|
3415
|
-
* - `bleed`:
|
|
4262
|
+
* - `expanded`: Controls component's expanded state
|
|
4263
|
+
* - `title`: Component title. Used to display the title value which is always present regardless of whether the component is open or closed.
|
|
4264
|
+
* - `box`: Will make the expandable a Box
|
|
4265
|
+
* - `bleed`: Will make the expandable full-width on the sm breakpoint size
|
|
3416
4266
|
* - `button-class`/`buttonClass`: undefined
|
|
3417
4267
|
* - `content-class`/`contentClass`: undefined
|
|
3418
|
-
* - `no-chevron`/`noChevron`:
|
|
3419
|
-
* - `animated`:
|
|
3420
|
-
* - `heading-level`/`headingLevel`:
|
|
4268
|
+
* - `no-chevron`/`noChevron`: Controls chevron visibility
|
|
4269
|
+
* - `animated`: Will animate the expansion/collapse
|
|
4270
|
+
* - `heading-level`/`headingLevel`: Wrap the toggle button in a heading element with the specified level. If headingLevel is not specified, the button will not be wrapped by a heading element.
|
|
3421
4271
|
* - `_hasTitle`: undefined
|
|
3422
4272
|
* - `_showChevronUp`: undefined
|
|
3423
4273
|
*
|
|
@@ -3626,7 +4476,7 @@ export type CustomElementsSolidJs = {
|
|
|
3626
4476
|
* Areas where markup can be added to the component.
|
|
3627
4477
|
*
|
|
3628
4478
|
* - `label`: Alternative to the `label` attribute should you need custom HTML.
|
|
3629
|
-
* - `help-text`: Alternative to the `help-text` attribute should you need custom HTML.
|
|
4479
|
+
* - `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.).
|
|
3630
4480
|
*/
|
|
3631
4481
|
"w-radio-group": Partial<
|
|
3632
4482
|
WarpRadioGroupProps &
|
|
@@ -3723,6 +4573,7 @@ export type CustomElementsSolidJs = {
|
|
|
3723
4573
|
* - `help-text`/`helpText`: Additional description to show below the fieldset
|
|
3724
4574
|
* - `invalid`: Sets the form fields and fieldset in an invalid state
|
|
3725
4575
|
* - `required`: Ensures a child slider thumb has a value before allowing the containing form to submit
|
|
4576
|
+
* - `optional`: Whether to show the optional indicator after the label.
|
|
3726
4577
|
* - `min`: The minimum allowed value in the range inputs
|
|
3727
4578
|
* - `max`: The maximum allowed value in the range inputs
|
|
3728
4579
|
* - `markers`: Pass a value similar to step to create visual markers at that interval
|
|
@@ -3734,6 +4585,7 @@ export type CustomElementsSolidJs = {
|
|
|
3734
4585
|
*
|
|
3735
4586
|
* Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the tooltip. (property only)
|
|
3736
4587
|
* - `labelFormatter`: Formatter for the min and max labels below the range. (property only)
|
|
4588
|
+
* - `_label`: undefined (property only) (readonly)
|
|
3737
4589
|
*
|
|
3738
4590
|
* ## Slots
|
|
3739
4591
|
*
|
|
@@ -3752,6 +4604,118 @@ export type CustomElementsSolidJs = {
|
|
|
3752
4604
|
BaseEvents
|
|
3753
4605
|
>;
|
|
3754
4606
|
|
|
4607
|
+
/**
|
|
4608
|
+
* An item to show in a `w-snackbar`.
|
|
4609
|
+
*
|
|
4610
|
+
* See the `create` function on `w-snackbar` for a convenience API which helps you make snackbar items.
|
|
4611
|
+
*
|
|
4612
|
+
* ## Attributes & Properties
|
|
4613
|
+
*
|
|
4614
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
4615
|
+
*
|
|
4616
|
+
* - `action-placement`/`actionPlacement`: The placement of the action and close buttons.
|
|
4617
|
+
* - `duration`: How long the message should stay in the document before removing itself.
|
|
4618
|
+
*
|
|
4619
|
+
* ## Slots
|
|
4620
|
+
*
|
|
4621
|
+
* Areas where markup can be added to the component.
|
|
4622
|
+
*
|
|
4623
|
+
* - `default`: the snackbar message.
|
|
4624
|
+
* - `icon`: icon preceeding the message.
|
|
4625
|
+
* - `action`: action following the message.
|
|
4626
|
+
*
|
|
4627
|
+
* ## Methods
|
|
4628
|
+
*
|
|
4629
|
+
* Methods that can be called to access component functionality.
|
|
4630
|
+
*
|
|
4631
|
+
* - `close() => void`: Remove the snackbar item from the document.
|
|
4632
|
+
*
|
|
4633
|
+
* Moves focus to the last focused element outside of the snackbar item, if available.
|
|
4634
|
+
*
|
|
4635
|
+
* ## CSS Custom Properties
|
|
4636
|
+
*
|
|
4637
|
+
* CSS variables available for styling the component.
|
|
4638
|
+
*
|
|
4639
|
+
* - `--w-c-snackbar-item-radius`: undefined (default: `undefined`)
|
|
4640
|
+
* - `--w-c-snackbar-item-max-width`: undefined (default: `undefined`)
|
|
4641
|
+
* - `--w-c-snackbar-item-min-width`: undefined (default: `undefined`)
|
|
4642
|
+
* - `--w-c-snackbar-item-padding`: undefined (default: `undefined`)
|
|
4643
|
+
* - `--w-c-snackbar-item-bg`: undefined (default: `undefined`)
|
|
4644
|
+
* - `--w-c-snackbar-item-action-bg-active`: undefined (default: `undefined`)
|
|
4645
|
+
* - `--w-c-snackbar-item-action-bg-hover`: undefined (default: `undefined`)
|
|
4646
|
+
* - `--w-c-snackbar-item-color`: undefined (default: `undefined`)
|
|
4647
|
+
* - `--w-c-snackbar-item-action-color-active`: undefined (default: `undefined`)
|
|
4648
|
+
* - `--w-c-snackbar-item-action-color-hover`: undefined (default: `undefined`)
|
|
4649
|
+
* - `--w-c-snackbar-item-box-shadow`: undefined (default: `undefined`)
|
|
4650
|
+
*
|
|
4651
|
+
* ## CSS Parts
|
|
4652
|
+
*
|
|
4653
|
+
* Custom selectors for styling elements within the component.
|
|
4654
|
+
*
|
|
4655
|
+
* - `item`: the container wrapping the message, icon and actions.
|
|
4656
|
+
* - `icon`: the icon for the variant.
|
|
4657
|
+
* - `message`: the default slot, body of the snackbar item.
|
|
4658
|
+
* - `action`: close and action button.
|
|
4659
|
+
*/
|
|
4660
|
+
"w-snackbar-item": Partial<
|
|
4661
|
+
WarpSnackbarItemProps &
|
|
4662
|
+
WarpSnackbarItemSolidJsProps &
|
|
4663
|
+
BaseProps<WarpSnackbarItem> &
|
|
4664
|
+
BaseEvents
|
|
4665
|
+
>;
|
|
4666
|
+
|
|
4667
|
+
/**
|
|
4668
|
+
* A Snackbar shows brief user feedback messages that overlay content, with an optional action such as Undo.
|
|
4669
|
+
*
|
|
4670
|
+
* Include one `<w-snackbar></w-snackbar>` in the document `<body>`. Use the `create` function to create messages.
|
|
4671
|
+
*
|
|
4672
|
+
* ## Slots
|
|
4673
|
+
*
|
|
4674
|
+
* Areas where markup can be added to the component.
|
|
4675
|
+
*
|
|
4676
|
+
* - `default`: `w-snackbar-item` gets placed inside the default slot by the `create` function.
|
|
4677
|
+
*
|
|
4678
|
+
* ## Methods
|
|
4679
|
+
*
|
|
4680
|
+
* Methods that can be called to access component functionality.
|
|
4681
|
+
*
|
|
4682
|
+
* - `create(message: string, options: CreateSnackbarOptions = {}) => void`: Creates a snackbar item and immediately adds it to the snackbar.
|
|
4683
|
+
*
|
|
4684
|
+
* By default the snackbar item automatically closes after 4 seconds (`SnackbarDuration.Short`).
|
|
4685
|
+
*
|
|
4686
|
+
* If you include an `action` in the options the default `duration` is
|
|
4687
|
+
* set to 10 seconds (`SnackbarDuration.Long`) and can not be made shorter.
|
|
4688
|
+
*
|
|
4689
|
+
* A `duration` of 10 seconds or longer forces the close button to be visible.
|
|
4690
|
+
*
|
|
4691
|
+
* The default `variant` is `neutral` which does not have an icon.
|
|
4692
|
+
*
|
|
4693
|
+
* Set `duration` to `SnackbarDuration.Infinite` if you want a persistent message.
|
|
4694
|
+
*
|
|
4695
|
+
* ## CSS Custom Properties
|
|
4696
|
+
*
|
|
4697
|
+
* CSS variables available for styling the component.
|
|
4698
|
+
*
|
|
4699
|
+
* - `--w-c-snackbar-container-gap`: undefined (default: `undefined`)
|
|
4700
|
+
* - `--w-c-snackbar-position-bottom`: undefined (default: `undefined`)
|
|
4701
|
+
* - `--w-c-snackbar-position-left`: undefined (default: `undefined`)
|
|
4702
|
+
* - `--w-c-snackbar-position-right`: undefined (default: `undefined`)
|
|
4703
|
+
* - `--w-c-snackbar-position-top`: undefined (default: `undefined`)
|
|
4704
|
+
* - `--w-c-snackbar-z-index`: undefined (default: `undefined`)
|
|
4705
|
+
*
|
|
4706
|
+
* ## CSS Parts
|
|
4707
|
+
*
|
|
4708
|
+
* Custom selectors for styling elements within the component.
|
|
4709
|
+
*
|
|
4710
|
+
* - `container`: the live region that positions messages on the screen.
|
|
4711
|
+
*/
|
|
4712
|
+
"w-snackbar": Partial<
|
|
4713
|
+
WarpSnackbarProps &
|
|
4714
|
+
WarpSnackbarSolidJsProps &
|
|
4715
|
+
BaseProps<WarpSnackbar> &
|
|
4716
|
+
BaseEvents
|
|
4717
|
+
>;
|
|
4718
|
+
|
|
3755
4719
|
/**
|
|
3756
4720
|
* Individual step component that shows a single step in a process
|
|
3757
4721
|
*
|
|
@@ -3933,11 +4897,46 @@ export type CustomElementsSolidJs = {
|
|
|
3933
4897
|
>;
|
|
3934
4898
|
};
|
|
3935
4899
|
|
|
3936
|
-
export type CustomCssProperties = {
|
|
4900
|
+
export type CustomCssProperties = {
|
|
4901
|
+
/** */
|
|
4902
|
+
"--w-c-snackbar-item-radius"?: string;
|
|
4903
|
+
/** */
|
|
4904
|
+
"--w-c-snackbar-item-max-width"?: string;
|
|
4905
|
+
/** */
|
|
4906
|
+
"--w-c-snackbar-item-min-width"?: string;
|
|
4907
|
+
/** */
|
|
4908
|
+
"--w-c-snackbar-item-padding"?: string;
|
|
4909
|
+
/** */
|
|
4910
|
+
"--w-c-snackbar-item-bg"?: string;
|
|
4911
|
+
/** */
|
|
4912
|
+
"--w-c-snackbar-item-action-bg-active"?: string;
|
|
4913
|
+
/** */
|
|
4914
|
+
"--w-c-snackbar-item-action-bg-hover"?: string;
|
|
4915
|
+
/** */
|
|
4916
|
+
"--w-c-snackbar-item-color"?: string;
|
|
4917
|
+
/** */
|
|
4918
|
+
"--w-c-snackbar-item-action-color-active"?: string;
|
|
4919
|
+
/** */
|
|
4920
|
+
"--w-c-snackbar-item-action-color-hover"?: string;
|
|
4921
|
+
/** */
|
|
4922
|
+
"--w-c-snackbar-item-box-shadow"?: string;
|
|
4923
|
+
/** */
|
|
4924
|
+
"--w-c-snackbar-container-gap"?: string;
|
|
4925
|
+
/** */
|
|
4926
|
+
"--w-c-snackbar-position-bottom"?: string;
|
|
4927
|
+
/** */
|
|
4928
|
+
"--w-c-snackbar-position-left"?: string;
|
|
4929
|
+
/** */
|
|
4930
|
+
"--w-c-snackbar-position-right"?: string;
|
|
4931
|
+
/** */
|
|
4932
|
+
"--w-c-snackbar-position-top"?: string;
|
|
4933
|
+
/** */
|
|
4934
|
+
"--w-c-snackbar-z-index"?: string;
|
|
4935
|
+
};
|
|
3937
4936
|
|
|
3938
4937
|
declare module "react" {
|
|
3939
4938
|
namespace JSX {
|
|
3940
|
-
interface IntrinsicElements extends
|
|
4939
|
+
interface IntrinsicElements extends ReactCustomElements {}
|
|
3941
4940
|
}
|
|
3942
4941
|
export interface CSSProperties extends CustomCssProperties {}
|
|
3943
4942
|
}
|