@povio/ui 6.0.0-rc.1 → 6.0.0-rc.10
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/MIGRATION.md +28 -0
- package/README.md +10 -37
- package/dist/{Accordion-DQRdeDs1.js → Accordion-ORBin0EZ.js} +12 -118
- package/dist/{Alert-Cee_nKWj.d.ts → Alert-D4X7OWiv.d.ts} +3 -3
- package/dist/{AlertDialog-uNDUIyng.d.ts → AlertDialog-DklLDjmw.d.ts} +3 -3
- package/dist/{Autocomplete-D_4gEL7D.d.ts → Autocomplete-BgFz3kuR.d.ts} +1 -1
- package/dist/{Autocomplete-CWU9Ev3J.js → Autocomplete-CsJAU233.js} +15 -12
- package/dist/{Autocomplete.bound-D0pgmsHB.js → Autocomplete.bound-CGC8m4dK.js} +2 -2
- package/dist/{Autocomplete.bound-CqhZtdd8.d.ts → Autocomplete.bound-CpHZZ3C9.d.ts} +1 -1
- package/dist/{Badge-C4HI9XX4.d.ts → Badge-Db1ndK67.d.ts} +2 -2
- package/dist/{BadgeButton-h3MeQYcp.d.ts → BadgeButton-BPhWDAnc.d.ts} +2 -2
- package/dist/{BottomSheet-BQXSdxoX.d.ts → BottomSheet-BZmDJBR-.d.ts} +1 -1
- package/dist/{BottomSheet-z5brMtDt.js → BottomSheet-CGipksM_.js} +10 -10
- package/dist/{BottomSheet.lazy-BzvLg8Ea.d.ts → BottomSheet.lazy-CuJMUeJP.d.ts} +1 -1
- package/dist/{Breadcrumbs-B9O0_VSN.d.ts → Breadcrumbs-CcB0oOF8.d.ts} +1 -1
- package/dist/{Breadcrumbs-AbUBqBTq.js → Breadcrumbs-a1-q_he0.js} +15 -12
- package/dist/{Button-f7FPTaiN.d.ts → Button-0SswSdDg.d.ts} +1 -1
- package/dist/{Button-DER_6cxv.js → Button-BaODzvZd.js} +1 -1
- package/dist/{ButtonBase-CYTFS-xK.d.ts → ButtonBase-CZuEy3Pk.d.ts} +3 -3
- package/dist/{ButtonBase-CeFSNcVs.js → ButtonBase-s-VV7oCa.js} +8 -7
- package/dist/{ButtonContent-c7lJayVQ.js → ButtonContent-Dztbuz3q.js} +5 -14
- package/dist/{Calendar-DRQ536wk.js → Calendar-Cr6B7SDx.js} +25 -181
- package/dist/Calendar.lazy-MJisXRJK.js +131 -0
- package/dist/{CheckContent-D7sZPmzx.js → CheckContent-BKLnTPZr.js} +2 -2
- package/dist/{Checkbox-BI3DQPLa.js → Checkbox-Bjsbx-wK.js} +6 -6
- package/dist/{Checkbox-CCvC7OVT.d.ts → Checkbox-w2j5hLOQ.d.ts} +1 -1
- package/dist/{Checkbox.bound-CMZnF2_d.js → Checkbox.bound-D2nBglJz.js} +2 -2
- package/dist/{Checkbox.bound-DBt33Inx.d.ts → Checkbox.bound-DD_RCjVm.d.ts} +1 -1
- package/dist/CheckboxCheckmark-DWsYVZuu.js +25 -0
- package/dist/{CheckboxGroup-DQw4hsFa.js → CheckboxGroup-B3O3IUiu.js} +10 -8
- package/dist/{CheckboxGroup-MJ6crCZk.d.ts → CheckboxGroup-BYI15Y09.d.ts} +3 -3
- package/dist/{CheckboxGroup.bound-CTCdezUN.js → CheckboxGroup.bound-DY0HKGSh.js} +2 -2
- package/dist/{CheckboxGroup.bound-j2Sc8QtU.d.ts → CheckboxGroup.bound-QiJ-P0KR.d.ts} +1 -1
- package/dist/{ComboBox-DFlz6HJ8.js → ComboBox-ChsdI0lt.js} +2 -2
- package/dist/{DatePicker-CSm9c37c.js → DatePicker-D-YXdY2z.js} +17 -14
- package/dist/{DatePicker-umTISfvn.d.ts → DatePicker-QzfQf21b.d.ts} +3 -3
- package/dist/{DatePicker.bound-KLyoWNcX.d.ts → DatePicker.bound-DoCAqhM4.d.ts} +1 -1
- package/dist/{DatePicker.bound-Yqckg7Mk.js → DatePicker.bound-a-6NJTgy.js} +2 -2
- package/dist/{DatePickerInput-Cs9RwZfy.js → DatePickerInput-2CZtsxdK.js} +41 -288
- package/dist/{DatePickerInput-DwHQvLzi.d.ts → DatePickerInput-vLlL5ATh.d.ts} +3 -3
- package/dist/{DateRangePicker-hV_U1IK0.d.ts → DateRangePicker-3pPW0ZBV.d.ts} +3 -3
- package/dist/{DateRangePicker-s_4n-F_P.js → DateRangePicker-tuM8Qyvp.js} +45 -306
- package/dist/{DateRangePicker.bound-C1klxYW0.js → DateRangePicker.bound-B5SKOkVM.js} +2 -2
- package/dist/{DateRangePicker.bound-D-GPENNe.d.ts → DateRangePicker.bound-vFyFw4wA.d.ts} +1 -1
- package/dist/{DateTimePicker-411pU7VF.js → DateTimePicker-8BVP2qeR.js} +17 -14
- package/dist/{DateTimePicker-wgV0SUeZ.d.ts → DateTimePicker-BTRIUagV.d.ts} +3 -3
- package/dist/{DateTimePicker.bound-BDyUzidV.js → DateTimePicker.bound-C3y8TqPk.js} +2 -2
- package/dist/{DateTimePicker.bound-cF2X_ncj.d.ts → DateTimePicker.bound-X4DTyQ1b.d.ts} +1 -1
- package/dist/{Dialog-DSl1Fkqi.js → Dialog-Bn43feu0.js} +9 -9
- package/dist/{Dialog-lFYX-7Ax.js → Dialog-C9H9_BmK.js} +35 -6
- package/dist/{Dialog-V-2cgGk1.d.ts → Dialog-CO9xljD3.d.ts} +1 -1
- package/dist/Disclosure-BRSkMbZQ.js +109 -0
- package/dist/{DropdownMenu-DH7E2aXb.js → DropdownMenu-DS0RaEfH.js} +11 -29
- package/dist/{DropdownMenu-Bl_C5W_E.d.ts → DropdownMenu-D_9z9ond.d.ts} +2 -2
- package/dist/{DropdownMenuDesktop-nMoCa6N5.js → DropdownMenuDesktop-DGPIfex-.js} +6 -27
- package/dist/{FileInput-Q72yXorH.d.ts → FileInput-BEaECoBS.d.ts} +7 -7
- package/dist/{FileInput-CqRrQRM-.js → FileInput-DNCKhAq-.js} +20 -19
- package/dist/{FileInput.bound-CG2G5E2K.d.ts → FileInput.bound-D2HuuqSb.d.ts} +1 -1
- package/dist/{FileInput.bound-BZ7-g-dq.js → FileInput.bound-DCSair97.js} +2 -2
- package/dist/{FileTrigger-DBX1Io6E.js → FileTrigger-DlryDp2T.js} +1 -30
- package/dist/{FileUpload-B4ibHWQn.d.ts → FileUpload-BUTSqHVk.d.ts} +1 -1
- package/dist/{FileUpload-CG60c6wM.js → FileUpload-CQFCrvCI.js} +53 -134
- package/dist/{FileUpload.bound-DQ6uuH2W.js → FileUpload.bound-BwetBdi7.js} +2 -2
- package/dist/{FileUpload.bound-C-Zy1n5Y.d.ts → FileUpload.bound-CGQXb4iT.d.ts} +2 -2
- package/dist/{FileUploadContainer-CtUhDntB.d.ts → FileUploadContainer-Dzg5aXXZ.d.ts} +1 -1
- package/dist/{FormField-BIRMlgu4.d.ts → FormField-DGyCDxOp.d.ts} +5 -2
- package/dist/{FormField-D7KKJ6kG.js → FormField-dduTMkNH.js} +58 -37
- package/dist/{FormFieldError-Bqjg9cMb.js → FormFieldError-DTT5TUQ1.js} +2 -2
- package/dist/FormFieldHeaderTooltip-Dt-g40Tc.js +17 -0
- package/dist/FormLayout-CBYgWvwW.d.ts +47 -0
- package/dist/{IconButton-BM2DUNtN.d.ts → IconButton-shH_9wcl.d.ts} +1 -1
- package/dist/{IconSlot-DSK7qNxc.js → IconSlot-CqNuZl0E.js} +4 -4
- package/dist/{iconSlot.cva-BA9NahZH.d.ts → IconSlot-DcEDPaNb.d.ts} +3 -11
- package/dist/{InlineTooltipWrapper-DBuQX2yo.js → InlineTooltipWrapper-CKTiFpZn.js} +3 -3
- package/dist/{Input-CG4Irgae.js → Input-BIuNQb5u.js} +29 -13
- package/dist/{Input-BX3sZBEp.d.ts → Input-CTp_9mS9.d.ts} +3 -3
- package/dist/{Input.bound-BE-espm0.d.ts → Input.bound-B9a62ylL.d.ts} +1 -1
- package/dist/{Input.bound-jZx8gJro.js → Input.bound-QpE3qJqT.js} +2 -2
- package/dist/{InputContent-DDFr0kml.d.ts → InputContent-BCNkN4Fx.d.ts} +4 -4
- package/dist/{InputContent-KhD4_YvO.js → InputContent-C5JlwN5b.js} +35 -22
- package/dist/{Link-Bw2m9W4B.d.ts → Link-PvYB_M-j.d.ts} +5 -3
- package/dist/{ListBox-CoUk0kkt.js → ListBox-DhR5kojP.js} +3 -3
- package/dist/{MenuItem-DPZzOqp2.d.ts → MenuItem-U3-pu1j5.d.ts} +1 -1
- package/dist/{Modal-B4p1zFqi.js → Modal-DcLWF9cB.js} +1 -1
- package/dist/{NumberField-CxwTlqud.js → NumberField-CpkLBjIM.js} +38 -14
- package/dist/{NumberField-qjvHhCfN.d.ts → NumberField-WXebfxjK.d.ts} +4 -4
- package/dist/{NumberField.bound-zySl-v_q.js → NumberField.bound-BbZLqewF.js} +2 -2
- package/dist/{NumberField.bound-DXPGF5YK.d.ts → NumberField.bound-Dy0A5iVc.d.ts} +1 -1
- package/dist/{NumberRangeInput-BrW03wC6.js → NumberRangeInput-47xOaSXq.js} +18 -17
- package/dist/{NumberRangeInput-CS4Kn427.d.ts → NumberRangeInput-BCKQaGpy.d.ts} +2 -2
- package/dist/{NumberRangeInput.bound-CKywKEKI.js → NumberRangeInput.bound-B21y7xkb.js} +2 -2
- package/dist/{NumberRangeInput.bound-C8I7m1cW.d.ts → NumberRangeInput.bound-BNXxIQ0b.d.ts} +1 -1
- package/dist/PageHeader-BwzxymWY.d.ts +58 -0
- package/dist/{Pagination-DkpAg2x6.d.ts → Pagination-BCGUVYOF.d.ts} +1 -1
- package/dist/{PaginationList-PjOxNQwB.js → PaginationList-BTmrmOGl.js} +75 -74
- package/dist/{PaginationList-DNmZRcS6.d.ts → PaginationList-CvlSkJGn.d.ts} +1 -1
- package/dist/{PasswordInput-BHPFkVbM.d.ts → PasswordInput-EhQjYyJS.d.ts} +1 -1
- package/dist/{PasswordInput.bound-DC57m4NT.d.ts → PasswordInput.bound-CK5GwKL4.d.ts} +1 -1
- package/dist/{PasswordInput.bound-CrXKvfil.js → PasswordInput.bound-DVkRv16z.js} +3 -3
- package/dist/{Popover-pjd0Hu61.d.ts → Popover-D_t1XDPA.d.ts} +2 -2
- package/dist/{Progress-1WGRZE8l.d.ts → Progress-Ckfpi_-M.d.ts} +4 -4
- package/dist/{Progress-De76pCfX.js → Progress-RiEGGxNG.js} +3 -3
- package/dist/{RadioGroup-DEwQ6B1F.d.ts → RadioGroup-6e-Z6jW8.d.ts} +3 -3
- package/dist/{RadioGroup-BPSvcre6.js → RadioGroup-IL4Y8XHO.js} +11 -9
- package/dist/{RadioGroup.bound-CN4K9dV2.js → RadioGroup.bound-BFWSq-on.js} +2 -2
- package/dist/{RadioGroup.bound-Dj6CEG6M.d.ts → RadioGroup.bound-w3SZqSkH.d.ts} +1 -1
- package/dist/RangeCalendar-CAWTz3pq.js +288 -0
- package/dist/{RichTextEditor-BYIQW8QA.js → RichTextEditor-16feWcDW.js} +32 -409
- package/dist/{RichTextEditor-hJtuB7Y6.d.ts → RichTextEditor-DHhuBeT6.d.ts} +1 -1
- package/dist/{Select-DHYddedn.d.ts → Select-C34ENdjq.d.ts} +5 -3
- package/dist/{Select-Br_3eecr.js → Select-CSdr0OcD.js} +217 -468
- package/dist/{Select.bound-CgLKMzLn.js → Select.bound-D-Wl7nLz.js} +2 -2
- package/dist/{Select.bound-CJ-tCsmX.d.ts → Select.bound-qOihchei.d.ts} +1 -1
- package/dist/SelectListBox-DeiPWhOP.js +390 -0
- package/dist/SelectionIndicator-C3hniBa2.js +18 -0
- package/dist/SharedElementTransition-CZ2bE7yo.js +96 -0
- package/dist/SidebarWorkspaces-DDHJAdNH.d.ts +132 -0
- package/dist/SidebarWorkspaces-DJknAfS9.js +1298 -0
- package/dist/{Slider-CqB2TPTR.js → Slider-DCsCCPFx.js} +10 -11
- package/dist/{Slider-CcoNTFVN.d.ts → Slider-DRg8zKRM.d.ts} +1 -1
- package/dist/{Slider.bound-Bp7Zrs9_.js → Slider.bound-CByTXPTr.js} +2 -2
- package/dist/{Slider.bound-8B5qzQ-8.d.ts → Slider.bound-CaEF19um.d.ts} +1 -1
- package/dist/{Spinner-B-crRcdG.d.ts → Spinner-Cvy_6zgD.d.ts} +5 -5
- package/dist/{Spinner-BeVTUzzx.js → Spinner-DqjP06T1.js} +29 -41
- package/dist/{SplitButton-BzhbtpFA.d.ts → SplitButton-V1f2NWfh.d.ts} +3 -3
- package/dist/{Stepper-CMw6QnCu.js → Stepper-Dyhxp0Tl.js} +13 -12
- package/dist/{Stepper-LORgYAJr.d.ts → Stepper-k91x_m-E.d.ts} +18 -18
- package/dist/{Switch-R0kAicgM.js → Switch-BfpSMMpv.js} +6 -6
- package/dist/{Switch-CSitpm4o.d.ts → Switch-ELVPkPx0.d.ts} +1 -1
- package/dist/{Switch.bound-DVjqsum1.d.ts → Switch.bound-DeEdVvZV.d.ts} +1 -1
- package/dist/{Switch.bound-Dk-BmxJd.js → Switch.bound-Dv0cHsMM.js} +2 -2
- package/dist/TableRowDetails-D8HFTghI.d.ts +109 -0
- package/dist/TabsFilters-CvYxvrud.js +223 -0
- package/dist/TabsFilters-DePddjCk.d.ts +30 -0
- package/dist/Tag-B2_ZiSE-.d.ts +44 -0
- package/dist/{TextArea-DCnqXuHC.js → TextArea-ciY0kt-D.js} +8 -7
- package/dist/{TextArea-e8sQm205.d.ts → TextArea-iqUeB2QY.d.ts} +2 -2
- package/dist/{TextArea.bound-DEZuRYm_.d.ts → TextArea.bound-BJHyCogp.d.ts} +1 -1
- package/dist/{TextArea.bound-BJZ9m_FE.js → TextArea.bound-DQ_ULvue.js} +2 -2
- package/dist/{TextArea.cva-Bb73hriz.js → TextArea.cva-ENXI55ec.js} +1 -1
- package/dist/{TimePicker-BwF-Crbg.js → TimePicker-BKRPMduC.js} +20 -18
- package/dist/{TimePicker-Zi7B6VTr.d.ts → TimePicker-BZ1ocsBX.d.ts} +2 -2
- package/dist/{TimePicker.bound-Bxtb6uJL.d.ts → TimePicker.bound-8DmjMXuE.d.ts} +1 -1
- package/dist/{TimePicker.bound-B-BVLNbk.js → TimePicker.bound-PtJTz6s3.js} +2 -2
- package/dist/{datePickerValue.utils-OAQBDk1R.js → TimePickerForm-itDjoV7V.js} +12 -16
- package/dist/{Toast-Dl6KMa58.d.ts → Toast-D9pdadZ4.d.ts} +1 -1
- package/dist/{ToastContainer-BDvta6st.js → ToastContainer-Dd0LPykL.js} +5 -5
- package/dist/{ToggleButton-Cce9bnBw.d.ts → ToggleButton-HUZ8ij6i.d.ts} +1 -1
- package/dist/{ToggleButton-DUQ8nwKY.js → ToggleButton-P1z1pxzT.js} +2 -2
- package/dist/{ToggleGroup-s5sDSB6l.js → ToggleGroup-CrDoeLN0.js} +127 -114
- package/dist/{ToggleGroup-BJ8cqXaO.d.ts → ToggleGroup-DvjnSinl.d.ts} +5 -23
- package/dist/{ToggleGroup.bound-Cv09n91n.d.ts → ToggleGroup.bound-B03ISHQ8.d.ts} +1 -1
- package/dist/{ToggleGroup.bound-DEc7rdNF.js → ToggleGroup.bound-DCnYwmBt.js} +2 -2
- package/dist/{Tooltip-BiS7isYB.d.ts → Tooltip-B8DTURLQ.d.ts} +1 -1
- package/dist/{Tooltip-CMigoyri.js → Tooltip-DRB6lo0U.js} +8 -44
- package/dist/{TooltipWrapper-D7HUZLsP.js → TooltipWrapper-BvGO_LUx.js} +21 -10
- package/dist/{Typography-LU4z2pR1.js → Typography-DCLnPa3P.js} +2 -2
- package/dist/{Typography-D2FfZr7a.d.ts → Typography-DJojwiXV.d.ts} +2 -2
- package/dist/{accordion.cva-CeBWV9EO.js → accordion.cva-DwxY-k1e.js} +17 -25
- package/dist/{badgeButton.cva-B8EQLwPv.d.ts → badgeButton.cva-CBFIhr1S.d.ts} +8 -8
- package/dist/badgeButton.cva-t5PQOH4M.js +138 -0
- package/dist/{breadcrumbs.cva-DPwJJK_D.js → breadcrumbs.cva-CnBIZUB3.js} +9 -9
- package/dist/{button.cva-CBckM91c.d.ts → button.cva-C8LGtNJ3.d.ts} +21 -16
- package/dist/button.cva-Ciga0rdG.js +267 -0
- package/dist/{buttonContent.cva-DG-4lRz4.d.ts → buttonContent.cva-BapnODby.d.ts} +2 -2
- package/dist/{checkbox.cva-CJy87xUo.d.ts → checkbox.cva-CCh_UlrC.d.ts} +6 -6
- package/dist/{checkbox.cva-D-D9Qgaf.js → checkbox.cva-aLJS7v4z.js} +24 -33
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +98 -103
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +11 -11
- package/dist/components/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge-button.d.ts +1 -1
- package/dist/components/badge-button.js +5 -5
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +9 -9
- package/dist/components/bottom-sheet-header.d.ts +1 -1
- package/dist/components/bottom-sheet-header.js +13 -12
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +3 -3
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.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/dialog.d.ts +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +4 -4
- package/dist/components/dropdown-menu.d.ts +2 -2
- package/dist/components/dropdown-menu.js +2 -2
- package/dist/components/file-input.d.ts +1 -1
- package/dist/components/file-input.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/form-field.d.ts +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/form-layout.d.ts +2 -0
- package/dist/components/form-layout.js +80 -0
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +2 -2
- package/dist/components/icon-slot.d.ts +2 -1
- package/dist/components/icon-slot.js +1 -1
- package/dist/components/input-frame.d.ts +5 -4
- package/dist/components/input-frame.js +48 -33
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +3 -3
- package/dist/components/number-field.d.ts +1 -1
- package/dist/components/number-field.js +1 -1
- package/dist/components/number-range-input.d.ts +1 -1
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/page-header.d.ts +2 -0
- package/dist/components/page-header.js +205 -0
- package/dist/components/pagination-list.d.ts +1 -1
- package/dist/components/pagination-list.js +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +8 -8
- package/dist/components/password-input.d.ts +1 -1
- package/dist/components/password-input.js +3 -3
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +4 -4
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +2 -0
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +3 -3
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/style-definitions.d.ts +2 -2
- package/dist/components/style-definitions.js +31 -30
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs-filters.d.ts +2 -0
- package/dist/components/tabs-filters.js +2 -0
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +8 -8
- package/dist/components/text-area.d.ts +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.d.ts +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +2 -2
- package/dist/components/toast.js +2 -2
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle-group.d.ts +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +2 -2
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.d.ts +2 -2
- package/dist/components/typography.js +1 -1
- package/dist/components/use-toast.d.ts +1 -1
- package/dist/components/use-toast.js +2 -2
- package/dist/config/component-configuration.d.ts +2 -2
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/link-context.d.ts +2 -2
- package/dist/config/link-context.js +1 -1
- package/dist/config/resources.d.ts +1 -1
- package/dist/config/resources.js +1 -1
- package/dist/config/theme-context.js +1 -1
- package/dist/config/ui-config.d.ts +2 -2
- package/dist/config/ui-config.js +1 -1
- package/dist/config/ui-overrides.d.ts +1 -1
- package/dist/config/ui-overrides.js +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/{confirmation.context-BSn1s-ip.js → confirmation.context-CByUxDcn.js} +2 -2
- package/dist/{confirmation.context-B2z9A1v3.d.ts → confirmation.context-C_GDRn3a.d.ts} +1 -1
- package/dist/{datePickerInput.cva-Cd7UUN61.js → datePickerInput.cva-Du0Zn04v.js} +2 -2
- package/dist/datePickerValue.utils-CkmPaD6I.js +4 -0
- package/dist/{dialog.cva-sioU_5R7.js → dialog.cva-BIpz6HcA.js} +7 -7
- package/dist/{dist-CAFUM34b.js → dist-DEZzXa0W.js} +15 -14
- package/dist/dropdownMenu.cva-DwSOcbmR.js +31 -0
- package/dist/{fileUpload.cva-ujmStxB1.js → fileUpload.cva-BYzXGc9C.js} +11 -11
- package/dist/{fileUpload.types-BT8P1o7a.d.ts → fileUpload.types-C-ke21yY.d.ts} +2 -2
- package/dist/{form.binding-B-2id68q.js → form.binding-DOR5gIQf.js} +1 -1
- package/dist/{formFieldError.cva-CTl0VeyG.js → formFieldError.cva-BB6Ghqwq.js} +3 -3
- package/dist/formFieldHelper.cva-DRmSyRZN.js +14 -0
- package/dist/formLayout.context--CN08Mtb.js +14 -0
- package/dist/hooks/use-async-list.js +1 -1
- package/dist/hooks/use-filters.js +1 -1
- package/dist/hooks/use-local-storage.js +1 -1
- package/dist/{i18n-BjNKHh_D.js → i18n-D1FWVTPi.js} +4 -2
- package/dist/{i18n-2z5on9No.d.ts → i18n-DE45mOCM.d.ts} +6 -0
- package/dist/iconSlot.cva-CLB5Tlsr.d.ts +9 -0
- package/dist/icons.d.ts +2 -1
- package/dist/icons.js +3 -3
- package/dist/import-C14g8ng0.js +251 -0
- package/dist/index.d.ts +78 -73
- package/dist/index.js +95 -91
- package/dist/{input.cva-L7jKDv6q.d.ts → input.cva-BjuHsDGy.d.ts} +11 -11
- package/dist/input.cva-DZii82eS.js +185 -0
- package/dist/inputLayout-KdAtunGk.js +5 -0
- package/dist/label.cva-DTfT6FrX.js +85 -0
- package/dist/{link.context-C4fE_aMo.d.ts → link.context-BCHn7NSy.d.ts} +1 -1
- package/dist/link.cva-C24YVAsJ.js +16 -0
- package/dist/outline.clsx-DGGQQRkM.js +6 -0
- package/dist/popover.cva-DAbfSma6.js +5 -0
- package/dist/{progress.cva-D7iiX6Lh.js → progress.cva-CsGaGVJ-.js} +7 -7
- package/dist/{radio.cva-DO3UEac-.d.ts → radio.cva-D7M1hqLe.d.ts} +9 -5
- package/dist/{radio.cva-Ctdop1xV.js → radio.cva-DistaZtZ.js} +33 -19
- package/dist/rich-text-editor.d.ts +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/{selectDesktop.cva-RzxvSBkd.js → selectDesktop.cva-DStkOdwm.js} +2 -2
- package/dist/selectItem.cva-B6vxey2R.js +27 -0
- package/dist/{staticDateTimeSegments-Bt5wCZvg.js → staticDateTimeSegments-bPuA-a2Y.js} +12 -12
- package/dist/{status.cva-BFGMKZO_.js → status.cva-CYgi3Htz.js} +21 -21
- package/dist/{stepper.cva-CpRi0fGb.js → stepper.cva-Cecphqeo.js} +23 -35
- package/dist/{style-definitions-_RXJdSk-.d.ts → style-definitions-Dx6aFDiR.d.ts} +159 -144
- package/dist/styles/editor.css +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/styles/outline.js +1 -1
- package/dist/switch.cva-BT0kGRIk.js +24 -0
- package/dist/switch.cva-r6vcS25Q.d.ts +16 -0
- package/dist/table.cva-DkcsOmZG.js +147 -0
- package/dist/tag.cva-ExMNsTN-.js +24 -0
- package/dist/tanstack/autocomplete.d.ts +2 -2
- package/dist/tanstack/autocomplete.js +1 -1
- package/dist/tanstack/checkbox-group.d.ts +2 -2
- package/dist/tanstack/checkbox-group.js +1 -1
- package/dist/tanstack/checkbox.d.ts +2 -2
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.d.ts +2 -2
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.d.ts +2 -2
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.d.ts +2 -2
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.d.ts +2 -2
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.d.ts +3 -3
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.js +2 -2
- package/dist/tanstack/input.d.ts +2 -2
- package/dist/tanstack/input.js +1 -1
- package/dist/tanstack/number-field.d.ts +2 -2
- package/dist/tanstack/number-field.js +1 -1
- package/dist/tanstack/number-range-input.d.ts +2 -2
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/password-input.d.ts +1 -1
- package/dist/tanstack/password-input.js +1 -1
- package/dist/tanstack/radio-group.d.ts +2 -2
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.d.ts +1 -1
- package/dist/tanstack/rich-text-editor.js +2 -2
- package/dist/tanstack/select.d.ts +2 -2
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.d.ts +2 -2
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/switch.d.ts +2 -2
- package/dist/tanstack/switch.js +1 -1
- package/dist/tanstack/table.d.ts +3 -3
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-area.d.ts +2 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.d.ts +2 -2
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.d.ts +2 -2
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/{tanstack-CmbhAoHU.js → tanstack-Bgdv0qU1.js} +2 -1
- package/dist/{tanstack-DQu9PNjn.d.ts → tanstack-zusJduSB.d.ts} +195 -96
- package/dist/tanstack.d.ts +78 -73
- package/dist/tanstack.js +95 -91
- package/dist/{theme.context-B3wQDJ-i.js → theme.context--VEyStJB.js} +2 -2
- package/dist/{toast.cva-L0k_TBiW.d.ts → toast.cva-AmLw6Cf5.d.ts} +10 -10
- package/dist/{toast.cva-aC4NMpLb.js → toast.cva-B6NXTwbZ.js} +22 -38
- package/dist/{toast.runtime-DKOeUnk6.js → toast.runtime-Drd2IJ_j.js} +1 -1
- package/dist/toggleGroup.cva-CJ-3Ps7j.js +35 -0
- package/dist/toggleGroup.cva-DA4U21gn.d.ts +26 -0
- package/dist/{tooltip.cva-ClcaR72U.js → tooltip.cva-BEyxvcG2.js} +11 -11
- package/dist/{tooltipWrapper.cva-BBQ4ic3D.js → tooltipWrapper.cva-t4NQ9zz9.js} +1 -1
- package/dist/typography.cva-BCHlTHdM.d.ts +36 -0
- package/dist/typography.cva-CHsHX_Wp.js +31 -0
- package/dist/{uiConfig.context-CT9EVqC5.js → uiConfig.context-3DN9w6oU.js} +19 -114
- package/dist/{uiConfig.context-CQU9Tzq_.d.ts → uiConfig.context-BnCORTNm.d.ts} +22 -9
- package/dist/{uiOverrides.context-Dmev7iRS.d.ts → uiOverrides.context-DHHzLSnq.d.ts} +23 -0
- package/dist/{useBreakpoint-BzYqQEBO.js → useBreakpoint-CJ3mx7UF.js} +6 -6
- package/dist/{useFilters-HIngImwn.js → useFilters-DMi94RZK.js} +2 -2
- package/dist/{useFormAutosave-XEQqk1lK.js → useFormAutosave-BPGlChiY.js} +1 -1
- package/dist/useScrollableListBox-oYKqU3Hp.js +47 -0
- package/dist/{useStaticInputHandoff-DyYxfwv6.js → useStaticInputHandoff-BN0fOerH.js} +9 -10
- package/dist/useTableColumnConfig-D5NxR1Co.js +2060 -0
- package/dist/{useTableNav-rU9WmCj6.d.ts → useTableNav-H5DrogZU.d.ts} +29 -44
- package/dist/{useToast-DfQif03I.d.ts → useToast-DsA8CVoY.d.ts} +1 -1
- package/package.json +22 -5
- package/dist/CheckboxCheckmark-BzT6MwH5.js +0 -47
- package/dist/FormFieldHeaderTooltip-k8Snf_oM.js +0 -47
- package/dist/SelectionIndicator-B7C5Y0JM.js +0 -5
- package/dist/SharedElementTransition-DJ9CCbEa.js +0 -12
- package/dist/Tag-CoqCTZRm.d.ts +0 -44
- package/dist/badgeButton.cva-BPyVejxO.js +0 -300
- package/dist/button.cva-vO0fPUTn.js +0 -423
- package/dist/check-DYMBkp_Z.js +0 -20
- package/dist/chevron-down-B4Pr8bD3.js +0 -20
- package/dist/chevron-right-3nKJR5Bb.js +0 -20
- package/dist/chevrons-right-DJPPn2fD.js +0 -44
- package/dist/createLucideIcon-LcezOE4z.js +0 -240
- package/dist/dropdownMenu.cva-Bi3a21lO.js +0 -34
- package/dist/eye-BA4nRlMX.js +0 -57
- package/dist/formFieldHelper.cva-CxAmrG2H.js +0 -97
- package/dist/input.cva-w7ZEVQAM.js +0 -227
- package/dist/link.cva-D3XRgcAv.js +0 -12
- package/dist/outline.clsx-50W_vNDl.js +0 -6
- package/dist/popover.cva-Bhud1wnp.js +0 -5
- package/dist/selectItem.cva-BWfEkNs_.js +0 -36
- package/dist/styles/color-utilities.css +0 -20
- package/dist/switch.cva-BsJ4iAFl.js +0 -27
- package/dist/switch.cva-psw67dK9.d.ts +0 -16
- package/dist/table.cva-CmfeWLyW.d.ts +0 -84
- package/dist/table.cva-DFQM8VbM.js +0 -111
- package/dist/tag.cva-BCCH7ku3.js +0 -55
- package/dist/toggleGroup.cva-CEhjMT4j.js +0 -35
- package/dist/typography.cva-GpC6QQNx.d.ts +0 -36
- package/dist/typography.cva-iD15k56p.js +0 -51
- package/dist/useTableColumnConfig-CUINwVTR.js +0 -1348
- package/dist/x-B6vfz8Ps.js +0 -23
- package/dist/{dom.utils-BbfrA6RP.js → dom.utils-BPooTXtC.js} +1 -1
- package/dist/{link.context-J7aQtMOr.js → link.context-TPjDtjw3.js} +1 -1
- package/dist/{router.context-B4FvsTim.js → router.context-MckTbHw9.js} +1 -1
- package/dist/{uiOverrides.context-BTCH9y5a.js → uiOverrides.context-DNEQlTx0.js} +1 -1
- package/dist/{useAsyncList-yHz7twsj.js → useAsyncList-Ct74ve3i.js} +1 -1
- package/dist/{useForm-eW4KpH1u.js → useForm-Cb7KWLds.js} +1 -1
- package/dist/{useIntersectionObserver-DYfHnGGU.js → useIntersectionObserver-DFAhTsV0.js} +1 -1
- package/dist/{useLocalStorage-PlcaJ1tP.js → useLocalStorage-CctQvyqD.js} +1 -1
|
@@ -1,158 +1,37 @@
|
|
|
1
|
-
import { t as createLucideIcon } from "./createLucideIcon-LcezOE4z.js";
|
|
2
|
-
import { t as UIConfig } from "./uiConfig.context-CT9EVqC5.js";
|
|
3
|
-
import { t as ChevronDown } from "./chevron-down-B4Pr8bD3.js";
|
|
4
|
-
import { t as CheckboxCheckmark } from "./CheckboxCheckmark-BzT6MwH5.js";
|
|
5
|
-
import { t as X } from "./x-B6vfz8Ps.js";
|
|
6
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
7
|
-
import { t as UIOverrides } from "./uiOverrides.context-
|
|
8
|
-
import { t as IconSlot } from "./IconSlot-
|
|
9
|
-
import { l as $
|
|
2
|
+
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
+
import { t as IconSlot } from "./IconSlot-CqNuZl0E.js";
|
|
4
|
+
import { l as $7230ffa83bc0c2cf$export$fabf2dc03a41866e } from "./utils-BkLF-JA3.js";
|
|
5
|
+
import { _ as $4b38b5b75ecc6208$export$698f465ec27e93df, g as $4b38b5b75ecc6208$export$2f2b9559550c7bbc, l as $542a13ca2fa5b484$export$5b6b19405a83ff9d, t as $f2ff30fde7b014be$export$2e1e1122cf0cba88 } from "./Dialog-C9H9_BmK.js";
|
|
10
6
|
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-C1YB5dOw.js";
|
|
11
|
-
import { n as $dbdc5e6e7ce01b4b$export$c02625b26074192c, t as $dbdc5e6e7ce01b4b$export$72b9695b8216309a } from "./ComboBox-
|
|
7
|
+
import { n as $dbdc5e6e7ce01b4b$export$c02625b26074192c, t as $dbdc5e6e7ce01b4b$export$72b9695b8216309a } from "./ComboBox-ChsdI0lt.js";
|
|
12
8
|
import { n as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./Input-BG0Xjw5X.js";
|
|
13
|
-
import { i as $
|
|
14
|
-
import { i as $a3be900807531178$re_export$useFilter, n as $a3be900807531178$re_export$ListLayout, r as $a3be900807531178$re_export$Rect } from "./exports-BNrTn8Tj.js";
|
|
9
|
+
import { i as $a3be900807531178$re_export$useFilter } from "./exports-BNrTn8Tj.js";
|
|
15
10
|
import "./popoverAnimation-DEZSvKP8.js";
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as Button } from "./Button-
|
|
11
|
+
import { i as useDeepCompareMemo, t as UIConfig } from "./uiConfig.context-3DN9w6oU.js";
|
|
12
|
+
import { t as Button } from "./Button-BaODzvZd.js";
|
|
18
13
|
import { BottomSheet } from "./components/bottom-sheet.js";
|
|
19
|
-
import { t as useBreakpoint } from "./useBreakpoint-
|
|
14
|
+
import { t as useBreakpoint } from "./useBreakpoint-CJ3mx7UF.js";
|
|
20
15
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
21
|
-
import { n as FormFieldLabel, t as FormField } from "./FormField-
|
|
22
|
-
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-
|
|
23
|
-
import "./
|
|
24
|
-
import
|
|
25
|
-
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-
|
|
26
|
-
import { t as popoverDefinition } from "./popover.cva-
|
|
16
|
+
import { n as FormFieldLabel, t as FormField } from "./FormField-dduTMkNH.js";
|
|
17
|
+
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-DZii82eS.js";
|
|
18
|
+
import { t as resolveInputLayout } from "./inputLayout-KdAtunGk.js";
|
|
19
|
+
import "./i18n-D1FWVTPi.js";
|
|
20
|
+
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-BvGO_LUx.js";
|
|
21
|
+
import { t as popoverDefinition } from "./popover.cva-DAbfSma6.js";
|
|
22
|
+
import { n as useStaticInputHandoff, t as getStaticInputFocusTarget } from "./useStaticInputHandoff-BN0fOerH.js";
|
|
27
23
|
import { InputFrame } from "./components/input-frame.js";
|
|
24
|
+
import { t as Input } from "./Input-BIuNQb5u.js";
|
|
28
25
|
import { Tag } from "./components/tag.js";
|
|
29
|
-
import { n as selectInputTagsContentWrapperDefinition, t as selectPopoverDefinition } from "./selectDesktop.cva-
|
|
30
|
-
import {
|
|
31
|
-
import { t as useIntersectionObserver } from "./useIntersectionObserver-DYfHnGGU.js";
|
|
32
|
-
import { t as Input } from "./Input-CG4Irgae.js";
|
|
33
|
-
import $ahdqC$react, { Fragment, createContext, use, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
26
|
+
import { n as selectInputTagsContentWrapperDefinition, t as selectPopoverDefinition } from "./selectDesktop.cva-DStkOdwm.js";
|
|
27
|
+
import { ChevronDown, Search, X } from "lucide-react";
|
|
34
28
|
import { c } from "react/compiler-runtime";
|
|
29
|
+
import { Fragment, createContext, use, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
35
30
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
-
import { useVirtualizerState } from "react-stately/useVirtualizerState";
|
|
37
|
-
import { useScrollView } from "react-aria/private/virtualizer/ScrollView";
|
|
38
|
-
import { VirtualizerItem } from "react-aria/private/virtualizer/VirtualizerItem";
|
|
39
31
|
import { usePreventScroll } from "react-aria";
|
|
40
32
|
import { useLabel } from "@react-aria/label";
|
|
41
|
-
import { useTranslation } from "react-i18next";
|
|
42
33
|
import { useFocusVisible, useFocusWithin, useHover } from "@react-aria/interactions";
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @license lucide-react v1.43.0 - ISC
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the ISC license.
|
|
48
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/
|
|
50
|
-
const __iconData = {
|
|
51
|
-
name: "search",
|
|
52
|
-
size: 24,
|
|
53
|
-
node: [["path", {
|
|
54
|
-
d: "m21 21-4.34-4.34",
|
|
55
|
-
key: "14j7rj"
|
|
56
|
-
}], ["circle", {
|
|
57
|
-
cx: "11",
|
|
58
|
-
cy: "11",
|
|
59
|
-
r: "8",
|
|
60
|
-
key: "4ej97u"
|
|
61
|
-
}]]
|
|
62
|
-
};
|
|
63
|
-
__iconData.node;
|
|
64
|
-
const Search = createLucideIcon(__iconData);
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region ../../node_modules/.bun/react-aria-components@1.22.1+67f6792bdf102c28/node_modules/react-aria-components/dist/private/Virtualizer.mjs
|
|
67
|
-
const $143fb904d86051ce$var$VirtualizerContext = /*#__PURE__*/ createContext(null);
|
|
68
|
-
const $143fb904d86051ce$var$VirtualizerOptionsContext = /*#__PURE__*/ createContext(null);
|
|
69
|
-
function $143fb904d86051ce$export$89be5a243e59c4b2(props) {
|
|
70
|
-
let { children, layout: layoutProp, layoutOptions, shouldObserveItemSize } = props;
|
|
71
|
-
let layout = useMemo(() => typeof layoutProp === "function" ? new layoutProp() : layoutProp, [layoutProp]);
|
|
72
|
-
let renderer = useMemo(() => ({
|
|
73
|
-
isVirtualized: true,
|
|
74
|
-
layoutDelegate: layout,
|
|
75
|
-
dropTargetDelegate: layout.getDropTargetFromPoint ? layout : void 0,
|
|
76
|
-
CollectionRoot: $143fb904d86051ce$var$CollectionRoot,
|
|
77
|
-
CollectionBranch: $143fb904d86051ce$var$CollectionBranch
|
|
78
|
-
}), [layout]);
|
|
79
|
-
return /*#__PURE__*/ $ahdqC$react.createElement($263ab7fc0f95ccdb$export$4feb769f8ddf26c5.Provider, { value: renderer }, /*#__PURE__*/ $ahdqC$react.createElement($143fb904d86051ce$var$VirtualizerOptionsContext.Provider, { value: {
|
|
80
|
-
layout,
|
|
81
|
-
layoutOptions,
|
|
82
|
-
shouldObserveItemSize
|
|
83
|
-
} }, children));
|
|
84
|
-
}
|
|
85
|
-
function $143fb904d86051ce$var$CollectionRoot({ collection, persistedKeys, scrollRef, renderDropIndicator }) {
|
|
86
|
-
let { layout, layoutOptions, shouldObserveItemSize } = useContext($143fb904d86051ce$var$VirtualizerOptionsContext);
|
|
87
|
-
let layoutOptions2 = layout.useLayoutOptions?.();
|
|
88
|
-
let state = useVirtualizerState({
|
|
89
|
-
allowsWindowScrolling: true,
|
|
90
|
-
layout,
|
|
91
|
-
collection,
|
|
92
|
-
renderView: (type, item) => {
|
|
93
|
-
return item?.render?.(item);
|
|
94
|
-
},
|
|
95
|
-
onVisibleRectChange(rect) {
|
|
96
|
-
let element = scrollRef?.current;
|
|
97
|
-
if (element) {
|
|
98
|
-
element.scrollLeft = rect.x;
|
|
99
|
-
element.scrollTop = rect.y;
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
persistedKeys,
|
|
103
|
-
layoutOptions: useMemo(() => layoutOptions && layoutOptions2 ? {
|
|
104
|
-
...layoutOptions,
|
|
105
|
-
...layoutOptions2
|
|
106
|
-
} : layoutOptions || layoutOptions2, [layoutOptions, layoutOptions2])
|
|
107
|
-
});
|
|
108
|
-
let { contentProps } = useScrollView({
|
|
109
|
-
onVisibleRectChange: state.setVisibleRect,
|
|
110
|
-
onSizeChange: state.setSize,
|
|
111
|
-
contentSize: state.contentSize,
|
|
112
|
-
onScrollStart: state.startScrolling,
|
|
113
|
-
onScrollEnd: state.endScrolling,
|
|
114
|
-
allowsWindowScrolling: true
|
|
115
|
-
}, scrollRef);
|
|
116
|
-
return /*#__PURE__*/ $ahdqC$react.createElement("div", contentProps, /*#__PURE__*/ $ahdqC$react.createElement($143fb904d86051ce$var$VirtualizerContext.Provider, { value: state }, $143fb904d86051ce$var$renderChildren(null, state.visibleViews, renderDropIndicator, shouldObserveItemSize)));
|
|
117
|
-
}
|
|
118
|
-
function $143fb904d86051ce$var$CollectionBranch({ parent, renderDropIndicator }) {
|
|
119
|
-
let parentView = useContext($143fb904d86051ce$var$VirtualizerContext).virtualizer.getVisibleView(parent.key);
|
|
120
|
-
let { shouldObserveItemSize } = useContext($143fb904d86051ce$var$VirtualizerOptionsContext);
|
|
121
|
-
return $143fb904d86051ce$var$renderChildren(parentView, Array.from(parentView.children), renderDropIndicator, shouldObserveItemSize);
|
|
122
|
-
}
|
|
123
|
-
function $143fb904d86051ce$var$renderChildren(parent, children, renderDropIndicator, shouldObserveItemSize) {
|
|
124
|
-
return children.map((view) => $143fb904d86051ce$var$renderWrapper(parent, view, renderDropIndicator, shouldObserveItemSize));
|
|
125
|
-
}
|
|
126
|
-
function $143fb904d86051ce$var$renderWrapper(parent, reusableView, renderDropIndicator, shouldObserveItemSize) {
|
|
127
|
-
let rendered = /*#__PURE__*/ $ahdqC$react.createElement(VirtualizerItem, {
|
|
128
|
-
key: reusableView.key,
|
|
129
|
-
layoutInfo: reusableView.layoutInfo,
|
|
130
|
-
virtualizer: reusableView.virtualizer,
|
|
131
|
-
parent: parent?.layoutInfo,
|
|
132
|
-
shouldObserveItemSize
|
|
133
|
-
}, reusableView.rendered);
|
|
134
|
-
let { collection, layout } = reusableView.virtualizer;
|
|
135
|
-
let node = reusableView.content;
|
|
136
|
-
if (node?.type === "item" && renderDropIndicator && layout.getDropTargetLayoutInfo) rendered = /*#__PURE__*/ $ahdqC$react.createElement($ahdqC$react.Fragment, { key: reusableView.key }, $143fb904d86051ce$var$renderDropIndicatorWrapper(parent, reusableView, {
|
|
137
|
-
type: "item",
|
|
138
|
-
key: reusableView.content.key,
|
|
139
|
-
dropPosition: "before"
|
|
140
|
-
}, renderDropIndicator), rendered, $263ab7fc0f95ccdb$export$2dbbd341daed716d(collection, node, (target) => $143fb904d86051ce$var$renderDropIndicatorWrapper(parent, reusableView, target, renderDropIndicator)));
|
|
141
|
-
return rendered;
|
|
142
|
-
}
|
|
143
|
-
function $143fb904d86051ce$var$renderDropIndicatorWrapper(parent, reusableView, target, renderDropIndicator) {
|
|
144
|
-
let indicator = renderDropIndicator(target);
|
|
145
|
-
if (indicator) {
|
|
146
|
-
let layoutInfo = reusableView.virtualizer.layout.getDropTargetLayoutInfo(target);
|
|
147
|
-
indicator = /*#__PURE__*/ $ahdqC$react.createElement(VirtualizerItem, {
|
|
148
|
-
layoutInfo,
|
|
149
|
-
virtualizer: reusableView.virtualizer,
|
|
150
|
-
parent: parent?.layoutInfo
|
|
151
|
-
}, indicator);
|
|
152
|
-
}
|
|
153
|
-
return indicator;
|
|
154
|
-
}
|
|
155
|
-
//#endregion
|
|
34
|
+
import { useTranslation } from "react-i18next";
|
|
156
35
|
//#region src/components/inputs/Selection/shared/SelectInputTags.tsx
|
|
157
36
|
const SelectInputTags = ({ selectedItems, isDisabled, selectedTagsType, collapseAfter, onRemove }) => {
|
|
158
37
|
const { displayedItems, remainingCount } = useMemo(() => {
|
|
@@ -170,11 +49,12 @@ const SelectInputTags = ({ selectedItems, isDisabled, selectedTagsType, collapse
|
|
|
170
49
|
isDisabled,
|
|
171
50
|
onDismiss: () => onRemove(item.id),
|
|
172
51
|
excludeFromTabOrder: true,
|
|
173
|
-
className: "z-raised",
|
|
52
|
+
className: "z-raised h-5 py-0!",
|
|
174
53
|
children: item.label
|
|
175
54
|
}, item.id)), remainingCount > 0 && /* @__PURE__ */ jsx(Tag, {
|
|
176
55
|
isDisabled,
|
|
177
56
|
excludeFromTabOrder: true,
|
|
57
|
+
className: "h-5 py-0!",
|
|
178
58
|
children: `+${remainingCount} more`
|
|
179
59
|
}, "remaining-count")] });
|
|
180
60
|
return /* @__PURE__ */ jsx("p", { children: selectedItems.map((item) => item.label).join(", ") });
|
|
@@ -241,21 +121,16 @@ function useSelectItems({ initialSelectedItems, selectedItems, cachedItems, inpu
|
|
|
241
121
|
initialSelectedItems,
|
|
242
122
|
selectedItems
|
|
243
123
|
]);
|
|
244
|
-
const
|
|
245
|
-
allListItems,
|
|
246
|
-
contains,
|
|
247
|
-
inputValue
|
|
248
|
-
]);
|
|
249
|
-
const listItems = useMemo(() => showAll || isClientSearchDisabled ? allListItems : filteredListItems, [
|
|
124
|
+
const listItems = useMemo(() => showAll || isClientSearchDisabled || inputValue.length === 0 ? allListItems : allListItems.filter((item) => contains(item.label, inputValue)), [
|
|
250
125
|
showAll,
|
|
251
126
|
isClientSearchDisabled,
|
|
252
127
|
allListItems,
|
|
253
|
-
|
|
128
|
+
contains,
|
|
129
|
+
inputValue
|
|
254
130
|
]);
|
|
255
131
|
return {
|
|
256
132
|
allItems,
|
|
257
133
|
allListItems,
|
|
258
|
-
filteredListItems,
|
|
259
134
|
listItems,
|
|
260
135
|
selectableListItems: useMemo(() => listItems.filter((item) => !item.isDisabled && !ReservedItemIds.includes(String(item.id))), [listItems])
|
|
261
136
|
};
|
|
@@ -321,12 +196,14 @@ function useDebounceCallback(callback, t0) {
|
|
|
321
196
|
let SelectContext;
|
|
322
197
|
(function(_SelectContext) {
|
|
323
198
|
const Context = createContext({});
|
|
199
|
+
const SelectionContext = createContext({});
|
|
324
200
|
const defaultMapInitialToSelectItem = (item) => ({
|
|
325
201
|
id: item.id,
|
|
326
202
|
label: item.label ?? item.name ?? ""
|
|
327
203
|
});
|
|
328
|
-
_SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, searchDebounceDelay, multiSelectAutoConfirm = false, onBlur: fieldOnBlur, onChange: fieldOnChange, initialSelection, isSearchable, selectionMode, value: controlledValue, children, mapInitialToSelectItem = defaultMapInitialToSelectItem }) => {
|
|
204
|
+
_SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, searchDebounceDelay, multiSelectAutoConfirm = false, onBlur: fieldOnBlur, onChange: fieldOnChange, initialSelection, isSearchable, searchPlacement, selectionMode, value: controlledValue, children, mapInitialToSelectItem = defaultMapInitialToSelectItem }) => {
|
|
329
205
|
const isMultiple = selectionMode === "multiple";
|
|
206
|
+
const isSearchInPopover = isSearchable && searchPlacement === "popover";
|
|
330
207
|
const initialSelectedItems = useMemo(() => {
|
|
331
208
|
if (!initialSelection) return null;
|
|
332
209
|
if (Array.isArray(initialSelection)) return initialSelection.map(mapInitialToSelectItem);
|
|
@@ -395,7 +272,7 @@ let SelectContext;
|
|
|
395
272
|
const syncFieldState = (value) => {
|
|
396
273
|
const newFieldState = {
|
|
397
274
|
value,
|
|
398
|
-
inputValue: isMultiple || Array.isArray(value) ? fieldState.inputValue : getItem(value)?.label ?? "",
|
|
275
|
+
inputValue: isMultiple || isSearchInPopover || Array.isArray(value) ? fieldState.inputValue : getItem(value)?.label ?? "",
|
|
399
276
|
searchValue: ""
|
|
400
277
|
};
|
|
401
278
|
setFieldState(newFieldState);
|
|
@@ -410,11 +287,11 @@ let SelectContext;
|
|
|
410
287
|
useEffect(() => {
|
|
411
288
|
updateValue(fieldState.value);
|
|
412
289
|
if (isMultiple) return;
|
|
413
|
-
if (controlledValue !== null && controlledValue !== void 0 && fieldState.value !== null && fieldState.value !== void 0 && fieldState.inputValue === "" && getItem(fieldState.value)?.label) syncFieldState(fieldState.value);
|
|
290
|
+
if (!isSearchInPopover && controlledValue !== null && controlledValue !== void 0 && fieldState.value !== null && fieldState.value !== void 0 && fieldState.inputValue === "" && getItem(fieldState.value)?.label) syncFieldState(fieldState.value);
|
|
414
291
|
}, [allListItems]);
|
|
415
292
|
const handleInputChange = useCallback((inputValue) => {
|
|
416
293
|
const newFieldState = {
|
|
417
|
-
value: isMultiple || inputValue !== "" ? fieldState.value : null,
|
|
294
|
+
value: isMultiple || isSearchInPopover || inputValue !== "" ? fieldState.value : null,
|
|
418
295
|
inputValue,
|
|
419
296
|
searchValue: inputValue
|
|
420
297
|
};
|
|
@@ -425,14 +302,15 @@ let SelectContext;
|
|
|
425
302
|
}, [
|
|
426
303
|
emitStateChanges,
|
|
427
304
|
fieldState.value,
|
|
428
|
-
isMultiple
|
|
305
|
+
isMultiple,
|
|
306
|
+
isSearchInPopover
|
|
429
307
|
]);
|
|
430
308
|
const onChange = useCallback((value) => {
|
|
431
309
|
if (value === "new-item-id") onNewItemOption?.(fieldState.inputValue);
|
|
432
310
|
else {
|
|
433
311
|
const newFieldState = {
|
|
434
312
|
value,
|
|
435
|
-
inputValue: isMultiple || Array.isArray(value) ? "" : getItem(value)?.label ?? "",
|
|
313
|
+
inputValue: isMultiple || isSearchInPopover || Array.isArray(value) ? "" : getItem(value)?.label ?? "",
|
|
436
314
|
searchValue: ""
|
|
437
315
|
};
|
|
438
316
|
setFieldState(newFieldState);
|
|
@@ -447,7 +325,8 @@ let SelectContext;
|
|
|
447
325
|
onNewItemOption,
|
|
448
326
|
fieldState.inputValue,
|
|
449
327
|
getItem,
|
|
450
|
-
isMultiple
|
|
328
|
+
isMultiple,
|
|
329
|
+
isSearchInPopover
|
|
451
330
|
]);
|
|
452
331
|
const onClear = useCallback(() => {
|
|
453
332
|
if (selectedIds.length === 0) {
|
|
@@ -537,11 +416,19 @@ let SelectContext;
|
|
|
537
416
|
isLoading,
|
|
538
417
|
hasLoadMore
|
|
539
418
|
]);
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
419
|
+
const selection = useDeepCompareMemo(() => ({
|
|
420
|
+
selectedIds,
|
|
421
|
+
isMultiple
|
|
422
|
+
}), [selectedIds, isMultiple]);
|
|
423
|
+
return /* @__PURE__ */ jsx(SelectionContext.Provider, {
|
|
424
|
+
value: selection,
|
|
425
|
+
children: /* @__PURE__ */ jsx(Context.Provider, {
|
|
426
|
+
value,
|
|
427
|
+
children
|
|
428
|
+
})
|
|
543
429
|
});
|
|
544
430
|
};
|
|
431
|
+
_SelectContext.useSelection = () => use(SelectionContext);
|
|
545
432
|
_SelectContext.useSelect = () => {
|
|
546
433
|
return use(Context);
|
|
547
434
|
};
|
|
@@ -717,7 +604,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
717
604
|
...focusWithinProps,
|
|
718
605
|
children: [
|
|
719
606
|
/* @__PURE__ */ jsxs("div", {
|
|
720
|
-
className: clsx("relative flex flex-1 items-center gap-
|
|
607
|
+
className: clsx("relative flex flex-1 items-center gap-2 truncate pr-2!", !isDisabled && isSearchable && "cursor-text", !isDisabled && !isSearchable && "cursor-pointer", inputSizeCva({
|
|
721
608
|
as,
|
|
722
609
|
size,
|
|
723
610
|
...props
|
|
@@ -730,7 +617,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
730
617
|
labelProps
|
|
731
618
|
}),
|
|
732
619
|
leadingContent && /* @__PURE__ */ jsx("div", {
|
|
733
|
-
className: "
|
|
620
|
+
className: "flex shrink-0 items-center",
|
|
734
621
|
children: leadingContent
|
|
735
622
|
}),
|
|
736
623
|
(showTags || isSearchable) && /* @__PURE__ */ jsxs("div", {
|
|
@@ -745,7 +632,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
745
632
|
ref: inputRef,
|
|
746
633
|
placeholder: as === "floating" ? void 0 : placeholder,
|
|
747
634
|
onBlur,
|
|
748
|
-
className: clsx("min-w-0 w-full flex-1 bg-transparent outline-none placeholder:text-
|
|
635
|
+
className: clsx("min-w-0 w-full flex-1 bg-transparent outline-none placeholder:text-muted-foreground", "disabled:text-inherit disabled:placeholder:text-muted-foreground", inputClassName),
|
|
749
636
|
onKeyDown,
|
|
750
637
|
onKeyDownCapture: onInputKeyDownCapture,
|
|
751
638
|
...fieldProps
|
|
@@ -760,7 +647,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
760
647
|
onKeyDown: onTriggerKeyDown,
|
|
761
648
|
...fieldProps,
|
|
762
649
|
children: [(as === "floating" && isEmpty || isMultiple && !isEmpty) && /* @__PURE__ */ jsx(Fragment$1, { children: "\xA0" }), (isEmpty || !isMultiple) && (as !== "floating" || !isEmpty) && /* @__PURE__ */ jsxs("span", {
|
|
763
|
-
className: clsx("block truncate empty:before:inline-block empty:before:content-['']", isEmpty && "text-
|
|
650
|
+
className: clsx("block truncate empty:before:inline-block empty:before:content-['']", isEmpty && "text-muted-foreground"),
|
|
764
651
|
children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
|
|
765
652
|
})]
|
|
766
653
|
})
|
|
@@ -771,7 +658,8 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
771
658
|
onClear();
|
|
772
659
|
},
|
|
773
660
|
as,
|
|
774
|
-
show: showClearButton
|
|
661
|
+
show: showClearButton,
|
|
662
|
+
className: "mr-2"
|
|
775
663
|
}),
|
|
776
664
|
trailingContent && /* @__PURE__ */ jsx("div", {
|
|
777
665
|
className: "flex shrink-0 items-center",
|
|
@@ -780,15 +668,14 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
780
668
|
!hideDropdownIcon && /* @__PURE__ */ jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
781
669
|
excludeFromTabOrder: true,
|
|
782
670
|
"aria-label": t(($) => isOpen ? $.ui.closeAlt : $.ui.openAlt),
|
|
783
|
-
className: clsx("flex shrink-0 items-center justify-center self-stretch py-0! pl-
|
|
671
|
+
className: clsx("flex shrink-0 items-center justify-center self-stretch py-0! pl-0! outline-none disabled:text-inherit", inputSizeCva({ size })),
|
|
784
672
|
isDisabled,
|
|
785
673
|
onPress: () => {
|
|
786
674
|
if (!isSearchable) setIsOpen(!isOpen);
|
|
787
675
|
},
|
|
788
676
|
children: /* @__PURE__ */ jsx(IconSlot, {
|
|
789
677
|
icon: ChevronDown,
|
|
790
|
-
className: clsx("
|
|
791
|
-
iconClassName: "fill-current stroke-0",
|
|
678
|
+
className: clsx("opacity-50 transition-transform", isOpen && "rotate-180"),
|
|
792
679
|
"aria-hidden": "true"
|
|
793
680
|
})
|
|
794
681
|
})
|
|
@@ -796,257 +683,62 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
796
683
|
});
|
|
797
684
|
};
|
|
798
685
|
//#endregion
|
|
799
|
-
//#region src/components/inputs/Selection/shared/
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
content,
|
|
813
|
-
t
|
|
814
|
-
]);
|
|
815
|
-
return /* @__PURE__ */ jsxs($928221da08ecbc62$export$a11e76429ed99b4, {
|
|
816
|
-
ref,
|
|
817
|
-
id,
|
|
818
|
-
textValue: label,
|
|
819
|
-
isDisabled,
|
|
820
|
-
className: selectListItemCva({
|
|
821
|
-
isSingle: !isMultiple,
|
|
822
|
-
isNewItem
|
|
823
|
-
}),
|
|
824
|
-
children: [
|
|
825
|
-
isMultiple && !isSearchable && /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
826
|
-
variant: "default",
|
|
827
|
-
className: "group-focus-visible:outline-none!"
|
|
828
|
-
}),
|
|
829
|
-
isMultiple && isSearchable && /* @__PURE__ */ jsx("div", {
|
|
830
|
-
className: "group",
|
|
831
|
-
"data-rac": "",
|
|
832
|
-
"data-selected": selectedIds.includes(id) || void 0,
|
|
833
|
-
children: /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
834
|
-
variant: "default",
|
|
835
|
-
className: "group-focus-visible:outline-none!"
|
|
836
|
-
})
|
|
837
|
-
}),
|
|
838
|
-
itemContent
|
|
839
|
-
]
|
|
840
|
-
});
|
|
841
|
-
};
|
|
842
|
-
//#endregion
|
|
843
|
-
//#region src/components/inputs/Selection/shared/SelectListBoxItemSelectAll.tsx
|
|
844
|
-
const SelectListBoxItemSelectAll = ({ id, label, isDisabled }) => {
|
|
845
|
-
const selectListItemCva = UIOverrides.useCva("select.listBoxItemCva", selectListBoxItemDefinition);
|
|
846
|
-
const ref = useRef(null);
|
|
847
|
-
const { t } = useTranslation("ui");
|
|
848
|
-
const { selectableListItems, selectedIds } = SelectContext.useSelect();
|
|
849
|
-
return /* @__PURE__ */ jsxs($928221da08ecbc62$export$a11e76429ed99b4, {
|
|
850
|
-
ref,
|
|
851
|
-
id,
|
|
852
|
-
textValue: label || t(($) => $.ui.select.allOption),
|
|
853
|
-
isDisabled,
|
|
854
|
-
className: selectListItemCva({}),
|
|
855
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
856
|
-
className: "group",
|
|
857
|
-
"data-rac": "",
|
|
858
|
-
"data-selected": selectedIds.length === selectableListItems.length || void 0,
|
|
859
|
-
"data-indeterminate": selectedIds.length > 0 && selectedIds.length < selectableListItems.length || void 0,
|
|
860
|
-
children: /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
861
|
-
variant: "default",
|
|
862
|
-
className: "group-focus-visible:outline-none!"
|
|
863
|
-
})
|
|
864
|
-
}), t(($) => $.ui.select.allOption)]
|
|
865
|
-
});
|
|
866
|
-
};
|
|
867
|
-
//#endregion
|
|
868
|
-
//#region src/components/inputs/Selection/shared/SelectListBoxLoadingItem.tsx
|
|
869
|
-
const SelectListBoxLoadingItem = ({ id, label, onLoadMore }) => {
|
|
870
|
-
const selectListItemCva = UIOverrides.useCva("select.listBoxItemCva", selectListBoxItemDefinition);
|
|
871
|
-
const { t } = useTranslation("ui");
|
|
872
|
-
const { isDebouncing, isLoading, hasLoadMore } = SelectContext.useSelect();
|
|
873
|
-
const onIntersection = useCallback(() => {
|
|
874
|
-
if (!isDebouncing && !isLoading && hasLoadMore) onLoadMore?.();
|
|
875
|
-
}, [
|
|
876
|
-
isDebouncing,
|
|
877
|
-
isLoading,
|
|
878
|
-
hasLoadMore,
|
|
879
|
-
onLoadMore
|
|
880
|
-
]);
|
|
881
|
-
const { ref } = useIntersectionObserver({
|
|
882
|
-
onIntersection,
|
|
883
|
-
rootMargin: "40px"
|
|
884
|
-
});
|
|
885
|
-
return /* @__PURE__ */ jsx($928221da08ecbc62$export$a11e76429ed99b4, {
|
|
886
|
-
id,
|
|
887
|
-
textValue: label || t(($) => $.ui.loadingState.text),
|
|
888
|
-
isDisabled: true,
|
|
889
|
-
className: selectListItemCva({}),
|
|
890
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
891
|
-
ref,
|
|
892
|
-
className: "flex flex-1 justify-center text-interactive-subtle-primary-foreground",
|
|
893
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
894
|
-
})
|
|
895
|
-
});
|
|
896
|
-
};
|
|
897
|
-
//#endregion
|
|
898
|
-
//#region src/components/inputs/Selection/shared/SelectListBox.tsx
|
|
899
|
-
var ReversedListLayout = class extends $a3be900807531178$re_export$ListLayout {
|
|
900
|
-
reverseLayoutInfo(layoutInfo) {
|
|
901
|
-
const reversedLayoutInfo = layoutInfo.copy();
|
|
902
|
-
reversedLayoutInfo.rect.y = this.getContentSize().height - reversedLayoutInfo.rect.maxY;
|
|
903
|
-
return reversedLayoutInfo;
|
|
904
|
-
}
|
|
905
|
-
getLayoutInfo(key) {
|
|
906
|
-
const layoutInfo = super.getLayoutInfo(key);
|
|
907
|
-
return layoutInfo ? this.reverseLayoutInfo(layoutInfo) : null;
|
|
908
|
-
}
|
|
909
|
-
getVisibleLayoutInfos(rect) {
|
|
910
|
-
const mirroredRect = new $a3be900807531178$re_export$Rect(rect.x, Math.max(0, this.getContentSize().height - rect.maxY), rect.width, rect.height);
|
|
911
|
-
return super.getVisibleLayoutInfos(mirroredRect).map((layoutInfo) => this.reverseLayoutInfo(layoutInfo));
|
|
912
|
-
}
|
|
686
|
+
//#region src/components/inputs/Selection/shared/SelectListBox.lazy.tsx
|
|
687
|
+
let loadedListBox;
|
|
688
|
+
let pendingListBox;
|
|
689
|
+
const loadSelectListBox = () => pendingListBox ??= import("./SelectListBox-DeiPWhOP.js").then(({ SelectListBox }) => {
|
|
690
|
+
loadedListBox = SelectListBox;
|
|
691
|
+
return SelectListBox;
|
|
692
|
+
}).catch((error) => {
|
|
693
|
+
pendingListBox = void 0;
|
|
694
|
+
throw error;
|
|
695
|
+
});
|
|
696
|
+
/** Warm the same request consumed by the renderer. A failed preload can retry on opening. */
|
|
697
|
+
const preloadSelectListBox = () => {
|
|
698
|
+
loadSelectListBox().catch(() => {});
|
|
913
699
|
};
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
const
|
|
917
|
-
const
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
const loadMoreResetKey = loadedItemIds.join("\0");
|
|
926
|
-
useLayoutEffect(() => {
|
|
927
|
-
hasRequestedAtTopRef.current = false;
|
|
928
|
-
}, [loadMoreResetKey]);
|
|
929
|
-
useLayoutEffect(() => {
|
|
930
|
-
const previousLoadedItemIds = previousLoadedItemIdsRef.current;
|
|
931
|
-
const preservesExistingItems = previousLoadedItemIds.length > 0 && previousLoadedItemIds.every((itemId, index) => loadedItemIds[index] === itemId);
|
|
932
|
-
previousLoadedItemIdsRef.current = loadedItemIds;
|
|
933
|
-
if (!preservesExistingItems) reverseScrollBottomOffsetRef.current = 0;
|
|
934
|
-
const listBox = listBoxRef.current;
|
|
935
|
-
if (!listBox) {
|
|
936
|
-
isReverseScrollAnchoredRef.current = true;
|
|
937
|
-
return;
|
|
938
|
-
}
|
|
939
|
-
if (!isReversed) {
|
|
940
|
-
listBox.scrollTop = 0;
|
|
941
|
-
isReverseScrollAnchoredRef.current = true;
|
|
942
|
-
return;
|
|
943
|
-
}
|
|
944
|
-
isReverseScrollAnchoredRef.current = false;
|
|
945
|
-
const finishAnchoring = () => {
|
|
946
|
-
if (listBox.scrollHeight <= listBox.clientHeight) return false;
|
|
947
|
-
listBox.scrollTop = listBox.scrollHeight - listBox.clientHeight - reverseScrollBottomOffsetRef.current;
|
|
948
|
-
isReverseScrollAnchoredRef.current = true;
|
|
949
|
-
return true;
|
|
950
|
-
};
|
|
951
|
-
let scrollFrame = requestAnimationFrame(() => {
|
|
952
|
-
scrollFrame = requestAnimationFrame(() => {
|
|
953
|
-
if (!finishAnchoring()) isReverseScrollAnchoredRef.current = true;
|
|
954
|
-
});
|
|
700
|
+
/** Load only when mounted, without delaying ready options behind a Suspense reveal. */
|
|
701
|
+
const SelectListBox = (props) => {
|
|
702
|
+
const [Component, setComponent] = useState(() => loadedListBox);
|
|
703
|
+
const [failure, setFailure] = useState(null);
|
|
704
|
+
useEffect(() => {
|
|
705
|
+
if (Component) return;
|
|
706
|
+
let active = true;
|
|
707
|
+
loadSelectListBox().then((component) => {
|
|
708
|
+
if (active) setComponent(() => component);
|
|
709
|
+
}, (error) => {
|
|
710
|
+
if (active) setFailure({ error });
|
|
955
711
|
});
|
|
956
712
|
return () => {
|
|
957
|
-
|
|
958
|
-
reverseScrollBottomOffsetRef.current = listBox.scrollHeight - listBox.clientHeight - listBox.scrollTop;
|
|
713
|
+
active = false;
|
|
959
714
|
};
|
|
960
|
-
}, [
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
loadedItemIds
|
|
964
|
-
]);
|
|
965
|
-
const onSelectionChange = (value) => {
|
|
966
|
-
const ids = Array.from(value);
|
|
967
|
-
if (!isMultiple && ids.length === 0) {
|
|
968
|
-
if (fieldState.value) {
|
|
969
|
-
onClose?.();
|
|
970
|
-
onChange(fieldState.value);
|
|
971
|
-
}
|
|
972
|
-
return;
|
|
973
|
-
}
|
|
974
|
-
if (isMultiple && ids.includes("all-item-id")) {
|
|
975
|
-
if (ids.length > selectableListItems.length) onClear();
|
|
976
|
-
else onSelectAll();
|
|
977
|
-
return;
|
|
978
|
-
}
|
|
979
|
-
if (isMultiple) onChange(ids);
|
|
980
|
-
else {
|
|
981
|
-
onClose?.();
|
|
982
|
-
onChange(ids[0]);
|
|
983
|
-
}
|
|
984
|
-
};
|
|
985
|
-
const requestLoadMore = useCallback(() => {
|
|
986
|
-
if (isLoading) return;
|
|
987
|
-
if (isReversed && (!isReverseScrollAnchoredRef.current || (listBoxRef.current?.scrollTop ?? 0) > 1 || hasRequestedAtTopRef.current)) return;
|
|
988
|
-
if (isReversed) hasRequestedAtTopRef.current = true;
|
|
989
|
-
onLoadMore?.();
|
|
990
|
-
}, [
|
|
991
|
-
isLoading,
|
|
992
|
-
isReversed,
|
|
993
|
-
onLoadMore
|
|
994
|
-
]);
|
|
995
|
-
const onScroll = (event) => {
|
|
996
|
-
if (!isReversed || !hasLoadMore || !isReverseScrollAnchoredRef.current) return;
|
|
997
|
-
if (event.currentTarget.scrollTop > 48) hasRequestedAtTopRef.current = false;
|
|
998
|
-
else requestLoadMore();
|
|
999
|
-
};
|
|
1000
|
-
const renderItem = (item) => {
|
|
1001
|
-
if (item.isSelectAllItem) return /* @__PURE__ */ jsx(SelectListBoxItemSelectAll, { ...item }, item.id);
|
|
1002
|
-
if (item.isLoadingItem) return /* @__PURE__ */ jsx(SelectListBoxLoadingItem, {
|
|
1003
|
-
...item,
|
|
1004
|
-
onLoadMore: requestLoadMore
|
|
1005
|
-
}, item.id);
|
|
1006
|
-
return /* @__PURE__ */ jsx(SelectListBoxItem, {
|
|
1007
|
-
...item,
|
|
1008
|
-
isSearchable,
|
|
1009
|
-
isNewItem: item.isNewItem,
|
|
1010
|
-
newItemRender
|
|
1011
|
-
}, item.id);
|
|
1012
|
-
};
|
|
1013
|
-
if (shouldVirtualize) return /* @__PURE__ */ jsx($143fb904d86051ce$export$89be5a243e59c4b2, {
|
|
1014
|
-
layout: usesReversedLayout ? ReversedListLayout : $a3be900807531178$re_export$ListLayout,
|
|
1015
|
-
layoutOptions: virtualizerOptions,
|
|
1016
|
-
children: /* @__PURE__ */ jsx($928221da08ecbc62$export$41f133550aa26f48, {
|
|
1017
|
-
ref: listBoxRef,
|
|
1018
|
-
...props,
|
|
1019
|
-
"aria-label": label,
|
|
1020
|
-
selectionMode,
|
|
1021
|
-
className: clsx("flex-1 outline-none [&>div:last-child>*]:border-b-0", isScrollable ? "max-h-full overflow-y-auto overflow-x-hidden" : "overflow-hidden", className),
|
|
1022
|
-
items: displayedListItems,
|
|
1023
|
-
selectedKeys: selectedIds,
|
|
1024
|
-
onSelectionChange,
|
|
1025
|
-
onScroll,
|
|
1026
|
-
escapeKeyBehavior: "none",
|
|
1027
|
-
shouldSelectOnPressUp: true,
|
|
1028
|
-
children: renderItem
|
|
1029
|
-
})
|
|
1030
|
-
});
|
|
1031
|
-
return /* @__PURE__ */ jsx($928221da08ecbc62$export$41f133550aa26f48, {
|
|
1032
|
-
ref: listBoxRef,
|
|
1033
|
-
...props,
|
|
1034
|
-
"aria-label": label,
|
|
1035
|
-
selectionMode,
|
|
1036
|
-
className: clsx("flex-1 outline-none [&>div:last-child]:border-b-0", isScrollable ? "max-h-full overflow-y-auto overflow-x-hidden" : "overflow-hidden", className),
|
|
1037
|
-
items: displayedListItems,
|
|
1038
|
-
selectedKeys: selectedIds,
|
|
1039
|
-
onSelectionChange,
|
|
1040
|
-
onScroll,
|
|
1041
|
-
escapeKeyBehavior: "none",
|
|
1042
|
-
shouldSelectOnPressUp: true,
|
|
1043
|
-
children: renderItem
|
|
1044
|
-
});
|
|
715
|
+
}, [Component]);
|
|
716
|
+
if (failure) throw failure.error;
|
|
717
|
+
return Component ? /* @__PURE__ */ jsx(Component, { ...props }) : null;
|
|
1045
718
|
};
|
|
1046
719
|
//#endregion
|
|
1047
720
|
//#region src/components/inputs/Selection/shared/SelectDesktop.tsx
|
|
1048
|
-
const
|
|
1049
|
-
const {
|
|
721
|
+
const SelectPopoverSearch = ({ hideSearchIcon }) => {
|
|
722
|
+
const { t } = useTranslation("ui");
|
|
723
|
+
const { ref, ...inputProps } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e($4b38b5b75ecc6208$export$698f465ec27e93df) ?? {};
|
|
724
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
725
|
+
...inputProps,
|
|
726
|
+
ref,
|
|
727
|
+
label: t(($) => $.ui.select.search),
|
|
728
|
+
hideLabel: true,
|
|
729
|
+
size: "small",
|
|
730
|
+
placeholder: t(($) => $.ui.select.search),
|
|
731
|
+
leadingIcon: !hideSearchIcon ? Search : void 0,
|
|
732
|
+
isClearable: true,
|
|
733
|
+
renderStaticInput: false,
|
|
734
|
+
autoFocusOnMount: true,
|
|
735
|
+
className: "shrink-0 p-1"
|
|
736
|
+
});
|
|
737
|
+
};
|
|
738
|
+
const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, inputClassName, containerClassName, leadingContent, trailingContent, customTrigger, searchPlacement = "field", onBlur, onMouseEnter, onFocusCapture, ...props }) => {
|
|
739
|
+
const { label, tooltipText, helperText, isDirty, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, isSearchable: isSearchableProp, isClearable, isClearableIfDisabled, isScrollPreventDisabled, isLoading, as, size, collapseAfter, selectedTagsType } = props;
|
|
740
|
+
const isSearchInPopover = !!isSearchableProp && searchPlacement === "popover";
|
|
741
|
+
const isSearchable = !!isSearchableProp && !isSearchInPopover;
|
|
1050
742
|
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
1051
743
|
const selectPopoverCva = UIOverrides.useCva("select.popoverCva", selectPopoverDefinition);
|
|
1052
744
|
const formFieldProps = {
|
|
@@ -1065,23 +757,32 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1065
757
|
const { labelProps, fieldProps } = useLabel({ label });
|
|
1066
758
|
const triggerRef = useRef(null);
|
|
1067
759
|
const closeComboBoxRef = useRef(null);
|
|
1068
|
-
const wrapperRef = useRef(null);
|
|
1069
760
|
const popoverRef = useRef(null);
|
|
1070
761
|
const [popoverWidth, setPopoverWidth] = useState(void 0);
|
|
1071
762
|
const [isPopoverAbove, setIsPopoverAbove] = useState(false);
|
|
1072
763
|
const { fieldState, isOpen, setIsOpen, onInputChange, onChange, onClear, onSelectAll, listItems, selectableListItems, selectedIds, isMultiple } = SelectContext.useSelect();
|
|
1073
|
-
|
|
764
|
+
const [hasOpened, setHasOpened] = useState(isOpen);
|
|
765
|
+
if (isOpen && !hasOpened) setHasOpened(true);
|
|
766
|
+
usePreventScroll({ isDisabled: !isOpen || isScrollPreventDisabled });
|
|
767
|
+
useEffect(() => {
|
|
768
|
+
if (isSearchInPopover && !isOpen && fieldState.inputValue !== "") onInputChange?.("");
|
|
769
|
+
}, [
|
|
770
|
+
isSearchInPopover,
|
|
771
|
+
isOpen,
|
|
772
|
+
fieldState.inputValue,
|
|
773
|
+
onInputChange
|
|
774
|
+
]);
|
|
1074
775
|
useLayoutEffect(() => {
|
|
1075
|
-
if (!isOpen || !
|
|
1076
|
-
|
|
1077
|
-
const
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
observer.observe(
|
|
776
|
+
if (!isOpen || ignoreTriggerWidth || !triggerRef.current) return;
|
|
777
|
+
const trigger = triggerRef.current;
|
|
778
|
+
const updateWidth = () => setPopoverWidth(trigger.getBoundingClientRect().width);
|
|
779
|
+
updateWidth();
|
|
780
|
+
const observer = new ResizeObserver(updateWidth);
|
|
781
|
+
observer.observe(trigger, { box: "border-box" });
|
|
1081
782
|
return () => {
|
|
1082
783
|
observer.disconnect();
|
|
1083
784
|
};
|
|
1084
|
-
}, [isOpen]);
|
|
785
|
+
}, [isOpen, ignoreTriggerWidth]);
|
|
1085
786
|
const onSelectionChange = (value) => {
|
|
1086
787
|
if (!value) return;
|
|
1087
788
|
if (value === "all-item-id") {
|
|
@@ -1152,6 +853,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1152
853
|
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
1153
854
|
as,
|
|
1154
855
|
error,
|
|
856
|
+
triggerTabIndex: -1,
|
|
1155
857
|
children: /* @__PURE__ */ jsx(WrapperComponent, {
|
|
1156
858
|
...isSearchable ? comboBoxProps : {},
|
|
1157
859
|
children: /* @__PURE__ */ jsxs(FormField, {
|
|
@@ -1161,9 +863,14 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1161
863
|
className: clsx("group w-full", containerClassName)
|
|
1162
864
|
},
|
|
1163
865
|
as,
|
|
1164
|
-
onMouseEnter
|
|
1165
|
-
|
|
1166
|
-
|
|
866
|
+
onMouseEnter: (event) => {
|
|
867
|
+
preloadSelectListBox();
|
|
868
|
+
onMouseEnter?.(event);
|
|
869
|
+
},
|
|
870
|
+
onFocusCapture: (event) => {
|
|
871
|
+
preloadSelectListBox();
|
|
872
|
+
onFocusCapture?.(event);
|
|
873
|
+
},
|
|
1167
874
|
children: [customTrigger ? /* @__PURE__ */ jsx($f2ff30fde7b014be$export$2e1e1122cf0cba88, {
|
|
1168
875
|
...dialogTriggerProps,
|
|
1169
876
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -1199,7 +906,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1199
906
|
},
|
|
1200
907
|
fieldProps,
|
|
1201
908
|
headerProps
|
|
1202
|
-
}), (!isSearchable || showPopover) && /* @__PURE__ */ jsx($542a13ca2fa5b484$export$5b6b19405a83ff9d, {
|
|
909
|
+
}), hasOpened && (!isSearchable || showPopover) && /* @__PURE__ */ jsx($542a13ca2fa5b484$export$5b6b19405a83ff9d, {
|
|
1203
910
|
ref: popoverRef,
|
|
1204
911
|
triggerRef,
|
|
1205
912
|
isOpen,
|
|
@@ -1207,7 +914,19 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1207
914
|
className: clsx("origin-(--trigger-anchor-point) transition-[opacity,scale] duration-150 ease-out starting:scale-96 starting:opacity-0 entering:scale-96 entering:opacity-0 exiting:scale-96 exiting:opacity-0 exiting:duration-100 motion-reduce:transition-none", selectPopoverCva({})),
|
|
1208
915
|
style: { width: !ignoreTriggerWidth ? popoverWidth : void 0 },
|
|
1209
916
|
offset: 0,
|
|
1210
|
-
children: /* @__PURE__ */ jsx(
|
|
917
|
+
children: isSearchInPopover ? /* @__PURE__ */ jsx("div", {
|
|
918
|
+
className: clsx(popoverCva({}), "flex max-h-80! flex-col overflow-hidden"),
|
|
919
|
+
children: /* @__PURE__ */ jsxs($4b38b5b75ecc6208$export$2f2b9559550c7bbc, {
|
|
920
|
+
inputValue: fieldState.inputValue,
|
|
921
|
+
onInputChange,
|
|
922
|
+
children: [/* @__PURE__ */ jsx(SelectPopoverSearch, { hideSearchIcon: props.hideSearchIcon }), /* @__PURE__ */ jsx(SelectListBox, {
|
|
923
|
+
...props,
|
|
924
|
+
isSearchable: false,
|
|
925
|
+
className: "min-h-0 flex-1 [scrollbar-width:thin]",
|
|
926
|
+
isReversed: isPopoverAbove
|
|
927
|
+
})]
|
|
928
|
+
})
|
|
929
|
+
}) : /* @__PURE__ */ jsx(SelectListBox, {
|
|
1211
930
|
...props,
|
|
1212
931
|
className: clsx(popoverCva({}), "max-h-80! [scrollbar-width:thin]"),
|
|
1213
932
|
autoFocus: !isSearchable,
|
|
@@ -1225,10 +944,10 @@ const FormFieldHeaderClose = ({ onClose }) => {
|
|
|
1225
944
|
return /* @__PURE__ */ jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
1226
945
|
onPress: onClose,
|
|
1227
946
|
"aria-label": t(($) => $.ui.closeAlt),
|
|
1228
|
-
className: "shrink-0 focus-visible:
|
|
947
|
+
className: "shrink-0 rounded-sm opacity-70 transition-opacity outline-none hover:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
1229
948
|
children: /* @__PURE__ */ jsx(IconSlot, {
|
|
1230
949
|
icon: X,
|
|
1231
|
-
className: "text-
|
|
950
|
+
className: "text-muted-foreground"
|
|
1232
951
|
})
|
|
1233
952
|
});
|
|
1234
953
|
};
|
|
@@ -1238,7 +957,7 @@ const SelectListBoxSelectionBar = ({ className }) => {
|
|
|
1238
957
|
const { t } = useTranslation("ui");
|
|
1239
958
|
const { onClear, onSelectAll } = SelectContext.useSelect();
|
|
1240
959
|
return /* @__PURE__ */ jsxs("div", {
|
|
1241
|
-
className: clsx("flex items-center justify-between border-border
|
|
960
|
+
className: clsx("flex items-center justify-between border-border border-b px-4 py-3", className),
|
|
1242
961
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
1243
962
|
type: "button",
|
|
1244
963
|
color: "primary",
|
|
@@ -1258,7 +977,7 @@ const SelectListBoxSelectionBar = ({ className }) => {
|
|
|
1258
977
|
};
|
|
1259
978
|
//#endregion
|
|
1260
979
|
//#region src/components/inputs/Selection/shared/SelectMobile.tsx
|
|
1261
|
-
const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containerClassName, leadingContent, trailingContent, customTrigger, onBlur, onMouseEnter, onFocusCapture, bottomSheetProps, ...props }) => {
|
|
980
|
+
const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containerClassName, leadingContent, trailingContent, customTrigger, searchPlacement: _searchPlacement, onBlur, onMouseEnter, onFocusCapture, bottomSheetProps, ...props }) => {
|
|
1262
981
|
const { label, tooltipText, helperText, isDirty, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, hideSearchIcon, isSearchable, isClearable, isClearableIfDisabled, as, size, collapseAfter, selectedTagsType } = props;
|
|
1263
982
|
const formFieldProps = {
|
|
1264
983
|
error,
|
|
@@ -1303,7 +1022,10 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1303
1022
|
labelProps,
|
|
1304
1023
|
className: clsx("group w-full", containerClassName),
|
|
1305
1024
|
onMouseEnter,
|
|
1306
|
-
onFocusCapture
|
|
1025
|
+
onFocusCapture: (event) => {
|
|
1026
|
+
preloadSelectListBox();
|
|
1027
|
+
onFocusCapture?.(event);
|
|
1028
|
+
},
|
|
1307
1029
|
children: /* @__PURE__ */ jsxs($f2ff30fde7b014be$export$2e1e1122cf0cba88, {
|
|
1308
1030
|
...dialogTriggerProps,
|
|
1309
1031
|
children: [customTrigger ? /* @__PURE__ */ jsx("div", {
|
|
@@ -1354,8 +1076,8 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1354
1076
|
onChange: onInputChange,
|
|
1355
1077
|
rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
|
|
1356
1078
|
inputClassName,
|
|
1357
|
-
className: "mb-
|
|
1358
|
-
leadingIcon: !hideSearchIcon ? /* @__PURE__ */ jsx(Search, { className: "size-
|
|
1079
|
+
className: "mb-2 px-4",
|
|
1080
|
+
leadingIcon: !hideSearchIcon ? /* @__PURE__ */ jsx(Search, { className: "size-4" }) : void 0,
|
|
1359
1081
|
isClearable
|
|
1360
1082
|
}), /* @__PURE__ */ jsx(SelectListBox, {
|
|
1361
1083
|
...props,
|
|
@@ -1370,17 +1092,18 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1370
1092
|
};
|
|
1371
1093
|
//#endregion
|
|
1372
1094
|
//#region src/components/inputs/Selection/shared/SelectBase.tsx
|
|
1373
|
-
const SelectBase = (dProps) => {
|
|
1095
|
+
const SelectBase = ({ layout, ...dProps }) => {
|
|
1374
1096
|
const ui = UIConfig.useConfig();
|
|
1375
|
-
const props =
|
|
1097
|
+
const props = {
|
|
1376
1098
|
...dProps,
|
|
1377
1099
|
selectionMode: dProps.selectionMode ?? ui.select.selectionMode,
|
|
1378
1100
|
variant: dProps.variant ?? ui.input.variant,
|
|
1379
|
-
as: dProps.as
|
|
1101
|
+
as: resolveInputLayout(layout, dProps.as, ui.input.as),
|
|
1380
1102
|
size: dProps.size ?? ui.input.size,
|
|
1381
1103
|
hideLabel: dProps.hideLabel ?? ui.input.hideLabel,
|
|
1382
1104
|
isClearable: dProps.isClearable ?? ui.input.isClearable,
|
|
1383
1105
|
isSearchable: dProps.isSearchable ?? ui.select.isSearchable,
|
|
1106
|
+
isScrollPreventDisabled: dProps.isScrollPreventDisabled ?? ui.select.isScrollPreventDisabled,
|
|
1384
1107
|
selectedTagsType: dProps.selectedTagsType ?? ui.select.selectedTagsType,
|
|
1385
1108
|
ignoreTriggerWidth: dProps.virtualizerOptions || (dProps.totalItems ?? 0) > 100 || dProps.hasLoadMore ? false : dProps.ignoreTriggerWidth ?? false,
|
|
1386
1109
|
collapseAfter: dProps.collapseAfter ?? ui.select.collapseAfter,
|
|
@@ -1388,11 +1111,7 @@ const SelectBase = (dProps) => {
|
|
|
1388
1111
|
multiSelectAutoConfirm: dProps.multiSelectAutoConfirm ?? ui.select.multiSelectAutoConfirm,
|
|
1389
1112
|
searchDebounceDelay: dProps.searchDebounceDelay ?? ui.select.searchDebounceDelay,
|
|
1390
1113
|
isClientSearchDisabled: dProps.ignoreInputValueFiltering ?? dProps.isClientSearchDisabled
|
|
1391
|
-
}
|
|
1392
|
-
dProps,
|
|
1393
|
-
ui.input,
|
|
1394
|
-
ui.select
|
|
1395
|
-
]);
|
|
1114
|
+
};
|
|
1396
1115
|
const isDesktop = useBreakpoint("md");
|
|
1397
1116
|
return /* @__PURE__ */ jsx(SelectContext.Provider, {
|
|
1398
1117
|
...props,
|
|
@@ -1410,13 +1129,12 @@ const StaticSelectTrailingContent = ({ trailingContent, hideDropdownIcon, size,
|
|
|
1410
1129
|
}), !hideDropdownIcon ? /* @__PURE__ */ jsx("button", {
|
|
1411
1130
|
type: "button",
|
|
1412
1131
|
tabIndex: -1,
|
|
1413
|
-
className: clsx("flex shrink-0 items-center justify-center self-stretch border-0! py-0! pl-
|
|
1132
|
+
className: clsx("flex shrink-0 items-center justify-center self-stretch border-0! py-0! pl-0! outline-none disabled:text-inherit", inputSizeCva({ size })),
|
|
1414
1133
|
disabled: isDisabled,
|
|
1415
1134
|
"aria-hidden": "true",
|
|
1416
1135
|
children: /* @__PURE__ */ jsx(IconSlot, {
|
|
1417
1136
|
icon: ChevronDown,
|
|
1418
|
-
className: "
|
|
1419
|
-
iconClassName: "fill-current stroke-0"
|
|
1137
|
+
className: "opacity-50"
|
|
1420
1138
|
})
|
|
1421
1139
|
}) : void 0] });
|
|
1422
1140
|
};
|
|
@@ -1444,9 +1162,25 @@ const getStaticSelectValue = ({ items, value, selectionMode, initialSelection, m
|
|
|
1444
1162
|
id: item.id,
|
|
1445
1163
|
label: item.label ?? item.name ?? ""
|
|
1446
1164
|
})), showSelectionContent, isDisabled, collapseAfter, selectedTagsType }) => {
|
|
1447
|
-
|
|
1165
|
+
if (value == null || Array.isArray(value) && value.length === 0) return {
|
|
1166
|
+
selectedItem: null,
|
|
1167
|
+
selectedItems: [],
|
|
1168
|
+
displayValue: "",
|
|
1169
|
+
isEmpty: true
|
|
1170
|
+
};
|
|
1171
|
+
const remaining = new Set(Array.isArray(value) ? value : [value]);
|
|
1448
1172
|
const allItemsMap = /* @__PURE__ */ new Map();
|
|
1449
|
-
|
|
1173
|
+
for (let index = items.length - 1; index >= 0 && remaining.size > 0; index -= 1) {
|
|
1174
|
+
const item = items[index];
|
|
1175
|
+
if (remaining.delete(item.id)) allItemsMap.set(item.id, item);
|
|
1176
|
+
}
|
|
1177
|
+
if (remaining.size > 0 && initialSelection) {
|
|
1178
|
+
const initialItems = Array.isArray(initialSelection) ? initialSelection : [initialSelection];
|
|
1179
|
+
for (let index = initialItems.length - 1; index >= 0 && remaining.size > 0; index -= 1) {
|
|
1180
|
+
const item = mapInitialToSelectItem(initialItems[index]);
|
|
1181
|
+
if (remaining.delete(item.id)) allItemsMap.set(item.id, item);
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1450
1184
|
const getItem = (id) => allItemsMap.get(id) ?? null;
|
|
1451
1185
|
const selectedItems = Array.isArray(value) ? value.map((id) => getItem(id)).filter((item) => item != null) : [];
|
|
1452
1186
|
const selectedItem = !Array.isArray(value) && value != null ? getItem(value) : null;
|
|
@@ -1501,25 +1235,38 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1501
1235
|
const currentValue = props.value;
|
|
1502
1236
|
if (!renderInput && props.selectionMode !== "multiple" && !!props.showSelectionContent && currentValue != null) setRenderInput(true);
|
|
1503
1237
|
if (!renderInput && !!props.customTrigger) setRenderInput(true);
|
|
1504
|
-
|
|
1505
|
-
|
|
1238
|
+
const mode = props.selectionMode ?? ui.select.selectionMode;
|
|
1239
|
+
const isDisabled = !!(isFormControlDisabled || props.isDisabled);
|
|
1240
|
+
const collapseAfter = props.collapseAfter ?? ui.select.collapseAfter;
|
|
1241
|
+
const selectedTagsType = props.selectedTagsType ?? ui.select.selectedTagsType;
|
|
1242
|
+
const staticSelection = useMemo(() => renderInput ? null : getStaticSelectValue({
|
|
1243
|
+
items: props.items,
|
|
1244
|
+
value: currentValue,
|
|
1245
|
+
selectionMode: mode,
|
|
1246
|
+
initialSelection: props.initialSelection,
|
|
1247
|
+
mapInitialToSelectItem: props.mapInitialToSelectItem,
|
|
1248
|
+
showSelectionContent: props.showSelectionContent,
|
|
1249
|
+
isDisabled,
|
|
1250
|
+
collapseAfter,
|
|
1251
|
+
selectedTagsType
|
|
1252
|
+
}), [
|
|
1253
|
+
renderInput,
|
|
1254
|
+
props.items,
|
|
1255
|
+
currentValue,
|
|
1256
|
+
mode,
|
|
1257
|
+
props.initialSelection,
|
|
1258
|
+
props.mapInitialToSelectItem,
|
|
1259
|
+
props.showSelectionContent,
|
|
1260
|
+
isDisabled,
|
|
1261
|
+
collapseAfter,
|
|
1262
|
+
selectedTagsType
|
|
1263
|
+
]);
|
|
1264
|
+
if (!renderInput && staticSelection) {
|
|
1265
|
+
const as = resolveInputLayout(props.layout, props.as, ui.input.as);
|
|
1506
1266
|
const size = props.size ?? ui.input.size;
|
|
1507
|
-
let isDisabled = !!props.isDisabled;
|
|
1508
|
-
if (isFormControlDisabled) isDisabled = true;
|
|
1509
|
-
const mode = props.selectionMode ?? ui.select.selectionMode;
|
|
1510
1267
|
const isMultiple = mode === "multiple";
|
|
1511
|
-
const { selectedItem, displayValue, isEmpty } =
|
|
1512
|
-
|
|
1513
|
-
value: currentValue,
|
|
1514
|
-
selectionMode: mode,
|
|
1515
|
-
initialSelection: props.initialSelection,
|
|
1516
|
-
mapInitialToSelectItem: props.mapInitialToSelectItem,
|
|
1517
|
-
showSelectionContent: props.showSelectionContent,
|
|
1518
|
-
isDisabled,
|
|
1519
|
-
collapseAfter: props.collapseAfter ?? ui.select.collapseAfter,
|
|
1520
|
-
selectedTagsType: props.selectedTagsType ?? ui.select.selectedTagsType
|
|
1521
|
-
});
|
|
1522
|
-
const isSearchable = props.isSearchable ?? ui.select.isSearchable;
|
|
1268
|
+
const { selectedItem, displayValue, isEmpty } = staticSelection;
|
|
1269
|
+
const isSearchable = (props.isSearchable ?? ui.select.isSearchable) && props.searchPlacement !== "popover";
|
|
1523
1270
|
const trailingContent = /* @__PURE__ */ jsx(StaticSelectTrailingContent, {
|
|
1524
1271
|
trailingContent: props.trailingContent,
|
|
1525
1272
|
hideDropdownIcon: props.hideDropdownIcon,
|
|
@@ -1541,7 +1288,7 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1541
1288
|
dataHasSearch: false
|
|
1542
1289
|
};
|
|
1543
1290
|
const buttonContent = as === "floating" && isEmpty || isMultiple && !isEmpty ? /* @__PURE__ */ jsx(Fragment$1, { children: "\xA0" }) : isEmpty ? /* @__PURE__ */ jsx("span", {
|
|
1544
|
-
className: "block truncate text-
|
|
1291
|
+
className: "block truncate text-muted-foreground empty:before:inline-block empty:before:content-['']",
|
|
1545
1292
|
children: placeholder
|
|
1546
1293
|
}) : /* @__PURE__ */ jsx("span", {
|
|
1547
1294
|
className: "block truncate",
|
|
@@ -1555,13 +1302,15 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1555
1302
|
inputClassName: clsx(props.className, props.inputClassName),
|
|
1556
1303
|
contentWrapperClassName: selectInputTagsContentWrapperCva({ isSearchable }),
|
|
1557
1304
|
contentGroup: "select",
|
|
1305
|
+
contentClassName: "pr-2!",
|
|
1306
|
+
clearClassName: "mr-2",
|
|
1558
1307
|
labelPlacement: "content-row",
|
|
1559
1308
|
dataAttributes,
|
|
1560
1309
|
wrapTrailingContent: false,
|
|
1561
1310
|
onStaticInteract: renderRealInput,
|
|
1562
1311
|
onStaticPress: replayStaticInputPress,
|
|
1563
1312
|
leadingContent: props.leadingContent && /* @__PURE__ */ jsx("div", {
|
|
1564
|
-
className: "
|
|
1313
|
+
className: "flex shrink-0 items-center",
|
|
1565
1314
|
children: props.leadingContent
|
|
1566
1315
|
}),
|
|
1567
1316
|
onClear: () => props.onChange?.(isMultiple ? [] : null),
|
|
@@ -1576,7 +1325,7 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1576
1325
|
"aria-expanded": false,
|
|
1577
1326
|
value: inputValue,
|
|
1578
1327
|
placeholder: shouldRenderPlaceholderAfterValue ? props.placeholder : placeholder ?? void 0,
|
|
1579
|
-
className: clsx("min-w-0 w-full flex-1 bg-transparent outline-none placeholder:text-
|
|
1328
|
+
className: clsx("min-w-0 w-full flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:text-inherit", props.inputClassName),
|
|
1580
1329
|
onChange: (event) => replayStaticInputChange(event.target.value),
|
|
1581
1330
|
...dataAttributeProps,
|
|
1582
1331
|
"data-rac": true
|
|
@@ -1602,4 +1351,4 @@ function Select(props) {
|
|
|
1602
1351
|
return /* @__PURE__ */ jsx(SelectInner, { ...props });
|
|
1603
1352
|
}
|
|
1604
1353
|
//#endregion
|
|
1605
|
-
export { useKeyInteractions as a, getKeyInteractionAction as i, SelectInner as n,
|
|
1354
|
+
export { useKeyInteractions as a, LoadingItemId as c, getKeyInteractionAction as i, SelectAllItemId as l, SelectInner as n, SelectContext as o, createKeyInteractionsHandler as r, useDebounceCallback as s, Select as t };
|