@postenbring/hedwig-react 0.0.0-20240621114825
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/LICENSE +19 -0
- package/README.md +3 -0
- package/dist/accordion/accordion-content.d.ts +6 -0
- package/dist/accordion/accordion-content.d.ts.map +1 -0
- package/dist/accordion/accordion-content.js +91 -0
- package/dist/accordion/accordion-content.js.map +1 -0
- package/dist/accordion/accordion-content.mjs +9 -0
- package/dist/accordion/accordion-content.mjs.map +1 -0
- package/dist/accordion/accordion-header.d.ts +6 -0
- package/dist/accordion/accordion-header.d.ts.map +1 -0
- package/dist/accordion/accordion-header.js +95 -0
- package/dist/accordion/accordion-header.js.map +1 -0
- package/dist/accordion/accordion-header.mjs +9 -0
- package/dist/accordion/accordion-header.mjs.map +1 -0
- package/dist/accordion/accordion-item.d.ts +24 -0
- package/dist/accordion/accordion-item.d.ts.map +1 -0
- package/dist/accordion/accordion-item.js +93 -0
- package/dist/accordion/accordion-item.js.map +1 -0
- package/dist/accordion/accordion-item.mjs +9 -0
- package/dist/accordion/accordion-item.mjs.map +1 -0
- package/dist/accordion/accordion.d.ts +44 -0
- package/dist/accordion/accordion.d.ts.map +1 -0
- package/dist/accordion/accordion.js +181 -0
- package/dist/accordion/accordion.js.map +1 -0
- package/dist/accordion/accordion.mjs +12 -0
- package/dist/accordion/accordion.mjs.map +1 -0
- package/dist/accordion/context.d.ts +8 -0
- package/dist/accordion/context.d.ts.map +1 -0
- package/dist/accordion/context.js +32 -0
- package/dist/accordion/context.js.map +1 -0
- package/dist/accordion/context.mjs +8 -0
- package/dist/accordion/context.mjs.map +1 -0
- package/dist/accordion/index.d.ts +9 -0
- package/dist/accordion/index.d.ts.map +1 -0
- package/dist/accordion/index.js +189 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/accordion/index.mjs +22 -0
- package/dist/accordion/index.mjs.map +1 -0
- package/dist/badge/badge.d.ts +34 -0
- package/dist/badge/badge.d.ts.map +1 -0
- package/dist/badge/badge.js +84 -0
- package/dist/badge/badge.js.map +1 -0
- package/dist/badge/badge.mjs +8 -0
- package/dist/badge/badge.mjs.map +1 -0
- package/dist/badge/index.d.ts +3 -0
- package/dist/badge/index.d.ts.map +1 -0
- package/dist/badge/index.js +86 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/badge/index.mjs +9 -0
- package/dist/badge/index.mjs.map +1 -0
- 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/blockquote.mjs.map +1 -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/blockquote/index.mjs.map +1 -0
- package/dist/box/box.d.ts +50 -0
- package/dist/box/box.d.ts.map +1 -0
- package/dist/box/box.js +134 -0
- package/dist/box/box.js.map +1 -0
- package/dist/box/box.mjs +10 -0
- package/dist/box/box.mjs.map +1 -0
- package/dist/box/index.d.ts +3 -0
- package/dist/box/index.d.ts.map +1 -0
- package/dist/box/index.js +136 -0
- package/dist/box/index.js.map +1 -0
- package/dist/box/index.mjs +11 -0
- package/dist/box/index.mjs.map +1 -0
- package/dist/breadcrumbs/breadcrumbs.d.ts +33 -0
- package/dist/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/breadcrumbs/breadcrumbs.js +69 -0
- package/dist/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/breadcrumbs/breadcrumbs.mjs +8 -0
- package/dist/breadcrumbs/breadcrumbs.mjs.map +1 -0
- package/dist/breadcrumbs/index.d.ts +3 -0
- package/dist/breadcrumbs/index.d.ts.map +1 -0
- package/dist/breadcrumbs/index.js +71 -0
- package/dist/breadcrumbs/index.js.map +1 -0
- package/dist/breadcrumbs/index.mjs +9 -0
- package/dist/breadcrumbs/index.mjs.map +1 -0
- package/dist/button/button.d.ts +45 -0
- package/dist/button/button.d.ts.map +1 -0
- package/dist/button/button.js +105 -0
- package/dist/button/button.js.map +1 -0
- package/dist/button/button.mjs +8 -0
- package/dist/button/button.mjs.map +1 -0
- package/dist/button/index.d.ts +3 -0
- package/dist/button/index.d.ts.map +1 -0
- package/dist/button/index.js +107 -0
- package/dist/button/index.js.map +1 -0
- package/dist/button/index.mjs +9 -0
- package/dist/button/index.mjs.map +1 -0
- package/dist/card/card.d.ts +69 -0
- package/dist/card/card.d.ts.map +1 -0
- package/dist/card/card.js +215 -0
- package/dist/card/card.js.map +1 -0
- package/dist/card/card.mjs +26 -0
- package/dist/card/card.mjs.map +1 -0
- package/dist/card/index.d.ts +3 -0
- package/dist/card/index.d.ts.map +1 -0
- package/dist/card/index.js +217 -0
- package/dist/card/index.js.map +1 -0
- package/dist/card/index.mjs +27 -0
- package/dist/card/index.mjs.map +1 -0
- package/dist/chunk-2YL2MVWN.mjs +1 -0
- package/dist/chunk-2YL2MVWN.mjs.map +1 -0
- package/dist/chunk-35QRZSEV.mjs +40 -0
- package/dist/chunk-35QRZSEV.mjs.map +1 -0
- package/dist/chunk-3D2MWIEX.mjs +1 -0
- package/dist/chunk-3D2MWIEX.mjs.map +1 -0
- package/dist/chunk-3H7S7C3S.mjs +37 -0
- package/dist/chunk-3H7S7C3S.mjs.map +1 -0
- package/dist/chunk-3LYJRAOC.mjs +1 -0
- package/dist/chunk-3LYJRAOC.mjs.map +1 -0
- package/dist/chunk-3OGHJOJF.mjs +86 -0
- package/dist/chunk-3OGHJOJF.mjs.map +1 -0
- package/dist/chunk-4QZR2H72.mjs +35 -0
- package/dist/chunk-4QZR2H72.mjs.map +1 -0
- package/dist/chunk-5UGT7L7R.mjs +102 -0
- package/dist/chunk-5UGT7L7R.mjs.map +1 -0
- package/dist/chunk-6BXKRPR3.mjs +36 -0
- package/dist/chunk-6BXKRPR3.mjs.map +1 -0
- package/dist/chunk-6QV3OV66.mjs +1 -0
- package/dist/chunk-6QV3OV66.mjs.map +1 -0
- package/dist/chunk-6VKQ6IRG.mjs +130 -0
- package/dist/chunk-6VKQ6IRG.mjs.map +1 -0
- package/dist/chunk-6ZO2TMOX.mjs +136 -0
- package/dist/chunk-6ZO2TMOX.mjs.map +1 -0
- package/dist/chunk-7LPYJC6S.mjs +1 -0
- package/dist/chunk-7LPYJC6S.mjs.map +1 -0
- package/dist/chunk-7ROE6ADK.mjs +17 -0
- package/dist/chunk-7ROE6ADK.mjs.map +1 -0
- package/dist/chunk-7YWW46R3.mjs +1 -0
- package/dist/chunk-7YWW46R3.mjs.map +1 -0
- package/dist/chunk-A42PXOVR.mjs +22 -0
- package/dist/chunk-A42PXOVR.mjs.map +1 -0
- package/dist/chunk-AGZHQDCQ.mjs +1 -0
- package/dist/chunk-AGZHQDCQ.mjs.map +1 -0
- package/dist/chunk-AJFQHFQT.mjs +1 -0
- package/dist/chunk-AJFQHFQT.mjs.map +1 -0
- package/dist/chunk-ARHJZUZG.mjs +1 -0
- package/dist/chunk-ARHJZUZG.mjs.map +1 -0
- package/dist/chunk-AYCHNAU7.mjs +58 -0
- package/dist/chunk-AYCHNAU7.mjs.map +1 -0
- package/dist/chunk-AZ6X4L5C.mjs +159 -0
- package/dist/chunk-AZ6X4L5C.mjs.map +1 -0
- package/dist/chunk-BCFV6VOE.mjs +1 -0
- package/dist/chunk-BCFV6VOE.mjs.map +1 -0
- package/dist/chunk-BHQ46L2O.mjs +69 -0
- package/dist/chunk-BHQ46L2O.mjs.map +1 -0
- package/dist/chunk-BVG5VSZK.mjs +1 -0
- package/dist/chunk-BVG5VSZK.mjs.map +1 -0
- package/dist/chunk-BYEJZSG5.mjs +1 -0
- package/dist/chunk-BYEJZSG5.mjs.map +1 -0
- package/dist/chunk-C7ZTOZP3.mjs +33 -0
- package/dist/chunk-C7ZTOZP3.mjs.map +1 -0
- package/dist/chunk-CC5QWW52.mjs +32 -0
- package/dist/chunk-CC5QWW52.mjs.map +1 -0
- package/dist/chunk-CFAH2LID.mjs +1 -0
- package/dist/chunk-CFAH2LID.mjs.map +1 -0
- package/dist/chunk-CSXSUQ2M.mjs +1 -0
- package/dist/chunk-CSXSUQ2M.mjs.map +1 -0
- package/dist/chunk-CXX4SXJG.mjs +45 -0
- package/dist/chunk-CXX4SXJG.mjs.map +1 -0
- package/dist/chunk-CYDWEPFL.mjs +1 -0
- package/dist/chunk-CYDWEPFL.mjs.map +1 -0
- package/dist/chunk-DMOMTRIY.mjs +69 -0
- package/dist/chunk-DMOMTRIY.mjs.map +1 -0
- package/dist/chunk-EAFQ3XQU.mjs +76 -0
- package/dist/chunk-EAFQ3XQU.mjs.map +1 -0
- package/dist/chunk-EGW3RCXD.mjs +37 -0
- package/dist/chunk-EGW3RCXD.mjs.map +1 -0
- package/dist/chunk-EMQB6JIS.mjs +82 -0
- package/dist/chunk-EMQB6JIS.mjs.map +1 -0
- package/dist/chunk-ESVGPI3B.mjs +37 -0
- package/dist/chunk-ESVGPI3B.mjs.map +1 -0
- package/dist/chunk-EZVEYJOX.mjs +43 -0
- package/dist/chunk-EZVEYJOX.mjs.map +1 -0
- package/dist/chunk-FUIKSOJF.mjs +75 -0
- package/dist/chunk-FUIKSOJF.mjs.map +1 -0
- 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-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-HT2EIJAD.mjs +1 -0
- package/dist/chunk-HT2EIJAD.mjs.map +1 -0
- package/dist/chunk-ILFK3VKS.mjs +86 -0
- package/dist/chunk-ILFK3VKS.mjs.map +1 -0
- package/dist/chunk-ISAHCU7C.mjs +1 -0
- package/dist/chunk-ISAHCU7C.mjs.map +1 -0
- package/dist/chunk-J5SCUELT.mjs +110 -0
- package/dist/chunk-J5SCUELT.mjs.map +1 -0
- package/dist/chunk-JKCVB5TR.mjs +1 -0
- package/dist/chunk-JKCVB5TR.mjs.map +1 -0
- package/dist/chunk-JQGB77SS.mjs +67 -0
- package/dist/chunk-JQGB77SS.mjs.map +1 -0
- package/dist/chunk-JTZPQHKD.mjs +1 -0
- package/dist/chunk-JTZPQHKD.mjs.map +1 -0
- package/dist/chunk-JUHJZLH2.mjs +39 -0
- package/dist/chunk-JUHJZLH2.mjs.map +1 -0
- package/dist/chunk-JYN2QSN2.mjs +36 -0
- package/dist/chunk-JYN2QSN2.mjs.map +1 -0
- package/dist/chunk-JZXZYEPG.mjs +41 -0
- package/dist/chunk-JZXZYEPG.mjs.map +1 -0
- package/dist/chunk-K2CB2NLY.mjs +1 -0
- package/dist/chunk-K2CB2NLY.mjs.map +1 -0
- package/dist/chunk-K6PP3ACJ.mjs +1 -0
- package/dist/chunk-K6PP3ACJ.mjs.map +1 -0
- package/dist/chunk-KCEWKQ4W.mjs +112 -0
- package/dist/chunk-KCEWKQ4W.mjs.map +1 -0
- package/dist/chunk-KFDS3IPB.mjs +1 -0
- package/dist/chunk-KFDS3IPB.mjs.map +1 -0
- package/dist/chunk-KNGG6M2I.mjs +40 -0
- package/dist/chunk-KNGG6M2I.mjs.map +1 -0
- package/dist/chunk-KQITCS3U.mjs +18 -0
- package/dist/chunk-KQITCS3U.mjs.map +1 -0
- package/dist/chunk-LGEGXOPU.mjs +41 -0
- package/dist/chunk-LGEGXOPU.mjs.map +1 -0
- package/dist/chunk-LMF3QGSF.mjs +1 -0
- package/dist/chunk-LMF3QGSF.mjs.map +1 -0
- package/dist/chunk-M7MG7ZQT.mjs +156 -0
- package/dist/chunk-M7MG7ZQT.mjs.map +1 -0
- package/dist/chunk-MYVC3HMO.mjs +45 -0
- package/dist/chunk-MYVC3HMO.mjs.map +1 -0
- package/dist/chunk-NE6W2PCD.mjs +9 -0
- package/dist/chunk-NE6W2PCD.mjs.map +1 -0
- package/dist/chunk-NIYDN3Y3.mjs +37 -0
- package/dist/chunk-NIYDN3Y3.mjs.map +1 -0
- package/dist/chunk-NSLSA7F7.mjs +1 -0
- package/dist/chunk-NSLSA7F7.mjs.map +1 -0
- package/dist/chunk-OE6RISJS.mjs +24 -0
- package/dist/chunk-OE6RISJS.mjs.map +1 -0
- package/dist/chunk-OXZOGFNV.mjs +37 -0
- package/dist/chunk-OXZOGFNV.mjs.map +1 -0
- package/dist/chunk-RC76SXBP.mjs +1 -0
- package/dist/chunk-RC76SXBP.mjs.map +1 -0
- package/dist/chunk-ROQH67YP.mjs +109 -0
- package/dist/chunk-ROQH67YP.mjs.map +1 -0
- package/dist/chunk-S3QSGJX2.mjs +37 -0
- package/dist/chunk-S3QSGJX2.mjs.map +1 -0
- package/dist/chunk-SRLM3K2X.mjs +1 -0
- package/dist/chunk-SRLM3K2X.mjs.map +1 -0
- package/dist/chunk-TC5PD4TA.mjs +60 -0
- package/dist/chunk-TC5PD4TA.mjs.map +1 -0
- package/dist/chunk-TDLSHJ4Z.mjs +1 -0
- package/dist/chunk-TDLSHJ4Z.mjs.map +1 -0
- package/dist/chunk-TJH5QJMS.mjs +1 -0
- package/dist/chunk-TJH5QJMS.mjs.map +1 -0
- package/dist/chunk-UL2V2Z5B.mjs +90 -0
- package/dist/chunk-UL2V2Z5B.mjs.map +1 -0
- package/dist/chunk-VYS2QNTL.mjs +38 -0
- package/dist/chunk-VYS2QNTL.mjs.map +1 -0
- package/dist/chunk-WLESNP6Z.mjs +60 -0
- package/dist/chunk-WLESNP6Z.mjs.map +1 -0
- package/dist/chunk-WUPLEZEY.mjs +86 -0
- package/dist/chunk-WUPLEZEY.mjs.map +1 -0
- package/dist/chunk-XAFNJELJ.mjs +1 -0
- package/dist/chunk-XAFNJELJ.mjs.map +1 -0
- package/dist/chunk-XFKD6EEJ.mjs +1 -0
- package/dist/chunk-XFKD6EEJ.mjs.map +1 -0
- package/dist/chunk-XLLYMQLW.mjs +1 -0
- package/dist/chunk-XLLYMQLW.mjs.map +1 -0
- package/dist/chunk-XQBJ75VD.mjs +76 -0
- package/dist/chunk-XQBJ75VD.mjs.map +1 -0
- package/dist/chunk-Y5SUMFYJ.mjs +1 -0
- package/dist/chunk-Y5SUMFYJ.mjs.map +1 -0
- package/dist/chunk-YJOOSTJC.mjs +1 -0
- package/dist/chunk-YJOOSTJC.mjs.map +1 -0
- package/dist/chunk-YOSPWY5K.mjs +38 -0
- package/dist/chunk-YOSPWY5K.mjs.map +1 -0
- package/dist/chunk-YQFL5UN4.mjs +8 -0
- package/dist/chunk-YQFL5UN4.mjs.map +1 -0
- package/dist/chunk-YS7HBWOI.mjs +35 -0
- package/dist/chunk-YS7HBWOI.mjs.map +1 -0
- package/dist/chunk-YZDURLEY.mjs +54 -0
- package/dist/chunk-YZDURLEY.mjs.map +1 -0
- package/dist/chunk-Z2ZCM4BE.mjs +30 -0
- package/dist/chunk-Z2ZCM4BE.mjs.map +1 -0
- package/dist/chunk-ZKMFJZSH.mjs +1 -0
- package/dist/chunk-ZKMFJZSH.mjs.map +1 -0
- package/dist/chunk-ZOZPWP3N.mjs +45 -0
- package/dist/chunk-ZOZPWP3N.mjs.map +1 -0
- package/dist/chunk-ZQHLYAJU.mjs +1 -0
- package/dist/chunk-ZQHLYAJU.mjs.map +1 -0
- package/dist/description-list/description-list.d.ts +42 -0
- package/dist/description-list/description-list.d.ts.map +1 -0
- package/dist/description-list/description-list.js +78 -0
- package/dist/description-list/description-list.js.map +1 -0
- package/dist/description-list/description-list.mjs +8 -0
- package/dist/description-list/description-list.mjs.map +1 -0
- package/dist/description-list/index.d.ts +3 -0
- package/dist/description-list/index.d.ts.map +1 -0
- package/dist/description-list/index.js +80 -0
- package/dist/description-list/index.js.map +1 -0
- package/dist/description-list/index.mjs +9 -0
- package/dist/description-list/index.mjs.map +1 -0
- package/dist/figure/figure.d.ts +22 -0
- package/dist/figure/figure.d.ts.map +1 -0
- package/dist/figure/figure.js +71 -0
- package/dist/figure/figure.js.map +1 -0
- package/dist/figure/figure.mjs +8 -0
- package/dist/figure/figure.mjs.map +1 -0
- package/dist/figure/index.d.ts +3 -0
- package/dist/figure/index.d.ts.map +1 -0
- package/dist/figure/index.js +73 -0
- package/dist/figure/index.js.map +1 -0
- package/dist/figure/index.mjs +9 -0
- package/dist/figure/index.mjs.map +1 -0
- package/dist/footer/footer.d.ts +67 -0
- package/dist/footer/footer.d.ts.map +1 -0
- package/dist/footer/footer.js +376 -0
- package/dist/footer/footer.js.map +1 -0
- package/dist/footer/footer.mjs +26 -0
- package/dist/footer/footer.mjs.map +1 -0
- package/dist/footer/index.d.ts +3 -0
- package/dist/footer/index.d.ts.map +1 -0
- package/dist/footer/index.js +378 -0
- package/dist/footer/index.js.map +1 -0
- package/dist/footer/index.mjs +27 -0
- package/dist/footer/index.mjs.map +1 -0
- package/dist/form/checkbox/checkbox.d.ts +28 -0
- package/dist/form/checkbox/checkbox.d.ts.map +1 -0
- package/dist/form/checkbox/checkbox.js +194 -0
- package/dist/form/checkbox/checkbox.js.map +1 -0
- package/dist/form/checkbox/checkbox.mjs +12 -0
- package/dist/form/checkbox/checkbox.mjs.map +1 -0
- package/dist/form/checkbox/index.d.ts +3 -0
- package/dist/form/checkbox/index.d.ts.map +1 -0
- package/dist/form/checkbox/index.js +196 -0
- package/dist/form/checkbox/index.js.map +1 -0
- package/dist/form/checkbox/index.mjs +13 -0
- package/dist/form/checkbox/index.mjs.map +1 -0
- package/dist/form/date-picker/date-picker.d.ts +33 -0
- package/dist/form/date-picker/date-picker.d.ts.map +1 -0
- package/dist/form/date-picker/date-picker.js +272 -0
- package/dist/form/date-picker/date-picker.js.map +1 -0
- package/dist/form/date-picker/date-picker.mjs +13 -0
- package/dist/form/date-picker/date-picker.mjs.map +1 -0
- package/dist/form/date-picker/index.d.ts +3 -0
- package/dist/form/date-picker/index.d.ts.map +1 -0
- package/dist/form/date-picker/index.js +274 -0
- package/dist/form/date-picker/index.js.map +1 -0
- package/dist/form/date-picker/index.mjs +14 -0
- package/dist/form/date-picker/index.mjs.map +1 -0
- package/dist/form/error-message/error-message.d.ts +8 -0
- package/dist/form/error-message/error-message.d.ts.map +1 -0
- package/dist/form/error-message/error-message.js +79 -0
- package/dist/form/error-message/error-message.js.map +1 -0
- package/dist/form/error-message/error-message.mjs +8 -0
- package/dist/form/error-message/error-message.mjs.map +1 -0
- package/dist/form/error-message/index.d.ts +3 -0
- package/dist/form/error-message/index.d.ts.map +1 -0
- package/dist/form/error-message/index.js +81 -0
- package/dist/form/error-message/index.js.map +1 -0
- package/dist/form/error-message/index.mjs +9 -0
- package/dist/form/error-message/index.mjs.map +1 -0
- package/dist/form/fieldset/fieldset.d.ts +22 -0
- package/dist/form/fieldset/fieldset.d.ts.map +1 -0
- package/dist/form/fieldset/fieldset.js +136 -0
- package/dist/form/fieldset/fieldset.js.map +1 -0
- package/dist/form/fieldset/fieldset.mjs +12 -0
- package/dist/form/fieldset/fieldset.mjs.map +1 -0
- package/dist/form/fieldset/index.d.ts +3 -0
- package/dist/form/fieldset/index.d.ts.map +1 -0
- package/dist/form/fieldset/index.js +138 -0
- package/dist/form/fieldset/index.js.map +1 -0
- package/dist/form/fieldset/index.mjs +13 -0
- package/dist/form/fieldset/index.mjs.map +1 -0
- package/dist/form/index.d.ts +9 -0
- package/dist/form/index.d.ts.map +1 -0
- package/dist/form/index.js +571 -0
- package/dist/form/index.js.map +1 -0
- package/dist/form/index.mjs +56 -0
- package/dist/form/index.mjs.map +1 -0
- package/dist/form/input/index.d.ts +3 -0
- package/dist/form/input/index.d.ts.map +1 -0
- package/dist/form/input/index.js +198 -0
- package/dist/form/input/index.js.map +1 -0
- package/dist/form/input/index.mjs +13 -0
- package/dist/form/input/index.mjs.map +1 -0
- package/dist/form/input/input.d.ts +5 -0
- package/dist/form/input/input.d.ts.map +1 -0
- package/dist/form/input/input.js +196 -0
- package/dist/form/input/input.js.map +1 -0
- package/dist/form/input/input.mjs +12 -0
- package/dist/form/input/input.mjs.map +1 -0
- package/dist/form/input-group/index.d.ts +3 -0
- package/dist/form/input-group/index.d.ts.map +1 -0
- package/dist/form/input-group/index.js +172 -0
- package/dist/form/input-group/index.js.map +1 -0
- package/dist/form/input-group/index.mjs +11 -0
- package/dist/form/input-group/index.mjs.map +1 -0
- package/dist/form/input-group/input-group.d.ts +27 -0
- package/dist/form/input-group/input-group.d.ts.map +1 -0
- package/dist/form/input-group/input-group.js +170 -0
- package/dist/form/input-group/input-group.js.map +1 -0
- package/dist/form/input-group/input-group.mjs +10 -0
- package/dist/form/input-group/input-group.mjs.map +1 -0
- package/dist/form/radio-button/index.d.ts +5 -0
- package/dist/form/radio-button/index.d.ts.map +1 -0
- package/dist/form/radio-button/index.js +233 -0
- 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/radio-button/radio-button.d.ts +17 -0
- package/dist/form/radio-button/radio-button.d.ts.map +1 -0
- package/dist/form/radio-button/radio-button.js +227 -0
- 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/radio-button/radio-group.d.ts +24 -0
- package/dist/form/radio-button/radio-group.d.ts.map +1 -0
- package/dist/form/radio-button/radio-group.js +154 -0
- 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.d.ts +3 -0
- package/dist/form/select/index.d.ts.map +1 -0
- package/dist/form/select/index.js +197 -0
- package/dist/form/select/index.js.map +1 -0
- package/dist/form/select/index.mjs +13 -0
- package/dist/form/select/index.mjs.map +1 -0
- package/dist/form/select/select.d.ts +9 -0
- package/dist/form/select/select.d.ts.map +1 -0
- package/dist/form/select/select.js +195 -0
- package/dist/form/select/select.js.map +1 -0
- package/dist/form/select/select.mjs +12 -0
- package/dist/form/select/select.mjs.map +1 -0
- package/dist/form/textarea/index.d.ts +3 -0
- package/dist/form/textarea/index.d.ts.map +1 -0
- package/dist/form/textarea/index.js +198 -0
- package/dist/form/textarea/index.js.map +1 -0
- package/dist/form/textarea/index.mjs +13 -0
- package/dist/form/textarea/index.mjs.map +1 -0
- package/dist/form/textarea/textarea.d.ts +5 -0
- package/dist/form/textarea/textarea.d.ts.map +1 -0
- package/dist/form/textarea/textarea.js +196 -0
- package/dist/form/textarea/textarea.js.map +1 -0
- package/dist/form/textarea/textarea.mjs +12 -0
- package/dist/form/textarea/textarea.mjs.map +1 -0
- package/dist/help-text/help-text.d.ts +51 -0
- package/dist/help-text/help-text.d.ts.map +1 -0
- package/dist/help-text/help-text.js +185 -0
- package/dist/help-text/help-text.js.map +1 -0
- package/dist/help-text/help-text.mjs +10 -0
- package/dist/help-text/help-text.mjs.map +1 -0
- package/dist/help-text/index.d.ts +3 -0
- package/dist/help-text/index.d.ts.map +1 -0
- package/dist/help-text/index.js +187 -0
- package/dist/help-text/index.js.map +1 -0
- package/dist/help-text/index.mjs +11 -0
- package/dist/help-text/index.mjs.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2690 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +313 -0
- package/dist/index.mjs.map +1 -0
- package/dist/layout/container/container.d.ts +23 -0
- package/dist/layout/container/container.d.ts.map +1 -0
- package/dist/layout/container/container.js +82 -0
- package/dist/layout/container/container.js.map +1 -0
- package/dist/layout/container/container.mjs +8 -0
- package/dist/layout/container/container.mjs.map +1 -0
- package/dist/layout/grid/grid.d.ts +101 -0
- package/dist/layout/grid/grid.d.ts.map +1 -0
- package/dist/layout/grid/grid.js +122 -0
- package/dist/layout/grid/grid.js.map +1 -0
- package/dist/layout/grid/grid.mjs +12 -0
- package/dist/layout/grid/grid.mjs.map +1 -0
- package/dist/layout/grid/index.d.ts +3 -0
- package/dist/layout/grid/index.d.ts.map +1 -0
- package/dist/layout/grid/index.js +124 -0
- package/dist/layout/grid/index.js.map +1 -0
- package/dist/layout/grid/index.mjs +13 -0
- package/dist/layout/grid/index.mjs.map +1 -0
- package/dist/layout/index.d.ts +4 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +214 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/index.mjs +27 -0
- package/dist/layout/index.mjs.map +1 -0
- package/dist/layout/responsive.d.ts +10 -0
- package/dist/layout/responsive.d.ts.map +1 -0
- package/dist/layout/responsive.js +41 -0
- package/dist/layout/responsive.js.map +1 -0
- package/dist/layout/responsive.mjs +8 -0
- package/dist/layout/responsive.mjs.map +1 -0
- package/dist/layout/spacing.d.ts +33 -0
- package/dist/layout/spacing.d.ts.map +1 -0
- package/dist/layout/spacing.js +33 -0
- package/dist/layout/spacing.js.map +1 -0
- package/dist/layout/spacing.mjs +8 -0
- package/dist/layout/spacing.mjs.map +1 -0
- package/dist/layout/stack/index.d.ts +3 -0
- package/dist/layout/stack/index.d.ts.map +1 -0
- package/dist/layout/stack/index.js +140 -0
- package/dist/layout/stack/index.js.map +1 -0
- package/dist/layout/stack/index.mjs +15 -0
- package/dist/layout/stack/index.mjs.map +1 -0
- package/dist/layout/stack/stack.d.ts +62 -0
- package/dist/layout/stack/stack.d.ts.map +1 -0
- package/dist/layout/stack/stack.js +138 -0
- package/dist/layout/stack/stack.js.map +1 -0
- package/dist/layout/stack/stack.mjs +14 -0
- package/dist/layout/stack/stack.mjs.map +1 -0
- package/dist/link/index.d.ts +3 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js +87 -0
- package/dist/link/index.js.map +1 -0
- package/dist/link/index.mjs +9 -0
- package/dist/link/index.mjs.map +1 -0
- package/dist/link/link.d.ts +20 -0
- package/dist/link/link.d.ts.map +1 -0
- package/dist/link/link.js +85 -0
- package/dist/link/link.js.map +1 -0
- package/dist/link/link.mjs +8 -0
- package/dist/link/link.mjs.map +1 -0
- package/dist/list/index.d.ts +5 -0
- package/dist/list/index.d.ts.map +1 -0
- package/dist/list/index.js +109 -0
- package/dist/list/index.js.map +1 -0
- package/dist/list/index.mjs +15 -0
- package/dist/list/index.mjs.map +1 -0
- package/dist/list/link-list.d.ts +12 -0
- package/dist/list/link-list.d.ts.map +1 -0
- package/dist/list/link-list.js +105 -0
- package/dist/list/link-list.js.map +1 -0
- package/dist/list/link-list.mjs +9 -0
- package/dist/list/link-list.mjs.map +1 -0
- package/dist/list/list.d.ts +40 -0
- package/dist/list/list.d.ts.map +1 -0
- package/dist/list/list.js +87 -0
- package/dist/list/list.js.map +1 -0
- package/dist/list/list.mjs +10 -0
- package/dist/list/list.mjs.map +1 -0
- package/dist/message/index.d.ts +3 -0
- package/dist/message/index.d.ts.map +1 -0
- package/dist/message/index.js +194 -0
- package/dist/message/index.js.map +1 -0
- package/dist/message/index.mjs +14 -0
- package/dist/message/index.mjs.map +1 -0
- package/dist/message/message.d.ts +36 -0
- package/dist/message/message.d.ts.map +1 -0
- package/dist/message/message.js +192 -0
- package/dist/message/message.js.map +1 -0
- package/dist/message/message.mjs +13 -0
- package/dist/message/message.mjs.map +1 -0
- package/dist/modal/index.d.ts +3 -0
- package/dist/modal/index.d.ts.map +1 -0
- package/dist/modal/index.js +283 -0
- package/dist/modal/index.js.map +1 -0
- package/dist/modal/index.mjs +17 -0
- package/dist/modal/index.mjs.map +1 -0
- package/dist/modal/modal.d.ts +81 -0
- package/dist/modal/modal.d.ts.map +1 -0
- package/dist/modal/modal.js +281 -0
- package/dist/modal/modal.js.map +1 -0
- package/dist/modal/modal.mjs +16 -0
- package/dist/modal/modal.mjs.map +1 -0
- package/dist/navbar/icons.d.ts +3 -0
- package/dist/navbar/icons.d.ts.map +1 -0
- package/dist/navbar/icons.js +62 -0
- package/dist/navbar/icons.js.map +1 -0
- package/dist/navbar/icons.mjs +10 -0
- package/dist/navbar/icons.mjs.map +1 -0
- package/dist/navbar/index.d.ts +4 -0
- package/dist/navbar/index.d.ts.map +1 -0
- package/dist/navbar/index.js +406 -0
- package/dist/navbar/index.js.map +1 -0
- package/dist/navbar/index.mjs +35 -0
- package/dist/navbar/index.mjs.map +1 -0
- package/dist/navbar/navbar-expandable-menu.d.ts +41 -0
- package/dist/navbar/navbar-expandable-menu.d.ts.map +1 -0
- package/dist/navbar/navbar-expandable-menu.js +272 -0
- package/dist/navbar/navbar-expandable-menu.js.map +1 -0
- package/dist/navbar/navbar-expandable-menu.mjs +16 -0
- package/dist/navbar/navbar-expandable-menu.mjs.map +1 -0
- package/dist/navbar/navbar.d.ts +130 -0
- package/dist/navbar/navbar.d.ts.map +1 -0
- package/dist/navbar/navbar.js +396 -0
- package/dist/navbar/navbar.js.map +1 -0
- package/dist/navbar/navbar.mjs +25 -0
- package/dist/navbar/navbar.mjs.map +1 -0
- package/dist/show-more/index.d.ts +3 -0
- package/dist/show-more/index.d.ts.map +1 -0
- package/dist/show-more/index.js +88 -0
- package/dist/show-more/index.js.map +1 -0
- package/dist/show-more/index.mjs +9 -0
- package/dist/show-more/index.mjs.map +1 -0
- package/dist/show-more/show-more.d.ts +42 -0
- package/dist/show-more/show-more.d.ts.map +1 -0
- package/dist/show-more/show-more.js +86 -0
- package/dist/show-more/show-more.js.map +1 -0
- package/dist/show-more/show-more.mjs +8 -0
- package/dist/show-more/show-more.mjs.map +1 -0
- package/dist/skeleton/index.d.ts +3 -0
- package/dist/skeleton/index.d.ts.map +1 -0
- package/dist/skeleton/index.js +109 -0
- package/dist/skeleton/index.js.map +1 -0
- package/dist/skeleton/index.mjs +9 -0
- package/dist/skeleton/index.mjs.map +1 -0
- package/dist/skeleton/skeleton.d.ts +67 -0
- package/dist/skeleton/skeleton.d.ts.map +1 -0
- package/dist/skeleton/skeleton.js +107 -0
- package/dist/skeleton/skeleton.js.map +1 -0
- package/dist/skeleton/skeleton.mjs +8 -0
- package/dist/skeleton/skeleton.mjs.map +1 -0
- package/dist/spinner/index.d.ts +3 -0
- package/dist/spinner/index.d.ts.map +1 -0
- package/dist/spinner/index.js +84 -0
- package/dist/spinner/index.js.map +1 -0
- package/dist/spinner/index.mjs +9 -0
- package/dist/spinner/index.mjs.map +1 -0
- package/dist/spinner/spinner.d.ts +28 -0
- package/dist/spinner/spinner.d.ts.map +1 -0
- package/dist/spinner/spinner.js +82 -0
- package/dist/spinner/spinner.js.map +1 -0
- package/dist/spinner/spinner.mjs +8 -0
- package/dist/spinner/spinner.mjs.map +1 -0
- package/dist/step-indicator/index.d.ts +3 -0
- package/dist/step-indicator/index.d.ts.map +1 -0
- package/dist/step-indicator/index.js +125 -0
- package/dist/step-indicator/index.js.map +1 -0
- package/dist/step-indicator/index.mjs +9 -0
- package/dist/step-indicator/index.mjs.map +1 -0
- package/dist/step-indicator/step-indicator.d.ts +36 -0
- package/dist/step-indicator/step-indicator.d.ts.map +1 -0
- package/dist/step-indicator/step-indicator.js +123 -0
- package/dist/step-indicator/step-indicator.js.map +1 -0
- package/dist/step-indicator/step-indicator.mjs +8 -0
- package/dist/step-indicator/step-indicator.mjs.map +1 -0
- package/dist/styled-html/index.d.ts +3 -0
- package/dist/styled-html/index.d.ts.map +1 -0
- package/dist/styled-html/index.js +86 -0
- package/dist/styled-html/index.js.map +1 -0
- package/dist/styled-html/index.mjs +9 -0
- package/dist/styled-html/index.mjs.map +1 -0
- package/dist/styled-html/styled-html.d.ts +44 -0
- package/dist/styled-html/styled-html.d.ts.map +1 -0
- package/dist/styled-html/styled-html.js +84 -0
- package/dist/styled-html/styled-html.js.map +1 -0
- package/dist/styled-html/styled-html.mjs +8 -0
- package/dist/styled-html/styled-html.mjs.map +1 -0
- package/dist/table/index.d.ts +3 -0
- package/dist/table/index.d.ts.map +1 -0
- package/dist/table/index.js +94 -0
- package/dist/table/index.js.map +1 -0
- package/dist/table/index.mjs +9 -0
- package/dist/table/index.mjs.map +1 -0
- package/dist/table/table.d.ts +25 -0
- package/dist/table/table.d.ts.map +1 -0
- package/dist/table/table.js +92 -0
- package/dist/table/table.js.map +1 -0
- package/dist/table/table.mjs +8 -0
- package/dist/table/table.mjs.map +1 -0
- package/dist/tabs/context.d.ts +8 -0
- package/dist/tabs/context.d.ts.map +1 -0
- package/dist/tabs/context.js +43 -0
- package/dist/tabs/context.js.map +1 -0
- package/dist/tabs/context.mjs +10 -0
- package/dist/tabs/context.mjs.map +1 -0
- package/dist/tabs/index.d.ts +7 -0
- package/dist/tabs/index.d.ts.map +1 -0
- package/dist/tabs/index.js +284 -0
- package/dist/tabs/index.js.map +1 -0
- package/dist/tabs/index.mjs +23 -0
- package/dist/tabs/index.mjs.map +1 -0
- package/dist/tabs/tabs-content.d.ts +26 -0
- package/dist/tabs/tabs-content.d.ts.map +1 -0
- package/dist/tabs/tabs-content.js +100 -0
- package/dist/tabs/tabs-content.js.map +1 -0
- package/dist/tabs/tabs-content.mjs +11 -0
- package/dist/tabs/tabs-content.mjs.map +1 -0
- package/dist/tabs/tabs-list.d.ts +21 -0
- package/dist/tabs/tabs-list.d.ts.map +1 -0
- package/dist/tabs/tabs-list.js +229 -0
- package/dist/tabs/tabs-list.js.map +1 -0
- package/dist/tabs/tabs-list.mjs +12 -0
- package/dist/tabs/tabs-list.mjs.map +1 -0
- package/dist/tabs/tabs.d.ts +26 -0
- package/dist/tabs/tabs.d.ts.map +1 -0
- package/dist/tabs/tabs.js +274 -0
- package/dist/tabs/tabs.js.map +1 -0
- package/dist/tabs/tabs.mjs +12 -0
- package/dist/tabs/tabs.mjs.map +1 -0
- package/dist/text/index.d.ts +4 -0
- package/dist/text/index.d.ts.map +1 -0
- package/dist/text/index.js +118 -0
- package/dist/text/index.js.map +1 -0
- package/dist/text/index.mjs +9 -0
- package/dist/text/index.mjs.map +1 -0
- package/dist/text/text.d.ts +58 -0
- package/dist/text/text.d.ts.map +1 -0
- package/dist/text/text.js +116 -0
- package/dist/text/text.js.map +1 -0
- package/dist/text/text.mjs +8 -0
- package/dist/text/text.mjs.map +1 -0
- package/dist/utils/auto-animate-height.d.ts +33 -0
- package/dist/utils/auto-animate-height.d.ts.map +1 -0
- package/dist/utils/auto-animate-height.js +188 -0
- package/dist/utils/auto-animate-height.js.map +1 -0
- package/dist/utils/auto-animate-height.mjs +9 -0
- package/dist/utils/auto-animate-height.mjs.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +255 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +19 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/utils/utils.d.ts +24 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +123 -0
- package/dist/utils/utils.js.map +1 -0
- package/dist/utils/utils.mjs +14 -0
- package/dist/utils/utils.mjs.map +1 -0
- package/dist/warning-banner/index.d.ts +3 -0
- package/dist/warning-banner/index.d.ts.map +1 -0
- package/dist/warning-banner/index.js +131 -0
- package/dist/warning-banner/index.js.map +1 -0
- package/dist/warning-banner/index.mjs +9 -0
- package/dist/warning-banner/index.mjs.map +1 -0
- package/dist/warning-banner/warning-banner.d.ts +8 -0
- package/dist/warning-banner/warning-banner.d.ts.map +1 -0
- package/dist/warning-banner/warning-banner.js +129 -0
- package/dist/warning-banner/warning-banner.js.map +1 -0
- package/dist/warning-banner/warning-banner.mjs +8 -0
- package/dist/warning-banner/warning-banner.mjs.map +1 -0
- package/package.json +61 -0
- package/src/accordion/accordion-content.tsx +32 -0
- package/src/accordion/accordion-header.tsx +37 -0
- package/src/accordion/accordion-item.tsx +63 -0
- package/src/accordion/accordion.stories.tsx +49 -0
- package/src/accordion/accordion.tsx +68 -0
- package/src/accordion/context.ts +9 -0
- package/src/accordion/index.tsx +9 -0
- package/src/badge/badge.stories.tsx +18 -0
- package/src/badge/badge.tsx +59 -0
- package/src/badge/index.tsx +3 -0
- package/src/blockquote/blockquote.stories.tsx +22 -0
- package/src/blockquote/blockquote.tsx +52 -0
- package/src/blockquote/index.tsx +3 -0
- package/src/box/box.stories.tsx +42 -0
- package/src/box/box.tsx +122 -0
- package/src/box/index.tsx +3 -0
- package/src/breadcrumbs/breadcrumbs.stories.tsx +36 -0
- package/src/breadcrumbs/breadcrumbs.tsx +47 -0
- package/src/breadcrumbs/index.tsx +3 -0
- package/src/button/button.stories.tsx +23 -0
- package/src/button/button.tsx +88 -0
- package/src/button/index.tsx +3 -0
- package/src/card/card.stories.tsx +42 -0
- package/src/card/card.tsx +222 -0
- package/src/card/index.tsx +14 -0
- package/src/description-list/description-list.stories.tsx +30 -0
- package/src/description-list/description-list.tsx +61 -0
- package/src/description-list/index.tsx +2 -0
- package/src/figure/figure.stories.tsx +22 -0
- package/src/figure/figure.tsx +36 -0
- package/src/figure/index.tsx +3 -0
- package/src/footer/footer.tsx +169 -0
- package/src/footer/index.tsx +9 -0
- package/src/form/checkbox/checkbox.stories.tsx +29 -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 +28 -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 +20 -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 +30 -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 +26 -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/radio-button/index.tsx +4 -0
- package/src/form/radio-button/radio-button.stories.tsx +26 -0
- package/src/form/radio-button/radio-button.tsx +85 -0
- package/src/form/radio-button/radio-group.stories.tsx +39 -0
- package/src/form/radio-button/radio-group.tsx +53 -0
- package/src/form/select/index.tsx +2 -0
- package/src/form/select/select.stories.tsx +34 -0
- package/src/form/select/select.tsx +33 -0
- package/src/form/textarea/index.tsx +2 -0
- package/src/form/textarea/textarea.stories.tsx +26 -0
- package/src/form/textarea/textarea.tsx +33 -0
- package/src/help-text/help-text.stories.tsx +20 -0
- package/src/help-text/help-text.tsx +98 -0
- package/src/help-text/index.ts +2 -0
- package/src/index.ts +28 -0
- package/src/layout/container/container.stories.tsx +66 -0
- package/src/layout/container/container.tsx +47 -0
- package/src/layout/grid/grid.stories.tsx +28 -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.stories.tsx +28 -0
- package/src/layout/stack/stack.tsx +128 -0
- package/src/link/index.tsx +3 -0
- package/src/link/link.stories.tsx +34 -0
- package/src/link/link.tsx +46 -0
- package/src/list/index.tsx +5 -0
- package/src/list/link-list.stories.tsx +36 -0
- package/src/list/link-list.tsx +26 -0
- package/src/list/list.stories.tsx +34 -0
- package/src/list/list.tsx +65 -0
- package/src/message/index.tsx +2 -0
- package/src/message/message.stories.tsx +36 -0
- package/src/message/message.tsx +89 -0
- package/src/modal/index.tsx +3 -0
- package/src/modal/modal.stories.tsx +46 -0
- package/src/modal/modal.tsx +199 -0
- package/src/navbar/icons.tsx +28 -0
- package/src/navbar/index.tsx +18 -0
- package/src/navbar/navbar-expandable-menu.tsx +187 -0
- package/src/navbar/navbar.stories.tsx +60 -0
- package/src/navbar/navbar.tsx +264 -0
- package/src/show-more/index.ts +2 -0
- package/src/show-more/show-more.stories.tsx +24 -0
- package/src/show-more/show-more.tsx +66 -0
- package/src/skeleton/index.ts +2 -0
- package/src/skeleton/skeleton.stories.tsx +29 -0
- package/src/skeleton/skeleton.tsx +114 -0
- package/src/spinner/index.ts +2 -0
- package/src/spinner/spinner.stories.tsx +28 -0
- package/src/spinner/spinner.tsx +53 -0
- package/src/step-indicator/index.ts +2 -0
- package/src/step-indicator/step-indicator.stories.tsx +21 -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 +56 -0
- package/src/styled-html/styled-html.tsx +69 -0
- package/src/table/index.ts +2 -0
- package/src/table/table.stories.tsx +43 -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 +32 -0
- package/src/tabs/tabs.tsx +50 -0
- package/src/text/index.tsx +4 -0
- package/src/text/text.stories.tsx +47 -0
- package/src/text/text.tsx +129 -0
- package/src/utils/auto-animate-height.tsx +139 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/utils.ts +110 -0
- package/src/warning-banner/index.tsx +2 -0
- package/src/warning-banner/warning-banner.stories.tsx +22 -0
- package/src/warning-banner/warning-banner.tsx +90 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
var __export = (target, all) => {
|
|
36
|
+
for (var name in all)
|
|
37
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from, except, desc) => {
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (let key of __getOwnPropNames(from))
|
|
42
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
+
}
|
|
45
|
+
return to;
|
|
46
|
+
};
|
|
47
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
|
+
|
|
49
|
+
// src/text/index.tsx
|
|
50
|
+
var text_exports = {};
|
|
51
|
+
__export(text_exports, {
|
|
52
|
+
Text: () => Text
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(text_exports);
|
|
55
|
+
|
|
56
|
+
// src/text/text.tsx
|
|
57
|
+
var import_react = require("react");
|
|
58
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
|
|
59
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
60
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
61
|
+
var defaultHTMLTag = {
|
|
62
|
+
"h1-display": "h1",
|
|
63
|
+
h1: "h1",
|
|
64
|
+
h2: "h2",
|
|
65
|
+
h3: "h3",
|
|
66
|
+
"h3-title": "h3",
|
|
67
|
+
body: "p",
|
|
68
|
+
"body-title": "p",
|
|
69
|
+
"body-small": "p",
|
|
70
|
+
"body-small-title": "p",
|
|
71
|
+
technical: "p",
|
|
72
|
+
"technical-title": "p",
|
|
73
|
+
caption: "p",
|
|
74
|
+
"caption-title": "p"
|
|
75
|
+
};
|
|
76
|
+
var Text = (0, import_react.forwardRef)(
|
|
77
|
+
(_a, ref) => {
|
|
78
|
+
var _b = _a, {
|
|
79
|
+
as: Tag,
|
|
80
|
+
asChild,
|
|
81
|
+
variant = "body",
|
|
82
|
+
size = "fluid",
|
|
83
|
+
_unstableSpacing: spacing,
|
|
84
|
+
children,
|
|
85
|
+
className
|
|
86
|
+
} = _b, rest = __objRest(_b, [
|
|
87
|
+
"as",
|
|
88
|
+
"asChild",
|
|
89
|
+
"variant",
|
|
90
|
+
"size",
|
|
91
|
+
"_unstableSpacing",
|
|
92
|
+
"children",
|
|
93
|
+
"className"
|
|
94
|
+
]);
|
|
95
|
+
const Component = asChild ? import_react_slot.Slot : Tag != null ? Tag : defaultHTMLTag[variant];
|
|
96
|
+
const sizeModifier = size !== "fluid" && variant !== "caption" && variant !== "caption-title" && size;
|
|
97
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
|
+
Component,
|
|
99
|
+
__spreadProps(__spreadValues({
|
|
100
|
+
className: (0, import_typed_classname.clsx)(
|
|
101
|
+
`hds-text-${variant}`,
|
|
102
|
+
sizeModifier && `hds-text--${sizeModifier}`,
|
|
103
|
+
spacing && "hds-text--spacing",
|
|
104
|
+
className
|
|
105
|
+
),
|
|
106
|
+
ref
|
|
107
|
+
}, rest), {
|
|
108
|
+
children
|
|
109
|
+
})
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
Text.displayName = "Text";
|
|
114
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
115
|
+
0 && (module.exports = {
|
|
116
|
+
Text
|
|
117
|
+
});
|
|
118
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/text/index.tsx","../../src/text/text.tsx"],"sourcesContent":["import { Text } from \"./text\";\n\nexport { Text };\nexport type * from \"./text\";\n","/* eslint-disable @typescript-eslint/no-unsafe-assignment -- Typings for the differnt html elements */\n/* eslint-disable @typescript-eslint/no-explicit-any -- Typings for the differnt html elements */\n\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\ntype HeadingProps =\n | {\n variant: \"h1-display\" | \"h1\" | \"h2\" | \"h3\" | \"h3-title\";\n asChild: true;\n as?: never;\n }\n | {\n variant: \"h1-display\" | \"h1\" | \"h2\" | \"h3\" | \"h3-title\";\n as: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n asChild?: never;\n };\n\ninterface ParagraphProps {\n variant?:\n | \"body\"\n | \"body-title\"\n | \"body-small\"\n | \"body-small-title\"\n | \"technical\"\n | \"technical-title\"\n | \"caption\"\n | \"caption-title\";\n}\n\nexport type TextProps = {\n children: React.ReactNode;\n\n /**\n * The font-size of the component. By default it's `fluid` which means it's smaller on mobile and larger on desktop.\n *\n * But you can lock it to either the min or the max size.\n *\n * @default \"fluid\"\n */\n size?: \"min\" | \"max\" | \"fluid\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n\n /**\n * Convienence prop to change the rendered element.\n *\n * Use {@link TextProps.asChild} if you need more control of the rendered element.\n */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n\n /**\n * 🚧 Experimental spacing\n */\n _unstableSpacing?: boolean;\n} & (HeadingProps | ParagraphProps) &\n React.HTMLAttributes<HTMLParagraphElement | HTMLHeadingElement>;\n\nconst defaultHTMLTag: Record<NonNullable<TextProps[\"variant\"]>, `h${1 | 2 | 3}` | \"p\"> = {\n \"h1-display\": \"h1\",\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n \"h3-title\": \"h3\",\n body: \"p\",\n \"body-title\": \"p\",\n \"body-small\": \"p\",\n \"body-small-title\": \"p\",\n technical: \"p\",\n \"technical-title\": \"p\",\n caption: \"p\",\n \"caption-title\": \"p\",\n};\n\n/**\n * Text component\n *\n * If the variant is `h1-display`, `h1`, `h2`, `h3`, or `h3-title` the `as` or `asChild` prop is required.\n *\n * This is to force the consumer to consider which semantic html element to use. E.g. `<h1>` or `<h2>`\n *\n * @example\n * ```tsx\n * <Text variant=\"h1-display\" as=\"h1\">Hello world</Text>\n * <Text variant=\"body\">\n * This is a body text\n * </Text>\n * ```\n */\nexport const Text = forwardRef<HTMLParagraphElement | HTMLHeadingElement, TextProps>(\n (\n {\n as: Tag,\n asChild,\n variant = \"body\",\n size = \"fluid\",\n _unstableSpacing: spacing,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : Tag ?? defaultHTMLTag[variant];\n const sizeModifier =\n size !== \"fluid\" && variant !== \"caption\" && variant !== \"caption-title\" && size;\n return (\n <Component\n className={clsx(\n `hds-text-${variant}`,\n sizeModifier && `hds-text--${sizeModifier}`,\n spacing && \"hds-text--spacing\",\n className as undefined,\n )}\n ref={ref as any}\n {...(rest as any)}\n >\n {children}\n </Component>\n );\n },\n);\nText.displayName = \"Text\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGA,mBAAkC;AAClC,6BAAqB;AACrB,wBAAqB;AA4Gf;AAjDN,IAAM,iBAAmF;AAAA,EACvF,cAAc;AAAA,EACd,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,cAAc;AAAA,EACd,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,iBAAiB;AACnB;AAiBO,IAAM,WAAO;AAAA,EAClB,CACE,IAUA,QACG;AAXH,iBACE;AAAA,UAAI;AAAA,MACJ;AAAA,MACA,UAAU;AAAA,MACV,OAAO;AAAA,MACP,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,IAxGN,IAiGI,IAQK,iBARL,IAQK;AAAA,MAPH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,YAAY,UAAU,yBAAO,oBAAO,eAAe,OAAO;AAChE,UAAM,eACJ,SAAS,WAAW,YAAY,aAAa,YAAY,mBAAmB;AAC9E,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW;AAAA,UACT,YAAY,OAAO;AAAA,UACnB,gBAAgB,aAAa,YAAY;AAAA,UACzC,WAAW;AAAA,UACX;AAAA,QACF;AAAA,QACA;AAAA,SACK,OARN;AAAA,QAUE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,KAAK,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type HeadingProps = {
|
|
3
|
+
variant: "h1-display" | "h1" | "h2" | "h3" | "h3-title";
|
|
4
|
+
asChild: true;
|
|
5
|
+
as?: never;
|
|
6
|
+
} | {
|
|
7
|
+
variant: "h1-display" | "h1" | "h2" | "h3" | "h3-title";
|
|
8
|
+
as: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | "div" | "label" | "p";
|
|
9
|
+
asChild?: never;
|
|
10
|
+
};
|
|
11
|
+
interface ParagraphProps {
|
|
12
|
+
variant?: "body" | "body-title" | "body-small" | "body-small-title" | "technical" | "technical-title" | "caption" | "caption-title";
|
|
13
|
+
}
|
|
14
|
+
export type TextProps = {
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* The font-size of the component. By default it's `fluid` which means it's smaller on mobile and larger on desktop.
|
|
18
|
+
*
|
|
19
|
+
* But you can lock it to either the min or the max size.
|
|
20
|
+
*
|
|
21
|
+
* @default "fluid"
|
|
22
|
+
*/
|
|
23
|
+
size?: "min" | "max" | "fluid";
|
|
24
|
+
/**
|
|
25
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
26
|
+
*
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
asChild?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Convienence prop to change the rendered element.
|
|
32
|
+
*
|
|
33
|
+
* Use {@link TextProps.asChild} if you need more control of the rendered element.
|
|
34
|
+
*/
|
|
35
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | "div" | "label" | "p";
|
|
36
|
+
/**
|
|
37
|
+
* 🚧 Experimental spacing
|
|
38
|
+
*/
|
|
39
|
+
_unstableSpacing?: boolean;
|
|
40
|
+
} & (HeadingProps | ParagraphProps) & React.HTMLAttributes<HTMLParagraphElement | HTMLHeadingElement>;
|
|
41
|
+
/**
|
|
42
|
+
* Text component
|
|
43
|
+
*
|
|
44
|
+
* If the variant is `h1-display`, `h1`, `h2`, `h3`, or `h3-title` the `as` or `asChild` prop is required.
|
|
45
|
+
*
|
|
46
|
+
* This is to force the consumer to consider which semantic html element to use. E.g. `<h1>` or `<h2>`
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <Text variant="h1-display" as="h1">Hello world</Text>
|
|
51
|
+
* <Text variant="body">
|
|
52
|
+
* This is a body text
|
|
53
|
+
* </Text>
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLHeadingElement | HTMLParagraphElement>>;
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/text/text.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,KAAK,YAAY,GACb;IACE,OAAO,EAAE,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,UAAU,CAAC;IACxD,OAAO,EAAE,IAAI,CAAC;IACd,EAAE,CAAC,EAAE,KAAK,CAAC;CACZ,GACD;IACE,OAAO,EAAE,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,UAAU,CAAC;IACxD,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,GAAG,CAAC;IAC7E,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC;AAEN,UAAU,cAAc;IACtB,OAAO,CAAC,EACJ,MAAM,GACN,YAAY,GACZ,YAAY,GACZ,kBAAkB,GAClB,WAAW,GACX,iBAAiB,GACjB,SAAS,GACT,eAAe,CAAC;CACrB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC;IAE/B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,GAAG,CAAC;IAE9E;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,GAAG,CAAC,YAAY,GAAG,cAAc,CAAC,GACjC,KAAK,CAAC,cAAc,CAAC,oBAAoB,GAAG,kBAAkB,CAAC,CAAC;AAkBlE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,6GAgChB,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
var __export = (target, all) => {
|
|
36
|
+
for (var name in all)
|
|
37
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from, except, desc) => {
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (let key of __getOwnPropNames(from))
|
|
42
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
+
}
|
|
45
|
+
return to;
|
|
46
|
+
};
|
|
47
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
|
+
|
|
49
|
+
// src/text/text.tsx
|
|
50
|
+
var text_exports = {};
|
|
51
|
+
__export(text_exports, {
|
|
52
|
+
Text: () => Text
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(text_exports);
|
|
55
|
+
var import_react = require("react");
|
|
56
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
|
|
57
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
58
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
|
+
var defaultHTMLTag = {
|
|
60
|
+
"h1-display": "h1",
|
|
61
|
+
h1: "h1",
|
|
62
|
+
h2: "h2",
|
|
63
|
+
h3: "h3",
|
|
64
|
+
"h3-title": "h3",
|
|
65
|
+
body: "p",
|
|
66
|
+
"body-title": "p",
|
|
67
|
+
"body-small": "p",
|
|
68
|
+
"body-small-title": "p",
|
|
69
|
+
technical: "p",
|
|
70
|
+
"technical-title": "p",
|
|
71
|
+
caption: "p",
|
|
72
|
+
"caption-title": "p"
|
|
73
|
+
};
|
|
74
|
+
var Text = (0, import_react.forwardRef)(
|
|
75
|
+
(_a, ref) => {
|
|
76
|
+
var _b = _a, {
|
|
77
|
+
as: Tag,
|
|
78
|
+
asChild,
|
|
79
|
+
variant = "body",
|
|
80
|
+
size = "fluid",
|
|
81
|
+
_unstableSpacing: spacing,
|
|
82
|
+
children,
|
|
83
|
+
className
|
|
84
|
+
} = _b, rest = __objRest(_b, [
|
|
85
|
+
"as",
|
|
86
|
+
"asChild",
|
|
87
|
+
"variant",
|
|
88
|
+
"size",
|
|
89
|
+
"_unstableSpacing",
|
|
90
|
+
"children",
|
|
91
|
+
"className"
|
|
92
|
+
]);
|
|
93
|
+
const Component = asChild ? import_react_slot.Slot : Tag != null ? Tag : defaultHTMLTag[variant];
|
|
94
|
+
const sizeModifier = size !== "fluid" && variant !== "caption" && variant !== "caption-title" && size;
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
+
Component,
|
|
97
|
+
__spreadProps(__spreadValues({
|
|
98
|
+
className: (0, import_typed_classname.clsx)(
|
|
99
|
+
`hds-text-${variant}`,
|
|
100
|
+
sizeModifier && `hds-text--${sizeModifier}`,
|
|
101
|
+
spacing && "hds-text--spacing",
|
|
102
|
+
className
|
|
103
|
+
),
|
|
104
|
+
ref
|
|
105
|
+
}, rest), {
|
|
106
|
+
children
|
|
107
|
+
})
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
Text.displayName = "Text";
|
|
112
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
113
|
+
0 && (module.exports = {
|
|
114
|
+
Text
|
|
115
|
+
});
|
|
116
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/text/text.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-assignment -- Typings for the differnt html elements */\n/* eslint-disable @typescript-eslint/no-explicit-any -- Typings for the differnt html elements */\n\nimport React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\ntype HeadingProps =\n | {\n variant: \"h1-display\" | \"h1\" | \"h2\" | \"h3\" | \"h3-title\";\n asChild: true;\n as?: never;\n }\n | {\n variant: \"h1-display\" | \"h1\" | \"h2\" | \"h3\" | \"h3-title\";\n as: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n asChild?: never;\n };\n\ninterface ParagraphProps {\n variant?:\n | \"body\"\n | \"body-title\"\n | \"body-small\"\n | \"body-small-title\"\n | \"technical\"\n | \"technical-title\"\n | \"caption\"\n | \"caption-title\";\n}\n\nexport type TextProps = {\n children: React.ReactNode;\n\n /**\n * The font-size of the component. By default it's `fluid` which means it's smaller on mobile and larger on desktop.\n *\n * But you can lock it to either the min or the max size.\n *\n * @default \"fluid\"\n */\n size?: \"min\" | \"max\" | \"fluid\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n\n /**\n * Convienence prop to change the rendered element.\n *\n * Use {@link TextProps.asChild} if you need more control of the rendered element.\n */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"div\" | \"label\" | \"p\";\n\n /**\n * 🚧 Experimental spacing\n */\n _unstableSpacing?: boolean;\n} & (HeadingProps | ParagraphProps) &\n React.HTMLAttributes<HTMLParagraphElement | HTMLHeadingElement>;\n\nconst defaultHTMLTag: Record<NonNullable<TextProps[\"variant\"]>, `h${1 | 2 | 3}` | \"p\"> = {\n \"h1-display\": \"h1\",\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n \"h3-title\": \"h3\",\n body: \"p\",\n \"body-title\": \"p\",\n \"body-small\": \"p\",\n \"body-small-title\": \"p\",\n technical: \"p\",\n \"technical-title\": \"p\",\n caption: \"p\",\n \"caption-title\": \"p\",\n};\n\n/**\n * Text component\n *\n * If the variant is `h1-display`, `h1`, `h2`, `h3`, or `h3-title` the `as` or `asChild` prop is required.\n *\n * This is to force the consumer to consider which semantic html element to use. E.g. `<h1>` or `<h2>`\n *\n * @example\n * ```tsx\n * <Text variant=\"h1-display\" as=\"h1\">Hello world</Text>\n * <Text variant=\"body\">\n * This is a body text\n * </Text>\n * ```\n */\nexport const Text = forwardRef<HTMLParagraphElement | HTMLHeadingElement, TextProps>(\n (\n {\n as: Tag,\n asChild,\n variant = \"body\",\n size = \"fluid\",\n _unstableSpacing: spacing,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : Tag ?? defaultHTMLTag[variant];\n const sizeModifier =\n size !== \"fluid\" && variant !== \"caption\" && variant !== \"caption-title\" && size;\n return (\n <Component\n className={clsx(\n `hds-text-${variant}`,\n sizeModifier && `hds-text--${sizeModifier}`,\n spacing && \"hds-text--spacing\",\n className as undefined,\n )}\n ref={ref as any}\n {...(rest as any)}\n >\n {children}\n </Component>\n );\n },\n);\nText.displayName = \"Text\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,mBAAkC;AAClC,6BAAqB;AACrB,wBAAqB;AA4Gf;AAjDN,IAAM,iBAAmF;AAAA,EACvF,cAAc;AAAA,EACd,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,cAAc;AAAA,EACd,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,iBAAiB;AACnB;AAiBO,IAAM,WAAO;AAAA,EAClB,CACE,IAUA,QACG;AAXH,iBACE;AAAA,UAAI;AAAA,MACJ;AAAA,MACA,UAAU;AAAA,MACV,OAAO;AAAA,MACP,kBAAkB;AAAA,MAClB;AAAA,MACA;AAAA,IAxGN,IAiGI,IAQK,iBARL,IAQK;AAAA,MAPH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,YAAY,UAAU,yBAAO,oBAAO,eAAe,OAAO;AAChE,UAAM,eACJ,SAAS,WAAW,YAAY,aAAa,YAAY,mBAAmB;AAC9E,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW;AAAA,UACT,YAAY,OAAO;AAAA,UACnB,gBAAgB,aAAa,YAAY;AAAA,UACzC,WAAW;AAAA,UACX;AAAA,QACF;AAAA,QACA;AAAA,SACK,OARN;AAAA,QAUE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,KAAK,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface AutoAnimateHeightProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Time of the animation, using the hedwig animation tokens
|
|
5
|
+
* quick: 0.1s
|
|
6
|
+
* normal: 0.3s
|
|
7
|
+
* slow: 0.7s
|
|
8
|
+
*
|
|
9
|
+
* default is "quick"
|
|
10
|
+
*/
|
|
11
|
+
animationDuration?: "quick" | "normal" | "slow";
|
|
12
|
+
/**
|
|
13
|
+
* Callback fired when animiation transition ends
|
|
14
|
+
* Use this to do effects after resizing is done, e.g. scrolling to the element
|
|
15
|
+
* using `element.scrollIntoView()`
|
|
16
|
+
*/
|
|
17
|
+
onTransitionEnd?: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Which hedwig easing function to use, default is "normal"
|
|
20
|
+
*/
|
|
21
|
+
animationEasing?: "in" | "out" | "normal";
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Helper component to animate the height of the children when they change
|
|
27
|
+
* It's done by rendering two versions of the passed children,
|
|
28
|
+
* one hidden to measure the height and one visible to only changes after the height is measured.
|
|
29
|
+
*
|
|
30
|
+
* **IMPORTANT** Do not pass any components with effects (like data fetching), as they will trigger twice.
|
|
31
|
+
*/
|
|
32
|
+
export declare const AutoAnimateHeight: import("react").ForwardRefExoticComponent<AutoAnimateHeightProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
33
|
+
//# sourceMappingURL=auto-animate-height.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-animate-height.d.ts","sourceRoot":"","sources":["../../src/utils/auto-animate-height.tsx"],"names":[],"mappings":";AAGA,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAClF;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEhD;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAE7B;;OAEG;IACH,eAAe,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,mHAqG7B,CAAC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
|
|
59
|
+
// src/utils/auto-animate-height.tsx
|
|
60
|
+
var auto_animate_height_exports = {};
|
|
61
|
+
__export(auto_animate_height_exports, {
|
|
62
|
+
AutoAnimateHeight: () => AutoAnimateHeight
|
|
63
|
+
});
|
|
64
|
+
module.exports = __toCommonJS(auto_animate_height_exports);
|
|
65
|
+
var import_react2 = require("react");
|
|
66
|
+
|
|
67
|
+
// src/utils/utils.ts
|
|
68
|
+
var React = __toESM(require("react"));
|
|
69
|
+
var import_react = require("react");
|
|
70
|
+
function useMergeRefs(refs) {
|
|
71
|
+
return React.useMemo(() => {
|
|
72
|
+
if (refs.every((ref) => ref === null)) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
return (value) => {
|
|
76
|
+
refs.forEach((ref) => {
|
|
77
|
+
if (typeof ref === "function") {
|
|
78
|
+
ref(value);
|
|
79
|
+
} else if (ref !== null) {
|
|
80
|
+
ref.current = value;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
}, refs);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// src/utils/auto-animate-height.tsx
|
|
88
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
89
|
+
var AutoAnimateHeight = (0, import_react2.forwardRef)(
|
|
90
|
+
(_a, ref) => {
|
|
91
|
+
var _b = _a, {
|
|
92
|
+
children,
|
|
93
|
+
style,
|
|
94
|
+
animationDuration = "quick",
|
|
95
|
+
animationEasing = "normal",
|
|
96
|
+
onTransitionEnd
|
|
97
|
+
} = _b, rest = __objRest(_b, [
|
|
98
|
+
"children",
|
|
99
|
+
"style",
|
|
100
|
+
"animationDuration",
|
|
101
|
+
"animationEasing",
|
|
102
|
+
"onTransitionEnd"
|
|
103
|
+
]);
|
|
104
|
+
var _a2, _b2;
|
|
105
|
+
const rootRef = (0, import_react2.useRef)(null);
|
|
106
|
+
const mergedRef = useMergeRefs([rootRef, ref]);
|
|
107
|
+
const measurementRef = (0, import_react2.useRef)(null);
|
|
108
|
+
const [height, setHeight] = (0, import_react2.useState)(
|
|
109
|
+
void 0
|
|
110
|
+
);
|
|
111
|
+
const [clonedChildren, setClonedChildren] = (0, import_react2.useState)(
|
|
112
|
+
() => (0, import_react2.cloneElement)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children }), {})
|
|
113
|
+
);
|
|
114
|
+
(0, import_react2.useEffect)(() => {
|
|
115
|
+
var _a3;
|
|
116
|
+
if (!rootRef.current) return;
|
|
117
|
+
if (!measurementRef.current) return;
|
|
118
|
+
if (document.body.scrollHeight === 0) return;
|
|
119
|
+
const currentMeasurement = measurementRef.current;
|
|
120
|
+
const { height: newHeight } = currentMeasurement.getBoundingClientRect();
|
|
121
|
+
let previouslyObservedHeight = newHeight;
|
|
122
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
123
|
+
const { height: resizedHeight } = currentMeasurement.getBoundingClientRect();
|
|
124
|
+
if (resizedHeight === previouslyObservedHeight) return;
|
|
125
|
+
previouslyObservedHeight = resizedHeight;
|
|
126
|
+
setHeight({ height: resizedHeight, shouldAnimate: false });
|
|
127
|
+
});
|
|
128
|
+
resizeObserver.observe(currentMeasurement);
|
|
129
|
+
setHeight({ height: newHeight, shouldAnimate: true });
|
|
130
|
+
const nextClonedChildren = (0, import_react2.cloneElement)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children }), {});
|
|
131
|
+
if (newHeight >= ((_a3 = height == null ? void 0 : height.height) != null ? _a3 : 0)) {
|
|
132
|
+
setClonedChildren(nextClonedChildren);
|
|
133
|
+
return () => {
|
|
134
|
+
resizeObserver.disconnect();
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
const currentRoot = rootRef.current;
|
|
138
|
+
function onTransitionEndHandler(e) {
|
|
139
|
+
if (e.propertyName !== "height") return;
|
|
140
|
+
setClonedChildren(nextClonedChildren);
|
|
141
|
+
}
|
|
142
|
+
currentRoot.addEventListener("transitionend", onTransitionEndHandler);
|
|
143
|
+
return () => {
|
|
144
|
+
resizeObserver.disconnect();
|
|
145
|
+
currentRoot.removeEventListener("transitionend", onTransitionEndHandler);
|
|
146
|
+
};
|
|
147
|
+
}, [children]);
|
|
148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
149
|
+
"div",
|
|
150
|
+
__spreadProps(__spreadValues({
|
|
151
|
+
ref: mergedRef,
|
|
152
|
+
onTransitionEnd,
|
|
153
|
+
style: __spreadValues({
|
|
154
|
+
position: "relative",
|
|
155
|
+
overflow: "hidden",
|
|
156
|
+
height: (_b2 = height == null ? void 0 : height.height) != null ? _b2 : (_a2 = measurementRef.current) == null ? void 0 : _a2.getBoundingClientRect().height,
|
|
157
|
+
transitionProperty: (height == null ? void 0 : height.shouldAnimate) ? "height" : "none",
|
|
158
|
+
transitionDuration: `var(--hds-micro-animation-duration-${animationDuration})`,
|
|
159
|
+
transitionTimingFunction: `var(--hds-micro-animation-easing-${animationEasing})`,
|
|
160
|
+
willChange: "height"
|
|
161
|
+
}, style)
|
|
162
|
+
}, rest), {
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
165
|
+
"div",
|
|
166
|
+
{
|
|
167
|
+
"aria-hidden": true,
|
|
168
|
+
ref: measurementRef,
|
|
169
|
+
style: {
|
|
170
|
+
position: "absolute",
|
|
171
|
+
visibility: "hidden",
|
|
172
|
+
pointerEvents: "none"
|
|
173
|
+
},
|
|
174
|
+
children
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
clonedChildren
|
|
178
|
+
]
|
|
179
|
+
})
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
AutoAnimateHeight.displayName = "AutoAnimateHeight";
|
|
184
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
185
|
+
0 && (module.exports = {
|
|
186
|
+
AutoAnimateHeight
|
|
187
|
+
});
|
|
188
|
+
//# sourceMappingURL=auto-animate-height.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/auto-animate-height.tsx","../../src/utils/utils.ts"],"sourcesContent":["import { cloneElement, forwardRef, useEffect, useRef, useState } from \"react\";\nimport { useMergeRefs } from \"./utils\";\n\nexport interface AutoAnimateHeightProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Time of the animation, using the hedwig animation tokens\n * quick: 0.1s\n * normal: 0.3s\n * slow: 0.7s\n *\n * default is \"quick\"\n */\n animationDuration?: \"quick\" | \"normal\" | \"slow\";\n\n /**\n * Callback fired when animiation transition ends\n * Use this to do effects after resizing is done, e.g. scrolling to the element\n * using `element.scrollIntoView()`\n */\n onTransitionEnd?: () => void;\n\n /**\n * Which hedwig easing function to use, default is \"normal\"\n */\n animationEasing?: \"in\" | \"out\" | \"normal\";\n children: React.ReactNode;\n style?: React.CSSProperties;\n}\n\n/**\n * Helper component to animate the height of the children when they change\n * It's done by rendering two versions of the passed children,\n * one hidden to measure the height and one visible to only changes after the height is measured.\n *\n * **IMPORTANT** Do not pass any components with effects (like data fetching), as they will trigger twice.\n */\nexport const AutoAnimateHeight = forwardRef<HTMLDivElement, AutoAnimateHeightProps>(\n (\n {\n children,\n style,\n animationDuration = \"quick\",\n animationEasing = \"normal\",\n onTransitionEnd,\n ...rest\n },\n ref,\n ) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([rootRef, ref]);\n const measurementRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState<{ height: number; shouldAnimate: boolean } | undefined>(\n undefined,\n );\n const [clonedChildren, setClonedChildren] = useState<React.ReactNode>(() =>\n cloneElement(<>{children}</>, {}),\n );\n\n useEffect(() => {\n if (!rootRef.current) return;\n if (!measurementRef.current) return;\n if (document.body.scrollHeight === 0) return;\n const currentMeasurement = measurementRef.current;\n const { height: newHeight } = currentMeasurement.getBoundingClientRect();\n\n // Listen for resize events on the measurement element\n // Keep the children in sync with the height\n // But don't animate it.\n let previouslyObservedHeight = newHeight;\n const resizeObserver = new ResizeObserver(() => {\n const { height: resizedHeight } = currentMeasurement.getBoundingClientRect();\n if (resizedHeight === previouslyObservedHeight) return;\n previouslyObservedHeight = resizedHeight;\n setHeight({ height: resizedHeight, shouldAnimate: false });\n });\n resizeObserver.observe(currentMeasurement); // This is cleaned up down below in the return functions\n\n // Set the new height when children changes\n setHeight({ height: newHeight, shouldAnimate: true });\n\n // Update children\n const nextClonedChildren = cloneElement(<>{children}</>, {});\n\n // When increasing in height update immediately so the new content is shown during the animation\n if (newHeight >= (height?.height ?? 0)) {\n setClonedChildren(nextClonedChildren);\n return () => {\n resizeObserver.disconnect();\n };\n }\n\n // When decreasing in height, wait until the animation is done so that we don't get a sudden flash of empty content\n const currentRoot = rootRef.current;\n function onTransitionEndHandler(e: TransitionEvent) {\n if (e.propertyName !== \"height\") return;\n setClonedChildren(nextClonedChildren);\n }\n currentRoot.addEventListener(\"transitionend\", onTransitionEndHandler);\n return () => {\n resizeObserver.disconnect();\n currentRoot.removeEventListener(\"transitionend\", onTransitionEndHandler);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, [children]);\n\n return (\n <div\n ref={mergedRef}\n onTransitionEnd={onTransitionEnd}\n style={{\n position: \"relative\",\n overflow: \"hidden\",\n height: height?.height ?? measurementRef.current?.getBoundingClientRect().height,\n transitionProperty: height?.shouldAnimate ? \"height\" : \"none\",\n transitionDuration: `var(--hds-micro-animation-duration-${animationDuration})`,\n transitionTimingFunction: `var(--hds-micro-animation-easing-${animationEasing})`,\n willChange: \"height\",\n ...style,\n }}\n {...rest}\n >\n <div\n aria-hidden\n ref={measurementRef}\n style={{\n position: \"absolute\",\n visibility: \"hidden\",\n pointerEvents: \"none\",\n }}\n >\n {children}\n </div>\n {clonedChildren}\n </div>\n );\n },\n);\nAutoAnimateHeight.displayName = \"AutoAnimateHeight\";\n","import * as React from \"react\";\nimport { useCallback, useEffect, useState } from \"react\";\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/useMergeRefs\n */\nexport function useMergeRefs<Instance>(\n refs: (React.Ref<Instance> | undefined)[],\n): React.RefCallback<Instance> | null {\n return React.useMemo(() => {\n if (refs.every((ref) => ref === null)) {\n return null;\n }\n\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref !== null) {\n (ref as React.MutableRefObject<Instance | null>).current = value;\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, refs);\n}\n\nexport function useResize<Instance extends HTMLElement>(\n ref: React.RefObject<Instance> | undefined | null,\n): { width: number; height: number } {\n const [width, setWidth] = useState<number>(0);\n const [height, setHeight] = useState<number>(0);\n const handleResize = useCallback(() => {\n if (ref?.current !== null) {\n setWidth(ref?.current?.offsetWidth ?? 0);\n setHeight(ref?.current?.offsetHeight ?? 0);\n }\n }, [ref]);\n useEffect(() => {\n window.addEventListener(\"load\", handleResize);\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"load\", handleResize);\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [ref, handleResize]);\n useEffect(() => {\n handleResize();\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, []);\n return { width, height };\n}\n\nfunction subscribe() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- It's ok\n return () => {};\n}\n\nexport function useHydrated() {\n return React.useSyncExternalStore(\n subscribe,\n () => true,\n () => false,\n );\n}\n\n/**\n * Trap focus inside an element using the `inert` attribute.\n *\n * Adds `inert` to all siblings of the given element, and all their ancestors up to the body.\n * Returns a cleanup function which removes the `inert` property from the elements, effectively giving focus back to rest of the document.\n *\n * NOTE: Does not support portals, i.e. elements outside the DOM hierarchy of the given element.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert\n * @see https://web.dev/articles/inert\n */\nexport function focusTrap(element: HTMLElement) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- NOP on focus trapping the body element\n if (element === document.body) return () => {};\n\n let inertElements: HTMLElement[] = [];\n for (let el: HTMLElement | null = element; el; el = el.parentElement) {\n if (el === document.body) break;\n\n for (const sibling of el.parentElement?.children ?? []) {\n if (sibling === el) continue;\n if (!(sibling instanceof HTMLElement)) continue;\n if (sibling.hasAttribute(\"inert\")) continue;\n\n sibling.setAttribute(\"inert\", \"true\");\n inertElements.push(sibling);\n }\n }\n\n return () => {\n releaseFocusTrap(inertElements);\n inertElements = [];\n };\n}\n\n/**\n * Unset the `inert` attribute on all elements given\n */\nfunction releaseFocusTrap(inertElements: Iterable<HTMLElement>) {\n for (const el of inertElements) {\n el.removeAttribute(\"inert\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,gBAAsE;;;ACAtE,YAAuB;AACvB,mBAAiD;AAM1C,SAAS,aACd,MACoC;AACpC,SAAa,cAAQ,MAAM;AACzB,QAAI,KAAK,MAAM,CAAC,QAAQ,QAAQ,IAAI,GAAG;AACrC,aAAO;AAAA,IACT;AAEA,WAAO,CAAC,UAAU;AAChB,WAAK,QAAQ,CAAC,QAAQ;AACpB,YAAI,OAAO,QAAQ,YAAY;AAC7B,cAAI,KAAK;AAAA,QACX,WAAW,QAAQ,MAAM;AACvB,UAAC,IAAgD,UAAU;AAAA,QAC7D;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EAEF,GAAG,IAAI;AACT;;;AD6BmB;AAnBZ,IAAM,wBAAoB;AAAA,EAC/B,CACE,IAQA,QACG;AATH,iBACE;AAAA;AAAA,MACA;AAAA,MACA,oBAAoB;AAAA,MACpB,kBAAkB;AAAA,MAClB;AAAA,IA3CN,IAsCI,IAMK,iBANL,IAMK;AAAA,MALH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AA3CN,QAAAC,KAAAC;AAgDI,UAAM,cAAU,sBAAuB,IAAI;AAC3C,UAAM,YAAY,aAAa,CAAC,SAAS,GAAG,CAAC;AAC7C,UAAM,qBAAiB,sBAAuB,IAAI;AAClD,UAAM,CAAC,QAAQ,SAAS,QAAI;AAAA,MAC1B;AAAA,IACF;AACA,UAAM,CAAC,gBAAgB,iBAAiB,QAAI;AAAA,MAA0B,UACpE,4BAAa,2EAAG,UAAS,GAAK,CAAC,CAAC;AAAA,IAClC;AAEA,iCAAU,MAAM;AA1DpB,UAAAD;AA2DM,UAAI,CAAC,QAAQ,QAAS;AACtB,UAAI,CAAC,eAAe,QAAS;AAC7B,UAAI,SAAS,KAAK,iBAAiB,EAAG;AACtC,YAAM,qBAAqB,eAAe;AAC1C,YAAM,EAAE,QAAQ,UAAU,IAAI,mBAAmB,sBAAsB;AAKvE,UAAI,2BAA2B;AAC/B,YAAM,iBAAiB,IAAI,eAAe,MAAM;AAC9C,cAAM,EAAE,QAAQ,cAAc,IAAI,mBAAmB,sBAAsB;AAC3E,YAAI,kBAAkB,yBAA0B;AAChD,mCAA2B;AAC3B,kBAAU,EAAE,QAAQ,eAAe,eAAe,MAAM,CAAC;AAAA,MAC3D,CAAC;AACD,qBAAe,QAAQ,kBAAkB;AAGzC,gBAAU,EAAE,QAAQ,WAAW,eAAe,KAAK,CAAC;AAGpD,YAAM,yBAAqB,4BAAa,2EAAG,UAAS,GAAK,CAAC,CAAC;AAG3D,UAAI,eAAcA,MAAA,iCAAQ,WAAR,OAAAA,MAAkB,IAAI;AACtC,0BAAkB,kBAAkB;AACpC,eAAO,MAAM;AACX,yBAAe,WAAW;AAAA,QAC5B;AAAA,MACF;AAGA,YAAM,cAAc,QAAQ;AAC5B,eAAS,uBAAuB,GAAoB;AAClD,YAAI,EAAE,iBAAiB,SAAU;AACjC,0BAAkB,kBAAkB;AAAA,MACtC;AACA,kBAAY,iBAAiB,iBAAiB,sBAAsB;AACpE,aAAO,MAAM;AACX,uBAAe,WAAW;AAC1B,oBAAY,oBAAoB,iBAAiB,sBAAsB;AAAA,MACzE;AAAA,IAGF,GAAG,CAAC,QAAQ,CAAC;AAEb,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL;AAAA,QACA,OAAO;AAAA,UACL,UAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAQC,MAAA,iCAAQ,WAAR,OAAAA,OAAkBD,MAAA,eAAe,YAAf,gBAAAA,IAAwB,wBAAwB;AAAA,UAC1E,qBAAoB,iCAAQ,iBAAgB,WAAW;AAAA,UACvD,oBAAoB,sCAAsC,iBAAiB;AAAA,UAC3E,0BAA0B,oCAAoC,eAAe;AAAA,UAC7E,YAAY;AAAA,WACT;AAAA,SAED,OAbL;AAAA,QAeC;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,eAAW;AAAA,cACX,KAAK;AAAA,cACL,OAAO;AAAA,gBACL,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,eAAe;AAAA,cACjB;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UACC;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,kBAAkB,cAAc;","names":["import_react","_a","_b"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,mBAAmB,uBAAuB,CAAC"}
|