@povio/ui 5.0.0-rc.9 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +272 -58
- package/dist/{Accordion-BzwO4_ml.js → Accordion-ORBin0EZ.js} +13 -119
- package/dist/{Alert-DfiJbKH0.d.ts → Alert-24ruR0iF.d.ts} +3 -3
- package/dist/{AlertDialog-OWTbR4km.d.ts → AlertDialog-Co3gNMwE.d.ts} +3 -3
- package/dist/Autocomplete-BQ9ZQoJt.d.ts +23 -0
- package/dist/Autocomplete-DbALLWP0.js +145 -0
- package/dist/Autocomplete.bound-DCPZBYKR.js +28 -0
- package/dist/Autocomplete.bound-DCbFBXjJ.d.ts +9 -0
- package/dist/{Badge-CBNpj823.d.ts → Badge-DZLVacMd.d.ts} +2 -2
- package/dist/{BadgeButton-Ccgt3oGO.d.ts → BadgeButton-coK9Fzoc.d.ts} +2 -2
- package/dist/{BottomSheet-DbQuzfAB.d.ts → BottomSheet-BlcmdfAT.d.ts} +1 -1
- package/dist/{BottomSheet-BXLE3161.js → BottomSheet-CGipksM_.js} +12 -86
- package/dist/{BottomSheet.lazy-D9LCEo7s.d.ts → BottomSheet.lazy-CGjuurej.d.ts} +1 -1
- package/dist/{Breadcrumbs-CUV6CU8Q.d.ts → Breadcrumbs-DfREVuAC.d.ts} +1 -1
- package/dist/{Breadcrumbs-FF8hMfXd.js → Breadcrumbs-a1-q_he0.js} +20 -17
- package/dist/{Button-D6KlWSFL.js → Button-C1YB5dOw.js} +3 -3
- package/dist/Button-Cphxmj43.d.ts +13 -0
- package/dist/Button-dRFJundh.js +16 -0
- package/dist/ButtonBase-BCYFCbSV.js +87 -0
- package/dist/ButtonBase-CfSqmiom.d.ts +32 -0
- package/dist/{ButtonContent-c7lJayVQ.js → ButtonContent-Dztbuz3q.js} +5 -14
- package/dist/{Calendar-BTjajO6i.js → Calendar-B9jqOJB6.js} +29 -181
- package/dist/Calendar.lazy-4d7pbB4k.js +131 -0
- package/dist/{CheckContent-D7sZPmzx.js → CheckContent-BKLnTPZr.js} +2 -2
- package/dist/{Checkbox-DVTWaMKa.d.ts → Checkbox-D2VVq5Bi.d.ts} +9 -8
- package/dist/{Checkbox-CV1ILXXO.js → Checkbox-DYeofZzs.js} +21 -38
- package/dist/Checkbox.bound-DyQFIVCw.js +33 -0
- package/dist/Checkbox.bound-Hdvnrnwb.d.ts +9 -0
- package/dist/CheckboxCheckmark-DYhxLfZN.js +25 -0
- package/dist/CheckboxGroup-CK_tTvvI.js +141 -0
- package/dist/CheckboxGroup-CTkBMnBN.d.ts +30 -0
- package/dist/CheckboxGroup.bound-C6e91DCT.d.ts +9 -0
- package/dist/CheckboxGroup.bound-DyCp83EI.js +32 -0
- package/dist/ComboBox-ChsdI0lt.js +212 -0
- package/dist/{DatePicker-8xSs_jNd.d.ts → DatePicker-1VbVBI4l.d.ts} +21 -10
- package/dist/{DatePicker-DOLL7mkc.js → DatePicker-CJj3Gp_S.js} +47 -54
- package/dist/DatePicker.bound-BWPOirPV.js +36 -0
- package/dist/DatePicker.bound-ZvJi_V8D.d.ts +9 -0
- package/dist/{DatePickerInput-D81ZJ3fT.d.ts → DatePickerInput-B8UhMVP6.d.ts} +3 -3
- package/dist/{DatePickerInput-BLBcySA2.js → DatePickerInput-C5-kkdpq.js} +66 -301
- package/dist/{DateRangePicker-Bfq-yDm7.d.ts → DateRangePicker-B8O8nA1M.d.ts} +30 -10
- package/dist/{DateRangePicker-BF-1CztH.js → DateRangePicker-BO92JO3A.js} +166 -353
- package/dist/DateRangePicker.bound-B_Lg8Tna.d.ts +9 -0
- package/dist/DateRangePicker.bound-cDWQPCUj.js +35 -0
- package/dist/{DateTimePicker-D4lHyf6P.d.ts → DateTimePicker-BRy_VN63.d.ts} +21 -11
- package/dist/{DateTimePicker-Cj0qvJUz.js → DateTimePicker-DSzd33fp.js} +47 -48
- package/dist/DateTimePicker.bound-BQUJXvBQ.js +32 -0
- package/dist/DateTimePicker.bound-Bt9wdYeR.d.ts +9 -0
- package/dist/{Dialog-CKLkS00H.js → Dialog-C9H9_BmK.js} +53 -29
- package/dist/Dialog-CDiUZFcf.d.ts +21 -0
- package/dist/{Dialog-9manOgMA.js → Dialog-DN5703sy.js} +13 -10
- package/dist/Disclosure-BRSkMbZQ.js +109 -0
- package/dist/{DropdownMenu-5jmtgLXd.js → DropdownMenu-DS0RaEfH.js} +13 -31
- package/dist/DropdownMenu-oJzwpMXL.d.ts +25 -0
- package/dist/{DropdownMenuDesktop-Cl9gZVq0.js → DropdownMenuDesktop-DGPIfex-.js} +7 -28
- package/dist/{FileInput-C4CE5kuP.d.ts → FileInput-Bm3_nNb4.d.ts} +26 -22
- package/dist/{FileInput-Br5DQaGQ.js → FileInput-dTcR3V93.js} +37 -50
- package/dist/FileInput.bound-B5b7BLGg.js +30 -0
- package/dist/FileInput.bound-puNboLYc.d.ts +8 -0
- package/dist/{FileTrigger-Cthk5_Wp.js → FileTrigger-DlryDp2T.js} +6 -6
- package/dist/{FileUpload--7ub3EZO.js → FileUpload-JogkVfav.js} +279 -249
- package/dist/FileUpload-ksjKICmv.d.ts +11 -0
- package/dist/FileUpload.bound-D4sr1tsH.d.ts +16 -0
- package/dist/FileUpload.bound-TTr9FNMS.js +30 -0
- package/dist/{FileUploadContainer-042ztsaL.d.ts → FileUploadContainer-DRIxUmp2.d.ts} +1 -1
- package/dist/{Form-DlQcyN1f.js → Form-CqF1SaVw.js} +2 -2
- package/dist/{FormField-Byiehm9y.d.ts → FormField-DHCcfchm.d.ts} +7 -2
- package/dist/FormField-dduTMkNH.js +142 -0
- package/dist/{FormFieldError-DeOHHLo2.js → FormFieldError-DTT5TUQ1.js} +3 -14
- package/dist/{FormFieldHeaderTooltip-BV2Ju4oB.js → FormFieldHeaderTooltip-Dt-g40Tc.js} +4 -4
- package/dist/FormLayout-CBYgWvwW.d.ts +47 -0
- package/dist/{Heading-nI1_VOaE.js → Heading-D4XFYv__.js} +2 -2
- package/dist/IconButton-BqmX_sMz.d.ts +25 -0
- package/dist/{IconSlot-DSK7qNxc.js → IconSlot-CqNuZl0E.js} +4 -4
- package/dist/{iconSlot.cva-CnpFzAOR.d.ts → IconSlot-DcEDPaNb.d.ts} +3 -10
- package/dist/{InlineTooltipWrapper-BpApaGXV.js → InlineTooltipWrapper-CKTiFpZn.js} +3 -3
- package/dist/{Input-BsbLZDtC.js → Input-BG0Xjw5X.js} +2 -2
- package/dist/{Input-DOanwj3l.d.ts → Input-DKNzGXy-.d.ts} +16 -9
- package/dist/Input-Dq2Raco6.js +247 -0
- package/dist/Input.bound-BxngTsaq.d.ts +9 -0
- package/dist/Input.bound-CB0WNCLI.js +31 -0
- package/dist/InputContent-5WKp0yNK.js +102 -0
- package/dist/{InputContent-CXuP1ghQ.d.ts → InputContent-C5wdgK9u.d.ts} +5 -5
- package/dist/{Label-B2-B-uFY.js → Label-BGvF9vWx.js} +2 -2
- package/dist/{Link-FupWOW1f.js → Link-Chux-Clm.js} +2 -2
- package/dist/{Link-Ow9H7kNv.d.ts → Link-n1MxiBY_.d.ts} +5 -3
- package/dist/{ListBox-CL8Ar4Q_.js → ListBox-DhR5kojP.js} +10 -11
- package/dist/{MenuItem-DHyqOqln.d.ts → MenuItem-Cj7ytjH0.d.ts} +1 -1
- package/dist/{Modal-w60dVQcb.js → Modal-DcLWF9cB.js} +58 -20
- package/dist/NumberField-BQwc6a7u.js +249 -0
- package/dist/{NumberField-Cb9Gf6QJ.d.ts → NumberField-BUTmx-kv.d.ts} +13 -9
- package/dist/NumberField.bound-DhGXXd4v.d.ts +9 -0
- package/dist/NumberField.bound-Ha6jrlsv.js +32 -0
- package/dist/{NumberFormatter-CLDS_LRZ.js → NumberFormatter-DYarfm5F.js} +2 -36
- package/dist/{NumberRangeInput-BfbJQqzn.d.ts → NumberRangeInput-BwUPbB0M.d.ts} +13 -8
- package/dist/{NumberRangeInput-B8-LHfg3.js → NumberRangeInput-KngK-OvN.js} +28 -55
- package/dist/NumberRangeInput.bound-VafOPEAu.js +32 -0
- package/dist/NumberRangeInput.bound-j_WC6iJC.d.ts +9 -0
- package/dist/{OverlayArrow-D8z7cCsw.js → OverlayArrow-DF0jMwul.js} +2 -2
- package/dist/PageHeader-DtV-4JEh.d.ts +61 -0
- package/dist/PasswordInput-DNt_CfI8.d.ts +11 -0
- package/dist/PasswordInput.bound-D4tGX20e.js +23 -0
- package/dist/{PasswordInput-CLwFUgl0.d.ts → PasswordInput.bound-EOqjNEVC.d.ts} +5 -6
- package/dist/{Popover-BTHPteIh.d.ts → Popover-DRqROtxR.d.ts} +2 -2
- package/dist/{Progress-B3mY9rIP.js → Progress-RiEGGxNG.js} +4 -29
- package/dist/{Progress-CjWOR38H.d.ts → Progress-uzAAtLNk.d.ts} +4 -4
- package/dist/{RadioGroup-DOw3PRoX.js → RadioGroup-Dvq0TiEB.js} +18 -120
- package/dist/RadioGroup-skcBf54J.d.ts +26 -0
- package/dist/RadioGroup.bound-B-xm1dwo.js +32 -0
- package/dist/RadioGroup.bound-CpxN2p6t.d.ts +9 -0
- package/dist/RangeCalendar-p7ajg_wH.js +315 -0
- package/dist/RichTextEditor-B9zaBMWl.d.ts +28 -0
- package/dist/{RichTextEditor-D4yN7Wj7.js → RichTextEditor-DLBfexN_.js} +57 -365
- package/dist/Select-DNF-GpuC.d.ts +137 -0
- package/dist/{staticSelect.utils-uHa8f_c6.js → Select-hIRIXRz1.js} +343 -635
- package/dist/Select.bound-BrAIDjfv.js +34 -0
- package/dist/Select.bound-CpN6KalY.d.ts +17 -0
- package/dist/SelectListBox-ysubv-kl.js +390 -0
- package/dist/SelectionIndicator-C3hniBa2.js +18 -0
- package/dist/SharedElementTransition-CZ2bE7yo.js +96 -0
- package/dist/SidebarWorkspaces-DJknAfS9.js +1298 -0
- package/dist/SidebarWorkspaces-Drgog0IO.d.ts +132 -0
- package/dist/{Slider-CzEmKYBF.js → Slider-DCsCCPFx.js} +18 -42
- package/dist/{Slider-EYlGCLWe.d.ts → Slider-JlRCD72s.d.ts} +9 -8
- package/dist/Slider.bound-BChOUGvm.d.ts +9 -0
- package/dist/Slider.bound-CByTXPTr.js +31 -0
- package/dist/{Spinner-DbXeDOa2.d.ts → Spinner-DNguPtBP.d.ts} +5 -5
- package/dist/{Spinner-BeVTUzzx.js → Spinner-DqjP06T1.js} +29 -41
- package/dist/{SplitButton-D9ngY1rJ.d.ts → SplitButton-BTuc5oYU.d.ts} +3 -3
- package/dist/{Stepper-TATlHZhQ.d.ts → Stepper-DNu5YlbG.d.ts} +18 -18
- package/dist/{Stepper-Cp5vbL5g.js → Stepper-Dyhxp0Tl.js} +14 -13
- package/dist/{Switch-CqnGEdeD.js → Switch-BfpSMMpv.js} +10 -59
- package/dist/Switch-CVt-dT9Z.d.ts +24 -0
- package/dist/Switch.bound-56C86rOe.d.ts +9 -0
- package/dist/Switch.bound-Dv0cHsMM.js +33 -0
- package/dist/TableRowDetails-A_FdBE_d.d.ts +109 -0
- package/dist/TabsFilters-BDoCGfRA.d.ts +30 -0
- package/dist/TabsFilters-ka2sUZPi.js +223 -0
- package/dist/Tag-BxYYX-i7.d.ts +44 -0
- package/dist/{Text-D2MPZ3sY.js → Text-D72yc4S6.js} +1 -1
- package/dist/{TextArea-D8WkKsGn.js → TextArea-CqT0_Bn-.js} +33 -35
- package/dist/{TextArea-l_keyLK7.d.ts → TextArea-DxAHDgz4.d.ts} +11 -9
- package/dist/TextArea.bound-kHkY_d9o.js +28 -0
- package/dist/TextArea.bound-oSnqk1Un.d.ts +9 -0
- package/dist/TextArea.cva-ENXI55ec.js +5 -0
- package/dist/{TimePicker-C4taAOFQ.js → TimePicker-Duw94UIt.js} +65 -55
- package/dist/TimePicker-Yg84ntZH.d.ts +45 -0
- package/dist/TimePicker.bound-5b_qcmeo.d.ts +9 -0
- package/dist/TimePicker.bound-DX5pXlgZ.js +32 -0
- package/dist/{datePickerValue.utils-DCgoSrP3.js → TimePickerForm-BiWPFcsD.js} +23 -19
- package/dist/{Toast-ruXqONDA.d.ts → Toast-DbIZorlS.d.ts} +1 -1
- package/dist/{ToastContainer-qgpzMFD4.js → ToastContainer-DtpZaefx.js} +5 -5
- package/dist/ToggleButton-CdcLn-PW.d.ts +17 -0
- package/dist/{ToggleButton-BW1ensey.js → ToggleButton-P1z1pxzT.js} +5 -5
- package/dist/ToggleGroup-Cbx9Keza.d.ts +42 -0
- package/dist/ToggleGroup-Co1-A0Ti.js +333 -0
- package/dist/ToggleGroup.bound-DphkH_jH.js +67 -0
- package/dist/ToggleGroup.bound-dDLGgcJm.d.ts +9 -0
- package/dist/Tooltip-Bg9AFtGw.d.ts +16 -0
- package/dist/{Tooltip-CpG1nz7Y.js → Tooltip-DRB6lo0U.js} +10 -11
- package/dist/{TooltipWrapper-3jyN0Wss.js → TooltipWrapper-DcrEabVw.js} +21 -10
- package/dist/{Typography-LU4z2pR1.js → Typography-DCLnPa3P.js} +2 -2
- package/dist/{Typography-XljT9s02.d.ts → Typography-MkA6LnHW.d.ts} +2 -2
- package/dist/{accordion.cva-CL1bVscW.js → accordion.cva-DwxY-k1e.js} +17 -25
- package/dist/{badgeButton.cva-B2bgCQP6.d.ts → badgeButton.cva-Bjhs4ops.d.ts} +8 -8
- package/dist/badgeButton.cva-CqaR8KBt.js +138 -0
- package/dist/{breadcrumbs.cva-7zzdDhVR.js → breadcrumbs.cva-CnBIZUB3.js} +9 -9
- package/dist/button.cva-CMkwxrFU.js +263 -0
- package/dist/{button.cva-C7kEhgoA.d.ts → button.cva-DoDFPTm5.d.ts} +18 -17
- package/dist/{buttonContent.cva-DPIlROA9.d.ts → buttonContent.cva-Dj7Eve71.d.ts} +2 -2
- package/dist/checkbox.cva-Bj7bLZNf.js +128 -0
- package/dist/{checkbox.cva-t1Ox50hy.d.ts → checkbox.cva-DUvQJdT-.d.ts} +7 -7
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +102 -100
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +116 -1
- package/dist/components/autocomplete.d.ts +2 -2
- package/dist/components/autocomplete.js +1 -134
- package/dist/components/badge-button.d.ts +1 -1
- package/dist/components/badge-button.js +6 -6
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +10 -10
- package/dist/components/bottom-sheet-header.d.ts +16 -0
- package/dist/components/bottom-sheet-header.js +80 -0
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +3 -3
- package/dist/components/breadcrumb/react-aria.js +1 -1
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button-group.d.ts +12 -0
- package/dist/components/button-group.js +46 -0
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +1 -163
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +2 -2
- package/dist/components/combo-box/react-aria.js +1 -1
- package/dist/components/date-picker/react-aria.js +1 -1
- package/dist/components/date-picker.d.ts +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker/react-aria.js +1 -1
- package/dist/components/date-range-picker.d.ts +16 -2
- package/dist/components/date-range-picker.js +2 -2
- package/dist/components/date-time-picker.d.ts +2 -2
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/dialog-trigger/react-aria.js +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +4 -4
- package/dist/components/dropdown-menu.d.ts +2 -2
- package/dist/components/dropdown-menu.js +2 -2
- package/dist/components/file-input.d.ts +2 -2
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.d.ts +2 -2
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.d.ts +3 -3
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.d.ts +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/form-layout.d.ts +2 -0
- package/dist/components/form-layout.js +80 -0
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +17 -15
- package/dist/components/icon-slot.d.ts +2 -1
- package/dist/components/icon-slot.js +1 -1
- package/dist/components/input-frame.d.ts +94 -0
- package/dist/{useStaticInputHandoff-NeZVnci-.js → components/input-frame.js} +82 -116
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +1 -241
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +4 -4
- package/dist/components/menu-trigger/react-aria.js +1 -1
- package/dist/components/modal/react-aria.js +1 -1
- package/dist/components/modal-overlay/react-aria.js +1 -1
- package/dist/components/number-field.d.ts +2 -2
- package/dist/components/number-field.js +1 -245
- package/dist/components/number-range-input.d.ts +2 -2
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/page-header.d.ts +2 -0
- package/dist/components/page-header.js +210 -0
- package/dist/components/password-input.d.ts +2 -2
- package/dist/components/password-input.js +22 -1
- package/dist/components/popover/react-aria.js +1 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +40 -32
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select/react-aria.js +1 -1
- package/dist/components/select.d.ts +2 -3
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +2 -0
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +3 -3
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/style-definitions.d.ts +3 -0
- package/dist/components/style-definitions.js +122 -0
- package/dist/components/submenu-trigger/react-aria.js +1 -1
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs-filters.d.ts +2 -0
- package/dist/components/tabs-filters.js +2 -0
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +93 -1
- package/dist/components/text-area.d.ts +2 -2
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.d.ts +2 -2
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +2 -2
- package/dist/components/toast.js +2 -2
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button.js +17 -30
- package/dist/components/toggle-group.d.ts +2 -3
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +2 -2
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.d.ts +2 -2
- package/dist/components/typography.js +1 -1
- package/dist/components/use-toast.d.ts +1 -1
- package/dist/components/use-toast.js +2 -2
- package/dist/config/component-configuration.d.ts +30 -0
- package/dist/config/component-configuration.js +69 -0
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/link-context.d.ts +2 -2
- package/dist/config/link-context.js +1 -1
- package/dist/config/resources.d.ts +1 -1
- package/dist/config/resources.js +1 -1
- package/dist/config/theme-context.js +1 -1
- package/dist/config/ui-config.d.ts +2 -2
- package/dist/config/ui-config.js +1 -1
- package/dist/config/ui-overrides.d.ts +1 -1
- package/dist/config/ui-overrides.js +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/{confirmation.context-BuzgCfYl.js → confirmation.context-Bc2yEVp_.js} +2 -2
- package/dist/{confirmation.context-BOeEVczb.d.ts → confirmation.context-CAt_T5qZ.d.ts} +1 -1
- package/dist/{datePickerInput.cva-Cd7UUN61.js → datePickerInput.cva-CWkV2fut.js} +3 -3
- package/dist/datePickerValue.utils-CkmPaD6I.js +4 -0
- package/dist/{dialog.cva-COhDZaVl.js → dialog.cva-BIpz6HcA.js} +7 -7
- package/dist/{dist-CAdwxJbe.js → dist-fFtzh872.js} +54 -1
- package/dist/{dom.utils-D1AopHx9.js → dom.utils-BPooTXtC.js} +2 -2
- package/dist/dropdownMenu.cva-DwSOcbmR.js +31 -0
- package/dist/{fileUpload.cva-ujmStxB1.js → fileUpload.cva-BYzXGc9C.js} +11 -11
- package/dist/{fileUpload.types-n5FxK_F-.d.ts → fileUpload.types-CfUkihds.d.ts} +22 -17
- package/dist/form.binding-DOR5gIQf.js +49 -0
- package/dist/form.types-C8P4sznq.d.ts +22 -0
- package/dist/formFieldError.cva-BB6Ghqwq.js +14 -0
- package/dist/formFieldHelper.cva-DRmSyRZN.js +14 -0
- package/dist/formLayout.context--CN08Mtb.js +14 -0
- package/dist/hooks/use-async-list.d.ts +2 -0
- package/dist/hooks/use-async-list.js +2 -0
- package/dist/hooks/use-filters.js +1 -1
- package/dist/hooks/use-local-storage.js +1 -1
- package/dist/{i18n-CX2EjhJI.js → i18n-D8vXIoiq.js} +24 -18
- package/dist/{i18n-CX1vFM9r.d.ts → i18n-DM-PUcxQ.d.ts} +24 -14
- package/dist/iconSlot.cva-I0pFwkGy.d.ts +9 -0
- package/dist/icons.d.ts +2 -1
- package/dist/icons.js +3 -3
- package/dist/import-C7W0Wv2r.js +255 -0
- package/dist/index.d.ts +98 -91
- package/dist/index.js +99 -95
- package/dist/input.cva-2C6_W5jD.js +185 -0
- package/dist/input.cva-cNv7yhcp.d.ts +80 -0
- package/dist/inputLayout-KdAtunGk.js +5 -0
- package/dist/{intlStrings-chfsan9H.js → intlStrings-Cu1YN1tA.js} +35 -35
- package/dist/isEqual-LFw0W5rU.js +97 -0
- package/dist/label.cva-DTfT6FrX.js +85 -0
- package/dist/{link.context-D5qyz9Rf.d.ts → link.context-LSbvpZCL.d.ts} +1 -1
- package/dist/link.cva-C24YVAsJ.js +16 -0
- package/dist/{numberStatic.utils-BX50PSee.js → numberStatic.utils-BIyZuILs.js} +5 -5
- package/dist/outline.clsx-DGGQQRkM.js +6 -0
- package/dist/popover.cva-DAbfSma6.js +5 -0
- package/dist/progress.cva-CsGaGVJ-.js +28 -0
- package/dist/{radio.cva-DN9VQ3Kb.d.ts → radio.cva-CtBwM88n.d.ts} +9 -5
- package/dist/radio.cva-DistaZtZ.js +96 -0
- package/dist/rich-text-editor.d.ts +2 -2
- package/dist/rich-text-editor.js +1 -1
- package/dist/{routing.utils-UTQonIhB.js → routing.utils-DfxEt0_Y.js} +5 -0
- package/dist/selectDesktop.cva-DStkOdwm.js +14 -0
- package/dist/selectItem.cva-B6vxey2R.js +27 -0
- package/dist/{staticDateTimeSegments-DtU63_dw.js → staticDateTimeSegments-BVvFHWOs.js} +61 -57
- package/dist/status.cva-CYgi3Htz.js +130 -0
- package/dist/stepper.cva-Cecphqeo.js +104 -0
- package/dist/style-definitions-DJOlAxCG.d.ts +1034 -0
- package/dist/styles/editor.css +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/styles/outline.js +1 -1
- package/dist/switch.cva-BT0kGRIk.js +24 -0
- package/dist/switch.cva-DmuYW9tg.d.ts +16 -0
- package/dist/table.cva-DkcsOmZG.js +147 -0
- package/dist/tag.cva-ExMNsTN-.js +24 -0
- package/dist/tanstack/autocomplete.d.ts +3 -2
- package/dist/tanstack/autocomplete.js +1 -1
- package/dist/tanstack/checkbox-group.d.ts +3 -2
- package/dist/tanstack/checkbox-group.js +1 -1
- package/dist/tanstack/checkbox.d.ts +3 -2
- package/dist/tanstack/checkbox.js +2 -2
- package/dist/tanstack/date-picker.d.ts +3 -2
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.d.ts +3 -2
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.d.ts +3 -2
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.d.ts +3 -2
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.d.ts +4 -3
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.d.ts +3 -3
- package/dist/tanstack/form.js +3 -3
- package/dist/tanstack/input.d.ts +3 -2
- package/dist/tanstack/input.js +1 -1
- package/dist/tanstack/number-field.d.ts +3 -2
- package/dist/tanstack/number-field.js +1 -1
- package/dist/tanstack/number-range-input.d.ts +3 -2
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/password-input.d.ts +1 -1
- package/dist/tanstack/password-input.js +1 -1
- package/dist/tanstack/radio-group.d.ts +3 -2
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.d.ts +9 -2
- package/dist/tanstack/rich-text-editor.js +27 -1
- package/dist/tanstack/select.d.ts +3 -2
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.d.ts +3 -2
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/switch.d.ts +3 -2
- package/dist/tanstack/switch.js +1 -1
- package/dist/tanstack/table.d.ts +3 -2
- package/dist/tanstack/table.js +2 -3
- package/dist/tanstack/text-area.d.ts +3 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.d.ts +3 -2
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.d.ts +3 -3
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/{queries.utils-CmbhAoHU.js → tanstack-Bgdv0qU1.js} +2 -1
- package/dist/tanstack-CJKor9l-.d.ts +566 -0
- package/dist/tanstack.d.ts +82 -78
- package/dist/tanstack.js +99 -93
- package/dist/{theme.context-B3wQDJ-i.js → theme.context--VEyStJB.js} +2 -2
- package/dist/{toast.cva-C_L_RffH.js → toast.cva-B6NXTwbZ.js} +22 -38
- package/dist/{toast.cva-By5lvAfr.d.ts → toast.cva-BnXRIWVy.d.ts} +10 -10
- package/dist/{toast.runtime-cxex9e4E.js → toast.runtime-BWQLlbZW.js} +1 -2
- package/dist/toggleGroup.cva-BZcOUjIS.d.ts +26 -0
- package/dist/toggleGroup.cva-CINSHakM.js +35 -0
- package/dist/{tooltip.cva-BIzlOXHH.js → tooltip.cva-BEyxvcG2.js} +11 -11
- package/dist/{tooltipWrapper.cva-BBQ4ic3D.js → tooltipWrapper.cva-t4NQ9zz9.js} +1 -1
- package/dist/tw-ui-plugin.js +5 -1
- package/dist/typography.cva-CHsHX_Wp.js +31 -0
- package/dist/typography.cva-DcBCiskp.d.ts +36 -0
- package/dist/uiConfig.context-3DN9w6oU.js +180 -0
- package/dist/{uiConfig.context-DeBX2beU.d.ts → uiConfig.context-CoE2HBL4.d.ts} +26 -20
- package/dist/{uiOverrides.context-DEp139He.d.ts → uiOverrides.context-DHHzLSnq.d.ts} +67 -6
- package/dist/useAsyncList-Ct74ve3i.js +445 -0
- package/dist/useAsyncList-Cu-Y8If2.d.ts +9 -0
- package/dist/{useBreakpoint-DQoMN-BG.js → useBreakpoint-CJ3mx7UF.js} +6 -6
- package/dist/{useControlledState-CzXkZCX8.js → useControlledState-CuU1VIh1.js} +2 -2
- package/dist/useFieldAccessibility-eZIMECmG.js +19 -0
- package/dist/{useFilters-XNH27Md2.js → useFilters-DMi94RZK.js} +3 -3
- package/dist/{form.binding-CG1RPv6o.js → useForm-Cb7KWLds.js} +80 -43
- package/dist/{form.binding-DVJ5F0JE.d.ts → useForm-I6z23FXf.d.ts} +15 -15
- package/dist/useFormAutosave-BBLm3Ujo.d.ts +34 -0
- package/dist/useFormAutosave-BPGlChiY.js +216 -0
- package/dist/useScrollableListBox-oYKqU3Hp.js +47 -0
- package/dist/useStaticInputHandoff-BN0fOerH.js +76 -0
- package/dist/useTableColumnConfig-D4BGhlBT.js +1906 -0
- package/dist/useTableNav-hQCt_TbI.d.ts +197 -0
- package/dist/{useToast-yreVCUer.d.ts → useToast-CjyrMHdh.d.ts} +1 -1
- package/dist/{utils-Czcqspm7.js → utils-BkLF-JA3.js} +1 -1
- package/package.json +86 -247
- package/.rulesync/rules/ui-buttons-and-content.md +0 -56
- package/.rulesync/rules/ui-inputs-and-forms.md +0 -62
- package/.rulesync/rules/ui-overlays-navigation-and-styling.md +0 -49
- package/.rulesync/rules/ui-overview.md +0 -33
- package/dist/Alert-CnvEb1D_.js +0 -244
- package/dist/AppCanvasPage--RG31Yyv.js +0 -2421
- package/dist/AppCanvasPage-BIFYeEeS.d.ts +0 -80
- package/dist/Autocomplete-BwNHp8fy.d.ts +0 -15
- package/dist/Button-C5rv4Cr2.js +0 -506
- package/dist/Button-D-4qb0IR.d.ts +0 -42
- package/dist/CheckboxCheckmark-CpC3wlMs.js +0 -178
- package/dist/CheckboxGroup-DGF12cmB.d.ts +0 -28
- package/dist/ComponentGallery-C6exitZN.js +0 -3513
- package/dist/Dialog-CW93T9X1.d.ts +0 -56
- package/dist/DropdownMenu-JNpYT4-3.d.ts +0 -62
- package/dist/FileUpload-CR7bZxV1.d.ts +0 -7
- package/dist/Form-DbEWnCKc.d.ts +0 -49
- package/dist/FormField-B99dLt8o.js +0 -212
- package/dist/IconButton-D4thBurp.d.ts +0 -16
- package/dist/InlineIconButton-BeJCjl-q.d.ts +0 -15
- package/dist/InputItem-CIxbTxZu.js +0 -63
- package/dist/Inputs-DJSKiaWY.js +0 -17
- package/dist/Inputs-O84btFJL.d.ts +0 -13
- package/dist/Pagination-CwQu5Py8.d.ts +0 -12
- package/dist/PaginationList-DMRUGtf8.d.ts +0 -18
- package/dist/PaginationList-DtvuP63b.js +0 -220
- package/dist/PasswordInput-DYwUZ4-k.js +0 -78
- package/dist/QuerySelect-BGxb6Y0K.d.ts +0 -24
- package/dist/RadioGroup-CZg2kIMk.d.ts +0 -24
- package/dist/RichTextEditor-YxuRUlI7.d.ts +0 -26
- package/dist/Select-UR0ec2Ux.js +0 -154
- package/dist/Select-pHbyJdZJ.d.ts +0 -15
- package/dist/SelectBase-Omiq2D3M.d.ts +0 -96
- package/dist/SelectionIndicator-JblvLKCu.js +0 -5
- package/dist/SharedElementTransition-Da1c_cOO.js +0 -12
- package/dist/Switch-s_EPn0Jz.d.ts +0 -22
- package/dist/Table-BN2_J_Ne.js +0 -636
- package/dist/Tag-AHfV_XSf.d.ts +0 -44
- package/dist/Tag-DPg5sL1Z.js +0 -146
- package/dist/TextButton-XUhV_1s0.d.ts +0 -15
- package/dist/TimePicker-B1POvGWs.d.ts +0 -33
- package/dist/Toast-DtG3pA61.js +0 -53
- package/dist/ToggleButton-7aP8Jb11.d.ts +0 -11
- package/dist/ToggleGroup-CRFDIPGZ.d.ts +0 -7
- package/dist/ToggleGroup-DOk27fgI.js +0 -346
- package/dist/Tooltip-DHv6vAqW.d.ts +0 -57
- package/dist/UIConfigurator-BwLRfe-a.js +0 -6704
- package/dist/autocomplete-DeERHN8W.d.ts +0 -16
- package/dist/badgeButton.cva-CvN4CTx5.js +0 -300
- package/dist/check-DYMBkp_Z.js +0 -20
- package/dist/checkbox-DxIPDTK5.d.ts +0 -9
- package/dist/checkbox-group-B3BOVshI.d.ts +0 -9
- package/dist/chevron-down-B4Pr8bD3.js +0 -20
- package/dist/chevron-left-Dgo_b9wJ.js +0 -20
- package/dist/chevron-right-3nKJR5Bb.js +0 -20
- package/dist/chevron-up-D_Gqpb5M.js +0 -20
- package/dist/chevrons-right-DJPPn2fD.js +0 -44
- package/dist/components/inline-icon-button.d.ts +0 -2
- package/dist/components/inline-icon-button.js +0 -40
- package/dist/components/pagination-list.d.ts +0 -2
- package/dist/components/pagination-list.js +0 -2
- package/dist/components/pagination.d.ts +0 -2
- package/dist/components/pagination.js +0 -134
- package/dist/components/query-autocomplete.d.ts +0 -8
- package/dist/components/query-autocomplete.js +0 -134
- package/dist/components/query-select.d.ts +0 -2
- package/dist/components/query-select.js +0 -147
- package/dist/components/text-button.d.ts +0 -2
- package/dist/components/text-button.js +0 -35
- package/dist/config/app-canvas-tanstack.d.ts +0 -23
- package/dist/config/app-canvas-tanstack.js +0 -62
- package/dist/config/app-canvas.d.ts +0 -12
- package/dist/config/app-canvas.js +0 -2
- package/dist/config/ui-configurator-theme.d.ts +0 -2
- package/dist/config/ui-configurator-theme.js +0 -2
- package/dist/config/ui-configurator-vite.d.ts +0 -10
- package/dist/config/ui-configurator-vite.js +0 -174
- package/dist/config/ui-configurator.d.ts +0 -15
- package/dist/config/ui-configurator.js +0 -3
- package/dist/configuration.context-f_FSPWhQ.d.ts +0 -926
- package/dist/createLucideIcon-LcezOE4z.js +0 -240
- package/dist/date-picker-DnxDmlOW.d.ts +0 -9
- package/dist/date-range-picker-DHDOSvHN.d.ts +0 -9
- package/dist/date-time-picker-UkTa0OJ8.d.ts +0 -9
- package/dist/date.transforms-DLg-eFcE.js +0 -15
- package/dist/dropdownMenu.cva-DvEmX0bs.js +0 -34
- package/dist/dynamicInputs-ByVMnx4Z.d.ts +0 -772
- package/dist/dynamicInputs-CRMWIpHA.js +0 -194
- package/dist/dynamicInputs-m_DQu5q0.js +0 -214
- package/dist/fieldAdapter-C4sDFC8f.d.ts +0 -9
- package/dist/fieldAdapter-DjYls12j.js +0 -63
- package/dist/file-input-DkbkdI7l.d.ts +0 -9
- package/dist/file-upload-CTsPhxJk.d.ts +0 -10
- package/dist/form.types-CecYaerF.d.ts +0 -13
- package/dist/form.types-ZNGbcqJS.d.ts +0 -13
- package/dist/info-iUmX3uDk.js +0 -32
- package/dist/input-CdQNCPgH.d.ts +0 -8
- package/dist/input.cva-BsHgYa-L.d.ts +0 -80
- package/dist/input.cva-DJA8ovm_.js +0 -208
- package/dist/link.cva-DMTHZiJG.js +0 -12
- package/dist/number-field-CUDbenNV.d.ts +0 -8
- package/dist/number-range-input-DZGrcvjL.d.ts +0 -8
- package/dist/outline.clsx-50W_vNDl.js +0 -6
- package/dist/password-input-fYN20cQO.d.ts +0 -8
- package/dist/popover.cva-Bhud1wnp.js +0 -5
- package/dist/query-autocomplete-CfuQeiYG.d.ts +0 -14
- package/dist/query-select-CuT_sE6a.d.ts +0 -15
- package/dist/queryAutocomplete.types-tl3r6iaY.d.ts +0 -27
- package/dist/radio-group-B3ccPf0p.d.ts +0 -9
- package/dist/rhf/autocomplete.d.ts +0 -3
- package/dist/rhf/autocomplete.js +0 -8
- package/dist/rhf/checkbox-group.d.ts +0 -3
- package/dist/rhf/checkbox-group.js +0 -8
- package/dist/rhf/checkbox.d.ts +0 -3
- package/dist/rhf/checkbox.js +0 -8
- package/dist/rhf/date-picker.d.ts +0 -3
- package/dist/rhf/date-picker.js +0 -9
- package/dist/rhf/date-range-picker.d.ts +0 -3
- package/dist/rhf/date-range-picker.js +0 -9
- package/dist/rhf/date-time-picker.d.ts +0 -3
- package/dist/rhf/date-time-picker.js +0 -9
- package/dist/rhf/file-input.d.ts +0 -3
- package/dist/rhf/file-input.js +0 -6
- package/dist/rhf/file-upload.d.ts +0 -3
- package/dist/rhf/file-upload.js +0 -6
- package/dist/rhf/input.d.ts +0 -3
- package/dist/rhf/input.js +0 -6
- package/dist/rhf/inputs.d.ts +0 -4
- package/dist/rhf/inputs.js +0 -2
- package/dist/rhf/number-field.d.ts +0 -3
- package/dist/rhf/number-field.js +0 -6
- package/dist/rhf/number-range-input.d.ts +0 -3
- package/dist/rhf/number-range-input.js +0 -6
- package/dist/rhf/password-input.d.ts +0 -3
- package/dist/rhf/password-input.js +0 -6
- package/dist/rhf/query-autocomplete.d.ts +0 -2
- package/dist/rhf/query-autocomplete.js +0 -8
- package/dist/rhf/query-select.d.ts +0 -2
- package/dist/rhf/query-select.js +0 -8
- package/dist/rhf/radio-group.d.ts +0 -3
- package/dist/rhf/radio-group.js +0 -8
- package/dist/rhf/rich-text-editor.d.ts +0 -3
- package/dist/rhf/rich-text-editor.js +0 -6
- package/dist/rhf/select.d.ts +0 -3
- package/dist/rhf/select.js +0 -8
- package/dist/rhf/slider.d.ts +0 -3
- package/dist/rhf/slider.js +0 -6
- package/dist/rhf/switch.d.ts +0 -3
- package/dist/rhf/switch.js +0 -8
- package/dist/rhf/text-area.d.ts +0 -3
- package/dist/rhf/text-area.js +0 -6
- package/dist/rhf/time-picker.d.ts +0 -3
- package/dist/rhf/time-picker.js +0 -9
- package/dist/rhf/toggle-group.d.ts +0 -3
- package/dist/rhf/toggle-group.js +0 -6
- package/dist/rhf-t348TCCL.js +0 -256
- package/dist/rhf.d.ts +0 -106
- package/dist/rhf.js +0 -112
- package/dist/rich-text-editor-B-Onl7T8.d.ts +0 -8
- package/dist/select-B4a52eWW.d.ts +0 -16
- package/dist/selectDesktop.cva-CHAMxhfO.js +0 -69
- package/dist/slider-dNj9jruO.d.ts +0 -8
- package/dist/stepper.cva-CZ0Kj-s7.js +0 -116
- package/dist/style-merge.util-zLimKwt6.d.ts +0 -40
- package/dist/styles/app-canvas.css +0 -740
- package/dist/styles/color-utilities.css +0 -20
- package/dist/styles/configurator.css +0 -3280
- package/dist/switch-C--iWnY8.d.ts +0 -9
- package/dist/switch.cva-CWNzmdRc.d.ts +0 -16
- package/dist/table.cva-D5oQ-QvA.js +0 -101
- package/dist/tanstack/inputs.d.ts +0 -5
- package/dist/tanstack/inputs.js +0 -3
- package/dist/tanstack/query-autocomplete.d.ts +0 -2
- package/dist/tanstack/query-autocomplete.js +0 -2
- package/dist/tanstack/query-select.d.ts +0 -2
- package/dist/tanstack/query-select.js +0 -2
- package/dist/text-area-DQAtpOQp.d.ts +0 -8
- package/dist/theme-model-DtYPxNvH.js +0 -406
- package/dist/theme-model-T1zIdBg8.d.ts +0 -12
- package/dist/time-picker-DoGfbil6.d.ts +0 -9
- package/dist/toggle-group-C1nMDOwz.d.ts +0 -9
- package/dist/toggleGroup.cva-MbpaEBg1.js +0 -35
- package/dist/toggleGroup.types-Bp43zbSQ.d.ts +0 -59
- package/dist/typography.cva-D1JOEYl-.d.ts +0 -36
- package/dist/typography.cva-iD15k56p.js +0 -51
- package/dist/uiConfig.context-BS3r_kTS.js +0 -381
- package/dist/underline-66hmELxa.js +0 -81
- package/dist/upload-CXU83BJ4.js +0 -30
- package/dist/useFieldAccessibility-ScC6Mtd5.js +0 -102
- package/dist/useFormAutosave-DfuP7drj.js +0 -198
- package/dist/useQueryAutocomplete-CraXvRm_.js +0 -152
- package/dist/useTableColumnConfig-Di0_w80v.js +0 -892
- package/dist/useTableNav-Ckj5PBRk.d.ts +0 -292
- package/dist/x-B6vfz8Ps.js +0 -23
- package/dist/zod.utils-DrrPDT9v.js +0 -24
- package/rulesync.jsonc +0 -11
- package/scripts/generate-rules.mjs +0 -34
- package/src/configurator/README.md +0 -77
- package/dist/{import-BE0r63d8.js → import-D_3dPATF.js} +2 -2
- package/dist/{link.context-J7aQtMOr.js → link.context-TPjDtjw3.js} +1 -1
- package/dist/{router.context-B4FvsTim.js → router.context-MckTbHw9.js} +1 -1
- package/dist/{uiOverrides.context-BTCH9y5a.js → uiOverrides.context-DNEQlTx0.js} +1 -1
- package/dist/{useIntersectionObserver-DYfHnGGU.js → useIntersectionObserver-DFAhTsV0.js} +1 -1
- package/dist/{useLocalStorage-PlcaJ1tP.js → useLocalStorage-CctQvyqD.js} +1 -1
|
@@ -1,105 +1,21 @@
|
|
|
1
|
-
import { t as createLucideIcon } from "./createLucideIcon-LcezOE4z.js";
|
|
2
|
-
import { t as UIConfig } from "./uiConfig.context-BS3r_kTS.js";
|
|
3
|
-
import { t as Upload } from "./upload-CXU83BJ4.js";
|
|
4
|
-
import { t as X } from "./x-B6vfz8Ps.js";
|
|
5
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
6
|
-
import { t as UIOverrides } from "./uiOverrides.context-
|
|
7
|
-
import { t as IconSlot } from "./IconSlot-
|
|
8
|
-
import { n as $070c0dd15dc89b58$export$3c6489d84dc98b6, t as $b325d7bd7e74496a$export$6fb4a10d2c950550 } from "./FileTrigger-
|
|
9
|
-
import { t as Typography } from "./Typography-
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { i as $a8ea2faf2ebe4d2f$re_export$useLabels
|
|
14
|
-
import { t as
|
|
15
|
-
import
|
|
16
|
-
import "./i18n-CX2EjhJI.js";
|
|
2
|
+
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
+
import { t as IconSlot } from "./IconSlot-CqNuZl0E.js";
|
|
4
|
+
import { n as $070c0dd15dc89b58$export$3c6489d84dc98b6, t as $b325d7bd7e74496a$export$6fb4a10d2c950550 } from "./FileTrigger-DlryDp2T.js";
|
|
5
|
+
import { t as Typography } from "./Typography-DCLnPa3P.js";
|
|
6
|
+
import { t as UIConfig } from "./uiConfig.context-3DN9w6oU.js";
|
|
7
|
+
import { t as Button } from "./Button-dRFJundh.js";
|
|
8
|
+
import { IconButton } from "./components/icon-button.js";
|
|
9
|
+
import { i as $a8ea2faf2ebe4d2f$re_export$useLabels } from "./import-D_3dPATF.js";
|
|
10
|
+
import { t as FormField } from "./FormField-dduTMkNH.js";
|
|
11
|
+
import "./i18n-D8vXIoiq.js";
|
|
17
12
|
import { t as FileUtils } from "./file.utils-DqQxnuAm.js";
|
|
18
|
-
import { t as Progress } from "./Progress-
|
|
19
|
-
import { t as fileUploadDropZoneDefinition } from "./fileUpload.cva-
|
|
20
|
-
import {
|
|
13
|
+
import { t as Progress } from "./Progress-RiEGGxNG.js";
|
|
14
|
+
import { t as fileUploadDropZoneDefinition } from "./fileUpload.cva-BYzXGc9C.js";
|
|
15
|
+
import { CheckCircle, CircleAlert, File, Upload, X } from "lucide-react";
|
|
16
|
+
import { memo, useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
21
17
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
22
18
|
import { useTranslation } from "react-i18next";
|
|
23
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/circle-alert.mjs
|
|
24
|
-
/**
|
|
25
|
-
* @license lucide-react v1.43.0 - ISC
|
|
26
|
-
*
|
|
27
|
-
* This source code is licensed under the ISC license.
|
|
28
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/
|
|
30
|
-
const __iconData$2 = {
|
|
31
|
-
name: "circle-alert",
|
|
32
|
-
size: 24,
|
|
33
|
-
node: [
|
|
34
|
-
["circle", {
|
|
35
|
-
cx: "12",
|
|
36
|
-
cy: "12",
|
|
37
|
-
r: "10",
|
|
38
|
-
key: "1mglay"
|
|
39
|
-
}],
|
|
40
|
-
["line", {
|
|
41
|
-
x1: "12",
|
|
42
|
-
x2: "12",
|
|
43
|
-
y1: "8",
|
|
44
|
-
y2: "12",
|
|
45
|
-
key: "1pkeuh"
|
|
46
|
-
}],
|
|
47
|
-
["line", {
|
|
48
|
-
x1: "12",
|
|
49
|
-
x2: "12.01",
|
|
50
|
-
y1: "16",
|
|
51
|
-
y2: "16",
|
|
52
|
-
key: "4dfq90"
|
|
53
|
-
}]
|
|
54
|
-
],
|
|
55
|
-
aliases: ["alert-circle"]
|
|
56
|
-
};
|
|
57
|
-
__iconData$2.node;
|
|
58
|
-
const CircleAlert = createLucideIcon(__iconData$2);
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/circle-check-big.mjs
|
|
61
|
-
/**
|
|
62
|
-
* @license lucide-react v1.43.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/
|
|
67
|
-
const __iconData$1 = {
|
|
68
|
-
name: "circle-check-big",
|
|
69
|
-
size: 24,
|
|
70
|
-
node: [["path", {
|
|
71
|
-
d: "M21.801 10A10 10 0 1 1 17 3.335",
|
|
72
|
-
key: "yps3ct"
|
|
73
|
-
}], ["path", {
|
|
74
|
-
d: "m9 11 3 3L22 4",
|
|
75
|
-
key: "1pflzl"
|
|
76
|
-
}]],
|
|
77
|
-
aliases: ["check-circle"]
|
|
78
|
-
};
|
|
79
|
-
__iconData$1.node;
|
|
80
|
-
const CircleCheckBig = createLucideIcon(__iconData$1);
|
|
81
|
-
//#endregion
|
|
82
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/file.mjs
|
|
83
|
-
/**
|
|
84
|
-
* @license lucide-react v1.43.0 - ISC
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the ISC license.
|
|
87
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/
|
|
89
|
-
const __iconData = {
|
|
90
|
-
name: "file",
|
|
91
|
-
size: 24,
|
|
92
|
-
node: [["path", {
|
|
93
|
-
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
94
|
-
key: "1oefj6"
|
|
95
|
-
}], ["path", {
|
|
96
|
-
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
97
|
-
key: "wfsgrz"
|
|
98
|
-
}]]
|
|
99
|
-
};
|
|
100
|
-
__iconData.node;
|
|
101
|
-
const File = createLucideIcon(__iconData);
|
|
102
|
-
//#endregion
|
|
103
19
|
//#region src/components/inputs/File/shared/FileUploadContentError.tsx
|
|
104
20
|
const FileUploadContentError = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove, browseButtonProps }) => {
|
|
105
21
|
const { t } = useTranslation("ui");
|
|
@@ -107,54 +23,62 @@ const FileUploadContentError = ({ variant, as, isDisabled, state, browseText, fi
|
|
|
107
23
|
return /* @__PURE__ */ jsx("div", {
|
|
108
24
|
className: clsx("flex w-full flex-fill flex-col items-start"),
|
|
109
25
|
children: /* @__PURE__ */ jsxs("div", {
|
|
110
|
-
className: clsx("flex w-full items-center", variant === "horizontal" && "flex-row gap-
|
|
26
|
+
className: clsx("flex w-full items-center", variant === "horizontal" && "flex-row gap-4", variant === "vertical" && "flex-col", variant === "vertical" && as === "button" && "gap-4", variant === "vertical" && as === "link" && "gap-1"),
|
|
111
27
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
112
|
-
className: clsx("flex min-w-0 max-w-full flex-grow items-center gap-
|
|
28
|
+
className: clsx("flex min-w-0 max-w-full flex-grow items-center gap-2", variant === "vertical" && "flex-col", variant === "horizontal" && "flex-row", isDisabled && "opacity-50"),
|
|
113
29
|
children: [/* @__PURE__ */ jsx(IconSlot, {
|
|
114
30
|
icon: CircleAlert,
|
|
115
|
-
className: "text-
|
|
31
|
+
className: "text-warning"
|
|
116
32
|
}), /* @__PURE__ */ jsxs("div", {
|
|
117
|
-
className: clsx("flex flex-col gap-
|
|
33
|
+
className: clsx("flex flex-col gap-1", variant === "vertical" && "max-w-full items-center", variant === "horizontal" && "max-w-[calc(100%_-_32px)]"),
|
|
118
34
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
119
35
|
size: "large",
|
|
120
36
|
as: "span",
|
|
121
|
-
className: clsx("self-stretch truncate text-
|
|
37
|
+
className: clsx("self-stretch truncate text-foreground font-medium", variant === "vertical" && "text-center"),
|
|
122
38
|
children: state.file?.name ?? state.displayName ?? ""
|
|
123
39
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
124
40
|
size: singleFile ? "small" : "small",
|
|
125
41
|
as: "span",
|
|
126
|
-
className: clsx("text-
|
|
42
|
+
className: clsx("text-muted-foreground", variant === "vertical" && "text-center"),
|
|
127
43
|
children: state.error?.serverMessage ?? state.error?.message
|
|
128
44
|
})]
|
|
129
45
|
})]
|
|
130
46
|
}), /* @__PURE__ */ jsx("div", {
|
|
131
|
-
className: clsx("flex flex-none items-center justify-end", variant === "vertical" && as === "button" && "flex-col", as === "link" && "gap-
|
|
47
|
+
className: clsx("flex flex-none items-center justify-end", variant === "vertical" && as === "button" && "flex-col", as === "link" && "gap-1", as === "button" && "gap-4"),
|
|
132
48
|
children: as === "link" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [fileTriggerProps && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx($b325d7bd7e74496a$export$6fb4a10d2c950550, {
|
|
133
49
|
...fileTriggerProps,
|
|
134
|
-
children: /* @__PURE__ */ jsx(
|
|
135
|
-
className: "text-
|
|
50
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
51
|
+
className: "text-primary",
|
|
52
|
+
variant: "text",
|
|
53
|
+
width: "hug",
|
|
136
54
|
children: browseText ?? ""
|
|
137
55
|
})
|
|
138
56
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
139
57
|
size: "small",
|
|
140
58
|
as: "span",
|
|
141
|
-
className: "text-
|
|
59
|
+
className: "text-foreground",
|
|
142
60
|
children: t(($) => $.ui.fileUpload.or)
|
|
143
|
-
})] }), removeWithIcon ? /* @__PURE__ */ jsx(
|
|
61
|
+
})] }), removeWithIcon ? /* @__PURE__ */ jsx(IconButton, {
|
|
144
62
|
label: "Cancel",
|
|
145
63
|
color: "secondary",
|
|
146
64
|
onPress: () => {
|
|
147
65
|
onRemove(state.id ?? "");
|
|
148
66
|
},
|
|
149
|
-
icon: X
|
|
150
|
-
|
|
151
|
-
|
|
67
|
+
icon: X,
|
|
68
|
+
variant: "text",
|
|
69
|
+
width: "hug",
|
|
70
|
+
disableTooltip: true,
|
|
71
|
+
size: "sm"
|
|
72
|
+
}) : /* @__PURE__ */ jsx(Button, {
|
|
73
|
+
className: "text-primary lowercase",
|
|
152
74
|
onPress: () => {
|
|
153
75
|
onRemove(state.id ?? "");
|
|
154
76
|
},
|
|
77
|
+
variant: "text",
|
|
78
|
+
width: "hug",
|
|
155
79
|
children: t(($) => $.ui.fileUpload.removeFile)
|
|
156
80
|
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
157
|
-
className: "flex items-center justify-center gap-
|
|
81
|
+
className: "flex items-center justify-center gap-2 self-stretch",
|
|
158
82
|
children: [fileTriggerProps && /* @__PURE__ */ jsx($b325d7bd7e74496a$export$6fb4a10d2c950550, {
|
|
159
83
|
...fileTriggerProps,
|
|
160
84
|
children: /* @__PURE__ */ jsx(Button, {
|
|
@@ -165,18 +89,24 @@ const FileUploadContentError = ({ variant, as, isDisabled, state, browseText, fi
|
|
|
165
89
|
isDisabled,
|
|
166
90
|
children: browseText ?? ""
|
|
167
91
|
})
|
|
168
|
-
}), removeWithIcon ? /* @__PURE__ */ jsx(
|
|
92
|
+
}), removeWithIcon ? /* @__PURE__ */ jsx(IconButton, {
|
|
169
93
|
label: "Cancel",
|
|
170
94
|
color: "secondary",
|
|
171
95
|
onPress: () => {
|
|
172
96
|
onRemove(state.id ?? "");
|
|
173
97
|
},
|
|
174
|
-
icon: X
|
|
175
|
-
|
|
98
|
+
icon: X,
|
|
99
|
+
variant: "text",
|
|
100
|
+
width: "hug",
|
|
101
|
+
disableTooltip: true,
|
|
102
|
+
size: "sm"
|
|
103
|
+
}) : /* @__PURE__ */ jsx(Button, {
|
|
176
104
|
color: "secondary",
|
|
177
105
|
onPress: () => {
|
|
178
106
|
onRemove(state.id ?? "");
|
|
179
107
|
},
|
|
108
|
+
variant: "text",
|
|
109
|
+
width: "hug",
|
|
180
110
|
children: t(($) => $.ui.fileUpload.removeFile)
|
|
181
111
|
})]
|
|
182
112
|
})
|
|
@@ -192,55 +122,63 @@ const FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, f
|
|
|
192
122
|
return /* @__PURE__ */ jsx("div", {
|
|
193
123
|
className: clsx("flex w-full flex-fill flex-col items-start"),
|
|
194
124
|
children: /* @__PURE__ */ jsxs("div", {
|
|
195
|
-
className: clsx("flex w-full items-center", variant === "horizontal" && "flex-row gap-
|
|
125
|
+
className: clsx("flex w-full items-center", variant === "horizontal" && "flex-row gap-4", variant === "vertical" && "flex-col", variant === "vertical" && as === "button" && "gap-4", variant === "vertical" && as === "link" && "gap-1"),
|
|
196
126
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
197
|
-
className: clsx("flex min-w-0 max-w-full grow items-center gap-
|
|
127
|
+
className: clsx("flex min-w-0 max-w-full grow items-center gap-2", variant === "vertical" && "flex-col", variant === "horizontal" && "flex-row", isDisabled && "opacity-50"),
|
|
198
128
|
children: [/* @__PURE__ */ jsx(IconSlot, {
|
|
199
|
-
icon:
|
|
200
|
-
className: "text-
|
|
129
|
+
icon: CheckCircle,
|
|
130
|
+
className: "text-muted-foreground"
|
|
201
131
|
}), /* @__PURE__ */ jsxs("div", {
|
|
202
|
-
className: clsx("flex flex-col gap-
|
|
132
|
+
className: clsx("flex flex-col gap-1", variant === "vertical" && "max-w-full items-center", variant === "horizontal" && "max-w-[calc(100%-32px)]"),
|
|
203
133
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
204
134
|
size: "large",
|
|
205
135
|
as: "span",
|
|
206
|
-
className: "self-stretch truncate text-center text-
|
|
136
|
+
className: "self-stretch truncate text-center text-foreground font-medium",
|
|
207
137
|
children: state.file?.name ?? state.displayName ?? ""
|
|
208
138
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
209
139
|
size: singleFile ? "small" : "small",
|
|
210
140
|
as: "span",
|
|
211
|
-
className: "text-
|
|
141
|
+
className: "text-foreground",
|
|
212
142
|
children: FileUtils.getFileDisplaySize(state)
|
|
213
143
|
})]
|
|
214
144
|
})]
|
|
215
145
|
}), /* @__PURE__ */ jsx("div", {
|
|
216
|
-
className: clsx("flex flex-none items-center justify-end", variant === "vertical" && as === "button" && "flex-col", as === "link" && variant === "vertical" && "gap-
|
|
146
|
+
className: clsx("flex flex-none items-center justify-end", variant === "vertical" && as === "button" && "flex-col", as === "link" && variant === "vertical" && "gap-1", as === "button" && variant === "vertical" && "gap-4", variant === "horizontal" && "gap-2"),
|
|
217
147
|
children: as === "link" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [fileTriggerProps && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx($b325d7bd7e74496a$export$6fb4a10d2c950550, {
|
|
218
148
|
...fileTriggerProps,
|
|
219
|
-
children: /* @__PURE__ */ jsx(
|
|
220
|
-
className: clsx("text-
|
|
149
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
150
|
+
className: clsx("text-primary", variant === "vertical" && "[&>span>span]:font-medium!"),
|
|
151
|
+
variant: "text",
|
|
152
|
+
width: "hug",
|
|
221
153
|
children: browseText ?? ""
|
|
222
154
|
})
|
|
223
155
|
}), variant === "vertical" && /* @__PURE__ */ jsx(Typography, {
|
|
224
156
|
size: "small",
|
|
225
157
|
as: "span",
|
|
226
|
-
className: "text-
|
|
158
|
+
className: "text-muted-foreground",
|
|
227
159
|
children: t(($) => $.ui.fileUpload.or)
|
|
228
|
-
})] }), removeWithIcon ? /* @__PURE__ */ jsx(
|
|
160
|
+
})] }), removeWithIcon ? /* @__PURE__ */ jsx(IconButton, {
|
|
229
161
|
label: "Cancel",
|
|
230
162
|
color: "secondary",
|
|
231
163
|
onPress: () => {
|
|
232
164
|
onRemove(state.id ?? "");
|
|
233
165
|
},
|
|
234
|
-
icon: X
|
|
235
|
-
|
|
236
|
-
|
|
166
|
+
icon: X,
|
|
167
|
+
variant: "text",
|
|
168
|
+
width: "hug",
|
|
169
|
+
disableTooltip: true,
|
|
170
|
+
size: "sm"
|
|
171
|
+
}) : /* @__PURE__ */ jsx(Button, {
|
|
172
|
+
className: clsx(variant === "vertical" && "text-primary lowercase [&>span>span]:font-medium!"),
|
|
237
173
|
color: variant === "horizontal" ? "secondary" : "primary",
|
|
238
174
|
onPress: () => {
|
|
239
175
|
onRemove(state.id ?? "");
|
|
240
176
|
},
|
|
177
|
+
variant: "text",
|
|
178
|
+
width: "hug",
|
|
241
179
|
children: t(($) => $.ui.fileUpload.removeFile)
|
|
242
180
|
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
243
|
-
className: "flex items-center justify-center gap-
|
|
181
|
+
className: "flex items-center justify-center gap-2 self-stretch",
|
|
244
182
|
children: [fileTriggerProps && /* @__PURE__ */ jsx($b325d7bd7e74496a$export$6fb4a10d2c950550, {
|
|
245
183
|
...fileTriggerProps,
|
|
246
184
|
children: /* @__PURE__ */ jsx(Button, {
|
|
@@ -251,20 +189,26 @@ const FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, f
|
|
|
251
189
|
isDisabled,
|
|
252
190
|
children: browseText ?? ""
|
|
253
191
|
})
|
|
254
|
-
}), removeWithIcon ? /* @__PURE__ */ jsx(
|
|
192
|
+
}), removeWithIcon ? /* @__PURE__ */ jsx(IconButton, {
|
|
255
193
|
label: "Cancel",
|
|
256
194
|
color: "secondary",
|
|
257
195
|
onPress: () => {
|
|
258
196
|
onRemove(state.id ?? "");
|
|
259
197
|
},
|
|
260
198
|
icon: X,
|
|
261
|
-
isDisabled
|
|
262
|
-
|
|
199
|
+
isDisabled,
|
|
200
|
+
variant: "text",
|
|
201
|
+
width: "hug",
|
|
202
|
+
disableTooltip: true,
|
|
203
|
+
size: "sm"
|
|
204
|
+
}) : /* @__PURE__ */ jsx(Button, {
|
|
263
205
|
color: "secondary",
|
|
264
206
|
onPress: () => {
|
|
265
207
|
onRemove(state.id ?? "");
|
|
266
208
|
},
|
|
267
209
|
isDisabled,
|
|
210
|
+
variant: "text",
|
|
211
|
+
width: "hug",
|
|
268
212
|
children: t(($) => $.ui.fileUpload.removeFile)
|
|
269
213
|
})]
|
|
270
214
|
})
|
|
@@ -278,37 +222,41 @@ const FileUploadContentLoading = ({ index, variant, as, state, isDisabled, singl
|
|
|
278
222
|
const { t } = useTranslation("ui");
|
|
279
223
|
const { color: cancelButtonColor = "secondary", size: cancelButtonSize = "sm", variant: cancelButtonVariant = "outlined", width: cancelButtonWidth = "hug", ...cancelButtonRestProps } = cancelButtonProps ?? {};
|
|
280
224
|
return /* @__PURE__ */ jsxs("div", {
|
|
281
|
-
className: clsx("flex w-full flex-col items-center", variant === "vertical" && "flex-col", variant === "horizontal" && "flex-row", as === "button" && "gap-
|
|
225
|
+
className: clsx("flex w-full flex-col items-center", variant === "vertical" && "flex-col", variant === "horizontal" && "flex-row", as === "button" && "gap-4"),
|
|
282
226
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
283
|
-
className: clsx("flex w-full items-center justify-between", variant === "vertical" && "flex-col gap-
|
|
227
|
+
className: clsx("flex w-full items-center justify-between", variant === "vertical" && "flex-col gap-1", variant === "horizontal" && "flex-row gap-4", isDisabled && "opacity-50"),
|
|
284
228
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
285
|
-
className: clsx("flex items-center gap-
|
|
229
|
+
className: clsx("flex items-center gap-2", variant === "vertical" && "w-full flex-col", variant === "horizontal" && "w-1/2"),
|
|
286
230
|
children: [/* @__PURE__ */ jsx(IconSlot, {
|
|
287
231
|
icon: File,
|
|
288
|
-
className: "text-
|
|
232
|
+
className: "text-muted-foreground"
|
|
289
233
|
}), /* @__PURE__ */ jsxs("div", {
|
|
290
|
-
className: clsx("flex flex-col", variant === "vertical" && "max-w-full gap-
|
|
234
|
+
className: clsx("flex flex-col", variant === "vertical" && "max-w-full gap-2 text-center", variant === "horizontal" && "max-w-[calc(100%-32px)] gap-1"),
|
|
291
235
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
292
236
|
size: "large",
|
|
293
237
|
as: "span",
|
|
294
|
-
className: "self-stretch truncate text-center text-
|
|
238
|
+
className: "self-stretch truncate text-center text-foreground font-medium",
|
|
295
239
|
children: state.file?.name ?? state.displayName ?? ""
|
|
296
240
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
297
241
|
size: singleFile ? "small" : "small",
|
|
298
242
|
as: "span",
|
|
299
|
-
className: "text-
|
|
243
|
+
className: "text-muted-foreground",
|
|
300
244
|
children: FileUtils.getFileDisplaySize(state)
|
|
301
245
|
})]
|
|
302
246
|
})]
|
|
303
247
|
}), /* @__PURE__ */ jsxs("div", {
|
|
304
248
|
className: clsx("flex items-center gap-1", variant === "horizontal" && "w-1/2", variant === "vertical" && "w-full"),
|
|
305
|
-
children: [/* @__PURE__ */ jsx(Progress, { progress: state.progress }), (as === "link" || variant === "horizontal") && /* @__PURE__ */ jsx(
|
|
249
|
+
children: [/* @__PURE__ */ jsx(Progress, { progress: state.progress }), (as === "link" || variant === "horizontal") && /* @__PURE__ */ jsx(IconButton, {
|
|
306
250
|
label: "Cancel",
|
|
307
251
|
color: "secondary",
|
|
308
252
|
onPress: () => {
|
|
309
253
|
onCancel(index);
|
|
310
254
|
},
|
|
311
|
-
icon: X
|
|
255
|
+
icon: X,
|
|
256
|
+
variant: "text",
|
|
257
|
+
width: "hug",
|
|
258
|
+
disableTooltip: true,
|
|
259
|
+
size: "sm"
|
|
312
260
|
})]
|
|
313
261
|
})]
|
|
314
262
|
}), as === "button" && variant === "vertical" && /* @__PURE__ */ jsx(Button, {
|
|
@@ -356,7 +304,8 @@ const FileCardComponent = ({ index, as, state, onRemove, isDisabled, browseButto
|
|
|
356
304
|
state,
|
|
357
305
|
browseButtonProps,
|
|
358
306
|
onRemove: () => {
|
|
359
|
-
onRemove?.(state.id
|
|
307
|
+
if (state.id) onRemove?.(state.id);
|
|
308
|
+
else onCancel?.(index);
|
|
360
309
|
}
|
|
361
310
|
});
|
|
362
311
|
}, [
|
|
@@ -370,7 +319,7 @@ const FileCardComponent = ({ index, as, state, onRemove, isDisabled, browseButto
|
|
|
370
319
|
onRemove
|
|
371
320
|
]);
|
|
372
321
|
return /* @__PURE__ */ jsx("div", {
|
|
373
|
-
className: clsx("flex items-center self-stretch", "bg-
|
|
322
|
+
className: clsx("flex items-center self-stretch", "bg-card", "px-3", "py-4", "rounded-lg border border-border border-solid"),
|
|
374
323
|
children: content
|
|
375
324
|
});
|
|
376
325
|
};
|
|
@@ -379,7 +328,7 @@ const FileCard = memo(FileCardComponent);
|
|
|
379
328
|
//#region src/components/inputs/File/shared/FileCardList.tsx
|
|
380
329
|
const FileCardList = memo(({ uploadState, as, isDisabled, browseButtonProps, cancelButtonProps, className, onRemove, onCancel }) => {
|
|
381
330
|
return /* @__PURE__ */ jsx("div", {
|
|
382
|
-
className: clsx("mt-
|
|
331
|
+
className: clsx("mt-4 flex flex-col items-start gap-2 self-stretch", className),
|
|
383
332
|
children: uploadState.map((state, index) => /* @__PURE__ */ jsx(FileCard, {
|
|
384
333
|
index,
|
|
385
334
|
as,
|
|
@@ -397,28 +346,30 @@ const FileCardList = memo(({ uploadState, as, isDisabled, browseButtonProps, can
|
|
|
397
346
|
const FileUploadContentEmpty = ({ variant, as, isDisabled, title, browseText, uploadText, hideButton = false, className, browseButtonProps }) => {
|
|
398
347
|
const { size: browseButtonSize = "sm", variant: browseButtonVariant = "outlined", width: browseButtonWidth = "hug", ...browseButtonRestProps } = browseButtonProps ?? {};
|
|
399
348
|
return /* @__PURE__ */ jsxs("div", {
|
|
400
|
-
className: clsx("flex w-full items-center gap-
|
|
349
|
+
className: clsx("flex w-full items-center gap-1", className, variant === "vertical" && "flex-col", variant === "horizontal" && "min-h-11 flex-row justify-between"),
|
|
401
350
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
402
|
-
className: clsx("flex items-center gap-
|
|
351
|
+
className: clsx("flex items-center gap-2", variant === "vertical" && "flex-col", variant === "horizontal" && "flex-row", isDisabled && "opacity-50"),
|
|
403
352
|
children: [/* @__PURE__ */ jsx(IconSlot, {
|
|
404
353
|
icon: Upload,
|
|
405
|
-
className: "text-
|
|
354
|
+
className: "text-foreground"
|
|
406
355
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
407
356
|
size: "lead",
|
|
408
357
|
as: "span",
|
|
409
|
-
className: clsx("self-stretch text-
|
|
358
|
+
className: clsx("self-stretch text-foreground font-normal", variant === "vertical" && "text-center"),
|
|
410
359
|
children: title
|
|
411
360
|
})]
|
|
412
361
|
}), /* @__PURE__ */ jsxs("div", {
|
|
413
|
-
className: clsx("flex items-center justify-center", variant === "vertical" && as === "button" && "flex-col", as === "link" && "gap-
|
|
362
|
+
className: clsx("flex items-center justify-center", variant === "vertical" && as === "button" && "flex-col", as === "link" && "gap-1", as === "button" && "gap-4"),
|
|
414
363
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
415
364
|
size: "large",
|
|
416
365
|
as: "span",
|
|
417
|
-
className: clsx("text-
|
|
366
|
+
className: clsx("text-muted-foreground font-normal", variant === "vertical" && "text-center", isDisabled && "opacity-50"),
|
|
418
367
|
children: uploadText
|
|
419
|
-
}), !hideButton && browseText && (as === "link" ? /* @__PURE__ */ jsx(
|
|
420
|
-
className: "text-
|
|
368
|
+
}), !hideButton && browseText && (as === "link" ? /* @__PURE__ */ jsx(Button, {
|
|
369
|
+
className: "text-primary lowercase",
|
|
421
370
|
isDisabled,
|
|
371
|
+
variant: "text",
|
|
372
|
+
width: "hug",
|
|
422
373
|
children: browseText
|
|
423
374
|
}) : /* @__PURE__ */ jsx(Button, {
|
|
424
375
|
variant: browseButtonVariant,
|
|
@@ -452,7 +403,7 @@ const FileUploadContent = ({ variant, as, isDisabled, browseText, uploadText, em
|
|
|
452
403
|
cancelButtonProps,
|
|
453
404
|
onCancel: handleCancelUpload
|
|
454
405
|
});
|
|
455
|
-
if (currentState.state === "uploaded") return /* @__PURE__ */ jsx(FileUploadContentFilled, {
|
|
406
|
+
if (currentState.state === "uploaded" || currentState.state === "idle") return /* @__PURE__ */ jsx(FileUploadContentFilled, {
|
|
456
407
|
as,
|
|
457
408
|
variant,
|
|
458
409
|
singleFile: true,
|
|
@@ -462,7 +413,8 @@ const FileUploadContent = ({ variant, as, isDisabled, browseText, uploadText, em
|
|
|
462
413
|
browseButtonProps,
|
|
463
414
|
fileTriggerProps,
|
|
464
415
|
onRemove: () => {
|
|
465
|
-
handleRemove(currentState.id
|
|
416
|
+
if (currentState.id) handleRemove(currentState.id);
|
|
417
|
+
else handleCancelUpload(0);
|
|
466
418
|
}
|
|
467
419
|
});
|
|
468
420
|
if (currentState.state === "error") return /* @__PURE__ */ jsx(FileUploadContentError, {
|
|
@@ -473,7 +425,8 @@ const FileUploadContent = ({ variant, as, isDisabled, browseText, uploadText, em
|
|
|
473
425
|
state: currentState,
|
|
474
426
|
browseButtonProps,
|
|
475
427
|
onRemove: () => {
|
|
476
|
-
handleRemove(currentState.id
|
|
428
|
+
if (currentState.id) handleRemove(currentState.id);
|
|
429
|
+
else handleCancelUpload(0);
|
|
477
430
|
}
|
|
478
431
|
});
|
|
479
432
|
}
|
|
@@ -495,12 +448,26 @@ const FileUploadContent = ({ variant, as, isDisabled, browseText, uploadText, em
|
|
|
495
448
|
//#region src/components/inputs/File/FileUpload.tsx
|
|
496
449
|
const FileUploadBase = (props) => {
|
|
497
450
|
const { t } = useTranslation("ui");
|
|
498
|
-
const { ref
|
|
451
|
+
const { ref, label, tooltipText, variant = "vertical", as = "button", helperText, isRequired, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, errorMessageId, className, allowsMultiple: allowsMultipleProp, multiple, hideLabel, acceptedFileTypes, clearOnSuccess, emptyText = t(($) => $.ui.fileUpload.emptyText), uploadText = t(($) => $.ui.fileUpload.uploadText), browseText = t(($) => $.ui.fileUpload.browse), fileUpload, fileRemove, children, listRenderer, browseButtonProps, cancelButtonProps, onInvalidFileType, onChange, onBlur, defaultState, boundValue, ...rest } = props;
|
|
499
452
|
const allowsMultiple = allowsMultipleProp ?? multiple ?? false;
|
|
500
453
|
const ui = UIConfig.useConfig();
|
|
501
454
|
const fileUploadDropZoneCva = UIOverrides.useCva("fileUpload.dropZoneCva", fileUploadDropZoneDefinition);
|
|
502
455
|
const getInitialState = () => {
|
|
503
|
-
if (
|
|
456
|
+
if (boundValue !== void 0) return (Array.isArray(boundValue) ? boundValue : boundValue ? [boundValue] : []).map((file) => ({
|
|
457
|
+
state: "idle",
|
|
458
|
+
file,
|
|
459
|
+
displayName: file.name,
|
|
460
|
+
displaySize: file.size,
|
|
461
|
+
displayType: file.type
|
|
462
|
+
}));
|
|
463
|
+
if (props.value !== void 0) return props.value ?? [];
|
|
464
|
+
if (props.defaultValue !== void 0) return (Array.isArray(props.defaultValue) ? props.defaultValue : props.defaultValue ? [props.defaultValue] : []).map((file) => ({
|
|
465
|
+
state: "idle",
|
|
466
|
+
file,
|
|
467
|
+
displayName: file.name,
|
|
468
|
+
displaySize: file.size,
|
|
469
|
+
displayType: file.type
|
|
470
|
+
}));
|
|
504
471
|
if (!defaultState?.length) return [];
|
|
505
472
|
const items = defaultState.map((item, index) => ({
|
|
506
473
|
state: "uploaded",
|
|
@@ -511,13 +478,62 @@ const FileUploadBase = (props) => {
|
|
|
511
478
|
}));
|
|
512
479
|
return allowsMultiple ? items : items.slice(0, 1);
|
|
513
480
|
};
|
|
481
|
+
const generatedErrorId = useId();
|
|
482
|
+
const resolvedErrorId = errorMessageId ?? generatedErrorId;
|
|
483
|
+
const [uploadError, setUploadError] = useState();
|
|
484
|
+
const resolvedError = error ?? uploadError;
|
|
514
485
|
const [uploadState, setUploadState] = useState(getInitialState);
|
|
486
|
+
const uploadStateRef = useRef(uploadState);
|
|
487
|
+
const uploadGeneration = useRef(0);
|
|
488
|
+
uploadStateRef.current = uploadState;
|
|
489
|
+
const updateUploadState = useCallback((next) => {
|
|
490
|
+
const value = typeof next === "function" ? next(uploadStateRef.current) : next;
|
|
491
|
+
uploadStateRef.current = value;
|
|
492
|
+
setUploadState(value);
|
|
493
|
+
}, []);
|
|
494
|
+
const previousExternalValue = useRef(props.value);
|
|
495
|
+
useEffect(() => {
|
|
496
|
+
if (boundValue !== void 0 || props.value === void 0 || props.value === previousExternalValue.current) return;
|
|
497
|
+
previousExternalValue.current = props.value;
|
|
498
|
+
uploadGeneration.current += 1;
|
|
499
|
+
setUploadError(void 0);
|
|
500
|
+
uploadState.forEach((item) => {
|
|
501
|
+
if (!props.value?.some((next) => next.file === item.file && next.id === item.id)) item.abortController?.abort();
|
|
502
|
+
});
|
|
503
|
+
updateUploadState(props.value ?? []);
|
|
504
|
+
}, [
|
|
505
|
+
boundValue,
|
|
506
|
+
props.value,
|
|
507
|
+
uploadState,
|
|
508
|
+
updateUploadState
|
|
509
|
+
]);
|
|
510
|
+
useEffect(() => {
|
|
511
|
+
if (boundValue === void 0) return;
|
|
512
|
+
const files = Array.isArray(boundValue) ? boundValue : boundValue ? [boundValue] : [];
|
|
513
|
+
const currentFiles = uploadState.flatMap((item) => item.file ? [item.file] : []);
|
|
514
|
+
if (files.length === currentFiles.length && files.every((file, index) => file === currentFiles[index])) return;
|
|
515
|
+
uploadGeneration.current += 1;
|
|
516
|
+
setUploadError(void 0);
|
|
517
|
+
uploadState.forEach((item) => item.abortController?.abort());
|
|
518
|
+
updateUploadState(files.map((file) => ({
|
|
519
|
+
state: "idle",
|
|
520
|
+
file,
|
|
521
|
+
displayName: file.name,
|
|
522
|
+
displaySize: file.size,
|
|
523
|
+
displayType: file.type
|
|
524
|
+
})));
|
|
525
|
+
}, [
|
|
526
|
+
boundValue,
|
|
527
|
+
uploadState,
|
|
528
|
+
updateUploadState
|
|
529
|
+
]);
|
|
515
530
|
const emitFiles = useCallback((files) => {
|
|
516
531
|
if (allowsMultiple) onChange?.(files);
|
|
517
532
|
else onChange?.(files[0] ?? null);
|
|
518
533
|
}, [allowsMultiple, onChange]);
|
|
519
534
|
const formFieldProps = {
|
|
520
|
-
error,
|
|
535
|
+
error: resolvedError,
|
|
536
|
+
errorMessageId: resolvedErrorId,
|
|
521
537
|
label,
|
|
522
538
|
tooltipText,
|
|
523
539
|
helperText,
|
|
@@ -529,112 +545,146 @@ const FileUploadBase = (props) => {
|
|
|
529
545
|
errorClassName
|
|
530
546
|
};
|
|
531
547
|
const labelProps = $a8ea2faf2ebe4d2f$re_export$useLabels({ "aria-label": label });
|
|
548
|
+
const reportUploadError = (failure, generation) => {
|
|
549
|
+
if (generation !== uploadGeneration.current) return;
|
|
550
|
+
const message = typeof failure === "object" && failure !== null ? "serverMessage" in failure && typeof failure.serverMessage === "string" && failure.serverMessage.trim() ? failure.serverMessage : "message" in failure && typeof failure.message === "string" ? failure.message : void 0 : typeof failure === "string" ? failure : void 0;
|
|
551
|
+
setUploadError(message?.trim() ? message : t(($) => $.ui.fileUpload.uploadFailed));
|
|
552
|
+
};
|
|
532
553
|
const handleUpload = async (inputFiles) => {
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
554
|
+
const generation = uploadGeneration.current;
|
|
555
|
+
setUploadError(void 0);
|
|
556
|
+
try {
|
|
557
|
+
const validFiles = inputFiles.filter((file) => FileUtils.isFileTypeAccepted(file, acceptedFileTypes));
|
|
558
|
+
const acceptedFiles = allowsMultiple ? validFiles : validFiles.slice(0, 1);
|
|
559
|
+
const invalidFiles = inputFiles.filter((file) => !FileUtils.isFileTypeAccepted(file, acceptedFileTypes));
|
|
560
|
+
if (invalidFiles.length > 0) {
|
|
561
|
+
if (allowsMultiple) onInvalidFileType?.(invalidFiles.map((file) => file.name));
|
|
562
|
+
else onInvalidFileType?.(invalidFiles[0].name);
|
|
563
|
+
}
|
|
564
|
+
if (acceptedFiles.length === 0) return;
|
|
565
|
+
const existingFiles = allowsMultiple ? uploadStateRef.current.flatMap((state) => state.file ? [state.file] : []) : [];
|
|
566
|
+
emitFiles([...existingFiles, ...acceptedFiles]);
|
|
567
|
+
if (!fileUpload) {
|
|
568
|
+
const states = acceptedFiles.map((file) => ({
|
|
569
|
+
state: "idle",
|
|
570
|
+
file,
|
|
571
|
+
displayName: file.name,
|
|
572
|
+
displaySize: file.size,
|
|
573
|
+
displayType: file.type
|
|
574
|
+
}));
|
|
575
|
+
updateUploadState((previous) => allowsMultiple ? [...previous, ...states] : states);
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
if (!allowsMultiple) {
|
|
579
|
+
uploadStateRef.current.forEach((item) => item.abortController?.abort());
|
|
580
|
+
updateUploadState([]);
|
|
581
|
+
}
|
|
582
|
+
const newUploadState = acceptedFiles.map((file) => ({
|
|
547
583
|
state: "uploading",
|
|
548
584
|
progress: 0,
|
|
549
585
|
file,
|
|
550
586
|
abortController: new AbortController()
|
|
551
|
-
});
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
587
|
+
}));
|
|
588
|
+
updateUploadState((previous) => [...previous, ...newUploadState]);
|
|
589
|
+
const succeeded = await Promise.all(newUploadState.map(async ({ file, abortController }) => {
|
|
590
|
+
const isCurrent = () => generation === uploadGeneration.current && !abortController.signal.aborted;
|
|
591
|
+
try {
|
|
592
|
+
const response = await fileUpload({ data: {
|
|
593
|
+
resourceName: file.name,
|
|
594
|
+
fileName: file.name,
|
|
595
|
+
fileSize: file.size,
|
|
596
|
+
method: "put"
|
|
597
|
+
} }, file, {
|
|
598
|
+
onUploadProgress: ({ loaded, total }) => {
|
|
599
|
+
if (total == null || !isCurrent()) return;
|
|
600
|
+
const progress = Math.round(loaded / total * 100);
|
|
601
|
+
updateUploadState((previous) => previous.map((state) => state.abortController === abortController ? {
|
|
602
|
+
...state,
|
|
603
|
+
progress
|
|
604
|
+
} : state));
|
|
605
|
+
},
|
|
606
|
+
abortController
|
|
607
|
+
});
|
|
608
|
+
if (!isCurrent()) return false;
|
|
609
|
+
updateUploadState((previous) => previous.map((state) => state.abortController === abortController ? {
|
|
567
610
|
...state,
|
|
568
|
-
|
|
611
|
+
state: "uploaded",
|
|
612
|
+
id: response.id
|
|
569
613
|
} : state));
|
|
570
|
-
|
|
571
|
-
|
|
614
|
+
return true;
|
|
615
|
+
} catch (failure) {
|
|
616
|
+
if (!isCurrent()) return false;
|
|
617
|
+
const remainingState = uploadStateRef.current.filter((state) => state.abortController !== abortController);
|
|
618
|
+
updateUploadState(remainingState);
|
|
619
|
+
reportUploadError(failure, generation);
|
|
620
|
+
emitFiles(remainingState.flatMap((state) => state.file ? [state.file] : []));
|
|
621
|
+
return false;
|
|
622
|
+
}
|
|
572
623
|
}));
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
(await Promise.all(promises)).forEach((res, index) => {
|
|
576
|
-
setUploadState((prev) => prev.map((state, i) => i === startIndex + index ? {
|
|
577
|
-
...state,
|
|
578
|
-
state: "uploaded",
|
|
579
|
-
id: res.id
|
|
580
|
-
} : state));
|
|
581
|
-
});
|
|
582
|
-
if (clearOnSuccess) {
|
|
583
|
-
setUploadState([]);
|
|
624
|
+
if (generation === uploadGeneration.current && succeeded.every(Boolean) && clearOnSuccess && uploadStateRef.current.every((item) => newUploadState.some((pending) => pending.abortController === item.abortController))) {
|
|
625
|
+
updateUploadState([]);
|
|
584
626
|
emitFiles([]);
|
|
585
627
|
}
|
|
586
|
-
} catch (
|
|
587
|
-
|
|
588
|
-
setUploadState(remainingState);
|
|
589
|
-
emitFiles(remainingState.flatMap((state) => state.file ? [state.file] : []));
|
|
590
|
-
throw error;
|
|
628
|
+
} catch (failure) {
|
|
629
|
+
reportUploadError(failure, generation);
|
|
591
630
|
}
|
|
592
631
|
};
|
|
593
632
|
const handleSelect = (inputFiles) => {
|
|
594
|
-
if (
|
|
595
|
-
const filesArray = Array.from(inputFiles);
|
|
596
|
-
handleUpload(filesArray);
|
|
633
|
+
if (inputFiles) handleUpload(Array.from(inputFiles));
|
|
597
634
|
};
|
|
598
635
|
const handleDrop = async (e) => {
|
|
636
|
+
const generation = uploadGeneration.current;
|
|
599
637
|
if (!e.items) return;
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
638
|
+
setUploadError(void 0);
|
|
639
|
+
try {
|
|
640
|
+
const inputFiles = await Promise.all(e.items.flatMap((item) => item.kind === "file" ? [Promise.resolve().then(() => item.getFile())] : []));
|
|
641
|
+
if (generation !== uploadGeneration.current) return;
|
|
642
|
+
await handleUpload(inputFiles);
|
|
643
|
+
} catch (failure) {
|
|
644
|
+
reportUploadError(failure, generation);
|
|
645
|
+
}
|
|
606
646
|
};
|
|
607
647
|
const handleRemove = useCallback((id) => {
|
|
608
648
|
fileRemove?.({ id });
|
|
609
649
|
const remainingState = uploadState.filter((state) => state.id !== id);
|
|
610
|
-
|
|
650
|
+
updateUploadState(remainingState);
|
|
611
651
|
emitFiles(remainingState.flatMap((state) => state.file ? [state.file] : []));
|
|
612
652
|
}, [
|
|
613
653
|
emitFiles,
|
|
614
654
|
fileRemove,
|
|
615
|
-
uploadState
|
|
655
|
+
uploadState,
|
|
656
|
+
updateUploadState
|
|
616
657
|
]);
|
|
617
658
|
const handleCancelUpload = useCallback((index) => {
|
|
618
659
|
const findState = uploadState[index];
|
|
619
660
|
if (findState) {
|
|
620
661
|
findState.abortController?.abort("canceled by user");
|
|
621
662
|
const remainingState = uploadState.filter((_, i) => i !== index);
|
|
622
|
-
|
|
663
|
+
updateUploadState(remainingState);
|
|
623
664
|
emitFiles(remainingState.flatMap((state) => state.file ? [state.file] : []));
|
|
624
665
|
}
|
|
625
|
-
}, [
|
|
666
|
+
}, [
|
|
667
|
+
emitFiles,
|
|
668
|
+
uploadState,
|
|
669
|
+
updateUploadState
|
|
670
|
+
]);
|
|
626
671
|
return /* @__PURE__ */ jsxs(FormField, {
|
|
672
|
+
ref,
|
|
673
|
+
onBlurCapture: onBlur,
|
|
627
674
|
...formFieldProps,
|
|
628
675
|
labelProps,
|
|
629
676
|
className: clsx("w-full", className),
|
|
630
677
|
children: [/* @__PURE__ */ jsx("div", {
|
|
631
|
-
|
|
678
|
+
role: "group",
|
|
679
|
+
"aria-label": label,
|
|
680
|
+
"aria-describedby": [rest["aria-describedby"], resolvedError ? resolvedErrorId : void 0].filter(Boolean).join(" ") || void 0,
|
|
681
|
+
className: "flex w-full items-center justify-between gap-2",
|
|
632
682
|
children: /* @__PURE__ */ jsx($070c0dd15dc89b58$export$3c6489d84dc98b6, {
|
|
633
683
|
...rest,
|
|
634
684
|
"data-rac": "",
|
|
635
685
|
"data-disabled": isDisabled || void 0,
|
|
636
686
|
"data-is-disabled": isDisabled || void 0,
|
|
637
|
-
"data-invalid": !!
|
|
687
|
+
"data-invalid": !!resolvedError || void 0,
|
|
638
688
|
"data-multiple": allowsMultiple || void 0,
|
|
639
689
|
"data-has-files": uploadState.length > 0 || void 0,
|
|
640
690
|
"data-filled": !allowsMultiple && uploadState[0]?.state === "uploaded" || void 0,
|
|
@@ -643,7 +693,7 @@ const FileUploadBase = (props) => {
|
|
|
643
693
|
className: fileUploadDropZoneCva({
|
|
644
694
|
variant,
|
|
645
695
|
isContainer: !!children,
|
|
646
|
-
className: "group/
|
|
696
|
+
className: "group/upload-drop-zone"
|
|
647
697
|
}),
|
|
648
698
|
children: children ? /* @__PURE__ */ jsxs(Fragment$1, { children: [children({
|
|
649
699
|
files: uploadState,
|
|
@@ -659,7 +709,7 @@ const FileUploadBase = (props) => {
|
|
|
659
709
|
uploadText,
|
|
660
710
|
browseText,
|
|
661
711
|
browseButtonProps,
|
|
662
|
-
className: "group-drop-target/
|
|
712
|
+
className: "group-drop-target/upload-drop-zone:flex! absolute top-1/2 left-1/2 z-overlay-above hidden -translate-x-1/2 -translate-y-1/2 flex-col"
|
|
663
713
|
})] }) : /* @__PURE__ */ jsx(FileUploadContent, {
|
|
664
714
|
...rest,
|
|
665
715
|
variant,
|
|
@@ -693,27 +743,7 @@ const FileUploadBase = (props) => {
|
|
|
693
743
|
}))]
|
|
694
744
|
});
|
|
695
745
|
};
|
|
696
|
-
const FileUploadComponent = (props) => {
|
|
697
|
-
if ("field" in props && props.field) {
|
|
698
|
-
const { field, ref, ...innerProps } = props;
|
|
699
|
-
return /* @__PURE__ */ jsx(FieldController, {
|
|
700
|
-
control: field.form,
|
|
701
|
-
name: field.name,
|
|
702
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(FileUploadBase, {
|
|
703
|
-
...innerProps,
|
|
704
|
-
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, field.ref),
|
|
705
|
-
value: field.value,
|
|
706
|
-
onChange: ((value) => {
|
|
707
|
-
field.onChange(value);
|
|
708
|
-
field.onBlur();
|
|
709
|
-
}),
|
|
710
|
-
isDisabled: field.disabled || props.isDisabled,
|
|
711
|
-
error: props.error ?? error?.message
|
|
712
|
-
})
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
return /* @__PURE__ */ jsx(FileUploadBase, { ...props });
|
|
716
|
-
};
|
|
746
|
+
const FileUploadComponent = (props) => /* @__PURE__ */ jsx(FileUploadBase, { ...props });
|
|
717
747
|
const FileUpload = memo(FileUploadComponent);
|
|
718
748
|
//#endregion
|
|
719
|
-
export { FileUpload as t };
|
|
749
|
+
export { FileUploadBase as n, FileUpload as t };
|