@postenbring/hedwig-react 0.0.0-bugfix-example-darkmode-20260303124449 → 0.0.0-bump-nodejs-24-20260909105147
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/accordion/accordion-content.js.map +1 -1
- package/dist/accordion/accordion-content.mjs +3 -3
- package/dist/accordion/accordion.js.map +1 -1
- package/dist/accordion/accordion.mjs +4 -4
- package/dist/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs +4 -4
- package/dist/blockquote/blockquote.d.ts +4 -11
- package/dist/blockquote/blockquote.d.ts.map +1 -1
- package/dist/blockquote/blockquote.js.map +1 -1
- package/dist/blockquote/blockquote.mjs +1 -1
- package/dist/blockquote/index.js.map +1 -1
- package/dist/blockquote/index.mjs +1 -1
- package/dist/button/button.d.ts +5 -2
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/button.js.map +1 -1
- package/dist/button/button.mjs +1 -1
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +1 -1
- package/dist/card/card.d.ts +1 -1
- package/dist/card/card.js +1 -1
- package/dist/card/card.js.map +1 -1
- package/dist/card/card.mjs +1 -1
- package/dist/card/index.js +1 -1
- package/dist/card/index.js.map +1 -1
- package/dist/card/index.mjs +1 -1
- package/dist/{chunk-77M2ZTP7.mjs → chunk-3V4GFS46.mjs} +11 -1
- package/dist/chunk-3V4GFS46.mjs.map +1 -0
- package/dist/{chunk-TYCGAA35.mjs → chunk-45Q2TCH6.mjs} +1 -1
- package/dist/chunk-45Q2TCH6.mjs.map +1 -0
- package/dist/chunk-5J5LYE6Z.mjs +1 -0
- package/dist/chunk-5M6MEYM7.mjs +1 -0
- package/dist/chunk-62VLFCXX.mjs +64 -0
- package/dist/chunk-62VLFCXX.mjs.map +1 -0
- package/dist/chunk-6D5VE3DW.mjs +44 -0
- package/dist/chunk-6D5VE3DW.mjs.map +1 -0
- package/dist/chunk-CAIGPMDS.mjs +1 -0
- package/dist/chunk-CAIGPMDS.mjs.map +1 -0
- package/dist/chunk-CD4LCDK3.mjs +27 -0
- package/dist/chunk-CD4LCDK3.mjs.map +1 -0
- package/dist/chunk-CSIXGT7P.mjs +1 -0
- package/dist/chunk-CSIXGT7P.mjs.map +1 -0
- package/dist/chunk-D2XZT2RA.mjs +17 -0
- package/dist/chunk-D2XZT2RA.mjs.map +1 -0
- package/dist/{chunk-6OJINZ37.mjs → chunk-DMRQEQQK.mjs} +28 -10
- package/dist/chunk-DMRQEQQK.mjs.map +1 -0
- package/dist/{chunk-HEDGKRGC.mjs → chunk-DOW6EHBI.mjs} +6 -32
- package/dist/chunk-DOW6EHBI.mjs.map +1 -0
- package/dist/chunk-F23MNQCK.mjs +28 -0
- package/dist/chunk-F23MNQCK.mjs.map +1 -0
- package/dist/{chunk-5RXT5GLF.mjs → chunk-F6QJWZJX.mjs} +2 -2
- package/dist/chunk-FTVKPZCX.mjs +37 -0
- package/dist/chunk-FTVKPZCX.mjs.map +1 -0
- package/dist/{chunk-NUP7ZBVE.mjs → chunk-GICUX46A.mjs} +2 -2
- package/dist/chunk-HA3LRSDK.mjs +21 -0
- package/dist/chunk-HA3LRSDK.mjs.map +1 -0
- package/dist/{chunk-W6CFPK2C.mjs → chunk-HOLFVKXQ.mjs} +3 -2
- package/dist/chunk-HOLFVKXQ.mjs.map +1 -0
- package/dist/chunk-JGQTAIEP.mjs +67 -0
- package/dist/chunk-JGQTAIEP.mjs.map +1 -0
- package/dist/chunk-JGYPZ7ET.mjs +103 -0
- package/dist/chunk-JGYPZ7ET.mjs.map +1 -0
- package/dist/{chunk-GYI4NCUY.mjs → chunk-KPNAC2WN.mjs} +2 -2
- package/dist/{chunk-F7MLQ6JI.mjs → chunk-NAXSP4VU.mjs} +12 -3
- package/dist/{chunk-F7MLQ6JI.mjs.map → chunk-NAXSP4VU.mjs.map} +1 -1
- package/dist/{chunk-JYN2QSN2.mjs → chunk-NZB6BBFT.mjs} +1 -1
- package/dist/chunk-NZB6BBFT.mjs.map +1 -0
- package/dist/{chunk-R6MQFVHE.mjs → chunk-O55OTMJ5.mjs} +2 -2
- package/dist/chunk-OQD4GKOS.mjs +65 -0
- package/dist/chunk-OQD4GKOS.mjs.map +1 -0
- package/dist/{chunk-YNGU3V4J.mjs → chunk-QDG2QLFV.mjs} +3 -3
- package/dist/{chunk-E6OOFTRQ.mjs → chunk-QER35NXN.mjs} +14 -8
- package/dist/chunk-QER35NXN.mjs.map +1 -0
- package/dist/chunk-QOIBRXYT.mjs +113 -0
- package/dist/chunk-QOIBRXYT.mjs.map +1 -0
- package/dist/{chunk-B6T36QDV.mjs → chunk-QTC4ATZD.mjs} +2 -2
- package/dist/{chunk-J35DWEJX.mjs → chunk-RGZSYJFL.mjs} +14 -5
- package/dist/chunk-RGZSYJFL.mjs.map +1 -0
- package/dist/chunk-RJ763KDH.mjs +21 -0
- package/dist/chunk-RJ763KDH.mjs.map +1 -0
- package/dist/{chunk-AGIY7SFP.mjs → chunk-SO7TS4TS.mjs} +2 -2
- package/dist/{chunk-BFM6UZGI.mjs → chunk-TTDR3NZL.mjs} +2 -2
- package/dist/chunk-TTDR3NZL.mjs.map +1 -0
- package/dist/{chunk-LHIG6RW7.mjs → chunk-VNH7CZJ4.mjs} +5 -13
- package/dist/chunk-VNH7CZJ4.mjs.map +1 -0
- package/dist/{chunk-HBGFFKP3.mjs → chunk-WVCJV74B.mjs} +2 -2
- package/dist/chunk-XSID7YR7.mjs +1 -0
- package/dist/chunk-XSID7YR7.mjs.map +1 -0
- package/dist/{chunk-EDPWJWQO.mjs → chunk-YQT2TN3U.mjs} +2 -2
- package/dist/footer/footer.js.map +1 -1
- package/dist/footer/footer.mjs +6 -6
- package/dist/footer/index.js.map +1 -1
- package/dist/footer/index.mjs +6 -6
- package/dist/form/checkbox/checkbox.d.ts +10 -1
- package/dist/form/checkbox/checkbox.d.ts.map +1 -1
- package/dist/form/checkbox/checkbox.js +170 -71
- package/dist/form/checkbox/checkbox.js.map +1 -1
- package/dist/form/checkbox/checkbox.mjs +11 -4
- package/dist/form/checkbox/index.js +170 -71
- package/dist/form/checkbox/index.js.map +1 -1
- package/dist/form/checkbox/index.mjs +11 -4
- package/dist/form/date-picker/date-picker.d.ts.map +1 -1
- package/dist/form/date-picker/date-picker.js +76 -46
- package/dist/form/date-picker/date-picker.js.map +1 -1
- package/dist/form/date-picker/date-picker.mjs +8 -4
- package/dist/form/date-picker/index.js +76 -46
- package/dist/form/date-picker/index.js.map +1 -1
- package/dist/form/date-picker/index.mjs +8 -4
- package/dist/form/error-message/error-message.d.ts +2 -0
- package/dist/form/error-message/error-message.d.ts.map +1 -1
- package/dist/form/error-message/error-message.js +18 -8
- package/dist/form/error-message/error-message.js.map +1 -1
- package/dist/form/error-message/error-message.mjs +3 -1
- package/dist/form/error-message/index.js +18 -8
- package/dist/form/error-message/index.js.map +1 -1
- package/dist/form/error-message/index.mjs +3 -1
- package/dist/form/error-summary/error-summary.d.ts.map +1 -1
- package/dist/form/error-summary/error-summary.js +10 -1
- package/dist/form/error-summary/error-summary.js.map +1 -1
- package/dist/form/error-summary/error-summary.mjs +3 -3
- package/dist/form/error-summary/index.js +10 -1
- package/dist/form/error-summary/index.js.map +1 -1
- package/dist/form/error-summary/index.mjs +3 -3
- package/dist/form/fieldset/fieldset-description.d.ts +12 -0
- package/dist/form/fieldset/fieldset-description.d.ts.map +1 -0
- package/dist/form/fieldset/fieldset-description.js +51 -0
- package/dist/form/fieldset/fieldset-description.js.map +1 -0
- package/dist/form/fieldset/fieldset-description.mjs +8 -0
- package/dist/form/fieldset/fieldset-description.mjs.map +1 -0
- package/dist/form/fieldset/fieldset-legend.d.ts +9 -0
- package/dist/form/fieldset/fieldset-legend.d.ts.map +1 -0
- package/dist/form/fieldset/fieldset-legend.js +72 -0
- package/dist/form/fieldset/fieldset-legend.js.map +1 -0
- package/dist/form/fieldset/fieldset-legend.mjs +8 -0
- package/dist/form/fieldset/fieldset-legend.mjs.map +1 -0
- package/dist/form/fieldset/fieldset.d.ts +30 -6
- package/dist/form/fieldset/fieldset.d.ts.map +1 -1
- package/dist/form/fieldset/fieldset.js +110 -35
- package/dist/form/fieldset/fieldset.js.map +1 -1
- package/dist/form/fieldset/fieldset.mjs +9 -2
- package/dist/form/fieldset/index.d.ts +2 -0
- package/dist/form/fieldset/index.d.ts.map +1 -1
- package/dist/form/fieldset/index.js +114 -35
- package/dist/form/fieldset/index.js.map +1 -1
- package/dist/form/fieldset/index.mjs +16 -3
- package/dist/form/index.d.ts +3 -0
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form/index.js +550 -260
- package/dist/form/index.js.map +1 -1
- package/dist/form/index.mjs +57 -24
- package/dist/form/input/index.js +103 -39
- package/dist/form/input/index.js.map +1 -1
- package/dist/form/input/index.mjs +8 -3
- package/dist/form/input/input.d.ts.map +1 -1
- package/dist/form/input/input.js +103 -39
- package/dist/form/input/input.js.map +1 -1
- package/dist/form/input/input.mjs +8 -3
- package/dist/form/input-group/index.js +59 -23
- package/dist/form/input-group/index.js.map +1 -1
- package/dist/form/input-group/index.mjs +7 -2
- package/dist/form/input-group/input-group.d.ts +9 -1
- package/dist/form/input-group/input-group.d.ts.map +1 -1
- package/dist/form/input-group/input-group.js +59 -23
- package/dist/form/input-group/input-group.js.map +1 -1
- package/dist/form/input-group/input-group.mjs +7 -2
- package/dist/form/radio-button/index.js +139 -86
- package/dist/form/radio-button/index.js.map +1 -1
- package/dist/form/radio-button/index.mjs +12 -5
- package/dist/form/radio-button/radio-button.d.ts +2 -10
- package/dist/form/radio-button/radio-button.d.ts.map +1 -1
- package/dist/form/radio-button/radio-button.js +139 -86
- package/dist/form/radio-button/radio-button.js.map +1 -1
- package/dist/form/radio-button/radio-button.mjs +12 -5
- package/dist/form/radio-button/radio-group.d.ts +11 -13
- package/dist/form/radio-button/radio-group.d.ts.map +1 -1
- package/dist/form/radio-button/radio-group.js +123 -48
- package/dist/form/radio-button/radio-group.js.map +1 -1
- package/dist/form/radio-button/radio-group.mjs +11 -4
- package/dist/form/search-wrapper/index.d.ts +3 -0
- package/dist/form/search-wrapper/index.d.ts.map +1 -0
- package/dist/form/search-wrapper/index.js +68 -0
- package/dist/form/search-wrapper/index.js.map +1 -0
- package/dist/form/search-wrapper/index.mjs +9 -0
- package/dist/form/search-wrapper/index.mjs.map +1 -0
- package/dist/form/search-wrapper/search-wrapper.d.ts +6 -0
- package/dist/form/search-wrapper/search-wrapper.d.ts.map +1 -0
- package/dist/form/search-wrapper/search-wrapper.js +66 -0
- package/dist/form/search-wrapper/search-wrapper.js.map +1 -0
- package/dist/form/search-wrapper/search-wrapper.mjs +8 -0
- package/dist/form/search-wrapper/search-wrapper.mjs.map +1 -0
- package/dist/form/select/index.js +105 -38
- package/dist/form/select/index.js.map +1 -1
- package/dist/form/select/index.mjs +8 -3
- package/dist/form/select/select.d.ts.map +1 -1
- package/dist/form/select/select.js +105 -38
- package/dist/form/select/select.js.map +1 -1
- package/dist/form/select/select.mjs +8 -3
- package/dist/form/suggestions/index.d.ts +7 -0
- package/dist/form/suggestions/index.d.ts.map +1 -0
- package/dist/form/suggestions/index.js +131 -0
- package/dist/form/suggestions/index.js.map +1 -0
- package/dist/form/suggestions/index.mjs +19 -0
- package/dist/form/suggestions/index.mjs.map +1 -0
- package/dist/form/suggestions/suggestions-item.d.ts +45 -0
- package/dist/form/suggestions/suggestions-item.d.ts.map +1 -0
- package/dist/form/suggestions/suggestions-item.js +83 -0
- package/dist/form/suggestions/suggestions-item.js.map +1 -0
- package/dist/form/suggestions/suggestions-item.mjs +10 -0
- package/dist/form/suggestions/suggestions-item.mjs.map +1 -0
- package/dist/form/suggestions/suggestions-wrapper.d.ts +41 -0
- package/dist/form/suggestions/suggestions-wrapper.d.ts.map +1 -0
- package/dist/form/suggestions/suggestions-wrapper.js +66 -0
- package/dist/form/suggestions/suggestions-wrapper.js.map +1 -0
- package/dist/form/suggestions/suggestions-wrapper.mjs +8 -0
- package/dist/form/suggestions/suggestions-wrapper.mjs.map +1 -0
- package/dist/form/suggestions/suggestions.d.ts +57 -0
- package/dist/form/suggestions/suggestions.d.ts.map +1 -0
- package/dist/form/suggestions/suggestions.js +123 -0
- package/dist/form/suggestions/suggestions.js.map +1 -0
- package/dist/form/suggestions/suggestions.mjs +10 -0
- package/dist/form/suggestions/suggestions.mjs.map +1 -0
- package/dist/form/textarea/index.js +92 -27
- package/dist/form/textarea/index.js.map +1 -1
- package/dist/form/textarea/index.mjs +8 -3
- package/dist/form/textarea/textarea.d.ts.map +1 -1
- package/dist/form/textarea/textarea.js +92 -27
- package/dist/form/textarea/textarea.js.map +1 -1
- package/dist/form/textarea/textarea.mjs +8 -3
- package/dist/form/validation-message/index.d.ts +3 -0
- package/dist/form/validation-message/index.d.ts.map +1 -0
- package/dist/form/validation-message/index.js +75 -0
- package/dist/form/validation-message/index.js.map +1 -0
- package/dist/form/validation-message/index.mjs +9 -0
- package/dist/form/validation-message/index.mjs.map +1 -0
- package/dist/form/validation-message/validation-message.d.ts +6 -0
- package/dist/form/validation-message/validation-message.d.ts.map +1 -0
- package/dist/form/validation-message/validation-message.js +73 -0
- package/dist/form/validation-message/validation-message.js.map +1 -0
- package/dist/form/validation-message/validation-message.mjs +8 -0
- package/dist/form/validation-message/validation-message.mjs.map +1 -0
- package/dist/index.js +798 -505
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +90 -55
- package/dist/layout/index.mjs +7 -7
- package/dist/modal/index.js.map +1 -1
- package/dist/modal/index.mjs +2 -2
- package/dist/modal/modal.js.map +1 -1
- package/dist/modal/modal.mjs +2 -2
- package/dist/navbar/index.js +1 -0
- package/dist/navbar/index.js.map +1 -1
- package/dist/navbar/index.mjs +3 -3
- package/dist/navbar/navbar-expandable-menu.d.ts.map +1 -1
- package/dist/navbar/navbar-expandable-menu.js +1 -0
- package/dist/navbar/navbar-expandable-menu.js.map +1 -1
- package/dist/navbar/navbar-expandable-menu.mjs +2 -2
- package/dist/navbar/navbar.js +1 -0
- package/dist/navbar/navbar.js.map +1 -1
- package/dist/navbar/navbar.mjs +3 -3
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs +3 -3
- package/dist/skeleton/skeleton.js.map +1 -1
- package/dist/skeleton/skeleton.mjs +3 -3
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +3 -3
- package/dist/tabs/tabs-list.js.map +1 -1
- package/dist/tabs/tabs-list.mjs +2 -2
- package/dist/tabs/tabs.js.map +1 -1
- package/dist/tabs/tabs.mjs +3 -3
- package/dist/utils/auto-animate-height.js.map +1 -1
- package/dist/utils/auto-animate-height.mjs +2 -2
- package/dist/utils/index.js +11 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +4 -2
- package/dist/utils/utils.d.ts +4 -0
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +11 -0
- package/dist/utils/utils.js.map +1 -1
- package/dist/utils/utils.mjs +3 -1
- package/package.json +5 -5
- package/src/accordion/accordion.stories.tsx +13 -20
- package/src/alert/alert.stories.tsx +1 -1
- package/src/badge/badge.stories.tsx +1 -1
- package/src/blockquote/blockquote.stories.tsx +1 -1
- package/src/blockquote/blockquote.tsx +4 -12
- package/src/box/box.stories.tsx +1 -1
- package/src/breadcrumbs/breadcrumbs.stories.tsx +1 -1
- package/src/button/button.stories.tsx +1 -1
- package/src/button/button.tsx +6 -2
- package/src/button-list/button-list.stories.tsx +1 -1
- package/src/card/card.stories.tsx +10 -9
- package/src/card/card.tsx +2 -2
- package/src/description-list/description-list.stories.tsx +1 -1
- package/src/figure/figure.stories.tsx +1 -1
- package/src/form/checkbox/checkbox.stories.tsx +1 -1
- package/src/form/checkbox/checkbox.tsx +32 -11
- package/src/form/date-picker/date-picker.stories.tsx +1 -1
- package/src/form/date-picker/date-picker.tsx +7 -1
- package/src/form/error-message/error-message.tsx +8 -14
- package/src/form/error-summary/error-summary.stories.tsx +1 -1
- package/src/form/error-summary/error-summary.tsx +6 -1
- package/src/form/fieldset/fieldset-description.tsx +17 -0
- package/src/form/fieldset/fieldset-legend.tsx +22 -0
- package/src/form/fieldset/fieldset.stories.tsx +3 -2
- package/src/form/fieldset/fieldset.tsx +95 -26
- package/src/form/fieldset/index.tsx +2 -0
- package/src/form/index.tsx +3 -0
- package/src/form/input/input.stories.tsx +1 -1
- package/src/form/input/input.tsx +23 -8
- package/src/form/input-group/input-group.tsx +32 -15
- package/src/form/radio-button/radio-button.stories.tsx +1 -2
- package/src/form/radio-button/radio-button.tsx +8 -34
- package/src/form/radio-button/radio-group.stories.tsx +1 -1
- package/src/form/radio-button/radio-group.tsx +20 -19
- package/src/form/search-wrapper/index.tsx +2 -0
- package/src/form/search-wrapper/search-wrapper.stories.tsx +34 -0
- package/src/form/search-wrapper/search-wrapper.tsx +14 -0
- package/src/form/select/select.stories.tsx +1 -1
- package/src/form/select/select.tsx +25 -8
- package/src/form/suggestions/index.tsx +6 -0
- package/src/form/suggestions/suggestions-item.tsx +70 -0
- package/src/form/suggestions/suggestions-wrapper.tsx +50 -0
- package/src/form/suggestions/suggestions.tsx +89 -0
- package/src/form/textarea/textarea.stories.tsx +1 -1
- package/src/form/textarea/textarea.tsx +19 -2
- package/src/form/validation-message/index.tsx +2 -0
- package/src/form/validation-message/validation-message.stories.tsx +20 -0
- package/src/form/validation-message/validation-message.tsx +18 -0
- package/src/help-text/help-text.stories.tsx +1 -1
- package/src/layout/container/container.stories.tsx +1 -1
- package/src/layout/grid/grid.stories.tsx +1 -1
- package/src/layout/stack/stack.stories.tsx +1 -1
- package/src/link/link.stories.tsx +1 -1
- package/src/list/link-list.stories.tsx +1 -1
- package/src/list/list.stories.tsx +1 -1
- package/src/message/message.stories.tsx +1 -1
- package/src/modal/modal.stories.tsx +5 -9
- package/src/navbar/navbar-expandable-menu.tsx +1 -0
- package/src/navbar/navbar.stories.tsx +1 -1
- package/src/show-more/show-more.stories.tsx +1 -1
- package/src/skeleton/skeleton.stories.tsx +1 -1
- package/src/spinner/spinner.stories.tsx +1 -1
- package/src/step-indicator/step-indicator.stories.tsx +1 -1
- package/src/styled-html/styled-html.stories.tsx +1 -1
- package/src/table/table.stories.tsx +1 -1
- package/src/tabs/tabs.stories.tsx +1 -1
- package/src/text/text.stories.tsx +1 -1
- package/src/utils/utils.ts +16 -0
- package/src/warning-banner/warning-banner.stories.tsx +1 -1
- package/dist/chunk-3VKESN3T.mjs +0 -37
- package/dist/chunk-3VKESN3T.mjs.map +0 -1
- package/dist/chunk-6OJINZ37.mjs.map +0 -1
- package/dist/chunk-77M2ZTP7.mjs.map +0 -1
- package/dist/chunk-BFM6UZGI.mjs.map +0 -1
- package/dist/chunk-BO3EWZGA.mjs +0 -78
- package/dist/chunk-BO3EWZGA.mjs.map +0 -1
- package/dist/chunk-E6OOFTRQ.mjs.map +0 -1
- package/dist/chunk-HEDGKRGC.mjs.map +0 -1
- package/dist/chunk-IJSEJZ3W.mjs +0 -1
- package/dist/chunk-J35DWEJX.mjs.map +0 -1
- package/dist/chunk-JYN2QSN2.mjs.map +0 -1
- package/dist/chunk-LHIG6RW7.mjs.map +0 -1
- package/dist/chunk-LMF3QGSF.mjs +0 -1
- package/dist/chunk-N4W3OMA2.mjs +0 -37
- package/dist/chunk-N4W3OMA2.mjs.map +0 -1
- package/dist/chunk-NBEGX26X.mjs +0 -36
- package/dist/chunk-NBEGX26X.mjs.map +0 -1
- package/dist/chunk-TYCGAA35.mjs.map +0 -1
- package/dist/chunk-W6CFPK2C.mjs.map +0 -1
- package/dist/chunk-Z2ZPTZ6F.mjs +0 -69
- package/dist/chunk-Z2ZPTZ6F.mjs.map +0 -1
- package/src/form/error-message/error-message.stories.tsx +0 -20
- /package/dist/{chunk-IJSEJZ3W.mjs.map → chunk-5J5LYE6Z.mjs.map} +0 -0
- /package/dist/{chunk-LMF3QGSF.mjs.map → chunk-5M6MEYM7.mjs.map} +0 -0
- /package/dist/{chunk-5RXT5GLF.mjs.map → chunk-F6QJWZJX.mjs.map} +0 -0
- /package/dist/{chunk-NUP7ZBVE.mjs.map → chunk-GICUX46A.mjs.map} +0 -0
- /package/dist/{chunk-GYI4NCUY.mjs.map → chunk-KPNAC2WN.mjs.map} +0 -0
- /package/dist/{chunk-R6MQFVHE.mjs.map → chunk-O55OTMJ5.mjs.map} +0 -0
- /package/dist/{chunk-YNGU3V4J.mjs.map → chunk-QDG2QLFV.mjs.map} +0 -0
- /package/dist/{chunk-B6T36QDV.mjs.map → chunk-QTC4ATZD.mjs.map} +0 -0
- /package/dist/{chunk-AGIY7SFP.mjs.map → chunk-SO7TS4TS.mjs.map} +0 -0
- /package/dist/{chunk-HBGFFKP3.mjs.map → chunk-WVCJV74B.mjs.map} +0 -0
- /package/dist/{chunk-EDPWJWQO.mjs.map → chunk-YQT2TN3U.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postenbring/hedwig-react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-bump-nodejs-24-20260909105147",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@types/react-dom": "^18.3.1",
|
|
18
18
|
"react": "^18.3.1",
|
|
19
19
|
"react-dom": "18.3.1",
|
|
20
|
-
"tsup": "^8.5.
|
|
20
|
+
"tsup": "^8.5.1",
|
|
21
21
|
"typescript": "^5.8.3",
|
|
22
22
|
"eslint-config-custom": "0.0.1",
|
|
23
23
|
"hedwig-tsconfig": "0.0.0"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@radix-ui/react-popover": "1.1.
|
|
33
|
-
"@radix-ui/react-slot": "1.
|
|
34
|
-
"@postenbring/hedwig-css": "0.0.0-
|
|
32
|
+
"@radix-ui/react-popover": "1.1.23",
|
|
33
|
+
"@radix-ui/react-slot": "1.3.3",
|
|
34
|
+
"@postenbring/hedwig-css": "0.0.0-bump-nodejs-24-20260909105147"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
-
import { Link } from "../link";
|
|
4
|
-
import { UnorderedList } from "../list";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
5
3
|
import { Accordion } from ".";
|
|
6
4
|
|
|
7
5
|
const meta: Meta<typeof Accordion> = {
|
|
@@ -19,28 +17,23 @@ export const Preview: Story = {
|
|
|
19
17
|
children: (
|
|
20
18
|
<>
|
|
21
19
|
<Accordion.Item>
|
|
22
|
-
<Accordion.Header>
|
|
20
|
+
<Accordion.Header>Can the mail be forwarded abroad?</Accordion.Header>
|
|
23
21
|
<Accordion.Content>
|
|
24
|
-
|
|
22
|
+
Yes, with some limitations. Shipments of items cannot be forwarded abroad due to customs
|
|
23
|
+
declaration.
|
|
24
|
+
</Accordion.Content>
|
|
25
|
+
</Accordion.Item>
|
|
26
|
+
<Accordion.Item defaultOpen>
|
|
27
|
+
<Accordion.Header>Will all mail be forwarded to new address?</Accordion.Header>
|
|
28
|
+
<Accordion.Content>
|
|
29
|
+
All types of addressed mail distributed through Posten will be forwarded. Within Norway,
|
|
30
|
+
it also applies to items sent in letters.
|
|
25
31
|
</Accordion.Content>
|
|
26
32
|
</Accordion.Item>
|
|
27
33
|
<Accordion.Item>
|
|
28
|
-
<Accordion.Header>
|
|
34
|
+
<Accordion.Header>How do I change my order?</Accordion.Header>
|
|
29
35
|
<Accordion.Content>
|
|
30
|
-
|
|
31
|
-
<div>
|
|
32
|
-
<p>
|
|
33
|
-
This is some really, really exciting stuff with{" "}
|
|
34
|
-
<Link href="https://www.posten.no">a link</Link> and all sorts of things like a
|
|
35
|
-
list, even!
|
|
36
|
-
</p>
|
|
37
|
-
<UnorderedList>
|
|
38
|
-
<li>Unordered</li>
|
|
39
|
-
<li>Like</li>
|
|
40
|
-
<li>You have</li>
|
|
41
|
-
<li>Never seen</li>
|
|
42
|
-
</UnorderedList>
|
|
43
|
-
</div>
|
|
36
|
+
Sign in to My address or call customer service at 22 03 00 00.
|
|
44
37
|
</Accordion.Content>
|
|
45
38
|
</Accordion.Item>
|
|
46
39
|
</>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
3
3
|
import { Blockquote } from ".";
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof Blockquote> = {
|
|
@@ -2,6 +2,9 @@ import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated This interface is deprecated and will be removed in a future release.
|
|
7
|
+
*/
|
|
5
8
|
export interface BlockquoteProps extends React.HTMLAttributes<HTMLQuoteElement> {
|
|
6
9
|
children?: React.ReactNode;
|
|
7
10
|
|
|
@@ -19,18 +22,7 @@ export interface BlockquoteProps extends React.HTMLAttributes<HTMLQuoteElement>
|
|
|
19
22
|
*/
|
|
20
23
|
asChild?: boolean;
|
|
21
24
|
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @example
|
|
25
|
-
*
|
|
26
|
-
* ```tsx
|
|
27
|
-
* <Blockquote>
|
|
28
|
-
* <p>... but they’ll never take our freedom!</p>
|
|
29
|
-
* <footer>William Wallace</footer>
|
|
30
|
-
* </Blockquote>
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
25
|
+
/** @deprecated This component is deprecated and will be removed in a future release. */
|
|
34
26
|
export const Blockquote = forwardRef<HTMLQuoteElement, BlockquoteProps>(
|
|
35
27
|
({ children, asChild, className, variant, ...rest }, ref) => {
|
|
36
28
|
const Component = asChild ? Slot : "blockquote";
|
package/src/box/box.stories.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
3
3
|
import { Text } from "../text";
|
|
4
4
|
import { Link } from "../link";
|
|
5
5
|
import { Box } from ".";
|
package/src/button/button.tsx
CHANGED
|
@@ -2,6 +2,11 @@ import { forwardRef } from "react";
|
|
|
2
2
|
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated The "inverted" variant is deprecated. Use "primary", "secondary", or "tertiary" instead.
|
|
7
|
+
*/
|
|
8
|
+
export type DeprecatedVariant = "inverted";
|
|
9
|
+
|
|
5
10
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
11
|
/**
|
|
7
12
|
* The height, font size and padding of the button
|
|
@@ -15,7 +20,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
15
20
|
*
|
|
16
21
|
* @default "primary"
|
|
17
22
|
*/
|
|
18
|
-
variant?: "primary" | "secondary" | "tertiary" |
|
|
23
|
+
variant?: "primary" | "secondary" | "tertiary" | DeprecatedVariant;
|
|
19
24
|
|
|
20
25
|
/**
|
|
21
26
|
* Make the button use 100% width available.
|
|
@@ -47,7 +52,6 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
47
52
|
* @example
|
|
48
53
|
* <Button variant="primary">Primary</Button>
|
|
49
54
|
* <Button variant="secondary" size="large">Secondary</Button>
|
|
50
|
-
* <Button variant="inverted">Inverted</Button>
|
|
51
55
|
* <Button variant="tertiary" fullWidth="mobile">Tertiary</Button>
|
|
52
56
|
* <Button icon="leading"><LeadingIcon />Leading icon</Button>
|
|
53
57
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import { Link } from "../link";
|
|
3
4
|
import { Card } from ".";
|
|
4
5
|
|
|
5
6
|
const meta: Meta<typeof Card> = {
|
|
@@ -25,17 +26,17 @@ export const Preview: Story = {
|
|
|
25
26
|
<Card.Body>
|
|
26
27
|
<Card.BodyHeader as="h2">
|
|
27
28
|
<Card.BodyHeaderOverline>Theme</Card.BodyHeaderOverline>
|
|
28
|
-
<Card.BodyHeaderTitle
|
|
29
|
-
<a href="#article">Cool article</a>
|
|
30
|
-
</Card.BodyHeaderTitle>
|
|
29
|
+
<Card.BodyHeaderTitle>Cool article</Card.BodyHeaderTitle>
|
|
31
30
|
</Card.BodyHeader>
|
|
32
31
|
<Card.BodyDescription>
|
|
33
|
-
This is a card
|
|
34
|
-
<code>Link</code> component, or a link component from your routing library. The link
|
|
35
|
-
component of your choice should be set with the <code>as</code> property on the body
|
|
36
|
-
header title. The card component provides a lot of flexibility.
|
|
32
|
+
This is a card The card component provides a lot of flexibility.
|
|
37
33
|
</Card.BodyDescription>
|
|
38
|
-
<Card.
|
|
34
|
+
<Card.BodyAction asChild>
|
|
35
|
+
<Link href="#article-1" variant="solid">
|
|
36
|
+
<Card.BodyActionArrow />
|
|
37
|
+
Go to this article
|
|
38
|
+
</Link>
|
|
39
|
+
</Card.BodyAction>
|
|
39
40
|
</Card.Body>
|
|
40
41
|
</Card>
|
|
41
42
|
),
|
package/src/card/card.tsx
CHANGED
|
@@ -29,7 +29,7 @@ export interface CardImageMediaProps extends React.ImgHTMLAttributes<HTMLImageEl
|
|
|
29
29
|
* "scale": No cropping, image scales to the maximum size available and centers.
|
|
30
30
|
* If the aspect ratio doesn't match, then the background will show on the top/bottom or left/right sides of the image.
|
|
31
31
|
*
|
|
32
|
-
* @default "
|
|
32
|
+
* @default "scale"
|
|
33
33
|
*/
|
|
34
34
|
variant?: "crop" | "scale";
|
|
35
35
|
}
|
|
@@ -41,7 +41,7 @@ export const CardMediaImg = forwardRef<HTMLImageElement, CardImageMediaProps>(
|
|
|
41
41
|
{...rest}
|
|
42
42
|
className={clsx(
|
|
43
43
|
"hds-card__media__img",
|
|
44
|
-
{ "hds-
|
|
44
|
+
{ "hds-card__img__crop": variant === "crop" },
|
|
45
45
|
className as undefined,
|
|
46
46
|
)}
|
|
47
47
|
ref={ref}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
3
3
|
import { DescriptionList } from ".";
|
|
4
4
|
|
|
5
5
|
type Story = StoryObj<typeof DescriptionList>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
3
3
|
import { Checkbox } from "./index";
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof Checkbox> = {
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { forwardRef, useId, type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
2
|
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
3
|
-
import {
|
|
3
|
+
import { ValidationMessage, type ValidationMessageProps } from "../validation-message";
|
|
4
|
+
import { type ErrorMessageProps } from "../error-message";
|
|
4
5
|
import { useFieldsetContext } from "../fieldset";
|
|
6
|
+
import { getValidationMessageValue } from "../../utils";
|
|
5
7
|
|
|
6
|
-
export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue"> & {
|
|
8
|
+
export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "size"> & {
|
|
7
9
|
children: ReactNode;
|
|
8
10
|
variant?: "plain" | "bounding-box";
|
|
9
11
|
title?: string;
|
|
12
|
+
validationMessage?: ReactNode | { value: ReactNode };
|
|
13
|
+
validationMessageProps?: Partial<ValidationMessageProps>;
|
|
14
|
+
/** @deprecated Use `validationMessageProps` instead */
|
|
10
15
|
errorMessageProps?: Partial<ErrorMessageProps>;
|
|
16
|
+
size?: "small" | "";
|
|
11
17
|
} & (
|
|
12
18
|
| {
|
|
13
19
|
/**
|
|
@@ -19,6 +25,8 @@ export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "default
|
|
|
19
25
|
* You can use this when your checkbox is part of a non-HDS fieldset which shows an error message.
|
|
20
26
|
*/
|
|
21
27
|
hasError?: boolean;
|
|
28
|
+
//validationMessage?: never;
|
|
29
|
+
/** @deprecated Use `validationMessage` instead */
|
|
22
30
|
errorMessage?: never;
|
|
23
31
|
}
|
|
24
32
|
| {
|
|
@@ -29,6 +37,8 @@ export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "default
|
|
|
29
37
|
*
|
|
30
38
|
* Use this when your checkbox is standalone (not part of a fieldset).
|
|
31
39
|
*/
|
|
40
|
+
//validationMessage?: ReactNode;
|
|
41
|
+
/** @deprecated Use `validationMessage` instead */
|
|
32
42
|
errorMessage?: ReactNode;
|
|
33
43
|
}
|
|
34
44
|
);
|
|
@@ -38,47 +48,58 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
|
|
|
38
48
|
{
|
|
39
49
|
variant = "plain",
|
|
40
50
|
hasError: hasErrorProp,
|
|
51
|
+
validationMessage,
|
|
52
|
+
validationMessageProps,
|
|
41
53
|
errorMessage,
|
|
42
54
|
errorMessageProps,
|
|
43
55
|
title,
|
|
44
56
|
children,
|
|
45
57
|
className,
|
|
58
|
+
size = "",
|
|
46
59
|
...rest
|
|
47
60
|
},
|
|
48
61
|
ref,
|
|
49
62
|
) => {
|
|
50
|
-
const
|
|
51
|
-
const { hasError: hasFieldsetError } = useFieldsetContext();
|
|
63
|
+
const validationMessageId = useId();
|
|
64
|
+
const { hasError: hasFieldsetError, size: fieldsetSize } = useFieldsetContext();
|
|
52
65
|
const hasError = !!errorMessage || hasFieldsetError || hasErrorProp;
|
|
66
|
+
const effectiveSize = size || fieldsetSize;
|
|
67
|
+
const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);
|
|
53
68
|
|
|
54
69
|
return (
|
|
55
|
-
<div
|
|
70
|
+
<div
|
|
71
|
+
className={clsx("hds-checkbox-wrapper", {
|
|
72
|
+
"hds-checkbox-wrapper--small": effectiveSize === "small",
|
|
73
|
+
})}
|
|
74
|
+
>
|
|
56
75
|
<div
|
|
57
76
|
className={clsx(
|
|
58
77
|
"hds-checkbox",
|
|
59
78
|
{
|
|
60
79
|
[`hds-checkbox--${variant}`]: variant === "bounding-box",
|
|
61
|
-
"hds-checkbox--error": hasError,
|
|
62
80
|
},
|
|
63
81
|
className as undefined,
|
|
64
82
|
)}
|
|
65
83
|
>
|
|
66
84
|
<label>
|
|
67
85
|
<input
|
|
68
|
-
{...rest}
|
|
69
86
|
aria-invalid={hasError ? true : undefined}
|
|
70
|
-
aria-describedby={
|
|
87
|
+
aria-describedby={validationMessageValue ? validationMessageId : undefined}
|
|
71
88
|
ref={ref}
|
|
72
89
|
type="checkbox"
|
|
90
|
+
{...rest}
|
|
73
91
|
/>
|
|
74
92
|
<span aria-hidden className="hds-checkbox__checkmark" />
|
|
75
93
|
{title ? <p className="hds-checkbox__title">{title}</p> : children}
|
|
76
94
|
</label>
|
|
77
95
|
{title ? children : null}
|
|
78
96
|
</div>
|
|
79
|
-
<
|
|
80
|
-
{
|
|
81
|
-
|
|
97
|
+
<ValidationMessage
|
|
98
|
+
id={validationMessageId}
|
|
99
|
+
{...(validationMessageProps ?? errorMessageProps)}
|
|
100
|
+
>
|
|
101
|
+
{validationMessageValue}
|
|
102
|
+
</ValidationMessage>
|
|
82
103
|
</div>
|
|
83
104
|
);
|
|
84
105
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
3
3
|
import { DatePicker } from ".";
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof DatePicker> = {
|
|
@@ -31,6 +31,8 @@ export const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function
|
|
|
31
31
|
{
|
|
32
32
|
className,
|
|
33
33
|
size,
|
|
34
|
+
validationMessage,
|
|
35
|
+
validationMessageProps,
|
|
34
36
|
errorMessage,
|
|
35
37
|
labelProps,
|
|
36
38
|
label,
|
|
@@ -38,6 +40,7 @@ export const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function
|
|
|
38
40
|
style,
|
|
39
41
|
disabled,
|
|
40
42
|
readOnly,
|
|
43
|
+
"data-color": dataColor,
|
|
41
44
|
calendarButtonTitle = "Åpne kalender",
|
|
42
45
|
...rest
|
|
43
46
|
},
|
|
@@ -50,6 +53,8 @@ export const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function
|
|
|
50
53
|
<InputGroup
|
|
51
54
|
className={clsx("hds-date-picker", className as undefined)}
|
|
52
55
|
disabled={disabled}
|
|
56
|
+
validationMessage={validationMessage}
|
|
57
|
+
validationMessageProps={validationMessageProps}
|
|
53
58
|
errorMessage={errorMessage}
|
|
54
59
|
id={id}
|
|
55
60
|
label={label}
|
|
@@ -57,16 +62,17 @@ export const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function
|
|
|
57
62
|
readOnly={readOnly}
|
|
58
63
|
style={style}
|
|
59
64
|
size={size}
|
|
65
|
+
data-color={dataColor}
|
|
60
66
|
>
|
|
61
67
|
{(inputProps) => (
|
|
62
68
|
<>
|
|
63
69
|
<input
|
|
64
|
-
{...rest}
|
|
65
70
|
{...inputProps}
|
|
66
71
|
disabled={disabled}
|
|
67
72
|
readOnly={readOnly}
|
|
68
73
|
ref={mergedRef}
|
|
69
74
|
type="date"
|
|
75
|
+
{...rest}
|
|
70
76
|
/>
|
|
71
77
|
<button
|
|
72
78
|
className={clsx("hds-date-picker__calendar-button")}
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
2
1
|
import { forwardRef, type ReactNode } from "react";
|
|
2
|
+
import { ValidationMessage } from "../validation-message";
|
|
3
3
|
|
|
4
|
+
/** @deprecated Use ValidationMessageProps instead */
|
|
4
5
|
export interface ErrorMessageProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
6
|
children: ReactNode;
|
|
6
7
|
id: string;
|
|
7
8
|
className?: string;
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
/** @deprecated Use ValidationMessage with data-color="error" instead */
|
|
10
12
|
export const ErrorMessage = forwardRef<HTMLDivElement, ErrorMessageProps>(
|
|
11
|
-
({ children, id, className, ...rest }, ref) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
id={id}
|
|
17
|
-
ref={ref}
|
|
18
|
-
{...rest}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
</div>
|
|
22
|
-
);
|
|
23
|
-
},
|
|
13
|
+
({ children, id, className, ...rest }, ref) => (
|
|
14
|
+
<ValidationMessage id={id} data-color="error" className={className} {...rest} ref={ref}>
|
|
15
|
+
{children}
|
|
16
|
+
</ValidationMessage>
|
|
17
|
+
),
|
|
24
18
|
);
|
|
25
19
|
ErrorMessage.displayName = "ErrorMessage";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
3
3
|
import { ErrorSummary } from ".";
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof ErrorSummary> = {
|
|
@@ -129,7 +129,12 @@ export type ErrorSummaryProps = Omit<
|
|
|
129
129
|
|
|
130
130
|
export const ErrorSummary = forwardRef<HTMLDivElement, ErrorSummaryProps>(
|
|
131
131
|
({ children, className, ...rest }, ref) => (
|
|
132
|
-
<Box
|
|
132
|
+
<Box
|
|
133
|
+
data-color="error"
|
|
134
|
+
ref={ref}
|
|
135
|
+
{...rest}
|
|
136
|
+
className={clsx(`hds-error-summary`, className as undefined)}
|
|
137
|
+
>
|
|
133
138
|
{children}
|
|
134
139
|
</Box>
|
|
135
140
|
),
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { forwardRef, type HTMLAttributes } from "react";
|
|
2
|
+
|
|
3
|
+
export type FieldsetDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* FieldsetDescription component, used to display a description for a fieldset.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* <FieldsetDescription>
|
|
10
|
+
* Gi en kort beskrivelse i begge feltene
|
|
11
|
+
* </FieldsetDescription>
|
|
12
|
+
*/
|
|
13
|
+
export const FieldsetDescription = forwardRef<HTMLParagraphElement, FieldsetDescriptionProps>(
|
|
14
|
+
function FieldsetDescription(rest, ref) {
|
|
15
|
+
return <p className="hds-fieldset__description" ref={ref} {...rest} />;
|
|
16
|
+
},
|
|
17
|
+
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { forwardRef, type HTMLAttributes } from "react";
|
|
2
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* FieldsetLegend component, used to display a legend for a fieldset.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <FieldsetLegend>Skriv inn dine svar</FieldsetLegend>
|
|
9
|
+
*/
|
|
10
|
+
export const FieldsetLegend = forwardRef<HTMLLegendElement, HTMLAttributes<HTMLLegendElement>>(
|
|
11
|
+
function FieldsetLegend({ className, ...rest }, ref) {
|
|
12
|
+
return (
|
|
13
|
+
<legend
|
|
14
|
+
className={clsx("hds-fieldset__legend", className as undefined)}
|
|
15
|
+
ref={ref}
|
|
16
|
+
{...rest}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
FieldsetLegend.displayName = "Fieldset.Legend";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
3
3
|
import { Checkbox } from "../checkbox";
|
|
4
4
|
import { Fieldset } from ".";
|
|
5
5
|
|
|
@@ -15,11 +15,12 @@ type Story = StoryObj<typeof Fieldset>;
|
|
|
15
15
|
export const Preview: Story = {
|
|
16
16
|
tags: ["!dev"],
|
|
17
17
|
args: {
|
|
18
|
-
legend: "Default fieldset",
|
|
19
18
|
errorMessage: "",
|
|
20
19
|
},
|
|
21
20
|
render: (props) => (
|
|
22
21
|
<Fieldset {...props}>
|
|
22
|
+
<Fieldset.Legend>Default fieldset</Fieldset.Legend>
|
|
23
|
+
<Fieldset.Description>This is a description</Fieldset.Description>
|
|
23
24
|
<Checkbox defaultChecked value="Hello">
|
|
24
25
|
Hello
|
|
25
26
|
</Checkbox>
|