@povio/ui 6.0.0-rc.11 → 6.0.0-rc.13
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 +470 -43
- package/dist/{Accordion-Cup5eRZz.d.ts → Accordion-CR9oomZY.d.ts} +29 -17
- package/dist/{Accordion-ORBin0EZ.js → Accordion-gUW7u1Zn.js} +41 -41
- package/dist/Alert-DwnALnFY.d.ts +36 -0
- package/dist/AlertDialog-BcRiqY_n.d.ts +70 -0
- package/dist/Autocomplete-CV4Aa1Ok.js +319 -0
- package/dist/Autocomplete-DRwQxx0U.d.ts +123 -0
- package/dist/Badge-CO-ZsmbR.d.ts +67 -0
- package/dist/{BottomSheet-CGipksM_.js → BottomSheet-APVu5TUd.js} +8 -8
- package/dist/BottomSheet-Be0HtQzP.d.ts +65 -0
- package/dist/{BottomSheet.lazy-CuJMUeJP.d.ts → BottomSheet.lazy-NNB7ivkW.d.ts} +1 -1
- package/dist/{Breadcrumbs-CcB0oOF8.d.ts → Breadcrumbs-Bn3fqVYx.d.ts} +6 -3
- package/dist/{Breadcrumbs-a1-q_he0.js → Breadcrumbs-Cd75RPbS.js} +33 -17
- package/dist/{Button-C1YB5dOw.js → Button-BJJkLVNj.js} +1 -5
- package/dist/{Button-BaODzvZd.js → Button-CzEs3tcV.js} +1 -1
- package/dist/{Button-0SswSdDg.d.ts → Button-Hk8zm9q_.d.ts} +2 -2
- package/dist/ButtonBase-Cp1w00t2.d.ts +47 -0
- package/dist/{ButtonBase-s-VV7oCa.js → ButtonBase-aGz6DYum.js} +10 -18
- package/dist/{ButtonContent-Dztbuz3q.js → ButtonContent-2KsbdWRO.js} +5 -5
- package/dist/{Calendar-DX0dVo6z.js → Calendar-DN-i_b-_.js} +19 -17
- package/dist/{Calendar.lazy-W51M56GQ.js → Calendar.lazy-CqmyDSND.js} +4 -4
- package/dist/{Checkbox-Bjsbx-wK.js → Checkbox-CzKXZw_w.js} +35 -9
- package/dist/Checkbox-D32MOIhF.d.ts +49 -0
- package/dist/CheckboxCheckmark-DDU_Ie7-.js +42 -0
- package/dist/CheckboxGroup-B5Mn1G3u.d.ts +52 -0
- package/dist/{CheckboxGroup-B3O3IUiu.js → CheckboxGroup-BqWt09kZ.js} +75 -35
- package/dist/DatePicker-CmoVbapu.d.ts +80 -0
- package/dist/{DatePicker-CqNS7lgR.js → DatePicker-DQewd1By.js} +80 -41
- package/dist/{DatePickerInput-vLlL5ATh.d.ts → DatePickerInput-B9VnExeA.d.ts} +3 -3
- package/dist/{DatePickerInput-B2Pc_aJr.js → DatePickerInput-Bp9ZIN5E.js} +37 -26
- package/dist/{DateRangePicker-C3ClfSfj.js → DateRangePicker-DRZ1hLlR.js} +93 -169
- package/dist/DateRangePicker-LX1VJlnD.d.ts +102 -0
- package/dist/DateTimePicker-D9pODhAj.d.ts +83 -0
- package/dist/{DateTimePicker-CYa2J-1r.js → DateTimePicker-DWtKPaE6.js} +70 -35
- package/dist/{Dialog-C9H9_BmK.js → Dialog-BJ13KRQo.js} +1 -1
- package/dist/{Dialog-96c4Pzfm.js → Dialog-BzQYDPJ9.js} +23 -19
- package/dist/Dialog-D0SeePPz.d.ts +66 -0
- package/dist/{Disclosure-BRSkMbZQ.js → Disclosure-Bjm5IOpg.js} +1 -1
- package/dist/Drawer-o018RqIt.d.ts +42 -0
- package/dist/DropdownMenu-DTr7b-XO.d.ts +51 -0
- package/dist/{DropdownMenu-DS0RaEfH.js → DropdownMenu-DrshB60h.js} +33 -21
- package/dist/{DropdownMenuDesktop-DGPIfex-.js → DropdownMenuDesktop-DxGA0yvx.js} +14 -8
- package/dist/FileInput-Bokcp9nH.d.ts +61 -0
- package/dist/{FileInput-IRM0C9W6.js → FileInput-LMhFxlqB.js} +75 -80
- package/dist/FileUpload-BqXd4_nz.d.ts +181 -0
- package/dist/FileUpload-CJZrkr_U.js +679 -0
- package/dist/{FormField-dduTMkNH.js → FormField-TI8Vx5aC.js} +10 -10
- package/dist/FormField-XQbjfGSv.d.ts +70 -0
- package/dist/{FormFieldError-BT4uxbKY.d.ts → FormFieldError-C7yOdjzQ.d.ts} +1 -0
- package/dist/FormFieldHeaderTooltip-DB7KrrcD.js +22 -0
- package/dist/HiddenFormValue-DZ2d9eoA.js +20 -0
- package/dist/IconButton-CQLHX8-Y.d.ts +24 -0
- package/dist/{IconSlot-CqNuZl0E.js → IconSlot-TAWTJ6iK.js} +2 -4
- package/dist/{InlineTooltipWrapper-CKTiFpZn.js → InlineTooltipWrapper-CjDUsi2I.js} +1 -1
- package/dist/{Input-UbFhc_J2.js → Input-CeRJeAoR.js} +94 -59
- package/dist/Input-onUj0DKg.d.ts +56 -0
- package/dist/{InputContent-D7lnNLWk.js → InputContent-B8OCdbVP.js} +15 -13
- package/dist/InputContent-D5ZkB9hO.d.ts +39 -0
- package/dist/Link-BdnWVYL9.d.ts +15 -0
- package/dist/{ListBox-DhR5kojP.js → ListBox-gR4iSV7N.js} +3 -3
- package/dist/{Modal-DcLWF9cB.js → Modal-DAMsCwzb.js} +1 -1
- package/dist/{NumberField-twW8zuJ9.js → NumberField-6Q9LHGSo.js} +91 -62
- package/dist/NumberField-Sb30Qao3.d.ts +41 -0
- package/dist/{NumberRangeInput-gT6gEJIz.js → NumberRangeInput-BDSkcHVJ.js} +152 -101
- package/dist/NumberRangeInput-Dvq8mOUY.d.ts +89 -0
- package/dist/{PageHeader-DTfzf-dA.d.ts → PageHeader-eJk6GNK6.d.ts} +6 -5
- package/dist/{PasswordInput.bound-CXtbMCD6.js → PasswordInput-BcHpV0Ie.js} +6 -6
- package/dist/PasswordInput-VHzP4VPU.d.ts +16 -0
- package/dist/Popover-qplPGDnR.d.ts +51 -0
- package/dist/Progress-DH-w99MU.d.ts +26 -0
- package/dist/Progress-WzWvbvtp.js +180 -0
- package/dist/ProgressBar-BsSimmJF.js +46 -0
- package/dist/RadioGroup-CC8bKtBN.d.ts +52 -0
- package/dist/{RadioGroup-IL4Y8XHO.js → RadioGroup-PKqFHoKP.js} +66 -26
- package/dist/{RangeCalendar-0W1YFZqn.js → RangeCalendar-DqCTlIuy.js} +42 -13
- package/dist/Select-CSyfDyxG.d.ts +248 -0
- package/dist/{Select-B-TuE_Fh.js → Select-D3fuXwVt.js} +435 -184
- package/dist/{SelectListBox-Dlonoc5z.js → SelectListBox-DqAxkT1f.js} +46 -37
- package/dist/{SidebarWorkspaces-DJknAfS9.js → SidebarWorkspaces-BGl_PIsH.js} +280 -363
- package/dist/{SidebarWorkspaces-DDHJAdNH.d.ts → SidebarWorkspaces-CdtK2M-C.d.ts} +31 -17
- package/dist/{Slider-DCsCCPFx.js → Slider-BCUiALjE.js} +69 -12
- package/dist/Slider-DxalZD3o.d.ts +57 -0
- package/dist/Spinner-BTrEbNFy.d.ts +13 -0
- package/dist/SplitButton-Dv5l8p5t.d.ts +25 -0
- package/dist/Stepper-B1IOUcSI.d.ts +49 -0
- package/dist/{Stepper-Dyhxp0Tl.js → Stepper-DA2G546I.js} +116 -88
- package/dist/{Switch-BfpSMMpv.js → Switch-Ce-bJOVw.js} +54 -12
- package/dist/Switch-urNrop0P.d.ts +42 -0
- package/dist/{TabsFilters-CWUNeqYa.js → TabsFilters-Cweij8He.js} +44 -33
- package/dist/TabsFilters-M5Ld7eb8.d.ts +59 -0
- package/dist/Tag-BKR1AZFa.d.ts +26 -0
- package/dist/TextArea-D7YVclaz.d.ts +33 -0
- package/dist/{TextArea-DakA3nzZ.js → TextArea-P8F0oD_A.js} +59 -32
- package/dist/TimePicker-Ai1M2TGW.d.ts +63 -0
- package/dist/{TimePicker-RFzfDezn.js → TimePicker-l4Ysk2AX.js} +99 -50
- package/dist/{TimePickerForm-DohOZViU.js → TimePickerForm-BMqNpDPT.js} +5 -5
- package/dist/{ToastContainer-Dd0LPykL.js → ToastContainer-BeklfvlK.js} +4 -4
- package/dist/{ToggleButton-HUZ8ij6i.d.ts → ToggleButton-DWw53pTt.d.ts} +2 -2
- package/dist/ToggleGroup-BQk3k0at.d.ts +95 -0
- package/dist/ToggleGroup-BdIgqoqA.js +500 -0
- package/dist/{Tooltip-DRB6lo0U.js → Tooltip-BkXPEBqw.js} +2 -2
- package/dist/Tooltip-H8OB7CqY.d.ts +33 -0
- package/dist/TooltipEllipsis-7QF00kXk.d.ts +21 -0
- package/dist/{TooltipWrapper-DLBksJsF.js → TooltipWrapper-ubbBHHVD.js} +6 -6
- package/dist/{Typography-DJojwiXV.d.ts → Typography-Cx1oRGxd.d.ts} +5 -1
- package/dist/{badgeButton.cva-t5PQOH4M.js → badge.cva-BpoxNggB.js} +20 -22
- package/dist/{button.cva-Ciga0rdG.js → button.cva-C2aoXMh-.js} +10 -16
- package/dist/{buttonContent.cva-BapnODby.d.ts → buttonContent.cva-Dyy_RUZU.d.ts} +1 -1
- package/dist/{checkbox.cva-aLJS7v4z.js → checkbox.cva-qU_q0lSX.js} +14 -14
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +2 -2
- package/dist/components/alert-dialog.js +174 -128
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +17 -15
- package/dist/components/autocomplete.d.ts +2 -2
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.d.ts +2 -2
- package/dist/components/badge.js +159 -81
- package/dist/components/bottom-sheet-header.d.ts +1 -1
- package/dist/components/bottom-sheet-header.js +4 -4
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +2 -2
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.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.d.ts +4 -41
- package/dist/components/date-range-picker.js +4 -2
- package/dist/components/date-range-presets.d.ts +2 -0
- package/dist/components/date-range-presets.js +3 -0
- package/dist/components/date-time-picker.d.ts +2 -2
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.d.ts +1 -1
- package/dist/components/drawer.js +16 -80
- package/dist/components/dropdown-menu.d.ts +2 -3
- package/dist/components/dropdown-menu.js +2 -3
- package/dist/components/file-input.d.ts +2 -2
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload.d.ts +2 -3
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.d.ts +3 -2
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +22 -25
- package/dist/components/icon-slot.d.ts +1 -2
- package/dist/components/icon-slot.js +2 -2
- package/dist/components/input-frame.d.ts +6 -10
- package/dist/components/input-frame.js +29 -26
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +2 -2
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/number-field.d.ts +2 -2
- package/dist/components/number-field.js +2 -2
- 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 +1 -1
- package/dist/components/page-header.js +5 -5
- package/dist/components/password-input.d.ts +2 -2
- package/dist/components/password-input.js +1 -22
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +105 -87
- package/dist/components/progress.d.ts +2 -2
- 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.d.ts +2 -2
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +1 -1
- 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 +71 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +15 -4
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/style-definitions.d.ts +2 -2
- package/dist/components/style-definitions.js +33 -18
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs-filters.d.ts +1 -1
- package/dist/components/tabs-filters.js +1 -1
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +50 -64
- 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 +3 -3
- package/dist/components/toast.js +4 -3
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.d.ts +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- 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/use-toast.d.ts +2 -2
- package/dist/components/use-toast.js +1 -41
- package/dist/config/component-configuration.d.ts +1 -1
- package/dist/config/component-configuration.js +53 -2
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/link-context.d.ts +3 -3
- 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/ui-config.d.ts +2 -2
- package/dist/config/ui-config.js +1 -1
- package/dist/config/ui-router.d.ts +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/confirmation.context-BflM4Vxg.js +93 -0
- package/dist/confirmation.context-C_js9qNv.d.ts +32 -0
- package/dist/{datePickerInput.cva-Du0Zn04v.js → datePickerInput.cva-CWkV2fut.js} +1 -1
- package/dist/dateRangePreset.utils-Bnb-rjTt.js +116 -0
- package/dist/{dialog.cva-BIpz6HcA.js → dialog.cva-BjVggO5l.js} +1 -1
- package/dist/{dist-DEZzXa0W.js → dist-DZOoWaZz.js} +63 -38
- package/dist/{dropdownMenu.cva-DwSOcbmR.js → dropdownMenu.cva-BopsvbOy.js} +19 -7
- package/dist/{exports-BNrTn8Tj.js → exports-DeBGRThC.js} +3 -3
- package/dist/{file.utils-Crb-mIHs.d.ts → file.utils-DUADtzdt.d.ts} +3 -3
- package/dist/{file.utils-DqQxnuAm.js → file.utils-X6tkeWaz.js} +2 -6
- package/dist/fileInputButton.cva-gbqRUf1g.js +39 -0
- package/dist/{fileUpload.cva-BYzXGc9C.js → fileUpload.cva-MH5ziWUe.js} +2 -2
- package/dist/form-field-Bw7U_ZPI.d.ts +1 -0
- package/dist/form.binding-Brdjq2yr.js +161 -0
- package/dist/form.binding-DSXB2AOD.d.ts +127 -0
- package/dist/form.types-a2WVJDQX.d.ts +43 -0
- package/dist/formReset-CnZl_yze.js +35 -0
- package/dist/hints-B09_WDhL.d.ts +17 -0
- package/dist/hooks/use-async-list.d.ts +1 -1
- package/dist/hooks/use-async-list.js +1 -1
- package/dist/hooks/use-breakpoint.d.ts +3 -0
- package/dist/hooks/use-breakpoint.js +2 -0
- package/dist/hooks/use-filters.d.ts +2 -2
- package/dist/hooks/use-filters.js +1 -1
- package/dist/{i18n-EDC8xyfH.d.ts → i18n-B3PeqBM7.d.ts} +100 -20
- package/dist/{i18n-BE9Wvs9L.js → i18n-DQs7jPjv.js} +99 -25
- package/dist/iconSlot.cva-DyhOI7EK.js +5 -0
- package/dist/{import-Dkfk7PHt.js → import-C73fI3WD.js} +2 -2
- package/dist/index.d.ts +64 -85
- package/dist/index.js +55 -92
- package/dist/{input.cva-DZii82eS.js → input.cva-mm1dnfKP.js} +27 -23
- package/dist/inputLayout-CIVpuUBq.js +7 -0
- package/dist/inputRow.clsx-BbcaXVta.js +6 -0
- package/dist/{label.cva-DTfT6FrX.js → label.cva-DJ5Dmbz5.js} +7 -7
- package/dist/link.context-BcBuP9ZT.d.ts +20 -0
- package/dist/{link.context-TPjDtjw3.js → link.context-CD5h_b5O.js} +12 -11
- package/dist/link.cva-D6L1c2wq.d.ts +2157 -0
- package/dist/{logger-CqZjM-sn.js → logger-CW24po62.js} +10 -1
- package/dist/{progress.cva-CsGaGVJ-.js → progress.cva-mkJxrrac.js} +2 -2
- package/dist/{radio.cva-DistaZtZ.js → radio.cva-Dt5N2ul2.js} +7 -7
- package/dist/rich-text-editor.d.ts +44 -2
- package/dist/rich-text-editor.js +733 -1
- package/dist/router.context-B6j_M4cN.js +151 -0
- package/dist/router.context-CSd9JYQ4.d.ts +33 -0
- package/dist/{selectDesktop.cva-DStkOdwm.js → selectDesktop.cva-30JAvtgB.js} +1 -1
- package/dist/sidebar.cva-BgxTCejU.js +150 -0
- package/dist/spinner.cva-j4kGmIWC.js +17 -0
- package/dist/{staticDateTimeSegments-4tIzPL8l.js → staticDateTimeSegments-BYk1tcxs.js} +43 -13
- package/dist/{status.cva-CYgi3Htz.js → status.cva-WLEqUAjH.js} +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/tanstack/form.d.ts +3 -3
- package/dist/tanstack/form.js +3 -3
- package/dist/tanstack/table.d.ts +5 -3
- package/dist/tanstack/table.js +2 -2
- package/dist/tanstack-ABeiJISz.js +10 -0
- package/dist/tanstack-bLXoUPDY.d.ts +165 -0
- package/dist/tanstack.d.ts +64 -85
- package/dist/tanstack.js +55 -92
- package/dist/{toast.cva-B6NXTwbZ.js → toast.cva-C3oA7He3.js} +8 -8
- package/dist/toast.runtime-BHXdSTXV.js +25 -0
- package/dist/{toggleGroup.cva-CJ-3Ps7j.js → toggleGroup.cva-CvNS5QO1.js} +2 -2
- package/dist/uiConfig.context-CN_QgxGO.d.ts +19 -0
- package/dist/{uiConfig.context-3DN9w6oU.js → uiConfig.context-CjnLnQOo.js} +5 -7
- package/dist/{uiConfig.context-BnCORTNm.d.ts → uiConfig.types-B0sPL7nN.d.ts} +34 -34
- package/dist/{useAsyncList-Ct74ve3i.js → useAsyncList-CQgkDfjW.js} +140 -35
- package/dist/useAsyncList-F-328rtE.d.ts +25 -0
- package/dist/useAutoFocus-K-bfNxa2.js +16 -0
- package/dist/{useBreakpoint-CJ3mx7UF.js → useBreakpoint-BrJrvp9_.js} +5 -1
- package/dist/useBreakpoint-D-SVcBeQ.d.ts +9 -0
- package/dist/useDebounceCallback-BjePw6y4.js +90 -0
- package/dist/useFilters-CybBXUAA.js +217 -0
- package/dist/useFilters-DrfBFNLw.d.ts +57 -0
- package/dist/useFormAutosave-BN-zueci.js +419 -0
- package/dist/{useFormAutosave-BBLm3Ujo.d.ts → useFormAutosave-ClMnzVE7.d.ts} +1 -1
- package/dist/{useIntersectionObserver-DFAhTsV0.js → useIntersectionObserver-B8msnQTR.js} +15 -3
- package/dist/{numberStatic.utils-BIyZuILs.js → useLiveNumberFieldState-B7qGzySj.js} +103 -2
- package/dist/useRemoveButton-B6-IGvpY.js +98 -0
- package/dist/useResolveDateRangePreset-C_L-doA6.js +26 -0
- package/dist/useResolveDateRangePreset-DOSzJR-N.d.ts +64 -0
- package/dist/{useScrollableListBox-oYKqU3Hp.js → useScrollableListBox-C8chM7c-.js} +1 -1
- package/dist/{useStaticInputHandoff-BN0fOerH.js → useStaticInputHandoff-DrNFrvD7.js} +6 -1
- package/dist/{useTableColumnConfig-D3KH4Rpo.js → useTableColumnConfig-B9cYBKo3.js} +956 -689
- package/dist/useTableNav-rP1wDkhV.d.ts +372 -0
- package/dist/useToast-D2C9pROU.d.ts +78 -0
- package/dist/useToast-DSoOiSw0.js +63 -0
- package/dist/utils/file.d.ts +1 -1
- package/dist/utils/file.js +1 -1
- package/dist/utils/logger.js +1 -1
- package/llms.txt +3116 -0
- package/package.json +13 -131
- package/MIGRATION.md +0 -673
- package/dist/Alert-D4X7OWiv.d.ts +0 -34
- package/dist/AlertDialog-DklLDjmw.d.ts +0 -26
- package/dist/Autocomplete-BgFz3kuR.d.ts +0 -23
- package/dist/Autocomplete-BxRjxjtp.js +0 -145
- package/dist/Autocomplete.bound-CpHZZ3C9.d.ts +0 -9
- package/dist/Autocomplete.bound-DweyHUI5.js +0 -28
- package/dist/Badge-Db1ndK67.d.ts +0 -30
- package/dist/BadgeButton-BPhWDAnc.d.ts +0 -15
- package/dist/BottomSheet-BZmDJBR-.d.ts +0 -33
- package/dist/ButtonBase-CZuEy3Pk.d.ts +0 -32
- package/dist/Checkbox-w2j5hLOQ.d.ts +0 -27
- package/dist/Checkbox.bound-D2nBglJz.js +0 -33
- package/dist/Checkbox.bound-DD_RCjVm.d.ts +0 -9
- package/dist/CheckboxCheckmark-DWsYVZuu.js +0 -25
- package/dist/CheckboxGroup-BYI15Y09.d.ts +0 -30
- package/dist/CheckboxGroup.bound-DY0HKGSh.js +0 -32
- package/dist/CheckboxGroup.bound-QiJ-P0KR.d.ts +0 -9
- package/dist/ComboBox-ChsdI0lt.js +0 -212
- package/dist/DatePicker-QzfQf21b.d.ts +0 -56
- package/dist/DatePicker.bound-DoCAqhM4.d.ts +0 -9
- package/dist/DatePicker.bound-Dxg2LM89.js +0 -36
- package/dist/DateRangePicker-32D4pWJg.d.ts +0 -97
- package/dist/DateRangePicker.bound-CVtoVsho.d.ts +0 -9
- package/dist/DateRangePicker.bound-PR9rBoXc.js +0 -35
- package/dist/DateTimePicker-BTRIUagV.d.ts +0 -55
- package/dist/DateTimePicker.bound-CQxnRveH.js +0 -32
- package/dist/DateTimePicker.bound-X4DTyQ1b.d.ts +0 -9
- package/dist/Dialog-CO9xljD3.d.ts +0 -21
- package/dist/Drawer-D1cHiBFO.d.ts +0 -18
- package/dist/DropdownMenu-D_9z9ond.d.ts +0 -25
- package/dist/FileInput-BEaECoBS.d.ts +0 -75
- package/dist/FileInput.bound-CctyulN9.js +0 -30
- package/dist/FileInput.bound-D2HuuqSb.d.ts +0 -8
- package/dist/FileUpload-BUTSqHVk.d.ts +0 -11
- package/dist/FileUpload-Dfs3FvJ7.js +0 -749
- package/dist/FileUpload.bound-CGQXb4iT.d.ts +0 -16
- package/dist/FileUpload.bound-vik_sTkm.js +0 -30
- package/dist/FileUploadContainer-Dzg5aXXZ.d.ts +0 -5
- package/dist/FormField-DGyCDxOp.d.ts +0 -42
- package/dist/FormFieldHeaderTooltip-Dt-g40Tc.js +0 -17
- package/dist/IconButton-shH_9wcl.d.ts +0 -25
- package/dist/Input-CTp_9mS9.d.ts +0 -34
- package/dist/Input.bound-0iJO2-ia.js +0 -31
- package/dist/Input.bound-B9a62ylL.d.ts +0 -9
- package/dist/InputContent-BCNkN4Fx.d.ts +0 -27
- package/dist/Link-PvYB_M-j.d.ts +0 -30
- package/dist/MenuItem-U3-pu1j5.d.ts +0 -6
- package/dist/NumberField-WXebfxjK.d.ts +0 -34
- package/dist/NumberField.bound-DHDsBNvI.js +0 -32
- package/dist/NumberField.bound-Dy0A5iVc.d.ts +0 -9
- package/dist/NumberRangeInput-BCKQaGpy.d.ts +0 -50
- package/dist/NumberRangeInput.bound-5Yv3Og73.js +0 -32
- package/dist/NumberRangeInput.bound-BNXxIQ0b.d.ts +0 -9
- package/dist/Pagination-BCGUVYOF.d.ts +0 -12
- package/dist/PaginationList-CvlSkJGn.d.ts +0 -18
- package/dist/PaginationList-D7SRwySe.js +0 -220
- package/dist/PasswordInput-EhQjYyJS.d.ts +0 -11
- package/dist/PasswordInput.bound-CK5GwKL4.d.ts +0 -9
- package/dist/Popover-D_t1XDPA.d.ts +0 -20
- package/dist/Progress-Ckfpi_-M.d.ts +0 -45
- package/dist/Progress-RiEGGxNG.js +0 -119
- package/dist/RadioGroup-6e-Z6jW8.d.ts +0 -26
- package/dist/RadioGroup.bound-BFWSq-on.js +0 -32
- package/dist/RadioGroup.bound-w3SZqSkH.d.ts +0 -9
- package/dist/RichTextEditor-BuqZth3X.js +0 -651
- package/dist/RichTextEditor-DHhuBeT6.d.ts +0 -28
- package/dist/Select-C34ENdjq.d.ts +0 -119
- package/dist/Select.bound-CNCChZww.js +0 -34
- package/dist/Select.bound-qOihchei.d.ts +0 -17
- package/dist/Slider-DRg8zKRM.d.ts +0 -23
- package/dist/Slider.bound-CByTXPTr.js +0 -31
- package/dist/Slider.bound-CaEF19um.d.ts +0 -9
- package/dist/Spinner-Cvy_6zgD.d.ts +0 -30
- package/dist/Spinner-DqjP06T1.js +0 -101
- package/dist/SplitButton-V1f2NWfh.d.ts +0 -15
- package/dist/Stepper-k91x_m-E.d.ts +0 -114
- package/dist/Switch-ELVPkPx0.d.ts +0 -24
- package/dist/Switch.bound-DeEdVvZV.d.ts +0 -9
- package/dist/Switch.bound-Dv0cHsMM.js +0 -33
- package/dist/TableDnd-CuHxANWh.js +0 -133
- package/dist/TableRowDetails-D8HFTghI.d.ts +0 -109
- package/dist/TabsFilters-DePddjCk.d.ts +0 -30
- package/dist/Tag-B2_ZiSE-.d.ts +0 -44
- package/dist/TextArea-iqUeB2QY.d.ts +0 -26
- package/dist/TextArea.bound-BJHyCogp.d.ts +0 -9
- package/dist/TextArea.bound-CDVPP_qb.js +0 -28
- package/dist/TimePicker-BZ1ocsBX.d.ts +0 -45
- package/dist/TimePicker.bound-8DmjMXuE.d.ts +0 -9
- package/dist/TimePicker.bound-DPia51Qs.js +0 -32
- package/dist/Toast-D9pdadZ4.d.ts +0 -16
- package/dist/ToggleGroup-CrDoeLN0.js +0 -333
- package/dist/ToggleGroup-DvjnSinl.d.ts +0 -42
- package/dist/ToggleGroup.bound-B03ISHQ8.d.ts +0 -9
- package/dist/ToggleGroup.bound-DCnYwmBt.js +0 -67
- package/dist/Tooltip-B8DTURLQ.d.ts +0 -16
- package/dist/TooltipEllipsis-Di9Dvd4x.d.ts +0 -11
- package/dist/badgeButton.cva-CBFIhr1S.d.ts +0 -41
- package/dist/button.cva-C8LGtNJ3.d.ts +0 -94
- package/dist/checkbox.cva-CCh_UlrC.d.ts +0 -76
- package/dist/components/badge-button.d.ts +0 -2
- package/dist/components/badge-button.js +0 -74
- package/dist/components/file-upload-container.d.ts +0 -3
- package/dist/components/file-upload-container.js +0 -15
- 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 -138
- package/dist/confirmation.context-BwlIEVeF.js +0 -114
- package/dist/confirmation.context-C_GDRn3a.d.ts +0 -23
- package/dist/fileUpload.types-C-ke21yY.d.ts +0 -110
- package/dist/form.binding-DOR5gIQf.js +0 -49
- package/dist/form.types-C8P4sznq.d.ts +0 -22
- package/dist/formFieldHelper.cva-DRmSyRZN.js +0 -14
- package/dist/iconSlot.cva-CLB5Tlsr.d.ts +0 -9
- package/dist/icons.d.ts +0 -4
- package/dist/icons.js +0 -3
- package/dist/input.cva-BjuHsDGy.d.ts +0 -80
- package/dist/inputLayout-KdAtunGk.js +0 -5
- package/dist/link.context-BCHn7NSy.d.ts +0 -12
- package/dist/radio.cva-D7M1hqLe.d.ts +0 -56
- package/dist/router.context-CtafjXV7.d.ts +0 -16
- package/dist/router.context-MckTbHw9.js +0 -63
- package/dist/routing.utils-DfxEt0_Y.js +0 -30
- package/dist/style-definitions-Dx6aFDiR.d.ts +0 -1038
- package/dist/switch.cva-r6vcS25Q.d.ts +0 -16
- package/dist/tanstack/autocomplete.d.ts +0 -3
- package/dist/tanstack/autocomplete.js +0 -2
- package/dist/tanstack/checkbox-group.d.ts +0 -3
- package/dist/tanstack/checkbox-group.js +0 -2
- package/dist/tanstack/checkbox.d.ts +0 -3
- package/dist/tanstack/checkbox.js +0 -2
- package/dist/tanstack/date-picker.d.ts +0 -3
- package/dist/tanstack/date-picker.js +0 -2
- package/dist/tanstack/date-range-picker.d.ts +0 -3
- package/dist/tanstack/date-range-picker.js +0 -2
- package/dist/tanstack/date-time-picker.d.ts +0 -3
- package/dist/tanstack/date-time-picker.js +0 -2
- package/dist/tanstack/file-input.d.ts +0 -3
- package/dist/tanstack/file-input.js +0 -2
- package/dist/tanstack/file-upload.d.ts +0 -4
- package/dist/tanstack/file-upload.js +0 -2
- package/dist/tanstack/input.d.ts +0 -3
- package/dist/tanstack/input.js +0 -2
- package/dist/tanstack/number-field.d.ts +0 -3
- package/dist/tanstack/number-field.js +0 -2
- package/dist/tanstack/number-range-input.d.ts +0 -3
- package/dist/tanstack/number-range-input.js +0 -2
- package/dist/tanstack/password-input.d.ts +0 -2
- package/dist/tanstack/password-input.js +0 -2
- package/dist/tanstack/radio-group.d.ts +0 -3
- package/dist/tanstack/radio-group.js +0 -2
- package/dist/tanstack/rich-text-editor.d.ts +0 -9
- package/dist/tanstack/rich-text-editor.js +0 -28
- package/dist/tanstack/select.d.ts +0 -3
- package/dist/tanstack/select.js +0 -2
- package/dist/tanstack/slider.d.ts +0 -3
- package/dist/tanstack/slider.js +0 -2
- package/dist/tanstack/switch.d.ts +0 -3
- package/dist/tanstack/switch.js +0 -2
- package/dist/tanstack/text-area.d.ts +0 -3
- package/dist/tanstack/text-area.js +0 -2
- package/dist/tanstack/time-picker.d.ts +0 -3
- package/dist/tanstack/time-picker.js +0 -2
- package/dist/tanstack/toggle-group.d.ts +0 -3
- package/dist/tanstack/toggle-group.js +0 -2
- package/dist/tanstack-Bgdv0qU1.js +0 -19
- package/dist/tanstack-CtuKX9Ss.d.ts +0 -568
- package/dist/toast.cva-AmLw6Cf5.d.ts +0 -61
- package/dist/toast.runtime-Drd2IJ_j.js +0 -17
- package/dist/toastActivation.store-BELtcr76.js +0 -16
- package/dist/toggleGroup.cva-DA4U21gn.d.ts +0 -26
- package/dist/typography.cva-BCHlTHdM.d.ts +0 -36
- package/dist/useAsyncList-Cu-Y8If2.d.ts +0 -9
- package/dist/useFilters-BxRScJdn.d.ts +0 -11
- package/dist/useFilters-DMi94RZK.js +0 -190
- package/dist/useForm-Cb7KWLds.js +0 -217
- package/dist/useForm-I6z23FXf.d.ts +0 -51
- package/dist/useFormAutosave-BPGlChiY.js +0 -216
- package/dist/useTableNav-H5DrogZU.d.ts +0 -215
- package/dist/useToast-DsA8CVoY.d.ts +0 -16
|
@@ -1,64 +1,243 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
2
|
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
-
import { t as IconSlot } from "./IconSlot-
|
|
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-
|
|
6
|
-
import {
|
|
7
|
-
import { n as $
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { t as IconSlot } from "./IconSlot-TAWTJ6iK.js";
|
|
4
|
+
import { c as $7230ffa83bc0c2cf$export$ef03459518577ad4, i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, l as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a } from "./utils-BkLF-JA3.js";
|
|
5
|
+
import { _ as $4b38b5b75ecc6208$export$698f465ec27e93df, g as $4b38b5b75ecc6208$export$2f2b9559550c7bbc, i as $f2ff30fde7b014be$export$d2f961adcb0afbe, l as $542a13ca2fa5b484$export$5b6b19405a83ff9d, t as $f2ff30fde7b014be$export$2e1e1122cf0cba88, u as $542a13ca2fa5b484$export$9b9a0cd73afb7ca4 } from "./Dialog-BJ13KRQo.js";
|
|
6
|
+
import { t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-BGvF9vWx.js";
|
|
7
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1, t as $7705c033048f6da7$export$24d547caef80ccd1 } from "./Button-BJJkLVNj.js";
|
|
8
|
+
import { t as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-D72yc4S6.js";
|
|
9
|
+
import { n as $1f3c3b1a70cec653$export$ff05c3ac10437e03, t as $cdaed739b1139372$export$c24727297075ec6a } from "./Form-CqF1SaVw.js";
|
|
10
|
+
import { n as $41fb335299a4a39e$export$f5b8910cec6cf069, t as $41fb335299a4a39e$export$37fb8590cf2c088c } from "./Input-BG0Xjw5X.js";
|
|
11
|
+
import { n as $928221da08ecbc62$export$7c5906fe4f1f2af2, r as $928221da08ecbc62$export$7ff8f37d2d81a48d } from "./ListBox-gR4iSV7N.js";
|
|
12
|
+
import { i as $a3be900807531178$re_export$useFilter } from "./exports-DeBGRThC.js";
|
|
10
13
|
import "./popoverAnimation-DEZSvKP8.js";
|
|
11
|
-
import
|
|
12
|
-
import { t as
|
|
14
|
+
import "./i18n-DQs7jPjv.js";
|
|
15
|
+
import { i as useDeepCompareMemo, t as UIConfig } from "./uiConfig.context-CjnLnQOo.js";
|
|
16
|
+
import { t as Button } from "./Button-CzEs3tcV.js";
|
|
13
17
|
import { BottomSheet } from "./components/bottom-sheet.js";
|
|
14
|
-
import { t as useBreakpoint } from "./useBreakpoint-
|
|
18
|
+
import { t as useBreakpoint } from "./useBreakpoint-BrJrvp9_.js";
|
|
19
|
+
import { n as FieldController } from "./form.binding-Brdjq2yr.js";
|
|
15
20
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { t as
|
|
19
|
-
import "./
|
|
20
|
-
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-
|
|
21
|
+
import { t as useFieldAccessibility } from "./useFieldAccessibility-eZIMECmG.js";
|
|
22
|
+
import { n as FormFieldLabel, t as FormField } from "./FormField-TI8Vx5aC.js";
|
|
23
|
+
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-mm1dnfKP.js";
|
|
24
|
+
import { n as resolveInputLayout, t as isFieldHeaderHiddenByLayout } from "./inputLayout-CIVpuUBq.js";
|
|
25
|
+
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-ubbBHHVD.js";
|
|
21
26
|
import { t as popoverDefinition } from "./popover.cva-DAbfSma6.js";
|
|
22
|
-
import {
|
|
27
|
+
import { r as useStaticInputHandoff, t as getStaticInputFocusTarget } from "./useStaticInputHandoff-DrNFrvD7.js";
|
|
23
28
|
import { InputFrame } from "./components/input-frame.js";
|
|
24
|
-
import { t as Input } from "./Input-
|
|
25
|
-
import {
|
|
26
|
-
import { n as selectInputTagsContentWrapperDefinition, t as selectPopoverDefinition } from "./selectDesktop.cva-
|
|
27
|
-
import { ChevronDown, Search, X } from "lucide-react";
|
|
29
|
+
import { t as Input } from "./Input-CeRJeAoR.js";
|
|
30
|
+
import { n as SelectInputTags, t as useDebounceCallback } from "./useDebounceCallback-BjePw6y4.js";
|
|
31
|
+
import { n as selectInputTagsContentWrapperDefinition, t as selectPopoverDefinition } from "./selectDesktop.cva-30JAvtgB.js";
|
|
28
32
|
import { c } from "react/compiler-runtime";
|
|
29
|
-
import { Fragment, createContext, use, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
33
|
+
import $ahdqC$react, { Fragment, createContext, memo, use, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
30
34
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
35
|
+
import { ChevronDown, Search, X } from "lucide-react";
|
|
36
|
+
import "react-aria/mergeProps";
|
|
37
|
+
import { CollectionBuilder } from "react-aria/CollectionBuilder";
|
|
38
|
+
import { filterDOMProps } from "react-aria/filterDOMProps";
|
|
39
|
+
import "react-aria/useFocusRing";
|
|
40
|
+
import "react-aria/useHover";
|
|
41
|
+
import { createHideableComponent } from "react-aria/private/collections/Hidden";
|
|
42
|
+
import { useResizeObserver } from "react-aria/private/utils/useResizeObserver";
|
|
43
|
+
import { useComboBox } from "react-aria/useComboBox";
|
|
44
|
+
import { useComboBoxState } from "react-stately/useComboBoxState";
|
|
45
|
+
import { useFilter } from "react-aria/useFilter";
|
|
46
|
+
import "react-aria/useListFormatter";
|
|
47
|
+
import { useTranslation } from "react-i18next";
|
|
31
48
|
import { usePreventScroll } from "react-aria";
|
|
32
49
|
import { useLabel } from "@react-aria/label";
|
|
33
|
-
import { useFocusVisible, useFocusWithin, useHover } from "@react-aria/interactions";
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
}, [selectedItems, collapseAfter]);
|
|
47
|
-
if (selectedTagsType === "tags") return /* @__PURE__ */ jsxs(Fragment$1, { children: [displayedItems.map((item) => /* @__PURE__ */ jsx(Tag, {
|
|
48
|
-
dismissable: true,
|
|
50
|
+
import { useFocusVisible, useFocusWithin, useHover as useHover$1 } from "@react-aria/interactions";
|
|
51
|
+
//#region ../../node_modules/.bun/react-aria-components@1.22.1+67f6792bdf102c28/node_modules/react-aria-components/dist/private/Group.mjs
|
|
52
|
+
const $3a442827418ebe87$export$f9c6924e160136d1 = /*#__PURE__*/ createContext({});
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region ../../node_modules/.bun/react-aria-components@1.22.1+67f6792bdf102c28/node_modules/react-aria-components/dist/private/ComboBox.mjs
|
|
55
|
+
const $dbdc5e6e7ce01b4b$export$d414ccceff7063c3 = /*#__PURE__*/ createContext(null);
|
|
56
|
+
const $dbdc5e6e7ce01b4b$export$c02625b26074192c = /*#__PURE__*/ createContext(null);
|
|
57
|
+
const $dbdc5e6e7ce01b4b$export$72b9695b8216309a = /*#__PURE__*/ createHideableComponent(function ComboBox(props, ref) {
|
|
58
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $dbdc5e6e7ce01b4b$export$d414ccceff7063c3);
|
|
59
|
+
let { children, isDisabled = false, isInvalid = false, isRequired = false, isReadOnly = false } = props;
|
|
60
|
+
let content = useMemo(() => /*#__PURE__*/ $ahdqC$react.createElement($928221da08ecbc62$export$7ff8f37d2d81a48d.Provider, { value: { items: props.items ?? props.defaultItems } }, typeof children === "function" ? children({
|
|
61
|
+
isOpen: false,
|
|
49
62
|
isDisabled,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
63
|
+
isInvalid,
|
|
64
|
+
isRequired,
|
|
65
|
+
defaultChildren: null,
|
|
66
|
+
isReadOnly
|
|
67
|
+
}) : children), [
|
|
68
|
+
children,
|
|
55
69
|
isDisabled,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
isInvalid,
|
|
71
|
+
isRequired,
|
|
72
|
+
isReadOnly,
|
|
73
|
+
props.items,
|
|
74
|
+
props.defaultItems
|
|
75
|
+
]);
|
|
76
|
+
return /*#__PURE__*/ $ahdqC$react.createElement(CollectionBuilder, { content }, (collection) => /*#__PURE__*/ $ahdqC$react.createElement($dbdc5e6e7ce01b4b$var$ComboBoxInner, {
|
|
77
|
+
props,
|
|
78
|
+
collection,
|
|
79
|
+
comboBoxRef: ref
|
|
80
|
+
}));
|
|
81
|
+
});
|
|
82
|
+
const $dbdc5e6e7ce01b4b$var$CLEAR_CONTEXTS = [
|
|
83
|
+
$43a3b93638fe5db9$export$75b6ee27786ba447,
|
|
84
|
+
$7705c033048f6da7$export$24d547caef80ccd1,
|
|
85
|
+
$41fb335299a4a39e$export$37fb8590cf2c088c,
|
|
86
|
+
$4b38b5b75ecc6208$export$698f465ec27e93df,
|
|
87
|
+
$3a442827418ebe87$export$f9c6924e160136d1,
|
|
88
|
+
$efe09c6d1c304b50$export$9afb8bc826b033ea
|
|
89
|
+
];
|
|
90
|
+
function $dbdc5e6e7ce01b4b$var$ComboBoxInner({ props, collection, comboBoxRef: ref }) {
|
|
91
|
+
let { name, formValue = "key", allowsCustomValue } = props;
|
|
92
|
+
if (allowsCustomValue) formValue = "text";
|
|
93
|
+
let { validationBehavior: formValidationBehavior } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e($cdaed739b1139372$export$c24727297075ec6a) || {};
|
|
94
|
+
let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? "native";
|
|
95
|
+
let { contains } = useFilter({ sensitivity: "base" });
|
|
96
|
+
let state = useComboBoxState({
|
|
97
|
+
...props,
|
|
98
|
+
defaultFilter: props.defaultFilter || contains,
|
|
99
|
+
items: props.items,
|
|
100
|
+
children: void 0,
|
|
101
|
+
collection,
|
|
102
|
+
validationBehavior
|
|
103
|
+
});
|
|
104
|
+
let buttonRef = useRef(null);
|
|
105
|
+
let inputRef = useRef(null);
|
|
106
|
+
let groupRef = useRef(null);
|
|
107
|
+
let listBoxRef = useRef(null);
|
|
108
|
+
let popoverRef = useRef(null);
|
|
109
|
+
let [labelRef, label] = $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
110
|
+
let [labelElementType, setLabelElementType] = useState("label");
|
|
111
|
+
let { buttonProps, inputProps, listBoxProps, labelProps, descriptionProps, errorMessageProps, valueProps, ...validation } = useComboBox({
|
|
112
|
+
...$7230ffa83bc0c2cf$export$ef03459518577ad4(props),
|
|
113
|
+
label,
|
|
114
|
+
inputRef,
|
|
115
|
+
buttonRef,
|
|
116
|
+
listBoxRef,
|
|
117
|
+
popoverRef,
|
|
118
|
+
name: formValue === "text" ? name : void 0,
|
|
119
|
+
validationBehavior,
|
|
120
|
+
labelElementType
|
|
121
|
+
}, state);
|
|
122
|
+
let [menuWidth, setMenuWidth] = useState(null);
|
|
123
|
+
let onResize = useCallback(() => {
|
|
124
|
+
if (inputRef.current && !groupRef.current) {
|
|
125
|
+
let buttonRect = buttonRef.current?.getBoundingClientRect();
|
|
126
|
+
let inputRect = inputRef.current.getBoundingClientRect();
|
|
127
|
+
let minX = buttonRect ? Math.min(buttonRect.left, inputRect.left) : inputRect.left;
|
|
128
|
+
let maxX = buttonRect ? Math.max(buttonRect.right, inputRect.right) : inputRect.right;
|
|
129
|
+
setMenuWidth(maxX - minX + "px");
|
|
130
|
+
}
|
|
131
|
+
}, [
|
|
132
|
+
buttonRef,
|
|
133
|
+
inputRef,
|
|
134
|
+
setMenuWidth
|
|
135
|
+
]);
|
|
136
|
+
useResizeObserver({
|
|
137
|
+
ref: inputRef,
|
|
138
|
+
onResize
|
|
139
|
+
});
|
|
140
|
+
let triggerRef = useMemo(() => ({ get current() {
|
|
141
|
+
return groupRef.current || inputRef.current;
|
|
142
|
+
} }), [groupRef, inputRef]);
|
|
143
|
+
let renderPropsState = useMemo(() => ({
|
|
144
|
+
isOpen: state.isOpen,
|
|
145
|
+
isDisabled: props.isDisabled || false,
|
|
146
|
+
isInvalid: validation.isInvalid || false,
|
|
147
|
+
isRequired: props.isRequired || false,
|
|
148
|
+
isReadOnly: props.isReadOnly || false
|
|
149
|
+
}), [
|
|
150
|
+
state.isOpen,
|
|
151
|
+
props.isDisabled,
|
|
152
|
+
validation.isInvalid,
|
|
153
|
+
props.isRequired,
|
|
154
|
+
props.isReadOnly
|
|
155
|
+
]);
|
|
156
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
157
|
+
...props,
|
|
158
|
+
values: renderPropsState,
|
|
159
|
+
defaultClassName: "react-aria-ComboBox"
|
|
160
|
+
});
|
|
161
|
+
let DOMProps = filterDOMProps(props, { global: true });
|
|
162
|
+
delete DOMProps.id;
|
|
163
|
+
let inputs = [];
|
|
164
|
+
if (name && formValue === "key") {
|
|
165
|
+
let values = Array.isArray(state.value) ? state.value : [state.value];
|
|
166
|
+
if (values.length === 0) values = [null];
|
|
167
|
+
inputs = values.map((value, i) => /*#__PURE__*/ $ahdqC$react.createElement("input", {
|
|
168
|
+
key: i,
|
|
169
|
+
type: "hidden",
|
|
170
|
+
name,
|
|
171
|
+
form: props.form,
|
|
172
|
+
value: value ?? ""
|
|
173
|
+
}));
|
|
174
|
+
}
|
|
175
|
+
return /*#__PURE__*/ $ahdqC$react.createElement($7230ffa83bc0c2cf$export$2881499e37b75b9a, { values: [
|
|
176
|
+
[$dbdc5e6e7ce01b4b$export$c02625b26074192c, state],
|
|
177
|
+
[$43a3b93638fe5db9$export$75b6ee27786ba447, {
|
|
178
|
+
...labelProps,
|
|
179
|
+
elementType: labelElementType,
|
|
180
|
+
ref: labelRef
|
|
181
|
+
}],
|
|
182
|
+
[$7705c033048f6da7$export$24d547caef80ccd1, {
|
|
183
|
+
...buttonProps,
|
|
184
|
+
ref: buttonRef,
|
|
185
|
+
isPressed: state.isOpen
|
|
186
|
+
}],
|
|
187
|
+
[$41fb335299a4a39e$export$37fb8590cf2c088c, {
|
|
188
|
+
...inputProps,
|
|
189
|
+
ref: inputRef
|
|
190
|
+
}],
|
|
191
|
+
[$4b38b5b75ecc6208$export$698f465ec27e93df, {
|
|
192
|
+
...inputProps,
|
|
193
|
+
ref: useCallback((el) => {
|
|
194
|
+
inputRef.current = el;
|
|
195
|
+
if (el) setLabelElementType(el.tagName.toLowerCase() === "input" ? "label" : "span");
|
|
196
|
+
}, []),
|
|
197
|
+
value: state.inputValue,
|
|
198
|
+
onChange: (v) => state.setInputValue(v)
|
|
199
|
+
}],
|
|
200
|
+
[$f2ff30fde7b014be$export$d2f961adcb0afbe, state],
|
|
201
|
+
[$542a13ca2fa5b484$export$9b9a0cd73afb7ca4, {
|
|
202
|
+
ref: popoverRef,
|
|
203
|
+
triggerRef,
|
|
204
|
+
scrollRef: listBoxRef,
|
|
205
|
+
placement: "bottom start",
|
|
206
|
+
isNonModal: true,
|
|
207
|
+
trigger: "ComboBox",
|
|
208
|
+
style: { "--trigger-width": menuWidth },
|
|
209
|
+
clearContexts: $dbdc5e6e7ce01b4b$var$CLEAR_CONTEXTS
|
|
210
|
+
}],
|
|
211
|
+
[$928221da08ecbc62$export$7ff8f37d2d81a48d, {
|
|
212
|
+
...listBoxProps,
|
|
213
|
+
ref: listBoxRef
|
|
214
|
+
}],
|
|
215
|
+
[$928221da08ecbc62$export$7c5906fe4f1f2af2, state],
|
|
216
|
+
[$efe09c6d1c304b50$export$9afb8bc826b033ea, { slots: {
|
|
217
|
+
description: descriptionProps,
|
|
218
|
+
errorMessage: errorMessageProps
|
|
219
|
+
} }],
|
|
220
|
+
[$3a442827418ebe87$export$f9c6924e160136d1, {
|
|
221
|
+
ref: groupRef,
|
|
222
|
+
isInvalid: validation.isInvalid,
|
|
223
|
+
isDisabled: props.isDisabled || false
|
|
224
|
+
}],
|
|
225
|
+
[$1f3c3b1a70cec653$export$ff05c3ac10437e03, validation],
|
|
226
|
+
[$dbdc5e6e7ce01b4b$export$5c804022b41722df, valueProps]
|
|
227
|
+
] }, /*#__PURE__*/ $ahdqC$react.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
228
|
+
...DOMProps,
|
|
229
|
+
...renderProps,
|
|
230
|
+
ref,
|
|
231
|
+
slot: props.slot || void 0,
|
|
232
|
+
"data-focused": state.isFocused || void 0,
|
|
233
|
+
"data-open": state.isOpen || void 0,
|
|
234
|
+
"data-disabled": props.isDisabled || void 0,
|
|
235
|
+
"data-readonly": props.isReadOnly || void 0,
|
|
236
|
+
"data-invalid": validation.isInvalid || void 0,
|
|
237
|
+
"data-required": props.isRequired || void 0
|
|
238
|
+
}, renderProps.children, inputs));
|
|
239
|
+
}
|
|
240
|
+
const $dbdc5e6e7ce01b4b$export$5c804022b41722df = /*#__PURE__*/ createContext(null);
|
|
62
241
|
//#endregion
|
|
63
242
|
//#region src/components/inputs/Selection/shared/useSelectItems.tsx
|
|
64
243
|
const SelectAllItemId = "all-item-id";
|
|
@@ -84,12 +263,12 @@ const ReservedItemIds = [
|
|
|
84
263
|
NewItemId,
|
|
85
264
|
LoadingItemId
|
|
86
265
|
];
|
|
87
|
-
function useSelectItems({ initialSelectedItems, selectedItems, cachedItems, inputValue, showAll, isMultiple, showSelectAllOption, showNewItemOption, newItemMinLength = 3, isLoading,
|
|
266
|
+
function useSelectItems({ initialSelectedItems, selectedItems, cachedItems, inputValue, showAll, isMultiple, showSelectAllOption, showNewItemOption, newItemMinLength = 3, isLoading, hasNextPage, isClientSearchDisabled }) {
|
|
88
267
|
const { contains } = $a3be900807531178$re_export$useFilter({ sensitivity: "base" });
|
|
89
268
|
const allListItems = useMemo(() => {
|
|
90
|
-
const showSelectAllItem = isMultiple && showSelectAllOption && inputValue.length === 0 && !
|
|
269
|
+
const showSelectAllItem = isMultiple && showSelectAllOption && inputValue.length === 0 && !hasNextPage;
|
|
91
270
|
const showNewItem = showNewItemOption && inputValue.length >= newItemMinLength && !cachedItems.find((item) => contains(item.label, inputValue));
|
|
92
|
-
const showLoadingItem = isLoading ||
|
|
271
|
+
const showLoadingItem = isLoading || hasNextPage;
|
|
93
272
|
return [
|
|
94
273
|
...showSelectAllItem ? [SelectAllItem(inputValue)] : [],
|
|
95
274
|
...cachedItems,
|
|
@@ -104,7 +283,7 @@ function useSelectItems({ initialSelectedItems, selectedItems, cachedItems, inpu
|
|
|
104
283
|
cachedItems,
|
|
105
284
|
contains,
|
|
106
285
|
isLoading,
|
|
107
|
-
|
|
286
|
+
hasNextPage,
|
|
108
287
|
showSelectAllOption
|
|
109
288
|
]);
|
|
110
289
|
const allItems = useMemo(() => {
|
|
@@ -136,62 +315,6 @@ function useSelectItems({ initialSelectedItems, selectedItems, cachedItems, inpu
|
|
|
136
315
|
};
|
|
137
316
|
}
|
|
138
317
|
//#endregion
|
|
139
|
-
//#region src/hooks/useDebounceCallback.ts
|
|
140
|
-
function useDebounceCallback(callback, t0) {
|
|
141
|
-
const $ = c(10);
|
|
142
|
-
let t1;
|
|
143
|
-
if ($[0] !== t0) {
|
|
144
|
-
t1 = t0 === void 0 ? {} : t0;
|
|
145
|
-
$[0] = t0;
|
|
146
|
-
$[1] = t1;
|
|
147
|
-
} else t1 = $[1];
|
|
148
|
-
const { delay: t2 } = t1;
|
|
149
|
-
const delay = t2 === void 0 ? 500 : t2;
|
|
150
|
-
const timeoutRef = useRef(null);
|
|
151
|
-
const [isDebouncing, setIsDebouncing] = useState(false);
|
|
152
|
-
let t3;
|
|
153
|
-
if ($[2] !== callback || $[3] !== delay) {
|
|
154
|
-
t3 = (...t4) => {
|
|
155
|
-
const args = t4;
|
|
156
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
157
|
-
setIsDebouncing(true);
|
|
158
|
-
timeoutRef.current = setTimeout(() => {
|
|
159
|
-
setIsDebouncing(false);
|
|
160
|
-
callback?.(...args);
|
|
161
|
-
}, delay);
|
|
162
|
-
};
|
|
163
|
-
$[2] = callback;
|
|
164
|
-
$[3] = delay;
|
|
165
|
-
$[4] = t3;
|
|
166
|
-
} else t3 = $[4];
|
|
167
|
-
const debouncedCallback = t3;
|
|
168
|
-
let t4;
|
|
169
|
-
let t5;
|
|
170
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
171
|
-
t4 = () => () => {
|
|
172
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
173
|
-
};
|
|
174
|
-
t5 = [];
|
|
175
|
-
$[5] = t4;
|
|
176
|
-
$[6] = t5;
|
|
177
|
-
} else {
|
|
178
|
-
t4 = $[5];
|
|
179
|
-
t5 = $[6];
|
|
180
|
-
}
|
|
181
|
-
useEffect(t4, t5);
|
|
182
|
-
let t6;
|
|
183
|
-
if ($[7] !== debouncedCallback || $[8] !== isDebouncing) {
|
|
184
|
-
t6 = {
|
|
185
|
-
callback: debouncedCallback,
|
|
186
|
-
isDebouncing
|
|
187
|
-
};
|
|
188
|
-
$[7] = debouncedCallback;
|
|
189
|
-
$[8] = isDebouncing;
|
|
190
|
-
$[9] = t6;
|
|
191
|
-
} else t6 = $[9];
|
|
192
|
-
return t6;
|
|
193
|
-
}
|
|
194
|
-
//#endregion
|
|
195
318
|
//#region src/components/inputs/Selection/shared/select.context.tsx
|
|
196
319
|
let SelectContext;
|
|
197
320
|
(function(_SelectContext) {
|
|
@@ -201,7 +324,8 @@ let SelectContext;
|
|
|
201
324
|
id: item.id,
|
|
202
325
|
label: item.label ?? item.name ?? ""
|
|
203
326
|
});
|
|
204
|
-
_SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading,
|
|
327
|
+
_SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasNextPage, isClientSearchDisabled, searchDebounceDelay, multiSelectAutoConfirm = false, onBlur: fieldOnBlur, onChange: fieldOnChange, initialSelection, isSearchable, searchPlacement, selectionMode, value: controlledValueProp, children, mapInitialToSelectItem = defaultMapInitialToSelectItem }) => {
|
|
328
|
+
const controlledValue = controlledValueProp;
|
|
205
329
|
const isMultiple = selectionMode === "multiple";
|
|
206
330
|
const isSearchInPopover = isSearchable && searchPlacement === "popover";
|
|
207
331
|
const initialSelectedItems = useMemo(() => {
|
|
@@ -233,8 +357,8 @@ let SelectContext;
|
|
|
233
357
|
showNewItemOption,
|
|
234
358
|
newItemMinLength,
|
|
235
359
|
isLoading,
|
|
236
|
-
|
|
237
|
-
isClientSearchDisabled
|
|
360
|
+
hasNextPage,
|
|
361
|
+
isClientSearchDisabled
|
|
238
362
|
});
|
|
239
363
|
const selectedItems = useMemo(() => {
|
|
240
364
|
const getItem = (id) => allItems.find((item) => item.id === id) ?? null;
|
|
@@ -395,7 +519,7 @@ let SelectContext;
|
|
|
395
519
|
isMultiple,
|
|
396
520
|
multiSelectAutoConfirm,
|
|
397
521
|
isLoading,
|
|
398
|
-
|
|
522
|
+
hasNextPage
|
|
399
523
|
}), [
|
|
400
524
|
fieldState,
|
|
401
525
|
isOpen,
|
|
@@ -414,7 +538,7 @@ let SelectContext;
|
|
|
414
538
|
isMultiple,
|
|
415
539
|
multiSelectAutoConfirm,
|
|
416
540
|
isLoading,
|
|
417
|
-
|
|
541
|
+
hasNextPage
|
|
418
542
|
]);
|
|
419
543
|
const selection = useDeepCompareMemo(() => ({
|
|
420
544
|
selectedIds,
|
|
@@ -487,13 +611,13 @@ const handleKeyInteraction = ({ event, interactions }) => {
|
|
|
487
611
|
};
|
|
488
612
|
//#endregion
|
|
489
613
|
//#region src/components/inputs/Selection/shared/SelectInput.tsx
|
|
490
|
-
const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, isClearableIfDisabled, showSelectionContent,
|
|
614
|
+
const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, isClearableIfDisabled, showSelectionContent, fieldProps, describedBy, errorMessageId, headerProps, selectedTagsType, collapseAfter, isRequired, isDirty, isListReversed, onCloseComboBox, onBlur, leadingContent, trailingContent, onMouseEnter, onFocusCapture, ...props }) => {
|
|
491
615
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
492
616
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
493
617
|
const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
|
|
494
618
|
const { t } = useTranslation("ui");
|
|
495
619
|
const state = use($dbdc5e6e7ce01b4b$export$c02625b26074192c);
|
|
496
|
-
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
620
|
+
const { hoverProps, isHovered } = useHover$1({ isDisabled });
|
|
497
621
|
const [isFocused, setIsFocused] = useState(false);
|
|
498
622
|
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
|
|
499
623
|
const { isFocusVisible } = useFocusVisible();
|
|
@@ -558,7 +682,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
558
682
|
const nextKey = reversedNavigationItems[nextIndex]?.id ?? null;
|
|
559
683
|
state.selectionManager.setFocusedKey(nextKey);
|
|
560
684
|
};
|
|
561
|
-
const { onKeyDown:
|
|
685
|
+
const { onKeyDown: onTriggerArrowKeyDown } = useKeyInteractions({ interactions: [{
|
|
562
686
|
actions: ["up", "down"],
|
|
563
687
|
enabled: !isSearchable && !isDisabled && !isOpen,
|
|
564
688
|
preventDefault: true,
|
|
@@ -566,19 +690,57 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
566
690
|
setIsOpen(true);
|
|
567
691
|
}
|
|
568
692
|
}] });
|
|
693
|
+
const typeAheadRef = useRef({
|
|
694
|
+
search: "",
|
|
695
|
+
timeout: 0
|
|
696
|
+
});
|
|
697
|
+
const onTriggerTypeAhead = (event) => {
|
|
698
|
+
if (isDisabled || isOpen || event.key.length !== 1 || event.key.trim() === "" || event.ctrlKey || event.metaKey || event.altKey || event.nativeEvent.isComposing) return;
|
|
699
|
+
const typeAhead = typeAheadRef.current;
|
|
700
|
+
window.clearTimeout(typeAhead.timeout);
|
|
701
|
+
if (isMultiple) {
|
|
702
|
+
typeAhead.search = "";
|
|
703
|
+
setIsOpen(true);
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
typeAhead.search += event.key.toLocaleLowerCase();
|
|
707
|
+
typeAhead.timeout = window.setTimeout(() => {
|
|
708
|
+
typeAhead.search = "";
|
|
709
|
+
}, 1e3);
|
|
710
|
+
const { search } = typeAhead;
|
|
711
|
+
const isRepeatedLetter = search === search[0].repeat(search.length);
|
|
712
|
+
const query = isRepeatedLetter ? search[0] : search;
|
|
713
|
+
const currentIndex = selectableListItems.findIndex((item) => item.id === fieldState.value);
|
|
714
|
+
const startIndex = isRepeatedLetter || currentIndex < 0 ? currentIndex + 1 : currentIndex;
|
|
715
|
+
for (let offset = 0; offset < selectableListItems.length; offset++) {
|
|
716
|
+
const item = selectableListItems[(startIndex + offset) % selectableListItems.length];
|
|
717
|
+
if (item.label.toLocaleLowerCase().startsWith(query)) {
|
|
718
|
+
if (item.id !== fieldState.value) onChange(item.id);
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
const onTriggerKeyDown = (event) => {
|
|
724
|
+
onTriggerArrowKeyDown(event);
|
|
725
|
+
onTriggerTypeAhead(event);
|
|
726
|
+
};
|
|
569
727
|
const onClick = () => {
|
|
570
728
|
if (isDisabled) return;
|
|
571
729
|
if (!isSearchable) {
|
|
572
730
|
setIsOpen(!isOpen);
|
|
573
731
|
return;
|
|
574
732
|
}
|
|
733
|
+
if (state && !state.isOpen && document.activeElement === inputRef.current) {
|
|
734
|
+
state.open(null, "manual");
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
575
737
|
inputRef.current?.focus();
|
|
576
738
|
};
|
|
577
739
|
return /* @__PURE__ */ jsxs("div", {
|
|
578
740
|
ref,
|
|
579
741
|
className: inputBaseCva({
|
|
580
742
|
variant,
|
|
581
|
-
as,
|
|
743
|
+
layout: as,
|
|
582
744
|
...props,
|
|
583
745
|
className: clsx("group/select-content relative flex px-0!", !isDisabled && isSearchable && "cursor-text", className)
|
|
584
746
|
}),
|
|
@@ -605,7 +767,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
605
767
|
children: [
|
|
606
768
|
/* @__PURE__ */ jsxs("div", {
|
|
607
769
|
className: clsx("relative flex flex-1 items-center gap-2 truncate pr-2!", !isDisabled && isSearchable && "cursor-text", !isDisabled && !isSearchable && "cursor-pointer", inputSizeCva({
|
|
608
|
-
as,
|
|
770
|
+
layout: as,
|
|
609
771
|
size,
|
|
610
772
|
...props
|
|
611
773
|
})),
|
|
@@ -632,10 +794,13 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
632
794
|
ref: inputRef,
|
|
633
795
|
placeholder: as === "floating" ? void 0 : placeholder,
|
|
634
796
|
onBlur,
|
|
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"
|
|
797
|
+
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"),
|
|
636
798
|
onKeyDown,
|
|
637
799
|
onKeyDownCapture: onInputKeyDownCapture,
|
|
638
|
-
...fieldProps
|
|
800
|
+
...fieldProps,
|
|
801
|
+
"aria-describedby": describedBy,
|
|
802
|
+
"aria-errormessage": errorMessageId,
|
|
803
|
+
"aria-invalid": isInvalid || void 0
|
|
639
804
|
})]
|
|
640
805
|
}),
|
|
641
806
|
!isSearchable && /* @__PURE__ */ jsxs($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
@@ -646,6 +811,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
646
811
|
className: clsx("group/select-trigger w-full truncate text-start outline-none disabled:text-inherit", showTags && "absolute inset-0 z-base"),
|
|
647
812
|
onKeyDown: onTriggerKeyDown,
|
|
648
813
|
...fieldProps,
|
|
814
|
+
"aria-describedby": describedBy,
|
|
649
815
|
children: [(as === "floating" && isEmpty || isMultiple && !isEmpty) && /* @__PURE__ */ jsx(Fragment$1, { children: "\xA0" }), (isEmpty || !isMultiple) && (as !== "floating" || !isEmpty) && /* @__PURE__ */ jsxs("span", {
|
|
650
816
|
className: clsx("block truncate empty:before:inline-block empty:before:content-['']", isEmpty && "text-muted-foreground"),
|
|
651
817
|
children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
|
|
@@ -686,7 +852,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
686
852
|
//#region src/components/inputs/Selection/shared/SelectListBox.lazy.tsx
|
|
687
853
|
let loadedListBox;
|
|
688
854
|
let pendingListBox;
|
|
689
|
-
const loadSelectListBox = () => pendingListBox ??= import("./SelectListBox-
|
|
855
|
+
const loadSelectListBox = () => pendingListBox ??= import("./SelectListBox-DqAxkT1f.js").then(({ SelectListBox }) => {
|
|
690
856
|
loadedListBox = SelectListBox;
|
|
691
857
|
return SelectListBox;
|
|
692
858
|
}).catch((error) => {
|
|
@@ -726,30 +892,36 @@ const SelectPopoverSearch = ({ hideSearchIcon }) => {
|
|
|
726
892
|
ref,
|
|
727
893
|
label: t(($) => $.ui.select.search),
|
|
728
894
|
hideLabel: true,
|
|
729
|
-
size: "
|
|
895
|
+
size: "sm",
|
|
730
896
|
placeholder: t(($) => $.ui.select.search),
|
|
731
897
|
leadingIcon: !hideSearchIcon ? Search : void 0,
|
|
732
898
|
isClearable: true,
|
|
733
899
|
renderStaticInput: false,
|
|
734
|
-
|
|
900
|
+
autoFocus: true,
|
|
735
901
|
className: "shrink-0 p-1"
|
|
736
902
|
});
|
|
737
903
|
};
|
|
738
|
-
const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent,
|
|
739
|
-
const { label, tooltipText, helperText, isDirty, isRequired, rightContent,
|
|
904
|
+
const SelectDesktop = ({ ref, error, isInvalid: isInvalidProp, ignoreTriggerWidth, showSelectionContent, className, inputClassName, leadingContent, trailingContent, customTrigger, searchPlacement = "field", onBlur, onMouseEnter, onFocusCapture, ...props }) => {
|
|
905
|
+
const { label, tooltipText, helperText, isDirty, isRequired, rightContent, headerClassName, errorClassName, placeholder, variant, isDisabled, hideLabel, hideDropdownIcon, isSearchable: isSearchableProp, isClearable, isClearableIfDisabled, isScrollPreventDisabled, isLoading, as, size, collapseAfter, selectedTagsType } = props;
|
|
740
906
|
const isSearchInPopover = !!isSearchableProp && searchPlacement === "popover";
|
|
741
907
|
const isSearchable = !!isSearchableProp && !isSearchInPopover;
|
|
742
908
|
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
743
909
|
const selectPopoverCva = UIOverrides.useCva("select.popoverCva", selectPopoverDefinition);
|
|
910
|
+
const isInvalid = isInvalidProp || !!error;
|
|
911
|
+
const { describedBy, errorMessageId, helperTextId } = useFieldAccessibility({
|
|
912
|
+
error,
|
|
913
|
+
helperText
|
|
914
|
+
});
|
|
744
915
|
const formFieldProps = {
|
|
745
916
|
error,
|
|
917
|
+
errorMessageId,
|
|
746
918
|
label,
|
|
747
919
|
tooltipText,
|
|
748
920
|
helperText,
|
|
921
|
+
helperTextId,
|
|
749
922
|
isRequired,
|
|
750
923
|
rightContent,
|
|
751
|
-
|
|
752
|
-
hideLabel,
|
|
924
|
+
hideLabel: hideLabel || isFieldHeaderHiddenByLayout(as),
|
|
753
925
|
isDisabled,
|
|
754
926
|
headerClassName,
|
|
755
927
|
errorClassName
|
|
@@ -830,9 +1002,9 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
830
1002
|
onOpenChange: openChangeHandler,
|
|
831
1003
|
allowsEmptyCollection: true,
|
|
832
1004
|
isDisabled,
|
|
833
|
-
isInvalid
|
|
1005
|
+
isInvalid,
|
|
834
1006
|
menuTrigger: "focus",
|
|
835
|
-
className: clsx("group w-full",
|
|
1007
|
+
className: clsx("group w-full", className)
|
|
836
1008
|
};
|
|
837
1009
|
const headerProps = {
|
|
838
1010
|
label,
|
|
@@ -840,7 +1012,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
840
1012
|
helperText,
|
|
841
1013
|
isRequired,
|
|
842
1014
|
rightContent,
|
|
843
|
-
isHeaderHidden: hideLabel
|
|
1015
|
+
isHeaderHidden: hideLabel,
|
|
844
1016
|
isDisabled,
|
|
845
1017
|
className: headerClassName,
|
|
846
1018
|
labelProps
|
|
@@ -858,11 +1030,9 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
858
1030
|
...isSearchable ? comboBoxProps : {},
|
|
859
1031
|
children: /* @__PURE__ */ jsxs(FormField, {
|
|
860
1032
|
...formFieldProps,
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
},
|
|
865
|
-
as,
|
|
1033
|
+
labelProps,
|
|
1034
|
+
...!isSearchable && { className: clsx("group w-full", className) },
|
|
1035
|
+
layout: as,
|
|
866
1036
|
onMouseEnter: (event) => {
|
|
867
1037
|
preloadSelectListBox();
|
|
868
1038
|
onMouseEnter?.(event);
|
|
@@ -885,14 +1055,13 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
885
1055
|
as,
|
|
886
1056
|
size,
|
|
887
1057
|
isDisabled,
|
|
888
|
-
isInvalid
|
|
889
|
-
className,
|
|
1058
|
+
isInvalid,
|
|
1059
|
+
className: inputClassName,
|
|
890
1060
|
hideDropdownIcon,
|
|
891
1061
|
isSearchable,
|
|
892
1062
|
isClearable,
|
|
893
1063
|
isClearableIfDisabled,
|
|
894
1064
|
showSelectionContent,
|
|
895
|
-
inputClassName,
|
|
896
1065
|
leadingContent,
|
|
897
1066
|
trailingContent,
|
|
898
1067
|
collapseAfter,
|
|
@@ -905,6 +1074,8 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
905
1074
|
if (isSearchable) closeComboBoxRef.current = state;
|
|
906
1075
|
},
|
|
907
1076
|
fieldProps,
|
|
1077
|
+
describedBy,
|
|
1078
|
+
errorMessageId,
|
|
908
1079
|
headerProps
|
|
909
1080
|
}), hasOpened && (!isSearchable || showPopover) && /* @__PURE__ */ jsx($542a13ca2fa5b484$export$5b6b19405a83ff9d, {
|
|
910
1081
|
ref: popoverRef,
|
|
@@ -912,7 +1083,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
912
1083
|
isOpen,
|
|
913
1084
|
onOpenChange: setIsOpen,
|
|
914
1085
|
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({})),
|
|
915
|
-
style: {
|
|
1086
|
+
style: { minWidth: !ignoreTriggerWidth ? popoverWidth : void 0 },
|
|
916
1087
|
offset: 0,
|
|
917
1088
|
children: isSearchInPopover ? /* @__PURE__ */ jsx("div", {
|
|
918
1089
|
className: clsx(popoverCva({}), "flex max-h-80! flex-col overflow-hidden"),
|
|
@@ -977,17 +1148,33 @@ const SelectListBoxSelectionBar = ({ className }) => {
|
|
|
977
1148
|
};
|
|
978
1149
|
//#endregion
|
|
979
1150
|
//#region src/components/inputs/Selection/shared/SelectMobile.tsx
|
|
980
|
-
|
|
981
|
-
|
|
1151
|
+
/** The sheet's search field, wired to the surrounding React Aria autocomplete so arrow keys and Enter reach the list. */
|
|
1152
|
+
const SelectMobileSearch = ({ ref, ...props }) => {
|
|
1153
|
+
const { ref: fieldRef, ...inputProps } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e($4b38b5b75ecc6208$export$698f465ec27e93df) ?? {};
|
|
1154
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
1155
|
+
...inputProps,
|
|
1156
|
+
...props,
|
|
1157
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, fieldRef),
|
|
1158
|
+
renderStaticInput: false
|
|
1159
|
+
});
|
|
1160
|
+
};
|
|
1161
|
+
const SelectMobile = ({ ref, error, isInvalid: isInvalidProp, showSelectionContent, className, inputClassName, leadingContent, trailingContent, customTrigger, searchPlacement: _searchPlacement, onBlur, onMouseEnter, onFocusCapture, bottomSheetProps, ...props }) => {
|
|
1162
|
+
const { label, tooltipText, helperText, isDirty, isRequired, rightContent, headerClassName, errorClassName, placeholder, variant, isDisabled, hideLabel, hideDropdownIcon, hideSearchIcon, isSearchable, isClearable, isClearableIfDisabled, as, size, collapseAfter, selectedTagsType } = props;
|
|
1163
|
+
const isInvalid = isInvalidProp || !!error;
|
|
1164
|
+
const { describedBy, errorMessageId, helperTextId } = useFieldAccessibility({
|
|
1165
|
+
error,
|
|
1166
|
+
helperText
|
|
1167
|
+
});
|
|
982
1168
|
const formFieldProps = {
|
|
983
1169
|
error,
|
|
1170
|
+
errorMessageId,
|
|
984
1171
|
label,
|
|
985
1172
|
tooltipText,
|
|
986
1173
|
helperText,
|
|
1174
|
+
helperTextId,
|
|
987
1175
|
isRequired,
|
|
988
1176
|
rightContent,
|
|
989
|
-
|
|
990
|
-
hideLabel,
|
|
1177
|
+
hideLabel: hideLabel || isFieldHeaderHiddenByLayout(as),
|
|
991
1178
|
isDisabled,
|
|
992
1179
|
headerClassName,
|
|
993
1180
|
errorClassName
|
|
@@ -999,7 +1186,7 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
999
1186
|
helperText,
|
|
1000
1187
|
isRequired,
|
|
1001
1188
|
rightContent,
|
|
1002
|
-
isHeaderHidden: hideLabel
|
|
1189
|
+
isHeaderHidden: hideLabel,
|
|
1003
1190
|
isDisabled,
|
|
1004
1191
|
className: headerClassName,
|
|
1005
1192
|
labelProps
|
|
@@ -1018,9 +1205,9 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1018
1205
|
};
|
|
1019
1206
|
return /* @__PURE__ */ jsx(FormField, {
|
|
1020
1207
|
...formFieldProps,
|
|
1021
|
-
as,
|
|
1208
|
+
layout: as,
|
|
1022
1209
|
labelProps,
|
|
1023
|
-
className: clsx("group w-full",
|
|
1210
|
+
className: clsx("group w-full", className),
|
|
1024
1211
|
onMouseEnter,
|
|
1025
1212
|
onFocusCapture: (event) => {
|
|
1026
1213
|
preloadSelectListBox();
|
|
@@ -1039,15 +1226,17 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1039
1226
|
as,
|
|
1040
1227
|
size,
|
|
1041
1228
|
isDisabled,
|
|
1042
|
-
isInvalid
|
|
1043
|
-
className,
|
|
1229
|
+
isInvalid,
|
|
1230
|
+
className: inputClassName,
|
|
1044
1231
|
hideDropdownIcon,
|
|
1045
1232
|
isSearchable: false,
|
|
1046
1233
|
isClearable,
|
|
1047
1234
|
isClearableIfDisabled,
|
|
1048
1235
|
showSelectionContent,
|
|
1049
|
-
onBlur: void 0,
|
|
1236
|
+
onBlur: isOpen ? void 0 : onBlur,
|
|
1050
1237
|
fieldProps,
|
|
1238
|
+
describedBy,
|
|
1239
|
+
errorMessageId,
|
|
1051
1240
|
headerProps,
|
|
1052
1241
|
leadingContent,
|
|
1053
1242
|
trailingContent,
|
|
@@ -1066,25 +1255,31 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1066
1255
|
},
|
|
1067
1256
|
label,
|
|
1068
1257
|
footer: isMultiple && /* @__PURE__ */ jsx(SelectListBoxSelectionBar, {}),
|
|
1069
|
-
children: (close) => /* @__PURE__ */
|
|
1258
|
+
children: (close) => /* @__PURE__ */ jsx("div", {
|
|
1070
1259
|
className: "flex max-h-full flex-col overflow-hidden",
|
|
1071
|
-
children:
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1260
|
+
children: isSearchable ? /* @__PURE__ */ jsxs($4b38b5b75ecc6208$export$2f2b9559550c7bbc, {
|
|
1261
|
+
inputValue: fieldState.inputValue,
|
|
1262
|
+
onInputChange,
|
|
1263
|
+
children: [/* @__PURE__ */ jsx(SelectMobileSearch, {
|
|
1264
|
+
ref: searchInputRef,
|
|
1265
|
+
label,
|
|
1266
|
+
placeholder,
|
|
1267
|
+
rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
|
|
1268
|
+
className: "mb-2 px-4",
|
|
1269
|
+
leadingIcon: !hideSearchIcon ? /* @__PURE__ */ jsx(Search, { className: "size-4" }) : void 0,
|
|
1270
|
+
isClearable
|
|
1271
|
+
}), /* @__PURE__ */ jsx(SelectListBox, {
|
|
1272
|
+
...props,
|
|
1273
|
+
isSearchable: false,
|
|
1274
|
+
onClose: close,
|
|
1275
|
+
isScrollable: true
|
|
1276
|
+
})]
|
|
1277
|
+
}) : /* @__PURE__ */ jsx(SelectListBox, {
|
|
1083
1278
|
...props,
|
|
1084
|
-
autoFocus:
|
|
1279
|
+
autoFocus: true,
|
|
1085
1280
|
onClose: close,
|
|
1086
1281
|
isScrollable: true
|
|
1087
|
-
})
|
|
1282
|
+
})
|
|
1088
1283
|
})
|
|
1089
1284
|
})]
|
|
1090
1285
|
})
|
|
@@ -1096,21 +1291,21 @@ const SelectBase = ({ layout, ...dProps }) => {
|
|
|
1096
1291
|
const ui = UIConfig.useConfig();
|
|
1097
1292
|
const props = {
|
|
1098
1293
|
...dProps,
|
|
1099
|
-
selectionMode: dProps.selectionMode ??
|
|
1294
|
+
selectionMode: dProps.selectionMode ?? "single",
|
|
1295
|
+
isLoading: !!(dProps.isLoading || dProps.isFetchingNextPage),
|
|
1100
1296
|
variant: dProps.variant ?? ui.input.variant,
|
|
1101
|
-
as: resolveInputLayout(layout,
|
|
1297
|
+
as: resolveInputLayout(layout, ui.input.layout),
|
|
1102
1298
|
size: dProps.size ?? ui.input.size,
|
|
1103
1299
|
hideLabel: dProps.hideLabel ?? ui.input.hideLabel,
|
|
1104
1300
|
isClearable: dProps.isClearable ?? ui.input.isClearable,
|
|
1105
1301
|
isSearchable: dProps.isSearchable ?? ui.select.isSearchable,
|
|
1106
1302
|
isScrollPreventDisabled: dProps.isScrollPreventDisabled ?? ui.select.isScrollPreventDisabled,
|
|
1107
1303
|
selectedTagsType: dProps.selectedTagsType ?? ui.select.selectedTagsType,
|
|
1108
|
-
ignoreTriggerWidth: dProps.virtualizerOptions || (dProps.totalItems ?? 0) > 100 || dProps.
|
|
1304
|
+
ignoreTriggerWidth: dProps.virtualizerOptions || (dProps.totalItems ?? 0) > 100 || dProps.hasNextPage ? false : dProps.ignoreTriggerWidth ?? false,
|
|
1109
1305
|
collapseAfter: dProps.collapseAfter ?? ui.select.collapseAfter,
|
|
1110
1306
|
hideSearchIcon: dProps.hideSearchIcon ?? ui.select.hideSearchIcon,
|
|
1111
1307
|
multiSelectAutoConfirm: dProps.multiSelectAutoConfirm ?? ui.select.multiSelectAutoConfirm,
|
|
1112
|
-
searchDebounceDelay: dProps.searchDebounceDelay ?? ui.select.searchDebounceDelay
|
|
1113
|
-
isClientSearchDisabled: dProps.ignoreInputValueFiltering ?? dProps.isClientSearchDisabled
|
|
1308
|
+
searchDebounceDelay: dProps.searchDebounceDelay ?? ui.select.searchDebounceDelay
|
|
1114
1309
|
};
|
|
1115
1310
|
const isDesktop = useBreakpoint("md");
|
|
1116
1311
|
return /* @__PURE__ */ jsx(SelectContext.Provider, {
|
|
@@ -1207,24 +1402,42 @@ const getStaticSelectValue = ({ items, value, selectionMode, initialSelection, m
|
|
|
1207
1402
|
};
|
|
1208
1403
|
//#endregion
|
|
1209
1404
|
//#region src/components/inputs/Selection/Select/Select.tsx
|
|
1210
|
-
function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputProps }) {
|
|
1405
|
+
function SelectInner({ renderStaticInput, isFormControlDisabled, list, defaultValue, items: itemsProp, isLoading, hasNextPage, fetchNextPage, isFetchingNextPage, isClientSearchDisabled, isReadOnly: _isReadOnly, name: _name, ...inputProps }) {
|
|
1406
|
+
const isUncontrolled = inputProps.value === void 0 && defaultValue !== void 0;
|
|
1407
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
|
|
1408
|
+
const onChange = inputProps.onChange;
|
|
1211
1409
|
const props = {
|
|
1212
1410
|
...inputProps,
|
|
1213
|
-
|
|
1214
|
-
|
|
1411
|
+
...isUncontrolled && {
|
|
1412
|
+
value: uncontrolledValue,
|
|
1413
|
+
onChange: (value) => {
|
|
1414
|
+
setUncontrolledValue(value);
|
|
1415
|
+
onChange?.(value);
|
|
1416
|
+
}
|
|
1417
|
+
},
|
|
1418
|
+
...list ? {
|
|
1419
|
+
items: list.items,
|
|
1215
1420
|
isLoading: list.isLoading,
|
|
1216
|
-
|
|
1217
|
-
|
|
1421
|
+
hasNextPage: list.hasNextPage,
|
|
1422
|
+
fetchNextPage: () => list.fetchNextPage(),
|
|
1423
|
+
isFetchingNextPage: list.isFetchingNextPage,
|
|
1218
1424
|
isClientSearchDisabled: true,
|
|
1219
1425
|
onSearchChange: (search) => {
|
|
1220
1426
|
list.setFilterText(search);
|
|
1221
1427
|
inputProps.onSearchChange?.(search);
|
|
1222
1428
|
}
|
|
1429
|
+
} : {
|
|
1430
|
+
items: itemsProp ?? [],
|
|
1431
|
+
isLoading,
|
|
1432
|
+
hasNextPage,
|
|
1433
|
+
fetchNextPage,
|
|
1434
|
+
isFetchingNextPage,
|
|
1435
|
+
isClientSearchDisabled
|
|
1223
1436
|
}
|
|
1224
1437
|
};
|
|
1225
1438
|
const ui = UIConfig.useConfig();
|
|
1226
1439
|
const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
|
|
1227
|
-
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.
|
|
1440
|
+
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
1228
1441
|
const rootRef = useRef(null);
|
|
1229
1442
|
const { renderRealInput, replayStaticInputChange, replayStaticInputPress } = useStaticInputHandoff({
|
|
1230
1443
|
inputRef: rootRef,
|
|
@@ -1235,7 +1448,7 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1235
1448
|
const currentValue = props.value;
|
|
1236
1449
|
if (!renderInput && props.selectionMode !== "multiple" && !!props.showSelectionContent && currentValue != null) setRenderInput(true);
|
|
1237
1450
|
if (!renderInput && !!props.customTrigger) setRenderInput(true);
|
|
1238
|
-
const mode = props.selectionMode ??
|
|
1451
|
+
const mode = props.selectionMode ?? "single";
|
|
1239
1452
|
const isDisabled = !!(isFormControlDisabled || props.isDisabled);
|
|
1240
1453
|
const collapseAfter = props.collapseAfter ?? ui.select.collapseAfter;
|
|
1241
1454
|
const selectedTagsType = props.selectedTagsType ?? ui.select.selectedTagsType;
|
|
@@ -1262,7 +1475,7 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1262
1475
|
selectedTagsType
|
|
1263
1476
|
]);
|
|
1264
1477
|
if (!renderInput && staticSelection) {
|
|
1265
|
-
const as = resolveInputLayout(props.layout,
|
|
1478
|
+
const as = resolveInputLayout(props.layout, ui.input.layout);
|
|
1266
1479
|
const size = props.size ?? ui.input.size;
|
|
1267
1480
|
const isMultiple = mode === "multiple";
|
|
1268
1481
|
const { selectedItem, displayValue, isEmpty } = staticSelection;
|
|
@@ -1283,7 +1496,7 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1283
1496
|
dataIsRequired: props.isRequired,
|
|
1284
1497
|
dataIsDisabled: isDisabled,
|
|
1285
1498
|
dataDisabled: isDisabled,
|
|
1286
|
-
dataInvalid: !!props.error,
|
|
1499
|
+
dataInvalid: props.isInvalid || !!props.error,
|
|
1287
1500
|
dataHasSelection: !isEmpty,
|
|
1288
1501
|
dataHasSearch: false
|
|
1289
1502
|
};
|
|
@@ -1298,8 +1511,8 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1298
1511
|
...props,
|
|
1299
1512
|
isDisabled,
|
|
1300
1513
|
isLoading: false,
|
|
1301
|
-
className: clsx("group w-full", props.
|
|
1302
|
-
inputClassName:
|
|
1514
|
+
className: clsx("group w-full", props.className),
|
|
1515
|
+
inputClassName: props.inputClassName,
|
|
1303
1516
|
contentWrapperClassName: selectInputTagsContentWrapperCva({ isSearchable }),
|
|
1304
1517
|
contentGroup: "select",
|
|
1305
1518
|
contentClassName: "pr-2!",
|
|
@@ -1325,9 +1538,10 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1325
1538
|
"aria-expanded": false,
|
|
1326
1539
|
value: inputValue,
|
|
1327
1540
|
placeholder: shouldRenderPlaceholderAfterValue ? props.placeholder : placeholder ?? void 0,
|
|
1328
|
-
className:
|
|
1541
|
+
className: "min-w-0 w-full flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:text-inherit",
|
|
1329
1542
|
onChange: (event) => replayStaticInputChange(event.target.value),
|
|
1330
1543
|
...dataAttributeProps,
|
|
1544
|
+
"aria-invalid": dataAttributes.dataInvalid || void 0,
|
|
1331
1545
|
"data-rac": true
|
|
1332
1546
|
}) : /* @__PURE__ */ jsx("button", {
|
|
1333
1547
|
type: "button",
|
|
@@ -1347,8 +1561,45 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1347
1561
|
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(props.ref, rootRef)
|
|
1348
1562
|
});
|
|
1349
1563
|
}
|
|
1350
|
-
function
|
|
1351
|
-
|
|
1564
|
+
function ControlledSelect({ renderStaticInput, ...props }) {
|
|
1565
|
+
const { field, ref, ...innerProps } = props;
|
|
1566
|
+
const controlWithOptions = field.form;
|
|
1567
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
1568
|
+
control: field.form,
|
|
1569
|
+
name: field.name,
|
|
1570
|
+
onValueChange: field.onValueChange,
|
|
1571
|
+
onBlur: field.onBlur,
|
|
1572
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(SelectInner, {
|
|
1573
|
+
...innerProps,
|
|
1574
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, field.ref),
|
|
1575
|
+
value: field.value ?? (props.selectionMode === "multiple" ? [] : null),
|
|
1576
|
+
onChange: (value) => {
|
|
1577
|
+
field.onChange(value);
|
|
1578
|
+
field.onValueCommit();
|
|
1579
|
+
},
|
|
1580
|
+
onBlur: field.onBlur,
|
|
1581
|
+
isDirty,
|
|
1582
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
1583
|
+
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
1584
|
+
error: props.error ?? error?.message,
|
|
1585
|
+
renderStaticInput
|
|
1586
|
+
})
|
|
1587
|
+
});
|
|
1588
|
+
}
|
|
1589
|
+
function SelectComponent(props) {
|
|
1590
|
+
return props.field ? /* @__PURE__ */ jsx(ControlledSelect, { ...props }) : /* @__PURE__ */ jsx(SelectInner, { ...props });
|
|
1352
1591
|
}
|
|
1592
|
+
/**
|
|
1593
|
+
* Single or multiple selection from static `items` or an async `list`.
|
|
1594
|
+
*
|
|
1595
|
+
* @example
|
|
1596
|
+
* <Select label="Status" items={[{ id: "open", label: "Open" }]} value={status} onChange={setStatus} />
|
|
1597
|
+
* @example
|
|
1598
|
+
* <Select label="Tags" selectionMode="multiple" items={tags} field={{ form, name: "tagIds" }} />
|
|
1599
|
+
* @example
|
|
1600
|
+
* const owners = useAsyncList({ load });
|
|
1601
|
+
* <Select label="Owner" list={owners} initialSelection={savedOwner} field={{ form, name: "ownerId" }} />
|
|
1602
|
+
*/
|
|
1603
|
+
const Select = memo(SelectComponent);
|
|
1353
1604
|
//#endregion
|
|
1354
|
-
export {
|
|
1605
|
+
export { SelectContext as a, useKeyInteractions as i, createKeyInteractionsHandler as n, LoadingItemId as o, getKeyInteractionAction as r, SelectAllItemId as s, Select as t };
|