@povio/ui 3.4.0-rc.15 → 3.4.0-rc.17
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 +1 -1
- package/dist/assets/locales/en/{translation.json.js → translation.js} +1 -0
- package/dist/assets/locales/sl/{translation.json.js → translation.js} +1 -0
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +39 -40
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +5 -5
- package/dist/components/Menu/MenuDesktop.js +2 -2
- package/dist/components/Menu/MenuItem.d.ts +6 -3
- package/dist/components/Menu/MenuItem.js +2 -2
- package/dist/components/Menu/MenuMobile.js +3 -3
- package/dist/components/Menu/MenuPopover.d.ts +7 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/Menu/menu.cva.d.ts +35 -35
- package/dist/components/Menu/menu.cva.js +4 -4
- package/dist/components/accordion.d.ts +5 -0
- package/dist/components/accordion.js +81 -0
- package/dist/components/action-modal.d.ts +26 -0
- package/dist/components/action-modal.js +188 -0
- package/dist/components/alert.d.ts +14 -0
- package/dist/components/alert.js +114 -0
- package/dist/components/autocomplete.d.ts +16 -0
- package/dist/components/{inputs/Selection/Autocomplete/Autocomplete.js → autocomplete.js} +34 -64
- package/dist/components/bottom-sheet.d.ts +34 -0
- package/dist/components/{overlays/BottomSheet/BottomSheet.js → bottom-sheet.js} +17 -14
- package/dist/components/breadcrumbs.d.ts +19 -0
- package/dist/components/breadcrumbs.js +263 -0
- package/dist/components/button.d.ts +3 -0
- package/dist/components/button.js +2 -0
- package/dist/components/buttons/Button/Button.d.ts +25 -23
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/Button/button.cva.d.ts +89 -95
- package/dist/components/buttons/Button/button.cva.js +8 -44
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -38
- package/dist/components/buttons/PillButton/pillButton.cva.js +5 -5
- package/dist/components/buttons/shared/ButtonContent.js +81 -23
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +6 -8
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -1
- package/dist/components/checkbox-group.d.ts +28 -0
- package/dist/components/checkbox-group.js +163 -0
- package/dist/components/checkbox.d.ts +24 -0
- package/dist/components/checkbox.js +80 -0
- package/dist/components/date-picker.d.ts +2 -0
- package/dist/components/date-picker.js +2 -0
- package/dist/components/date-range-picker.d.ts +2 -0
- package/dist/components/date-range-picker.js +2 -0
- package/dist/components/date-time-picker.d.ts +2 -0
- package/dist/components/date-time-picker.js +2 -0
- package/dist/components/drawer.d.ts +18 -0
- package/dist/components/{overlays/Drawer/Drawer.js → drawer.js} +4 -4
- package/dist/components/file-upload-container.d.ts +5 -0
- package/dist/components/file-upload-container.js +15 -0
- package/dist/components/file-upload.d.ts +7 -0
- package/dist/components/{inputs/File/FileUpload.js → file-upload.js} +59 -98
- package/dist/components/form-field.d.ts +24 -0
- package/dist/components/form-field.js +47 -0
- package/dist/components/icon-button.d.ts +14 -0
- package/dist/components/{buttons/IconButton/IconButton.js → icon-button.js} +3 -3
- package/dist/components/inline-icon-button.d.ts +16 -0
- package/dist/components/inline-icon-button.js +40 -0
- package/dist/components/input-upload.d.ts +7 -0
- package/dist/components/input-upload.js +118 -0
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +1 -1
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +73 -89
- package/dist/components/inputs/Checkbox/checkbox.cva.js +8 -8
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +40 -37
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +44 -36
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +46 -43
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +174 -170
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +41 -38
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -20
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +29 -26
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +166 -542
- package/dist/components/inputs/DateTime/shared/Calendar.js +17 -14
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +18 -18
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +6 -5
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +9 -8
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +45 -45
- package/dist/components/inputs/DateTime/shared/DateField.js +19 -20
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +11 -45
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +3 -3
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +26 -102
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +29 -84
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +3 -3
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +59 -104
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +113 -283
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +73 -216
- package/dist/components/inputs/DateTime/shared/YearPicker.js +69 -120
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +8 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -15
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +1 -1
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +13 -52
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.js +1 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +13 -12
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +12 -26
- package/dist/components/inputs/File/fileUpload.types.d.ts +87 -84
- package/dist/components/inputs/File/inputUpload.types.d.ts +34 -32
- package/dist/components/inputs/File/inputUpload.types.js +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +47 -110
- package/dist/components/inputs/File/shared/FileCardList.js +16 -54
- package/dist/components/inputs/File/shared/FileUploadContent.js +47 -188
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentError.js +6 -6
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +6 -6
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +3 -3
- package/dist/components/inputs/File/shared/InputUploadContent.js +38 -151
- package/dist/components/inputs/File/shared/InputUploadFilled.js +10 -50
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +6 -4
- package/dist/components/inputs/File/shared/ProgressBar.js +2 -2
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +17 -16
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +24 -25
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +5 -5
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +34 -33
- package/dist/components/inputs/File/shared/progressBar.cva.js +5 -5
- package/dist/components/inputs/FormField/FormFieldError.d.ts +9 -6
- package/dist/components/inputs/FormField/FormFieldError.js +6 -24
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +15 -13
- package/dist/components/inputs/FormField/FormFieldHeader.js +24 -80
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +7 -25
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldError.cva.js +1 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +1 -1
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +1 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +11 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +121 -554
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -7
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +1 -1
- package/dist/components/inputs/Input/shared/InputContent.d.ts +25 -27
- package/dist/components/inputs/Input/shared/InputContent.js +61 -195
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +1 -1
- package/dist/components/inputs/Inputs/Form.d.ts +19 -19
- package/dist/components/inputs/Inputs/Form.js +23 -51
- package/dist/components/inputs/Inputs/InputItem.d.ts +77 -58
- package/dist/components/inputs/Inputs/InputItem.js +29 -78
- package/dist/components/inputs/Inputs/Inputs.d.ts +12 -9
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +49 -59
- package/dist/components/inputs/RadioGroup/radio.cva.js +6 -6
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +25 -38
- package/dist/components/inputs/Selection/Select/Select.d.ts +15 -11
- package/dist/components/inputs/Selection/Select/Select.js +36 -112
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +39 -37
- package/dist/components/inputs/Selection/shared/SelectBase.js +26 -70
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +145 -393
- package/dist/components/inputs/Selection/shared/SelectInput.js +162 -429
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +27 -101
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +24 -72
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +10 -59
- package/dist/components/inputs/Selection/shared/SelectMobile.js +4 -4
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +14 -39
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +8 -15
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +6 -6
- package/dist/components/inputs/Selection/shared/select.context.js +52 -52
- package/dist/components/inputs/Selection/shared/select.types.d.ts +60 -62
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +8 -5
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -11
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -15
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +3 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +12 -12
- package/dist/components/inputs/Skeleton/InputFrame.js +30 -30
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +24 -20
- package/dist/components/inputs/TextEditor/TextEditor.js +22 -63
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +31 -103
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +48 -197
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +33 -93
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +55 -127
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +39 -142
- package/dist/components/inputs/TextEditor/textEditor.types.js +1 -1
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +15 -18
- package/dist/components/inputs/Toggle/toggle.cva.js +3 -3
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.js +31 -103
- package/dist/components/inputs/shared/TooltipWrapper.js +14 -49
- package/dist/components/inputs/shared/form.binding.d.ts +7 -27
- package/dist/components/inputs/shared/form.binding.js +8 -37
- package/dist/components/inputs/shared/form.types.d.ts +11 -11
- package/dist/components/inputs/shared/form.types.js +1 -1
- package/dist/components/inputs/shared/input.cva.d.ts +76 -85
- package/dist/components/inputs/shared/input.cva.js +9 -19
- package/dist/components/inputs/shared/label.cva.d.ts +18 -18
- package/dist/components/inputs/shared/label.cva.js +2 -2
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +10 -7
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +1 -1
- package/dist/components/inputs/shared/useFieldAccessibility.js +19 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +50 -105
- package/dist/components/link.d.ts +11 -0
- package/dist/components/{text/Link/Link.js → link.js} +7 -7
- package/dist/components/loader.d.ts +7 -0
- package/dist/components/{status/Loader/Loader.js → loader.js} +2 -2
- package/dist/components/menu.d.ts +23 -0
- package/dist/components/{Menu/Menu.js → menu.js} +4 -4
- package/dist/components/modal.d.ts +2 -0
- package/dist/components/modal.js +2 -0
- package/dist/components/navigation/Accordion/AccordionItem.js +87 -42
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +76 -100
- package/dist/components/navigation/Accordion/accordion.cva.js +10 -10
- package/dist/components/navigation/Accordion/accordion.types.d.ts +52 -49
- package/dist/components/navigation/Stepper/StepperItem.js +3 -3
- package/dist/components/navigation/Stepper/StepperSeparator.js +1 -1
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +73 -86
- package/dist/components/navigation/Stepper/stepper.cva.js +7 -7
- package/dist/components/navigation/Stepper/stepper.types.d.ts +29 -37
- package/dist/components/number-input.d.ts +27 -0
- package/dist/components/number-input.js +245 -0
- package/dist/components/number-range-input.d.ts +39 -0
- package/dist/components/number-range-input.js +267 -0
- package/dist/components/outline.clsx.d.ts +4 -2
- package/dist/components/outline.clsx.js +2 -2
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +3 -3
- package/dist/components/overlays/Modal/Modal.d.ts +18 -14
- package/dist/components/overlays/Modal/Modal.js +4 -2
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -34
- package/dist/components/overlays/Modal/modal.cva.js +4 -4
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +39 -45
- package/dist/components/overlays/Tooltip/tooltip.cva.js +4 -4
- package/dist/components/pagination.d.ts +12 -0
- package/dist/components/pagination.js +131 -0
- package/dist/components/password-input.d.ts +10 -0
- package/dist/components/password-input.js +23 -0
- package/dist/components/pill-button.d.ts +15 -0
- package/dist/components/{buttons/PillButton/PillButton.js → pill-button.js} +5 -5
- package/dist/components/pill.d.ts +18 -0
- package/dist/components/{text/Pill/Pill.js → pill.js} +6 -6
- package/dist/components/query-autocomplete.d.ts +8 -0
- package/dist/components/query-autocomplete.js +105 -0
- package/dist/components/query-select.d.ts +19 -0
- package/dist/components/query-select.js +115 -0
- package/dist/components/radio-group.d.ts +24 -0
- package/dist/components/radio-group.js +165 -0
- package/dist/components/responsive-popover.d.ts +19 -0
- package/dist/components/responsive-popover.js +126 -0
- package/dist/components/segment/SegmentItem.js +3 -3
- package/dist/components/segment/segment.cva.d.ts +20 -18
- package/dist/components/segment/segment.cva.js +2 -2
- package/dist/components/segment/segment.types.d.ts +33 -30
- package/dist/components/segment.d.ts +7 -0
- package/dist/components/{segment/Segment.js → segment.js} +8 -8
- package/dist/components/select.d.ts +4 -0
- package/dist/components/select.js +2 -0
- package/dist/components/shared/pagination/PaginationList.d.ts +17 -14
- package/dist/components/shared/pagination/PaginationList.js +2 -2
- package/dist/components/shared/pagination/minWidth.cva.js +1 -1
- package/dist/components/shared/popover.cva.d.ts +8 -7
- package/dist/components/shared/popover.cva.js +1 -1
- package/dist/components/slider.d.ts +22 -0
- package/dist/components/slider.js +103 -0
- package/dist/components/split-button.d.ts +15 -0
- package/dist/components/{buttons/SplitButton/SplitButton.js → split-button.js} +5 -5
- package/dist/components/status/Alert/alert.cva.d.ts +21 -18
- package/dist/components/status/Alert/alert.cva.js +1 -1
- package/dist/components/status/Loader/loader.cva.d.ts +23 -26
- package/dist/components/status/Loader/loader.cva.js +4 -4
- package/dist/components/status/Toast/toast.cva.d.ts +58 -77
- package/dist/components/status/Toast/toast.cva.js +6 -6
- package/dist/components/status/Toast/useToast.d.ts +14 -11
- package/dist/components/status/Toast/useToast.js +2 -2
- package/dist/components/status/shared/status.cva.d.ts +32 -28
- package/dist/components/status/shared/status.cva.js +2 -2
- package/dist/components/stepper.d.ts +5 -0
- package/dist/components/stepper.js +79 -0
- package/dist/components/table/CellText.d.ts +10 -7
- package/dist/components/table/CellText.js +4 -3
- package/dist/components/table/ColumnConfig.d.ts +12 -9
- package/dist/components/table/ColumnConfig.js +8 -7
- package/dist/components/table/HeaderText.d.ts +10 -7
- package/dist/components/table/HeaderText.js +4 -3
- package/dist/components/table/InfiniteTable.d.ts +10 -8
- package/dist/components/table/InfiniteTable.js +68 -17
- package/dist/components/table/PaginatedTable.d.ts +12 -10
- package/dist/components/table/PaginatedTable.js +2 -2
- package/dist/components/table/Table.d.ts +34 -35
- package/dist/components/table/Table.js +19 -17
- package/dist/components/table/table.cva.d.ts +40 -59
- package/dist/components/table/table.cva.js +7 -7
- package/dist/components/tag.d.ts +18 -0
- package/dist/components/{text/Tag/Tag.js → tag.js} +6 -6
- package/dist/components/text/Link/link.cva.d.ts +14 -11
- package/dist/components/text/Link/link.cva.js +1 -1
- package/dist/components/text/Tag/tag.cva.d.ts +18 -15
- package/dist/components/text/Tag/tag.cva.js +1 -1
- package/dist/components/text/Typography/typography.cva.d.ts +51 -48
- package/dist/components/text/Typography/typography.cva.js +1 -1
- package/dist/components/text-area.d.ts +21 -0
- package/dist/components/text-area.js +138 -0
- package/dist/components/text-button.d.ts +15 -0
- package/dist/components/{buttons/TextButton/TextButton.js → text-button.js} +2 -2
- package/dist/components/text-input.d.ts +27 -0
- package/dist/components/text-input.js +241 -0
- package/dist/components/time-picker.d.ts +2 -0
- package/dist/components/time-picker.js +2 -0
- package/dist/components/toast.d.ts +17 -0
- package/dist/components/{status/Toast/Toast.js → toast.js} +11 -11
- package/dist/components/toggle-button.d.ts +12 -0
- package/dist/components/{buttons/ToggleButton/ToggleButton.js → toggle-button.js} +2 -2
- package/dist/components/toggle.d.ts +19 -0
- package/dist/components/toggle.js +74 -0
- package/dist/components/tooltip-ellipsis.d.ts +11 -0
- package/dist/components/{overlays/Tooltip/TooltipEllipsis.js → tooltip-ellipsis.js} +3 -3
- package/dist/components/tooltip.d.ts +16 -0
- package/dist/components/{overlays/Tooltip/Tooltip.js → tooltip.js} +9 -9
- package/dist/components/typography.d.ts +12 -0
- package/dist/components/typography.js +31 -0
- package/dist/config/confirmation.context.d.ts +22 -19
- package/dist/config/confirmation.context.js +3 -3
- package/dist/config/i18n.d.ts +311 -308
- package/dist/config/i18n.js +4 -4
- package/dist/config/link.context.d.ts +9 -7
- package/dist/config/link.context.js +2 -2
- package/dist/config/router.context.d.ts +11 -9
- package/dist/config/router.context.js +2 -2
- package/dist/config/theme.context.d.ts +19 -16
- package/dist/config/theme.context.js +99 -46
- package/dist/config/uiConfig.context.d.ts +80 -75
- package/dist/config/uiConfig.context.js +46 -9
- package/dist/config/uiOverrides.context.d.ts +205 -204
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +27 -28
- package/dist/helpers/dynamicColumns.js +32 -31
- package/dist/helpers/dynamicInputs.d.ts +66 -74
- package/dist/helpers/dynamicInputs.js +21 -20
- package/dist/hooks/useAutosave.d.ts +12 -9
- package/dist/hooks/useAutosave.js +1 -1
- package/dist/hooks/useBreakpoint.d.ts +4 -2
- package/dist/hooks/useBreakpoint.js +37 -10
- package/dist/hooks/useDebounceCallback.d.ts +7 -4
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useDeepCompare.d.ts +7 -4
- package/dist/hooks/useDeepCompare.js +4 -4
- package/dist/hooks/useFilters.d.ts +10 -7
- package/dist/hooks/useFilters.js +8 -6
- package/dist/hooks/useForm.d.ts +35 -35
- package/dist/hooks/useForm.js +6 -6
- package/dist/hooks/useFormAutosave.d.ts +16 -13
- package/dist/hooks/useFormAutosave.js +18 -17
- package/dist/hooks/useIntersectionObserver.d.ts +7 -5
- package/dist/hooks/useIntersectionObserver.js +2 -2
- package/dist/hooks/useKeyInteractions.d.ts +19 -16
- package/dist/hooks/useKeyInteractions.js +5 -5
- package/dist/hooks/useLocalStorage.d.ts +10 -8
- package/dist/hooks/useLocalStorage.js +3 -3
- package/dist/hooks/useLongPressRepeat.d.ts +10 -7
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.d.ts +9 -6
- package/dist/hooks/usePagination.js +2 -2
- package/dist/hooks/useQueryAutocomplete.js +2 -2
- package/dist/hooks/useScrollableListBox.d.ts +5 -2
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.d.ts +8 -5
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.d.ts +5 -3
- package/dist/hooks/useStateAndRef.js +2 -2
- package/dist/hooks/useTableColumnConfig.d.ts +15 -13
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/hooks/useTableNav.d.ts +79 -77
- package/dist/hooks/useTableNav.js +19 -37
- package/dist/hooks/useTranslationMemo.d.ts +5 -3
- package/dist/index.d.ts +145 -1
- package/dist/index.js +29 -29
- package/dist/rhf/Inputs.d.ts +55 -54
- package/dist/rhf/Inputs.js +62 -17
- package/dist/rhf/autocomplete.d.ts +3 -0
- package/dist/rhf/autocomplete.js +2 -0
- package/dist/rhf/checkbox-group.d.ts +3 -0
- package/dist/rhf/checkbox-group.js +2 -0
- package/dist/rhf/checkbox.d.ts +3 -0
- package/dist/rhf/checkbox.js +2 -0
- package/dist/rhf/components.d.ts +77 -75
- package/dist/rhf/components.js +43 -43
- package/dist/rhf/date-picker.d.ts +3 -0
- package/dist/rhf/date-picker.js +2 -0
- package/dist/rhf/date-range-picker.d.ts +3 -0
- package/dist/rhf/date-range-picker.js +2 -0
- package/dist/rhf/date-time-picker.d.ts +3 -0
- package/dist/rhf/date-time-picker.js +2 -0
- package/dist/rhf/dynamicInputs.d.ts +16 -14
- package/dist/rhf/dynamicInputs.js +1 -1
- package/dist/rhf/entry.utils.js +5 -0
- package/dist/rhf/fieldAdapter.d.ts +8 -6
- package/dist/rhf/form.types.d.ts +11 -10
- package/dist/rhf/number-input.d.ts +8 -0
- package/dist/rhf/number-input.js +7 -0
- package/dist/rhf/number-range-input.d.ts +8 -0
- package/dist/rhf/number-range-input.js +7 -0
- package/dist/rhf/password-input.d.ts +8 -0
- package/dist/rhf/password-input.js +7 -0
- package/dist/rhf/query-autocomplete.d.ts +2 -0
- package/dist/rhf/query-autocomplete.js +2 -0
- package/dist/rhf/query-select.d.ts +2 -0
- package/dist/rhf/query-select.js +2 -0
- package/dist/rhf/radio-group.d.ts +3 -0
- package/dist/rhf/radio-group.js +2 -0
- package/dist/rhf/segment.d.ts +3 -0
- package/dist/rhf/segment.js +2 -0
- package/dist/rhf/select.d.ts +3 -0
- package/dist/rhf/select.js +2 -0
- package/dist/rhf/slider.d.ts +3 -0
- package/dist/rhf/slider.js +2 -0
- package/dist/rhf/text-area.d.ts +8 -0
- package/dist/rhf/text-area.js +7 -0
- package/dist/rhf/text-input.d.ts +8 -0
- package/dist/rhf/text-input.js +7 -0
- package/dist/rhf/time-picker.d.ts +3 -0
- package/dist/rhf/time-picker.js +2 -0
- package/dist/rhf/toggle.d.ts +3 -0
- package/dist/rhf/toggle.js +2 -0
- package/dist/rhf/useAutosave.d.ts +12 -9
- package/dist/rhf/useForm.d.ts +13 -13
- package/dist/rhf/useFormAutosave.d.ts +17 -14
- package/dist/rhf/useFormAutosave.js +121 -34
- package/dist/rhf.d.ts +146 -225
- package/dist/rhf.js +120 -0
- package/dist/tanstack/autocomplete.d.ts +2 -0
- package/dist/tanstack/autocomplete.js +2 -0
- package/dist/tanstack/checkbox-group.d.ts +2 -0
- package/dist/tanstack/checkbox-group.js +2 -0
- package/dist/tanstack/checkbox.d.ts +2 -0
- package/dist/tanstack/checkbox.js +2 -0
- package/dist/tanstack/date-picker.d.ts +2 -0
- package/dist/tanstack/date-picker.js +2 -0
- package/dist/tanstack/date-range-picker.d.ts +2 -0
- package/dist/tanstack/date-range-picker.js +2 -0
- package/dist/tanstack/date-time-picker.d.ts +2 -0
- package/dist/tanstack/date-time-picker.js +2 -0
- package/dist/tanstack/form.d.ts +3 -0
- package/dist/tanstack/form.js +3 -0
- package/dist/tanstack/number-input.d.ts +2 -0
- package/dist/tanstack/number-input.js +2 -0
- package/dist/tanstack/number-range-input.d.ts +3 -0
- package/dist/tanstack/number-range-input.js +2 -0
- package/dist/tanstack/password-input.d.ts +2 -0
- package/dist/tanstack/password-input.js +2 -0
- package/dist/tanstack/query-autocomplete.d.ts +2 -0
- package/dist/tanstack/query-autocomplete.js +2 -0
- package/dist/tanstack/query-select.d.ts +2 -0
- package/dist/tanstack/query-select.js +2 -0
- package/dist/tanstack/radio-group.d.ts +2 -0
- package/dist/tanstack/radio-group.js +2 -0
- package/dist/tanstack/segment.d.ts +3 -0
- package/dist/tanstack/segment.js +2 -0
- package/dist/tanstack/select.d.ts +2 -0
- package/dist/tanstack/select.js +2 -0
- package/dist/tanstack/slider.d.ts +2 -0
- package/dist/tanstack/slider.js +2 -0
- package/dist/tanstack/table.d.ts +12 -0
- package/dist/tanstack/table.js +11 -0
- package/dist/tanstack/text-area.d.ts +2 -0
- package/dist/tanstack/text-area.js +2 -0
- package/dist/tanstack/text-input.d.ts +2 -0
- package/dist/tanstack/text-input.js +2 -0
- package/dist/tanstack/time-picker.d.ts +2 -0
- package/dist/tanstack/time-picker.js +2 -0
- package/dist/tanstack/toggle.d.ts +2 -0
- package/dist/tanstack/toggle.js +2 -0
- package/dist/tanstack.d.ts +151 -224
- package/dist/tanstack.js +45 -45
- package/dist/text-editor.d.ts +2 -2
- package/dist/tw-ui-plugin.d.ts +4 -2
- package/dist/tw-ui-plugin.js +1 -1
- package/dist/types/common.d.ts +11 -12
- package/dist/types/error-handling.d.ts +8 -5
- package/dist/utils/array.utils.d.ts +5 -2
- package/dist/utils/array.utils.js +1 -1
- package/dist/utils/compoundMapper.d.ts +12 -14
- package/dist/utils/compoundMapper.js +1 -1
- package/dist/utils/date-time.utils.d.ts +44 -41
- package/dist/utils/date-time.utils.js +7 -9
- package/dist/utils/date.utils.d.ts +6 -4
- package/dist/utils/date.utils.js +29 -6
- package/dist/utils/dom.utils.d.ts +7 -4
- package/dist/utils/dom.utils.js +2 -2
- package/dist/utils/file.utils.d.ts +20 -12
- package/dist/utils/file.utils.js +19 -8
- package/dist/utils/intl.utils.d.ts +7 -5
- package/dist/utils/intl.utils.js +2 -2
- package/dist/utils/isEqual.d.ts +4 -1
- package/dist/utils/isEqual.js +3 -3
- package/dist/utils/logger.d.ts +9 -6
- package/dist/utils/logger.js +1 -1
- package/dist/utils/object.utils.d.ts +12 -9
- package/dist/utils/object.utils.js +1 -1
- package/dist/utils/queries.utils.d.ts +6 -3
- package/dist/utils/queries.utils.js +1 -1
- package/dist/utils/query.utils.js +1 -1
- package/dist/utils/routing.utils.d.ts +6 -3
- package/dist/utils/routing.utils.js +1 -1
- package/dist/utils/string.utils.d.ts +6 -3
- package/dist/utils/string.utils.js +1 -1
- package/dist/utils/style-merge.util.d.ts +38 -41
- package/dist/utils/style-merge.util.js +7 -4
- package/dist/utils/zod.utils.d.ts +22 -19
- package/dist/utils/zod.utils.js +1 -1
- package/package.json +475 -8
- package/dist/assets/locales/en/translation.json.d.ts +0 -158
- package/dist/assets/locales/sl/translation.json.d.ts +0 -154
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -16
- package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -112
- package/dist/components/Menu/Menu.d.ts +0 -21
- package/dist/components/Menu/MenuDesktop.d.ts +0 -2
- package/dist/components/Menu/MenuMobile.d.ts +0 -2
- package/dist/components/buttons/IconButton/IconButton.d.ts +0 -11
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +0 -13
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +0 -15
- package/dist/components/buttons/PillButton/PillButton.d.ts +0 -12
- package/dist/components/buttons/SplitButton/SplitButton.d.ts +0 -12
- package/dist/components/buttons/TextButton/TextButton.d.ts +0 -12
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +0 -9
- package/dist/components/buttons/shared/ButtonContent.d.ts +0 -14
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -20
- package/dist/components/inputs/Checkbox/Checkbox.js +0 -236
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +0 -9
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +0 -26
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +0 -392
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +0 -29
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +0 -22
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +0 -27
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +0 -17
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +0 -21
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -28
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +0 -8
- package/dist/components/inputs/DateTime/shared/MonthPicker.d.ts +0 -11
- package/dist/components/inputs/DateTime/shared/RangeCalendar.d.ts +0 -26
- package/dist/components/inputs/DateTime/shared/TimeField.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/TimePickerForm.d.ts +0 -10
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +0 -25
- package/dist/components/inputs/DateTime/shared/YearPicker.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -41
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +0 -2
- package/dist/components/inputs/File/FileUpload.d.ts +0 -4
- package/dist/components/inputs/File/FileUploadContainer.d.ts +0 -3
- package/dist/components/inputs/File/FileUploadContainer.js +0 -22
- package/dist/components/inputs/File/InputUpload.d.ts +0 -4
- package/dist/components/inputs/File/InputUpload.js +0 -157
- package/dist/components/inputs/File/index.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCard.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCardList.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContent.d.ts +0 -10
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContentError.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentFilled.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentLoading.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadContent.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadFilled.d.ts +0 -8
- package/dist/components/inputs/FormField/FormField.d.ts +0 -20
- package/dist/components/inputs/FormField/FormField.js +0 -127
- package/dist/components/inputs/FormField/FormFieldHeaderClose.d.ts +0 -5
- package/dist/components/inputs/FormField/FormFieldHelper.d.ts +0 -8
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +0 -13
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +0 -23
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +0 -494
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -36
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -338
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +0 -7
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +0 -61
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +0 -19
- package/dist/components/inputs/Input/TextArea/TextArea.js +0 -346
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +0 -23
- package/dist/components/inputs/Input/TextInput/TextInput.js +0 -470
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +0 -22
- package/dist/components/inputs/RadioGroup/RadioGroup.js +0 -371
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +0 -12
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +0 -4
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +0 -176
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -15
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -172
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +0 -15
- package/dist/components/inputs/Selection/shared/SelectInputTags.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.d.ts +0 -7
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +0 -4
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/select.context.d.ts +0 -32
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/useSelectItems.d.ts +0 -23
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -84
- package/dist/components/inputs/Slider/Slider.d.ts +0 -19
- package/dist/components/inputs/Slider/Slider.js +0 -285
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +0 -7
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +0 -10
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +0 -6
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/textEditor.types.d.ts +0 -5
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -16
- package/dist/components/inputs/Toggle/Toggle.js +0 -234
- package/dist/components/inputs/shared/CheckContent.d.ts +0 -9
- package/dist/components/inputs/shared/InputClear.d.ts +0 -10
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +0 -10
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -15
- package/dist/components/navigation/Accordion/Accordion.d.ts +0 -3
- package/dist/components/navigation/Accordion/Accordion.js +0 -34
- package/dist/components/navigation/Accordion/AccordionItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/Stepper.d.ts +0 -2
- package/dist/components/navigation/Stepper/Stepper.js +0 -34
- package/dist/components/navigation/Stepper/StepperItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/StepperSeparator.d.ts +0 -5
- package/dist/components/overlays/ActionModal/ActionModal.d.ts +0 -24
- package/dist/components/overlays/ActionModal/ActionModal.js +0 -54
- package/dist/components/overlays/BottomSheet/BottomSheet.d.ts +0 -32
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.d.ts +0 -13
- package/dist/components/overlays/Drawer/Drawer.d.ts +0 -15
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +0 -17
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +0 -45
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +0 -13
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +0 -8
- package/dist/components/segment/Segment.d.ts +0 -4
- package/dist/components/segment/SegmentItem.d.ts +0 -2
- package/dist/components/shared/pagination/Pagination.d.ts +0 -9
- package/dist/components/shared/pagination/Pagination.js +0 -45
- package/dist/components/shared/pagination/minWidth.cva.d.ts +0 -3
- package/dist/components/status/Alert/Alert.d.ts +0 -11
- package/dist/components/status/Alert/Alert.js +0 -47
- package/dist/components/status/Loader/Loader.d.ts +0 -5
- package/dist/components/status/Toast/Toast.d.ts +0 -14
- package/dist/components/text/Link/Link.d.ts +0 -9
- package/dist/components/text/Pill/Pill.d.ts +0 -15
- package/dist/components/text/Tag/Tag.d.ts +0 -15
- package/dist/components/text/Typography/Typography.d.ts +0 -11
- package/dist/components/text/Typography/Typography.js +0 -16
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -13
- package/dist/rhf/entrypoints.type-test.d.ts +0 -1
- package/dist/types/react-query.d.ts +0 -6
- package/dist/utils/array.utils.spec.d.ts +0 -1
- package/dist/utils/compoundMapper.spec.d.ts +0 -1
- package/dist/utils/date-time.utils.spec.d.ts +0 -1
- package/dist/utils/date.utils.spec.d.ts +0 -1
- package/dist/utils/intl.utils.spec.d.ts +0 -1
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/rest.utils.d.ts +0 -10
- package/dist/utils/rest.utils.js +0 -33
- package/dist/utils/style-merge.util.spec.d.ts +0 -1
|
@@ -1,60 +1,22 @@
|
|
|
1
1
|
import { FileCard } from "./FileCard.js";
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
|
-
import {
|
|
3
|
+
import { memo } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/inputs/File/shared/FileCardList.tsx
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
as,
|
|
22
|
-
state,
|
|
23
|
-
isDisabled,
|
|
24
|
-
browseButtonProps,
|
|
25
|
-
cancelButtonProps,
|
|
26
|
-
onRemove,
|
|
27
|
-
onCancel
|
|
28
|
-
}, state.file?.name ?? state.displayName ?? state.id ?? state.src);
|
|
29
|
-
$[10] = as;
|
|
30
|
-
$[11] = browseButtonProps;
|
|
31
|
-
$[12] = cancelButtonProps;
|
|
32
|
-
$[13] = isDisabled;
|
|
33
|
-
$[14] = onCancel;
|
|
34
|
-
$[15] = onRemove;
|
|
35
|
-
$[16] = t3;
|
|
36
|
-
} else t3 = $[16];
|
|
37
|
-
t2 = uploadState.map(t3);
|
|
38
|
-
$[2] = as;
|
|
39
|
-
$[3] = browseButtonProps;
|
|
40
|
-
$[4] = cancelButtonProps;
|
|
41
|
-
$[5] = isDisabled;
|
|
42
|
-
$[6] = onCancel;
|
|
43
|
-
$[7] = onRemove;
|
|
44
|
-
$[8] = uploadState;
|
|
45
|
-
$[9] = t2;
|
|
46
|
-
} else t2 = $[9];
|
|
47
|
-
let t3;
|
|
48
|
-
if ($[17] !== t1 || $[18] !== t2) {
|
|
49
|
-
t3 = /* @__PURE__ */ jsx("div", {
|
|
50
|
-
className: t1,
|
|
51
|
-
children: t2
|
|
52
|
-
});
|
|
53
|
-
$[17] = t1;
|
|
54
|
-
$[18] = t2;
|
|
55
|
-
$[19] = t3;
|
|
56
|
-
} else t3 = $[19];
|
|
57
|
-
return t3;
|
|
58
|
-
};
|
|
6
|
+
const FileCardList = memo(({ uploadState, as, isDisabled, browseButtonProps, cancelButtonProps, className, onRemove, onCancel }) => {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", {
|
|
8
|
+
className: clsx("mt-10 flex flex-col items-start gap-4 self-stretch", className),
|
|
9
|
+
children: uploadState.map((state, index) => /* @__PURE__ */ jsx(FileCard, {
|
|
10
|
+
index,
|
|
11
|
+
as,
|
|
12
|
+
state,
|
|
13
|
+
isDisabled,
|
|
14
|
+
browseButtonProps,
|
|
15
|
+
cancelButtonProps,
|
|
16
|
+
onRemove,
|
|
17
|
+
onCancel
|
|
18
|
+
}, state.file?.name ?? state.displayName ?? state.id ?? state.src))
|
|
19
|
+
});
|
|
20
|
+
});
|
|
59
21
|
//#endregion
|
|
60
22
|
export { FileCardList };
|
|
@@ -3,177 +3,55 @@ import { FileUploadContentFilled } from "./FileUploadContentFilled.js";
|
|
|
3
3
|
import { FileUploadContentLoading } from "./FileUploadContentLoading.js";
|
|
4
4
|
import { FileUploadContentEmpty } from "./FileUploadContentEmpty.js";
|
|
5
5
|
import { FileTrigger } from "react-aria-components";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
8
7
|
//#region src/components/inputs/File/shared/FileUploadContent.tsx
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
let emptyText;
|
|
18
|
-
let handleCancelUpload;
|
|
19
|
-
let handleRemove;
|
|
20
|
-
let handleSelect;
|
|
21
|
-
let isDisabled;
|
|
22
|
-
let rest;
|
|
23
|
-
let uploadState;
|
|
24
|
-
let uploadText;
|
|
25
|
-
let variant;
|
|
26
|
-
if ($[0] !== t0) {
|
|
27
|
-
({variant, as, isDisabled, browseText, uploadText, emptyText, uploadState, browseButtonProps, cancelButtonProps, handleCancelUpload, handleRemove, acceptedFileTypes, allowsMultiple, handleSelect, ...rest} = t0);
|
|
28
|
-
$[0] = t0;
|
|
29
|
-
$[1] = acceptedFileTypes;
|
|
30
|
-
$[2] = allowsMultiple;
|
|
31
|
-
$[3] = as;
|
|
32
|
-
$[4] = browseButtonProps;
|
|
33
|
-
$[5] = browseText;
|
|
34
|
-
$[6] = cancelButtonProps;
|
|
35
|
-
$[7] = emptyText;
|
|
36
|
-
$[8] = handleCancelUpload;
|
|
37
|
-
$[9] = handleRemove;
|
|
38
|
-
$[10] = handleSelect;
|
|
39
|
-
$[11] = isDisabled;
|
|
40
|
-
$[12] = rest;
|
|
41
|
-
$[13] = uploadState;
|
|
42
|
-
$[14] = uploadText;
|
|
43
|
-
$[15] = variant;
|
|
44
|
-
} else {
|
|
45
|
-
acceptedFileTypes = $[1];
|
|
46
|
-
allowsMultiple = $[2];
|
|
47
|
-
as = $[3];
|
|
48
|
-
browseButtonProps = $[4];
|
|
49
|
-
browseText = $[5];
|
|
50
|
-
cancelButtonProps = $[6];
|
|
51
|
-
emptyText = $[7];
|
|
52
|
-
handleCancelUpload = $[8];
|
|
53
|
-
handleRemove = $[9];
|
|
54
|
-
handleSelect = $[10];
|
|
55
|
-
isDisabled = $[11];
|
|
56
|
-
rest = $[12];
|
|
57
|
-
uploadState = $[13];
|
|
58
|
-
uploadText = $[14];
|
|
59
|
-
variant = $[15];
|
|
60
|
-
}
|
|
61
|
-
let t1;
|
|
62
|
-
if ($[16] !== uploadState) {
|
|
63
|
-
t1 = uploadState.at(0);
|
|
64
|
-
$[16] = uploadState;
|
|
65
|
-
$[17] = t1;
|
|
66
|
-
} else t1 = $[17];
|
|
67
|
-
const currentState = t1;
|
|
68
|
-
let t2;
|
|
69
|
-
if ($[18] !== acceptedFileTypes || $[19] !== allowsMultiple || $[20] !== handleSelect || $[21] !== rest) {
|
|
70
|
-
t2 = {
|
|
71
|
-
...rest,
|
|
72
|
-
acceptedFileTypes,
|
|
73
|
-
allowsMultiple,
|
|
74
|
-
onSelect: handleSelect
|
|
75
|
-
};
|
|
76
|
-
$[18] = acceptedFileTypes;
|
|
77
|
-
$[19] = allowsMultiple;
|
|
78
|
-
$[20] = handleSelect;
|
|
79
|
-
$[21] = rest;
|
|
80
|
-
$[22] = t2;
|
|
81
|
-
} else t2 = $[22];
|
|
82
|
-
const fileTriggerProps = t2;
|
|
8
|
+
const FileUploadContent = ({ variant, as, isDisabled, browseText, uploadText, emptyText, uploadState, browseButtonProps, cancelButtonProps, handleCancelUpload, handleRemove, acceptedFileTypes, allowsMultiple, handleSelect, ...rest }) => {
|
|
9
|
+
const currentState = uploadState.at(0);
|
|
10
|
+
const fileTriggerProps = {
|
|
11
|
+
...rest,
|
|
12
|
+
acceptedFileTypes,
|
|
13
|
+
allowsMultiple,
|
|
14
|
+
onSelect: handleSelect
|
|
15
|
+
};
|
|
83
16
|
if (!allowsMultiple && currentState) {
|
|
84
|
-
if (currentState.state === "uploading") {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
if (currentState.state === "
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if ($[33] !== as || $[34] !== browseButtonProps || $[35] !== browseText || $[36] !== currentState || $[37] !== fileTriggerProps || $[38] !== isDisabled || $[39] !== t3 || $[40] !== variant) {
|
|
119
|
-
t4 = /* @__PURE__ */ jsx(FileUploadContentFilled, {
|
|
120
|
-
as,
|
|
121
|
-
variant,
|
|
122
|
-
singleFile: true,
|
|
123
|
-
isDisabled,
|
|
124
|
-
state: currentState,
|
|
125
|
-
browseText,
|
|
126
|
-
browseButtonProps,
|
|
127
|
-
fileTriggerProps,
|
|
128
|
-
onRemove: t3
|
|
129
|
-
});
|
|
130
|
-
$[33] = as;
|
|
131
|
-
$[34] = browseButtonProps;
|
|
132
|
-
$[35] = browseText;
|
|
133
|
-
$[36] = currentState;
|
|
134
|
-
$[37] = fileTriggerProps;
|
|
135
|
-
$[38] = isDisabled;
|
|
136
|
-
$[39] = t3;
|
|
137
|
-
$[40] = variant;
|
|
138
|
-
$[41] = t4;
|
|
139
|
-
} else t4 = $[41];
|
|
140
|
-
return t4;
|
|
141
|
-
}
|
|
142
|
-
if (currentState.state === "error") {
|
|
143
|
-
let t3;
|
|
144
|
-
if ($[42] !== currentState.id || $[43] !== handleRemove) {
|
|
145
|
-
t3 = () => {
|
|
146
|
-
handleRemove(currentState.id ?? "");
|
|
147
|
-
};
|
|
148
|
-
$[42] = currentState.id;
|
|
149
|
-
$[43] = handleRemove;
|
|
150
|
-
$[44] = t3;
|
|
151
|
-
} else t3 = $[44];
|
|
152
|
-
let t4;
|
|
153
|
-
if ($[45] !== as || $[46] !== browseButtonProps || $[47] !== currentState || $[48] !== isDisabled || $[49] !== t3 || $[50] !== variant) {
|
|
154
|
-
t4 = /* @__PURE__ */ jsx(FileUploadContentError, {
|
|
155
|
-
as,
|
|
156
|
-
variant,
|
|
157
|
-
singleFile: true,
|
|
158
|
-
isDisabled,
|
|
159
|
-
state: currentState,
|
|
160
|
-
browseButtonProps,
|
|
161
|
-
onRemove: t3
|
|
162
|
-
});
|
|
163
|
-
$[45] = as;
|
|
164
|
-
$[46] = browseButtonProps;
|
|
165
|
-
$[47] = currentState;
|
|
166
|
-
$[48] = isDisabled;
|
|
167
|
-
$[49] = t3;
|
|
168
|
-
$[50] = variant;
|
|
169
|
-
$[51] = t4;
|
|
170
|
-
} else t4 = $[51];
|
|
171
|
-
return t4;
|
|
172
|
-
}
|
|
17
|
+
if (currentState.state === "uploading") return /* @__PURE__ */ jsx(FileUploadContentLoading, {
|
|
18
|
+
index: 0,
|
|
19
|
+
variant,
|
|
20
|
+
as,
|
|
21
|
+
singleFile: true,
|
|
22
|
+
isDisabled,
|
|
23
|
+
state: currentState,
|
|
24
|
+
cancelButtonProps,
|
|
25
|
+
onCancel: handleCancelUpload
|
|
26
|
+
});
|
|
27
|
+
if (currentState.state === "uploaded") return /* @__PURE__ */ jsx(FileUploadContentFilled, {
|
|
28
|
+
as,
|
|
29
|
+
variant,
|
|
30
|
+
singleFile: true,
|
|
31
|
+
isDisabled,
|
|
32
|
+
state: currentState,
|
|
33
|
+
browseText,
|
|
34
|
+
browseButtonProps,
|
|
35
|
+
fileTriggerProps,
|
|
36
|
+
onRemove: () => {
|
|
37
|
+
handleRemove(currentState.id ?? "");
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
if (currentState.state === "error") return /* @__PURE__ */ jsx(FileUploadContentError, {
|
|
41
|
+
as,
|
|
42
|
+
variant,
|
|
43
|
+
singleFile: true,
|
|
44
|
+
isDisabled,
|
|
45
|
+
state: currentState,
|
|
46
|
+
browseButtonProps,
|
|
47
|
+
onRemove: () => {
|
|
48
|
+
handleRemove(currentState.id ?? "");
|
|
49
|
+
}
|
|
50
|
+
});
|
|
173
51
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
52
|
+
return /* @__PURE__ */ jsx(FileTrigger, {
|
|
53
|
+
...fileTriggerProps,
|
|
54
|
+
children: /* @__PURE__ */ jsx(FileUploadContentEmpty, {
|
|
177
55
|
as,
|
|
178
56
|
variant,
|
|
179
57
|
singleFile: true,
|
|
@@ -182,27 +60,8 @@ var FileUploadContent = (t0) => {
|
|
|
182
60
|
uploadText,
|
|
183
61
|
browseText,
|
|
184
62
|
browseButtonProps
|
|
185
|
-
})
|
|
186
|
-
|
|
187
|
-
$[53] = browseButtonProps;
|
|
188
|
-
$[54] = browseText;
|
|
189
|
-
$[55] = emptyText;
|
|
190
|
-
$[56] = isDisabled;
|
|
191
|
-
$[57] = uploadText;
|
|
192
|
-
$[58] = variant;
|
|
193
|
-
$[59] = t3;
|
|
194
|
-
} else t3 = $[59];
|
|
195
|
-
let t4;
|
|
196
|
-
if ($[60] !== fileTriggerProps || $[61] !== t3) {
|
|
197
|
-
t4 = /* @__PURE__ */ jsx(FileTrigger, {
|
|
198
|
-
...fileTriggerProps,
|
|
199
|
-
children: t3
|
|
200
|
-
});
|
|
201
|
-
$[60] = fileTriggerProps;
|
|
202
|
-
$[61] = t3;
|
|
203
|
-
$[62] = t4;
|
|
204
|
-
} else t4 = $[62];
|
|
205
|
-
return t4;
|
|
63
|
+
})
|
|
64
|
+
});
|
|
206
65
|
};
|
|
207
66
|
//#endregion
|
|
208
67
|
export { FileUploadContent };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Typography } from "../../../
|
|
1
|
+
import { Typography } from "../../../typography.js";
|
|
2
2
|
import { Button } from "../../../buttons/Button/Button.js";
|
|
3
|
-
import { TextButton } from "../../../
|
|
3
|
+
import { TextButton } from "../../../text-button.js";
|
|
4
4
|
import { Upload } from "lucide-react";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/inputs/File/shared/FileUploadContentEmpty.tsx
|
|
8
|
-
|
|
8
|
+
const FileUploadContentEmpty = ({ variant, as, isDisabled, title, browseText, uploadText, singleFile, hideButton = false, className, browseButtonProps }) => {
|
|
9
9
|
const { size: browseButtonSize = "xs", variant: browseButtonVariant = "outlined", width: browseButtonWidth = "hug", ...browseButtonRestProps } = browseButtonProps ?? {};
|
|
10
10
|
return /* @__PURE__ */ jsxs("div", {
|
|
11
11
|
className: clsx("flex w-full items-center gap-file-upload-content-gap-text-to-text", className, {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Typography } from "../../../
|
|
1
|
+
import { Typography } from "../../../typography.js";
|
|
2
2
|
import { Button as Button$1 } from "../../../buttons/Button/Button.js";
|
|
3
|
-
import { InlineIconButton } from "../../../
|
|
3
|
+
import { InlineIconButton } from "../../../inline-icon-button.js";
|
|
4
4
|
import "../../../../config/i18n.js";
|
|
5
|
-
import { TextButton } from "../../../
|
|
5
|
+
import { TextButton } from "../../../text-button.js";
|
|
6
6
|
import { CircleAlert, X } from "lucide-react";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { FileTrigger } from "react-aria-components";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
//#region src/components/inputs/File/shared/FileUploadContentError.tsx
|
|
12
|
-
|
|
12
|
+
const FileUploadContentError = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove, browseButtonProps }) => {
|
|
13
13
|
const { t } = useTranslation("ui");
|
|
14
14
|
const { size: browseButtonSize = "xs", variant: browseButtonVariant = "outlined", width: browseButtonWidth = "hug", ...browseButtonRestProps } = browseButtonProps ?? {};
|
|
15
15
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -76,7 +76,7 @@ var FileUploadContentError = ({ variant, as, isDisabled, state, browseText, file
|
|
|
76
76
|
onPress: () => {
|
|
77
77
|
onRemove(state.id ?? "");
|
|
78
78
|
},
|
|
79
|
-
children: t(($
|
|
79
|
+
children: t(($) => $.ui.fileUpload.removeFile)
|
|
80
80
|
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
81
81
|
className: "flex items-center justify-center gap-file-upload-content-gap-button-to-button self-stretch",
|
|
82
82
|
children: [fileTriggerProps && /* @__PURE__ */ jsx(FileTrigger, {
|
|
@@ -101,7 +101,7 @@ var FileUploadContentError = ({ variant, as, isDisabled, state, browseText, file
|
|
|
101
101
|
onPress: () => {
|
|
102
102
|
onRemove(state.id ?? "");
|
|
103
103
|
},
|
|
104
|
-
children: t(($
|
|
104
|
+
children: t(($) => $.ui.fileUpload.removeFile)
|
|
105
105
|
})]
|
|
106
106
|
})
|
|
107
107
|
})]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Typography } from "../../../
|
|
1
|
+
import { Typography } from "../../../typography.js";
|
|
2
2
|
import { Button as Button$1 } from "../../../buttons/Button/Button.js";
|
|
3
|
-
import { InlineIconButton } from "../../../
|
|
3
|
+
import { InlineIconButton } from "../../../inline-icon-button.js";
|
|
4
4
|
import "../../../../config/i18n.js";
|
|
5
|
-
import { TextButton } from "../../../
|
|
5
|
+
import { TextButton } from "../../../text-button.js";
|
|
6
6
|
import { FileUtils } from "../../../../utils/file.utils.js";
|
|
7
7
|
import { CheckCircle, X } from "lucide-react";
|
|
8
8
|
import { clsx } from "clsx";
|
|
@@ -10,7 +10,7 @@ import { FileTrigger } from "react-aria-components";
|
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useTranslation } from "react-i18next";
|
|
12
12
|
//#region src/components/inputs/File/shared/FileUploadContentFilled.tsx
|
|
13
|
-
|
|
13
|
+
const FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove, browseButtonProps }) => {
|
|
14
14
|
const { t } = useTranslation("ui");
|
|
15
15
|
const { size: browseButtonSize = "xs", variant: browseButtonVariant = "outlined", width: browseButtonWidth = "hug", ...browseButtonRestProps } = browseButtonProps ?? {};
|
|
16
16
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -79,7 +79,7 @@ var FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, fil
|
|
|
79
79
|
onPress: () => {
|
|
80
80
|
onRemove(state.id ?? "");
|
|
81
81
|
},
|
|
82
|
-
children: t(($
|
|
82
|
+
children: t(($) => $.ui.fileUpload.removeFile)
|
|
83
83
|
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
84
84
|
className: "flex items-center justify-center gap-file-upload-content-gap-button-to-button self-stretch",
|
|
85
85
|
children: [fileTriggerProps && /* @__PURE__ */ jsx(FileTrigger, {
|
|
@@ -106,7 +106,7 @@ var FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, fil
|
|
|
106
106
|
onRemove(state.id ?? "");
|
|
107
107
|
},
|
|
108
108
|
isDisabled,
|
|
109
|
-
children: t(($
|
|
109
|
+
children: t(($) => $.ui.fileUpload.removeFile)
|
|
110
110
|
})]
|
|
111
111
|
})
|
|
112
112
|
})]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Typography } from "../../../
|
|
1
|
+
import { Typography } from "../../../typography.js";
|
|
2
2
|
import { Button } from "../../../buttons/Button/Button.js";
|
|
3
|
-
import { InlineIconButton } from "../../../
|
|
3
|
+
import { InlineIconButton } from "../../../inline-icon-button.js";
|
|
4
4
|
import "../../../../config/i18n.js";
|
|
5
5
|
import { FileUtils } from "../../../../utils/file.utils.js";
|
|
6
6
|
import { ProgressBar } from "./ProgressBar.js";
|
|
@@ -9,7 +9,7 @@ import { clsx } from "clsx";
|
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
//#region src/components/inputs/File/shared/FileUploadContentLoading.tsx
|
|
12
|
-
|
|
12
|
+
const FileUploadContentLoading = ({ index, variant, as, state, isDisabled, singleFile, onCancel, cancelButtonProps }) => {
|
|
13
13
|
const { t } = useTranslation("ui");
|
|
14
14
|
const { color: cancelButtonColor = "secondary", size: cancelButtonSize = "xs", variant: cancelButtonVariant = "outlined", width: cancelButtonWidth = "hug", ...cancelButtonRestProps } = cancelButtonProps ?? {};
|
|
15
15
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -1,169 +1,56 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
|
-
import { Typography } from "../../../
|
|
2
|
+
import { Typography } from "../../../typography.js";
|
|
3
3
|
import { Button as Button$1 } from "../../../buttons/Button/Button.js";
|
|
4
4
|
import "../../../../config/i18n.js";
|
|
5
|
-
import { TextButton } from "../../../
|
|
5
|
+
import { TextButton } from "../../../text-button.js";
|
|
6
6
|
import { inputSizeDefinition } from "../../shared/input.cva.js";
|
|
7
7
|
import { inputButtonSizeMapping } from "../inputUpload.types.js";
|
|
8
8
|
import { inputUploadButton, inputUploadDropZone } from "./inputUploadButton.cva.js";
|
|
9
9
|
import { Upload } from "lucide-react";
|
|
10
10
|
import { clsx } from "clsx";
|
|
11
11
|
import { DropZone, FileTrigger } from "react-aria-components";
|
|
12
|
-
import { c } from "react/compiler-runtime";
|
|
13
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
13
|
import { useTranslation } from "react-i18next";
|
|
15
14
|
//#region src/components/inputs/File/shared/InputUploadContent.tsx
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
let buttonText;
|
|
19
|
-
let error;
|
|
20
|
-
let isDisabled;
|
|
21
|
-
let placeholder;
|
|
22
|
-
let rest;
|
|
23
|
-
let size;
|
|
24
|
-
let variant;
|
|
25
|
-
if ($[0] !== props) {
|
|
26
|
-
({variant, isDisabled, error, placeholder, buttonText, size, ...rest} = props);
|
|
27
|
-
$[0] = props;
|
|
28
|
-
$[1] = buttonText;
|
|
29
|
-
$[2] = error;
|
|
30
|
-
$[3] = isDisabled;
|
|
31
|
-
$[4] = placeholder;
|
|
32
|
-
$[5] = rest;
|
|
33
|
-
$[6] = size;
|
|
34
|
-
$[7] = variant;
|
|
35
|
-
} else {
|
|
36
|
-
buttonText = $[1];
|
|
37
|
-
error = $[2];
|
|
38
|
-
isDisabled = $[3];
|
|
39
|
-
placeholder = $[4];
|
|
40
|
-
rest = $[5];
|
|
41
|
-
size = $[6];
|
|
42
|
-
variant = $[7];
|
|
43
|
-
}
|
|
15
|
+
const InputUploadContent = (props) => {
|
|
16
|
+
const { variant, isDisabled, error, placeholder, buttonText, size, ...rest } = props;
|
|
44
17
|
const { t } = useTranslation("ui");
|
|
45
18
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
let t3;
|
|
50
|
-
if ($[8] !== variant) {
|
|
51
|
-
t3 = inputUploadButton({
|
|
52
|
-
variant,
|
|
53
|
-
className: "group/input-upload"
|
|
54
|
-
});
|
|
55
|
-
$[8] = variant;
|
|
56
|
-
$[9] = t3;
|
|
57
|
-
} else t3 = $[9];
|
|
58
|
-
let t4;
|
|
59
|
-
if ($[10] !== inputSizeCva || $[11] !== size || $[12] !== variant) {
|
|
60
|
-
t4 = clsx(inputUploadDropZone({ variant }), inputSizeCva({ size }));
|
|
61
|
-
$[10] = inputSizeCva;
|
|
62
|
-
$[11] = size;
|
|
63
|
-
$[12] = variant;
|
|
64
|
-
$[13] = t4;
|
|
65
|
-
} else t4 = $[13];
|
|
66
|
-
let t5;
|
|
67
|
-
if ($[14] !== placeholder || $[15] !== t) {
|
|
68
|
-
t5 = placeholder ?? t(_temp);
|
|
69
|
-
$[14] = placeholder;
|
|
70
|
-
$[15] = t;
|
|
71
|
-
$[16] = t5;
|
|
72
|
-
} else t5 = $[16];
|
|
73
|
-
let t6;
|
|
74
|
-
if ($[17] !== t5) {
|
|
75
|
-
t6 = /* @__PURE__ */ jsx(Typography, {
|
|
76
|
-
variant: "default",
|
|
77
|
-
size: "label-1",
|
|
78
|
-
as: "span",
|
|
79
|
-
className: "min-w-0 flex-fill select-none truncate text-text-default-3",
|
|
80
|
-
children: t5
|
|
81
|
-
});
|
|
82
|
-
$[17] = t5;
|
|
83
|
-
$[18] = t6;
|
|
84
|
-
} else t6 = $[18];
|
|
85
|
-
let t7;
|
|
86
|
-
if ($[19] !== buttonText || $[20] !== isDisabled || $[21] !== t || $[22] !== variant) {
|
|
87
|
-
t7 = variant === "nested" && /* @__PURE__ */ jsx(TextButton, {
|
|
88
|
-
isDisabled,
|
|
89
|
-
icon: Upload,
|
|
90
|
-
children: buttonText ?? t(_temp2)
|
|
91
|
-
});
|
|
92
|
-
$[19] = buttonText;
|
|
93
|
-
$[20] = isDisabled;
|
|
94
|
-
$[21] = t;
|
|
95
|
-
$[22] = variant;
|
|
96
|
-
$[23] = t7;
|
|
97
|
-
} else t7 = $[23];
|
|
98
|
-
let t8;
|
|
99
|
-
if ($[24] !== isDisabled || $[25] !== rest || $[26] !== t4 || $[27] !== t6 || $[28] !== t7) {
|
|
100
|
-
t8 = /* @__PURE__ */ jsxs(DropZone, {
|
|
101
|
-
...rest,
|
|
102
|
-
isDisabled,
|
|
103
|
-
className: t4,
|
|
104
|
-
children: [t6, t7]
|
|
105
|
-
});
|
|
106
|
-
$[24] = isDisabled;
|
|
107
|
-
$[25] = rest;
|
|
108
|
-
$[26] = t4;
|
|
109
|
-
$[27] = t6;
|
|
110
|
-
$[28] = t7;
|
|
111
|
-
$[29] = t8;
|
|
112
|
-
} else t8 = $[29];
|
|
113
|
-
let t9;
|
|
114
|
-
if ($[30] !== buttonText || $[31] !== isDisabled || $[32] !== size || $[33] !== t || $[34] !== variant) {
|
|
115
|
-
t9 = variant !== "nested" && /* @__PURE__ */ jsx(Button$1, {
|
|
116
|
-
size: inputButtonSizeMapping[size ?? "default"],
|
|
117
|
-
width: "hug",
|
|
118
|
-
isDisabled,
|
|
119
|
-
className: "truncate",
|
|
120
|
-
children: buttonText ?? t(_temp3)
|
|
121
|
-
});
|
|
122
|
-
$[30] = buttonText;
|
|
123
|
-
$[31] = isDisabled;
|
|
124
|
-
$[32] = size;
|
|
125
|
-
$[33] = t;
|
|
126
|
-
$[34] = variant;
|
|
127
|
-
$[35] = t9;
|
|
128
|
-
} else t9 = $[35];
|
|
129
|
-
let t10;
|
|
130
|
-
if ($[36] !== t0 || $[37] !== t1 || $[38] !== t2 || $[39] !== t3 || $[40] !== t8 || $[41] !== t9) {
|
|
131
|
-
t10 = /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
return /* @__PURE__ */ jsx(FileTrigger, {
|
|
20
|
+
...rest,
|
|
21
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
132
22
|
"data-rac": "",
|
|
133
|
-
"data-disabled":
|
|
134
|
-
"data-is-disabled":
|
|
135
|
-
"data-invalid":
|
|
136
|
-
className:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
23
|
+
"data-disabled": isDisabled || void 0,
|
|
24
|
+
"data-is-disabled": isDisabled || void 0,
|
|
25
|
+
"data-invalid": !!error || void 0,
|
|
26
|
+
className: inputUploadButton({
|
|
27
|
+
variant,
|
|
28
|
+
className: "group/input-upload"
|
|
29
|
+
}),
|
|
30
|
+
children: [/* @__PURE__ */ jsxs(DropZone, {
|
|
31
|
+
...rest,
|
|
32
|
+
isDisabled,
|
|
33
|
+
className: clsx(inputUploadDropZone({ variant }), inputSizeCva({ size })),
|
|
34
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
35
|
+
variant: "default",
|
|
36
|
+
size: "label-1",
|
|
37
|
+
as: "span",
|
|
38
|
+
className: "min-w-0 flex-fill select-none truncate text-text-default-3",
|
|
39
|
+
children: placeholder ?? t(($) => $.ui.fileUpload.emptyText)
|
|
40
|
+
}), variant === "nested" && /* @__PURE__ */ jsx(TextButton, {
|
|
41
|
+
isDisabled,
|
|
42
|
+
icon: Upload,
|
|
43
|
+
children: buttonText ?? t(($) => $.ui.fileUpload.upload)
|
|
44
|
+
})]
|
|
45
|
+
}), variant !== "nested" && /* @__PURE__ */ jsx(Button$1, {
|
|
46
|
+
size: inputButtonSizeMapping[size ?? "default"],
|
|
47
|
+
width: "hug",
|
|
48
|
+
isDisabled,
|
|
49
|
+
className: "truncate",
|
|
50
|
+
children: buttonText ?? t(($) => $.ui.fileUpload.uploadFile)
|
|
51
|
+
})]
|
|
52
|
+
})
|
|
53
|
+
});
|
|
158
54
|
};
|
|
159
|
-
function _temp($) {
|
|
160
|
-
return $.ui.fileUpload.emptyText;
|
|
161
|
-
}
|
|
162
|
-
function _temp2($_0) {
|
|
163
|
-
return $_0.ui.fileUpload.upload;
|
|
164
|
-
}
|
|
165
|
-
function _temp3($_1) {
|
|
166
|
-
return $_1.ui.fileUpload.uploadFile;
|
|
167
|
-
}
|
|
168
55
|
//#endregion
|
|
169
56
|
export { InputUploadContent };
|