@povio/ui 5.0.0-rc.9 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +272 -58
- package/dist/{Accordion-BzwO4_ml.js → Accordion-ORBin0EZ.js} +13 -119
- package/dist/{Alert-DfiJbKH0.d.ts → Alert-24ruR0iF.d.ts} +3 -3
- package/dist/{AlertDialog-OWTbR4km.d.ts → AlertDialog-Co3gNMwE.d.ts} +3 -3
- package/dist/Autocomplete-BQ9ZQoJt.d.ts +23 -0
- package/dist/Autocomplete-DbALLWP0.js +145 -0
- package/dist/Autocomplete.bound-DCPZBYKR.js +28 -0
- package/dist/Autocomplete.bound-DCbFBXjJ.d.ts +9 -0
- package/dist/{Badge-CBNpj823.d.ts → Badge-DZLVacMd.d.ts} +2 -2
- package/dist/{BadgeButton-Ccgt3oGO.d.ts → BadgeButton-coK9Fzoc.d.ts} +2 -2
- package/dist/{BottomSheet-DbQuzfAB.d.ts → BottomSheet-BlcmdfAT.d.ts} +1 -1
- package/dist/{BottomSheet-BXLE3161.js → BottomSheet-CGipksM_.js} +12 -86
- package/dist/{BottomSheet.lazy-D9LCEo7s.d.ts → BottomSheet.lazy-CGjuurej.d.ts} +1 -1
- package/dist/{Breadcrumbs-CUV6CU8Q.d.ts → Breadcrumbs-DfREVuAC.d.ts} +1 -1
- package/dist/{Breadcrumbs-FF8hMfXd.js → Breadcrumbs-a1-q_he0.js} +20 -17
- package/dist/{Button-D6KlWSFL.js → Button-C1YB5dOw.js} +3 -3
- package/dist/Button-Cphxmj43.d.ts +13 -0
- package/dist/Button-dRFJundh.js +16 -0
- package/dist/ButtonBase-BCYFCbSV.js +87 -0
- package/dist/ButtonBase-CfSqmiom.d.ts +32 -0
- package/dist/{ButtonContent-c7lJayVQ.js → ButtonContent-Dztbuz3q.js} +5 -14
- package/dist/{Calendar-BTjajO6i.js → Calendar-B9jqOJB6.js} +29 -181
- package/dist/Calendar.lazy-4d7pbB4k.js +131 -0
- package/dist/{CheckContent-D7sZPmzx.js → CheckContent-BKLnTPZr.js} +2 -2
- package/dist/{Checkbox-DVTWaMKa.d.ts → Checkbox-D2VVq5Bi.d.ts} +9 -8
- package/dist/{Checkbox-CV1ILXXO.js → Checkbox-DYeofZzs.js} +21 -38
- package/dist/Checkbox.bound-DyQFIVCw.js +33 -0
- package/dist/Checkbox.bound-Hdvnrnwb.d.ts +9 -0
- package/dist/CheckboxCheckmark-DYhxLfZN.js +25 -0
- package/dist/CheckboxGroup-CK_tTvvI.js +141 -0
- package/dist/CheckboxGroup-CTkBMnBN.d.ts +30 -0
- package/dist/CheckboxGroup.bound-C6e91DCT.d.ts +9 -0
- package/dist/CheckboxGroup.bound-DyCp83EI.js +32 -0
- package/dist/ComboBox-ChsdI0lt.js +212 -0
- package/dist/{DatePicker-8xSs_jNd.d.ts → DatePicker-1VbVBI4l.d.ts} +21 -10
- package/dist/{DatePicker-DOLL7mkc.js → DatePicker-CJj3Gp_S.js} +47 -54
- package/dist/DatePicker.bound-BWPOirPV.js +36 -0
- package/dist/DatePicker.bound-ZvJi_V8D.d.ts +9 -0
- package/dist/{DatePickerInput-D81ZJ3fT.d.ts → DatePickerInput-B8UhMVP6.d.ts} +3 -3
- package/dist/{DatePickerInput-BLBcySA2.js → DatePickerInput-C5-kkdpq.js} +66 -301
- package/dist/{DateRangePicker-Bfq-yDm7.d.ts → DateRangePicker-B8O8nA1M.d.ts} +30 -10
- package/dist/{DateRangePicker-BF-1CztH.js → DateRangePicker-BO92JO3A.js} +166 -353
- package/dist/DateRangePicker.bound-B_Lg8Tna.d.ts +9 -0
- package/dist/DateRangePicker.bound-cDWQPCUj.js +35 -0
- package/dist/{DateTimePicker-D4lHyf6P.d.ts → DateTimePicker-BRy_VN63.d.ts} +21 -11
- package/dist/{DateTimePicker-Cj0qvJUz.js → DateTimePicker-DSzd33fp.js} +47 -48
- package/dist/DateTimePicker.bound-BQUJXvBQ.js +32 -0
- package/dist/DateTimePicker.bound-Bt9wdYeR.d.ts +9 -0
- package/dist/{Dialog-CKLkS00H.js → Dialog-C9H9_BmK.js} +53 -29
- package/dist/Dialog-CDiUZFcf.d.ts +21 -0
- package/dist/{Dialog-9manOgMA.js → Dialog-DN5703sy.js} +13 -10
- package/dist/Disclosure-BRSkMbZQ.js +109 -0
- package/dist/{DropdownMenu-5jmtgLXd.js → DropdownMenu-DS0RaEfH.js} +13 -31
- package/dist/DropdownMenu-oJzwpMXL.d.ts +25 -0
- package/dist/{DropdownMenuDesktop-Cl9gZVq0.js → DropdownMenuDesktop-DGPIfex-.js} +7 -28
- package/dist/{FileInput-C4CE5kuP.d.ts → FileInput-Bm3_nNb4.d.ts} +26 -22
- package/dist/{FileInput-Br5DQaGQ.js → FileInput-dTcR3V93.js} +37 -50
- package/dist/FileInput.bound-B5b7BLGg.js +30 -0
- package/dist/FileInput.bound-puNboLYc.d.ts +8 -0
- package/dist/{FileTrigger-Cthk5_Wp.js → FileTrigger-DlryDp2T.js} +6 -6
- package/dist/{FileUpload--7ub3EZO.js → FileUpload-JogkVfav.js} +279 -249
- package/dist/FileUpload-ksjKICmv.d.ts +11 -0
- package/dist/FileUpload.bound-D4sr1tsH.d.ts +16 -0
- package/dist/FileUpload.bound-TTr9FNMS.js +30 -0
- package/dist/{FileUploadContainer-042ztsaL.d.ts → FileUploadContainer-DRIxUmp2.d.ts} +1 -1
- package/dist/{Form-DlQcyN1f.js → Form-CqF1SaVw.js} +2 -2
- package/dist/{FormField-Byiehm9y.d.ts → FormField-DHCcfchm.d.ts} +7 -2
- package/dist/FormField-dduTMkNH.js +142 -0
- package/dist/{FormFieldError-DeOHHLo2.js → FormFieldError-DTT5TUQ1.js} +3 -14
- package/dist/{FormFieldHeaderTooltip-BV2Ju4oB.js → FormFieldHeaderTooltip-Dt-g40Tc.js} +4 -4
- package/dist/FormLayout-CBYgWvwW.d.ts +47 -0
- package/dist/{Heading-nI1_VOaE.js → Heading-D4XFYv__.js} +2 -2
- package/dist/IconButton-BqmX_sMz.d.ts +25 -0
- package/dist/{IconSlot-DSK7qNxc.js → IconSlot-CqNuZl0E.js} +4 -4
- package/dist/{iconSlot.cva-CnpFzAOR.d.ts → IconSlot-DcEDPaNb.d.ts} +3 -10
- package/dist/{InlineTooltipWrapper-BpApaGXV.js → InlineTooltipWrapper-CKTiFpZn.js} +3 -3
- package/dist/{Input-BsbLZDtC.js → Input-BG0Xjw5X.js} +2 -2
- package/dist/{Input-DOanwj3l.d.ts → Input-DKNzGXy-.d.ts} +16 -9
- package/dist/Input-Dq2Raco6.js +247 -0
- package/dist/Input.bound-BxngTsaq.d.ts +9 -0
- package/dist/Input.bound-CB0WNCLI.js +31 -0
- package/dist/InputContent-5WKp0yNK.js +102 -0
- package/dist/{InputContent-CXuP1ghQ.d.ts → InputContent-C5wdgK9u.d.ts} +5 -5
- package/dist/{Label-B2-B-uFY.js → Label-BGvF9vWx.js} +2 -2
- package/dist/{Link-FupWOW1f.js → Link-Chux-Clm.js} +2 -2
- package/dist/{Link-Ow9H7kNv.d.ts → Link-n1MxiBY_.d.ts} +5 -3
- package/dist/{ListBox-CL8Ar4Q_.js → ListBox-DhR5kojP.js} +10 -11
- package/dist/{MenuItem-DHyqOqln.d.ts → MenuItem-Cj7ytjH0.d.ts} +1 -1
- package/dist/{Modal-w60dVQcb.js → Modal-DcLWF9cB.js} +58 -20
- package/dist/NumberField-BQwc6a7u.js +249 -0
- package/dist/{NumberField-Cb9Gf6QJ.d.ts → NumberField-BUTmx-kv.d.ts} +13 -9
- package/dist/NumberField.bound-DhGXXd4v.d.ts +9 -0
- package/dist/NumberField.bound-Ha6jrlsv.js +32 -0
- package/dist/{NumberFormatter-CLDS_LRZ.js → NumberFormatter-DYarfm5F.js} +2 -36
- package/dist/{NumberRangeInput-BfbJQqzn.d.ts → NumberRangeInput-BwUPbB0M.d.ts} +13 -8
- package/dist/{NumberRangeInput-B8-LHfg3.js → NumberRangeInput-KngK-OvN.js} +28 -55
- package/dist/NumberRangeInput.bound-VafOPEAu.js +32 -0
- package/dist/NumberRangeInput.bound-j_WC6iJC.d.ts +9 -0
- package/dist/{OverlayArrow-D8z7cCsw.js → OverlayArrow-DF0jMwul.js} +2 -2
- package/dist/PageHeader-DtV-4JEh.d.ts +61 -0
- package/dist/PasswordInput-DNt_CfI8.d.ts +11 -0
- package/dist/PasswordInput.bound-D4tGX20e.js +23 -0
- package/dist/{PasswordInput-CLwFUgl0.d.ts → PasswordInput.bound-EOqjNEVC.d.ts} +5 -6
- package/dist/{Popover-BTHPteIh.d.ts → Popover-DRqROtxR.d.ts} +2 -2
- package/dist/{Progress-B3mY9rIP.js → Progress-RiEGGxNG.js} +4 -29
- package/dist/{Progress-CjWOR38H.d.ts → Progress-uzAAtLNk.d.ts} +4 -4
- package/dist/{RadioGroup-DOw3PRoX.js → RadioGroup-Dvq0TiEB.js} +18 -120
- package/dist/RadioGroup-skcBf54J.d.ts +26 -0
- package/dist/RadioGroup.bound-B-xm1dwo.js +32 -0
- package/dist/RadioGroup.bound-CpxN2p6t.d.ts +9 -0
- package/dist/RangeCalendar-p7ajg_wH.js +315 -0
- package/dist/RichTextEditor-B9zaBMWl.d.ts +28 -0
- package/dist/{RichTextEditor-D4yN7Wj7.js → RichTextEditor-DLBfexN_.js} +57 -365
- package/dist/Select-DNF-GpuC.d.ts +137 -0
- package/dist/{staticSelect.utils-uHa8f_c6.js → Select-hIRIXRz1.js} +343 -635
- package/dist/Select.bound-BrAIDjfv.js +34 -0
- package/dist/Select.bound-CpN6KalY.d.ts +17 -0
- package/dist/SelectListBox-ysubv-kl.js +390 -0
- package/dist/SelectionIndicator-C3hniBa2.js +18 -0
- package/dist/SharedElementTransition-CZ2bE7yo.js +96 -0
- package/dist/SidebarWorkspaces-DJknAfS9.js +1298 -0
- package/dist/SidebarWorkspaces-Drgog0IO.d.ts +132 -0
- package/dist/{Slider-CzEmKYBF.js → Slider-DCsCCPFx.js} +18 -42
- package/dist/{Slider-EYlGCLWe.d.ts → Slider-JlRCD72s.d.ts} +9 -8
- package/dist/Slider.bound-BChOUGvm.d.ts +9 -0
- package/dist/Slider.bound-CByTXPTr.js +31 -0
- package/dist/{Spinner-DbXeDOa2.d.ts → Spinner-DNguPtBP.d.ts} +5 -5
- package/dist/{Spinner-BeVTUzzx.js → Spinner-DqjP06T1.js} +29 -41
- package/dist/{SplitButton-D9ngY1rJ.d.ts → SplitButton-BTuc5oYU.d.ts} +3 -3
- package/dist/{Stepper-TATlHZhQ.d.ts → Stepper-DNu5YlbG.d.ts} +18 -18
- package/dist/{Stepper-Cp5vbL5g.js → Stepper-Dyhxp0Tl.js} +14 -13
- package/dist/{Switch-CqnGEdeD.js → Switch-BfpSMMpv.js} +10 -59
- package/dist/Switch-CVt-dT9Z.d.ts +24 -0
- package/dist/Switch.bound-56C86rOe.d.ts +9 -0
- package/dist/Switch.bound-Dv0cHsMM.js +33 -0
- package/dist/TableRowDetails-A_FdBE_d.d.ts +109 -0
- package/dist/TabsFilters-BDoCGfRA.d.ts +30 -0
- package/dist/TabsFilters-ka2sUZPi.js +223 -0
- package/dist/Tag-BxYYX-i7.d.ts +44 -0
- package/dist/{Text-D2MPZ3sY.js → Text-D72yc4S6.js} +1 -1
- package/dist/{TextArea-D8WkKsGn.js → TextArea-CqT0_Bn-.js} +33 -35
- package/dist/{TextArea-l_keyLK7.d.ts → TextArea-DxAHDgz4.d.ts} +11 -9
- package/dist/TextArea.bound-kHkY_d9o.js +28 -0
- package/dist/TextArea.bound-oSnqk1Un.d.ts +9 -0
- package/dist/TextArea.cva-ENXI55ec.js +5 -0
- package/dist/{TimePicker-C4taAOFQ.js → TimePicker-Duw94UIt.js} +65 -55
- package/dist/TimePicker-Yg84ntZH.d.ts +45 -0
- package/dist/TimePicker.bound-5b_qcmeo.d.ts +9 -0
- package/dist/TimePicker.bound-DX5pXlgZ.js +32 -0
- package/dist/{datePickerValue.utils-DCgoSrP3.js → TimePickerForm-BiWPFcsD.js} +23 -19
- package/dist/{Toast-ruXqONDA.d.ts → Toast-DbIZorlS.d.ts} +1 -1
- package/dist/{ToastContainer-qgpzMFD4.js → ToastContainer-DtpZaefx.js} +5 -5
- package/dist/ToggleButton-CdcLn-PW.d.ts +17 -0
- package/dist/{ToggleButton-BW1ensey.js → ToggleButton-P1z1pxzT.js} +5 -5
- package/dist/ToggleGroup-Cbx9Keza.d.ts +42 -0
- package/dist/ToggleGroup-Co1-A0Ti.js +333 -0
- package/dist/ToggleGroup.bound-DphkH_jH.js +67 -0
- package/dist/ToggleGroup.bound-dDLGgcJm.d.ts +9 -0
- package/dist/Tooltip-Bg9AFtGw.d.ts +16 -0
- package/dist/{Tooltip-CpG1nz7Y.js → Tooltip-DRB6lo0U.js} +10 -11
- package/dist/{TooltipWrapper-3jyN0Wss.js → TooltipWrapper-DcrEabVw.js} +21 -10
- package/dist/{Typography-LU4z2pR1.js → Typography-DCLnPa3P.js} +2 -2
- package/dist/{Typography-XljT9s02.d.ts → Typography-MkA6LnHW.d.ts} +2 -2
- package/dist/{accordion.cva-CL1bVscW.js → accordion.cva-DwxY-k1e.js} +17 -25
- package/dist/{badgeButton.cva-B2bgCQP6.d.ts → badgeButton.cva-Bjhs4ops.d.ts} +8 -8
- package/dist/badgeButton.cva-CqaR8KBt.js +138 -0
- package/dist/{breadcrumbs.cva-7zzdDhVR.js → breadcrumbs.cva-CnBIZUB3.js} +9 -9
- package/dist/button.cva-CMkwxrFU.js +263 -0
- package/dist/{button.cva-C7kEhgoA.d.ts → button.cva-DoDFPTm5.d.ts} +18 -17
- package/dist/{buttonContent.cva-DPIlROA9.d.ts → buttonContent.cva-Dj7Eve71.d.ts} +2 -2
- package/dist/checkbox.cva-Bj7bLZNf.js +128 -0
- package/dist/{checkbox.cva-t1Ox50hy.d.ts → checkbox.cva-DUvQJdT-.d.ts} +7 -7
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +102 -100
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +116 -1
- package/dist/components/autocomplete.d.ts +2 -2
- package/dist/components/autocomplete.js +1 -134
- package/dist/components/badge-button.d.ts +1 -1
- package/dist/components/badge-button.js +6 -6
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +10 -10
- package/dist/components/bottom-sheet-header.d.ts +16 -0
- package/dist/components/bottom-sheet-header.js +80 -0
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +3 -3
- package/dist/components/breadcrumb/react-aria.js +1 -1
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button-group.d.ts +12 -0
- package/dist/components/button-group.js +46 -0
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +1 -163
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +2 -2
- package/dist/components/combo-box/react-aria.js +1 -1
- package/dist/components/date-picker/react-aria.js +1 -1
- package/dist/components/date-picker.d.ts +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker/react-aria.js +1 -1
- package/dist/components/date-range-picker.d.ts +16 -2
- package/dist/components/date-range-picker.js +2 -2
- package/dist/components/date-time-picker.d.ts +2 -2
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/dialog-trigger/react-aria.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 +2 -2
- 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 +3 -3
- 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 +17 -15
- package/dist/components/icon-slot.d.ts +2 -1
- package/dist/components/icon-slot.js +1 -1
- package/dist/components/input-frame.d.ts +94 -0
- package/dist/{useStaticInputHandoff-NeZVnci-.js → components/input-frame.js} +82 -116
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +1 -241
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +4 -4
- package/dist/components/menu-trigger/react-aria.js +1 -1
- package/dist/components/modal/react-aria.js +1 -1
- package/dist/components/modal-overlay/react-aria.js +1 -1
- package/dist/components/number-field.d.ts +2 -2
- package/dist/components/number-field.js +1 -245
- package/dist/components/number-range-input.d.ts +2 -2
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/page-header.d.ts +2 -0
- package/dist/components/page-header.js +210 -0
- package/dist/components/password-input.d.ts +2 -2
- package/dist/components/password-input.js +22 -1
- package/dist/components/popover/react-aria.js +1 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +40 -32
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select/react-aria.js +1 -1
- package/dist/components/select.d.ts +2 -3
- 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 +2 -2
- 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 +3 -0
- package/dist/components/style-definitions.js +122 -0
- package/dist/components/submenu-trigger/react-aria.js +1 -1
- package/dist/components/switch.d.ts +2 -2
- 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 +93 -1
- package/dist/components/text-area.d.ts +2 -2
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.d.ts +2 -2
- 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 +17 -30
- package/dist/components/toggle-group.d.ts +2 -3
- 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 +30 -0
- package/dist/config/component-configuration.js +69 -0
- 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-BuzgCfYl.js → confirmation.context-Bc2yEVp_.js} +2 -2
- package/dist/{confirmation.context-BOeEVczb.d.ts → confirmation.context-CAt_T5qZ.d.ts} +1 -1
- package/dist/{datePickerInput.cva-Cd7UUN61.js → datePickerInput.cva-CWkV2fut.js} +3 -3
- package/dist/datePickerValue.utils-CkmPaD6I.js +4 -0
- package/dist/{dialog.cva-COhDZaVl.js → dialog.cva-BIpz6HcA.js} +7 -7
- package/dist/{dist-CAdwxJbe.js → dist-fFtzh872.js} +54 -1
- package/dist/{dom.utils-D1AopHx9.js → dom.utils-BPooTXtC.js} +2 -2
- package/dist/dropdownMenu.cva-DwSOcbmR.js +31 -0
- package/dist/{fileUpload.cva-ujmStxB1.js → fileUpload.cva-BYzXGc9C.js} +11 -11
- package/dist/{fileUpload.types-n5FxK_F-.d.ts → fileUpload.types-CfUkihds.d.ts} +22 -17
- package/dist/form.binding-DOR5gIQf.js +49 -0
- package/dist/form.types-C8P4sznq.d.ts +22 -0
- package/dist/formFieldError.cva-BB6Ghqwq.js +14 -0
- package/dist/formFieldHelper.cva-DRmSyRZN.js +14 -0
- package/dist/formLayout.context--CN08Mtb.js +14 -0
- package/dist/hooks/use-async-list.d.ts +2 -0
- package/dist/hooks/use-async-list.js +2 -0
- package/dist/hooks/use-filters.js +1 -1
- package/dist/hooks/use-local-storage.js +1 -1
- package/dist/{i18n-CX2EjhJI.js → i18n-D8vXIoiq.js} +24 -18
- package/dist/{i18n-CX1vFM9r.d.ts → i18n-DM-PUcxQ.d.ts} +24 -14
- package/dist/iconSlot.cva-I0pFwkGy.d.ts +9 -0
- package/dist/icons.d.ts +2 -1
- package/dist/icons.js +3 -3
- package/dist/import-C7W0Wv2r.js +255 -0
- package/dist/index.d.ts +98 -91
- package/dist/index.js +99 -95
- package/dist/input.cva-2C6_W5jD.js +185 -0
- package/dist/input.cva-cNv7yhcp.d.ts +80 -0
- package/dist/inputLayout-KdAtunGk.js +5 -0
- package/dist/{intlStrings-chfsan9H.js → intlStrings-Cu1YN1tA.js} +35 -35
- package/dist/isEqual-LFw0W5rU.js +97 -0
- package/dist/label.cva-DTfT6FrX.js +85 -0
- package/dist/{link.context-D5qyz9Rf.d.ts → link.context-LSbvpZCL.d.ts} +1 -1
- package/dist/link.cva-C24YVAsJ.js +16 -0
- package/dist/{numberStatic.utils-BX50PSee.js → numberStatic.utils-BIyZuILs.js} +5 -5
- package/dist/outline.clsx-DGGQQRkM.js +6 -0
- package/dist/popover.cva-DAbfSma6.js +5 -0
- package/dist/progress.cva-CsGaGVJ-.js +28 -0
- package/dist/{radio.cva-DN9VQ3Kb.d.ts → radio.cva-CtBwM88n.d.ts} +9 -5
- package/dist/radio.cva-DistaZtZ.js +96 -0
- package/dist/rich-text-editor.d.ts +2 -2
- package/dist/rich-text-editor.js +1 -1
- package/dist/{routing.utils-UTQonIhB.js → routing.utils-DfxEt0_Y.js} +5 -0
- package/dist/selectDesktop.cva-DStkOdwm.js +14 -0
- package/dist/selectItem.cva-B6vxey2R.js +27 -0
- package/dist/{staticDateTimeSegments-DtU63_dw.js → staticDateTimeSegments-BVvFHWOs.js} +61 -57
- package/dist/status.cva-CYgi3Htz.js +130 -0
- package/dist/stepper.cva-Cecphqeo.js +104 -0
- package/dist/style-definitions-DJOlAxCG.d.ts +1034 -0
- 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-DmuYW9tg.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 +3 -2
- package/dist/tanstack/autocomplete.js +1 -1
- package/dist/tanstack/checkbox-group.d.ts +3 -2
- package/dist/tanstack/checkbox-group.js +1 -1
- package/dist/tanstack/checkbox.d.ts +3 -2
- package/dist/tanstack/checkbox.js +2 -2
- package/dist/tanstack/date-picker.d.ts +3 -2
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.d.ts +3 -2
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.d.ts +3 -2
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.d.ts +3 -2
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.d.ts +4 -3
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.d.ts +3 -3
- package/dist/tanstack/form.js +3 -3
- package/dist/tanstack/input.d.ts +3 -2
- package/dist/tanstack/input.js +1 -1
- package/dist/tanstack/number-field.d.ts +3 -2
- package/dist/tanstack/number-field.js +1 -1
- package/dist/tanstack/number-range-input.d.ts +3 -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 +3 -2
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.d.ts +9 -2
- package/dist/tanstack/rich-text-editor.js +27 -1
- package/dist/tanstack/select.d.ts +3 -2
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.d.ts +3 -2
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/switch.d.ts +3 -2
- package/dist/tanstack/switch.js +1 -1
- package/dist/tanstack/table.d.ts +3 -2
- package/dist/tanstack/table.js +2 -3
- package/dist/tanstack/text-area.d.ts +3 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.d.ts +3 -2
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.d.ts +3 -3
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/{queries.utils-CmbhAoHU.js → tanstack-Bgdv0qU1.js} +2 -1
- package/dist/tanstack-CJKor9l-.d.ts +566 -0
- package/dist/tanstack.d.ts +82 -78
- package/dist/tanstack.js +99 -93
- package/dist/{theme.context-B3wQDJ-i.js → theme.context--VEyStJB.js} +2 -2
- package/dist/{toast.cva-C_L_RffH.js → toast.cva-B6NXTwbZ.js} +22 -38
- package/dist/{toast.cva-By5lvAfr.d.ts → toast.cva-BnXRIWVy.d.ts} +10 -10
- package/dist/{toast.runtime-cxex9e4E.js → toast.runtime-BWQLlbZW.js} +1 -2
- package/dist/toggleGroup.cva-BZcOUjIS.d.ts +26 -0
- package/dist/toggleGroup.cva-CINSHakM.js +35 -0
- package/dist/{tooltip.cva-BIzlOXHH.js → tooltip.cva-BEyxvcG2.js} +11 -11
- package/dist/{tooltipWrapper.cva-BBQ4ic3D.js → tooltipWrapper.cva-t4NQ9zz9.js} +1 -1
- package/dist/tw-ui-plugin.js +5 -1
- package/dist/typography.cva-CHsHX_Wp.js +31 -0
- package/dist/typography.cva-DcBCiskp.d.ts +36 -0
- package/dist/uiConfig.context-3DN9w6oU.js +180 -0
- package/dist/{uiConfig.context-DeBX2beU.d.ts → uiConfig.context-CoE2HBL4.d.ts} +26 -20
- package/dist/{uiOverrides.context-DEp139He.d.ts → uiOverrides.context-DHHzLSnq.d.ts} +67 -6
- package/dist/useAsyncList-Ct74ve3i.js +445 -0
- package/dist/useAsyncList-Cu-Y8If2.d.ts +9 -0
- package/dist/{useBreakpoint-DQoMN-BG.js → useBreakpoint-CJ3mx7UF.js} +6 -6
- package/dist/{useControlledState-CzXkZCX8.js → useControlledState-CuU1VIh1.js} +2 -2
- package/dist/useFieldAccessibility-eZIMECmG.js +19 -0
- package/dist/{useFilters-XNH27Md2.js → useFilters-DMi94RZK.js} +3 -3
- package/dist/{form.binding-CG1RPv6o.js → useForm-Cb7KWLds.js} +80 -43
- package/dist/{form.binding-DVJ5F0JE.d.ts → useForm-I6z23FXf.d.ts} +15 -15
- package/dist/useFormAutosave-BBLm3Ujo.d.ts +34 -0
- package/dist/useFormAutosave-BPGlChiY.js +216 -0
- package/dist/useScrollableListBox-oYKqU3Hp.js +47 -0
- package/dist/useStaticInputHandoff-BN0fOerH.js +76 -0
- package/dist/useTableColumnConfig-D4BGhlBT.js +1906 -0
- package/dist/useTableNav-hQCt_TbI.d.ts +197 -0
- package/dist/{useToast-yreVCUer.d.ts → useToast-CjyrMHdh.d.ts} +1 -1
- package/dist/{utils-Czcqspm7.js → utils-BkLF-JA3.js} +1 -1
- package/package.json +86 -247
- package/.rulesync/rules/ui-buttons-and-content.md +0 -56
- package/.rulesync/rules/ui-inputs-and-forms.md +0 -62
- package/.rulesync/rules/ui-overlays-navigation-and-styling.md +0 -49
- package/.rulesync/rules/ui-overview.md +0 -33
- package/dist/Alert-CnvEb1D_.js +0 -244
- package/dist/AppCanvasPage--RG31Yyv.js +0 -2421
- package/dist/AppCanvasPage-BIFYeEeS.d.ts +0 -80
- package/dist/Autocomplete-BwNHp8fy.d.ts +0 -15
- package/dist/Button-C5rv4Cr2.js +0 -506
- package/dist/Button-D-4qb0IR.d.ts +0 -42
- package/dist/CheckboxCheckmark-CpC3wlMs.js +0 -178
- package/dist/CheckboxGroup-DGF12cmB.d.ts +0 -28
- package/dist/ComponentGallery-C6exitZN.js +0 -3513
- package/dist/Dialog-CW93T9X1.d.ts +0 -56
- package/dist/DropdownMenu-JNpYT4-3.d.ts +0 -62
- package/dist/FileUpload-CR7bZxV1.d.ts +0 -7
- package/dist/Form-DbEWnCKc.d.ts +0 -49
- package/dist/FormField-B99dLt8o.js +0 -212
- package/dist/IconButton-D4thBurp.d.ts +0 -16
- package/dist/InlineIconButton-BeJCjl-q.d.ts +0 -15
- package/dist/InputItem-CIxbTxZu.js +0 -63
- package/dist/Inputs-DJSKiaWY.js +0 -17
- package/dist/Inputs-O84btFJL.d.ts +0 -13
- package/dist/Pagination-CwQu5Py8.d.ts +0 -12
- package/dist/PaginationList-DMRUGtf8.d.ts +0 -18
- package/dist/PaginationList-DtvuP63b.js +0 -220
- package/dist/PasswordInput-DYwUZ4-k.js +0 -78
- package/dist/QuerySelect-BGxb6Y0K.d.ts +0 -24
- package/dist/RadioGroup-CZg2kIMk.d.ts +0 -24
- package/dist/RichTextEditor-YxuRUlI7.d.ts +0 -26
- package/dist/Select-UR0ec2Ux.js +0 -154
- package/dist/Select-pHbyJdZJ.d.ts +0 -15
- package/dist/SelectBase-Omiq2D3M.d.ts +0 -96
- package/dist/SelectionIndicator-JblvLKCu.js +0 -5
- package/dist/SharedElementTransition-Da1c_cOO.js +0 -12
- package/dist/Switch-s_EPn0Jz.d.ts +0 -22
- package/dist/Table-BN2_J_Ne.js +0 -636
- package/dist/Tag-AHfV_XSf.d.ts +0 -44
- package/dist/Tag-DPg5sL1Z.js +0 -146
- package/dist/TextButton-XUhV_1s0.d.ts +0 -15
- package/dist/TimePicker-B1POvGWs.d.ts +0 -33
- package/dist/Toast-DtG3pA61.js +0 -53
- package/dist/ToggleButton-7aP8Jb11.d.ts +0 -11
- package/dist/ToggleGroup-CRFDIPGZ.d.ts +0 -7
- package/dist/ToggleGroup-DOk27fgI.js +0 -346
- package/dist/Tooltip-DHv6vAqW.d.ts +0 -57
- package/dist/UIConfigurator-BwLRfe-a.js +0 -6704
- package/dist/autocomplete-DeERHN8W.d.ts +0 -16
- package/dist/badgeButton.cva-CvN4CTx5.js +0 -300
- package/dist/check-DYMBkp_Z.js +0 -20
- package/dist/checkbox-DxIPDTK5.d.ts +0 -9
- package/dist/checkbox-group-B3BOVshI.d.ts +0 -9
- package/dist/chevron-down-B4Pr8bD3.js +0 -20
- package/dist/chevron-left-Dgo_b9wJ.js +0 -20
- package/dist/chevron-right-3nKJR5Bb.js +0 -20
- package/dist/chevron-up-D_Gqpb5M.js +0 -20
- package/dist/chevrons-right-DJPPn2fD.js +0 -44
- package/dist/components/inline-icon-button.d.ts +0 -2
- package/dist/components/inline-icon-button.js +0 -40
- package/dist/components/pagination-list.d.ts +0 -2
- package/dist/components/pagination-list.js +0 -2
- package/dist/components/pagination.d.ts +0 -2
- package/dist/components/pagination.js +0 -134
- package/dist/components/query-autocomplete.d.ts +0 -8
- package/dist/components/query-autocomplete.js +0 -134
- package/dist/components/query-select.d.ts +0 -2
- package/dist/components/query-select.js +0 -147
- package/dist/components/text-button.d.ts +0 -2
- package/dist/components/text-button.js +0 -35
- package/dist/config/app-canvas-tanstack.d.ts +0 -23
- package/dist/config/app-canvas-tanstack.js +0 -62
- package/dist/config/app-canvas.d.ts +0 -12
- package/dist/config/app-canvas.js +0 -2
- package/dist/config/ui-configurator-theme.d.ts +0 -2
- package/dist/config/ui-configurator-theme.js +0 -2
- package/dist/config/ui-configurator-vite.d.ts +0 -10
- package/dist/config/ui-configurator-vite.js +0 -174
- package/dist/config/ui-configurator.d.ts +0 -15
- package/dist/config/ui-configurator.js +0 -3
- package/dist/configuration.context-f_FSPWhQ.d.ts +0 -926
- package/dist/createLucideIcon-LcezOE4z.js +0 -240
- package/dist/date-picker-DnxDmlOW.d.ts +0 -9
- package/dist/date-range-picker-DHDOSvHN.d.ts +0 -9
- package/dist/date-time-picker-UkTa0OJ8.d.ts +0 -9
- package/dist/date.transforms-DLg-eFcE.js +0 -15
- package/dist/dropdownMenu.cva-DvEmX0bs.js +0 -34
- package/dist/dynamicInputs-ByVMnx4Z.d.ts +0 -772
- package/dist/dynamicInputs-CRMWIpHA.js +0 -194
- package/dist/dynamicInputs-m_DQu5q0.js +0 -214
- package/dist/fieldAdapter-C4sDFC8f.d.ts +0 -9
- package/dist/fieldAdapter-DjYls12j.js +0 -63
- package/dist/file-input-DkbkdI7l.d.ts +0 -9
- package/dist/file-upload-CTsPhxJk.d.ts +0 -10
- package/dist/form.types-CecYaerF.d.ts +0 -13
- package/dist/form.types-ZNGbcqJS.d.ts +0 -13
- package/dist/info-iUmX3uDk.js +0 -32
- package/dist/input-CdQNCPgH.d.ts +0 -8
- package/dist/input.cva-BsHgYa-L.d.ts +0 -80
- package/dist/input.cva-DJA8ovm_.js +0 -208
- package/dist/link.cva-DMTHZiJG.js +0 -12
- package/dist/number-field-CUDbenNV.d.ts +0 -8
- package/dist/number-range-input-DZGrcvjL.d.ts +0 -8
- package/dist/outline.clsx-50W_vNDl.js +0 -6
- package/dist/password-input-fYN20cQO.d.ts +0 -8
- package/dist/popover.cva-Bhud1wnp.js +0 -5
- package/dist/query-autocomplete-CfuQeiYG.d.ts +0 -14
- package/dist/query-select-CuT_sE6a.d.ts +0 -15
- package/dist/queryAutocomplete.types-tl3r6iaY.d.ts +0 -27
- package/dist/radio-group-B3ccPf0p.d.ts +0 -9
- package/dist/rhf/autocomplete.d.ts +0 -3
- package/dist/rhf/autocomplete.js +0 -8
- package/dist/rhf/checkbox-group.d.ts +0 -3
- package/dist/rhf/checkbox-group.js +0 -8
- package/dist/rhf/checkbox.d.ts +0 -3
- package/dist/rhf/checkbox.js +0 -8
- package/dist/rhf/date-picker.d.ts +0 -3
- package/dist/rhf/date-picker.js +0 -9
- package/dist/rhf/date-range-picker.d.ts +0 -3
- package/dist/rhf/date-range-picker.js +0 -9
- package/dist/rhf/date-time-picker.d.ts +0 -3
- package/dist/rhf/date-time-picker.js +0 -9
- package/dist/rhf/file-input.d.ts +0 -3
- package/dist/rhf/file-input.js +0 -6
- package/dist/rhf/file-upload.d.ts +0 -3
- package/dist/rhf/file-upload.js +0 -6
- package/dist/rhf/input.d.ts +0 -3
- package/dist/rhf/input.js +0 -6
- package/dist/rhf/inputs.d.ts +0 -4
- package/dist/rhf/inputs.js +0 -2
- package/dist/rhf/number-field.d.ts +0 -3
- package/dist/rhf/number-field.js +0 -6
- package/dist/rhf/number-range-input.d.ts +0 -3
- package/dist/rhf/number-range-input.js +0 -6
- package/dist/rhf/password-input.d.ts +0 -3
- package/dist/rhf/password-input.js +0 -6
- package/dist/rhf/query-autocomplete.d.ts +0 -2
- package/dist/rhf/query-autocomplete.js +0 -8
- package/dist/rhf/query-select.d.ts +0 -2
- package/dist/rhf/query-select.js +0 -8
- package/dist/rhf/radio-group.d.ts +0 -3
- package/dist/rhf/radio-group.js +0 -8
- package/dist/rhf/rich-text-editor.d.ts +0 -3
- package/dist/rhf/rich-text-editor.js +0 -6
- package/dist/rhf/select.d.ts +0 -3
- package/dist/rhf/select.js +0 -8
- package/dist/rhf/slider.d.ts +0 -3
- package/dist/rhf/slider.js +0 -6
- package/dist/rhf/switch.d.ts +0 -3
- package/dist/rhf/switch.js +0 -8
- package/dist/rhf/text-area.d.ts +0 -3
- package/dist/rhf/text-area.js +0 -6
- package/dist/rhf/time-picker.d.ts +0 -3
- package/dist/rhf/time-picker.js +0 -9
- package/dist/rhf/toggle-group.d.ts +0 -3
- package/dist/rhf/toggle-group.js +0 -6
- package/dist/rhf-t348TCCL.js +0 -256
- package/dist/rhf.d.ts +0 -106
- package/dist/rhf.js +0 -112
- package/dist/rich-text-editor-B-Onl7T8.d.ts +0 -8
- package/dist/select-B4a52eWW.d.ts +0 -16
- package/dist/selectDesktop.cva-CHAMxhfO.js +0 -69
- package/dist/slider-dNj9jruO.d.ts +0 -8
- package/dist/stepper.cva-CZ0Kj-s7.js +0 -116
- package/dist/style-merge.util-zLimKwt6.d.ts +0 -40
- package/dist/styles/app-canvas.css +0 -740
- package/dist/styles/color-utilities.css +0 -20
- package/dist/styles/configurator.css +0 -3280
- package/dist/switch-C--iWnY8.d.ts +0 -9
- package/dist/switch.cva-CWNzmdRc.d.ts +0 -16
- package/dist/table.cva-D5oQ-QvA.js +0 -101
- package/dist/tanstack/inputs.d.ts +0 -5
- package/dist/tanstack/inputs.js +0 -3
- package/dist/tanstack/query-autocomplete.d.ts +0 -2
- package/dist/tanstack/query-autocomplete.js +0 -2
- package/dist/tanstack/query-select.d.ts +0 -2
- package/dist/tanstack/query-select.js +0 -2
- package/dist/text-area-DQAtpOQp.d.ts +0 -8
- package/dist/theme-model-DtYPxNvH.js +0 -406
- package/dist/theme-model-T1zIdBg8.d.ts +0 -12
- package/dist/time-picker-DoGfbil6.d.ts +0 -9
- package/dist/toggle-group-C1nMDOwz.d.ts +0 -9
- package/dist/toggleGroup.cva-MbpaEBg1.js +0 -35
- package/dist/toggleGroup.types-Bp43zbSQ.d.ts +0 -59
- package/dist/typography.cva-D1JOEYl-.d.ts +0 -36
- package/dist/typography.cva-iD15k56p.js +0 -51
- package/dist/uiConfig.context-BS3r_kTS.js +0 -381
- package/dist/underline-66hmELxa.js +0 -81
- package/dist/upload-CXU83BJ4.js +0 -30
- package/dist/useFieldAccessibility-ScC6Mtd5.js +0 -102
- package/dist/useFormAutosave-DfuP7drj.js +0 -198
- package/dist/useQueryAutocomplete-CraXvRm_.js +0 -152
- package/dist/useTableColumnConfig-Di0_w80v.js +0 -892
- package/dist/useTableNav-Ckj5PBRk.d.ts +0 -292
- package/dist/x-B6vfz8Ps.js +0 -23
- package/dist/zod.utils-DrrPDT9v.js +0 -24
- package/rulesync.jsonc +0 -11
- package/scripts/generate-rules.mjs +0 -34
- package/src/configurator/README.md +0 -77
- package/dist/{import-BE0r63d8.js → import-D_3dPATF.js} +2 -2
- 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/{useIntersectionObserver-DYfHnGGU.js → useIntersectionObserver-DFAhTsV0.js} +1 -1
- package/dist/{useLocalStorage-PlcaJ1tP.js → useLocalStorage-CctQvyqD.js} +1 -1
|
@@ -1,336 +1,37 @@
|
|
|
1
|
-
import { t as UIConfig } from "./uiConfig.context-BS3r_kTS.js";
|
|
2
|
-
import { t as ChevronDown } from "./chevron-down-B4Pr8bD3.js";
|
|
3
|
-
import { t as CheckboxCheckmark } from "./CheckboxCheckmark-CpC3wlMs.js";
|
|
4
|
-
import { i as Search, n as selectListBoxItemDefinition, r as selectInputTagsContentWrapperDefinition, t as selectPopoverDefinition } from "./selectDesktop.cva-CHAMxhfO.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 {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { n as $
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { n as $41fb335299a4a39e$export$f5b8910cec6cf069, t as $41fb335299a4a39e$export$37fb8590cf2c088c } from "./Input-BsbLZDtC.js";
|
|
16
|
-
import { i as $928221da08ecbc62$export$a11e76429ed99b4, n as $928221da08ecbc62$export$7c5906fe4f1f2af2, r as $928221da08ecbc62$export$7ff8f37d2d81a48d, t as $928221da08ecbc62$export$41f133550aa26f48 } from "./ListBox-CL8Ar4Q_.js";
|
|
17
|
-
import { i as $a3be900807531178$re_export$useFilter, n as $a3be900807531178$re_export$ListLayout, r as $a3be900807531178$re_export$Rect } from "./exports-BNrTn8Tj.js";
|
|
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";
|
|
6
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-C1YB5dOw.js";
|
|
7
|
+
import { n as $dbdc5e6e7ce01b4b$export$c02625b26074192c, t as $dbdc5e6e7ce01b4b$export$72b9695b8216309a } from "./ComboBox-ChsdI0lt.js";
|
|
8
|
+
import { n as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./Input-BG0Xjw5X.js";
|
|
9
|
+
import { i as $a3be900807531178$re_export$useFilter } from "./exports-BNrTn8Tj.js";
|
|
18
10
|
import "./popoverAnimation-DEZSvKP8.js";
|
|
19
|
-
import { t as
|
|
11
|
+
import { i as useDeepCompareMemo, t as UIConfig } from "./uiConfig.context-3DN9w6oU.js";
|
|
12
|
+
import { t as Button } from "./Button-dRFJundh.js";
|
|
20
13
|
import { BottomSheet } from "./components/bottom-sheet.js";
|
|
21
|
-
import { t as useBreakpoint } from "./useBreakpoint-
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { t as
|
|
26
|
-
import "./i18n-
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { t as
|
|
30
|
-
import {
|
|
31
|
-
import { Input } from "./
|
|
32
|
-
import
|
|
14
|
+
import { t as useBreakpoint } from "./useBreakpoint-CJ3mx7UF.js";
|
|
15
|
+
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
16
|
+
import { n as FormFieldLabel, t as FormField } from "./FormField-dduTMkNH.js";
|
|
17
|
+
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-2C6_W5jD.js";
|
|
18
|
+
import { t as resolveInputLayout } from "./inputLayout-KdAtunGk.js";
|
|
19
|
+
import "./i18n-D8vXIoiq.js";
|
|
20
|
+
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-DcrEabVw.js";
|
|
21
|
+
import { t as popoverDefinition } from "./popover.cva-DAbfSma6.js";
|
|
22
|
+
import { n as useStaticInputHandoff, t as getStaticInputFocusTarget } from "./useStaticInputHandoff-BN0fOerH.js";
|
|
23
|
+
import { InputFrame } from "./components/input-frame.js";
|
|
24
|
+
import { t as Input } from "./Input-Dq2Raco6.js";
|
|
25
|
+
import { Tag } from "./components/tag.js";
|
|
26
|
+
import { n as selectInputTagsContentWrapperDefinition, t as selectPopoverDefinition } from "./selectDesktop.cva-DStkOdwm.js";
|
|
27
|
+
import { ChevronDown, Search, X } from "lucide-react";
|
|
33
28
|
import { c } from "react/compiler-runtime";
|
|
29
|
+
import { Fragment, createContext, use, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
34
30
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
35
|
-
import "react-aria/mergeProps";
|
|
36
|
-
import { CollectionBuilder } from "react-aria/CollectionBuilder";
|
|
37
|
-
import { filterDOMProps } from "react-aria/filterDOMProps";
|
|
38
|
-
import "react-aria/useFocusRing";
|
|
39
|
-
import "react-aria/useHover";
|
|
40
|
-
import { createHideableComponent } from "react-aria/private/collections/Hidden";
|
|
41
|
-
import { useResizeObserver } from "react-aria/private/utils/useResizeObserver";
|
|
42
|
-
import { useComboBox } from "react-aria/useComboBox";
|
|
43
|
-
import { useComboBoxState } from "react-stately/useComboBoxState";
|
|
44
|
-
import { useFilter } from "react-aria/useFilter";
|
|
45
|
-
import "react-aria/useListFormatter";
|
|
46
|
-
import { useVirtualizerState } from "react-stately/useVirtualizerState";
|
|
47
|
-
import { useScrollView } from "react-aria/private/virtualizer/ScrollView";
|
|
48
|
-
import { VirtualizerItem } from "react-aria/private/virtualizer/VirtualizerItem";
|
|
49
31
|
import { usePreventScroll } from "react-aria";
|
|
50
32
|
import { useLabel } from "@react-aria/label";
|
|
51
|
-
import { useFocusVisible, useFocusWithin, useHover
|
|
33
|
+
import { useFocusVisible, useFocusWithin, useHover } from "@react-aria/interactions";
|
|
52
34
|
import { useTranslation } from "react-i18next";
|
|
53
|
-
//#region ../../node_modules/.bun/react-aria-components@1.21.1+67f6792bdf102c28/node_modules/react-aria-components/dist/private/Group.mjs
|
|
54
|
-
const $3a442827418ebe87$export$f9c6924e160136d1 = /*#__PURE__*/ createContext({});
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region ../../node_modules/.bun/react-aria-components@1.21.1+67f6792bdf102c28/node_modules/react-aria-components/dist/private/ComboBox.mjs
|
|
57
|
-
const $dbdc5e6e7ce01b4b$export$d414ccceff7063c3 = /*#__PURE__*/ createContext(null);
|
|
58
|
-
const $dbdc5e6e7ce01b4b$export$c02625b26074192c = /*#__PURE__*/ createContext(null);
|
|
59
|
-
const $dbdc5e6e7ce01b4b$export$72b9695b8216309a = /*#__PURE__*/ createHideableComponent(function ComboBox(props, ref) {
|
|
60
|
-
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $dbdc5e6e7ce01b4b$export$d414ccceff7063c3);
|
|
61
|
-
let { children, isDisabled = false, isInvalid = false, isRequired = false, isReadOnly = false } = props;
|
|
62
|
-
let content = useMemo(() => /*#__PURE__*/ $ahdqC$react.createElement($928221da08ecbc62$export$7ff8f37d2d81a48d.Provider, { value: { items: props.items ?? props.defaultItems } }, typeof children === "function" ? children({
|
|
63
|
-
isOpen: false,
|
|
64
|
-
isDisabled,
|
|
65
|
-
isInvalid,
|
|
66
|
-
isRequired,
|
|
67
|
-
defaultChildren: null,
|
|
68
|
-
isReadOnly
|
|
69
|
-
}) : children), [
|
|
70
|
-
children,
|
|
71
|
-
isDisabled,
|
|
72
|
-
isInvalid,
|
|
73
|
-
isRequired,
|
|
74
|
-
isReadOnly,
|
|
75
|
-
props.items,
|
|
76
|
-
props.defaultItems
|
|
77
|
-
]);
|
|
78
|
-
return /*#__PURE__*/ $ahdqC$react.createElement(CollectionBuilder, { content }, (collection) => /*#__PURE__*/ $ahdqC$react.createElement($dbdc5e6e7ce01b4b$var$ComboBoxInner, {
|
|
79
|
-
props,
|
|
80
|
-
collection,
|
|
81
|
-
comboBoxRef: ref
|
|
82
|
-
}));
|
|
83
|
-
});
|
|
84
|
-
const $dbdc5e6e7ce01b4b$var$CLEAR_CONTEXTS = [
|
|
85
|
-
$43a3b93638fe5db9$export$75b6ee27786ba447,
|
|
86
|
-
$7705c033048f6da7$export$24d547caef80ccd1,
|
|
87
|
-
$41fb335299a4a39e$export$37fb8590cf2c088c,
|
|
88
|
-
$4b38b5b75ecc6208$export$698f465ec27e93df,
|
|
89
|
-
$3a442827418ebe87$export$f9c6924e160136d1,
|
|
90
|
-
$efe09c6d1c304b50$export$9afb8bc826b033ea
|
|
91
|
-
];
|
|
92
|
-
function $dbdc5e6e7ce01b4b$var$ComboBoxInner({ props, collection, comboBoxRef: ref }) {
|
|
93
|
-
let { name, formValue = "key", allowsCustomValue } = props;
|
|
94
|
-
if (allowsCustomValue) formValue = "text";
|
|
95
|
-
let { validationBehavior: formValidationBehavior } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e($cdaed739b1139372$export$c24727297075ec6a) || {};
|
|
96
|
-
let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? "native";
|
|
97
|
-
let { contains } = useFilter({ sensitivity: "base" });
|
|
98
|
-
let state = useComboBoxState({
|
|
99
|
-
...props,
|
|
100
|
-
defaultFilter: props.defaultFilter || contains,
|
|
101
|
-
items: props.items,
|
|
102
|
-
children: void 0,
|
|
103
|
-
collection,
|
|
104
|
-
validationBehavior
|
|
105
|
-
});
|
|
106
|
-
let buttonRef = useRef(null);
|
|
107
|
-
let inputRef = useRef(null);
|
|
108
|
-
let groupRef = useRef(null);
|
|
109
|
-
let listBoxRef = useRef(null);
|
|
110
|
-
let popoverRef = useRef(null);
|
|
111
|
-
let [labelRef, label] = $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
112
|
-
let [labelElementType, setLabelElementType] = useState("label");
|
|
113
|
-
let { buttonProps, inputProps, listBoxProps, labelProps, descriptionProps, errorMessageProps, valueProps, ...validation } = useComboBox({
|
|
114
|
-
...$7230ffa83bc0c2cf$export$ef03459518577ad4(props),
|
|
115
|
-
label,
|
|
116
|
-
inputRef,
|
|
117
|
-
buttonRef,
|
|
118
|
-
listBoxRef,
|
|
119
|
-
popoverRef,
|
|
120
|
-
name: formValue === "text" ? name : void 0,
|
|
121
|
-
validationBehavior,
|
|
122
|
-
labelElementType
|
|
123
|
-
}, state);
|
|
124
|
-
let [menuWidth, setMenuWidth] = useState(null);
|
|
125
|
-
let onResize = useCallback(() => {
|
|
126
|
-
if (inputRef.current && !groupRef.current) {
|
|
127
|
-
let buttonRect = buttonRef.current?.getBoundingClientRect();
|
|
128
|
-
let inputRect = inputRef.current.getBoundingClientRect();
|
|
129
|
-
let minX = buttonRect ? Math.min(buttonRect.left, inputRect.left) : inputRect.left;
|
|
130
|
-
let maxX = buttonRect ? Math.max(buttonRect.right, inputRect.right) : inputRect.right;
|
|
131
|
-
setMenuWidth(maxX - minX + "px");
|
|
132
|
-
}
|
|
133
|
-
}, [
|
|
134
|
-
buttonRef,
|
|
135
|
-
inputRef,
|
|
136
|
-
setMenuWidth
|
|
137
|
-
]);
|
|
138
|
-
useResizeObserver({
|
|
139
|
-
ref: inputRef,
|
|
140
|
-
onResize
|
|
141
|
-
});
|
|
142
|
-
let triggerRef = useMemo(() => ({ get current() {
|
|
143
|
-
return groupRef.current || inputRef.current;
|
|
144
|
-
} }), [groupRef, inputRef]);
|
|
145
|
-
let renderPropsState = useMemo(() => ({
|
|
146
|
-
isOpen: state.isOpen,
|
|
147
|
-
isDisabled: props.isDisabled || false,
|
|
148
|
-
isInvalid: validation.isInvalid || false,
|
|
149
|
-
isRequired: props.isRequired || false,
|
|
150
|
-
isReadOnly: props.isReadOnly || false
|
|
151
|
-
}), [
|
|
152
|
-
state.isOpen,
|
|
153
|
-
props.isDisabled,
|
|
154
|
-
validation.isInvalid,
|
|
155
|
-
props.isRequired,
|
|
156
|
-
props.isReadOnly
|
|
157
|
-
]);
|
|
158
|
-
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
159
|
-
...props,
|
|
160
|
-
values: renderPropsState,
|
|
161
|
-
defaultClassName: "react-aria-ComboBox"
|
|
162
|
-
});
|
|
163
|
-
let DOMProps = filterDOMProps(props, { global: true });
|
|
164
|
-
delete DOMProps.id;
|
|
165
|
-
let inputs = [];
|
|
166
|
-
if (name && formValue === "key") {
|
|
167
|
-
let values = Array.isArray(state.value) ? state.value : [state.value];
|
|
168
|
-
if (values.length === 0) values = [null];
|
|
169
|
-
inputs = values.map((value, i) => /*#__PURE__*/ $ahdqC$react.createElement("input", {
|
|
170
|
-
key: i,
|
|
171
|
-
type: "hidden",
|
|
172
|
-
name,
|
|
173
|
-
form: props.form,
|
|
174
|
-
value: value ?? ""
|
|
175
|
-
}));
|
|
176
|
-
}
|
|
177
|
-
return /*#__PURE__*/ $ahdqC$react.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [
|
|
178
|
-
[$dbdc5e6e7ce01b4b$export$c02625b26074192c, state],
|
|
179
|
-
[$43a3b93638fe5db9$export$75b6ee27786ba447, {
|
|
180
|
-
...labelProps,
|
|
181
|
-
elementType: labelElementType,
|
|
182
|
-
ref: labelRef
|
|
183
|
-
}],
|
|
184
|
-
[$7705c033048f6da7$export$24d547caef80ccd1, {
|
|
185
|
-
...buttonProps,
|
|
186
|
-
ref: buttonRef,
|
|
187
|
-
isPressed: state.isOpen
|
|
188
|
-
}],
|
|
189
|
-
[$41fb335299a4a39e$export$37fb8590cf2c088c, {
|
|
190
|
-
...inputProps,
|
|
191
|
-
ref: inputRef
|
|
192
|
-
}],
|
|
193
|
-
[$4b38b5b75ecc6208$export$698f465ec27e93df, {
|
|
194
|
-
...inputProps,
|
|
195
|
-
ref: useCallback((el) => {
|
|
196
|
-
inputRef.current = el;
|
|
197
|
-
if (el) setLabelElementType(el.tagName.toLowerCase() === "input" ? "label" : "span");
|
|
198
|
-
}, []),
|
|
199
|
-
value: state.inputValue,
|
|
200
|
-
onChange: (v) => state.setInputValue(v)
|
|
201
|
-
}],
|
|
202
|
-
[$f2ff30fde7b014be$export$d2f961adcb0afbe, state],
|
|
203
|
-
[$542a13ca2fa5b484$export$9b9a0cd73afb7ca4, {
|
|
204
|
-
ref: popoverRef,
|
|
205
|
-
triggerRef,
|
|
206
|
-
scrollRef: listBoxRef,
|
|
207
|
-
placement: "bottom start",
|
|
208
|
-
isNonModal: true,
|
|
209
|
-
trigger: "ComboBox",
|
|
210
|
-
style: { "--trigger-width": menuWidth },
|
|
211
|
-
clearContexts: $dbdc5e6e7ce01b4b$var$CLEAR_CONTEXTS
|
|
212
|
-
}],
|
|
213
|
-
[$928221da08ecbc62$export$7ff8f37d2d81a48d, {
|
|
214
|
-
...listBoxProps,
|
|
215
|
-
ref: listBoxRef
|
|
216
|
-
}],
|
|
217
|
-
[$928221da08ecbc62$export$7c5906fe4f1f2af2, state],
|
|
218
|
-
[$efe09c6d1c304b50$export$9afb8bc826b033ea, { slots: {
|
|
219
|
-
description: descriptionProps,
|
|
220
|
-
errorMessage: errorMessageProps
|
|
221
|
-
} }],
|
|
222
|
-
[$3a442827418ebe87$export$f9c6924e160136d1, {
|
|
223
|
-
ref: groupRef,
|
|
224
|
-
isInvalid: validation.isInvalid,
|
|
225
|
-
isDisabled: props.isDisabled || false
|
|
226
|
-
}],
|
|
227
|
-
[$1f3c3b1a70cec653$export$ff05c3ac10437e03, validation],
|
|
228
|
-
[$dbdc5e6e7ce01b4b$export$5c804022b41722df, valueProps]
|
|
229
|
-
] }, /*#__PURE__*/ $ahdqC$react.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
230
|
-
...DOMProps,
|
|
231
|
-
...renderProps,
|
|
232
|
-
ref,
|
|
233
|
-
slot: props.slot || void 0,
|
|
234
|
-
"data-focused": state.isFocused || void 0,
|
|
235
|
-
"data-open": state.isOpen || void 0,
|
|
236
|
-
"data-disabled": props.isDisabled || void 0,
|
|
237
|
-
"data-readonly": props.isReadOnly || void 0,
|
|
238
|
-
"data-invalid": validation.isInvalid || void 0,
|
|
239
|
-
"data-required": props.isRequired || void 0
|
|
240
|
-
}, renderProps.children, inputs));
|
|
241
|
-
}
|
|
242
|
-
const $dbdc5e6e7ce01b4b$export$5c804022b41722df = /*#__PURE__*/ createContext(null);
|
|
243
|
-
//#endregion
|
|
244
|
-
//#region ../../node_modules/.bun/react-aria-components@1.21.1+67f6792bdf102c28/node_modules/react-aria-components/dist/private/Virtualizer.mjs
|
|
245
|
-
const $143fb904d86051ce$var$VirtualizerContext = /*#__PURE__*/ createContext(null);
|
|
246
|
-
const $143fb904d86051ce$var$VirtualizerOptionsContext = /*#__PURE__*/ createContext(null);
|
|
247
|
-
function $143fb904d86051ce$export$89be5a243e59c4b2(props) {
|
|
248
|
-
let { children, layout: layoutProp, layoutOptions, shouldObserveItemSize } = props;
|
|
249
|
-
let layout = useMemo(() => typeof layoutProp === "function" ? new layoutProp() : layoutProp, [layoutProp]);
|
|
250
|
-
let renderer = useMemo(() => ({
|
|
251
|
-
isVirtualized: true,
|
|
252
|
-
layoutDelegate: layout,
|
|
253
|
-
dropTargetDelegate: layout.getDropTargetFromPoint ? layout : void 0,
|
|
254
|
-
CollectionRoot: $143fb904d86051ce$var$CollectionRoot,
|
|
255
|
-
CollectionBranch: $143fb904d86051ce$var$CollectionBranch
|
|
256
|
-
}), [layout]);
|
|
257
|
-
return /*#__PURE__*/ $ahdqC$react.createElement($263ab7fc0f95ccdb$export$4feb769f8ddf26c5.Provider, { value: renderer }, /*#__PURE__*/ $ahdqC$react.createElement($143fb904d86051ce$var$VirtualizerOptionsContext.Provider, { value: {
|
|
258
|
-
layout,
|
|
259
|
-
layoutOptions,
|
|
260
|
-
shouldObserveItemSize
|
|
261
|
-
} }, children));
|
|
262
|
-
}
|
|
263
|
-
function $143fb904d86051ce$var$CollectionRoot({ collection, persistedKeys, scrollRef, renderDropIndicator }) {
|
|
264
|
-
let { layout, layoutOptions, shouldObserveItemSize } = useContext($143fb904d86051ce$var$VirtualizerOptionsContext);
|
|
265
|
-
let layoutOptions2 = layout.useLayoutOptions?.();
|
|
266
|
-
let state = useVirtualizerState({
|
|
267
|
-
allowsWindowScrolling: true,
|
|
268
|
-
layout,
|
|
269
|
-
collection,
|
|
270
|
-
renderView: (type, item) => {
|
|
271
|
-
return item?.render?.(item);
|
|
272
|
-
},
|
|
273
|
-
onVisibleRectChange(rect) {
|
|
274
|
-
let element = scrollRef?.current;
|
|
275
|
-
if (element) {
|
|
276
|
-
element.scrollLeft = rect.x;
|
|
277
|
-
element.scrollTop = rect.y;
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
persistedKeys,
|
|
281
|
-
layoutOptions: useMemo(() => layoutOptions && layoutOptions2 ? {
|
|
282
|
-
...layoutOptions,
|
|
283
|
-
...layoutOptions2
|
|
284
|
-
} : layoutOptions || layoutOptions2, [layoutOptions, layoutOptions2])
|
|
285
|
-
});
|
|
286
|
-
let { contentProps } = useScrollView({
|
|
287
|
-
onVisibleRectChange: state.setVisibleRect,
|
|
288
|
-
onSizeChange: state.setSize,
|
|
289
|
-
contentSize: state.contentSize,
|
|
290
|
-
onScrollStart: state.startScrolling,
|
|
291
|
-
onScrollEnd: state.endScrolling,
|
|
292
|
-
allowsWindowScrolling: true
|
|
293
|
-
}, scrollRef);
|
|
294
|
-
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)));
|
|
295
|
-
}
|
|
296
|
-
function $143fb904d86051ce$var$CollectionBranch({ parent, renderDropIndicator }) {
|
|
297
|
-
let parentView = useContext($143fb904d86051ce$var$VirtualizerContext).virtualizer.getVisibleView(parent.key);
|
|
298
|
-
let { shouldObserveItemSize } = useContext($143fb904d86051ce$var$VirtualizerOptionsContext);
|
|
299
|
-
return $143fb904d86051ce$var$renderChildren(parentView, Array.from(parentView.children), renderDropIndicator, shouldObserveItemSize);
|
|
300
|
-
}
|
|
301
|
-
function $143fb904d86051ce$var$renderChildren(parent, children, renderDropIndicator, shouldObserveItemSize) {
|
|
302
|
-
return children.map((view) => $143fb904d86051ce$var$renderWrapper(parent, view, renderDropIndicator, shouldObserveItemSize));
|
|
303
|
-
}
|
|
304
|
-
function $143fb904d86051ce$var$renderWrapper(parent, reusableView, renderDropIndicator, shouldObserveItemSize) {
|
|
305
|
-
let rendered = /*#__PURE__*/ $ahdqC$react.createElement(VirtualizerItem, {
|
|
306
|
-
key: reusableView.key,
|
|
307
|
-
layoutInfo: reusableView.layoutInfo,
|
|
308
|
-
virtualizer: reusableView.virtualizer,
|
|
309
|
-
parent: parent?.layoutInfo,
|
|
310
|
-
shouldObserveItemSize
|
|
311
|
-
}, reusableView.rendered);
|
|
312
|
-
let { collection, layout } = reusableView.virtualizer;
|
|
313
|
-
let node = reusableView.content;
|
|
314
|
-
if (node?.type === "item" && renderDropIndicator && layout.getDropTargetLayoutInfo) rendered = /*#__PURE__*/ $ahdqC$react.createElement($ahdqC$react.Fragment, { key: reusableView.key }, $143fb904d86051ce$var$renderDropIndicatorWrapper(parent, reusableView, {
|
|
315
|
-
type: "item",
|
|
316
|
-
key: reusableView.content.key,
|
|
317
|
-
dropPosition: "before"
|
|
318
|
-
}, renderDropIndicator), rendered, $263ab7fc0f95ccdb$export$2dbbd341daed716d(collection, node, (target) => $143fb904d86051ce$var$renderDropIndicatorWrapper(parent, reusableView, target, renderDropIndicator)));
|
|
319
|
-
return rendered;
|
|
320
|
-
}
|
|
321
|
-
function $143fb904d86051ce$var$renderDropIndicatorWrapper(parent, reusableView, target, renderDropIndicator) {
|
|
322
|
-
let indicator = renderDropIndicator(target);
|
|
323
|
-
if (indicator) {
|
|
324
|
-
let layoutInfo = reusableView.virtualizer.layout.getDropTargetLayoutInfo(target);
|
|
325
|
-
indicator = /*#__PURE__*/ $ahdqC$react.createElement(VirtualizerItem, {
|
|
326
|
-
layoutInfo,
|
|
327
|
-
virtualizer: reusableView.virtualizer,
|
|
328
|
-
parent: parent?.layoutInfo
|
|
329
|
-
}, indicator);
|
|
330
|
-
}
|
|
331
|
-
return indicator;
|
|
332
|
-
}
|
|
333
|
-
//#endregion
|
|
334
35
|
//#region src/components/inputs/Selection/shared/SelectInputTags.tsx
|
|
335
36
|
const SelectInputTags = ({ selectedItems, isDisabled, selectedTagsType, collapseAfter, onRemove }) => {
|
|
336
37
|
const { displayedItems, remainingCount } = useMemo(() => {
|
|
@@ -348,11 +49,12 @@ const SelectInputTags = ({ selectedItems, isDisabled, selectedTagsType, collapse
|
|
|
348
49
|
isDisabled,
|
|
349
50
|
onDismiss: () => onRemove(item.id),
|
|
350
51
|
excludeFromTabOrder: true,
|
|
351
|
-
className: "z-raised",
|
|
52
|
+
className: "z-raised h-5 py-0!",
|
|
352
53
|
children: item.label
|
|
353
54
|
}, item.id)), remainingCount > 0 && /* @__PURE__ */ jsx(Tag, {
|
|
354
55
|
isDisabled,
|
|
355
56
|
excludeFromTabOrder: true,
|
|
57
|
+
className: "h-5 py-0!",
|
|
356
58
|
children: `+${remainingCount} more`
|
|
357
59
|
}, "remaining-count")] });
|
|
358
60
|
return /* @__PURE__ */ jsx("p", { children: selectedItems.map((item) => item.label).join(", ") });
|
|
@@ -419,21 +121,16 @@ function useSelectItems({ initialSelectedItems, selectedItems, cachedItems, inpu
|
|
|
419
121
|
initialSelectedItems,
|
|
420
122
|
selectedItems
|
|
421
123
|
]);
|
|
422
|
-
const
|
|
423
|
-
allListItems,
|
|
424
|
-
contains,
|
|
425
|
-
inputValue
|
|
426
|
-
]);
|
|
427
|
-
const listItems = useMemo(() => showAll || isClientSearchDisabled ? allListItems : filteredListItems, [
|
|
124
|
+
const listItems = useMemo(() => showAll || isClientSearchDisabled || inputValue.length === 0 ? allListItems : allListItems.filter((item) => contains(item.label, inputValue)), [
|
|
428
125
|
showAll,
|
|
429
126
|
isClientSearchDisabled,
|
|
430
127
|
allListItems,
|
|
431
|
-
|
|
128
|
+
contains,
|
|
129
|
+
inputValue
|
|
432
130
|
]);
|
|
433
131
|
return {
|
|
434
132
|
allItems,
|
|
435
133
|
allListItems,
|
|
436
|
-
filteredListItems,
|
|
437
134
|
listItems,
|
|
438
135
|
selectableListItems: useMemo(() => listItems.filter((item) => !item.isDisabled && !ReservedItemIds.includes(String(item.id))), [listItems])
|
|
439
136
|
};
|
|
@@ -499,12 +196,14 @@ function useDebounceCallback(callback, t0) {
|
|
|
499
196
|
let SelectContext;
|
|
500
197
|
(function(_SelectContext) {
|
|
501
198
|
const Context = createContext({});
|
|
199
|
+
const SelectionContext = createContext({});
|
|
502
200
|
const defaultMapInitialToSelectItem = (item) => ({
|
|
503
201
|
id: item.id,
|
|
504
202
|
label: item.label ?? item.name ?? ""
|
|
505
203
|
});
|
|
506
|
-
_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 }) => {
|
|
507
205
|
const isMultiple = selectionMode === "multiple";
|
|
206
|
+
const isSearchInPopover = isSearchable && searchPlacement === "popover";
|
|
508
207
|
const initialSelectedItems = useMemo(() => {
|
|
509
208
|
if (!initialSelection) return null;
|
|
510
209
|
if (Array.isArray(initialSelection)) return initialSelection.map(mapInitialToSelectItem);
|
|
@@ -573,7 +272,7 @@ let SelectContext;
|
|
|
573
272
|
const syncFieldState = (value) => {
|
|
574
273
|
const newFieldState = {
|
|
575
274
|
value,
|
|
576
|
-
inputValue: isMultiple || Array.isArray(value) ? fieldState.inputValue : getItem(value)?.label ?? "",
|
|
275
|
+
inputValue: isMultiple || isSearchInPopover || Array.isArray(value) ? fieldState.inputValue : getItem(value)?.label ?? "",
|
|
577
276
|
searchValue: ""
|
|
578
277
|
};
|
|
579
278
|
setFieldState(newFieldState);
|
|
@@ -586,11 +285,13 @@ let SelectContext;
|
|
|
586
285
|
else updateValue(value);
|
|
587
286
|
}, [controlledValue]);
|
|
588
287
|
useEffect(() => {
|
|
589
|
-
|
|
288
|
+
updateValue(fieldState.value);
|
|
289
|
+
if (isMultiple) return;
|
|
290
|
+
if (!isSearchInPopover && controlledValue !== null && controlledValue !== void 0 && fieldState.value !== null && fieldState.value !== void 0 && fieldState.inputValue === "" && getItem(fieldState.value)?.label) syncFieldState(fieldState.value);
|
|
590
291
|
}, [allListItems]);
|
|
591
292
|
const handleInputChange = useCallback((inputValue) => {
|
|
592
293
|
const newFieldState = {
|
|
593
|
-
value: isMultiple || inputValue !== "" ? fieldState.value : null,
|
|
294
|
+
value: isMultiple || isSearchInPopover || inputValue !== "" ? fieldState.value : null,
|
|
594
295
|
inputValue,
|
|
595
296
|
searchValue: inputValue
|
|
596
297
|
};
|
|
@@ -601,14 +302,15 @@ let SelectContext;
|
|
|
601
302
|
}, [
|
|
602
303
|
emitStateChanges,
|
|
603
304
|
fieldState.value,
|
|
604
|
-
isMultiple
|
|
305
|
+
isMultiple,
|
|
306
|
+
isSearchInPopover
|
|
605
307
|
]);
|
|
606
308
|
const onChange = useCallback((value) => {
|
|
607
309
|
if (value === "new-item-id") onNewItemOption?.(fieldState.inputValue);
|
|
608
310
|
else {
|
|
609
311
|
const newFieldState = {
|
|
610
312
|
value,
|
|
611
|
-
inputValue: isMultiple || Array.isArray(value) ? "" : getItem(value)?.label ?? "",
|
|
313
|
+
inputValue: isMultiple || isSearchInPopover || Array.isArray(value) ? "" : getItem(value)?.label ?? "",
|
|
612
314
|
searchValue: ""
|
|
613
315
|
};
|
|
614
316
|
setFieldState(newFieldState);
|
|
@@ -623,7 +325,8 @@ let SelectContext;
|
|
|
623
325
|
onNewItemOption,
|
|
624
326
|
fieldState.inputValue,
|
|
625
327
|
getItem,
|
|
626
|
-
isMultiple
|
|
328
|
+
isMultiple,
|
|
329
|
+
isSearchInPopover
|
|
627
330
|
]);
|
|
628
331
|
const onClear = useCallback(() => {
|
|
629
332
|
if (selectedIds.length === 0) {
|
|
@@ -713,11 +416,19 @@ let SelectContext;
|
|
|
713
416
|
isLoading,
|
|
714
417
|
hasLoadMore
|
|
715
418
|
]);
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
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
|
+
})
|
|
719
429
|
});
|
|
720
430
|
};
|
|
431
|
+
_SelectContext.useSelection = () => use(SelectionContext);
|
|
721
432
|
_SelectContext.useSelect = () => {
|
|
722
433
|
return use(Context);
|
|
723
434
|
};
|
|
@@ -782,7 +493,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
782
493
|
const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
|
|
783
494
|
const { t } = useTranslation("ui");
|
|
784
495
|
const state = use($dbdc5e6e7ce01b4b$export$c02625b26074192c);
|
|
785
|
-
const { hoverProps, isHovered } = useHover
|
|
496
|
+
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
786
497
|
const [isFocused, setIsFocused] = useState(false);
|
|
787
498
|
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
|
|
788
499
|
const { isFocusVisible } = useFocusVisible();
|
|
@@ -893,7 +604,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
893
604
|
...focusWithinProps,
|
|
894
605
|
children: [
|
|
895
606
|
/* @__PURE__ */ jsxs("div", {
|
|
896
|
-
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({
|
|
897
608
|
as,
|
|
898
609
|
size,
|
|
899
610
|
...props
|
|
@@ -906,7 +617,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
906
617
|
labelProps
|
|
907
618
|
}),
|
|
908
619
|
leadingContent && /* @__PURE__ */ jsx("div", {
|
|
909
|
-
className: "
|
|
620
|
+
className: "flex shrink-0 items-center",
|
|
910
621
|
children: leadingContent
|
|
911
622
|
}),
|
|
912
623
|
(showTags || isSearchable) && /* @__PURE__ */ jsxs("div", {
|
|
@@ -921,7 +632,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
921
632
|
ref: inputRef,
|
|
922
633
|
placeholder: as === "floating" ? void 0 : placeholder,
|
|
923
634
|
onBlur,
|
|
924
|
-
className: clsx("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),
|
|
925
636
|
onKeyDown,
|
|
926
637
|
onKeyDownCapture: onInputKeyDownCapture,
|
|
927
638
|
...fieldProps
|
|
@@ -936,7 +647,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
936
647
|
onKeyDown: onTriggerKeyDown,
|
|
937
648
|
...fieldProps,
|
|
938
649
|
children: [(as === "floating" && isEmpty || isMultiple && !isEmpty) && /* @__PURE__ */ jsx(Fragment$1, { children: "\xA0" }), (isEmpty || !isMultiple) && (as !== "floating" || !isEmpty) && /* @__PURE__ */ jsxs("span", {
|
|
939
|
-
className: clsx("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"),
|
|
940
651
|
children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
|
|
941
652
|
})]
|
|
942
653
|
})
|
|
@@ -947,7 +658,8 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
947
658
|
onClear();
|
|
948
659
|
},
|
|
949
660
|
as,
|
|
950
|
-
show: showClearButton
|
|
661
|
+
show: showClearButton,
|
|
662
|
+
className: "mr-2"
|
|
951
663
|
}),
|
|
952
664
|
trailingContent && /* @__PURE__ */ jsx("div", {
|
|
953
665
|
className: "flex shrink-0 items-center",
|
|
@@ -956,15 +668,14 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
956
668
|
!hideDropdownIcon && /* @__PURE__ */ jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
957
669
|
excludeFromTabOrder: true,
|
|
958
670
|
"aria-label": t(($) => isOpen ? $.ui.closeAlt : $.ui.openAlt),
|
|
959
|
-
className: clsx("self-stretch pl-
|
|
671
|
+
className: clsx("flex shrink-0 items-center justify-center self-stretch py-0! pl-0! outline-none disabled:text-inherit", inputSizeCva({ size })),
|
|
960
672
|
isDisabled,
|
|
961
673
|
onPress: () => {
|
|
962
674
|
if (!isSearchable) setIsOpen(!isOpen);
|
|
963
675
|
},
|
|
964
676
|
children: /* @__PURE__ */ jsx(IconSlot, {
|
|
965
677
|
icon: ChevronDown,
|
|
966
|
-
className: clsx("
|
|
967
|
-
iconClassName: "fill-current stroke-0",
|
|
678
|
+
className: clsx("opacity-50 transition-transform", isOpen && "rotate-180"),
|
|
968
679
|
"aria-hidden": "true"
|
|
969
680
|
})
|
|
970
681
|
})
|
|
@@ -972,257 +683,62 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
972
683
|
});
|
|
973
684
|
};
|
|
974
685
|
//#endregion
|
|
975
|
-
//#region src/components/inputs/Selection/shared/
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
content,
|
|
989
|
-
t
|
|
990
|
-
]);
|
|
991
|
-
return /* @__PURE__ */ jsxs($928221da08ecbc62$export$a11e76429ed99b4, {
|
|
992
|
-
ref,
|
|
993
|
-
id,
|
|
994
|
-
textValue: label,
|
|
995
|
-
isDisabled,
|
|
996
|
-
className: selectListItemCva({
|
|
997
|
-
isSingle: !isMultiple,
|
|
998
|
-
isNewItem
|
|
999
|
-
}),
|
|
1000
|
-
children: [
|
|
1001
|
-
isMultiple && !isSearchable && /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
1002
|
-
variant: "default",
|
|
1003
|
-
className: "group-focus-visible:outline-none!"
|
|
1004
|
-
}),
|
|
1005
|
-
isMultiple && isSearchable && /* @__PURE__ */ jsx("div", {
|
|
1006
|
-
className: "group",
|
|
1007
|
-
"data-rac": "",
|
|
1008
|
-
"data-selected": selectedIds.includes(id) || void 0,
|
|
1009
|
-
children: /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
1010
|
-
variant: "default",
|
|
1011
|
-
className: "group-focus-visible:outline-none!"
|
|
1012
|
-
})
|
|
1013
|
-
}),
|
|
1014
|
-
itemContent
|
|
1015
|
-
]
|
|
1016
|
-
});
|
|
1017
|
-
};
|
|
1018
|
-
//#endregion
|
|
1019
|
-
//#region src/components/inputs/Selection/shared/SelectListBoxItemSelectAll.tsx
|
|
1020
|
-
const SelectListBoxItemSelectAll = ({ id, label, isDisabled }) => {
|
|
1021
|
-
const selectListItemCva = UIOverrides.useCva("select.listBoxItemCva", selectListBoxItemDefinition);
|
|
1022
|
-
const ref = useRef(null);
|
|
1023
|
-
const { t } = useTranslation("ui");
|
|
1024
|
-
const { selectableListItems, selectedIds } = SelectContext.useSelect();
|
|
1025
|
-
return /* @__PURE__ */ jsxs($928221da08ecbc62$export$a11e76429ed99b4, {
|
|
1026
|
-
ref,
|
|
1027
|
-
id,
|
|
1028
|
-
textValue: label || t(($) => $.ui.select.allOption),
|
|
1029
|
-
isDisabled,
|
|
1030
|
-
className: selectListItemCva({}),
|
|
1031
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
1032
|
-
className: "group",
|
|
1033
|
-
"data-rac": "",
|
|
1034
|
-
"data-selected": selectedIds.length === selectableListItems.length || void 0,
|
|
1035
|
-
"data-indeterminate": selectedIds.length > 0 && selectedIds.length < selectableListItems.length || void 0,
|
|
1036
|
-
children: /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
1037
|
-
variant: "default",
|
|
1038
|
-
className: "group-focus-visible:outline-none!"
|
|
1039
|
-
})
|
|
1040
|
-
}), t(($) => $.ui.select.allOption)]
|
|
1041
|
-
});
|
|
1042
|
-
};
|
|
1043
|
-
//#endregion
|
|
1044
|
-
//#region src/components/inputs/Selection/shared/SelectListBoxLoadingItem.tsx
|
|
1045
|
-
const SelectListBoxLoadingItem = ({ id, label, onLoadMore }) => {
|
|
1046
|
-
const selectListItemCva = UIOverrides.useCva("select.listBoxItemCva", selectListBoxItemDefinition);
|
|
1047
|
-
const { t } = useTranslation("ui");
|
|
1048
|
-
const { isDebouncing, isLoading, hasLoadMore } = SelectContext.useSelect();
|
|
1049
|
-
const onIntersection = useCallback(() => {
|
|
1050
|
-
if (!isDebouncing && !isLoading && hasLoadMore) onLoadMore?.();
|
|
1051
|
-
}, [
|
|
1052
|
-
isDebouncing,
|
|
1053
|
-
isLoading,
|
|
1054
|
-
hasLoadMore,
|
|
1055
|
-
onLoadMore
|
|
1056
|
-
]);
|
|
1057
|
-
const { ref } = useIntersectionObserver({
|
|
1058
|
-
onIntersection,
|
|
1059
|
-
rootMargin: "40px"
|
|
1060
|
-
});
|
|
1061
|
-
return /* @__PURE__ */ jsx($928221da08ecbc62$export$a11e76429ed99b4, {
|
|
1062
|
-
id,
|
|
1063
|
-
textValue: label || t(($) => $.ui.loadingState.text),
|
|
1064
|
-
isDisabled: true,
|
|
1065
|
-
className: selectListItemCva({}),
|
|
1066
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
1067
|
-
ref,
|
|
1068
|
-
className: "flex flex-1 justify-center text-interactive-primary-background",
|
|
1069
|
-
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
1070
|
-
})
|
|
1071
|
-
});
|
|
1072
|
-
};
|
|
1073
|
-
//#endregion
|
|
1074
|
-
//#region src/components/inputs/Selection/shared/SelectListBox.tsx
|
|
1075
|
-
var ReversedListLayout = class extends $a3be900807531178$re_export$ListLayout {
|
|
1076
|
-
reverseLayoutInfo(layoutInfo) {
|
|
1077
|
-
const reversedLayoutInfo = layoutInfo.copy();
|
|
1078
|
-
reversedLayoutInfo.rect.y = this.getContentSize().height - reversedLayoutInfo.rect.maxY;
|
|
1079
|
-
return reversedLayoutInfo;
|
|
1080
|
-
}
|
|
1081
|
-
getLayoutInfo(key) {
|
|
1082
|
-
const layoutInfo = super.getLayoutInfo(key);
|
|
1083
|
-
return layoutInfo ? this.reverseLayoutInfo(layoutInfo) : null;
|
|
1084
|
-
}
|
|
1085
|
-
getVisibleLayoutInfos(rect) {
|
|
1086
|
-
const mirroredRect = new $a3be900807531178$re_export$Rect(rect.x, Math.max(0, this.getContentSize().height - rect.maxY), rect.width, rect.height);
|
|
1087
|
-
return super.getVisibleLayoutInfos(mirroredRect).map((layoutInfo) => this.reverseLayoutInfo(layoutInfo));
|
|
1088
|
-
}
|
|
686
|
+
//#region src/components/inputs/Selection/shared/SelectListBox.lazy.tsx
|
|
687
|
+
let loadedListBox;
|
|
688
|
+
let pendingListBox;
|
|
689
|
+
const loadSelectListBox = () => pendingListBox ??= import("./SelectListBox-ysubv-kl.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(() => {});
|
|
1089
699
|
};
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
const
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
const loadMoreResetKey = loadedItemIds.join("\0");
|
|
1102
|
-
useLayoutEffect(() => {
|
|
1103
|
-
hasRequestedAtTopRef.current = false;
|
|
1104
|
-
}, [loadMoreResetKey]);
|
|
1105
|
-
useLayoutEffect(() => {
|
|
1106
|
-
const previousLoadedItemIds = previousLoadedItemIdsRef.current;
|
|
1107
|
-
const preservesExistingItems = previousLoadedItemIds.length > 0 && previousLoadedItemIds.every((itemId, index) => loadedItemIds[index] === itemId);
|
|
1108
|
-
previousLoadedItemIdsRef.current = loadedItemIds;
|
|
1109
|
-
if (!preservesExistingItems) reverseScrollBottomOffsetRef.current = 0;
|
|
1110
|
-
const listBox = listBoxRef.current;
|
|
1111
|
-
if (!listBox) {
|
|
1112
|
-
isReverseScrollAnchoredRef.current = true;
|
|
1113
|
-
return;
|
|
1114
|
-
}
|
|
1115
|
-
if (!isReversed) {
|
|
1116
|
-
listBox.scrollTop = 0;
|
|
1117
|
-
isReverseScrollAnchoredRef.current = true;
|
|
1118
|
-
return;
|
|
1119
|
-
}
|
|
1120
|
-
isReverseScrollAnchoredRef.current = false;
|
|
1121
|
-
const finishAnchoring = () => {
|
|
1122
|
-
if (listBox.scrollHeight <= listBox.clientHeight) return false;
|
|
1123
|
-
listBox.scrollTop = listBox.scrollHeight - listBox.clientHeight - reverseScrollBottomOffsetRef.current;
|
|
1124
|
-
isReverseScrollAnchoredRef.current = true;
|
|
1125
|
-
return true;
|
|
1126
|
-
};
|
|
1127
|
-
let scrollFrame = requestAnimationFrame(() => {
|
|
1128
|
-
scrollFrame = requestAnimationFrame(() => {
|
|
1129
|
-
if (!finishAnchoring()) isReverseScrollAnchoredRef.current = true;
|
|
1130
|
-
});
|
|
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 });
|
|
1131
711
|
});
|
|
1132
712
|
return () => {
|
|
1133
|
-
|
|
1134
|
-
reverseScrollBottomOffsetRef.current = listBox.scrollHeight - listBox.clientHeight - listBox.scrollTop;
|
|
713
|
+
active = false;
|
|
1135
714
|
};
|
|
1136
|
-
}, [
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
loadedItemIds
|
|
1140
|
-
]);
|
|
1141
|
-
const onSelectionChange = (value) => {
|
|
1142
|
-
const ids = Array.from(value);
|
|
1143
|
-
if (!isMultiple && ids.length === 0) {
|
|
1144
|
-
if (fieldState.value) {
|
|
1145
|
-
onClose?.();
|
|
1146
|
-
onChange(fieldState.value);
|
|
1147
|
-
}
|
|
1148
|
-
return;
|
|
1149
|
-
}
|
|
1150
|
-
if (isMultiple && ids.includes("all-item-id")) {
|
|
1151
|
-
if (ids.length > selectableListItems.length) onClear();
|
|
1152
|
-
else onSelectAll();
|
|
1153
|
-
return;
|
|
1154
|
-
}
|
|
1155
|
-
if (isMultiple) onChange(ids);
|
|
1156
|
-
else {
|
|
1157
|
-
onClose?.();
|
|
1158
|
-
onChange(ids[0]);
|
|
1159
|
-
}
|
|
1160
|
-
};
|
|
1161
|
-
const requestLoadMore = useCallback(() => {
|
|
1162
|
-
if (isLoading) return;
|
|
1163
|
-
if (isReversed && (!isReverseScrollAnchoredRef.current || (listBoxRef.current?.scrollTop ?? 0) > 1 || hasRequestedAtTopRef.current)) return;
|
|
1164
|
-
if (isReversed) hasRequestedAtTopRef.current = true;
|
|
1165
|
-
onLoadMore?.();
|
|
1166
|
-
}, [
|
|
1167
|
-
isLoading,
|
|
1168
|
-
isReversed,
|
|
1169
|
-
onLoadMore
|
|
1170
|
-
]);
|
|
1171
|
-
const onScroll = (event) => {
|
|
1172
|
-
if (!isReversed || !hasLoadMore || !isReverseScrollAnchoredRef.current) return;
|
|
1173
|
-
if (event.currentTarget.scrollTop > 48) hasRequestedAtTopRef.current = false;
|
|
1174
|
-
else requestLoadMore();
|
|
1175
|
-
};
|
|
1176
|
-
const renderItem = (item) => {
|
|
1177
|
-
if (item.isSelectAllItem) return /* @__PURE__ */ jsx(SelectListBoxItemSelectAll, { ...item }, item.id);
|
|
1178
|
-
if (item.isLoadingItem) return /* @__PURE__ */ jsx(SelectListBoxLoadingItem, {
|
|
1179
|
-
...item,
|
|
1180
|
-
onLoadMore: requestLoadMore
|
|
1181
|
-
}, item.id);
|
|
1182
|
-
return /* @__PURE__ */ jsx(SelectListBoxItem, {
|
|
1183
|
-
...item,
|
|
1184
|
-
isSearchable,
|
|
1185
|
-
isNewItem: item.isNewItem,
|
|
1186
|
-
newItemRender
|
|
1187
|
-
}, item.id);
|
|
1188
|
-
};
|
|
1189
|
-
if (shouldVirtualize) return /* @__PURE__ */ jsx($143fb904d86051ce$export$89be5a243e59c4b2, {
|
|
1190
|
-
layout: usesReversedLayout ? ReversedListLayout : $a3be900807531178$re_export$ListLayout,
|
|
1191
|
-
layoutOptions: virtualizerOptions,
|
|
1192
|
-
children: /* @__PURE__ */ jsx($928221da08ecbc62$export$41f133550aa26f48, {
|
|
1193
|
-
ref: listBoxRef,
|
|
1194
|
-
...props,
|
|
1195
|
-
"aria-label": label,
|
|
1196
|
-
selectionMode,
|
|
1197
|
-
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),
|
|
1198
|
-
items: displayedListItems,
|
|
1199
|
-
selectedKeys: selectedIds,
|
|
1200
|
-
onSelectionChange,
|
|
1201
|
-
onScroll,
|
|
1202
|
-
escapeKeyBehavior: "none",
|
|
1203
|
-
shouldSelectOnPressUp: true,
|
|
1204
|
-
children: renderItem
|
|
1205
|
-
})
|
|
1206
|
-
});
|
|
1207
|
-
return /* @__PURE__ */ jsx($928221da08ecbc62$export$41f133550aa26f48, {
|
|
1208
|
-
ref: listBoxRef,
|
|
1209
|
-
...props,
|
|
1210
|
-
"aria-label": label,
|
|
1211
|
-
selectionMode,
|
|
1212
|
-
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),
|
|
1213
|
-
items: displayedListItems,
|
|
1214
|
-
selectedKeys: selectedIds,
|
|
1215
|
-
onSelectionChange,
|
|
1216
|
-
onScroll,
|
|
1217
|
-
escapeKeyBehavior: "none",
|
|
1218
|
-
shouldSelectOnPressUp: true,
|
|
1219
|
-
children: renderItem
|
|
1220
|
-
});
|
|
715
|
+
}, [Component]);
|
|
716
|
+
if (failure) throw failure.error;
|
|
717
|
+
return Component ? /* @__PURE__ */ jsx(Component, { ...props }) : null;
|
|
1221
718
|
};
|
|
1222
719
|
//#endregion
|
|
1223
720
|
//#region src/components/inputs/Selection/shared/SelectDesktop.tsx
|
|
1224
|
-
const
|
|
1225
|
-
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: "sm",
|
|
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;
|
|
1226
742
|
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
1227
743
|
const selectPopoverCva = UIOverrides.useCva("select.popoverCva", selectPopoverDefinition);
|
|
1228
744
|
const formFieldProps = {
|
|
@@ -1241,23 +757,32 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1241
757
|
const { labelProps, fieldProps } = useLabel({ label });
|
|
1242
758
|
const triggerRef = useRef(null);
|
|
1243
759
|
const closeComboBoxRef = useRef(null);
|
|
1244
|
-
const wrapperRef = useRef(null);
|
|
1245
760
|
const popoverRef = useRef(null);
|
|
1246
761
|
const [popoverWidth, setPopoverWidth] = useState(void 0);
|
|
1247
762
|
const [isPopoverAbove, setIsPopoverAbove] = useState(false);
|
|
1248
763
|
const { fieldState, isOpen, setIsOpen, onInputChange, onChange, onClear, onSelectAll, listItems, selectableListItems, selectedIds, isMultiple } = SelectContext.useSelect();
|
|
1249
|
-
|
|
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
|
+
]);
|
|
1250
775
|
useLayoutEffect(() => {
|
|
1251
|
-
if (!isOpen || !
|
|
1252
|
-
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
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" });
|
|
1257
782
|
return () => {
|
|
1258
783
|
observer.disconnect();
|
|
1259
784
|
};
|
|
1260
|
-
}, [isOpen]);
|
|
785
|
+
}, [isOpen, ignoreTriggerWidth]);
|
|
1261
786
|
const onSelectionChange = (value) => {
|
|
1262
787
|
if (!value) return;
|
|
1263
788
|
if (value === "all-item-id") {
|
|
@@ -1328,6 +853,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1328
853
|
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
1329
854
|
as,
|
|
1330
855
|
error,
|
|
856
|
+
triggerTabIndex: -1,
|
|
1331
857
|
children: /* @__PURE__ */ jsx(WrapperComponent, {
|
|
1332
858
|
...isSearchable ? comboBoxProps : {},
|
|
1333
859
|
children: /* @__PURE__ */ jsxs(FormField, {
|
|
@@ -1337,9 +863,14 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1337
863
|
className: clsx("group w-full", containerClassName)
|
|
1338
864
|
},
|
|
1339
865
|
as,
|
|
1340
|
-
onMouseEnter
|
|
1341
|
-
|
|
1342
|
-
|
|
866
|
+
onMouseEnter: (event) => {
|
|
867
|
+
preloadSelectListBox();
|
|
868
|
+
onMouseEnter?.(event);
|
|
869
|
+
},
|
|
870
|
+
onFocusCapture: (event) => {
|
|
871
|
+
preloadSelectListBox();
|
|
872
|
+
onFocusCapture?.(event);
|
|
873
|
+
},
|
|
1343
874
|
children: [customTrigger ? /* @__PURE__ */ jsx($f2ff30fde7b014be$export$2e1e1122cf0cba88, {
|
|
1344
875
|
...dialogTriggerProps,
|
|
1345
876
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -1375,7 +906,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1375
906
|
},
|
|
1376
907
|
fieldProps,
|
|
1377
908
|
headerProps
|
|
1378
|
-
}), (!isSearchable || showPopover) && /* @__PURE__ */ jsx($542a13ca2fa5b484$export$5b6b19405a83ff9d, {
|
|
909
|
+
}), hasOpened && (!isSearchable || showPopover) && /* @__PURE__ */ jsx($542a13ca2fa5b484$export$5b6b19405a83ff9d, {
|
|
1379
910
|
ref: popoverRef,
|
|
1380
911
|
triggerRef,
|
|
1381
912
|
isOpen,
|
|
@@ -1383,7 +914,19 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1383
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({})),
|
|
1384
915
|
style: { width: !ignoreTriggerWidth ? popoverWidth : void 0 },
|
|
1385
916
|
offset: 0,
|
|
1386
|
-
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, {
|
|
1387
930
|
...props,
|
|
1388
931
|
className: clsx(popoverCva({}), "max-h-80! [scrollbar-width:thin]"),
|
|
1389
932
|
autoFocus: !isSearchable,
|
|
@@ -1401,10 +944,10 @@ const FormFieldHeaderClose = ({ onClose }) => {
|
|
|
1401
944
|
return /* @__PURE__ */ jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
1402
945
|
onPress: onClose,
|
|
1403
946
|
"aria-label": t(($) => $.ui.closeAlt),
|
|
1404
|
-
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",
|
|
1405
948
|
children: /* @__PURE__ */ jsx(IconSlot, {
|
|
1406
949
|
icon: X,
|
|
1407
|
-
className: "text-
|
|
950
|
+
className: "text-muted-foreground"
|
|
1408
951
|
})
|
|
1409
952
|
});
|
|
1410
953
|
};
|
|
@@ -1414,23 +957,27 @@ const SelectListBoxSelectionBar = ({ className }) => {
|
|
|
1414
957
|
const { t } = useTranslation("ui");
|
|
1415
958
|
const { onClear, onSelectAll } = SelectContext.useSelect();
|
|
1416
959
|
return /* @__PURE__ */ jsxs("div", {
|
|
1417
|
-
className: clsx("flex items-center justify-between border-border
|
|
1418
|
-
children: [/* @__PURE__ */ jsx(
|
|
960
|
+
className: clsx("flex items-center justify-between border-border border-b px-4 py-3", className),
|
|
961
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
1419
962
|
type: "button",
|
|
1420
963
|
color: "primary",
|
|
1421
964
|
onPress: onSelectAll,
|
|
965
|
+
variant: "text",
|
|
966
|
+
width: "hug",
|
|
1422
967
|
children: t(($) => $.ui.select.selectAll)
|
|
1423
|
-
}), /* @__PURE__ */ jsx(
|
|
968
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
1424
969
|
type: "button",
|
|
1425
970
|
color: "secondary",
|
|
1426
971
|
onPress: onClear,
|
|
972
|
+
variant: "text",
|
|
973
|
+
width: "hug",
|
|
1427
974
|
children: t(($) => $.ui.select.clearSelection)
|
|
1428
975
|
})]
|
|
1429
976
|
});
|
|
1430
977
|
};
|
|
1431
978
|
//#endregion
|
|
1432
979
|
//#region src/components/inputs/Selection/shared/SelectMobile.tsx
|
|
1433
|
-
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 }) => {
|
|
1434
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;
|
|
1435
982
|
const formFieldProps = {
|
|
1436
983
|
error,
|
|
@@ -1475,7 +1022,10 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1475
1022
|
labelProps,
|
|
1476
1023
|
className: clsx("group w-full", containerClassName),
|
|
1477
1024
|
onMouseEnter,
|
|
1478
|
-
onFocusCapture
|
|
1025
|
+
onFocusCapture: (event) => {
|
|
1026
|
+
preloadSelectListBox();
|
|
1027
|
+
onFocusCapture?.(event);
|
|
1028
|
+
},
|
|
1479
1029
|
children: /* @__PURE__ */ jsxs($f2ff30fde7b014be$export$2e1e1122cf0cba88, {
|
|
1480
1030
|
...dialogTriggerProps,
|
|
1481
1031
|
children: [customTrigger ? /* @__PURE__ */ jsx("div", {
|
|
@@ -1526,8 +1076,8 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1526
1076
|
onChange: onInputChange,
|
|
1527
1077
|
rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
|
|
1528
1078
|
inputClassName,
|
|
1529
|
-
className: "mb-
|
|
1530
|
-
leadingIcon: !hideSearchIcon ? /* @__PURE__ */ jsx(Search, { className: "size-
|
|
1079
|
+
className: "mb-2 px-4",
|
|
1080
|
+
leadingIcon: !hideSearchIcon ? /* @__PURE__ */ jsx(Search, { className: "size-4" }) : void 0,
|
|
1531
1081
|
isClearable
|
|
1532
1082
|
}), /* @__PURE__ */ jsx(SelectListBox, {
|
|
1533
1083
|
...props,
|
|
@@ -1542,17 +1092,18 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1542
1092
|
};
|
|
1543
1093
|
//#endregion
|
|
1544
1094
|
//#region src/components/inputs/Selection/shared/SelectBase.tsx
|
|
1545
|
-
const SelectBase = (dProps) => {
|
|
1095
|
+
const SelectBase = ({ layout, ...dProps }) => {
|
|
1546
1096
|
const ui = UIConfig.useConfig();
|
|
1547
|
-
const props =
|
|
1097
|
+
const props = {
|
|
1548
1098
|
...dProps,
|
|
1549
1099
|
selectionMode: dProps.selectionMode ?? ui.select.selectionMode,
|
|
1550
1100
|
variant: dProps.variant ?? ui.input.variant,
|
|
1551
|
-
as: dProps.as
|
|
1101
|
+
as: resolveInputLayout(layout, dProps.as, ui.input.as),
|
|
1552
1102
|
size: dProps.size ?? ui.input.size,
|
|
1553
1103
|
hideLabel: dProps.hideLabel ?? ui.input.hideLabel,
|
|
1554
1104
|
isClearable: dProps.isClearable ?? ui.input.isClearable,
|
|
1555
1105
|
isSearchable: dProps.isSearchable ?? ui.select.isSearchable,
|
|
1106
|
+
isScrollPreventDisabled: dProps.isScrollPreventDisabled ?? ui.select.isScrollPreventDisabled,
|
|
1556
1107
|
selectedTagsType: dProps.selectedTagsType ?? ui.select.selectedTagsType,
|
|
1557
1108
|
ignoreTriggerWidth: dProps.virtualizerOptions || (dProps.totalItems ?? 0) > 100 || dProps.hasLoadMore ? false : dProps.ignoreTriggerWidth ?? false,
|
|
1558
1109
|
collapseAfter: dProps.collapseAfter ?? ui.select.collapseAfter,
|
|
@@ -1560,11 +1111,7 @@ const SelectBase = (dProps) => {
|
|
|
1560
1111
|
multiSelectAutoConfirm: dProps.multiSelectAutoConfirm ?? ui.select.multiSelectAutoConfirm,
|
|
1561
1112
|
searchDebounceDelay: dProps.searchDebounceDelay ?? ui.select.searchDebounceDelay,
|
|
1562
1113
|
isClientSearchDisabled: dProps.ignoreInputValueFiltering ?? dProps.isClientSearchDisabled
|
|
1563
|
-
}
|
|
1564
|
-
dProps,
|
|
1565
|
-
ui.input,
|
|
1566
|
-
ui.select
|
|
1567
|
-
]);
|
|
1114
|
+
};
|
|
1568
1115
|
const isDesktop = useBreakpoint("md");
|
|
1569
1116
|
return /* @__PURE__ */ jsx(SelectContext.Provider, {
|
|
1570
1117
|
...props,
|
|
@@ -1573,7 +1120,7 @@ const SelectBase = (dProps) => {
|
|
|
1573
1120
|
};
|
|
1574
1121
|
//#endregion
|
|
1575
1122
|
//#region src/components/inputs/Selection/shared/StaticSelectTrailingContent.tsx
|
|
1576
|
-
const StaticSelectTrailingContent = ({ trailingContent, hideDropdownIcon, size }) => {
|
|
1123
|
+
const StaticSelectTrailingContent = ({ trailingContent, hideDropdownIcon, size, isDisabled }) => {
|
|
1577
1124
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
1578
1125
|
if (!trailingContent && hideDropdownIcon) return null;
|
|
1579
1126
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [trailingContent && /* @__PURE__ */ jsx("div", {
|
|
@@ -1582,12 +1129,12 @@ const StaticSelectTrailingContent = ({ trailingContent, hideDropdownIcon, size }
|
|
|
1582
1129
|
}), !hideDropdownIcon ? /* @__PURE__ */ jsx("button", {
|
|
1583
1130
|
type: "button",
|
|
1584
1131
|
tabIndex: -1,
|
|
1585
|
-
className: clsx("self-stretch border-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 })),
|
|
1133
|
+
disabled: isDisabled,
|
|
1586
1134
|
"aria-hidden": "true",
|
|
1587
1135
|
children: /* @__PURE__ */ jsx(IconSlot, {
|
|
1588
1136
|
icon: ChevronDown,
|
|
1589
|
-
className: "
|
|
1590
|
-
iconClassName: "fill-current stroke-0"
|
|
1137
|
+
className: "opacity-50"
|
|
1591
1138
|
})
|
|
1592
1139
|
}) : void 0] });
|
|
1593
1140
|
};
|
|
@@ -1615,9 +1162,25 @@ const getStaticSelectValue = ({ items, value, selectionMode, initialSelection, m
|
|
|
1615
1162
|
id: item.id,
|
|
1616
1163
|
label: item.label ?? item.name ?? ""
|
|
1617
1164
|
})), showSelectionContent, isDisabled, collapseAfter, selectedTagsType }) => {
|
|
1618
|
-
|
|
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]);
|
|
1619
1172
|
const allItemsMap = /* @__PURE__ */ new Map();
|
|
1620
|
-
|
|
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
|
+
}
|
|
1621
1184
|
const getItem = (id) => allItemsMap.get(id) ?? null;
|
|
1622
1185
|
const selectedItems = Array.isArray(value) ? value.map((id) => getItem(id)).filter((item) => item != null) : [];
|
|
1623
1186
|
const selectedItem = !Array.isArray(value) && value != null ? getItem(value) : null;
|
|
@@ -1643,4 +1206,149 @@ const getStaticSelectValue = ({ items, value, selectionMode, initialSelection, m
|
|
|
1643
1206
|
};
|
|
1644
1207
|
};
|
|
1645
1208
|
//#endregion
|
|
1646
|
-
|
|
1209
|
+
//#region src/components/inputs/Selection/Select/Select.tsx
|
|
1210
|
+
function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputProps }) {
|
|
1211
|
+
const props = {
|
|
1212
|
+
...inputProps,
|
|
1213
|
+
items: list?.items ?? inputProps.items ?? [],
|
|
1214
|
+
...list && {
|
|
1215
|
+
isLoading: list.isLoading,
|
|
1216
|
+
hasLoadMore: list.hasMore,
|
|
1217
|
+
onLoadMore: () => list.loadMore(),
|
|
1218
|
+
isClientSearchDisabled: true,
|
|
1219
|
+
onSearchChange: (search) => {
|
|
1220
|
+
list.setFilterText(search);
|
|
1221
|
+
inputProps.onSearchChange?.(search);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
};
|
|
1225
|
+
const ui = UIConfig.useConfig();
|
|
1226
|
+
const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
|
|
1227
|
+
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.select.renderStaticInput ?? ui.renderStaticInput));
|
|
1228
|
+
const rootRef = useRef(null);
|
|
1229
|
+
const { renderRealInput, replayStaticInputChange, replayStaticInputPress } = useStaticInputHandoff({
|
|
1230
|
+
inputRef: rootRef,
|
|
1231
|
+
renderInput,
|
|
1232
|
+
setRenderInput,
|
|
1233
|
+
getFocusTarget: (root, _staticTarget, fromEnd) => fromEnd ? getStaticInputFocusTarget(root, true) : root.querySelector("[data-type='select-trigger'], input, button, [tabindex]")
|
|
1234
|
+
});
|
|
1235
|
+
const currentValue = props.value;
|
|
1236
|
+
if (!renderInput && props.selectionMode !== "multiple" && !!props.showSelectionContent && currentValue != null) setRenderInput(true);
|
|
1237
|
+
if (!renderInput && !!props.customTrigger) setRenderInput(true);
|
|
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);
|
|
1266
|
+
const size = props.size ?? ui.input.size;
|
|
1267
|
+
const isMultiple = mode === "multiple";
|
|
1268
|
+
const { selectedItem, displayValue, isEmpty } = staticSelection;
|
|
1269
|
+
const isSearchable = (props.isSearchable ?? ui.select.isSearchable) && props.searchPlacement !== "popover";
|
|
1270
|
+
const trailingContent = /* @__PURE__ */ jsx(StaticSelectTrailingContent, {
|
|
1271
|
+
trailingContent: props.trailingContent,
|
|
1272
|
+
hideDropdownIcon: props.hideDropdownIcon,
|
|
1273
|
+
isDisabled,
|
|
1274
|
+
size
|
|
1275
|
+
});
|
|
1276
|
+
const placeholder = as === "floating" ? null : props.placeholder;
|
|
1277
|
+
const inputValue = !isMultiple && selectedItem ? selectedItem.label : "";
|
|
1278
|
+
const shouldRenderPlaceholderAfterValue = isMultiple && props.placeholder && !isEmpty;
|
|
1279
|
+
const dataAttributes = {
|
|
1280
|
+
dataIsEmpty: isEmpty,
|
|
1281
|
+
dataIsFilled: !isEmpty,
|
|
1282
|
+
dataIsDirty: props.isDirty,
|
|
1283
|
+
dataIsRequired: props.isRequired,
|
|
1284
|
+
dataIsDisabled: isDisabled,
|
|
1285
|
+
dataDisabled: isDisabled,
|
|
1286
|
+
dataInvalid: !!props.error,
|
|
1287
|
+
dataHasSelection: !isEmpty,
|
|
1288
|
+
dataHasSearch: false
|
|
1289
|
+
};
|
|
1290
|
+
const buttonContent = as === "floating" && isEmpty || isMultiple && !isEmpty ? /* @__PURE__ */ jsx(Fragment$1, { children: "\xA0" }) : isEmpty ? /* @__PURE__ */ jsx("span", {
|
|
1291
|
+
className: "block truncate text-muted-foreground empty:before:inline-block empty:before:content-['']",
|
|
1292
|
+
children: placeholder
|
|
1293
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
1294
|
+
className: "block truncate",
|
|
1295
|
+
children: displayValue
|
|
1296
|
+
});
|
|
1297
|
+
return /* @__PURE__ */ jsx(InputFrame, {
|
|
1298
|
+
...props,
|
|
1299
|
+
isDisabled,
|
|
1300
|
+
isLoading: false,
|
|
1301
|
+
className: clsx("group w-full", props.containerClassName),
|
|
1302
|
+
inputClassName: clsx(props.className, props.inputClassName),
|
|
1303
|
+
contentWrapperClassName: selectInputTagsContentWrapperCva({ isSearchable }),
|
|
1304
|
+
contentGroup: "select",
|
|
1305
|
+
contentClassName: "pr-2!",
|
|
1306
|
+
clearClassName: "mr-2",
|
|
1307
|
+
labelPlacement: "content-row",
|
|
1308
|
+
dataAttributes,
|
|
1309
|
+
wrapTrailingContent: false,
|
|
1310
|
+
onStaticInteract: renderRealInput,
|
|
1311
|
+
onStaticPress: replayStaticInputPress,
|
|
1312
|
+
leadingContent: props.leadingContent && /* @__PURE__ */ jsx("div", {
|
|
1313
|
+
className: "flex shrink-0 items-center",
|
|
1314
|
+
children: props.leadingContent
|
|
1315
|
+
}),
|
|
1316
|
+
onClear: () => props.onChange?.(isMultiple ? [] : null),
|
|
1317
|
+
showClear: !isEmpty,
|
|
1318
|
+
trailingContent,
|
|
1319
|
+
children: (dataAttributeProps) => /* @__PURE__ */ jsxs(Fragment$1, { children: [isMultiple && !isEmpty && displayValue, isSearchable ? /* @__PURE__ */ jsx("input", {
|
|
1320
|
+
disabled: isDisabled,
|
|
1321
|
+
tabIndex: -1,
|
|
1322
|
+
role: "combobox",
|
|
1323
|
+
"aria-autocomplete": "list",
|
|
1324
|
+
"aria-controls": `${dataAttributeProps.id}-listbox`,
|
|
1325
|
+
"aria-expanded": false,
|
|
1326
|
+
value: inputValue,
|
|
1327
|
+
placeholder: shouldRenderPlaceholderAfterValue ? props.placeholder : placeholder ?? void 0,
|
|
1328
|
+
className: clsx("min-w-0 w-full flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:text-inherit", props.inputClassName),
|
|
1329
|
+
onChange: (event) => replayStaticInputChange(event.target.value),
|
|
1330
|
+
...dataAttributeProps,
|
|
1331
|
+
"data-rac": true
|
|
1332
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
1333
|
+
type: "button",
|
|
1334
|
+
disabled: isDisabled,
|
|
1335
|
+
tabIndex: -1,
|
|
1336
|
+
"data-type": "select-trigger",
|
|
1337
|
+
className: clsx("w-full truncate bg-transparent text-start outline-none disabled:text-inherit", isMultiple && !isEmpty && "absolute inset-0 z-0"),
|
|
1338
|
+
onClick: replayStaticInputPress,
|
|
1339
|
+
...dataAttributeProps,
|
|
1340
|
+
"data-rac": true,
|
|
1341
|
+
children: buttonContent
|
|
1342
|
+
})] })
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
return /* @__PURE__ */ jsx(SelectBase, {
|
|
1346
|
+
...props,
|
|
1347
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(props.ref, rootRef)
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
function Select(props) {
|
|
1351
|
+
return /* @__PURE__ */ jsx(SelectInner, { ...props });
|
|
1352
|
+
}
|
|
1353
|
+
//#endregion
|
|
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 };
|