@bi-digital/react 0.2.13 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/alert-B0SyUQVj.js +33 -0
- package/dist/alert-B0SyUQVj.js.map +1 -0
- package/dist/alert-Ch1lDSMm.js +0 -0
- package/dist/alert-footer-DL4rCThp.js +18 -0
- package/dist/alert-footer-DL4rCThp.js.map +1 -0
- package/dist/alert-footer-DgeFNevW.d.ts +1574 -0
- package/dist/avatar-6Q2xwviO.js +39 -0
- package/dist/avatar-6Q2xwviO.js.map +1 -0
- package/dist/avatar-B81bChIx.js +0 -0
- package/dist/badge-D9OVAKG8.js +22 -0
- package/dist/badge-D9OVAKG8.js.map +1 -0
- package/dist/badge-uRbNhCzA.js +0 -0
- package/dist/button-fhd-JARc.js +41 -0
- package/dist/button-fhd-JARc.js.map +1 -0
- package/dist/button-vrN4Zwch.js +0 -0
- package/dist/card-BK1MS46W.js +0 -0
- package/dist/card-QAnFhTk6.js +22 -0
- package/dist/card-QAnFhTk6.js.map +1 -0
- package/dist/card-action-D8M3_IVq.js +23 -0
- package/dist/card-action-D8M3_IVq.js.map +1 -0
- package/dist/card-actions-CIsnmxsm.js +16 -0
- package/dist/card-actions-CIsnmxsm.js.map +1 -0
- package/dist/card-content-DkEHp8mv.js +18 -0
- package/dist/card-content-DkEHp8mv.js.map +1 -0
- package/dist/card-date-Bd87BGDE.js +16 -0
- package/dist/card-date-Bd87BGDE.js.map +1 -0
- package/dist/card-header-D-RMd4xS.js +39 -0
- package/dist/card-header-D-RMd4xS.js.map +1 -0
- package/dist/card-media-DhU2_Ueq.js +19 -0
- package/dist/card-media-DhU2_Ueq.js.map +1 -0
- package/dist/checkbox-Bx9n-4ar.js +56 -0
- package/dist/checkbox-Bx9n-4ar.js.map +1 -0
- package/dist/checkbox-DXGZ7D3M.js +0 -0
- package/dist/chip-CopwfoBo.js +0 -0
- package/dist/chip-DlPl-C_F.js +24 -0
- package/dist/chip-DlPl-C_F.js.map +1 -0
- package/dist/components/alert/alert-footer.d.ts +14 -0
- package/dist/components/alert/alert-footer.js +3 -0
- package/dist/components/alert/alert.d.ts +14 -0
- package/dist/components/alert/alert.js +3 -0
- package/dist/components/alert/index.d.ts +14 -0
- package/dist/components/alert/index.js +5 -0
- package/dist/components/avatar/avatar.d.ts +14 -0
- package/dist/components/avatar/avatar.js +3 -0
- package/dist/components/avatar/index.d.ts +14 -0
- package/dist/components/avatar/index.js +4 -0
- package/dist/components/badge/badge.d.ts +14 -0
- package/dist/components/badge/badge.js +3 -0
- package/dist/components/badge/index.d.ts +14 -0
- package/dist/components/badge/index.js +4 -0
- package/dist/components/button/button.d.ts +14 -59
- package/dist/components/button/button.js +5 -9
- package/dist/components/button/index.d.ts +14 -4
- package/dist/components/button/index.js +6 -10
- package/dist/components/card/card-action.d.ts +14 -0
- package/dist/components/card/card-action.js +7 -0
- package/dist/components/card/card-actions.d.ts +14 -0
- package/dist/components/card/card-actions.js +3 -0
- package/dist/components/card/card-content.d.ts +14 -0
- package/dist/components/card/card-content.js +3 -0
- package/dist/components/card/card-date.d.ts +14 -0
- package/dist/components/card/card-date.js +3 -0
- package/dist/components/card/card-header.d.ts +14 -0
- package/dist/components/card/card-header.js +3 -0
- package/dist/components/card/card-media.d.ts +14 -0
- package/dist/components/card/card-media.js +3 -0
- package/dist/components/card/card.d.ts +14 -0
- package/dist/components/card/card.js +3 -0
- package/dist/components/card/index.d.ts +14 -0
- package/dist/components/card/index.js +14 -0
- package/dist/components/checkbox/checkbox.d.ts +14 -0
- package/dist/components/checkbox/checkbox.js +15 -0
- package/dist/components/checkbox/index.d.ts +14 -0
- package/dist/components/checkbox/index.js +16 -0
- package/dist/components/chip/chip.d.ts +14 -0
- package/dist/components/chip/chip.js +3 -0
- package/dist/components/chip/index.d.ts +14 -0
- package/dist/components/chip/index.js +4 -0
- package/dist/components/dialog/dialog-content.d.ts +14 -0
- package/dist/components/dialog/dialog-content.js +3 -0
- package/dist/components/dialog/dialog-footer.d.ts +14 -0
- package/dist/components/dialog/dialog-footer.js +3 -0
- package/dist/components/dialog/dialog-header.d.ts +14 -0
- package/dist/components/dialog/dialog-header.js +3 -0
- package/dist/components/dialog/dialog-trigger-context.d.ts +2 -0
- package/dist/components/dialog/dialog-trigger-context.js +3 -0
- package/dist/components/dialog/dialog-trigger.d.ts +14 -0
- package/dist/components/dialog/dialog-trigger.js +8 -0
- package/dist/components/dialog/dialog.d.ts +14 -0
- package/dist/components/dialog/dialog.js +12 -0
- package/dist/components/dialog/index.d.ts +14 -0
- package/dist/components/dialog/index.js +17 -0
- package/dist/components/drawer/drawer-content.d.ts +14 -0
- package/dist/components/drawer/drawer-content.js +18 -0
- package/dist/components/drawer/drawer-footer.d.ts +14 -0
- package/dist/components/drawer/drawer-footer.js +18 -0
- package/dist/components/drawer/drawer-header.d.ts +14 -0
- package/dist/components/drawer/drawer-header.js +18 -0
- package/dist/components/drawer/drawer-trigger-context.d.ts +2 -0
- package/dist/components/drawer/drawer-trigger-context.js +18 -0
- package/dist/components/drawer/drawer-trigger.d.ts +14 -0
- package/dist/components/drawer/drawer-trigger.js +18 -0
- package/dist/components/drawer/drawer.d.ts +14 -0
- package/dist/components/drawer/drawer.js +18 -0
- package/dist/components/drawer/index.d.ts +14 -0
- package/dist/components/drawer/index.js +24 -0
- package/dist/components/dropdown/dropdown-button.d.ts +14 -0
- package/dist/components/dropdown/dropdown-button.js +7 -0
- package/dist/components/dropdown/dropdown-item.d.ts +2 -0
- package/dist/components/dropdown/dropdown-item.js +3 -0
- package/dist/components/dropdown/dropdown-list.d.ts +2 -0
- package/dist/components/dropdown/dropdown-list.js +3 -0
- package/dist/components/dropdown/dropdown-trigger-context.d.ts +2 -0
- package/dist/components/dropdown/dropdown-trigger-context.js +15 -0
- package/dist/components/dropdown/dropdown-trigger.d.ts +14 -0
- package/dist/components/dropdown/dropdown-trigger.js +15 -0
- package/dist/components/dropdown/dropdown.d.ts +14 -0
- package/dist/components/dropdown/dropdown.js +15 -0
- package/dist/components/dropdown/index.d.ts +14 -0
- package/dist/components/dropdown/index.js +21 -0
- package/dist/components/field/field-affix.d.ts +14 -0
- package/dist/components/field/field-affix.js +3 -0
- package/dist/components/field/field-description.d.ts +14 -0
- package/dist/components/field/field-description.js +3 -0
- package/dist/components/field/field.d.ts +14 -0
- package/dist/components/field/field.js +3 -0
- package/dist/components/field/index.d.ts +14 -0
- package/dist/components/field/index.js +6 -0
- package/dist/components/fieldset/fieldset-description.d.ts +14 -0
- package/dist/components/fieldset/fieldset-description.js +3 -0
- package/dist/components/fieldset/fieldset-legend.d.ts +14 -0
- package/dist/components/fieldset/fieldset-legend.js +5 -0
- package/dist/components/fieldset/fieldset.d.ts +14 -0
- package/dist/components/fieldset/fieldset.js +3 -0
- package/dist/components/fieldset/index.d.ts +14 -0
- package/dist/components/fieldset/index.js +8 -0
- package/dist/components/footer/footer-links.d.ts +2 -0
- package/dist/components/footer/footer-links.js +3 -0
- package/dist/components/footer/footer.d.ts +14 -0
- package/dist/components/footer/footer.js +7 -0
- package/dist/components/footer/index.d.ts +14 -0
- package/dist/components/footer/index.js +9 -0
- package/dist/components/index.d.ts +14 -11
- package/dist/components/index.js +99 -45
- package/dist/components/input/index.d.ts +14 -0
- package/dist/components/input/index.js +4 -0
- package/dist/components/input/input.d.ts +14 -0
- package/dist/components/input/input.js +3 -0
- package/dist/components/label/index.d.ts +14 -0
- package/dist/components/label/index.js +4 -0
- package/dist/components/label/label.d.ts +14 -0
- package/dist/components/label/label.js +3 -0
- package/dist/components/link/index.d.ts +14 -0
- package/dist/components/link/index.js +4 -0
- package/dist/components/link/link.d.ts +14 -0
- package/dist/components/link/link.js +3 -0
- package/dist/components/logo/index.d.ts +14 -4
- package/dist/components/logo/index.js +4 -8
- package/dist/components/logo/logo.d.ts +14 -32
- package/dist/components/logo/logo.js +3 -7
- package/dist/components/navbar/index.d.ts +14 -4
- package/dist/components/navbar/index.js +6 -10
- package/dist/components/navbar/navbar.d.ts +14 -43
- package/dist/components/navbar/navbar.js +5 -9
- package/dist/components/pagination/index.d.ts +14 -0
- package/dist/components/pagination/index.js +10 -0
- package/dist/components/pagination/pagination-button.d.ts +14 -0
- package/dist/components/pagination/pagination-button.js +7 -0
- package/dist/components/pagination/pagination-item.d.ts +2 -0
- package/dist/components/pagination/pagination-item.js +3 -0
- package/dist/components/pagination/pagination.d.ts +14 -0
- package/dist/components/pagination/pagination.js +3 -0
- package/dist/components/popover/index.d.ts +14 -0
- package/dist/components/popover/index.js +14 -0
- package/dist/components/popover/popover-trigger-context.d.ts +2 -0
- package/dist/components/popover/popover-trigger-context.js +3 -0
- package/dist/components/popover/popover-trigger.d.ts +14 -0
- package/dist/components/popover/popover-trigger.js +8 -0
- package/dist/components/popover/popover.d.ts +14 -0
- package/dist/components/popover/popover.js +8 -0
- package/dist/components/radio/index.d.ts +14 -0
- package/dist/components/radio/index.js +12 -0
- package/dist/components/radio/radio.d.ts +14 -0
- package/dist/components/radio/radio.js +11 -0
- package/dist/components/search/index.d.ts +14 -0
- package/dist/components/search/index.js +14 -0
- package/dist/components/search/search.d.ts +14 -0
- package/dist/components/search/search.js +13 -0
- package/dist/components/select/index.d.ts +14 -0
- package/dist/components/select/index.js +6 -0
- package/dist/components/select/select-optgroup.d.ts +14 -0
- package/dist/components/select/select-optgroup.js +3 -0
- package/dist/components/select/select-option.d.ts +14 -0
- package/dist/components/select/select-option.js +3 -0
- package/dist/components/select/select.d.ts +14 -0
- package/dist/components/select/select.js +3 -0
- package/dist/components/spinner/index.d.ts +14 -4
- package/dist/components/spinner/index.js +4 -8
- package/dist/components/spinner/spinner.d.ts +14 -19
- package/dist/components/spinner/spinner.js +3 -7
- package/dist/components/tabs/index.d.ts +14 -0
- package/dist/components/tabs/index.js +11 -0
- package/dist/components/tabs/tab.d.ts +14 -0
- package/dist/components/tabs/tab.js +7 -0
- package/dist/components/tabs/tabs-list.d.ts +14 -0
- package/dist/components/tabs/tabs-list.js +3 -0
- package/dist/components/tabs/tabs-panel.d.ts +14 -0
- package/dist/components/tabs/tabs-panel.js +3 -0
- package/dist/components/tabs/tabs.d.ts +14 -0
- package/dist/components/tabs/tabs.js +3 -0
- package/dist/components/textarea/index.d.ts +14 -0
- package/dist/components/textarea/index.js +4 -0
- package/dist/components/textarea/textarea.d.ts +14 -0
- package/dist/components/textarea/textarea.js +3 -0
- package/dist/components/textfield/index.d.ts +14 -0
- package/dist/components/textfield/index.js +16 -0
- package/dist/components/textfield/textfield.d.ts +14 -0
- package/dist/components/textfield/textfield.js +15 -0
- package/dist/components/validation-message/index.d.ts +14 -0
- package/dist/components/validation-message/index.js +4 -0
- package/dist/components/validation-message/validation-message.d.ts +14 -0
- package/dist/components/validation-message/validation-message.js +3 -0
- package/dist/components-DldfmTaW.js +0 -0
- package/dist/dialog-BH58xo66.js +106 -0
- package/dist/dialog-BH58xo66.js.map +1 -0
- package/dist/dialog-CnQlF2iI.js +0 -0
- package/dist/dialog-content-WzSZbqt-.js +18 -0
- package/dist/dialog-content-WzSZbqt-.js.map +1 -0
- package/dist/dialog-footer-qRAQAS0Y.js +18 -0
- package/dist/dialog-footer-qRAQAS0Y.js.map +1 -0
- package/dist/dialog-header-CMt3r5oC.js +18 -0
- package/dist/dialog-header-CMt3r5oC.js.map +1 -0
- package/dist/dialog-trigger-XPMx1psz.js +22 -0
- package/dist/dialog-trigger-XPMx1psz.js.map +1 -0
- package/dist/dialog-trigger-context-B5d-o0K7.js +16 -0
- package/dist/dialog-trigger-context-B5d-o0K7.js.map +1 -0
- package/dist/dialog-trigger-context-BXtYdvEK.d.ts +15 -0
- package/dist/drawer-Cc670B_f.js +0 -0
- package/dist/drawer-DktQMZpp.js +46 -0
- package/dist/drawer-DktQMZpp.js.map +1 -0
- package/dist/drawer-content-D_Y5KRqQ.js +14 -0
- package/dist/drawer-content-D_Y5KRqQ.js.map +1 -0
- package/dist/drawer-footer-f8OAoZVM.js +14 -0
- package/dist/drawer-footer-f8OAoZVM.js.map +1 -0
- package/dist/drawer-header-nRdU5sRL.js +14 -0
- package/dist/drawer-header-nRdU5sRL.js.map +1 -0
- package/dist/drawer-trigger-GO6wSbYv.js +12 -0
- package/dist/drawer-trigger-GO6wSbYv.js.map +1 -0
- package/dist/drawer-trigger-context-C3D2O90e.js +9 -0
- package/dist/drawer-trigger-context-C3D2O90e.js.map +1 -0
- package/dist/drawer-trigger-context-CZyGAmYc.d.ts +13 -0
- package/dist/dropdown-BecLkiCE.js +0 -0
- package/dist/dropdown-C8xIJ-jF.js +15 -0
- package/dist/dropdown-C8xIJ-jF.js.map +1 -0
- package/dist/dropdown-CFwza8-u.js +44 -0
- package/dist/dropdown-CFwza8-u.js.map +1 -0
- package/dist/dropdown-button-FQqIwqdp.js +15 -0
- package/dist/dropdown-button-FQqIwqdp.js.map +1 -0
- package/dist/dropdown-item-DQQXQC4J.js +11 -0
- package/dist/dropdown-item-DQQXQC4J.js.map +1 -0
- package/dist/dropdown-item-h8WklvJi.d.ts +14 -0
- package/dist/dropdown-list-B8pfs0Vc.d.ts +14 -0
- package/dist/dropdown-list-DB1mST67.js +11 -0
- package/dist/dropdown-list-DB1mST67.js.map +1 -0
- package/dist/dropdown-trigger-DnE1t9YA.js +13 -0
- package/dist/dropdown-trigger-DnE1t9YA.js.map +1 -0
- package/dist/dropdown-trigger-context-5mGr6ped.d.ts +29 -0
- package/dist/dropdown-trigger-context-BDCr78fy.js +25 -0
- package/dist/dropdown-trigger-context-BDCr78fy.js.map +1 -0
- package/dist/field-B7y2WBzu.js +0 -0
- package/dist/field-U2SN9jkp.js +30 -0
- package/dist/field-U2SN9jkp.js.map +1 -0
- package/dist/field-affix-npc6m7XL.js +47 -0
- package/dist/field-affix-npc6m7XL.js.map +1 -0
- package/dist/field-description-Dhm1VA08.js +17 -0
- package/dist/field-description-Dhm1VA08.js.map +1 -0
- package/dist/fieldset-Bpu4CRKG.js +17 -0
- package/dist/fieldset-Bpu4CRKG.js.map +1 -0
- package/dist/fieldset-D5HSCHPA.js +0 -0
- package/dist/fieldset-description-DiHvcLh-.js +15 -0
- package/dist/fieldset-description-DiHvcLh-.js.map +1 -0
- package/dist/fieldset-legend-CR4srn2-.js +19 -0
- package/dist/fieldset-legend-CR4srn2-.js.map +1 -0
- package/dist/footer-Dv7qJxvS.js +0 -0
- package/dist/footer-hxqsN1cg.js +111 -0
- package/dist/footer-hxqsN1cg.js.map +1 -0
- package/dist/footer-links-BbIh-yGy.d.ts +20 -0
- package/dist/footer-links-CicpNbmh.js +15 -0
- package/dist/footer-links-CicpNbmh.js.map +1 -0
- package/dist/hooks-CQ4fud3K.js +0 -0
- package/dist/index-DRx9hLAb.d.ts +48 -0
- package/dist/index-no8iFicj.d.ts +47 -0
- package/dist/input-03FO9IIL.js +0 -0
- package/dist/input-Dr7BnTyd.js +25 -0
- package/dist/input-Dr7BnTyd.js.map +1 -0
- package/dist/label-DUzvAx-T.js +19 -0
- package/dist/label-DUzvAx-T.js.map +1 -0
- package/dist/label-nhrfSiaP.js +0 -0
- package/dist/link-CmV99fiH.js +19 -0
- package/dist/link-CmV99fiH.js.map +1 -0
- package/dist/link-SFIswjDv.js +0 -0
- package/dist/logo-CH25UUnL.js +19 -0
- package/dist/logo-CH25UUnL.js.map +1 -0
- package/dist/logo-CtdGQobw.js +0 -0
- package/dist/main.d.ts +14 -12
- package/dist/main.js +100 -51
- package/dist/navbar-B9qq_6F0.js +0 -0
- package/dist/navbar-De_fPOmv.js +31 -0
- package/dist/navbar-De_fPOmv.js.map +1 -0
- package/dist/pagination-DE6-fkdI.js +17 -0
- package/dist/pagination-DE6-fkdI.js.map +1 -0
- package/dist/pagination-SGu293vE.js +0 -0
- package/dist/pagination-button-D7N6uNjK.js +14 -0
- package/dist/pagination-button-D7N6uNjK.js.map +1 -0
- package/dist/pagination-item-D2-tdnvJ.d.ts +21 -0
- package/dist/pagination-item-DOhhpnMQ.js +16 -0
- package/dist/pagination-item-DOhhpnMQ.js.map +1 -0
- package/dist/popover-5DDVrAzC.js +109 -0
- package/dist/popover-5DDVrAzC.js.map +1 -0
- package/dist/popover-BRJLSD4S.js +45 -0
- package/dist/popover-BRJLSD4S.js.map +1 -0
- package/dist/popover-Ch_2ehYy.js +0 -0
- package/dist/popover-trigger-DB9-FUdp.js +44 -0
- package/dist/popover-trigger-DB9-FUdp.js.map +1 -0
- package/dist/popover-trigger-context-CFCUCT8d.js +31 -0
- package/dist/popover-trigger-context-CFCUCT8d.js.map +1 -0
- package/dist/popover-trigger-context-Efb9U0bz.d.ts +29 -0
- package/dist/radio-BXh5qXUM.js +0 -0
- package/dist/radio-DO1yBsvB.js +43 -0
- package/dist/radio-DO1yBsvB.js.map +1 -0
- package/dist/search-BjijtARV.js +55 -0
- package/dist/search-BjijtARV.js.map +1 -0
- package/dist/search-CDWq41eP.js +0 -0
- package/dist/select-BhZiWr3e.js +26 -0
- package/dist/select-BhZiWr3e.js.map +1 -0
- package/dist/select-CIoM-cNC.js +0 -0
- package/dist/select-optgroup-CTxTrNuW.js +15 -0
- package/dist/select-optgroup-CTxTrNuW.js.map +1 -0
- package/dist/select-option-StqAJ3Zw.js +15 -0
- package/dist/select-option-StqAJ3Zw.js.map +1 -0
- package/dist/spinner-CPiGcSIc.js +0 -0
- package/dist/spinner-Ch5bEQBR.js +17 -0
- package/dist/spinner-Ch5bEQBR.js.map +1 -0
- package/dist/tab-B36MUojE.js +27 -0
- package/dist/tab-B36MUojE.js.map +1 -0
- package/dist/tabs-CNwtyPqg.js +0 -0
- package/dist/tabs-D37c_qi5.js +24 -0
- package/dist/tabs-D37c_qi5.js.map +1 -0
- package/dist/tabs-list-CYproOp6.js +20 -0
- package/dist/tabs-list-CYproOp6.js.map +1 -0
- package/dist/tabs-panel-Bh9fqG1R.js +21 -0
- package/dist/tabs-panel-Bh9fqG1R.js.map +1 -0
- package/dist/textarea-CGx0ecUJ.js +0 -0
- package/dist/textarea-D6dY1eRh.js +17 -0
- package/dist/textarea-D6dY1eRh.js.map +1 -0
- package/dist/textfield-BTogEiz_.js +62 -0
- package/dist/textfield-BTogEiz_.js.map +1 -0
- package/dist/textfield-OYsTbJVn.js +0 -0
- package/dist/types-CaBoIvtz.d.ts +34 -0
- package/dist/types-DUx4Pkhy.d.ts +9 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.js +0 -0
- package/dist/useIsomorphicLayoutEffect-BJo3l8ol.d.ts +7 -0
- package/dist/useIsomorphicLayoutEffect-DCaf_yI4.js +8 -0
- package/dist/useIsomorphicLayoutEffect-DCaf_yI4.js.map +1 -0
- package/dist/useMergeRefs-CGbb4u_J.d.ts +11 -0
- package/dist/useMergeRefs-Cz-t7gpp.js +42 -0
- package/dist/useMergeRefs-Cz-t7gpp.js.map +1 -0
- package/dist/usePagination-afWMXp7h.js +97 -0
- package/dist/usePagination-afWMXp7h.js.map +1 -0
- package/dist/utilities/hooks/index.d.ts +14 -2
- package/dist/utilities/hooks/index.js +6 -8
- package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +2 -5
- package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +3 -7
- package/dist/utilities/hooks/useMergeRefs/useMergeRefs.d.ts +2 -0
- package/dist/utilities/hooks/useMergeRefs/useMergeRefs.js +3 -0
- package/dist/utilities/hooks/usePagination/usePagination.d.ts +14 -0
- package/dist/utilities/hooks/usePagination/usePagination.js +3 -0
- package/dist/utilities/index.d.ts +14 -3
- package/dist/utilities/index.js +7 -9
- package/dist/utilities/types.d.ts +2 -7
- package/dist/utilities/types.js +0 -1
- package/dist/utilities-CQ6hoSQa.js +0 -0
- package/dist/validation-message-Bf3z_0qa.js +0 -0
- package/dist/validation-message-C1f_XsoD.js +19 -0
- package/dist/validation-message-C1f_XsoD.js.map +1 -0
- package/dist/vanilla/dropdown/index.d.ts +2 -0
- package/dist/vanilla/dropdown/index.js +4 -0
- package/dist/vanilla/index.d.ts +3 -0
- package/dist/vanilla/index.js +4 -0
- package/dist/vanilla/popover/index.d.ts +2 -0
- package/dist/vanilla/popover/index.js +3 -0
- package/dist/vite-env.d.ts +1 -0
- package/package.json +25 -10
- package/dist/chunk-2C3XKBNM.js +0 -1
- package/dist/chunk-2C3XKBNM.js.map +0 -1
- package/dist/chunk-2PYB72CX.js +0 -1
- package/dist/chunk-2PYB72CX.js.map +0 -1
- package/dist/chunk-3XRBNC3R.js +0 -32
- package/dist/chunk-3XRBNC3R.js.map +0 -1
- package/dist/chunk-4WOE4T43.js +0 -1
- package/dist/chunk-4WOE4T43.js.map +0 -1
- package/dist/chunk-BBMVGCDE.js +0 -1
- package/dist/chunk-BBMVGCDE.js.map +0 -1
- package/dist/chunk-DT6EO53O.js +0 -46
- package/dist/chunk-DT6EO53O.js.map +0 -1
- package/dist/chunk-DZDPC6SE.js +0 -1
- package/dist/chunk-DZDPC6SE.js.map +0 -1
- package/dist/chunk-IT2O6DB2.js +0 -53
- package/dist/chunk-IT2O6DB2.js.map +0 -1
- package/dist/chunk-LLNHMZB2.js +0 -1
- package/dist/chunk-LLNHMZB2.js.map +0 -1
- package/dist/chunk-MXDZGWL4.js +0 -33
- package/dist/chunk-MXDZGWL4.js.map +0 -1
- package/dist/chunk-NLZRLXFN.js +0 -30
- package/dist/chunk-NLZRLXFN.js.map +0 -1
- package/dist/chunk-PD4PXDK2.js +0 -1
- package/dist/chunk-PD4PXDK2.js.map +0 -1
- package/dist/chunk-RAZCAHWX.js +0 -1
- package/dist/chunk-RAZCAHWX.js.map +0 -1
- package/dist/chunk-RELDFXH4.js +0 -1
- package/dist/chunk-RELDFXH4.js.map +0 -1
- package/dist/chunk-RONRQXS6.js +0 -11
- package/dist/chunk-RONRQXS6.js.map +0 -1
- package/dist/chunk-RVKE5NZR.js +0 -1
- package/dist/chunk-RVKE5NZR.js.map +0 -1
- package/dist/chunk-SGVCN25U.js +0 -11
- package/dist/chunk-SGVCN25U.js.map +0 -1
- package/dist/chunk-SHVA4JJZ.js +0 -1
- package/dist/chunk-SHVA4JJZ.js.map +0 -1
- package/dist/chunk-SX22Q2HZ.js +0 -84
- package/dist/chunk-SX22Q2HZ.js.map +0 -1
- package/dist/chunk-TUJK53CY.js +0 -1
- package/dist/chunk-TUJK53CY.js.map +0 -1
- package/dist/chunk-VPE7VEBG.js +0 -8
- package/dist/chunk-VPE7VEBG.js.map +0 -1
- package/dist/components/button/button.js.map +0 -1
- package/dist/components/button/index.js.map +0 -1
- package/dist/components/form/error-message/error-message.d.ts +0 -10
- package/dist/components/form/error-message/error-message.js +0 -7
- package/dist/components/form/error-message/error-message.js.map +0 -1
- package/dist/components/form/error-message/index.d.ts +0 -3
- package/dist/components/form/error-message/index.js +0 -8
- package/dist/components/form/error-message/index.js.map +0 -1
- package/dist/components/form/index.d.ts +0 -6
- package/dist/components/form/index.js +0 -24
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/form/input/index.d.ts +0 -5
- package/dist/components/form/input/index.js +0 -14
- package/dist/components/form/input/index.js.map +0 -1
- package/dist/components/form/input/input.d.ts +0 -11
- package/dist/components/form/input/input.js +0 -13
- package/dist/components/form/input/input.js.map +0 -1
- package/dist/components/form/input-group/index.d.ts +0 -4
- package/dist/components/form/input-group/index.js +0 -12
- package/dist/components/form/input-group/index.js.map +0 -1
- package/dist/components/form/input-group/input-group.d.ts +0 -27
- package/dist/components/form/input-group/input-group.js +0 -11
- package/dist/components/form/input-group/input-group.js.map +0 -1
- package/dist/components/form/label/index.d.ts +0 -3
- package/dist/components/form/label/index.js +0 -8
- package/dist/components/form/label/index.js.map +0 -1
- package/dist/components/form/label/label.d.ts +0 -23
- package/dist/components/form/label/label.js +0 -7
- package/dist/components/form/label/label.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/logo/index.js.map +0 -1
- package/dist/components/logo/logo.js.map +0 -1
- package/dist/components/navbar/index.js.map +0 -1
- package/dist/components/navbar/navbar.js.map +0 -1
- package/dist/components/spinner/index.js.map +0 -1
- package/dist/components/spinner/spinner.js.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/utilities/hooks/index.js.map +0 -1
- package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js.map +0 -1
- package/dist/utilities/index.js.map +0 -1
- package/dist/utilities/types.js.map +0 -1
- package/dist/vite-env.d.d.ts +0 -1
- package/dist/vite-env.d.js +0 -1
- package/dist/vite-env.d.js.map +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as react_jsx_runtime66 from "react/jsx-runtime";
|
|
2
|
+
import * as react65 from "react";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/popover/popover-trigger-context.d.ts
|
|
6
|
+
declare const Context: react65.Context<{
|
|
7
|
+
popoverId?: string;
|
|
8
|
+
setPopoverId?: (id: string) => void;
|
|
9
|
+
}>;
|
|
10
|
+
type PopoverTriggerContextProps = {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* PopoverTriggerContext component, use to wrap a PopoverTrigger and Popover.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <PopoverTriggerContext>
|
|
18
|
+
* <PopoverTrigger>Open Popover</PopoverTrigger>
|
|
19
|
+
* <Popover>
|
|
20
|
+
* Content
|
|
21
|
+
* </Popover>
|
|
22
|
+
* </PopoverTriggerContext>
|
|
23
|
+
*/
|
|
24
|
+
declare const PopoverTriggerContext: ({
|
|
25
|
+
children
|
|
26
|
+
}: PopoverTriggerContextProps) => react_jsx_runtime66.JSX.Element;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Context, PopoverTriggerContext, PopoverTriggerContextProps };
|
|
29
|
+
//# sourceMappingURL=popover-trigger-context-Efb9U0bz.d.ts.map
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Field } from "./field-U2SN9jkp.js";
|
|
2
|
+
import { FieldDescription } from "./field-description-Dhm1VA08.js";
|
|
3
|
+
import { Input } from "./input-Dr7BnTyd.js";
|
|
4
|
+
import { Label } from "./label-DUzvAx-T.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useId } from "react";
|
|
7
|
+
|
|
8
|
+
//#region src/components/radio/radio.tsx
|
|
9
|
+
const Radio = ({ dark, label, description, error, style, className, ref, id, "aria-describedby": ariaDescribedByProp,...props }) => {
|
|
10
|
+
const descriptionId = useId();
|
|
11
|
+
const ariaDescribedBy = [description ? descriptionId : "", ariaDescribedByProp].join(" ").trim() || void 0;
|
|
12
|
+
return /* @__PURE__ */ jsx(Field, {
|
|
13
|
+
className,
|
|
14
|
+
"data-dark": dark,
|
|
15
|
+
style,
|
|
16
|
+
asChild: true,
|
|
17
|
+
children: /* @__PURE__ */ jsxs("label", { children: [
|
|
18
|
+
/* @__PURE__ */ jsx(Input, {
|
|
19
|
+
type: "radio",
|
|
20
|
+
id,
|
|
21
|
+
ref,
|
|
22
|
+
"aria-invalid": error || void 0,
|
|
23
|
+
"aria-describedby": ariaDescribedBy,
|
|
24
|
+
...props
|
|
25
|
+
}),
|
|
26
|
+
label && /* @__PURE__ */ jsx(Label, {
|
|
27
|
+
weight: "medium",
|
|
28
|
+
htmlFor: id,
|
|
29
|
+
asChild: true,
|
|
30
|
+
children: /* @__PURE__ */ jsx("span", { children: label })
|
|
31
|
+
}),
|
|
32
|
+
description && /* @__PURE__ */ jsx(FieldDescription, {
|
|
33
|
+
"aria-hidden": "true",
|
|
34
|
+
id: descriptionId,
|
|
35
|
+
children: description
|
|
36
|
+
})
|
|
37
|
+
] })
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Radio };
|
|
43
|
+
//# sourceMappingURL=radio-DO1yBsvB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-DO1yBsvB.js","names":[],"sources":["../src/components/radio/radio.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type RadioProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'>,\n {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Add error indication to the radio. */\n error?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n dark,\n label,\n description,\n error,\n style,\n className,\n ref,\n id,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: RadioProps) => {\n const descriptionId = useId();\n\n const ariaDescribedBy = [description ? descriptionId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n\n return (\n <Field className={className} data-dark={dark} style={style} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n {description && (\n // Aria-hidden is used to prevent screen readers from reading the description twice:\n // once as part of the label and once from being connected through aria-describedby.\n <FieldDescription aria-hidden='true' id={descriptionId}>\n {description}\n </FieldDescription>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;AAqBA,MAAa,QAAQ,CAAC,EACpB,MACA,OACA,aACA,OACA,OACA,WACA,KACA,IACA,oBAAoB,oBACpB,GAAG,OACQ,KAAK;CAChB,MAAM,gBAAgB,OAAO;CAE7B,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,mBAAoB,EAAC,KAAK,IAAI,CAAC,MAAM;AAEhG,wBACE,IAAC;EAAiB;EAAW,aAAW;EAAa;EAAO;4BAC1D,KAAC;mBACC,IAAC;IACC,MAAK;IACD;IACC;IACL,gBAAc;IACd,oBAAkB;IAClB,GAAI;KACJ;GACD,yBACC,IAAC;IAAM,QAAO;IAAS,SAAS;IAAI;8BAClC,IAAC,oBAAM,QAAa;KACd;GAET,+BAGC,IAAC;IAAiB,eAAY;IAAO,IAAI;cACtC;KACgB;MAEf;GACF;AAEX"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Button } from "./button-fhd-JARc.js";
|
|
2
|
+
import { Field } from "./field-U2SN9jkp.js";
|
|
3
|
+
import { FieldAffix, FieldAffixes } from "./field-affix-npc6m7XL.js";
|
|
4
|
+
import { Input } from "./input-Dr7BnTyd.js";
|
|
5
|
+
import clsx from "clsx/lite";
|
|
6
|
+
import { BiIconCrossSmall, BiIconMagnefyingGlass } from "@bi-digital/icons-react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/components/search/search.tsx
|
|
10
|
+
const Search = ({ className, onSubmit, clearAriaLabel = "Clear", size = "medium", ref, dark, style,...props }) => {
|
|
11
|
+
const handleSubmit = (e) => {
|
|
12
|
+
e.preventDefault();
|
|
13
|
+
if (onSubmit) {
|
|
14
|
+
const input = e.currentTarget.querySelector("input");
|
|
15
|
+
onSubmit(input?.value || "");
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return /* @__PURE__ */ jsx(Field, {
|
|
19
|
+
className: clsx("bi-search", className),
|
|
20
|
+
"data-dark": dark,
|
|
21
|
+
style,
|
|
22
|
+
asChild: true,
|
|
23
|
+
children: /* @__PURE__ */ jsx("form", {
|
|
24
|
+
onSubmit: handleSubmit,
|
|
25
|
+
children: /* @__PURE__ */ jsxs(FieldAffixes, { children: [
|
|
26
|
+
/* @__PURE__ */ jsx(FieldAffix, { children: /* @__PURE__ */ jsx(BiIconMagnefyingGlass, { size }) }),
|
|
27
|
+
/* @__PURE__ */ jsx(Input, {
|
|
28
|
+
type: "text",
|
|
29
|
+
ref,
|
|
30
|
+
size,
|
|
31
|
+
...props
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ jsx(FieldAffix, {
|
|
34
|
+
"aria-hidden": "false",
|
|
35
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
36
|
+
"aria-label": clearAriaLabel,
|
|
37
|
+
icon: true,
|
|
38
|
+
size,
|
|
39
|
+
dark,
|
|
40
|
+
variant: "text",
|
|
41
|
+
type: "reset",
|
|
42
|
+
children: /* @__PURE__ */ jsx(BiIconCrossSmall, {
|
|
43
|
+
size,
|
|
44
|
+
"aria-hidden": "true"
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
] })
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { Search };
|
|
55
|
+
//# sourceMappingURL=search-BjijtARV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-BjijtARV.js","names":["e: React.FormEvent<HTMLFormElement>"],"sources":["../src/components/search/search.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Field, FieldAffixes, FieldAffix } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { BiIconCrossSmall, BiIconMagnefyingGlass } from '@bi-digital/icons-react';\nimport type { MergeRight } from '../../utilities';\nimport { Button } from '../button';\n\nexport type SearchProps = MergeRight<\n Omit<InputProps, 'type' | 'size'>,\n {\n /**\n * Size of the search.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Called when the user presses enter. You can use this to for example navigate on submit. */\n onSubmit?: (value: string) => void;\n /**\n * Aria-label for the clear button.\n * @defaultValue 'Clear'\n */\n clearAriaLabel?: string;\n }\n>;\n\nexport const Search = ({\n className,\n onSubmit,\n clearAriaLabel = 'Clear',\n size = 'medium',\n ref,\n dark,\n style,\n ...props\n}: SearchProps) => {\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n if (onSubmit) {\n const input = e.currentTarget.querySelector('input');\n onSubmit(input?.value || '');\n }\n };\n return (\n <Field className={clsx('bi-search', className)} data-dark={dark} style={style} asChild>\n <form onSubmit={handleSubmit}>\n <FieldAffixes>\n <FieldAffix>\n <BiIconMagnefyingGlass size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} {...props} />\n <FieldAffix aria-hidden='false'>\n <Button aria-label={clearAriaLabel} icon size={size} dark={dark} variant='text' type='reset'>\n <BiIconCrossSmall size={size} aria-hidden='true' />\n </Button>\n </FieldAffix>\n </FieldAffixes>\n </form>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;AAyBA,MAAa,SAAS,CAAC,EACrB,WACA,UACA,iBAAiB,SACjB,OAAO,UACP,KACA,MACA,MACA,GAAG,OACS,KAAK;CACjB,MAAM,eAAe,CAACA,MAAwC;AAC5D,IAAE,gBAAgB;AAClB,MAAI,UAAU;GACZ,MAAM,QAAQ,EAAE,cAAc,cAAc,QAAQ;AACpD,YAAS,OAAO,SAAS,GAAG;EAC7B;CACF;AACD,wBACE,IAAC;EAAM,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAa;EAAO;4BAC7E,IAAC;GAAK,UAAU;6BACd,KAAC;oBACC,IAAC,wCACC,IAAC,yBAA4B,OAAQ,GAC1B;oBACb,IAAC;KAAM,MAAK;KAAY;KAAW;KAAM,GAAI;MAAS;oBACtD,IAAC;KAAW,eAAY;+BACtB,IAAC;MAAO,cAAY;MAAgB;MAAW;MAAY;MAAM,SAAQ;MAAO,MAAK;gCACnF,IAAC;OAAuB;OAAM,eAAY;QAAS;OAC5C;MACE;OACA;IACV;GACD;AAEX"}
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import clsx from "clsx/lite";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/select/select.tsx
|
|
5
|
+
const Select = ({ className, dark, onKeyDown, onMouseDown, size, ref,...props }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("select", {
|
|
7
|
+
className: clsx("bi-input", className),
|
|
8
|
+
"data-dark": dark,
|
|
9
|
+
"data-size": size,
|
|
10
|
+
ref,
|
|
11
|
+
onKeyDown: (event) => {
|
|
12
|
+
if (event.key === "Tab") return;
|
|
13
|
+
if (props.readOnly) event.preventDefault();
|
|
14
|
+
onKeyDown?.(event);
|
|
15
|
+
},
|
|
16
|
+
onMouseDown: (event) => {
|
|
17
|
+
if (props.readOnly) event.preventDefault();
|
|
18
|
+
onMouseDown?.(event);
|
|
19
|
+
},
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Select };
|
|
26
|
+
//# sourceMappingURL=select-BhZiWr3e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-BhZiWr3e.js","names":[],"sources":["../src/components/select/select.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, SelectHTMLAttributes } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SelectProps = MergeRight<\n DefaultProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'multiple' | 'size'>,\n {\n /**\n * Size of the select.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Mark the select as readOnly */\n readOnly?: boolean;\n ref?: Ref<HTMLSelectElement>;\n }\n>;\n\nexport const Select = ({ className, dark, onKeyDown, onMouseDown, size, ref, ...props }: SelectProps) => {\n return (\n <select\n className={clsx('bi-input', className)}\n data-dark={dark}\n data-size={size}\n ref={ref}\n onKeyDown={(event) => {\n if (event.key === 'Tab') return;\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onKeyDown?.(event);\n }}\n onMouseDown={(event) => {\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onMouseDown?.(event);\n }}\n {...props}\n />\n );\n};\n"],"mappings":";;;;AAmBA,MAAa,SAAS,CAAC,EAAE,WAAW,MAAM,WAAW,aAAa,MAAM,IAAK,GAAG,OAAoB,KAAK;AACvG,wBACE,IAAC;EACC,WAAW,KAAK,YAAY,UAAU;EACtC,aAAW;EACX,aAAW;EACN;EACL,WAAW,CAAC,UAAU;AACpB,OAAI,MAAM,QAAQ,MAAO;AACzB,OAAI,MAAM,SAAU,OAAM,gBAAgB;AAC1C,eAAY,MAAM;EACnB;EACD,aAAa,CAAC,UAAU;AACtB,OAAI,MAAM,SAAU,OAAM,gBAAgB;AAC1C,iBAAc,MAAM;EACrB;EACD,GAAI;GACJ;AAEL"}
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/select/select-optgroup.tsx
|
|
5
|
+
const SelectOptgroup = ({ asChild, ref,...props }) => {
|
|
6
|
+
const Component = asChild ? Slot : "optgroup";
|
|
7
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
8
|
+
...props,
|
|
9
|
+
ref
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SelectOptgroup };
|
|
15
|
+
//# sourceMappingURL=select-optgroup-CTxTrNuW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-optgroup-CTxTrNuW.js","names":[],"sources":["../src/components/select/select-optgroup.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptgroupHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptgroupProps = MergeRight<\n AsChildProps & OptgroupHTMLAttributes<HTMLOptGroupElement>,\n {\n ref?: Ref<HTMLOptGroupElement>;\n }\n>;\n\nexport const SelectOptgroup = ({ asChild, ref, ...props }: SelectOptgroupProps) => {\n const Component = asChild ? Slot : 'optgroup';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;;AAYA,MAAa,iBAAiB,CAAC,EAAE,SAAS,IAAK,GAAG,OAA4B,KAAK;CACjF,MAAM,YAAY,UAAU,OAAO;AACnC,wBAAO,IAAC;EAAU,GAAI;EAAY;GAAO;AAC1C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/select/select-option.tsx
|
|
5
|
+
const SelectOption = ({ asChild, ref,...props }) => {
|
|
6
|
+
const Component = asChild ? Slot : "option";
|
|
7
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
8
|
+
...props,
|
|
9
|
+
ref
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SelectOption };
|
|
15
|
+
//# sourceMappingURL=select-option-StqAJ3Zw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-option-StqAJ3Zw.js","names":[],"sources":["../src/components/select/select-option.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptionHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptionProps = MergeRight<\n AsChildProps & OptionHTMLAttributes<HTMLOptionElement>,\n {\n ref?: Ref<HTMLOptionElement>;\n }\n>;\n\nexport const SelectOption = ({ asChild, ref, ...props }: SelectOptionProps) => {\n const Component = asChild ? Slot : 'option';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;;AAYA,MAAa,eAAe,CAAC,EAAE,SAAS,IAAK,GAAG,OAA0B,KAAK;CAC7E,MAAM,YAAY,UAAU,OAAO;AACnC,wBAAO,IAAC;EAAU,GAAI;EAAY;GAAO;AAC1C"}
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx/lite";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/spinner/spinner.tsx
|
|
5
|
+
const Spinner = ({ color = "inherit", size, className, ref,...props }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("span", {
|
|
7
|
+
className: clsx("bi-spinner", className),
|
|
8
|
+
"data-size": size,
|
|
9
|
+
"data-color": color,
|
|
10
|
+
ref,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Spinner };
|
|
17
|
+
//# sourceMappingURL=spinner-Ch5bEQBR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner-Ch5bEQBR.js","names":[],"sources":["../src/components/spinner/spinner.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SpinnerProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * The color of the spinner.\n * @default 'inherit'\n */\n color?: 'inherit' | 'black';\n /**\n * The size of the spinner.\n * It sets the font-size as the width and height is `1em`. If not set, the spinner will inherit the font size of its parent.\n */\n size?: 'small' | 'medium' | 'large' | 'xl' | '2xl';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Spinner = ({ color = 'inherit', size, className, ref, ...props }: SpinnerProps) => {\n return <span className={clsx('bi-spinner', className)} data-size={size} data-color={color} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAsBA,MAAa,UAAU,CAAC,EAAE,QAAQ,WAAW,MAAM,WAAW,IAAK,GAAG,OAAqB,KAAK;AAC9F,wBAAO,IAAC;EAAK,WAAW,KAAK,cAAc,UAAU;EAAE,aAAW;EAAM,cAAY;EAAY;EAAK,GAAI;GAAS;AACnH"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Button } from "./button-fhd-JARc.js";
|
|
2
|
+
import clsx from "clsx/lite";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Trigger } from "@radix-ui/react-tabs";
|
|
5
|
+
|
|
6
|
+
//#region src/components/tabs/tab.tsx
|
|
7
|
+
const Tab = ({ className, value, disabled, children, asChild, dark, ref,...props }) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(Trigger, {
|
|
9
|
+
value,
|
|
10
|
+
disabled,
|
|
11
|
+
asChild: true,
|
|
12
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
13
|
+
ref,
|
|
14
|
+
variant: "text",
|
|
15
|
+
className: clsx("bi-tabs--tab", className),
|
|
16
|
+
disabled,
|
|
17
|
+
asChild,
|
|
18
|
+
dark,
|
|
19
|
+
...props,
|
|
20
|
+
children
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Tab };
|
|
27
|
+
//# sourceMappingURL=tab-B36MUojE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-B36MUojE.js","names":[],"sources":["../src/components/tabs/tab.tsx"],"sourcesContent":["import type { MergeRight } from '../../utilities';\nimport { Trigger } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\nimport { Button, ButtonProps } from '../button';\n\nexport type TabProps = MergeRight<\n Omit<ButtonProps, 'variant' | 'type'>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n /**\n * When true, prevents the user from interacting with the tab.\n * @default false\n */\n disabled?: boolean;\n }\n>;\n\nexport const Tab = ({ className, value, disabled, children, asChild, dark, ref, ...props }: TabProps) => {\n return (\n <Trigger value={value} disabled={disabled} asChild>\n <Button\n ref={ref}\n variant='text'\n className={clsx('bi-tabs--tab', className)}\n disabled={disabled}\n asChild={asChild}\n dark={dark}\n {...props}\n >\n {children}\n </Button>\n </Trigger>\n );\n};\n"],"mappings":";;;;;;AAkBA,MAAa,MAAM,CAAC,EAAE,WAAW,OAAO,UAAU,UAAU,SAAS,MAAM,IAAK,GAAG,OAAiB,KAAK;AACvG,wBACE,IAAC;EAAe;EAAiB;EAAU;4BACzC,IAAC;GACM;GACL,SAAQ;GACR,WAAW,KAAK,gBAAgB,UAAU;GAChC;GACD;GACH;GACN,GAAI;GAEH;IACM;GACD;AAEb"}
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import clsx from "clsx/lite";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Root } from "@radix-ui/react-tabs";
|
|
4
|
+
|
|
5
|
+
//#region src/components/tabs/tabs.tsx
|
|
6
|
+
const Tabs = ({ activationMode = "automatic", orientation = "horizontal", defaultValue, value, onChange, children, className, asChild, dark, ref,...props }) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(Root, {
|
|
8
|
+
className: clsx("bi-tabs", className),
|
|
9
|
+
activationMode,
|
|
10
|
+
orientation,
|
|
11
|
+
defaultValue,
|
|
12
|
+
value,
|
|
13
|
+
onValueChange: onChange,
|
|
14
|
+
asChild,
|
|
15
|
+
"data-dark": dark,
|
|
16
|
+
ref,
|
|
17
|
+
...props,
|
|
18
|
+
children
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Tabs };
|
|
24
|
+
//# sourceMappingURL=tabs-D37c_qi5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs-D37c_qi5.js","names":[],"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Root } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `automatic`, tabs are activated when receiving focus. When `manual`, tabs are activated when clicked.\n * @default 'automatic'\n */\n activationMode?: 'manual' | 'automatic';\n /**\n * The orientation of the component.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /** The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. */\n defaultValue?: string;\n /** The controlled value of the tab to activate. Should be used together with `onChange`. */\n value?: string;\n /** Event handler called when the value changes. */\n onChange?: (value: string) => void;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const Tabs = ({\n activationMode = 'automatic',\n orientation = 'horizontal',\n defaultValue,\n value,\n onChange,\n children,\n className,\n asChild,\n dark,\n ref,\n ...props\n}: TabsProps) => {\n return (\n <Root\n className={clsx('bi-tabs', className)}\n activationMode={activationMode}\n orientation={orientation}\n defaultValue={defaultValue}\n value={value}\n onValueChange={onChange}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Root>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,OAAO,CAAC,EACnB,iBAAiB,aACjB,cAAc,cACd,cACA,OACA,UACA,UACA,WACA,SACA,MACA,IACA,GAAG,OACO,KAAK;AACf,wBACE,IAAC;EACC,WAAW,KAAK,WAAW,UAAU;EACrB;EACH;EACC;EACP;EACP,eAAe;EACN;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACI;AAEV"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import clsx from "clsx/lite";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { List } from "@radix-ui/react-tabs";
|
|
4
|
+
|
|
5
|
+
//#region src/components/tabs/tabs-list.tsx
|
|
6
|
+
const TabsList = ({ className, loop = true, children, asChild, dark, ref,...props }) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(List, {
|
|
8
|
+
className: clsx("bi-tabs--list", className),
|
|
9
|
+
loop,
|
|
10
|
+
asChild,
|
|
11
|
+
"data-dark": dark,
|
|
12
|
+
ref,
|
|
13
|
+
...props,
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { TabsList };
|
|
20
|
+
//# sourceMappingURL=tabs-list-CYproOp6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs-list-CYproOp6.js","names":[],"sources":["../src/components/tabs/tabs-list.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { List } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsListProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `true`, keyboard navigation will loop from last tab to first, and vice versa.\n * @default true\n */\n loop?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const TabsList = ({ className, loop = true, children, asChild, dark, ref, ...props }: TabsListProps) => {\n return (\n <List\n className={clsx('bi-tabs--list', className)}\n loop={loop}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </List>\n );\n};\n"],"mappings":";;;;;AAuBA,MAAa,WAAW,CAAC,EAAE,WAAW,OAAO,MAAM,UAAU,SAAS,MAAM,IAAK,GAAG,OAAsB,KAAK;AAC7G,wBACE,IAAC;EACC,WAAW,KAAK,iBAAiB,UAAU;EACrC;EACG;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACI;AAEV"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import clsx from "clsx/lite";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Content } from "@radix-ui/react-tabs";
|
|
4
|
+
|
|
5
|
+
//#region src/components/tabs/tabs-panel.tsx
|
|
6
|
+
const TabsPanel = ({ className, value, forceMount, children, asChild, dark, ref,...props }) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(Content, {
|
|
8
|
+
className: clsx("bi-tabs--panel", className),
|
|
9
|
+
value,
|
|
10
|
+
forceMount: forceMount || void 0,
|
|
11
|
+
asChild,
|
|
12
|
+
"data-dark": dark,
|
|
13
|
+
ref,
|
|
14
|
+
...props,
|
|
15
|
+
children
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { TabsPanel };
|
|
21
|
+
//# sourceMappingURL=tabs-panel-Bh9fqG1R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs-panel-Bh9fqG1R.js","names":[],"sources":["../src/components/tabs/tabs-panel.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Content } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsPanelProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /** A unique value that associates the content with a trigger. */\n value: string;\n /** Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. */\n forceMount?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const TabsPanel = ({ className, value, forceMount, children, asChild, dark, ref, ...props }: TabsPanelProps) => {\n return (\n <Content\n className={clsx('bi-tabs--panel', className)}\n value={value}\n forceMount={forceMount || undefined}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Content>\n );\n};\n"],"mappings":";;;;;AAsBA,MAAa,YAAY,CAAC,EAAE,WAAW,OAAO,YAAY,UAAU,SAAS,MAAM,IAAK,GAAG,OAAuB,KAAK;AACrH,wBACE,IAAC;EACC,WAAW,KAAK,kBAAkB,UAAU;EACrC;EACP,YAAY;EACH;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACO;AAEb"}
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import clsx from "clsx/lite";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/textarea/textarea.tsx
|
|
5
|
+
const Textarea = ({ className, dark, size, ref,...props }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
7
|
+
className: clsx("bi-input", className),
|
|
8
|
+
"data-dark": dark,
|
|
9
|
+
"data-size": size,
|
|
10
|
+
ref,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Textarea };
|
|
17
|
+
//# sourceMappingURL=textarea-D6dY1eRh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea-D6dY1eRh.js","names":[],"sources":["../src/components/textarea/textarea.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, TextareaHTMLAttributes } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type TextareaProps = MergeRight<\n DefaultProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'>,\n {\n /**\n * Size of the textarea.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n ref?: Ref<HTMLTextAreaElement>;\n }\n>;\n\nexport const Textarea = ({ className, dark, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-dark={dark} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAiBA,MAAa,WAAW,CAAC,EAAE,WAAW,MAAM,MAAM,IAAK,GAAG,OAAsB,KAAK;AACnF,wBAAO,IAAC;EAAS,WAAW,KAAK,YAAY,UAAU;EAAE,aAAW;EAAM,aAAW;EAAW;EAAK,GAAI;GAAS;AACnH"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Field } from "./field-U2SN9jkp.js";
|
|
2
|
+
import { FieldDescription } from "./field-description-Dhm1VA08.js";
|
|
3
|
+
import { FieldAffix, FieldAffixes } from "./field-affix-npc6m7XL.js";
|
|
4
|
+
import { Input } from "./input-Dr7BnTyd.js";
|
|
5
|
+
import { Label } from "./label-DUzvAx-T.js";
|
|
6
|
+
import { Textarea } from "./textarea-D6dY1eRh.js";
|
|
7
|
+
import { ValidationMessage } from "./validation-message-C1f_XsoD.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { useId } from "react";
|
|
10
|
+
|
|
11
|
+
//#region src/components/textfield/textfield.tsx
|
|
12
|
+
const Textfield = ({ dark, label, description, error, multiline, prefix, suffix, style, className, ref, id: idProp, "aria-describedby": ariaDescribedByProp,...props }) => {
|
|
13
|
+
const generatedId = useId();
|
|
14
|
+
const descriptionId = useId();
|
|
15
|
+
const validationId = useId();
|
|
16
|
+
const id = idProp || generatedId;
|
|
17
|
+
const ariaDescribedBy = [
|
|
18
|
+
description ? descriptionId : "",
|
|
19
|
+
error ? validationId : "",
|
|
20
|
+
ariaDescribedByProp
|
|
21
|
+
].join(" ").trim() || void 0;
|
|
22
|
+
return /* @__PURE__ */ jsxs(Field, {
|
|
23
|
+
className,
|
|
24
|
+
"data-dark": dark,
|
|
25
|
+
style,
|
|
26
|
+
children: [
|
|
27
|
+
label && /* @__PURE__ */ jsx(Label, {
|
|
28
|
+
htmlFor: id,
|
|
29
|
+
children: label
|
|
30
|
+
}),
|
|
31
|
+
description && /* @__PURE__ */ jsx(FieldDescription, {
|
|
32
|
+
id: descriptionId,
|
|
33
|
+
children: description
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ jsxs(FieldAffixes, { children: [
|
|
36
|
+
prefix && /* @__PURE__ */ jsx(FieldAffix, { children: prefix }),
|
|
37
|
+
multiline ? /* @__PURE__ */ jsx(Textarea, {
|
|
38
|
+
id,
|
|
39
|
+
ref,
|
|
40
|
+
"aria-invalid": Boolean(error) || void 0,
|
|
41
|
+
"aria-describedby": ariaDescribedBy,
|
|
42
|
+
...props
|
|
43
|
+
}) : /* @__PURE__ */ jsx(Input, {
|
|
44
|
+
id,
|
|
45
|
+
ref,
|
|
46
|
+
"aria-invalid": Boolean(error) || void 0,
|
|
47
|
+
"aria-describedby": ariaDescribedBy,
|
|
48
|
+
...props
|
|
49
|
+
}),
|
|
50
|
+
suffix && /* @__PURE__ */ jsx(FieldAffix, { children: suffix })
|
|
51
|
+
] }),
|
|
52
|
+
!!error && /* @__PURE__ */ jsx(ValidationMessage, {
|
|
53
|
+
id: validationId,
|
|
54
|
+
children: error
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Textfield };
|
|
62
|
+
//# sourceMappingURL=textfield-BTogEiz_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textfield-BTogEiz_.js","names":[],"sources":["../src/components/textfield/textfield.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { DefaultProps, LabelRequiredProps } from '../../types';\nimport { Field, FieldAffix, FieldAffixes, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\nimport { Textarea, type TextareaProps } from '../textarea';\nimport { ValidationMessage } from '../validation-message';\n\ntype InputPropsFiltered = Omit<InputProps, 'prefix' | 'className' | 'style'>;\ntype TextareaPropsFiltered = Omit<TextareaProps, 'prefix' | 'className' | 'style'>;\n\ntype BaseTextfieldProps = LabelRequiredProps &\n DefaultProps & {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Prefix */\n prefix?: string;\n /** Suffix */\n suffix?: string;\n /** Error message for field */\n error?: ReactNode;\n /** `className` for the `Field` element */\n className?: InputProps['className'];\n /** `style` for the `Field` element */\n style?: InputProps['style'];\n };\n\ntype TextfieldTextareaProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline: true;\n} & TextareaPropsFiltered;\n\ntype TextfieldInputProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline?: never | false;\n} & InputPropsFiltered;\n\nexport type TextfieldProps = BaseTextfieldProps &\n // We use either Textarea or Input props, depending on the `multiline` prop.\n (TextfieldTextareaProps | TextfieldInputProps) & {\n ref?: Ref<HTMLInputElement | HTMLTextAreaElement>;\n };\n\nexport const Textfield = ({\n dark,\n label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n ref,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: TextfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-dark={dark} style={style}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <FieldAffixes>\n {prefix && <FieldAffix>{prefix}</FieldAffix>}\n {multiline ? (\n <Textarea\n id={id}\n ref={ref as Ref<HTMLTextAreaElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as TextareaPropsFiltered)}\n />\n ) : (\n <Input\n id={id}\n ref={ref as Ref<HTMLInputElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as InputPropsFiltered)}\n />\n )}\n {suffix && <FieldAffix>{suffix}</FieldAffix>}\n </FieldAffixes>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;AA8CA,MAAa,YAAY,CAAC,EACxB,MACA,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,OACY,KAAK;CACpB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;CAAoB,EAAC,KAAK,IAAI,CAAC,MAAM;AACrG,wBACE,KAAC;EAAiB;EAAW,aAAW;EAAa;;GAClD,yBAAS,IAAC;IAAM,SAAS;cAAK;KAAc;GAC5C,+BAAe,IAAC;IAAiB,IAAI;cAAgB;KAA+B;mBACrF,KAAC;IACE,0BAAU,IAAC,wBAAY,SAAoB;IAC3C,4BACC,IAAC;KACK;KACC;KACL,gBAAc,QAAQ,MAAM;KAC5B,oBAAkB;KAClB,GAAK;MACL,mBAEF,IAAC;KACK;KACC;KACL,gBAAc,QAAQ,MAAM;KAC5B,oBAAkB;KAClB,GAAK;MACL;IAEH,0BAAU,IAAC,wBAAY,SAAoB;OAC/B;KACZ,yBAAS,IAAC;IAAkB,IAAI;cAAe;KAA0B;;GACtE;AAEX"}
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/types.d.ts
|
|
4
|
+
type DefaultProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Is the component displayed on a dark background.
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
dark?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type AsChildProps = {
|
|
12
|
+
/**
|
|
13
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
};
|
|
18
|
+
/** Ensure that some kind of label always is present. */
|
|
19
|
+
type LabelRequiredProps = {
|
|
20
|
+
'aria-label': string;
|
|
21
|
+
'aria-labelledby'?: never;
|
|
22
|
+
label?: never;
|
|
23
|
+
} | {
|
|
24
|
+
'aria-label'?: never;
|
|
25
|
+
'aria-labelledby'?: never;
|
|
26
|
+
label: ReactNode;
|
|
27
|
+
} | {
|
|
28
|
+
'aria-label'?: never;
|
|
29
|
+
'aria-labelledby': string;
|
|
30
|
+
label?: never;
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { AsChildProps, DefaultProps, LabelRequiredProps };
|
|
34
|
+
//# sourceMappingURL=types-CaBoIvtz.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/utilities/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Create a new type with the properties of the first type merged with the properties of the second type.
|
|
4
|
+
* If a key exists in both types, the property from the *second* type will be used.
|
|
5
|
+
*/
|
|
6
|
+
type MergeRight<T1, T2> = Omit<T1, keyof T2> & T2;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { MergeRight };
|
|
9
|
+
//# sourceMappingURL=types-DUx4Pkhy.d.ts.map
|
package/dist/types.d.ts
ADDED
package/dist/types.js
ADDED
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts
|
|
4
|
+
declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { useIsomorphicLayoutEffect };
|
|
7
|
+
//# sourceMappingURL=useIsomorphicLayoutEffect-BJo3l8ol.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useEffect, useLayoutEffect } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts
|
|
4
|
+
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { useIsomorphicLayoutEffect };
|
|
8
|
+
//# sourceMappingURL=useIsomorphicLayoutEffect-DCaf_yI4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsomorphicLayoutEffect-DCaf_yI4.js","names":[],"sources":["../src/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts"],"sourcesContent":["// https://usehooks-ts.com/react-hook/use-isomorphic-layout-effect\n\nimport { useEffect, useLayoutEffect } from 'react';\n\nexport const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n"],"mappings":";;;AAIA,MAAa,mCAAmC,WAAW,cAAc,kBAAkB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Ref, RefCallback } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/utilities/hooks/useMergeRefs/useMergeRefs.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Merges an array of refs into a single memoized callback ref or `null`.
|
|
7
|
+
*/
|
|
8
|
+
declare function useMergeRefs<Instance>(refs: Array<Ref<Instance> | undefined>): null | RefCallback<Instance>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useMergeRefs };
|
|
11
|
+
//# sourceMappingURL=useMergeRefs-CGbb4u_J.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useCallback, useMemo, useRef } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/utilities/hooks/useMergeRefs/useMergeRefs.ts
|
|
4
|
+
/**
|
|
5
|
+
* Merges an array of refs into a single memoized callback ref or `null`.
|
|
6
|
+
*/
|
|
7
|
+
function useMergeRefs(refs) {
|
|
8
|
+
const cleanupRef = useRef(void 0);
|
|
9
|
+
const refEffect = useCallback((instance) => {
|
|
10
|
+
const cleanups = refs.map((ref) => {
|
|
11
|
+
if (ref == null) return;
|
|
12
|
+
if (typeof ref === "function") {
|
|
13
|
+
const refCallback = ref;
|
|
14
|
+
const refCleanup = refCallback(instance);
|
|
15
|
+
return typeof refCleanup === "function" ? refCleanup : () => {
|
|
16
|
+
refCallback(null);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
ref.current = instance;
|
|
20
|
+
return () => {
|
|
21
|
+
ref.current = null;
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
return () => {
|
|
25
|
+
for (const refCleanup of cleanups) refCleanup?.();
|
|
26
|
+
};
|
|
27
|
+
}, refs);
|
|
28
|
+
return useMemo(() => {
|
|
29
|
+
if (refs.every((ref) => ref == null)) return null;
|
|
30
|
+
return (value) => {
|
|
31
|
+
if (cleanupRef.current) {
|
|
32
|
+
cleanupRef.current();
|
|
33
|
+
cleanupRef.current = void 0;
|
|
34
|
+
}
|
|
35
|
+
if (value != null) cleanupRef.current = refEffect(value);
|
|
36
|
+
};
|
|
37
|
+
}, refs);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { useMergeRefs };
|
|
42
|
+
//# sourceMappingURL=useMergeRefs-Cz-t7gpp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMergeRefs-Cz-t7gpp.js","names":["refs: Array<Ref<Instance> | undefined>","instance: Instance | null","refCleanup: void | (() => void)"],"sources":["../src/utilities/hooks/useMergeRefs/useMergeRefs.ts"],"sourcesContent":["// https://github.com/floating-ui/floating-ui/blob/master/packages/react/src/hooks/useMergeRefs.ts\nimport { useCallback, useMemo, useRef } from 'react';\nimport type { Ref, RefCallback, RefObject } from 'react';\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n */\nexport function useMergeRefs<Instance>(refs: Array<Ref<Instance> | undefined>): null | RefCallback<Instance> {\n const cleanupRef = useRef<undefined | (() => void)>(undefined);\n\n const refEffect = useCallback((instance: Instance | null) => {\n const cleanups = refs.map((ref) => {\n if (ref == null) {\n return;\n }\n\n if (typeof ref === 'function') {\n const refCallback = ref;\n // biome-ignore lint/suspicious/noConfusingVoidType: @types-react wants `void` here\n const refCleanup: void | (() => void) = refCallback(instance);\n return typeof refCleanup === 'function'\n ? refCleanup\n : () => {\n refCallback(null);\n };\n }\n\n (ref as RefObject<Instance | null>).current = instance;\n return () => {\n (ref as RefObject<Instance | null>).current = null;\n };\n });\n\n return () => {\n for (const refCleanup of cleanups) {\n refCleanup?.();\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n\n return useMemo(() => {\n if (refs.every((ref) => ref == null)) {\n return null;\n }\n\n return (value) => {\n if (cleanupRef.current) {\n cleanupRef.current();\n (cleanupRef as RefObject<undefined | (() => void)>).current = undefined;\n }\n\n if (value != null) {\n (cleanupRef as RefObject<undefined | (() => void)>).current = refEffect(value);\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}\n"],"mappings":";;;;;;AAOA,SAAgB,aAAuBA,MAAsE;CAC3G,MAAM,aAAa,cAA2C;CAE9D,MAAM,YAAY,YAAY,CAACC,aAA8B;EAC3D,MAAM,WAAW,KAAK,IAAI,CAAC,QAAQ;AACjC,OAAI,OAAO,KACT;AAGF,cAAW,QAAQ,YAAY;IAC7B,MAAM,cAAc;IAEpB,MAAMC,aAAkC,YAAY,SAAS;AAC7D,kBAAc,eAAe,aACzB,aACA,MAAM;AACJ,iBAAY,KAAK;IAClB;GACN;AAED,GAAC,IAAmC,UAAU;AAC9C,UAAO,MAAM;AACX,IAAC,IAAmC,UAAU;GAC/C;EACF,EAAC;AAEF,SAAO,MAAM;AACX,QAAK,MAAM,cAAc,SACvB,eAAc;EAEjB;CAEF,GAAE,KAAK;AAER,QAAO,QAAQ,MAAM;AACnB,MAAI,KAAK,MAAM,CAAC,QAAQ,OAAO,KAAK,CAClC,QAAO;AAGT,SAAO,CAAC,UAAU;AAChB,OAAI,WAAW,SAAS;AACtB,eAAW,SAAS;AACpB,IAAC,WAAmD;GACrD;AAED,OAAI,SAAS,KACX,CAAC,WAAmD,UAAU,UAAU,MAAM;EAEjF;CAEF,GAAE,KAAK;AACT"}
|