@postenbring/hedwig-react 0.0.86 → 0.0.88
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.mjs +2 -2
- package/dist/accordion/accordion-header.mjs +2 -2
- package/dist/accordion/accordion-item.mjs +2 -2
- package/dist/accordion/accordion.mjs +5 -5
- package/dist/accordion/context.mjs +1 -1
- package/dist/accordion/index.mjs +5 -5
- package/dist/badge/badge.d.ts +7 -3
- package/dist/badge/badge.d.ts.map +1 -1
- package/dist/badge/badge.js.map +1 -1
- package/dist/badge/badge.mjs +2 -2
- package/dist/badge/index.js.map +1 -1
- package/dist/badge/index.mjs +2 -2
- package/dist/blockquote/blockquote.d.ts +29 -0
- package/dist/blockquote/blockquote.d.ts.map +1 -0
- package/dist/blockquote/blockquote.js +83 -0
- package/dist/blockquote/blockquote.js.map +1 -0
- package/dist/blockquote/blockquote.mjs +8 -0
- package/dist/blockquote/index.d.ts +3 -0
- package/dist/blockquote/index.d.ts.map +1 -0
- package/dist/blockquote/index.js +85 -0
- package/dist/blockquote/index.js.map +1 -0
- package/dist/blockquote/index.mjs +9 -0
- package/dist/box/box.mjs +2 -2
- package/dist/box/index.mjs +2 -2
- package/dist/breadcrumbs/breadcrumbs.mjs +2 -2
- package/dist/breadcrumbs/index.mjs +2 -2
- package/dist/button/button.mjs +2 -2
- package/dist/button/index.mjs +2 -2
- package/dist/card/card.mjs +2 -2
- package/dist/card/index.mjs +2 -2
- package/dist/{chunk-CCVZAHYA.mjs → chunk-35QRZSEV.mjs} +2 -2
- package/dist/chunk-3H7S7C3S.mjs +37 -0
- package/dist/chunk-3H7S7C3S.mjs.map +1 -0
- package/dist/{chunk-AJWSQEDP.mjs → chunk-3OGHJOJF.mjs} +2 -2
- package/dist/{chunk-USXU6ULZ.mjs → chunk-4QZR2H72.mjs} +2 -2
- package/dist/{chunk-FB5GEZNH.mjs → chunk-5UGT7L7R.mjs} +3 -3
- package/dist/{chunk-XFODQH3I.mjs → chunk-6BXKRPR3.mjs} +3 -3
- package/dist/{chunk-IHZ2MRF6.mjs → chunk-6VKQ6IRG.mjs} +8 -12
- package/dist/{chunk-IHZ2MRF6.mjs.map → chunk-6VKQ6IRG.mjs.map} +1 -1
- package/dist/{chunk-EVUKWONG.mjs → chunk-6ZO2TMOX.mjs} +3 -3
- package/dist/{chunk-F4STR6SD.mjs → chunk-7ROE6ADK.mjs} +2 -3
- package/dist/{chunk-F4STR6SD.mjs.map → chunk-7ROE6ADK.mjs.map} +1 -1
- package/dist/{chunk-YSFZCRWS.mjs → chunk-A42PXOVR.mjs} +2 -2
- package/dist/{chunk-6MR5XZOX.mjs → chunk-AYCHNAU7.mjs} +2 -2
- package/dist/{chunk-NU6OSFAU.mjs → chunk-AZ6X4L5C.mjs} +2 -2
- package/dist/{chunk-SQ63E7KM.mjs → chunk-BHQ46L2O.mjs} +3 -3
- package/dist/{chunk-HMATZX4A.mjs → chunk-C7ZTOZP3.mjs} +2 -2
- package/dist/{chunk-RZZDMBB7.mjs → chunk-CC5QWW52.mjs} +2 -2
- package/dist/{chunk-B6L7IFDX.mjs → chunk-CXX4SXJG.mjs} +5 -5
- package/dist/{chunk-GGQB2WWD.mjs → chunk-DMOMTRIY.mjs} +2 -2
- package/dist/{chunk-KI6WRKZY.mjs → chunk-EAFQ3XQU.mjs} +4 -4
- package/dist/{chunk-I3ZIMS72.mjs → chunk-EGW3RCXD.mjs} +3 -3
- package/dist/chunk-EGW3RCXD.mjs.map +1 -0
- package/dist/{chunk-L4YBHIS3.mjs → chunk-EMQB6JIS.mjs} +2 -2
- package/dist/{chunk-SKVM7G76.mjs → chunk-EZVEYJOX.mjs} +2 -2
- package/dist/{chunk-AXKJB47E.mjs → chunk-FUIKSOJF.mjs} +3 -3
- package/dist/{chunk-TDXU2IC6.mjs → chunk-ILFK3VKS.mjs} +7 -12
- package/dist/{chunk-TDXU2IC6.mjs.map → chunk-ILFK3VKS.mjs.map} +1 -1
- package/dist/{chunk-AXQCREUJ.mjs → chunk-J5SCUELT.mjs} +4 -5
- package/dist/{chunk-AXQCREUJ.mjs.map → chunk-J5SCUELT.mjs.map} +1 -1
- package/dist/{chunk-LG7QWKFP.mjs → chunk-JQGB77SS.mjs} +3 -3
- package/dist/chunk-JQGB77SS.mjs.map +1 -0
- package/dist/{chunk-UB2R7TCG.mjs → chunk-JUHJZLH2.mjs} +2 -2
- package/dist/chunk-JYN2QSN2.mjs +36 -0
- package/dist/chunk-JYN2QSN2.mjs.map +1 -0
- package/dist/{chunk-VCQIR53Y.mjs → chunk-JZXZYEPG.mjs} +2 -2
- package/dist/{chunk-6FBPKLWB.mjs → chunk-KCEWKQ4W.mjs} +8 -13
- package/dist/{chunk-6FBPKLWB.mjs.map → chunk-KCEWKQ4W.mjs.map} +1 -1
- package/dist/chunk-KFDS3IPB.mjs +1 -0
- package/dist/{chunk-DEZVONZD.mjs → chunk-KNGG6M2I.mjs} +4 -4
- package/dist/{chunk-WHMIHTPC.mjs → chunk-LGEGXOPU.mjs} +2 -2
- package/dist/{chunk-OIC2CPID.mjs → chunk-M7MG7ZQT.mjs} +4 -4
- package/dist/{chunk-HJYS664B.mjs → chunk-MYVC3HMO.mjs} +2 -2
- package/dist/{chunk-WPCWXROV.mjs → chunk-NIYDN3Y3.mjs} +3 -3
- package/dist/{chunk-GQUFERB2.mjs → chunk-OXZOGFNV.mjs} +2 -2
- package/dist/chunk-OXZOGFNV.mjs.map +1 -0
- package/dist/{chunk-GRWLX5BC.mjs → chunk-ROQH67YP.mjs} +5 -5
- package/dist/{chunk-GGNMBB3K.mjs → chunk-S3QSGJX2.mjs} +3 -3
- package/dist/{chunk-UP3M3NEZ.mjs → chunk-TC5PD4TA.mjs} +3 -3
- package/dist/{chunk-O4HIHUMD.mjs → chunk-UL2V2Z5B.mjs} +15 -17
- package/dist/chunk-UL2V2Z5B.mjs.map +1 -0
- package/dist/{chunk-MJ2DZH3N.mjs → chunk-VYS2QNTL.mjs} +2 -2
- package/dist/{chunk-JF3HBGAA.mjs → chunk-WLESNP6Z.mjs} +2 -2
- package/dist/{chunk-BVPSZ3JI.mjs → chunk-WUPLEZEY.mjs} +4 -4
- package/dist/chunk-XAFNJELJ.mjs +1 -0
- package/dist/{chunk-5UJ3LEKK.mjs → chunk-XQBJ75VD.mjs} +2 -2
- package/dist/{chunk-R4SQKVDQ.mjs → chunk-YOSPWY5K.mjs} +1 -1
- package/dist/{chunk-GJO7Z2YL.mjs → chunk-YS7HBWOI.mjs} +5 -4
- package/dist/chunk-YS7HBWOI.mjs.map +1 -0
- package/dist/{chunk-D7QPJIUZ.mjs → chunk-YZDURLEY.mjs} +3 -3
- package/dist/{chunk-COEZA7WA.mjs → chunk-Z2ZCM4BE.mjs} +3 -3
- package/dist/{chunk-EMI7NAO2.mjs → chunk-ZOZPWP3N.mjs} +2 -2
- package/dist/description-list/description-list.mjs +2 -2
- package/dist/description-list/index.mjs +2 -2
- package/dist/footer/footer.mjs +9 -9
- package/dist/footer/index.mjs +9 -9
- package/dist/form/checkbox/checkbox.js.map +1 -1
- package/dist/form/checkbox/checkbox.mjs +4 -4
- package/dist/form/checkbox/index.js.map +1 -1
- package/dist/form/checkbox/index.mjs +4 -4
- package/dist/form/date-picker/date-picker.mjs +5 -5
- package/dist/form/date-picker/index.mjs +5 -5
- package/dist/form/error-message/error-message.mjs +2 -2
- package/dist/form/error-message/index.mjs +2 -2
- package/dist/form/fieldset/fieldset.d.ts +2 -2
- package/dist/form/fieldset/fieldset.js.map +1 -1
- package/dist/form/fieldset/fieldset.mjs +3 -3
- package/dist/form/fieldset/index.js.map +1 -1
- package/dist/form/fieldset/index.mjs +3 -3
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form/index.js +15 -16
- package/dist/form/index.js.map +1 -1
- package/dist/form/index.mjs +23 -23
- package/dist/form/input/index.mjs +4 -4
- package/dist/form/input/input.mjs +4 -4
- package/dist/form/input-group/index.mjs +3 -3
- package/dist/form/input-group/input-group.mjs +3 -3
- package/dist/form/radio-button/index.d.ts +5 -0
- package/dist/form/radio-button/index.d.ts.map +1 -0
- package/dist/form/{radiobutton → radio-button}/index.js +19 -20
- package/dist/form/radio-button/index.js.map +1 -0
- package/dist/form/radio-button/index.mjs +19 -0
- package/dist/form/radio-button/index.mjs.map +1 -0
- package/dist/form/{radiobutton/radiobutton.d.ts → radio-button/radio-button.d.ts} +6 -6
- package/dist/form/radio-button/radio-button.d.ts.map +1 -0
- package/dist/form/{radiobutton/radiobutton.js → radio-button/radio-button.js} +19 -20
- package/dist/form/radio-button/radio-button.js.map +1 -0
- package/dist/form/radio-button/radio-button.mjs +13 -0
- package/dist/form/radio-button/radio-button.mjs.map +1 -0
- package/dist/form/{radiobutton/radiogroup.d.ts → radio-button/radio-group.d.ts} +7 -7
- package/dist/form/radio-button/radio-group.d.ts.map +1 -0
- package/dist/form/{radiobutton/radiogroup.js → radio-button/radio-group.js} +7 -6
- package/dist/form/radio-button/radio-group.js.map +1 -0
- package/dist/form/radio-button/radio-group.mjs +14 -0
- package/dist/form/radio-button/radio-group.mjs.map +1 -0
- package/dist/form/select/index.mjs +4 -4
- package/dist/form/select/select.mjs +4 -4
- package/dist/form/textarea/index.mjs +4 -4
- package/dist/form/textarea/textarea.mjs +4 -4
- package/dist/help-text/help-text.mjs +3 -3
- package/dist/help-text/index.mjs +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +557 -535
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +86 -81
- package/dist/layout/container/container.mjs +2 -2
- package/dist/layout/grid/grid.js +1 -2
- package/dist/layout/grid/grid.js.map +1 -1
- package/dist/layout/grid/grid.mjs +3 -3
- package/dist/layout/grid/index.js +1 -2
- package/dist/layout/grid/index.js.map +1 -1
- package/dist/layout/grid/index.mjs +3 -3
- package/dist/layout/index.js +1 -2
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/index.mjs +5 -5
- package/dist/layout/responsive.js +1 -2
- package/dist/layout/responsive.js.map +1 -1
- package/dist/layout/responsive.mjs +2 -2
- package/dist/layout/spacing.mjs +1 -1
- package/dist/layout/stack/index.js +1 -2
- package/dist/layout/stack/index.js.map +1 -1
- package/dist/layout/stack/index.mjs +3 -3
- package/dist/layout/stack/stack.js +1 -2
- package/dist/layout/stack/stack.js.map +1 -1
- package/dist/layout/stack/stack.mjs +3 -3
- package/dist/link/index.mjs +2 -2
- package/dist/link/link.mjs +2 -2
- package/dist/list/index.mjs +3 -3
- package/dist/list/link-list.mjs +3 -3
- package/dist/list/list.mjs +2 -2
- package/dist/message/index.mjs +3 -3
- package/dist/message/message.mjs +3 -3
- package/dist/modal/index.js +4 -8
- package/dist/modal/index.js.map +1 -1
- package/dist/modal/index.mjs +4 -4
- package/dist/modal/modal.js +4 -8
- package/dist/modal/modal.js.map +1 -1
- package/dist/modal/modal.mjs +4 -4
- package/dist/navbar/icons.d.ts.map +1 -1
- package/dist/navbar/icons.js +16 -5
- package/dist/navbar/icons.js.map +1 -1
- package/dist/navbar/icons.mjs +2 -2
- package/dist/navbar/index.js +22 -16
- package/dist/navbar/index.js.map +1 -1
- package/dist/navbar/index.mjs +5 -5
- package/dist/navbar/navbar-expandable-menu.js +22 -16
- package/dist/navbar/navbar-expandable-menu.js.map +1 -1
- package/dist/navbar/navbar-expandable-menu.mjs +4 -4
- package/dist/navbar/navbar.js +22 -16
- package/dist/navbar/navbar.js.map +1 -1
- package/dist/navbar/navbar.mjs +5 -5
- package/dist/show-more/index.mjs +2 -2
- package/dist/show-more/show-more.mjs +2 -2
- package/dist/skeleton/index.mjs +2 -2
- package/dist/skeleton/skeleton.mjs +2 -2
- package/dist/step-indicator/index.mjs +2 -2
- package/dist/step-indicator/step-indicator.mjs +2 -2
- package/dist/styled-html/index.js +1 -1
- package/dist/styled-html/index.js.map +1 -1
- package/dist/styled-html/index.mjs +2 -2
- package/dist/styled-html/styled-html.d.ts +9 -1
- package/dist/styled-html/styled-html.d.ts.map +1 -1
- package/dist/styled-html/styled-html.js +1 -1
- package/dist/styled-html/styled-html.js.map +1 -1
- package/dist/styled-html/styled-html.mjs +2 -2
- package/dist/table/index.mjs +2 -2
- package/dist/table/table.mjs +2 -2
- package/dist/tabs/context.mjs +1 -1
- package/dist/tabs/index.js +1 -2
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +5 -5
- package/dist/tabs/tabs-content.mjs +2 -2
- package/dist/tabs/tabs-list.js +1 -2
- package/dist/tabs/tabs-list.js.map +1 -1
- package/dist/tabs/tabs-list.mjs +3 -3
- package/dist/tabs/tabs.js +1 -2
- package/dist/tabs/tabs.js.map +1 -1
- package/dist/tabs/tabs.mjs +5 -5
- package/dist/text/index.mjs +2 -2
- package/dist/text/text.mjs +2 -2
- package/dist/utils/auto-animate-height.js +5 -10
- package/dist/utils/auto-animate-height.js.map +1 -1
- package/dist/utils/auto-animate-height.mjs +3 -3
- package/dist/utils/index.js +11 -21
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +3 -3
- package/dist/utils/utils.js +6 -11
- package/dist/utils/utils.js.map +1 -1
- package/dist/utils/utils.mjs +2 -2
- package/dist/warning-banner/index.mjs +2 -2
- package/dist/warning-banner/warning-banner.mjs +2 -2
- package/package.json +3 -3
- package/src/accordion/accordion.stories.tsx +7 -113
- package/src/badge/badge.stories.tsx +1 -30
- package/src/badge/badge.tsx +7 -3
- package/src/blockquote/blockquote.stories.tsx +21 -0
- package/src/blockquote/blockquote.tsx +52 -0
- package/src/blockquote/index.tsx +3 -0
- package/src/box/box.stories.tsx +13 -84
- package/src/breadcrumbs/breadcrumbs.stories.tsx +7 -22
- package/src/button/button.stories.tsx +1 -85
- package/src/card/card.stories.tsx +1 -42
- package/src/description-list/description-list.stories.tsx +5 -71
- package/src/form/checkbox/checkbox.stories.tsx +4 -80
- package/src/form/date-picker/date-picker.stories.tsx +7 -7
- package/src/form/error-message/error-message.stories.tsx +2 -2
- package/src/form/fieldset/fieldset.stories.tsx +1 -58
- package/src/form/fieldset/fieldset.tsx +2 -2
- package/src/form/index.tsx +1 -1
- package/src/form/input/input.stories.tsx +1 -142
- package/src/form/radio-button/index.tsx +4 -0
- package/src/form/radio-button/radio-button.stories.tsx +25 -0
- package/src/form/{radiobutton/radiobutton.tsx → radio-button/radio-button.tsx} +13 -13
- package/src/form/{radiobutton/radiogroup.stories.tsx → radio-button/radio-group.stories.tsx} +8 -9
- package/src/form/{radiobutton/radiogroup.tsx → radio-button/radio-group.tsx} +7 -6
- package/src/form/select/select.stories.tsx +1 -61
- package/src/form/textarea/textarea.stories.tsx +4 -85
- package/src/help-text/help-text.stories.tsx +19 -0
- package/src/index.ts +1 -0
- package/src/layout/container/container.stories.tsx +17 -14
- package/src/layout/grid/grid.stories.tsx +27 -0
- package/src/layout/stack/stack.stories.tsx +27 -0
- package/src/link/link.stories.tsx +7 -38
- package/src/list/link-list.stories.tsx +24 -27
- package/src/list/list.stories.tsx +10 -48
- package/src/message/message.stories.tsx +7 -65
- package/src/modal/modal.stories.tsx +1 -103
- package/src/navbar/icons.tsx +10 -3
- package/src/navbar/navbar.stories.tsx +22 -62
- package/src/show-more/show-more.stories.tsx +2 -98
- package/src/skeleton/skeleton.stories.tsx +2 -126
- package/src/step-indicator/step-indicator.stories.tsx +1 -31
- package/src/styled-html/styled-html.stories.tsx +21 -155
- package/src/styled-html/styled-html.tsx +12 -2
- package/src/table/table.stories.tsx +42 -0
- package/src/tabs/tabs.stories.tsx +7 -114
- package/src/text/text.stories.tsx +17 -83
- package/src/warning-banner/warning-banner.stories.tsx +1 -23
- package/dist/chunk-2KX7VFN2.mjs +0 -1
- package/dist/chunk-GJO7Z2YL.mjs.map +0 -1
- package/dist/chunk-GQUFERB2.mjs.map +0 -1
- package/dist/chunk-I3ZIMS72.mjs.map +0 -1
- package/dist/chunk-LG7QWKFP.mjs.map +0 -1
- package/dist/chunk-MOU6WBT2.mjs +0 -26
- package/dist/chunk-MOU6WBT2.mjs.map +0 -1
- package/dist/chunk-O4HIHUMD.mjs.map +0 -1
- package/dist/form/radiobutton/index.d.ts +0 -5
- package/dist/form/radiobutton/index.d.ts.map +0 -1
- package/dist/form/radiobutton/index.js.map +0 -1
- package/dist/form/radiobutton/index.mjs +0 -19
- package/dist/form/radiobutton/radiobutton.d.ts.map +0 -1
- package/dist/form/radiobutton/radiobutton.js.map +0 -1
- package/dist/form/radiobutton/radiobutton.mjs +0 -13
- package/dist/form/radiobutton/radiogroup.d.ts.map +0 -1
- package/dist/form/radiobutton/radiogroup.js.map +0 -1
- package/dist/form/radiobutton/radiogroup.mjs +0 -14
- package/src/form/radiobutton/index.tsx +0 -4
- package/src/form/radiobutton/radiobutton.stories.tsx +0 -93
- /package/dist/{chunk-2KX7VFN2.mjs.map → blockquote/blockquote.mjs.map} +0 -0
- /package/dist/{form/radiobutton → blockquote}/index.mjs.map +0 -0
- /package/dist/{chunk-CCVZAHYA.mjs.map → chunk-35QRZSEV.mjs.map} +0 -0
- /package/dist/{chunk-AJWSQEDP.mjs.map → chunk-3OGHJOJF.mjs.map} +0 -0
- /package/dist/{chunk-USXU6ULZ.mjs.map → chunk-4QZR2H72.mjs.map} +0 -0
- /package/dist/{chunk-FB5GEZNH.mjs.map → chunk-5UGT7L7R.mjs.map} +0 -0
- /package/dist/{chunk-XFODQH3I.mjs.map → chunk-6BXKRPR3.mjs.map} +0 -0
- /package/dist/{chunk-EVUKWONG.mjs.map → chunk-6ZO2TMOX.mjs.map} +0 -0
- /package/dist/{chunk-YSFZCRWS.mjs.map → chunk-A42PXOVR.mjs.map} +0 -0
- /package/dist/{chunk-6MR5XZOX.mjs.map → chunk-AYCHNAU7.mjs.map} +0 -0
- /package/dist/{chunk-NU6OSFAU.mjs.map → chunk-AZ6X4L5C.mjs.map} +0 -0
- /package/dist/{chunk-SQ63E7KM.mjs.map → chunk-BHQ46L2O.mjs.map} +0 -0
- /package/dist/{chunk-HMATZX4A.mjs.map → chunk-C7ZTOZP3.mjs.map} +0 -0
- /package/dist/{chunk-RZZDMBB7.mjs.map → chunk-CC5QWW52.mjs.map} +0 -0
- /package/dist/{chunk-B6L7IFDX.mjs.map → chunk-CXX4SXJG.mjs.map} +0 -0
- /package/dist/{chunk-GGQB2WWD.mjs.map → chunk-DMOMTRIY.mjs.map} +0 -0
- /package/dist/{chunk-KI6WRKZY.mjs.map → chunk-EAFQ3XQU.mjs.map} +0 -0
- /package/dist/{chunk-L4YBHIS3.mjs.map → chunk-EMQB6JIS.mjs.map} +0 -0
- /package/dist/{chunk-SKVM7G76.mjs.map → chunk-EZVEYJOX.mjs.map} +0 -0
- /package/dist/{chunk-AXKJB47E.mjs.map → chunk-FUIKSOJF.mjs.map} +0 -0
- /package/dist/{chunk-UB2R7TCG.mjs.map → chunk-JUHJZLH2.mjs.map} +0 -0
- /package/dist/{chunk-VCQIR53Y.mjs.map → chunk-JZXZYEPG.mjs.map} +0 -0
- /package/dist/{chunk-R4SQKVDQ.mjs.map → chunk-KFDS3IPB.mjs.map} +0 -0
- /package/dist/{chunk-DEZVONZD.mjs.map → chunk-KNGG6M2I.mjs.map} +0 -0
- /package/dist/{chunk-WHMIHTPC.mjs.map → chunk-LGEGXOPU.mjs.map} +0 -0
- /package/dist/{chunk-OIC2CPID.mjs.map → chunk-M7MG7ZQT.mjs.map} +0 -0
- /package/dist/{chunk-HJYS664B.mjs.map → chunk-MYVC3HMO.mjs.map} +0 -0
- /package/dist/{chunk-WPCWXROV.mjs.map → chunk-NIYDN3Y3.mjs.map} +0 -0
- /package/dist/{chunk-GRWLX5BC.mjs.map → chunk-ROQH67YP.mjs.map} +0 -0
- /package/dist/{chunk-GGNMBB3K.mjs.map → chunk-S3QSGJX2.mjs.map} +0 -0
- /package/dist/{chunk-UP3M3NEZ.mjs.map → chunk-TC5PD4TA.mjs.map} +0 -0
- /package/dist/{chunk-MJ2DZH3N.mjs.map → chunk-VYS2QNTL.mjs.map} +0 -0
- /package/dist/{chunk-JF3HBGAA.mjs.map → chunk-WLESNP6Z.mjs.map} +0 -0
- /package/dist/{chunk-BVPSZ3JI.mjs.map → chunk-WUPLEZEY.mjs.map} +0 -0
- /package/dist/{form/radiobutton/radiobutton.mjs.map → chunk-XAFNJELJ.mjs.map} +0 -0
- /package/dist/{chunk-5UJ3LEKK.mjs.map → chunk-XQBJ75VD.mjs.map} +0 -0
- /package/dist/{form/radiobutton/radiogroup.mjs.map → chunk-YOSPWY5K.mjs.map} +0 -0
- /package/dist/{chunk-D7QPJIUZ.mjs.map → chunk-YZDURLEY.mjs.map} +0 -0
- /package/dist/{chunk-COEZA7WA.mjs.map → chunk-Z2ZCM4BE.mjs.map} +0 -0
- /package/dist/{chunk-EMI7NAO2.mjs.map → chunk-ZOZPWP3N.mjs.map} +0 -0
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { Button } from "../../button";
|
|
5
|
-
import { HStack, VStack } from "../../layout";
|
|
6
3
|
import { Input } from ".";
|
|
7
4
|
|
|
8
5
|
const meta: Meta<typeof Input> = {
|
|
@@ -14,7 +11,7 @@ export default meta;
|
|
|
14
11
|
|
|
15
12
|
type Story = StoryObj<typeof Input>;
|
|
16
13
|
|
|
17
|
-
export const
|
|
14
|
+
export const Preview: Story = {
|
|
18
15
|
args: {
|
|
19
16
|
label: "Some kind of input",
|
|
20
17
|
placeholder: "I am a placeholder",
|
|
@@ -26,141 +23,3 @@ export const PlainInput: Story = {
|
|
|
26
23
|
variant: { control: "inline-radio", options: ["default", "white"] },
|
|
27
24
|
},
|
|
28
25
|
};
|
|
29
|
-
|
|
30
|
-
export const PlainInputWithError: Story = {
|
|
31
|
-
args: {
|
|
32
|
-
label: "Some kind of input with error",
|
|
33
|
-
errorMessage: "This is invalid",
|
|
34
|
-
placeholder: "I am a placeholder",
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const ReadonlyInput: Story = {
|
|
39
|
-
args: {
|
|
40
|
-
label: "Some kind of readonly input",
|
|
41
|
-
readOnly: true,
|
|
42
|
-
value: "This is a read-only value",
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const ReadonlyInputWithError: Story = {
|
|
47
|
-
args: {
|
|
48
|
-
label: "Some kind of readonly input",
|
|
49
|
-
readOnly: true,
|
|
50
|
-
value: "This is a read-only value",
|
|
51
|
-
errorMessage: "This is invalid",
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const WhiteInput: Story = {
|
|
56
|
-
args: {
|
|
57
|
-
label: "Some kind of white input",
|
|
58
|
-
variant: "white",
|
|
59
|
-
placeholder: "I am a placeholder",
|
|
60
|
-
},
|
|
61
|
-
render: (props) => (
|
|
62
|
-
<div style={{ background: "var(--hds-ui-colors-light-grey-fill)", padding: "1em" }}>
|
|
63
|
-
<Input {...props} />
|
|
64
|
-
</div>
|
|
65
|
-
),
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export const WhiteInputWithError: Story = {
|
|
69
|
-
args: {
|
|
70
|
-
label: "Some kind of white input",
|
|
71
|
-
variant: "white",
|
|
72
|
-
placeholder: "I am a placeholder",
|
|
73
|
-
errorMessage: "This is invalid",
|
|
74
|
-
},
|
|
75
|
-
render: (props) => (
|
|
76
|
-
<div style={{ background: "var(--hds-ui-colors-light-grey-fill)", padding: "1em" }}>
|
|
77
|
-
<Input {...props} />
|
|
78
|
-
</div>
|
|
79
|
-
),
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export const WhiteReadonlyInput: Story = {
|
|
83
|
-
args: {
|
|
84
|
-
label: "Some kind of readonly input",
|
|
85
|
-
variant: "white",
|
|
86
|
-
readOnly: true,
|
|
87
|
-
value: "This is a read-only value",
|
|
88
|
-
},
|
|
89
|
-
render: (props) => (
|
|
90
|
-
<div style={{ background: "var(--hds-ui-colors-light-grey-fill)", padding: "1em" }}>
|
|
91
|
-
<Input {...props} />
|
|
92
|
-
</div>
|
|
93
|
-
),
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export const WhiteReadonlyInputWithError: Story = {
|
|
97
|
-
args: {
|
|
98
|
-
label: "Some kind of readonly input",
|
|
99
|
-
variant: "white",
|
|
100
|
-
readOnly: true,
|
|
101
|
-
value: "This is a read-only value",
|
|
102
|
-
errorMessage: "This is invalid",
|
|
103
|
-
},
|
|
104
|
-
render: (props) => (
|
|
105
|
-
<div style={{ background: "var(--hds-ui-colors-light-grey-fill)", padding: "1em" }}>
|
|
106
|
-
<Input {...props} />
|
|
107
|
-
</div>
|
|
108
|
-
),
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export const TrackingNumberSearch: Story = {
|
|
112
|
-
render: () => (
|
|
113
|
-
<HStack
|
|
114
|
-
gap="4"
|
|
115
|
-
align="end"
|
|
116
|
-
style={{
|
|
117
|
-
maxWidth: 556,
|
|
118
|
-
}}
|
|
119
|
-
>
|
|
120
|
-
<Input label="Sporingsnummer" style={{ width: "100%" }} />
|
|
121
|
-
<Button size="large">Spor</Button>
|
|
122
|
-
</HStack>
|
|
123
|
-
),
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export const FormWithErrorsOnSubmit: Story = {
|
|
127
|
-
render: () => {
|
|
128
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- It's ok
|
|
129
|
-
const [errors, setErrors] = useState<Record<string, string>>({});
|
|
130
|
-
return (
|
|
131
|
-
<VStack gap="16" asChild>
|
|
132
|
-
<form
|
|
133
|
-
lang="en"
|
|
134
|
-
onSubmit={(e) => {
|
|
135
|
-
e.preventDefault();
|
|
136
|
-
const formData = new FormData(e.currentTarget);
|
|
137
|
-
const newErrors: Record<string, string> = {};
|
|
138
|
-
for (const [key, value] of formData) {
|
|
139
|
-
if (!value) {
|
|
140
|
-
newErrors[key] = `${key} is required`;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
setErrors(newErrors);
|
|
144
|
-
}}
|
|
145
|
-
>
|
|
146
|
-
<p>Fields without input will give an error</p>
|
|
147
|
-
<Input errorMessage={errors.One} label="One" name="One" />
|
|
148
|
-
<Input errorMessage={errors.Two} label="Two" name="Two" />
|
|
149
|
-
<Input errorMessage={errors.Three} label="Three" name="Three" />
|
|
150
|
-
<VStack gap="4">
|
|
151
|
-
<Button type="submit">Submit</Button>
|
|
152
|
-
<Button
|
|
153
|
-
variant="secondary-outline"
|
|
154
|
-
onClick={() => {
|
|
155
|
-
setErrors({});
|
|
156
|
-
}}
|
|
157
|
-
type="reset"
|
|
158
|
-
>
|
|
159
|
-
Reset
|
|
160
|
-
</Button>
|
|
161
|
-
</VStack>
|
|
162
|
-
</form>
|
|
163
|
-
</VStack>
|
|
164
|
-
);
|
|
165
|
-
},
|
|
166
|
-
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { RadioButton } from "./index";
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof RadioButton> = {
|
|
6
|
+
title: "Form/RadioButton",
|
|
7
|
+
component: RadioButton,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<typeof RadioButton>;
|
|
13
|
+
|
|
14
|
+
export const Preview: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
title: "",
|
|
17
|
+
children: "Just a RadioButton",
|
|
18
|
+
checked: true,
|
|
19
|
+
hasError: false,
|
|
20
|
+
variant: "plain",
|
|
21
|
+
},
|
|
22
|
+
argTypes: {
|
|
23
|
+
variant: { control: "inline-radio", options: ["plain", "bounding-box"] },
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { forwardRef, type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
2
|
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
3
3
|
import { useFieldsetContext } from "../fieldset";
|
|
4
|
-
import { type RadioGroupProps, useRadioGroupContext } from "./
|
|
4
|
+
import { type RadioGroupProps, useRadioGroupContext } from "./radio-group";
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface RadioButtonProps
|
|
7
7
|
extends Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue"> {
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
variant?: "plain" | "bounding-box";
|
|
10
10
|
/**
|
|
11
11
|
* Set to `true` to add error styling. The component will take care of aria to indicate invalid state.
|
|
12
12
|
*
|
|
13
|
-
* Normally you don't need this, as you should wrap your
|
|
14
|
-
* When providing an errorMessage to RadioGroup, all contained
|
|
13
|
+
* Normally you don't need this, as you should wrap your Radio buttons in the RadioGroup component.
|
|
14
|
+
* When providing an errorMessage to RadioGroup, all contained Radio buttons will get correct hasError state.
|
|
15
15
|
*
|
|
16
|
-
* You can use this when your
|
|
16
|
+
* You can use this when your Radio button is part of a non-HDS fieldset which shows an error message.
|
|
17
17
|
*/
|
|
18
18
|
hasError?: boolean;
|
|
19
19
|
title?: string;
|
|
@@ -23,7 +23,7 @@ const isChecked = ({
|
|
|
23
23
|
checked,
|
|
24
24
|
selectedValue,
|
|
25
25
|
value,
|
|
26
|
-
}: Pick<
|
|
26
|
+
}: Pick<RadioButtonProps, "checked" | "value"> & {
|
|
27
27
|
selectedValue: RadioGroupProps["value"];
|
|
28
28
|
}) => {
|
|
29
29
|
if (typeof checked !== "undefined") return checked;
|
|
@@ -31,7 +31,7 @@ const isChecked = ({
|
|
|
31
31
|
return undefined;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
export const
|
|
34
|
+
export const RadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(
|
|
35
35
|
(
|
|
36
36
|
{
|
|
37
37
|
checked,
|
|
@@ -56,10 +56,10 @@ export const Radiobutton = forwardRef<HTMLInputElement, RadiobuttonProps>(
|
|
|
56
56
|
return (
|
|
57
57
|
<div
|
|
58
58
|
className={clsx(
|
|
59
|
-
"hds-
|
|
59
|
+
"hds-radio-button",
|
|
60
60
|
{
|
|
61
|
-
[`hds-
|
|
62
|
-
"hds-
|
|
61
|
+
[`hds-radio-button--${variant}`]: variant === "bounding-box",
|
|
62
|
+
"hds-radio-button--error": hasError,
|
|
63
63
|
},
|
|
64
64
|
className as undefined,
|
|
65
65
|
)}
|
|
@@ -73,8 +73,8 @@ export const Radiobutton = forwardRef<HTMLInputElement, RadiobuttonProps>(
|
|
|
73
73
|
ref={ref}
|
|
74
74
|
type="radio"
|
|
75
75
|
/>
|
|
76
|
-
<span aria-hidden className="hds-
|
|
77
|
-
{title ? <p className="hds-
|
|
76
|
+
<span aria-hidden className="hds-radio-button__checkmark" />
|
|
77
|
+
{title ? <p className="hds-radio-button__title">{title}</p> : children}
|
|
78
78
|
</label>
|
|
79
79
|
{title ? children : null}
|
|
80
80
|
</div>
|
|
@@ -82,4 +82,4 @@ export const Radiobutton = forwardRef<HTMLInputElement, RadiobuttonProps>(
|
|
|
82
82
|
},
|
|
83
83
|
);
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
RadioButton.displayName = "RadioButton";
|
package/src/form/{radiobutton/radiogroup.stories.tsx → radio-button/radio-group.stories.tsx}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
-
import { RadioGroup } from "./
|
|
4
|
-
import {
|
|
3
|
+
import { RadioGroup } from "./radio-group";
|
|
4
|
+
import { RadioButton } from "./index";
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof RadioGroup> = {
|
|
7
|
-
title: "Form/
|
|
7
|
+
title: "Form/Radiogroup",
|
|
8
8
|
component: RadioGroup,
|
|
9
9
|
};
|
|
10
10
|
|
|
@@ -12,10 +12,9 @@ export default meta;
|
|
|
12
12
|
|
|
13
13
|
type Story = StoryObj<typeof RadioGroup>;
|
|
14
14
|
|
|
15
|
-
export const
|
|
16
|
-
name: "Radio group with radiobuttons",
|
|
15
|
+
export const Preview: Story = {
|
|
17
16
|
args: {
|
|
18
|
-
legend: "Radio group with
|
|
17
|
+
legend: "Radio group with radio buttons",
|
|
19
18
|
errorMessage: "",
|
|
20
19
|
name: "group1",
|
|
21
20
|
value: undefined,
|
|
@@ -27,13 +26,13 @@ export const PlainRadioGroup: Story = {
|
|
|
27
26
|
value: {
|
|
28
27
|
description: "Use this prop for a controlled value",
|
|
29
28
|
control: "inline-radio",
|
|
30
|
-
options: [undefined, "First
|
|
29
|
+
options: [undefined, "First RadioButton", "Second RadioButton"],
|
|
31
30
|
},
|
|
32
31
|
},
|
|
33
32
|
render: (props) => (
|
|
34
33
|
<RadioGroup {...props}>
|
|
35
|
-
<
|
|
36
|
-
<
|
|
34
|
+
<RadioButton value="First RadioButton">This is a RadioButton</RadioButton>
|
|
35
|
+
<RadioButton value="Second RadioButton">This is another RadioButton</RadioButton>
|
|
37
36
|
</RadioGroup>
|
|
38
37
|
),
|
|
39
38
|
};
|
|
@@ -6,20 +6,20 @@ import {
|
|
|
6
6
|
useContext,
|
|
7
7
|
} from "react";
|
|
8
8
|
import { Fieldset, type FieldsetProps } from "../fieldset";
|
|
9
|
-
import type {
|
|
9
|
+
import type { RadioButtonProps } from "./radio-button";
|
|
10
10
|
|
|
11
11
|
export interface RadioGroupProps extends Omit<FieldsetProps, "onChange"> {
|
|
12
12
|
children: ReactNode;
|
|
13
|
-
/** Will be passed to all
|
|
14
|
-
name?:
|
|
13
|
+
/** Will be passed to all Radio buttons within the radio group */
|
|
14
|
+
name?: RadioButtonProps["name"];
|
|
15
15
|
/** If you want the group to be controlled, you can pass the selected value here */
|
|
16
|
-
value?:
|
|
16
|
+
value?: RadioButtonProps["value"];
|
|
17
17
|
/**
|
|
18
|
-
* Error message is passed to the internal Fieldset, and will also give contained
|
|
18
|
+
* Error message is passed to the internal Fieldset, and will also give contained Radio buttons
|
|
19
19
|
* error styling and aria to indicate invalid state.
|
|
20
20
|
*/
|
|
21
21
|
errorMessage?: ReactNode;
|
|
22
|
-
/** Will be passed to all
|
|
22
|
+
/** Will be passed to all Radio buttons within the radio group */
|
|
23
23
|
onChange?: ChangeEventHandler<HTMLInputElement> | undefined;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -28,6 +28,7 @@ type RadioGroupContextProps = {
|
|
|
28
28
|
} & Pick<RadioGroupProps, "name" | "value" | "onChange">;
|
|
29
29
|
|
|
30
30
|
const RadioGroupContext = createContext<RadioGroupContextProps>({
|
|
31
|
+
name: undefined,
|
|
31
32
|
hasError: false,
|
|
32
33
|
onChange: () => {
|
|
33
34
|
return undefined;
|
|
@@ -11,7 +11,7 @@ export default meta;
|
|
|
11
11
|
|
|
12
12
|
type Story = StoryObj<typeof Select>;
|
|
13
13
|
|
|
14
|
-
export const
|
|
14
|
+
export const Preview: Story = {
|
|
15
15
|
args: {
|
|
16
16
|
label: "Default select",
|
|
17
17
|
errorMessage: "",
|
|
@@ -31,63 +31,3 @@ export const Default: Story = {
|
|
|
31
31
|
</Select>
|
|
32
32
|
),
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
export const White: Story = {
|
|
36
|
-
args: {
|
|
37
|
-
label: "White select",
|
|
38
|
-
variant: "white",
|
|
39
|
-
},
|
|
40
|
-
render: (props) => (
|
|
41
|
-
<div style={{ background: "var(--hds-ui-colors-light-grey-fill)", padding: "1em" }}>
|
|
42
|
-
<Select {...props} defaultValue="">
|
|
43
|
-
<option disabled hidden value="">
|
|
44
|
-
Please select
|
|
45
|
-
</option>
|
|
46
|
-
<option value="1">option 1</option>
|
|
47
|
-
<option value="2">option 2</option>
|
|
48
|
-
<option value="3">option 3</option>
|
|
49
|
-
</Select>
|
|
50
|
-
</div>
|
|
51
|
-
),
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const DefaultWithError: Story = {
|
|
55
|
-
args: {
|
|
56
|
-
label: "select with error",
|
|
57
|
-
name: "name",
|
|
58
|
-
id: "someId",
|
|
59
|
-
errorMessage: "Something is wrong",
|
|
60
|
-
},
|
|
61
|
-
render: (props) => (
|
|
62
|
-
<Select {...props} defaultValue="">
|
|
63
|
-
<option disabled hidden value="">
|
|
64
|
-
Please select
|
|
65
|
-
</option>
|
|
66
|
-
<option value="1">option 1</option>
|
|
67
|
-
<option value="2">option 2</option>
|
|
68
|
-
<option value="3">option 3</option>
|
|
69
|
-
</Select>
|
|
70
|
-
),
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export const WhiteWithError: Story = {
|
|
74
|
-
args: {
|
|
75
|
-
label: "White select with error",
|
|
76
|
-
variant: "white",
|
|
77
|
-
name: "name",
|
|
78
|
-
id: "someId",
|
|
79
|
-
errorMessage: "Something is wrong",
|
|
80
|
-
},
|
|
81
|
-
render: (props) => (
|
|
82
|
-
<div style={{ background: "var(--hds-ui-colors-light-grey-fill)", padding: "1em" }}>
|
|
83
|
-
<Select {...props} defaultValue="">
|
|
84
|
-
<option disabled hidden value="">
|
|
85
|
-
Please select
|
|
86
|
-
</option>
|
|
87
|
-
<option value="1">option 1</option>
|
|
88
|
-
<option value="2">option 2</option>
|
|
89
|
-
<option value="3">option 3</option>
|
|
90
|
-
</Select>
|
|
91
|
-
</div>
|
|
92
|
-
),
|
|
93
|
-
};
|
|
@@ -5,13 +5,16 @@ import { Textarea } from ".";
|
|
|
5
5
|
const meta: Meta<typeof Textarea> = {
|
|
6
6
|
title: "Form/Textarea",
|
|
7
7
|
component: Textarea,
|
|
8
|
+
argTypes: {
|
|
9
|
+
variant: { control: "inline-radio", options: ["default", "white"] },
|
|
10
|
+
},
|
|
8
11
|
};
|
|
9
12
|
|
|
10
13
|
export default meta;
|
|
11
14
|
|
|
12
15
|
type Story = StoryObj<typeof Textarea>;
|
|
13
16
|
|
|
14
|
-
export const
|
|
17
|
+
export const Preview: Story = {
|
|
15
18
|
args: {
|
|
16
19
|
label: "Some kind of textarea",
|
|
17
20
|
placeholder: "I am a placeholder",
|
|
@@ -19,88 +22,4 @@ export const PlainTextarea: Story = {
|
|
|
19
22
|
readOnly: false,
|
|
20
23
|
variant: "default",
|
|
21
24
|
},
|
|
22
|
-
argTypes: {
|
|
23
|
-
variant: { control: "inline-radio", options: ["default", "white"] },
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const PlainTextareaWithError: Story = {
|
|
28
|
-
args: {
|
|
29
|
-
label: "Some kind of textarea with error",
|
|
30
|
-
errorMessage: "This is invalid",
|
|
31
|
-
placeholder: "I am a placeholder",
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const ReadonlyTextarea: Story = {
|
|
36
|
-
args: {
|
|
37
|
-
label: "Some kind of readonly textarea",
|
|
38
|
-
readOnly: true,
|
|
39
|
-
value: "This is a read-only value",
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const ReadonlyTextareaWithError: Story = {
|
|
44
|
-
args: {
|
|
45
|
-
label: "Some kind of readonly textarea",
|
|
46
|
-
readOnly: true,
|
|
47
|
-
value: "This is a read-only value",
|
|
48
|
-
errorMessage: "This is invalid",
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const WhiteTextarea: Story = {
|
|
53
|
-
args: {
|
|
54
|
-
label: "Some kind of white textarea",
|
|
55
|
-
variant: "white",
|
|
56
|
-
placeholder: "I am a placeholder",
|
|
57
|
-
},
|
|
58
|
-
render: (props) => (
|
|
59
|
-
<div style={{ background: "var(--hds-ui-colors-light-grey-fill)", padding: "1em" }}>
|
|
60
|
-
<Textarea {...props} />
|
|
61
|
-
</div>
|
|
62
|
-
),
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const WhiteTextareaWithError: Story = {
|
|
66
|
-
args: {
|
|
67
|
-
label: "Some kind of white textarea",
|
|
68
|
-
variant: "white",
|
|
69
|
-
placeholder: "I am a placeholder",
|
|
70
|
-
errorMessage: "This is invalid",
|
|
71
|
-
},
|
|
72
|
-
render: (props) => (
|
|
73
|
-
<div style={{ background: "var(--hds-ui-colors-light-grey-fill)", padding: "1em" }}>
|
|
74
|
-
<Textarea {...props} />
|
|
75
|
-
</div>
|
|
76
|
-
),
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const WhiteReadonlyTextarea: Story = {
|
|
80
|
-
args: {
|
|
81
|
-
label: "Some kind of readonly textarea",
|
|
82
|
-
variant: "white",
|
|
83
|
-
readOnly: true,
|
|
84
|
-
value: "This is a read-only value",
|
|
85
|
-
},
|
|
86
|
-
render: (props) => (
|
|
87
|
-
<div style={{ background: "var(--hds-ui-colors-light-grey-fill)", padding: "1em" }}>
|
|
88
|
-
<Textarea {...props} />
|
|
89
|
-
</div>
|
|
90
|
-
),
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export const WhiteReadonlyTextareaWithError: Story = {
|
|
94
|
-
args: {
|
|
95
|
-
label: "Some kind of readonly textarea",
|
|
96
|
-
variant: "white",
|
|
97
|
-
readOnly: true,
|
|
98
|
-
value: "This is a read-only value",
|
|
99
|
-
errorMessage: "This is invalid",
|
|
100
|
-
},
|
|
101
|
-
render: (props) => (
|
|
102
|
-
<div style={{ background: "var(--hds-ui-colors-light-grey-fill)", padding: "1em" }}>
|
|
103
|
-
<Textarea {...props} />
|
|
104
|
-
</div>
|
|
105
|
-
),
|
|
106
25
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { HelpText } from ".";
|
|
4
|
+
|
|
5
|
+
type Story = StoryObj<typeof HelpText>;
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof HelpText> = {
|
|
8
|
+
title: "Help text",
|
|
9
|
+
component: HelpText,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
|
|
14
|
+
export const Preview: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
helpText: `VOEC er en forkortelse for "VAT on E-commerce" (mva. på e-handel).`,
|
|
17
|
+
children: <>VOEC</>,
|
|
18
|
+
},
|
|
19
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
3
|
import { useState, useEffect, useRef, useId } from "react";
|
|
4
|
-
import { Container } from "..";
|
|
4
|
+
import { Container, Grid } from "..";
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof Container> = {
|
|
7
7
|
title: "Layout/Container",
|
|
8
8
|
component: Container,
|
|
9
|
-
render: (args) => (
|
|
10
|
-
<Container {...args} style={{ background: "var(--hds-ui-colors-warning-yellow)" }}>
|
|
11
|
-
<div style={{ background: "var(--hds-ui-colors-warning-yellow-light-fill)" }}>
|
|
12
|
-
<Widths />
|
|
13
|
-
</div>
|
|
14
|
-
</Container>
|
|
15
|
-
),
|
|
16
9
|
};
|
|
17
10
|
|
|
18
11
|
export default meta;
|
|
19
12
|
|
|
20
13
|
type Story = StoryObj<typeof Container>;
|
|
21
14
|
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
export const Preview: Story = {
|
|
16
|
+
render: (args) => (
|
|
17
|
+
<div style={{ background: "#f8cb9c" }}>
|
|
18
|
+
<Container {...args} style={{ background: "#c1cd8a" }}>
|
|
19
|
+
<Grid
|
|
20
|
+
style={{
|
|
21
|
+
background: "var(--hds-colors-lighter)",
|
|
22
|
+
}}
|
|
23
|
+
span={{ initial: 8, medium: 6, large: 4 }}
|
|
24
|
+
center
|
|
25
|
+
>
|
|
26
|
+
<Widths />
|
|
27
|
+
</Grid>
|
|
28
|
+
</Container>
|
|
29
|
+
</div>
|
|
30
|
+
),
|
|
28
31
|
};
|
|
29
32
|
|
|
30
33
|
function Widths() {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { Box } from "../../box";
|
|
4
|
+
import { Grid } from ".";
|
|
5
|
+
|
|
6
|
+
type Story = StoryObj<typeof Grid>;
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof Grid> = {
|
|
9
|
+
title: "Layout/Grid",
|
|
10
|
+
component: Grid,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
export const Preview: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
gap: "12-16",
|
|
18
|
+
span: { initial: 12, small: 4 },
|
|
19
|
+
children: (
|
|
20
|
+
<>
|
|
21
|
+
<Box>1</Box>
|
|
22
|
+
<Box>2</Box>
|
|
23
|
+
<Box>3</Box>
|
|
24
|
+
</>
|
|
25
|
+
),
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { Box } from "../../box";
|
|
4
|
+
import { Stack } from ".";
|
|
5
|
+
|
|
6
|
+
type Story = StoryObj<typeof Stack>;
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof Stack> = {
|
|
9
|
+
title: "Layout/Stack",
|
|
10
|
+
component: Stack,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
export const Preview: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
gap: "12-16",
|
|
18
|
+
direction: { initial: "column", small: "row" },
|
|
19
|
+
children: (
|
|
20
|
+
<>
|
|
21
|
+
<Box>1</Box>
|
|
22
|
+
<Box>2</Box>
|
|
23
|
+
<Box>3</Box>
|
|
24
|
+
</>
|
|
25
|
+
),
|
|
26
|
+
},
|
|
27
|
+
};
|