@warp-ds/elements 2.4.0 → 2.5.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js.map +2 -2
- package/dist/custom-elements.json +3333 -412
- package/dist/index.d.ts +3504 -849
- package/dist/packages/affix/{index.js → affix.js} +1 -1
- package/dist/packages/affix/{index.js.map → affix.js.map} +1 -1
- package/dist/packages/affix/affix.react.stories.d.ts +1 -1
- package/dist/packages/affix/affix.stories.d.ts +2 -2
- package/dist/packages/affix/affix.stories.js +1 -1
- package/dist/packages/affix/affix.test.d.ts +1 -1
- package/dist/packages/affix/affix.test.js +1 -1
- package/dist/packages/affix/react.d.ts +1 -1
- package/dist/packages/alert/{index.js → alert.js} +1 -1
- package/dist/packages/alert/{index.js.map → alert.js.map} +1 -1
- package/dist/packages/alert/alert.react.stories.d.ts +1 -1
- package/dist/packages/alert/alert.stories.d.ts +2 -2
- package/dist/packages/alert/alert.stories.js +1 -1
- package/dist/packages/alert/alert.test.d.ts +1 -1
- package/dist/packages/alert/alert.test.js +1 -1
- package/dist/packages/alert/react.d.ts +1 -1
- package/dist/packages/alert/react.js +1 -1
- package/dist/packages/attention/{index.d.ts → attention.d.ts} +1 -1
- package/dist/packages/attention/{index.js → attention.js} +18 -18
- package/dist/packages/attention/attention.js.map +7 -0
- package/dist/packages/attention/attention.react.stories.d.ts +1 -1
- package/dist/packages/attention/attention.stories.d.ts +3 -3
- package/dist/packages/attention/attention.stories.js +2 -2
- package/dist/packages/attention/attention.test.d.ts +1 -1
- package/dist/packages/attention/attention.test.js +1 -1
- package/dist/packages/attention/react.d.ts +1 -1
- package/dist/packages/attention/react.js +1 -1
- package/dist/packages/badge/{index.js → badge.js} +1 -1
- package/dist/packages/badge/{index.js.map → badge.js.map} +1 -1
- package/dist/packages/badge/badge.react.stories.d.ts +3 -3
- package/dist/packages/badge/badge.stories.d.ts +2 -2
- package/dist/packages/badge/badge.stories.js +1 -1
- package/dist/packages/badge/badge.test.d.ts +1 -1
- package/dist/packages/badge/badge.test.js +1 -1
- package/dist/packages/badge/react.d.ts +1 -1
- package/dist/packages/badge/react.js +1 -1
- package/dist/packages/box/{index.js → box.js} +1 -1
- package/dist/packages/box/{index.js.map → box.js.map} +1 -1
- package/dist/packages/box/box.react.stories.d.ts +3 -3
- package/dist/packages/box/box.stories.d.ts +2 -2
- package/dist/packages/box/box.stories.js +1 -1
- package/dist/packages/box/box.test.d.ts +1 -1
- package/dist/packages/box/box.test.js +1 -1
- package/dist/packages/box/react.d.ts +1 -1
- package/dist/packages/box/react.js +1 -1
- package/dist/packages/box/slot.test.d.ts +1 -1
- package/dist/packages/box/slot.test.js +1 -1
- package/dist/packages/breadcrumbs/{index.js → breadcrumbs.js} +10 -10
- package/dist/packages/breadcrumbs/breadcrumbs.js.map +7 -0
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +3 -3
- package/dist/packages/breadcrumbs/breadcrumbs.stories.d.ts +2 -2
- package/dist/packages/breadcrumbs/breadcrumbs.stories.js +1 -1
- package/dist/packages/breadcrumbs/breadcrumbs.test.d.ts +1 -1
- package/dist/packages/breadcrumbs/breadcrumbs.test.js +1 -1
- package/dist/packages/breadcrumbs/react.d.ts +1 -1
- package/dist/packages/breadcrumbs/react.js +1 -1
- package/dist/packages/button/{index.d.ts → button.d.ts} +1 -1
- package/dist/packages/button/{index.js → button.js} +12 -12
- package/dist/packages/button/button.js.map +7 -0
- package/dist/packages/button/button.react.stories.d.ts +3 -3
- package/dist/packages/button/button.stories.d.ts +2 -2
- package/dist/packages/button/button.stories.js +1 -1
- package/dist/packages/button/button.test.d.ts +1 -1
- package/dist/packages/button/button.test.js +1 -1
- package/dist/packages/button/react.d.ts +1 -1
- package/dist/packages/button/react.js +1 -1
- package/dist/packages/card/{index.js → card.js} +9 -9
- package/dist/packages/card/card.js.map +7 -0
- package/dist/packages/card/card.react.stories.d.ts +3 -3
- package/dist/packages/card/card.stories.d.ts +2 -2
- package/dist/packages/card/card.stories.js +1 -1
- package/dist/packages/card/card.test.d.ts +1 -1
- package/dist/packages/card/card.test.js +1 -1
- package/dist/packages/card/react.d.ts +1 -1
- package/dist/packages/card/react.js +1 -1
- package/dist/packages/checkbox/checkbox.js +2572 -201
- package/dist/packages/checkbox/checkbox.js.map +7 -0
- package/dist/packages/checkbox/checkbox.stories.d.ts +2 -1
- package/dist/packages/checkbox/checkbox.stories.js +2 -1
- package/dist/packages/checkbox/react.d.ts +0 -2
- package/dist/packages/checkbox/react.js +0 -5
- package/dist/packages/checkbox-group/checkbox-group.js +7 -0
- package/dist/packages/checkbox-group/checkbox-group.js.map +7 -0
- package/dist/packages/checkbox-group/react.d.ts +2 -0
- package/dist/packages/checkbox-group/react.js +11 -0
- package/dist/packages/combobox/{index.js → combobox.js} +14 -14
- package/dist/packages/combobox/combobox.js.map +7 -0
- package/dist/packages/combobox/combobox.react.stories.d.ts +4 -4
- package/dist/packages/combobox/combobox.stories.d.ts +3 -3
- package/dist/packages/combobox/combobox.stories.js +2 -2
- package/dist/packages/combobox/combobox.test.d.ts +2 -2
- package/dist/packages/combobox/combobox.test.js +2 -2
- package/dist/packages/combobox/react.d.ts +1 -1
- package/dist/packages/combobox/react.js +1 -1
- package/dist/packages/datepicker/DatePicker.test.d.ts +2 -2
- package/dist/packages/datepicker/DatePicker.test.js +2 -2
- package/dist/packages/datepicker/datepicker.js +15 -15
- package/dist/packages/datepicker/datepicker.js.map +3 -3
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +2 -2
- package/dist/packages/datepicker/datepicker.stories.d.ts +3 -3
- package/dist/packages/datepicker/datepicker.stories.js +2 -2
- package/dist/packages/datepicker/datepicker.test.d.ts +2 -2
- package/dist/packages/datepicker/datepicker.test.js +2 -2
- package/dist/packages/datepicker/react.js +1 -1
- package/dist/packages/dead-toggle/dead-toggle.js +2547 -0
- package/dist/packages/dead-toggle/dead-toggle.js.map +7 -0
- package/dist/packages/dead-toggle/dead-toggle.react.stories.d.ts +15 -0
- package/dist/packages/{deadtoggle → dead-toggle}/dead-toggle.stories.d.ts +2 -2
- package/dist/packages/{deadtoggle → dead-toggle}/dead-toggle.stories.js +1 -1
- package/dist/packages/dead-toggle/dead-toggle.test.d.ts +1 -0
- package/dist/packages/{deadtoggle → dead-toggle}/dead-toggle.test.js +1 -1
- package/dist/packages/{deadtoggle → dead-toggle}/react.d.ts +1 -1
- package/dist/packages/expandable/{index.js → expandable.js} +1 -1
- package/dist/packages/expandable/{index.js.map → expandable.js.map} +1 -1
- package/dist/packages/expandable/expandable.react.stories.d.ts +3 -3
- package/dist/packages/expandable/expandable.stories.d.ts +2 -2
- package/dist/packages/expandable/expandable.stories.js +1 -1
- package/dist/packages/expandable/expandable.test.d.ts +1 -1
- package/dist/packages/expandable/expandable.test.js +1 -1
- package/dist/packages/expandable/react.d.ts +1 -1
- package/dist/packages/expandable/react.js +1 -1
- package/dist/packages/i18n.js +6 -2
- package/dist/packages/icon/icon.d.ts +27 -0
- package/dist/packages/icon/icon.js +101 -0
- package/dist/packages/icon/icon.react.stories.d.ts +28 -0
- package/dist/packages/icon/icon.react.stories.js +37 -0
- package/dist/packages/icon/icon.stories.d.ts +39 -0
- package/dist/packages/icon/icon.stories.js +43 -0
- package/dist/packages/icon/react.d.ts +2 -0
- package/dist/packages/icon/react.js +11 -0
- package/dist/packages/icon/style.js +27 -0
- package/dist/packages/link/{index.js → link.js} +3 -3
- package/dist/packages/link/link.js.map +7 -0
- package/dist/packages/link/link.react.stories.d.ts +3 -3
- package/dist/packages/link/link.stories.d.ts +2 -2
- package/dist/packages/link/link.stories.js +1 -1
- package/dist/packages/link/link.test.d.ts +1 -1
- package/dist/packages/link/link.test.js +1 -1
- package/dist/packages/link/react.d.ts +1 -1
- package/dist/packages/link/react.js +1 -1
- package/dist/packages/link/styles.js +2 -2
- package/dist/packages/modal/index.d.ts +6 -3
- package/dist/packages/modal/index.js +10 -2717
- package/dist/packages/modal/{modal-main.js → modal.js} +1 -1
- package/dist/packages/modal/{modal-main.js.map → modal.js.map} +1 -1
- package/dist/packages/modal/modal.react.stories.d.ts +1 -1
- package/dist/packages/modal/modal.stories.d.ts +6 -3
- package/dist/packages/modal/modal.stories.js +3 -1
- package/dist/packages/modal/react.d.ts +3 -6
- package/dist/packages/modal/react.js +4 -15
- package/dist/packages/{modal → modal-footer}/modal-footer.d.ts +2 -2
- package/dist/packages/{modal → modal-footer}/modal-footer.js +4 -4
- package/dist/packages/modal-footer/modal-footer.js.map +7 -0
- package/dist/packages/modal-footer/react.d.ts +2 -0
- package/dist/packages/modal-footer/react.js +11 -0
- package/dist/packages/{modal → modal-header}/modal-header.d.ts +1 -1
- package/dist/packages/{modal → modal-header}/modal-header.js +7 -7
- package/dist/packages/modal-header/modal-header.js.map +7 -0
- package/dist/packages/modal-header/react.d.ts +5 -0
- package/dist/packages/modal-header/react.js +15 -0
- package/dist/packages/page-indicator/locales/da/messages.mjs +1 -0
- package/dist/packages/page-indicator/locales/en/messages.mjs +1 -0
- package/dist/packages/page-indicator/locales/fi/messages.mjs +1 -0
- package/dist/packages/page-indicator/locales/nb/messages.mjs +1 -0
- package/dist/packages/page-indicator/locales/sv/messages.mjs +1 -0
- package/dist/packages/page-indicator/page-indicator.d.ts +26 -0
- package/dist/packages/page-indicator/page-indicator.js +41 -0
- package/dist/packages/page-indicator/page-indicator.js.map +7 -0
- package/dist/packages/{pageindicator/pageindicator.react.stories.d.ts → page-indicator/page-indicator.react.stories.d.ts} +3 -3
- package/dist/packages/{pageindicator/pageindicator.stories.d.ts → page-indicator/page-indicator.stories.d.ts} +1 -1
- package/dist/packages/page-indicator/page-indicator.stories.js +87 -0
- package/dist/packages/page-indicator/page-indicator.test.d.ts +1 -0
- package/dist/packages/page-indicator/page-indicator.test.js +118 -0
- package/dist/packages/{pageindicator → page-indicator}/react.d.ts +1 -1
- package/dist/packages/{pageindicator → page-indicator}/react.js +2 -2
- package/dist/packages/{pageindicator → page-indicator}/style.js +4 -4
- package/dist/packages/pagination/pagination.js +2500 -0
- package/dist/packages/pagination/pagination.js.map +7 -0
- package/dist/packages/pagination/pagination.react.stories.d.ts +4 -4
- package/dist/packages/pagination/pagination.stories.d.ts +2 -2
- package/dist/packages/pagination/pagination.stories.js +1 -1
- package/dist/packages/pagination/pagination.test.d.ts +1 -1
- package/dist/packages/pagination/pagination.test.js +1 -1
- package/dist/packages/pagination/react.d.ts +1 -1
- package/dist/packages/pagination/react.js +1 -1
- package/dist/packages/pill/{index.js → pill.js} +9 -9
- package/dist/packages/pill/pill.js.map +7 -0
- package/dist/packages/pill/pill.react.stories.d.ts +4 -4
- package/dist/packages/pill/pill.stories.d.ts +2 -2
- package/dist/packages/pill/pill.stories.js +1 -1
- package/dist/packages/pill/pill.test.d.ts +1 -1
- package/dist/packages/pill/pill.test.js +1 -1
- package/dist/packages/pill/react.d.ts +1 -1
- package/dist/packages/pill/react.js +1 -1
- package/dist/packages/radio/radio.js +2556 -109
- package/dist/packages/radio/radio.js.map +7 -0
- package/dist/packages/radio/radio.stories.d.ts +3 -3
- package/dist/packages/radio/radio.stories.js +2 -2
- package/dist/packages/radio/react.d.ts +0 -7
- package/dist/packages/radio/react.js +1 -12
- package/dist/packages/{radio → radio-group}/radio-group.d.ts +4 -4
- package/dist/packages/radio-group/radio-group.js +2648 -0
- package/dist/packages/radio-group/radio-group.js.map +7 -0
- package/dist/packages/radio-group/react.d.ts +7 -0
- package/dist/packages/radio-group/react.js +17 -0
- package/dist/packages/select/react.d.ts +1 -1
- package/dist/packages/select/react.js +1 -1
- package/dist/packages/select/{index.js → select.js} +16 -16
- package/dist/packages/select/select.js.map +7 -0
- package/dist/packages/select/select.react.stories.d.ts +4 -4
- package/dist/packages/select/select.react.stories.js +1 -1
- package/dist/packages/select/select.stories.d.ts +2 -2
- package/dist/packages/select/select.stories.js +1 -1
- package/dist/packages/select/select.test.d.ts +1 -1
- package/dist/packages/select/select.test.js +1 -1
- package/dist/packages/slider/index.d.ts +1 -1
- package/dist/packages/slider/index.js +1 -1
- package/dist/packages/slider/react.d.ts +1 -6
- package/dist/packages/slider/react.js +3 -10
- package/dist/packages/slider/slider.js +2603 -272
- package/dist/packages/{toast/toast-container.js.map → slider/slider.js.map} +4 -4
- package/dist/packages/slider/slider.stories.d.ts +5 -4
- package/dist/packages/slider/slider.stories.js +5 -4
- package/dist/packages/slider/slider.test.d.ts +5 -4
- package/dist/packages/slider/slider.test.js +5 -4
- package/dist/packages/slider-thumb/react.d.ts +6 -0
- package/dist/packages/slider-thumb/react.js +15 -0
- package/dist/packages/{slider → slider-thumb}/slider-thumb.d.ts +1 -1
- package/dist/packages/slider-thumb/slider-thumb.js +2748 -0
- package/dist/packages/slider-thumb/slider-thumb.js.map +7 -0
- package/dist/packages/step/locales/da/messages.d.mts +1 -0
- package/dist/packages/step/locales/en/messages.d.mts +1 -0
- package/dist/packages/step/locales/fi/messages.d.mts +1 -0
- package/dist/packages/step/locales/nb/messages.d.mts +1 -0
- package/dist/packages/step/locales/sv/messages.d.mts +1 -0
- package/dist/packages/step/react.d.ts +2 -0
- package/dist/packages/step/react.js +11 -0
- package/dist/packages/step/step.d.ts +22 -0
- package/dist/packages/step/step.js +2461 -0
- package/dist/packages/{modal/index.js.map → step/step.js.map} +4 -4
- package/dist/packages/step-indicator/index.d.ts +2 -0
- package/dist/packages/step-indicator/index.js +2 -0
- package/dist/packages/step-indicator/react.d.ts +3 -0
- package/dist/packages/{stepindicator → step-indicator}/react.js +3 -6
- package/dist/packages/step-indicator/step-indicator.d.ts +14 -0
- package/dist/packages/step-indicator/step-indicator.js +2445 -0
- package/dist/packages/step-indicator/step-indicator.js.map +7 -0
- package/dist/packages/{stepindicator → step-indicator}/stepindicator.react.stories.d.ts +1 -1
- package/dist/packages/{stepindicator → step-indicator}/stepindicator.stories.d.ts +2 -1
- package/dist/packages/{stepindicator → step-indicator}/stepindicator.stories.js +2 -1
- package/dist/packages/step-indicator/styles.d.ts +1 -0
- package/dist/packages/switch/react.d.ts +1 -1
- package/dist/packages/switch/react.js +1 -1
- package/dist/packages/switch/{index.js → switch.js} +1 -1
- package/dist/packages/switch/{index.js.map → switch.js.map} +1 -1
- package/dist/packages/switch/switch.react.stories.d.ts +1 -1
- package/dist/packages/switch/switch.stories.d.ts +1 -1
- package/dist/packages/switch/switch.stories.js +1 -1
- package/dist/packages/switch/switch.test.d.ts +1 -1
- package/dist/packages/switch/switch.test.js +2 -2
- package/dist/packages/tab/react.d.ts +7 -0
- package/dist/packages/tab/react.js +17 -0
- package/dist/packages/{tabs → tab}/tab.d.ts +2 -5
- package/dist/packages/tab/tab.js +2464 -0
- package/dist/packages/tab/tab.js.map +7 -0
- package/dist/packages/tab-panel/react.d.ts +2 -0
- package/dist/packages/tab-panel/react.js +11 -0
- package/dist/packages/{tabs → tab-panel}/tab-panel.d.ts +3 -3
- package/dist/packages/tab-panel/tab-panel.js +2441 -0
- package/dist/packages/tab-panel/tab-panel.js.map +7 -0
- package/dist/packages/tabs/index.d.ts +2 -3
- package/dist/packages/tabs/index.js +3 -2
- package/dist/packages/tabs/react.d.ts +3 -8
- package/dist/packages/tabs/react.js +4 -17
- package/dist/packages/tabs/tabs.d.ts +2 -5
- package/dist/packages/tabs/tabs.js +2447 -252
- package/dist/packages/tabs/tabs.js.map +7 -0
- package/dist/packages/tabs/tabs.react.stories.d.ts +14 -1
- package/dist/packages/tabs/tabs.react.stories.js +55 -35
- package/dist/packages/tabs/tabs.stories.d.ts +5 -4
- package/dist/packages/tabs/tabs.stories.js +89 -65
- package/dist/packages/textarea/react.d.ts +1 -1
- package/dist/packages/textarea/react.js +1 -1
- package/dist/packages/textarea/textarea.js +2465 -210
- package/dist/packages/{combobox/index.js.map → textarea/textarea.js.map} +4 -4
- package/dist/packages/textarea/textarea.react.stories.d.ts +2 -2
- package/dist/packages/textarea/textarea.stories.d.ts +2 -2
- package/dist/packages/textarea/textarea.stories.js +1 -1
- package/dist/packages/textarea/textarea.test.d.ts +1 -1
- package/dist/packages/textarea/textarea.test.js +1 -1
- package/dist/packages/textfield/react.d.ts +1 -1
- package/dist/packages/textfield/react.js +1 -1
- package/dist/packages/textfield/{index.js → textfield.js} +1 -1
- package/dist/packages/textfield/{index.js.map → textfield.js.map} +1 -1
- package/dist/packages/textfield/textfield.react.stories.d.ts +4 -4
- package/dist/packages/textfield/textfield.stories.d.ts +2 -2
- package/dist/packages/textfield/textfield.stories.js +1 -1
- package/dist/packages/textfield/textfield.test.d.ts +2 -2
- package/dist/packages/textfield/textfield.test.js +2 -2
- package/dist/packages/toast/index.d.ts +5 -3
- package/dist/packages/toast/index.js +7 -2483
- package/dist/packages/toast/toast.js +8 -8
- package/dist/packages/toast/toast.js.map +3 -3
- package/dist/packages/toast/toast.stories.d.ts +4 -3
- package/dist/packages/toast/toast.stories.js +3 -2
- package/dist/packages/{toast → toast-container}/toast-container.d.ts +1 -1
- package/dist/packages/toast-container/toast-container.js.map +7 -0
- package/dist/web-types.json +822 -38
- package/package.json +139 -38
- package/dist/packages/attention/index.js.map +0 -7
- package/dist/packages/breadcrumbs/index.js.map +0 -7
- package/dist/packages/button/index.js.map +0 -7
- package/dist/packages/card/index.js.map +0 -7
- package/dist/packages/checkbox/checkbox-group.js +0 -15
- package/dist/packages/checkbox/index.d.ts +0 -2
- package/dist/packages/checkbox/index.js +0 -2
- package/dist/packages/datepicker/index.d.ts +0 -1
- package/dist/packages/datepicker/index.js +0 -2785
- package/dist/packages/datepicker/index.js.map +0 -7
- package/dist/packages/deadtoggle/dead-toggle.react.stories.d.ts +0 -15
- package/dist/packages/deadtoggle/dead-toggle.test.d.ts +0 -1
- package/dist/packages/deadtoggle/index.js +0 -51
- package/dist/packages/link/index.js.map +0 -7
- package/dist/packages/modal/modal-footer.js.map +0 -7
- package/dist/packages/modal/modal-header.js.map +0 -7
- package/dist/packages/pageindicator/index.d.ts +0 -10
- package/dist/packages/pageindicator/index.js +0 -48
- package/dist/packages/pageindicator/pageindicator.stories.js +0 -71
- package/dist/packages/pagination/index.js +0 -199
- package/dist/packages/pill/index.js.map +0 -7
- package/dist/packages/radio/index.d.ts +0 -2
- package/dist/packages/radio/index.js +0 -2
- package/dist/packages/radio/radio-group.js +0 -342
- package/dist/packages/select/index.js.map +0 -7
- package/dist/packages/slider/slider-thumb.js +0 -501
- package/dist/packages/stepindicator/index.d.ts +0 -37
- package/dist/packages/stepindicator/index.js +0 -195
- package/dist/packages/stepindicator/react.d.ts +0 -3
- package/dist/packages/tabs/tab-panel.js +0 -51
- package/dist/packages/tabs/tab.js +0 -104
- package/dist/packages/textarea/index.d.ts +0 -1
- package/dist/packages/textarea/index.js +0 -1
- package/dist/packages/toast/index.js.map +0 -7
- package/dist/packages/affix/{index.d.ts → affix.d.ts} +0 -0
- package/dist/packages/alert/{index.d.ts → alert.d.ts} +0 -0
- package/dist/packages/badge/{index.d.ts → badge.d.ts} +0 -0
- package/dist/packages/box/{index.d.ts → box.d.ts} +0 -0
- package/dist/packages/breadcrumbs/{index.d.ts → breadcrumbs.d.ts} +0 -0
- package/dist/packages/card/{index.d.ts → card.d.ts} +0 -0
- package/dist/packages/{checkbox → checkbox-group}/checkbox-group.d.ts +0 -0
- package/dist/packages/combobox/{index.d.ts → combobox.d.ts} +0 -0
- package/dist/packages/{deadtoggle/index.d.ts → dead-toggle/dead-toggle.d.ts} +0 -0
- package/dist/packages/{deadtoggle → dead-toggle}/dead-toggle.react.stories.js +0 -0
- package/dist/packages/{deadtoggle → dead-toggle}/react.js +1 -1
- /package/dist/packages/expandable/{index.d.ts → expandable.d.ts} +0 -0
- /package/dist/packages/{pageindicator → icon}/style.d.ts +0 -0
- /package/dist/packages/link/{index.d.ts → link.d.ts} +0 -0
- /package/dist/packages/modal/{modal-main.d.ts → modal.d.ts} +0 -0
- /package/dist/packages/{stepindicator → page-indicator}/locales/da/messages.d.mts +0 -0
- /package/dist/packages/{stepindicator → page-indicator}/locales/en/messages.d.mts +0 -0
- /package/dist/packages/{stepindicator → page-indicator}/locales/fi/messages.d.mts +0 -0
- /package/dist/packages/{stepindicator → page-indicator}/locales/nb/messages.d.mts +0 -0
- /package/dist/packages/{stepindicator → page-indicator}/locales/sv/messages.d.mts +0 -0
- /package/dist/packages/{pageindicator/pageindicator.react.stories.js → page-indicator/page-indicator.react.stories.js} +0 -0
- /package/dist/packages/{radio/radio-group-styles.d.ts → page-indicator/style.d.ts} +0 -0
- /package/dist/packages/pagination/{index.d.ts → pagination.d.ts} +0 -0
- /package/dist/packages/pill/{index.d.ts → pill.d.ts} +0 -0
- /package/dist/packages/{stepindicator/styles.d.ts → radio-group/radio-group-styles.d.ts} +0 -0
- /package/dist/packages/{radio → radio-group}/radio-group-styles.js +0 -0
- /package/dist/packages/select/{index.d.ts → select.d.ts} +0 -0
- /package/dist/packages/{slider → slider-thumb}/SliderThumb.d.ts +0 -0
- /package/dist/packages/{slider → slider-thumb}/SliderThumb.js +0 -0
- /package/dist/packages/{slider → slider-thumb}/oddbird-css-anchor-positioning.d.ts +0 -0
- /package/dist/packages/{slider → slider-thumb}/oddbird-css-anchor-positioning.js +0 -0
- /package/dist/packages/{slider → slider-thumb}/styles/w-slider-thumb.styles.d.ts +0 -0
- /package/dist/packages/{slider → slider-thumb}/styles/w-slider-thumb.styles.js +0 -0
- /package/dist/packages/{stepindicator → step}/locales/da/messages.mjs +0 -0
- /package/dist/packages/{stepindicator → step}/locales/en/messages.mjs +0 -0
- /package/dist/packages/{stepindicator → step}/locales/fi/messages.mjs +0 -0
- /package/dist/packages/{stepindicator → step}/locales/nb/messages.mjs +0 -0
- /package/dist/packages/{stepindicator → step}/locales/sv/messages.mjs +0 -0
- /package/dist/packages/{stepindicator → step-indicator}/stepindicator.react.stories.js +0 -0
- /package/dist/packages/{stepindicator → step-indicator}/styles.js +0 -0
- /package/dist/packages/switch/{index.d.ts → switch.d.ts} +0 -0
- /package/dist/packages/textfield/{index.d.ts → textfield.d.ts} +0 -0
- /package/dist/packages/{toast → toast-container}/toast-container.js +0 -0
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { html } from 'lit';
|
|
8
|
-
import { property, query, state } from 'lit/decorators.js';
|
|
9
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
10
|
-
import { BaseFormAssociatedElement } from './form-associated-element';
|
|
11
|
-
import { uniqueId } from './math';
|
|
12
|
-
import './radio';
|
|
13
|
-
// eslint-disable-next-line
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
import { styles } from './radio-group-styles';
|
|
16
|
-
import { RequiredValidator } from './required-validator';
|
|
17
|
-
import { HasSlotController } from './slot';
|
|
18
|
-
/**
|
|
19
|
-
* @slot label - Alternative to the `label` attribute should you need custom HTML.
|
|
20
|
-
*/
|
|
21
|
-
export class WRadioGroup extends BaseFormAssociatedElement {
|
|
22
|
-
static { this.css = [styles]; }
|
|
23
|
-
static get validators() {
|
|
24
|
-
const validators = [
|
|
25
|
-
RequiredValidator({
|
|
26
|
-
validationElement: Object.assign(document.createElement('input'), {
|
|
27
|
-
required: true,
|
|
28
|
-
type: 'radio',
|
|
29
|
-
// we need an id that's guaranteed to be unique; users will never see this
|
|
30
|
-
name: uniqueId('__w-radio'),
|
|
31
|
-
}),
|
|
32
|
-
}),
|
|
33
|
-
];
|
|
34
|
-
return [...super.validators, ...validators];
|
|
35
|
-
}
|
|
36
|
-
get value() {
|
|
37
|
-
if (this.valueHasChanged) {
|
|
38
|
-
return this._value;
|
|
39
|
-
}
|
|
40
|
-
return this._value ?? this.defaultValue;
|
|
41
|
-
}
|
|
42
|
-
/** The current value of the radio group, submitted as a name/value pair with form data. */
|
|
43
|
-
set value(val) {
|
|
44
|
-
if (typeof val === 'number')
|
|
45
|
-
val = String(val);
|
|
46
|
-
this.valueHasChanged = true;
|
|
47
|
-
this._value = val;
|
|
48
|
-
}
|
|
49
|
-
//
|
|
50
|
-
// We need this because if we don't have it, FormValidation yells at us that it's "not focusable".
|
|
51
|
-
// If we use `this.tabIndex = -1` we can't focus the radio inside.
|
|
52
|
-
//
|
|
53
|
-
static { this.shadowRootOptions = { ...BaseFormAssociatedElement.shadowRootOptions, delegatesFocus: true }; }
|
|
54
|
-
constructor() {
|
|
55
|
-
super();
|
|
56
|
-
this.hasSlotController = new HasSlotController(this, 'hint', 'label');
|
|
57
|
-
this.hasRadioButtons = false;
|
|
58
|
-
/**
|
|
59
|
-
* The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot
|
|
60
|
-
* instead.
|
|
61
|
-
*/
|
|
62
|
-
this.label = '';
|
|
63
|
-
/** The radio groups's hint. If you need to display HTML, use the `hint` slot instead. */
|
|
64
|
-
this.hint = '';
|
|
65
|
-
/** The name of the radio group, submitted as a name/value pair with form data. */
|
|
66
|
-
this.name = null;
|
|
67
|
-
/** Disables the radio group and all child radios. */
|
|
68
|
-
this.disabled = false;
|
|
69
|
-
/** The orientation in which to show radio items. */
|
|
70
|
-
this.orientation = 'vertical';
|
|
71
|
-
this._value = null;
|
|
72
|
-
/** The default value of the form control. Primarily used for resetting the form control. */
|
|
73
|
-
this.defaultValue = this.getAttribute('value') || null;
|
|
74
|
-
/** The radio group's size. This size will be applied to all child radios and radio buttons, except when explicitly overridden. */
|
|
75
|
-
this.size = 'medium';
|
|
76
|
-
/** Ensures a child radio is checked before allowing the containing form to submit. */
|
|
77
|
-
this.required = false;
|
|
78
|
-
/**
|
|
79
|
-
* Used for SSR. if true, will show slotted label on initial render.
|
|
80
|
-
*/
|
|
81
|
-
this.withLabel = false;
|
|
82
|
-
/**
|
|
83
|
-
* Used for SSR. if true, will show slotted hint on initial render.
|
|
84
|
-
*/
|
|
85
|
-
this.withHint = false;
|
|
86
|
-
this.handleRadioClick = (e) => {
|
|
87
|
-
const clickedRadio = e.target.closest('w-radio');
|
|
88
|
-
/* eslint-disable */
|
|
89
|
-
if (!clickedRadio || clickedRadio.disabled || clickedRadio.forceDisabled || this.disabled) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const oldValue = this.value;
|
|
93
|
-
this.value = clickedRadio.value;
|
|
94
|
-
clickedRadio.checked = true;
|
|
95
|
-
const radios = this.getAllRadios();
|
|
96
|
-
for (const radio of radios) {
|
|
97
|
-
if (clickedRadio === radio) {
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
radio.checked = false;
|
|
101
|
-
radio.setAttribute('tabindex', '-1');
|
|
102
|
-
}
|
|
103
|
-
if (this.value !== oldValue) {
|
|
104
|
-
this.updateComplete.then(() => {
|
|
105
|
-
this.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true }));
|
|
106
|
-
this.dispatchEvent(new Event('change', { bubbles: true, composed: true }));
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
this.addEventListener('keydown', this.handleKeyDown);
|
|
111
|
-
this.addEventListener('click', this.handleRadioClick);
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* We use the first available radio as the validationTarget similar to native HTML that shows the validation popup on
|
|
115
|
-
* the first radio element.
|
|
116
|
-
*/
|
|
117
|
-
get validationTarget() {
|
|
118
|
-
const radio = this.querySelector(':is(w-radio):not([disabled])');
|
|
119
|
-
if (!radio)
|
|
120
|
-
return undefined;
|
|
121
|
-
return radio;
|
|
122
|
-
}
|
|
123
|
-
updated(changedProperties) {
|
|
124
|
-
if (changedProperties.has('disabled') || changedProperties.has('value')) {
|
|
125
|
-
this.syncRadioElements();
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
formResetCallback(...args) {
|
|
129
|
-
this.value = this.defaultValue;
|
|
130
|
-
super.formResetCallback(...args);
|
|
131
|
-
this.syncRadioElements();
|
|
132
|
-
}
|
|
133
|
-
getAllRadios() {
|
|
134
|
-
return [...this.querySelectorAll('w-radio')];
|
|
135
|
-
}
|
|
136
|
-
handleLabelClick() {
|
|
137
|
-
this.focus();
|
|
138
|
-
}
|
|
139
|
-
async syncRadioElements() {
|
|
140
|
-
const radios = this.getAllRadios();
|
|
141
|
-
let hasRadioButtons = false;
|
|
142
|
-
// Add data attributes to support styling
|
|
143
|
-
radios.forEach((radio, index) => {
|
|
144
|
-
if (radio.appearance === 'button')
|
|
145
|
-
hasRadioButtons = true;
|
|
146
|
-
radio.setAttribute('size', this.size);
|
|
147
|
-
radio.toggleAttribute('data-w-radio-horizontal', this.orientation !== 'vertical');
|
|
148
|
-
radio.toggleAttribute('data-w-radio-vertical', this.orientation === 'vertical');
|
|
149
|
-
radio.toggleAttribute('data-w-radio-first', index === 0);
|
|
150
|
-
radio.toggleAttribute('data-w-radio-inner', index !== 0 && index !== radios.length - 1);
|
|
151
|
-
radio.toggleAttribute('data-w-radio-last', index === radios.length - 1);
|
|
152
|
-
// Set forceDisabled state based on radio group's disabled state
|
|
153
|
-
radio.forceDisabled = this.disabled;
|
|
154
|
-
});
|
|
155
|
-
// If at least one radio button exists, we assume it's a radio button group
|
|
156
|
-
this.hasRadioButtons = hasRadioButtons;
|
|
157
|
-
await Promise.all(radios.map(async (radio) => {
|
|
158
|
-
await radio.updateComplete;
|
|
159
|
-
if (!radio.disabled && radio.value === this.value) {
|
|
160
|
-
radio.checked = true;
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
radio.checked = false;
|
|
164
|
-
}
|
|
165
|
-
}));
|
|
166
|
-
// Manage tabIndex based on disabled state and checked status
|
|
167
|
-
if (this.disabled) {
|
|
168
|
-
// If radio group is disabled, all radios should not be tabbable
|
|
169
|
-
radios.forEach((radio) => {
|
|
170
|
-
radio.tabIndex = -1;
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
// Normal tabbing behavior
|
|
175
|
-
const enabledRadios = radios.filter((radio) => !radio.disabled);
|
|
176
|
-
const checkedRadio = enabledRadios.find((radio) => radio.checked);
|
|
177
|
-
if (enabledRadios.length > 0) {
|
|
178
|
-
if (checkedRadio) {
|
|
179
|
-
// If there's a checked radio, it should be tabbable
|
|
180
|
-
enabledRadios.forEach((radio) => {
|
|
181
|
-
radio.tabIndex = radio.checked ? 0 : -1;
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
// If no radio is checked, first enabled radio should be tabbable
|
|
186
|
-
enabledRadios.forEach((radio, index) => {
|
|
187
|
-
radio.tabIndex = index === 0 ? 0 : -1;
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
// Disabled radios should never be tabbable
|
|
192
|
-
radios
|
|
193
|
-
.filter((radio) => radio.disabled)
|
|
194
|
-
.forEach((radio) => {
|
|
195
|
-
radio.tabIndex = -1;
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
handleKeyDown(event) {
|
|
200
|
-
if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', ' '].includes(event.key) || this.disabled) {
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
const radios = this.getAllRadios().filter((radio) => !radio.disabled);
|
|
204
|
-
if (radios.length <= 0) {
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
event.preventDefault();
|
|
208
|
-
const oldValue = this.value;
|
|
209
|
-
const checkedRadio = radios.find((radio) => radio.checked) ?? radios[0];
|
|
210
|
-
const incr = event.key === ' ' ? 0 : ['ArrowUp', 'ArrowLeft'].includes(event.key) ? -1 : 1;
|
|
211
|
-
let index = radios.indexOf(checkedRadio) + incr;
|
|
212
|
-
if (!index)
|
|
213
|
-
index = 0;
|
|
214
|
-
if (index < 0) {
|
|
215
|
-
index = radios.length - 1;
|
|
216
|
-
}
|
|
217
|
-
if (index > radios.length - 1) {
|
|
218
|
-
index = 0;
|
|
219
|
-
}
|
|
220
|
-
const hasRadioButtons = radios.some((radio) => radio.tagName.toLowerCase() === 'w-radio-button');
|
|
221
|
-
this.getAllRadios().forEach((radio) => {
|
|
222
|
-
radio.checked = false;
|
|
223
|
-
if (!hasRadioButtons) {
|
|
224
|
-
radio.setAttribute('tabindex', '-1');
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
this.value = radios[index].value;
|
|
228
|
-
radios[index].checked = true;
|
|
229
|
-
if (!hasRadioButtons) {
|
|
230
|
-
radios[index].setAttribute('tabindex', '0');
|
|
231
|
-
radios[index].focus();
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
234
|
-
radios[index].shadowRoot?.querySelector('button')?.focus();
|
|
235
|
-
}
|
|
236
|
-
if (this.value !== oldValue) {
|
|
237
|
-
this.updateComplete.then(() => {
|
|
238
|
-
this.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true }));
|
|
239
|
-
this.dispatchEvent(new Event('change', { bubbles: true, composed: true }));
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
event.preventDefault();
|
|
243
|
-
}
|
|
244
|
-
/** Sets focus on the radio group. */
|
|
245
|
-
focus(options) {
|
|
246
|
-
if (this.disabled)
|
|
247
|
-
return;
|
|
248
|
-
const radios = this.getAllRadios();
|
|
249
|
-
const checked = radios.find((radio) => radio.checked);
|
|
250
|
-
const firstEnabledRadio = radios.find((radio) => !radio.disabled);
|
|
251
|
-
const radioToFocus = checked || firstEnabledRadio;
|
|
252
|
-
// Call focus for the checked radio. If no radio is checked, focus the first one that isn't disabled.
|
|
253
|
-
if (radioToFocus) {
|
|
254
|
-
radioToFocus.focus(options);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
render() {
|
|
258
|
-
const hasLabelSlot = this.hasUpdated ? this.hasSlotController.test('label') : this.withLabel;
|
|
259
|
-
const hasHintSlot = this.hasUpdated ? this.hasSlotController.test('hint') : this.withHint;
|
|
260
|
-
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
261
|
-
const hasHint = this.hint ? true : !!hasHintSlot;
|
|
262
|
-
return html `
|
|
263
|
-
<fieldset
|
|
264
|
-
part="form-control"
|
|
265
|
-
class=${classMap({
|
|
266
|
-
'form-control': true,
|
|
267
|
-
'form-control-radio-group': true,
|
|
268
|
-
'form-control-has-label': hasLabel,
|
|
269
|
-
'has-radio-buttons': this.hasRadioButtons,
|
|
270
|
-
})}
|
|
271
|
-
role="radiogroup"
|
|
272
|
-
aria-labelledby="label"
|
|
273
|
-
aria-describedby="hint"
|
|
274
|
-
aria-errormessage="error-message"
|
|
275
|
-
aria-orientation=${this.orientation}>
|
|
276
|
-
<label
|
|
277
|
-
part="form-control-label"
|
|
278
|
-
id="label"
|
|
279
|
-
class="label"
|
|
280
|
-
aria-hidden=${hasLabel ? 'false' : 'true'}
|
|
281
|
-
@click=${this.handleLabelClick}>
|
|
282
|
-
<slot name="label">${this.label}</slot>
|
|
283
|
-
</label>
|
|
284
|
-
|
|
285
|
-
<slot part="form-control-input" @slotchange=${this.syncRadioElements}></slot>
|
|
286
|
-
|
|
287
|
-
<slot
|
|
288
|
-
id="hint"
|
|
289
|
-
name="hint"
|
|
290
|
-
part="hint"
|
|
291
|
-
class=${classMap({
|
|
292
|
-
'has-slotted': hasHint,
|
|
293
|
-
})}
|
|
294
|
-
aria-hidden=${hasHint ? 'false' : 'true'}
|
|
295
|
-
>${this.hint}</slot
|
|
296
|
-
>
|
|
297
|
-
</fieldset>
|
|
298
|
-
`;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
__decorate([
|
|
302
|
-
state()
|
|
303
|
-
], WRadioGroup.prototype, "hasRadioButtons", void 0);
|
|
304
|
-
__decorate([
|
|
305
|
-
query('slot:not([name])')
|
|
306
|
-
], WRadioGroup.prototype, "defaultSlot", void 0);
|
|
307
|
-
__decorate([
|
|
308
|
-
property()
|
|
309
|
-
], WRadioGroup.prototype, "label", void 0);
|
|
310
|
-
__decorate([
|
|
311
|
-
property({ attribute: 'hint' })
|
|
312
|
-
], WRadioGroup.prototype, "hint", void 0);
|
|
313
|
-
__decorate([
|
|
314
|
-
property({ reflect: true })
|
|
315
|
-
], WRadioGroup.prototype, "name", void 0);
|
|
316
|
-
__decorate([
|
|
317
|
-
property({ type: Boolean, reflect: true })
|
|
318
|
-
], WRadioGroup.prototype, "disabled", void 0);
|
|
319
|
-
__decorate([
|
|
320
|
-
property({ reflect: true })
|
|
321
|
-
], WRadioGroup.prototype, "orientation", void 0);
|
|
322
|
-
__decorate([
|
|
323
|
-
state()
|
|
324
|
-
], WRadioGroup.prototype, "value", null);
|
|
325
|
-
__decorate([
|
|
326
|
-
property({ attribute: 'value', reflect: true })
|
|
327
|
-
], WRadioGroup.prototype, "defaultValue", void 0);
|
|
328
|
-
__decorate([
|
|
329
|
-
property({ reflect: true })
|
|
330
|
-
], WRadioGroup.prototype, "size", void 0);
|
|
331
|
-
__decorate([
|
|
332
|
-
property({ type: Boolean, reflect: true })
|
|
333
|
-
], WRadioGroup.prototype, "required", void 0);
|
|
334
|
-
__decorate([
|
|
335
|
-
property({ type: Boolean, attribute: 'with-label' })
|
|
336
|
-
], WRadioGroup.prototype, "withLabel", void 0);
|
|
337
|
-
__decorate([
|
|
338
|
-
property({ type: Boolean, attribute: 'with-hint' })
|
|
339
|
-
], WRadioGroup.prototype, "withHint", void 0);
|
|
340
|
-
if (!customElements.get('w-radio-group')) {
|
|
341
|
-
customElements.define('w-radio-group', WRadioGroup);
|
|
342
|
-
}
|