@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":"useMediaQuery-ICPWsO_p.js","names":["query: string","query"],"sources":["../src/utilities/hooks/useMediaQuery/useMediaQuery.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect';\n\n/** Hook options. */\nexport type UseMediaQueryOptions = {\n /**\n * The default value to return if the hook is being run on the server.\n * @default false\n */\n defaultValue?: boolean;\n /**\n * If `true` (default), the hook will initialize reading the media query. In SSR, you should set it to `false`, returning `options.defaultValue` or `false` initially.\n * @default true\n */\n initializeWithValue?: boolean;\n};\n\nconst IS_SERVER = typeof window === 'undefined';\n\n/**\n * Custom hook that tracks the state of a media query using the [`Match Media API`](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia).\n * @param {string} query - The media query to track.\n * @param {?UseMediaQueryOptions} [options] - The options for customizing the behavior of the hook (optional).\n * @returns {boolean} The current state of the media query (true if the query matches, false otherwise).\n * @example\n * ```tsx\n * const isSmallScreen = useMediaQuery('(max-width: 600px)');\n * // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.\n * ```\n */\nexport function useMediaQuery(\n query: string,\n { defaultValue = false, initializeWithValue = true }: UseMediaQueryOptions = {},\n): boolean {\n const getMatches = (query: string): boolean => {\n if (IS_SERVER) {\n return defaultValue;\n }\n return window.matchMedia(query).matches;\n };\n\n const [matches, setMatches] = useState<boolean>(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n\n // Handles the change event of the media query.\n function handleChange() {\n setMatches(getMatches(query));\n }\n\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n\n // Triggered at the first client-side load and if query changes\n handleChange();\n\n // Use deprecated `addListener` and `removeListener` to support Safari < 14\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener('change', handleChange);\n }\n\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener('change', handleChange);\n }\n };\n }, [query]);\n\n return matches;\n}\n"],"mappings":";;;;AAkBA,MAAM,
|
|
1
|
+
{"version":3,"file":"useMediaQuery-ICPWsO_p.js","names":["query: string","query"],"sources":["../src/utilities/hooks/useMediaQuery/useMediaQuery.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect';\n\n/** Hook options. */\nexport type UseMediaQueryOptions = {\n /**\n * The default value to return if the hook is being run on the server.\n * @default false\n */\n defaultValue?: boolean;\n /**\n * If `true` (default), the hook will initialize reading the media query. In SSR, you should set it to `false`, returning `options.defaultValue` or `false` initially.\n * @default true\n */\n initializeWithValue?: boolean;\n};\n\nconst IS_SERVER = typeof window === 'undefined';\n\n/**\n * Custom hook that tracks the state of a media query using the [`Match Media API`](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia).\n * @param {string} query - The media query to track.\n * @param {?UseMediaQueryOptions} [options] - The options for customizing the behavior of the hook (optional).\n * @returns {boolean} The current state of the media query (true if the query matches, false otherwise).\n * @example\n * ```tsx\n * const isSmallScreen = useMediaQuery('(max-width: 600px)');\n * // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.\n * ```\n */\nexport function useMediaQuery(\n query: string,\n { defaultValue = false, initializeWithValue = true }: UseMediaQueryOptions = {},\n): boolean {\n const getMatches = (query: string): boolean => {\n if (IS_SERVER) {\n return defaultValue;\n }\n return window.matchMedia(query).matches;\n };\n\n const [matches, setMatches] = useState<boolean>(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n\n // Handles the change event of the media query.\n function handleChange() {\n setMatches(getMatches(query));\n }\n\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n\n // Triggered at the first client-side load and if query changes\n handleChange();\n\n // Use deprecated `addListener` and `removeListener` to support Safari < 14\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener('change', handleChange);\n }\n\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener('change', handleChange);\n }\n };\n }, [query]);\n\n return matches;\n}\n"],"mappings":";;;;AAkBA,MAAM,YAAY,OAAO,WAAW;;;;;;;;;;;;AAapC,SAAgB,cACdA,OACA,EAAE,eAAe,OAAO,sBAAsB,MAA4B,GAAG,CAAE,GACtE;CACT,MAAM,aAAa,CAACA,YAA2B;AAC7C,MAAI,UACF,QAAO;AAET,SAAO,OAAO,WAAWC,QAAM,CAAC;CACjC;CAED,MAAM,CAAC,SAAS,WAAW,GAAG,SAAkB,MAAM;AACpD,MAAI,oBACF,QAAO,WAAW,MAAM;AAE1B,SAAO;CACR,EAAC;CAGF,SAAS,eAAe;EACtB,WAAW,WAAW,MAAM,CAAC;CAC9B;CAED,0BAA0B,MAAM;EAC9B,MAAM,aAAa,OAAO,WAAW,MAAM;EAG3C,cAAc;AAGd,MAAI,WAAW,aACb,WAAW,YAAY,aAAa;OAEpC,WAAW,iBAAiB,UAAU,aAAa;AAGrD,SAAO,MAAM;AACX,OAAI,WAAW,gBACb,WAAW,eAAe,aAAa;QAEvC,WAAW,oBAAoB,UAAU,aAAa;EAEzD;CACF,GAAE,CAAC,KAAM,EAAC;AAEX,QAAO;AACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMergeRefs-DC710CHX.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,
|
|
1
|
+
{"version":3,"file":"useMergeRefs-DC710CHX.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,OAAiC,OAAU;CAE9D,MAAM,YAAY,YAAY,CAACC,aAA8B;EAC3D,MAAM,WAAW,KAAK,IAAI,CAAC,QAAQ;AACjC,OAAI,OAAO,KACT;AAGF,OAAI,OAAO,QAAQ,YAAY;IAC7B,MAAM,cAAc;IAEpB,MAAMC,aAAkC,YAAY,SAAS;AAC7D,WAAO,OAAO,eAAe,aACzB,aACA,MAAM;KACJ,YAAY,KAAK;IAClB;GACN;GAEA,IAAmC,UAAU;AAC9C,UAAO,MAAM;IACV,IAAmC,UAAU;GAC/C;EACF,EAAC;AAEF,SAAO,MAAM;AACX,QAAK,MAAM,cAAc,UACvB,cAAc;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;IACtB,WAAW,SAAS;IACnB,WAAmD,UAAU;GAC/D;AAED,OAAI,SAAS,MACV,WAAmD,UAAU,UAAU,MAAM;EAEjF;CAEF,GAAE,KAAK;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePagination-DQR72JNE.js","names":["start: number","end: number","itemList: (number | 'ellipsis')[]"],"sources":["../src/utilities/hooks/usePagination/usePagination.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport type { PaginationButtonProps } from '../../../components';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nconst range = (start: number, end: number) => {\n const length = end - start + 1;\n return Array.from({ length }, (_, i) => start + i);\n};\n\nexport type UsePaginationProps = {\n /**\n * The number of pages\n */\n count: number;\n /*\n * The current page. The numbering starts from `1`, if controlled\n * @default 1\n */\n page?: number;\n /*\n * The current page. The numbering starts from `1`, if uncontrolled\n * @default 1\n */\n defaultPage?: number;\n /**\n * Number of always visible pages at the beginning and end.\n * @default 1\n */\n boundaryCount?: number;\n /**\n * Number of always visible pages before and after the current page.\n * @default 1\n */\n siblingCount?: number;\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled?: boolean;\n /** Callback when the page changes */\n onPageChange?: (page: number) => void;\n};\n\n/**\n * Hook to help manage pagination state of a Pagination component.\n *\n * @example\n * const { pages, nextButtonProps, prevButtonProps } = usePagination({\n * page,\n * count: 10,\n * showPages: 7,\n * boundaryCount: 1,\n * siblingCount: 1,\n * })\n *\n * <Pagination>\n * <PaginationItem>\n * <PaginationButton {...prevButtonProps}>Previous</PaginationButton>\n * </PaginationItem>\n * {pages.map(({ page, itemKey, buttonProps }) => (\n * <PaginationItem key={itemKey}>\n * {typeof page === 'number' && (\n * <PaginationButton {...buttonProps} aria-label={`Page ${page}`}>\n * {page}\n * </PaginationButton>\n * )}\n * </PaginationItem>\n * ))}\n * <PaginationItem>\n * <PaginationButton {...nextButtonProps}>Next</PaginationButton>\n * </PaginationItem>\n * </Pagination>\n **/\nexport const usePagination = ({\n count,\n page: pageProp,\n defaultPage,\n boundaryCount = 1,\n siblingCount = 1,\n disabled = false,\n onPageChange,\n}: UsePaginationProps) => {\n const [page, setPage] = useControllableState({\n prop: pageProp,\n onChange: onPageChange,\n defaultProp: defaultPage ?? 1,\n caller: 'Pagination',\n });\n\n return useMemo(() => {\n const startPages = range(1, Math.min(boundaryCount, count));\n const endPages = range(Math.max(count - boundaryCount + 1, boundaryCount + 1), count);\n\n const siblingsStart = Math.max(\n Math.min(\n // Natural start\n page - siblingCount,\n // Lower boundary when page is high\n count - boundaryCount - siblingCount * 2 - 1,\n ),\n // Greater than startPages\n boundaryCount + 2,\n );\n\n const siblingsEnd = Math.min(\n Math.max(\n // Natural end\n page + siblingCount,\n // Upper boundary when page is low\n boundaryCount + siblingCount * 2 + 2,\n ),\n // Less than endPages\n count - boundaryCount - 1,\n );\n\n // Basic list of items to render, for example: itemList = ['previous', 1, 'ellipsis', 4, 5, 6, 'ellipsis', 10, 'next']\n const itemList: (number | 'ellipsis')[] = [\n ...startPages,\n\n // Start ellipsis\n ...(siblingsStart > boundaryCount + 2\n ? (['ellipsis'] as const)\n : boundaryCount + 1 < count - boundaryCount\n ? [boundaryCount + 1]\n : []),\n\n // Sibling pages\n ...range(siblingsStart, siblingsEnd),\n\n // End ellipsis\n ...(siblingsEnd < count - boundaryCount - 1\n ? (['ellipsis'] as const)\n : count - boundaryCount > boundaryCount\n ? [count - boundaryCount]\n : []),\n\n ...endPages,\n ];\n\n const hasNext = page < count;\n const hasPrev = page !== 1;\n\n return {\n /** Items and pages to be displayed */\n pages: itemList.map((item, index) => ({\n /** Page number, \"ellipsis\" for ellipsis items */\n page: item,\n /** Unique key for the item */\n key: typeof item === 'number' ? `page-${item}` : `ellipsis-${index}`,\n /** Properties to spread on PaginationButton */\n buttonProps: (typeof item === 'number'\n ? {\n 'aria-current': item === page ? 'page' : undefined,\n onClick: () => setPage(item),\n variant: 'text',\n }\n : null) satisfies PaginationButtonProps | null,\n })),\n /** Properties to spread on PaginationButton used for previous navigation */\n prevButtonProps: {\n disabled: disabled || !hasPrev,\n 'aria-disabled': disabled || !hasPrev, // Using aria-disabled to support all HTML elements if asChild is used\n onClick: () => setPage(page - 1),\n variant: 'text',\n } as PaginationButtonProps,\n /** Properties to spread on PaginationButton used for next naviagation */\n nextButtonProps: {\n disabled: disabled || !hasNext,\n 'aria-disabled': disabled || !hasNext, // Using aria-disabled to support all HTML elements if asChild is used\n onClick: () => setPage(page + 1),\n variant: 'text',\n } as PaginationButtonProps,\n /** If previous page action should be shown */\n hasPrev,\n /** If next page action should be shown */\n hasNext,\n };\n }, [boundaryCount, count, disabled, page, setPage, siblingCount]);\n};\n"],"mappings":";;;;AAIA,MAAM,QAAQ,CAACA,OAAeC,QAAgB;CAC5C,MAAM,SAAS,MAAM,QAAQ;AAC7B,QAAO,MAAM,KAAK,EAAE,OAAQ,GAAE,CAAC,GAAG,MAAM,QAAQ,EAAE;AACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkED,MAAa,gBAAgB,CAAC,EAC5B,OACA,MAAM,UACN,aACA,gBAAgB,GAChB,eAAe,GACf,WAAW,OACX,cACmB,KAAK;CACxB,MAAM,CAAC,MAAM,QAAQ,GAAG,qBAAqB;EAC3C,MAAM;EACN,UAAU;EACV,aAAa,eAAe;EAC5B,QAAQ;CACT,EAAC;AAEF,QAAO,QAAQ,MAAM;EACnB,MAAM,aAAa,MAAM,GAAG,KAAK,IAAI,eAAe,MAAM,CAAC;EAC3D,MAAM,WAAW,MAAM,KAAK,IAAI,QAAQ,gBAAgB,GAAG,gBAAgB,EAAE,EAAE,MAAM;EAErF,MAAM,gBAAgB,KAAK,IACzB,KAAK,IAEH,OAAO,cAEP,QAAQ,gBAAgB,eAAe,IAAI,EAC5C,EAED,gBAAgB,EACjB;EAED,MAAM,cAAc,KAAK,IACvB,KAAK,IAEH,OAAO,cAEP,gBAAgB,eAAe,IAAI,EACpC,EAED,QAAQ,gBAAgB,EACzB;EAGD,MAAMC,WAAoC;GACxC,GAAG;GAGH,GAAI,gBAAgB,gBAAgB,IAC/B,CAAC,UAAW,IACb,gBAAgB,IAAI,QAAQ,gBAC1B,CAAC,gBAAgB,CAAE,IACnB,CAAE;GAGR,GAAG,MAAM,eAAe,YAAY;GAGpC,GAAI,cAAc,QAAQ,gBAAgB,IACrC,CAAC,UAAW,IACb,QAAQ,gBAAgB,gBACtB,CAAC,QAAQ,aAAc,IACvB,CAAE;GAER,GAAG;EACJ;EAED,MAAM,UAAU,OAAO;EACvB,MAAM,UAAU,SAAS;AAEzB,SAAO;GAEL,OAAO,SAAS,IAAI,CAAC,MAAM,WAAW;IAEpC,MAAM;IAEN,
|
|
1
|
+
{"version":3,"file":"usePagination-DQR72JNE.js","names":["start: number","end: number","itemList: (number | 'ellipsis')[]"],"sources":["../src/utilities/hooks/usePagination/usePagination.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport type { PaginationButtonProps } from '../../../components';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nconst range = (start: number, end: number) => {\n const length = end - start + 1;\n return Array.from({ length }, (_, i) => start + i);\n};\n\nexport type UsePaginationProps = {\n /**\n * The number of pages\n */\n count: number;\n /*\n * The current page. The numbering starts from `1`, if controlled\n * @default 1\n */\n page?: number;\n /*\n * The current page. The numbering starts from `1`, if uncontrolled\n * @default 1\n */\n defaultPage?: number;\n /**\n * Number of always visible pages at the beginning and end.\n * @default 1\n */\n boundaryCount?: number;\n /**\n * Number of always visible pages before and after the current page.\n * @default 1\n */\n siblingCount?: number;\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled?: boolean;\n /** Callback when the page changes */\n onPageChange?: (page: number) => void;\n};\n\n/**\n * Hook to help manage pagination state of a Pagination component.\n *\n * @example\n * const { pages, nextButtonProps, prevButtonProps } = usePagination({\n * page,\n * count: 10,\n * showPages: 7,\n * boundaryCount: 1,\n * siblingCount: 1,\n * })\n *\n * <Pagination>\n * <PaginationItem>\n * <PaginationButton {...prevButtonProps}>Previous</PaginationButton>\n * </PaginationItem>\n * {pages.map(({ page, itemKey, buttonProps }) => (\n * <PaginationItem key={itemKey}>\n * {typeof page === 'number' && (\n * <PaginationButton {...buttonProps} aria-label={`Page ${page}`}>\n * {page}\n * </PaginationButton>\n * )}\n * </PaginationItem>\n * ))}\n * <PaginationItem>\n * <PaginationButton {...nextButtonProps}>Next</PaginationButton>\n * </PaginationItem>\n * </Pagination>\n **/\nexport const usePagination = ({\n count,\n page: pageProp,\n defaultPage,\n boundaryCount = 1,\n siblingCount = 1,\n disabled = false,\n onPageChange,\n}: UsePaginationProps) => {\n const [page, setPage] = useControllableState({\n prop: pageProp,\n onChange: onPageChange,\n defaultProp: defaultPage ?? 1,\n caller: 'Pagination',\n });\n\n return useMemo(() => {\n const startPages = range(1, Math.min(boundaryCount, count));\n const endPages = range(Math.max(count - boundaryCount + 1, boundaryCount + 1), count);\n\n const siblingsStart = Math.max(\n Math.min(\n // Natural start\n page - siblingCount,\n // Lower boundary when page is high\n count - boundaryCount - siblingCount * 2 - 1,\n ),\n // Greater than startPages\n boundaryCount + 2,\n );\n\n const siblingsEnd = Math.min(\n Math.max(\n // Natural end\n page + siblingCount,\n // Upper boundary when page is low\n boundaryCount + siblingCount * 2 + 2,\n ),\n // Less than endPages\n count - boundaryCount - 1,\n );\n\n // Basic list of items to render, for example: itemList = ['previous', 1, 'ellipsis', 4, 5, 6, 'ellipsis', 10, 'next']\n const itemList: (number | 'ellipsis')[] = [\n ...startPages,\n\n // Start ellipsis\n ...(siblingsStart > boundaryCount + 2\n ? (['ellipsis'] as const)\n : boundaryCount + 1 < count - boundaryCount\n ? [boundaryCount + 1]\n : []),\n\n // Sibling pages\n ...range(siblingsStart, siblingsEnd),\n\n // End ellipsis\n ...(siblingsEnd < count - boundaryCount - 1\n ? (['ellipsis'] as const)\n : count - boundaryCount > boundaryCount\n ? [count - boundaryCount]\n : []),\n\n ...endPages,\n ];\n\n const hasNext = page < count;\n const hasPrev = page !== 1;\n\n return {\n /** Items and pages to be displayed */\n pages: itemList.map((item, index) => ({\n /** Page number, \"ellipsis\" for ellipsis items */\n page: item,\n /** Unique key for the item */\n key: typeof item === 'number' ? `page-${item}` : `ellipsis-${index}`,\n /** Properties to spread on PaginationButton */\n buttonProps: (typeof item === 'number'\n ? {\n 'aria-current': item === page ? 'page' : undefined,\n onClick: () => setPage(item),\n variant: 'text',\n }\n : null) satisfies PaginationButtonProps | null,\n })),\n /** Properties to spread on PaginationButton used for previous navigation */\n prevButtonProps: {\n disabled: disabled || !hasPrev,\n 'aria-disabled': disabled || !hasPrev, // Using aria-disabled to support all HTML elements if asChild is used\n onClick: () => setPage(page - 1),\n variant: 'text',\n } as PaginationButtonProps,\n /** Properties to spread on PaginationButton used for next naviagation */\n nextButtonProps: {\n disabled: disabled || !hasNext,\n 'aria-disabled': disabled || !hasNext, // Using aria-disabled to support all HTML elements if asChild is used\n onClick: () => setPage(page + 1),\n variant: 'text',\n } as PaginationButtonProps,\n /** If previous page action should be shown */\n hasPrev,\n /** If next page action should be shown */\n hasNext,\n };\n }, [boundaryCount, count, disabled, page, setPage, siblingCount]);\n};\n"],"mappings":";;;;AAIA,MAAM,QAAQ,CAACA,OAAeC,QAAgB;CAC5C,MAAM,SAAS,MAAM,QAAQ;AAC7B,QAAO,MAAM,KAAK,EAAE,OAAQ,GAAE,CAAC,GAAG,MAAM,QAAQ,EAAE;AACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkED,MAAa,gBAAgB,CAAC,EAC5B,OACA,MAAM,UACN,aACA,gBAAgB,GAChB,eAAe,GACf,WAAW,OACX,cACmB,KAAK;CACxB,MAAM,CAAC,MAAM,QAAQ,GAAG,qBAAqB;EAC3C,MAAM;EACN,UAAU;EACV,aAAa,eAAe;EAC5B,QAAQ;CACT,EAAC;AAEF,QAAO,QAAQ,MAAM;EACnB,MAAM,aAAa,MAAM,GAAG,KAAK,IAAI,eAAe,MAAM,CAAC;EAC3D,MAAM,WAAW,MAAM,KAAK,IAAI,QAAQ,gBAAgB,GAAG,gBAAgB,EAAE,EAAE,MAAM;EAErF,MAAM,gBAAgB,KAAK,IACzB,KAAK,IAEH,OAAO,cAEP,QAAQ,gBAAgB,eAAe,IAAI,EAC5C,EAED,gBAAgB,EACjB;EAED,MAAM,cAAc,KAAK,IACvB,KAAK,IAEH,OAAO,cAEP,gBAAgB,eAAe,IAAI,EACpC,EAED,QAAQ,gBAAgB,EACzB;EAGD,MAAMC,WAAoC;GACxC,GAAG;GAGH,GAAI,gBAAgB,gBAAgB,IAC/B,CAAC,UAAW,IACb,gBAAgB,IAAI,QAAQ,gBAC1B,CAAC,gBAAgB,CAAE,IACnB,CAAE;GAGR,GAAG,MAAM,eAAe,YAAY;GAGpC,GAAI,cAAc,QAAQ,gBAAgB,IACrC,CAAC,UAAW,IACb,QAAQ,gBAAgB,gBACtB,CAAC,QAAQ,aAAc,IACvB,CAAE;GAER,GAAG;EACJ;EAED,MAAM,UAAU,OAAO;EACvB,MAAM,UAAU,SAAS;AAEzB,SAAO;GAEL,OAAO,SAAS,IAAI,CAAC,MAAM,WAAW;IAEpC,MAAM;IAEN,KAAK,OAAO,SAAS,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,SAAS,EAAE,OAAO;IAEpE,aAAc,OAAO,SAAS,WAC1B;KACE,gBAAgB,SAAS,OAAO,SAAS;KACzC,SAAS,MAAM,QAAQ,KAAK;KAC5B,SAAS;IACV,IACD;GACL,GAAE;GAEH,iBAAiB;IACf,UAAU,YAAY,CAAC;IACvB,iBAAiB,YAAY,CAAC;IAC9B,SAAS,MAAM,QAAQ,OAAO,EAAE;IAChC,SAAS;GACV;GAED,iBAAiB;IACf,UAAU,YAAY,CAAC;IACvB,iBAAiB,YAAY,CAAC;IAC9B,SAAS,MAAM,QAAQ,OAAO,EAAE;IAChC,SAAS;GACV;GAED;GAEA;EACD;CACF,GAAE;EAAC;EAAe;EAAO;EAAU;EAAM;EAAS;CAAa,EAAC;AAClE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollDirection-C2EmQi0U.js","names":[],"sources":["../src/utilities/hooks/useScrollDirection/useScrollDirection.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\n/**\n * A custom React hook that detects the vertical scroll direction of the page.\n *\n * @returns {'up' | 'down' | null} The current scroll direction. Returns `null` on the initial render.\n * The direction is only updated if the scroll distance exceeds a 5px threshold to prevent sensitivity to minor scroll jitter.\n */\nexport const useScrollDirection = () => {\n const [scrollDirection, setScrollDirection] = useState<'up' | 'down' | null>(null);\n useEffect(() => {\n let lastScrollY = window.pageYOffset;\n const updateScrollDirection = () => {\n const scrollY = window.pageYOffset;\n const direction = scrollY > lastScrollY ? 'down' : 'up';\n if (direction !== scrollDirection && (scrollY - lastScrollY > 5 || scrollY - lastScrollY < -5)) {\n setScrollDirection(direction);\n }\n lastScrollY = scrollY > 0 ? scrollY : 0;\n };\n window.addEventListener('scroll', updateScrollDirection);\n return () => window.removeEventListener('scroll', updateScrollDirection);\n }, [scrollDirection]);\n\n return scrollDirection;\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,qBAAqB,MAAM;CACtC,MAAM,CAAC,iBAAiB,mBAAmB,GAAG,SAA+B,KAAK;
|
|
1
|
+
{"version":3,"file":"useScrollDirection-C2EmQi0U.js","names":[],"sources":["../src/utilities/hooks/useScrollDirection/useScrollDirection.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\n/**\n * A custom React hook that detects the vertical scroll direction of the page.\n *\n * @returns {'up' | 'down' | null} The current scroll direction. Returns `null` on the initial render.\n * The direction is only updated if the scroll distance exceeds a 5px threshold to prevent sensitivity to minor scroll jitter.\n */\nexport const useScrollDirection = () => {\n const [scrollDirection, setScrollDirection] = useState<'up' | 'down' | null>(null);\n useEffect(() => {\n let lastScrollY = window.pageYOffset;\n const updateScrollDirection = () => {\n const scrollY = window.pageYOffset;\n const direction = scrollY > lastScrollY ? 'down' : 'up';\n if (direction !== scrollDirection && (scrollY - lastScrollY > 5 || scrollY - lastScrollY < -5)) {\n setScrollDirection(direction);\n }\n lastScrollY = scrollY > 0 ? scrollY : 0;\n };\n window.addEventListener('scroll', updateScrollDirection);\n return () => window.removeEventListener('scroll', updateScrollDirection);\n }, [scrollDirection]);\n\n return scrollDirection;\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,qBAAqB,MAAM;CACtC,MAAM,CAAC,iBAAiB,mBAAmB,GAAG,SAA+B,KAAK;CAClF,UAAU,MAAM;EACd,IAAI,cAAc,OAAO;EACzB,MAAM,wBAAwB,MAAM;GAClC,MAAM,UAAU,OAAO;GACvB,MAAM,YAAY,UAAU,cAAc,SAAS;AACnD,OAAI,cAAc,oBAAoB,UAAU,cAAc,KAAK,UAAU,cAAc,KACzF,mBAAmB,UAAU;GAE/B,cAAc,UAAU,IAAI,UAAU;EACvC;EACD,OAAO,iBAAiB,UAAU,sBAAsB;AACxD,SAAO,MAAM,OAAO,oBAAoB,UAAU,sBAAsB;CACzE,GAAE,CAAC,eAAgB,EAAC;AAErB,QAAO;AACR"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { UseCheckboxGroupOptions, useCheckboxGroup } from "../../useCheckboxGroup-
|
|
2
|
-
import { useIsomorphicLayoutEffect } from "../../useIsomorphicLayoutEffect-
|
|
3
|
-
import "../../types-
|
|
4
|
-
import { UsePaginationProps, usePagination } from "../../alert-footer-
|
|
5
|
-
import "../../dialog-trigger-context-
|
|
6
|
-
import "../../drawer-trigger-context-
|
|
7
|
-
import "../../popover-trigger-context-
|
|
8
|
-
import "../../dropdown-item-
|
|
9
|
-
import "../../dropdown-list-
|
|
10
|
-
import "../../footer-links-
|
|
11
|
-
import "../../pagination-item-
|
|
12
|
-
import "../../sticky-header-
|
|
13
|
-
import "../../index-
|
|
14
|
-
import { useIsElementAboveViewport } from "../../useIsElementAboveViewport-
|
|
15
|
-
import { useScrollDirection } from "../../useScrollDirection-
|
|
16
|
-
import { UseMediaQueryOptions, useMediaQuery } from "../../useMediaQuery-
|
|
17
|
-
import "../../types-
|
|
1
|
+
import { UseCheckboxGroupOptions, useCheckboxGroup } from "../../useCheckboxGroup-D61FVz37.js";
|
|
2
|
+
import { useIsomorphicLayoutEffect } from "../../useIsomorphicLayoutEffect-DYtMRdO-.js";
|
|
3
|
+
import "../../types-Bga-EYiy.js";
|
|
4
|
+
import { UsePaginationProps, usePagination } from "../../alert-footer-BS7TXc1g.js";
|
|
5
|
+
import "../../dialog-trigger-context-ClG9UVsz.js";
|
|
6
|
+
import "../../drawer-trigger-context-CNBRwj7l.js";
|
|
7
|
+
import "../../popover-trigger-context-8iojEYe0.js";
|
|
8
|
+
import "../../dropdown-item-CGg_2cV1.js";
|
|
9
|
+
import "../../dropdown-list-D8szW6_q.js";
|
|
10
|
+
import "../../footer-links-DlrXiXOi.js";
|
|
11
|
+
import "../../pagination-item-wgtqjgnC.js";
|
|
12
|
+
import "../../sticky-header-BMeHtK7e.js";
|
|
13
|
+
import "../../index-Cv0onxlx.js";
|
|
14
|
+
import { useIsElementAboveViewport } from "../../useIsElementAboveViewport-C3qzTbfj.js";
|
|
15
|
+
import { useScrollDirection } from "../../useScrollDirection-BmllObvZ.js";
|
|
16
|
+
import { UseMediaQueryOptions, useMediaQuery } from "../../useMediaQuery-DYDgFKom.js";
|
|
17
|
+
import "../../types-CtaqzrVi.js";
|
|
18
18
|
export { UseCheckboxGroupOptions, UseMediaQueryOptions, UsePaginationProps, useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
|
|
@@ -4,6 +4,6 @@ import { usePagination } from "../../usePagination-DQR72JNE.js";
|
|
|
4
4
|
import { useIsElementAboveViewport } from "../../useIsElementAboveViewport-lmdnXDdc.js";
|
|
5
5
|
import { useScrollDirection } from "../../useScrollDirection-C2EmQi0U.js";
|
|
6
6
|
import { useMediaQuery } from "../../useMediaQuery-ICPWsO_p.js";
|
|
7
|
-
import "../../hooks-
|
|
7
|
+
import "../../hooks-DLlERz_p.js";
|
|
8
8
|
|
|
9
9
|
export { useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UseCheckboxGroupOptions, UseCheckboxGroupReturn, useCheckboxGroup } from "../../../useCheckboxGroup-
|
|
1
|
+
import { UseCheckboxGroupOptions, UseCheckboxGroupReturn, useCheckboxGroup } from "../../../useCheckboxGroup-D61FVz37.js";
|
|
2
2
|
export { UseCheckboxGroupOptions, UseCheckboxGroupReturn, useCheckboxGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { useIsElementAboveViewport } from "../../../useIsElementAboveViewport-
|
|
1
|
+
import { useIsElementAboveViewport } from "../../../useIsElementAboveViewport-C3qzTbfj.js";
|
|
2
2
|
export { useIsElementAboveViewport };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { useIsomorphicLayoutEffect } from "../../../useIsomorphicLayoutEffect-
|
|
1
|
+
import { useIsomorphicLayoutEffect } from "../../../useIsomorphicLayoutEffect-DYtMRdO-.js";
|
|
2
2
|
export { useIsomorphicLayoutEffect };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UseMediaQueryOptions, useMediaQuery } from "../../../useMediaQuery-
|
|
1
|
+
import { UseMediaQueryOptions, useMediaQuery } from "../../../useMediaQuery-DYDgFKom.js";
|
|
2
2
|
export { UseMediaQueryOptions, useMediaQuery };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import "../../../useCheckboxGroup-
|
|
2
|
-
import "../../../useIsomorphicLayoutEffect-
|
|
3
|
-
import "../../../types-
|
|
4
|
-
import { UsePaginationProps, usePagination } from "../../../alert-footer-
|
|
5
|
-
import "../../../dialog-trigger-context-
|
|
6
|
-
import "../../../drawer-trigger-context-
|
|
7
|
-
import "../../../popover-trigger-context-
|
|
8
|
-
import "../../../dropdown-item-
|
|
9
|
-
import "../../../dropdown-list-
|
|
10
|
-
import "../../../footer-links-
|
|
11
|
-
import "../../../pagination-item-
|
|
12
|
-
import "../../../sticky-header-
|
|
13
|
-
import "../../../index-
|
|
14
|
-
import "../../../useIsElementAboveViewport-
|
|
15
|
-
import "../../../useScrollDirection-
|
|
16
|
-
import "../../../useMediaQuery-
|
|
17
|
-
import "../../../types-
|
|
1
|
+
import "../../../useCheckboxGroup-D61FVz37.js";
|
|
2
|
+
import "../../../useIsomorphicLayoutEffect-DYtMRdO-.js";
|
|
3
|
+
import "../../../types-Bga-EYiy.js";
|
|
4
|
+
import { UsePaginationProps, usePagination } from "../../../alert-footer-BS7TXc1g.js";
|
|
5
|
+
import "../../../dialog-trigger-context-ClG9UVsz.js";
|
|
6
|
+
import "../../../drawer-trigger-context-CNBRwj7l.js";
|
|
7
|
+
import "../../../popover-trigger-context-8iojEYe0.js";
|
|
8
|
+
import "../../../dropdown-item-CGg_2cV1.js";
|
|
9
|
+
import "../../../dropdown-list-D8szW6_q.js";
|
|
10
|
+
import "../../../footer-links-DlrXiXOi.js";
|
|
11
|
+
import "../../../pagination-item-wgtqjgnC.js";
|
|
12
|
+
import "../../../sticky-header-BMeHtK7e.js";
|
|
13
|
+
import "../../../index-Cv0onxlx.js";
|
|
14
|
+
import "../../../useIsElementAboveViewport-C3qzTbfj.js";
|
|
15
|
+
import "../../../useScrollDirection-BmllObvZ.js";
|
|
16
|
+
import "../../../useMediaQuery-DYDgFKom.js";
|
|
17
|
+
import "../../../types-CtaqzrVi.js";
|
|
18
18
|
export { UsePaginationProps, usePagination };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { useScrollDirection } from "../../../useScrollDirection-
|
|
1
|
+
import { useScrollDirection } from "../../../useScrollDirection-BmllObvZ.js";
|
|
2
2
|
export { useScrollDirection };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { UseCheckboxGroupOptions, useCheckboxGroup } from "../useCheckboxGroup-
|
|
2
|
-
import { useIsomorphicLayoutEffect } from "../useIsomorphicLayoutEffect-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { UsePaginationProps, usePagination } from "../alert-footer-
|
|
5
|
-
import "../dialog-trigger-context-
|
|
6
|
-
import "../drawer-trigger-context-
|
|
7
|
-
import "../popover-trigger-context-
|
|
8
|
-
import "../dropdown-item-
|
|
9
|
-
import "../dropdown-list-
|
|
10
|
-
import "../footer-links-
|
|
11
|
-
import "../pagination-item-
|
|
12
|
-
import "../sticky-header-
|
|
13
|
-
import "../index-
|
|
14
|
-
import { useIsElementAboveViewport } from "../useIsElementAboveViewport-
|
|
15
|
-
import { useScrollDirection } from "../useScrollDirection-
|
|
16
|
-
import { UseMediaQueryOptions, useMediaQuery } from "../useMediaQuery-
|
|
17
|
-
import { MergeRight } from "../types-
|
|
1
|
+
import { UseCheckboxGroupOptions, useCheckboxGroup } from "../useCheckboxGroup-D61FVz37.js";
|
|
2
|
+
import { useIsomorphicLayoutEffect } from "../useIsomorphicLayoutEffect-DYtMRdO-.js";
|
|
3
|
+
import "../types-Bga-EYiy.js";
|
|
4
|
+
import { UsePaginationProps, usePagination } from "../alert-footer-BS7TXc1g.js";
|
|
5
|
+
import "../dialog-trigger-context-ClG9UVsz.js";
|
|
6
|
+
import "../drawer-trigger-context-CNBRwj7l.js";
|
|
7
|
+
import "../popover-trigger-context-8iojEYe0.js";
|
|
8
|
+
import "../dropdown-item-CGg_2cV1.js";
|
|
9
|
+
import "../dropdown-list-D8szW6_q.js";
|
|
10
|
+
import "../footer-links-DlrXiXOi.js";
|
|
11
|
+
import "../pagination-item-wgtqjgnC.js";
|
|
12
|
+
import "../sticky-header-BMeHtK7e.js";
|
|
13
|
+
import "../index-Cv0onxlx.js";
|
|
14
|
+
import { useIsElementAboveViewport } from "../useIsElementAboveViewport-C3qzTbfj.js";
|
|
15
|
+
import { useScrollDirection } from "../useScrollDirection-BmllObvZ.js";
|
|
16
|
+
import { UseMediaQueryOptions, useMediaQuery } from "../useMediaQuery-DYDgFKom.js";
|
|
17
|
+
import { MergeRight } from "../types-CtaqzrVi.js";
|
|
18
18
|
export { MergeRight, UseCheckboxGroupOptions, UseMediaQueryOptions, UsePaginationProps, useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
|
package/dist/utilities/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { usePagination } from "../usePagination-DQR72JNE.js";
|
|
|
4
4
|
import { useIsElementAboveViewport } from "../useIsElementAboveViewport-lmdnXDdc.js";
|
|
5
5
|
import { useScrollDirection } from "../useScrollDirection-C2EmQi0U.js";
|
|
6
6
|
import { useMediaQuery } from "../useMediaQuery-ICPWsO_p.js";
|
|
7
|
-
import "../hooks-
|
|
8
|
-
import "../utilities-
|
|
7
|
+
import "../hooks-DLlERz_p.js";
|
|
8
|
+
import "../utilities-DanMK0XE.js";
|
|
9
9
|
|
|
10
10
|
export { useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MergeRight } from "../types-
|
|
1
|
+
import { MergeRight } from "../types-CtaqzrVi.js";
|
|
2
2
|
export { MergeRight };
|
package/dist/utilities/types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import clsx from "clsx/lite";
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
import {
|
|
3
|
+
import { ErrorIcon } from "@bi-digital/icons";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/validation-message/validation-message.tsx
|
|
@@ -10,10 +10,10 @@ const ValidationMessage = ({ children, className, icon, asChild, ref,...props })
|
|
|
10
10
|
className: clsx("bi-validation-message", className),
|
|
11
11
|
ref,
|
|
12
12
|
...props,
|
|
13
|
-
children: [icon || /* @__PURE__ */ jsx(
|
|
13
|
+
children: [icon || /* @__PURE__ */ jsx(ErrorIcon, {}), children]
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
18
18
|
export { ValidationMessage };
|
|
19
|
-
//# sourceMappingURL=validation-message-
|
|
19
|
+
//# sourceMappingURL=validation-message-CPGA4DxM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-message-CPGA4DxM.js","names":[],"sources":["../src/components/validation-message/validation-message.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { AsChildProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { ErrorIcon } from '@bi-digital/icons';\n\nexport type ValidationMessageProps = MergeRight<\n AsChildProps & HTMLAttributes<HTMLParagraphElement>,\n {\n /** Override the default warning icon. Must be a BiIcon to work correctly. */\n icon?: ReactNode;\n ref?: Ref<HTMLParagraphElement>;\n }\n>;\n\nexport const ValidationMessage = ({ children, className, icon, asChild, ref, ...props }: ValidationMessageProps) => {\n const Component = asChild ? Slot : 'p';\n\n return (\n <Component className={clsx('bi-validation-message', className)} ref={ref} {...props}>\n {icon || <ErrorIcon />}\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;;AAgBA,MAAa,oBAAoB,CAAC,EAAE,UAAU,WAAW,MAAM,SAAS,IAAK,GAAG,OAA+B,KAAK;CAClH,MAAM,YAAY,UAAU,OAAO;AAEnC,6BACG;EAAU,WAAW,KAAK,yBAAyB,UAAU;EAAO;EAAK,GAAI;aAC3E,4BAAS,cAAY,EACrB;GACS;AAEf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InitDropdownOptions, initDropdown } from "../../index-
|
|
1
|
+
import { InitDropdownOptions, initDropdown } from "../../index-CG8drCYo.js";
|
|
2
2
|
export { InitDropdownOptions, initDropdown };
|
package/dist/vanilla/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InitDropdownOptions, initDropdown } from "../index-
|
|
2
|
-
import { InitPopoverOptions, initPopover } from "../index-
|
|
3
|
-
import { InitSubNavbarOptions, initSubNavbar } from "../index-
|
|
1
|
+
import { InitDropdownOptions, initDropdown } from "../index-CG8drCYo.js";
|
|
2
|
+
import { InitPopoverOptions, initPopover } from "../index-ByVDkQOU.js";
|
|
3
|
+
import { InitSubNavbarOptions, initSubNavbar } from "../index-DH_DbgNa.js";
|
|
4
4
|
export { InitDropdownOptions, InitPopoverOptions, InitSubNavbarOptions, initDropdown, initPopover, initSubNavbar };
|
package/dist/vanilla/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { initPopover } from "../popover-
|
|
2
|
-
import { initDropdown } from "../dropdown-
|
|
3
|
-
import { initSubNavbar } from "../sub-navbar-
|
|
1
|
+
import { initPopover } from "../popover-DOMLkRA5.js";
|
|
2
|
+
import { initDropdown } from "../dropdown-Fzf2CeX4.js";
|
|
3
|
+
import { initSubNavbar } from "../sub-navbar-BdJ9EKsU.js";
|
|
4
4
|
|
|
5
5
|
export { initDropdown, initPopover, initSubNavbar };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InitPopoverOptions, initPopover } from "../../index-
|
|
1
|
+
import { InitPopoverOptions, initPopover } from "../../index-ByVDkQOU.js";
|
|
2
2
|
export { InitPopoverOptions, initPopover };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InitSubNavbarOptions, initSubNavbar } from "../../index-
|
|
1
|
+
import { InitSubNavbarOptions, initSubNavbar } from "../../index-DH_DbgNa.js";
|
|
2
2
|
export { InitSubNavbarOptions, initSubNavbar };
|
package/dist/vite-env.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bi-digital/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React components from BI Digital",
|
|
6
6
|
"author": "BI Digital",
|
|
7
|
+
"homepage": "https://designsystem.bi.no/",
|
|
7
8
|
"license": "ISC",
|
|
8
9
|
"module": "./dist/main.js",
|
|
9
10
|
"types": "./dist/main.d.ts",
|
|
@@ -24,36 +25,35 @@
|
|
|
24
25
|
"access": "public"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@floating-ui/dom": "^1.
|
|
28
|
-
"@radix-ui/react-slot": "^1.2.
|
|
28
|
+
"@floating-ui/dom": "^1.7.3",
|
|
29
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
29
30
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
30
31
|
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
31
|
-
"clsx": "^2.1.1"
|
|
32
|
+
"clsx": "^2.1.1",
|
|
33
|
+
"@bi-digital/icons": "0.3.0"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
|
-
"@testing-library/dom": "^10.4.
|
|
35
|
-
"@testing-library/jest-dom": "^6.6.
|
|
36
|
+
"@testing-library/dom": "^10.4.1",
|
|
37
|
+
"@testing-library/jest-dom": "^6.6.4",
|
|
36
38
|
"@testing-library/react": "^16.3.0",
|
|
37
39
|
"@testing-library/user-event": "^14.6.1",
|
|
38
|
-
"@types/node": "^
|
|
39
|
-
"@types/react": "^19.
|
|
40
|
-
"@types/react-dom": "^19.
|
|
41
|
-
"@vitest/coverage-v8": "^3.2.
|
|
42
|
-
"@vitest/expect": "^3.2.
|
|
40
|
+
"@types/node": "^24.2.1",
|
|
41
|
+
"@types/react": "^19.1.10",
|
|
42
|
+
"@types/react-dom": "^19.1.7",
|
|
43
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
44
|
+
"@vitest/expect": "^3.2.4",
|
|
43
45
|
"jsdom": "^26.1.0",
|
|
44
|
-
"react": "^19.
|
|
45
|
-
"react-dom": "^19.
|
|
46
|
+
"react": "^19.1.1",
|
|
47
|
+
"react-dom": "^19.1.1",
|
|
46
48
|
"tsconfck": "^3.1.6",
|
|
47
|
-
"tsdown": "^0.
|
|
48
|
-
"typescript": "^5.
|
|
49
|
-
"vitest": "^3.2.
|
|
50
|
-
"@bi-digital/icons-react": "0.2.23"
|
|
49
|
+
"tsdown": "^0.14.1",
|
|
50
|
+
"typescript": "^5.9.2",
|
|
51
|
+
"vitest": "^3.2.4"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"react": "^19",
|
|
54
55
|
"react-dom": "^19",
|
|
55
|
-
"@bi-digital/css": "0.
|
|
56
|
-
"@bi-digital/icons-react": "0.2.23"
|
|
56
|
+
"@bi-digital/css": "0.3.0"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsdown",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert-B0SyUQVj.js","names":["variantIcons: Record<NonNullable<AlertProps['variant']>, React.ComponentType>"],"sources":["../src/components/alert/alert.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { BiIconCheckmarkSmall, BiIconError, BiIconInformation, BiIconWarning } from '@bi-digital/icons-react';\n\nexport type AlertProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The alert variant.\n * @default 'info'\n */\n variant?: 'info' | 'success' | 'warning' | 'alert';\n /**\n * Size of the alert.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Custom close button. It's your responsibility to make the button close the alert. */\n closeButton?: ReactNode;\n /** Override the default icon which is decided by the `variant`. */\n icon?: ReactNode;\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\nconst variantIcons: Record<NonNullable<AlertProps['variant']>, React.ComponentType> = {\n info: BiIconInformation,\n success: BiIconCheckmarkSmall,\n warning: BiIconWarning,\n alert: BiIconError,\n};\n\nexport const Alert = ({\n className,\n children,\n closeButton,\n variant = 'info',\n icon,\n asChild,\n dark,\n size,\n ref,\n ...rest\n}: AlertProps) => {\n const Component = asChild ? Slot : 'div';\n const DefaultIcon = variantIcons[variant];\n return (\n <Component\n className={clsx('bi-alert', className)}\n data-variant={variant}\n data-size={size}\n data-dark={dark}\n ref={ref}\n {...rest}\n >\n {icon || <DefaultIcon />}\n {children}\n {closeButton}\n </Component>\n );\n};\n"],"mappings":";;;;;;AAiCA,MAAMA,eAAgF;CACpF,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;AACR;AAED,MAAa,QAAQ,CAAC,EACpB,WACA,UACA,aACA,UAAU,QACV,MACA,SACA,MACA,MACA,IACA,GAAG,MACQ,KAAK;CAChB,MAAM,YAAY,UAAU,OAAO;CACnC,MAAM,cAAc,aAAa;AACjC,wBACE,KAAC;EACC,WAAW,KAAK,YAAY,UAAU;EACtC,gBAAc;EACd,aAAW;EACX,aAAW;EACN;EACL,GAAI;;GAEH,wBAAQ,IAAC,gBAAc;GACvB;GACA;;GACS;AAEf"}
|
package/dist/alert-Ch1lDSMm.js
DELETED
|
File without changes
|
package/dist/avatar-B81bChIx.js
DELETED
|
File without changes
|
package/dist/badge-uRbNhCzA.js
DELETED
|
File without changes
|
package/dist/button-vrN4Zwch.js
DELETED
|
File without changes
|
package/dist/card-BK1MS46W.js
DELETED
|
File without changes
|
|
File without changes
|
package/dist/chip-CotWEWjj.js
DELETED
|
File without changes
|
|
File without changes
|
package/dist/dialog-CCde3DPt.js
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-close-button-B4zf0hvt.js","names":[],"sources":["../src/components/dialog/dialog-close-button.tsx"],"sourcesContent":["import { BiIconCrossSmall } from '@bi-digital/icons-react';\nimport { Button, type ButtonProps } from '../button';\n\nexport type DialogCloseButtonProps = Omit<ButtonProps, 'asChild' | 'type' | 'name'>;\n\nexport const DialogCloseButton = ({ children, ref, ...props }: DialogCloseButtonProps) => {\n return (\n <form method='dialog'>\n <Button ref={ref} autoFocus icon name='close' type='submit' variant='text' {...props}>\n {children || <BiIconCrossSmall aria-hidden='true' />}\n </Button>\n </form>\n );\n};\n"],"mappings":";;;;;AAKA,MAAa,oBAAoB,CAAC,EAAE,UAAU,IAAK,GAAG,OAA+B,KAAK;AACxF,wBACE,IAAC;EAAK,QAAO;4BACX,IAAC;GAAY;GAAK;GAAU;GAAK,MAAK;GAAQ,MAAK;GAAS,SAAQ;GAAO,GAAI;aAC5E,4BAAY,IAAC,oBAAiB,eAAY,SAAS;IAC7C;GACJ;AAEV"}
|
package/dist/drawer-Cc670B_f.js
DELETED
|
File without changes
|
|
File without changes
|
package/dist/field-B7y2WBzu.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-group-DMSPaCQt.js","names":[],"sources":["../src/components/filter-group/filter-group.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport clsx from 'clsx';\nimport { type Ref, useId, type HtmlHTMLAttributes, type ReactNode } from 'react';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { BiIconChevronDown, BiIconChevronUp } from '@bi-digital/icons-react';\n\nexport type FilterGroupProps = MergeRight<\n DefaultProps & AsChildProps & HtmlHTMLAttributes<HTMLDivElement>,\n {\n /** Icon displayed in the filter group */\n icon: ReactNode;\n /** Label of the filter group */\n label: ReactNode;\n /** Default open state of the filter group, should not be used together with `open` */\n defaultOpen?: boolean;\n /** Control the open state of the filter group */\n open?: boolean;\n /** Callback when the open state changes */\n onOpenChange?: (open: boolean) => void;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const FilterGroup = ({\n dark,\n icon,\n label,\n defaultOpen = false,\n open,\n onOpenChange,\n children,\n className,\n ref,\n ...props\n}: FilterGroupProps) => {\n const filterContentId = useId();\n const [isOpen, setIsOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: defaultOpen,\n caller: 'FilterGroup',\n });\n return (\n <div className={clsx('bi-filter-group', className)} data-dark={dark} data-expanded={isOpen} {...props} ref={ref}>\n <button onClick={() => setIsOpen((prev) => !prev)} aria-expanded={isOpen} aria-controls={filterContentId}>\n {icon}\n <h3>{label}</h3>\n {isOpen ? <BiIconChevronUp /> : <BiIconChevronDown />}\n </button>\n <div id={filterContentId}>{children}</div>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAwBA,MAAa,cAAc,CAAC,EAC1B,MACA,MACA,OACA,cAAc,OACd,MACA,cACA,UACA,WACA,IACA,GAAG,OACc,KAAK;CACtB,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,QAAQ,UAAU,GAAG,qBAAqB;EAC/C,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;CACT,EAAC;AACF,wBACE,KAAC;EAAI,WAAW,KAAK,mBAAmB,UAAU;EAAE,aAAW;EAAM,iBAAe;EAAQ,GAAI;EAAY;6BAC1G,KAAC;GAAO,SAAS,MAAM,UAAU,CAAC,UAAU,KAAK;GAAE,iBAAe;GAAQ,iBAAe;;IACtF;oBACD,IAAC,kBAAI,QAAW;IACf,yBAAS,IAAC,oBAAkB,mBAAG,IAAC,sBAAoB;;IAC9C,kBACT,IAAC;GAAI,IAAI;GAAkB;IAAe;GACtC;AAET"}
|
package/dist/footer-BThmhXy7.js
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"footer-CU7LdbPO.js","names":[],"sources":["../src/components/footer/footer.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { BiIconFacebook, BiIconX, BiIconLinkedin, BiIconInstagram } from '@bi-digital/icons-react';\nimport { Button } from '../button';\n\nexport type FooterProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The text to display in the copyright section.\n * @default 'Handelshøyskolen BI'\n */\n copyRightText?: string;\n /**\n * Whether to hide the accreditation icons.\n * @default false\n */\n hideAccreditationIcons?: boolean;\n /**\n * Whether to hide the social media icons.\n * @default false\n */\n hideSocialMediaIcons?: boolean;\n /**\n * Whether to hide the copyright text.\n * @default false\n */\n hideCopyRight?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const Footer = ({\n dark,\n copyRightText = 'Handelshøyskolen BI',\n hideAccreditationIcons = false,\n hideSocialMediaIcons = false,\n hideCopyRight = false,\n className,\n children,\n ref,\n ...props\n}: FooterProps) => {\n return (\n <footer className={clsx('bi-footer', className)} data-dark={dark} ref={ref} {...props}>\n <div className='bi-footer--links-container'>{children}</div>\n {!hideAccreditationIcons && (\n <div className='bi-footer--accreditations'>\n <a\n aria-label='AACSB-link'\n target='_blank'\n href='https://www.aacsb.edu/accreditation'\n rel='noopener noreferrer'\n >\n <span className='bi-footer--aacsb' />\n </a>\n <a\n aria-label='Equis-link'\n target='_blank'\n href='https://www.efmdglobal.org/accreditations/business-schools/equis/'\n rel='noopener noreferrer'\n >\n <span className='bi-footer--equis' />\n </a>\n <a aria-label='AMBA-link' target='_blank' href='https://www.associationofmbas.com/' rel='noopener noreferrer'>\n <span className='bi-footer--amba' />\n </a>\n </div>\n )}\n {!hideSocialMediaIcons && (\n <div className='bi-footer--socials'>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a target='_blank' href='https://www.facebook.com/HandelshoyskolenBI/' rel='noopener noreferrer'>\n <BiIconFacebook title='BI Facebook' />\n </a>\n </Button>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a target='_blank' href='https://twitter.com/handelshoyskbi' rel='noopener noreferrer'>\n <BiIconX title='BI X' />\n </a>\n </Button>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a\n target='_blank'\n href='https://www.linkedin.com/school/bi-norwegian-business-school/'\n rel='noopener noreferrer'\n >\n <BiIconLinkedin title='BI LinkedIn' />\n </a>\n </Button>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a target='_blank' href='https://www.instagram.com/binorwegianbusinesschool/' rel='noopener noreferrer'>\n <BiIconInstagram title='BI Instagram' />\n </a>\n </Button>\n </div>\n )}\n {!hideCopyRight && <p className='bi-footer--copyright'>{`© ${new Date().getFullYear()} ${copyRightText}`}</p>}\n </footer>\n );\n};\n"],"mappings":";;;;;;AAkCA,MAAa,SAAS,CAAC,EACrB,MACA,gBAAgB,uBAChB,yBAAyB,OACzB,uBAAuB,OACvB,gBAAgB,OAChB,WACA,UACA,IACA,GAAG,OACS,KAAK;AACjB,wBACE,KAAC;EAAO,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;;mBAC9E,IAAC;IAAI,WAAU;IAA8B;KAAe;IAC1D,0CACA,KAAC;IAAI,WAAU;;qBACb,IAAC;MACC,cAAW;MACX,QAAO;MACP,MAAK;MACL,KAAI;gCAEJ,IAAC,UAAK,WAAU,qBAAqB;OACnC;qBACJ,IAAC;MACC,cAAW;MACX,QAAO;MACP,MAAK;MACL,KAAI;gCAEJ,IAAC,UAAK,WAAU,qBAAqB;OACnC;qBACJ,IAAC;MAAE,cAAW;MAAY,QAAO;MAAS,MAAK;MAAqC,KAAI;gCACtF,IAAC,UAAK,WAAU,oBAAoB;OAClC;;KACA;IAEN,wCACA,KAAC;IAAI,WAAU;;qBACb,IAAC;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;gCACrD,IAAC;OAAE,QAAO;OAAS,MAAK;OAA+C,KAAI;iCACzE,IAAC,kBAAe,OAAM,gBAAgB;QACpC;OACG;qBACT,IAAC;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;gCACrD,IAAC;OAAE,QAAO;OAAS,MAAK;OAAqC,KAAI;iCAC/D,IAAC,WAAQ,OAAM,SAAS;QACtB;OACG;qBACT,IAAC;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;gCACrD,IAAC;OACC,QAAO;OACP,MAAK;OACL,KAAI;iCAEJ,IAAC,kBAAe,OAAM,gBAAgB;QACpC;OACG;qBACT,IAAC;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;gCACrD,IAAC;OAAE,QAAO;OAAS,MAAK;OAAsD,KAAI;iCAChF,IAAC,mBAAgB,OAAM,iBAAiB;QACtC;OACG;;KACL;IAEN,iCAAiB,IAAC;IAAE,WAAU;eAAyB,IAAI,qBAAI,QAAO,aAAa,CAAC,GAAG,cAAc;KAAM;;GACtG;AAEZ"}
|
package/dist/hooks-A8EMc2jd.js
DELETED
|
File without changes
|
package/dist/index-CTw2zfCM.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/input-03FO9IIL.js
DELETED
|
File without changes
|
package/dist/label-nhrfSiaP.js
DELETED
|
File without changes
|
package/dist/link-oWcjwJYP.js
DELETED
|
File without changes
|
package/dist/logo-Dx-VZMJu.js
DELETED
|
File without changes
|
package/dist/navbar-CgY7xCrh.js
DELETED
|
File without changes
|
|
File without changes
|
package/dist/popover-Ch_2ehYy.js
DELETED
|
File without changes
|
package/dist/radio-CqUVAF9T.js
DELETED
|
File without changes
|
package/dist/search-DPfMkuMX.js
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-DRgmqncD.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 /** 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 }\n>;\n\nexport const Search = ({\n className,\n onSubmit,\n onReset,\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 const handleReset = () => {\n if (onReset) {\n onReset('');\n }\n };\n return (\n <Field className={clsx('bi-search', className)} data-dark={dark} style={style} asChild>\n <form onSubmit={handleSubmit} onReset={handleReset}>\n <FieldAffixes>\n <FieldAffix>\n <BiIconMagnefyingGlass 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 <BiIconCrossSmall size={size} aria-hidden='true' />\n </Button>\n </FieldAffix>\n </FieldAffixes>\n </form>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;AA2BA,MAAa,SAAS,CAAC,EACrB,WACA,UACA,SACA,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;CACD,MAAM,cAAc,MAAM;AACxB,MAAI,QACF,SAAQ,GAAG;CAEd;AACD,wBACE,IAAC;EAAM,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAa;EAAO;4BAC7E,IAAC;GAAK,UAAU;GAAc,SAAS;6BACrC,KAAC;oBACC,IAAC,wCACC,IAAC,yBAA4B,OAAQ,GAC1B;oBACb,IAAC;KAAM,MAAK;KAAY;KAAW;KAAY;KAAM,GAAI;MAAS;oBAClE,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"}
|
package/dist/select-COon86Fr.js
DELETED
|
File without changes
|
|
File without changes
|
package/dist/spinner-CPiGcSIc.js
DELETED
|
File without changes
|
|
File without changes
|
package/dist/tabs-Gam5A0Jd.js
DELETED
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"textfield-Di-19dz-.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 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":";;;;;;;;;;;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;KACZ;KACN,GAAK;MACL,mBAEF,IAAC;KACK;KACC;KACL,gBAAc,QAAQ,MAAM;KAC5B,oBAAkB;KACZ;KACN,GAAK;MACL;IAEH,0BAAU,IAAC,wBAAY,SAAoB;OAC/B;KACZ,yBAAS,IAAC;IAAkB,IAAI;cAAe;KAA0B;;GACtE;AAEX"}
|
|
File without changes
|
|
File without changes
|