@chassis-ui/react 0.2.0 → 0.4.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/LICENSE +1 -1
- package/README.md +56 -23
- package/dist/accordion.js +1 -1
- package/dist/alert.d.ts +2 -0
- package/dist/alert.js +1 -0
- package/dist/autocomplete.d.ts +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +1 -1
- package/dist/badge.js +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button-group.d.ts +1 -1
- package/dist/button-group.js +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.d.ts +1 -1
- package/dist/carousel.js +1 -1
- package/dist/checkbox.d.ts +2 -2
- package/dist/checkbox.js +1 -1
- package/dist/chip-input.js +1 -1
- package/dist/chip.d.ts +1 -1
- package/dist/chip.js +1 -1
- package/dist/chunks/Button-BoymWE-L.js +2 -0
- package/dist/chunks/Button-BoymWE-L.js.map +1 -0
- package/dist/chunks/{Button-Cptd4Yk7.d.ts → Button-BuZ_GOHS.d.ts} +3 -2
- package/dist/chunks/Chip-DCaWaBqo.js +2 -0
- package/dist/chunks/Chip-DCaWaBqo.js.map +1 -0
- package/dist/chunks/CloseButton-DPgQztE0.js +2 -0
- package/dist/chunks/CloseButton-DPgQztE0.js.map +1 -0
- package/dist/chunks/ComboboxItem-C9TpoJOI.d.ts +2 -1
- package/dist/chunks/ComboboxListBox-Cm3L1ULl.js +2 -0
- package/dist/chunks/ComboboxListBox-Cm3L1ULl.js.map +1 -0
- package/dist/chunks/DateSegment-2agXAd0f.js +2 -0
- package/dist/chunks/DateSegment-2agXAd0f.js.map +1 -0
- package/dist/chunks/{FormHelp-Be2PQL0y.js → FormHelp-AE6_iSLJ.js} +2 -1
- package/dist/chunks/FormHelp-AE6_iSLJ.js.map +1 -0
- package/dist/chunks/FormLabel-CYcQiFUI.js +2 -1
- package/dist/chunks/FormLabel-CYcQiFUI.js.map +1 -0
- package/dist/chunks/Icon-CioraWLF.d.ts +2 -1
- package/dist/chunks/Icon-DLB1f88W.js +2 -0
- package/dist/chunks/Icon-DLB1f88W.js.map +1 -0
- package/dist/chunks/{Link-B0Y1xgYi.d.ts → Link-CKymd2ru.d.ts} +8 -6
- package/dist/chunks/Link-CZsWCnQb.js +2 -0
- package/dist/chunks/Link-CZsWCnQb.js.map +1 -0
- package/dist/chunks/Menu-CSBg2Zmc.js +2 -0
- package/dist/chunks/Menu-CSBg2Zmc.js.map +1 -0
- package/dist/chunks/Menu-QeYOzrUL.d.ts +95 -0
- package/dist/chunks/MenuItemDef-D0VDtYIQ.d.ts +2 -1
- package/dist/chunks/MenuToggle-BdQtF7FV.js +2 -0
- package/dist/chunks/MenuToggle-BdQtF7FV.js.map +1 -0
- package/dist/chunks/Portal-CgeR1WXV.js +2 -0
- package/dist/chunks/Portal-CgeR1WXV.js.map +1 -0
- package/dist/chunks/RangeCalendar-BJl-j4W2.js +2 -0
- package/dist/chunks/RangeCalendar-BJl-j4W2.js.map +1 -0
- package/dist/chunks/VisuallyHidden-C2dM7HhC.js +2 -0
- package/dist/chunks/VisuallyHidden-C2dM7HhC.js.map +1 -0
- package/dist/chunks/accordion-B8UWyvQB.js +2 -0
- package/dist/chunks/accordion-B8UWyvQB.js.map +1 -0
- package/dist/chunks/alert-BXI-_qlt.js +2 -0
- package/dist/chunks/alert-BXI-_qlt.js.map +1 -0
- package/dist/chunks/autocomplete-Baf9VSHN.js +2 -0
- package/dist/chunks/autocomplete-Baf9VSHN.js.map +1 -0
- package/dist/chunks/avatar-S3dGy6Qc.js +2 -0
- package/dist/chunks/avatar-S3dGy6Qc.js.map +1 -0
- package/dist/chunks/{badge-Bj8mf8lu.js → badge-D2oztCvs.js} +2 -1
- package/dist/chunks/badge-D2oztCvs.js.map +1 -0
- package/dist/chunks/{breadcrumb-DDxnx_iS.js → breadcrumb-s6J9itez.js} +2 -1
- package/dist/chunks/breadcrumb-s6J9itez.js.map +1 -0
- package/dist/chunks/breakpoints-CGk8szzR.js +2 -0
- package/dist/chunks/breakpoints-CGk8szzR.js.map +1 -0
- package/dist/chunks/breakpoints-ECy4lKQT.d.ts +6 -0
- package/dist/chunks/button-group-BGppPrIv.js +2 -0
- package/dist/chunks/button-group-BGppPrIv.js.map +1 -0
- package/dist/chunks/card-CobeDpf1.js +2 -0
- package/dist/chunks/card-CobeDpf1.js.map +1 -0
- package/dist/chunks/carousel-fTVPqnSV.js +2 -0
- package/dist/chunks/carousel-fTVPqnSV.js.map +1 -0
- package/dist/chunks/checkbox-ZyQn5Ku5.js +2 -0
- package/dist/chunks/checkbox-ZyQn5Ku5.js.map +1 -0
- package/dist/chunks/chip-input-BpVDRERg.js +2 -0
- package/dist/chunks/chip-input-BpVDRERg.js.map +1 -0
- package/dist/chunks/collapse--Go2Y73B.js +2 -0
- package/dist/chunks/collapse--Go2Y73B.js.map +1 -0
- package/dist/chunks/{color-input-CyRaLR_G.js → color-input-Bwl5ef5B.js} +2 -1
- package/dist/chunks/color-input-Bwl5ef5B.js.map +1 -0
- package/dist/chunks/combobox-Bp1tIaiW.js +2 -0
- package/dist/chunks/combobox-Bp1tIaiW.js.map +1 -0
- package/dist/chunks/context-menu-B4a0tS-h.js +2 -0
- package/dist/chunks/context-menu-B4a0tS-h.js.map +1 -0
- package/dist/chunks/datagrid-CH3Cy-q7.js +3 -0
- package/dist/chunks/datagrid-CH3Cy-q7.js.map +1 -0
- package/dist/chunks/dateRangePresets-R1FtA1zp.d.ts +2 -1
- package/dist/chunks/datepicker-bOiM_zhJ.js +2 -0
- package/dist/chunks/datepicker-bOiM_zhJ.js.map +1 -0
- package/dist/chunks/dialogTransition-i9vw0i2Z.js +2 -1
- package/dist/chunks/dialogTransition-i9vw0i2Z.js.map +1 -0
- package/dist/chunks/direction-LN6uwsK5.js +2 -0
- package/dist/chunks/direction-LN6uwsK5.js.map +1 -0
- package/dist/chunks/divider-CjbF4OfA.js +2 -0
- package/dist/chunks/divider-CjbF4OfA.js.map +1 -0
- package/dist/chunks/drawer-C7Tz4XU_.js +2 -0
- package/dist/chunks/drawer-C7Tz4XU_.js.map +1 -0
- package/dist/chunks/{file-input-RRqZSzjH.js → file-input-CDM6qrmV.js} +2 -1
- package/dist/chunks/file-input-CDM6qrmV.js.map +1 -0
- package/dist/chunks/flex-B52oLCCC.js +2 -0
- package/dist/chunks/flex-B52oLCCC.js.map +1 -0
- package/dist/chunks/floating-input-DmSZZc27.js +2 -0
- package/dist/chunks/floating-input-DmSZZc27.js.map +1 -0
- package/dist/chunks/focus-ring-SR_LwaN7.js +2 -1
- package/dist/chunks/focus-ring-SR_LwaN7.js.map +1 -0
- package/dist/chunks/focusRedirect-BrvK3U_o.js +2 -1
- package/dist/chunks/focusRedirect-BrvK3U_o.js.map +1 -0
- package/dist/chunks/form-GpdAyWWi.js +2 -1
- package/dist/chunks/form-GpdAyWWi.js.map +1 -0
- package/dist/chunks/form-field-CNPGTMiW.js +2 -0
- package/dist/chunks/form-field-CNPGTMiW.js.map +1 -0
- package/dist/chunks/grid-C7tO-ppc.js +2 -0
- package/dist/chunks/grid-C7tO-ppc.js.map +1 -0
- package/dist/chunks/{icon-mxYpL5nL.js → icon-BQsT6YtE.js} +2 -1
- package/dist/chunks/icon-BQsT6YtE.js.map +1 -0
- package/dist/chunks/{iconConfig-Bu6Pt9o3.d.ts → iconConfig-C6gbYhsD.d.ts} +5 -3
- package/dist/chunks/iconSlot-BNu2MrFI.js +2 -0
- package/dist/chunks/iconSlot-BNu2MrFI.js.map +1 -0
- package/dist/chunks/{index-BKMW0rkw.d.ts → index-0jbACjYQ.d.ts} +5 -3
- package/dist/chunks/{index-BO_1MN66.d.ts → index-4cKG9KWB.d.ts} +3 -5
- package/dist/chunks/index-6uob77s9.d.ts +2 -1
- package/dist/chunks/{index-tOodmT36.d.ts → index-91YA-jkp.d.ts} +4 -6
- package/dist/chunks/index-9rQeMqVI.d.ts +42 -0
- package/dist/chunks/index-B0-8n-Gs.d.ts +2 -1
- package/dist/chunks/{index-D9PZHY_I.d.ts → index-B19ZH3fm.d.ts} +3 -2
- package/dist/chunks/{index-COsIPd8L.d.ts → index-B1kw0jzM.d.ts} +3 -2
- package/dist/chunks/index-B2K-O9kl.d.ts +59 -0
- package/dist/chunks/{index-CJzKu7QI.d.ts → index-B5bF1JxF.d.ts} +3 -2
- package/dist/chunks/index-B8uaSJA9.d.ts +2 -1
- package/dist/chunks/index-BA-raEMm.d.ts +2 -1
- package/dist/chunks/{index-C61tPIJ-.d.ts → index-BAsbRx5n.d.ts} +6 -2
- package/dist/chunks/index-BF3OWUVc.d.ts +66 -0
- package/dist/chunks/{index-Ctuk1xBU.d.ts → index-BLS1jhSJ.d.ts} +10 -7
- package/dist/chunks/{index-JllMXhVx.d.ts → index-BMkbJVHg.d.ts} +22 -5
- package/dist/chunks/{index-DB_ToPdz.d.ts → index-BNf0jIIL.d.ts} +12 -1
- package/dist/chunks/{index-t_x6jj7l.d.ts → index-BOx8v-oT.d.ts} +3 -2
- package/dist/chunks/index-BSLneLYu.d.ts +79 -0
- package/dist/chunks/index-BVGGIaPX.d.ts +2 -1
- package/dist/chunks/{index-qgZ5VGmc.d.ts → index-B_UzbGOa.d.ts} +20 -2
- package/dist/chunks/{index-XjLvaH4G.d.ts → index-BfEJYF4c.d.ts} +7 -6
- package/dist/chunks/index-Bi8FFadV.d.ts +2 -1
- package/dist/chunks/index-Bkj17NEQ.d.ts +2 -1
- package/dist/chunks/{index--0_IpTDT.d.ts → index-BxROljJI.d.ts} +3 -2
- package/dist/chunks/index-Bz8MDq0H.d.ts +85 -0
- package/dist/chunks/{index-Cf2n0l0U.d.ts → index-C4Dks__B.d.ts} +3 -2
- package/dist/chunks/{index-CRfm7W6C.d.ts → index-C9gzVqwX.d.ts} +3 -2
- package/dist/chunks/index-CCXJXToc.d.ts +2 -1
- package/dist/chunks/{index-COsYSDrz.d.ts → index-CFnQubsV.d.ts} +17 -3
- package/dist/chunks/{index-8PhBSbNQ.d.ts → index-CHQR8x8_.d.ts} +16 -17
- package/dist/chunks/{index-BTTeKpiE.d.ts → index-CIwzgZJi.d.ts} +3 -2
- package/dist/chunks/{index-dh3TKanY.d.ts → index-CTpwB1yR.d.ts} +3 -2
- package/dist/chunks/{index-DR8sYtvd.d.ts → index-CYvVmTPR.d.ts} +20 -87
- package/dist/chunks/{index-Dum6Y9XR.d.ts → index-Cc4SSslb.d.ts} +20 -2
- package/dist/chunks/index-CftERHnE.d.ts +2 -1
- package/dist/chunks/{index-CaQ1JY5D.d.ts → index-Ci7AEgEc.d.ts} +4 -6
- package/dist/chunks/{index-DKma0jQw.d.ts → index-CjT_4IZx.d.ts} +4 -3
- package/dist/chunks/{index-BxTlIaZu.d.ts → index-CqZ68Z8R.d.ts} +125 -11
- package/dist/chunks/{index-D2VVO8rx.d.ts → index-CsARGAzD.d.ts} +3 -2
- package/dist/chunks/index-CxjNw4ss.d.ts +216 -0
- package/dist/chunks/index-DAoPg59I.d.ts +2 -1
- package/dist/chunks/index-DHGgezXU.d.ts +2 -1
- package/dist/chunks/index-DHOG_rjE.d.ts +121 -0
- package/dist/chunks/index-DHcztR18.d.ts +208 -0
- package/dist/chunks/index-DJfga0Ce.d.ts +57 -0
- package/dist/chunks/{index-DJJocp_q.d.ts → index-DM01FX3a.d.ts} +4 -3
- package/dist/chunks/index-DMbdEm__.d.ts +119 -0
- package/dist/chunks/{index-BlgkO3dn.d.ts → index-DP5xugE-.d.ts} +25 -34
- package/dist/chunks/index-DPCwFiJL.d.ts +95 -0
- package/dist/chunks/{index-BTDgfLxK.d.ts → index-DQImhbhy.d.ts} +21 -5
- package/dist/chunks/index-DaHQdNul.d.ts +182 -0
- package/dist/chunks/index-Dcc_W6Kv.d.ts +2 -1
- package/dist/chunks/index-Ddd7iWfm.d.ts +32 -0
- package/dist/chunks/index-Dfg4Ftb8.d.ts +2 -1
- package/dist/chunks/index-DtbUXxjz.d.ts +2 -1
- package/dist/chunks/{index-DPV62IdF.d.ts → index-DtvHH_Mb.d.ts} +12 -10
- package/dist/chunks/index-Du9fBqkT.d.ts +56 -0
- package/dist/chunks/index-HrKN6s8z.d.ts +2 -1
- package/dist/chunks/{index-ClT3E_hv.d.ts → index-NGgDkhyn.d.ts} +19 -25
- package/dist/chunks/{index-Dfy1YW5j.d.ts → index-U27Ar174.d.ts} +3 -2
- package/dist/chunks/{index-CsMIgBsd.d.ts → index-YJ9QdBuq.d.ts} +10 -10
- package/dist/chunks/{index-Dh5CaHTP.d.ts → index-aRdgpeRb.d.ts} +3 -2
- package/dist/chunks/index-g74gO0pc.d.ts +36 -0
- package/dist/chunks/{index-BO9jLOIb.d.ts → index-lSPcxiii.d.ts} +3 -2
- package/dist/chunks/{index-nklPDKlC.d.ts → index-x0vZRyoU.d.ts} +4 -3
- package/dist/chunks/{input-adorn-C_EHML68.js → input-adorn-DwdX-jxA.js} +2 -1
- package/dist/chunks/input-adorn-DwdX-jxA.js.map +1 -0
- package/dist/chunks/{input-group-iI7azfvE.js → input-group-Cuiuf4Dl.js} +2 -1
- package/dist/chunks/input-group-Cuiuf4Dl.js.map +1 -0
- package/dist/chunks/lazyElement-tfMG21pZ.js +2 -0
- package/dist/chunks/lazyElement-tfMG21pZ.js.map +1 -0
- package/dist/chunks/list-BQCkwWjF.js +2 -0
- package/dist/chunks/list-BQCkwWjF.js.map +1 -0
- package/dist/chunks/menu-98EAD9nj.js +2 -0
- package/dist/chunks/menu-98EAD9nj.js.map +1 -0
- package/dist/chunks/modal-bgDR29Jh.js +2 -0
- package/dist/chunks/modal-bgDR29Jh.js.map +1 -0
- package/dist/chunks/nav-TiZuTHC6.js +2 -0
- package/dist/chunks/nav-TiZuTHC6.js.map +1 -0
- package/dist/chunks/nav-overflow-Ay5mM5Gc.js +2 -0
- package/dist/chunks/nav-overflow-Ay5mM5Gc.js.map +1 -0
- package/dist/chunks/navOverflow-B5krZe6D.js +2 -0
- package/dist/chunks/navOverflow-B5krZe6D.js.map +1 -0
- package/dist/chunks/navVariant-CnD21GBS.d.ts +5 -0
- package/dist/chunks/navVariant-DeGTk9B7.js +2 -0
- package/dist/chunks/navVariant-DeGTk9B7.js.map +1 -0
- package/dist/chunks/navbar-DxIwt0sc.js +2 -0
- package/dist/chunks/navbar-DxIwt0sc.js.map +1 -0
- package/dist/chunks/notification-Dbci5Ka3.js +2 -0
- package/dist/chunks/notification-Dbci5Ka3.js.map +1 -0
- package/dist/chunks/number-field-IBIX2IWH.js +2 -0
- package/dist/chunks/number-field-IBIX2IWH.js.map +1 -0
- package/dist/chunks/otp-input-ws393uPB.js +2 -0
- package/dist/chunks/otp-input-ws393uPB.js.map +1 -0
- package/dist/chunks/overlayPlacement-BtS90IVf.js +2 -1
- package/dist/chunks/overlayPlacement-BtS90IVf.js.map +1 -0
- package/dist/chunks/{overlayPlacement-B7843a-Q.d.ts → overlayPlacement-CIsLpycT.d.ts} +3 -2
- package/dist/chunks/pagination-BkOquk-x.js +2 -0
- package/dist/chunks/pagination-BkOquk-x.js.map +1 -0
- package/dist/chunks/password-strength-DDK8pHRq.js +2 -0
- package/dist/chunks/password-strength-DDK8pHRq.js.map +1 -0
- package/dist/chunks/placeholder-BCr83sUn.js +2 -0
- package/dist/chunks/placeholder-BCr83sUn.js.map +1 -0
- package/dist/chunks/polymorphic-BhGNZQja.js +2 -0
- package/dist/chunks/polymorphic-BhGNZQja.js.map +1 -0
- package/dist/chunks/polymorphic-CVHbTHSN.d.ts +2 -1
- package/dist/chunks/popover-Bdg8D4sm.js +2 -0
- package/dist/chunks/popover-Bdg8D4sm.js.map +1 -0
- package/dist/chunks/{progress-DlrZ71aV.js → progress-zWkTltor.js} +2 -1
- package/dist/chunks/progress-zWkTltor.js.map +1 -0
- package/dist/chunks/radio-B6gJdtoN.js +2 -0
- package/dist/chunks/radio-B6gJdtoN.js.map +1 -0
- package/dist/chunks/{range-input-BN3430j-.js → range-input-CT_8TKL7.js} +2 -1
- package/dist/chunks/range-input-CT_8TKL7.js.map +1 -0
- package/dist/chunks/renderFormCheck-DN_-V62U.js +2 -0
- package/dist/chunks/renderFormCheck-DN_-V62U.js.map +1 -0
- package/dist/chunks/{renderFormCheck-CYWG-Rbt.d.ts → renderFormCheck-nKgpa_a3.d.ts} +4 -3
- package/dist/chunks/renderFormField-Brkw1yA6.js +2 -0
- package/dist/chunks/renderFormField-Brkw1yA6.js.map +1 -0
- package/dist/chunks/{renderFormField-fBEny6JV.d.ts → renderFormField-ChNagAFN.d.ts} +3 -2
- package/dist/chunks/{renderMenuItemContent-CmqT3YUQ.js → renderMenuItemContent-DUezZrpj.js} +2 -1
- package/dist/chunks/renderMenuItemContent-DUezZrpj.js.map +1 -0
- package/dist/chunks/scrollspy-C2HmrnZ4.js +2 -0
- package/dist/chunks/scrollspy-C2HmrnZ4.js.map +1 -0
- package/dist/chunks/scrollspy-D_lPjb92.js +2 -0
- package/dist/chunks/scrollspy-D_lPjb92.js.map +1 -0
- package/dist/chunks/search-field--nDoCI_E.js +2 -0
- package/dist/chunks/search-field--nDoCI_E.js.map +1 -0
- package/dist/chunks/select-BwJIfv9f.js +2 -0
- package/dist/chunks/select-BwJIfv9f.js.map +1 -0
- package/dist/chunks/skeleton-CmZBLJwp.js +2 -0
- package/dist/chunks/skeleton-CmZBLJwp.js.map +1 -0
- package/dist/chunks/slot-CNhFZdHF.js +2 -0
- package/dist/chunks/slot-CNhFZdHF.js.map +1 -0
- package/dist/chunks/spacingClassName-DVhk8m3P.js +2 -1
- package/dist/chunks/spacingClassName-DVhk8m3P.js.map +1 -0
- package/dist/chunks/spinner-DblhvrHL.js +2 -0
- package/dist/chunks/spinner-DblhvrHL.js.map +1 -0
- package/dist/chunks/stack-DK5F53VT.js +2 -0
- package/dist/chunks/stack-DK5F53VT.js.map +1 -0
- package/dist/chunks/static-table-D0M4oc_t.js +2 -1
- package/dist/chunks/static-table-D0M4oc_t.js.map +1 -0
- package/dist/chunks/stepper-CVXMJ2yg.js +2 -0
- package/dist/chunks/stepper-CVXMJ2yg.js.map +1 -0
- package/dist/chunks/switch-C6s3LxEv.js +2 -0
- package/dist/chunks/switch-C6s3LxEv.js.map +1 -0
- package/dist/chunks/table-Cy6uEuEP.js +2 -0
- package/dist/chunks/table-Cy6uEuEP.js.map +1 -0
- package/dist/chunks/tableClassName-CZA2Bse8.js +2 -1
- package/dist/chunks/tableClassName-CZA2Bse8.js.map +1 -0
- package/dist/chunks/tabs-91T7-8qq.js +2 -0
- package/dist/chunks/tabs-91T7-8qq.js.map +1 -0
- package/dist/chunks/text-input-B4pTv6SU.js +2 -0
- package/dist/chunks/text-input-B4pTv6SU.js.map +1 -0
- package/dist/chunks/textarea-1A1nABQE.js +2 -0
- package/dist/chunks/textarea-1A1nABQE.js.map +1 -0
- package/dist/chunks/time-field-B3MA7ED_.js +2 -0
- package/dist/chunks/time-field-B3MA7ED_.js.map +1 -0
- package/dist/chunks/toast-CGHl3-oU.js +2 -0
- package/dist/chunks/toast-CGHl3-oU.js.map +1 -0
- package/dist/chunks/tooltip-Bc-u6nIW.js +2 -0
- package/dist/chunks/tooltip-Bc-u6nIW.js.map +1 -0
- package/dist/chunks/tree-Cql1veeZ.js +2 -0
- package/dist/chunks/tree-Cql1veeZ.js.map +1 -0
- package/dist/chunks/{types-CS_40Txv.d.ts → types-D6FM7bYR.d.ts} +16 -1
- package/dist/chunks/unhandledProps-9Kdj7WVf.js +2 -0
- package/dist/chunks/unhandledProps-9Kdj7WVf.js.map +1 -0
- package/dist/chunks/useButtonSemantics-CILM_lhi.js +2 -1
- package/dist/chunks/useButtonSemantics-CILM_lhi.js.map +1 -0
- package/dist/chunks/useControllableState-CPUJxfKW.js +2 -0
- package/dist/chunks/useControllableState-CPUJxfKW.js.map +1 -0
- package/dist/chunks/useDialogElement-CgOnJAzu.js +2 -0
- package/dist/chunks/useDialogElement-CgOnJAzu.js.map +1 -0
- package/dist/chunks/useDisabledAnchorGuard-Cz58UCXy.js +2 -1
- package/dist/chunks/useDisabledAnchorGuard-Cz58UCXy.js.map +1 -0
- package/dist/chunks/useFloatingOverlay-DLIvwx-8.js +2 -0
- package/dist/chunks/useFloatingOverlay-DLIvwx-8.js.map +1 -0
- package/dist/chunks/useForkedRef-DVEfT-KI.js +2 -1
- package/dist/chunks/useForkedRef-DVEfT-KI.js.map +1 -0
- package/dist/chunks/useFormField-BOqmBTC4.js +2 -1
- package/dist/chunks/useFormField-BOqmBTC4.js.map +1 -0
- package/dist/chunks/useIsomorphicLayoutEffect-BbqRwuqn.js +2 -1
- package/dist/chunks/useIsomorphicLayoutEffect-BbqRwuqn.js.map +1 -0
- package/dist/chunks/useOpenStateProps-DykUbnPJ.js +2 -0
- package/dist/chunks/useOpenStateProps-DykUbnPJ.js.map +1 -0
- package/dist/chunks/useToastRegionQueue-CIV5SdiE.js +2 -0
- package/dist/chunks/useToastRegionQueue-CIV5SdiE.js.map +1 -0
- package/dist/chunks/useTransitionState-e5ToY7eX.js +2 -0
- package/dist/chunks/useTransitionState-e5ToY7eX.js.map +1 -0
- package/dist/chunks/validationClassName-gRGs4KBm.js +2 -1
- package/dist/chunks/validationClassName-gRGs4KBm.js.map +1 -0
- package/dist/chunks/visibleState-B_i1zHu2.js +2 -0
- package/dist/chunks/visibleState-B_i1zHu2.js.map +1 -0
- package/dist/close-button.d.ts +1 -1
- package/dist/close-button.js +1 -1
- package/dist/collapse.js +1 -1
- package/dist/color-input.js +1 -1
- package/dist/combobox.js +1 -1
- package/dist/context-menu.d.ts +2 -0
- package/dist/context-menu.js +1 -0
- package/dist/datagrid.d.ts +1 -1
- package/dist/datagrid.js +1 -1
- package/dist/datepicker.d.ts +1 -1
- package/dist/datepicker.js +1 -1
- package/dist/divider.d.ts +2 -0
- package/dist/divider.js +1 -0
- package/dist/drawer.d.ts +1 -1
- package/dist/drawer.js +1 -1
- package/dist/file-input.js +1 -1
- package/dist/flex.d.ts +1 -1
- package/dist/flex.js +1 -1
- package/dist/floating-input.d.ts +1 -1
- package/dist/floating-input.js +1 -1
- package/dist/form-field.d.ts +1 -1
- package/dist/form-field.js +1 -1
- package/dist/form.js +1 -1
- package/dist/grid.d.ts +2 -2
- package/dist/grid.js +1 -1
- package/dist/icon.d.ts +2 -2
- package/dist/icon.js +1 -1
- package/dist/index.d.ts +61 -49
- package/dist/index.js +1 -1
- package/dist/input-adorn.js +1 -1
- package/dist/input-group.js +1 -1
- package/dist/link.d.ts +1 -1
- package/dist/link.js +1 -1
- package/dist/list.d.ts +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.d.ts +2 -1
- package/dist/menu.js +1 -1
- package/dist/modal.d.ts +1 -1
- package/dist/modal.js +1 -1
- package/dist/nav-overflow.d.ts +2 -0
- package/dist/nav-overflow.js +1 -0
- package/dist/nav.d.ts +2 -2
- package/dist/nav.js +1 -1
- package/dist/navbar.d.ts +1 -1
- package/dist/navbar.js +1 -1
- package/dist/notification.d.ts +1 -1
- package/dist/notification.js +1 -1
- package/dist/number-field.d.ts +2 -0
- package/dist/number-field.js +1 -0
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +1 -1
- package/dist/password-strength.d.ts +1 -1
- package/dist/password-strength.js +1 -1
- package/dist/placeholder.d.ts +1 -1
- package/dist/placeholder.js +1 -1
- package/dist/popover.d.ts +1 -1
- package/dist/popover.js +1 -1
- package/dist/portal.d.ts +2 -0
- package/dist/portal.js +1 -0
- package/dist/progress.d.ts +1 -1
- package/dist/progress.js +1 -1
- package/dist/radio.d.ts +1 -1
- package/dist/radio.js +1 -1
- package/dist/range-input.js +1 -1
- package/dist/scrollspy.d.ts +2 -0
- package/dist/scrollspy.js +1 -0
- package/dist/search-field.d.ts +2 -0
- package/dist/search-field.js +1 -0
- package/dist/select.js +1 -1
- package/dist/skeleton.d.ts +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/spinner.d.ts +1 -1
- package/dist/spinner.js +1 -1
- package/dist/stack.d.ts +1 -1
- package/dist/stack.js +1 -1
- package/dist/static-table.d.ts +1 -1
- package/dist/stepper.d.ts +1 -1
- package/dist/stepper.js +1 -1
- package/dist/style.css +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/switch.js +1 -1
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-input.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/time-field.d.ts +2 -0
- package/dist/time-field.js +1 -0
- package/dist/toast.d.ts +1 -1
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/tree.d.ts +2 -0
- package/dist/tree.js +1 -0
- package/dist/visually-hidden.d.ts +2 -0
- package/dist/visually-hidden.js +1 -0
- package/package.json +61 -52
- package/dist/chunks/Button-I0aUy5h-.js +0 -1
- package/dist/chunks/Chip-D0Cw0mAr.js +0 -1
- package/dist/chunks/CloseButton-DJM7FRKh.js +0 -1
- package/dist/chunks/ComboboxListBox-BhO8uRNg.js +0 -1
- package/dist/chunks/Icon-BIwkD-kx.js +0 -1
- package/dist/chunks/Link-Cq7FNWpm.js +0 -1
- package/dist/chunks/RangeCalendar-COnSfurr.js +0 -1
- package/dist/chunks/accordion-okRicuG5.js +0 -1
- package/dist/chunks/autocomplete-B0xTc6kg.js +0 -1
- package/dist/chunks/avatar-Bjm0DlPO.js +0 -1
- package/dist/chunks/breakpoints-SLMTNHF9.d.ts +0 -5
- package/dist/chunks/breakpoints-o_2Ev7ir.js +0 -1
- package/dist/chunks/button-group-CPZYA6aZ.js +0 -1
- package/dist/chunks/card-DfF2K_5p.js +0 -1
- package/dist/chunks/carousel-DEvwcA7H.js +0 -1
- package/dist/chunks/checkbox-BFPS0pD6.js +0 -1
- package/dist/chunks/chip-input-CB1lE6vP.js +0 -1
- package/dist/chunks/collapse-WifcChO8.js +0 -1
- package/dist/chunks/combobox-DWEj-Sv7.js +0 -1
- package/dist/chunks/datagrid-nbnNThsT.js +0 -2
- package/dist/chunks/datepicker-CslLKMm1.js +0 -1
- package/dist/chunks/direction-CPhdeL3A.js +0 -1
- package/dist/chunks/drawer-zReFjoJG.js +0 -1
- package/dist/chunks/flex-BTvpgaRv.js +0 -1
- package/dist/chunks/floating-input-CIC9Lm2a.js +0 -1
- package/dist/chunks/form-field-BjQ9SIjx.js +0 -1
- package/dist/chunks/grid-CuFw89yV.js +0 -1
- package/dist/chunks/iconSlot-BmWxJh27.js +0 -1
- package/dist/chunks/index-BDfh8YBc.d.ts +0 -39
- package/dist/chunks/index-CVUMS0x7.d.ts +0 -73
- package/dist/chunks/index-D949AidR.d.ts +0 -40
- package/dist/chunks/index-DEb9zXlC.d.ts +0 -210
- package/dist/chunks/list-CMr-wB9d.js +0 -1
- package/dist/chunks/menu-CXUc-Gva.js +0 -1
- package/dist/chunks/modal-ByIj71Mq.js +0 -1
- package/dist/chunks/nav-BldxFo_B.js +0 -1
- package/dist/chunks/navbar-BwcsQuBk.js +0 -1
- package/dist/chunks/notification-DdqigVB1.js +0 -1
- package/dist/chunks/otp-input-CXe_wkII.js +0 -1
- package/dist/chunks/pagination-BOpEAYW2.js +0 -1
- package/dist/chunks/password-strength-BfLiYiGj.js +0 -1
- package/dist/chunks/placeholder-pg95KELl.js +0 -1
- package/dist/chunks/polymorphic-CACPOv1_.js +0 -1
- package/dist/chunks/popover-BpSfnZzk.js +0 -1
- package/dist/chunks/radio-BV7Sq6D1.js +0 -1
- package/dist/chunks/renderFormCheck-BXBs6_ov.js +0 -1
- package/dist/chunks/renderFormField-wiaxvvLG.js +0 -1
- package/dist/chunks/select-CclIIux8.js +0 -1
- package/dist/chunks/skeleton-CKq76sE_.js +0 -1
- package/dist/chunks/spinner-BEq4PAlu.js +0 -1
- package/dist/chunks/stack-D3retZ-W.js +0 -1
- package/dist/chunks/stepper-CTa6e8uv.js +0 -1
- package/dist/chunks/switch-BmHpq4tL.js +0 -1
- package/dist/chunks/table-Fme9GbAR.js +0 -1
- package/dist/chunks/tabs-BnbMJM_b.js +0 -1
- package/dist/chunks/text-input-DD3d08Yf.js +0 -1
- package/dist/chunks/textarea-C0qQdCcu.js +0 -1
- package/dist/chunks/toast-BQhZ2pv5.js +0 -1
- package/dist/chunks/tooltip-DHtVAYUo.js +0 -1
- package/dist/chunks/triggerElement-BIqA4KqZ.js +0 -1
- package/dist/chunks/useDialogElement-BRIU60cT.js +0 -1
- package/dist/chunks/useFloatingOverlay-CcmDZKMK.js +0 -1
- package/dist/chunks/useToastRegionQueue-BH6bWZ73.js +0 -1
- package/src/components/accordion/Accordion.tsx +0 -190
- package/src/components/accordion/AccordionBody.tsx +0 -46
- package/src/components/accordion/AccordionHeader.tsx +0 -21
- package/src/components/accordion/AccordionItem.tsx +0 -59
- package/src/components/accordion/context.ts +0 -8
- package/src/components/accordion/index.ts +0 -12
- package/src/components/autocomplete/Autocomplete.tsx +0 -464
- package/src/components/autocomplete/AutocompleteGroup.tsx +0 -20
- package/src/components/autocomplete/AutocompleteItem.tsx +0 -18
- package/src/components/autocomplete/index.ts +0 -10
- package/src/components/avatar/Avatar.tsx +0 -137
- package/src/components/avatar/AvatarImage.tsx +0 -19
- package/src/components/avatar/AvatarStack.tsx +0 -98
- package/src/components/avatar/index.ts +0 -10
- package/src/components/badge/Badge.tsx +0 -94
- package/src/components/badge/index.ts +0 -6
- package/src/components/breadcrumb/Breadcrumb.tsx +0 -68
- package/src/components/breadcrumb/BreadcrumbItem.tsx +0 -38
- package/src/components/breadcrumb/index.ts +0 -8
- package/src/components/button/Button.tsx +0 -232
- package/src/components/button/index.ts +0 -6
- package/src/components/button-group/ButtonGroup.tsx +0 -55
- package/src/components/button-group/ButtonToolbar.tsx +0 -47
- package/src/components/button-group/index.ts +0 -8
- package/src/components/calendar/Calendar.scss +0 -57
- package/src/components/calendar/Calendar.tsx +0 -338
- package/src/components/calendar/CalendarMonthBlock.tsx +0 -57
- package/src/components/calendar/CalendarMonthGrid.tsx +0 -94
- package/src/components/calendar/CalendarMonthYearPicker.tsx +0 -164
- package/src/components/calendar/CalendarNavButton.tsx +0 -24
- package/src/components/calendar/CalendarWeekGrid.tsx +0 -58
- package/src/components/calendar/CalendarYearGrid.tsx +0 -128
- package/src/components/calendar/RangeCalendar.scss +0 -95
- package/src/components/calendar/RangeCalendar.tsx +0 -373
- package/src/components/calendar/index.ts +0 -10
- package/src/components/calendar/labels.tsx +0 -71
- package/src/components/card/Card.tsx +0 -173
- package/src/components/card/CardBody.tsx +0 -75
- package/src/components/card/CardFooter.tsx +0 -47
- package/src/components/card/CardGroup.tsx +0 -51
- package/src/components/card/CardHeader.tsx +0 -47
- package/src/components/card/CardImage.tsx +0 -70
- package/src/components/card/CardImageOverlay.tsx +0 -47
- package/src/components/card/CardLink.tsx +0 -40
- package/src/components/card/CardSubtitle.tsx +0 -47
- package/src/components/card/CardText.tsx +0 -47
- package/src/components/card/CardTitle.tsx +0 -47
- package/src/components/card/index.ts +0 -26
- package/src/components/carousel/Carousel.tsx +0 -753
- package/src/components/carousel/CarouselControlButton.tsx +0 -81
- package/src/components/carousel/CarouselControlNext.tsx +0 -28
- package/src/components/carousel/CarouselControlPrev.tsx +0 -28
- package/src/components/carousel/CarouselIndicators.tsx +0 -44
- package/src/components/carousel/CarouselInner.tsx +0 -56
- package/src/components/carousel/CarouselItem.tsx +0 -51
- package/src/components/carousel/CarouselOverlay.tsx +0 -51
- package/src/components/carousel/CarouselPlayPause.tsx +0 -84
- package/src/components/carousel/carouselEngine.ts +0 -170
- package/src/components/carousel/context.ts +0 -29
- package/src/components/carousel/index.ts +0 -25
- package/src/components/checkbox/Checkbox.tsx +0 -252
- package/src/components/checkbox/CheckboxGroup.tsx +0 -145
- package/src/components/checkbox/context.ts +0 -14
- package/src/components/checkbox/index.ts +0 -8
- package/src/components/chip/Chip.tsx +0 -184
- package/src/components/chip/index.ts +0 -6
- package/src/components/chip-input/ChipInput.tsx +0 -371
- package/src/components/chip-input/ChipList.tsx +0 -95
- package/src/components/chip-input/index.ts +0 -6
- package/src/components/close-button/CloseButton.tsx +0 -205
- package/src/components/close-button/index.ts +0 -6
- package/src/components/collapse/Collapse.tsx +0 -128
- package/src/components/collapse/index.ts +0 -6
- package/src/components/color-input/ColorInput.tsx +0 -106
- package/src/components/color-input/index.ts +0 -6
- package/src/components/combobox/Combobox.tsx +0 -320
- package/src/components/combobox/ComboboxGroup.tsx +0 -27
- package/src/components/combobox/ComboboxItem.tsx +0 -44
- package/src/components/combobox/ComboboxListBox.tsx +0 -98
- package/src/components/combobox/index.ts +0 -10
- package/src/components/datagrid/DataGrid.scss +0 -203
- package/src/components/datagrid/DataGrid.tsx +0 -259
- package/src/components/datagrid/DataGridBody.tsx +0 -162
- package/src/components/datagrid/DataGridCell.tsx +0 -47
- package/src/components/datagrid/DataGridColumn.tsx +0 -109
- package/src/components/datagrid/DataGridHeader.tsx +0 -47
- package/src/components/datagrid/DataGridPinBehavior.tsx +0 -225
- package/src/components/datagrid/DataGridRow.tsx +0 -48
- package/src/components/datagrid/DataGridSelectionCell.tsx +0 -74
- package/src/components/datagrid/DataGridTableLayout.ts +0 -30
- package/src/components/datagrid/index.ts +0 -18
- package/src/components/datagrid/useColumnGeometry.ts +0 -161
- package/src/components/datepicker/CalendarToggleButton.tsx +0 -58
- package/src/components/datepicker/ClearButton.tsx +0 -38
- package/src/components/datepicker/DateField.tsx +0 -54
- package/src/components/datepicker/DatePicker.scss +0 -51
- package/src/components/datepicker/DatePicker.tsx +0 -606
- package/src/components/datepicker/DateRangePicker.scss +0 -11
- package/src/components/datepicker/DateRangePicker.tsx +0 -361
- package/src/components/datepicker/index.ts +0 -8
- package/src/components/datepicker/renderDatePickerShell.tsx +0 -104
- package/src/components/drawer/Drawer.tsx +0 -213
- package/src/components/drawer/DrawerBody.tsx +0 -47
- package/src/components/drawer/DrawerFooter.tsx +0 -51
- package/src/components/drawer/DrawerHeader.tsx +0 -60
- package/src/components/drawer/DrawerTitle.tsx +0 -49
- package/src/components/drawer/index.ts +0 -18
- package/src/components/file-input/FileInput.tsx +0 -100
- package/src/components/file-input/index.ts +0 -6
- package/src/components/flex/Flex.tsx +0 -134
- package/src/components/flex/index.ts +0 -6
- package/src/components/floating-input/FloatingInput.tsx +0 -94
- package/src/components/floating-input/index.ts +0 -6
- package/src/components/form/Form.tsx +0 -26
- package/src/components/form/FormFeedback.tsx +0 -64
- package/src/components/form/FormHelp.tsx +0 -46
- package/src/components/form/FormLabel.tsx +0 -26
- package/src/components/form/index.ts +0 -12
- package/src/components/form/renderFormCheck.tsx +0 -86
- package/src/components/form-field/FormField.tsx +0 -84
- package/src/components/form-field/index.ts +0 -6
- package/src/components/form-field/renderFormField.tsx +0 -85
- package/src/components/grid/Col.tsx +0 -69
- package/src/components/grid/Container.tsx +0 -59
- package/src/components/grid/Grid.tsx +0 -86
- package/src/components/grid/GridItem.tsx +0 -123
- package/src/components/grid/Row.tsx +0 -71
- package/src/components/grid/gap.ts +0 -8
- package/src/components/grid/index.ts +0 -14
- package/src/components/icon/Icon.tsx +0 -105
- package/src/components/icon/IconProvider.tsx +0 -40
- package/src/components/icon/index.ts +0 -9
- package/src/components/input-adorn/InputAdorn.tsx +0 -55
- package/src/components/input-adorn/index.ts +0 -6
- package/src/components/input-group/InputGroup.tsx +0 -50
- package/src/components/input-group/InputGroupAddon.tsx +0 -50
- package/src/components/input-group/index.ts +0 -8
- package/src/components/link/Link.tsx +0 -148
- package/src/components/link/index.ts +0 -6
- package/src/components/list/List.tsx +0 -193
- package/src/components/list/ListItem.tsx +0 -91
- package/src/components/list/index.ts +0 -8
- package/src/components/menu/Menu.tsx +0 -408
- package/src/components/menu/MenuDivider.tsx +0 -19
- package/src/components/menu/MenuHeader.tsx +0 -55
- package/src/components/menu/MenuItem.tsx +0 -85
- package/src/components/menu/MenuItemDef.ts +0 -83
- package/src/components/menu/MenuList.tsx +0 -142
- package/src/components/menu/MenuSubmenu.tsx +0 -284
- package/src/components/menu/MenuSubmenuBack.tsx +0 -39
- package/src/components/menu/MenuText.tsx +0 -47
- package/src/components/menu/MenuToggle.tsx +0 -148
- package/src/components/menu/index.ts +0 -23
- package/src/components/menu/menuNavigation.ts +0 -106
- package/src/components/menu/submenuGroup.ts +0 -43
- package/src/components/modal/Modal.tsx +0 -164
- package/src/components/modal/ModalBody.tsx +0 -47
- package/src/components/modal/ModalFooter.tsx +0 -51
- package/src/components/modal/ModalHeader.tsx +0 -60
- package/src/components/modal/ModalTitle.tsx +0 -49
- package/src/components/modal/index.ts +0 -18
- package/src/components/nav/Nav.tsx +0 -97
- package/src/components/nav/NavItem.tsx +0 -42
- package/src/components/nav/NavLink.tsx +0 -48
- package/src/components/nav/NavTitle.tsx +0 -22
- package/src/components/nav/index.ts +0 -11
- package/src/components/navbar/Navbar.tsx +0 -112
- package/src/components/navbar/NavbarBrand.tsx +0 -58
- package/src/components/navbar/NavbarNav.tsx +0 -47
- package/src/components/navbar/NavbarText.tsx +0 -47
- package/src/components/navbar/NavbarToggler.tsx +0 -40
- package/src/components/navbar/index.ts +0 -14
- package/src/components/notification/Notification.scss +0 -15
- package/src/components/notification/Notification.tsx +0 -188
- package/src/components/notification/NotificationIcon.tsx +0 -21
- package/src/components/notification/NotificationStack.tsx +0 -66
- package/src/components/notification/NotificationText.tsx +0 -47
- package/src/components/notification/NotificationTitle.tsx +0 -47
- package/src/components/notification/context.ts +0 -14
- package/src/components/notification/index.ts +0 -25
- package/src/components/notification/notificationQueue.ts +0 -48
- package/src/components/otp-input/OtpBox.tsx +0 -68
- package/src/components/otp-input/OtpInput.tsx +0 -342
- package/src/components/otp-input/index.ts +0 -6
- package/src/components/pagination/Pagination.tsx +0 -212
- package/src/components/pagination/PaginationItem.tsx +0 -152
- package/src/components/pagination/index.ts +0 -12
- package/src/components/password-strength/PasswordStrength.tsx +0 -155
- package/src/components/password-strength/index.ts +0 -6
- package/src/components/password-strength/strengthScore.ts +0 -79
- package/src/components/placeholder/Placeholder.tsx +0 -178
- package/src/components/placeholder/index.ts +0 -6
- package/src/components/popover/Popover.tsx +0 -269
- package/src/components/popover/index.ts +0 -6
- package/src/components/progress/Progress.tsx +0 -154
- package/src/components/progress/ProgressBar.tsx +0 -88
- package/src/components/progress/index.ts +0 -8
- package/src/components/radio/Radio.tsx +0 -98
- package/src/components/radio/RadioGroup.tsx +0 -142
- package/src/components/radio/context.ts +0 -14
- package/src/components/radio/index.ts +0 -8
- package/src/components/range-input/RangeInput.tsx +0 -109
- package/src/components/range-input/index.ts +0 -6
- package/src/components/select/Select.tsx +0 -277
- package/src/components/select/index.ts +0 -6
- package/src/components/skeleton/Skeleton.tsx +0 -89
- package/src/components/skeleton/SkeletonLoader.tsx +0 -98
- package/src/components/skeleton/index.ts +0 -8
- package/src/components/spinner/Spinner.tsx +0 -77
- package/src/components/spinner/index.ts +0 -6
- package/src/components/stack/Stack.tsx +0 -81
- package/src/components/stack/index.ts +0 -6
- package/src/components/static-table/StaticTable.tsx +0 -78
- package/src/components/static-table/index.ts +0 -8
- package/src/components/stepper/Stepper.tsx +0 -172
- package/src/components/stepper/StepperItem.tsx +0 -66
- package/src/components/stepper/index.ts +0 -8
- package/src/components/switch/Switch.tsx +0 -259
- package/src/components/switch/index.ts +0 -6
- package/src/components/table/Table.css +0 -39
- package/src/components/table/Table.tsx +0 -405
- package/src/components/table/TableBody.tsx +0 -25
- package/src/components/table/TableCell.tsx +0 -27
- package/src/components/table/TableColumn.tsx +0 -31
- package/src/components/table/TableHeader.tsx +0 -26
- package/src/components/table/TableRow.tsx +0 -24
- package/src/components/table/index.ts +0 -16
- package/src/components/tabs/Tab.tsx +0 -36
- package/src/components/tabs/TabList.tsx +0 -76
- package/src/components/tabs/TabPanel.tsx +0 -68
- package/src/components/tabs/Tabs.tsx +0 -136
- package/src/components/tabs/context.ts +0 -24
- package/src/components/tabs/index.ts +0 -12
- package/src/components/text-input/TextInput.tsx +0 -188
- package/src/components/text-input/index.ts +0 -6
- package/src/components/textarea/Textarea.tsx +0 -145
- package/src/components/textarea/index.ts +0 -6
- package/src/components/toast/Toast.tsx +0 -220
- package/src/components/toast/ToastBody.tsx +0 -64
- package/src/components/toast/ToastFooter.tsx +0 -47
- package/src/components/toast/ToastHeader.tsx +0 -105
- package/src/components/toast/ToastIcon.tsx +0 -21
- package/src/components/toast/Toaster.tsx +0 -87
- package/src/components/toast/context.ts +0 -14
- package/src/components/toast/index.ts +0 -26
- package/src/components/toast/toastQueue.ts +0 -56
- package/src/components/tooltip/Tooltip.tsx +0 -171
- package/src/components/tooltip/index.ts +0 -6
- package/src/global.d.ts +0 -2
- package/src/hooks/index.ts +0 -57
- package/src/hooks/useAutoDismiss.ts +0 -91
- package/src/hooks/useButtonSemantics.ts +0 -33
- package/src/hooks/useControllableState.ts +0 -24
- package/src/hooks/useDialogElement.ts +0 -226
- package/src/hooks/useDisabledAnchorGuard.ts +0 -22
- package/src/hooks/useDismissibleTransition.ts +0 -126
- package/src/hooks/useDrawer.ts +0 -9
- package/src/hooks/useFloatingOverlay.ts +0 -125
- package/src/hooks/useForkedRef.ts +0 -50
- package/src/hooks/useFormField.ts +0 -89
- package/src/hooks/useIconConfig.ts +0 -6
- package/src/hooks/useIsomorphicLayoutEffect.ts +0 -9
- package/src/hooks/useModal.ts +0 -9
- package/src/hooks/useNotification.ts +0 -10
- package/src/hooks/useOverlayPlacement.ts +0 -93
- package/src/hooks/usePagination.ts +0 -89
- package/src/hooks/useToast.ts +0 -9
- package/src/hooks/useToastRegionQueue.ts +0 -27
- package/src/index.ts +0 -522
- package/src/types.ts +0 -133
- package/src/utils/breakpoints.ts +0 -43
- package/src/utils/comboboxCollection.tsx +0 -152
- package/src/utils/dateRangePresets.ts +0 -6
- package/src/utils/devWarning.ts +0 -58
- package/src/utils/dialogTransition.ts +0 -39
- package/src/utils/direction.ts +0 -14
- package/src/utils/focusRedirect.ts +0 -23
- package/src/utils/iconConfig.ts +0 -88
- package/src/utils/iconSlot.tsx +0 -41
- package/src/utils/isWholeUnitDisabled.ts +0 -17
- package/src/utils/mergeIsDateUnavailable.ts +0 -15
- package/src/utils/overlayPlacement.ts +0 -93
- package/src/utils/pointerInteraction.ts +0 -21
- package/src/utils/polymorphic.ts +0 -100
- package/src/utils/renderMenuItemContent.tsx +0 -57
- package/src/utils/setVisibleRangeStart.ts +0 -64
- package/src/utils/slot.tsx +0 -78
- package/src/utils/spacingClassName.ts +0 -14
- package/src/utils/suppressFocusRingGlobally.ts +0 -84
- package/src/utils/tableClassName.ts +0 -93
- package/src/utils/triggerElement.ts +0 -25
- package/src/utils/validationClassName.ts +0 -8
- package/src/utils/virtualFocusStyle.ts +0 -16
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -9,40 +9,43 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
React
|
|
12
|
+
React component library built on Chassis CSS and TypeScript.
|
|
13
13
|
<br>
|
|
14
|
-
<a href="https://chassis-ui.com/react/getting-started/introduction"><strong>Explore the Chassis React docs »</strong></a>
|
|
14
|
+
<a href="https://chassis-ui.com/react/getting-started/introduction/"><strong>Explore the Chassis React docs »</strong></a>
|
|
15
15
|
<br>
|
|
16
16
|
<br>
|
|
17
|
-
<a href="https://
|
|
18
|
-
|
|
19
|
-
<a href="https://
|
|
17
|
+
<a href="https://www.npmjs.com/package/@chassis-ui/react"><img src="https://img.shields.io/npm/v/@chassis-ui/react" alt="npm version"></a>
|
|
18
|
+
<a href="https://github.com/chassis-ui/react/actions/workflows/ci.yml?query=branch%3Adevelop"><img src="https://github.com/chassis-ui/react/actions/workflows/ci.yml/badge.svg?branch=develop" alt="CI"></a>
|
|
19
|
+
<a href="./LICENSE"><img src="https://img.shields.io/npm/l/@chassis-ui/react" alt="License: MIT"></a>
|
|
20
|
+
<br>
|
|
21
|
+
<br>
|
|
22
|
+
<a href="https://github.com/chassis-ui/react/issues/new/choose">Report a bug or request a feature</a>
|
|
20
23
|
</p>
|
|
21
24
|
|
|
22
25
|
## Installation
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
npm install @chassis-ui/react
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
or
|
|
27
|
+
The components render `@chassis-ui/css`'s markup and class names, so install both:
|
|
29
28
|
|
|
30
29
|
```bash
|
|
31
|
-
|
|
30
|
+
npm install @chassis-ui/react @chassis-ui/css
|
|
32
31
|
```
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
`@chassis-ui/css` is a peer dependency, pinned to one 0.x minor (`>=0.7.0 <0.8.0` today): before
|
|
34
|
+
1.0 a minor release of it can rename the tokens the components rely on.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
## Stylesheets
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
npm install @chassis-ui/css
|
|
40
|
-
```
|
|
38
|
+
Import the Chassis CSS stylesheet once, then this package's own stylesheet:
|
|
41
39
|
|
|
42
40
|
```js
|
|
43
41
|
import '@chassis-ui/css/dist/css/chassis.min.css'
|
|
42
|
+
import '@chassis-ui/react/style.css'
|
|
44
43
|
```
|
|
45
44
|
|
|
45
|
+
`@chassis-ui/react/style.css` covers the few pieces with no `@chassis-ui/css` equivalent:
|
|
46
|
+
`Calendar`, `RangeCalendar`, `DatePicker`, `DateRangePicker`, and `Table`'s sort and selection UI.
|
|
47
|
+
Without it those pieces render unstyled; everything else is styled by `@chassis-ui/css` alone.
|
|
48
|
+
|
|
46
49
|
## Usage
|
|
47
50
|
|
|
48
51
|
```jsx
|
|
@@ -53,23 +56,53 @@ export function Example() {
|
|
|
53
56
|
}
|
|
54
57
|
```
|
|
55
58
|
|
|
56
|
-
|
|
59
|
+
### Subpath imports
|
|
60
|
+
|
|
61
|
+
Every component folder is also its own entry point. Importing from a subpath keeps a bundler from
|
|
62
|
+
pulling in the rest of the library, which matters most in the Next.js App Router:
|
|
63
|
+
|
|
64
|
+
```jsx
|
|
65
|
+
import { Button } from '@chassis-ui/react/button'
|
|
66
|
+
import { Modal, ModalBody, ModalHeader } from '@chassis-ui/react/modal'
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### `asChild`
|
|
70
|
+
|
|
71
|
+
Every component with a `component` prop also takes `asChild`: the component's classes, props and
|
|
72
|
+
ref are merged onto its single child element. Use it to style a router link, and from a React
|
|
73
|
+
Server Component, where a component reference can't be passed as a prop:
|
|
74
|
+
|
|
75
|
+
```jsx
|
|
76
|
+
import Link from 'next/link'
|
|
77
|
+
import { Button } from '@chassis-ui/react/button'
|
|
78
|
+
|
|
79
|
+
export function LoginButton() {
|
|
80
|
+
return (
|
|
81
|
+
<Button asChild variant="outline">
|
|
82
|
+
<Link href="/login">Log in</Link>
|
|
83
|
+
</Button>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
See [Server-side rendering](https://chassis-ui.com/react/getting-started/ssr/) for more, and the
|
|
89
|
+
[docs](https://chassis-ui.com/react/getting-started/introduction/) for every component's props and
|
|
90
|
+
examples.
|
|
57
91
|
|
|
58
92
|
## Peer dependencies
|
|
59
93
|
|
|
60
|
-
- `react`
|
|
61
|
-
-
|
|
94
|
+
- `react` and `react-dom`: `^19.0.0`
|
|
95
|
+
- `@chassis-ui/css`: `>=0.7.0 <0.8.0`
|
|
62
96
|
|
|
63
97
|
## Browser support
|
|
64
98
|
|
|
65
|
-
Chrome 107+, Edge 107+, Firefox 104+, Safari 16
|
|
99
|
+
Chrome 107+, Edge 107+, Firefox 104+, Safari 16+: the "baseline widely available" set, also
|
|
66
100
|
declared as the `browserslist` field in this package's `package.json` and used as the build's
|
|
67
101
|
`es2022` output target. The published bundle is not down-levelled below that, so a project
|
|
68
102
|
supporting older browsers needs to transpile `node_modules/@chassis-ui/react` itself.
|
|
69
103
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
`package.json` — but that never reaches a consumer's install.)
|
|
104
|
+
The build is minified and ships source maps with the original TypeScript embedded, so stack
|
|
105
|
+
traces and debuggers show the source.
|
|
73
106
|
|
|
74
107
|
## License
|
|
75
108
|
|
package/dist/accordion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{i as e,n as t,r as n,t as r}from"./chunks/accordion-
|
|
1
|
+
"use client";import{i as e,n as t,r as n,t as r}from"./chunks/accordion-B8UWyvQB.js";export{r as Accordion,e as AccordionBody,n as AccordionHeader,t as AccordionItem};
|
package/dist/alert.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as AlertIcon, c as AlertFooterProps, d as AlertCancel, f as AlertCancelProps, g as AlertProps, h as Alert, i as AlertTextProps, l as AlertCode, m as AlertBodyProps, n as AlertTitleProps, o as AlertIconProps, p as AlertBody, r as AlertText, s as AlertFooter, t as AlertTitle, u as AlertCodeProps } from "./chunks/index-DHcztR18.js";
|
|
2
|
+
export { Alert, AlertBody, type AlertBodyProps, AlertCancel, type AlertCancelProps, AlertCode, type AlertCodeProps, AlertFooter, type AlertFooterProps, AlertIcon, type AlertIconProps, type AlertProps, AlertText, type AlertTextProps, AlertTitle, type AlertTitleProps };
|
package/dist/alert.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./chunks/alert-BXI-_qlt.js";export{t as Alert,o as AlertBody,i as AlertCancel,e as AlertCode,n as AlertFooter,a as AlertIcon,r as AlertText,s as AlertTitle};
|
package/dist/autocomplete.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as Autocomplete, i as AutocompleteGroupProps, n as AutocompleteItemProps, o as AutocompleteProps, r as AutocompleteGroup, t as AutocompleteItem } from "./chunks/index-
|
|
1
|
+
import { a as Autocomplete, i as AutocompleteGroupProps, n as AutocompleteItemProps, o as AutocompleteProps, r as AutocompleteGroup, t as AutocompleteItem } from "./chunks/index-91YA-jkp.js";
|
|
2
2
|
export { Autocomplete, AutocompleteGroup, type AutocompleteGroupProps, AutocompleteItem, type AutocompleteItemProps, type AutocompleteProps };
|
package/dist/autocomplete.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{n as e,r as t,t as n}from"./chunks/autocomplete-
|
|
1
|
+
"use client";import{n as e,r as t,t as n}from"./chunks/autocomplete-Baf9VSHN.js";export{n as Autocomplete,t as AutocompleteGroup,e as AutocompleteItem};
|
package/dist/avatar.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AvatarImageProps, i as AvatarImage, n as AvatarStackItemDef, o as Avatar, r as AvatarStackProps, s as AvatarProps, t as AvatarStack } from "./chunks/index-
|
|
1
|
+
import { a as AvatarImageProps, i as AvatarImage, n as AvatarStackItemDef, o as Avatar, r as AvatarStackProps, s as AvatarProps, t as AvatarStack } from "./chunks/index-B19ZH3fm.js";
|
|
2
2
|
export { Avatar, AvatarImage, type AvatarImageProps, type AvatarProps, AvatarStack, type AvatarStackItemDef, type AvatarStackProps };
|
package/dist/avatar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{n as e,r as t,t as n}from"./chunks/avatar-
|
|
1
|
+
"use client";import{n as e,r as t,t as n}from"./chunks/avatar-S3dGy6Qc.js";export{e as Avatar,t as AvatarImage,n as AvatarStack};
|
package/dist/badge.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BadgeProps, t as Badge } from "./chunks/index-
|
|
1
|
+
import { n as BadgeProps, t as Badge } from "./chunks/index-aRdgpeRb.js";
|
|
2
2
|
export { Badge, type BadgeProps };
|
package/dist/badge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{t as e}from"./chunks/badge-
|
|
1
|
+
"use client";import{t as e}from"./chunks/badge-D2oztCvs.js";export{e as Badge};
|
package/dist/breadcrumb.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{n as e,t}from"./chunks/breadcrumb-
|
|
1
|
+
"use client";import{n as e,t}from"./chunks/breadcrumb-s6J9itez.js";export{t as Breadcrumb,e as BreadcrumbItem};
|
package/dist/button-group.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as ButtonGroupProps, n as ButtonToolbarProps, r as ButtonGroup, t as ButtonToolbar } from "./chunks/index-
|
|
1
|
+
import { i as ButtonGroupProps, n as ButtonToolbarProps, r as ButtonGroup, t as ButtonToolbar } from "./chunks/index-BAsbRx5n.js";
|
|
2
2
|
export { ButtonGroup, type ButtonGroupProps, ButtonToolbar, type ButtonToolbarProps };
|
package/dist/button-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{n as e,t}from"./chunks/button-group-
|
|
1
|
+
"use client";import{n as e,t}from"./chunks/button-group-BGppPrIv.js";export{e as ButtonGroup,t as ButtonToolbar};
|
package/dist/button.d.ts
CHANGED
package/dist/button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"./chunks/focus-ring-SR_LwaN7.js";import{t as e}from"./chunks/Button-
|
|
1
|
+
"use client";import"./chunks/focus-ring-SR_LwaN7.js";import{t as e}from"./chunks/Button-BoymWE-L.js";export{e as Button};
|
package/dist/calendar.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as CalendarLabels, t as DateRangePreset } from "./chunks/dateRangePresets-R1FtA1zp.js";
|
|
2
|
-
import { a as CalendarProps, i as CalendarMultipleProps, n as RangeCalendarProps, o as CalendarSingleProps, r as Calendar, t as RangeCalendar } from "./chunks/index-
|
|
2
|
+
import { a as CalendarProps, i as CalendarMultipleProps, n as RangeCalendarProps, o as CalendarSingleProps, r as Calendar, t as RangeCalendar } from "./chunks/index-BNf0jIIL.js";
|
|
3
3
|
export { Calendar, type CalendarLabels, type CalendarMultipleProps, type CalendarProps, type CalendarSingleProps, type DateRangePreset, RangeCalendar, type RangeCalendarProps };
|
package/dist/calendar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"./chunks/focus-ring-SR_LwaN7.js";import{n as e,t}from"./chunks/RangeCalendar-
|
|
1
|
+
"use client";import"./chunks/focus-ring-SR_LwaN7.js";import{n as e,t}from"./chunks/RangeCalendar-BJl-j4W2.js";export{e as Calendar,t as RangeCalendar};
|
package/dist/card.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as CardProps, _ as CardFooter, a as CardSubtitle, b as CardBodyProps, c as CardLinkProps, d as CardImage, f as CardImageProps, g as CardGroupProps, h as CardGroup, i as CardTextProps, l as CardImageOverlay, m as CardHeaderProps, n as CardTitleProps, o as CardSubtitleProps, p as CardHeader, r as CardText, s as CardLink, t as CardTitle, u as CardImageOverlayProps, v as CardFooterProps, x as Card, y as CardBody } from "./chunks/index-
|
|
1
|
+
import { S as CardProps, _ as CardFooter, a as CardSubtitle, b as CardBodyProps, c as CardLinkProps, d as CardImage, f as CardImageProps, g as CardGroupProps, h as CardGroup, i as CardTextProps, l as CardImageOverlay, m as CardHeaderProps, n as CardTitleProps, o as CardSubtitleProps, p as CardHeader, r as CardText, s as CardLink, t as CardTitle, u as CardImageOverlayProps, v as CardFooterProps, x as Card, y as CardBody } from "./chunks/index-NGgDkhyn.js";
|
|
2
2
|
export { Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardGroup, type CardGroupProps, CardHeader, type CardHeaderProps, CardImage, CardImageOverlay, type CardImageOverlayProps, type CardImageProps, CardLink, type CardLinkProps, type CardProps, CardSubtitle, type CardSubtitleProps, CardText, type CardTextProps, CardTitle, type CardTitleProps };
|
package/dist/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as e,c as t,d as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./chunks/card-
|
|
1
|
+
"use client";import{a as e,c as t,d as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./chunks/card-CobeDpf1.js";export{e as Card,n as CardBody,u as CardFooter,r as CardGroup,s as CardHeader,i as CardImage,a as CardImageOverlay,l as CardLink,t as CardSubtitle,c as CardText,o as CardTitle};
|
package/dist/carousel.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as CarouselSlideDetail, a as CarouselItem, c as CarouselInnerProps, d as CarouselControlPrev, f as CarouselControlPrevProps, g as CarouselProps, h as Carousel, i as CarouselOverlayProps, l as CarouselIndicators, m as CarouselControlNextProps, n as CarouselPlayPauseProps, o as CarouselItemProps, p as CarouselControlNext, r as CarouselOverlay, s as CarouselInner, t as CarouselPlayPause, u as CarouselIndicatorsProps, v as CarouselTransition, y as CarouselEnds } from "./chunks/index-
|
|
1
|
+
import { _ as CarouselSlideDetail, a as CarouselItem, c as CarouselInnerProps, d as CarouselControlPrev, f as CarouselControlPrevProps, g as CarouselProps, h as Carousel, i as CarouselOverlayProps, l as CarouselIndicators, m as CarouselControlNextProps, n as CarouselPlayPauseProps, o as CarouselItemProps, p as CarouselControlNext, r as CarouselOverlay, s as CarouselInner, t as CarouselPlayPause, u as CarouselIndicatorsProps, v as CarouselTransition, y as CarouselEnds } from "./chunks/index-CTpwB1yR.js";
|
|
2
2
|
export { Carousel, CarouselControlNext, type CarouselControlNextProps, CarouselControlPrev, type CarouselControlPrevProps, type CarouselEnds, CarouselIndicators, type CarouselIndicatorsProps, CarouselInner, type CarouselInnerProps, CarouselItem, type CarouselItemProps, CarouselOverlay, type CarouselOverlayProps, CarouselPlayPause, type CarouselPlayPauseProps, type CarouselProps, type CarouselSlideDetail, type CarouselTransition };
|
package/dist/carousel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./chunks/carousel-
|
|
1
|
+
"use client";import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./chunks/carousel-fTVPqnSV.js";export{i as Carousel,e as CarouselControlNext,n as CarouselControlPrev,a as CarouselIndicators,o as CarouselInner,t as CarouselItem,r as CarouselOverlay,s as CarouselPlayPause};
|
package/dist/checkbox.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as ButtonObject } from "./chunks/renderFormCheck-
|
|
2
|
-
import { i as CheckboxProps, n as CheckboxGroupProps, r as Checkbox, t as CheckboxGroup } from "./chunks/index-
|
|
1
|
+
import { t as ButtonObject } from "./chunks/renderFormCheck-nKgpa_a3.js";
|
|
2
|
+
import { i as CheckboxProps, n as CheckboxGroupProps, r as Checkbox, t as CheckboxGroup } from "./chunks/index-DM01FX3a.js";
|
|
3
3
|
export { type ButtonObject, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps };
|
package/dist/checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{n as e,t}from"./chunks/checkbox-
|
|
1
|
+
"use client";import{n as e,t}from"./chunks/checkbox-ZyQn5Ku5.js";export{e as Checkbox,t as CheckboxGroup};
|
package/dist/chip-input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{t as e}from"./chunks/chip-input-
|
|
1
|
+
"use client";import{t as e}from"./chunks/chip-input-BpVDRERg.js";export{e as ChipInput};
|
package/dist/chip.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ChipProps, t as Chip } from "./chunks/index-
|
|
1
|
+
import { n as ChipProps, t as Chip } from "./chunks/index-B1kw0jzM.js";
|
|
2
2
|
export { Chip, type ChipProps };
|
package/dist/chip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"./chunks/focus-ring-SR_LwaN7.js";import{t as e}from"./chunks/Chip-
|
|
1
|
+
"use client";import"./chunks/focus-ring-SR_LwaN7.js";import{t as e}from"./chunks/Chip-DCaWaBqo.js";export{e as Chip};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as e,g as t,p as n}from"./slot-CNhFZdHF.js";import{t as r}from"./polymorphic-BhGNZQja.js";import{t as i}from"./useButtonSemantics-CILM_lhi.js";import{t as a}from"./useDisabledAnchorGuard-Cz58UCXy.js";import o from"react";import s from"classnames";import{mergeProps as c}from"react-aria";function l({children:r,className:l,color:u=`primary`,component:d,disabled:f,href:p,onClick:m,pressed:h,shape:g,size:_,type:v=`button`,variant:y,...b},x){let S=n(d,p,`button`),C=t(S,p,b),w=C===`anchor`,T=e(C,p,`Button`),E=C===`component`,D=s(`button`,u,{outline:y===`outline`,smooth:y===`smooth`,link:y===`link`,active:h,disabled:C!==`button`&&f},_,g,l),O=a(w,f,m),{buttonProps:k,forkedRef:A}=i(x,{disabled:f,onClick:m}),j={className:D,"aria-pressed":h,onClick:O};if(C===`button`){let e=S;return o.createElement(e,{...b,...j,type:v,disabled:f,ref:x},r)}if(C===`input`){let e=S;return o.createElement(e,{...b,...j,type:v,disabled:f,ref:x})}if(w){let e=S;return o.createElement(e,{...b,...j,...T,...f&&{"aria-disabled":!0,tabIndex:-1},ref:x},r)}return o.createElement(S,{...E?{disabled:f,onClick:m,...b}:c(b,k),className:D,"aria-pressed":h,...T,ref:E?x:A},r)}const u=r(l,`Button`);export{u as t};
|
|
2
|
+
//# sourceMappingURL=Button-BoymWE-L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button-BoymWE-L.js","names":[],"sources":["../../src/components/button/Button.tsx"],"sourcesContent":["import React, {\n ElementType,\n ForwardRefRenderFunction,\n MouseEventHandler,\n ReactElement,\n Ref\n} from 'react'\nimport classNames from 'classnames'\nimport { mergeProps } from 'react-aria'\n\nimport { ContextColor, ContextStyle, Shapes } from '../../types'\nimport { useButtonSemantics, useDisabledAnchorGuard } from '../../hooks'\nimport { hrefProps, linkElement, resolveLinkKind } from '../../utils/elementKind'\nimport {\n createPolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n PolymorphicRefWithFallback\n} from '../../utils/polymorphic'\n\ntype ButtonOwnProps<C extends ElementType> = {\n /**\n * A string of all className you want applied to the base component.\n */\n className?: string\n /**\n * Sets the color of the component to one of Chassis context colors.\n */\n color?: ContextColor\n /**\n * Component used for the root node. Either a string to use a HTML element or a component.\n */\n component?: C\n /**\n * Toggle the disabled state for the component.\n */\n disabled?: boolean\n /**\n * The href attribute specifies the URL of the page the link goes to.\n */\n href?: string\n /**\n * Fires on click. Typed for every element `component` can actually render (`button`, `a`,\n * `input`, or a custom component), rather than narrowed to `HTMLButtonElement` alone.\n */\n onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n /**\n * Marks the button as pressed for toggle-style usage (e.g. a formatting toolbar button).\n * Applies the `.active` class and sets `aria-pressed` so assistive technology announces\n * \"button, pressed\" rather than treating the button as a navigation link.\n */\n pressed?: boolean\n /**\n * Select the shape of the component.\n */\n shape?: Shapes\n /**\n * Size the component sm or lg.\n */\n size?: 'sm' | 'lg'\n /**\n * Specifies the type of button. Always specify the type attribute for the `<button>` element.\n * Different browsers may use different default types for the `<button>` element.\n */\n type?: 'button' | 'submit' | 'reset'\n /**\n * Set the button style variant. Same as `ContextStyle`, but `solid` (the unmodified default\n * look) doesn't apply as a class, and `link` — button-specific, not a context color — makes\n * the button look and behave like a hyperlink while keeping its `color`.\n */\n variant?: Exclude<ContextStyle, 'solid'> | 'link'\n}\n\nexport type ButtonProps<C extends ElementType = 'button'> = PolymorphicComponentProps<\n C,\n ButtonOwnProps<C>\n>\n\ntype ButtonComponent = (<C extends ElementType = 'button'>(\n props: ButtonProps<C> & {\n ref?: PolymorphicRefWithFallback<C, HTMLButtonElement | HTMLAnchorElement>\n }\n) => ReactElement | null) & { displayName?: string }\n\nfunction ButtonRender<C extends ElementType = 'button'>(\n {\n children,\n className,\n color = 'primary',\n component,\n disabled,\n href,\n onClick,\n pressed,\n shape,\n size,\n type = 'button',\n variant,\n ...rest\n }: ButtonProps<C>,\n ref: PolymorphicRef<C>\n) {\n // `href` makes it an `<a>`, unless `component` or `asChild` chose the element (see\n // `linkElement`).\n const Component = linkElement(component, href, 'button')\n // The kind rather than the tag, counting a router link with `href` or `to` as an anchor: under `asChild`, `Component` is a `Slot` standing in for the\n // caller's element, and a slotted `<a>` needs what `component=\"a\"` gets.\n const kind = resolveLinkKind(Component, href, rest)\n const isAnchor = kind === 'anchor'\n const linkProps = hrefProps(kind, href, 'Button')\n\n // A component reference without a link target (a router link with `href` or `to` is an anchor,\n // see `resolveLinkKind`) has its own visual identity and is trusted to\n // handle its own keyboard/role semantics, same as `CloseButton`'s `isComponentReference` escape\n // hatch — synthesizing `role=\"button\"` and Enter/Space handling on top of it would stamp the\n // wrong ARIA role onto whatever it actually renders (e.g. an `<a>`) and can double-fire a click\n // (native anchor Enter→click, plus the synthesized keydown→click). Only a bare, non-native HTML\n // tag string (e.g. `'div'`) still needs `useButtonSemantics`'s synthesis.\n const isComponentReference = kind === 'component'\n\n const _className = classNames(\n 'button',\n color,\n {\n outline: variant === 'outline',\n smooth: variant === 'smooth',\n link: variant === 'link',\n active: pressed,\n disabled: kind !== 'button' && disabled\n },\n size,\n shape,\n className\n )\n\n // `<a>` has no real `disabled` attribute, so a disabled link button still fires click\n // (and still navigates) unless it's blocked here. Native `button`/`input` already stop\n // clicks on their own once the `disabled` attribute below is set.\n const handleClick = useDisabledAnchorGuard<\n HTMLButtonElement | HTMLAnchorElement | HTMLInputElement\n >(isAnchor, disabled, onClick)\n\n // Native `button`/`a`/`input` elements get keyboard activation, focus and disabled\n // handling for free from the browser. A custom `component` doesn't, so useButtonSemantics\n // fills in role, tabIndex and Enter/Space activation for it, matching native button behavior.\n // `ref` is cast for the same reason as the branches below — it's declared for whatever `C`\n // was passed, but this path (a non-native `component`) only ever populates it with a\n // button/anchor-shaped instance.\n const { buttonProps, forkedRef } = useButtonSemantics<HTMLButtonElement | HTMLAnchorElement>(\n ref as Ref<HTMLButtonElement | HTMLAnchorElement>,\n { disabled, onClick }\n )\n\n // Rendered as three separate branches (rather than one `<Component>` tag driven by a\n // `'button' | 'a' | 'input'`-typed variable) because a union-typed tag makes JSX\n // intersect all three elements' prop types — `onClick`/`ref` would then need to satisfy\n // `button`, `a` *and* `input` simultaneously, which `handleClick`/`ref`'s real, narrower\n // types can't. Each branch renders `Component` typed as its tag: that is the tag itself, or\n // the `Slot` holding the caller's element of that kind. `ref` is cast per branch since it's\n // declared for the generic `C`, not the specific element each branch actually renders (true by\n // construction — each branch's ref only ever populates with a matching instance). The props\n // common to all three (className/aria-pressed/onClick) are factored out here so a future\n // addition only needs to change one place, not three.\n const sharedProps = {\n className: _className,\n 'aria-pressed': pressed,\n onClick: handleClick\n }\n\n if (kind === 'button') {\n const NativeButton = Component as 'button'\n return (\n <NativeButton\n {...(rest as Record<string, unknown>)}\n {...sharedProps}\n type={type}\n disabled={disabled}\n ref={ref as Ref<HTMLButtonElement>}\n >\n {children}\n </NativeButton>\n )\n }\n\n if (kind === 'input') {\n const NativeInput = Component as 'input'\n return (\n // `rest` is cast because it's typed generically, whose event handlers don't structurally\n // match `<input>`'s own `onChange` (value-change semantics) — `component=\"input\"` is a\n // fixed set of documented attributes (`type`, `value`, `disabled`, ...), not a\n // general-purpose input, so this is a safe, deliberate escape.\n <NativeInput\n {...(rest as Record<string, unknown>)}\n {...sharedProps}\n type={type}\n disabled={disabled}\n ref={ref as Ref<HTMLInputElement>}\n />\n )\n }\n\n if (isAnchor) {\n const Anchor = Component as 'a'\n return (\n // `rest` is cast for the same reason as the `input` branch above — it's typed generically,\n // whose DOM event handlers are parameterized for whatever `C` was passed, which don't\n // structurally match `<a>`'s own `HTMLAnchorElement` ones (e.g. `onCopy`), even though both\n // accept a real DOM event at runtime.\n <Anchor\n {...(rest as Record<string, unknown>)}\n {...sharedProps}\n {...linkProps}\n {...(disabled && { 'aria-disabled': true, tabIndex: -1 })}\n ref={ref as Ref<HTMLAnchorElement>}\n >\n {children}\n </Anchor>\n )\n }\n\n return (\n <Component\n {...(isComponentReference\n ? ({ disabled, onClick, ...rest } as Record<string, unknown>)\n : (mergeProps(rest, buttonProps) as Record<string, unknown>))}\n className={_className}\n aria-pressed={pressed}\n {...linkProps}\n ref={isComponentReference ? ref : forkedRef}\n >\n {children}\n </Component>\n )\n}\n\nexport const Button = createPolymorphicComponent<ButtonComponent>(\n ButtonRender as ForwardRefRenderFunction<Element, ButtonProps<ElementType>>,\n 'Button'\n)\n"],"mappings":"wSAoFA,SAAS,EACP,CACE,WACA,YACA,QAAQ,UACR,YACA,WACA,OACA,UACA,UACA,QACA,OACA,OAAO,SACP,UACA,GAAG,GAEL,EACA,CAGA,IAAM,EAAY,EAAY,EAAW,EAAM,QAAQ,EAGjD,EAAO,EAAgB,EAAW,EAAM,CAAI,EAC5C,EAAW,IAAS,SACpB,EAAY,EAAU,EAAM,EAAM,QAAQ,EAS1C,EAAuB,IAAS,YAEhC,EAAa,EACjB,SACA,EACA,CACE,QAAS,IAAY,UACrB,OAAQ,IAAY,SACpB,KAAM,IAAY,OAClB,OAAQ,EACR,SAAU,IAAS,UAAY,CACjC,EACA,EACA,EACA,CACF,EAKM,EAAc,EAElB,EAAU,EAAU,CAAO,EAQvB,CAAE,cAAa,aAAc,EACjC,EACA,CAAE,WAAU,SAAQ,CACtB,EAYM,EAAc,CAClB,UAAW,EACX,eAAgB,EAChB,QAAS,CACX,EAEA,GAAI,IAAS,SAAU,CACrB,IAAM,EAAe,EACrB,OACE,EAAA,cAAC,EAAD,CACE,GAAK,EACL,GAAI,EACE,OACI,WACL,KAGO,EADX,CACW,CAElB,CAEA,GAAI,IAAS,QAAS,CACpB,IAAM,EAAc,EACpB,OAKE,EAAA,cAAC,EAAD,CACE,GAAK,EACL,GAAI,EACE,OACI,WACL,KACN,CAAA,CAEL,CAEA,GAAI,EAAU,CACZ,IAAM,EAAS,EACf,OAKE,EAAA,cAAC,EAAD,CACE,GAAK,EACL,GAAI,EACJ,GAAI,EACJ,GAAK,GAAY,CAAE,gBAAiB,GAAM,SAAU,EAAG,EAClD,KAGC,EADL,CACK,CAEZ,CAEA,OACE,EAAA,cAAC,EAAD,CACE,GAAK,EACA,CAAE,WAAU,UAAS,GAAG,CAAK,EAC7B,EAAW,EAAM,CAAW,EACjC,UAAW,EACX,eAAc,EACd,GAAI,EACJ,IAAK,EAAuB,EAAM,CAGzB,EADR,CACQ,CAEf,CAEA,MAAa,EAAS,EACpB,EACA,QACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as PolymorphicRefWithFallback, t as PolymorphicComponentProps } from "./polymorphic-CVHbTHSN.js";
|
|
2
|
-
import {
|
|
2
|
+
import { i as ContextStyle, r as ContextColor, s as Shapes } from "./types-D6FM7bYR.js";
|
|
3
3
|
import { ElementType, MouseEventHandler, ReactElement } from "react";
|
|
4
4
|
//#region src/components/button/Button.d.ts
|
|
5
5
|
type ButtonOwnProps<C extends ElementType> = {
|
|
@@ -62,4 +62,5 @@ type ButtonComponent = (<C extends ElementType = 'button'>(props: ButtonProps<C>
|
|
|
62
62
|
};
|
|
63
63
|
declare const Button: ButtonComponent;
|
|
64
64
|
//#endregion
|
|
65
|
-
export { ButtonProps as n, Button as t };
|
|
65
|
+
export { ButtonProps as n, Button as t };
|
|
66
|
+
//# sourceMappingURL=Button-BuZ_GOHS.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as e,g as t,p as n}from"./slot-CNhFZdHF.js";import{t as r}from"./polymorphic-BhGNZQja.js";import{t as i}from"./useButtonSemantics-CILM_lhi.js";import{t as a}from"./useDisabledAnchorGuard-Cz58UCXy.js";import o from"react";import s from"classnames";import{mergeProps as c}from"react-aria";function l({children:r,className:l,color:u,component:d,disabled:f,href:p,onClick:m,pressed:h,size:g,type:_=`button`,variant:v,...y},b){let x=n(d,p,`span`),S=t(x,p,y),C=e(S,p,`Chip`),w=S===`button`,T=S===`anchor`,E=s(`chip`,u,g,{outline:v===`outline`,smooth:v===`smooth`,active:h,disabled:!w&&f},l),D=a(!w,f,m),O=y.role!==void 0,k=!w&&!T&&!!m&&!O,{buttonProps:A,forkedRef:j}=i(b,{disabled:f,onClick:m});if(w){let e=x;return o.createElement(e,{...y,"aria-pressed":h,className:E,disabled:f,onClick:D,ref:b,type:_},r)}if(T){let e=x;return o.createElement(e,{...y,"aria-pressed":h,className:E,...C,onClick:D,...f&&{"aria-disabled":!0,tabIndex:-1},ref:b},r)}return o.createElement(x,{...c(y,k?A:{}),"aria-pressed":h,className:E,...!k&&{onClick:D},...f&&{"aria-disabled":!0},...C,ref:k?j:b},r)}const u=r(l,`Chip`);export{u as t};
|
|
2
|
+
//# sourceMappingURL=Chip-DCaWaBqo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip-DCaWaBqo.js","names":[],"sources":["../../src/components/chip/Chip.tsx"],"sourcesContent":["import React, {\n ElementType,\n ForwardRefRenderFunction,\n MouseEventHandler,\n ReactElement,\n Ref\n} from 'react'\nimport classNames from 'classnames'\nimport { mergeProps } from 'react-aria'\n\nimport { ContextColor, ContextStyle } from '../../types'\nimport { useButtonSemantics, useDisabledAnchorGuard } from '../../hooks'\nimport { hrefProps, linkElement, resolveLinkKind } from '../../utils/elementKind'\nimport {\n createPolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n PolymorphicRefWithFallback\n} from '../../utils/polymorphic'\n\ntype ChipOwnProps<C extends ElementType> = {\n /**\n * A string of all className you want applied to the component.\n */\n className?: string\n /**\n * Sets the color of the component to one of Chassis context colors.\n */\n color?: ContextColor\n /**\n * Component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `span`, or `a` when `href` is set.\n */\n component?: C\n /**\n * Toggle the disabled state for the component. Applied as the native `disabled` attribute when\n * `component` is `button`, or the `.disabled` class for every other element (a bare `<span>`/\n * `<a>` has no real `disabled` attribute).\n */\n disabled?: boolean\n /**\n * Renders the chip as a link to this URL. Defaults `component` to `a`.\n */\n href?: string\n /**\n * Fires on click. Typed for every element `component` can actually render, rather than\n * narrowed to whichever element `C` happens to be.\n */\n onClick?: MouseEventHandler<HTMLElement>\n /**\n * Marks the chip as pressed for toggle-style usage (e.g. a filter chip). Applies the `.active`\n * class and sets `aria-pressed` so assistive technology announces the toggle state.\n */\n pressed?: boolean\n /**\n * Size the component sm or lg.\n */\n size?: 'sm' | 'lg'\n /**\n * Specifies the type of button. Only applies when `component` is `button`. Different browsers\n * may use different default types for the `<button>` element, so always specify it explicitly.\n */\n type?: 'button' | 'submit' | 'reset'\n /**\n * Set the chip style variant. `solid`/`basic` render the default look with no extra class.\n */\n variant?: ContextStyle\n}\n\nexport type ChipProps<C extends ElementType = 'span'> = PolymorphicComponentProps<\n C,\n ChipOwnProps<C>\n>\n\ntype ChipComponent = (<C extends ElementType = 'span'>(\n props: ChipProps<C> & { ref?: PolymorphicRefWithFallback<C, HTMLSpanElement | HTMLAnchorElement> }\n) => ReactElement | null) & { displayName?: string }\n\nfunction ChipRender<C extends ElementType = 'span'>(\n {\n children,\n className,\n color,\n component,\n disabled,\n href,\n onClick,\n pressed,\n size,\n type = 'button',\n variant,\n ...rest\n }: ChipProps<C>,\n ref: PolymorphicRef<C>\n) {\n // `href` makes it an `<a>`, unless `component` or `asChild` chose the element (see\n // `linkElement`).\n const Component = linkElement(component, href, 'span')\n // The kind rather than the tag, counting a router link with `href` or `to` as an anchor: under `asChild`, `Component` is a `Slot` standing in for the\n // caller's element, and a slotted `<a>` needs what `component=\"a\"` gets.\n const kind = resolveLinkKind(Component, href, rest)\n const linkProps = hrefProps(kind, href, 'Chip')\n const isButton = kind === 'button'\n const isAnchor = kind === 'anchor'\n\n const _className = classNames(\n 'chip',\n color,\n size,\n {\n outline: variant === 'outline',\n smooth: variant === 'smooth',\n active: pressed,\n disabled: !isButton && disabled\n },\n className\n )\n\n // `<a>`/`<span>`/`<div>` have no real `disabled` attribute, so a disabled non-button chip\n // still fires click (and an anchor still navigates) unless it's blocked here, same guard\n // `Button`/`CloseButton` apply.\n const handleClick = useDisabledAnchorGuard<HTMLElement>(!isButton, disabled, onClick)\n\n // A default (non-`button`/`a`) chip — the documented `pressed`/filter-chip use case — gets a\n // raw `onClick` with no keyboard semantics otherwise, the same gap `Link` fills via\n // `useButtonSemantics`. Skipped when the caller already supplied their own `role` via `rest`\n // (e.g. `ChipList`'s `role=\"row\"` grid semantics) — that caller is trusted to handle its own\n // keyboard interaction, same as `CloseButton`'s `isComponentReference` escape hatch.\n const hasExplicitRole = (rest as Record<string, unknown>).role !== undefined\n const needsButtonSemantics = !isButton && !isAnchor && !!onClick && !hasExplicitRole\n const { buttonProps, forkedRef } = useButtonSemantics<HTMLElement>(ref as Ref<HTMLElement>, {\n disabled,\n onClick\n })\n\n if (isButton) {\n const NativeButton = Component as 'button'\n return (\n <NativeButton\n {...(rest as Record<string, unknown>)}\n aria-pressed={pressed}\n className={_className}\n disabled={disabled}\n onClick={handleClick as MouseEventHandler<HTMLButtonElement>}\n ref={ref as Ref<HTMLButtonElement>}\n type={type}\n >\n {children}\n </NativeButton>\n )\n }\n\n if (isAnchor) {\n const Anchor = Component as 'a'\n return (\n <Anchor\n {...(rest as Record<string, unknown>)}\n aria-pressed={pressed}\n className={_className}\n {...linkProps}\n onClick={handleClick as MouseEventHandler<HTMLAnchorElement>}\n {...(disabled && { 'aria-disabled': true, tabIndex: -1 })}\n ref={ref as Ref<HTMLAnchorElement>}\n >\n {children}\n </Anchor>\n )\n }\n\n return (\n <Component\n {...(mergeProps(rest, needsButtonSemantics ? buttonProps : {}) as Record<string, unknown>)}\n aria-pressed={pressed}\n className={_className}\n {...(!needsButtonSemantics && { onClick: handleClick })}\n {...(disabled && { 'aria-disabled': true })}\n {...linkProps}\n ref={needsButtonSemantics ? forkedRef : ref}\n >\n {children}\n </Component>\n )\n}\n\nexport const Chip = createPolymorphicComponent<ChipComponent>(\n ChipRender as ForwardRefRenderFunction<Element, ChipProps<ElementType>>,\n 'Chip'\n)\n"],"mappings":"wSA8EA,SAAS,EACP,CACE,WACA,YACA,QACA,YACA,WACA,OACA,UACA,UACA,OACA,OAAO,SACP,UACA,GAAG,GAEL,EACA,CAGA,IAAM,EAAY,EAAY,EAAW,EAAM,MAAM,EAG/C,EAAO,EAAgB,EAAW,EAAM,CAAI,EAC5C,EAAY,EAAU,EAAM,EAAM,MAAM,EACxC,EAAW,IAAS,SACpB,EAAW,IAAS,SAEpB,EAAa,EACjB,OACA,EACA,EACA,CACE,QAAS,IAAY,UACrB,OAAQ,IAAY,SACpB,OAAQ,EACR,SAAU,CAAC,GAAY,CACzB,EACA,CACF,EAKM,EAAc,EAAoC,CAAC,EAAU,EAAU,CAAO,EAO9E,EAAmB,EAAiC,OAAS,IAAA,GAC7D,EAAuB,CAAC,GAAY,CAAC,GAAY,CAAC,CAAC,GAAW,CAAC,EAC/D,CAAE,cAAa,aAAc,EAAgC,EAAyB,CAC1F,WACA,SACF,CAAC,EAED,GAAI,EAAU,CACZ,IAAM,EAAe,EACrB,OACE,EAAA,cAAC,EAAD,CACE,GAAK,EACL,eAAc,EACd,UAAW,EACD,WACV,QAAS,EACJ,MACC,MAGM,EADX,CACW,CAElB,CAEA,GAAI,EAAU,CACZ,IAAM,EAAS,EACf,OACE,EAAA,cAAC,EAAD,CACE,GAAK,EACL,eAAc,EACd,UAAW,EACX,GAAI,EACJ,QAAS,EACT,GAAK,GAAY,CAAE,gBAAiB,GAAM,SAAU,EAAG,EAClD,KAGC,EADL,CACK,CAEZ,CAEA,OACE,EAAA,cAAC,EAAD,CACE,GAAK,EAAW,EAAM,EAAuB,EAAc,CAAC,CAAC,EAC7D,eAAc,EACd,UAAW,EACX,GAAK,CAAC,GAAwB,CAAE,QAAS,CAAY,EACrD,GAAK,GAAY,CAAE,gBAAiB,EAAK,EACzC,GAAI,EACJ,IAAK,EAAuB,EAAY,CAG/B,EADR,CACQ,CAEf,CAEA,MAAa,EAAO,EAClB,EACA,MACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as e,g as t,p as n}from"./slot-CNhFZdHF.js";import{t as r}from"./polymorphic-BhGNZQja.js";import{t as i}from"./useButtonSemantics-CILM_lhi.js";import{t as a}from"./useDisabledAnchorGuard-Cz58UCXy.js";import o from"react";import s from"classnames";import{mergeProps as c}from"react-aria";function l({children:r,className:l,color:u,component:d,disabled:f,href:p,label:m,onClick:h,size:g,type:_=`button`,variant:v,...y},b){let x=n(d,p,`button`),S=t(x,p,y),C=e(S,p,`CloseButton`),w=S===`component`,T=w?l:s(`close-button`,{context:u||v,disabled:S!==`button`&&f},u,v,g,l),E=m??(r==null?`Close`:void 0),D=a(S===`anchor`,f,h),{buttonProps:O,forkedRef:k}=i(b,{disabled:f,onClick:h});if(S===`button`){let e=x;return o.createElement(e,{className:T,"aria-label":E,...y,type:_,disabled:f,onClick:D,ref:b},r)}if(S===`anchor`){let e=x;return o.createElement(e,{className:T,"aria-label":E,...y,...C,onClick:D,...f&&{"aria-disabled":!0,tabIndex:-1},ref:b},r)}let A=x;return o.createElement(A,{className:T,"aria-label":E,...w?{color:u,size:g,variant:v,disabled:f,onClick:h,...y}:c(y,O),...C,ref:w?b:k},r)}const u=r(l,`CloseButton`);export{u as t};
|
|
2
|
+
//# sourceMappingURL=CloseButton-DPgQztE0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloseButton-DPgQztE0.js","names":[],"sources":["../../src/components/close-button/CloseButton.tsx"],"sourcesContent":["import React, {\n ElementType,\n ForwardRefRenderFunction,\n MouseEventHandler,\n ReactElement,\n Ref\n} from 'react'\nimport classNames from 'classnames'\nimport { mergeProps } from 'react-aria'\n\nimport { ContextColor, ContextStyle } from '../../types'\nimport { useButtonSemantics, useDisabledAnchorGuard } from '../../hooks'\nimport { hrefProps, linkElement, resolveLinkKind } from '../../utils/elementKind'\nimport {\n createPolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n PolymorphicRefWithFallback\n} from '../../utils/polymorphic'\n\ntype CloseButtonOwnProps<C extends ElementType> = {\n /**\n * A string of all className you want applied to the base component.\n */\n className?: string\n /**\n * Sets the color of the component to one of Chassis context colors. Applies the\n * `context` class alongside it, so the icon picks up that color without needing\n * an ancestor `.context` wrapper.\n */\n color?: ContextColor\n /**\n * Component used for the root node. Either a string to use a HTML element or a component.\n * A custom HTML tag (e.g. `'span'`) gets button semantics — role, focus, Enter/Space\n * activation — filled in automatically. A component is trusted to handle its own semantics,\n * so pass one that's already interactive (e.g. `Button`).\n */\n component?: C\n /**\n * Toggle the disabled state for the component.\n */\n disabled?: boolean\n /**\n * The href attribute specifies the URL of the page the link goes to. Renders an `<a>` in place\n * of the `<button>`, unless `component` or `asChild` chose the element.\n */\n href?: string\n /**\n * The accessible label announced by assistive technology. Override this to\n * localize the button for non-English contexts.\n */\n label?: string\n /**\n * Fires on click. Typed for every element `component` can actually render (`button` or `a`\n * natively, plus whatever a custom `component` renders), rather than narrowed to\n * `HTMLButtonElement` alone.\n */\n onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>\n /**\n * Size the component sm or lg.\n */\n size?: 'sm' | 'lg'\n /**\n * Specifies the type of button. Always specify the type attribute for the `<button>` element.\n * Different browsers may use different default types for the `<button>` element.\n */\n type?: 'button' | 'submit' | 'reset'\n /**\n * Set the close button's context style variant. Applies the `context` class\n * alongside it, same as `color`.\n */\n variant?: ContextStyle\n}\n\nexport type CloseButtonProps<C extends ElementType = 'button'> = PolymorphicComponentProps<\n C,\n CloseButtonOwnProps<C>\n>\n\ntype CloseButtonComponent = (<C extends ElementType = 'button'>(\n props: CloseButtonProps<C> & {\n ref?: PolymorphicRefWithFallback<C, HTMLButtonElement | HTMLAnchorElement>\n }\n) => ReactElement | null) & { displayName?: string }\n\nfunction CloseButtonRender<C extends ElementType = 'button'>(\n {\n children,\n className,\n color,\n component,\n disabled,\n href,\n label,\n onClick,\n size,\n type = 'button',\n variant,\n ...rest\n }: CloseButtonProps<C>,\n ref: PolymorphicRef<C>\n) {\n // `href` makes it an `<a>`, unless `component` or `asChild` chose the element (see\n // `linkElement`). It used to be dropped unless `component=\"a\"` was passed as well.\n const component_ = linkElement(component, href, 'button')\n // The kind rather than the tag, counting a router link with `href` or `to` as an anchor: under `asChild`, `component_` is a `Slot` standing in for the\n // caller's element, and a slotted `<a>` needs what `component=\"a\"` gets.\n const kind = resolveLinkKind(component_, href, rest)\n const linkProps = hrefProps(kind, href, 'CloseButton')\n\n // A component reference (e.g. `Button`) has its own visual identity and its own\n // `color`/`size`/`variant` semantics — CloseButton's icon styling (the `close-button`\n // class and its context/color/variant/size classes) would just conflict with it, and\n // would also swallow those props before the component ever saw them. So a component\n // reference gets none of CloseButton's own styling; `color`/`size`/`variant` pass\n // through untouched, same as `className`, letting the component interpret them itself.\n const isComponentReference = kind === 'component'\n\n // Only a bare, non-`button` HTML tag needs the `.disabled` class applied by hand — a real\n // `<button>` gets native `:disabled` styling for free (chassis-css matches both selectors,\n // `&:disabled, &.disabled`), and a component reference isn't styled by CloseButton at all\n // (see `isComponentReference` above).\n const _className = isComponentReference\n ? className\n : classNames(\n 'close-button',\n { context: color || variant, disabled: kind !== 'button' && disabled },\n color,\n variant,\n size,\n className\n )\n\n // The default icon-only close button has no visible text, so it needs the 'Close' fallback\n // as its accessible name. Once `children` renders visible content (e.g. custom text passed\n // through `component`), let that content be the accessible name instead — forcing the\n // fallback label here would silently override it (a Label-in-Name accessibility failure).\n // An explicit `label` always wins either way, same as an explicit `aria-label` always did.\n const _label = label ?? (children == null ? 'Close' : undefined)\n\n // `<a>` has no real `disabled` attribute, so a disabled link close-button still fires\n // click (and still navigates) unless it's blocked here, same guard `Button` applies.\n const handleClick = useDisabledAnchorGuard<HTMLButtonElement | HTMLAnchorElement>(\n kind === 'anchor',\n disabled,\n onClick\n )\n\n const { buttonProps, forkedRef } = useButtonSemantics<HTMLButtonElement | HTMLAnchorElement>(\n ref as Ref<HTMLButtonElement | HTMLAnchorElement>,\n { disabled, onClick }\n )\n\n // Rendered as explicit branches, same as `Button`, rather than one `<Component>` tag\n // driven by a `'button' | 'a' | ElementType`-typed variable — a union-typed tag would\n // make JSX intersect all of `button`/`a`/custom prop types at once. Each branch renders\n // `component_` typed as its tag: the tag itself, or the `Slot` holding an element of that kind.\n // `aria-label={_label}` comes before `...rest` in every branch below so that an explicit\n // `aria-label` (not destructured above, so it lands in `rest`) overrides the computed\n // fallback via JSX's last-attribute-wins rule, rather than the other way around.\n if (kind === 'button') {\n const NativeButton = component_ as 'button'\n return (\n <NativeButton\n className={_className}\n aria-label={_label}\n {...(rest as Record<string, unknown>)}\n type={type}\n disabled={disabled}\n onClick={handleClick}\n ref={ref as Ref<HTMLButtonElement>}\n >\n {children}\n </NativeButton>\n )\n }\n\n if (kind === 'anchor') {\n const Anchor = component_ as 'a'\n return (\n <Anchor\n className={_className}\n aria-label={_label}\n {...(rest as Record<string, unknown>)}\n {...linkProps}\n onClick={handleClick}\n {...(disabled && { 'aria-disabled': true, tabIndex: -1 })}\n ref={ref as Ref<HTMLAnchorElement>}\n >\n {children}\n </Anchor>\n )\n }\n\n const Component = component_ as ElementType\n\n // Only a bare, non-`button`/`a` HTML tag (e.g. `'span'`) reaches here needing synthesized\n // button semantics — a component reference is trusted to already be interactive, so it\n // skips `buttonProps` (double keyboard activation) and instead gets `color`/`size`/`variant`\n // passed through untouched, per the comment on `isComponentReference` above.\n return (\n <Component\n className={_className}\n aria-label={_label}\n {...(isComponentReference\n ? ({ color, size, variant, disabled, onClick, ...rest } as Record<string, unknown>)\n : (mergeProps(rest, buttonProps) as Record<string, unknown>))}\n {...linkProps}\n ref={isComponentReference ? ref : forkedRef}\n >\n {children}\n </Component>\n )\n}\n\nexport const CloseButton = createPolymorphicComponent<CloseButtonComponent>(\n CloseButtonRender as ForwardRefRenderFunction<Element, CloseButtonProps<ElementType>>,\n 'CloseButton'\n)\n"],"mappings":"wSAqFA,SAAS,EACP,CACE,WACA,YACA,QACA,YACA,WACA,OACA,QACA,UACA,OACA,OAAO,SACP,UACA,GAAG,GAEL,EACA,CAGA,IAAM,EAAa,EAAY,EAAW,EAAM,QAAQ,EAGlD,EAAO,EAAgB,EAAY,EAAM,CAAI,EAC7C,EAAY,EAAU,EAAM,EAAM,aAAa,EAQ/C,EAAuB,IAAS,YAMhC,EAAa,EACf,EACA,EACE,eACA,CAAE,QAAS,GAAS,EAAS,SAAU,IAAS,UAAY,CAAS,EACrE,EACA,EACA,EACA,CACF,EAOE,EAAS,IAAU,GAAY,KAAO,QAAU,IAAA,IAIhD,EAAc,EAClB,IAAS,SACT,EACA,CACF,EAEM,CAAE,cAAa,aAAc,EACjC,EACA,CAAE,WAAU,SAAQ,CACtB,EASA,GAAI,IAAS,SAAU,CACrB,IAAM,EAAe,EACrB,OACE,EAAA,cAAC,EAAD,CACE,UAAW,EACX,aAAY,EACZ,GAAK,EACC,OACI,WACV,QAAS,EACJ,KAGO,EADX,CACW,CAElB,CAEA,GAAI,IAAS,SAAU,CACrB,IAAM,EAAS,EACf,OACE,EAAA,cAAC,EAAD,CACE,UAAW,EACX,aAAY,EACZ,GAAK,EACL,GAAI,EACJ,QAAS,EACT,GAAK,GAAY,CAAE,gBAAiB,GAAM,SAAU,EAAG,EAClD,KAGC,EADL,CACK,CAEZ,CAEA,IAAM,EAAY,EAMlB,OACE,EAAA,cAAC,EAAD,CACE,UAAW,EACX,aAAY,EACZ,GAAK,EACA,CAAE,QAAO,OAAM,UAAS,WAAU,UAAS,GAAG,CAAK,EACnD,EAAW,EAAM,CAAW,EACjC,GAAI,EACJ,IAAK,EAAuB,EAAM,CAGzB,EADR,CACQ,CAEf,CAEA,MAAa,EAAc,EACzB,EACA,aACF"}
|
|
@@ -51,4 +51,5 @@ declare const ComboboxItem: {
|
|
|
51
51
|
displayName: string;
|
|
52
52
|
};
|
|
53
53
|
//#endregion
|
|
54
|
-
export { ComboboxGroupProps as i, ComboboxItemProps as n, ComboboxGroup as r, ComboboxItem as t };
|
|
54
|
+
export { ComboboxGroupProps as i, ComboboxItemProps as n, ComboboxGroup as r, ComboboxItem as t };
|
|
55
|
+
//# sourceMappingURL=ComboboxItem-C9TpoJOI.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./lazyElement-tfMG21pZ.js";import{t}from"./iconSlot-BNu2MrFI.js";import{t as n}from"./renderMenuItemContent-DUezZrpj.js";import r,{useRef as i}from"react";import a from"classnames";import{useListBox as o,useOption as s}from"react-aria";import{Item as c,Section as l}from"react-stately";const u=e=>null;u.displayName=`ComboboxItem`;const d=e=>e.entryType===`group`,f=(t,{Group:n,Item:i})=>{let a=[];return r.Children.forEach(t,(t,o)=>{if(e(t,n)){let n=t.props,s=[];r.Children.forEach(n.children,t=>{e(t,i)&&s.push(t)}),a.push({entryType:`group`,key:`group-${o}`,label:n.label,items:s});return}e(t,i)&&a.push(t)}),a},p=e=>{let t=[],n=null;return e.forEach(e=>{if(e.type===`divider`)return;if(e.type===`header`){n={entryType:`group`,key:e.id,label:e.label,items:[]},t.push(n);return}let i=r.createElement(u,{key:e.id,id:e.id,disabled:e.disabled,icon:e.icon,description:e.description,textValue:e.textValue},e.label);n?n.items.push(i):t.push(i)}),t},m=e=>e.reduce((e,t)=>{let n=d(t)?t.items:[t];return e.concat(n.filter(e=>e.props.disabled).map(e=>e.props.id))},[]),h=e=>r.createElement(c,{key:e.props.id,textValue:e.props.textValue??(typeof e.props.children==`string`?e.props.children:void 0)},n({icon:e.props.icon,label:e.props.children,description:e.props.description})),g=e=>d(e)?r.createElement(l,{key:e.key,title:e.label,items:e.items},h):h(e),_={"--cx-icon-color":`var(--cx-item-hover-icon-color)`,"--cx-item-fg-color":`var(--cx-item-hover-fg-color)`,"--cx-item-bg-color":`var(--cx-item-hover-bg-color)`},v=e=>e?_:void 0,y=({listBoxProps:e,listBoxRef:t,state:n})=>{let{listBoxProps:i}=o(e,n,t);return r.createElement(`div`,{...i,ref:t},[...n.collection].map(e=>e.type===`section`?r.createElement(b,{key:e.key,node:e,state:n}):r.createElement(x,{key:e.key,item:e,state:n})))},b=({node:e,state:t})=>{let n=[...t.collection.getChildren(e.key)];return n.length===0?null:r.createElement(r.Fragment,null,r.createElement(`div`,{className:`menu-header`,role:`presentation`},e.rendered),n.map(e=>r.createElement(x,{key:e.key,item:e,state:t})))},x=({item:e,state:n})=>{let o=i(null),{optionProps:c,isSelected:l,isDisabled:u,isFocused:d}=s({key:e.key},n,o);return r.createElement(`div`,{className:a(`menu-item`,{selected:l,disabled:u}),style:v(d),...c,ref:o},e.rendered,l&&r.createElement(t,{icon:`check`,className:`menu-item-check`}))};export{m as a,g as i,f as n,u as o,p as r,y as t};
|
|
2
|
+
//# sourceMappingURL=ComboboxListBox-Cm3L1ULl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxListBox-Cm3L1ULl.js","names":[],"sources":["../../src/components/combobox/ComboboxItem.tsx","../../src/utils/comboboxCollection.tsx","../../src/utils/virtualFocusStyle.ts","../../src/components/combobox/ComboboxListBox.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { Key } from 'react-stately'\n\nexport interface ComboboxItemProps {\n /**\n * Content of the option. Used as the filter/typeahead text when `textValue` isn't set — pass\n * `textValue` explicitly whenever `children` isn't a plain string (e.g. it wraps an icon or\n * other rich markup), since it can't otherwise be derived from rich content.\n */\n children: ReactNode\n /**\n * Secondary line of text rendered below `children` (`.menu-item-description`).\n */\n description?: ReactNode\n /**\n * Prevents the option from being selected, focused, or otherwise interacted with.\n */\n disabled?: boolean\n /**\n * Icon rendered at the option's leading edge (`.menu-item-icon`).\n */\n icon?: ReactNode\n /**\n * Identifies this option. Submitted as the value when this option is selected.\n */\n id: Key\n /**\n * Text used for filtering and typeahead. Required when `children` isn't a plain string —\n * falls back to `children` itself when omitted and `children` is a string.\n */\n textValue?: string\n}\n\n// `ComboboxItem` is never actually mounted — like `Tab`, it's read as data by `Combobox`,\n// which builds react-aria's listbox collection from each item's `id` and `children`. This keeps\n// the public authoring shape as plain composed JSX:\n//\n// <Combobox aria-label=\"Fruit\">\n// <ComboboxItem id=\"apple\">Apple</ComboboxItem>\n// <ComboboxItem id=\"banana\">Banana</ComboboxItem>\n// </Combobox>\nexport const ComboboxItem = (_props: ComboboxItemProps): null => null\n\nComboboxItem.displayName = 'ComboboxItem'\n","import React, { ComponentType, ReactElement, ReactNode } from 'react'\nimport { Item, Key, Section } from 'react-stately'\n\nimport { ComboboxGroupProps } from '../components/combobox/ComboboxGroup'\nimport { ComboboxItem, ComboboxItemProps } from '../components/combobox/ComboboxItem'\nimport { MenuItemsDef } from '../components/menu/MenuItemDef'\nimport { isElementOfType } from './lazyElement'\nimport { renderMenuItemContent } from './renderMenuItemContent'\n\n// Shared between Combobox.tsx/ComboboxListBox.tsx (which build/render this collection) and\n// Autocomplete.tsx (which reuses the same entry shape — see the comment on\n// `buildEntriesFromChildren` below). Lives in `utils/` rather than `components/combobox/` because\n// it crosses that folder boundary; kept in its own file to also avoid a circular import between\n// Combobox.tsx and ComboboxListBox.tsx.\n\nexport type ComboboxItemElement = ReactElement<ComboboxItemProps>\n\nexport interface ComboboxGroupEntry {\n entryType: 'group'\n key: Key\n label: ReactNode\n items: ComboboxItemElement[]\n}\n\nexport type ComboboxEntry = ComboboxItemElement | ComboboxGroupEntry\n\n// `useComboBoxState`/`useComboBox`'s own `SelectionMode` ('single' | 'multiple') isn't\n// re-exported from react-stately's public entry point (only `ComboBoxState` etc. are) — this is\n// a structurally-identical stand-in so `ComboboxListBox` can stay generic over it without a\n// fragile deep import.\nexport type ComboboxSelectionMode = 'single' | 'multiple'\n\nexport const isComboboxGroupEntry = (entry: ComboboxEntry): entry is ComboboxGroupEntry =>\n (entry as ComboboxGroupEntry).entryType === 'group'\n\n// `Autocomplete`'s own `AutocompleteItem`/`AutocompleteGroup` are structurally identical to\n// `ComboboxItem`/`ComboboxGroup` (see AutocompleteItem.tsx/AutocompleteGroup.tsx — kept as\n// separate named types only so `Autocomplete`'s public API doesn't leak `Combobox`'s own prop\n// type), but they're different *runtime* component identities, which is what\n// `buildEntriesFromChildren` below needs to check consumer-authored `children` against. Passing\n// the pair in lets one implementation serve both families instead of two near-duplicate copies.\nexport interface ComboboxCollectionComponents {\n Group: ComponentType<ComboboxGroupProps>\n Item: ComponentType<ComboboxItemProps>\n}\n\n// Splits `children` into a flat, ordered list of entries — bare `Item` elements and\n// `Group`-wrapped clusters of them — mirroring how `useComboBoxState`'s dynamic collection needs\n// top-level nodes: some rendered as a plain `<Item>`, some as a `<Section>` wrapping several\n// `<Item>`s (see `comboboxCollectionChildren` below).\nexport const buildEntriesFromChildren = (\n children: ReactNode,\n { Group, Item: ItemComponent }: ComboboxCollectionComponents\n): ComboboxEntry[] => {\n const entries: ComboboxEntry[] = []\n // `isElementOfType` rather than `child.type === Group`: written in a Server Component, the\n // children's types are lazy wrappers (see `./lazyElement`).\n React.Children.forEach(children, (child, index) => {\n if (isElementOfType<ComboboxGroupProps>(child, Group)) {\n const groupProps = child.props\n const items: ComboboxItemElement[] = []\n React.Children.forEach(groupProps.children, (groupChild) => {\n if (isElementOfType<ComboboxItemProps>(groupChild, ItemComponent)) items.push(groupChild)\n })\n entries.push({ entryType: 'group', key: `group-${index}`, label: groupProps.label, items })\n return\n }\n if (isElementOfType<ComboboxItemProps>(child, ItemComponent)) entries.push(child)\n })\n return entries\n}\n\n// Same shape as `buildEntriesFromChildren`, from a flat `MenuItemsDef` instead. A `'header'`\n// entry opens a new group that all following items join until the next header (or the end of\n// the array) — matching how chassis-css itself renders grouped items (flat siblings, no\n// wrapping element per group). `'divider'` entries aren't meaningful for a listbox/option\n// collection and are skipped.\n//\n// Always builds a bare `ComboboxItem` internally regardless of which family (`Combobox` or\n// `Autocomplete`) called it: unlike `buildEntriesFromChildren`, nothing downstream re-checks\n// these elements' runtime type (they're read only via `.props.*`, never matched against a\n// component reference again), so there's no need to thread `ComboboxCollectionComponents`\n// through here too. `def.href`/`def.onClick` are intentionally not read — see the doc comments on\n// `MenuItemDef` itself for why: they're `Menu`-only fields on this shared type.\nexport const buildEntriesFromItemsDef = (defs: MenuItemsDef): ComboboxEntry[] => {\n const entries: ComboboxEntry[] = []\n let currentGroup: ComboboxGroupEntry | null = null\n\n defs.forEach((def) => {\n if (def.type === 'divider') return\n if (def.type === 'header') {\n currentGroup = { entryType: 'group', key: def.id, label: def.label, items: [] }\n entries.push(currentGroup)\n return\n }\n const item = (\n <ComboboxItem\n key={def.id}\n id={def.id}\n disabled={def.disabled}\n icon={def.icon}\n description={def.description}\n textValue={def.textValue}\n >\n {def.label}\n </ComboboxItem>\n )\n if (currentGroup) currentGroup.items.push(item)\n else entries.push(item)\n })\n\n return entries\n}\n\nexport const getDisabledKeys = (entries: ComboboxEntry[]): Key[] =>\n entries.reduce<Key[]>((keys, entry) => {\n const items = isComboboxGroupEntry(entry) ? entry.items : [entry]\n return keys.concat(items.filter((item) => item.props.disabled).map((item) => item.props.id))\n }, [])\n\n// Builds the react-stately `Item` node `useComboBoxState`'s collection actually renders from one\n// entry's props — identical for `Combobox` and `Autocomplete` regardless of which authoring\n// component (`ComboboxItem`/`AutocompleteItem`) produced it, since both share the same prop shape.\nexport const renderComboboxCollectionItem = (item: ComboboxItemElement) => (\n <Item\n key={item.props.id}\n textValue={\n item.props.textValue ??\n (typeof item.props.children === 'string' ? item.props.children : undefined)\n }\n >\n {renderMenuItemContent({\n icon: item.props.icon,\n label: item.props.children,\n description: item.props.description\n })}\n </Item>\n)\n\n// `useComboBoxState`'s own `children` render prop, given one `ComboboxEntry` — a plain `Item` for\n// a bare entry, a `Section` wrapping its items for a group. Identical for `Combobox` and\n// `Autocomplete`'s state setup.\nexport const comboboxCollectionChildren = (entry: ComboboxEntry) =>\n isComboboxGroupEntry(entry) ? (\n <Section key={entry.key} title={entry.label} items={entry.items}>\n {renderComboboxCollectionItem}\n </Section>\n ) : (\n renderComboboxCollectionItem(entry)\n )\n","import { CSSProperties } from 'react'\n\n// Options in a virtually-focused listbox (react-aria's combobox/listbox patterns) never receive\n// real DOM focus — focus stays on the trigger (a text input or button) while the highlighted\n// option is tracked virtually, so `:hover`/`:focus-visible` can't style it. To indicate the\n// highlight without touching chassis-css, we reuse its own hover color tokens (already defined\n// on the ancestor `.menu`, prefixed `--cx-` by chassis-css's build) as inline overrides instead\n// of relying on `.active`, which chassis-css reserves for the pressed/`:active` look.\nexport const virtualFocusStyle: CSSProperties = {\n '--cx-icon-color': 'var(--cx-item-hover-icon-color)',\n '--cx-item-fg-color': 'var(--cx-item-hover-fg-color)',\n '--cx-item-bg-color': 'var(--cx-item-hover-bg-color)'\n} as CSSProperties\n\nexport const getVirtualFocusStyle = (isFocused: boolean): CSSProperties | undefined =>\n isFocused ? virtualFocusStyle : undefined\n","import React, { RefObject, useRef } from 'react'\nimport classNames from 'classnames'\nimport { AriaListBoxOptions, useListBox, useOption } from 'react-aria'\nimport { ComboBoxState, Node } from 'react-stately'\n\nimport { getVirtualFocusStyle } from '../../utils/virtualFocusStyle'\nimport { ComboboxEntry, ComboboxSelectionMode } from '../../utils/comboboxCollection'\nimport { IconSlot } from '../../utils/iconSlot'\n\ninterface ComboboxListBoxProps<M extends ComboboxSelectionMode = 'single'> {\n listBoxProps: AriaListBoxOptions<ComboboxEntry>\n listBoxRef: RefObject<HTMLElement | null>\n state: ComboBoxState<ComboboxEntry, M>\n}\n\n// Generic over `M` (single- vs multi-select) purely so both `Combobox` (always single) and\n// `Autocomplete` (either) can pass their own `ComboBoxState` here without a cast — nothing in\n// this file's rendering logic actually depends on which mode is active.\nexport const ComboboxListBox = <M extends ComboboxSelectionMode = 'single'>({\n listBoxProps,\n listBoxRef,\n state\n}: ComboboxListBoxProps<M>) => {\n const { listBoxProps: domListBoxProps } = useListBox(listBoxProps, state, listBoxRef)\n\n return (\n <div {...domListBoxProps} ref={listBoxRef as RefObject<HTMLDivElement>}>\n {[...state.collection].map((node) =>\n node.type === 'section' ? (\n <ComboboxSection key={node.key} node={node} state={state} />\n ) : (\n <ComboboxOption key={node.key} item={node} state={state} />\n )\n )}\n </div>\n )\n}\n\ninterface ComboboxSectionProps<M extends ComboboxSelectionMode = 'single'> {\n node: Node<ComboboxEntry>\n state: ComboBoxState<ComboboxEntry, M>\n}\n\n// Chassis-css groups are `.menu-header` siblings interleaved with `.menu-item`s, no wrapping\n// element — plain, static markup, so there's no need for react-aria's `useListBoxSection`.\n// `useComboBoxState`'s filtering hides child items whose text doesn't match, but doesn't drop an\n// emptied-out section node itself, so a fully-filtered-out group's header is skipped by hand here\n// rather than left to render on its own.\nconst ComboboxSection = <M extends ComboboxSelectionMode = 'single'>({\n node,\n state\n}: ComboboxSectionProps<M>) => {\n const childNodes = [...state.collection.getChildren!(node.key)]\n if (childNodes.length === 0) return null\n\n return (\n <>\n <div className=\"menu-header\" role=\"presentation\">\n {node.rendered}\n </div>\n {childNodes.map((child) => (\n <ComboboxOption key={child.key} item={child} state={state} />\n ))}\n </>\n )\n}\n\ninterface ComboboxOptionProps<M extends ComboboxSelectionMode = 'single'> {\n item: Node<ComboboxEntry>\n state: ComboBoxState<ComboboxEntry, M>\n}\n\nconst ComboboxOption = <M extends ComboboxSelectionMode = 'single'>({\n item,\n state\n}: ComboboxOptionProps<M>) => {\n const ref = useRef<HTMLDivElement>(null)\n const { optionProps, isSelected, isDisabled, isFocused } = useOption(\n { key: item.key },\n state,\n ref\n )\n\n return (\n <div\n className={classNames('menu-item', {\n selected: isSelected,\n disabled: isDisabled\n })}\n style={getVirtualFocusStyle(isFocused)}\n {...optionProps}\n ref={ref}\n >\n {item.rendered}\n {isSelected && <IconSlot icon=\"check\" className=\"menu-item-check\" />}\n </div>\n )\n}\n"],"mappings":"iTAyCA,MAAa,EAAgB,GAAoC,KAEjE,EAAa,YAAc,eCX3B,MAAa,EAAwB,GAClC,EAA6B,YAAc,QAiBjC,GACX,EACA,CAAE,QAAO,KAAM,KACK,CACpB,IAAM,EAA2B,CAAC,EAelC,OAZA,EAAM,SAAS,QAAQ,GAAW,EAAO,IAAU,CACjD,GAAI,EAAoC,EAAO,CAAK,EAAG,CACrD,IAAM,EAAa,EAAM,MACnB,EAA+B,CAAC,EACtC,EAAM,SAAS,QAAQ,EAAW,SAAW,GAAe,CACtD,EAAmC,EAAY,CAAa,GAAG,EAAM,KAAK,CAAU,CAC1F,CAAC,EACD,EAAQ,KAAK,CAAE,UAAW,QAAS,IAAK,SAAS,IAAS,MAAO,EAAW,MAAO,OAAM,CAAC,EAC1F,MACF,CACI,EAAmC,EAAO,CAAa,GAAG,EAAQ,KAAK,CAAK,CAClF,CAAC,EACM,CACT,EAca,EAA4B,GAAwC,CAC/E,IAAM,EAA2B,CAAC,EAC9B,EAA0C,KAyB9C,OAvBA,EAAK,QAAS,GAAQ,CACpB,GAAI,EAAI,OAAS,UAAW,OAC5B,GAAI,EAAI,OAAS,SAAU,CACzB,EAAe,CAAE,UAAW,QAAS,IAAK,EAAI,GAAI,MAAO,EAAI,MAAO,MAAO,CAAC,CAAE,EAC9E,EAAQ,KAAK,CAAY,EACzB,MACF,CACA,IAAM,EACJ,EAAA,cAAC,EAAD,CACE,IAAK,EAAI,GACT,GAAI,EAAI,GACR,SAAU,EAAI,SACd,KAAM,EAAI,KACV,YAAa,EAAI,YACjB,UAAW,EAAI,SAGH,EADX,EAAI,KACO,EAEZ,EAAc,EAAa,MAAM,KAAK,CAAI,EACzC,EAAQ,KAAK,CAAI,CACxB,CAAC,EAEM,CACT,EAEa,EAAmB,GAC9B,EAAQ,QAAe,EAAM,IAAU,CACrC,IAAM,EAAQ,EAAqB,CAAK,EAAI,EAAM,MAAQ,CAAC,CAAK,EAChE,OAAO,EAAK,OAAO,EAAM,OAAQ,GAAS,EAAK,MAAM,QAAQ,CAAC,CAAC,IAAK,GAAS,EAAK,MAAM,EAAE,CAAC,CAC7F,EAAG,CAAC,CAAC,EAKM,EAAgC,GAC3C,EAAA,cAAC,EAAD,CACE,IAAK,EAAK,MAAM,GAChB,UACE,EAAK,MAAM,YACV,OAAO,EAAK,MAAM,UAAa,SAAW,EAAK,MAAM,SAAW,IAAA,GAQ/D,EALH,EAAsB,CACrB,KAAM,EAAK,MAAM,KACjB,MAAO,EAAK,MAAM,SAClB,YAAa,EAAK,MAAM,WAC1B,CAAC,CACG,EAMK,EAA8B,GACzC,EAAqB,CAAK,EACxB,EAAA,cAAC,EAAD,CAAS,IAAK,EAAM,IAAK,MAAO,EAAM,MAAO,MAAO,EAAM,KAEjD,EADN,CACM,EAET,EAA6B,CAAK,EC5IzB,EAAmC,CAC9C,kBAAmB,kCACnB,qBAAsB,gCACtB,qBAAsB,+BACxB,EAEa,EAAwB,GACnC,EAAY,EAAoB,IAAA,GCGrB,GAA+D,CAC1E,eACA,aACA,WAC6B,CAC7B,GAAM,CAAE,aAAc,GAAoB,EAAW,EAAc,EAAO,CAAU,EAEpF,OACE,EAAA,cAAC,MAAD,CAAK,GAAI,EAAiB,IAAK,CAQ1B,EAPF,CAAC,GAAG,EAAM,UAAU,CAAC,CAAC,IAAK,GAC1B,EAAK,OAAS,UACZ,EAAA,cAAC,EAAD,CAAiB,IAAK,EAAK,IAAW,OAAa,OAAQ,CAAA,EAE3D,EAAA,cAAC,EAAD,CAAgB,IAAK,EAAK,IAAK,KAAM,EAAa,OAAQ,CAAA,CAE9D,CACG,CAET,EAYM,GAA+D,CACnE,OACA,WAC6B,CAC7B,IAAM,EAAa,CAAC,GAAG,EAAM,WAAW,YAAa,EAAK,GAAG,CAAC,EAG9D,OAFI,EAAW,SAAW,EAAU,KAGlC,EAAA,cAAA,EAAA,SAAA,KACE,EAAA,cAAC,MAAD,CAAK,UAAU,cAAc,KAAK,cAE7B,EADF,EAAK,QACH,EACJ,EAAW,IAAK,GACf,EAAA,cAAC,EAAD,CAAgB,IAAK,EAAM,IAAK,KAAM,EAAc,OAAQ,CAAA,CAC7D,CACD,CAEN,EAOM,GAA8D,CAClE,OACA,WAC4B,CAC5B,IAAM,EAAM,EAAuB,IAAI,EACjC,CAAE,cAAa,aAAY,aAAY,aAAc,EACzD,CAAE,IAAK,EAAK,GAAI,EAChB,EACA,CACF,EAEA,OACE,EAAA,cAAC,MAAD,CACE,UAAW,EAAW,YAAa,CACjC,SAAU,EACV,SAAU,CACZ,CAAC,EACD,MAAO,EAAqB,CAAS,EACrC,GAAI,EACC,KAIF,EAFF,EAAK,SACL,GAAc,EAAA,cAAC,EAAD,CAAU,KAAK,QAAQ,UAAU,iBAAmB,CAAA,CAChE,CAET"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as e,l as t}from"./slot-CNhFZdHF.js";import n,{useRef as r}from"react";import i from"classnames";import{useDateSegment as a}from"react-aria";const o=/^[\s\u2066-\u2069]+$/,s=new Set([`era`,`year`,`month`,`day`]),c=(e,t)=>{let n=e.slice(0,t).reverse().find(e=>e.type!==`literal`),r=e.slice(t+1).find(e=>e.type!==`literal`);return!!(n&&r)&&s.has(n.type)!==s.has(r.type)},l=({fieldLabelledBy:s,segment:l,slots:u,state:d})=>{let f=r(null),{segmentProps:p}=a(l,d,f),m=l.type===`literal`&&(o.test(l.text)||c(d.segments,d.segments.indexOf(l)));return n.createElement(`span`,{...t(p,...u),"aria-labelledby":p[`aria-labelledby`]&&e(p.id,s),className:m?void 0:i(`datepicker-segment`,{placeholder:l.isPlaceholder}),contentEditable:p.contentEditable||void 0,ref:f},l.text)};export{l as t};
|
|
2
|
+
//# sourceMappingURL=DateSegment-2agXAd0f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateSegment-2agXAd0f.js","names":[],"sources":["../../src/components/datepicker/DateSegment.tsx"],"sourcesContent":["import React, { useRef } from 'react'\nimport classNames from 'classnames'\nimport { useDateSegment } from 'react-aria'\nimport { DateFieldState, DateSegment as DateSegmentType } from 'react-stately'\n\nimport './DateSegment.scss'\nimport { joinIds, withoutSlotIds } from '../../utils/idRefs'\n\n// One editable part of a date or time field (a month, an hour, a day period), for `DateField`\n// and `TimeField` alike. A `TimeFieldState` is a `DateFieldState`.\n// A literal of spaces or bidi isolation marks (U+2066-U+2069) only.\nconst BLANK_LITERAL = /^[\\s\\u2066-\\u2069]+$/\nconst DATE_PARTS = new Set(['era', 'year', 'month', 'day'])\n\n// Whether a literal stands between a field's date and its time (en-US \", \"), found by the\n// editable parts on either side of it.\nconst separatesDateAndTime = (segments: DateSegmentType[], index: number) => {\n const before = segments\n .slice(0, index)\n .reverse()\n .find((segment) => segment.type !== 'literal')\n const after = segments.slice(index + 1).find((segment) => segment.type !== 'literal')\n return Boolean(before && after) && DATE_PARTS.has(before!.type) !== DATE_PARTS.has(after!.type)\n}\n\nexport interface DateSegmentProps {\n fieldLabelledBy?: string\n segment: DateSegmentType\n slots: { id?: string }[]\n state: DateFieldState\n}\n\nexport const DateSegment = ({ fieldLabelledBy, segment, slots, state }: DateSegmentProps) => {\n const ref = useRef<HTMLDivElement>(null)\n const { segmentProps } = useDateSegment(segment, state, ref)\n const plain =\n segment.type === 'literal' &&\n (BLANK_LITERAL.test(segment.text) ||\n separatesDateAndTime(state.segments, state.segments.indexOf(segment)))\n\n return (\n <span\n {...withoutSlotIds(segmentProps, ...slots)}\n // react-aria labels a segment by an id of its own, which it merges into the segment's `id`\n // only after hydration, and by the field's label. The server's HTML referred to the first,\n // an id no element had.\n aria-labelledby={segmentProps['aria-labelledby'] && joinIds(segmentProps.id, fieldLabelledBy)}\n // A time's literal segments include bidi isolation marks around it, which show nothing, the\n // space before AM/PM, and the \", \" between a date and its time. As `.datepicker-segment`s,\n // their padding set the time off from the edge and widened the space, or put one before the\n // comma: they render as plain text. A date's own literals (\"/\", ko-KR's \". \") keep it.\n className={\n plain ? undefined : classNames('datepicker-segment', { placeholder: segment.isPlaceholder })\n }\n // A segment that can't be edited leaves `contenteditable` out rather than writing `false`:\n // react-aria marks it `aria-readonly`, which HTML allows only on an element that isn't\n // `contenteditable` at all.\n contentEditable={segmentProps.contentEditable || undefined}\n ref={ref}\n >\n {segment.text}\n </span>\n )\n}\n"],"mappings":"sJAWA,MAAM,EAAgB,uBAChB,EAAa,IAAI,IAAI,CAAC,MAAO,OAAQ,QAAS,KAAK,CAAC,EAIpD,GAAwB,EAA6B,IAAkB,CAC3E,IAAM,EAAS,EACZ,MAAM,EAAG,CAAK,CAAC,CACf,QAAQ,CAAC,CACT,KAAM,GAAY,EAAQ,OAAS,SAAS,EACzC,EAAQ,EAAS,MAAM,EAAQ,CAAC,CAAC,CAAC,KAAM,GAAY,EAAQ,OAAS,SAAS,EACpF,MAAO,GAAQ,GAAU,IAAU,EAAW,IAAI,EAAQ,IAAI,IAAM,EAAW,IAAI,EAAO,IAAI,CAChG,EASa,GAAe,CAAE,kBAAiB,UAAS,QAAO,WAA8B,CAC3F,IAAM,EAAM,EAAuB,IAAI,EACjC,CAAE,gBAAiB,EAAe,EAAS,EAAO,CAAG,EACrD,EACJ,EAAQ,OAAS,YAChB,EAAc,KAAK,EAAQ,IAAI,GAC9B,EAAqB,EAAM,SAAU,EAAM,SAAS,QAAQ,CAAO,CAAC,GAExE,OACE,EAAA,cAAC,OAAD,CACE,GAAI,EAAe,EAAc,GAAG,CAAK,EAIzC,kBAAiB,EAAa,oBAAsB,EAAQ,EAAa,GAAI,CAAe,EAK5F,UACE,EAAQ,IAAA,GAAY,EAAW,qBAAsB,CAAE,YAAa,EAAQ,aAAc,CAAC,EAK7F,gBAAiB,EAAa,iBAAmB,IAAA,GAC5C,KAGD,EADH,EAAQ,IACL,CAEV"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./polymorphic-
|
|
1
|
+
import{t as e}from"./polymorphic-BhGNZQja.js";import t from"react";import n from"classnames";function r({children:e,className:r,component:i,invalid:a,tooltip:o,valid:s,...c},l){let u=i??`div`,d=n({[`invalid-${o?`tooltip`:`feedback`}`]:a,[`valid-${o?`tooltip`:`feedback`}`]:s},r);return t.createElement(u,{className:d,...c,ref:l},e)}const i=e(r,`FormFeedback`);function a({children:e,className:r,component:i,...a},o){let s=i??`div`,c=n(`form-help`,r);return t.createElement(s,{className:c,...a,ref:o},e)}const o=e(a,`FormHelp`);export{i as n,o as t};
|
|
2
|
+
//# sourceMappingURL=FormHelp-AE6_iSLJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormHelp-AE6_iSLJ.js","names":[],"sources":["../../src/components/form/FormFeedback.tsx","../../src/components/form/FormHelp.tsx"],"sourcesContent":["import React, { ElementType, ForwardRefRenderFunction, ReactElement } from 'react'\nimport classNames from 'classnames'\n\nimport {\n createPolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef\n} from '../../utils/polymorphic'\n\ntype FormFeedbackOwnProps<C extends ElementType> = {\n /**\n * A string of all className you want applied to the component.\n */\n className?: string\n /**\n * Component used for the root node. Either a string to use a HTML element or a component.\n */\n component?: C\n /**\n * Set component validation state to invalid.\n */\n invalid?: boolean\n /**\n * If your form layout allows it, you can display validation feedback in a styled tooltip.\n */\n tooltip?: boolean\n /**\n * Set component validation state to valid.\n */\n valid?: boolean\n}\n\nexport type FormFeedbackProps<C extends ElementType = 'div'> = PolymorphicComponentProps<\n C,\n FormFeedbackOwnProps<C>\n>\n\ntype FormFeedbackComponent = (<C extends ElementType = 'div'>(\n props: FormFeedbackProps<C> & { ref?: PolymorphicRef<C> }\n) => ReactElement | null) & { displayName?: string }\n\nfunction FormFeedbackRender<C extends ElementType = 'div'>(\n { children, className, component, invalid, tooltip, valid, ...rest }: FormFeedbackProps<C>,\n ref: PolymorphicRef<C>\n) {\n const Component = component ?? 'div'\n const _className = classNames(\n {\n [`invalid-${tooltip ? 'tooltip' : 'feedback'}`]: invalid,\n [`valid-${tooltip ? 'tooltip' : 'feedback'}`]: valid\n },\n className\n )\n return (\n <Component className={_className} {...rest} ref={ref}>\n {children}\n </Component>\n )\n}\n\nexport const FormFeedback = createPolymorphicComponent<FormFeedbackComponent>(\n FormFeedbackRender as ForwardRefRenderFunction<Element, FormFeedbackProps<ElementType>>,\n 'FormFeedback'\n)\n","import React, { ElementType, ForwardRefRenderFunction, ReactElement } from 'react'\nimport classNames from 'classnames'\n\nimport {\n createPolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef\n} from '../../utils/polymorphic'\n\ntype FormHelpOwnProps<C extends ElementType> = {\n /**\n * A string of all className you want applied to the component.\n */\n className?: string\n /**\n * Component used for the root node. Either a string to use a HTML element or a component.\n */\n component?: C\n}\n\nexport type FormHelpProps<C extends ElementType = 'div'> = PolymorphicComponentProps<\n C,\n FormHelpOwnProps<C>\n>\n\ntype FormHelpComponent = (<C extends ElementType = 'div'>(\n props: FormHelpProps<C> & { ref?: PolymorphicRef<C> }\n) => ReactElement | null) & { displayName?: string }\n\nfunction FormHelpRender<C extends ElementType = 'div'>(\n { children, className, component, ...rest }: FormHelpProps<C>,\n ref: PolymorphicRef<C>\n) {\n const Component = component ?? 'div'\n const _className = classNames('form-help', className)\n return (\n <Component className={_className} {...rest} ref={ref}>\n {children}\n </Component>\n )\n}\n\nexport const FormHelp = createPolymorphicComponent<FormHelpComponent>(\n FormHelpRender as ForwardRefRenderFunction<Element, FormHelpProps<ElementType>>,\n 'FormHelp'\n)\n"],"mappings":"6FAyCA,SAAS,EACP,CAAE,WAAU,YAAW,YAAW,UAAS,UAAS,QAAO,GAAG,GAC9D,EACA,CACA,IAAM,EAAY,GAAa,MACzB,EAAa,EACjB,EACG,WAAW,EAAU,UAAY,cAAe,GAChD,SAAS,EAAU,UAAY,cAAe,CACjD,EACA,CACF,EACA,OACE,EAAA,cAAC,EAAD,CAAW,UAAW,EAAY,GAAI,EAAW,KAEtC,EADR,CACQ,CAEf,CAEA,MAAa,EAAe,EAC1B,EACA,cACF,EClCA,SAAS,EACP,CAAE,WAAU,YAAW,YAAW,GAAG,GACrC,EACA,CACA,IAAM,EAAY,GAAa,MACzB,EAAa,EAAW,YAAa,CAAS,EACpD,OACE,EAAA,cAAC,EAAD,CAAW,UAAW,EAAY,GAAI,EAAW,KAEtC,EADR,CACQ,CAEf,CAEA,MAAa,EAAW,EACtB,EACA,UACF"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import e,{forwardRef as t}from"react";import n from"classnames";const r=t(({children:t,className:r,customClassName:i,...a},o)=>{let s=i||n(`form-label`,r);return e.createElement(`label`,{className:s,...a,ref:o},t)});r.displayName=`FormLabel`;export{r as t};
|
|
1
|
+
import e,{forwardRef as t}from"react";import n from"classnames";const r=t(({children:t,className:r,customClassName:i,...a},o)=>{let s=i||n(`form-label`,r);return e.createElement(`label`,{className:s,...a,ref:o},t)});r.displayName=`FormLabel`;export{r as t};
|
|
2
|
+
//# sourceMappingURL=FormLabel-CYcQiFUI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormLabel-CYcQiFUI.js","names":[],"sources":["../../src/components/form/FormLabel.tsx"],"sourcesContent":["import React, { forwardRef, LabelHTMLAttributes } from 'react'\nimport classNames from 'classnames'\n\nexport interface FormLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {\n /**\n * A string of all className you want applied to the component.\n */\n className?: string\n /**\n * A string of all className you want to be applied to the component, and override standard className value.\n */\n customClassName?: string\n}\n\nexport const FormLabel = forwardRef<HTMLLabelElement, FormLabelProps>(\n ({ children, className, customClassName, ...rest }, ref) => {\n const _className = customClassName ? customClassName : classNames('form-label', className)\n return (\n <label className={_className} {...rest} ref={ref}>\n {children}\n </label>\n )\n }\n)\n\nFormLabel.displayName = 'FormLabel'\n"],"mappings":"gEAcA,MAAa,EAAY,GACtB,CAAE,WAAU,YAAW,kBAAiB,GAAG,GAAQ,IAAQ,CAC1D,IAAM,EAAa,GAAoC,EAAW,aAAc,CAAS,EACzF,OACE,EAAA,cAAC,QAAD,CAAO,UAAW,EAAY,GAAI,EAAW,KAEtC,EADJ,CACI,CAEX,CACF,EAEA,EAAU,YAAc"}
|
|
@@ -33,4 +33,5 @@ type IconProps = (IconOwnProps & {
|
|
|
33
33
|
} & Omit<SVGAttributes<SVGSVGElement>, keyof IconOwnProps>);
|
|
34
34
|
declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<HTMLSpanElement | SVGSVGElement>>;
|
|
35
35
|
//#endregion
|
|
36
|
-
export { IconProps as n, Icon as t };
|
|
36
|
+
export { IconProps as n, Icon as t };
|
|
37
|
+
//# sourceMappingURL=Icon-CioraWLF.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useContext as r}from"react";import i from"classnames";const a={check:`check-solid`,previous:`chevron-left-outline`,next:`chevron-right-outline`,menu:`bars-outline`,more:`ellipsis-h-solid`,play:`play-solid`,pause:`pause-solid`,increment:`chevron-up-outline`,decrement:`chevron-down-outline`,search:`search-outline`,clear:`xmark-outline`,expand:`chevron-right-outline`},o=t({}),s=()=>r(o),c=n((t,n)=>{let r=s(),{name:a,className:o,font:c=r.font??!1,size:l,sprite:u=r.sprite??``,style:d,title:f,...p}=t,m=l==null?d:{"--cx-icon-size":typeof l==`number`?`${l}px`:l,...d},h=i(`icon`,{[`${r.fontPrefix??`cx-`}${a}`]:c},r.className,o);return c?e.createElement(`span`,{className:h,role:f?`img`:void 0,"aria-hidden":!f||void 0,"aria-label":f,style:m,ref:n,...p}):e.createElement(`svg`,{className:h,width:l??24,height:l??24,role:f?`img`:void 0,"aria-hidden":!f||void 0,style:m,ref:n,...p},f&&e.createElement(`title`,null,f),e.createElement(`use`,{href:`${u}#${a}`}))});c.displayName=`Icon`;export{o as i,s as n,a as r,c as t};
|
|
2
|
+
//# sourceMappingURL=Icon-DLB1f88W.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon-DLB1f88W.js","names":[],"sources":["../../src/utils/iconConfig.ts","../../src/hooks/useIconConfig.ts","../../src/components/icon/Icon.tsx"],"sourcesContent":["import { ComponentType, createContext, ReactElement } from 'react'\n\n/**\n * The icons this library's own components draw, by purpose rather than by icon name — so a\n * consumer can map each one onto any icon set (see `IconProvider`'s `icons`).\n */\nexport type IconKey =\n | 'check'\n | 'previous'\n | 'next'\n | 'menu'\n | 'more'\n | 'play'\n | 'pause'\n | 'increment'\n | 'decrement'\n | 'search'\n | 'clear'\n | 'expand'\n\n/**\n * An icon given to `IconProvider`'s `icons` or to a component's icon prop: a string is an icon\n * name, rendered by `IconProvider`'s `component` (or the built-in `Icon`); an element is rendered\n * as-is, with the component's own class names merged onto it.\n */\nexport type IconValue = string | ReactElement\n\n/**\n * Props `IconProvider`'s `component` receives for every icon name it's asked to render.\n */\nexport interface IconComponentProps {\n /**\n * The icon name — an `IconValue` string, or `IconProvider`'s default for that icon.\n */\n name: string\n /**\n * The class names the rendering component needs on the icon (e.g. `menu-item-check`,\n * `directional-icon`) for chassis-css to position and flip it.\n */\n className?: string\n [prop: string]: unknown\n}\n\nexport interface IconConfig {\n /**\n * Class names added to every `Icon`, alongside its own `icon` class.\n */\n className?: string\n /**\n * Replaces the built-in `Icon` for every icon this library's components render by name — the\n * strings in `icons` and their defaults, and a string `icon` on `Toast`/`Notification`. A\n * component reference can't be passed from a React Server Component, so set this in a\n * `'use client'` module.\n */\n component?: ComponentType<IconComponentProps>\n /**\n * Render `Icon` as an icon-font glyph instead of an SVG sprite reference, unless an `Icon` sets\n * `font` itself. Needs the icon font's stylesheet loaded.\n */\n font?: boolean\n /**\n * Class-name prefix of the icon font's glyphs: an icon named `check-solid` renders as\n * `{fontPrefix}check-solid`.\n *\n * @default 'cx-'\n */\n fontPrefix?: string\n /**\n * The icon to render for each of the library's own icons, by purpose. Unset ones keep their\n * defaults (`check-solid`, `chevron-left-outline`, `chevron-right-outline`, `bars-outline`,\n * `ellipsis-h-solid`, `play-solid`, `pause-solid`, `chevron-up-outline`, `chevron-down-outline`,\n * `search-outline`, `xmark-outline`, `chevron-right-outline`).\n */\n icons?: Partial<Record<IconKey, IconValue>>\n /**\n * URL of the SVG sprite `Icon` references, e.g. `/static/icons/chassis-icons.svg`. Leave empty\n * (the default) when the sprite is embedded in the page, so icons render as `href=\"#name\"`.\n * Browsers don't load an external sprite from another origin.\n *\n * @default ''\n */\n sprite?: string\n}\n\n// The chassis-icons names this library used before its icons became configurable. Both\n// previous/next consumers (Pagination, Carousel) now share the outline chevrons — Pagination used\n// the solid ones.\nexport const DEFAULT_ICONS: Record<IconKey, string> = {\n check: 'check-solid',\n previous: 'chevron-left-outline',\n next: 'chevron-right-outline',\n menu: 'bars-outline',\n more: 'ellipsis-h-solid',\n play: 'play-solid',\n pause: 'pause-solid',\n increment: 'chevron-up-outline',\n decrement: 'chevron-down-outline',\n search: 'search-outline',\n clear: 'xmark-outline',\n expand: 'chevron-right-outline'\n}\n\nexport const DEFAULT_FONT_PREFIX = 'cx-'\n\n// Lives in `utils/` rather than `components/icon/` because it's read outside that folder too —\n// by `IconSlot` (`./iconSlot.tsx`), which every icon-drawing component renders through.\nexport const IconContext = createContext<IconConfig>({})\n","import { useContext } from 'react'\n\nimport { IconConfig, IconContext } from '../utils/iconConfig'\n\n// The nearest `IconProvider`'s settings, merged with every provider above it; empty outside one.\nexport const useIconConfig = (): IconConfig => useContext(IconContext)\n","import React, { CSSProperties, forwardRef, HTMLAttributes, SVGAttributes } from 'react'\nimport classNames from 'classnames'\n\nimport { useIconConfig } from '../../hooks/useIconConfig'\nimport { DEFAULT_FONT_PREFIX } from '../../utils/iconConfig'\n\ninterface IconOwnProps {\n /**\n * Icon name, e.g. `folder-tree`. Matches an id in the SVG sprite, or a `cx-{name}` font glyph\n * class in `font` mode (see `IconProvider`'s `fontPrefix`).\n */\n name: string\n /**\n * A string of all className you want applied to the component.\n */\n className?: string\n /**\n * Icon size: a number of pixels, or any CSS length (`'1.25rem'`, `'1em'`). Sets chassis-css's\n * `--cx-icon-size` on the icon, so it applies in `font` mode too. Leave unset to keep the size\n * chassis-css gives icons in context (inside a button, an input, a navbar toggler, ...).\n */\n size?: number | string\n /**\n * Accessible name. When set, the icon is exposed to assistive tech instead of hidden.\n */\n title?: string\n /**\n * URL of the SVG sprite file. Defaults to `IconProvider`'s `sprite`, or to none — a sprite\n * embedded in the page, referenced as `#name`. Ignored in `font` mode.\n */\n sprite?: string\n}\n\nexport type IconProps =\n | (IconOwnProps & { font: true } & Omit<HTMLAttributes<HTMLSpanElement>, keyof IconOwnProps>)\n | (IconOwnProps & { font?: false } & Omit<SVGAttributes<SVGSVGElement>, keyof IconOwnProps>)\n\n// An SVG's `width`/`height` attributes lose to chassis-css's `.icon { width: var(--cx-icon-size) }`\n// — `size` used to set only those, so `size={48}` rendered at the stylesheet's 24px whenever\n// chassis-css was loaded. The custom property is what actually sizes an icon; the attributes stay\n// as the fallback for a page without chassis-css, where an unsized `<svg>` would render 300×150.\nconst FALLBACK_SIZE = 24\n\nexport const Icon = forwardRef<HTMLSpanElement | SVGSVGElement, IconProps>((props, ref) => {\n const config = useIconConfig()\n const {\n name,\n className,\n font = config.font ?? false,\n size,\n sprite = config.sprite ?? '',\n style,\n title,\n ...rest\n } = props as IconOwnProps & { font?: boolean; style?: CSSProperties }\n\n const sizeStyle =\n size == null\n ? style\n : ({\n '--cx-icon-size': typeof size === 'number' ? `${size}px` : size,\n ...style\n } as CSSProperties)\n const _className = classNames(\n 'icon',\n { [`${config.fontPrefix ?? DEFAULT_FONT_PREFIX}${name}`]: font },\n config.className,\n className\n )\n\n if (font) {\n return (\n <span\n className={_className}\n // A plain `<span>`'s implicit \"generic\" role doesn't support naming, so `aria-label`\n // alone is dropped by browsers/assistive tech - `role=\"img\"` (matching the SVG path's\n // own implicit role) is what actually makes the accessible name stick.\n role={title ? 'img' : undefined}\n aria-hidden={title ? undefined : true}\n aria-label={title}\n style={sizeStyle}\n ref={ref as React.Ref<HTMLSpanElement>}\n {...(rest as HTMLAttributes<HTMLSpanElement>)}\n />\n )\n }\n\n return (\n <svg\n className={_className}\n width={size ?? FALLBACK_SIZE}\n height={size ?? FALLBACK_SIZE}\n role={title ? 'img' : undefined}\n aria-hidden={title ? undefined : true}\n style={sizeStyle}\n ref={ref as React.Ref<SVGSVGElement>}\n {...(rest as SVGAttributes<SVGSVGElement>)}\n >\n {title && <title>{title}</title>}\n <use href={`${sprite}#${name}`} />\n </svg>\n )\n})\n\nIcon.displayName = 'Icon'\n"],"mappings":"mGAuFA,MAAa,EAAyC,CACpD,MAAO,cACP,SAAU,uBACV,KAAM,wBACN,KAAM,eACN,KAAM,mBACN,KAAM,aACN,MAAO,cACP,UAAW,qBACX,UAAW,uBACX,OAAQ,iBACR,MAAO,gBACP,OAAQ,uBACV,EAMa,EAAc,EAA0B,CAAC,CAAC,ECrG1C,MAAkC,EAAW,CAAW,ECsCxD,EAAO,GAAwD,EAAO,IAAQ,CACzF,IAAM,EAAS,EAAc,EACvB,CACJ,OACA,YACA,OAAO,EAAO,MAAQ,GACtB,OACA,SAAS,EAAO,QAAU,GAC1B,QACA,QACA,GAAG,GACD,EAEE,EACJ,GAAQ,KACJ,EACC,CACC,iBAAkB,OAAO,GAAS,SAAW,GAAG,EAAK,IAAM,EAC3D,GAAG,CACL,EACA,EAAa,EACjB,OACA,EAAG,GAAG,EAAO,YAAA,QAAoC,KAAS,CAAK,EAC/D,EAAO,UACP,CACF,EAmBA,OAjBI,EAEA,EAAA,cAAC,OAAD,CACE,UAAW,EAIX,KAAM,EAAQ,MAAQ,IAAA,GACtB,cAAa,IAAQ,IAAA,GACrB,aAAY,EACZ,MAAO,EACF,MACL,GAAK,CACN,CAAA,EAKH,EAAA,cAAC,MAAD,CACE,UAAW,EACX,MAAO,GAAQ,GACf,OAAQ,GAAQ,GAChB,KAAM,EAAQ,MAAQ,IAAA,GACtB,cAAa,IAAQ,IAAA,GACrB,MAAO,EACF,MACL,GAAK,CAIF,EAFF,GAAS,EAAA,cAAC,QAAA,KAAO,CAAa,EAC/B,EAAA,cAAC,MAAD,CAAK,KAAM,GAAG,EAAO,GAAG,GAAS,CAAA,CAC9B,CAET,CAAC,EAED,EAAK,YAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as PolymorphicRef, t as PolymorphicComponentProps } from "./polymorphic-CVHbTHSN.js";
|
|
2
|
-
import {
|
|
2
|
+
import { r as ContextColor } from "./types-D6FM7bYR.js";
|
|
3
3
|
import { ElementType, MouseEventHandler, ReactElement } from "react";
|
|
4
4
|
//#region src/components/link/Link.d.ts
|
|
5
5
|
type LinkOwnProps<C extends ElementType> = {
|
|
@@ -25,10 +25,11 @@ type LinkOwnProps<C extends ElementType> = {
|
|
|
25
25
|
*/
|
|
26
26
|
disabled?: boolean;
|
|
27
27
|
/**
|
|
28
|
-
* The href attribute specifies the URL of the page the link goes to.
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
28
|
+
* The href attribute specifies the URL of the page the link goes to. Reaches an `<a>` or a
|
|
29
|
+
* component reference (a router link); dropped, with a warning in development, when
|
|
30
|
+
* `component` is another element. Declared explicitly here — rather than left to flow through
|
|
31
|
+
* generically from whatever `C` is — so consumers that wrap `Link` (`MenuItem`, `ListItem`,
|
|
32
|
+
* `NavLink`) can read it with a concrete type regardless of `component`.
|
|
32
33
|
*/
|
|
33
34
|
href?: string;
|
|
34
35
|
/**
|
|
@@ -66,4 +67,5 @@ type LinkComponent = (<C extends ElementType = 'a'>(props: LinkProps<C> & {
|
|
|
66
67
|
};
|
|
67
68
|
declare const Link: LinkComponent;
|
|
68
69
|
//#endregion
|
|
69
|
-
export { LinkProps as n, Link as t };
|
|
70
|
+
export { LinkProps as n, Link as t };
|
|
71
|
+
//# sourceMappingURL=Link-CKymd2ru.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as e,f as t,g as n,p as r}from"./slot-CNhFZdHF.js";import{t as i}from"./useForkedRef-DVEfT-KI.js";import{t as a}from"./polymorphic-BhGNZQja.js";import{t as o}from"./useButtonSemantics-CILM_lhi.js";import{t as s}from"./useDisabledAnchorGuard-Cz58UCXy.js";import{n as c}from"./scrollspy-D_lPjb92.js";import l from"react";import u from"classnames";import{mergeProps as d}from"react-aria";function f({children:a,active:f,className:p,color:m,component:h,disabled:g,href:_,iconLink:v,onClick:y,reset:b,stretched:x,type:S=`button`,...C},w){let T=r(h,_,`a`),E=n(T,_,C),D=t(E),O=E===`component`,k=c(g),A=k.onClick,j=s(E===`anchor`,g,A?e=>{y?.(e),A(e)}:y),M=!D&&!O&&!!y,{buttonProps:N,forkedRef:P}=o(w,{disabled:g,onClick:y}),F=M?P:w,I=i(F,k.ref),L=f||!!k.mark,R=f?`page`:k.mark===`current`?`true`:void 0,z=u(m&&`link-${m}`,{"icon-link":v,"fg-reset":b,"stretched-link":x},{active:L,disabled:g},p);return l.createElement(T,{...d(C,M?N:{}),className:z,...e(E,_,`Link`),...R&&{"aria-current":R},...E===`anchor`&&g&&{"aria-disabled":!0,tabIndex:-1},...!M&&{onClick:j},...E===`button`&&{disabled:g,type:S},ref:k.ref?I:F},a)}const p=a(f,`Link`);export{p as t};
|
|
2
|
+
//# sourceMappingURL=Link-CZsWCnQb.js.map
|