@bi-digital/react 0.2.23 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert-BubQTdmN.js +1 -0
- package/dist/{alert-B0SyUQVj.js → alert-C6PxDwHt.js} +6 -6
- package/dist/alert-C6PxDwHt.js.map +1 -0
- package/dist/{alert-footer-Cqr42-cW.d.ts → alert-footer-BS7TXc1g.d.ts} +98 -130
- package/dist/alert-footer-DL4rCThp.js.map +1 -1
- package/dist/avatar-6Q2xwviO.js.map +1 -1
- package/dist/avatar-CCnUOGHD.js +1 -0
- package/dist/badge-0qk6AKns.js +1 -0
- package/dist/badge-D9OVAKG8.js.map +1 -1
- package/dist/button-Mlhn5A3s.js +1 -0
- package/dist/button-fhd-JARc.js.map +1 -1
- package/dist/card-CqLWeJx_.js +1 -0
- package/dist/card-QAnFhTk6.js.map +1 -1
- package/dist/card-action-D8M3_IVq.js.map +1 -1
- package/dist/card-actions-CIsnmxsm.js.map +1 -1
- package/dist/card-content-DkEHp8mv.js.map +1 -1
- package/dist/card-date-Bd87BGDE.js.map +1 -1
- package/dist/card-header-D-RMd4xS.js.map +1 -1
- package/dist/card-media-DhU2_Ueq.js.map +1 -1
- package/dist/checkbox-CKGFJHNX.js +1 -0
- package/dist/checkbox-ZR1Z2PCF.js.map +1 -1
- package/dist/checkbox-subsection-BPe5aj-W.js.map +1 -1
- package/dist/chip-DP9-RTOH.js +1 -0
- package/dist/chip-b9xUiF7_.js.map +1 -1
- package/dist/components/alert/alert-footer.d.ts +17 -17
- package/dist/components/alert/alert.d.ts +17 -17
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/alert/index.d.ts +17 -17
- package/dist/components/alert/index.js +2 -2
- package/dist/components/avatar/avatar.d.ts +17 -17
- package/dist/components/avatar/index.d.ts +17 -17
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/badge/badge.d.ts +17 -17
- package/dist/components/badge/index.d.ts +17 -17
- package/dist/components/badge/index.js +1 -1
- package/dist/components/button/button.d.ts +17 -17
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/index.d.ts +17 -17
- package/dist/components/button/index.js +2 -2
- package/dist/components/card/card-action.d.ts +17 -17
- package/dist/components/card/card-action.js +2 -2
- package/dist/components/card/card-actions.d.ts +17 -17
- package/dist/components/card/card-content.d.ts +17 -17
- package/dist/components/card/card-date.d.ts +17 -17
- package/dist/components/card/card-header.d.ts +17 -17
- package/dist/components/card/card-media.d.ts +17 -17
- package/dist/components/card/card.d.ts +17 -17
- package/dist/components/card/index.d.ts +17 -17
- package/dist/components/card/index.js +3 -3
- package/dist/components/checkbox/checkbox-subsection.d.ts +17 -17
- package/dist/components/checkbox/checkbox.d.ts +17 -17
- package/dist/components/checkbox/checkbox.js +3 -3
- package/dist/components/checkbox/index.d.ts +17 -17
- package/dist/components/checkbox/index.js +4 -4
- package/dist/components/chip/chip.d.ts +17 -17
- package/dist/components/chip/index.d.ts +17 -17
- package/dist/components/chip/index.js +1 -1
- package/dist/components/dialog/dialog-close-button.d.ts +17 -17
- package/dist/components/dialog/dialog-close-button.js +3 -3
- package/dist/components/dialog/dialog-content.d.ts +17 -17
- package/dist/components/dialog/dialog-footer.d.ts +17 -17
- package/dist/components/dialog/dialog-header.d.ts +17 -17
- package/dist/components/dialog/dialog-trigger-context.d.ts +1 -1
- package/dist/components/dialog/dialog-trigger.d.ts +17 -17
- package/dist/components/dialog/dialog-trigger.js +2 -2
- package/dist/components/dialog/dialog.d.ts +17 -17
- package/dist/components/dialog/index.d.ts +17 -17
- package/dist/components/dialog/index.js +4 -4
- package/dist/components/drawer/drawer-close-button.d.ts +17 -17
- package/dist/components/drawer/drawer-close-button.js +5 -5
- package/dist/components/drawer/drawer-content.d.ts +17 -17
- package/dist/components/drawer/drawer-content.js +4 -4
- package/dist/components/drawer/drawer-footer.d.ts +17 -17
- package/dist/components/drawer/drawer-footer.js +4 -4
- package/dist/components/drawer/drawer-header.d.ts +17 -17
- package/dist/components/drawer/drawer-header.js +4 -4
- package/dist/components/drawer/drawer-trigger-context.d.ts +1 -1
- package/dist/components/drawer/drawer-trigger-context.js +4 -4
- package/dist/components/drawer/drawer-trigger.d.ts +17 -17
- package/dist/components/drawer/drawer-trigger.js +4 -4
- package/dist/components/drawer/drawer.d.ts +17 -17
- package/dist/components/drawer/drawer.js +4 -4
- package/dist/components/drawer/index.d.ts +17 -17
- package/dist/components/drawer/index.js +6 -6
- package/dist/components/dropdown/dropdown-button.d.ts +17 -17
- package/dist/components/dropdown/dropdown-button.js +2 -2
- package/dist/components/dropdown/dropdown-item.d.ts +1 -1
- package/dist/components/dropdown/dropdown-list.d.ts +1 -1
- package/dist/components/dropdown/dropdown-trigger-context.d.ts +17 -17
- package/dist/components/dropdown/dropdown-trigger-context.js +3 -3
- package/dist/components/dropdown/dropdown-trigger.d.ts +17 -17
- package/dist/components/dropdown/dropdown-trigger.js +3 -3
- package/dist/components/dropdown/dropdown.d.ts +17 -17
- package/dist/components/dropdown/dropdown.js +3 -3
- package/dist/components/dropdown/index.d.ts +17 -17
- package/dist/components/dropdown/index.js +4 -4
- package/dist/components/field/field-affix.d.ts +17 -17
- package/dist/components/field/field-description.d.ts +17 -17
- package/dist/components/field/field.d.ts +17 -17
- package/dist/components/field/index.d.ts +17 -17
- package/dist/components/field/index.js +1 -1
- package/dist/components/fieldset/fieldset-description.d.ts +17 -17
- package/dist/components/fieldset/fieldset-legend.d.ts +17 -17
- package/dist/components/fieldset/fieldset-legend.js +1 -1
- package/dist/components/fieldset/fieldset.d.ts +17 -17
- package/dist/components/fieldset/index.d.ts +17 -17
- package/dist/components/fieldset/index.js +2 -2
- package/dist/components/filter-group/filter-group.d.ts +17 -17
- package/dist/components/filter-group/filter-group.js +1 -1
- package/dist/components/filter-group/index.d.ts +17 -17
- package/dist/components/filter-group/index.js +2 -2
- package/dist/components/footer/footer-links.d.ts +1 -1
- package/dist/components/footer/footer.d.ts +17 -17
- package/dist/components/footer/footer.js +3 -3
- package/dist/components/footer/index.d.ts +17 -17
- package/dist/components/footer/index.js +4 -4
- package/dist/components/index.d.ts +18 -18
- package/dist/components/index.js +51 -49
- package/dist/components/input/index.d.ts +17 -17
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/input.d.ts +17 -17
- package/dist/components/label/index.d.ts +17 -17
- package/dist/components/label/index.js +1 -1
- package/dist/components/label/label.d.ts +17 -17
- package/dist/components/link/index.d.ts +17 -17
- package/dist/components/link/index.js +1 -1
- package/dist/components/link/link.d.ts +17 -17
- package/dist/components/logo/index.d.ts +17 -17
- package/dist/components/logo/index.js +1 -1
- package/dist/components/logo/logo.d.ts +17 -17
- package/dist/components/navbar/index.d.ts +17 -17
- package/dist/components/navbar/index.js +3 -3
- package/dist/components/navbar/navbar.d.ts +17 -17
- package/dist/components/navbar/navbar.js +1 -1
- package/dist/components/navbar/sub-navbar.d.ts +17 -17
- package/dist/components/navbar/sub-navbar.js +1 -1
- package/dist/components/pagination/index.d.ts +17 -17
- package/dist/components/pagination/index.js +3 -3
- package/dist/components/pagination/pagination-button.d.ts +17 -17
- package/dist/components/pagination/pagination-button.js +2 -2
- package/dist/components/pagination/pagination-item.d.ts +1 -1
- package/dist/components/pagination/pagination.d.ts +17 -17
- package/dist/components/popover/index.d.ts +17 -17
- package/dist/components/popover/index.js +3 -3
- package/dist/components/popover/popover-trigger-context.d.ts +1 -1
- package/dist/components/popover/popover-trigger.d.ts +17 -17
- package/dist/components/popover/popover-trigger.js +2 -2
- package/dist/components/popover/popover.d.ts +17 -17
- package/dist/components/radio/index.d.ts +17 -17
- package/dist/components/radio/index.js +4 -4
- package/dist/components/radio/radio.d.ts +17 -17
- package/dist/components/radio/radio.js +3 -3
- package/dist/components/search/index.d.ts +17 -17
- package/dist/components/search/index.js +6 -6
- package/dist/components/search/search.d.ts +17 -17
- package/dist/components/search/search.js +5 -5
- package/dist/components/select/index.d.ts +17 -17
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select-optgroup.d.ts +17 -17
- package/dist/components/select/select-option.d.ts +17 -17
- package/dist/components/select/select.d.ts +17 -17
- package/dist/components/selectfield/index.d.ts +18 -0
- package/dist/components/selectfield/index.js +16 -0
- package/dist/components/selectfield/selectfield.d.ts +18 -0
- package/dist/components/selectfield/selectfield.js +15 -0
- package/dist/components/skip-link/index.d.ts +17 -17
- package/dist/components/skip-link/index.js +2 -2
- package/dist/components/skip-link/skip-link.d.ts +17 -17
- package/dist/components/skip-link/skip-link.js +1 -1
- package/dist/components/spinner/index.d.ts +17 -17
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/spinner/spinner.d.ts +17 -17
- package/dist/components/sticky-header/index.d.ts +2 -2
- package/dist/components/sticky-header/index.js +2 -2
- package/dist/components/sticky-header/sticky-header.d.ts +1 -1
- package/dist/components/sticky-header/sticky-header.js +1 -1
- package/dist/components/tabs/index.d.ts +17 -17
- package/dist/components/tabs/index.js +7 -7
- package/dist/components/tabs/tab.d.ts +17 -17
- package/dist/components/tabs/tab.js +3 -3
- package/dist/components/tabs/tabs-list.d.ts +17 -17
- package/dist/components/tabs/tabs-list.js +1 -1
- package/dist/components/tabs/tabs-panel.d.ts +17 -17
- package/dist/components/tabs/tabs-panel.js +1 -1
- package/dist/components/tabs/tabs.d.ts +17 -17
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/textarea/index.d.ts +17 -17
- package/dist/components/textarea/index.js +2 -2
- package/dist/components/textarea/textarea.d.ts +17 -17
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/textfield/index.d.ts +17 -17
- package/dist/components/textfield/index.js +9 -9
- package/dist/components/textfield/textfield.d.ts +17 -17
- package/dist/components/textfield/textfield.js +8 -8
- package/dist/components/validation-message/index.d.ts +17 -17
- package/dist/components/validation-message/index.js +2 -2
- package/dist/components/validation-message/validation-message.d.ts +17 -17
- package/dist/components/validation-message/validation-message.js +1 -1
- package/dist/components-CouSGV6e.js +1 -0
- package/dist/dialog-CbLuKrFn.js +1 -0
- package/dist/dialog-DzGRZgbP.js.map +1 -1
- package/dist/{dialog-close-button-B4zf0hvt.js → dialog-close-button-C1omdnIn.js} +3 -3
- package/dist/dialog-close-button-C1omdnIn.js.map +1 -0
- package/dist/dialog-content-R35XpbSj.js.map +1 -1
- package/dist/dialog-footer-AoiCz_Uj.js.map +1 -1
- package/dist/dialog-header-Bbq9DcHX.js.map +1 -1
- package/dist/dialog-trigger-DinHpkua.js.map +1 -1
- package/dist/dialog-trigger-context-51mA5fz3.js.map +1 -1
- package/dist/{dialog-trigger-context-DwmhJNzA.d.ts → dialog-trigger-context-ClG9UVsz.d.ts} +5 -5
- package/dist/drawer-CZ05Lizo.js.map +1 -1
- package/dist/drawer-CpPzCsLG.js +1 -0
- package/dist/{drawer-close-button-DigcuqLc.js → drawer-close-button-DC39bNW2.js} +2 -2
- package/dist/{drawer-close-button-DigcuqLc.js.map → drawer-close-button-DC39bNW2.js.map} +1 -1
- package/dist/drawer-content-CFc-rxBo.js.map +1 -1
- package/dist/drawer-footer-CfHjfvEg.js.map +1 -1
- package/dist/drawer-header-DK4XoaaW.js.map +1 -1
- package/dist/drawer-trigger-Do9Htx5M.js.map +1 -1
- package/dist/drawer-trigger-context-BUWPPdas.js.map +1 -1
- package/dist/{drawer-trigger-context-BoS9ZcVF.d.ts → drawer-trigger-context-CNBRwj7l.d.ts} +3 -3
- package/dist/dropdown-DHACQ2Vu.js +1 -0
- package/dist/{dropdown-A1PW0OoQ.js → dropdown-Fzf2CeX4.js} +2 -2
- package/dist/{dropdown-A1PW0OoQ.js.map → dropdown-Fzf2CeX4.js.map} +1 -1
- package/dist/dropdown-b7acNLZb.js.map +1 -1
- package/dist/dropdown-button-FQqIwqdp.js.map +1 -1
- package/dist/{dropdown-item-CKKjumy3.d.ts → dropdown-item-CGg_2cV1.d.ts} +3 -3
- package/dist/dropdown-item-DQQXQC4J.js.map +1 -1
- package/dist/{dropdown-list-vVhxG14z.d.ts → dropdown-list-D8szW6_q.d.ts} +3 -3
- package/dist/dropdown-list-DB1mST67.js.map +1 -1
- package/dist/dropdown-trigger-Fwrigwtg.js.map +1 -1
- package/dist/dropdown-trigger-context-BCcyoZEx.js.map +1 -1
- package/dist/field-DFMMLG-d.js.map +1 -1
- package/dist/field-affix-npc6m7XL.js.map +1 -1
- package/dist/field-description-Dhm1VA08.js.map +1 -1
- package/dist/field-rlwGWFvc.js +1 -0
- package/dist/fieldset-Bpu4CRKG.js.map +1 -1
- package/dist/fieldset-CKQ2RG9n.js +1 -0
- package/dist/fieldset-description-DiHvcLh-.js.map +1 -1
- package/dist/fieldset-legend-CR4srn2-.js.map +1 -1
- package/dist/filter-group-DfuKXzU3.js +1 -0
- package/dist/{filter-group-DMSPaCQt.js → filter-group-Fzw9g6JB.js} +3 -3
- package/dist/filter-group-Fzw9g6JB.js.map +1 -0
- package/dist/{footer-CU7LdbPO.js → footer-B9sjkncE.js} +6 -6
- package/dist/footer-B9sjkncE.js.map +1 -0
- package/dist/footer-C8UL4KnN.js +1 -0
- package/dist/footer-links-BIUrxu38.js.map +1 -1
- package/dist/{footer-links-Drm2LFnw.d.ts → footer-links-DlrXiXOi.d.ts} +3 -3
- package/dist/hooks-DLlERz_p.js +1 -0
- package/dist/{index-SaA0V19q.d.ts → index-ByVDkQOU.d.ts} +1 -1
- package/dist/{index-DV9bEW_1.d.ts → index-CG8drCYo.d.ts} +1 -1
- package/dist/index-Cv0onxlx.d.ts +1 -0
- package/dist/{index-CjnsNUdv.d.ts → index-DH_DbgNa.d.ts} +1 -1
- package/dist/input-B4bnnPvD.js +1 -0
- package/dist/input-Dr7BnTyd.js.map +1 -1
- package/dist/label-BQlLxfiz.js +1 -0
- package/dist/label-DUzvAx-T.js.map +1 -1
- package/dist/link-BqDeZAJF.js.map +1 -1
- package/dist/link-BtBX-WfP.js +1 -0
- package/dist/logo-Bj2kMgOD.js +1 -0
- package/dist/logo-QKrYvRFP.js.map +1 -1
- package/dist/main.d.ts +18 -18
- package/dist/main.js +52 -50
- package/dist/navbar-CQKFBrJr.js +1 -0
- package/dist/navbar-Dxv7GQO0.js.map +1 -1
- package/dist/pagination-COuMArW_.js +1 -0
- package/dist/pagination-DH6vZYMO.js.map +1 -1
- package/dist/pagination-button-CMSNwkeT.js.map +1 -1
- package/dist/pagination-item-DzskmZxf.js.map +1 -1
- package/dist/{pagination-item-mKQyvHV9.d.ts → pagination-item-wgtqjgnC.d.ts} +3 -3
- package/dist/popover-B1YgrDNf.js +1 -0
- package/dist/{popover-MUiGENkr.js → popover-DOMLkRA5.js} +1 -1
- package/dist/{popover-MUiGENkr.js.map → popover-DOMLkRA5.js.map} +1 -1
- package/dist/popover-DmA4qMtu.js.map +1 -1
- package/dist/popover-trigger-Chi8uvRM.js.map +1 -1
- package/dist/{popover-trigger-context-D6z-_uL5.d.ts → popover-trigger-context-8iojEYe0.d.ts} +5 -5
- package/dist/popover-trigger-context-Cre9Mczn.js.map +1 -1
- package/dist/radio-DAC5mhl3.js.map +1 -1
- package/dist/radio-rO-tWKD5.js +1 -0
- package/dist/search-Djix7Xme.js +1 -0
- package/dist/{search-DRgmqncD.js → search-DzjgrvFl.js} +6 -5
- package/dist/search-DzjgrvFl.js.map +1 -0
- package/dist/select-DcvVj8YT.js +1 -0
- package/dist/select-R87VdG5U.js.map +1 -1
- package/dist/select-optgroup-jowSQvbc.js.map +1 -1
- package/dist/select-option-WAhhr82L.js.map +1 -1
- package/dist/selectfield-BD-t6Mmm.js +53 -0
- package/dist/selectfield-BD-t6Mmm.js.map +1 -0
- package/dist/selectfield-DtSsNu0C.js +1 -0
- package/dist/{skip-link-CTmIHesZ.js → skip-link-CbdX4Taw.js} +1 -1
- package/dist/{skip-link-CTmIHesZ.js.map → skip-link-CbdX4Taw.js.map} +1 -1
- package/dist/skip-link-DHDiOrN_.js +1 -0
- package/dist/spinner-BqbijPkO.js +1 -0
- package/dist/spinner-Ch5bEQBR.js.map +1 -1
- package/dist/{sticky-header-CPHxBupp.d.ts → sticky-header-BMeHtK7e.d.ts} +3 -3
- package/dist/sticky-header-DKlpc3Eq.js +1 -0
- package/dist/{sticky-header-Dki5mPis.js → sticky-header-gE5HX2ug.js} +1 -1
- package/dist/{sticky-header-Dki5mPis.js.map → sticky-header-gE5HX2ug.js.map} +1 -1
- package/dist/{sub-navbar-qSNpTABT.js → sub-navbar-BdJ9EKsU.js} +1 -1
- package/dist/{sub-navbar-qSNpTABT.js.map → sub-navbar-BdJ9EKsU.js.map} +1 -1
- package/dist/sub-navbar-DkxQv0WJ.js.map +1 -1
- package/dist/{tab-78y6QR5H.js → tab-BvSndQZ_.js} +1 -1
- package/dist/{tab-78y6QR5H.js.map → tab-BvSndQZ_.js.map} +1 -1
- package/dist/{tabs-UA0wAjuH.js → tabs-C70z_5SJ.js} +1 -1
- package/dist/{tabs-UA0wAjuH.js.map → tabs-C70z_5SJ.js.map} +1 -1
- package/dist/tabs-CRLePQH9.js +1 -0
- package/dist/{tabs-list-BykXXSuq.js → tabs-list-npvK06bl.js} +1 -1
- package/dist/{tabs-list-BykXXSuq.js.map → tabs-list-npvK06bl.js.map} +1 -1
- package/dist/{tabs-panel-B8knWcZY.js → tabs-panel-L8HovooI.js} +1 -1
- package/dist/{tabs-panel-B8knWcZY.js.map → tabs-panel-L8HovooI.js.map} +1 -1
- package/dist/{textarea-DUqVsdL4.js → textarea-B1fAOfkt.js} +1 -1
- package/dist/{textarea-DUqVsdL4.js.map → textarea-B1fAOfkt.js.map} +1 -1
- package/dist/textarea-cP6IV0Lb.js +1 -0
- package/dist/{textfield-Di-19dz-.js → textfield-DwLkaC2S.js} +5 -4
- package/dist/textfield-DwLkaC2S.js.map +1 -0
- package/dist/textfield-s5xGjX-B.js +1 -0
- package/dist/{types-BiKqUD4X.d.ts → types-Bga-EYiy.d.ts} +1 -1
- package/dist/{types-BiXTaZLc.d.ts → types-CtaqzrVi.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -0
- package/dist/useCheckboxGroup-BDH3ewt8.js.map +1 -1
- package/dist/{useCheckboxGroup-DyHY-wHm.d.ts → useCheckboxGroup-D61FVz37.d.ts} +1 -1
- package/dist/{useIsElementAboveViewport-V1lc14eB.d.ts → useIsElementAboveViewport-C3qzTbfj.d.ts} +1 -1
- package/dist/useIsElementAboveViewport-lmdnXDdc.js.map +1 -1
- package/dist/{useIsomorphicLayoutEffect-BtM0-_Y8.d.ts → useIsomorphicLayoutEffect-DYtMRdO-.d.ts} +1 -1
- package/dist/useIsomorphicLayoutEffect-odKYwQAV.js.map +1 -1
- package/dist/{useMediaQuery-B2wgHq1a.d.ts → useMediaQuery-DYDgFKom.d.ts} +1 -1
- package/dist/useMediaQuery-ICPWsO_p.js.map +1 -1
- package/dist/useMergeRefs-DC710CHX.js.map +1 -1
- package/dist/usePagination-DQR72JNE.js.map +1 -1
- package/dist/{useScrollDirection-CDsglrZR.d.ts → useScrollDirection-BmllObvZ.d.ts} +1 -1
- package/dist/useScrollDirection-C2EmQi0U.js.map +1 -1
- package/dist/utilities/hooks/index.d.ts +17 -17
- package/dist/utilities/hooks/index.js +1 -1
- package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.d.ts +1 -1
- package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.d.ts +1 -1
- package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +1 -1
- package/dist/utilities/hooks/useMediaQuery/useMediaQuery.d.ts +1 -1
- package/dist/utilities/hooks/usePagination/usePagination.d.ts +17 -17
- package/dist/utilities/hooks/useScrollDirection/useScrollDirection.d.ts +1 -1
- package/dist/utilities/index.d.ts +17 -17
- package/dist/utilities/index.js +2 -2
- package/dist/utilities/types.d.ts +1 -1
- package/dist/utilities/types.js +1 -0
- package/dist/utilities-DanMK0XE.js +1 -0
- package/dist/{validation-message-C3CmzFMz.js → validation-message-CPGA4DxM.js} +3 -3
- package/dist/validation-message-CPGA4DxM.js.map +1 -0
- package/dist/validation-message-DHR3NN8N.js +1 -0
- package/dist/vanilla/dropdown/index.d.ts +1 -1
- package/dist/vanilla/dropdown/index.js +2 -2
- package/dist/vanilla/index.d.ts +3 -3
- package/dist/vanilla/index.js +3 -3
- package/dist/vanilla/popover/index.d.ts +1 -1
- package/dist/vanilla/popover/index.js +1 -1
- package/dist/vanilla/sub-navbar/index.d.ts +1 -1
- package/dist/vanilla/sub-navbar/index.js +1 -1
- package/dist/vite-env.d.ts +2 -1
- package/package.json +19 -19
- package/dist/alert-B0SyUQVj.js.map +0 -1
- package/dist/alert-Ch1lDSMm.js +0 -0
- package/dist/avatar-B81bChIx.js +0 -0
- package/dist/badge-uRbNhCzA.js +0 -0
- package/dist/button-vrN4Zwch.js +0 -0
- package/dist/card-BK1MS46W.js +0 -0
- package/dist/checkbox-BNKPLC2A.js +0 -0
- package/dist/chip-CotWEWjj.js +0 -0
- package/dist/components-BKbhmG9u.js +0 -0
- package/dist/dialog-CCde3DPt.js +0 -0
- package/dist/dialog-close-button-B4zf0hvt.js.map +0 -1
- package/dist/drawer-Cc670B_f.js +0 -0
- package/dist/dropdown-BecLkiCE.js +0 -0
- package/dist/field-B7y2WBzu.js +0 -0
- package/dist/fieldset-D5HSCHPA.js +0 -0
- package/dist/filter-group-C-q_L0lS.js +0 -0
- package/dist/filter-group-DMSPaCQt.js.map +0 -1
- package/dist/footer-BThmhXy7.js +0 -0
- package/dist/footer-CU7LdbPO.js.map +0 -1
- package/dist/hooks-A8EMc2jd.js +0 -0
- package/dist/index-CTw2zfCM.d.ts +0 -1
- package/dist/input-03FO9IIL.js +0 -0
- package/dist/label-nhrfSiaP.js +0 -0
- package/dist/link-oWcjwJYP.js +0 -0
- package/dist/logo-Dx-VZMJu.js +0 -0
- package/dist/navbar-CgY7xCrh.js +0 -0
- package/dist/pagination-DP8yM-lj.js +0 -0
- package/dist/popover-Ch_2ehYy.js +0 -0
- package/dist/radio-CqUVAF9T.js +0 -0
- package/dist/search-DPfMkuMX.js +0 -0
- package/dist/search-DRgmqncD.js.map +0 -1
- package/dist/select-COon86Fr.js +0 -0
- package/dist/skip-link-Cl5tUnjp.js +0 -0
- package/dist/spinner-CPiGcSIc.js +0 -0
- package/dist/sticky-header-B1bz37dV.js +0 -0
- package/dist/tabs-Gam5A0Jd.js +0 -0
- package/dist/textarea-SnVkE05Y.js +0 -0
- package/dist/textfield-Di-19dz-.js.map +0 -1
- package/dist/textfield-vutZ4Ch8.js +0 -0
- package/dist/utilities-CScrp2iY.js +0 -0
- package/dist/validation-message-C3CmzFMz.js.map +0 -1
- package/dist/validation-message-CtPYa33u.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-trigger-Chi8uvRM.js","names":[],"sources":["../src/components/popover/popover-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { type HTMLAttributes, Ref, use } from 'react';\nimport type { DefaultProps } from '../../types';\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './popover-trigger-context';\n\nexport type PopoverTriggerProps =\n | ({\n /**\n * Will render the trigger as inline text.\n * @default false\n */\n inline?: true;\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<HTMLButtonElement>;\n } & HTMLAttributes<HTMLButtonElement> &\n DefaultProps)\n | ({\n /**\n * Will not render the trigger as inline text.\n * @default false\n */\n inline?: false;\n } & ButtonProps);\n\n/**\n * PopoverTrigger component, used to trigger a popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example inline\n * <PopoverTriggerContext>\n * <Paragraph>\n * We can use it <PopoverTrigger inline={true}>inline</PopoverTrigger>.\n * </Paragraph>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const PopoverTrigger = ({ id, inline, asChild, ref, ...rest }: PopoverTriggerProps) => {\n const { popoverId, popoverOpen, setPopoverOpen } = use(Context);\n const Component = asChild ? Slot : inline ? 'button' : Button;\n\n const popoverProps = Object.assign(\n {\n onClick: () => setPopoverOpen?.((prev) => !prev),\n 'aria-controls': popoverId,\n 'aria-expanded': popoverOpen,\n ...(inline\n ? {\n 'data-popover': 'inline',\n }\n : {}),\n },\n rest,\n );\n\n return <Component ref={ref} {...popoverProps} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,iBAAiB,CAAC,EAAE,IAAI,QAAQ,SAAS,IAAK,GAAG,MAA2B,KAAK;CAC5F,MAAM,EAAE,WAAW,aAAa,gBAAgB,GAAG,IAAI,QAAQ;CAC/D,MAAM,YAAY,UAAU,OAAO,SAAS,WAAW;CAEvD,MAAM,eAAe,OAAO,OAC1B;EACE,SAAS,MAAM,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"popover-trigger-Chi8uvRM.js","names":[],"sources":["../src/components/popover/popover-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { type HTMLAttributes, Ref, use } from 'react';\nimport type { DefaultProps } from '../../types';\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './popover-trigger-context';\n\nexport type PopoverTriggerProps =\n | ({\n /**\n * Will render the trigger as inline text.\n * @default false\n */\n inline?: true;\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<HTMLButtonElement>;\n } & HTMLAttributes<HTMLButtonElement> &\n DefaultProps)\n | ({\n /**\n * Will not render the trigger as inline text.\n * @default false\n */\n inline?: false;\n } & ButtonProps);\n\n/**\n * PopoverTrigger component, used to trigger a popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example inline\n * <PopoverTriggerContext>\n * <Paragraph>\n * We can use it <PopoverTrigger inline={true}>inline</PopoverTrigger>.\n * </Paragraph>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const PopoverTrigger = ({ id, inline, asChild, ref, ...rest }: PopoverTriggerProps) => {\n const { popoverId, popoverOpen, setPopoverOpen } = use(Context);\n const Component = asChild ? Slot : inline ? 'button' : Button;\n\n const popoverProps = Object.assign(\n {\n onClick: () => setPopoverOpen?.((prev) => !prev),\n 'aria-controls': popoverId,\n 'aria-expanded': popoverOpen,\n ...(inline\n ? {\n 'data-popover': 'inline',\n }\n : {}),\n },\n rest,\n );\n\n return <Component ref={ref} {...popoverProps} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,iBAAiB,CAAC,EAAE,IAAI,QAAQ,SAAS,IAAK,GAAG,MAA2B,KAAK;CAC5F,MAAM,EAAE,WAAW,aAAa,gBAAgB,GAAG,IAAI,QAAQ;CAC/D,MAAM,YAAY,UAAU,OAAO,SAAS,WAAW;CAEvD,MAAM,eAAe,OAAO,OAC1B;EACE,SAAS,MAAM,iBAAiB,CAAC,SAAS,CAAC,KAAK;EAChD,iBAAiB;EACjB,iBAAiB;EACjB,GAAI,SACA,EACE,gBAAgB,SACjB,IACD,CAAE;CACP,GACD,KACD;AAED,4BAAQ;EAAe;EAAK,GAAI;GAAgB;AACjD"}
|
package/dist/{popover-trigger-context-D6z-_uL5.d.ts → popover-trigger-context-8iojEYe0.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime53 from "react/jsx-runtime";
|
|
2
|
+
import * as react0 from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/popover/popover-trigger-context.d.ts
|
|
6
|
-
declare const Context:
|
|
6
|
+
declare const Context: react0.Context<{
|
|
7
7
|
popoverId?: string;
|
|
8
8
|
setPopoverId?: (id: string) => void;
|
|
9
9
|
popoverOpen?: boolean;
|
|
@@ -37,7 +37,7 @@ declare const PopoverTriggerContext: ({
|
|
|
37
37
|
children,
|
|
38
38
|
open,
|
|
39
39
|
onOpenChange
|
|
40
|
-
}: PopoverTriggerContextProps) =>
|
|
40
|
+
}: PopoverTriggerContextProps) => react_jsx_runtime53.JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { Context, PopoverTriggerContext, PopoverTriggerContextProps };
|
|
43
|
-
//# sourceMappingURL=popover-trigger-context-
|
|
43
|
+
//# sourceMappingURL=popover-trigger-context-8iojEYe0.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-trigger-context-Cre9Mczn.js","names":[],"sources":["../src/components/popover/popover-trigger-context.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { createContext, useId, useState } from 'react';\nimport type { ReactNode } from 'react';\n\nexport const Context = createContext<{\n popoverId?: string;\n setPopoverId?: (id: string) => void;\n popoverOpen?: boolean;\n setPopoverOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n}>({});\n\nexport type PopoverTriggerContextProps = {\n children: ReactNode;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n};\n\n/**\n * PopoverTriggerContext component, use to wrap a PopoverTrigger and Popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\nexport const PopoverTriggerContext = ({ children, open, onOpenChange }: PopoverTriggerContextProps) => {\n const randomPopoverId = useId();\n const [popoverId, setPopoverId] = useState(randomPopoverId);\n const [popoverOpen, setPopoverOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: false,\n caller: 'PopoverTriggerContext',\n });\n\n return <Context value={{ popoverId, setPopoverId, popoverOpen, setPopoverOpen }}>{children}</Context>;\n};\n"],"mappings":";;;;;AAIA,MAAa,UAAU,cAKpB,CAAE,EAAC;;;;;;;;;;;;AA2BN,MAAa,wBAAwB,CAAC,EAAE,UAAU,MAAM,cAA0C,KAAK;CACrG,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,WAAW,aAAa,GAAG,SAAS,gBAAgB;CAC3D,MAAM,CAAC,aAAa,eAAe,GAAG,qBAAqB;EACzD,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;CACT,EAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"popover-trigger-context-Cre9Mczn.js","names":[],"sources":["../src/components/popover/popover-trigger-context.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { createContext, useId, useState } from 'react';\nimport type { ReactNode } from 'react';\n\nexport const Context = createContext<{\n popoverId?: string;\n setPopoverId?: (id: string) => void;\n popoverOpen?: boolean;\n setPopoverOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n}>({});\n\nexport type PopoverTriggerContextProps = {\n children: ReactNode;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n};\n\n/**\n * PopoverTriggerContext component, use to wrap a PopoverTrigger and Popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\nexport const PopoverTriggerContext = ({ children, open, onOpenChange }: PopoverTriggerContextProps) => {\n const randomPopoverId = useId();\n const [popoverId, setPopoverId] = useState(randomPopoverId);\n const [popoverOpen, setPopoverOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: false,\n caller: 'PopoverTriggerContext',\n });\n\n return <Context value={{ popoverId, setPopoverId, popoverOpen, setPopoverOpen }}>{children}</Context>;\n};\n"],"mappings":";;;;;AAIA,MAAa,UAAU,cAKpB,CAAE,EAAC;;;;;;;;;;;;AA2BN,MAAa,wBAAwB,CAAC,EAAE,UAAU,MAAM,cAA0C,KAAK;CACrG,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,WAAW,aAAa,GAAG,SAAS,gBAAgB;CAC3D,MAAM,CAAC,aAAa,eAAe,GAAG,qBAAqB;EACzD,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;CACT,EAAC;AAEF,4BAAQ;EAAQ,OAAO;GAAE;GAAW;GAAc;GAAa;EAAgB;EAAG;GAAmB;AACtG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-DAC5mhl3.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 /** If true, the radio will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n dark,\n label,\n description,\n error,\n fullwidth,\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} fullwidth={fullwidth} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\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":";;;;;;;;AAuBA,MAAa,QAAQ,CAAC,EACpB,MACA,OACA,aACA,OACA,WACA,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;
|
|
1
|
+
{"version":3,"file":"radio-DAC5mhl3.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 /** If true, the radio will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n dark,\n label,\n description,\n error,\n fullwidth,\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} fullwidth={fullwidth} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\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":";;;;;;;;AAuBA,MAAa,QAAQ,CAAC,EACpB,MACA,OACA,aACA,OACA,WACA,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,IAAI;AAEpG,4BACG;EAAiB;EAAW,aAAW;EAAa;EAAkB;EAAW;iCAC/E;uBACE;IACC,MAAK;IACD;IACC;IACL,gBAAc,SAAS;IACvB,oBAAkB;IACZ;IACN,GAAI;KACJ;GACD,6BACE;IAAM,QAAO;IAAS,SAAS;IAAI;kCACjC,oBAAM,QAAa;KACd;GAET,mCAGE;IAAiB,eAAY;IAAO,IAAI;cACtC;KACgB;MAEf;GACF;AAEX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -3,11 +3,11 @@ import { Field } from "./field-DFMMLG-d.js";
|
|
|
3
3
|
import { FieldAffix, FieldAffixes } from "./field-affix-npc6m7XL.js";
|
|
4
4
|
import { Input } from "./input-Dr7BnTyd.js";
|
|
5
5
|
import clsx from "clsx/lite";
|
|
6
|
-
import {
|
|
6
|
+
import { CrossSmallIcon, MagnefyingGlassIcon } from "@bi-digital/icons";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/components/search/search.tsx
|
|
10
|
-
const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size = "medium", ref, dark, style,...props }) => {
|
|
10
|
+
const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size = "medium", ref, dark, style, fullwidth,...props }) => {
|
|
11
11
|
const handleSubmit = (e) => {
|
|
12
12
|
e.preventDefault();
|
|
13
13
|
if (onSubmit) {
|
|
@@ -22,12 +22,13 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
|
|
|
22
22
|
className: clsx("bi-search", className),
|
|
23
23
|
"data-dark": dark,
|
|
24
24
|
style,
|
|
25
|
+
fullwidth,
|
|
25
26
|
asChild: true,
|
|
26
27
|
children: /* @__PURE__ */ jsx("form", {
|
|
27
28
|
onSubmit: handleSubmit,
|
|
28
29
|
onReset: handleReset,
|
|
29
30
|
children: /* @__PURE__ */ jsxs(FieldAffixes, { children: [
|
|
30
|
-
/* @__PURE__ */ jsx(FieldAffix, { children: /* @__PURE__ */ jsx(
|
|
31
|
+
/* @__PURE__ */ jsx(FieldAffix, { children: /* @__PURE__ */ jsx(MagnefyingGlassIcon, { size }) }),
|
|
31
32
|
/* @__PURE__ */ jsx(Input, {
|
|
32
33
|
type: "text",
|
|
33
34
|
ref,
|
|
@@ -44,7 +45,7 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
|
|
|
44
45
|
dark,
|
|
45
46
|
variant: "text",
|
|
46
47
|
type: "reset",
|
|
47
|
-
children: /* @__PURE__ */ jsx(
|
|
48
|
+
children: /* @__PURE__ */ jsx(CrossSmallIcon, {
|
|
48
49
|
size,
|
|
49
50
|
"aria-hidden": "true"
|
|
50
51
|
})
|
|
@@ -57,4 +58,4 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
|
|
|
57
58
|
|
|
58
59
|
//#endregion
|
|
59
60
|
export { Search };
|
|
60
|
-
//# sourceMappingURL=search-
|
|
61
|
+
//# sourceMappingURL=search-DzjgrvFl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-DzjgrvFl.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 { CrossSmallIcon, MagnefyingGlassIcon } from '@bi-digital/icons';\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 /** Called when the user resets the search input. */\n onReset?: (value: string) => void;\n /**\n * Aria-label for the clear button.\n * @defaultValue 'Clear'\n */\n clearAriaLabel?: string;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Search = ({\n className,\n onSubmit,\n onReset,\n clearAriaLabel = 'Clear',\n size = 'medium',\n ref,\n dark,\n style,\n fullwidth,\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 const handleReset = () => {\n if (onReset) {\n onReset('');\n }\n };\n return (\n <Field className={clsx('bi-search', className)} data-dark={dark} style={style} fullwidth={fullwidth} asChild>\n <form onSubmit={handleSubmit} onReset={handleReset}>\n <FieldAffixes>\n <FieldAffix>\n <MagnefyingGlassIcon size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} dark={dark} {...props} />\n <FieldAffix aria-hidden='false'>\n <Button aria-label={clearAriaLabel} icon size={size} dark={dark} variant='text' type='reset'>\n <CrossSmallIcon size={size} aria-hidden='true' />\n </Button>\n </FieldAffix>\n </FieldAffixes>\n </form>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;AA6BA,MAAa,SAAS,CAAC,EACrB,WACA,UACA,SACA,iBAAiB,SACjB,OAAO,UACP,KACA,MACA,OACA,UACA,GAAG,OACS,KAAK;CACjB,MAAM,eAAe,CAACA,MAAwC;EAC5D,EAAE,gBAAgB;AAClB,MAAI,UAAU;GACZ,MAAM,QAAQ,EAAE,cAAc,cAAc,QAAQ;GACpD,SAAS,OAAO,SAAS,GAAG;EAC7B;CACF;CACD,MAAM,cAAc,MAAM;AACxB,MAAI,SACF,QAAQ,GAAG;CAEd;AACD,4BACG;EAAM,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAa;EAAkB;EAAW;gCAClG;GAAK,UAAU;GAAc,SAAS;kCACpC;wBACE,4CACE,uBAA0B,OAAQ,GACxB;wBACZ;KAAM,MAAK;KAAY;KAAW;KAAY;KAAM,GAAI;MAAS;wBACjE;KAAW,eAAY;mCACrB;MAAO,cAAY;MAAgB;MAAW;MAAY;MAAM,SAAQ;MAAO,MAAK;oCAClF;OAAqB;OAAM,eAAY;QAAS;OAC1C;MACE;OACA;IACV;GACD;AAEX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-R87VdG5U.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,
|
|
1
|
+
{"version":3,"file":"select-R87VdG5U.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,4BACG;EACC,WAAW,KAAK,YAAY,UAAU;EACtC,aAAW;EACX,aAAW;EACN;EACL,WAAW,CAAC,UAAU;AACpB,OAAI,MAAM,QAAQ,MAAO;AACzB,OAAI,MAAM,UAAU,MAAM,gBAAgB;GAC1C,YAAY,MAAM;EACnB;EACD,aAAa,CAAC,UAAU;AACtB,OAAI,MAAM,UAAU,MAAM,gBAAgB;GAC1C,cAAc,MAAM;EACrB;EACD,GAAI;GACJ;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-optgroup-jowSQvbc.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,
|
|
1
|
+
{"version":3,"file":"select-optgroup-jowSQvbc.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,4BAAQ;EAAU,GAAI;EAAY;GAAO;AAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-option-WAhhr82L.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,
|
|
1
|
+
{"version":3,"file":"select-option-WAhhr82L.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,4BAAQ;EAAU,GAAI;EAAY;GAAO;AAC1C"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Field } from "./field-DFMMLG-d.js";
|
|
2
|
+
import { FieldDescription } from "./field-description-Dhm1VA08.js";
|
|
3
|
+
import { Label } from "./label-DUzvAx-T.js";
|
|
4
|
+
import { Select } from "./select-R87VdG5U.js";
|
|
5
|
+
import { ValidationMessage } from "./validation-message-CPGA4DxM.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { useId } from "react";
|
|
8
|
+
|
|
9
|
+
//#region src/components/selectfield/selectfield.tsx
|
|
10
|
+
const Selectfield = ({ children, dark, label, description, error, style, className, fullwidth, ref, id: idProp, "aria-describedby": ariaDescribedByProp,...props }) => {
|
|
11
|
+
const generatedId = useId();
|
|
12
|
+
const descriptionId = useId();
|
|
13
|
+
const validationId = useId();
|
|
14
|
+
const id = idProp || generatedId;
|
|
15
|
+
const ariaDescribedBy = [
|
|
16
|
+
description ? descriptionId : "",
|
|
17
|
+
error ? validationId : "",
|
|
18
|
+
ariaDescribedByProp
|
|
19
|
+
].join(" ").trim() || void 0;
|
|
20
|
+
return /* @__PURE__ */ jsxs(Field, {
|
|
21
|
+
className,
|
|
22
|
+
"data-dark": dark,
|
|
23
|
+
style,
|
|
24
|
+
fullwidth,
|
|
25
|
+
children: [
|
|
26
|
+
label && /* @__PURE__ */ jsx(Label, {
|
|
27
|
+
htmlFor: id,
|
|
28
|
+
children: label
|
|
29
|
+
}),
|
|
30
|
+
description && /* @__PURE__ */ jsx(FieldDescription, {
|
|
31
|
+
id: descriptionId,
|
|
32
|
+
children: description
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx(Select, {
|
|
35
|
+
id,
|
|
36
|
+
ref,
|
|
37
|
+
dark,
|
|
38
|
+
"aria-invalid": Boolean(error) || void 0,
|
|
39
|
+
"aria-describedby": ariaDescribedBy,
|
|
40
|
+
...props,
|
|
41
|
+
children
|
|
42
|
+
}),
|
|
43
|
+
!!error && /* @__PURE__ */ jsx(ValidationMessage, {
|
|
44
|
+
id: validationId,
|
|
45
|
+
children: error
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Selectfield };
|
|
53
|
+
//# sourceMappingURL=selectfield-BD-t6Mmm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectfield-BD-t6Mmm.js","names":[],"sources":["../src/components/selectfield/selectfield.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport { Field, FieldDescription } from '../field';\nimport { Label } from '../label';\nimport { Select, type SelectProps } from '../select';\nimport { ValidationMessage } from '../validation-message';\nimport { MergeRight } from '../../utilities';\n\nexport type SelectfieldProps = MergeRight<\n LabelRequiredProps & SelectProps,\n {\n /** Description */\n description?: ReactNode;\n /** Error message for field */\n error?: ReactNode;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Selectfield = ({\n children,\n dark,\n label,\n description,\n error,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: SelectfieldProps) => {\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} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <Select\n id={id}\n ref={ref}\n dark={dark}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n >\n {children}\n </Select>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;AAqBA,MAAa,cAAc,CAAC,EAC1B,UACA,MACA,OACA,aACA,OACA,OACA,WACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,OACc,KAAK;CACtB,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,IAAI;AACzG,6BACG;EAAiB;EAAW,aAAW;EAAa;EAAkB;;GACpE,6BAAU;IAAM,SAAS;cAAK;KAAc;GAC5C,mCAAgB;IAAiB,IAAI;cAAgB;KAA+B;uBACpF;IACK;IACC;IACC;IACN,gBAAc,QAAQ,MAAM,IAAI;IAChC,oBAAkB;IAClB,GAAI;IAEH;KACM;GACR,CAAC,CAAC,6BAAU;IAAkB,IAAI;cAAe;KAA0B;;GACtE;AAEX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-link-
|
|
1
|
+
{"version":3,"file":"skip-link-CbdX4Taw.js","names":[],"sources":["../src/components/skip-link/skip-link.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { AnchorHTMLAttributes, Ref } from 'react';\n\nexport type SkipLinkProps = MergeRight<\n DefaultProps & AsChildProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const SkipLink = ({ asChild, children, className, dark, ...props }: SkipLinkProps) => {\n const Component = asChild ? Slot : 'a';\n return (\n <Component className={clsx('bi-skip-link', className)} data-dark={dark} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;AAaA,MAAa,WAAW,CAAC,EAAE,SAAS,UAAU,WAAW,KAAM,GAAG,OAAsB,KAAK;CAC3F,MAAM,YAAY,UAAU,OAAO;AACnC,4BACG;EAAU,WAAW,KAAK,gBAAgB,UAAU;EAAE,aAAW;EAAM,GAAI;EACzE;GACS;AAEf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1 +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,
|
|
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,4BAAQ;EAAK,WAAW,KAAK,cAAc,UAAU;EAAE,aAAW;EAAM,cAAY;EAAY;EAAK,GAAI;GAAS;AACnH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime64 from "react/jsx-runtime";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/sticky-header/sticky-header.d.ts
|
|
@@ -13,7 +13,7 @@ type StickyHeaderProps = {
|
|
|
13
13
|
*/
|
|
14
14
|
declare const StickyHeader: ({
|
|
15
15
|
children
|
|
16
|
-
}: StickyHeaderProps) =>
|
|
16
|
+
}: StickyHeaderProps) => react_jsx_runtime64.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { StickyHeader, StickyHeaderProps };
|
|
19
|
-
//# sourceMappingURL=sticky-header-
|
|
19
|
+
//# sourceMappingURL=sticky-header-BMeHtK7e.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sticky-header-
|
|
1
|
+
{"version":3,"file":"sticky-header-gE5HX2ug.js","names":[],"sources":["../src/components/sticky-header/sticky-header.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { ReactNode } from 'react';\n\nexport type StickyHeaderProps = {\n children: ReactNode;\n};\n\n/**\n * Make a sticky header that will stay at the top of the viewport when scrolling.\n * It handles different distance to the top based on sub-navbar, navbar and other factors.\n * This element is a Slot which simply adds the correct CSS styles to the children.\n * Make sure that the children passed to this component appends className and not overrides it.\n */\nexport const StickyHeader = ({ children }: StickyHeaderProps) => {\n const Component = Slot;\n return <Component className='bi-sticky-header'>{children}</Component>;\n};\n"],"mappings":";;;;;;;;;;AAaA,MAAa,eAAe,CAAC,EAAE,UAA6B,KAAK;CAC/D,MAAM,YAAY;AAClB,4BAAQ;EAAU,WAAU;EAAoB;GAAqB;AACtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-navbar-
|
|
1
|
+
{"version":3,"file":"sub-navbar-BdJ9EKsU.js","names":["callback: (direction: 'up' | 'down' | null) => void","element: HTMLElement","callback: (isAbove: boolean) => void","cleanupFunctions: (() => void)[]"],"sources":["../src/vanilla/sub-navbar/index.ts"],"sourcesContent":["/**\n * Detects the vertical scroll direction of the page.\n * Returns 'up' | 'down' | null. The direction is only updated if the scroll distance\n * exceeds a 5px threshold to prevent sensitivity to minor scroll jitter.\n */\nclass ScrollDirectionTracker {\n private scrollDirection: 'up' | 'down' | null = null;\n private lastScrollY = window.pageYOffset;\n private callbacks = new Set<(direction: 'up' | 'down' | null) => void>();\n\n constructor() {\n this.updateScrollDirection = this.updateScrollDirection.bind(this);\n window.addEventListener('scroll', this.updateScrollDirection);\n }\n\n private updateScrollDirection() {\n const scrollY = window.pageYOffset;\n const direction = scrollY > this.lastScrollY ? 'down' : 'up';\n\n if (direction !== this.scrollDirection && (scrollY - this.lastScrollY > 5 || scrollY - this.lastScrollY < -5)) {\n this.scrollDirection = direction;\n this.callbacks.forEach((callback) => callback(this.scrollDirection));\n }\n\n this.lastScrollY = scrollY > 0 ? scrollY : 0;\n }\n\n subscribe(callback: (direction: 'up' | 'down' | null) => void) {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n destroy() {\n window.removeEventListener('scroll', this.updateScrollDirection);\n this.callbacks.clear();\n }\n\n getCurrentDirection() {\n return this.scrollDirection;\n }\n}\n\n/**\n * Detects when an element is scrolled past and is no longer in the viewport.\n */\nclass ElementAboveViewportTracker {\n private isAboveViewport = false;\n private observer: IntersectionObserver;\n private callbacks = new Set<(isAbove: boolean) => void>();\n\n constructor(private element: HTMLElement) {\n this.observer = new IntersectionObserver(\n ([entry]) => {\n const newIsAbove = entry.boundingClientRect.y < 0;\n if (newIsAbove !== this.isAboveViewport) {\n this.isAboveViewport = newIsAbove;\n this.callbacks.forEach((callback) => callback(this.isAboveViewport));\n }\n },\n { threshold: [0] },\n );\n\n this.observer.observe(this.element);\n }\n\n subscribe(callback: (isAbove: boolean) => void) {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n destroy() {\n this.observer.disconnect();\n this.callbacks.clear();\n }\n\n getIsAboveViewport() {\n return this.isAboveViewport;\n }\n}\n\nexport type InitSubNavbarOptions = {\n /**\n * Custom selector to find sub-navbars.\n * @default '.bi-sub-navbar'\n */\n selector?: string;\n};\n\n/**\n * Initializes all sub-navbars on the page to handle scroll-based behavior.\n * This includes:\n * - Setting data-fixed attribute when the navbar is scrolled past\n * - Setting data-scroll-dir attribute based on scroll direction when fixed\n *\n * @param options Configuration options\n * @returns Cleanup function to remove all event listeners and observers\n */\nexport const initSubNavbar = ({ selector = '.bi-sub-navbar' }: InitSubNavbarOptions = {}) => {\n const subNavbars = document.querySelectorAll<HTMLElement>(selector);\n\n if (subNavbars.length === 0) {\n console.warn(`No elements found with selector: ${selector}`);\n return () => {};\n }\n\n const scrollTracker = new ScrollDirectionTracker();\n const cleanupFunctions: (() => void)[] = [];\n\n subNavbars.forEach((navbar) => {\n const wrapper = navbar.closest('.bi-sub-navbar--wrapper') as HTMLElement;\n if (!wrapper) {\n console.warn('Sub-navbar must be wrapped in an element with class \"bi-sub-navbar--wrapper\"');\n return;\n }\n\n // Find or create the reference element (empty div) that acts as the scroll trigger\n let referenceElement = wrapper.querySelector<HTMLElement>('div:first-child');\n if (!referenceElement || referenceElement === navbar) {\n referenceElement = document.createElement('div');\n wrapper.insertBefore(referenceElement, navbar);\n }\n\n const viewportTracker = new ElementAboveViewportTracker(referenceElement);\n\n // Subscribe to viewport changes\n const unsubscribeViewport = viewportTracker.subscribe((isAbove) => {\n navbar.setAttribute('data-fixed', String(isAbove));\n\n // Only set scroll direction when fixed\n if (isAbove) {\n const currentDirection = scrollTracker.getCurrentDirection();\n if (currentDirection) {\n navbar.setAttribute('data-scroll-dir', currentDirection);\n }\n } else {\n navbar.removeAttribute('data-scroll-dir');\n }\n });\n\n // Subscribe to scroll direction changes\n const unsubscribeScroll = scrollTracker.subscribe((direction) => {\n const isFixed = navbar.getAttribute('data-fixed') === 'true';\n if (isFixed && direction) {\n navbar.setAttribute('data-scroll-dir', direction);\n }\n });\n\n cleanupFunctions.push(() => {\n unsubscribeViewport();\n unsubscribeScroll();\n viewportTracker.destroy();\n });\n });\n\n // Return cleanup function\n return () => {\n cleanupFunctions.forEach((cleanup) => cleanup());\n scrollTracker.destroy();\n };\n};\n"],"mappings":";;;;;;AAKA,IAAM,yBAAN,MAA6B;CAC3B,AAAQ,kBAAwC;CAChD,AAAQ,cAAc,OAAO;CAC7B,AAAQ,4BAAY,IAAI;CAExB,cAAc;EACZ,KAAK,wBAAwB,KAAK,sBAAsB,KAAK,KAAK;EAClE,OAAO,iBAAiB,UAAU,KAAK,sBAAsB;CAC9D;CAED,AAAQ,wBAAwB;EAC9B,MAAM,UAAU,OAAO;EACvB,MAAM,YAAY,UAAU,KAAK,cAAc,SAAS;AAExD,MAAI,cAAc,KAAK,oBAAoB,UAAU,KAAK,cAAc,KAAK,UAAU,KAAK,cAAc,KAAK;GAC7G,KAAK,kBAAkB;GACvB,KAAK,UAAU,QAAQ,CAAC,aAAa,SAAS,KAAK,gBAAgB,CAAC;EACrE;EAED,KAAK,cAAc,UAAU,IAAI,UAAU;CAC5C;CAED,UAAUA,UAAqD;EAC7D,KAAK,UAAU,IAAI,SAAS;AAC5B,SAAO,MAAM,KAAK,UAAU,OAAO,SAAS;CAC7C;CAED,UAAU;EACR,OAAO,oBAAoB,UAAU,KAAK,sBAAsB;EAChE,KAAK,UAAU,OAAO;CACvB;CAED,sBAAsB;AACpB,SAAO,KAAK;CACb;AACF;;;;AAKD,IAAM,8BAAN,MAAkC;CAChC,AAAQ,kBAAkB;CAC1B,AAAQ;CACR,AAAQ,4BAAY,IAAI;CAExB,YAAoBC,SAAsB;EAAtB;EAClB,KAAK,WAAW,IAAI,qBAClB,CAAC,CAAC,MAAM,KAAK;GACX,MAAM,aAAa,MAAM,mBAAmB,IAAI;AAChD,OAAI,eAAe,KAAK,iBAAiB;IACvC,KAAK,kBAAkB;IACvB,KAAK,UAAU,QAAQ,CAAC,aAAa,SAAS,KAAK,gBAAgB,CAAC;GACrE;EACF,GACD,EAAE,WAAW,CAAC,CAAE,EAAE;EAGpB,KAAK,SAAS,QAAQ,KAAK,QAAQ;CACpC;CAED,UAAUC,UAAsC;EAC9C,KAAK,UAAU,IAAI,SAAS;AAC5B,SAAO,MAAM,KAAK,UAAU,OAAO,SAAS;CAC7C;CAED,UAAU;EACR,KAAK,SAAS,YAAY;EAC1B,KAAK,UAAU,OAAO;CACvB;CAED,qBAAqB;AACnB,SAAO,KAAK;CACb;AACF;;;;;;;;;;AAmBD,MAAa,gBAAgB,CAAC,EAAE,WAAW,kBAAwC,GAAG,CAAE,MAAK;CAC3F,MAAM,aAAa,SAAS,iBAA8B,SAAS;AAEnE,KAAI,WAAW,WAAW,GAAG;EAC3B,QAAQ,KAAK,CAAC,iCAAiC,EAAE,UAAU,CAAC;AAC5D,SAAO,MAAM,CAAE;CAChB;CAED,MAAM,gBAAgB,IAAI;CAC1B,MAAMC,mBAAmC,CAAE;CAE3C,WAAW,QAAQ,CAAC,WAAW;EAC7B,MAAM,UAAU,OAAO,QAAQ,0BAA0B;AACzD,MAAI,CAAC,SAAS;GACZ,QAAQ,KAAK,iFAA+E;AAC5F;EACD;EAGD,IAAI,mBAAmB,QAAQ,cAA2B,kBAAkB;AAC5E,MAAI,CAAC,oBAAoB,qBAAqB,QAAQ;GACpD,mBAAmB,SAAS,cAAc,MAAM;GAChD,QAAQ,aAAa,kBAAkB,OAAO;EAC/C;EAED,MAAM,kBAAkB,IAAI,4BAA4B;EAGxD,MAAM,sBAAsB,gBAAgB,UAAU,CAAC,YAAY;GACjE,OAAO,aAAa,cAAc,OAAO,QAAQ,CAAC;AAGlD,OAAI,SAAS;IACX,MAAM,mBAAmB,cAAc,qBAAqB;AAC5D,QAAI,kBACF,OAAO,aAAa,mBAAmB,iBAAiB;GAE3D,OACC,OAAO,gBAAgB,kBAAkB;EAE5C,EAAC;EAGF,MAAM,oBAAoB,cAAc,UAAU,CAAC,cAAc;GAC/D,MAAM,UAAU,OAAO,aAAa,aAAa,KAAK;AACtD,OAAI,WAAW,WACb,OAAO,aAAa,mBAAmB,UAAU;EAEpD,EAAC;EAEF,iBAAiB,KAAK,MAAM;GAC1B,qBAAqB;GACrB,mBAAmB;GACnB,gBAAgB,SAAS;EAC1B,EAAC;CACH,EAAC;AAGF,QAAO,MAAM;EACX,iBAAiB,QAAQ,CAAC,YAAY,SAAS,CAAC;EAChD,cAAc,SAAS;CACxB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-navbar-DkxQv0WJ.js","names":[],"sources":["../src/components/navbar/sub-navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { useRef, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { useIsElementAboveViewport, useScrollDirection } from '../../utilities/hooks';\n\nexport type SubNavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const SubNavbar = ({ dark = false, children, className, ref, ...props }: SubNavbarProps) => {\n const elementRef = useRef<HTMLDivElement>(null);\n const fixed = useIsElementAboveViewport(elementRef);\n const scrollDirection = useScrollDirection();\n\n return (\n <div className='bi-sub-navbar--wrapper'>\n <div ref={elementRef} />\n <nav\n className={clsx('bi-sub-navbar', className)}\n data-fixed={fixed}\n data-scroll-dir={fixed ? scrollDirection : undefined}\n data-dark={dark}\n {...props}\n ref={ref}\n >\n {children}\n </nav>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAaA,MAAa,YAAY,CAAC,EAAE,OAAO,OAAO,UAAU,WAAW,IAAK,GAAG,OAAuB,KAAK;CACjG,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,QAAQ,0BAA0B,WAAW;CACnD,MAAM,kBAAkB,oBAAoB;AAE5C,
|
|
1
|
+
{"version":3,"file":"sub-navbar-DkxQv0WJ.js","names":[],"sources":["../src/components/navbar/sub-navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { useRef, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { useIsElementAboveViewport, useScrollDirection } from '../../utilities/hooks';\n\nexport type SubNavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const SubNavbar = ({ dark = false, children, className, ref, ...props }: SubNavbarProps) => {\n const elementRef = useRef<HTMLDivElement>(null);\n const fixed = useIsElementAboveViewport(elementRef);\n const scrollDirection = useScrollDirection();\n\n return (\n <div className='bi-sub-navbar--wrapper'>\n <div ref={elementRef} />\n <nav\n className={clsx('bi-sub-navbar', className)}\n data-fixed={fixed}\n data-scroll-dir={fixed ? scrollDirection : undefined}\n data-dark={dark}\n {...props}\n ref={ref}\n >\n {children}\n </nav>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAaA,MAAa,YAAY,CAAC,EAAE,OAAO,OAAO,UAAU,WAAW,IAAK,GAAG,OAAuB,KAAK;CACjG,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,QAAQ,0BAA0B,WAAW;CACnD,MAAM,kBAAkB,oBAAoB;AAE5C,6BACG;EAAI,WAAU;iCACZ,SAAI,KAAK,aAAc,sBACvB;GACC,WAAW,KAAK,iBAAiB,UAAU;GAC3C,cAAY;GACZ,mBAAiB,QAAQ,kBAAkB;GAC3C,aAAW;GACX,GAAI;GACC;GAEJ;IACG;GACF;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-
|
|
1
|
+
{"version":3,"file":"tab-BvSndQZ_.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,4BACG;EAAe;EAAiB;EAAU;gCACxC;GACM;GACL,SAAQ;GACR,WAAW,KAAK,gBAAgB,UAAU;GAChC;GACD;GACH;GACN,GAAI;GAEH;IACM;GACD;AAEb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-
|
|
1
|
+
{"version":3,"file":"tabs-C70z_5SJ.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,4BACG;EACC,WAAW,KAAK,WAAW,UAAU;EACrB;EACH;EACC;EACP;EACP,eAAe;EACN;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACI;AAEV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-list-
|
|
1
|
+
{"version":3,"file":"tabs-list-npvK06bl.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,4BACG;EACC,WAAW,KAAK,iBAAiB,UAAU;EACrC;EACG;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACI;AAEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-panel-
|
|
1
|
+
{"version":3,"file":"tabs-panel-L8HovooI.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,4BACG;EACC,WAAW,KAAK,kBAAkB,UAAU;EACrC;EACP,YAAY,cAAc;EACjB;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACO;AAEb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea-
|
|
1
|
+
{"version":3,"file":"textarea-B1fAOfkt.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,4BAAQ;EAAS,WAAW,KAAK,YAAY,UAAU;EAAE,aAAW;EAAM,aAAW;EAAW;EAAK,GAAI;GAAS;AACnH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -3,13 +3,13 @@ import { FieldDescription } from "./field-description-Dhm1VA08.js";
|
|
|
3
3
|
import { FieldAffix, FieldAffixes } from "./field-affix-npc6m7XL.js";
|
|
4
4
|
import { Input } from "./input-Dr7BnTyd.js";
|
|
5
5
|
import { Label } from "./label-DUzvAx-T.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { ValidationMessage } from "./validation-message-CPGA4DxM.js";
|
|
7
|
+
import { Textarea } from "./textarea-B1fAOfkt.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { useId } from "react";
|
|
10
10
|
|
|
11
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 }) => {
|
|
12
|
+
const Textfield = ({ dark, label, description, error, multiline, prefix, suffix, style, className, fullwidth, ref, id: idProp, "aria-describedby": ariaDescribedByProp,...props }) => {
|
|
13
13
|
const generatedId = useId();
|
|
14
14
|
const descriptionId = useId();
|
|
15
15
|
const validationId = useId();
|
|
@@ -23,6 +23,7 @@ const Textfield = ({ dark, label, description, error, multiline, prefix, suffix,
|
|
|
23
23
|
className,
|
|
24
24
|
"data-dark": dark,
|
|
25
25
|
style,
|
|
26
|
+
fullwidth,
|
|
26
27
|
children: [
|
|
27
28
|
label && /* @__PURE__ */ jsx(Label, {
|
|
28
29
|
htmlFor: id,
|
|
@@ -61,4 +62,4 @@ const Textfield = ({ dark, label, description, error, multiline, prefix, suffix,
|
|
|
61
62
|
|
|
62
63
|
//#endregion
|
|
63
64
|
export { Textfield };
|
|
64
|
-
//# sourceMappingURL=textfield-
|
|
65
|
+
//# sourceMappingURL=textfield-DwLkaC2S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textfield-DwLkaC2S.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 /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\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 fullwidth,\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} fullwidth={fullwidth}>\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 dark={dark}\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 dark={dark}\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":";;;;;;;;;;;AAgDA,MAAa,YAAY,CAAC,EACxB,MACA,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,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,IAAI;AACzG,6BACG;EAAiB;EAAW,aAAW;EAAa;EAAkB;;GACpE,6BAAU;IAAM,SAAS;cAAK;KAAc;GAC5C,mCAAgB;IAAiB,IAAI;cAAgB;KAA+B;wBACpF;IACE,8BAAW,wBAAY,SAAoB;IAC3C,gCACE;KACK;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI;KAChC,oBAAkB;KACZ;KACN,GAAK;MACL,uBAED;KACK;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI;KAChC,oBAAkB;KACZ;KACN,GAAK;MACL;IAEH,8BAAW,wBAAY,SAAoB;OAC/B;GACd,CAAC,CAAC,6BAAU;IAAkB,IAAI;cAAe;KAA0B;;GACtE;AAEX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AsChildProps, DefaultProps, LabelRequiredProps } from "./types-
|
|
1
|
+
import { AsChildProps, DefaultProps, LabelRequiredProps } from "./types-Bga-EYiy.js";
|
|
2
2
|
export { AsChildProps, DefaultProps, LabelRequiredProps };
|
package/dist/types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckboxGroup-BDH3ewt8.js","names":["e: ChangeEvent<HTMLInputElement>"],"sources":["../src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react';\n\nexport type UseCheckboxGroupOptions = {\n options: boolean[];\n updateOptions: (checked: boolean) => void;\n};\n\nexport type UseCheckboxGroupReturn = {\n /** Spread this on the \"parent\" checkbox */\n checkboxGroupProps: {\n checked: boolean;\n indeterminate: boolean;\n onChange: (e: ChangeEvent<HTMLInputElement>) => void;\n };\n};\n\nexport const useCheckboxGroup = ({ options, updateOptions }: UseCheckboxGroupOptions): UseCheckboxGroupReturn => {\n const checked = options.every((option) => option);\n const indeterminate = options.some((option) => option) && !checked;\n\n const onChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newChecked = e.target.indeterminate ? true : e.target.checked;\n updateOptions(newChecked);\n };\n\n return {\n checkboxGroupProps: {\n checked,\n indeterminate,\n onChange,\n },\n };\n};\n"],"mappings":";AAgBA,MAAa,mBAAmB,CAAC,EAAE,SAAS,eAAwC,KAA6B;CAC/G,MAAM,UAAU,QAAQ,MAAM,CAAC,WAAW,OAAO;CACjD,MAAM,gBAAgB,QAAQ,KAAK,CAAC,WAAW,OAAO,
|
|
1
|
+
{"version":3,"file":"useCheckboxGroup-BDH3ewt8.js","names":["e: ChangeEvent<HTMLInputElement>"],"sources":["../src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react';\n\nexport type UseCheckboxGroupOptions = {\n options: boolean[];\n updateOptions: (checked: boolean) => void;\n};\n\nexport type UseCheckboxGroupReturn = {\n /** Spread this on the \"parent\" checkbox */\n checkboxGroupProps: {\n checked: boolean;\n indeterminate: boolean;\n onChange: (e: ChangeEvent<HTMLInputElement>) => void;\n };\n};\n\nexport const useCheckboxGroup = ({ options, updateOptions }: UseCheckboxGroupOptions): UseCheckboxGroupReturn => {\n const checked = options.every((option) => option);\n const indeterminate = options.some((option) => option) && !checked;\n\n const onChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newChecked = e.target.indeterminate ? true : e.target.checked;\n updateOptions(newChecked);\n };\n\n return {\n checkboxGroupProps: {\n checked,\n indeterminate,\n onChange,\n },\n };\n};\n"],"mappings":";AAgBA,MAAa,mBAAmB,CAAC,EAAE,SAAS,eAAwC,KAA6B;CAC/G,MAAM,UAAU,QAAQ,MAAM,CAAC,WAAW,OAAO;CACjD,MAAM,gBAAgB,QAAQ,KAAK,CAAC,WAAW,OAAO,IAAI,CAAC;CAE3D,MAAM,WAAW,CAACA,MAAqC;EACrD,MAAM,aAAa,EAAE,OAAO,gBAAgB,OAAO,EAAE,OAAO;EAC5D,cAAc,WAAW;CAC1B;AAED,QAAO,EACL,oBAAoB;EAClB;EACA;EACA;CACD,EACF;AACF"}
|
|
@@ -19,4 +19,4 @@ declare const useCheckboxGroup: ({
|
|
|
19
19
|
}: UseCheckboxGroupOptions) => UseCheckboxGroupReturn;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { UseCheckboxGroupOptions, UseCheckboxGroupReturn, useCheckboxGroup };
|
|
22
|
-
//# sourceMappingURL=useCheckboxGroup-
|
|
22
|
+
//# sourceMappingURL=useCheckboxGroup-D61FVz37.d.ts.map
|
package/dist/{useIsElementAboveViewport-V1lc14eB.d.ts → useIsElementAboveViewport-C3qzTbfj.d.ts}
RENAMED
|
@@ -5,4 +5,4 @@ import { RefObject } from "react";
|
|
|
5
5
|
declare const useIsElementAboveViewport: (elementRef: RefObject<HTMLElement | null>) => boolean;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { useIsElementAboveViewport };
|
|
8
|
-
//# sourceMappingURL=useIsElementAboveViewport-
|
|
8
|
+
//# sourceMappingURL=useIsElementAboveViewport-C3qzTbfj.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsElementAboveViewport-lmdnXDdc.js","names":["elementRef: RefObject<HTMLElement | null>"],"sources":["../src/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.tsx"],"sourcesContent":["import { useEffect, useState, type RefObject } from 'react';\n\n/** Detects when an element's is scrolled past and is no longer in the viewport. */\nexport const useIsElementAboveViewport = (elementRef: RefObject<HTMLElement | null>): boolean => {\n const [isAboveViewport, setIsPast] = useState(false);\n\n useEffect(() => {\n const observer = new IntersectionObserver(([entry]) => setIsPast(entry.boundingClientRect.y < 0), {\n threshold: [0],\n });\n const currentRef = elementRef.current;\n if (currentRef) observer.observe(currentRef);\n return () => {\n if (currentRef) observer.unobserve(currentRef);\n };\n }, [elementRef]);\n return isAboveViewport;\n};\n"],"mappings":";;;;AAGA,MAAa,4BAA4B,CAACA,eAAuD;CAC/F,MAAM,CAAC,iBAAiB,UAAU,GAAG,SAAS,MAAM;
|
|
1
|
+
{"version":3,"file":"useIsElementAboveViewport-lmdnXDdc.js","names":["elementRef: RefObject<HTMLElement | null>"],"sources":["../src/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.tsx"],"sourcesContent":["import { useEffect, useState, type RefObject } from 'react';\n\n/** Detects when an element's is scrolled past and is no longer in the viewport. */\nexport const useIsElementAboveViewport = (elementRef: RefObject<HTMLElement | null>): boolean => {\n const [isAboveViewport, setIsPast] = useState(false);\n\n useEffect(() => {\n const observer = new IntersectionObserver(([entry]) => setIsPast(entry.boundingClientRect.y < 0), {\n threshold: [0],\n });\n const currentRef = elementRef.current;\n if (currentRef) observer.observe(currentRef);\n return () => {\n if (currentRef) observer.unobserve(currentRef);\n };\n }, [elementRef]);\n return isAboveViewport;\n};\n"],"mappings":";;;;AAGA,MAAa,4BAA4B,CAACA,eAAuD;CAC/F,MAAM,CAAC,iBAAiB,UAAU,GAAG,SAAS,MAAM;CAEpD,UAAU,MAAM;EACd,MAAM,WAAW,IAAI,qBAAqB,CAAC,CAAC,MAAM,KAAK,UAAU,MAAM,mBAAmB,IAAI,EAAE,EAAE,EAChG,WAAW,CAAC,CAAE,EACf;EACD,MAAM,aAAa,WAAW;AAC9B,MAAI,YAAY,SAAS,QAAQ,WAAW;AAC5C,SAAO,MAAM;AACX,OAAI,YAAY,SAAS,UAAU,WAAW;EAC/C;CACF,GAAE,CAAC,UAAW,EAAC;AAChB,QAAO;AACR"}
|
package/dist/{useIsomorphicLayoutEffect-BtM0-_Y8.d.ts → useIsomorphicLayoutEffect-DYtMRdO-.d.ts}
RENAMED
|
@@ -4,4 +4,4 @@ import { useLayoutEffect } from "react";
|
|
|
4
4
|
declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { useIsomorphicLayoutEffect };
|
|
7
|
-
//# sourceMappingURL=useIsomorphicLayoutEffect-
|
|
7
|
+
//# sourceMappingURL=useIsomorphicLayoutEffect-DYtMRdO-.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsomorphicLayoutEffect-odKYwQAV.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,
|
|
1
|
+
{"version":3,"file":"useIsomorphicLayoutEffect-odKYwQAV.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,4BAA4B,OAAO,WAAW,cAAc,kBAAkB"}
|