@postenbring/hedwig-react 0.0.80 → 0.0.82
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.d.ts +6 -2
- package/dist/accordion/accordion-content.d.ts.map +1 -0
- package/dist/accordion/accordion-content.js +1 -1
- package/dist/accordion/accordion-content.js.map +1 -1
- package/dist/accordion/accordion-content.mjs +1 -1
- package/dist/accordion/accordion-header.d.ts +6 -2
- package/dist/accordion/accordion-header.d.ts.map +1 -0
- package/dist/accordion/accordion-item.d.ts +24 -3
- package/dist/accordion/accordion-item.d.ts.map +1 -0
- package/dist/accordion/accordion.d.ts +44 -2
- package/dist/accordion/accordion.d.ts.map +1 -0
- package/dist/accordion/accordion.js +102 -4
- package/dist/accordion/accordion.js.map +1 -1
- package/dist/accordion/accordion.mjs +5 -1
- package/dist/accordion/context.d.ts +7 -2
- package/dist/accordion/context.d.ts.map +1 -0
- package/dist/accordion/index.d.ts +9 -9
- package/dist/accordion/index.d.ts.map +1 -0
- package/dist/accordion/index.js +53 -54
- package/dist/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs +8 -8
- package/dist/badge/badge.d.ts +21 -5
- package/dist/badge/badge.d.ts.map +1 -0
- package/dist/badge/index.d.ts +3 -6
- package/dist/badge/index.d.ts.map +1 -0
- package/dist/box/box.d.ts +50 -4
- package/dist/box/box.d.ts.map +1 -0
- package/dist/box/box.js +15 -14
- package/dist/box/box.js.map +1 -1
- package/dist/box/box.mjs +1 -1
- package/dist/box/index.d.ts +3 -4
- package/dist/box/index.d.ts.map +1 -0
- package/dist/box/index.js +16 -19
- package/dist/box/index.js.map +1 -1
- package/dist/box/index.mjs +4 -5
- package/dist/breadcrumbs/breadcrumbs.d.ts +33 -2
- package/dist/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/breadcrumbs/index.d.ts +3 -2
- package/dist/breadcrumbs/index.d.ts.map +1 -0
- package/dist/button/button.d.ts +33 -3
- package/dist/button/button.d.ts.map +1 -0
- package/dist/button/index.d.ts +3 -3
- package/dist/button/index.d.ts.map +1 -0
- package/dist/card/card.d.ts +69 -12
- package/dist/card/card.d.ts.map +1 -0
- package/dist/card/card.js +17 -6
- package/dist/card/card.js.map +1 -1
- package/dist/card/card.mjs +1 -1
- package/dist/card/index.d.ts +3 -12
- package/dist/card/index.d.ts.map +1 -0
- package/dist/card/index.js +18 -19
- package/dist/card/index.js.map +1 -1
- package/dist/card/index.mjs +4 -5
- package/dist/{chunk-XC3UHH2U.mjs → chunk-3WVRY6CC.mjs} +4 -4
- package/dist/{chunk-XC3UHH2U.mjs.map → chunk-3WVRY6CC.mjs.map} +1 -1
- package/dist/{chunk-GSJPTZT3.mjs → chunk-6AGDK5V3.mjs} +34 -19
- package/dist/chunk-6AGDK5V3.mjs.map +1 -0
- package/dist/{chunk-3MQKXNZ6.mjs → chunk-7UD72WOC.mjs} +13 -1
- package/dist/chunk-7UD72WOC.mjs.map +1 -0
- package/dist/chunk-7YWW46R3.mjs +1 -0
- package/dist/chunk-7YWW46R3.mjs.map +1 -0
- package/dist/{chunk-ENKVTAJB.mjs → chunk-AJWSQEDP.mjs} +18 -17
- package/dist/chunk-AJWSQEDP.mjs.map +1 -0
- package/dist/chunk-ARHJZUZG.mjs +1 -0
- package/dist/chunk-ARHJZUZG.mjs.map +1 -0
- package/dist/chunk-BCFV6VOE.mjs +1 -0
- package/dist/chunk-BCFV6VOE.mjs.map +1 -0
- package/dist/{chunk-GXYUJ5MA.mjs → chunk-C34HEQXO.mjs} +33 -29
- package/dist/chunk-C34HEQXO.mjs.map +1 -0
- package/dist/{chunk-PLXB3TNA.mjs → chunk-D7QPJIUZ.mjs} +5 -5
- package/dist/{chunk-PLXB3TNA.mjs.map → chunk-D7QPJIUZ.mjs.map} +1 -1
- package/dist/chunk-FYFJ75NX.mjs +1 -0
- package/dist/chunk-FYFJ75NX.mjs.map +1 -0
- package/dist/chunk-G65EYZFQ.mjs +1 -0
- package/dist/chunk-G65EYZFQ.mjs.map +1 -0
- package/dist/{chunk-2UWPZNXC.mjs → chunk-GLAEI3SD.mjs} +2 -2
- package/dist/{chunk-2UWPZNXC.mjs.map → chunk-GLAEI3SD.mjs.map} +1 -1
- package/dist/chunk-H3E546OT.mjs +1 -0
- package/dist/chunk-H3E546OT.mjs.map +1 -0
- package/dist/chunk-HQVL3ZJ2.mjs +1 -0
- package/dist/chunk-HQVL3ZJ2.mjs.map +1 -0
- package/dist/{chunk-XUWZ4HGD.mjs → chunk-LCJSUBCZ.mjs} +48 -45
- package/dist/chunk-LCJSUBCZ.mjs.map +1 -0
- package/dist/{chunk-KPGSRU4I.mjs → chunk-M3Y3XOGC.mjs} +13 -1
- package/dist/chunk-M3Y3XOGC.mjs.map +1 -0
- package/dist/{chunk-CIHZDFSQ.mjs → chunk-NU6OSFAU.mjs} +20 -9
- package/dist/chunk-NU6OSFAU.mjs.map +1 -0
- package/dist/chunk-RC76SXBP.mjs +1 -0
- package/dist/chunk-RC76SXBP.mjs.map +1 -0
- package/dist/{chunk-TQDUBRCZ.mjs → chunk-SQ63E7KM.mjs} +24 -22
- package/dist/chunk-SQ63E7KM.mjs.map +1 -0
- package/dist/{chunk-ES6ISHOV.mjs → chunk-UP3M3NEZ.mjs} +14 -13
- package/dist/{chunk-ES6ISHOV.mjs.map → chunk-UP3M3NEZ.mjs.map} +1 -1
- package/dist/chunk-ZKMFJZSH.mjs +1 -0
- package/dist/chunk-ZKMFJZSH.mjs.map +1 -0
- package/dist/description-list/description-list.d.ts +42 -2
- package/dist/description-list/description-list.d.ts.map +1 -0
- package/dist/description-list/index.d.ts +3 -2
- package/dist/description-list/index.d.ts.map +1 -0
- package/dist/footer/footer.d.ts +67 -7
- package/dist/footer/footer.d.ts.map +1 -0
- package/dist/footer/footer.js +80 -77
- package/dist/footer/footer.js.map +1 -1
- package/dist/footer/footer.mjs +5 -5
- package/dist/footer/index.d.ts +3 -7
- package/dist/footer/index.d.ts.map +1 -0
- package/dist/footer/index.js +81 -85
- package/dist/footer/index.js.map +1 -1
- package/dist/footer/index.mjs +8 -9
- package/dist/form/checkbox/checkbox.d.ts +28 -2
- package/dist/form/checkbox/checkbox.d.ts.map +1 -0
- package/dist/form/checkbox/index.d.ts +3 -2
- package/dist/form/checkbox/index.d.ts.map +1 -0
- package/dist/form/date-picker/date-picker.d.ts +33 -2
- package/dist/form/date-picker/date-picker.d.ts.map +1 -0
- package/dist/form/date-picker/index.d.ts +3 -2
- package/dist/form/date-picker/index.d.ts.map +1 -0
- package/dist/form/error-message/error-message.d.ts +8 -2
- package/dist/form/error-message/error-message.d.ts.map +1 -0
- package/dist/form/error-message/index.d.ts +3 -2
- package/dist/form/error-message/index.d.ts.map +1 -0
- package/dist/form/fieldset/fieldset.d.ts +22 -3
- package/dist/form/fieldset/fieldset.d.ts.map +1 -0
- package/dist/form/fieldset/index.d.ts +3 -3
- package/dist/form/fieldset/index.d.ts.map +1 -0
- package/dist/form/index.d.ts +9 -20
- package/dist/form/index.d.ts.map +1 -0
- package/dist/form/input/index.d.ts +3 -2
- package/dist/form/input/index.d.ts.map +1 -0
- package/dist/form/input/input.d.ts +5 -2
- package/dist/form/input/input.d.ts.map +1 -0
- package/dist/form/input-group/index.d.ts +3 -2
- package/dist/form/input-group/index.d.ts.map +1 -0
- package/dist/form/input-group/input-group.d.ts +27 -2
- package/dist/form/input-group/input-group.d.ts.map +1 -0
- package/dist/form/radiobutton/index.d.ts +5 -5
- package/dist/form/radiobutton/index.d.ts.map +1 -0
- package/dist/form/radiobutton/radiobutton.d.ts +17 -2
- package/dist/form/radiobutton/radiobutton.d.ts.map +1 -0
- package/dist/form/radiobutton/radiogroup.d.ts +24 -3
- package/dist/form/radiobutton/radiogroup.d.ts.map +1 -0
- package/dist/form/select/index.d.ts +3 -2
- package/dist/form/select/index.d.ts.map +1 -0
- package/dist/form/select/select.d.ts +9 -2
- package/dist/form/select/select.d.ts.map +1 -0
- package/dist/form/textarea/index.d.ts +3 -2
- package/dist/form/textarea/index.d.ts.map +1 -0
- package/dist/form/textarea/textarea.d.ts +5 -2
- package/dist/form/textarea/textarea.d.ts.map +1 -0
- package/dist/help-text/help-text.d.ts +51 -1
- package/dist/help-text/help-text.d.ts.map +1 -0
- package/dist/help-text/help-text.js +17 -20
- package/dist/help-text/help-text.js.map +1 -1
- package/dist/help-text/help-text.mjs +3 -3
- package/dist/help-text/index.d.ts +3 -1
- package/dist/help-text/index.d.ts.map +1 -0
- package/dist/help-text/index.js +17 -20
- package/dist/help-text/index.js.map +1 -1
- package/dist/help-text/index.mjs +3 -3
- package/dist/index-no-css.d.ts +26 -128
- package/dist/index-no-css.d.ts.map +1 -0
- package/dist/index-no-css.js +373 -394
- package/dist/index-no-css.js.map +1 -1
- package/dist/index-no-css.mjs +50 -57
- package/dist/index.d.ts +11 -128
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +373 -394
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -57
- package/dist/index.mjs.map +1 -1
- package/dist/layout/container/container.d.ts +23 -2
- package/dist/layout/container/container.d.ts.map +1 -0
- package/dist/layout/grid/grid.d.ts +101 -4
- package/dist/layout/grid/grid.d.ts.map +1 -0
- package/dist/layout/grid/grid.js +11 -10
- package/dist/layout/grid/grid.js.map +1 -1
- package/dist/layout/grid/grid.mjs +1 -1
- package/dist/layout/grid/index.d.ts +3 -4
- package/dist/layout/grid/index.d.ts.map +1 -0
- package/dist/layout/grid/index.js +12 -15
- package/dist/layout/grid/index.js.map +1 -1
- package/dist/layout/grid/index.mjs +4 -5
- package/dist/layout/index.d.ts +4 -10
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +12 -15
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/index.mjs +4 -5
- package/dist/layout/responsive.d.ts +10 -2
- package/dist/layout/responsive.d.ts.map +1 -0
- package/dist/layout/spacing.d.ts +33 -3
- package/dist/layout/spacing.d.ts.map +1 -0
- package/dist/layout/stack/index.d.ts +3 -4
- package/dist/layout/stack/index.d.ts.map +1 -0
- package/dist/layout/stack/stack.d.ts +62 -4
- package/dist/layout/stack/stack.d.ts.map +1 -0
- package/dist/link/index.d.ts +3 -2
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/link.d.ts +20 -2
- package/dist/link/link.d.ts.map +1 -0
- package/dist/list/index.d.ts +5 -5
- package/dist/list/index.d.ts.map +1 -0
- package/dist/list/link-list.d.ts +12 -2
- package/dist/list/link-list.d.ts.map +1 -0
- package/dist/list/list.d.ts +40 -3
- package/dist/list/list.d.ts.map +1 -0
- package/dist/message/index.d.ts +3 -3
- package/dist/message/index.d.ts.map +1 -0
- package/dist/message/index.js +36 -38
- package/dist/message/index.js.map +1 -1
- package/dist/message/index.mjs +5 -6
- package/dist/message/message.d.ts +36 -4
- package/dist/message/message.d.ts.map +1 -0
- package/dist/message/message.js +35 -32
- package/dist/message/message.js.map +1 -1
- package/dist/message/message.mjs +2 -2
- package/dist/modal/index.d.ts +3 -5
- package/dist/modal/index.d.ts.map +1 -0
- package/dist/modal/index.js +60 -62
- package/dist/modal/index.js.map +1 -1
- package/dist/modal/index.mjs +5 -6
- package/dist/modal/modal.d.ts +81 -5
- package/dist/modal/modal.d.ts.map +1 -0
- package/dist/modal/modal.js +59 -55
- package/dist/modal/modal.js.map +1 -1
- package/dist/modal/modal.mjs +2 -2
- package/dist/navbar/icons.d.ts +3 -2
- package/dist/navbar/icons.d.ts.map +1 -0
- package/dist/navbar/index.d.ts +4 -13
- package/dist/navbar/index.d.ts.map +1 -0
- package/dist/navbar/index.js +144 -145
- package/dist/navbar/index.js.map +1 -1
- package/dist/navbar/index.mjs +4 -5
- package/dist/navbar/navbar-expandable-menu.d.ts +35 -7
- package/dist/navbar/navbar-expandable-menu.d.ts.map +1 -0
- package/dist/navbar/navbar.d.ts +130 -9
- package/dist/navbar/navbar.d.ts.map +1 -0
- package/dist/navbar/navbar.js +237 -28
- package/dist/navbar/navbar.js.map +1 -1
- package/dist/navbar/navbar.mjs +4 -1
- package/dist/show-more/index.d.ts +5 -4
- package/dist/show-more/index.d.ts.map +1 -0
- package/dist/show-more/show-more.d.ts +42 -2
- package/dist/show-more/show-more.d.ts.map +1 -0
- package/dist/skeleton/index.d.ts +3 -2
- package/dist/skeleton/index.d.ts.map +1 -0
- package/dist/skeleton/skeleton.d.ts +67 -2
- package/dist/skeleton/skeleton.d.ts.map +1 -0
- package/dist/step-indicator/index.d.ts +3 -1
- package/dist/step-indicator/index.d.ts.map +1 -0
- package/dist/step-indicator/step-indicator.d.ts +36 -1
- package/dist/step-indicator/step-indicator.d.ts.map +1 -0
- package/dist/styled-html/index.d.ts +3 -2
- package/dist/styled-html/index.d.ts.map +1 -0
- package/dist/styled-html/styled-html.d.ts +36 -2
- package/dist/styled-html/styled-html.d.ts.map +1 -0
- package/dist/table/index.d.ts +3 -1
- package/dist/table/index.d.ts.map +1 -0
- package/dist/table/table.d.ts +25 -1
- package/dist/table/table.d.ts.map +1 -0
- package/dist/tabs/context.d.ts +8 -3
- package/dist/tabs/context.d.ts.map +1 -0
- package/dist/tabs/index.d.ts +7 -10
- package/dist/tabs/index.d.ts.map +1 -0
- package/dist/tabs/index.js +34 -37
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +4 -4
- package/dist/tabs/tabs-content.d.ts +26 -4
- package/dist/tabs/tabs-content.d.ts.map +1 -0
- package/dist/tabs/tabs-list.d.ts +21 -4
- package/dist/tabs/tabs-list.d.ts.map +1 -0
- package/dist/tabs/tabs.d.ts +26 -2
- package/dist/tabs/tabs.d.ts.map +1 -0
- package/dist/tabs/tabs.js +205 -8
- package/dist/tabs/tabs.js.map +1 -1
- package/dist/tabs/tabs.mjs +4 -1
- package/dist/text/index.d.ts +4 -2
- package/dist/text/index.d.ts.map +1 -0
- package/dist/text/text.d.ts +58 -2
- package/dist/text/text.d.ts.map +1 -0
- package/dist/utilities/auto-animate-height.d.ts +33 -2
- package/dist/utilities/auto-animate-height.d.ts.map +1 -0
- package/dist/utilities/index.d.ts +3 -2
- package/dist/utilities/index.d.ts.map +1 -0
- package/dist/utils.d.ts +28 -5
- package/dist/utils.d.ts.map +1 -0
- package/dist/warning-banner/index.d.ts +3 -2
- package/dist/warning-banner/index.d.ts.map +1 -0
- package/dist/warning-banner/index.js +16 -19
- package/dist/warning-banner/index.js.map +1 -1
- package/dist/warning-banner/index.mjs +3 -3
- package/dist/warning-banner/warning-banner.d.ts +8 -2
- package/dist/warning-banner/warning-banner.d.ts.map +1 -0
- package/dist/warning-banner/warning-banner.js +16 -19
- package/dist/warning-banner/warning-banner.js.map +1 -1
- package/dist/warning-banner/warning-banner.mjs +3 -3
- package/package.json +11 -7
- package/src/accordion/accordion-content.tsx +31 -0
- package/src/accordion/accordion-header.tsx +36 -0
- package/src/accordion/accordion-item.tsx +62 -0
- package/src/accordion/accordion.stories.tsx +154 -0
- package/src/accordion/accordion.tsx +68 -0
- package/src/accordion/context.ts +8 -0
- package/src/accordion/index.tsx +9 -0
- package/src/badge/badge.stories.tsx +44 -0
- package/src/badge/badge.tsx +63 -0
- package/src/badge/index.tsx +3 -0
- package/src/box/box.stories.tsx +112 -0
- package/src/box/box.tsx +122 -0
- package/src/box/index.tsx +3 -0
- package/src/breadcrumbs/breadcrumbs.stories.tsx +50 -0
- package/src/breadcrumbs/breadcrumbs.tsx +47 -0
- package/src/breadcrumbs/index.tsx +3 -0
- package/src/button/button.stories.tsx +104 -0
- package/src/button/button.tsx +87 -0
- package/src/button/index.tsx +3 -0
- package/src/card/card.stories.tsx +82 -0
- package/src/card/card.tsx +222 -0
- package/src/card/index.tsx +14 -0
- package/src/description-list/description-list.stories.tsx +95 -0
- package/src/description-list/description-list.tsx +61 -0
- package/src/description-list/index.tsx +2 -0
- package/src/footer/footer.tsx +169 -0
- package/src/footer/index.tsx +9 -0
- package/src/form/checkbox/checkbox.stories.tsx +104 -0
- package/src/form/checkbox/checkbox.tsx +82 -0
- package/src/form/checkbox/index.tsx +2 -0
- package/src/form/date-picker/date-picker.stories.tsx +27 -0
- package/src/form/date-picker/date-picker.tsx +85 -0
- package/src/form/date-picker/index.tsx +2 -0
- package/src/form/error-message/error-message.stories.tsx +19 -0
- package/src/form/error-message/error-message.tsx +25 -0
- package/src/form/error-message/index.tsx +2 -0
- package/src/form/fieldset/fieldset.stories.tsx +86 -0
- package/src/form/fieldset/fieldset.tsx +64 -0
- package/src/form/fieldset/index.tsx +2 -0
- package/src/form/index.tsx +8 -0
- package/src/form/input/index.tsx +2 -0
- package/src/form/input/input.stories.tsx +166 -0
- package/src/form/input/input.tsx +30 -0
- package/src/form/input-group/index.tsx +2 -0
- package/src/form/input-group/input-group.tsx +106 -0
- package/src/form/radiobutton/index.tsx +4 -0
- package/src/form/radiobutton/radiobutton.stories.tsx +93 -0
- package/src/form/radiobutton/radiobutton.tsx +85 -0
- package/src/form/radiobutton/radiogroup.stories.tsx +39 -0
- package/src/form/radiobutton/radiogroup.tsx +52 -0
- package/src/form/select/index.tsx +2 -0
- package/src/form/select/select.stories.tsx +93 -0
- package/src/form/select/select.tsx +33 -0
- package/src/form/textarea/index.tsx +2 -0
- package/src/form/textarea/textarea.stories.tsx +106 -0
- package/src/form/textarea/textarea.tsx +33 -0
- package/src/help-text/help-text.tsx +98 -0
- package/src/help-text/index.ts +2 -0
- package/src/index-no-css.tsx +25 -0
- package/src/index.tsx +11 -0
- package/src/layout/container/container.stories.tsx +62 -0
- package/src/layout/container/container.tsx +47 -0
- package/src/layout/grid/grid.tsx +163 -0
- package/src/layout/grid/index.tsx +3 -0
- package/src/layout/index.tsx +3 -0
- package/src/layout/responsive.ts +26 -0
- package/src/layout/spacing.ts +37 -0
- package/src/layout/stack/index.tsx +2 -0
- package/src/layout/stack/stack.tsx +128 -0
- package/src/link/index.tsx +3 -0
- package/src/link/link.stories.tsx +64 -0
- package/src/link/link.tsx +46 -0
- package/src/list/index.tsx +5 -0
- package/src/list/link-list.stories.tsx +38 -0
- package/src/list/link-list.tsx +26 -0
- package/src/list/list.stories.tsx +71 -0
- package/src/list/list.tsx +65 -0
- package/src/message/index.tsx +2 -0
- package/src/message/message.stories.tsx +93 -0
- package/src/message/message.tsx +89 -0
- package/src/modal/index.tsx +3 -0
- package/src/modal/modal.stories.tsx +147 -0
- package/src/modal/modal.tsx +199 -0
- package/src/navbar/icons.tsx +21 -0
- package/src/navbar/index.tsx +18 -0
- package/src/navbar/navbar-expandable-menu.tsx +176 -0
- package/src/navbar/navbar.stories.tsx +99 -0
- package/src/navbar/navbar.tsx +264 -0
- package/src/show-more/index.ts +5 -0
- package/src/show-more/show-more.stories.tsx +119 -0
- package/src/show-more/show-more.tsx +66 -0
- package/src/skeleton/index.ts +2 -0
- package/src/skeleton/skeleton.stories.tsx +152 -0
- package/src/skeleton/skeleton.tsx +114 -0
- package/src/step-indicator/index.ts +2 -0
- package/src/step-indicator/step-indicator.stories.tsx +50 -0
- package/src/step-indicator/step-indicator.tsx +116 -0
- package/src/styled-html/index.ts +2 -0
- package/src/styled-html/styled-html.stories.tsx +189 -0
- package/src/styled-html/styled-html.tsx +59 -0
- package/src/table/index.ts +2 -0
- package/src/table/table.tsx +59 -0
- package/src/tabs/context.ts +18 -0
- package/src/tabs/index.tsx +7 -0
- package/src/tabs/tabs-content.tsx +62 -0
- package/src/tabs/tabs-list.tsx +129 -0
- package/src/tabs/tabs.stories.tsx +138 -0
- package/src/tabs/tabs.tsx +50 -0
- package/src/text/index.tsx +4 -0
- package/src/text/text.stories.tsx +112 -0
- package/src/text/text.tsx +129 -0
- package/src/utilities/auto-animate-height.tsx +139 -0
- package/src/utilities/index.ts +2 -0
- package/src/utils.ts +110 -0
- package/src/warning-banner/index.tsx +2 -0
- package/src/warning-banner/warning-banner.stories.tsx +43 -0
- package/src/warning-banner/warning-banner.tsx +79 -0
- package/dist/_tsup-dts-rollup.d.mts +0 -2600
- package/dist/_tsup-dts-rollup.d.ts +0 -2600
- package/dist/accordion/accordion-content.d.mts +0 -2
- package/dist/accordion/accordion-header.d.mts +0 -2
- package/dist/accordion/accordion-item.d.mts +0 -3
- package/dist/accordion/accordion.d.mts +0 -2
- package/dist/accordion/context.d.mts +0 -2
- package/dist/accordion/index.d.mts +0 -9
- package/dist/badge/badge.d.mts +0 -5
- package/dist/badge/index.d.mts +0 -6
- package/dist/box/box.d.mts +0 -4
- package/dist/box/index.d.mts +0 -4
- package/dist/breadcrumbs/breadcrumbs.d.mts +0 -2
- package/dist/breadcrumbs/index.d.mts +0 -2
- package/dist/button/button.d.mts +0 -3
- package/dist/button/index.d.mts +0 -3
- package/dist/card/card.d.mts +0 -12
- package/dist/card/index.d.mts +0 -12
- package/dist/chunk-3MQKXNZ6.mjs.map +0 -1
- package/dist/chunk-3NL3TOZF.mjs +0 -13
- package/dist/chunk-3NL3TOZF.mjs.map +0 -1
- package/dist/chunk-722MZPXO.mjs +0 -13
- package/dist/chunk-722MZPXO.mjs.map +0 -1
- package/dist/chunk-CIHZDFSQ.mjs.map +0 -1
- package/dist/chunk-CYEYGPRH.mjs +0 -17
- package/dist/chunk-CYEYGPRH.mjs.map +0 -1
- package/dist/chunk-ENKVTAJB.mjs.map +0 -1
- package/dist/chunk-GSJPTZT3.mjs.map +0 -1
- package/dist/chunk-GXYUJ5MA.mjs.map +0 -1
- package/dist/chunk-HBSDJAFF.mjs +0 -23
- package/dist/chunk-HBSDJAFF.mjs.map +0 -1
- package/dist/chunk-IJAX6APL.mjs +0 -23
- package/dist/chunk-IJAX6APL.mjs.map +0 -1
- package/dist/chunk-IKJJWKXM.mjs +0 -15
- package/dist/chunk-IKJJWKXM.mjs.map +0 -1
- package/dist/chunk-KPGSRU4I.mjs.map +0 -1
- package/dist/chunk-MKVI42QR.mjs +0 -19
- package/dist/chunk-MKVI42QR.mjs.map +0 -1
- package/dist/chunk-PT5H3QV6.mjs +0 -29
- package/dist/chunk-PT5H3QV6.mjs.map +0 -1
- package/dist/chunk-TQDUBRCZ.mjs.map +0 -1
- package/dist/chunk-V6UKKHKD.mjs +0 -33
- package/dist/chunk-V6UKKHKD.mjs.map +0 -1
- package/dist/chunk-XUWZ4HGD.mjs.map +0 -1
- package/dist/description-list/description-list.d.mts +0 -2
- package/dist/description-list/index.d.mts +0 -2
- package/dist/footer/footer.d.mts +0 -7
- package/dist/footer/index.d.mts +0 -7
- package/dist/form/checkbox/checkbox.d.mts +0 -2
- package/dist/form/checkbox/index.d.mts +0 -2
- package/dist/form/date-picker/date-picker.d.mts +0 -2
- package/dist/form/date-picker/index.d.mts +0 -2
- package/dist/form/error-message/error-message.d.mts +0 -2
- package/dist/form/error-message/index.d.mts +0 -2
- package/dist/form/fieldset/fieldset.d.mts +0 -3
- package/dist/form/fieldset/index.d.mts +0 -3
- package/dist/form/index.d.mts +0 -20
- package/dist/form/input/index.d.mts +0 -2
- package/dist/form/input/input.d.mts +0 -2
- package/dist/form/input-group/index.d.mts +0 -2
- package/dist/form/input-group/input-group.d.mts +0 -2
- package/dist/form/radiobutton/index.d.mts +0 -5
- package/dist/form/radiobutton/radiobutton.d.mts +0 -2
- package/dist/form/radiobutton/radiogroup.d.mts +0 -3
- package/dist/form/select/index.d.mts +0 -2
- package/dist/form/select/select.d.mts +0 -2
- package/dist/form/textarea/index.d.mts +0 -2
- package/dist/form/textarea/textarea.d.mts +0 -2
- package/dist/help-text/help-text.d.mts +0 -1
- package/dist/help-text/index.d.mts +0 -1
- package/dist/index-no-css.d.mts +0 -128
- package/dist/index.d.mts +0 -128
- package/dist/layout/container/container.d.mts +0 -2
- package/dist/layout/grid/grid.d.mts +0 -4
- package/dist/layout/grid/index.d.mts +0 -4
- package/dist/layout/index.d.mts +0 -10
- package/dist/layout/responsive.d.mts +0 -2
- package/dist/layout/spacing.d.mts +0 -3
- package/dist/layout/stack/index.d.mts +0 -4
- package/dist/layout/stack/stack.d.mts +0 -4
- package/dist/link/index.d.mts +0 -2
- package/dist/link/link.d.mts +0 -2
- package/dist/list/index.d.mts +0 -5
- package/dist/list/link-list.d.mts +0 -2
- package/dist/list/list.d.mts +0 -3
- package/dist/message/index.d.mts +0 -3
- package/dist/message/message.d.mts +0 -4
- package/dist/modal/index.d.mts +0 -5
- package/dist/modal/modal.d.mts +0 -5
- package/dist/navbar/icons.d.mts +0 -2
- package/dist/navbar/index.d.mts +0 -13
- package/dist/navbar/navbar-expandable-menu.d.mts +0 -7
- package/dist/navbar/navbar.d.mts +0 -9
- package/dist/show-more/index.d.mts +0 -4
- package/dist/show-more/show-more.d.mts +0 -2
- package/dist/skeleton/index.d.mts +0 -2
- package/dist/skeleton/skeleton.d.mts +0 -2
- package/dist/step-indicator/index.d.mts +0 -1
- package/dist/step-indicator/step-indicator.d.mts +0 -1
- package/dist/styled-html/index.d.mts +0 -2
- package/dist/styled-html/styled-html.d.mts +0 -2
- package/dist/table/index.d.mts +0 -1
- package/dist/table/table.d.mts +0 -1
- package/dist/tabs/context.d.mts +0 -3
- package/dist/tabs/index.d.mts +0 -10
- package/dist/tabs/tabs-content.d.mts +0 -4
- package/dist/tabs/tabs-list.d.mts +0 -4
- package/dist/tabs/tabs.d.mts +0 -2
- package/dist/text/index.d.mts +0 -2
- package/dist/text/text.d.mts +0 -2
- package/dist/utilities/auto-animate-height.d.mts +0 -2
- package/dist/utilities/index.d.mts +0 -2
- package/dist/utils.d.mts +0 -5
- package/dist/warning-banner/index.d.mts +0 -2
- package/dist/warning-banner/warning-banner.d.mts +0 -2
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
|
|
6
|
+
export const CardMedia = forwardRef<HTMLDivElement, CardBaseProps>(
|
|
7
|
+
({ asChild, className, children, ...rest }, ref) => {
|
|
8
|
+
const Component = asChild ? Slot : "div";
|
|
9
|
+
return (
|
|
10
|
+
<Component {...rest} className={clsx("hds-card__media", className as undefined)} ref={ref}>
|
|
11
|
+
{children}
|
|
12
|
+
</Component>
|
|
13
|
+
);
|
|
14
|
+
},
|
|
15
|
+
);
|
|
16
|
+
CardMedia.displayName = "Card.Media";
|
|
17
|
+
|
|
18
|
+
export interface CardImageMediaProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
19
|
+
/**
|
|
20
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
21
|
+
*
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export const CardMediaImg = forwardRef<HTMLImageElement, CardImageMediaProps>(
|
|
27
|
+
({ asChild, className, ...rest }, ref) => {
|
|
28
|
+
const Component = asChild ? Slot : "img";
|
|
29
|
+
return (
|
|
30
|
+
<Component
|
|
31
|
+
{...rest}
|
|
32
|
+
className={clsx("hds-card__media__img", className as undefined)}
|
|
33
|
+
ref={ref}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
CardMediaImg.displayName = "Card.MediaImg";
|
|
39
|
+
|
|
40
|
+
export const CardBody = forwardRef<HTMLDivElement, CardBaseProps>(
|
|
41
|
+
({ asChild, className, children, ...rest }, ref) => {
|
|
42
|
+
const Component = asChild ? Slot : "div";
|
|
43
|
+
return (
|
|
44
|
+
<Component {...rest} className={clsx("hds-card__body", className as undefined)} ref={ref}>
|
|
45
|
+
{children}
|
|
46
|
+
</Component>
|
|
47
|
+
);
|
|
48
|
+
},
|
|
49
|
+
);
|
|
50
|
+
CardBody.displayName = "Card.Body";
|
|
51
|
+
|
|
52
|
+
export const CardBodyHeader = forwardRef<
|
|
53
|
+
HTMLHeadingElement,
|
|
54
|
+
CardBaseProps &
|
|
55
|
+
(
|
|
56
|
+
| {
|
|
57
|
+
/**
|
|
58
|
+
* Heading level of the card heading
|
|
59
|
+
*/
|
|
60
|
+
as: "h2" | "h3" | "h4" | "h5" | "h6";
|
|
61
|
+
asChild?: never;
|
|
62
|
+
}
|
|
63
|
+
| {
|
|
64
|
+
asChild: true;
|
|
65
|
+
as?: never;
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
>(({ as: Tag, asChild, className, children, ...rest }, ref) => {
|
|
69
|
+
const Component = asChild ? Slot : Tag;
|
|
70
|
+
return (
|
|
71
|
+
<Component
|
|
72
|
+
{...rest}
|
|
73
|
+
className={clsx("hds-card__body-header", className as undefined)}
|
|
74
|
+
ref={ref}
|
|
75
|
+
>
|
|
76
|
+
{children}
|
|
77
|
+
</Component>
|
|
78
|
+
);
|
|
79
|
+
});
|
|
80
|
+
CardBodyHeader.displayName = "Card.BodyHeader";
|
|
81
|
+
|
|
82
|
+
export const CardBodyHeaderOverline = forwardRef<HTMLDivElement, CardBaseProps>(
|
|
83
|
+
({ asChild, className, children, ...rest }, ref) => {
|
|
84
|
+
const Component = asChild ? Slot : "span";
|
|
85
|
+
return (
|
|
86
|
+
<Component
|
|
87
|
+
{...rest}
|
|
88
|
+
className={clsx("hds-card__body-header-overline", className as undefined)}
|
|
89
|
+
ref={ref}
|
|
90
|
+
>
|
|
91
|
+
{children}
|
|
92
|
+
</Component>
|
|
93
|
+
);
|
|
94
|
+
},
|
|
95
|
+
);
|
|
96
|
+
CardBodyHeaderOverline.displayName = "Card.BodyHeaderOverline";
|
|
97
|
+
|
|
98
|
+
export const CardBodyHeaderTitle = forwardRef<HTMLDivElement, CardBaseProps>(
|
|
99
|
+
({ asChild, className, children, ...rest }, ref) => {
|
|
100
|
+
const Component = asChild ? Slot : "div";
|
|
101
|
+
return (
|
|
102
|
+
<Component
|
|
103
|
+
{...rest}
|
|
104
|
+
className={clsx("hds-card__body-header-title", className as undefined)}
|
|
105
|
+
ref={ref}
|
|
106
|
+
>
|
|
107
|
+
{children}
|
|
108
|
+
</Component>
|
|
109
|
+
);
|
|
110
|
+
},
|
|
111
|
+
);
|
|
112
|
+
CardBodyHeaderTitle.displayName = "Card.BodyHeaderTitle";
|
|
113
|
+
|
|
114
|
+
export const CardBodyDescription = forwardRef<HTMLParagraphElement, CardBaseProps>(
|
|
115
|
+
({ asChild, className, children, ...rest }, ref) => {
|
|
116
|
+
const Component = asChild ? Slot : "p";
|
|
117
|
+
return (
|
|
118
|
+
<Component
|
|
119
|
+
{...rest}
|
|
120
|
+
className={clsx("hds-card__body-description", className as undefined)}
|
|
121
|
+
ref={ref}
|
|
122
|
+
>
|
|
123
|
+
{children}
|
|
124
|
+
</Component>
|
|
125
|
+
);
|
|
126
|
+
},
|
|
127
|
+
);
|
|
128
|
+
CardBodyDescription.displayName = "Card.BodyDescription";
|
|
129
|
+
|
|
130
|
+
export const CardBodyAction = forwardRef<HTMLDivElement, CardBaseProps>(
|
|
131
|
+
({ asChild, className, children, ...rest }, ref) => {
|
|
132
|
+
const Component = asChild ? Slot : "div";
|
|
133
|
+
return (
|
|
134
|
+
<Component
|
|
135
|
+
{...rest}
|
|
136
|
+
className={clsx("hds-card__body-action", className as undefined)}
|
|
137
|
+
ref={ref}
|
|
138
|
+
>
|
|
139
|
+
{children}
|
|
140
|
+
</Component>
|
|
141
|
+
);
|
|
142
|
+
},
|
|
143
|
+
);
|
|
144
|
+
CardBodyAction.displayName = "Card.BodyAction";
|
|
145
|
+
|
|
146
|
+
interface CardBodyActionArrowProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
147
|
+
/**
|
|
148
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
149
|
+
*
|
|
150
|
+
* @default false
|
|
151
|
+
*/
|
|
152
|
+
asChild?: boolean;
|
|
153
|
+
}
|
|
154
|
+
export const CardBodyActionArrow = forwardRef<HTMLSpanElement, CardBodyActionArrowProps>(
|
|
155
|
+
({ asChild, className, ...rest }, ref) => {
|
|
156
|
+
const Component = asChild ? Slot : "span";
|
|
157
|
+
return (
|
|
158
|
+
<Component
|
|
159
|
+
{...rest}
|
|
160
|
+
className={clsx("hds-card__body-action-arrow", className as undefined)}
|
|
161
|
+
ref={ref}
|
|
162
|
+
/>
|
|
163
|
+
);
|
|
164
|
+
},
|
|
165
|
+
);
|
|
166
|
+
CardBodyActionArrow.displayName = "Card.BodyActionArrow";
|
|
167
|
+
|
|
168
|
+
export interface CardBaseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
169
|
+
children: ReactNode;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
173
|
+
*
|
|
174
|
+
* @default false
|
|
175
|
+
*/
|
|
176
|
+
asChild?: boolean;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface CardProps extends CardBaseProps {
|
|
180
|
+
/**
|
|
181
|
+
* A Card should in most cases appear as a big link,
|
|
182
|
+
* but the actual link should just be the header title.
|
|
183
|
+
* To make life better for those with screen readers we should not make
|
|
184
|
+
* the entire card a link, as that would cause the entire card to be read
|
|
185
|
+
* as a link to the user. That would be perceived as information overload.
|
|
186
|
+
*/
|
|
187
|
+
as?: "section" | "div" | "article" | "aside";
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export const Card = forwardRef<HTMLDivElement, CardProps>(
|
|
191
|
+
({ as: Tag = "section", asChild, className, children, ...rest }, ref) => {
|
|
192
|
+
const Component = asChild ? Slot : Tag;
|
|
193
|
+
return (
|
|
194
|
+
<Component {...rest} className={clsx("hds-card", className as undefined)} ref={ref}>
|
|
195
|
+
{children}
|
|
196
|
+
</Component>
|
|
197
|
+
);
|
|
198
|
+
},
|
|
199
|
+
) as CardType;
|
|
200
|
+
Card.displayName = "Card";
|
|
201
|
+
|
|
202
|
+
Card.Media = CardMedia;
|
|
203
|
+
Card.MediaImg = CardMediaImg;
|
|
204
|
+
Card.Body = CardBody;
|
|
205
|
+
Card.BodyHeader = CardBodyHeader;
|
|
206
|
+
Card.BodyHeaderOverline = CardBodyHeaderOverline;
|
|
207
|
+
Card.BodyHeaderTitle = CardBodyHeaderTitle;
|
|
208
|
+
Card.BodyDescription = CardBodyDescription;
|
|
209
|
+
Card.BodyAction = CardBodyAction;
|
|
210
|
+
Card.BodyActionArrow = CardBodyActionArrow;
|
|
211
|
+
|
|
212
|
+
type CardType = ReturnType<typeof forwardRef<HTMLDivElement, CardProps>> & {
|
|
213
|
+
Media: typeof CardMedia;
|
|
214
|
+
MediaImg: typeof CardMediaImg;
|
|
215
|
+
Body: typeof CardBody;
|
|
216
|
+
BodyHeader: typeof CardBodyHeader;
|
|
217
|
+
BodyHeaderOverline: typeof CardBodyHeaderOverline;
|
|
218
|
+
BodyHeaderTitle: typeof CardBodyHeaderTitle;
|
|
219
|
+
BodyDescription: typeof CardBodyDescription;
|
|
220
|
+
BodyAction: typeof CardBodyAction;
|
|
221
|
+
BodyActionArrow: typeof CardBodyActionArrow;
|
|
222
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { DescriptionList } from ".";
|
|
4
|
+
|
|
5
|
+
type Story = StoryObj<typeof DescriptionList>;
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof DescriptionList> = {
|
|
8
|
+
title: "Description List",
|
|
9
|
+
component: DescriptionList,
|
|
10
|
+
args: {
|
|
11
|
+
children: (
|
|
12
|
+
<>
|
|
13
|
+
<dt>Vekt</dt>
|
|
14
|
+
<dd>12 kg</dd>
|
|
15
|
+
<dt>Antall kolli</dt>
|
|
16
|
+
<dd>2</dd>
|
|
17
|
+
<dt>Sendingsnummer</dt>
|
|
18
|
+
<dd>7000001</dd>
|
|
19
|
+
<dt>Avsender</dt>
|
|
20
|
+
<dd>Fjellsport</dd>
|
|
21
|
+
</>
|
|
22
|
+
),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default meta;
|
|
27
|
+
|
|
28
|
+
export const Vertical: Story = { args: { variant: "vertical" } };
|
|
29
|
+
export const Horizontal: Story = { args: { variant: "horizontal" } };
|
|
30
|
+
|
|
31
|
+
export const WrappedInDivs: Story = {
|
|
32
|
+
args: {
|
|
33
|
+
children: (
|
|
34
|
+
<>
|
|
35
|
+
<div>
|
|
36
|
+
<dt>Vekt</dt>
|
|
37
|
+
<dd>12 kg</dd>
|
|
38
|
+
</div>
|
|
39
|
+
<div>
|
|
40
|
+
<dt>Antall kolli</dt>
|
|
41
|
+
<dd>2</dd>
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<dt>Sendingsnummer</dt>
|
|
45
|
+
<dd>7000001</dd>
|
|
46
|
+
</div>
|
|
47
|
+
<div>
|
|
48
|
+
<dt>Avsender</dt>
|
|
49
|
+
<dd>Fjellsport</dd>
|
|
50
|
+
</div>
|
|
51
|
+
</>
|
|
52
|
+
),
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const Paragraph: Story = {
|
|
57
|
+
name: "<p> tag as child",
|
|
58
|
+
args: {
|
|
59
|
+
variant: "horizontal",
|
|
60
|
+
children: (
|
|
61
|
+
<>
|
|
62
|
+
<dt>Vekt</dt>
|
|
63
|
+
<dd>12 kg</dd>
|
|
64
|
+
<dt>
|
|
65
|
+
<p>Title</p>
|
|
66
|
+
</dt>
|
|
67
|
+
<dd>
|
|
68
|
+
<p>Paragraph</p>
|
|
69
|
+
</dd>
|
|
70
|
+
</>
|
|
71
|
+
),
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const HorizontalLongContent: Story = {
|
|
76
|
+
args: {
|
|
77
|
+
variant: "horizontal",
|
|
78
|
+
children: (
|
|
79
|
+
<>
|
|
80
|
+
<dt>Vekt</dt>
|
|
81
|
+
<dd>12 kg</dd>
|
|
82
|
+
<dt>
|
|
83
|
+
<p>Title</p>
|
|
84
|
+
</dt>
|
|
85
|
+
<dd>
|
|
86
|
+
<p>
|
|
87
|
+
ParagraphParagraphParagraphParagraphParagraphParagraphParagraphParagraphParagraphParagraphParagraphParagraphParagraphParagraphParagraphParagraph
|
|
88
|
+
</p>
|
|
89
|
+
</dd>
|
|
90
|
+
<dt>Avsender</dt>
|
|
91
|
+
<dd>Fjellsport</dd>
|
|
92
|
+
</>
|
|
93
|
+
),
|
|
94
|
+
},
|
|
95
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { forwardRef, type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
3
|
+
|
|
4
|
+
export interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Either `dt`, `dl`, or `div` elements
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Direction of the description list
|
|
11
|
+
*/
|
|
12
|
+
variant?: "vertical" | "horizontal";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Uses the HTML5 `<dl>` element
|
|
17
|
+
*
|
|
18
|
+
* Pass in corresponding `<dt>` and `<dd>` elements as children
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <DescriptionList>
|
|
22
|
+
* <dt>Vekt</dt>
|
|
23
|
+
* <dd>12 kg</dd>
|
|
24
|
+
* <dt>Antall kolli</dt>
|
|
25
|
+
* <dd>2</dd>
|
|
26
|
+
* </DescriptionList>
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* Optionally wrap them in `<div>` elements as allowed by the HTML5 spec
|
|
30
|
+
*
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <DescriptionList>
|
|
33
|
+
* <div>
|
|
34
|
+
* <dt>Vekt</dt>
|
|
35
|
+
* <dd>12 kg</dd>
|
|
36
|
+
* </div>
|
|
37
|
+
* <div>
|
|
38
|
+
* <dt>Antall kolli</dt>
|
|
39
|
+
* <dd>2</dd>
|
|
40
|
+
* </div>
|
|
41
|
+
* </DescriptionList>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export const DescriptionList = forwardRef<HTMLDListElement, DescriptionListProps>(
|
|
45
|
+
({ variant = "vertical", className, ...rest }, ref) => {
|
|
46
|
+
return (
|
|
47
|
+
<dl
|
|
48
|
+
ref={ref}
|
|
49
|
+
className={clsx(
|
|
50
|
+
"hds-description-list",
|
|
51
|
+
{
|
|
52
|
+
"hds-description-list--horizontal": variant === "horizontal",
|
|
53
|
+
},
|
|
54
|
+
className as undefined,
|
|
55
|
+
)}
|
|
56
|
+
{...rest}
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
59
|
+
},
|
|
60
|
+
);
|
|
61
|
+
DescriptionList.displayName = "DescriptionList";
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { forwardRef, type HTMLAttributes, type ReactElement } from "react";
|
|
2
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { Accordion } from "../accordion";
|
|
5
|
+
import { LinkList } from "../list/link-list";
|
|
6
|
+
import { PrimaryButton } from "../button";
|
|
7
|
+
|
|
8
|
+
interface FooterLogoProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
/**
|
|
10
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
11
|
+
*
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A fixed Posten or Bring logo.
|
|
19
|
+
*
|
|
20
|
+
* The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo
|
|
21
|
+
*/
|
|
22
|
+
export const FooterLogo = forwardRef<HTMLDivElement, FooterLogoProps>(
|
|
23
|
+
({ children, className, asChild, ...rest }, ref) => {
|
|
24
|
+
const Component = asChild ? Slot : "div";
|
|
25
|
+
return (
|
|
26
|
+
<Component className={clsx(`hds-footer__logo`, className as undefined)} ref={ref} {...rest}>
|
|
27
|
+
{children}
|
|
28
|
+
</Component>
|
|
29
|
+
);
|
|
30
|
+
},
|
|
31
|
+
);
|
|
32
|
+
FooterLogo.displayName = "Footer.Logo";
|
|
33
|
+
|
|
34
|
+
export interface FooterButtonLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
35
|
+
/**
|
|
36
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
37
|
+
*
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
asChild?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 🚨 WORK IN PROGRESS 🚨
|
|
45
|
+
*/
|
|
46
|
+
export const FooterButtonLink = forwardRef<HTMLAnchorElement, FooterButtonLinkProps>(
|
|
47
|
+
({ children, className, asChild, ...rest }, ref) => {
|
|
48
|
+
const Component = asChild ? Slot : "a";
|
|
49
|
+
return (
|
|
50
|
+
<PrimaryButton asChild fill="outline" className={clsx(className as undefined)}>
|
|
51
|
+
<Component ref={ref} {...rest}>
|
|
52
|
+
{children}
|
|
53
|
+
</Component>
|
|
54
|
+
</PrimaryButton>
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
);
|
|
58
|
+
FooterButtonLink.displayName = "FooterButton";
|
|
59
|
+
|
|
60
|
+
interface FooterLinkSectionsProps extends HTMLAttributes<HTMLDivElement> {
|
|
61
|
+
children: ReactElement<FooterLinkSectionProps> | ReactElement<FooterLinkSectionProps>[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Responsive sections of links. Will become an accordion on mobile.
|
|
66
|
+
*
|
|
67
|
+
* Use with {@link FooterLinkSection} for each section.
|
|
68
|
+
*/
|
|
69
|
+
export const FooterLinkSections = forwardRef<HTMLDivElement, FooterLinkSectionsProps>(
|
|
70
|
+
({ children, className, ...rest }, ref) => {
|
|
71
|
+
return (
|
|
72
|
+
<>
|
|
73
|
+
{/* Mobile and Desktop. The accordion styling gets removed on desktop */}
|
|
74
|
+
<Accordion
|
|
75
|
+
className={clsx("hds-footer__link-sections", className as undefined)}
|
|
76
|
+
ref={ref}
|
|
77
|
+
{...rest}
|
|
78
|
+
>
|
|
79
|
+
{/* @ts-expect-error -- It's ok */}
|
|
80
|
+
{children}
|
|
81
|
+
</Accordion>
|
|
82
|
+
</>
|
|
83
|
+
);
|
|
84
|
+
},
|
|
85
|
+
);
|
|
86
|
+
FooterLinkSections.displayName = "Footer.LinkSections";
|
|
87
|
+
|
|
88
|
+
interface FooterLinkSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
89
|
+
heading: React.ReactNode;
|
|
90
|
+
children: React.ReactNode;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const FooterLinkSection = forwardRef<HTMLDivElement, FooterLinkSectionProps>(
|
|
94
|
+
({ heading, children, className, ...rest }, ref) => {
|
|
95
|
+
// @ts-expect-error -- It's ok
|
|
96
|
+
const linkListChildren = <LinkList>{children}</LinkList>;
|
|
97
|
+
return (
|
|
98
|
+
<>
|
|
99
|
+
{/* Mobile */}
|
|
100
|
+
<Accordion.Item
|
|
101
|
+
className={clsx(`hds-footer__link-section`, className as undefined)}
|
|
102
|
+
ref={ref}
|
|
103
|
+
{...rest}
|
|
104
|
+
>
|
|
105
|
+
<Accordion.Header>{heading}</Accordion.Header>
|
|
106
|
+
<Accordion.Content>{linkListChildren}</Accordion.Content>
|
|
107
|
+
</Accordion.Item>
|
|
108
|
+
|
|
109
|
+
{/* Desktop */}
|
|
110
|
+
<div className={clsx(`hds-footer__link-section`, className as undefined)}>
|
|
111
|
+
<h2>{heading}</h2>
|
|
112
|
+
{linkListChildren}
|
|
113
|
+
</div>
|
|
114
|
+
</>
|
|
115
|
+
);
|
|
116
|
+
},
|
|
117
|
+
);
|
|
118
|
+
FooterLinkSection.displayName = "Footer.LinkSection";
|
|
119
|
+
|
|
120
|
+
export interface FooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
121
|
+
/**
|
|
122
|
+
* Footer variant
|
|
123
|
+
*
|
|
124
|
+
* @default "default"
|
|
125
|
+
*/
|
|
126
|
+
variant?: "default" | "slim";
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
130
|
+
*
|
|
131
|
+
* @default false
|
|
132
|
+
*/
|
|
133
|
+
asChild?: boolean;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* 🚨 WORK IN PROGRESS 🚨
|
|
138
|
+
*/
|
|
139
|
+
export const Footer = forwardRef<HTMLDivElement, FooterProps>(
|
|
140
|
+
({ children, className, variant, asChild, ...rest }, ref) => {
|
|
141
|
+
const Component = asChild ? Slot : "footer";
|
|
142
|
+
return (
|
|
143
|
+
<Component
|
|
144
|
+
className={clsx(
|
|
145
|
+
`hds-footer`,
|
|
146
|
+
variant === "slim" && "hds-footer--slim",
|
|
147
|
+
className as undefined,
|
|
148
|
+
)}
|
|
149
|
+
ref={ref}
|
|
150
|
+
{...rest}
|
|
151
|
+
>
|
|
152
|
+
{children}
|
|
153
|
+
</Component>
|
|
154
|
+
);
|
|
155
|
+
},
|
|
156
|
+
) as FooterType;
|
|
157
|
+
Footer.displayName = "Footer";
|
|
158
|
+
|
|
159
|
+
type FooterType = ReturnType<typeof forwardRef<HTMLDivElement, FooterProps>> & {
|
|
160
|
+
Logo: typeof FooterLogo;
|
|
161
|
+
ButtonLink: typeof FooterButtonLink;
|
|
162
|
+
LinkSections: typeof FooterLinkSections;
|
|
163
|
+
LinkSection: typeof FooterLinkSection;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
Footer.Logo = FooterLogo;
|
|
167
|
+
Footer.ButtonLink = FooterButtonLink;
|
|
168
|
+
Footer.LinkSections = FooterLinkSections;
|
|
169
|
+
Footer.LinkSection = FooterLinkSection;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies -- storybook story */
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { Fieldset } from "../fieldset";
|
|
4
|
+
import { VStack } from "../../layout";
|
|
5
|
+
import { Checkbox } from "./index";
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Checkbox> = {
|
|
8
|
+
title: "Form/Checkbox",
|
|
9
|
+
component: Checkbox,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof Checkbox>;
|
|
15
|
+
|
|
16
|
+
export const JustACheckbox: Story = {
|
|
17
|
+
name: "Just a checkbox",
|
|
18
|
+
args: {
|
|
19
|
+
title: "",
|
|
20
|
+
children: "Just a checkbox",
|
|
21
|
+
checked: true,
|
|
22
|
+
errorMessage: "",
|
|
23
|
+
variant: "plain",
|
|
24
|
+
onChange: () => {
|
|
25
|
+
/**/
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
argTypes: {
|
|
29
|
+
variant: { control: "inline-radio", options: ["plain", "bounding-box"] },
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const PlainCheckboxes: Story = {
|
|
34
|
+
name: "Checkboxes",
|
|
35
|
+
render: (_props) => (
|
|
36
|
+
<Fieldset legend="Checkboxes should be grouped in a Fieldset">
|
|
37
|
+
<Checkbox>This is a checkbox</Checkbox>
|
|
38
|
+
<Checkbox>This is another checkbox</Checkbox>
|
|
39
|
+
</Fieldset>
|
|
40
|
+
),
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const PlainCheckboxesWithError: Story = {
|
|
44
|
+
name: "Checkboxes with error",
|
|
45
|
+
render: (_props) => (
|
|
46
|
+
<Fieldset
|
|
47
|
+
legend="Fieldset will aid you with styling and aria when it is provided an error message"
|
|
48
|
+
errorMessage="Something is wrong"
|
|
49
|
+
>
|
|
50
|
+
<Checkbox>This is a checkbox</Checkbox>
|
|
51
|
+
<Checkbox>This is another checkbox</Checkbox>
|
|
52
|
+
</Fieldset>
|
|
53
|
+
),
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const PlainCheckboxeWithError: Story = {
|
|
57
|
+
name: "Standalone checkbox with error message",
|
|
58
|
+
args: {
|
|
59
|
+
errorMessage: "Something is wrong",
|
|
60
|
+
children: "This is a checkbox with an error message",
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const BoundedCheckbox: Story = {
|
|
65
|
+
name: "Checkbox with bounding box",
|
|
66
|
+
render: (_props) => (
|
|
67
|
+
<VStack gap="8">
|
|
68
|
+
<Checkbox variant="bounding-box">This is a checkbox with bounding box</Checkbox>
|
|
69
|
+
<Checkbox errorMessage="Something is wrong" variant="bounding-box">
|
|
70
|
+
This is a checkbox with bounding box and error
|
|
71
|
+
</Checkbox>
|
|
72
|
+
</VStack>
|
|
73
|
+
),
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const DetailedContentCheckbox: Story = {
|
|
77
|
+
name: "Checkbox with title",
|
|
78
|
+
render: (_props) => (
|
|
79
|
+
<VStack gap="8">
|
|
80
|
+
<Checkbox title="Check this box">Detailed description if needed</Checkbox>
|
|
81
|
+
<Checkbox errorMessage="Something is wrong" title="Checkbox with error">
|
|
82
|
+
Detailed description if needed
|
|
83
|
+
</Checkbox>
|
|
84
|
+
</VStack>
|
|
85
|
+
),
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const DetailedContentCheckboxWithBoundingBox: Story = {
|
|
89
|
+
name: "Checkbox with bounding box and title",
|
|
90
|
+
render: (_props) => (
|
|
91
|
+
<VStack gap="8">
|
|
92
|
+
<Checkbox title="Check this box" variant="bounding-box">
|
|
93
|
+
Detailed description if needed
|
|
94
|
+
</Checkbox>
|
|
95
|
+
<Checkbox
|
|
96
|
+
errorMessage="Something is wrong"
|
|
97
|
+
title="Checkbox with error"
|
|
98
|
+
variant="bounding-box"
|
|
99
|
+
>
|
|
100
|
+
Detailed description if needed
|
|
101
|
+
</Checkbox>
|
|
102
|
+
</VStack>
|
|
103
|
+
),
|
|
104
|
+
};
|