@povio/ui 6.0.0-rc.12 → 6.0.0-rc.14
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 +523 -42
- package/dist/{Accordion-ORBin0EZ.js → Accordion-BNHpv7Zj.js} +42 -42
- package/dist/{Accordion-Cup5eRZz.d.ts → Accordion-CR9oomZY.d.ts} +29 -17
- package/dist/Alert-xHGPLUpt.d.ts +36 -0
- package/dist/AlertDialog-CKcUZ6l9.d.ts +70 -0
- package/dist/Autocomplete-CkWTSFoj.d.ts +123 -0
- package/dist/Autocomplete-CrNDRxvg.js +319 -0
- package/dist/Badge-B25YEMEw.d.ts +67 -0
- package/dist/BottomSheet-CtcPZG82.d.ts +65 -0
- package/dist/{BottomSheet-CGipksM_.js → BottomSheet-tUXH3NjS.js} +9 -9
- package/dist/{BottomSheet.lazy-CuJMUeJP.d.ts → BottomSheet.lazy-DuwAJSaI.d.ts} +1 -1
- package/dist/{Breadcrumbs-CcB0oOF8.d.ts → Breadcrumbs-BrtRh_dX.d.ts} +6 -3
- package/dist/{Breadcrumbs-a1-q_he0.js → Breadcrumbs-D8WXqOLN.js} +36 -20
- package/dist/{Button-BaODzvZd.js → Button-C1Jv1Plk.js} +1 -1
- package/dist/{Button-0SswSdDg.d.ts → Button-DDuk3hJ3.d.ts} +2 -2
- package/dist/{Button-C1YB5dOw.js → Button-DF6sbTuF.js} +3 -7
- package/dist/{ButtonBase-s-VV7oCa.js → ButtonBase-BYJz1JkH.js} +12 -20
- package/dist/ButtonBase-Bn_FT89h.d.ts +47 -0
- package/dist/{ButtonContent-Dztbuz3q.js → ButtonContent-2KsbdWRO.js} +5 -5
- package/dist/{Calendar-yaQubCWK.js → Calendar-DdneUEhM.js} +71 -35
- package/dist/{Calendar.lazy-DcVss9Bk.js → Calendar.lazy-BY0kLoYH.js} +7 -7
- package/dist/Checkbox-Bwl6MA-V.d.ts +49 -0
- package/dist/{Checkbox-Bjsbx-wK.js → Checkbox-E2bns_n0.js} +40 -14
- package/dist/CheckboxCheckmark-Beu8T1g9.js +42 -0
- package/dist/CheckboxGroup-0rzsn-bA.d.ts +52 -0
- package/dist/{CheckboxGroup-B3O3IUiu.js → CheckboxGroup-C7epIEpW.js} +75 -35
- package/dist/ColumnConfigContent-LNq-6Brf.js +1025 -0
- package/dist/ColumnListContent-Dzze5R7T.js +133 -0
- package/dist/DatePicker-B70SCKfT.d.ts +80 -0
- package/dist/{DatePicker-bme8zGBo.js → DatePicker-BU-34fCk.js} +117 -46
- package/dist/{DatePickerInput-vLlL5ATh.d.ts → DatePickerInput-BCuz08Ws.d.ts} +3 -3
- package/dist/{DatePickerInput-C2881tvS.js → DatePickerInput-CMEJmZSQ.js} +41 -30
- package/dist/{DateRangePicker-Blg158JD.js → DateRangePicker-D0RtqeBM.js} +90 -162
- package/dist/DateRangePicker-jovxcWGk.d.ts +102 -0
- package/dist/{DateTimePicker-CdRFt8WM.js → DateTimePicker-Cbdt76CL.js} +94 -40
- package/dist/DateTimePicker-Cfi3ruFy.d.ts +83 -0
- package/dist/Dialog-BWNQjIgo.d.ts +66 -0
- package/dist/{Dialog-C9H9_BmK.js → Dialog-Bpwr1nuy.js} +15 -15
- package/dist/{Dialog-DN5703sy.js → Dialog-ebjPH22i.js} +23 -19
- package/dist/{Disclosure-BRSkMbZQ.js → Disclosure-D_aym2zh.js} +3 -3
- package/dist/Drawer-o018RqIt.d.ts +42 -0
- package/dist/DropdownMenu-3V-G7fZ7.d.ts +51 -0
- package/dist/{DropdownMenu-DS0RaEfH.js → DropdownMenu-C4WitobV.js} +33 -21
- package/dist/{DropdownMenuDesktop-DGPIfex-.js → DropdownMenuDesktop-BM7659Sk.js} +14 -8
- package/dist/{FileInput-BUwtAF2-.js → FileInput-Bc_E1M1X.js} +76 -81
- package/dist/FileInput-CWRW7OzZ.d.ts +61 -0
- package/dist/{FileTrigger-DlryDp2T.js → FileTrigger-tGSUFrb2.js} +6 -6
- package/dist/FileUpload-DVnp9xxv.d.ts +181 -0
- package/dist/FileUpload-Dk6ZmgWF.js +1105 -0
- package/dist/{Form-CqF1SaVw.js → Form-4jZarkjk.js} +2 -2
- package/dist/FormField-BgiWLGjf.d.ts +70 -0
- package/dist/{FormField-dduTMkNH.js → FormField-DOZ7eXjA.js} +11 -11
- package/dist/{FormFieldError-BT4uxbKY.d.ts → FormFieldError-C7yOdjzQ.d.ts} +1 -0
- package/dist/FormFieldHeaderTooltip-DW9sqJWl.js +22 -0
- package/dist/{Heading-D4XFYv__.js → Heading-B9G3z6Es.js} +2 -2
- package/dist/HiddenFormValue-DZ2d9eoA.js +20 -0
- package/dist/IconButton-Bjjf5cQL.d.ts +24 -0
- package/dist/{IconSlot-CqNuZl0E.js → IconSlot-TAWTJ6iK.js} +2 -4
- package/dist/{InlineTooltipWrapper-CKTiFpZn.js → InlineTooltipWrapper-CcdpMJa6.js} +1 -1
- package/dist/{Input-BG0Xjw5X.js → Input-BkR3jkvt.js} +2 -2
- package/dist/{Input-CG5LQ0zs.js → Input-CvYyjMWx.js} +95 -60
- package/dist/Input-lppNS8wM.d.ts +56 -0
- package/dist/{InputContent-Fx2E4UXl.js → InputContent-B5YjsLDE.js} +15 -13
- package/dist/InputContent-Bgalf6R1.d.ts +39 -0
- package/dist/{Label-BGvF9vWx.js → Label-VTcaaLO8.js} +2 -2
- package/dist/{Link-Chux-Clm.js → Link-8zP_NC_c.js} +2 -2
- package/dist/Link-HJ4y-xiW.d.ts +15 -0
- package/dist/{ListBox-DhR5kojP.js → ListBox-Ck-B1Jae.js} +9 -9
- package/dist/{Modal-DcLWF9cB.js → Modal-xT-Wz5GH.js} +3 -3
- package/dist/{NumberField-DxuikBcr.js → NumberField-BXLzNb2T.js} +92 -63
- package/dist/NumberField-Q-4y3jpb.d.ts +41 -0
- package/dist/{NumberFormatter-DYarfm5F.js → NumberFormatter-D5csbNXm.js} +1 -1
- package/dist/{NumberRangeInput-8bOjNEnS.js → NumberRangeInput-BBzZCC54.js} +153 -102
- package/dist/NumberRangeInput-DuWOdSdU.d.ts +89 -0
- package/dist/{OverlayArrow-DF0jMwul.js → OverlayArrow-BptI-A_7.js} +2 -2
- package/dist/{PageHeader-DTfzf-dA.d.ts → PageHeader-jVaC3Z9L.d.ts} +6 -5
- package/dist/PasswordInput-DtTnGHRD.d.ts +16 -0
- package/dist/{PasswordInput.bound-Dfq5c3JQ.js → PasswordInput-U0QhNsMp.js} +6 -6
- package/dist/Popover-ClCEOP3e.d.ts +51 -0
- package/dist/Progress-DlXY0dv_.js +180 -0
- package/dist/Progress-VkkXbIh7.d.ts +26 -0
- package/dist/ProgressBar-mpNpV7ow.js +46 -0
- package/dist/{RadioGroup-IL4Y8XHO.js → RadioGroup-BPPJyA1s.js} +72 -32
- package/dist/RadioGroup-BbcrP56w.d.ts +52 -0
- package/dist/{RangeCalendar-DT63UD8K.js → RangeCalendar-DIVjIl0T.js} +12 -10
- package/dist/Select-D1qIWZCv.d.ts +248 -0
- package/dist/{Select-BM8PNrjC.js → Select-DlbVDCz8.js} +452 -191
- package/dist/{SelectListBox-BFSZxDSi.js → SelectListBox-CCr5YY86.js} +55 -43
- package/dist/{SelectionIndicator-C3hniBa2.js → SelectionIndicator-CvuKjZRP.js} +3 -3
- package/dist/{SharedElementTransition-CZ2bE7yo.js → SharedElementTransition-BkyYit3Q.js} +2 -2
- package/dist/{SidebarWorkspaces-DJknAfS9.js → SidebarWorkspaces-CIpFJGOa.js} +283 -366
- package/dist/{SidebarWorkspaces-DDHJAdNH.d.ts → SidebarWorkspaces-DcwA_jv7.d.ts} +31 -17
- package/dist/Slider-CLViwkE1.d.ts +57 -0
- package/dist/{Slider-DCsCCPFx.js → Slider-_RsgBJcg.js} +72 -15
- package/dist/Spinner-GMEauCHv.d.ts +13 -0
- package/dist/SplitButton-BdP4xjFQ.d.ts +25 -0
- package/dist/{Stepper-Dyhxp0Tl.js → Stepper-D4z7JNsD.js} +116 -88
- package/dist/Stepper-DBb0qfla.d.ts +49 -0
- package/dist/{Switch-BfpSMMpv.js → Switch-Bi3_bUw1.js} +56 -14
- package/dist/Switch-DCxONL2Q.d.ts +42 -0
- package/dist/TableDnd-CG1yOlxh.js +238 -0
- package/dist/TableDragHandle-CXApnuUm.js +51 -0
- package/dist/{TabsFilters-DybNturW.js → TabsFilters-BPogry73.js} +46 -35
- package/dist/TabsFilters-CPfGBODw.d.ts +59 -0
- package/dist/Tag-xhcJOv_X.d.ts +26 -0
- package/dist/{Text-D72yc4S6.js → Text-D7Nqkw1l.js} +1 -1
- package/dist/TextArea-BYX9Kk_v.d.ts +33 -0
- package/dist/{TextArea-Blsip3ZC.js → TextArea-CuJS3-Nv.js} +62 -35
- package/dist/{TimePicker-4hV5zbgd.js → TimePicker-ByfjqkLp.js} +120 -56
- package/dist/TimePicker-UTo9C6gz.d.ts +64 -0
- package/dist/TimePickerForm-CaIHR0PV.js +532 -0
- package/dist/{ToastContainer-Dd0LPykL.js → ToastContainer-tr7Zxahc.js} +4 -4
- package/dist/{ToggleButton-HUZ8ij6i.d.ts → ToggleButton-BX8o7ECO.d.ts} +2 -2
- package/dist/{ToggleButton-P1z1pxzT.js → ToggleButton-D8BT67FO.js} +5 -5
- package/dist/ToggleGroup-18c-FZ_r.js +500 -0
- package/dist/ToggleGroup-UazUtgU1.d.ts +95 -0
- package/dist/{Tooltip-DRB6lo0U.js → Tooltip-Dl3sf8fq.js} +5 -5
- package/dist/Tooltip-FcJ29dhq.d.ts +33 -0
- package/dist/TooltipEllipsis-7QF00kXk.d.ts +21 -0
- package/dist/{TooltipWrapper-BSY31JMc.js → TooltipWrapper-bvNpM6ku.js} +6 -6
- package/dist/{Typography-DJojwiXV.d.ts → Typography-auHWN282.d.ts} +5 -1
- package/dist/{badgeButton.cva-t5PQOH4M.js → badge.cva-C9mE8CMf.js} +23 -24
- package/dist/{button.cva-Ciga0rdG.js → button.cva-C2aoXMh-.js} +10 -16
- package/dist/{buttonContent.cva-BapnODby.d.ts → buttonContent.cva-CeGnrjoA.d.ts} +2 -2
- package/dist/calendarHeader.cva-D3sXR7ox.js +23 -0
- package/dist/{checkbox.cva-aLJS7v4z.js → checkbox.cva-qU_q0lSX.js} +14 -14
- package/dist/columnConfig.cva-CERwSZRN.js +29 -0
- 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 +166 -81
- package/dist/components/bottom-sheet-header.d.ts +1 -1
- package/dist/components/bottom-sheet-header.js +25 -21
- 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 +31 -28
- 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 +2 -2
- 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 +3 -3
- package/dist/components/style-definitions.js +62 -20
- 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 +2 -2
- 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-overrides.d.ts +1 -1
- package/dist/config/ui-router.d.ts +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/confirmation.context-C_-uADGJ.js +93 -0
- package/dist/confirmation.context-DkWyR2aT.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-CP6vV22I.js} +68 -39
- package/dist/{dom.utils-BPooTXtC.js → dom.utils-CqejLWIQ.js} +1 -1
- 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-SrF6v406.js} +3 -3
- package/dist/form-field-C735uXsi.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-D8vXIoiq.js → i18n-DaIHnR2n.js} +123 -9
- package/dist/{i18n-DM-PUcxQ.d.ts → i18n-xXkHgzet.d.ts} +124 -4
- package/dist/iconSlot.cva-DyhOI7EK.js +5 -0
- package/dist/{import-C7W0Wv2r.js → import-Cz8NlFqm.js} +40 -16
- package/dist/index.d.ts +66 -84
- package/dist/index.js +57 -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/{intlStrings-Cu1YN1tA.js → intlStrings-ClpdCJmU.js} +35 -35
- package/dist/{isEqual-LFw0W5rU.js → isEqual-BdJdNr5O.js} +1 -1
- package/dist/{label.cva-DTfT6FrX.js → label.cva-DJ5Dmbz5.js} +7 -7
- package/dist/link.context-BxVK2yQ5.d.ts +20 -0
- package/dist/{link.context-TPjDtjw3.js → link.context-CD5h_b5O.js} +12 -11
- package/dist/link.cva-ZhpQz3P0.d.ts +2277 -0
- 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/{selectItem.cva-B6vxey2R.js → selectItem.cva-DsOZSSPx.js} +2 -1
- package/dist/sidebar.cva-BgxTCejU.js +150 -0
- package/dist/spinner.cva-j4kGmIWC.js +17 -0
- package/dist/{staticDateTimeSegments-CVuAhDDl.js → staticDateTimeSegments-BgUrcqXD.js} +379 -94
- package/dist/{status.cva-CYgi3Htz.js → status.cva-WLEqUAjH.js} +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/{table.cva-DkcsOmZG.js → table.cva-n9TO_vu1.js} +68 -17
- package/dist/tableCells.cva-Br0_kgRM.js +18 -0
- package/dist/tableColumnConfigStorage-Cciq8gVe.js +215 -0
- package/dist/tableVirtualStore-whSmFzTV.js +67 -0
- package/dist/tanstack/form.d.ts +3 -3
- package/dist/tanstack/form.js +3 -3
- package/dist/tanstack/table-context.d.ts +2 -0
- package/dist/tanstack/table-context.js +2 -0
- package/dist/tanstack/table-types.d.ts +55 -0
- package/dist/tanstack/table.d.ts +5 -3
- package/dist/tanstack/table.js +3 -2
- package/dist/tanstack-JB8VmS9j.js +73 -0
- package/dist/tanstack-cQOW9-Q2.d.ts +165 -0
- package/dist/tanstack-table-DdWYwCZM.d.ts +858 -0
- package/dist/tanstack-table-M1M26UQJ.js +5299 -0
- package/dist/tanstack.d.ts +66 -84
- package/dist/tanstack.js +57 -92
- package/dist/{toast.cva-B6NXTwbZ.js → toast.cva-DusQwZw-.js} +13 -9
- package/dist/toast.runtime-ZN5q4T9X.js +25 -0
- package/dist/{toggleGroup.cva-CJ-3Ps7j.js → toggleGroup.cva-CvNS5QO1.js} +2 -2
- package/dist/{uiConfig.context-3DN9w6oU.js → uiConfig.context-NWmBJ2Hc.js} +72 -10
- package/dist/uiConfig.context-ykH4E2js.d.ts +19 -0
- package/dist/uiConfig.types-BsyPKepP.d.ts +291 -0
- package/dist/{uiOverrides.context-DHHzLSnq.d.ts → uiOverrides.context-C5Maic5Q.d.ts} +106 -0
- package/dist/{useAsyncList-Ct74ve3i.js → useAsyncList-DkIjhlce.js} +142 -37
- package/dist/useAsyncList-F-328rtE.d.ts +25 -0
- package/dist/useAutoFocus-K-bfNxa2.js +16 -0
- package/dist/useBreakpoint-BPrZNuNl.d.ts +9 -0
- package/dist/{useBreakpoint-CJ3mx7UF.js → useBreakpoint-DtYSRweq.js} +6 -2
- package/dist/{useControlledState-CuU1VIh1.js → useControlledState-C1-Mt2i0.js} +1 -1
- package/dist/useDebounceCallback-C7YKfjXW.js +96 -0
- package/dist/useFilters-CybBXUAA.js +217 -0
- package/dist/useFilters-DrfBFNLw.d.ts +57 -0
- package/dist/useFormAutosave-BzCGqFqi.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-npiqOvyB.js} +107 -6
- package/dist/useRemoveButton-zhlA1Pbc.js +98 -0
- package/dist/useResolveDateRangePreset-DOSzJR-N.d.ts +64 -0
- package/dist/useResolveDateRangePreset-k_h_XJBG.js +26 -0
- package/dist/{useScrollableListBox-oYKqU3Hp.js → useScrollableListBox-4pieApqz.js} +1 -1
- package/dist/{useStaticInputHandoff-BN0fOerH.js → useStaticInputHandoff-DrNFrvD7.js} +6 -1
- package/dist/useTableVirtualizer-sFInQiH-.d.ts +162 -0
- package/dist/useToast-BHqkSByv.d.ts +78 -0
- package/dist/useToast-DgqC6Ta_.js +63 -0
- package/dist/utils/file.d.ts +1 -1
- package/dist/utils/file.js +1 -1
- package/dist/{utils-BkLF-JA3.js → utils-Q5Oc6oX2.js} +1 -1
- package/llms.txt +3201 -0
- package/package.json +22 -118
- package/MIGRATION.md +0 -655
- 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-Bn13u0zu.js +0 -145
- package/dist/Autocomplete.bound-CpHZZ3C9.d.ts +0 -9
- package/dist/Autocomplete.bound-Dwh__y-Z.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-M2cjR37s.js +0 -36
- package/dist/DateRangePicker-32D4pWJg.d.ts +0 -97
- package/dist/DateRangePicker.bound-CVtoVsho.d.ts +0 -9
- package/dist/DateRangePicker.bound-CkIDsAUf.js +0 -35
- package/dist/DateTimePicker-BTRIUagV.d.ts +0 -55
- package/dist/DateTimePicker.bound-X4DTyQ1b.d.ts +0 -9
- package/dist/DateTimePicker.bound-nSCVUqd0.js +0 -32
- 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-C12mOKpg.js +0 -30
- package/dist/FileInput.bound-D2HuuqSb.d.ts +0 -8
- package/dist/FileUpload-BUTSqHVk.d.ts +0 -11
- package/dist/FileUpload-D7FMYm-k.js +0 -749
- package/dist/FileUpload.bound-CGQXb4iT.d.ts +0 -16
- package/dist/FileUpload.bound-DmkuulOi.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-B9a62ylL.d.ts +0 -9
- package/dist/Input.bound-DYoXyRGy.js +0 -31
- 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-ChJnNyJS.js +0 -32
- package/dist/NumberField.bound-Dy0A5iVc.d.ts +0 -9
- package/dist/NumberRangeInput-BCKQaGpy.d.ts +0 -50
- package/dist/NumberRangeInput.bound-BF6P_ega.js +0 -32
- package/dist/NumberRangeInput.bound-BNXxIQ0b.d.ts +0 -9
- 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-DHhuBeT6.d.ts +0 -28
- package/dist/RichTextEditor-DfwVdm45.js +0 -651
- package/dist/Select-C34ENdjq.d.ts +0 -119
- package/dist/Select.bound--Az1Xwgm.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-DeaskY6r.js +0 -28
- package/dist/TimePicker-BZ1ocsBX.d.ts +0 -45
- package/dist/TimePicker.bound-8DmjMXuE.d.ts +0 -9
- package/dist/TimePicker.bound-BFSXJvE_.js +0 -32
- package/dist/TimePickerForm-DD9VA_td.js +0 -225
- 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/confirmation.context-Bc2yEVp_.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-wNbE6b-h.d.ts +0 -566
- 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/uiConfig.context-BnCORTNm.d.ts +0 -132
- 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/useTableColumnConfig-CXYgj5xi.js +0 -1906
- package/dist/useTableNav-BusSFEVC.d.ts +0 -197
- 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-
|
|
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-Q5Oc6oX2.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-Bpwr1nuy.js";
|
|
6
|
+
import { t as $43a3b93638fe5db9$export$75b6ee27786ba447 } from "./Label-VTcaaLO8.js";
|
|
7
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1, t as $7705c033048f6da7$export$24d547caef80ccd1 } from "./Button-DF6sbTuF.js";
|
|
8
|
+
import { t as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-D7Nqkw1l.js";
|
|
9
|
+
import { n as $1f3c3b1a70cec653$export$ff05c3ac10437e03, t as $cdaed739b1139372$export$c24727297075ec6a } from "./Form-4jZarkjk.js";
|
|
10
|
+
import { n as $41fb335299a4a39e$export$f5b8910cec6cf069, t as $41fb335299a4a39e$export$37fb8590cf2c088c } from "./Input-BkR3jkvt.js";
|
|
11
|
+
import { n as $928221da08ecbc62$export$7c5906fe4f1f2af2, r as $928221da08ecbc62$export$7ff8f37d2d81a48d } from "./ListBox-Ck-B1Jae.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-DaIHnR2n.js";
|
|
15
|
+
import { i as useDeepCompareMemo, t as UIConfig } from "./uiConfig.context-NWmBJ2Hc.js";
|
|
16
|
+
import { t as Button } from "./Button-C1Jv1Plk.js";
|
|
13
17
|
import { BottomSheet } from "./components/bottom-sheet.js";
|
|
14
|
-
import { t as useBreakpoint } from "./useBreakpoint-
|
|
18
|
+
import { t as useBreakpoint } from "./useBreakpoint-DtYSRweq.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-DOZ7eXjA.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-bvNpM6ku.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-CvYyjMWx.js";
|
|
30
|
+
import { n as SelectInputTags, t as useDebounceCallback } from "./useDebounceCallback-C7YKfjXW.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+6f4b9a1cfb20c0ae/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+6f4b9a1cfb20c0ae/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(() => {
|
|
@@ -219,6 +343,7 @@ let SelectContext;
|
|
|
219
343
|
const [showAll, setShowAll] = useState(false);
|
|
220
344
|
const [cachedItems, setCachedItems] = useState(items);
|
|
221
345
|
const valueRef = useRef(initialSelectedItems);
|
|
346
|
+
const valueIdsRef = useRef(fieldState.value);
|
|
222
347
|
useEffect(() => {
|
|
223
348
|
if (!isLoading) setCachedItems(items);
|
|
224
349
|
}, [isLoading, items]);
|
|
@@ -233,8 +358,8 @@ let SelectContext;
|
|
|
233
358
|
showNewItemOption,
|
|
234
359
|
newItemMinLength,
|
|
235
360
|
isLoading,
|
|
236
|
-
|
|
237
|
-
isClientSearchDisabled
|
|
361
|
+
hasNextPage,
|
|
362
|
+
isClientSearchDisabled
|
|
238
363
|
});
|
|
239
364
|
const selectedItems = useMemo(() => {
|
|
240
365
|
const getItem = (id) => allItems.find((item) => item.id === id) ?? null;
|
|
@@ -245,10 +370,11 @@ let SelectContext;
|
|
|
245
370
|
const selectedIds = useMemo(() => selectedItems.map(({ id }) => id), [selectedItems]);
|
|
246
371
|
const getItem = useCallback((value) => allItems.find((item) => item && item.id === value) ?? null, [allItems]);
|
|
247
372
|
const updateValue = useCallback((value) => {
|
|
373
|
+
valueIdsRef.current = value;
|
|
248
374
|
if (Array.isArray(value)) valueRef.current = value.map((id) => getItem(id)).filter((item) => item !== null);
|
|
249
375
|
else valueRef.current = getItem(value);
|
|
250
376
|
}, [getItem]);
|
|
251
|
-
const getValueIds = () =>
|
|
377
|
+
const getValueIds = () => valueIdsRef.current ?? null;
|
|
252
378
|
const emitStateChanges = useCallback((changes, skipSelectionChange) => {
|
|
253
379
|
const valueChanged = JSON.stringify(changes.value) !== JSON.stringify(getValueIds());
|
|
254
380
|
if (valueChanged) {
|
|
@@ -285,7 +411,7 @@ let SelectContext;
|
|
|
285
411
|
else updateValue(value);
|
|
286
412
|
}, [controlledValue]);
|
|
287
413
|
useEffect(() => {
|
|
288
|
-
updateValue(
|
|
414
|
+
updateValue(valueIdsRef.current);
|
|
289
415
|
if (isMultiple) return;
|
|
290
416
|
if (!isSearchInPopover && controlledValue !== null && controlledValue !== void 0 && fieldState.value !== null && fieldState.value !== void 0 && fieldState.inputValue === "" && getItem(fieldState.value)?.label) syncFieldState(fieldState.value);
|
|
291
417
|
}, [allListItems]);
|
|
@@ -395,7 +521,7 @@ let SelectContext;
|
|
|
395
521
|
isMultiple,
|
|
396
522
|
multiSelectAutoConfirm,
|
|
397
523
|
isLoading,
|
|
398
|
-
|
|
524
|
+
hasNextPage
|
|
399
525
|
}), [
|
|
400
526
|
fieldState,
|
|
401
527
|
isOpen,
|
|
@@ -414,7 +540,7 @@ let SelectContext;
|
|
|
414
540
|
isMultiple,
|
|
415
541
|
multiSelectAutoConfirm,
|
|
416
542
|
isLoading,
|
|
417
|
-
|
|
543
|
+
hasNextPage
|
|
418
544
|
]);
|
|
419
545
|
const selection = useDeepCompareMemo(() => ({
|
|
420
546
|
selectedIds,
|
|
@@ -487,13 +613,13 @@ const handleKeyInteraction = ({ event, interactions }) => {
|
|
|
487
613
|
};
|
|
488
614
|
//#endregion
|
|
489
615
|
//#region src/components/inputs/Selection/shared/SelectInput.tsx
|
|
490
|
-
const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, isClearableIfDisabled, showSelectionContent,
|
|
616
|
+
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
617
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
492
618
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
493
619
|
const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
|
|
494
620
|
const { t } = useTranslation("ui");
|
|
495
621
|
const state = use($dbdc5e6e7ce01b4b$export$c02625b26074192c);
|
|
496
|
-
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
622
|
+
const { hoverProps, isHovered } = useHover$1({ isDisabled });
|
|
497
623
|
const [isFocused, setIsFocused] = useState(false);
|
|
498
624
|
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
|
|
499
625
|
const { isFocusVisible } = useFocusVisible();
|
|
@@ -558,7 +684,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
558
684
|
const nextKey = reversedNavigationItems[nextIndex]?.id ?? null;
|
|
559
685
|
state.selectionManager.setFocusedKey(nextKey);
|
|
560
686
|
};
|
|
561
|
-
const { onKeyDown:
|
|
687
|
+
const { onKeyDown: onTriggerArrowKeyDown } = useKeyInteractions({ interactions: [{
|
|
562
688
|
actions: ["up", "down"],
|
|
563
689
|
enabled: !isSearchable && !isDisabled && !isOpen,
|
|
564
690
|
preventDefault: true,
|
|
@@ -566,19 +692,57 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
566
692
|
setIsOpen(true);
|
|
567
693
|
}
|
|
568
694
|
}] });
|
|
695
|
+
const typeAheadRef = useRef({
|
|
696
|
+
search: "",
|
|
697
|
+
timeout: 0
|
|
698
|
+
});
|
|
699
|
+
const onTriggerTypeAhead = (event) => {
|
|
700
|
+
if (isDisabled || isOpen || event.key.length !== 1 || event.key.trim() === "" || event.ctrlKey || event.metaKey || event.altKey || event.nativeEvent.isComposing) return;
|
|
701
|
+
const typeAhead = typeAheadRef.current;
|
|
702
|
+
window.clearTimeout(typeAhead.timeout);
|
|
703
|
+
if (isMultiple) {
|
|
704
|
+
typeAhead.search = "";
|
|
705
|
+
setIsOpen(true);
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
typeAhead.search += event.key.toLocaleLowerCase();
|
|
709
|
+
typeAhead.timeout = window.setTimeout(() => {
|
|
710
|
+
typeAhead.search = "";
|
|
711
|
+
}, 1e3);
|
|
712
|
+
const { search } = typeAhead;
|
|
713
|
+
const isRepeatedLetter = search === search[0].repeat(search.length);
|
|
714
|
+
const query = isRepeatedLetter ? search[0] : search;
|
|
715
|
+
const currentIndex = selectableListItems.findIndex((item) => item.id === fieldState.value);
|
|
716
|
+
const startIndex = isRepeatedLetter || currentIndex < 0 ? currentIndex + 1 : currentIndex;
|
|
717
|
+
for (let offset = 0; offset < selectableListItems.length; offset++) {
|
|
718
|
+
const item = selectableListItems[(startIndex + offset) % selectableListItems.length];
|
|
719
|
+
if (item.label.toLocaleLowerCase().startsWith(query)) {
|
|
720
|
+
if (item.id !== fieldState.value) onChange(item.id);
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
};
|
|
725
|
+
const onTriggerKeyDown = (event) => {
|
|
726
|
+
onTriggerArrowKeyDown(event);
|
|
727
|
+
onTriggerTypeAhead(event);
|
|
728
|
+
};
|
|
569
729
|
const onClick = () => {
|
|
570
730
|
if (isDisabled) return;
|
|
571
731
|
if (!isSearchable) {
|
|
572
732
|
setIsOpen(!isOpen);
|
|
573
733
|
return;
|
|
574
734
|
}
|
|
735
|
+
if (state && !state.isOpen && document.activeElement === inputRef.current) {
|
|
736
|
+
state.open(null, "manual");
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
575
739
|
inputRef.current?.focus();
|
|
576
740
|
};
|
|
577
741
|
return /* @__PURE__ */ jsxs("div", {
|
|
578
742
|
ref,
|
|
579
743
|
className: inputBaseCva({
|
|
580
744
|
variant,
|
|
581
|
-
as,
|
|
745
|
+
layout: as,
|
|
582
746
|
...props,
|
|
583
747
|
className: clsx("group/select-content relative flex px-0!", !isDisabled && isSearchable && "cursor-text", className)
|
|
584
748
|
}),
|
|
@@ -605,7 +769,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
605
769
|
children: [
|
|
606
770
|
/* @__PURE__ */ jsxs("div", {
|
|
607
771
|
className: clsx("relative flex flex-1 items-center gap-2 truncate pr-2!", !isDisabled && isSearchable && "cursor-text", !isDisabled && !isSearchable && "cursor-pointer", inputSizeCva({
|
|
608
|
-
as,
|
|
772
|
+
layout: as,
|
|
609
773
|
size,
|
|
610
774
|
...props
|
|
611
775
|
})),
|
|
@@ -632,10 +796,13 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
632
796
|
ref: inputRef,
|
|
633
797
|
placeholder: as === "floating" ? void 0 : placeholder,
|
|
634
798
|
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"
|
|
799
|
+
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
800
|
onKeyDown,
|
|
637
801
|
onKeyDownCapture: onInputKeyDownCapture,
|
|
638
|
-
...fieldProps
|
|
802
|
+
...fieldProps,
|
|
803
|
+
"aria-describedby": describedBy,
|
|
804
|
+
"aria-errormessage": errorMessageId,
|
|
805
|
+
"aria-invalid": isInvalid || void 0
|
|
639
806
|
})]
|
|
640
807
|
}),
|
|
641
808
|
!isSearchable && /* @__PURE__ */ jsxs($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
@@ -646,6 +813,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
646
813
|
className: clsx("group/select-trigger w-full truncate text-start outline-none disabled:text-inherit", showTags && "absolute inset-0 z-base"),
|
|
647
814
|
onKeyDown: onTriggerKeyDown,
|
|
648
815
|
...fieldProps,
|
|
816
|
+
"aria-describedby": describedBy,
|
|
649
817
|
children: [(as === "floating" && isEmpty || isMultiple && !isEmpty) && /* @__PURE__ */ jsx(Fragment$1, { children: "\xA0" }), (isEmpty || !isMultiple) && (as !== "floating" || !isEmpty) && /* @__PURE__ */ jsxs("span", {
|
|
650
818
|
className: clsx("block truncate empty:before:inline-block empty:before:content-['']", isEmpty && "text-muted-foreground"),
|
|
651
819
|
children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
|
|
@@ -686,7 +854,7 @@ const SelectInput = ({ ref, placeholder, variant, as, size, isDisabled, isInvali
|
|
|
686
854
|
//#region src/components/inputs/Selection/shared/SelectListBox.lazy.tsx
|
|
687
855
|
let loadedListBox;
|
|
688
856
|
let pendingListBox;
|
|
689
|
-
const loadSelectListBox = () => pendingListBox ??= import("./SelectListBox-
|
|
857
|
+
const loadSelectListBox = () => pendingListBox ??= import("./SelectListBox-CCr5YY86.js").then(({ SelectListBox }) => {
|
|
690
858
|
loadedListBox = SelectListBox;
|
|
691
859
|
return SelectListBox;
|
|
692
860
|
}).catch((error) => {
|
|
@@ -726,30 +894,36 @@ const SelectPopoverSearch = ({ hideSearchIcon }) => {
|
|
|
726
894
|
ref,
|
|
727
895
|
label: t(($) => $.ui.select.search),
|
|
728
896
|
hideLabel: true,
|
|
729
|
-
size: "
|
|
897
|
+
size: "sm",
|
|
730
898
|
placeholder: t(($) => $.ui.select.search),
|
|
731
899
|
leadingIcon: !hideSearchIcon ? Search : void 0,
|
|
732
900
|
isClearable: true,
|
|
733
901
|
renderStaticInput: false,
|
|
734
|
-
|
|
902
|
+
autoFocus: true,
|
|
735
903
|
className: "shrink-0 p-1"
|
|
736
904
|
});
|
|
737
905
|
};
|
|
738
|
-
const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent,
|
|
739
|
-
const { label, tooltipText, helperText, isDirty, isRequired, rightContent,
|
|
906
|
+
const SelectDesktop = ({ ref, error, isInvalid: isInvalidProp, ignoreTriggerWidth, showSelectionContent, className, inputClassName, leadingContent, trailingContent, customTrigger, searchPlacement = "field", onBlur, onMouseEnter, onFocusCapture, ...props }) => {
|
|
907
|
+
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
908
|
const isSearchInPopover = !!isSearchableProp && searchPlacement === "popover";
|
|
741
909
|
const isSearchable = !!isSearchableProp && !isSearchInPopover;
|
|
742
910
|
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
743
911
|
const selectPopoverCva = UIOverrides.useCva("select.popoverCva", selectPopoverDefinition);
|
|
912
|
+
const isInvalid = isInvalidProp || !!error;
|
|
913
|
+
const { describedBy, errorMessageId, helperTextId } = useFieldAccessibility({
|
|
914
|
+
error,
|
|
915
|
+
helperText
|
|
916
|
+
});
|
|
744
917
|
const formFieldProps = {
|
|
745
918
|
error,
|
|
919
|
+
errorMessageId,
|
|
746
920
|
label,
|
|
747
921
|
tooltipText,
|
|
748
922
|
helperText,
|
|
923
|
+
helperTextId,
|
|
749
924
|
isRequired,
|
|
750
925
|
rightContent,
|
|
751
|
-
|
|
752
|
-
hideLabel,
|
|
926
|
+
hideLabel: hideLabel || isFieldHeaderHiddenByLayout(as),
|
|
753
927
|
isDisabled,
|
|
754
928
|
headerClassName,
|
|
755
929
|
errorClassName
|
|
@@ -823,6 +997,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
823
997
|
};
|
|
824
998
|
const WrapperComponent = isSearchable ? $dbdc5e6e7ce01b4b$export$72b9695b8216309a : Fragment;
|
|
825
999
|
const comboBoxProps = {
|
|
1000
|
+
defaultFilter: props.isClientSearchDisabled ? () => true : void 0,
|
|
826
1001
|
selectedKey: isMultiple ? null : fieldState.value,
|
|
827
1002
|
onSelectionChange,
|
|
828
1003
|
inputValue: fieldState.inputValue,
|
|
@@ -830,9 +1005,9 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
830
1005
|
onOpenChange: openChangeHandler,
|
|
831
1006
|
allowsEmptyCollection: true,
|
|
832
1007
|
isDisabled,
|
|
833
|
-
isInvalid
|
|
1008
|
+
isInvalid,
|
|
834
1009
|
menuTrigger: "focus",
|
|
835
|
-
className: clsx("group w-full",
|
|
1010
|
+
className: clsx("group w-full", className)
|
|
836
1011
|
};
|
|
837
1012
|
const headerProps = {
|
|
838
1013
|
label,
|
|
@@ -840,7 +1015,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
840
1015
|
helperText,
|
|
841
1016
|
isRequired,
|
|
842
1017
|
rightContent,
|
|
843
|
-
isHeaderHidden: hideLabel
|
|
1018
|
+
isHeaderHidden: hideLabel,
|
|
844
1019
|
isDisabled,
|
|
845
1020
|
className: headerClassName,
|
|
846
1021
|
labelProps
|
|
@@ -858,11 +1033,9 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
858
1033
|
...isSearchable ? comboBoxProps : {},
|
|
859
1034
|
children: /* @__PURE__ */ jsxs(FormField, {
|
|
860
1035
|
...formFieldProps,
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
},
|
|
865
|
-
as,
|
|
1036
|
+
labelProps,
|
|
1037
|
+
...!isSearchable && { className: clsx("group w-full", className) },
|
|
1038
|
+
layout: as,
|
|
866
1039
|
onMouseEnter: (event) => {
|
|
867
1040
|
preloadSelectListBox();
|
|
868
1041
|
onMouseEnter?.(event);
|
|
@@ -885,14 +1058,13 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
885
1058
|
as,
|
|
886
1059
|
size,
|
|
887
1060
|
isDisabled,
|
|
888
|
-
isInvalid
|
|
889
|
-
className,
|
|
1061
|
+
isInvalid,
|
|
1062
|
+
className: inputClassName,
|
|
890
1063
|
hideDropdownIcon,
|
|
891
1064
|
isSearchable,
|
|
892
1065
|
isClearable,
|
|
893
1066
|
isClearableIfDisabled,
|
|
894
1067
|
showSelectionContent,
|
|
895
|
-
inputClassName,
|
|
896
1068
|
leadingContent,
|
|
897
1069
|
trailingContent,
|
|
898
1070
|
collapseAfter,
|
|
@@ -905,6 +1077,8 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
905
1077
|
if (isSearchable) closeComboBoxRef.current = state;
|
|
906
1078
|
},
|
|
907
1079
|
fieldProps,
|
|
1080
|
+
describedBy,
|
|
1081
|
+
errorMessageId,
|
|
908
1082
|
headerProps
|
|
909
1083
|
}), hasOpened && (!isSearchable || showPopover) && /* @__PURE__ */ jsx($542a13ca2fa5b484$export$5b6b19405a83ff9d, {
|
|
910
1084
|
ref: popoverRef,
|
|
@@ -912,7 +1086,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
912
1086
|
isOpen,
|
|
913
1087
|
onOpenChange: setIsOpen,
|
|
914
1088
|
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: {
|
|
1089
|
+
style: { minWidth: !ignoreTriggerWidth ? popoverWidth : void 0 },
|
|
916
1090
|
offset: 0,
|
|
917
1091
|
children: isSearchInPopover ? /* @__PURE__ */ jsx("div", {
|
|
918
1092
|
className: clsx(popoverCva({}), "flex max-h-80! flex-col overflow-hidden"),
|
|
@@ -977,17 +1151,33 @@ const SelectListBoxSelectionBar = ({ className }) => {
|
|
|
977
1151
|
};
|
|
978
1152
|
//#endregion
|
|
979
1153
|
//#region src/components/inputs/Selection/shared/SelectMobile.tsx
|
|
980
|
-
|
|
981
|
-
|
|
1154
|
+
/** The sheet's search field, wired to the surrounding React Aria autocomplete so arrow keys and Enter reach the list. */
|
|
1155
|
+
const SelectMobileSearch = ({ ref, ...props }) => {
|
|
1156
|
+
const { ref: fieldRef, ...inputProps } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e($4b38b5b75ecc6208$export$698f465ec27e93df) ?? {};
|
|
1157
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
1158
|
+
...inputProps,
|
|
1159
|
+
...props,
|
|
1160
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, fieldRef),
|
|
1161
|
+
renderStaticInput: false
|
|
1162
|
+
});
|
|
1163
|
+
};
|
|
1164
|
+
const SelectMobile = ({ ref, error, isInvalid: isInvalidProp, showSelectionContent, className, inputClassName, leadingContent, trailingContent, customTrigger, searchPlacement: _searchPlacement, onBlur, onMouseEnter, onFocusCapture, bottomSheetProps, ...props }) => {
|
|
1165
|
+
const { label, tooltipText, helperText, isDirty, isRequired, rightContent, headerClassName, errorClassName, placeholder, variant, isDisabled, hideLabel, hideDropdownIcon, hideSearchIcon, isSearchable, isClearable, isClearableIfDisabled, as, size, collapseAfter, selectedTagsType } = props;
|
|
1166
|
+
const isInvalid = isInvalidProp || !!error;
|
|
1167
|
+
const { describedBy, errorMessageId, helperTextId } = useFieldAccessibility({
|
|
1168
|
+
error,
|
|
1169
|
+
helperText
|
|
1170
|
+
});
|
|
982
1171
|
const formFieldProps = {
|
|
983
1172
|
error,
|
|
1173
|
+
errorMessageId,
|
|
984
1174
|
label,
|
|
985
1175
|
tooltipText,
|
|
986
1176
|
helperText,
|
|
1177
|
+
helperTextId,
|
|
987
1178
|
isRequired,
|
|
988
1179
|
rightContent,
|
|
989
|
-
|
|
990
|
-
hideLabel,
|
|
1180
|
+
hideLabel: hideLabel || isFieldHeaderHiddenByLayout(as),
|
|
991
1181
|
isDisabled,
|
|
992
1182
|
headerClassName,
|
|
993
1183
|
errorClassName
|
|
@@ -999,7 +1189,7 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
999
1189
|
helperText,
|
|
1000
1190
|
isRequired,
|
|
1001
1191
|
rightContent,
|
|
1002
|
-
isHeaderHidden: hideLabel
|
|
1192
|
+
isHeaderHidden: hideLabel,
|
|
1003
1193
|
isDisabled,
|
|
1004
1194
|
className: headerClassName,
|
|
1005
1195
|
labelProps
|
|
@@ -1018,9 +1208,9 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1018
1208
|
};
|
|
1019
1209
|
return /* @__PURE__ */ jsx(FormField, {
|
|
1020
1210
|
...formFieldProps,
|
|
1021
|
-
as,
|
|
1211
|
+
layout: as,
|
|
1022
1212
|
labelProps,
|
|
1023
|
-
className: clsx("group w-full",
|
|
1213
|
+
className: clsx("group w-full", className),
|
|
1024
1214
|
onMouseEnter,
|
|
1025
1215
|
onFocusCapture: (event) => {
|
|
1026
1216
|
preloadSelectListBox();
|
|
@@ -1039,15 +1229,17 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1039
1229
|
as,
|
|
1040
1230
|
size,
|
|
1041
1231
|
isDisabled,
|
|
1042
|
-
isInvalid
|
|
1043
|
-
className,
|
|
1232
|
+
isInvalid,
|
|
1233
|
+
className: inputClassName,
|
|
1044
1234
|
hideDropdownIcon,
|
|
1045
1235
|
isSearchable: false,
|
|
1046
1236
|
isClearable,
|
|
1047
1237
|
isClearableIfDisabled,
|
|
1048
1238
|
showSelectionContent,
|
|
1049
|
-
onBlur: void 0,
|
|
1239
|
+
onBlur: isOpen ? void 0 : onBlur,
|
|
1050
1240
|
fieldProps,
|
|
1241
|
+
describedBy,
|
|
1242
|
+
errorMessageId,
|
|
1051
1243
|
headerProps,
|
|
1052
1244
|
leadingContent,
|
|
1053
1245
|
trailingContent,
|
|
@@ -1066,25 +1258,31 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
|
|
|
1066
1258
|
},
|
|
1067
1259
|
label,
|
|
1068
1260
|
footer: isMultiple && /* @__PURE__ */ jsx(SelectListBoxSelectionBar, {}),
|
|
1069
|
-
children: (close) => /* @__PURE__ */
|
|
1261
|
+
children: (close) => /* @__PURE__ */ jsx("div", {
|
|
1070
1262
|
className: "flex max-h-full flex-col overflow-hidden",
|
|
1071
|
-
children:
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1263
|
+
children: isSearchable ? /* @__PURE__ */ jsxs($4b38b5b75ecc6208$export$2f2b9559550c7bbc, {
|
|
1264
|
+
inputValue: fieldState.inputValue,
|
|
1265
|
+
onInputChange,
|
|
1266
|
+
children: [/* @__PURE__ */ jsx(SelectMobileSearch, {
|
|
1267
|
+
ref: searchInputRef,
|
|
1268
|
+
label,
|
|
1269
|
+
placeholder,
|
|
1270
|
+
rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
|
|
1271
|
+
className: "mb-2 px-4",
|
|
1272
|
+
leadingIcon: !hideSearchIcon ? /* @__PURE__ */ jsx(Search, { className: "size-4" }) : void 0,
|
|
1273
|
+
isClearable
|
|
1274
|
+
}), /* @__PURE__ */ jsx(SelectListBox, {
|
|
1275
|
+
...props,
|
|
1276
|
+
isSearchable: false,
|
|
1277
|
+
onClose: close,
|
|
1278
|
+
isScrollable: true
|
|
1279
|
+
})]
|
|
1280
|
+
}) : /* @__PURE__ */ jsx(SelectListBox, {
|
|
1083
1281
|
...props,
|
|
1084
|
-
autoFocus:
|
|
1282
|
+
autoFocus: true,
|
|
1085
1283
|
onClose: close,
|
|
1086
1284
|
isScrollable: true
|
|
1087
|
-
})
|
|
1285
|
+
})
|
|
1088
1286
|
})
|
|
1089
1287
|
})]
|
|
1090
1288
|
})
|
|
@@ -1096,21 +1294,21 @@ const SelectBase = ({ layout, ...dProps }) => {
|
|
|
1096
1294
|
const ui = UIConfig.useConfig();
|
|
1097
1295
|
const props = {
|
|
1098
1296
|
...dProps,
|
|
1099
|
-
selectionMode: dProps.selectionMode ??
|
|
1297
|
+
selectionMode: dProps.selectionMode ?? "single",
|
|
1298
|
+
isLoading: !!(dProps.isLoading || dProps.isFetchingNextPage),
|
|
1100
1299
|
variant: dProps.variant ?? ui.input.variant,
|
|
1101
|
-
as: resolveInputLayout(layout,
|
|
1300
|
+
as: resolveInputLayout(layout, ui.input.layout),
|
|
1102
1301
|
size: dProps.size ?? ui.input.size,
|
|
1103
1302
|
hideLabel: dProps.hideLabel ?? ui.input.hideLabel,
|
|
1104
1303
|
isClearable: dProps.isClearable ?? ui.input.isClearable,
|
|
1105
1304
|
isSearchable: dProps.isSearchable ?? ui.select.isSearchable,
|
|
1106
1305
|
isScrollPreventDisabled: dProps.isScrollPreventDisabled ?? ui.select.isScrollPreventDisabled,
|
|
1107
1306
|
selectedTagsType: dProps.selectedTagsType ?? ui.select.selectedTagsType,
|
|
1108
|
-
ignoreTriggerWidth: dProps.virtualizerOptions || (dProps.totalItems ?? 0) > 100 || dProps.
|
|
1307
|
+
ignoreTriggerWidth: dProps.virtualizerOptions || (dProps.totalItems ?? 0) > 100 || dProps.hasNextPage ? false : dProps.ignoreTriggerWidth ?? false,
|
|
1109
1308
|
collapseAfter: dProps.collapseAfter ?? ui.select.collapseAfter,
|
|
1110
1309
|
hideSearchIcon: dProps.hideSearchIcon ?? ui.select.hideSearchIcon,
|
|
1111
1310
|
multiSelectAutoConfirm: dProps.multiSelectAutoConfirm ?? ui.select.multiSelectAutoConfirm,
|
|
1112
|
-
searchDebounceDelay: dProps.searchDebounceDelay ?? ui.select.searchDebounceDelay
|
|
1113
|
-
isClientSearchDisabled: dProps.ignoreInputValueFiltering ?? dProps.isClientSearchDisabled
|
|
1311
|
+
searchDebounceDelay: dProps.searchDebounceDelay ?? ui.select.searchDebounceDelay
|
|
1114
1312
|
};
|
|
1115
1313
|
const isDesktop = useBreakpoint("md");
|
|
1116
1314
|
return /* @__PURE__ */ jsx(SelectContext.Provider, {
|
|
@@ -1140,14 +1338,14 @@ const StaticSelectTrailingContent = ({ trailingContent, hideDropdownIcon, size,
|
|
|
1140
1338
|
};
|
|
1141
1339
|
//#endregion
|
|
1142
1340
|
//#region src/components/inputs/Selection/shared/staticSelect.utils.tsx
|
|
1143
|
-
const getStaticMultipleDisplayValue = ({ selectedItems, isDisabled, collapseAfter, selectedTagsType }) => {
|
|
1341
|
+
const getStaticMultipleDisplayValue = ({ selectedItems, isDisabled, collapseAfter, selectedTagsType, onRemove }) => {
|
|
1144
1342
|
if (selectedItems.length === 0) return "";
|
|
1145
1343
|
return /* @__PURE__ */ jsx(SelectInputTags, {
|
|
1146
1344
|
selectedItems,
|
|
1147
1345
|
isDisabled,
|
|
1148
1346
|
collapseAfter,
|
|
1149
1347
|
selectedTagsType,
|
|
1150
|
-
onRemove: () =>
|
|
1348
|
+
onRemove: (id) => onRemove?.(id)
|
|
1151
1349
|
});
|
|
1152
1350
|
};
|
|
1153
1351
|
const getStaticSingleDisplayValue = ({ selectedItem, showSelectionContent }) => {
|
|
@@ -1161,7 +1359,7 @@ const getStaticSingleDisplayValue = ({ selectedItem, showSelectionContent }) =>
|
|
|
1161
1359
|
const getStaticSelectValue = ({ items, value, selectionMode, initialSelection, mapInitialToSelectItem = ((item) => ({
|
|
1162
1360
|
id: item.id,
|
|
1163
1361
|
label: item.label ?? item.name ?? ""
|
|
1164
|
-
})), showSelectionContent, isDisabled, collapseAfter, selectedTagsType }) => {
|
|
1362
|
+
})), showSelectionContent, isDisabled, collapseAfter, selectedTagsType, onRemove }) => {
|
|
1165
1363
|
if (value == null || Array.isArray(value) && value.length === 0) return {
|
|
1166
1364
|
selectedItem: null,
|
|
1167
1365
|
selectedItems: [],
|
|
@@ -1191,7 +1389,8 @@ const getStaticSelectValue = ({ items, value, selectionMode, initialSelection, m
|
|
|
1191
1389
|
selectedItems,
|
|
1192
1390
|
isDisabled,
|
|
1193
1391
|
collapseAfter,
|
|
1194
|
-
selectedTagsType
|
|
1392
|
+
selectedTagsType,
|
|
1393
|
+
onRemove
|
|
1195
1394
|
}),
|
|
1196
1395
|
isEmpty: selectedItems.length === 0
|
|
1197
1396
|
};
|
|
@@ -1207,24 +1406,42 @@ const getStaticSelectValue = ({ items, value, selectionMode, initialSelection, m
|
|
|
1207
1406
|
};
|
|
1208
1407
|
//#endregion
|
|
1209
1408
|
//#region src/components/inputs/Selection/Select/Select.tsx
|
|
1210
|
-
function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputProps }) {
|
|
1409
|
+
function SelectInner({ renderStaticInput, isFormControlDisabled, list, defaultValue, items: itemsProp, isLoading, hasNextPage, fetchNextPage, isFetchingNextPage, isClientSearchDisabled, isReadOnly: _isReadOnly, name: _name, ...inputProps }) {
|
|
1410
|
+
const isUncontrolled = inputProps.value === void 0 && defaultValue !== void 0;
|
|
1411
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
|
|
1412
|
+
const onChange = inputProps.onChange;
|
|
1211
1413
|
const props = {
|
|
1212
1414
|
...inputProps,
|
|
1213
|
-
|
|
1214
|
-
|
|
1415
|
+
...isUncontrolled && {
|
|
1416
|
+
value: uncontrolledValue,
|
|
1417
|
+
onChange: (value) => {
|
|
1418
|
+
setUncontrolledValue(value);
|
|
1419
|
+
onChange?.(value);
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
...list ? {
|
|
1423
|
+
items: list.items,
|
|
1215
1424
|
isLoading: list.isLoading,
|
|
1216
|
-
|
|
1217
|
-
|
|
1425
|
+
hasNextPage: list.hasNextPage,
|
|
1426
|
+
fetchNextPage: () => list.fetchNextPage(),
|
|
1427
|
+
isFetchingNextPage: list.isFetchingNextPage,
|
|
1218
1428
|
isClientSearchDisabled: true,
|
|
1219
1429
|
onSearchChange: (search) => {
|
|
1220
1430
|
list.setFilterText(search);
|
|
1221
1431
|
inputProps.onSearchChange?.(search);
|
|
1222
1432
|
}
|
|
1433
|
+
} : {
|
|
1434
|
+
items: itemsProp ?? [],
|
|
1435
|
+
isLoading,
|
|
1436
|
+
hasNextPage,
|
|
1437
|
+
fetchNextPage,
|
|
1438
|
+
isFetchingNextPage,
|
|
1439
|
+
isClientSearchDisabled
|
|
1223
1440
|
}
|
|
1224
1441
|
};
|
|
1225
1442
|
const ui = UIConfig.useConfig();
|
|
1226
1443
|
const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
|
|
1227
|
-
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.
|
|
1444
|
+
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
1228
1445
|
const rootRef = useRef(null);
|
|
1229
1446
|
const { renderRealInput, replayStaticInputChange, replayStaticInputPress } = useStaticInputHandoff({
|
|
1230
1447
|
inputRef: rootRef,
|
|
@@ -1235,10 +1452,11 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1235
1452
|
const currentValue = props.value;
|
|
1236
1453
|
if (!renderInput && props.selectionMode !== "multiple" && !!props.showSelectionContent && currentValue != null) setRenderInput(true);
|
|
1237
1454
|
if (!renderInput && !!props.customTrigger) setRenderInput(true);
|
|
1238
|
-
const mode = props.selectionMode ??
|
|
1455
|
+
const mode = props.selectionMode ?? "single";
|
|
1239
1456
|
const isDisabled = !!(isFormControlDisabled || props.isDisabled);
|
|
1240
1457
|
const collapseAfter = props.collapseAfter ?? ui.select.collapseAfter;
|
|
1241
1458
|
const selectedTagsType = props.selectedTagsType ?? ui.select.selectedTagsType;
|
|
1459
|
+
const onMultipleChange = props.onChange;
|
|
1242
1460
|
const staticSelection = useMemo(() => renderInput ? null : getStaticSelectValue({
|
|
1243
1461
|
items: props.items,
|
|
1244
1462
|
value: currentValue,
|
|
@@ -1248,10 +1466,15 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1248
1466
|
showSelectionContent: props.showSelectionContent,
|
|
1249
1467
|
isDisabled,
|
|
1250
1468
|
collapseAfter,
|
|
1251
|
-
selectedTagsType
|
|
1469
|
+
selectedTagsType,
|
|
1470
|
+
onRemove: (id) => {
|
|
1471
|
+
if (isDisabled || !Array.isArray(currentValue)) return;
|
|
1472
|
+
onMultipleChange?.(currentValue.filter((value) => value !== id));
|
|
1473
|
+
}
|
|
1252
1474
|
}), [
|
|
1253
1475
|
renderInput,
|
|
1254
1476
|
props.items,
|
|
1477
|
+
onMultipleChange,
|
|
1255
1478
|
currentValue,
|
|
1256
1479
|
mode,
|
|
1257
1480
|
props.initialSelection,
|
|
@@ -1262,7 +1485,7 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1262
1485
|
selectedTagsType
|
|
1263
1486
|
]);
|
|
1264
1487
|
if (!renderInput && staticSelection) {
|
|
1265
|
-
const as = resolveInputLayout(props.layout,
|
|
1488
|
+
const as = resolveInputLayout(props.layout, ui.input.layout);
|
|
1266
1489
|
const size = props.size ?? ui.input.size;
|
|
1267
1490
|
const isMultiple = mode === "multiple";
|
|
1268
1491
|
const { selectedItem, displayValue, isEmpty } = staticSelection;
|
|
@@ -1283,7 +1506,7 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1283
1506
|
dataIsRequired: props.isRequired,
|
|
1284
1507
|
dataIsDisabled: isDisabled,
|
|
1285
1508
|
dataDisabled: isDisabled,
|
|
1286
|
-
dataInvalid: !!props.error,
|
|
1509
|
+
dataInvalid: props.isInvalid || !!props.error,
|
|
1287
1510
|
dataHasSelection: !isEmpty,
|
|
1288
1511
|
dataHasSearch: false
|
|
1289
1512
|
};
|
|
@@ -1298,8 +1521,8 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1298
1521
|
...props,
|
|
1299
1522
|
isDisabled,
|
|
1300
1523
|
isLoading: false,
|
|
1301
|
-
className: clsx("group w-full", props.
|
|
1302
|
-
inputClassName:
|
|
1524
|
+
className: clsx("group w-full", props.className),
|
|
1525
|
+
inputClassName: props.inputClassName,
|
|
1303
1526
|
contentWrapperClassName: selectInputTagsContentWrapperCva({ isSearchable }),
|
|
1304
1527
|
contentGroup: "select",
|
|
1305
1528
|
contentClassName: "pr-2!",
|
|
@@ -1325,9 +1548,10 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1325
1548
|
"aria-expanded": false,
|
|
1326
1549
|
value: inputValue,
|
|
1327
1550
|
placeholder: shouldRenderPlaceholderAfterValue ? props.placeholder : placeholder ?? void 0,
|
|
1328
|
-
className:
|
|
1551
|
+
className: "min-w-0 w-full flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:text-inherit",
|
|
1329
1552
|
onChange: (event) => replayStaticInputChange(event.target.value),
|
|
1330
1553
|
...dataAttributeProps,
|
|
1554
|
+
"aria-invalid": dataAttributes.dataInvalid || void 0,
|
|
1331
1555
|
"data-rac": true
|
|
1332
1556
|
}) : /* @__PURE__ */ jsx("button", {
|
|
1333
1557
|
type: "button",
|
|
@@ -1347,8 +1571,45 @@ function SelectInner({ renderStaticInput, isFormControlDisabled, list, ...inputP
|
|
|
1347
1571
|
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(props.ref, rootRef)
|
|
1348
1572
|
});
|
|
1349
1573
|
}
|
|
1350
|
-
function
|
|
1351
|
-
|
|
1574
|
+
function ControlledSelect({ renderStaticInput, ...props }) {
|
|
1575
|
+
const { field, ref, ...innerProps } = props;
|
|
1576
|
+
const controlWithOptions = field.form;
|
|
1577
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
1578
|
+
control: field.form,
|
|
1579
|
+
name: field.name,
|
|
1580
|
+
onValueChange: field.onValueChange,
|
|
1581
|
+
onBlur: field.onBlur,
|
|
1582
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(SelectInner, {
|
|
1583
|
+
...innerProps,
|
|
1584
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, field.ref),
|
|
1585
|
+
value: field.value ?? (props.selectionMode === "multiple" ? [] : null),
|
|
1586
|
+
onChange: (value) => {
|
|
1587
|
+
field.onChange(value);
|
|
1588
|
+
field.onValueCommit();
|
|
1589
|
+
},
|
|
1590
|
+
onBlur: field.onBlur,
|
|
1591
|
+
isDirty,
|
|
1592
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
1593
|
+
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
1594
|
+
error: props.error ?? error?.message,
|
|
1595
|
+
renderStaticInput
|
|
1596
|
+
})
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1599
|
+
function SelectComponent(props) {
|
|
1600
|
+
return props.field ? /* @__PURE__ */ jsx(ControlledSelect, { ...props }) : /* @__PURE__ */ jsx(SelectInner, { ...props });
|
|
1352
1601
|
}
|
|
1602
|
+
/**
|
|
1603
|
+
* Single or multiple selection from static `items` or an async `list`.
|
|
1604
|
+
*
|
|
1605
|
+
* @example
|
|
1606
|
+
* <Select label="Status" items={[{ id: "open", label: "Open" }]} value={status} onChange={setStatus} />
|
|
1607
|
+
* @example
|
|
1608
|
+
* <Select label="Tags" selectionMode="multiple" items={tags} field={{ form, name: "tagIds" }} />
|
|
1609
|
+
* @example
|
|
1610
|
+
* const owners = useAsyncList({ load });
|
|
1611
|
+
* <Select label="Owner" list={owners} initialSelection={savedOwner} field={{ form, name: "ownerId" }} />
|
|
1612
|
+
*/
|
|
1613
|
+
const Select = memo(SelectComponent);
|
|
1353
1614
|
//#endregion
|
|
1354
|
-
export {
|
|
1615
|
+
export { SelectContext as a, useKeyInteractions as i, createKeyInteractionsHandler as n, LoadingItemId as o, getKeyInteractionAction as r, SelectAllItemId as s, Select as t };
|