@fragiola/primitives-react 0.0.0-stage → 0.1.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/CHANGELOG.md +67 -0
- package/LICENSE +21 -0
- package/README.md +38 -2
- package/dist/accordion--E-5hjWo.js +210 -0
- package/dist/accordion--E-5hjWo.js.map +1 -0
- package/dist/accordion.d.ts +4 -0
- package/dist/accordion.js +1 -0
- package/dist/alert-dialog-7FIAj98B.js +37 -0
- package/dist/alert-dialog-7FIAj98B.js.map +1 -0
- package/dist/alert-dialog.d.ts +9 -0
- package/dist/alert-dialog.js +1 -0
- package/dist/aspect-ratio-CUADsevg.js +19 -0
- package/dist/aspect-ratio-CUADsevg.js.map +1 -0
- package/dist/aspect-ratio.d.ts +3 -0
- package/dist/aspect-ratio.js +1 -0
- package/dist/async-list-7ljWFMgA.js +35 -0
- package/dist/async-list-7ljWFMgA.js.map +1 -0
- package/dist/async-list.d.ts +2 -0
- package/dist/async-list.js +1 -0
- package/dist/autocomplete-virtual-BE8dDDgU.js +56 -0
- package/dist/autocomplete-virtual-BE8dDDgU.js.map +1 -0
- package/dist/autocomplete-virtual.d.ts +4 -0
- package/dist/autocomplete-virtual.js +3 -0
- package/dist/autocomplete.d.ts +9 -0
- package/dist/autocomplete.js +1 -0
- package/dist/avatar-CABjoLs9.js +101 -0
- package/dist/avatar-CABjoLs9.js.map +1 -0
- package/dist/avatar.d.ts +3 -0
- package/dist/avatar.js +1 -0
- package/dist/breadcrumbs-nG0Rq3kX.js +69 -0
- package/dist/breadcrumbs-nG0Rq3kX.js.map +1 -0
- package/dist/breadcrumbs.d.ts +3 -0
- package/dist/breadcrumbs.js +1 -0
- package/dist/button-B6h8UkhR.js +30 -0
- package/dist/button-B6h8UkhR.js.map +1 -0
- package/dist/button-props-DWfy1ZSo.js +69 -0
- package/dist/button-props-DWfy1ZSo.js.map +1 -0
- package/dist/button.d.ts +3 -0
- package/dist/button.js +1 -0
- package/dist/calendar-preset-Cs-hy-_0.js +70 -0
- package/dist/calendar-preset-Cs-hy-_0.js.map +1 -0
- package/dist/calendar-preset.d.ts +4 -0
- package/dist/calendar-preset.js +3 -0
- package/dist/calendar-root-base-CIkiSebb.js +515 -0
- package/dist/calendar-root-base-CIkiSebb.js.map +1 -0
- package/dist/calendar-row-BO5kyOgq.d.ts +84 -0
- package/dist/calendar-value-DCOjO7og.d.ts +23 -0
- package/dist/calendar-view-DT9i5Xg_.js +157 -0
- package/dist/calendar-view-DT9i5Xg_.js.map +1 -0
- package/dist/calendar-view.d.ts +6 -0
- package/dist/calendar-view.js +4 -0
- package/dist/calendar.d.ts +7 -0
- package/dist/calendar.js +1 -0
- package/dist/carousel-ClQsQ135.js +436 -0
- package/dist/carousel-ClQsQ135.js.map +1 -0
- package/dist/carousel.d.ts +4 -0
- package/dist/carousel.js +1 -0
- package/dist/cascade-select-DZlpKUok.js +582 -0
- package/dist/cascade-select-DZlpKUok.js.map +1 -0
- package/dist/cascade-select.d.ts +7 -0
- package/dist/cascade-select.js +1 -0
- package/dist/change-details-CPSkPCNw.d.ts +32 -0
- package/dist/checkbox-CbmkKNfv.js +165 -0
- package/dist/checkbox-CbmkKNfv.js.map +1 -0
- package/dist/checkbox-group-_UrFCUgQ.js +99 -0
- package/dist/checkbox-group-_UrFCUgQ.js.map +1 -0
- package/dist/checkbox-group-context-CoGqgxBM.js +6 -0
- package/dist/checkbox-group-context-CoGqgxBM.js.map +1 -0
- package/dist/checkbox-group.d.ts +4 -0
- package/dist/checkbox-group.js +1 -0
- package/dist/checkbox.d.ts +4 -0
- package/dist/checkbox.js +1 -0
- package/dist/clipboard-CvgO1qhh.js +189 -0
- package/dist/clipboard-CvgO1qhh.js.map +1 -0
- package/dist/clipboard.d.ts +4 -0
- package/dist/clipboard.js +1 -0
- package/dist/collapsible-Dh0TUP6l.js +112 -0
- package/dist/collapsible-Dh0TUP6l.js.map +1 -0
- package/dist/collapsible.d.ts +4 -0
- package/dist/collapsible.js +1 -0
- package/dist/color-area-BGo6tZxX.js +311 -0
- package/dist/color-area-BGo6tZxX.js.map +1 -0
- package/dist/color-area.d.ts +4 -0
- package/dist/color-area.js +1 -0
- package/dist/color-field-B9QEKyQ1.js +334 -0
- package/dist/color-field-B9QEKyQ1.js.map +1 -0
- package/dist/color-field.d.ts +4 -0
- package/dist/color-field.js +1 -0
- package/dist/color-picker-BNOtqWUK.js +276 -0
- package/dist/color-picker-BNOtqWUK.js.map +1 -0
- package/dist/color-picker-binding-D9xBS_my.js +6 -0
- package/dist/color-picker-binding-D9xBS_my.js.map +1 -0
- package/dist/color-picker-popover-CV_wP6KG.js +195 -0
- package/dist/color-picker-popover-CV_wP6KG.js.map +1 -0
- package/dist/color-picker-popover.d.ts +7 -0
- package/dist/color-picker-popover.js +1 -0
- package/dist/color-picker.d.ts +4 -0
- package/dist/color-picker.js +1 -0
- package/dist/color-slider-Bw940FJr.js +357 -0
- package/dist/color-slider-Bw940FJr.js.map +1 -0
- package/dist/color-slider.d.ts +4 -0
- package/dist/color-slider.js +1 -0
- package/dist/color-swatch-C9ws0xF4.js +37 -0
- package/dist/color-swatch-C9ws0xF4.js.map +1 -0
- package/dist/color-swatch-picker-CnmTr1SY.js +286 -0
- package/dist/color-swatch-picker-CnmTr1SY.js.map +1 -0
- package/dist/color-swatch-picker.d.ts +4 -0
- package/dist/color-swatch-picker.js +1 -0
- package/dist/color-swatch.d.ts +3 -0
- package/dist/color-swatch.js +1 -0
- package/dist/color-wheel--n8w5fIJ.js +247 -0
- package/dist/color-wheel--n8w5fIJ.js.map +1 -0
- package/dist/color-wheel.d.ts +4 -0
- package/dist/color-wheel.js +1 -0
- package/dist/combobox-virtual-BI-l10BE.js +61 -0
- package/dist/combobox-virtual-BI-l10BE.js.map +1 -0
- package/dist/combobox-virtual.d.ts +4 -0
- package/dist/combobox-virtual.js +3 -0
- package/dist/combobox.d.ts +9 -0
- package/dist/combobox.js +1 -0
- package/dist/command-virtual-CxNLxsih.js +56 -0
- package/dist/command-virtual-CxNLxsih.js.map +1 -0
- package/dist/command-virtual.d.ts +4 -0
- package/dist/command-virtual.js +3 -0
- package/dist/command.d.ts +5 -0
- package/dist/command.js +1 -0
- package/dist/context-menu-DGj2L-Sv.js +131 -0
- package/dist/context-menu-DGj2L-Sv.js.map +1 -0
- package/dist/context-menu.d.ts +8 -0
- package/dist/context-menu.js +1 -0
- package/dist/date-field-C1nhThPd.js +33 -0
- package/dist/date-field-C1nhThPd.js.map +1 -0
- package/dist/date-field-root-CzSo5iKL.d.ts +26 -0
- package/dist/date-field-root-base-B-050SUC.js +185 -0
- package/dist/date-field-root-base-B-050SUC.js.map +1 -0
- package/dist/date-field-segment-BoS-ohDh.d.ts +67 -0
- package/dist/date-field.d.ts +6 -0
- package/dist/date-field.js +1 -0
- package/dist/date-picker-input-BCaKff7A.js +29 -0
- package/dist/date-picker-input-BCaKff7A.js.map +1 -0
- package/dist/date-picker-input-root-base-Cc3mE-NR.d.ts +17 -0
- package/dist/date-picker-input-root-base-D4VaBnpf.js +361 -0
- package/dist/date-picker-input-root-base-D4VaBnpf.js.map +1 -0
- package/dist/date-picker-input.d.ts +7 -0
- package/dist/date-picker-input.js +3 -0
- package/dist/date-picker-trigger-BKPvZbRg.js +304 -0
- package/dist/date-picker-trigger-BKPvZbRg.js.map +1 -0
- package/dist/date-picker-trigger-DHsAhBf2.d.ts +51 -0
- package/dist/date-picker.d.ts +11 -0
- package/dist/date-picker.js +1 -0
- package/dist/date-range-field-C-ID01oa.js +34 -0
- package/dist/date-range-field-C-ID01oa.js.map +1 -0
- package/dist/date-range-field-input-BkLpldTx.js +33 -0
- package/dist/date-range-field-input-BkLpldTx.js.map +1 -0
- package/dist/date-range-field-input-BwCNo15l.d.ts +13 -0
- package/dist/date-range-field-root-CmZ3c7xn.d.ts +31 -0
- package/dist/date-range-field-root-base-DWH3nqmz.d.ts +23 -0
- package/dist/date-range-field-root-base-z8S5aSCs.js +261 -0
- package/dist/date-range-field-root-base-z8S5aSCs.js.map +1 -0
- package/dist/date-range-field.d.ts +9 -0
- package/dist/date-range-field.js +1 -0
- package/dist/date-range-picker-input-DlIdTD-J.js +30 -0
- package/dist/date-range-picker-input-DlIdTD-J.js.map +1 -0
- package/dist/date-range-picker-input.d.ts +10 -0
- package/dist/date-range-picker-input.js +3 -0
- package/dist/date-range-picker.d.ts +11 -0
- package/dist/date-range-picker.js +1 -0
- package/dist/dialog-DDE15qBB.js +33 -0
- package/dist/dialog-DDE15qBB.js.map +1 -0
- package/dist/dialog-root-base-DDMrqDC9.js +328 -0
- package/dist/dialog-root-base-DDMrqDC9.js.map +1 -0
- package/dist/dialog-title-BitK2i0A.d.ts +78 -0
- package/dist/dialog.d.ts +9 -0
- package/dist/dialog.js +1 -0
- package/dist/direction-BfW1BOg1.js +22 -0
- package/dist/direction-BfW1BOg1.js.map +1 -0
- package/dist/direction-context-CiRdNJmu.js +11 -0
- package/dist/direction-context-CiRdNJmu.js.map +1 -0
- package/dist/direction.d.ts +2 -0
- package/dist/direction.js +1 -0
- package/dist/drawer-CaPOhMl-.js +302 -0
- package/dist/drawer-CaPOhMl-.js.map +1 -0
- package/dist/drawer.d.ts +9 -0
- package/dist/drawer.js +1 -0
- package/dist/drop-zone-q0-5u2cs.js +86 -0
- package/dist/drop-zone-q0-5u2cs.js.map +1 -0
- package/dist/drop-zone.d.ts +4 -0
- package/dist/drop-zone.js +1 -0
- package/dist/editable-vU6vYZOD.js +403 -0
- package/dist/editable-vU6vYZOD.js.map +1 -0
- package/dist/editable.d.ts +4 -0
- package/dist/editable.js +1 -0
- package/dist/field-DibhXWF6.js +308 -0
- package/dist/field-DibhXWF6.js.map +1 -0
- package/dist/field.d.ts +4 -0
- package/dist/field.js +1 -0
- package/dist/fieldset-Cz80P2jc.js +53 -0
- package/dist/fieldset-Cz80P2jc.js.map +1 -0
- package/dist/fieldset-context-CeaxEBvi.js +6 -0
- package/dist/fieldset-context-CeaxEBvi.js.map +1 -0
- package/dist/fieldset.d.ts +3 -0
- package/dist/fieldset.js +1 -0
- package/dist/file-upload-BIRibICU.js +513 -0
- package/dist/file-upload-BIRibICU.js.map +1 -0
- package/dist/file-upload.d.ts +4 -0
- package/dist/file-upload.js +1 -0
- package/dist/form-DNAaFPpL.js +87 -0
- package/dist/form-DNAaFPpL.js.map +1 -0
- package/dist/form-context-BW-nK6kl.js +6 -0
- package/dist/form-context-BW-nK6kl.js.map +1 -0
- package/dist/form.d.ts +3 -0
- package/dist/form.js +1 -0
- package/dist/hover-card-CRDpA_zU.js +317 -0
- package/dist/hover-card-CRDpA_zU.js.map +1 -0
- package/dist/hover-card.d.ts +9 -0
- package/dist/hover-card.js +1 -0
- package/dist/index-0bXL0iXX.d.ts +25 -0
- package/dist/index-6f2s5HfF.d.ts +30 -0
- package/dist/index-9WYWziGt.d.ts +42 -0
- package/dist/index-B57uQVXT.d.ts +100 -0
- package/dist/index-BA629roy.d.ts +52 -0
- package/dist/index-BC5bS-vC.d.ts +30 -0
- package/dist/index-BDbTYsJR.d.ts +77 -0
- package/dist/index-BEaxabvv.d.ts +80 -0
- package/dist/index-BLRo_PJD.d.ts +58 -0
- package/dist/index-BMt816ZL.d.ts +51 -0
- package/dist/index-BQJrDd_G.d.ts +108 -0
- package/dist/index-BUJIeLCT.d.ts +37 -0
- package/dist/index-BZxd4oqB.d.ts +111 -0
- package/dist/index-B_JVgpGe.d.ts +13 -0
- package/dist/index-BdxleDV0.d.ts +104 -0
- package/dist/index-Be4w9GAc.d.ts +13 -0
- package/dist/index-Bht8ohW3.d.ts +31 -0
- package/dist/index-Bk1NBvxD.d.ts +75 -0
- package/dist/index-BmtcAsQr.d.ts +44 -0
- package/dist/index-BmuEv-h3.d.ts +35 -0
- package/dist/index-BnPLIkKG.d.ts +31 -0
- package/dist/index-BoJU86K5.d.ts +52 -0
- package/dist/index-Bq6yByLv.d.ts +50 -0
- package/dist/index-Bqt2th2p.d.ts +41 -0
- package/dist/index-BrXfSGo2.d.ts +51 -0
- package/dist/index-BsvcTJ_x.d.ts +17 -0
- package/dist/index-BxcCz-NS.d.ts +36 -0
- package/dist/index-C3y4g2fs.d.ts +21 -0
- package/dist/index-C8-b81Jh.d.ts +20 -0
- package/dist/index-C8KLM25T.d.ts +31 -0
- package/dist/index-C9TSddnB.d.ts +140 -0
- package/dist/index-CCnaczzE.d.ts +32 -0
- package/dist/index-CD6hgnl1.d.ts +86 -0
- package/dist/index-CEN3o4Pw.d.ts +35 -0
- package/dist/index-CFlhfs3y.d.ts +30 -0
- package/dist/index-CIQU06ga.d.ts +36 -0
- package/dist/index-CNUEsZ_M.d.ts +51 -0
- package/dist/index-CNYBtgVC.d.ts +53 -0
- package/dist/index-CQJHcuzo.d.ts +76 -0
- package/dist/index-CTw9ONha.d.ts +69 -0
- package/dist/index-CU9QnAha.d.ts +32 -0
- package/dist/index-CcwKZWPY.d.ts +92 -0
- package/dist/index-Cjl7RT2o.d.ts +17 -0
- package/dist/index-ClfKp-sZ.d.ts +21 -0
- package/dist/index-CqGIxPDB.d.ts +82 -0
- package/dist/index-CsXJJ0G8.d.ts +41 -0
- package/dist/index-Cyjcq7lp.d.ts +28 -0
- package/dist/index-CzB9dDcM.d.ts +22 -0
- package/dist/index-D1-zqp2Q.d.ts +44 -0
- package/dist/index-D59OFWyx.d.ts +53 -0
- package/dist/index-D9lx4wAU.d.ts +21 -0
- package/dist/index-DHrnPQEE.d.ts +128 -0
- package/dist/index-DHwyHITu.d.ts +131 -0
- package/dist/index-DQ68aV2P.d.ts +21 -0
- package/dist/index-DQAkgf9_.d.ts +14 -0
- package/dist/index-DRow1231.d.ts +31 -0
- package/dist/index-DTGZeJU7.d.ts +29 -0
- package/dist/index-DU7jtvI8.d.ts +24 -0
- package/dist/index-DVjhOpXu.d.ts +42 -0
- package/dist/index-DZoqbcd6.d.ts +26 -0
- package/dist/index-Da0eVQHO.d.ts +62 -0
- package/dist/index-DhNPJa6U.d.ts +31 -0
- package/dist/index-DnQAamhU.d.ts +27 -0
- package/dist/index-DoFrs7Az.d.ts +16 -0
- package/dist/index-DorcIjVk.d.ts +20 -0
- package/dist/index-Dx-yMTdt.d.ts +81 -0
- package/dist/index-J4LbimqY.d.ts +79 -0
- package/dist/index-L6Mp2njJ.d.ts +81 -0
- package/dist/index-OmXQjsNi.d.ts +37 -0
- package/dist/index-PpCPWRbt.d.ts +30 -0
- package/dist/index-Pq-ztBxR.d.ts +34 -0
- package/dist/index-Qgz-Dnsj.d.ts +73 -0
- package/dist/index-R3h8-VcD.d.ts +32 -0
- package/dist/index-WtAHbmtb.d.ts +88 -0
- package/dist/index-dKoYaA3K.d.ts +38 -0
- package/dist/index-fgqEotIa.d.ts +16 -0
- package/dist/index-gvpnQy8T.d.ts +87 -0
- package/dist/index-kY3Yo50q.d.ts +68 -0
- package/dist/index-ndFpL4W9.d.ts +15 -0
- package/dist/index-oLgwTyCz.d.ts +45 -0
- package/dist/index-pSrGVYre.d.ts +40 -0
- package/dist/index-t4CBZJDG.d.ts +65 -0
- package/dist/index-wC8PY0fW.d.ts +16 -0
- package/dist/index-wv0Lafz4.d.ts +46 -0
- package/dist/index-zEeZUMLc.d.ts +29 -0
- package/dist/index.d.ts +125 -0
- package/dist/index.js +104 -0
- package/dist/label-DN9tJMXl.js +24 -0
- package/dist/label-DN9tJMXl.js.map +1 -0
- package/dist/label.d.ts +3 -0
- package/dist/label.js +1 -0
- package/dist/link-D3xYrfPK.js +22 -0
- package/dist/link-D3xYrfPK.js.map +1 -0
- package/dist/link-props-Shu8RU_5.js +27 -0
- package/dist/link-props-Shu8RU_5.js.map +1 -0
- package/dist/link.d.ts +3 -0
- package/dist/link.js +1 -0
- package/dist/listbox-virtual-C4wz3TOa.js +281 -0
- package/dist/listbox-virtual-C4wz3TOa.js.map +1 -0
- package/dist/listbox-virtual.d.ts +6 -0
- package/dist/listbox-virtual.js +3 -0
- package/dist/listbox.d.ts +5 -0
- package/dist/listbox.js +1 -0
- package/dist/live-region-style-Xgiu9ttw.js +48 -0
- package/dist/live-region-style-Xgiu9ttw.js.map +1 -0
- package/dist/menu-bar-context-1duNlOWo.js +14 -0
- package/dist/menu-bar-context-1duNlOWo.js.map +1 -0
- package/dist/menu-oZj27rvf.js +123 -0
- package/dist/menu-oZj27rvf.js.map +1 -0
- package/dist/menu-separator-CzAc4jM8.d.ts +143 -0
- package/dist/menu-submenu-trigger-BykOQORL.js +672 -0
- package/dist/menu-submenu-trigger-BykOQORL.js.map +1 -0
- package/dist/menu.d.ts +10 -0
- package/dist/menu.js +1 -0
- package/dist/menubar-wjJF54GJ.js +213 -0
- package/dist/menubar-wjJF54GJ.js.map +1 -0
- package/dist/menubar.d.ts +3 -0
- package/dist/menubar.js +1 -0
- package/dist/meter-11PgO99t.js +120 -0
- package/dist/meter-11PgO99t.js.map +1 -0
- package/dist/meter.d.ts +3 -0
- package/dist/meter.js +1 -0
- package/dist/month-calendar-value-CNJcsqcv.d.ts +5 -0
- package/dist/month-calendar-value-D_au-Kbz.js +35 -0
- package/dist/month-calendar-value-D_au-Kbz.js.map +1 -0
- package/dist/month-calendar.d.ts +6 -0
- package/dist/month-calendar.js +1 -0
- package/dist/month-picker-DFjFvjo9.js +26 -0
- package/dist/month-picker-DFjFvjo9.js.map +1 -0
- package/dist/month-picker-root-base-CI7jcllI.js +162 -0
- package/dist/month-picker-root-base-CI7jcllI.js.map +1 -0
- package/dist/month-picker-root-base-SELhczoy.d.ts +28 -0
- package/dist/month-picker.d.ts +10 -0
- package/dist/month-picker.js +3 -0
- package/dist/month-range-calendar-BmnWB6OD.js +28 -0
- package/dist/month-range-calendar-BmnWB6OD.js.map +1 -0
- package/dist/month-range-calendar.d.ts +6 -0
- package/dist/month-range-calendar.js +3 -0
- package/dist/month-range-picker-TfMtxi2X.js +26 -0
- package/dist/month-range-picker-TfMtxi2X.js.map +1 -0
- package/dist/month-range-picker.d.ts +10 -0
- package/dist/month-range-picker.js +3 -0
- package/dist/multiple-calendar-EBsuTzYQ.js +133 -0
- package/dist/multiple-calendar-EBsuTzYQ.js.map +1 -0
- package/dist/multiple-calendar.d.ts +7 -0
- package/dist/multiple-calendar.js +3 -0
- package/dist/navigation-menu-82shSjXS.js +660 -0
- package/dist/navigation-menu-82shSjXS.js.map +1 -0
- package/dist/navigation-menu.d.ts +5 -0
- package/dist/navigation-menu.js +1 -0
- package/dist/number-field-BUNkL15K.js +491 -0
- package/dist/number-field-BUNkL15K.js.map +1 -0
- package/dist/number-field.d.ts +4 -0
- package/dist/number-field.js +1 -0
- package/dist/otp-field-BMKBhv0O.js +363 -0
- package/dist/otp-field-BMKBhv0O.js.map +1 -0
- package/dist/otp-field.d.ts +4 -0
- package/dist/otp-field.js +1 -0
- package/dist/overlay-handle-DOyqO4oY.js +62 -0
- package/dist/overlay-handle-DOyqO4oY.js.map +1 -0
- package/dist/overlay-handle-DzzlzKqP.d.ts +16 -0
- package/dist/pagination-CMWaQSpr.js +173 -0
- package/dist/pagination-CMWaQSpr.js.map +1 -0
- package/dist/pagination.d.ts +4 -0
- package/dist/pagination.js +1 -0
- package/dist/parts-B2E7RN77.d.ts +170 -0
- package/dist/parts-BHkvkEgf.js +485 -0
- package/dist/parts-BHkvkEgf.js.map +1 -0
- package/dist/parts-BJ94V7Kv.d.ts +24 -0
- package/dist/parts-BL0sXepP.d.ts +101 -0
- package/dist/parts-BjC20sfl.d.ts +19 -0
- package/dist/parts-BnbJ2FWv.d.ts +81 -0
- package/dist/parts-C688_OLH.js +24 -0
- package/dist/parts-C688_OLH.js.map +1 -0
- package/dist/parts-C81p8gpg.d.ts +147 -0
- package/dist/parts-CDVlldST.js +721 -0
- package/dist/parts-CDVlldST.js.map +1 -0
- package/dist/parts-CNp1lOIU.js +24 -0
- package/dist/parts-CNp1lOIU.js.map +1 -0
- package/dist/parts-CXjEfLf7.d.ts +125 -0
- package/dist/parts-CrriPiIL.js +29 -0
- package/dist/parts-CrriPiIL.js.map +1 -0
- package/dist/parts-DVNSEjIO.d.ts +19 -0
- package/dist/parts-DmQ9WqOP.js +512 -0
- package/dist/parts-DmQ9WqOP.js.map +1 -0
- package/dist/parts-DoQQN1Io.d.ts +96 -0
- package/dist/parts-VT0Ohb06.js +806 -0
- package/dist/parts-VT0Ohb06.js.map +1 -0
- package/dist/parts-XRa0gd47.js +350 -0
- package/dist/parts-XRa0gd47.js.map +1 -0
- package/dist/parts-_ZriSS4p.js +376 -0
- package/dist/parts-_ZriSS4p.js.map +1 -0
- package/dist/password-input-BQAySlmc.js +212 -0
- package/dist/password-input-BQAySlmc.js.map +1 -0
- package/dist/password-input.d.ts +4 -0
- package/dist/password-input.js +1 -0
- package/dist/picker-binding-context-7ci59zS0.js +22 -0
- package/dist/picker-binding-context-7ci59zS0.js.map +1 -0
- package/dist/popover-C5UaRJpT.js +295 -0
- package/dist/popover-C5UaRJpT.js.map +1 -0
- package/dist/popover.d.ts +9 -0
- package/dist/popover.js +1 -0
- package/dist/progress-2d64jFqb.js +141 -0
- package/dist/progress-2d64jFqb.js.map +1 -0
- package/dist/progress.d.ts +3 -0
- package/dist/progress.js +1 -0
- package/dist/radio-Mvw36nnF.js +128 -0
- package/dist/radio-Mvw36nnF.js.map +1 -0
- package/dist/radio-group-D7DchtVK.js +149 -0
- package/dist/radio-group-D7DchtVK.js.map +1 -0
- package/dist/radio-group-context-DRe2PyiF.js +6 -0
- package/dist/radio-group-context-DRe2PyiF.js.map +1 -0
- package/dist/radio-group.d.ts +4 -0
- package/dist/radio-group.js +1 -0
- package/dist/radio.d.ts +3 -0
- package/dist/radio.js +1 -0
- package/dist/range-calendar-BMxPzzAr.js +32 -0
- package/dist/range-calendar-BMxPzzAr.js.map +1 -0
- package/dist/range-calendar.d.ts +6 -0
- package/dist/range-calendar.js +1 -0
- package/dist/rating-DQdIL_nz.js +303 -0
- package/dist/rating-DQdIL_nz.js.map +1 -0
- package/dist/rating.d.ts +4 -0
- package/dist/rating.js +1 -0
- package/dist/render-C7XnxB7f.js +40 -0
- package/dist/render-C7XnxB7f.js.map +1 -0
- package/dist/render-element-DXbUbfgN.js +66 -0
- package/dist/render-element-DXbUbfgN.js.map +1 -0
- package/dist/render-element-Pwuv2wsL.d.ts +13 -0
- package/dist/render.d.ts +3 -0
- package/dist/render.js +1 -0
- package/dist/roving-context-BVp0I9UN.js +16 -0
- package/dist/roving-context-BVp0I9UN.js.map +1 -0
- package/dist/scroll-area-CGaVLKik.js +274 -0
- package/dist/scroll-area-CGaVLKik.js.map +1 -0
- package/dist/scroll-area.d.ts +3 -0
- package/dist/scroll-area.js +1 -0
- package/dist/search-field-DqGQt6pC.js +207 -0
- package/dist/search-field-DqGQt6pC.js.map +1 -0
- package/dist/search-field.d.ts +4 -0
- package/dist/search-field.js +1 -0
- package/dist/segmented-control-BYrnLASo.js +316 -0
- package/dist/segmented-control-BYrnLASo.js.map +1 -0
- package/dist/segmented-control.d.ts +4 -0
- package/dist/segmented-control.js +1 -0
- package/dist/select-virtual-9vDaEiye.js +55 -0
- package/dist/select-virtual-9vDaEiye.js.map +1 -0
- package/dist/select-virtual.d.ts +4 -0
- package/dist/select-virtual.js +3 -0
- package/dist/select.d.ts +8 -0
- package/dist/select.js +1 -0
- package/dist/separator-ChAJks2Q.js +18 -0
- package/dist/separator-ChAJks2Q.js.map +1 -0
- package/dist/separator.d.ts +3 -0
- package/dist/separator.js +1 -0
- package/dist/slider-DZiqQ18C.js +437 -0
- package/dist/slider-DZiqQ18C.js.map +1 -0
- package/dist/slider.d.ts +4 -0
- package/dist/slider.js +1 -0
- package/dist/state-attributes-DhboDeMS.js +14 -0
- package/dist/state-attributes-DhboDeMS.js.map +1 -0
- package/dist/steps-t_FxFH9P.js +251 -0
- package/dist/steps-t_FxFH9P.js.map +1 -0
- package/dist/steps.d.ts +4 -0
- package/dist/steps.js +1 -0
- package/dist/switch-D3zj8gtg.js +137 -0
- package/dist/switch-D3zj8gtg.js.map +1 -0
- package/dist/switch.d.ts +4 -0
- package/dist/switch.js +1 -0
- package/dist/tabs-o83wz1hF.js +285 -0
- package/dist/tabs-o83wz1hF.js.map +1 -0
- package/dist/tabs.d.ts +4 -0
- package/dist/tabs.js +1 -0
- package/dist/tag-group-gmBdCkE4.js +354 -0
- package/dist/tag-group-gmBdCkE4.js.map +1 -0
- package/dist/tag-group.d.ts +4 -0
- package/dist/tag-group.js +1 -0
- package/dist/tags-input-Co9pI732.js +555 -0
- package/dist/tags-input-Co9pI732.js.map +1 -0
- package/dist/tags-input.d.ts +4 -0
- package/dist/tags-input.js +1 -0
- package/dist/time-field-qqgemJB1.js +35 -0
- package/dist/time-field-qqgemJB1.js.map +1 -0
- package/dist/time-field.d.ts +5 -0
- package/dist/time-field.js +1 -0
- package/dist/time-range-field-BurnJee0.js +36 -0
- package/dist/time-range-field-BurnJee0.js.map +1 -0
- package/dist/time-range-field.d.ts +7 -0
- package/dist/time-range-field.js +1 -0
- package/dist/toast-ChdTo_Md.js +341 -0
- package/dist/toast-ChdTo_Md.js.map +1 -0
- package/dist/toast.d.ts +4 -0
- package/dist/toast.js +1 -0
- package/dist/toggle-W5tihPuD.js +65 -0
- package/dist/toggle-W5tihPuD.js.map +1 -0
- package/dist/toggle-group-DpJ794rw.js +73 -0
- package/dist/toggle-group-DpJ794rw.js.map +1 -0
- package/dist/toggle-group-context-Bp44l1NR.js +6 -0
- package/dist/toggle-group-context-Bp44l1NR.js.map +1 -0
- package/dist/toggle-group.d.ts +4 -0
- package/dist/toggle-group.js +1 -0
- package/dist/toggle.d.ts +4 -0
- package/dist/toggle.js +1 -0
- package/dist/toolbar-DfjePeEZ.js +178 -0
- package/dist/toolbar-DfjePeEZ.js.map +1 -0
- package/dist/toolbar.d.ts +3 -0
- package/dist/toolbar.js +1 -0
- package/dist/tooltip-CqZtSspz.js +320 -0
- package/dist/tooltip-CqZtSspz.js.map +1 -0
- package/dist/tooltip.d.ts +9 -0
- package/dist/tooltip.js +1 -0
- package/dist/use-color-picker-binding-D0R-FsfF.js +17 -0
- package/dist/use-color-picker-binding-D0R-FsfF.js.map +1 -0
- package/dist/use-controllable-state-Dm8eNkgP.js +36 -0
- package/dist/use-controllable-state-Dm8eNkgP.js.map +1 -0
- package/dist/use-element-tpFZ-kuA.js +10 -0
- package/dist/use-element-tpFZ-kuA.js.map +1 -0
- package/dist/use-field-control-CL_nOU7T.js +131 -0
- package/dist/use-field-control-CL_nOU7T.js.map +1 -0
- package/dist/use-overlay-portal-Cfv6qtTO.js +18 -0
- package/dist/use-overlay-portal-Cfv6qtTO.js.map +1 -0
- package/dist/use-overlay-portal-D8GjZ-m7.d.ts +13 -0
- package/dist/use-overlay-root-BDO5E_0S.d.ts +23 -0
- package/dist/use-overlay-root-eXuUlCpV.js +225 -0
- package/dist/use-overlay-root-eXuUlCpV.js.map +1 -0
- package/dist/use-overlay-trigger-CxW1Z6Q6.js +74 -0
- package/dist/use-overlay-trigger-CxW1Z6Q6.js.map +1 -0
- package/dist/use-overlay-trigger-PP99t2ZF.d.ts +11 -0
- package/dist/use-panel-transition-CKMdsqPR.js +145 -0
- package/dist/use-panel-transition-CKMdsqPR.js.map +1 -0
- package/dist/use-positioner-BpxM4U5Y.d.ts +11 -0
- package/dist/use-positioner-DtJR980s.js +56 -0
- package/dist/use-positioner-DtJR980s.js.map +1 -0
- package/dist/use-presence-Cwi_UTLe.js +97 -0
- package/dist/use-presence-Cwi_UTLe.js.map +1 -0
- package/dist/use-required-context-Cjd_CYnv.js +11 -0
- package/dist/use-required-context-Cjd_CYnv.js.map +1 -0
- package/dist/use-roving-composite-D0vtGxm8.js +82 -0
- package/dist/use-roving-composite-D0vtGxm8.js.map +1 -0
- package/dist/use-roving-item-Dxe3phsZ.js +42 -0
- package/dist/use-roving-item-Dxe3phsZ.js.map +1 -0
- package/dist/use-segment-group--unFuh-Z.js +307 -0
- package/dist/use-segment-group--unFuh-Z.js.map +1 -0
- package/dist/use-virtual-rows-B5N0qgmT.js +99 -0
- package/dist/use-virtual-rows-B5N0qgmT.js.map +1 -0
- package/dist/use-virtual-rows-BQFqR0_e.d.ts +16 -0
- package/dist/year-calendar-CroBMFMN.js +28 -0
- package/dist/year-calendar-CroBMFMN.js.map +1 -0
- package/dist/year-calendar.d.ts +6 -0
- package/dist/year-calendar.js +3 -0
- package/dist/year-picker-DJVxXtPh.js +26 -0
- package/dist/year-picker-DJVxXtPh.js.map +1 -0
- package/dist/year-picker.d.ts +10 -0
- package/dist/year-picker.js +3 -0
- package/dist/year-range-calendar-Cz2WYDV2.js +28 -0
- package/dist/year-range-calendar-Cz2WYDV2.js.map +1 -0
- package/dist/year-range-calendar.d.ts +6 -0
- package/dist/year-range-calendar.js +3 -0
- package/dist/year-range-picker-9f7L5Hgx.js +26 -0
- package/dist/year-range-picker-9f7L5Hgx.js.map +1 -0
- package/dist/year-range-picker.d.ts +10 -0
- package/dist/year-range-picker.js +3 -0
- package/package.json +553 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts-CDVlldST.js","names":[],"sources":["../src/components/autocomplete/autocomplete-context.ts","../src/components/autocomplete/autocomplete-clear.tsx","../src/components/autocomplete/autocomplete-empty.tsx","../src/components/autocomplete/autocomplete-group.tsx","../src/components/autocomplete/autocomplete-group-label.tsx","../src/components/autocomplete/autocomplete-input.tsx","../src/components/autocomplete/autocomplete-input-group.tsx","../src/components/autocomplete/autocomplete-item.tsx","../src/components/autocomplete/autocomplete-list.tsx","../src/components/autocomplete/autocomplete-popup.tsx","../src/components/autocomplete/autocomplete-portal.tsx","../src/components/autocomplete/autocomplete-positioner.tsx","../src/components/autocomplete/autocomplete-root.tsx","../src/components/autocomplete/autocomplete-separator.tsx","../src/components/autocomplete/autocomplete-status.tsx","../src/components/autocomplete/autocomplete-trigger.tsx","../src/components/autocomplete/autocomplete-value.tsx","../src/components/autocomplete/parts.ts"],"sourcesContent":["import type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport { createContext, type MutableRefObject } from \"react\";\nimport type { FieldControlBinding } from \"../../hooks/use-field-control.ts\";\nimport type { OverlayRoot } from \"../../hooks/use-overlay-root.ts\";\nimport type { ChangeReason } from \"../../utils/change-details.ts\";\n\n/** How the autocomplete completes the text (spec/autocomplete.md, \"API\"). */\nexport type AutocompleteMode = \"list\" | \"both\" | \"inline\" | \"none\";\n\n/** A rendered Item, as the Root knows it. */\nexport interface AutocompleteItemInfo {\n value: unknown;\n disabled: boolean;\n id: string;\n}\n\n/**\n * What the keyboard highlights once the list renders: the first or last suggestion, the first one\n * after typing (`autoHighlight`), or the inline completion of the typed text.\n */\nexport type AutocompletePending = \"first\" | \"last\" | \"complete\" | null;\n\n/** The text a highlight shows in the input (`both`, `inline`), and the suggestion it comes from. */\nexport interface AutocompleteShown {\n item: unknown;\n text: string;\n /** Where the completion string starts: it is selected (`null`: the caret at the end). */\n selectFrom: number | null;\n /** A disabled suggestion is shown, never accepted. */\n disabled: boolean;\n}\n\nexport interface AutocompleteContextValue extends OverlayRoot {\n field: FieldControlBinding;\n mode: AutocompleteMode;\n /** The value: the typed or chosen text. */\n value: string;\n /** The text a highlight shows instead of the value, or `null`. */\n shown: AutocompleteShown | null;\n /** Types `text` (spec/autocomplete.md, \"Keyboard\": typing). */\n type: (text: string, addition: boolean, event: Event) => void;\n disabled: boolean;\n /** The Input's form name (the field's, else the Root's). */\n name: string | undefined;\n required: boolean;\n openOnInputClick: boolean;\n /** The highlighted item's id. */\n highlighted: string | null;\n /** Highlights an item (or none); the keyboard's highlight shows its text inline. */\n highlight: (id: string | null, from: \"keyboard\" | \"pointer\") => void;\n /** Highlights a suggestion and completes the typed text with it, the rest selected. */\n complete: (item: AutocompleteItemInfo) => void;\n /** Chooses a suggestion: its text becomes the value, the list closes. */\n choose: (item: unknown, event?: Event) => void;\n /** Empties the text. */\n clear: (reason: ChangeReason, event?: Event) => void;\n /** A suggestion's text (`itemToStringValue`). */\n label: (item: unknown) => string;\n hasItems: boolean;\n /** The matching entries: items, or groups with their matching items. */\n entries: readonly unknown[];\n items: Map<HTMLElement, AutocompleteItemInfo>;\n list: HTMLElement | null;\n setList: (element: HTMLElement | null) => void;\n button: HTMLElement | null;\n setButton: (element: HTMLElement | null) => void;\n inputGroup: HTMLElement | null;\n setInputGroup: (element: HTMLElement | null) => void;\n clearButton: HTMLElement | null;\n setClearButton: (element: HTMLElement | null) => void;\n listId: string;\n pending: MutableRefObject<AutocompletePending>;\n /** Bumped when a pending highlight is asked for, so the List applies it. */\n pendingTick: number;\n requestHighlight: (pending: AutocompletePending) => void;\n placed: { side: Side; align: Align };\n setPlaced: (placed: { side: Side; align: Align }) => void;\n itemCount: number;\n setItemCount: (count: number) => void;\n}\n\nexport const AutocompleteContext =\n createContext<AutocompleteContextValue | null>(null);\n\nexport interface AutocompleteGroupContextValue {\n labelId: string;\n}\n\nexport const AutocompleteGroupContext =\n createContext<AutocompleteGroupContextValue | null>(null);\n\n/** The rendered items of the list, in order. */\nexport function orderedItems(\n context: AutocompleteContextValue,\n): AutocompleteItemInfo[] {\n if (context.list === null) {\n return [];\n }\n return [...context.list.querySelectorAll<HTMLElement>('[role=\"option\"]')]\n .map((element) => context.items.get(element))\n .filter((item): item is AutocompleteItemInfo => item !== undefined);\n}\n","import type { MouseEvent as ReactMouseEvent } from \"react\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { AutocompleteContext } from \"./autocomplete-context.ts\";\n\n/** Empties the text; rendered only while there is text (spec/autocomplete.md). */\nexport function AutocompleteClear(props: PartProps<{ disabled: boolean }>) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.Clear\",\n );\n const { disabled } = context;\n if (context.value === \"\") {\n return null;\n }\n return renderElement(\n \"button\",\n props,\n { disabled },\n {\n type: \"button\",\n tabIndex: -1,\n disabled,\n \"data-primitives-part\": \"autocomplete-clear\",\n ...stateAttributes({ disabled }),\n onPointerDown: (event: PointerEvent) => event.preventDefault(),\n onClick: (event: ReactMouseEvent) => {\n context.clear(\"clear-press\", event.nativeEvent);\n if (context.open && !context.openOnInputClick) {\n context.setOpen(false, \"input-clear\", event.nativeEvent);\n }\n context.trigger?.focus();\n },\n },\n context.setClearButton,\n );\n}\n","import { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { AutocompleteContext } from \"./autocomplete-context.ts\";\n\n/**\n * A polite live region, always rendered; its children are shown only while the list is empty\n * (spec/autocomplete.md).\n */\nexport function AutocompleteEmpty({\n children,\n ...props\n}: PartProps<Record<string, never>>) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.Empty\",\n );\n const empty = context.hasItems\n ? context.entries.length === 0\n : context.itemCount === 0;\n return renderElement(\n \"div\",\n { ...props, children: empty ? children : null },\n {},\n {\n role: \"status\",\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\",\n \"data-primitives-part\": \"autocomplete-empty\",\n },\n );\n}\n","import { useId } from \"react\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { AutocompleteGroupContext } from \"./autocomplete-context.ts\";\n\n/** A `group` of suggestions, named by its GroupLabel (spec/autocomplete.md). */\nexport function AutocompleteGroup(props: PartProps<Record<string, never>>) {\n const labelId = `${useId()}-label`;\n return (\n <AutocompleteGroupContext.Provider value={{ labelId }}>\n {renderElement(\n \"div\",\n props,\n {},\n {\n role: \"group\",\n \"aria-labelledby\": labelId,\n \"data-primitives-part\": \"autocomplete-group\",\n },\n )}\n </AutocompleteGroupContext.Provider>\n );\n}\n","import { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { AutocompleteGroupContext } from \"./autocomplete-context.ts\";\n\n/** Names its Group. */\nexport function AutocompleteGroupLabel(\n props: PartProps<Record<string, never>>,\n) {\n const group = useRequiredContext(\n AutocompleteGroupContext,\n \"Autocomplete.GroupLabel\",\n );\n return renderElement(\n \"div\",\n props,\n {},\n {\n id: group.labelId,\n \"data-primitives-part\": \"autocomplete-group-label\",\n },\n );\n}\n","import { stepThroughNone } from \"@fragiola/primitives/collection\";\nimport {\n type ChangeEvent,\n type KeyboardEvent,\n useLayoutEffect,\n useRef,\n} from \"react\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { mergeRefs } from \"../../utils/merge-refs.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport {\n AutocompleteContext,\n type AutocompletePending,\n orderedItems,\n} from \"./autocomplete-context.ts\";\n\n/**\n * The `combobox` and the form control: keeps DOM focus while the list is open; the highlighted\n * suggestion is announced with `aria-activedescendant` (spec/autocomplete.md, \"Keyboard\").\n */\nexport function AutocompleteInput(\n props: PartProps<{ open: boolean; disabled: boolean }>,\n) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.Input\",\n );\n const { open, disabled, highlighted, field, shown, mode } = context;\n const items = orderedItems(context);\n const active = items.find((item) => item.id === highlighted);\n const element = useRef<HTMLInputElement | null>(null);\n const inline = mode === \"both\" || mode === \"inline\";\n\n // the completion string is selected, so the next character replaces it (APG)\n useLayoutEffect(() => {\n const input = element.current;\n if (\n input === null ||\n shown === null ||\n input.ownerDocument.activeElement !== input\n ) {\n return;\n }\n const end = shown.text.length;\n input.setSelectionRange(shown.selectFrom ?? end, end);\n }, [shown]);\n\n const openWith = (pending: AutocompletePending, event?: Event) => {\n context.requestHighlight(pending);\n // an opening the consumer refused asks for no highlight later\n if (!context.setOpen(true, \"list-navigation\", event)) {\n context.requestHighlight(null);\n }\n };\n const move = (delta: 1 | -1) => {\n // past an end, the visual focus goes back to the input; from the input, to the near end\n const index = items.findIndex((item) => item.id === highlighted);\n context.highlight(\n items[stepThroughNone(items.length, index, delta)]?.id ?? null,\n \"keyboard\",\n );\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowUp\": {\n event.preventDefault();\n if (event.altKey) {\n if (event.key === \"ArrowDown\" && !open) {\n openWith(null, event.nativeEvent);\n } else if (event.key === \"ArrowUp\" && open) {\n context.setOpen(\n false,\n \"list-navigation\",\n event.nativeEvent,\n );\n }\n return;\n }\n if (!open) {\n openWith(\n event.key === \"ArrowDown\" ? \"first\" : \"last\",\n event.nativeEvent,\n );\n return;\n }\n move(event.key === \"ArrowDown\" ? 1 : -1);\n return;\n }\n case \"Enter\":\n if (!open) {\n return;\n }\n if (active === undefined) {\n // no highlight: the list closes and the form may submit\n context.setOpen(false, \"none\", event.nativeEvent);\n return;\n }\n event.preventDefault();\n if (!active.disabled) {\n context.choose(active.value, event.nativeEvent);\n }\n return;\n case \"Escape\":\n // the open list's layer takes Escape first; here the list is closed\n if (!open && context.value !== \"\") {\n event.preventDefault();\n context.clear(\"escape-key\", event.nativeEvent);\n }\n return;\n case \"Tab\":\n if (open) {\n context.setOpen(false, \"focus-out\", event.nativeEvent);\n }\n return;\n default:\n }\n };\n\n const state = { open, disabled };\n return renderElement(\n \"input\",\n props,\n state,\n {\n type: \"text\",\n id: context.triggerId,\n role: \"combobox\",\n autoComplete: \"off\",\n name: context.name,\n required: context.required,\n disabled,\n value: shown?.text ?? context.value,\n \"aria-autocomplete\": mode,\n \"aria-expanded\": open,\n \"aria-controls\": context.listId,\n \"aria-activedescendant\": open && active ? active.id : undefined,\n ...field.aria,\n \"data-primitives-part\": \"autocomplete-input\",\n ...field.attributes,\n ...stateAttributes({ \"popup-open\": open, disabled }),\n onChange: (event: ChangeEvent<HTMLInputElement>) => {\n const native = event.nativeEvent as InputEvent;\n const addition = (native.inputType ?? \"\").startsWith(\"insert\");\n context.type(event.target.value, inline && addition, native);\n },\n onClick: (event: { nativeEvent: Event }) => {\n if (context.openOnInputClick && !open && !disabled) {\n context.setOpen(true, \"input-press\", event.nativeEvent);\n }\n },\n onKeyDown,\n onFocus: field.onFocus,\n onBlur: field.onBlur,\n },\n mergeRefs(context.setTrigger, (node: HTMLElement | null) => {\n element.current = node as HTMLInputElement | null;\n }),\n );\n}\n","import type { MouseEvent } from \"react\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { AutocompleteContext } from \"./autocomplete-context.ts\";\n\n/**\n * Holds the Input and its buttons; anchors the list. A press on it, outside its buttons and the\n * input, focuses the input (and opens the list with `openOnInputClick`).\n */\nexport function AutocompleteInputGroup(\n props: PartProps<{ open: boolean; disabled: boolean }>,\n) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.InputGroup\",\n );\n const { open, disabled } = context;\n return renderElement(\n \"div\",\n props,\n { open, disabled },\n {\n role: \"group\",\n \"data-primitives-part\": \"autocomplete-input-group\",\n ...stateAttributes({ \"popup-open\": open, disabled }),\n onMouseDown: (event: MouseEvent) => {\n const target = event.target as Element | null;\n if (\n target === null ||\n target === context.trigger ||\n target.closest(\"button\") !== null\n ) {\n return;\n }\n event.preventDefault();\n if (disabled) {\n return;\n }\n context.trigger?.focus();\n if (context.openOnInputClick && !open) {\n context.setOpen(true, \"input-press\", event.nativeEvent);\n }\n },\n },\n context.setInputGroup,\n );\n}\n","import { scrollIntoViewWithin } from \"@fragiola/primitives/collection\";\nimport { type MouseEvent, useId, useLayoutEffect } from \"react\";\nimport { useElement } from \"../../hooks/use-element.ts\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { AutocompleteContext } from \"./autocomplete-context.ts\";\n\nexport interface AutocompleteItemState {\n highlighted: boolean;\n disabled: boolean;\n}\n\nexport interface AutocompleteItemProps\n extends PartProps<AutocompleteItemState> {\n /** The suggestion: its `itemToStringValue` becomes the value when chosen. */\n value: unknown;\n /** Can be highlighted, never chosen. */\n disabled?: boolean;\n}\n\n/** An `option`: a suggestion, never selected (spec/autocomplete.md). */\nexport function AutocompleteItem({\n value,\n disabled = false,\n ...props\n}: AutocompleteItemProps) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.Item\",\n );\n const [element, ref] = useElement<HTMLElement>();\n const id = useId();\n const { items, setItemCount } = context;\n useLayoutEffect(() => {\n if (element === null) {\n return undefined;\n }\n items.set(element, { value, disabled, id });\n setItemCount(items.size);\n return () => {\n items.delete(element);\n setItemCount(items.size);\n };\n }, [element, value, disabled, id, items, setItemCount]);\n\n const highlighted = context.highlighted === id;\n const { positioner } = context;\n // within the popup only: a list that mounts before it is placed never scrolls the page\n useLayoutEffect(() => {\n if (highlighted && element !== null) {\n scrollIntoViewWithin(element, positioner);\n }\n }, [highlighted, element, positioner]);\n\n const state = { highlighted, disabled };\n return renderElement(\n \"div\",\n props,\n state,\n {\n role: \"option\",\n id,\n \"aria-disabled\": disabled ? \"true\" : undefined,\n \"data-primitives-part\": \"autocomplete-item\",\n ...stateAttributes({ highlighted, disabled }),\n onPointerMove: () => {\n if (!highlighted) {\n context.highlight(id, \"pointer\");\n }\n },\n onPointerDown: (event: PointerEvent) => event.preventDefault(),\n onClick: (event: MouseEvent) => {\n if (!disabled) {\n context.choose(value, event.nativeEvent);\n }\n },\n },\n ref,\n );\n}\n","import { type ReactNode, useLayoutEffect } from \"react\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { AutocompleteContext, orderedItems } from \"./autocomplete-context.ts\";\n\nexport interface AutocompleteListProps<Entry = unknown>\n extends Omit<PartProps<{ empty: boolean }>, \"children\"> {\n /**\n * Nodes, or a render function of each matching entry (a suggestion, or a group). `Entry` is\n * the consumer's own type, inferred from the function's parameter.\n */\n children?: ReactNode | ((entry: Entry, index: number) => ReactNode);\n}\n\n/**\n * The `listbox`. Applies the highlight the keyboard or the typing asked for once its suggestions\n * render, and drops a highlight whose suggestion is gone (new `items`).\n */\nexport function AutocompleteList<Entry = unknown>({\n children,\n ...props\n}: AutocompleteListProps<Entry>) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.List\",\n );\n const { list, pending, itemCount, open, pendingTick, entries } = context;\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: runs when the list opens, its items change or a highlight is asked for\n useLayoutEffect(() => {\n if (list === null) {\n return;\n }\n const items = orderedItems(context);\n const asked = pending.current;\n if (asked !== null && open) {\n pending.current = null;\n if (asked === \"complete\") {\n const typed = context.value.toLowerCase();\n const match = items.find(\n (item) =>\n !item.disabled &&\n context\n .label(item.value)\n .toLowerCase()\n .startsWith(typed),\n );\n if (match !== undefined) {\n context.complete(match);\n }\n return;\n }\n const target = asked === \"first\" ? items[0] : items.at(-1);\n context.highlight(target?.id ?? null, \"keyboard\");\n return;\n }\n if (\n context.highlighted !== null &&\n !items.some((item) => item.id === context.highlighted)\n ) {\n context.highlight(null, \"keyboard\");\n }\n }, [list, itemCount, open, pendingTick, entries]);\n\n const empty = context.hasItems ? entries.length === 0 : itemCount === 0;\n const content =\n typeof children === \"function\"\n ? entries.map((entry, index) =>\n // the Root holds the consumer's items: the render function names their type\n children(entry as Entry, index),\n )\n : children;\n return renderElement(\n \"div\",\n { ...props, children: content },\n { empty },\n {\n role: \"listbox\",\n id: context.listId,\n \"data-primitives-part\": \"autocomplete-list\",\n ...stateAttributes({ empty }),\n },\n context.setList,\n );\n}\n","import { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { AutocompleteContext } from \"./autocomplete-context.ts\";\n\n/** The floating container of the list (no role of its own). */\nexport function AutocompletePopup(\n props: PartProps<{ open: boolean; side: string; align: string }>,\n) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.Popup\",\n );\n const status = context.presence.status;\n return renderElement(\n \"div\",\n props,\n { open: context.open, ...context.placed },\n {\n \"data-primitives-part\": \"autocomplete-popup\",\n ...stateAttributes({\n open: context.open,\n closed: !context.open,\n side: context.placed.side,\n align: context.placed.align,\n \"starting-style\": status === \"starting\",\n \"ending-style\": status === \"ending\",\n }),\n },\n context.setPopup,\n );\n}\n","import {\n type OverlayPortalProps,\n useOverlayPortal,\n} from \"../../hooks/use-overlay-portal.ts\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { AutocompleteContext } from \"./autocomplete-context.ts\";\n\nexport interface AutocompletePortalProps extends OverlayPortalProps {}\n\nexport function AutocompletePortal(props: AutocompletePortalProps) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.Portal\",\n );\n return useOverlayPortal(context.presence.mounted, props);\n}\n","import { openOverlaySession } from \"@fragiola/primitives/overlay\";\nimport { useEffect, useLayoutEffect } from \"react\";\nimport {\n type PositionerProps,\n usePositioner,\n} from \"../../hooks/use-positioner.ts\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { AutocompleteContext } from \"./autocomplete-context.ts\";\n\nexport interface AutocompletePositionerState {\n open: boolean;\n side: string;\n align: string;\n}\n\nexport interface AutocompletePositionerProps\n extends PartProps<AutocompletePositionerState>,\n PositionerProps {}\n\n/**\n * Places the list under the InputGroup (else the Input); the open list is a layer (Escape,\n * outside press).\n */\nexport function AutocompletePositioner({\n side,\n align,\n sideOffset,\n alignOffset,\n collisionPadding,\n anchor,\n ...props\n}: AutocompletePositionerProps) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.Positioner\",\n );\n const {\n open,\n positioner,\n trigger,\n button,\n inputGroup,\n clearButton,\n setOpen,\n setPlaced,\n } = context;\n const placed = usePositioner(\n { side, align, sideOffset, alignOffset, collisionPadding, anchor },\n { side: \"bottom\", align: \"start\" },\n inputGroup ?? trigger,\n positioner,\n null,\n context.presence.mounted,\n );\n useLayoutEffect(() => setPlaced(placed), [placed, setPlaced]);\n useEffect(() => {\n if (!open || positioner === null) {\n return undefined;\n }\n const session = openOverlaySession(positioner.ownerDocument, {\n elements: () => [positioner],\n ignore: () => [trigger, button, inputGroup, clearButton],\n dismiss: (reason, event) => setOpen(false, reason, event),\n });\n return session.end;\n }, [open, positioner, trigger, button, inputGroup, clearButton, setOpen]);\n return renderElement(\n \"div\",\n props,\n { open, ...placed },\n {\n role: \"presentation\",\n hidden: context.presence.mounted ? undefined : true,\n \"data-primitives-part\": \"autocomplete-positioner\",\n ...stateAttributes({\n open,\n closed: !open,\n side: placed.side,\n align: placed.align,\n }),\n },\n context.setPositioner,\n );\n}\n","import {\n containsFilter,\n filterItems,\n type ItemFilter,\n type ItemGroup,\n itemLabel,\n} from \"@fragiola/primitives/collection\";\nimport { bridgeForm } from \"@fragiola/primitives/form\";\nimport type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport {\n type ReactNode,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { useControllableState } from \"../../hooks/use-controllable-state.ts\";\nimport { useFieldControl } from \"../../hooks/use-field-control.ts\";\nimport {\n type OverlayRootProps,\n useOverlayRoot,\n} from \"../../hooks/use-overlay-root.ts\";\nimport type {\n ChangeDetails,\n ChangeReason,\n} from \"../../utils/change-details.ts\";\nimport {\n AutocompleteContext,\n type AutocompleteItemInfo,\n type AutocompleteMode,\n type AutocompletePending,\n type AutocompleteShown,\n} from \"./autocomplete-context.ts\";\n\nexport interface AutocompleteRootProps<Item> extends OverlayRootProps {\n /** The text (controlled). */\n value?: string;\n /** The text at first (default `\"\"`). */\n defaultValue?: string;\n onValueChange?: (value: string, details: ChangeDetails) => void;\n /** The suggestions, or groups of them: the autocomplete filters them (`list`, `both`). */\n items?: readonly (Item | ItemGroup<Item>)[];\n /** `list` (default), `both`, `inline` or `none` (spec/autocomplete.md). */\n mode?: AutocompleteMode;\n /** Whether a suggestion matches the query; `null` turns filtering off. */\n filter?: ItemFilter<Item> | null;\n /** The most suggestions the list renders; `-1` for no limit. */\n limit?: number;\n locale?: string;\n /** A suggestion's text, written into the input when chosen. */\n itemToStringValue?: (item: Item) => string;\n /** A press on the input opens the list (default `false`). */\n openOnInputClick?: boolean;\n /** Typing highlights the first suggestion (`list`, `none`; default `false`). */\n autoHighlight?: boolean;\n name?: string;\n required?: boolean;\n disabled?: boolean;\n children?: ReactNode;\n}\n\nconst NONE: readonly unknown[] = [];\n\n/** Holds the autocomplete's state (spec/autocomplete.md): the value is the text. */\nexport function AutocompleteRoot<Item>(props: AutocompleteRootProps<Item>) {\n const {\n items,\n mode = \"list\",\n filter: filterProp,\n limit = -1,\n locale,\n itemToStringValue,\n openOnInputClick = false,\n autoHighlight = false,\n name,\n required = false,\n disabled: disabledProp = false,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n onOpenChangeComplete,\n actionsRef,\n } = props;\n const defaultValue = props.defaultValue ?? \"\";\n const root = useOverlayRoot({\n open: openProp,\n defaultOpen,\n onOpenChange,\n onOpenChangeComplete,\n actionsRef,\n });\n const [value, setValue] = useControllableState<string, ChangeDetails>(\n props.value,\n defaultValue,\n props.onValueChange,\n );\n const label = useCallback(\n (item: unknown) =>\n itemLabel(\n item,\n itemToStringValue as ((item: unknown) => string) | undefined,\n ),\n [itemToStringValue],\n );\n const inline = mode === \"both\" || mode === \"inline\";\n const filters = mode === \"list\" || mode === \"both\";\n\n const field = useFieldControl({\n id: root.trigger?.id || root.triggerId,\n labelable: true,\n value,\n filled: value !== \"\",\n input: () => root.trigger as HTMLInputElement | null,\n focusTarget: () => root.trigger,\n });\n const disabled = disabledProp || field.disabled;\n const [highlighted, setHighlighted] = useState<string | null>(null);\n const [shown, setShown] = useState<AutocompleteShown | null>(null);\n const registered = useMemo(\n () => new Map<HTMLElement, AutocompleteItemInfo>(),\n [],\n );\n const [list, setList] = useState<HTMLElement | null>(null);\n const [button, setButton] = useState<HTMLElement | null>(null);\n const [inputGroup, setInputGroup] = useState<HTMLElement | null>(null);\n const [clearButton, setClearButton] = useState<HTMLElement | null>(null);\n const [itemCount, setItemCount] = useState(0);\n const pending = useRef<AutocompletePending>(null);\n const [pendingTick, setPendingTick] = useState(0);\n const [placed, setPlaced] = useState<{ side: Side; align: Align }>({\n side: \"bottom\",\n align: \"start\",\n });\n const listId = `${useId()}-list`;\n\n const requestHighlight = useCallback((next: AutocompletePending) => {\n pending.current = next;\n setPendingTick((tick) => tick + 1);\n }, []);\n const latest = useRef({ value, shown, inline, label });\n latest.current = { value, shown, inline, label };\n\n const { setOpen: setOpenState } = root;\n const setOpen = useCallback(\n (next: boolean, reason: ChangeReason, event?: Event): boolean => {\n const current = latest.current;\n const changed = setOpenState(next, reason, event);\n if (next || !changed) {\n return changed;\n }\n // leaving the input accepts the inline completion (APG, spec/autocomplete.md)\n if (\n current.inline &&\n current.shown !== null &&\n !current.shown.disabled &&\n (reason === \"focus-out\" || reason === \"outside-press\")\n ) {\n setValue(current.label(current.shown.item), {\n reason: \"input-blur\",\n event,\n });\n }\n setShown(null);\n setHighlighted(null);\n pending.current = null;\n return changed;\n },\n [setOpenState, setValue],\n );\n\n const type = useCallback(\n (text: string, addition: boolean, event: Event) => {\n setValue(text, { reason: \"input-change\", event });\n setShown(null);\n setHighlighted(null);\n pending.current = null;\n const filled = text.trim() !== \"\";\n if (filled && !root.open) {\n // an opening the consumer refused asks for no highlight later\n if (!setOpen(true, \"input-change\", event)) {\n return;\n }\n } else if (!filled && root.open && !openOnInputClick) {\n setOpen(false, \"input-clear\", event);\n return;\n }\n if (!filled) {\n return;\n }\n if (inline) {\n if (addition) {\n requestHighlight(\"complete\");\n }\n } else if (autoHighlight) {\n requestHighlight(\"first\");\n }\n },\n [\n setValue,\n setOpen,\n root.open,\n openOnInputClick,\n inline,\n autoHighlight,\n requestHighlight,\n ],\n );\n\n const highlight = useCallback(\n (id: string | null, from: \"keyboard\" | \"pointer\") => {\n setHighlighted(id);\n if (!latest.current.inline) {\n return;\n }\n // a hover completes nothing: the input shows the value again\n if (from === \"pointer\") {\n setShown(null);\n return;\n }\n const item = [...registered.values()].find(\n (entry) => entry.id === id,\n );\n setShown(\n item === undefined\n ? null\n : {\n item: item.value,\n text: latest.current.label(item.value),\n selectFrom: null,\n disabled: item.disabled,\n },\n );\n },\n [registered],\n );\n\n const complete = useCallback((item: AutocompleteItemInfo) => {\n // the suggestion's whole text, the part after the typed characters selected (APG)\n const typed = latest.current.value;\n setHighlighted(item.id);\n setShown({\n item: item.value,\n text: latest.current.label(item.value),\n selectFrom: typed.length,\n disabled: item.disabled,\n });\n }, []);\n\n const choose = useCallback(\n (item: unknown, event?: Event) => {\n setShown(null);\n setHighlighted(null);\n setValue(latest.current.label(item), {\n reason: \"item-press\",\n event,\n });\n setOpen(false, \"item-press\", event);\n },\n [setValue, setOpen],\n );\n const clear = useCallback(\n (reason: ChangeReason, event?: Event) => {\n setShown(null);\n setHighlighted(null);\n setValue(\"\", { reason, event });\n },\n [setValue],\n );\n\n const filter = useMemo(\n () =>\n filterProp === undefined\n ? containsFilter<unknown>(locale)\n : (filterProp as ItemFilter<unknown> | null),\n [filterProp, locale],\n );\n const entries = useMemo(() => {\n if (items === undefined) {\n return NONE;\n }\n return filterItems(\n items as readonly unknown[],\n filters ? value.trim() : \"\",\n { filter: filters ? filter : null, limit, itemToString: label },\n );\n }, [items, value, filters, filter, limit, label]);\n\n const reset = useRef({ defaultValue, setValue, markReset: field.reset });\n reset.current = { defaultValue, setValue, markReset: field.reset };\n const input = root.trigger as HTMLInputElement | null;\n useEffect(() => {\n if (input === null) {\n return undefined;\n }\n return bridgeForm(input, {\n reset: () => {\n const current = reset.current;\n current.markReset();\n setShown(null);\n setHighlighted(null);\n current.setValue(current.defaultValue, { reason: \"none\" });\n setOpen(false, \"none\");\n },\n });\n }, [input, setOpen]);\n\n const context = useMemo(\n () => ({\n ...root,\n setOpen,\n field,\n mode,\n value,\n shown,\n type,\n disabled,\n name: field.name ?? name,\n required,\n openOnInputClick,\n highlighted,\n highlight,\n complete,\n choose,\n clear,\n label,\n hasItems: items !== undefined,\n entries,\n items: registered,\n list,\n setList,\n button,\n setButton,\n inputGroup,\n setInputGroup,\n clearButton,\n setClearButton,\n listId,\n pending,\n pendingTick,\n requestHighlight,\n placed,\n setPlaced,\n itemCount,\n setItemCount,\n }),\n [\n root,\n setOpen,\n field,\n mode,\n value,\n shown,\n type,\n disabled,\n name,\n required,\n openOnInputClick,\n highlighted,\n highlight,\n complete,\n choose,\n clear,\n label,\n items,\n entries,\n registered,\n list,\n button,\n inputGroup,\n clearButton,\n listId,\n pendingTick,\n requestHighlight,\n placed,\n itemCount,\n ],\n );\n return (\n <AutocompleteContext.Provider value={context}>\n {children}\n </AutocompleteContext.Provider>\n );\n}\n","import { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\n\n/** Between groups; no role of its own (a `listbox` owns only groups and options). */\nexport function AutocompleteSeparator(props: PartProps<Record<string, never>>) {\n return renderElement(\n \"div\",\n props,\n {},\n {\n role: \"presentation\",\n \"data-orientation\": \"horizontal\",\n \"data-primitives-part\": \"autocomplete-separator\",\n },\n );\n}\n","import { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\n\n/** A polite live region for the consumer's text (spec/autocomplete.md). */\nexport function AutocompleteStatus(props: PartProps<Record<string, never>>) {\n return renderElement(\n \"div\",\n props,\n {},\n {\n role: \"status\",\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\",\n \"data-primitives-part\": \"autocomplete-status\",\n },\n );\n}\n","import type { MouseEvent as ReactMouseEvent } from \"react\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { AutocompleteContext } from \"./autocomplete-context.ts\";\n\n/** Toggles the list; not in the tab order, keeps focus in the input. */\nexport function AutocompleteTrigger(\n props: PartProps<{ open: boolean; disabled: boolean }>,\n) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.Trigger\",\n );\n const { open, disabled } = context;\n return renderElement(\n \"button\",\n props,\n { open, disabled },\n {\n type: \"button\",\n tabIndex: -1,\n disabled,\n \"aria-expanded\": open,\n \"aria-controls\": context.listId,\n \"data-primitives-part\": \"autocomplete-trigger\",\n ...stateAttributes({ \"popup-open\": open, disabled }),\n onPointerDown: (event: PointerEvent) => event.preventDefault(),\n onClick: (event: ReactMouseEvent) => {\n context.pending.current = null;\n context.setOpen(!open, \"trigger-press\", event.nativeEvent);\n context.trigger?.focus();\n },\n },\n context.setButton,\n );\n}\n","import type { ReactNode } from \"react\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { AutocompleteContext } from \"./autocomplete-context.ts\";\n\nexport interface AutocompleteValueProps {\n /** A node, or a render function of the value (the text). */\n children?: ReactNode | ((value: string) => ReactNode);\n}\n\n/** Renders the value: the text, or the consumer's render function of it. */\nexport function AutocompleteValue({ children }: AutocompleteValueProps) {\n const context = useRequiredContext(\n AutocompleteContext,\n \"Autocomplete.Value\",\n );\n if (typeof children === \"function\") {\n return <>{children(context.value)}</>;\n }\n if (children !== undefined) {\n return <>{children}</>;\n }\n return <>{context.value}</>;\n}\n","import { AutocompleteClear } from \"./autocomplete-clear.tsx\";\nimport { AutocompleteEmpty } from \"./autocomplete-empty.tsx\";\nimport { AutocompleteGroup } from \"./autocomplete-group.tsx\";\nimport { AutocompleteGroupLabel } from \"./autocomplete-group-label.tsx\";\nimport { AutocompleteInput } from \"./autocomplete-input.tsx\";\nimport { AutocompleteInputGroup } from \"./autocomplete-input-group.tsx\";\nimport { AutocompleteItem } from \"./autocomplete-item.tsx\";\nimport { AutocompleteList } from \"./autocomplete-list.tsx\";\nimport { AutocompletePopup } from \"./autocomplete-popup.tsx\";\nimport { AutocompletePortal } from \"./autocomplete-portal.tsx\";\nimport { AutocompletePositioner } from \"./autocomplete-positioner.tsx\";\nimport { AutocompleteRoot } from \"./autocomplete-root.tsx\";\nimport { AutocompleteSeparator } from \"./autocomplete-separator.tsx\";\nimport { AutocompleteStatus } from \"./autocomplete-status.tsx\";\nimport { AutocompleteTrigger } from \"./autocomplete-trigger.tsx\";\nimport { AutocompleteValue } from \"./autocomplete-value.tsx\";\n\n/** spec/autocomplete.md */\nexport const Autocomplete = {\n Root: AutocompleteRoot,\n InputGroup: AutocompleteInputGroup,\n Input: AutocompleteInput,\n Trigger: AutocompleteTrigger,\n Clear: AutocompleteClear,\n Value: AutocompleteValue,\n Status: AutocompleteStatus,\n Portal: AutocompletePortal,\n Positioner: AutocompletePositioner,\n Popup: AutocompletePopup,\n Empty: AutocompleteEmpty,\n List: AutocompleteList,\n Group: AutocompleteGroup,\n GroupLabel: AutocompleteGroupLabel,\n Separator: AutocompleteSeparator,\n Item: AutocompleteItem,\n};\n"],"mappings":";;;;;;;;;;;;;;;AAiFA,MAAa,sBACT,cAA+C,IAAI;AAMvD,MAAa,2BACT,cAAoD,IAAI;;AAG5D,SAAgB,aACZ,SACsB;CACtB,IAAI,QAAQ,SAAS,MACjB,OAAO,CAAC;CAEZ,OAAO,CAAC,GAAG,QAAQ,KAAK,iBAA8B,mBAAiB,CAAC,CAAC,CACpE,KAAK,YAAY,QAAQ,MAAM,IAAI,OAAO,CAAC,CAAC,CAC5C,QAAQ,SAAuC,SAAS,KAAA,CAAS;AAC1E;;;AC9FA,SAAgB,kBAAkB,OAAyC;CACvE,MAAM,UAAU,mBACZ,qBACA,oBACJ;CACA,MAAM,EAAE,aAAa;CACrB,IAAI,QAAQ,UAAU,IAClB,OAAO;CAEX,OAAO,cACH,UACA,OACA,EAAE,SAAS,GACX;EACI,MAAM;EACN,UAAU;EACV;EACA,wBAAwB;EACxB,GAAG,gBAAgB,EAAE,SAAS,CAAC;EAC/B,gBAAgB,UAAwB,MAAM,eAAe;EAC7D,UAAU,UAA2B;GACjC,QAAQ,MAAM,eAAe,MAAM,WAAW;GAC9C,IAAI,QAAQ,QAAQ,CAAC,QAAQ,kBACzB,QAAQ,QAAQ,OAAO,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MAAM,aAAa;CAC3B,OAAO,cACH,UACA,OACA;EAAE;EAAM;CAAS,GACjB;EACI,MAAM;EACN,UAAU;EACV;EACA,iBAAiB;EACjB,iBAAiB,QAAQ;EACzB,wBAAwB;EACxB,GAAG,gBAAgB;GAAE,cAAc;GAAM;EAAS,CAAC;EACnD,gBAAgB,UAAwB,MAAM,eAAe;EAC7D,UAAU,UAA2B;GACjC,QAAQ,QAAQ,UAAU;GAC1B,QAAQ,QAAQ,CAAC,MAAM,iBAAiB,MAAM,WAAW;GACzD,QAAQ,SAAS,MAAM;EAC3B;CACJ,GACA,QAAQ,SACZ;AACJ;;;AC1BA,SAAgB,kBAAkB,EAAE,YAAoC;CACpE,MAAM,UAAU,mBACZ,qBACA,oBACJ;CACA,IAAI,OAAO,aAAa,YACpB,OAAO,oBAAA,UAAA,EAAA,UAAG,SAAS,QAAQ,KAAK,EAAI,CAAA;CAExC,IAAI,aAAa,KAAA,GACb,OAAO,oBAAA,UAAA,EAAG,SAAW,CAAA;CAEzB,OAAO,oBAAA,UAAA,EAAA,UAAG,QAAQ,MAAQ,CAAA;AAC9B;;;ACJA,MAAa,eAAe;CACxB,MAAM;CACN,YAAY;CACZ,OAAO;CACP,SAAS;CACT,OAAO;CACP,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,MAAM;CACN,OAAO;CACP,YAAY;CACZ,WAAW;CACX,MAAM;AACV"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { a as DatePickerPopup, i as DatePickerPortal, n as DatePickerRootBase, r as DatePickerPositioner, t as DatePickerTrigger } from "./date-picker-trigger-BKPvZbRg.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/date-picker/date-picker-root.tsx
|
|
4
|
+
/** A trigger and a popup holding a bound `Calendar.Root` (spec/calendar.md). */
|
|
5
|
+
function DatePickerRoot(props) {
|
|
6
|
+
return /* @__PURE__ */ jsx(DatePickerRootBase, {
|
|
7
|
+
component: "date-picker",
|
|
8
|
+
mode: "single",
|
|
9
|
+
...props,
|
|
10
|
+
onValueChange: props.onValueChange
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
// src/components/date-picker/parts.ts
|
|
14
|
+
/** spec/calendar.md: a trigger and a popup holding a bound Calendar */
|
|
15
|
+
const DatePicker = {
|
|
16
|
+
Root: DatePickerRoot,
|
|
17
|
+
Trigger: DatePickerTrigger,
|
|
18
|
+
Portal: DatePickerPortal,
|
|
19
|
+
Positioner: DatePickerPositioner,
|
|
20
|
+
Popup: DatePickerPopup
|
|
21
|
+
};
|
|
22
|
+
export { DatePicker as t };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=parts-CNp1lOIU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts-CNp1lOIU.js","names":[],"sources":["../src/components/date-picker/date-picker-root.tsx","../src/components/date-picker/parts.ts"],"sourcesContent":["import type { PlainDate } from \"@fragiola/primitives/date\";\nimport type { ChangeDetails } from \"../../utils/change-details.ts\";\nimport type { CalendarValue } from \"../calendar/calendar-value.ts\";\nimport {\n DatePickerRootBase,\n type DatePickerRootSharedProps,\n} from \"./date-picker-root-base.tsx\";\n\nexport interface DatePickerRootProps extends DatePickerRootSharedProps {\n value?: PlainDate | null;\n defaultValue?: PlainDate | null;\n onValueChange?: (value: PlainDate | null, details: ChangeDetails) => void;\n}\n\n/** A trigger and a popup holding a bound `Calendar.Root` (spec/calendar.md). */\nexport function DatePickerRoot(props: DatePickerRootProps) {\n return (\n <DatePickerRootBase\n component=\"date-picker\"\n mode=\"single\"\n {...props}\n onValueChange={\n props.onValueChange as\n | ((value: CalendarValue, details: ChangeDetails) => void)\n | undefined\n }\n />\n );\n}\n","import { DatePickerPopup } from \"./date-picker-popup.tsx\";\nimport { DatePickerPortal } from \"./date-picker-portal.tsx\";\nimport { DatePickerPositioner } from \"./date-picker-positioner.tsx\";\nimport { DatePickerRoot } from \"./date-picker-root.tsx\";\nimport { DatePickerTrigger } from \"./date-picker-trigger.tsx\";\n\n/** spec/calendar.md: a trigger and a popup holding a bound Calendar */\nexport const DatePicker = {\n Root: DatePickerRoot,\n Trigger: DatePickerTrigger,\n Portal: DatePickerPortal,\n Positioner: DatePickerPositioner,\n Popup: DatePickerPopup,\n};\n"],"mappings":";;;;AAeA,SAAgB,eAAe,OAA4B;CACvD,OACI,oBAAC,oBAAD;EACI,WAAU;EACV,MAAK;EACL,GAAI;EACJ,eACI,MAAM;CAIb,CAAA;AAET;;;ACrBA,MAAa,aAAa;CACtB,MAAM;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;AACX"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { t as PartProps } from "./render-element-Pwuv2wsL.js";
|
|
2
|
+
import { t as OverlayPortalProps } from "./use-overlay-portal-D8GjZ-m7.js";
|
|
3
|
+
import { t as PositionerProps } from "./use-positioner-BpxM4U5Y.js";
|
|
4
|
+
import { t as OverlayRootProps } from "./use-overlay-root-BDO5E_0S.js";
|
|
5
|
+
import { t as ChangeDetails } from "./change-details-CPSkPCNw.js";
|
|
6
|
+
import { ReactNode } from "react";
|
|
7
|
+
import "@fragiola/primitives/positioning";
|
|
8
|
+
/** A `group` of items, named by its GroupLabel (spec/select.md). */
|
|
9
|
+
declare function SelectGroup(props: PartProps<Record<string, never>>): import("react").JSX.Element;
|
|
10
|
+
/** Names its Group (spec/select.md). */
|
|
11
|
+
declare function SelectGroupLabel(props: PartProps<Record<string, never>>): import("react").ReactNode;
|
|
12
|
+
interface SelectItemState {
|
|
13
|
+
highlighted: boolean;
|
|
14
|
+
selected: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface SelectItemProps extends PartProps<SelectItemState> {
|
|
18
|
+
value: string;
|
|
19
|
+
/**
|
|
20
|
+
* The label the Value shows and typeahead matches, without the Root's `items` (default: its
|
|
21
|
+
* ItemText's text, else its text content).
|
|
22
|
+
*/
|
|
23
|
+
label?: string;
|
|
24
|
+
/** Can be highlighted, never chosen (default: the Root item's `disabled`). */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** An `option` (spec/select.md). */
|
|
28
|
+
declare function SelectItem({ value, disabled: disabledProp, label, ...props }: SelectItemProps): import("react").JSX.Element;
|
|
29
|
+
interface SelectItemIndicatorProps extends PartProps<{
|
|
30
|
+
selected: boolean;
|
|
31
|
+
}> {
|
|
32
|
+
/** Rendered while the item is not selected too. */
|
|
33
|
+
keepMounted?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** Marks the selected item; hidden from assistive technologies (spec/select.md). */
|
|
36
|
+
declare function SelectItemIndicator({ keepMounted, ...props }: SelectItemIndicatorProps): import("react").ReactNode;
|
|
37
|
+
/** The text of an Item that is its label (spec/select.md). */
|
|
38
|
+
declare function SelectItemText(props: PartProps<Record<string, never>>): import("react").ReactNode;
|
|
39
|
+
/** The `listbox`, named by the trigger's labels (spec/select.md). */
|
|
40
|
+
declare function SelectList(props: PartProps<{
|
|
41
|
+
open: boolean;
|
|
42
|
+
}>): import("react").ReactNode;
|
|
43
|
+
/** The floating container of the list (no role of its own; spec/select.md). */
|
|
44
|
+
declare function SelectPopup(props: PartProps<{
|
|
45
|
+
open: boolean;
|
|
46
|
+
side: string;
|
|
47
|
+
align: string;
|
|
48
|
+
}>): import("react").ReactNode;
|
|
49
|
+
interface SelectPortalProps extends OverlayPortalProps {}
|
|
50
|
+
declare function SelectPortal(props: SelectPortalProps): import("react").ReactNode;
|
|
51
|
+
interface SelectPositionerState {
|
|
52
|
+
open: boolean;
|
|
53
|
+
side: string;
|
|
54
|
+
align: string;
|
|
55
|
+
}
|
|
56
|
+
interface SelectPositionerProps extends PartProps<SelectPositionerState>, PositionerProps {}
|
|
57
|
+
/**
|
|
58
|
+
* Places the list below the trigger (spec/select.md, "Item alignment"); the open list is a layer
|
|
59
|
+
* (Escape, outside press).
|
|
60
|
+
*/
|
|
61
|
+
declare function SelectPositioner({ side, align, sideOffset, alignOffset, collisionPadding, anchor, ...props }: SelectPositionerProps): import("react").ReactNode;
|
|
62
|
+
/** One item of the Root's `items` (spec/select.md, "API"). */
|
|
63
|
+
interface SelectItemData {
|
|
64
|
+
value: string;
|
|
65
|
+
label: string;
|
|
66
|
+
disabled?: boolean;
|
|
67
|
+
}
|
|
68
|
+
interface SelectRootProps extends OverlayRootProps {
|
|
69
|
+
value?: string | null;
|
|
70
|
+
defaultValue?: string | null;
|
|
71
|
+
onValueChange?: (value: string | null, details: ChangeDetails) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Every item: the labels known while the list is closed. Without it, the Items register
|
|
74
|
+
* themselves while mounted (keep the list mounted: `Portal keepMounted`).
|
|
75
|
+
*/
|
|
76
|
+
items?: readonly SelectItemData[];
|
|
77
|
+
name?: string;
|
|
78
|
+
required?: boolean;
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Locks the page's scroll and blocks the pointer outside while open (default `false`: the APG
|
|
82
|
+
* select-only combobox is non-modal; spec/select.md, "Modal").
|
|
83
|
+
*/
|
|
84
|
+
modal?: boolean;
|
|
85
|
+
children?: ReactNode;
|
|
86
|
+
}
|
|
87
|
+
/** Holds the select's state; renders its hidden form input (spec/select.md). */
|
|
88
|
+
declare function SelectRoot({ value: valueProp, defaultValue, onValueChange, items: itemsProp, name, required, disabled: disabledProp, modal, children, ...overlayProps }: SelectRootProps): import("react").JSX.Element;
|
|
89
|
+
/** Between items or groups; no role of its own (a `listbox` owns only groups and options). */
|
|
90
|
+
declare function SelectSeparator(props: PartProps<Record<string, never>>): import("react").ReactNode;
|
|
91
|
+
interface SelectTriggerState {
|
|
92
|
+
open: boolean;
|
|
93
|
+
disabled: boolean;
|
|
94
|
+
placeholder: boolean;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The select-only `combobox`: keeps DOM focus while the list is open; the highlighted item is
|
|
98
|
+
* announced with `aria-activedescendant` (spec/select.md, "Keyboard").
|
|
99
|
+
*/
|
|
100
|
+
declare function SelectTrigger(props: PartProps<SelectTriggerState>): import("react").ReactNode;
|
|
101
|
+
interface SelectValueProps extends PartProps<{
|
|
102
|
+
placeholder: boolean;
|
|
103
|
+
}> {
|
|
104
|
+
/** Shown while nothing is selected. */
|
|
105
|
+
placeholder?: ReactNode;
|
|
106
|
+
}
|
|
107
|
+
/** The selected item's label, or the placeholder (spec/select.md). */
|
|
108
|
+
declare function SelectValue({ placeholder, ...props }: SelectValueProps): ReactNode;
|
|
109
|
+
/** spec/select.md */
|
|
110
|
+
declare const Select: {
|
|
111
|
+
Root: typeof SelectRoot;
|
|
112
|
+
Trigger: typeof SelectTrigger;
|
|
113
|
+
Value: typeof SelectValue;
|
|
114
|
+
Portal: typeof SelectPortal;
|
|
115
|
+
Positioner: typeof SelectPositioner;
|
|
116
|
+
Popup: typeof SelectPopup;
|
|
117
|
+
List: typeof SelectList;
|
|
118
|
+
Item: typeof SelectItem;
|
|
119
|
+
ItemText: typeof SelectItemText;
|
|
120
|
+
ItemIndicator: typeof SelectItemIndicator;
|
|
121
|
+
Group: typeof SelectGroup;
|
|
122
|
+
GroupLabel: typeof SelectGroupLabel;
|
|
123
|
+
Separator: typeof SelectSeparator;
|
|
124
|
+
};
|
|
125
|
+
export { SelectItemData as a, SelectPortalProps as c, SelectItemState as d, SelectRootProps as i, SelectItemIndicatorProps as l, SelectValueProps as n, SelectPositionerProps as o, SelectTriggerState as r, SelectPositionerState as s, Select as t, SelectItemProps as u };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { a as CalendarHeading, c as CalendarGridBody, d as CalendarCell, i as CalendarNextButton, l as CalendarRow, o as CalendarGridHeader, r as CalendarPrevButton, s as CalendarHeaderCell, t as CalendarRootBase, u as CalendarGrid } from "./calendar-root-base-CIkiSebb.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/calendar/calendar-root.tsx
|
|
4
|
+
/** One date (spec/calendar.md). Inside a DatePicker with no value of its own, it binds to it. */
|
|
5
|
+
function CalendarRoot(props) {
|
|
6
|
+
return /* @__PURE__ */ jsx(CalendarRootBase, {
|
|
7
|
+
component: "calendar",
|
|
8
|
+
mode: "single",
|
|
9
|
+
...props,
|
|
10
|
+
onValueChange: props.onValueChange
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
// src/components/calendar/parts.ts
|
|
14
|
+
/** spec/calendar.md: one date */
|
|
15
|
+
const Calendar = {
|
|
16
|
+
Root: CalendarRoot,
|
|
17
|
+
Heading: CalendarHeading,
|
|
18
|
+
PrevButton: CalendarPrevButton,
|
|
19
|
+
NextButton: CalendarNextButton,
|
|
20
|
+
Grid: CalendarGrid,
|
|
21
|
+
GridHeader: CalendarGridHeader,
|
|
22
|
+
HeaderCell: CalendarHeaderCell,
|
|
23
|
+
GridBody: CalendarGridBody,
|
|
24
|
+
Row: CalendarRow,
|
|
25
|
+
Cell: CalendarCell
|
|
26
|
+
};
|
|
27
|
+
export { Calendar as t };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=parts-CrriPiIL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts-CrriPiIL.js","names":[],"sources":["../src/components/calendar/calendar-root.tsx","../src/components/calendar/parts.ts"],"sourcesContent":["import type { PlainDate } from \"@fragiola/primitives/date\";\nimport type { ChangeDetails } from \"../../utils/change-details.ts\";\nimport {\n CalendarRootBase,\n type CalendarRootSharedProps,\n} from \"./calendar-root-base.tsx\";\nimport type { CalendarValue } from \"./calendar-value.ts\";\n\nexport interface CalendarRootProps extends CalendarRootSharedProps {\n value?: PlainDate | null;\n defaultValue?: PlainDate | null;\n onValueChange?: (value: PlainDate | null, details: ChangeDetails) => void;\n}\n\n/** One date (spec/calendar.md). Inside a DatePicker with no value of its own, it binds to it. */\nexport function CalendarRoot(props: CalendarRootProps) {\n return (\n <CalendarRootBase\n component=\"calendar\"\n mode=\"single\"\n {...props}\n onValueChange={\n props.onValueChange as\n | ((value: CalendarValue, details: ChangeDetails) => void)\n | undefined\n }\n />\n );\n}\n","import { CalendarCell } from \"./calendar-cell.tsx\";\nimport { CalendarGrid } from \"./calendar-grid.tsx\";\nimport { CalendarGridBody } from \"./calendar-grid-body.tsx\";\nimport { CalendarGridHeader } from \"./calendar-grid-header.tsx\";\nimport { CalendarHeaderCell } from \"./calendar-header-cell.tsx\";\nimport { CalendarHeading } from \"./calendar-heading.tsx\";\nimport { CalendarNextButton } from \"./calendar-next-button.tsx\";\nimport { CalendarPrevButton } from \"./calendar-prev-button.tsx\";\nimport { CalendarRoot } from \"./calendar-root.tsx\";\nimport { CalendarRow } from \"./calendar-row.tsx\";\n\n/** spec/calendar.md: one date */\nexport const Calendar = {\n Root: CalendarRoot,\n Heading: CalendarHeading,\n PrevButton: CalendarPrevButton,\n NextButton: CalendarNextButton,\n Grid: CalendarGrid,\n GridHeader: CalendarGridHeader,\n HeaderCell: CalendarHeaderCell,\n GridBody: CalendarGridBody,\n Row: CalendarRow,\n Cell: CalendarCell,\n};\n"],"mappings":";;;;AAeA,SAAgB,aAAa,OAA0B;CACnD,OACI,oBAAC,kBAAD;EACI,WAAU;EACV,MAAK;EACL,GAAI;EACJ,eACI,MAAM;CAIb,CAAA;AAET;;;AChBA,MAAa,WAAW;CACpB,MAAM;CACN,SAAS;CACT,YAAY;CACZ,YAAY;CACZ,MAAM;CACN,YAAY;CACZ,YAAY;CACZ,UAAU;CACV,KAAK;CACL,MAAM;AACV"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { a as DatePickerPositioner, c as DatePickerPortal, i as DatePickerRootSharedProps, t as DatePickerTrigger, u as DatePickerPopup } from "./date-picker-trigger-DHsAhBf2.js";
|
|
2
|
+
import { t as ChangeDetails } from "./change-details-CPSkPCNw.js";
|
|
3
|
+
import { DateRange } from "@fragiola/primitives/date";
|
|
4
|
+
interface DateRangePickerRootProps extends DatePickerRootSharedProps {
|
|
5
|
+
value?: DateRange | null;
|
|
6
|
+
defaultValue?: DateRange | null;
|
|
7
|
+
onValueChange?: (value: DateRange | null, details: ChangeDetails) => void;
|
|
8
|
+
}
|
|
9
|
+
/** A trigger and a popup holding a bound `RangeCalendar.Root` (spec/calendar.md). */
|
|
10
|
+
declare function DateRangePickerRoot(props: DateRangePickerRootProps): import("react").JSX.Element;
|
|
11
|
+
/** spec/calendar.md: a trigger and a popup holding a bound RangeCalendar, with the DatePicker's parts */
|
|
12
|
+
declare const DateRangePicker: {
|
|
13
|
+
Root: typeof DateRangePickerRoot;
|
|
14
|
+
Trigger: typeof DatePickerTrigger;
|
|
15
|
+
Portal: typeof DatePickerPortal;
|
|
16
|
+
Positioner: typeof DatePickerPositioner;
|
|
17
|
+
Popup: typeof DatePickerPopup;
|
|
18
|
+
};
|
|
19
|
+
export { DateRangePickerRootProps as n, DateRangePicker as t };
|