@warp-ds/elements 2.2.0-next.2 → 2.2.0-next.20
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 +228 -28
- package/dist/.storybook/utilities.d.ts +28 -0
- package/dist/.storybook/utilities.js +52 -0
- package/dist/api.js +1 -49
- package/dist/api.js.map +4 -4
- package/dist/custom-elements.json +7005 -0
- package/dist/index.d.ts +1826 -18
- package/dist/packages/affix/affix.stories.d.ts +10 -0
- package/dist/packages/affix/affix.stories.js +25 -0
- package/dist/packages/affix/affix.test.d.ts +1 -0
- package/dist/packages/affix/affix.test.js +9 -0
- package/dist/packages/affix/index.d.ts +47 -24
- package/dist/packages/affix/index.js +2448 -2240
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/affix/react.d.ts +2 -0
- package/dist/packages/affix/react.js +8 -0
- package/dist/packages/affix/styles.d.ts +1 -0
- package/dist/packages/affix/styles.js +2 -0
- package/dist/packages/alert/alert.stories.d.ts +15 -0
- package/dist/packages/alert/alert.stories.js +68 -0
- package/dist/packages/alert/alert.test.d.ts +1 -0
- package/dist/packages/alert/alert.test.js +16 -0
- package/dist/packages/alert/index.d.ts +22 -17
- package/dist/packages/alert/index.js +2452 -2446
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/alert/react.d.ts +2 -0
- package/dist/packages/alert/react.js +8 -0
- package/dist/packages/alert/styles.d.ts +1 -0
- package/dist/packages/alert/styles.js +2 -0
- package/dist/packages/attention/attention.stories.d.ts +15 -0
- package/dist/packages/attention/attention.stories.js +188 -0
- package/dist/packages/attention/attention.test.d.ts +1 -0
- package/dist/packages/attention/attention.test.js +11 -0
- package/dist/packages/attention/index.d.ts +62 -90
- package/dist/packages/attention/index.js +3360 -3984
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/attention/layout-styles.d.ts +1 -0
- package/dist/packages/attention/layout-styles.js +905 -0
- package/dist/packages/attention/locales/da/messages.mjs +1 -0
- package/dist/packages/attention/locales/en/messages.mjs +1 -0
- package/dist/packages/attention/locales/fi/messages.mjs +1 -0
- package/dist/packages/attention/locales/nb/messages.mjs +1 -0
- package/dist/packages/attention/locales/sv/messages.mjs +1 -0
- package/dist/packages/attention/react.d.ts +1 -0
- package/dist/packages/attention/react.js +9 -0
- package/dist/packages/attention/styles.d.ts +1 -0
- package/dist/packages/attention/styles.js +2 -0
- package/dist/packages/badge/badge.stories.d.ts +17 -0
- package/dist/packages/badge/badge.stories.js +68 -0
- package/dist/packages/badge/badge.test.d.ts +1 -0
- package/dist/packages/badge/badge.test.js +9 -0
- package/dist/packages/badge/index.d.ts +12 -11
- package/dist/packages/badge/index.js +2441 -300
- package/dist/packages/badge/index.js.map +4 -4
- package/dist/packages/badge/react.d.ts +2 -0
- package/dist/packages/badge/react.js +8 -0
- package/dist/packages/badge/styles.d.ts +1 -0
- package/dist/packages/badge/styles.js +2 -0
- package/dist/packages/box/box.stories.d.ts +14 -0
- package/dist/packages/box/box.stories.js +59 -0
- package/dist/packages/box/box.test.d.ts +1 -0
- package/dist/packages/box/box.test.js +9 -0
- package/dist/packages/box/index.d.ts +17 -20
- package/dist/packages/box/index.js +2443 -299
- package/dist/packages/box/index.js.map +4 -4
- package/dist/packages/box/react.d.ts +2 -0
- package/dist/packages/box/react.js +8 -0
- package/dist/packages/box/slot.test.d.ts +1 -0
- package/dist/packages/box/slot.test.js +9 -0
- package/dist/packages/box/styles.d.ts +1 -0
- package/dist/packages/box/styles.js +2 -0
- package/dist/packages/breadcrumbs/breadcrumbs.stories.d.ts +12 -0
- package/dist/packages/breadcrumbs/breadcrumbs.stories.js +60 -0
- package/dist/packages/breadcrumbs/breadcrumbs.test.d.ts +1 -0
- package/dist/packages/breadcrumbs/breadcrumbs.test.js +16 -0
- package/dist/packages/breadcrumbs/index.d.ts +19 -16
- package/dist/packages/breadcrumbs/index.js +2402 -2051
- package/dist/packages/breadcrumbs/index.js.map +4 -4
- package/dist/packages/breadcrumbs/locales/da/messages.mjs +1 -0
- package/dist/packages/breadcrumbs/locales/en/messages.mjs +1 -0
- package/dist/packages/breadcrumbs/locales/fi/messages.mjs +1 -0
- package/dist/packages/breadcrumbs/locales/nb/messages.mjs +1 -0
- package/dist/packages/breadcrumbs/locales/sv/messages.mjs +1 -0
- package/dist/packages/breadcrumbs/react.d.ts +2 -0
- package/dist/packages/breadcrumbs/react.js +8 -0
- package/dist/packages/breadcrumbs/styles.d.ts +1 -0
- package/dist/packages/breadcrumbs/styles.js +2 -0
- package/dist/packages/button/button.stories.d.ts +21 -0
- package/dist/packages/button/button.stories.js +119 -0
- package/dist/packages/button/button.test.d.ts +1 -0
- package/dist/packages/button/button.test.js +25 -0
- package/dist/packages/button/index.d.ts +106 -56
- package/dist/packages/button/index.js +2618 -2130
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/button/locales/da/messages.mjs +1 -0
- package/dist/packages/button/locales/en/messages.mjs +1 -0
- package/dist/packages/button/locales/fi/messages.mjs +1 -0
- package/dist/packages/button/locales/nb/messages.mjs +1 -0
- package/dist/packages/button/locales/sv/messages.mjs +1 -0
- package/dist/packages/button/react.d.ts +2 -0
- package/dist/packages/button/react.js +8 -0
- package/dist/packages/button/styles.d.ts +1 -0
- package/dist/packages/button/styles.js +2 -0
- package/dist/packages/card/card.stories.d.ts +15 -0
- package/dist/packages/card/card.stories.js +82 -0
- package/dist/packages/card/card.test.d.ts +1 -0
- package/dist/packages/card/card.test.js +9 -0
- package/dist/packages/card/index.d.ts +28 -16
- package/dist/packages/card/index.js +2403 -2067
- package/dist/packages/card/index.js.map +4 -4
- package/dist/packages/card/locales/da/messages.mjs +1 -0
- package/dist/packages/card/locales/en/messages.mjs +1 -0
- package/dist/packages/card/locales/fi/messages.mjs +1 -0
- package/dist/packages/card/locales/nb/messages.mjs +1 -0
- package/dist/packages/card/locales/sv/messages.mjs +1 -0
- package/dist/packages/card/react.d.ts +2 -0
- package/dist/packages/card/react.js +8 -0
- package/dist/packages/card/styles.d.ts +1 -0
- package/dist/packages/card/styles.js +2 -0
- package/dist/packages/combobox/combobox.stories.d.ts +14 -0
- package/dist/packages/combobox/combobox.stories.js +95 -0
- package/dist/packages/combobox/index.d.ts +95 -0
- package/dist/packages/combobox/index.js +2492 -0
- package/dist/packages/combobox/index.js.map +7 -0
- package/dist/packages/combobox/locales/da/messages.d.mts +1 -0
- package/dist/packages/combobox/locales/da/messages.mjs +1 -0
- package/dist/packages/combobox/locales/en/messages.d.mts +1 -0
- package/dist/packages/combobox/locales/en/messages.mjs +1 -0
- package/dist/packages/combobox/locales/fi/messages.d.mts +1 -0
- package/dist/packages/combobox/locales/fi/messages.mjs +1 -0
- package/dist/packages/combobox/locales/nb/messages.d.mts +1 -0
- package/dist/packages/combobox/locales/nb/messages.mjs +1 -0
- package/dist/packages/combobox/locales/sv/messages.d.mts +1 -0
- package/dist/packages/combobox/locales/sv/messages.mjs +1 -0
- package/dist/packages/combobox/styles.d.ts +1 -0
- package/dist/packages/combobox/styles.js +2 -0
- package/dist/packages/datepicker/DatePicker.test.d.ts +1 -0
- package/dist/packages/datepicker/DatePicker.test.js +68 -0
- package/dist/packages/datepicker/datepicker.d.ts +102 -0
- package/dist/packages/datepicker/datepicker.js +2785 -0
- package/dist/packages/datepicker/datepicker.js.map +7 -0
- package/dist/packages/datepicker/datepicker.stories.d.ts +12 -0
- package/dist/packages/datepicker/datepicker.stories.js +51 -0
- package/dist/packages/datepicker/datepicker.test.d.ts +2 -0
- package/dist/packages/datepicker/datepicker.test.js +62 -0
- package/dist/packages/datepicker/index.d.ts +1 -0
- package/dist/packages/datepicker/index.js +2785 -0
- package/dist/packages/datepicker/index.js.map +7 -0
- package/dist/packages/datepicker/locales/da/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/da/messages.mjs +1 -0
- package/dist/packages/datepicker/locales/en/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/en/messages.mjs +1 -0
- package/dist/packages/datepicker/locales/fi/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/fi/messages.mjs +1 -0
- package/dist/packages/datepicker/locales/nb/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/nb/messages.mjs +1 -0
- package/dist/packages/datepicker/locales/sv/messages.d.mts +1 -0
- package/dist/packages/datepicker/locales/sv/messages.mjs +1 -0
- package/dist/packages/datepicker/react.d.ts +2 -0
- package/dist/packages/datepicker/react.js +8 -0
- package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.js +15 -0
- package/dist/packages/datepicker/styles/w-datepicker-day.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-day.styles.js +64 -0
- package/dist/packages/datepicker/styles/w-datepicker-month.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker-month.styles.js +72 -0
- package/dist/packages/datepicker/styles/w-datepicker.styles.d.ts +1 -0
- package/dist/packages/datepicker/styles/w-datepicker.styles.js +101 -0
- package/dist/packages/datepicker/utils.d.ts +13 -0
- package/dist/packages/datepicker/utils.js +28 -0
- package/dist/packages/dead-toggle/dead-toggle.stories.d.ts +10 -0
- package/dist/packages/dead-toggle/dead-toggle.stories.js +23 -0
- package/dist/packages/dead-toggle/dead-toggle.test.d.ts +1 -0
- package/dist/packages/dead-toggle/dead-toggle.test.js +9 -0
- package/dist/packages/dead-toggle/index.d.ts +16 -0
- package/dist/packages/dead-toggle/index.js +2487 -0
- package/dist/packages/dead-toggle/index.js.map +7 -0
- package/dist/packages/dead-toggle/react.d.ts +2 -0
- package/dist/packages/dead-toggle/react.js +8 -0
- package/dist/packages/expandable/expandable.stories.d.ts +19 -0
- package/dist/packages/expandable/expandable.stories.js +133 -0
- package/dist/packages/expandable/expandable.test.d.ts +1 -0
- package/dist/packages/expandable/expandable.test.js +24 -0
- package/dist/packages/expandable/index.d.ts +52 -50
- package/dist/packages/expandable/index.js +2424 -2286
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/expandable/react.d.ts +2 -0
- package/dist/packages/expandable/react.js +8 -0
- package/dist/packages/expandable/styles.d.ts +1 -0
- package/dist/packages/expandable/styles.js +2 -0
- package/dist/packages/i18n.js +44 -0
- package/dist/packages/link/index.d.ts +34 -0
- package/dist/packages/link/index.js +2646 -0
- package/dist/packages/link/index.js.map +7 -0
- package/dist/packages/link/link.stories.d.ts +20 -0
- package/dist/packages/link/link.stories.js +121 -0
- package/dist/packages/link/link.test.d.ts +1 -0
- package/dist/packages/link/link.test.js +9 -0
- package/dist/packages/link/react.d.ts +2 -0
- package/dist/packages/link/react.js +8 -0
- package/dist/packages/link/styles.d.ts +1 -0
- package/dist/packages/link/styles.js +200 -0
- package/dist/packages/modal/index.d.ts +4 -5
- package/dist/packages/modal/index.js +2649 -2575
- package/dist/packages/modal/index.js.map +4 -4
- package/dist/packages/modal/locales/da/messages.mjs +1 -0
- package/dist/packages/modal/locales/en/messages.mjs +1 -0
- package/dist/packages/modal/locales/fi/messages.mjs +1 -0
- package/dist/packages/modal/locales/nb/messages.mjs +1 -0
- package/dist/packages/modal/locales/sv/messages.mjs +1 -0
- package/dist/packages/modal/modal-footer.d.ts +13 -11
- package/dist/packages/modal/modal-footer.js +2460 -0
- package/dist/packages/modal/modal-footer.js.map +7 -0
- package/dist/packages/modal/modal-header.d.ts +25 -31
- package/dist/packages/modal/modal-header.js +2584 -0
- package/dist/packages/modal/modal-header.js.map +7 -0
- package/dist/packages/modal/modal-main.d.ts +27 -31
- package/dist/packages/modal/modal-main.js +2572 -0
- package/dist/packages/modal/modal-main.js.map +7 -0
- package/dist/packages/modal/modal.stories.d.ts +19 -0
- package/dist/packages/modal/modal.stories.js +160 -0
- package/dist/packages/modal/react.d.ts +4 -0
- package/dist/packages/modal/react.js +18 -0
- package/dist/packages/modal/util.d.ts +7 -17
- package/dist/packages/modal/util.js +21 -0
- package/dist/packages/pageindicator/index.d.ts +10 -0
- package/dist/packages/pageindicator/index.js +32 -0
- package/dist/packages/pageindicator/index.js.map +7 -0
- package/dist/packages/pageindicator/pageindicator.stories.d.ts +32 -0
- package/dist/packages/pageindicator/pageindicator.stories.js +71 -0
- package/dist/packages/pageindicator/react.d.ts +2 -0
- package/dist/packages/pageindicator/react.js +8 -0
- package/dist/packages/pageindicator/style.d.ts +1 -0
- package/dist/packages/pageindicator/style.js +26 -0
- package/dist/packages/pagination/index.d.ts +32 -0
- package/dist/packages/pagination/index.js +2494 -0
- package/dist/packages/pagination/index.js.map +7 -0
- package/dist/packages/pagination/locales/da/messages.d.mts +1 -0
- package/dist/packages/pagination/locales/da/messages.mjs +1 -0
- package/dist/packages/pagination/locales/en/messages.d.mts +1 -0
- package/dist/packages/pagination/locales/en/messages.mjs +1 -0
- package/dist/packages/pagination/locales/fi/messages.d.mts +1 -0
- package/dist/packages/pagination/locales/fi/messages.mjs +1 -0
- package/dist/packages/pagination/locales/nb/messages.d.mts +1 -0
- package/dist/packages/pagination/locales/nb/messages.mjs +1 -0
- package/dist/packages/pagination/locales/sv/messages.d.mts +1 -0
- package/dist/packages/pagination/locales/sv/messages.mjs +1 -0
- package/dist/packages/pagination/pagination.stories.d.ts +14 -0
- package/dist/packages/pagination/pagination.stories.js +56 -0
- package/dist/packages/pagination/pagination.test.d.ts +1 -0
- package/dist/packages/pagination/pagination.test.js +76 -0
- package/dist/packages/pagination/react.d.ts +2 -0
- package/dist/packages/pagination/react.js +8 -0
- package/dist/packages/pagination/styles.d.ts +1 -0
- package/dist/packages/pagination/styles.js +2 -0
- package/dist/packages/pill/index.d.ts +39 -23
- package/dist/packages/pill/index.js +2408 -2175
- package/dist/packages/pill/index.js.map +4 -4
- package/dist/packages/pill/locales/da/messages.mjs +1 -0
- package/dist/packages/pill/locales/en/messages.mjs +1 -0
- package/dist/packages/pill/locales/fi/messages.mjs +1 -0
- package/dist/packages/pill/locales/nb/messages.mjs +1 -0
- package/dist/packages/pill/locales/sv/messages.mjs +1 -0
- package/dist/packages/pill/pill.stories.d.ts +12 -0
- package/dist/packages/pill/pill.stories.js +33 -0
- package/dist/packages/pill/pill.test.d.ts +1 -0
- package/dist/packages/pill/pill.test.js +23 -0
- package/dist/packages/pill/styles.d.ts +1 -0
- package/dist/packages/pill/styles.js +2 -0
- package/dist/packages/rip-and-tear-checkbox/checkbox.d.ts +64 -0
- package/dist/packages/rip-and-tear-checkbox/checkbox.js +160 -0
- package/dist/packages/rip-and-tear-checkbox/checkbox.js.map +7 -0
- package/dist/packages/rip-and-tear-checkbox/index.d.ts +1 -0
- package/dist/packages/rip-and-tear-checkbox/index.js +160 -0
- package/dist/packages/rip-and-tear-checkbox/index.js.map +7 -0
- package/dist/packages/rip-and-tear-checkbox/styles.d.ts +1 -0
- package/dist/packages/rip-and-tear-checkbox/styles.js +116 -0
- package/dist/packages/rip-and-tear-radio/base-element.d.ts +46 -0
- package/dist/packages/rip-and-tear-radio/base-element.js +100 -0
- package/dist/packages/rip-and-tear-radio/custom-error-validator.d.ts +6 -0
- package/dist/packages/rip-and-tear-radio/custom-error-validator.js +22 -0
- package/dist/packages/rip-and-tear-radio/form-associated-element.d.ts +103 -0
- package/dist/packages/rip-and-tear-radio/form-associated-element.js +282 -0
- package/dist/packages/rip-and-tear-radio/host-styles.d.ts +1 -0
- package/dist/packages/rip-and-tear-radio/host-styles.js +12 -0
- package/dist/packages/rip-and-tear-radio/index.d.ts +1 -0
- package/dist/packages/rip-and-tear-radio/index.js +270 -0
- package/dist/packages/rip-and-tear-radio/index.js.map +7 -0
- package/dist/packages/rip-and-tear-radio/invalid.d.ts +8 -0
- package/dist/packages/rip-and-tear-radio/invalid.js +5 -0
- package/dist/packages/rip-and-tear-radio/math.d.ts +1 -0
- package/dist/packages/rip-and-tear-radio/math.js +4 -0
- package/dist/packages/rip-and-tear-radio/radio-group-styles.d.ts +1 -0
- package/dist/packages/rip-and-tear-radio/radio-group-styles.js +60 -0
- package/dist/packages/rip-and-tear-radio/radio-group-styles.js.map +7 -0
- package/dist/packages/rip-and-tear-radio/radio-group.d.ts +72 -0
- package/dist/packages/rip-and-tear-radio/radio-group.js +270 -0
- package/dist/packages/rip-and-tear-radio/radio-group.js.map +7 -0
- package/dist/packages/rip-and-tear-radio/radio-styles.d.ts +1 -0
- package/dist/packages/rip-and-tear-radio/radio-styles.js +170 -0
- package/dist/packages/rip-and-tear-radio/radio-styles.js.map +7 -0
- package/dist/packages/rip-and-tear-radio/radio.d.ts +38 -0
- package/dist/packages/rip-and-tear-radio/radio.js +183 -0
- package/dist/packages/rip-and-tear-radio/radio.js.map +7 -0
- package/dist/packages/rip-and-tear-radio/radio.stories.d.ts +8 -0
- package/dist/packages/rip-and-tear-radio/radio.stories.js +275 -0
- package/dist/packages/rip-and-tear-radio/radio.stories.js.map +7 -0
- package/dist/packages/rip-and-tear-radio/required-validator.d.ts +11 -0
- package/dist/packages/rip-and-tear-radio/required-validator.js +34 -0
- package/dist/packages/rip-and-tear-radio/slot.d.ts +20 -0
- package/dist/packages/rip-and-tear-radio/slot.js +71 -0
- package/dist/packages/rip-and-tear-radio/watch.d.ts +26 -0
- package/dist/packages/rip-and-tear-radio/watch.js +39 -0
- package/dist/packages/select/index.d.ts +54 -48
- package/dist/packages/select/index.js +2421 -2236
- package/dist/packages/select/index.js.map +4 -4
- package/dist/packages/select/locales/da/messages.mjs +1 -0
- package/dist/packages/select/locales/en/messages.mjs +1 -0
- package/dist/packages/select/locales/fi/messages.mjs +1 -0
- package/dist/packages/select/locales/nb/messages.mjs +1 -0
- package/dist/packages/select/locales/sv/messages.mjs +1 -0
- package/dist/packages/select/react.d.ts +2 -0
- package/dist/packages/select/react.js +8 -0
- package/dist/packages/select/select.stories.d.ts +10 -0
- package/dist/packages/select/select.stories.js +31 -0
- package/dist/packages/select/select.test.d.ts +1 -0
- package/dist/packages/select/select.test.js +31 -0
- package/dist/packages/select/styles.d.ts +1 -0
- package/dist/packages/select/styles.js +2 -0
- package/dist/packages/slider/Slider.d.ts +2 -0
- package/dist/packages/slider/Slider.js +8 -0
- package/dist/packages/slider/SliderThumb.d.ts +2 -0
- package/dist/packages/slider/SliderThumb.js +8 -0
- package/dist/packages/slider/index.d.ts +2 -0
- package/dist/packages/slider/index.js +2791 -0
- package/dist/packages/slider/index.js.map +7 -0
- package/dist/packages/slider/oddbird-css-anchor-positioning.d.ts +2 -0
- package/dist/packages/slider/oddbird-css-anchor-positioning.js +3 -0
- package/dist/packages/slider/slider-thumb.d.ts +57 -0
- package/dist/packages/slider/slider-thumb.js +2663 -0
- package/dist/packages/slider/slider-thumb.js.map +7 -0
- package/dist/packages/slider/slider.d.ts +46 -0
- package/dist/packages/slider/slider.js +2569 -0
- package/dist/packages/slider/slider.js.map +7 -0
- package/dist/packages/slider/slider.stories.d.ts +17 -0
- package/dist/packages/slider/slider.stories.js +203 -0
- package/dist/packages/slider/slider.test.d.ts +4 -0
- package/dist/packages/slider/slider.test.js +83 -0
- package/dist/packages/slider/styles/w-slider-thumb.styles.d.ts +1 -0
- package/dist/packages/slider/styles/w-slider-thumb.styles.js +132 -0
- package/dist/packages/slider/styles/w-slider.styles.d.ts +1 -0
- package/dist/packages/slider/styles/w-slider.styles.js +118 -0
- package/dist/packages/slider/styles.d.ts +1 -0
- package/dist/packages/slider/styles.js +2 -0
- package/dist/packages/steps/index.d.ts +36 -0
- package/dist/packages/steps/index.js +2465 -0
- package/dist/packages/steps/index.js.map +7 -0
- package/dist/packages/steps/locales/da/messages.d.mts +1 -0
- package/dist/packages/steps/locales/da/messages.mjs +1 -0
- package/dist/packages/steps/locales/en/messages.d.mts +1 -0
- package/dist/packages/steps/locales/en/messages.mjs +1 -0
- package/dist/packages/steps/locales/fi/messages.d.mts +1 -0
- package/dist/packages/steps/locales/fi/messages.mjs +1 -0
- package/dist/packages/steps/locales/nb/messages.d.mts +1 -0
- package/dist/packages/steps/locales/nb/messages.mjs +1 -0
- package/dist/packages/steps/locales/sv/messages.d.mts +1 -0
- package/dist/packages/steps/locales/sv/messages.mjs +1 -0
- package/dist/packages/steps/react.d.ts +3 -0
- package/dist/packages/steps/react.js +13 -0
- package/dist/packages/steps/steps.stories.d.ts +12 -0
- package/dist/packages/steps/steps.stories.js +172 -0
- package/dist/packages/steps/styles.d.ts +1 -0
- package/dist/packages/steps/styles.js +2 -0
- package/dist/packages/styles.d.ts +2 -0
- package/dist/packages/styles.js +2442 -0
- package/dist/packages/switch/index.d.ts +15 -0
- package/dist/packages/switch/index.js +2455 -0
- package/dist/packages/switch/index.js.map +7 -0
- package/dist/packages/switch/react.d.ts +2 -0
- package/dist/packages/switch/react.js +8 -0
- package/dist/packages/switch/styles.d.ts +1 -0
- package/dist/packages/switch/styles.js +2 -0
- package/dist/packages/switch/switch.stories.d.ts +9 -0
- package/dist/packages/switch/switch.stories.js +34 -0
- package/dist/packages/tabs/index.d.ts +4 -0
- package/dist/packages/tabs/index.js +2470 -0
- package/dist/packages/tabs/index.js.map +7 -0
- package/dist/packages/tabs/react.d.ts +4 -0
- package/dist/packages/tabs/react.js +18 -0
- package/dist/packages/tabs/styles.d.ts +1 -0
- package/dist/packages/tabs/styles.js +2 -0
- package/dist/packages/tabs/tab-panel.d.ts +20 -0
- package/dist/packages/tabs/tab-panel.js +2441 -0
- package/dist/packages/tabs/tab-panel.js.map +7 -0
- package/dist/packages/tabs/tab.d.ts +18 -0
- package/dist/packages/tabs/tab.js +2463 -0
- package/dist/packages/tabs/tab.js.map +7 -0
- package/dist/packages/tabs/tabs.d.ts +38 -0
- package/dist/packages/tabs/tabs.js +2448 -0
- package/dist/packages/tabs/tabs.js.map +7 -0
- package/dist/packages/tabs/tabs.stories.d.ts +8 -0
- package/dist/packages/tabs/tabs.stories.js +2545 -0
- package/dist/packages/tabs/tabs.stories.js.map +7 -0
- package/dist/packages/textfield/index.d.ts +78 -74
- package/dist/packages/textfield/index.js +2514 -422
- package/dist/packages/textfield/index.js.map +4 -4
- package/dist/packages/textfield/react.d.ts +2 -0
- package/dist/packages/textfield/react.js +8 -0
- package/dist/packages/textfield/styles/w-textfield.styles.d.ts +1 -0
- package/dist/packages/textfield/styles/w-textfield.styles.js +46 -0
- package/dist/packages/textfield/styles.d.ts +1 -0
- package/dist/packages/textfield/styles.js +2 -0
- package/dist/packages/textfield/textfield.stories.d.ts +18 -0
- package/dist/packages/textfield/textfield.stories.js +105 -0
- package/dist/packages/textfield/textfield.test.d.ts +2 -0
- package/dist/packages/textfield/textfield.test.js +68 -0
- package/dist/packages/toast/api.d.ts +4 -45
- package/dist/packages/toast/api.js +41 -0
- package/dist/packages/toast/index.d.ts +3 -0
- package/dist/packages/toast/index.js +2466 -2787
- package/dist/packages/toast/index.js.map +4 -4
- package/dist/packages/toast/locales/da/messages.mjs +1 -0
- package/dist/packages/toast/locales/en/messages.mjs +1 -0
- package/dist/packages/toast/locales/fi/messages.mjs +1 -0
- package/dist/packages/toast/locales/nb/messages.mjs +1 -0
- package/dist/packages/toast/locales/sv/messages.mjs +1 -0
- package/dist/packages/toast/styles.d.ts +1 -0
- package/dist/packages/toast/styles.js +2 -0
- package/dist/packages/toast/toast-container.d.ts +12 -63
- package/dist/packages/toast/toast-container.js +153 -0
- package/dist/packages/toast/toast.d.ts +34 -29
- package/dist/packages/toast/toast.js +200 -0
- package/dist/packages/toast/toast.stories.d.ts +12 -0
- package/dist/packages/toast/toast.stories.js +50 -0
- package/dist/packages/toast/types.d.ts +15 -0
- package/dist/packages/toast/types.js +1 -0
- package/dist/packages/utils/expand-transition.d.ts +3 -2
- package/dist/packages/utils/expand-transition.js +59 -0
- package/dist/packages/utils/index.d.ts +1 -1
- package/dist/packages/utils/index.js +2 -0
- package/dist/packages/utils/index.js.map +7 -0
- package/dist/packages/utils/unstyled-heading.d.ts +3 -3
- package/dist/packages/utils/unstyled-heading.js +22 -0
- package/dist/packages/utils/window-exists.js +1 -0
- package/dist/setup-tests.d.ts +1 -0
- package/dist/setup-tests.js +1 -0
- package/dist/vscode.css-custom-data.json +6 -0
- package/dist/vscode.html-custom-data.json +733 -0
- package/dist/web-types.json +1685 -0
- package/package.json +93 -38
- package/dist/index.js +0 -6838
- package/dist/index.js.map +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/ export const messages = JSON.parse("{\"datepicker.toggle.changeDate\":[\"Change date, \",[\"currentDate\"]],\"datepicker.toggle.chooseDate\":[\"Choose date\"],\"datepicker.calendar.roleDescription\":[\"Date picker\"],\"datepicker.calendar.nextMonth\":[\"Next month\"],\"datepicker.calendar.previousMonth\":[\"Previous month\"]}");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/ export const messages = JSON.parse("{\"datepicker.toggle.changeDate\":[\"Change date, \",[\"currentDate\"]],\"datepicker.toggle.chooseDate\":[\"Choose date\"],\"datepicker.calendar.roleDescription\":[\"Date picker\"],\"datepicker.calendar.nextMonth\":[\"Next month\"],\"datepicker.calendar.previousMonth\":[\"Previous month\"]}");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/ export const messages = JSON.parse("{\"datepicker.toggle.changeDate\":[\"Change date, \",[\"currentDate\"]],\"datepicker.toggle.chooseDate\":[\"Choose date\"],\"datepicker.calendar.roleDescription\":[\"Date picker\"],\"datepicker.calendar.nextMonth\":[\"Next month\"],\"datepicker.calendar.previousMonth\":[\"Previous month\"]}");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/ export const messages = JSON.parse("{\"datepicker.toggle.changeDate\":[\"Endre dato, \",[\"currentDate\"]],\"datepicker.toggle.chooseDate\":[\"Velg dato\"],\"datepicker.calendar.roleDescription\":[\"datovelger\"],\"datepicker.calendar.nextMonth\":[\"Gå til neste måned\"],\"datepicker.calendar.previousMonth\":[\"Gå til forrige måned\"]}");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messages: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*eslint-disable*/ export const messages = JSON.parse("{\"datepicker.toggle.changeDate\":[\"Change date, \",[\"currentDate\"]],\"datepicker.toggle.chooseDate\":[\"Choose date\"],\"datepicker.calendar.roleDescription\":[\"Date picker\"],\"datepicker.calendar.nextMonth\":[\"Next month\"],\"datepicker.calendar.previousMonth\":[\"Previous month\"]}");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const wDatepickerCalendarStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const wDatepickerCalendarStyles = css `
|
|
3
|
+
.w-datepicker__calendar {
|
|
4
|
+
--_calendar-border-color: var(--calendar-border-color, initial);
|
|
5
|
+
--_calendar-border-style: var(--calendar-border-style, none);
|
|
6
|
+
--_calendar-border-width: var(--calendar-border-width, 0);
|
|
7
|
+
--_calendar-border-radius: var(--calendar-border-radius, 0);
|
|
8
|
+
position: relative;
|
|
9
|
+
z-index: 30;
|
|
10
|
+
|
|
11
|
+
border: var(--_calendar-border-width) var(--_calendar-border-style) var(--_calendar-border-color);
|
|
12
|
+
border-radius: var(--_calendar-border-radius);
|
|
13
|
+
padding: 16px;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const wDatepickerDayStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const wDatepickerDayStyles = css `
|
|
3
|
+
/* === Day Cell === */
|
|
4
|
+
.w-datepicker__day {
|
|
5
|
+
/* No longer in use? */
|
|
6
|
+
--_day-in-range-background: var(--day-in-range-background, var(--w-s-color-background-primary-subtle-active));
|
|
7
|
+
|
|
8
|
+
text-align: center;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
outline: none;
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
color: var(--day-color, var(--w-s-color-text));
|
|
14
|
+
background-color: var(--day-background, transparent);
|
|
15
|
+
width: var(--day-width, 40px);
|
|
16
|
+
height: var(--day-height, 40px);
|
|
17
|
+
padding: var(--day-padding, 0);
|
|
18
|
+
font-weight: var(--day-font-weight, normal);
|
|
19
|
+
font-size: var(--w-font-size-s);
|
|
20
|
+
line-height: var(--w-line-height-s);
|
|
21
|
+
border-radius: var(--day-border-radius, 50%);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.w-datepicker__day:hover {
|
|
25
|
+
--day-color: var(--w-s-color-text);
|
|
26
|
+
--day-background: var(--w-s-color-background-hover);
|
|
27
|
+
--day-border-radius: 50%;
|
|
28
|
+
}
|
|
29
|
+
.w-datepicker__day:active {
|
|
30
|
+
--day-color: var(--w-s-color-text);
|
|
31
|
+
--day-background: var(--w-s-color-background-active);
|
|
32
|
+
--day-border-radius: 50%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.w-datepicker__day:focus-visible {
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
outline: 2px solid var(--w-s-color-border-focus);
|
|
38
|
+
outline-offset: var(--w-outline-offset, -2px);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* === Day variants === */
|
|
42
|
+
.w-datepicker__day--today {
|
|
43
|
+
--day-font-weight: bold;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.w-datepicker__day--selected {
|
|
47
|
+
--day-background: var(--w-s-color-background-primary);
|
|
48
|
+
--day-color: var(--w-s-color-text-inverted);
|
|
49
|
+
--day-font-weight: bold;
|
|
50
|
+
}
|
|
51
|
+
.w-datepicker__day--selected:hover,
|
|
52
|
+
.w-datepicker__day--selected:focus-visible {
|
|
53
|
+
--day-background: var(--w-s-color-background-primary-hover);
|
|
54
|
+
--day-color: var(--w-s-color-text-inverted);
|
|
55
|
+
--day-font-weight: bold;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.w-datepicker__day--disabled,
|
|
59
|
+
.w-datepicker__day--disabled:hover {
|
|
60
|
+
--day-color: var(--w-s-color-text-disabled);
|
|
61
|
+
cursor: not-allowed;
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const wDatepickerMonthStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const wDatepickerMonthStyles = css `
|
|
3
|
+
.w-datepicker__month {
|
|
4
|
+
/* Sets default used in the day fragment */
|
|
5
|
+
--day-width: 40px;
|
|
6
|
+
|
|
7
|
+
--_month-color: var(--month-color, var(--w-s-color-text));
|
|
8
|
+
--_month-font-size: var(--month-font-size, var(--w-font-size-m));
|
|
9
|
+
--_month-line-height: var(--month-line-height, var(--w-line-height-m));
|
|
10
|
+
|
|
11
|
+
--_month-table-min-width: var(--month-table-min-width, calc(var(--day-width) * 7));
|
|
12
|
+
|
|
13
|
+
--_weekdays-font-size: var(--weekdays-font-size, var(--w-font-size-xs));
|
|
14
|
+
--_weekdays-line-height: var(--weekdays-font-size, var(--w-line-height-xs));
|
|
15
|
+
--_weekdays-font-weight: var(--weekdays-font-weight, bold);
|
|
16
|
+
|
|
17
|
+
--_weekdays-padding: var(--weekdays-padding, 8px 0 4px 0);
|
|
18
|
+
|
|
19
|
+
text-align: center;
|
|
20
|
+
user-select: none;
|
|
21
|
+
display: inline-block;
|
|
22
|
+
|
|
23
|
+
color: var(--_month-color);
|
|
24
|
+
font-size: var(--_month-font-size);
|
|
25
|
+
line-height: var(--_month-line-height);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.w-datepicker__month__nav {
|
|
29
|
+
margin: 0 0 8px 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.w-datepicker__month__nav__header {
|
|
33
|
+
text-align: center;
|
|
34
|
+
font-weight: Bold;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.w-datepicker__table {
|
|
38
|
+
width: 100%;
|
|
39
|
+
border-spacing: 0;
|
|
40
|
+
border-collapse: collapse;
|
|
41
|
+
display: block;
|
|
42
|
+
min-width: var(--_month-table-min-width);
|
|
43
|
+
padding-top: 8px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.w-datepicker__weekday {
|
|
47
|
+
text-align: center;
|
|
48
|
+
font-size: var(--_weekdays-font-size);
|
|
49
|
+
line-height: var(--_weekdays-line-height);
|
|
50
|
+
font-weight: var(--_weekdays-font-weight);
|
|
51
|
+
padding: var(--_weekdays-padding);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.w-datepicker__month-nav {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: space-between;
|
|
58
|
+
width: 100%;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.w-datepicker__month__nav__button {
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.w-datepicker__month__nav__header {
|
|
66
|
+
flex: 1;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
text-align: center;
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const wDatepickerStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const wDatepickerStyles = css `
|
|
3
|
+
/* CustomDatePicker.css */
|
|
4
|
+
|
|
5
|
+
/* container */
|
|
6
|
+
.w-datepicker-wrapper {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
width: 100%;
|
|
10
|
+
font-size: var(--w-font-size-m);
|
|
11
|
+
line-height: var(--w-line-height-m);
|
|
12
|
+
}
|
|
13
|
+
.w-datepicker-input-wrapper {
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
/* hide the browser’s calendar icon, and prevent the native popup */
|
|
17
|
+
.w-datepicker-input {
|
|
18
|
+
/* remove default arrows/appearance */
|
|
19
|
+
-webkit-appearance: none;
|
|
20
|
+
-moz-appearance: textfield;
|
|
21
|
+
appearance: none;
|
|
22
|
+
|
|
23
|
+
/* basic styling */
|
|
24
|
+
display: block;
|
|
25
|
+
padding: 1.2rem 0.8rem;
|
|
26
|
+
border: 1px solid #ccc;
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 48px;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
font-size: var(--w-font-size-m);
|
|
32
|
+
line-height: var(--w-line-height-m);
|
|
33
|
+
background-color: var(--w-s-color-background);
|
|
34
|
+
}
|
|
35
|
+
.w-datepicker-input:hover {
|
|
36
|
+
border-color: var(--w-s-color-border-hover);
|
|
37
|
+
}
|
|
38
|
+
.w-datepicker-input:active {
|
|
39
|
+
border-color: var(--w-s-color-border-selected);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.w-datepicker-input:focus,
|
|
43
|
+
.w-datepicker-input:focus-visible {
|
|
44
|
+
outline: 2px solid var(--w-s-color-border-focus);
|
|
45
|
+
outline-offset: -2px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.w-datepicker-input-label {
|
|
49
|
+
font-size: var(--w-font-size-s);
|
|
50
|
+
line-height: var(--w-line-height-s);
|
|
51
|
+
font-weight: 700;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
padding-bottom: 0.4rem;
|
|
54
|
+
color: var(--w-s-color-text);
|
|
55
|
+
display: block;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* custom calendar button */
|
|
59
|
+
.w-datepicker-button {
|
|
60
|
+
position: absolute;
|
|
61
|
+
right: 2px;
|
|
62
|
+
top: 2px;
|
|
63
|
+
height: 44px;
|
|
64
|
+
width: 44px !important;
|
|
65
|
+
border-radius: 2px !important;
|
|
66
|
+
border: none;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
pointer-events: auto; /* override parent’s none */
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.w-datepicker-button:not(:hover) {
|
|
72
|
+
background-color: var(--w-s-color-background) !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
input[type='date']::-webkit-inner-spin-button,
|
|
76
|
+
input[type='date']::-webkit-calendar-picker-indicator {
|
|
77
|
+
display: none;
|
|
78
|
+
-webkit-appearance: none;
|
|
79
|
+
}
|
|
80
|
+
input[type='date'],
|
|
81
|
+
input[type='time'],
|
|
82
|
+
input[type='datetime-local'],
|
|
83
|
+
input[type='month'] {
|
|
84
|
+
-webkit-appearance: none;
|
|
85
|
+
-moz-appearance: none;
|
|
86
|
+
appearance: none;
|
|
87
|
+
}
|
|
88
|
+
/* Temporary dropdown, should probably use the appropriate component when it is done */
|
|
89
|
+
.w-dropdown__popover {
|
|
90
|
+
position: absolute;
|
|
91
|
+
width: max-content;
|
|
92
|
+
background-color: var(--w-s-color-background);
|
|
93
|
+
box-shadow: var(--w-shadow-s);
|
|
94
|
+
z-index: 100;
|
|
95
|
+
border-radius: 8px;
|
|
96
|
+
visibility: hidden;
|
|
97
|
+
}
|
|
98
|
+
.w-dropdown__popover--open {
|
|
99
|
+
visibility: visible;
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses an ISO-8601 string into a JS Date.
|
|
3
|
+
*
|
|
4
|
+
* Supports:
|
|
5
|
+
* - YYYY-MM-DD
|
|
6
|
+
* - YYYY-MM-DDThh:mm:ss(.sss)?(Z|±hh:mm)?
|
|
7
|
+
*
|
|
8
|
+
* @param {string} isoString
|
|
9
|
+
* @returns {Date}
|
|
10
|
+
* @throws {TypeError} if input isn’t a string
|
|
11
|
+
* @throws {Error} if string is not a valid ISO-8601 date
|
|
12
|
+
*/
|
|
13
|
+
export declare function fromISOToDate(isoString: string): Date | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const dateOnlyRe = /^\d{4}-\d{2}-\d{2}$/;
|
|
2
|
+
/**
|
|
3
|
+
* Parses an ISO-8601 string into a JS Date.
|
|
4
|
+
*
|
|
5
|
+
* Supports:
|
|
6
|
+
* - YYYY-MM-DD
|
|
7
|
+
* - YYYY-MM-DDThh:mm:ss(.sss)?(Z|±hh:mm)?
|
|
8
|
+
*
|
|
9
|
+
* @param {string} isoString
|
|
10
|
+
* @returns {Date}
|
|
11
|
+
* @throws {TypeError} if input isn’t a string
|
|
12
|
+
* @throws {Error} if string is not a valid ISO-8601 date
|
|
13
|
+
*/
|
|
14
|
+
export function fromISOToDate(isoString) {
|
|
15
|
+
if (typeof isoString !== 'string') {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
// If it's a bare date (YYYY-MM-DD), treat it as UTC midnight
|
|
19
|
+
let normalized = isoString;
|
|
20
|
+
if (dateOnlyRe.test(isoString)) {
|
|
21
|
+
normalized = `${isoString}T00:00:00Z`;
|
|
22
|
+
}
|
|
23
|
+
const timestamp = Date.parse(normalized);
|
|
24
|
+
if (Number.isNaN(timestamp)) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return new Date(timestamp);
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
import type { WarpDeadToggle } from './index.js';
|
|
3
|
+
import './index.js';
|
|
4
|
+
declare const args: Partial<WarpDeadToggle> & {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
declare const meta: Meta<typeof args>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof args>;
|
|
10
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { spread } from '@open-wc/lit-helpers';
|
|
3
|
+
import { getStorybookHelpers } from '@wc-toolkit/storybook-helpers';
|
|
4
|
+
import { prespread } from '../../.storybook/utilities.js';
|
|
5
|
+
import './index.js';
|
|
6
|
+
const { events, args, argTypes } = getStorybookHelpers('w-dead-toggle');
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Forms/Dead toggle',
|
|
9
|
+
render(args) {
|
|
10
|
+
return html `<w-dead-toggle ${spread(prespread(args))}></w-dead-toggle>`;
|
|
11
|
+
},
|
|
12
|
+
args,
|
|
13
|
+
argTypes,
|
|
14
|
+
parameters: {
|
|
15
|
+
actions: {
|
|
16
|
+
handles: events,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
export const Default = {
|
|
22
|
+
args: {},
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { expect, test } from 'vitest';
|
|
3
|
+
import { render } from 'vitest-browser-lit';
|
|
4
|
+
import './index.js';
|
|
5
|
+
test('renders the dead toggle', async () => {
|
|
6
|
+
const component = html `<w-dead-toggle data-testid="dead-toggle"></w-dead-toggle>`;
|
|
7
|
+
const page = render(component);
|
|
8
|
+
await expect.element(page.getByTestId('dead-toggle')).toBeVisible();
|
|
9
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Dead toggle can be used where the appearance of a checkbox or radio is needed - but for accessibility purposes an actual input element should not be present.
|
|
4
|
+
*
|
|
5
|
+
* [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-dead-toggle--docs)
|
|
6
|
+
*/
|
|
7
|
+
export declare class WarpDeadToggle extends LitElement {
|
|
8
|
+
type: 'radio' | 'checkbox';
|
|
9
|
+
checked: boolean;
|
|
10
|
+
indeterminate: boolean;
|
|
11
|
+
invalid: boolean;
|
|
12
|
+
/** @internal */
|
|
13
|
+
get indeterminateMarker(): "" | "–";
|
|
14
|
+
render(): import("lit").TemplateResult<1>;
|
|
15
|
+
static styles?: CSSResultGroup | undefined;
|
|
16
|
+
}
|