@povio/ui 3.0.0-rc.3 → 3.1.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 +39 -0
- package/dist/assets/icons/AlignCenter.js +11 -26
- package/dist/assets/icons/AlignLeft.js +11 -26
- package/dist/assets/icons/AlignLeftRight.js +11 -26
- package/dist/assets/icons/AlignRight.js +11 -26
- package/dist/assets/icons/ArrowDropDown.js +11 -26
- package/dist/assets/icons/ArrowDropUp.js +11 -26
- package/dist/assets/icons/ArrowLeft.js +11 -26
- package/dist/assets/icons/ArrowRight.js +11 -26
- package/dist/assets/icons/Bold.js +11 -26
- package/dist/assets/icons/BulletedList.js +11 -26
- package/dist/assets/icons/Calendar.js +13 -28
- package/dist/assets/icons/Check.js +13 -28
- package/dist/assets/icons/CheckCircle.js +11 -26
- package/dist/assets/icons/CheckboxCheckmark.js +14 -29
- package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
- package/dist/assets/icons/ChevronDown.js +13 -28
- package/dist/assets/icons/ChevronLeft.js +13 -28
- package/dist/assets/icons/ChevronRight.js +13 -28
- package/dist/assets/icons/ChevronUp.js +13 -28
- package/dist/assets/icons/ChevronsLeft.js +13 -28
- package/dist/assets/icons/ChevronsRight.js +13 -28
- package/dist/assets/icons/Clock.js +11 -26
- package/dist/assets/icons/Close.js +11 -26
- package/dist/assets/icons/DateTime.js +14 -35
- package/dist/assets/icons/DragIndicator.js +11 -26
- package/dist/assets/icons/File.js +13 -28
- package/dist/assets/icons/Highlight.js +11 -26
- package/dist/assets/icons/HighlightOn.js +15 -49
- package/dist/assets/icons/Home.js +11 -26
- package/dist/assets/icons/Info.js +16 -37
- package/dist/assets/icons/Italic.js +11 -26
- package/dist/assets/icons/Link.js +11 -26
- package/dist/assets/icons/Menu.js +11 -26
- package/dist/assets/icons/NumberedList.js +11 -26
- package/dist/assets/icons/PointerHorizontal.js +11 -26
- package/dist/assets/icons/PointerVertical.js +11 -26
- package/dist/assets/icons/Search.js +11 -26
- package/dist/assets/icons/Send.js +13 -28
- package/dist/assets/icons/Strikethrough.js +11 -26
- package/dist/assets/icons/TextColor.js +14 -48
- package/dist/assets/icons/Today.js +11 -26
- package/dist/assets/icons/Underlined.js +13 -28
- package/dist/assets/icons/Upload.js +14 -35
- package/dist/assets/icons/Visibility.js +11 -26
- package/dist/assets/icons/VisibilityOff.js +11 -26
- package/dist/assets/icons/WarningFilled.js +13 -28
- package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
- package/dist/components/Menu/Menu.d.ts +4 -0
- package/dist/components/Menu/Menu.js +2 -18
- package/dist/components/Menu/MenuDesktop.js +7 -41
- package/dist/components/Menu/MenuItem.js +9 -32
- package/dist/components/Menu/MenuMobile.d.ts +1 -1
- package/dist/components/Menu/MenuMobile.js +39 -97
- package/dist/components/Menu/MenuPopover.js +29 -105
- package/dist/components/buttons/IconButton/IconButton.js +8 -40
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/PillButton/PillButton.js +17 -55
- package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
- package/dist/components/buttons/TextButton/TextButton.js +8 -30
- package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +35 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
- package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +75 -373
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +186 -492
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -14
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +47 -273
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -7
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +121 -611
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +3 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +120 -338
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +103 -310
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +98 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -286
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -14
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +129 -356
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -96
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -81
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- 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 +110 -279
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -210
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/File/FileUpload.js +45 -88
- package/dist/components/inputs/File/FileUploadContainer.js +7 -15
- package/dist/components/inputs/File/InputUpload.js +79 -317
- package/dist/components/inputs/File/shared/FileCard.js +41 -104
- package/dist/components/inputs/File/shared/FileCardList.js +12 -47
- package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
- package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
- package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +2 -2
- package/dist/components/inputs/File/shared/ProgressBar.js +20 -53
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +1 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +38 -0
- package/dist/components/inputs/File/shared/progressBar.cva.js +28 -0
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +37 -119
- package/dist/components/inputs/FormField/FormFieldError.js +5 -25
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +97 -447
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
- package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
- package/dist/components/inputs/Input/TextInput/TextInput.js +90 -419
- package/dist/components/inputs/Input/shared/InputContent.js +59 -192
- package/dist/components/inputs/Inputs/Form.js +11 -40
- package/dist/components/inputs/Inputs/InputItem.d.ts +21 -15
- package/dist/components/inputs/Inputs/InputItem.js +14 -69
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.js +61 -353
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -45
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -48
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -217
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -107
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +18 -227
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +3 -8
- package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +116 -397
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
- 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 +21 -70
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +6 -11
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +36 -67
- package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
- package/dist/components/inputs/Slider/Slider.d.ts +1 -2
- package/dist/components/inputs/Slider/Slider.js +76 -265
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- 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 +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -1
- package/dist/components/inputs/Toggle/Toggle.js +37 -214
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
- package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.d.ts +1 -2
- package/dist/components/inputs/shared/InputClear.js +12 -88
- package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
- package/dist/components/inputs/shared/input.cva.d.ts +0 -28
- package/dist/components/inputs/shared/input.cva.js +4 -38
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/navigation/Stepper/StepperItem.js +31 -104
- package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/BottomSheet/BottomSheet.js +25 -98
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +22 -64
- package/dist/components/overlays/Modal/modal.cva.js +1 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +5 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +28 -83
- package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
- package/dist/components/segment/Segment.js +57 -218
- package/dist/components/segment/SegmentItem.js +10 -67
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/PaginationList.js +64 -167
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/status/Loader/Loader.js +22 -77
- package/dist/components/status/Toast/Toast.js +17 -22
- package/dist/components/status/Toast/toast.cva.d.ts +14 -3
- package/dist/components/status/Toast/toast.cva.js +12 -10
- package/dist/components/status/Toast/useToast.js +57 -62
- package/dist/components/table/ColumnConfig.js +54 -158
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/PaginatedTable.js +18 -84
- package/dist/components/table/Table.js +30 -30
- package/dist/components/table/table.cva.d.ts +7 -0
- package/dist/components/table/table.cva.js +2 -1
- package/dist/components/text/Link/Link.js +7 -19
- package/dist/components/text/Pill/Pill.d.ts +15 -0
- package/dist/components/text/Pill/Pill.js +44 -0
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +9 -23
- package/dist/config/router.context.js +16 -42
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +10 -21
- package/dist/config/uiConfig.context.js +18 -69
- package/dist/config/uiOverrides.context.d.ts +10 -20
- package/dist/config/uiOverrides.context.js +14 -54
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/hooks/useAutosave.d.ts +1 -2
- package/dist/hooks/useAutosave.js +4 -12
- package/dist/hooks/useBreakpoint.js +3 -16
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFilters.js +64 -125
- package/dist/hooks/useForm.js +8 -42
- package/dist/hooks/useFormAutosave.d.ts +1 -3
- package/dist/hooks/useFormAutosave.js +30 -122
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +24 -91
- package/dist/hooks/useLocalStorage.js +10 -43
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/hooks/usePagination.js +19 -49
- package/dist/hooks/useScrollableListBox.js +16 -37
- package/dist/hooks/useSorting.js +28 -69
- package/dist/hooks/useStateAndRef.js +7 -21
- package/dist/hooks/useTableColumnConfig.js +31 -124
- package/dist/hooks/useTranslationMemo.js +5 -25
- package/dist/index.d.ts +7 -16
- package/dist/index.js +6 -13
- package/dist/tw-ui-plugin.js +0 -6
- package/dist/utils/date-time.utils.d.ts +10 -38
- package/dist/utils/date-time.utils.js +22 -136
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -32
- 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 -40
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -85
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -13
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -14
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -575
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -8
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -37
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -178
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -14
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -43
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -8
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -54
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -82
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -548
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -8
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
- package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
- package/dist/hooks/useAutosave.spec.d.ts +0 -1
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.d.ts +0 -20
- package/dist/hooks/useKeyInteractions.js +0 -54
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -72
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -6,244 +6,111 @@ import "../../../../config/i18n.js";
|
|
|
6
6
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
7
7
|
import { FileUtils } from "../../../../utils/file.utils.js";
|
|
8
8
|
import { CheckCircleIcon } from "../../../../assets/icons/CheckCircle.js";
|
|
9
|
-
import { c } from "react/compiler-runtime";
|
|
10
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { clsx } from "clsx";
|
|
12
11
|
import { FileTrigger } from "react-aria-components";
|
|
13
12
|
import { useTranslation } from "react-i18next";
|
|
14
13
|
//#region src/components/inputs/File/shared/FileUploadContentFilled.tsx
|
|
15
|
-
var FileUploadContentFilled = (
|
|
16
|
-
const $ = c(50);
|
|
17
|
-
const { variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon: t1, singleFile, onRemove } = t0;
|
|
18
|
-
const removeWithIcon = t1 === void 0 ? false : t1;
|
|
14
|
+
var FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove }) => {
|
|
19
15
|
const { t } = useTranslation("ui");
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
$[22] = t16;
|
|
115
|
-
$[23] = t19;
|
|
116
|
-
$[24] = t20;
|
|
117
|
-
} else t20 = $[24];
|
|
118
|
-
let t21;
|
|
119
|
-
if ($[25] !== t10 || $[26] !== t20) {
|
|
120
|
-
t21 = /* @__PURE__ */ jsxs("div", {
|
|
121
|
-
className: t10,
|
|
122
|
-
children: [t11, t20]
|
|
123
|
-
});
|
|
124
|
-
$[25] = t10;
|
|
125
|
-
$[26] = t20;
|
|
126
|
-
$[27] = t21;
|
|
127
|
-
} else t21 = $[27];
|
|
128
|
-
const t22 = variant === "vertical" && as === "button";
|
|
129
|
-
const t23 = as === "link" && variant === "vertical";
|
|
130
|
-
const t24 = as === "button" && variant === "vertical";
|
|
131
|
-
const t25 = variant === "horizontal";
|
|
132
|
-
let t26;
|
|
133
|
-
if ($[28] !== t22 || $[29] !== t23 || $[30] !== t24 || $[31] !== t25) {
|
|
134
|
-
t26 = clsx("flex flex-none items-center justify-end", {
|
|
135
|
-
"flex-col": t22,
|
|
136
|
-
"gap-file-upload-content-gap-text-to-text": t23,
|
|
137
|
-
"gap-file-upload-content-gap-content-to-button": t24,
|
|
138
|
-
"gap-file-upload-content-gap-button-to-button": t25
|
|
139
|
-
});
|
|
140
|
-
$[28] = t22;
|
|
141
|
-
$[29] = t23;
|
|
142
|
-
$[30] = t24;
|
|
143
|
-
$[31] = t25;
|
|
144
|
-
$[32] = t26;
|
|
145
|
-
} else t26 = $[32];
|
|
146
|
-
let t27;
|
|
147
|
-
if ($[33] !== as || $[34] !== browseText || $[35] !== fileTriggerProps || $[36] !== isDisabled || $[37] !== onRemove || $[38] !== removeWithIcon || $[39] !== state.id || $[40] !== t || $[41] !== variant) {
|
|
148
|
-
t27 = as === "link" ? /* @__PURE__ */ jsxs(Fragment, { children: [fileTriggerProps && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FileTrigger, {
|
|
149
|
-
...fileTriggerProps,
|
|
150
|
-
children: /* @__PURE__ */ jsx(TextButton, {
|
|
151
|
-
className: clsx("text-interactive-text-primary-idle", { "[&>span>span]:font-medium!": variant === "vertical" }),
|
|
152
|
-
children: browseText ?? ""
|
|
153
|
-
})
|
|
154
|
-
}), variant === "vertical" && /* @__PURE__ */ jsx(Typography, {
|
|
155
|
-
variant: "default",
|
|
156
|
-
size: "label-2",
|
|
157
|
-
as: "span",
|
|
158
|
-
className: "text-text-default-2",
|
|
159
|
-
children: t(_temp)
|
|
160
|
-
})] }), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
|
|
161
|
-
label: "Cancel",
|
|
162
|
-
color: "secondary",
|
|
163
|
-
onPress: () => {
|
|
164
|
-
onRemove(state.id ?? "");
|
|
165
|
-
},
|
|
166
|
-
icon: CloseIcon
|
|
167
|
-
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
168
|
-
className: clsx(variant === "vertical" && "text-interactive-text-primary-idle lowercase [&>span>span]:font-medium!"),
|
|
169
|
-
color: variant === "horizontal" ? "secondary" : "primary",
|
|
170
|
-
onPress: () => {
|
|
171
|
-
onRemove(state.id ?? "");
|
|
172
|
-
},
|
|
173
|
-
children: t(_temp2)
|
|
174
|
-
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
175
|
-
className: "flex items-center justify-center gap-file-upload-content-gap-button-to-button self-stretch",
|
|
176
|
-
children: [fileTriggerProps && /* @__PURE__ */ jsx(FileTrigger, {
|
|
177
|
-
...fileTriggerProps,
|
|
178
|
-
children: /* @__PURE__ */ jsx(Button$1, {
|
|
179
|
-
variant: "outlined",
|
|
180
|
-
size: "xs",
|
|
181
|
-
width: "hug",
|
|
182
|
-
isDisabled,
|
|
183
|
-
children: browseText ?? ""
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
className: clsx("flex w-full flex-fill flex-col items-start"),
|
|
18
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
className: clsx("flex w-full items-center", {
|
|
20
|
+
"flex-row gap-file-upload-content-gap-left-to-right-content": variant === "horizontal",
|
|
21
|
+
"flex-col": variant === "vertical",
|
|
22
|
+
"gap-file-upload-content-gap-content-to-button": variant === "vertical" && as === "button",
|
|
23
|
+
"gap-file-upload-content-gap-text-to-text": variant === "vertical" && as === "link"
|
|
24
|
+
}),
|
|
25
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
26
|
+
className: clsx("flex min-w-0 max-w-full grow items-center gap-file-upload-content-gap-icon-to-content", {
|
|
27
|
+
"flex-col": variant === "vertical",
|
|
28
|
+
"flex-row": variant === "horizontal",
|
|
29
|
+
"opacity-50": isDisabled
|
|
30
|
+
}),
|
|
31
|
+
children: [/* @__PURE__ */ jsx(CheckCircleIcon, { className: "h-6 w-6 text-text-default-1" }), /* @__PURE__ */ jsxs("div", {
|
|
32
|
+
className: clsx("flex flex-col gap-file-upload-content-gap-text-to-text", {
|
|
33
|
+
"max-w-full items-center": variant === "vertical",
|
|
34
|
+
"max-w-[calc(100%-32px)]": variant === "horizontal"
|
|
35
|
+
}),
|
|
36
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
37
|
+
variant: "prominent-1",
|
|
38
|
+
size: "label-1",
|
|
39
|
+
as: "span",
|
|
40
|
+
className: "self-stretch truncate text-center text-text-default-1",
|
|
41
|
+
children: state.file?.name ?? state.displayName ?? ""
|
|
42
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
43
|
+
variant: "default",
|
|
44
|
+
size: singleFile ? "label-2" : "label-3",
|
|
45
|
+
as: "span",
|
|
46
|
+
className: "text-text-default-2",
|
|
47
|
+
children: FileUtils.getFileDisplaySize(state)
|
|
48
|
+
})]
|
|
49
|
+
})]
|
|
50
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: clsx("flex flex-none items-center justify-end", {
|
|
52
|
+
"flex-col": variant === "vertical" && as === "button",
|
|
53
|
+
"gap-file-upload-content-gap-text-to-text": as === "link" && variant === "vertical",
|
|
54
|
+
"gap-file-upload-content-gap-content-to-button": as === "button" && variant === "vertical",
|
|
55
|
+
"gap-file-upload-content-gap-button-to-button": variant === "horizontal"
|
|
56
|
+
}),
|
|
57
|
+
children: as === "link" ? /* @__PURE__ */ jsxs(Fragment, { children: [fileTriggerProps && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FileTrigger, {
|
|
58
|
+
...fileTriggerProps,
|
|
59
|
+
children: /* @__PURE__ */ jsx(TextButton, {
|
|
60
|
+
className: clsx("text-interactive-text-primary-idle", { "[&>span>span]:font-medium!": variant === "vertical" }),
|
|
61
|
+
children: browseText ?? ""
|
|
62
|
+
})
|
|
63
|
+
}), variant === "vertical" && /* @__PURE__ */ jsx(Typography, {
|
|
64
|
+
variant: "default",
|
|
65
|
+
size: "label-2",
|
|
66
|
+
as: "span",
|
|
67
|
+
className: "text-text-default-2",
|
|
68
|
+
children: t(($) => $.ui.fileUpload.or)
|
|
69
|
+
})] }), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
|
|
70
|
+
label: "Cancel",
|
|
71
|
+
color: "secondary",
|
|
72
|
+
onPress: () => {
|
|
73
|
+
onRemove(state.id ?? "");
|
|
74
|
+
},
|
|
75
|
+
icon: CloseIcon
|
|
76
|
+
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
77
|
+
className: clsx(variant === "vertical" && "text-interactive-text-primary-idle lowercase [&>span>span]:font-medium!"),
|
|
78
|
+
color: variant === "horizontal" ? "secondary" : "primary",
|
|
79
|
+
onPress: () => {
|
|
80
|
+
onRemove(state.id ?? "");
|
|
81
|
+
},
|
|
82
|
+
children: t(($) => $.ui.fileUpload.removeFile)
|
|
83
|
+
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
84
|
+
className: "flex items-center justify-center gap-file-upload-content-gap-button-to-button self-stretch",
|
|
85
|
+
children: [fileTriggerProps && /* @__PURE__ */ jsx(FileTrigger, {
|
|
86
|
+
...fileTriggerProps,
|
|
87
|
+
children: /* @__PURE__ */ jsx(Button$1, {
|
|
88
|
+
variant: "outlined",
|
|
89
|
+
size: "xs",
|
|
90
|
+
width: "hug",
|
|
91
|
+
isDisabled,
|
|
92
|
+
children: browseText ?? ""
|
|
93
|
+
})
|
|
94
|
+
}), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
|
|
95
|
+
label: "Cancel",
|
|
96
|
+
color: "secondary",
|
|
97
|
+
onPress: () => {
|
|
98
|
+
onRemove(state.id ?? "");
|
|
99
|
+
},
|
|
100
|
+
icon: CloseIcon,
|
|
101
|
+
isDisabled
|
|
102
|
+
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
103
|
+
color: "secondary",
|
|
104
|
+
onPress: () => {
|
|
105
|
+
onRemove(state.id ?? "");
|
|
106
|
+
},
|
|
107
|
+
isDisabled,
|
|
108
|
+
children: t(($) => $.ui.fileUpload.removeFile)
|
|
109
|
+
})]
|
|
184
110
|
})
|
|
185
|
-
}), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
|
|
186
|
-
label: "Cancel",
|
|
187
|
-
color: "secondary",
|
|
188
|
-
onPress: () => {
|
|
189
|
-
onRemove(state.id ?? "");
|
|
190
|
-
},
|
|
191
|
-
icon: CloseIcon,
|
|
192
|
-
isDisabled
|
|
193
|
-
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
194
|
-
color: "secondary",
|
|
195
|
-
onPress: () => {
|
|
196
|
-
onRemove(state.id ?? "");
|
|
197
|
-
},
|
|
198
|
-
isDisabled,
|
|
199
|
-
children: t(_temp3)
|
|
200
111
|
})]
|
|
201
|
-
})
|
|
202
|
-
|
|
203
|
-
$[34] = browseText;
|
|
204
|
-
$[35] = fileTriggerProps;
|
|
205
|
-
$[36] = isDisabled;
|
|
206
|
-
$[37] = onRemove;
|
|
207
|
-
$[38] = removeWithIcon;
|
|
208
|
-
$[39] = state.id;
|
|
209
|
-
$[40] = t;
|
|
210
|
-
$[41] = variant;
|
|
211
|
-
$[42] = t27;
|
|
212
|
-
} else t27 = $[42];
|
|
213
|
-
let t28;
|
|
214
|
-
if ($[43] !== t26 || $[44] !== t27) {
|
|
215
|
-
t28 = /* @__PURE__ */ jsx("div", {
|
|
216
|
-
className: t26,
|
|
217
|
-
children: t27
|
|
218
|
-
});
|
|
219
|
-
$[43] = t26;
|
|
220
|
-
$[44] = t27;
|
|
221
|
-
$[45] = t28;
|
|
222
|
-
} else t28 = $[45];
|
|
223
|
-
let t29;
|
|
224
|
-
if ($[46] !== t21 || $[47] !== t28 || $[48] !== t7) {
|
|
225
|
-
t29 = /* @__PURE__ */ jsx("div", {
|
|
226
|
-
className: t2,
|
|
227
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
228
|
-
className: t7,
|
|
229
|
-
children: [t21, t28]
|
|
230
|
-
})
|
|
231
|
-
});
|
|
232
|
-
$[46] = t21;
|
|
233
|
-
$[47] = t28;
|
|
234
|
-
$[48] = t7;
|
|
235
|
-
$[49] = t29;
|
|
236
|
-
} else t29 = $[49];
|
|
237
|
-
return t29;
|
|
112
|
+
})
|
|
113
|
+
});
|
|
238
114
|
};
|
|
239
|
-
function _temp($) {
|
|
240
|
-
return $.ui.fileUpload.or;
|
|
241
|
-
}
|
|
242
|
-
function _temp2($_0) {
|
|
243
|
-
return $_0.ui.fileUpload.removeFile;
|
|
244
|
-
}
|
|
245
|
-
function _temp3($_1) {
|
|
246
|
-
return $_1.ui.fileUpload.removeFile;
|
|
247
|
-
}
|
|
248
115
|
//#endregion
|
|
249
116
|
export { FileUploadContentFilled };
|
|
@@ -6,186 +6,63 @@ import "../../../../config/i18n.js";
|
|
|
6
6
|
import { FileUtils } from "../../../../utils/file.utils.js";
|
|
7
7
|
import { FileIcon } from "../../../../assets/icons/File.js";
|
|
8
8
|
import { ProgressBar } from "./ProgressBar.js";
|
|
9
|
-
import { c } from "react/compiler-runtime";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { clsx } from "clsx";
|
|
12
11
|
import { useTranslation } from "react-i18next";
|
|
13
12
|
//#region src/components/inputs/File/shared/FileUploadContentLoading.tsx
|
|
14
|
-
var FileUploadContentLoading = (
|
|
15
|
-
const $ = c(57);
|
|
16
|
-
const { index, variant, as, state, isDisabled, singleFile, onCancel } = t0;
|
|
13
|
+
var FileUploadContentLoading = ({ index, variant, as, state, isDisabled, singleFile, onCancel }) => {
|
|
17
14
|
const { t } = useTranslation("ui");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"flex-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"max-w-full gap-file-upload-content-gap-icon-to-content text-center": t12,
|
|
70
|
-
"max-w-[calc(100%-32px)] gap-file-upload-content-gap-text-to-text": t13
|
|
71
|
-
});
|
|
72
|
-
$[12] = t12;
|
|
73
|
-
$[13] = t13;
|
|
74
|
-
$[14] = t14;
|
|
75
|
-
} else t14 = $[14];
|
|
76
|
-
const t15 = state.file?.name ?? state.displayName ?? "";
|
|
77
|
-
let t16;
|
|
78
|
-
if ($[15] !== t15) {
|
|
79
|
-
t16 = /* @__PURE__ */ jsx(Typography, {
|
|
80
|
-
variant: "prominent-1",
|
|
81
|
-
size: "label-1",
|
|
82
|
-
as: "span",
|
|
83
|
-
className: "self-stretch truncate text-center text-text-default-1",
|
|
84
|
-
children: t15
|
|
85
|
-
});
|
|
86
|
-
$[15] = t15;
|
|
87
|
-
$[16] = t16;
|
|
88
|
-
} else t16 = $[16];
|
|
89
|
-
const t17 = singleFile ? "label-2" : "label-3";
|
|
90
|
-
let t18;
|
|
91
|
-
if ($[17] !== state) {
|
|
92
|
-
t18 = FileUtils.getFileDisplaySize(state);
|
|
93
|
-
$[17] = state;
|
|
94
|
-
$[18] = t18;
|
|
95
|
-
} else t18 = $[18];
|
|
96
|
-
let t19;
|
|
97
|
-
if ($[19] !== t17 || $[20] !== t18) {
|
|
98
|
-
t19 = /* @__PURE__ */ jsx(Typography, {
|
|
99
|
-
variant: "default",
|
|
100
|
-
size: t17,
|
|
101
|
-
as: "span",
|
|
102
|
-
className: "text-text-default-2",
|
|
103
|
-
children: t18
|
|
104
|
-
});
|
|
105
|
-
$[19] = t17;
|
|
106
|
-
$[20] = t18;
|
|
107
|
-
$[21] = t19;
|
|
108
|
-
} else t19 = $[21];
|
|
109
|
-
let t20;
|
|
110
|
-
if ($[22] !== t14 || $[23] !== t16 || $[24] !== t19) {
|
|
111
|
-
t20 = /* @__PURE__ */ jsxs("div", {
|
|
112
|
-
className: t14,
|
|
113
|
-
children: [t16, t19]
|
|
114
|
-
});
|
|
115
|
-
$[22] = t14;
|
|
116
|
-
$[23] = t16;
|
|
117
|
-
$[24] = t19;
|
|
118
|
-
$[25] = t20;
|
|
119
|
-
} else t20 = $[25];
|
|
120
|
-
let t21;
|
|
121
|
-
if ($[26] !== t10 || $[27] !== t20) {
|
|
122
|
-
t21 = /* @__PURE__ */ jsxs("div", {
|
|
123
|
-
className: t10,
|
|
124
|
-
children: [t11, t20]
|
|
125
|
-
});
|
|
126
|
-
$[26] = t10;
|
|
127
|
-
$[27] = t20;
|
|
128
|
-
$[28] = t21;
|
|
129
|
-
} else t21 = $[28];
|
|
130
|
-
const t22 = variant === "horizontal";
|
|
131
|
-
const t23 = variant === "vertical";
|
|
132
|
-
let t24;
|
|
133
|
-
if ($[29] !== t22 || $[30] !== t23) {
|
|
134
|
-
t24 = clsx("flex items-center gap-1", {
|
|
135
|
-
"w-1/2": t22,
|
|
136
|
-
"w-full": t23
|
|
137
|
-
});
|
|
138
|
-
$[29] = t22;
|
|
139
|
-
$[30] = t23;
|
|
140
|
-
$[31] = t24;
|
|
141
|
-
} else t24 = $[31];
|
|
142
|
-
let t25;
|
|
143
|
-
if ($[32] !== state.progress) {
|
|
144
|
-
t25 = /* @__PURE__ */ jsx(ProgressBar, { progress: state.progress });
|
|
145
|
-
$[32] = state.progress;
|
|
146
|
-
$[33] = t25;
|
|
147
|
-
} else t25 = $[33];
|
|
148
|
-
let t26;
|
|
149
|
-
if ($[34] !== as || $[35] !== index || $[36] !== onCancel || $[37] !== variant) {
|
|
150
|
-
t26 = (as === "link" || variant === "horizontal") && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
151
|
-
label: "Cancel",
|
|
152
|
-
color: "secondary",
|
|
153
|
-
onPress: () => {
|
|
154
|
-
onCancel(index);
|
|
155
|
-
},
|
|
156
|
-
icon: CloseIcon
|
|
157
|
-
});
|
|
158
|
-
$[34] = as;
|
|
159
|
-
$[35] = index;
|
|
160
|
-
$[36] = onCancel;
|
|
161
|
-
$[37] = variant;
|
|
162
|
-
$[38] = t26;
|
|
163
|
-
} else t26 = $[38];
|
|
164
|
-
let t27;
|
|
165
|
-
if ($[39] !== t24 || $[40] !== t25 || $[41] !== t26) {
|
|
166
|
-
t27 = /* @__PURE__ */ jsxs("div", {
|
|
167
|
-
className: t24,
|
|
168
|
-
children: [t25, t26]
|
|
169
|
-
});
|
|
170
|
-
$[39] = t24;
|
|
171
|
-
$[40] = t25;
|
|
172
|
-
$[41] = t26;
|
|
173
|
-
$[42] = t27;
|
|
174
|
-
} else t27 = $[42];
|
|
175
|
-
let t28;
|
|
176
|
-
if ($[43] !== t21 || $[44] !== t27 || $[45] !== t7) {
|
|
177
|
-
t28 = /* @__PURE__ */ jsxs("div", {
|
|
178
|
-
className: t7,
|
|
179
|
-
children: [t21, t27]
|
|
180
|
-
});
|
|
181
|
-
$[43] = t21;
|
|
182
|
-
$[44] = t27;
|
|
183
|
-
$[45] = t7;
|
|
184
|
-
$[46] = t28;
|
|
185
|
-
} else t28 = $[46];
|
|
186
|
-
let t29;
|
|
187
|
-
if ($[47] !== as || $[48] !== index || $[49] !== onCancel || $[50] !== t || $[51] !== variant) {
|
|
188
|
-
t29 = as === "button" && variant === "vertical" && /* @__PURE__ */ jsx(Button, {
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: clsx("flex w-full flex-col items-center", {
|
|
17
|
+
"flex-col": variant === "vertical",
|
|
18
|
+
"flex-row": variant === "horizontal",
|
|
19
|
+
"gap-file-upload-content-gap-content-to-button": as === "button"
|
|
20
|
+
}),
|
|
21
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: clsx("flex w-full items-center justify-between", {
|
|
23
|
+
"flex-col gap-file-upload-content-gap-text-to-progress": variant === "vertical",
|
|
24
|
+
"flex-row gap-file-upload-content-gap-left-to-right-content": variant === "horizontal",
|
|
25
|
+
"opacity-50": isDisabled
|
|
26
|
+
}),
|
|
27
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
28
|
+
className: clsx("flex items-center gap-file-upload-content-gap-icon-to-content", {
|
|
29
|
+
"w-full flex-col": variant === "vertical",
|
|
30
|
+
"w-1/2": variant === "horizontal"
|
|
31
|
+
}),
|
|
32
|
+
children: [/* @__PURE__ */ jsx(FileIcon, { className: "h-6 w-6 text-text-default-1" }), /* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: clsx("flex flex-col", {
|
|
34
|
+
"max-w-full gap-file-upload-content-gap-icon-to-content text-center": variant === "vertical",
|
|
35
|
+
"max-w-[calc(100%-32px)] gap-file-upload-content-gap-text-to-text": variant === "horizontal"
|
|
36
|
+
}),
|
|
37
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
38
|
+
variant: "prominent-1",
|
|
39
|
+
size: "label-1",
|
|
40
|
+
as: "span",
|
|
41
|
+
className: "self-stretch truncate text-center text-text-default-1",
|
|
42
|
+
children: state.file?.name ?? state.displayName ?? ""
|
|
43
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
44
|
+
variant: "default",
|
|
45
|
+
size: singleFile ? "label-2" : "label-3",
|
|
46
|
+
as: "span",
|
|
47
|
+
className: "text-text-default-2",
|
|
48
|
+
children: FileUtils.getFileDisplaySize(state)
|
|
49
|
+
})]
|
|
50
|
+
})]
|
|
51
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
52
|
+
className: clsx("flex items-center gap-1", {
|
|
53
|
+
"w-1/2": variant === "horizontal",
|
|
54
|
+
"w-full": variant === "vertical"
|
|
55
|
+
}),
|
|
56
|
+
children: [/* @__PURE__ */ jsx(ProgressBar, { progress: state.progress }), (as === "link" || variant === "horizontal") && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
57
|
+
label: "Cancel",
|
|
58
|
+
color: "secondary",
|
|
59
|
+
onPress: () => {
|
|
60
|
+
onCancel(index);
|
|
61
|
+
},
|
|
62
|
+
icon: CloseIcon
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
}), as === "button" && variant === "vertical" && /* @__PURE__ */ jsx(Button, {
|
|
189
66
|
variant: "outlined",
|
|
190
67
|
size: "xs",
|
|
191
68
|
color: "secondary",
|
|
@@ -193,30 +70,9 @@ var FileUploadContentLoading = (t0) => {
|
|
|
193
70
|
onPress: () => {
|
|
194
71
|
onCancel(index);
|
|
195
72
|
},
|
|
196
|
-
children: t(
|
|
197
|
-
})
|
|
198
|
-
|
|
199
|
-
$[48] = index;
|
|
200
|
-
$[49] = onCancel;
|
|
201
|
-
$[50] = t;
|
|
202
|
-
$[51] = variant;
|
|
203
|
-
$[52] = t29;
|
|
204
|
-
} else t29 = $[52];
|
|
205
|
-
let t30;
|
|
206
|
-
if ($[53] !== t28 || $[54] !== t29 || $[55] !== t4) {
|
|
207
|
-
t30 = /* @__PURE__ */ jsxs("div", {
|
|
208
|
-
className: t4,
|
|
209
|
-
children: [t28, t29]
|
|
210
|
-
});
|
|
211
|
-
$[53] = t28;
|
|
212
|
-
$[54] = t29;
|
|
213
|
-
$[55] = t4;
|
|
214
|
-
$[56] = t30;
|
|
215
|
-
} else t30 = $[56];
|
|
216
|
-
return t30;
|
|
73
|
+
children: t(($) => $.ui.fileUpload.cancel)
|
|
74
|
+
})]
|
|
75
|
+
});
|
|
217
76
|
};
|
|
218
|
-
function _temp($) {
|
|
219
|
-
return $.ui.fileUpload.cancel;
|
|
220
|
-
}
|
|
221
77
|
//#endregion
|
|
222
78
|
export { FileUploadContentLoading };
|