@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,24 +1,20 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
2
|
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
-
import { n as $f2ff30fde7b014be$export$3ddf2d174ce01153 } from "./Dialog-
|
|
4
|
-
import { n as $8b8d26808cb8cb53$export$8948f78d83984c69, t as $8b8d26808cb8cb53$export$2b77a92f1a5ad772 } from "./Modal-
|
|
3
|
+
import { n as $f2ff30fde7b014be$export$3ddf2d174ce01153, t as $f2ff30fde7b014be$export$2e1e1122cf0cba88 } from "./Dialog-Bpwr1nuy.js";
|
|
4
|
+
import { n as $8b8d26808cb8cb53$export$8948f78d83984c69, t as $8b8d26808cb8cb53$export$2b77a92f1a5ad772 } from "./Modal-xT-Wz5GH.js";
|
|
5
|
+
import "./i18n-DaIHnR2n.js";
|
|
5
6
|
import { IconButton } from "./components/icon-button.js";
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
7
|
+
import { i as dialogOverlayDefinition, n as dialogMainDefinition, t as dialogContentDefinition } from "./dialog.cva-BjVggO5l.js";
|
|
8
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { X } from "lucide-react";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
//#region src/components/overlays/Dialog/Dialog.tsx
|
|
12
|
-
const Dialog = ({ isOpen, portalContainerRef,
|
|
12
|
+
const Dialog = ({ isOpen, portalContainerRef, onOpenChange, trigger, label, aside, children, className, closeIconClassName, overlayClassName, showCloseIcon, isDismissable = true, isKeyboardDismissable, shouldCloseOnInteractOutside, role, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy }) => {
|
|
13
13
|
const { t } = useTranslation("ui");
|
|
14
14
|
const dialogMainCva = UIOverrides.useCva("dialog.mainCva", dialogMainDefinition);
|
|
15
15
|
const dialogContentCva = UIOverrides.useCva("dialog.contentCva", dialogContentDefinition);
|
|
16
16
|
const dialogOverlayCva = UIOverrides.useCva("dialog.overlayCva", dialogOverlayDefinition);
|
|
17
|
-
const
|
|
18
|
-
onOpenChange?.(open);
|
|
19
|
-
if (!open) onClose?.();
|
|
20
|
-
};
|
|
21
|
-
return /* @__PURE__ */ jsx($8b8d26808cb8cb53$export$8948f78d83984c69, {
|
|
17
|
+
const overlay = /* @__PURE__ */ jsx($8b8d26808cb8cb53$export$8948f78d83984c69, {
|
|
22
18
|
UNSTABLE_portalContainer: portalContainerRef?.current,
|
|
23
19
|
className: dialogOverlayCva({
|
|
24
20
|
aside,
|
|
@@ -26,7 +22,7 @@ const Dialog = ({ isOpen, portalContainerRef, onClose, onOpenChange, aside, chil
|
|
|
26
22
|
}),
|
|
27
23
|
isDismissable,
|
|
28
24
|
isKeyboardDismissDisabled: !(isKeyboardDismissable ?? isDismissable),
|
|
29
|
-
isOpen,
|
|
25
|
+
isOpen: trigger ? void 0 : isOpen,
|
|
30
26
|
shouldCloseOnInteractOutside: () => {
|
|
31
27
|
if (shouldCloseOnInteractOutside) {
|
|
32
28
|
if (portalContainerRef?.current) return false;
|
|
@@ -34,19 +30,21 @@ const Dialog = ({ isOpen, portalContainerRef, onClose, onOpenChange, aside, chil
|
|
|
34
30
|
}
|
|
35
31
|
return !portalContainerRef?.current;
|
|
36
32
|
},
|
|
37
|
-
onOpenChange:
|
|
33
|
+
onOpenChange: trigger ? void 0 : onOpenChange,
|
|
38
34
|
children: /* @__PURE__ */ jsx($8b8d26808cb8cb53$export$2b77a92f1a5ad772, {
|
|
39
35
|
className: dialogMainCva({ aside }),
|
|
40
|
-
children: /* @__PURE__ */
|
|
41
|
-
|
|
36
|
+
children: /* @__PURE__ */ jsx($f2ff30fde7b014be$export$3ddf2d174ce01153, {
|
|
37
|
+
role,
|
|
38
|
+
"aria-label": label,
|
|
42
39
|
"aria-labelledby": ariaLabelledBy,
|
|
40
|
+
"aria-describedby": ariaDescribedBy,
|
|
43
41
|
className: dialogContentCva({
|
|
44
42
|
aside,
|
|
45
|
-
className
|
|
43
|
+
className
|
|
46
44
|
}),
|
|
47
|
-
children: [showCloseIcon && /* @__PURE__ */ jsx(IconButton, {
|
|
45
|
+
children: ({ close }) => /* @__PURE__ */ jsxs(Fragment, { children: [showCloseIcon && /* @__PURE__ */ jsx(IconButton, {
|
|
48
46
|
color: "secondary",
|
|
49
|
-
onPress:
|
|
47
|
+
onPress: close,
|
|
50
48
|
icon: X,
|
|
51
49
|
className: clsx("absolute top-4 right-4 size-4 rounded-xs opacity-70 hover:opacity-100", closeIconClassName),
|
|
52
50
|
label: t(($) => $.ui.modal.closeBtn),
|
|
@@ -54,10 +52,16 @@ const Dialog = ({ isOpen, portalContainerRef, onClose, onOpenChange, aside, chil
|
|
|
54
52
|
width: "hug",
|
|
55
53
|
disableTooltip: true,
|
|
56
54
|
size: "none"
|
|
57
|
-
}), children]
|
|
55
|
+
}), typeof children === "function" ? children(close) : children] })
|
|
58
56
|
})
|
|
59
57
|
})
|
|
60
58
|
});
|
|
59
|
+
if (trigger) return /* @__PURE__ */ jsxs($f2ff30fde7b014be$export$2e1e1122cf0cba88, {
|
|
60
|
+
isOpen,
|
|
61
|
+
onOpenChange,
|
|
62
|
+
children: [trigger, overlay]
|
|
63
|
+
});
|
|
64
|
+
return overlay;
|
|
61
65
|
};
|
|
62
66
|
//#endregion
|
|
63
67
|
export { Dialog as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$c62b8e45d58ddad9, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a } from "./utils-
|
|
2
|
-
import { t as $7705c033048f6da7$export$24d547caef80ccd1 } from "./Button-
|
|
1
|
+
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$c62b8e45d58ddad9, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a } from "./utils-Q5Oc6oX2.js";
|
|
2
|
+
import { t as $7705c033048f6da7$export$24d547caef80ccd1 } from "./Button-DF6sbTuF.js";
|
|
3
3
|
import $ahdqC$react, { createContext, forwardRef, useContext } from "react";
|
|
4
4
|
import { mergeProps } from "react-aria/mergeProps";
|
|
5
5
|
import { mergeRefs } from "react-aria/mergeRefs";
|
|
@@ -9,7 +9,7 @@ import { useId as useId$1 } from "react-aria/useId";
|
|
|
9
9
|
import { useDisclosure } from "react-aria/useDisclosure";
|
|
10
10
|
import { useDisclosureGroupState } from "react-stately/useDisclosureGroupState";
|
|
11
11
|
import { useDisclosureState } from "react-stately/useDisclosureState";
|
|
12
|
-
//#region ../../node_modules/.bun/react-aria-components@1.22.1+
|
|
12
|
+
//#region ../../node_modules/.bun/react-aria-components@1.22.1+6f4b9a1cfb20c0ae/node_modules/react-aria-components/dist/private/Disclosure.mjs
|
|
13
13
|
const $a3e16eab0ea4036c$export$1d40e3e0cc4d5de = /*#__PURE__*/ createContext(null);
|
|
14
14
|
const $a3e16eab0ea4036c$export$944aceb4f8c89f10 = /*#__PURE__*/ forwardRef(function DisclosureGroup(props, ref) {
|
|
15
15
|
let state = useDisclosureGroupState(props);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { n as Removed } from "./hints-B09_WDhL.js";
|
|
2
|
+
import { ReactElement, ReactNode, RefObject } from "react";
|
|
3
|
+
//#region src/components/overlays/Drawer/Drawer.d.ts
|
|
4
|
+
interface DrawerProps {
|
|
5
|
+
/** Accessible name. Not rendered: the panel has no header, so render the visible heading in `children`. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Controlled open state. Optional only when `trigger` owns the state; without either the drawer never opens. */
|
|
8
|
+
isOpen?: boolean;
|
|
9
|
+
/** Called with the next open state: `false` on Escape, outside press or `close()`. */
|
|
10
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
11
|
+
/** A pressable element (`Button`, `IconButton`) that opens the drawer on press. */
|
|
12
|
+
trigger?: ReactElement;
|
|
13
|
+
/** Drawer content, or a function that receives `close`. The panel has no width or padding of its own. */
|
|
14
|
+
children: ReactNode | ((close: () => void) => ReactNode);
|
|
15
|
+
/** Whether pressing outside closes the drawer. Defaults to true, like `Dialog` and `BottomSheet`. */
|
|
16
|
+
isDismissable?: boolean;
|
|
17
|
+
/** Classes for the sliding panel, the visible surface docked to the right edge (width, background, border). */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Classes for the element inside the panel that holds `children` (width, padding, scrolling). */
|
|
20
|
+
contentClassName?: string;
|
|
21
|
+
/** Classes for the full-screen backdrop. */
|
|
22
|
+
overlayClassName?: string;
|
|
23
|
+
/** Return false to ignore an outside press. */
|
|
24
|
+
shouldCloseOnInteractOutside?: () => boolean;
|
|
25
|
+
/** Element to portal into instead of `document.body`. */
|
|
26
|
+
portalContainerRef?: RefObject<HTMLElement>;
|
|
27
|
+
/** @deprecated Use `isOpen`. */
|
|
28
|
+
open?: Removed<"Use `isOpen`">;
|
|
29
|
+
/** @deprecated Use `onOpenChange`. */
|
|
30
|
+
onClose?: Removed<"Use `onOpenChange`; it is called with `false` when the drawer closes">;
|
|
31
|
+
/** @deprecated Use `contentClassName`. */
|
|
32
|
+
dialogClassName?: Removed<"Use `contentClassName` for the element that holds `children`, `className` for the panel">;
|
|
33
|
+
/** @deprecated Use `label`. */
|
|
34
|
+
"aria-label"?: Removed<"Use `label`">;
|
|
35
|
+
/** @deprecated Render the heading in `children`. */
|
|
36
|
+
title?: Removed<"Drawer has no heading prop: render the heading in `children` and name the drawer with `label`">;
|
|
37
|
+
/** @deprecated Render the heading in `children`. */
|
|
38
|
+
heading?: Removed<"Drawer has no heading prop: render the heading in `children` and name the drawer with `label`">;
|
|
39
|
+
}
|
|
40
|
+
declare const Drawer: ({ label, isOpen, portalContainerRef, onOpenChange, trigger, children, isDismissable, overlayClassName, contentClassName, className, shouldCloseOnInteractOutside }: DrawerProps) => import("react").JSX.Element;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { DrawerProps as n, Drawer as t };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { St as MenuPopoverWrapperVariantProps, bt as MenuItemVariantProps, xt as MenuPopoverVariantProps, yt as DropdownMenuCvaVariantProps } from "./link.cva-ZhpQz3P0.js";
|
|
2
|
+
import { t as BottomSheetProps } from "./BottomSheet-CtcPZG82.js";
|
|
3
|
+
import { KeyboardEvent, MouseEvent, ReactElement } from "react";
|
|
4
|
+
import { Key, MenuItemProps } from "react-aria-components";
|
|
5
|
+
import { Placement } from "react-aria";
|
|
6
|
+
//#region src/components/DropdownMenu/dropdownMenu.types.d.ts
|
|
7
|
+
/** One entry of a `DropdownMenu`. An entry with `children` opens a submenu instead of running an action. */
|
|
8
|
+
interface DropdownMenuItem extends Omit<MenuItemProps, "aria-label" | "textValue" | "children">, Omit<MenuItemVariantProps, "isMobile">, Omit<DropdownMenuCvaVariantProps, "isMobile">, MenuPopoverVariantProps, MenuPopoverWrapperVariantProps {
|
|
9
|
+
/** Passed to the menu's `onAction`; give every entry one when you use it. */
|
|
10
|
+
id?: Key;
|
|
11
|
+
/** The entry's text, accessible name and typeahead text. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Content shown in place of `label`. */
|
|
14
|
+
content?: string | ReactElement;
|
|
15
|
+
/** `"error"` for destructive actions such as Delete. */
|
|
16
|
+
color?: MenuItemVariantProps["color"];
|
|
17
|
+
/** Runs when this entry is chosen, before the menu's `onAction`. */
|
|
18
|
+
onAction?: () => void;
|
|
19
|
+
/** The entries of a submenu opened from this entry. */
|
|
20
|
+
children?: DropdownMenuItem[];
|
|
21
|
+
}
|
|
22
|
+
type MenuBottomSheetProps = Partial<Omit<BottomSheetProps, "children" | "isOpen" | "onOpenChange" | "trigger">>;
|
|
23
|
+
interface DropdownMenuProps {
|
|
24
|
+
/** The pressable element that opens the menu, such as an `IconButton`. */
|
|
25
|
+
trigger: ReactElement;
|
|
26
|
+
/** The entries, as data rather than JSX children. */
|
|
27
|
+
items: DropdownMenuItem[];
|
|
28
|
+
/** Position of the desktop popover relative to the trigger, such as `"bottom end"`. */
|
|
29
|
+
placement?: Placement;
|
|
30
|
+
/**
|
|
31
|
+
* Runs when an entry without `children` is chosen, after the entry's own `onAction`, with the entry's `id` and the
|
|
32
|
+
* click or key event that chose it (null when there was none).
|
|
33
|
+
*/
|
|
34
|
+
onAction?: (key: Key, event: MouseEvent | KeyboardEvent | null) => void;
|
|
35
|
+
/** Props for the bottom sheet that holds the menu below the `md` breakpoint. */
|
|
36
|
+
bottomSheetProps?: MenuBottomSheetProps;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/DropdownMenu/DropdownMenu.d.ts
|
|
40
|
+
/**
|
|
41
|
+
* A menu of actions opened from `trigger`: a popover on desktop, a bottom sheet below the `md` breakpoint.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* <DropdownMenu
|
|
45
|
+
* trigger={<IconButton icon={Ellipsis} label="More actions" />}
|
|
46
|
+
* items={[{ id: "edit", label: "Edit", onAction: onEdit }, { id: "delete", label: "Delete", color: "error", onAction: onDelete }]}
|
|
47
|
+
* />
|
|
48
|
+
*/
|
|
49
|
+
declare const DropdownMenu: (props: DropdownMenuProps) => import("react").JSX.Element;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { DropdownMenuItem as n, DropdownMenuProps as r, DropdownMenu as t };
|
|
@@ -1,19 +1,19 @@
|
|
|
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 { s as $49319ee1285aa241$export$d9b273488cd8ce6f } from "./Dialog-
|
|
5
|
-
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-
|
|
6
|
-
import { n as menuItemDefinition, t as dropdownMenuDefinition } from "./dropdownMenu.cva-
|
|
7
|
-
import {
|
|
3
|
+
import { t as IconSlot } from "./IconSlot-TAWTJ6iK.js";
|
|
4
|
+
import { s as $49319ee1285aa241$export$d9b273488cd8ce6f } from "./Dialog-Bpwr1nuy.js";
|
|
5
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-DF6sbTuF.js";
|
|
6
|
+
import { n as menuItemDefinition, t as dropdownMenuDefinition } from "./dropdownMenu.cva-BopsvbOy.js";
|
|
7
|
+
import { n as MenuItem, r as getMenuItemKey, t as DropdownMenuDesktop } from "./DropdownMenuDesktop-BM7659Sk.js";
|
|
8
8
|
import { BottomSheet } from "./components/bottom-sheet.js";
|
|
9
|
-
import { t as useBreakpoint } from "./useBreakpoint-
|
|
10
|
-
import { ArrowLeft } from "lucide-react";
|
|
9
|
+
import { t as useBreakpoint } from "./useBreakpoint-DtYSRweq.js";
|
|
11
10
|
import { c } from "react/compiler-runtime";
|
|
12
11
|
import { useRef, useState } from "react";
|
|
13
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { ArrowLeft } from "lucide-react";
|
|
14
14
|
//#region src/components/DropdownMenu/DropdownMenuMobile.tsx
|
|
15
15
|
const DropdownMenuMobile = (t0) => {
|
|
16
|
-
const $ = c(
|
|
16
|
+
const $ = c(24);
|
|
17
17
|
let bottomSheetProps;
|
|
18
18
|
let items;
|
|
19
19
|
let onAction;
|
|
@@ -85,9 +85,10 @@ const DropdownMenuMobile = (t0) => {
|
|
|
85
85
|
$[10] = t4;
|
|
86
86
|
} else t4 = $[10];
|
|
87
87
|
const onBack = t4;
|
|
88
|
-
|
|
88
|
+
const t5 = bottomSheetProps?.label ?? "";
|
|
89
|
+
let t6;
|
|
89
90
|
if ($[11] !== activeItem || $[12] !== handleAction || $[13] !== items || $[14] !== menuCva || $[15] !== menuItemCva || $[16] !== props) {
|
|
90
|
-
|
|
91
|
+
t6 = () => /* @__PURE__ */ jsxs(Fragment$1, { children: [activeItem && /* @__PURE__ */ jsxs($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
91
92
|
className: clsx(menuItemCva({
|
|
92
93
|
...props,
|
|
93
94
|
isMobile: true
|
|
@@ -113,7 +114,7 @@ const DropdownMenuMobile = (t0) => {
|
|
|
113
114
|
...item_0,
|
|
114
115
|
className: clsx("min-h-11", item_0.className),
|
|
115
116
|
onAction: () => handleAction(item_0)
|
|
116
|
-
}, index))
|
|
117
|
+
}, getMenuItemKey(item_0, index)))
|
|
117
118
|
})
|
|
118
119
|
})] });
|
|
119
120
|
$[11] = activeItem;
|
|
@@ -122,30 +123,41 @@ const DropdownMenuMobile = (t0) => {
|
|
|
122
123
|
$[14] = menuCva;
|
|
123
124
|
$[15] = menuItemCva;
|
|
124
125
|
$[16] = props;
|
|
125
|
-
$[17] =
|
|
126
|
-
} else
|
|
127
|
-
let
|
|
128
|
-
if ($[18] !== bottomSheetProps || $[19] !== isOpen || $[20] !== t5 || $[21] !== trigger) {
|
|
129
|
-
|
|
126
|
+
$[17] = t6;
|
|
127
|
+
} else t6 = $[17];
|
|
128
|
+
let t7;
|
|
129
|
+
if ($[18] !== bottomSheetProps || $[19] !== isOpen || $[20] !== t5 || $[21] !== t6 || $[22] !== trigger) {
|
|
130
|
+
t7 = /* @__PURE__ */ jsx(BottomSheet, {
|
|
130
131
|
isDismissable: true,
|
|
131
132
|
hideHeader: true,
|
|
132
133
|
height: "auto",
|
|
133
134
|
...bottomSheetProps,
|
|
135
|
+
label: t5,
|
|
134
136
|
isOpen,
|
|
135
137
|
onOpenChange: setIsOpen,
|
|
136
138
|
trigger,
|
|
137
|
-
children:
|
|
139
|
+
children: t6
|
|
138
140
|
});
|
|
139
141
|
$[18] = bottomSheetProps;
|
|
140
142
|
$[19] = isOpen;
|
|
141
143
|
$[20] = t5;
|
|
142
|
-
$[21] =
|
|
143
|
-
$[22] =
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
$[21] = t6;
|
|
145
|
+
$[22] = trigger;
|
|
146
|
+
$[23] = t7;
|
|
147
|
+
} else t7 = $[23];
|
|
148
|
+
return t7;
|
|
146
149
|
};
|
|
147
150
|
//#endregion
|
|
148
151
|
//#region src/components/DropdownMenu/DropdownMenu.tsx
|
|
152
|
+
/**
|
|
153
|
+
* A menu of actions opened from `trigger`: a popover on desktop, a bottom sheet below the `md` breakpoint.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* <DropdownMenu
|
|
157
|
+
* trigger={<IconButton icon={Ellipsis} label="More actions" />}
|
|
158
|
+
* items={[{ id: "edit", label: "Edit", onAction: onEdit }, { id: "delete", label: "Delete", color: "error", onAction: onDelete }]}
|
|
159
|
+
* />
|
|
160
|
+
*/
|
|
149
161
|
const DropdownMenu = (props) => {
|
|
150
162
|
const $ = c(4);
|
|
151
163
|
if (useBreakpoint("md")) {
|
|
@@ -1,22 +1,28 @@
|
|
|
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 { a as $49319ee1285aa241$export$27d2ad3c5815583e, c as $49319ee1285aa241$export$ecabc99eeffab7ca, l as $542a13ca2fa5b484$export$5b6b19405a83ff9d, o as $49319ee1285aa241$export$2ce376c2cc3355c8, s as $49319ee1285aa241$export$d9b273488cd8ce6f } from "./Dialog-
|
|
5
|
-
import { i as menuPopoverWrapperDefinition, n as menuItemDefinition, r as menuPopoverDefinition, t as dropdownMenuDefinition } from "./dropdownMenu.cva-
|
|
3
|
+
import { t as IconSlot } from "./IconSlot-TAWTJ6iK.js";
|
|
4
|
+
import { a as $49319ee1285aa241$export$27d2ad3c5815583e, c as $49319ee1285aa241$export$ecabc99eeffab7ca, l as $542a13ca2fa5b484$export$5b6b19405a83ff9d, o as $49319ee1285aa241$export$2ce376c2cc3355c8, s as $49319ee1285aa241$export$d9b273488cd8ce6f } from "./Dialog-Bpwr1nuy.js";
|
|
5
|
+
import { i as menuPopoverWrapperDefinition, n as menuItemDefinition, r as menuPopoverDefinition, t as dropdownMenuDefinition } from "./dropdownMenu.cva-BopsvbOy.js";
|
|
6
6
|
import { t as popoverAnimationClassName } from "./popoverAnimation-DEZSvKP8.js";
|
|
7
|
-
import { ArrowRight } from "lucide-react";
|
|
8
7
|
import { c } from "react/compiler-runtime";
|
|
9
8
|
import { useRef } from "react";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { ArrowRight } from "lucide-react";
|
|
11
11
|
//#region src/components/DropdownMenu/MenuItem.tsx
|
|
12
|
+
/**
|
|
13
|
+
* React key of an entry. React Aria rejects a new `id` on an existing collection node, so an entry with an `id` is
|
|
14
|
+
* keyed by it: opening a mobile submenu replaces the entries in place, and index keys would reuse the parent's nodes.
|
|
15
|
+
*/
|
|
16
|
+
const getMenuItemKey = (item, index) => item.id == null ? `index:${index}` : `id:${String(item.id)}`;
|
|
12
17
|
const MenuItem = (t0) => {
|
|
13
18
|
const $ = c(9);
|
|
14
|
-
const { label, content, children, className, ...item } = t0;
|
|
19
|
+
const { label, content, children, className, color, ...item } = t0;
|
|
15
20
|
const hasSubmenu = !!children && children?.length > 0;
|
|
16
21
|
const menuItemCva = UIOverrides.useCva("dropdownMenu.itemCva", menuItemDefinition);
|
|
17
22
|
const T0 = $49319ee1285aa241$export$2ce376c2cc3355c8;
|
|
18
23
|
const t1 = clsx(menuItemCva({
|
|
19
24
|
...item,
|
|
25
|
+
color,
|
|
20
26
|
isMobile: false
|
|
21
27
|
}), className);
|
|
22
28
|
const t2 = content ?? label;
|
|
@@ -95,11 +101,11 @@ const MenuPopover = (t0) => {
|
|
|
95
101
|
if ($[6] !== items || $[7] !== onAction) {
|
|
96
102
|
let t8;
|
|
97
103
|
if ($[9] !== onAction) {
|
|
98
|
-
t8 = (item, index) => !item.children || item.children.length === 0 ? /* @__PURE__ */ jsx(MenuItem, { ...item }, index) : /* @__PURE__ */ jsxs($49319ee1285aa241$export$ecabc99eeffab7ca, { children: [/* @__PURE__ */ jsx(MenuItem, { ...item }), /* @__PURE__ */ jsx(MenuPopover, {
|
|
104
|
+
t8 = (item, index) => !item.children || item.children.length === 0 ? /* @__PURE__ */ jsx(MenuItem, { ...item }, getMenuItemKey(item, index)) : /* @__PURE__ */ jsxs($49319ee1285aa241$export$ecabc99eeffab7ca, { children: [/* @__PURE__ */ jsx(MenuItem, { ...item }), /* @__PURE__ */ jsx(MenuPopover, {
|
|
99
105
|
offset: 0,
|
|
100
106
|
onAction,
|
|
101
107
|
items: item.children
|
|
102
|
-
})] }, index);
|
|
108
|
+
})] }, getMenuItemKey(item, index));
|
|
103
109
|
$[9] = onAction;
|
|
104
110
|
$[10] = t8;
|
|
105
111
|
} else t8 = $[10];
|
|
@@ -202,4 +208,4 @@ const DropdownMenuDesktop = (t0) => {
|
|
|
202
208
|
return t2;
|
|
203
209
|
};
|
|
204
210
|
//#endregion
|
|
205
|
-
export {
|
|
211
|
+
export { MenuItem as n, getMenuItemKey as r, DropdownMenuDesktop as t };
|
|
@@ -1,64 +1,31 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as $070c0dd15dc89b58$export$3c6489d84dc98b6, t as $b325d7bd7e74496a$export$6fb4a10d2c950550 } from "./FileTrigger-
|
|
2
|
+
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
+
import { n as $070c0dd15dc89b58$export$3c6489d84dc98b6, t as $b325d7bd7e74496a$export$6fb4a10d2c950550 } from "./FileTrigger-tGSUFrb2.js";
|
|
4
4
|
import { t as Typography } from "./Typography-DCLnPa3P.js";
|
|
5
|
-
import
|
|
6
|
-
import { t as
|
|
5
|
+
import "./i18n-DaIHnR2n.js";
|
|
6
|
+
import { t as UIConfig } from "./uiConfig.context-NWmBJ2Hc.js";
|
|
7
|
+
import { t as Button } from "./Button-C1Jv1Plk.js";
|
|
7
8
|
import { IconButton } from "./components/icon-button.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import "./
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { n as FieldController } from "./form.binding-Brdjq2yr.js";
|
|
10
|
+
import { i as $a8ea2faf2ebe4d2f$re_export$useLabels, r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
11
|
+
import { t as useFieldAccessibility } from "./useFieldAccessibility-eZIMECmG.js";
|
|
12
|
+
import { t as FormField } from "./FormField-DOZ7eXjA.js";
|
|
13
|
+
import { a as inputSizeDefinition } from "./input.cva-mm1dnfKP.js";
|
|
14
|
+
import { t as FileUtils } from "./file.utils-X6tkeWaz.js";
|
|
15
|
+
import { r as fileInputDropZone, t as fileInputButton } from "./fileInputButton.cva-gbqRUf1g.js";
|
|
14
16
|
import { memo, useState } from "react";
|
|
15
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { Upload, X } from "lucide-react";
|
|
16
19
|
import { useTranslation } from "react-i18next";
|
|
17
20
|
//#region src/components/inputs/File/fileInput.types.ts
|
|
18
21
|
const inputButtonSizeMapping = {
|
|
19
|
-
|
|
22
|
+
sm: "sm",
|
|
20
23
|
default: "default"
|
|
21
24
|
};
|
|
22
25
|
//#endregion
|
|
23
|
-
//#region src/components/inputs/File/shared/fileInputButton.cva.ts
|
|
24
|
-
const fileInputButtonDefinition = UIOverrides.defineConfig({
|
|
25
|
-
base: ["flex w-full items-center justify-between gap-2"],
|
|
26
|
-
config: {
|
|
27
|
-
variants: { variant: {
|
|
28
|
-
default: [],
|
|
29
|
-
nested: []
|
|
30
|
-
} },
|
|
31
|
-
defaultVariants: { variant: "default" }
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const fileInputButtonBase = cva(fileInputButtonDefinition.base, fileInputButtonDefinition.config);
|
|
35
|
-
const fileInputButton = (props) => {
|
|
36
|
-
const { className, ...rest } = props;
|
|
37
|
-
return clsx(fileInputButtonBase(rest), className);
|
|
38
|
-
};
|
|
39
|
-
const fileInputDropZoneDefinition = UIOverrides.defineConfig({
|
|
40
|
-
base: [
|
|
41
|
-
"relative",
|
|
42
|
-
"min-w-0 flex-1",
|
|
43
|
-
"flex items-center",
|
|
44
|
-
"outline-none transition-[color,box-shadow]",
|
|
45
|
-
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
46
|
-
"data-[drop-target]:border-ring data-[drop-target]:ring-[3px] data-[drop-target]:ring-ring/50",
|
|
47
|
-
"group-invalid/input-upload:border-destructive group-invalid/input-upload:ring-destructive/20 dark:group-invalid/input-upload:ring-destructive/40"
|
|
48
|
-
],
|
|
49
|
-
config: {
|
|
50
|
-
variants: { variant: {
|
|
51
|
-
default: ["rounded-md border border-input border-solid bg-transparent shadow-xs dark:bg-input/30"],
|
|
52
|
-
nested: ["rounded-md border border-input border-solid bg-transparent shadow-xs dark:bg-input/30"]
|
|
53
|
-
} },
|
|
54
|
-
defaultVariants: { variant: "default" }
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
const fileInputDropZone = cva(fileInputDropZoneDefinition.base, fileInputDropZoneDefinition.config);
|
|
58
|
-
//#endregion
|
|
59
26
|
//#region src/components/inputs/File/shared/FileInputContent.tsx
|
|
60
27
|
const FileInputContent = (props) => {
|
|
61
|
-
const {
|
|
28
|
+
const { buttonPosition, isDisabled, error, placeholder, buttonText, size, ...rest } = props;
|
|
62
29
|
const { t } = useTranslation("ui");
|
|
63
30
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
64
31
|
return /* @__PURE__ */ jsx($b325d7bd7e74496a$export$6fb4a10d2c950550, {
|
|
@@ -69,19 +36,19 @@ const FileInputContent = (props) => {
|
|
|
69
36
|
"data-is-disabled": isDisabled || void 0,
|
|
70
37
|
"data-invalid": !!error || void 0,
|
|
71
38
|
className: fileInputButton({
|
|
72
|
-
|
|
39
|
+
buttonPosition,
|
|
73
40
|
className: "group/input-upload"
|
|
74
41
|
}),
|
|
75
42
|
children: [/* @__PURE__ */ jsxs($070c0dd15dc89b58$export$3c6489d84dc98b6, {
|
|
76
43
|
...rest,
|
|
77
44
|
isDisabled,
|
|
78
|
-
className: clsx(fileInputDropZone({
|
|
45
|
+
className: clsx(fileInputDropZone({ buttonPosition }), inputSizeCva({ size })),
|
|
79
46
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
80
47
|
size: "large",
|
|
81
48
|
as: "span",
|
|
82
49
|
className: "min-w-0 flex-fill select-none truncate text-muted-foreground",
|
|
83
50
|
children: placeholder ?? t(($) => $.ui.fileUpload.emptyText)
|
|
84
|
-
}),
|
|
51
|
+
}), buttonPosition === "inside" && /* @__PURE__ */ jsx(Button, {
|
|
85
52
|
size: "none",
|
|
86
53
|
isDisabled,
|
|
87
54
|
icon: Upload,
|
|
@@ -89,7 +56,7 @@ const FileInputContent = (props) => {
|
|
|
89
56
|
width: "hug",
|
|
90
57
|
children: buttonText ?? t(($) => $.ui.fileUpload.upload)
|
|
91
58
|
})]
|
|
92
|
-
}),
|
|
59
|
+
}), buttonPosition !== "inside" && /* @__PURE__ */ jsx(Button, {
|
|
93
60
|
size: inputButtonSizeMapping[size ?? "default"],
|
|
94
61
|
width: "hug",
|
|
95
62
|
isDisabled,
|
|
@@ -103,6 +70,7 @@ const FileInputContent = (props) => {
|
|
|
103
70
|
//#region src/components/inputs/File/shared/FileInputFilled.tsx
|
|
104
71
|
const FileInputFilled = ({ files, onRemove, isDisabled, size }) => {
|
|
105
72
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
73
|
+
const { t } = useTranslation("ui");
|
|
106
74
|
return /* @__PURE__ */ jsxs("div", {
|
|
107
75
|
className: clsx("flex items-center gap-2 rounded-md border border-input border-solid bg-transparent shadow-xs dark:bg-input/30", inputSizeCva({ size })),
|
|
108
76
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
@@ -111,7 +79,7 @@ const FileInputFilled = ({ files, onRemove, isDisabled, size }) => {
|
|
|
111
79
|
className: "flex-fill select-none truncate text-ellipsis text-foreground input-disabled:text-muted-foreground",
|
|
112
80
|
children: files.map((file) => file.name).join(", ")
|
|
113
81
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
114
|
-
label:
|
|
82
|
+
label: t(($) => $.ui.fileUpload.removeFiles),
|
|
115
83
|
color: "secondary",
|
|
116
84
|
icon: X,
|
|
117
85
|
isDisabled,
|
|
@@ -125,9 +93,8 @@ const FileInputFilled = ({ files, onRemove, isDisabled, size }) => {
|
|
|
125
93
|
};
|
|
126
94
|
//#endregion
|
|
127
95
|
//#region src/components/inputs/File/FileInput.tsx
|
|
128
|
-
const FileInputBase = ({ ref, label, tooltipText,
|
|
96
|
+
const FileInputBase = ({ ref, label, tooltipText, buttonPosition, helperText, isRequired, isDisabled, headerClassName, errorClassName, error, className, onChange, onBlur, onInvalidFileType, value, defaultValue, allowsMultiple = false, hideLabel, acceptedFileTypes, size, "aria-describedby": describedByProp, ...rest }) => {
|
|
129
97
|
const ui = UIConfig.useConfig();
|
|
130
|
-
const allowsMultiple = allowsMultipleProp ?? multiple ?? false;
|
|
131
98
|
const [internalFiles, setInternalFiles] = useState(() => {
|
|
132
99
|
if (value !== void 0) {
|
|
133
100
|
if (allowsMultiple) return value || [];
|
|
@@ -143,13 +110,19 @@ const FileInputBase = ({ ref, label, tooltipText, variant, helperText, isRequire
|
|
|
143
110
|
if (allowsMultiple) return value || [];
|
|
144
111
|
return value ? [value] : [];
|
|
145
112
|
})() : internalFiles;
|
|
113
|
+
const { describedBy, errorMessageId, helperTextId } = useFieldAccessibility({
|
|
114
|
+
describedBy: describedByProp,
|
|
115
|
+
error,
|
|
116
|
+
helperText
|
|
117
|
+
});
|
|
146
118
|
const formFieldProps = {
|
|
147
119
|
error,
|
|
120
|
+
errorMessageId,
|
|
148
121
|
label,
|
|
149
122
|
tooltipText,
|
|
150
123
|
helperText,
|
|
124
|
+
helperTextId,
|
|
151
125
|
isRequired,
|
|
152
|
-
isHeaderHidden,
|
|
153
126
|
hideLabel: hideLabel ?? ui.input.hideLabel,
|
|
154
127
|
isDisabled,
|
|
155
128
|
headerClassName,
|
|
@@ -164,13 +137,9 @@ const FileInputBase = ({ ref, label, tooltipText, variant, helperText, isRequire
|
|
|
164
137
|
const handleFileSelect = (inputFiles) => {
|
|
165
138
|
const acceptedFiles = inputFiles.filter((file) => FileUtils.isFileTypeAccepted(file, acceptedFileTypes));
|
|
166
139
|
const invalidFiles = inputFiles.filter((file) => !FileUtils.isFileTypeAccepted(file, acceptedFileTypes));
|
|
167
|
-
if (allowsMultiple)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
} else {
|
|
171
|
-
if (acceptedFiles.length > 0) updateFiles([acceptedFiles[0]]);
|
|
172
|
-
if (invalidFiles.length > 0) onInvalidFileType?.(invalidFiles[0].name);
|
|
173
|
-
}
|
|
140
|
+
if (allowsMultiple) updateFiles([...files, ...acceptedFiles]);
|
|
141
|
+
else if (acceptedFiles.length > 0) updateFiles([acceptedFiles[0]]);
|
|
142
|
+
if (invalidFiles.length > 0) onInvalidFileType?.(invalidFiles.map((file) => file.name));
|
|
174
143
|
};
|
|
175
144
|
const handleSelect = (inputFiles) => {
|
|
176
145
|
if (!inputFiles) return;
|
|
@@ -195,26 +164,52 @@ const FileInputBase = ({ ref, label, tooltipText, variant, helperText, isRequire
|
|
|
195
164
|
...formFieldProps,
|
|
196
165
|
labelProps,
|
|
197
166
|
className: clsx("group w-full", className),
|
|
198
|
-
children:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
167
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
168
|
+
role: "group",
|
|
169
|
+
"aria-label": label,
|
|
170
|
+
"aria-describedby": describedBy,
|
|
171
|
+
children: files.length > 0 ? /* @__PURE__ */ jsx(FileInputFilled, {
|
|
172
|
+
files,
|
|
173
|
+
onRemove: handleRemove,
|
|
174
|
+
isDisabled,
|
|
175
|
+
size
|
|
176
|
+
}) : /* @__PURE__ */ jsx(FileInputContent, {
|
|
177
|
+
...rest,
|
|
178
|
+
label,
|
|
179
|
+
error,
|
|
180
|
+
allowsMultiple,
|
|
181
|
+
acceptedFileTypes,
|
|
182
|
+
buttonPosition,
|
|
183
|
+
isDisabled,
|
|
184
|
+
onSelect: handleSelect,
|
|
185
|
+
onDrop: handleDrop,
|
|
186
|
+
size
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
const ControlledFileInput = (props) => {
|
|
192
|
+
const { field, ref, ...innerProps } = props;
|
|
193
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
194
|
+
control: field.form,
|
|
195
|
+
name: field.name,
|
|
196
|
+
onValueChange: field.onValueChange,
|
|
197
|
+
onBlur: field.onBlur,
|
|
198
|
+
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(FileInputBase, {
|
|
199
|
+
...innerProps,
|
|
200
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, field.ref),
|
|
201
|
+
onBlur: field.onBlur,
|
|
202
|
+
value: field.value ?? null,
|
|
203
|
+
onChange: ((value) => {
|
|
204
|
+
field.onChange(value);
|
|
205
|
+
field.onValueCommit();
|
|
206
|
+
}),
|
|
207
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
208
|
+
error: props.error ?? error?.message
|
|
214
209
|
})
|
|
215
210
|
});
|
|
216
211
|
};
|
|
217
|
-
const FileInputComponent = (props) => /* @__PURE__ */ jsx(FileInputBase, { ...props });
|
|
212
|
+
const FileInputComponent = (props) => props.field ? /* @__PURE__ */ jsx(ControlledFileInput, { ...props }) : /* @__PURE__ */ jsx(FileInputBase, { ...props });
|
|
218
213
|
const FileInput = memo(FileInputComponent);
|
|
219
214
|
//#endregion
|
|
220
|
-
export {
|
|
215
|
+
export { FileInput as t };
|