@povio/ui 3.4.0-rc.43 → 3.4.0-rc.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Accordion-DonRhvvW.d.ts → Accordion-UtY7wEp-.d.ts} +2 -1
- package/dist/{ActionModal-CKS0t-n3.d.ts → ActionModal-CzM2hcr0.d.ts} +1 -1
- package/dist/{Autocomplete-CLcRRdiL.d.ts → Autocomplete-B9GmXJF4.d.ts} +3 -2
- package/dist/{Breadcrumbs-C46_H95J.d.ts → Breadcrumbs-BLBMJpe1.d.ts} +3 -2
- package/dist/{Button-D0M9lMOR.d.ts → Button-DZZporg_.d.ts} +3 -3
- package/dist/{Calendar-BaGjTLHS.js → Calendar-H9E8lACh.js} +1 -1
- package/dist/{Checkbox-B2wOgOCL.js → Checkbox-Bg_KpTR1.js} +4 -1
- package/dist/{Checkbox-DC_1l0o7.d.ts → Checkbox-JJwUwUxc.d.ts} +1 -1
- package/dist/{CheckboxGroup-DnWeRs5l.d.ts → CheckboxGroup-Cw-SKIqN.d.ts} +2 -2
- package/dist/{DatePicker-aWuhaUgu.d.ts → DatePicker-DAd7ncHf.d.ts} +5 -4
- package/dist/{DatePicker-Dqr0s7MF.js → DatePicker-DyAL-7Ze.js} +12 -5
- package/dist/{DatePickerInput-B7yVoI9Y.d.ts → DatePickerInput-CusTFCKQ.d.ts} +3 -3
- package/dist/{DatePickerInput-Bo0qxUEY.js → DatePickerInput-DcPW7kKS.js} +2 -1
- package/dist/{DateRangePicker-DpKWDDlC.d.ts → DateRangePicker-CMbIzR3m.d.ts} +6 -5
- package/dist/{DateRangePicker-D1PkqO8w.js → DateRangePicker-CNkQIrwx.js} +12 -5
- package/dist/{DateTimePicker-n76c12_d.js → DateTimePicker-C6RmNdPP.js} +12 -5
- package/dist/{DateTimePicker-BoTa_gTC.d.ts → DateTimePicker-Dc6_5X1V.d.ts} +6 -5
- package/dist/{FileUpload-Czof_aOb.d.ts → FileUpload-B7gn4UwN.d.ts} +1 -1
- package/dist/{FileUpload-Bcr-CMDM.js → FileUpload-D_kEAfO0.js} +32 -9
- package/dist/{FileUploadContainer--YlhZO19.d.ts → FileUploadContainer-C4PRM8Io.d.ts} +1 -1
- package/dist/{Form-BjwyXqkN.d.ts → Form-CQRpe7ZJ.d.ts} +1 -1
- package/dist/{FormField-Iy2O8A4g.d.ts → FormField-BuKYUy28.d.ts} +1 -1
- package/dist/{IconButton-CUpL6CsP.d.ts → IconButton-Drlnq7ik.d.ts} +2 -2
- package/dist/{InlineIconButton-AQ8SViM3.d.ts → InlineIconButton-C7_CmWFj.d.ts} +3 -3
- package/dist/{InputContent-jcMfOzpN.d.ts → InputContent-DguS6x2Q.d.ts} +2 -2
- package/dist/{InputItem-DL_Cid7l.js → InputItem-BgpoT7wO.js} +9 -9
- package/dist/{InputUpload-bfrkozjp.js → InputUpload-BJpTDs3D.js} +4 -1
- package/dist/{InputUpload-D-C-886F.d.ts → InputUpload-BZqamXus.d.ts} +2 -2
- package/dist/{Inputs-g1acoSBO.js → Inputs-DtjIuT7_.js} +1 -1
- package/dist/{Inputs-CwkP8B9O.d.ts → Inputs-NL0LZbhc.d.ts} +1 -1
- package/dist/{Link-CKi4C00S.d.ts → Link-D85-7S3h.d.ts} +1 -1
- package/dist/{Menu-BHpiqpJ9.d.ts → Menu-DzTYbIHz.d.ts} +2 -2
- package/dist/{MenuItem-DLKC94Qs.d.ts → MenuItem-DVFyNRhi.d.ts} +1 -1
- package/dist/{Modal-BfN_MfR-.d.ts → Modal-4GP9tQLf.d.ts} +1 -1
- package/dist/{NumberInput-BIRmzsPb.d.ts → NumberInput-DjuZmkzv.d.ts} +3 -3
- package/dist/{NumberRangeInput-CVHJUFI8.js → NumberRangeInput-CW7X27p1.js} +21 -5
- package/dist/{NumberRangeInput-1vdHmE8h.d.ts → NumberRangeInput-DKVN5j9j.d.ts} +4 -3
- package/dist/{Pagination-uuqyFAu_.d.ts → Pagination-fLbLp_Ro.d.ts} +1 -1
- package/dist/{PaginationList-CmZBILfU.d.ts → PaginationList-DKYcaO7E.d.ts} +1 -1
- package/dist/{PasswordInput-DNUEWDEM.d.ts → PasswordInput-TIBbZOFu.d.ts} +1 -1
- package/dist/{Pill-vCBJdOTY.d.ts → Pill-BuC3w3xn.d.ts} +1 -1
- package/dist/{PillButton-CEF431l4.d.ts → PillButton-JjV_kJ6L.d.ts} +1 -1
- package/dist/{QuerySelect-vWifN5XC.d.ts → QuerySelect--pihqb-N.d.ts} +4 -3
- package/dist/{RadioGroup-Dd7xBSCW.d.ts → RadioGroup-Bp77H9AM.d.ts} +2 -2
- package/dist/{RadioGroup-Bk9DY-yK.js → RadioGroup-DSsr_W6H.js} +4 -1
- package/dist/{ResponsivePopover-BmURECUv.d.ts → ResponsivePopover-C76oaVmY.d.ts} +1 -1
- package/dist/{Segment-BZdZb436.d.ts → Segment-AtakFKus.d.ts} +3 -2
- package/dist/{Select-Bm2C6tHz.d.ts → Select-ChzbiDjh.d.ts} +3 -2
- package/dist/{Select-BbSEcaKE.js → Select-DPG_tS7y.js} +4 -1
- package/dist/{SelectBase-DD8_4B-r.d.ts → SelectBase-DKJuFnvX.d.ts} +3 -3
- package/dist/{Slider-C6UeThGK.d.ts → Slider-BmoZiiSt.d.ts} +2 -2
- package/dist/{Slider-CTCbpRE-.js → Slider-DpjeijYH.js} +4 -0
- package/dist/{SplitButton-CR4psHKW.d.ts → SplitButton-BEYV4IPB.d.ts} +3 -3
- package/dist/{Tag-DUvBTljf.d.ts → Tag-BfmQ9BIV.d.ts} +1 -1
- package/dist/{TextArea-B8Yvkkxr.d.ts → TextArea-CbZ9kNwo.d.ts} +2 -2
- package/dist/{TextButton-cigitfeH.d.ts → TextButton-BZxhaNnh.d.ts} +3 -3
- package/dist/{TextEditor-Bqd8hqkR.js → TextEditor-BlVZ7XEZ.js} +1 -1
- package/dist/{TextEditor-DILzgUAj.d.ts → TextEditor-KzRofqtx.d.ts} +1 -1
- package/dist/{TextInput-Df0Pkuk-.d.ts → TextInput-ChVYCxjg.d.ts} +3 -3
- package/dist/{TimePicker-B3kbwCA-.js → TimePicker-Bf82rbFG.js} +8 -2
- package/dist/{TimePicker-Bdz_yJ0I.d.ts → TimePicker-CMhURRER.d.ts} +4 -3
- package/dist/{Toggle-D6xtL9WV.js → Toggle-Cf8jQ991.js} +4 -1
- package/dist/{Toggle-Ca_t66zh.d.ts → Toggle-pQ0-MbwL.d.ts} +1 -1
- package/dist/{ToggleButton-3lINwoaV.d.ts → ToggleButton-DRTGhnjR.d.ts} +2 -2
- package/dist/{Tooltip-D1oFPqFF.d.ts → Tooltip-BxixKjWm.d.ts} +1 -1
- package/dist/{autocomplete-CIDaulwN.d.ts → autocomplete-BY74KiVw.d.ts} +4 -3
- package/dist/button-COs7mrbm.d.ts +1 -0
- package/dist/{checkbox-4smu5B-h.d.ts → checkbox-DLczwKKs.d.ts} +1 -1
- package/dist/{checkbox-group-C55R3YH5.d.ts → checkbox-group-DT7hMwsc.d.ts} +1 -1
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/action-modal.d.ts +1 -1
- package/dist/components/autocomplete/react-aria.js +1 -1
- package/dist/components/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete.js +4 -1
- package/dist/components/breadcrumb/react-aria.js +1 -1
- package/dist/components/breadcrumbs/react-aria.js +1 -1
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/cell/react-aria.js +1 -1
- package/dist/components/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox-group.js +5 -2
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/collection/react-aria.js +1 -1
- package/dist/components/color-swatch-picker/react-aria.js +1 -1
- package/dist/components/color-swatch-picker-item/react-aria.js +1 -1
- package/dist/components/column/react-aria.js +1 -1
- package/dist/components/column-resizer/react-aria.js +1 -1
- package/dist/components/combo-box/react-aria.js +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.d.ts +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.d.ts +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/file-upload-container.d.ts +2 -2
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.d.ts +2 -2
- package/dist/components/file-upload.js +1 -1
- package/dist/components/focusable/react-aria.js +1 -1
- package/dist/components/form-field.d.ts +1 -1
- package/dist/components/grid-list/react-aria.js +1 -1
- package/dist/components/grid-list-header/react-aria.js +1 -1
- package/dist/components/grid-list-item/react-aria.js +1 -1
- package/dist/components/grid-list-load-more-item/react-aria.js +1 -1
- package/dist/components/grid-list-section/react-aria.js +1 -1
- package/dist/components/header/react-aria.js +1 -1
- package/dist/components/i18n-provider/react-aria.js +1 -1
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/inline-icon-button.d.ts +1 -1
- package/dist/components/input-upload.d.ts +1 -1
- package/dist/components/input-upload.js +1 -1
- package/dist/components/link.d.ts +1 -1
- package/dist/components/list-box/react-aria.js +1 -1
- package/dist/components/list-box-item/react-aria.js +1 -1
- package/dist/components/list-box-load-more-item/react-aria.js +1 -1
- package/dist/components/list-box-section/react-aria.js +1 -1
- package/dist/components/menu/react-aria.js +1 -1
- package/dist/components/menu-item/react-aria.js +1 -1
- package/dist/components/menu-section/react-aria.js +1 -1
- package/dist/components/menu.d.ts +2 -2
- package/dist/components/modal.d.ts +1 -1
- package/dist/components/number-input.d.ts +1 -1
- package/dist/components/number-range-input.d.ts +1 -1
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/pagination-list.d.ts +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/password-input.d.ts +1 -1
- package/dist/components/pill-button.d.ts +1 -1
- package/dist/components/pill.d.ts +1 -1
- package/dist/components/pressable/react-aria.js +1 -1
- package/dist/components/query-autocomplete.d.ts +2 -2
- package/dist/components/query-autocomplete.js +4 -1
- package/dist/components/query-select.d.ts +1 -1
- package/dist/components/query-select.js +5 -2
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/resizable-table-container/react-aria.js +1 -1
- package/dist/components/responsive-popover.d.ts +1 -1
- package/dist/components/router-provider/react-aria.js +1 -1
- package/dist/components/row/react-aria.js +1 -1
- package/dist/components/section/react-aria.js +1 -1
- package/dist/components/segment.d.ts +2 -2
- package/dist/components/select/react-aria.js +1 -1
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +1 -1
- package/dist/components/separator/react-aria.js +1 -1
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/ssr-provider/react-aria.js +1 -1
- package/dist/components/submenu-trigger/react-aria.js +1 -1
- package/dist/components/tab/react-aria.js +1 -1
- package/dist/components/tab-list/react-aria.js +1 -1
- package/dist/components/tab-panels/react-aria.js +1 -1
- package/dist/components/table/react-aria.js +1 -1
- package/dist/components/table-body/react-aria.js +1 -1
- package/dist/components/table-header/react-aria.js +1 -1
- package/dist/components/table-load-more-item/react-aria.js +1 -1
- package/dist/components/tabs/react-aria.js +1 -1
- package/dist/components/tag/react-aria.js +1 -1
- package/dist/components/tag-group/react-aria.js +1 -1
- package/dist/components/tag-list/react-aria.js +1 -1
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/text-area.d.ts +1 -1
- package/dist/components/text-button.d.ts +1 -1
- package/dist/components/text-input.d.ts +1 -1
- package/dist/components/time-picker.d.ts +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast/react-aria.js +1 -1
- package/dist/components/toast-content/react-aria.js +1 -1
- package/dist/components/toast-list/react-aria.js +1 -1
- package/dist/components/toast-region/react-aria.js +1 -1
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/toolbar/react-aria.js +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tree/react-aria.js +1 -1
- package/dist/components/tree-item/react-aria.js +1 -1
- package/dist/components/tree-item-content/react-aria.js +1 -1
- package/dist/components/tree-load-more-item/react-aria.js +1 -1
- package/dist/components/virtualizer/react-aria.js +1 -1
- package/dist/components/visually-hidden/react-aria.js +1 -1
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/link-context.d.ts +2 -2
- package/dist/config/ui-config.d.ts +1 -1
- package/dist/{confirmation.context-D_kJeU8m.d.ts → confirmation.context-CuufQTQR.d.ts} +1 -1
- package/dist/{date-picker-g50NliUB.d.ts → date-picker-CuNJV9nJ.d.ts} +1 -1
- package/dist/{date-range-picker-4EXSwE8B.d.ts → date-range-picker-CJOhtloN.d.ts} +1 -1
- package/dist/{date-time-picker-Bjag5nQ1.d.ts → date-time-picker-MIDzdeQN.d.ts} +1 -1
- package/dist/{dynamicInputs-p4ATehFR.d.ts → dynamicInputs-2kB0x8BT.d.ts} +70 -70
- package/dist/{file-upload-Ba6NwH0N.d.ts → file-upload-C0kwtd3Z.d.ts} +2 -2
- package/dist/{fileUpload.types-ZUblxJUi.d.ts → fileUpload.types-DFg9wCbc.d.ts} +3 -3
- package/dist/{index-DCUSluLL.d.ts → index-CXUySbXH.d.ts} +110 -1
- package/dist/index.d.ts +66 -66
- package/dist/index.js +7 -7
- package/dist/{input-upload-BxRgcRt4.d.ts → input-upload-CFcsHAOE.d.ts} +1 -1
- package/dist/{link.context-C1RcdC0i.d.ts → link.context-BUxUXeo6.d.ts} +1 -1
- package/dist/{number-input-BoUfnoR2.d.ts → number-input-DhLfHuVP.d.ts} +1 -1
- package/dist/{number-range-input-43A63EzS.d.ts → number-range-input-CLsMdwqJ.d.ts} +1 -1
- package/dist/{password-input-BPAjcIly.d.ts → password-input--nSBPzos.d.ts} +1 -1
- package/dist/{query-autocomplete-Dh1Yeu4p.d.ts → query-autocomplete-vHRKodn0.d.ts} +2 -2
- package/dist/{query-select-7lNZcE_x.d.ts → query-select-CvoVhXu1.d.ts} +4 -3
- package/dist/{queryAutocomplete.types-D7SmWVq-.d.ts → queryAutocomplete.types-Cn4fe0OX.d.ts} +3 -3
- package/dist/{radio-group-DmilCTsI.d.ts → radio-group-rmH66jpI.d.ts} +1 -1
- package/dist/rhf/autocomplete.d.ts +2 -2
- package/dist/rhf/checkbox-group.d.ts +2 -2
- package/dist/rhf/checkbox.d.ts +2 -2
- package/dist/rhf/checkbox.js +1 -1
- package/dist/rhf/date-picker.d.ts +2 -2
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.d.ts +2 -2
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.d.ts +2 -2
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/file-upload.d.ts +2 -2
- package/dist/rhf/file-upload.js +1 -1
- package/dist/rhf/input-upload.d.ts +2 -2
- package/dist/rhf/input-upload.js +1 -1
- package/dist/rhf/inputs.d.ts +1 -1
- package/dist/rhf/number-input.d.ts +2 -2
- package/dist/rhf/number-range-input.d.ts +2 -2
- package/dist/rhf/number-range-input.js +1 -1
- package/dist/rhf/password-input.d.ts +2 -2
- package/dist/rhf/query-autocomplete.d.ts +1 -1
- package/dist/rhf/query-select.d.ts +1 -1
- package/dist/rhf/radio-group.d.ts +2 -2
- package/dist/rhf/radio-group.js +1 -1
- package/dist/rhf/segment.d.ts +2 -2
- package/dist/rhf/select.d.ts +2 -2
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/slider.d.ts +2 -2
- package/dist/rhf/slider.js +1 -1
- package/dist/rhf/text-area.d.ts +2 -2
- package/dist/rhf/text-editor.d.ts +2 -2
- package/dist/rhf/text-editor.js +1 -1
- package/dist/rhf/text-input.d.ts +2 -2
- package/dist/rhf/time-picker.d.ts +2 -2
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf/toggle.d.ts +2 -2
- package/dist/rhf/toggle.js +1 -1
- package/dist/rhf.d.ts +66 -66
- package/dist/rhf.js +7 -7
- package/dist/{segment-BOELlo1K.d.ts → segment-e0jd1JbP.d.ts} +3 -2
- package/dist/{segment.types-BYTmg69p.d.ts → segment.types-DUstTZeA.d.ts} +2 -1
- package/dist/{select-CD3fNAgK.d.ts → select-Bvt1d_ly.d.ts} +4 -3
- package/dist/{slider-tx1tub5d.d.ts → slider-CRnAZyb_.d.ts} +1 -1
- package/dist/tanstack/autocomplete.d.ts +1 -1
- package/dist/tanstack/checkbox-group.d.ts +1 -1
- package/dist/tanstack/checkbox.d.ts +1 -1
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.d.ts +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.d.ts +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.d.ts +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-upload.d.ts +2 -2
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.d.ts +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/input-upload.d.ts +1 -1
- package/dist/tanstack/input-upload.js +1 -1
- package/dist/tanstack/inputs.d.ts +2 -2
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-input.d.ts +1 -1
- package/dist/tanstack/number-range-input.d.ts +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/password-input.d.ts +1 -1
- package/dist/tanstack/query-select.d.ts +1 -1
- package/dist/tanstack/radio-group.d.ts +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/segment.d.ts +2 -2
- package/dist/tanstack/select.d.ts +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.d.ts +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-area.d.ts +1 -1
- package/dist/tanstack/text-editor.d.ts +1 -1
- package/dist/tanstack/text-editor.js +1 -1
- package/dist/tanstack/text-input.d.ts +1 -1
- package/dist/tanstack/time-picker.d.ts +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle.d.ts +1 -1
- package/dist/tanstack/toggle.js +1 -1
- package/dist/tanstack.d.ts +50 -50
- package/dist/tanstack.js +17 -17
- package/dist/{text-area-kb2PxyJb.d.ts → text-area-KsaEQpPz.d.ts} +1 -1
- package/dist/{text-editor-CDECpKqj.d.ts → text-editor-CYU0teJy.d.ts} +1 -1
- package/dist/text-editor.d.ts +1 -1
- package/dist/text-editor.js +1 -1
- package/dist/{text-input-VqRJ0y7Y.d.ts → text-input-dZeNDTtP.d.ts} +1 -1
- package/dist/{time-picker-BYfudvVK.d.ts → time-picker-CcHlAJUk.d.ts} +1 -1
- package/dist/{toggle-DK5CDOtt.d.ts → toggle-BGOUUhAG.d.ts} +1 -1
- package/dist/{types-ZbFfCz06.d.ts → types-CaqW-yY5.d.ts} +20 -27
- package/dist/types-Dugk_Mie.d.ts +581 -0
- package/dist/{useFormAutosave-Cg3mrAKl.js → useFormAutosave-CaF9uarl.js} +1 -1
- package/dist/{useTableColumnConfig-DImzIOQq.js → useTableColumnConfig-D2H_RUmX.js} +1 -1
- package/package.json +23 -1
- package/dist/button-BQmy1LZS.d.ts +0 -1
- package/dist/types-BT18i837.d.ts +0 -69
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as
|
|
1
|
+
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as ee}from"@react-aria/utils";import{FocusableContext as p}from"@react-aria/interactions";import{createPortal as m}from"react-dom";import{mergeProps as h,useHover as g,useTableHeaderRow as _,useTableRowGroup as v,useTableSelectAllCheckbox as y}from"react-aria";import"react-stately";const b=n(null);n(null),n(null),n(null),n(null),n({}),n(null),n(null);function x({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function S(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function C(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const w={},T=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=w[t];return n||(n=r(C.bind(null,t)),w[t]=n),n}});var E=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},D=class extends E{filter(e,t,n){let[r,i]=A(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},O=class extends E{};O.type=`header`;var k=class extends E{};k.type=`loader`;var te=class extends D{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};te.type=`item`;var ne=class extends D{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};ne.type=`section`;function A(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function j(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}String(Math.round(Math.random()*1e10));const M=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function N(){return!1}function re(){return!0}function ie(e){return()=>{}}function ae(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(ie,N,re):o(M)}const P=n(!1),F=n(null);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const I=n(null);function L(e){var t;return t=class extends E{},t.type=e,t}function R(t,n,r,i,s,c){typeof t==`string`&&(t=L(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(I);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(I.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function z(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(p);if(!o(P)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return R(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(p.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}function B(t,n,i=V){let a=({node:e})=>n(e.props,e.props.ref,e),o=r((n,r)=>R(t,n,r,null,i(n),t=>e.createElement(a,{node:t}))??e.createElement(e.Fragment,null));return o.displayName=n.name,o}function V(e){return j({...e,addIdAndValue:!0})}const H=n(null);function U(t){let n=o(H),r=(n?.dependencies||[]).concat(t.dependencies),i=t.idScope??n?.idScope,a=V({...t,idScope:i,dependencies:r});return o(F)&&(a=e.createElement(W,null,a)),n=s(()=>({dependencies:r,idScope:i}),[i,...r]),e.createElement(H.Provider,{value:n},a)}function W({children:t}){let n=o(F),r=s(()=>e.createElement(F.Provider,{value:null},e.createElement(P.Provider,{value:!0},t)),[t]);return ae()?e.createElement(I.Provider,{value:n},r):m(r,n)}const G={CollectionRoot({collection:e,renderDropIndicator:t}){return K(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return K(e,t,n)}};function K(t,n,r){return j({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,q(t,n,r))}})}function q(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const J=n(G),Y=n(null);var X=class extends E{};X.type=`tableheader`;let oe=r(function(t,n){let{isVirtualized:r}=o(J);return r?e.createElement(T.div,{...t,ref:n}):e.createElement(T.thead,{...t,ref:n})});const se=B(X,(t,n)=>{let r=o(Y).collection,i=j({items:r.headerRows,children:a(t=>{switch(t.type){case`headerrow`:return e.createElement(le,{item:t});default:throw Error(`Unsupported node type in TableHeader: `+t.type)}},[])}),{rowGroupProps:s}=v(),{hoverProps:c,isHovered:u}=g({onHoverStart:t.onHoverStart,onHoverChange:t.onHoverChange,onHoverEnd:t.onHoverEnd}),d=S({...t,children:void 0,defaultClassName:`react-aria-TableHeader`,values:{isHovered:u}});return e.createElement(oe,{...h(l(t,{global:!0}),s,c),...d,ref:n,"data-hovered":u||void 0},i)},t=>e.createElement(U,{dependencies:t.dependencies,items:t.columns},t.children));let ce=r(function(t,n){let{isVirtualized:r}=o(J);return r?e.createElement(`div`,{...t,ref:n}):e.createElement(`tr`,{...t,ref:n})});function le({item:t}){let n=c(null),r=o(Y),{isVirtualized:i,CollectionBranch:a}=o(J),{rowProps:s}=_({node:t,isVirtualized:i},r,n),{checkboxProps:l}=y(r);return e.createElement(ce,{...s,ref:n},e.createElement(x,{values:[[b,{slots:{selection:l}}]]},e.createElement(a,{collection:r.collection,parent:t})))}var ue=class extends E{};ue.type=`column`;var de=class extends D{};de.type=`tablebody`;var Z=class extends E{filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}};Z.type=`item`;let Q=r(function(t,n){let{isVirtualized:r}=o(J);return r?e.createElement(T.div,{...t,ref:n}):e.createElement(T.tr,{...t,ref:n})});var fe=class extends E{};fe.type=`cell`;let $=r(function(t,n){let{isVirtualized:r}=o(J);return r?e.createElement(T.div,{...t,ref:n}):e.createElement(T.td,{...t,ref:n})});z(k,function(t,n,r){let i=o(Y),{isVirtualized:a}=o(J),{isLoading:d,onLoadMore:f,scrollOffset:p,...m}=t,g=i.collection.columns.length,_=c(null),v=s(()=>({onLoadMore:f,collection:i?.collection,sentinelRef:_,scrollOffset:p}),[f,p,i?.collection]);ee(v,_);let y=S({...m,id:void 0,children:r.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,values:void 0}),b={},x={},C={};return a?(x[`aria-colspan`]=g,C={display:`contents`}):x.colSpan=g,e.createElement(e.Fragment,null,e.createElement(Q,{style:{height:0},inert:u(!0)},e.createElement($,{style:{padding:0,border:0}},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:_,style:{position:`relative`,height:1,width:1}}))),d&&y.children&&e.createElement(Q,{...h(l(t,{global:!0}),b),...y,role:`row`,ref:n},e.createElement($,{role:`rowheader`,...x,style:C},y.children)))});export{se as TableHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p}from"@react-aria/utils";import{FocusableContext as m}from"@react-aria/interactions";import"react-dom";import{mergeProps as h}from"react-aria";import"react-stately";function g(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function _(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const v={},y=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=v[t];return n||(n=r(_.bind(null,t)),v[t]=n),n}});
|
|
1
|
+
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeRefs as d,useLayoutEffect as f,useLoadMoreSentinel as p}from"@react-aria/utils";import{FocusableContext as m}from"@react-aria/interactions";import"react-dom";import{mergeProps as h}from"react-aria";import"react-stately";function g(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function _(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>d(r,o),[r,o]);f(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const v={},y=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=v[t];return n||(n=r(_.bind(null,t)),v[t]=n),n}});var b=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},x=class extends b{filter(e,t,n){let[r,i]=E(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},S=class extends b{};S.type=`header`;var C=class extends b{};C.type=`loader`;var w=class extends x{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};w.type=`item`;var T=class extends x{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};T.type=`section`;function E(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function D(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;const O=n(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const k=n(null);function A(e){var t;return t=class extends b{},t.type=e,t}function j(t,n,r,i,s,c){typeof t==`string`&&(t=A(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(k);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(k.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function M(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(m);if(!o(O)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return j(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(m.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}const N={CollectionRoot({collection:e,renderDropIndicator:t}){return P(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return P(e,t,n)}};function P(t,n,r){return D({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,F(t,n,r))}})}function F(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const I=n(N),L=n(null);var R=class extends b{};R.type=`tableheader`;var z=class extends b{};z.type=`column`;var B=class extends x{};B.type=`tablebody`;var V=class extends b{filter(e,t,n){let r=e.getChildren(this.key);for(let i of r)if(n(i.textValue,i)){let n=this.clone();return t.addDescendants(n,e),n}return null}};V.type=`item`;let H=r(function(t,n){let{isVirtualized:r}=o(I);return r?e.createElement(y.div,{...t,ref:n}):e.createElement(y.tr,{...t,ref:n})});var U=class extends b{};U.type=`cell`;let W=r(function(t,n){let{isVirtualized:r}=o(I);return r?e.createElement(y.div,{...t,ref:n}):e.createElement(y.td,{...t,ref:n})});const G=M(C,function(t,n,r){let i=o(L),{isVirtualized:a}=o(I),{isLoading:d,onLoadMore:f,scrollOffset:m,..._}=t,v=i.collection.columns.length,y=c(null),b=s(()=>({onLoadMore:f,collection:i?.collection,sentinelRef:y,scrollOffset:m}),[f,m,i?.collection]);p(b,y);let x=g({..._,id:void 0,children:r.rendered,defaultClassName:`react-aria-TableLoadingIndicator`,values:void 0}),S={},C={},w={};return a?(C[`aria-colspan`]=v,w={display:`contents`}):C.colSpan=v,e.createElement(e.Fragment,null,e.createElement(H,{style:{height:0},inert:u(!0)},e.createElement(W,{style:{padding:0,border:0}},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:y,style:{position:`relative`,height:1,width:1}}))),d&&x.children&&e.createElement(H,{...h(l(t,{global:!0}),S),...x,role:`row`,ref:n},e.createElement(W,{role:`rowheader`,...C,style:w},x.children)))});export{G as TableLoadMoreItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{createContext as t,forwardRef as n,useCallback as r,useContext as i,useMemo as a,useRef as o,useState as s,useSyncExternalStore as c}from"react";import{filterDOMProps as l,mergeProps as u,mergeRefs as d,useLayoutEffect as f,useObjectRef as p}from"@react-aria/utils";import"@react-aria/interactions";import"react-dom";import{mergeProps as m,useFocusRing as h}from"react-aria";import{useTabListState as g}from"react-stately";const _=Symbol(`default`);function v({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function y(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return a(()=>{let e,a,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,a=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??i,style:a||s?{...s,...a}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,o,s,c,l])}function b(e,t){let n=i(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||_;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function x(e,t,n){let{ref:r,...i}=b(n,e.slot)||{},o=p(a(()=>d(t,r),[t,r])),s=u(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(s.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[s,o]}function S(t,n,r){let{render:i,...s}=n,c=o(null),l=a(()=>d(r,c),[r,c]);f(()=>{},[t,i]);let u={...s,ref:l};return i?i(u,void 0):e.createElement(t,u)}const C={},w=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=C[t];return r||(r=n(S.bind(null,t)),C[t]=r),r}});String(Math.round(Math.random()*1e10));const T=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function E(){return!1}function D(){return!0}function O(e){return()=>{}}function k(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(O,E,D):i(T)}var A=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},j=class extends A{filter(e,t,n){let[r,i]=L(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},M=class extends A{};M.type=`header`;var N=class extends A{};N.type=`loader`;var P=class extends j{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};P.type=`item`;var F=class extends j{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};F.type=`section`;var I=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=L(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function L(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var R=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},z=class e extends R{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},B=class extends R{get isConnected(){return!0}createElement(e){return new z(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof z&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof z?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const V=t(!1);function H(t){if(i(V))return e.createElement(e.Fragment,null,t.children);let n=e.createElement(V.Provider,{value:!0},t.children);return e.createElement(`template`,{"data-react-aria-hidden":!0},n)}const U=t(null);function W(t){if(i(U))return t.content;let{collection:n,document:r}=J(t.createCollection);return e.createElement(e.Fragment,null,e.createElement(H,null,e.createElement(U.Provider,{value:r},t.content)),e.createElement(G,{render:t.children,collection:n}))}function G({collection:e,render:t}){return t(e)}function K(e,t,n){let i=k(),a=o(i);a.current=i;let s=r(()=>a.current?n():t(),[t,n]);return c(e,s)}const q=typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore:K;function J(e){let[t]=s(()=>new B(e?.()||new I)),n=r(e=>t.subscribe(e),[t]),i=r(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),a=r(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:q(n,i,a),document:t}}const Y=t(null),X=t(null),Z=n(function(t,n){[t,n]=x(t,n,Y);let{children:r,orientation:i=`horizontal`}=t;return r=a(()=>typeof r==`function`?r({orientation:i,defaultChildren:null}):r,[r,i]),e.createElement(W,{content:r},r=>e.createElement(Q,{props:t,collection:r,tabsRef:n}))});function Q({props:t,tabsRef:n,collection:r}){let{orientation:i=`horizontal`}=t,o=g({...t,collection:r,children:void 0}),{focusProps:s,isFocused:c,isFocusVisible:u}=h({within:!0}),d=a(()=>({orientation:i,isFocusWithin:c,isFocusVisible:u}),[i,c,u]),f=y({...t,defaultClassName:`react-aria-Tabs`,values:d}),p=l(t,{global:!0});return e.createElement(w.div,{...m(p,f,s),ref:n,slot:t.slot||void 0,"data-focused":c||void 0,"data-orientation":i,"data-focus-visible":u||void 0,"data-disabled":o.isDisabled||void 0},e.createElement(v,{values:[[Y,t],[X,o]]},f.children))}var $=class extends A{};$.type=`item`;export{Z as Tabs};
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useCallback as r,useContext as i,useMemo as a,useRef as o,useState as s,useSyncExternalStore as c}from"react";import{filterDOMProps as l,mergeProps as u,mergeRefs as d,useLayoutEffect as f,useObjectRef as p}from"@react-aria/utils";import"@react-aria/interactions";import"react-dom";import{mergeProps as m,useFocusRing as h}from"react-aria";import{useTabListState as g}from"react-stately";const _=Symbol(`default`);function v({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function y(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return a(()=>{let e,a,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,a=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??i,style:a||s?{...s,...a}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,o,s,c,l])}function b(e,t){let n=i(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||_;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function x(e,t,n){let{ref:r,...i}=b(n,e.slot)||{},o=p(a(()=>d(t,r),[t,r])),s=u(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(s.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[s,o]}function S(t,n,r){let{render:i,...s}=n,c=o(null),l=a(()=>d(r,c),[r,c]);f(()=>{},[t,i]);let u={...s,ref:l};return i?i(u,void 0):e.createElement(t,u)}const C={},w=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=C[t];return r||(r=n(S.bind(null,t)),C[t]=r),r}});var T=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},E=class extends T{filter(e,t,n){let[r,i]=M(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},D=class extends T{};D.type=`header`;var O=class extends T{};O.type=`loader`;var k=class extends E{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};k.type=`item`;var A=class extends E{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};A.type=`section`;var j=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=M(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function M(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var N=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},P=class e extends N{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},F=class extends N{get isConnected(){return!0}createElement(e){return new P(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof P&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof P?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const I=t(!1);function L(t){if(i(I))return e.createElement(e.Fragment,null,t.children);let n=e.createElement(I.Provider,{value:!0},t.children);return e.createElement(`template`,{"data-react-aria-hidden":!0},n)}String(Math.round(Math.random()*1e10));const R=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function z(){return!1}function B(){return!0}function V(e){return()=>{}}function H(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(V,z,B):i(R)}const U=t(null);function W(t){if(i(U))return t.content;let{collection:n,document:r}=J(t.createCollection);return e.createElement(e.Fragment,null,e.createElement(L,null,e.createElement(U.Provider,{value:r},t.content)),e.createElement(G,{render:t.children,collection:n}))}function G({collection:e,render:t}){return t(e)}function K(e,t,n){let i=H(),a=o(i);a.current=i;let s=r(()=>a.current?n():t(),[t,n]);return c(e,s)}const q=typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore:K;function J(e){let[t]=s(()=>new F(e?.()||new j)),n=r(e=>t.subscribe(e),[t]),i=r(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),a=r(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:q(n,i,a),document:t}}const Y=t(null),X=t(null),Z=n(function(t,n){[t,n]=x(t,n,Y);let{children:r,orientation:i=`horizontal`}=t;return r=a(()=>typeof r==`function`?r({orientation:i,defaultChildren:null}):r,[r,i]),e.createElement(W,{content:r},r=>e.createElement(Q,{props:t,collection:r,tabsRef:n}))});function Q({props:t,tabsRef:n,collection:r}){let{orientation:i=`horizontal`}=t,o=g({...t,collection:r,children:void 0}),{focusProps:s,isFocused:c,isFocusVisible:u}=h({within:!0}),d=a(()=>({orientation:i,isFocusWithin:c,isFocusVisible:u}),[i,c,u]),f=y({...t,defaultClassName:`react-aria-Tabs`,values:d}),p=l(t,{global:!0});return e.createElement(w.div,{...m(p,f,s),ref:n,slot:t.slot||void 0,"data-focused":c||void 0,"data-orientation":i,"data-focus-visible":u||void 0,"data-disabled":o.isDisabled||void 0},e.createElement(v,{values:[[Y,t],[X,o]]},f.children))}var $=class extends T{};$.type=`item`;export{Z as Tabs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useEffect as s,useMemo as c,useRef as l}from"react";import{filterDOMProps as u,inertValue as d,mergeProps as f,mergeRefs as p,useLayoutEffect as m,useLoadMoreSentinel as h,useObjectRef as g}from"@react-aria/utils";import{FocusableContext as _}from"@react-aria/interactions";import"react-dom";import{mergeProps as v,useFocusRing as y,useHover as b,useTag as x}from"react-aria";import"react-stately";function S({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function C(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:l}=e;return c(()=>{let e,c,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,c=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:c||o?{...o,...c}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,s):void 0}},[t,n,r,i,a,o,s,l])}function w(t,n,r){let{render:i,...a}=n,o=l(null),s=c(()=>p(r,o),[r,o]);m(()=>{},[t,i]);let u={...a,ref:s};return i?i(u,void 0):e.createElement(t,u)}const T={},E=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=T[t];return n||(n=r(w.bind(null,t)),T[t]=n),n}});
|
|
1
|
+
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useEffect as s,useMemo as c,useRef as l}from"react";import{filterDOMProps as u,inertValue as d,mergeProps as f,mergeRefs as p,useLayoutEffect as m,useLoadMoreSentinel as h,useObjectRef as g}from"@react-aria/utils";import{FocusableContext as _}from"@react-aria/interactions";import"react-dom";import{mergeProps as v,useFocusRing as y,useHover as b,useTag as x}from"react-aria";import"react-stately";function S({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function C(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:l}=e;return c(()=>{let e,c,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,c=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:c||o?{...o,...c}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,s):void 0}},[t,n,r,i,a,o,s,l])}function w(t,n,r){let{render:i,...a}=n,o=l(null),s=c(()=>p(r,o),[r,o]);m(()=>{},[t,i]);let u={...a,ref:s};return i?i(u,void 0):e.createElement(t,u)}const T={},E=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=T[t];return n||(n=r(w.bind(null,t)),T[t]=n),n}});var D=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},O=class extends D{filter(e,t,n){let[r,i]=N(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},k=class extends D{};k.type=`header`;var A=class extends D{};A.type=`loader`;var j=class extends O{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};j.type=`item`;var M=class extends O{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};M.type=`section`;function N(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function P(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,s=c(()=>new WeakMap,o);return c(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=s.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),s.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,s,i,a])}String(Math.round(Math.random()*1e10)),typeof window<`u`&&window.document&&window.document.createElement,e.useId;const F=n(!1);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const I=n(null);function L(e){var t;return t=class extends D{},t.type=e,t}function R(t,n,r,i,s,c){typeof t==`string`&&(t=L(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(I);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(I.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function z(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(_);if(!o(F)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return R(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(_.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}const B={CollectionRoot({collection:e,renderDropIndicator:t}){return V(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return V(e,t,n)}};function V(t,n,r){return P({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,H(t,n,r))}})}function H(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const U=n(B),W=n({}),G=n({isSelected:!1}),K=n(null);z(A,function(t,n,r){let i=o(K),{isLoading:a,onLoadMore:s,scrollOffset:f,...p}=t,m=l(null),g=c(()=>({onLoadMore:s,collection:i?.collection,sentinelRef:m,scrollOffset:f}),[s,f,i?.collection]);h(g,m);let _=C({...p,id:void 0,children:r.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:d(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:m,style:{position:`absolute`,height:1,width:1}})),a&&_.children&&e.createElement(E.div,{...v(u(t,{global:!0}),{tabIndex:-1}),..._,role:`option`,ref:n},_.children))});const q=z(j,(t,n,r)=>{let i=o(K),a=g(n),{focusProps:c,isFocusVisible:l}=y({within:!1}),{rowProps:d,gridCellProps:p,removeButtonProps:m,...h}=x({item:r},i,a),{hoverProps:_,isHovered:v}=b({isDisabled:!h.allowsSelection,onHoverStart:r.props.onHoverStart,onHoverChange:r.props.onHoverChange,onHoverEnd:r.props.onHoverEnd}),w=C({...t,id:void 0,children:r.rendered,defaultClassName:`react-aria-Tag`,values:{...h,isFocusVisible:l,isHovered:v,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior}});s(()=>{r.textValue},[r.textValue]);let T=u(t,{global:!0});return delete T.id,delete T.onClick,e.createElement(E.div,{ref:a,...f(T,w,d,c,_),"data-selected":h.isSelected||void 0,"data-disabled":h.isDisabled||void 0,"data-hovered":v||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":l||void 0,"data-pressed":h.isPressed||void 0,"data-allows-removing":h.allowsRemoving||void 0,"data-selection-mode":i.selectionManager.selectionMode===`none`?void 0:i.selectionManager.selectionMode},e.createElement(`div`,{...p,style:{display:`contents`}},e.createElement(S,{values:[[W,{slots:{remove:m}}],[U,B],[G,{isSelected:h.isSelected}]]},w.children)))});export{q as Tag};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{createContext as t,forwardRef as n,useCallback as r,useContext as i,useMemo as a,useRef as o,useState as s,useSyncExternalStore as c}from"react";import{filterDOMProps as l,inertValue as u,mergeProps as d,mergeRefs as f,useLayoutEffect as p,useLoadMoreSentinel as m,useObjectRef as h}from"@react-aria/utils";import{FocusableContext as g}from"@react-aria/interactions";import"react-dom";import{mergeProps as _,useTagGroup as v}from"react-aria";import{UNSTABLE_useFilteredListState as y,useListState as ee}from"react-stately";t(null),t(null),t(null),t(null),t(null),t({});const b=t(null);t(null);const x=Symbol(`default`);function S({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function C(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return a(()=>{let e,a,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,a=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??i,style:a||s?{...s,...a}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,o,s,c,l])}function w(e,t){let n=i(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||x;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function T(e,t,n){let{ref:r,...i}=w(n,e.slot)||{},o=h(a(()=>f(t,r),[t,r])),s=d(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(s.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[s,o]}function te(e=!0){let[t,n]=s(e),i=o(!1),a=r(e=>{i.current=!0,n(!!e)},[]);return p(()=>{i.current||n(!1)},[]),[a,t]}function E(t,n,r){let{render:i,...s}=n,c=o(null),l=a(()=>f(r,c),[r,c]);p(()=>{},[t,i]);let u={...s,ref:l};return i?i(u,void 0):e.createElement(t,u)}const D={},O=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=D[t];return r||(r=n(E.bind(null,t)),D[t]=r),r}});String(Math.round(Math.random()*1e10));const k=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function A(){return!1}function j(){return!0}function M(e){return()=>{}}function N(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(M,A,j):i(k)}var P=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},F=class extends P{filter(e,t,n){let[r,i]=V(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},I=class extends P{};I.type=`header`;var L=class extends P{};L.type=`loader`;var R=class extends F{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};R.type=`item`;var z=class extends F{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};z.type=`section`;var B=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=V(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function V(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var H=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},U=class e extends H{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},W=class extends H{get isConnected(){return!0}createElement(e){return new U(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof U&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof U?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const G=t(!1);function K(t){if(i(G))return e.createElement(e.Fragment,null,t.children);let n=e.createElement(G.Provider,{value:!0},t.children);return e.createElement(`template`,{"data-react-aria-hidden":!0},n)}const q=t(!1),J=t(null);function Y(t){if(i(J))return t.content;let{collection:n,document:r}=re(t.createCollection);return e.createElement(e.Fragment,null,e.createElement(K,null,e.createElement(J.Provider,{value:r},t.content)),e.createElement(X,{render:t.children,collection:n}))}function X({collection:e,render:t}){return t(e)}function Z(e,t,n){let i=N(),a=o(i);a.current=i;let s=r(()=>a.current?n():t(),[t,n]);return c(e,s)}const ne=typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore:Z;function re(e){let[t]=s(()=>new W(e?.()||new B)),n=r(e=>t.subscribe(e),[t]),i=r(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),a=r(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:ne(n,i,a),document:t}}const Q=t(null);function ie(e){var t;return t=class extends P{},t.type=e,t}function ae(t,n,a,o,s,c){typeof t==`string`&&(t=ie(t));let l=r(e=>{e?.setProps(n,a,t,o,c)},[n,a,o,c,t]),u=i(Q);if(u){let r=u.ownerDocument.nodesByProps.get(n);return r||(r=u.ownerDocument.createElement(t.type),r.setProps(n,a,t,o,c),u.appendChild(r),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,r)),s?e.createElement(Q.Provider,{value:r},s):null}return e.createElement(t.type,{ref:l},s)}function oe(t,r){let a=({node:e})=>r(e.props,e.props.ref,e),o=n((n,o)=>{let s=i(g);if(!i(q)){if(r.length>=3)throw Error(r.name+` cannot be rendered outside a collection.`);return r(n,o)}return ae(t,n,o,`children`in n?n.children:null,null,t=>e.createElement(g.Provider,{value:s},e.createElement(a,{node:t})))});return o.displayName=r.name,o}const se=t({}),ce=t({}),$=t(null);oe(L,function(t,n,r){let s=i($),{isLoading:c,onLoadMore:d,scrollOffset:f,...p}=t,h=o(null),g=a(()=>({onLoadMore:d,collection:s?.collection,sentinelRef:h,scrollOffset:f}),[d,f,s?.collection]);m(g,h);let v=C({...p,id:void 0,children:r.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:u(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:h,style:{position:`absolute`,height:1,width:1}})),c&&v.children&&e.createElement(O.div,{..._(l(t,{global:!0}),{tabIndex:-1}),...v,role:`option`,ref:n},v.children))});const le=t(null),ue=t(null),de=n(function(t,n){return[t,n]=T(t,n,le),e.createElement($.Provider,{value:null},e.createElement(Y,{content:t.children},r=>e.createElement(fe,{props:t,forwardedRef:n,collection:r})))});function fe({props:t,forwardedRef:n,collection:r}){let i=o(null),{id:a,...s}=t;[s,i]=T(s,i,b);let{filter:c,shouldUseVirtualFocus:u,...d}=s,[f,p]=te(!t[`aria-label`]&&!t[`aria-labelledby`]),m=ee({...d,children:void 0,collection:r}),h=y(m,c),g=l(s,{global:!0}),_=Object.fromEntries(Object.entries(g).map(([e,t])=>[e,e===`id`?t:void 0])),{gridProps:x,labelProps:C,descriptionProps:w,errorMessageProps:E}=v({...d,..._,label:p},h,i);return e.createElement(O.div,{render:t.render,...g,id:a,ref:n,slot:t.slot||void 0,className:t.className??`react-aria-TagGroup`,style:t.style},e.createElement(S,{values:[[se,{...C,elementType:`span`,ref:f}],[ue,{...x,ref:i}],[$,h],[ce,{slots:{description:w,errorMessage:E}}]]},t.children))}export{de as TagGroup};
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useCallback as r,useContext as i,useMemo as a,useRef as o,useState as s,useSyncExternalStore as c}from"react";import{filterDOMProps as l,inertValue as u,mergeProps as d,mergeRefs as f,useLayoutEffect as p,useLoadMoreSentinel as m,useObjectRef as h}from"@react-aria/utils";import{FocusableContext as g}from"@react-aria/interactions";import"react-dom";import{mergeProps as _,useTagGroup as v}from"react-aria";import{UNSTABLE_useFilteredListState as y,useListState as ee}from"react-stately";t(null),t(null),t(null),t(null),t(null),t({});const b=t(null);t(null);const x=Symbol(`default`);function S({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function C(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return a(()=>{let e,a,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,a=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??i,style:a||s?{...s,...a}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,o,s,c,l])}function w(e,t){let n=i(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||x;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function T(e,t,n){let{ref:r,...i}=w(n,e.slot)||{},o=h(a(()=>f(t,r),[t,r])),s=d(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(s.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[s,o]}function E(e=!0){let[t,n]=s(e),i=o(!1),a=r(e=>{i.current=!0,n(!!e)},[]);return p(()=>{i.current||n(!1)},[]),[a,t]}function D(t,n,r){let{render:i,...s}=n,c=o(null),l=a(()=>f(r,c),[r,c]);p(()=>{},[t,i]);let u={...s,ref:l};return i?i(u,void 0):e.createElement(t,u)}const O={},k=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=O[t];return r||(r=n(D.bind(null,t)),O[t]=r),r}});var A=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},j=class extends A{filter(e,t,n){let[r,i]=I(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},M=class extends A{};M.type=`header`;var N=class extends A{};N.type=`loader`;var P=class extends j{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};P.type=`item`;var te=class extends j{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};te.type=`section`;var F=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=I(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function I(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var L=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},R=class e extends L{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},z=class extends L{get isConnected(){return!0}createElement(e){return new R(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof R&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof R?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const B=t(!1);function V(t){if(i(B))return e.createElement(e.Fragment,null,t.children);let n=e.createElement(B.Provider,{value:!0},t.children);return e.createElement(`template`,{"data-react-aria-hidden":!0},n)}String(Math.round(Math.random()*1e10));const H=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function U(){return!1}function W(){return!0}function G(e){return()=>{}}function K(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(G,U,W):i(H)}const q=t(!1),J=t(null);function Y(t){if(i(J))return t.content;let{collection:n,document:r}=re(t.createCollection);return e.createElement(e.Fragment,null,e.createElement(V,null,e.createElement(J.Provider,{value:r},t.content)),e.createElement(X,{render:t.children,collection:n}))}function X({collection:e,render:t}){return t(e)}function Z(e,t,n){let i=K(),a=o(i);a.current=i;let s=r(()=>a.current?n():t(),[t,n]);return c(e,s)}const ne=typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore:Z;function re(e){let[t]=s(()=>new z(e?.()||new F)),n=r(e=>t.subscribe(e),[t]),i=r(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),a=r(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:ne(n,i,a),document:t}}const Q=t(null);function ie(e){var t;return t=class extends A{},t.type=e,t}function ae(t,n,a,o,s,c){typeof t==`string`&&(t=ie(t));let l=r(e=>{e?.setProps(n,a,t,o,c)},[n,a,o,c,t]),u=i(Q);if(u){let r=u.ownerDocument.nodesByProps.get(n);return r||(r=u.ownerDocument.createElement(t.type),r.setProps(n,a,t,o,c),u.appendChild(r),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,r)),s?e.createElement(Q.Provider,{value:r},s):null}return e.createElement(t.type,{ref:l},s)}function oe(t,r){let a=({node:e})=>r(e.props,e.props.ref,e),o=n((n,o)=>{let s=i(g);if(!i(q)){if(r.length>=3)throw Error(r.name+` cannot be rendered outside a collection.`);return r(n,o)}return ae(t,n,o,`children`in n?n.children:null,null,t=>e.createElement(g.Provider,{value:s},e.createElement(a,{node:t})))});return o.displayName=r.name,o}const se=t({}),ce=t({}),$=t(null);oe(N,function(t,n,r){let s=i($),{isLoading:c,onLoadMore:d,scrollOffset:f,...p}=t,h=o(null),g=a(()=>({onLoadMore:d,collection:s?.collection,sentinelRef:h,scrollOffset:f}),[d,f,s?.collection]);m(g,h);let v=C({...p,id:void 0,children:r.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:u(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:h,style:{position:`absolute`,height:1,width:1}})),c&&v.children&&e.createElement(k.div,{..._(l(t,{global:!0}),{tabIndex:-1}),...v,role:`option`,ref:n},v.children))});const le=t(null),ue=t(null),de=n(function(t,n){return[t,n]=T(t,n,le),e.createElement($.Provider,{value:null},e.createElement(Y,{content:t.children},r=>e.createElement(fe,{props:t,forwardedRef:n,collection:r})))});function fe({props:t,forwardedRef:n,collection:r}){let i=o(null),{id:a,...s}=t;[s,i]=T(s,i,b);let{filter:c,shouldUseVirtualFocus:u,...d}=s,[f,p]=E(!t[`aria-label`]&&!t[`aria-labelledby`]),m=ee({...d,children:void 0,collection:r}),h=y(m,c),g=l(s,{global:!0}),_=Object.fromEntries(Object.entries(g).map(([e,t])=>[e,e===`id`?t:void 0])),{gridProps:x,labelProps:C,descriptionProps:w,errorMessageProps:D}=v({...d,..._,label:p},h,i);return e.createElement(k.div,{render:t.render,...g,id:a,ref:n,slot:t.slot||void 0,className:t.className??`react-aria-TagGroup`,style:t.style},e.createElement(S,{values:[[se,{...C,elementType:`span`,ref:f}],[ue,{...x,ref:i}],[$,h],[ce,{slots:{description:w,errorMessage:D}}]]},t.children))}export{de as TagGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeProps as d,mergeRefs as f,useLayoutEffect as p,useLoadMoreSentinel as m,useObjectRef as h}from"@react-aria/utils";import{FocusableContext as g}from"@react-aria/interactions";import{createPortal as _}from"react-dom";import{mergeProps as v,useFocusRing as y}from"react-aria";import"react-stately";const b=Symbol(`default`);function x(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function S(e,t){let n=o(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||b;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function C(e,t,n){let{ref:r,...i}=S(n,e.slot)||{},a=h(s(()=>f(t,r),[t,r])),o=d(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(o.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[o,a]}function w(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>f(r,o),[r,o]);p(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const T={},E=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=T[t];return n||(n=r(w.bind(null,t)),T[t]=n),n}});
|
|
1
|
+
import e,{cloneElement as t,createContext as n,forwardRef as r,isValidElement as i,useCallback as a,useContext as o,useMemo as s,useRef as c}from"react";import{filterDOMProps as l,inertValue as u,mergeProps as d,mergeRefs as f,useLayoutEffect as p,useLoadMoreSentinel as m,useObjectRef as h}from"@react-aria/utils";import{FocusableContext as g}from"@react-aria/interactions";import{createPortal as _}from"react-dom";import{mergeProps as v,useFocusRing as y}from"react-aria";import"react-stately";const b=Symbol(`default`);function x(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:c,render:l}=e;return s(()=>{let e,s,u;return e=typeof t==`function`?t({...c,defaultClassName:i}):t,s=typeof n==`function`?n({...c,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:a}):r??a,{className:e??i,style:s||o?{...o,...s}:void 0,children:u??a,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,i,a,o,c,l])}function S(e,t){let n=o(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||b;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function C(e,t,n){let{ref:r,...i}=S(n,e.slot)||{},a=h(s(()=>f(t,r),[t,r])),o=d(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(o.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[o,a]}function w(t,n,r){let{render:i,...a}=n,o=c(null),l=s(()=>f(r,o),[r,o]);p(()=>{},[t,i]);let u={...a,ref:l};return i?i(u,void 0):e.createElement(t,u)}const T={},E=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=T[t];return n||(n=r(w.bind(null,t)),T[t]=n),n}});var D=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},O=class extends D{filter(e,t,n){let[r,i]=M(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},k=class extends D{};k.type=`header`;var A=class extends D{};A.type=`loader`;var j=class extends O{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};j.type=`item`;var ee=class extends O{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};ee.type=`section`;function M(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function N(e){let{children:n,items:r,idScope:i,addIdAndValue:a,dependencies:o=[]}=e,c=s(()=>new WeakMap,o);return s(()=>{if(r&&typeof n==`function`){let e=[];for(let o of r){let r=c.get(o);if(!r){r=n(o);let e=r.props.id??o.key??o.id;if(e==null)throw Error(`Could not determine key for item`);i!=null&&(e=i+`:`+e),r=t(r,a?{key:e,id:e,value:o}:{key:e}),c.set(o,r)}e.push(r)}return e}if(typeof n!=`function`)return n},[n,r,c,i,a])}String(Math.round(Math.random()*1e10));const P=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function F(){return!1}function I(){return!0}function L(e){return()=>{}}function R(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(L,F,I):o(P)}const z=n(!1),B=n(null);typeof e.useSyncExternalStore==`function`&&e.useSyncExternalStore;const V=n(null);function H(e){var t;return t=class extends D{},t.type=e,t}function U(t,n,r,i,s,c){typeof t==`string`&&(t=H(t));let l=a(e=>{e?.setProps(n,r,t,i,c)},[n,r,i,c,t]),u=o(V);if(u){let a=u.ownerDocument.nodesByProps.get(n);return a||(a=u.ownerDocument.createElement(t.type),a.setProps(n,r,t,i,c),u.appendChild(a),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(n,a)),s?e.createElement(V.Provider,{value:a},s):null}return e.createElement(t.type,{ref:l},s)}function W(t,n){let i=({node:e})=>n(e.props,e.props.ref,e),a=r((r,a)=>{let s=o(g);if(!o(z)){if(n.length>=3)throw Error(n.name+` cannot be rendered outside a collection.`);return n(r,a)}return U(t,r,a,`children`in r?r.children:null,null,t=>e.createElement(g.Provider,{value:s},e.createElement(i,{node:t})))});return a.displayName=n.name,a}function G(e){return N({...e,addIdAndValue:!0})}const K=n(null);function q(t){let n=o(K),r=(n?.dependencies||[]).concat(t.dependencies),i=t.idScope??n?.idScope,a=G({...t,idScope:i,dependencies:r});return o(B)&&(a=e.createElement(J,null,a)),n=s(()=>({dependencies:r,idScope:i}),[i,...r]),e.createElement(K.Provider,{value:n},a)}function J({children:t}){let n=o(B),r=s(()=>e.createElement(B.Provider,{value:null},e.createElement(z.Provider,{value:!0},t)),[t]);return R()?e.createElement(V.Provider,{value:n},r):_(r,n)}const Y={CollectionRoot({collection:e,renderDropIndicator:t}){return X(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return X(e,t,n)}};function X(t,n,r){return N({items:n?t.getChildren(n.key):t,dependencies:[r],children(n){let i=n.render(n);return!r||n.type!==`item`?i:e.createElement(e.Fragment,null,r({type:`item`,key:n.key,dropPosition:`before`}),i,Z(t,n,r))}})}function Z(e,n,r){let a=n.key,o=e.getKeyAfter(a),s=o==null?null:e.getItem(o);for(;s!=null&&s.type!==`item`;)o=e.getKeyAfter(s.key),s=o==null?null:e.getItem(o);let c=n.nextKey==null?null:e.getItem(n.nextKey);for(;c!=null&&c.type!==`item`;)c=c.nextKey==null?null:e.getItem(c.nextKey);let l=[];if(c==null){let a=n;for(;a?.type===`item`&&(!s||a.parentKey!==s.parentKey&&s.level<a.level);){let n=r({type:`item`,key:a.key,dropPosition:`after`});i(n)&&l.push(t(n,{key:`${a.key}-after`})),a=a.parentKey==null?null:e.getItem(a.parentKey)}}return l}const Q=n(Y);function te(e){return s(()=>e==null?null:new Set([e]),[e])}const ne=n(null);function re(t){let n=c({});return e.createElement(ne.Provider,{value:n},t.children)}const $=n(null);W(A,function(t,n,r){let i=o($),{isLoading:a,onLoadMore:d,scrollOffset:f,...p}=t,h=c(null),g=s(()=>({onLoadMore:d,collection:i?.collection,sentinelRef:h,scrollOffset:f}),[d,f,i?.collection]);m(g,h);let _=x({...p,id:void 0,children:r.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:void 0});return e.createElement(e.Fragment,null,e.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:u(!0)},e.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:h,style:{position:`absolute`,height:1,width:1}})),a&&_.children&&e.createElement(E.div,{...v(l(t,{global:!0}),{tabIndex:-1}),..._,role:`option`,ref:n},_.children))});const ie=n(null),ae=r(function(t,n){return o($)?e.createElement(oe,{props:t,forwardedRef:n}):e.createElement(q,t)});function oe({props:t,forwardedRef:n}){let r=o($),{CollectionRoot:i}=o(Q),[a,s]=C({},n,ie),{focusProps:c,isFocused:u,isFocusVisible:f}=y(),p={isEmpty:r.collection.size===0,isFocused:u,isFocusVisible:f,state:r},m=x({...t,children:void 0,defaultClassName:`react-aria-TagList`,values:p}),h=te(r.selectionManager.focusedKey),g=l(t,{global:!0});return e.createElement(E.div,{...d(g,m,a,c),ref:s,"data-empty":r.collection.size===0||void 0,"data-focused":u||void 0,"data-focus-visible":f||void 0},e.createElement(re,null,r.collection.size===0&&t.renderEmptyState?t.renderEmptyState(p):e.createElement(i,{collection:r.collection,persistedKeys:h})))}export{ae as TagList};
|
package/dist/components/tag.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TagProps, t as Tag } from "../Tag-
|
|
1
|
+
import { n as TagProps, t as Tag } from "../Tag-BfmQ9BIV.js";
|
|
2
2
|
export { Tag, TagProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TextArea, r as TextAreaProps, t as ControlledTextAreaProps } from "../TextArea-
|
|
1
|
+
import { n as TextArea, r as TextAreaProps, t as ControlledTextAreaProps } from "../TextArea-CbZ9kNwo.js";
|
|
2
2
|
export { ControlledTextAreaProps, TextArea, TextAreaProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TextButtonProps, t as TextButton } from "../TextButton-
|
|
1
|
+
import { n as TextButtonProps, t as TextButton } from "../TextButton-BZxhaNnh.js";
|
|
2
2
|
export { TextButton, TextButtonProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as TextInputProps, n as TextInput, r as TextInputComponent, t as ControlledTextInputProps } from "../TextInput-
|
|
1
|
+
import { i as TextInputProps, n as TextInput, r as TextInputComponent, t as ControlledTextInputProps } from "../TextInput-ChVYCxjg.js";
|
|
2
2
|
export { ControlledTextInputProps, TextInput, TextInputComponent, TextInputProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TimePicker, r as TimePickerProps, t as ControlledTimePickerProps } from "../TimePicker-
|
|
1
|
+
import { n as TimePicker, r as TimePickerProps, t as ControlledTimePickerProps } from "../TimePicker-CMhURRER.js";
|
|
2
2
|
export { type ControlledTimePickerProps, TimePicker, type TimePickerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TimePicker } from "../TimePicker-
|
|
1
|
+
import { t as TimePicker } from "../TimePicker-Bf82rbFG.js";
|
|
2
2
|
export { TimePicker };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{createContext as t,forwardRef as n,useContext as r,useMemo as i,useRef as a}from"react";import{filterDOMProps as o,mergeRefs as s,useLayoutEffect as c,useObjectRef as l}from"@react-aria/utils";import"react-dom";import{mergeProps as u,useFocusRing as d,useToast as f}from"react-aria";import"react-stately";const p=Symbol(`default`);function m({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function h(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return i(()=>{let e,i,u;return e=typeof t==`function`?t({...c,defaultClassName:a}):t,i=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??a,style:i||s?{...s,...i}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,a,o,s,c,l])}function g(t,n,r){let{render:o,...l}=n,u=a(null),d=i(()=>s(r,u),[r,u]);c(()=>{},[t,o]);let f={...l,ref:d};return o?o(f,void 0):e.createElement(t,f)}const _={},v=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=_[t];return r||(r=n(g.bind(null,t)),_[t]=r),r}}),y=t({}),b=t({}),x=t(null),S=n(function(t,n){let i=r(x),a=l(n),{toastProps:s,contentProps:c,titleProps:g,descriptionProps:_,closeButtonProps:S}=f(t,i,a),{focusProps:w,isFocused:T,isFocusVisible:E}=d(),D=h({...t,defaultClassName:`react-aria-Toast`,values:{toast:t.toast,isFocused:T,isFocusVisible:E}}),O=o(t,{global:!0});return e.createElement(v.div,{...u(O,D,s,w),ref:a,"data-focused":T||void 0,"data-focus-visible":E||void 0},e.createElement(m,{values:[[C,c],[b,{slots:{[p]:{},title:g,description:_}}],[y,{slots:{[p]:{},close:S}}]]},D.children))}),C=t({});export{S as UNSTABLE_Toast};
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useContext as r,useMemo as i,useRef as a}from"react";import{filterDOMProps as o,mergeRefs as s,useLayoutEffect as c,useObjectRef as l}from"@react-aria/utils";import"@react-aria/overlays";import"react-dom";import{mergeProps as u,useFocusRing as d,useToast as f}from"react-aria";import"react-stately";const p=Symbol(`default`);function m({values:t,children:n}){for(let[r,i]of t)n=e.createElement(r.Provider,{value:i},n);return n}function h(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return i(()=>{let e,i,u;return e=typeof t==`function`?t({...c,defaultClassName:a}):t,i=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??a,style:i||s?{...s,...i}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,a,o,s,c,l])}function g(t,n,r){let{render:o,...l}=n,u=a(null),d=i(()=>s(r,u),[r,u]);c(()=>{},[t,o]);let f={...l,ref:d};return o?o(f,void 0):e.createElement(t,f)}const _={},v=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=_[t];return r||(r=n(g.bind(null,t)),_[t]=r),r}}),y=t({}),b=t({}),x=t(null),S=n(function(t,n){let i=r(x),a=l(n),{toastProps:s,contentProps:c,titleProps:g,descriptionProps:_,closeButtonProps:S}=f(t,i,a),{focusProps:w,isFocused:T,isFocusVisible:E}=d(),D=h({...t,defaultClassName:`react-aria-Toast`,values:{toast:t.toast,isFocused:T,isFocusVisible:E}}),O=o(t,{global:!0});return e.createElement(v.div,{...u(O,D,s,w),ref:a,"data-focused":T||void 0,"data-focus-visible":E||void 0},e.createElement(m,{values:[[C,c],[b,{slots:{[p]:{},title:g,description:_}}],[y,{slots:{[p]:{},close:S}}]]},D.children))}),C=t({});export{S as UNSTABLE_Toast};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{createContext as t,forwardRef as n,useContext as r,useMemo as i,useRef as a}from"react";import{mergeProps as o,mergeRefs as s,useLayoutEffect as c,useObjectRef as l}from"@react-aria/utils";import"react-dom";import"react-aria";import"react-stately";const u=Symbol(`default`);function d(e,t){let n=r(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||u;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function f(e,t,n){let{ref:r,...a}=d(n,e.slot)||{},c=l(i(()=>s(t,r),[t,r])),u=o(a,e);return`style`in a&&a.style&&`style`in e&&e.style&&(u.style=typeof a.style==`function`||typeof e.style==`function`?t=>{let n=typeof a.style==`function`?a.style(t):a.style,r={...t.defaultStyle,...n},i=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...i}}:{...a.style,...e.style}),[u,c]}function p(t,n,r){let{render:o,...l}=n,u=a(null),d=i(()=>s(r,u),[r,u]);c(()=>{},[t,o]);let f={...l,ref:d};return o?o(f,void 0):e.createElement(t,f)}const m={},h=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=m[t];return r||(r=n(p.bind(null,t)),m[t]=r),r}}),g=t({}),_=n(function(t,n){return[t,n]=f(t,n,g),e.createElement(h.div,{render:t.render,className:`react-aria-ToastContent`,...t,ref:n},t.children)});export{_ as UNSTABLE_ToastContent};
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useContext as r,useMemo as i,useRef as a}from"react";import{mergeProps as o,mergeRefs as s,useLayoutEffect as c,useObjectRef as l}from"@react-aria/utils";import"@react-aria/overlays";import"react-dom";import"react-aria";import"react-stately";const u=Symbol(`default`);function d(e,t){let n=r(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||u;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function f(e,t,n){let{ref:r,...a}=d(n,e.slot)||{},c=l(i(()=>s(t,r),[t,r])),u=o(a,e);return`style`in a&&a.style&&`style`in e&&e.style&&(u.style=typeof a.style==`function`||typeof e.style==`function`?t=>{let n=typeof a.style==`function`?a.style(t):a.style,r={...t.defaultStyle,...n},i=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...i}}:{...a.style,...e.style}),[u,c]}function p(t,n,r){let{render:o,...l}=n,u=a(null),d=i(()=>s(r,u),[r,u]);c(()=>{},[t,o]);let f={...l,ref:d};return o?o(f,void 0):e.createElement(t,f)}const m={},h=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=m[t];return r||(r=n(p.bind(null,t)),m[t]=r),r}}),g=t({}),_=n(function(t,n){return[t,n]=f(t,n,g),e.createElement(h.div,{render:t.render,className:`react-aria-ToastContent`,...t,ref:n},t.children)});export{_ as UNSTABLE_ToastContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{createContext as t,forwardRef as n,useContext as r,useMemo as i,useRef as a}from"react";import{mergeRefs as o,useLayoutEffect as s}from"@react-aria/utils";import"react-dom";import{useHover as c}from"react-aria";import"react-stately";function l(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return i(()=>{let e,i,u;return e=typeof t==`function`?t({...c,defaultClassName:a}):t,i=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??a,style:i||s?{...s,...i}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,a,o,s,c,l])}function u(t,n,r){let{render:c,...l}=n,u=a(null),d=i(()=>o(r,u),[r,u]);s(()=>{},[t,c]);let f={...l,ref:d};return c?c(f,void 0):e.createElement(t,f)}const d={},f=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=d[t];return r||(r=n(u.bind(null,t)),d[t]=r),r}}),p=t(null),m=n(function(t,n){let i=r(p),{hoverProps:a,isHovered:o}=c({}),s=l({...t,children:void 0,defaultClassName:`react-aria-ToastList`,values:{visibleToasts:i.visibleToasts,isFocused:!1,isFocusVisible:!1,isHovered:o}});return e.createElement(f.ol,{...a,...s,ref:n},i.visibleToasts.map(n=>e.createElement(`li`,{key:n.key,style:{display:`contents`}},t.children({toast:n}))))});export{m as UNSTABLE_ToastList};
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useContext as r,useMemo as i,useRef as a}from"react";import{mergeRefs as o,useLayoutEffect as s}from"@react-aria/utils";import"@react-aria/overlays";import"react-dom";import{useHover as c}from"react-aria";import"react-stately";function l(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return i(()=>{let e,i,u;return e=typeof t==`function`?t({...c,defaultClassName:a}):t,i=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??a,style:i||s?{...s,...i}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,a,o,s,c,l])}function u(t,n,r){let{render:c,...l}=n,u=a(null),d=i(()=>o(r,u),[r,u]);s(()=>{},[t,c]);let f={...l,ref:d};return c?c(f,void 0):e.createElement(t,f)}const d={},f=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=d[t];return r||(r=n(u.bind(null,t)),d[t]=r),r}}),p=t(null),m=n(function(t,n){let i=r(p),{hoverProps:a,isHovered:o}=c({}),s=l({...t,children:void 0,defaultClassName:`react-aria-ToastList`,values:{visibleToasts:i.visibleToasts,isFocused:!1,isFocusVisible:!1,isHovered:o}});return e.createElement(f.ol,{...a,...s,ref:n},i.visibleToasts.map(n=>e.createElement(`li`,{key:n.key,style:{display:`contents`}},t.children({toast:n}))))});export{m as UNSTABLE_ToastList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{createContext as t,forwardRef as n,useContext as r,useMemo as i,useRef as a}from"react";import{filterDOMProps as o,mergeRefs as s,useLayoutEffect as c,useObjectRef as l}from"@react-aria/utils";import{
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useContext as r,useMemo as i,useRef as a}from"react";import{filterDOMProps as o,mergeRefs as s,useLayoutEffect as c,useObjectRef as l}from"@react-aria/utils";import{useUNSAFE_PortalContext as u}from"@react-aria/overlays";import{createPortal as d}from"react-dom";import{mergeProps as f,useFocusRing as p,useHover as m,useLocale as h,useToastRegion as g}from"react-aria";import{useToastQueue as _}from"react-stately";function v(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return i(()=>{let e,i,u;return e=typeof t==`function`?t({...c,defaultClassName:a}):t,i=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??a,style:i||s?{...s,...i}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,a,o,s,c,l])}function y(t,n,r){let{render:o,...l}=n,u=a(null),d=i(()=>s(r,u),[r,u]);c(()=>{},[t,o]);let f={...l,ref:d};return o?o(f,void 0):e.createElement(t,f)}const b={},x=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=b[t];return r||(r=n(y.bind(null,t)),b[t]=r),r}});String(Math.round(Math.random()*1e10));const S=e.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement,e.useId;function C(){return!1}function w(){return!0}function T(e){return()=>{}}function E(){return typeof e.useSyncExternalStore==`function`?e.useSyncExternalStore(T,C,w):r(S)}const D=t(null),O=n(function(t,n){let r=E(),i=_(t.queue),a=l(n),{regionProps:s}=g(t,i,a),{focusProps:c,isFocused:y,isFocusVisible:b}=p(),{hoverProps:S,isHovered:C}=m({}),w=v({...t,children:void 0,defaultClassName:`react-aria-ToastRegion`,values:{visibleToasts:i.visibleToasts,isHovered:C,isFocused:y,isFocusVisible:b}}),{direction:T}=h(),O,{getContainer:A}=u();r||(O=document.body,A&&(O=A()));let j=o(t,{global:!0}),M=e.createElement(D.Provider,{value:i},e.createElement(x.div,{...f(j,w,s,c,S),dir:T,ref:a,"data-hovered":C||void 0,"data-focused":y||void 0,"data-focus-visible":b||void 0},typeof t.children==`function`?e.createElement(k,{...t,render:void 0,className:void 0,style:{display:`contents`}},t.children):t.children));return i.visibleToasts.length>0&&O?d(M,O):null}),k=n(function(t,n){let i=r(D),{hoverProps:a,isHovered:o}=m({}),s=v({...t,children:void 0,defaultClassName:`react-aria-ToastList`,values:{visibleToasts:i.visibleToasts,isFocused:!1,isFocusVisible:!1,isHovered:o}});return e.createElement(x.ol,{...a,...s,ref:n},i.visibleToasts.map(n=>e.createElement(`li`,{key:n.key,style:{display:`contents`}},t.children({toast:n}))))});export{O as UNSTABLE_ToastRegion};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ToggleButtonProps, t as ToggleButton } from "../ToggleButton-
|
|
1
|
+
import { n as ToggleButtonProps, t as ToggleButton } from "../ToggleButton-DRTGhnjR.js";
|
|
2
2
|
export { ToggleButton, ToggleButtonProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Toggle, r as ToggleProps, t as ControlledToggleProps } from "../Toggle-
|
|
1
|
+
import { n as Toggle, r as ToggleProps, t as ControlledToggleProps } from "../Toggle-pQ0-MbwL.js";
|
|
2
2
|
export { ControlledToggleProps, Toggle, ToggleProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Toggle } from "../Toggle-
|
|
1
|
+
import { t as Toggle } from "../Toggle-Cf8jQ991.js";
|
|
2
2
|
export { Toggle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{createContext as t,forwardRef as n,useContext as r,useMemo as i,useRef as a,useState as o}from"react";import{filterDOMProps as s,mergeProps as c,mergeRefs as l,nodeContains as u,useLayoutEffect as d,useObjectRef as f}from"@react-aria/utils";import{
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useContext as r,useMemo as i,useRef as a,useState as o}from"react";import{filterDOMProps as s,mergeProps as c,mergeRefs as l,nodeContains as u,useLayoutEffect as d,useObjectRef as f}from"@react-aria/utils";import{createFocusManager as p}from"@react-aria/focus";import{useLocale as m}from"@react-aria/i18n";const h=Symbol(`default`);function g(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:s,values:c,render:l}=e;return i(()=>{let e,i,u;return e=typeof t==`function`?t({...c,defaultClassName:a}):t,i=typeof n==`function`?n({...c,defaultStyle:s||{}}):n,u=typeof r==`function`?r({...c,defaultChildren:o}):r??o,{className:e??a,style:i||s?{...s,...i}:void 0,children:u??o,"data-rac":``,render:l?e=>l(e,c):void 0}},[t,n,r,a,o,s,c,l])}function _(e,t){let n=r(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||h;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function v(e,t,n){let{ref:r,...a}=_(n,e.slot)||{},o=f(i(()=>l(t,r),[t,r])),s=c(a,e);return`style`in a&&a.style&&`style`in e&&e.style&&(s.style=typeof a.style==`function`||typeof e.style==`function`?t=>{let n=typeof a.style==`function`?a.style(t):a.style,r={...t.defaultStyle,...n},i=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...i}}:{...a.style,...e.style}),[s,o]}function y(t,n,r){let{render:o,...s}=n,c=a(null),u=i(()=>l(r,c),[r,c]);d(()=>{},[t,o]);let f={...s,ref:u};return o?o(f,void 0):e.createElement(t,f)}const b={},x=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let r=b[t];return r||(r=n(y.bind(null,t)),b[t]=r),r}});function S(e,t){let{"aria-label":n,"aria-labelledby":r,orientation:i=`horizontal`}=e,[c,l]=o(!1);d(()=>{l(!!(t.current&&t.current.parentElement?.closest(`[role="toolbar"]`)))});let{direction:f}=m(),h=f===`rtl`&&i===`horizontal`,g=p(t),_=e=>{if(u(e.currentTarget,e.target)){if(i===`horizontal`&&e.key===`ArrowRight`||i===`vertical`&&e.key===`ArrowDown`)h?g.focusPrevious():g.focusNext();else if(i===`horizontal`&&e.key===`ArrowLeft`||i===`vertical`&&e.key===`ArrowUp`)h?g.focusNext():g.focusPrevious();else if(e.key===`Tab`){e.stopPropagation(),v.current=document.activeElement,e.shiftKey?g.focusFirst():g.focusLast();return}else return;e.stopPropagation(),e.preventDefault()}},v=a(null),y=e=>{!u(e.currentTarget,e.relatedTarget)&&!v.current&&(v.current=e.target)},b=e=>{if(v.current&&!u(e.currentTarget,e.relatedTarget)&&u(t.current,e.target)){var n;(n=v.current)==null||n.focus(),v.current=null}};return{toolbarProps:{...s(e,{labelable:!0}),role:c?`group`:`toolbar`,"aria-orientation":i,"aria-label":n,"aria-labelledby":n==null?r:void 0,onKeyDownCapture:c?void 0:_,onFocusCapture:c?void 0:b,onBlurCapture:c?void 0:y}}}const C=t({}),w=n(function(t,n){[t,n]=v(t,n,C);let{toolbarProps:r}=S(t,n),i=g({...t,values:{orientation:t.orientation||`horizontal`},defaultClassName:`react-aria-Toolbar`}),a=s(t,{global:!0});return delete a.id,e.createElement(x.div,{...c(a,i,r),ref:n,slot:t.slot||void 0,"data-orientation":t.orientation||`horizontal`},i.children)});export{w as Toolbar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TooltipProps, t as Tooltip } from "../Tooltip-
|
|
1
|
+
import { n as TooltipProps, t as Tooltip } from "../Tooltip-BxixKjWm.js";
|
|
2
2
|
export { Tooltip, TooltipProps };
|