@povio/ui 2.3.0-rc.9 → 2.3.1
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/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.js +2 -18
- package/dist/components/Menu/MenuDesktop.js +7 -41
- package/dist/components/Menu/MenuItem.js +9 -32
- package/dist/components/Menu/MenuMobile.js +38 -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.js +35 -172
- 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 -10
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +20 -121
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -10
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +111 -215
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -11
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +19 -123
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -5
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +104 -448
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +2 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +119 -330
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +102 -283
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -142
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +93 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -296
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -6
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +136 -355
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -14
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -97
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +27 -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 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -207
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/File/FileUpload.js +44 -87
- 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.js +9 -48
- 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 +88 -334
- 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 +79 -319
- 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 -16
- package/dist/components/inputs/Inputs/InputItem.js +14 -71
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.js +60 -352
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -17
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -42
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +7 -109
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -34
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +5 -132
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -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 -338
- 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 +3 -9
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +34 -57
- 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.js +74 -250
- 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.js +37 -189
- 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 +13 -79
- package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
- package/dist/components/inputs/shared/input.cva.d.ts +0 -10
- package/dist/components/inputs/shared/input.cva.js +4 -32
- 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 +49 -98
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +20 -62
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +27 -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 +13 -21
- 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 +27 -28
- package/dist/components/text/Link/Link.js +7 -19
- 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 +6 -16
- package/dist/config/uiConfig.context.js +13 -56
- package/dist/config/uiStyle.context.d.ts +4 -27
- package/dist/config/uiStyle.context.js +5 -15
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- 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.js +30 -101
- 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 +0 -7
- package/dist/index.js +3 -5
- package/dist/tw-ui-plugin.js +0 -2
- package/dist/utils/date-time.utils.d.ts +10 -31
- package/dist/utils/date-time.utils.js +22 -123
- package/dist/utils/dom.utils.js +1 -1
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -4
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -7
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -13
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -6
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -21
- 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 -31
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -80
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -6
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -11
- 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 -479
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
- 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 -36
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -122
- 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 -6
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -13
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -3
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -37
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -79
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -526
- package/dist/components/inputs/shared/StaticInput.d.ts +0 -38
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
- 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/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -57
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -1,115 +1,52 @@
|
|
|
1
1
|
import { FileUploadContentError } from "./FileUploadContentError.js";
|
|
2
2
|
import { FileUploadContentFilled } from "./FileUploadContentFilled.js";
|
|
3
3
|
import { FileUploadContentLoading } from "./FileUploadContentLoading.js";
|
|
4
|
-
import { c } from "react/compiler-runtime";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
import { clsx } from "clsx";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
7
|
//#region src/components/inputs/File/shared/FileCard.tsx
|
|
8
|
-
var FileCard = (
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
$[7] = t2;
|
|
36
|
-
$[8] = t3;
|
|
37
|
-
} else t3 = $[8];
|
|
38
|
-
t1 = t3;
|
|
39
|
-
break bb0;
|
|
40
|
-
}
|
|
41
|
-
if (state.state === "error") {
|
|
42
|
-
let t2;
|
|
43
|
-
if ($[9] !== index || $[10] !== onCancel) {
|
|
44
|
-
t2 = () => {
|
|
45
|
-
onCancel?.(index);
|
|
46
|
-
};
|
|
47
|
-
$[9] = index;
|
|
48
|
-
$[10] = onCancel;
|
|
49
|
-
$[11] = t2;
|
|
50
|
-
} else t2 = $[11];
|
|
51
|
-
let t3;
|
|
52
|
-
if ($[12] !== as || $[13] !== isDisabled || $[14] !== state || $[15] !== t2) {
|
|
53
|
-
t3 = /* @__PURE__ */ jsx(FileUploadContentError, {
|
|
54
|
-
as,
|
|
55
|
-
removeWithIcon: true,
|
|
56
|
-
variant: "horizontal",
|
|
57
|
-
isDisabled,
|
|
58
|
-
state,
|
|
59
|
-
onRemove: t2
|
|
60
|
-
});
|
|
61
|
-
$[12] = as;
|
|
62
|
-
$[13] = isDisabled;
|
|
63
|
-
$[14] = state;
|
|
64
|
-
$[15] = t2;
|
|
65
|
-
$[16] = t3;
|
|
66
|
-
} else t3 = $[16];
|
|
67
|
-
t1 = t3;
|
|
68
|
-
break bb0;
|
|
69
|
-
}
|
|
70
|
-
let t2;
|
|
71
|
-
if ($[17] !== onRemove || $[18] !== state.id) {
|
|
72
|
-
t2 = () => {
|
|
8
|
+
var FileCard = ({ index, as, state, onRemove, isDisabled, onCancel }) => {
|
|
9
|
+
const content = useMemo(() => {
|
|
10
|
+
if (state.state === "uploading") return /* @__PURE__ */ jsx(FileUploadContentLoading, {
|
|
11
|
+
index,
|
|
12
|
+
variant: "horizontal",
|
|
13
|
+
as,
|
|
14
|
+
isDisabled,
|
|
15
|
+
state,
|
|
16
|
+
onCancel: () => onCancel?.(index)
|
|
17
|
+
});
|
|
18
|
+
if (state.state === "error") return /* @__PURE__ */ jsx(FileUploadContentError, {
|
|
19
|
+
as,
|
|
20
|
+
removeWithIcon: true,
|
|
21
|
+
variant: "horizontal",
|
|
22
|
+
isDisabled,
|
|
23
|
+
state,
|
|
24
|
+
onRemove: () => {
|
|
25
|
+
onCancel?.(index);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return /* @__PURE__ */ jsx(FileUploadContentFilled, {
|
|
29
|
+
as,
|
|
30
|
+
removeWithIcon: true,
|
|
31
|
+
variant: "horizontal",
|
|
32
|
+
isDisabled,
|
|
33
|
+
state,
|
|
34
|
+
onRemove: () => {
|
|
73
35
|
onRemove?.(state.id ?? "");
|
|
74
|
-
}
|
|
75
|
-
$[17] = onRemove;
|
|
76
|
-
$[18] = state.id;
|
|
77
|
-
$[19] = t2;
|
|
78
|
-
} else t2 = $[19];
|
|
79
|
-
let t3;
|
|
80
|
-
if ($[20] !== as || $[21] !== isDisabled || $[22] !== state || $[23] !== t2) {
|
|
81
|
-
t3 = /* @__PURE__ */ jsx(FileUploadContentFilled, {
|
|
82
|
-
as,
|
|
83
|
-
removeWithIcon: true,
|
|
84
|
-
variant: "horizontal",
|
|
85
|
-
isDisabled,
|
|
86
|
-
state,
|
|
87
|
-
onRemove: t2
|
|
88
|
-
});
|
|
89
|
-
$[20] = as;
|
|
90
|
-
$[21] = isDisabled;
|
|
91
|
-
$[22] = state;
|
|
92
|
-
$[23] = t2;
|
|
93
|
-
$[24] = t3;
|
|
94
|
-
} else t3 = $[24];
|
|
95
|
-
t1 = t3;
|
|
96
|
-
}
|
|
97
|
-
const content = t1;
|
|
98
|
-
let t2;
|
|
99
|
-
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
100
|
-
t2 = clsx("flex items-center self-stretch", "bg-elevation-fill-default-1", "px-file-upload-file-card-side-default", "py-4", "rounded-file-upload-file-card-rounding-default border border-elevation-outline-default-1 border-solid");
|
|
101
|
-
$[25] = t2;
|
|
102
|
-
} else t2 = $[25];
|
|
103
|
-
let t3;
|
|
104
|
-
if ($[26] !== content) {
|
|
105
|
-
t3 = /* @__PURE__ */ jsx("div", {
|
|
106
|
-
className: t2,
|
|
107
|
-
children: content
|
|
36
|
+
}
|
|
108
37
|
});
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
38
|
+
}, [
|
|
39
|
+
state,
|
|
40
|
+
index,
|
|
41
|
+
as,
|
|
42
|
+
isDisabled,
|
|
43
|
+
onCancel,
|
|
44
|
+
onRemove
|
|
45
|
+
]);
|
|
46
|
+
return /* @__PURE__ */ jsx("div", {
|
|
47
|
+
className: clsx("flex items-center self-stretch", "bg-elevation-fill-default-1", "px-file-upload-file-card-side-default", "py-4", "rounded-file-upload-file-card-rounding-default border border-elevation-outline-default-1 border-solid"),
|
|
48
|
+
children: content
|
|
49
|
+
});
|
|
113
50
|
};
|
|
114
51
|
//#endregion
|
|
115
52
|
export { FileCard };
|
|
@@ -1,54 +1,19 @@
|
|
|
1
1
|
import { FileCard } from "./FileCard.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
4
|
//#region src/components/inputs/File/shared/FileCardList.tsx
|
|
6
|
-
var FileCardList = (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if ($[8] !== as || $[9] !== isDisabled || $[10] !== onCancel || $[11] !== onRemove) {
|
|
19
|
-
t3 = (state, index) => /* @__PURE__ */ jsx(FileCard, {
|
|
20
|
-
index,
|
|
21
|
-
as,
|
|
22
|
-
state,
|
|
23
|
-
isDisabled,
|
|
24
|
-
onRemove,
|
|
25
|
-
onCancel
|
|
26
|
-
}, state.file?.name ?? state.displayName ?? state.id ?? state.src);
|
|
27
|
-
$[8] = as;
|
|
28
|
-
$[9] = isDisabled;
|
|
29
|
-
$[10] = onCancel;
|
|
30
|
-
$[11] = onRemove;
|
|
31
|
-
$[12] = t3;
|
|
32
|
-
} else t3 = $[12];
|
|
33
|
-
t2 = uploadState.map(t3);
|
|
34
|
-
$[2] = as;
|
|
35
|
-
$[3] = isDisabled;
|
|
36
|
-
$[4] = onCancel;
|
|
37
|
-
$[5] = onRemove;
|
|
38
|
-
$[6] = uploadState;
|
|
39
|
-
$[7] = t2;
|
|
40
|
-
} else t2 = $[7];
|
|
41
|
-
let t3;
|
|
42
|
-
if ($[13] !== t1 || $[14] !== t2) {
|
|
43
|
-
t3 = /* @__PURE__ */ jsx("div", {
|
|
44
|
-
className: t1,
|
|
45
|
-
children: t2
|
|
46
|
-
});
|
|
47
|
-
$[13] = t1;
|
|
48
|
-
$[14] = t2;
|
|
49
|
-
$[15] = t3;
|
|
50
|
-
} else t3 = $[15];
|
|
51
|
-
return t3;
|
|
5
|
+
var FileCardList = ({ uploadState, as, isDisabled, className, onRemove, onCancel }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
className: clsx("mt-10 flex flex-col items-start gap-4 self-stretch", className),
|
|
8
|
+
children: uploadState.map((state, index) => /* @__PURE__ */ jsx(FileCard, {
|
|
9
|
+
index,
|
|
10
|
+
as,
|
|
11
|
+
state,
|
|
12
|
+
isDisabled,
|
|
13
|
+
onRemove,
|
|
14
|
+
onCancel
|
|
15
|
+
}, state.file?.name ?? state.displayName ?? state.id ?? state.src))
|
|
16
|
+
});
|
|
52
17
|
};
|
|
53
18
|
//#endregion
|
|
54
19
|
export { FileCardList };
|
|
@@ -2,166 +2,53 @@ import { FileUploadContentError } from "./FileUploadContentError.js";
|
|
|
2
2
|
import { FileUploadContentFilled } from "./FileUploadContentFilled.js";
|
|
3
3
|
import { FileUploadContentLoading } from "./FileUploadContentLoading.js";
|
|
4
4
|
import { FileUploadContentEmpty } from "./FileUploadContentEmpty.js";
|
|
5
|
-
import { c } from "react/compiler-runtime";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { FileTrigger } from "react-aria-components";
|
|
8
7
|
//#region src/components/inputs/File/shared/FileUploadContent.tsx
|
|
9
|
-
var FileUploadContent = (
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
let handleRemove;
|
|
18
|
-
let handleSelect;
|
|
19
|
-
let isDisabled;
|
|
20
|
-
let rest;
|
|
21
|
-
let uploadState;
|
|
22
|
-
let uploadText;
|
|
23
|
-
let variant;
|
|
24
|
-
if ($[0] !== t0) {
|
|
25
|
-
({variant, as, isDisabled, browseText, uploadText, emptyText, uploadState, handleCancelUpload, handleRemove, acceptedFileTypes, allowsMultiple, handleSelect, ...rest} = t0);
|
|
26
|
-
$[0] = t0;
|
|
27
|
-
$[1] = acceptedFileTypes;
|
|
28
|
-
$[2] = allowsMultiple;
|
|
29
|
-
$[3] = as;
|
|
30
|
-
$[4] = browseText;
|
|
31
|
-
$[5] = emptyText;
|
|
32
|
-
$[6] = handleCancelUpload;
|
|
33
|
-
$[7] = handleRemove;
|
|
34
|
-
$[8] = handleSelect;
|
|
35
|
-
$[9] = isDisabled;
|
|
36
|
-
$[10] = rest;
|
|
37
|
-
$[11] = uploadState;
|
|
38
|
-
$[12] = uploadText;
|
|
39
|
-
$[13] = variant;
|
|
40
|
-
} else {
|
|
41
|
-
acceptedFileTypes = $[1];
|
|
42
|
-
allowsMultiple = $[2];
|
|
43
|
-
as = $[3];
|
|
44
|
-
browseText = $[4];
|
|
45
|
-
emptyText = $[5];
|
|
46
|
-
handleCancelUpload = $[6];
|
|
47
|
-
handleRemove = $[7];
|
|
48
|
-
handleSelect = $[8];
|
|
49
|
-
isDisabled = $[9];
|
|
50
|
-
rest = $[10];
|
|
51
|
-
uploadState = $[11];
|
|
52
|
-
uploadText = $[12];
|
|
53
|
-
variant = $[13];
|
|
54
|
-
}
|
|
55
|
-
let t1;
|
|
56
|
-
if ($[14] !== uploadState) {
|
|
57
|
-
t1 = uploadState.at(0);
|
|
58
|
-
$[14] = uploadState;
|
|
59
|
-
$[15] = t1;
|
|
60
|
-
} else t1 = $[15];
|
|
61
|
-
const currentState = t1;
|
|
62
|
-
let t2;
|
|
63
|
-
if ($[16] !== acceptedFileTypes || $[17] !== allowsMultiple || $[18] !== handleSelect || $[19] !== rest) {
|
|
64
|
-
t2 = {
|
|
65
|
-
...rest,
|
|
66
|
-
acceptedFileTypes,
|
|
67
|
-
allowsMultiple,
|
|
68
|
-
onSelect: handleSelect
|
|
69
|
-
};
|
|
70
|
-
$[16] = acceptedFileTypes;
|
|
71
|
-
$[17] = allowsMultiple;
|
|
72
|
-
$[18] = handleSelect;
|
|
73
|
-
$[19] = rest;
|
|
74
|
-
$[20] = t2;
|
|
75
|
-
} else t2 = $[20];
|
|
76
|
-
const fileTriggerProps = t2;
|
|
8
|
+
var FileUploadContent = ({ variant, as, isDisabled, browseText, uploadText, emptyText, uploadState, 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
|
+
};
|
|
77
16
|
if (!allowsMultiple && currentState) {
|
|
78
|
-
if (currentState.state === "uploading") {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
if (currentState.state === "
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
let t4;
|
|
110
|
-
if ($[30] !== as || $[31] !== browseText || $[32] !== currentState || $[33] !== fileTriggerProps || $[34] !== isDisabled || $[35] !== t3 || $[36] !== variant) {
|
|
111
|
-
t4 = /* @__PURE__ */ jsx(FileUploadContentFilled, {
|
|
112
|
-
as,
|
|
113
|
-
variant,
|
|
114
|
-
singleFile: true,
|
|
115
|
-
isDisabled,
|
|
116
|
-
state: currentState,
|
|
117
|
-
browseText,
|
|
118
|
-
fileTriggerProps,
|
|
119
|
-
onRemove: t3
|
|
120
|
-
});
|
|
121
|
-
$[30] = as;
|
|
122
|
-
$[31] = browseText;
|
|
123
|
-
$[32] = currentState;
|
|
124
|
-
$[33] = fileTriggerProps;
|
|
125
|
-
$[34] = isDisabled;
|
|
126
|
-
$[35] = t3;
|
|
127
|
-
$[36] = variant;
|
|
128
|
-
$[37] = t4;
|
|
129
|
-
} else t4 = $[37];
|
|
130
|
-
return t4;
|
|
131
|
-
}
|
|
132
|
-
if (currentState.state === "error") {
|
|
133
|
-
let t3;
|
|
134
|
-
if ($[38] !== currentState.id || $[39] !== handleRemove) {
|
|
135
|
-
t3 = () => {
|
|
136
|
-
handleRemove(currentState.id ?? "");
|
|
137
|
-
};
|
|
138
|
-
$[38] = currentState.id;
|
|
139
|
-
$[39] = handleRemove;
|
|
140
|
-
$[40] = t3;
|
|
141
|
-
} else t3 = $[40];
|
|
142
|
-
let t4;
|
|
143
|
-
if ($[41] !== as || $[42] !== currentState || $[43] !== isDisabled || $[44] !== t3 || $[45] !== variant) {
|
|
144
|
-
t4 = /* @__PURE__ */ jsx(FileUploadContentError, {
|
|
145
|
-
as,
|
|
146
|
-
variant,
|
|
147
|
-
singleFile: true,
|
|
148
|
-
isDisabled,
|
|
149
|
-
state: currentState,
|
|
150
|
-
onRemove: t3
|
|
151
|
-
});
|
|
152
|
-
$[41] = as;
|
|
153
|
-
$[42] = currentState;
|
|
154
|
-
$[43] = isDisabled;
|
|
155
|
-
$[44] = t3;
|
|
156
|
-
$[45] = variant;
|
|
157
|
-
$[46] = t4;
|
|
158
|
-
} else t4 = $[46];
|
|
159
|
-
return t4;
|
|
160
|
-
}
|
|
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
|
+
onCancel: handleCancelUpload
|
|
25
|
+
});
|
|
26
|
+
if (currentState.state === "uploaded") return /* @__PURE__ */ jsx(FileUploadContentFilled, {
|
|
27
|
+
as,
|
|
28
|
+
variant,
|
|
29
|
+
singleFile: true,
|
|
30
|
+
isDisabled,
|
|
31
|
+
state: currentState,
|
|
32
|
+
browseText,
|
|
33
|
+
fileTriggerProps,
|
|
34
|
+
onRemove: () => {
|
|
35
|
+
handleRemove(currentState.id ?? "");
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
if (currentState.state === "error") return /* @__PURE__ */ jsx(FileUploadContentError, {
|
|
39
|
+
as,
|
|
40
|
+
variant,
|
|
41
|
+
singleFile: true,
|
|
42
|
+
isDisabled,
|
|
43
|
+
state: currentState,
|
|
44
|
+
onRemove: () => {
|
|
45
|
+
handleRemove(currentState.id ?? "");
|
|
46
|
+
}
|
|
47
|
+
});
|
|
161
48
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
49
|
+
return /* @__PURE__ */ jsx(FileTrigger, {
|
|
50
|
+
...fileTriggerProps,
|
|
51
|
+
children: /* @__PURE__ */ jsx(FileUploadContentEmpty, {
|
|
165
52
|
as,
|
|
166
53
|
variant,
|
|
167
54
|
singleFile: true,
|
|
@@ -169,26 +56,8 @@ var FileUploadContent = (t0) => {
|
|
|
169
56
|
title: emptyText,
|
|
170
57
|
uploadText,
|
|
171
58
|
browseText
|
|
172
|
-
})
|
|
173
|
-
|
|
174
|
-
$[48] = browseText;
|
|
175
|
-
$[49] = emptyText;
|
|
176
|
-
$[50] = isDisabled;
|
|
177
|
-
$[51] = uploadText;
|
|
178
|
-
$[52] = variant;
|
|
179
|
-
$[53] = t3;
|
|
180
|
-
} else t3 = $[53];
|
|
181
|
-
let t4;
|
|
182
|
-
if ($[54] !== fileTriggerProps || $[55] !== t3) {
|
|
183
|
-
t4 = /* @__PURE__ */ jsx(FileTrigger, {
|
|
184
|
-
...fileTriggerProps,
|
|
185
|
-
children: t3
|
|
186
|
-
});
|
|
187
|
-
$[54] = fileTriggerProps;
|
|
188
|
-
$[55] = t3;
|
|
189
|
-
$[56] = t4;
|
|
190
|
-
} else t4 = $[56];
|
|
191
|
-
return t4;
|
|
59
|
+
})
|
|
60
|
+
});
|
|
192
61
|
};
|
|
193
62
|
//#endregion
|
|
194
63
|
export { FileUploadContent };
|
|
@@ -2,158 +2,55 @@ import { Typography } from "../../../text/Typography/Typography.js";
|
|
|
2
2
|
import { Button } from "../../../buttons/Button/Button.js";
|
|
3
3
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
4
4
|
import { UploadIcon } from "../../../../assets/icons/Upload.js";
|
|
5
|
-
import { c } from "react/compiler-runtime";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { clsx } from "clsx";
|
|
8
7
|
//#region src/components/inputs/File/shared/FileUploadContentEmpty.tsx
|
|
9
|
-
var FileUploadContentEmpty = (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
variant: "prominent-1",
|
|
56
|
-
size: "label-1",
|
|
57
|
-
as: "span",
|
|
58
|
-
className: t10,
|
|
59
|
-
children: title
|
|
60
|
-
});
|
|
61
|
-
$[11] = t10;
|
|
62
|
-
$[12] = title;
|
|
63
|
-
$[13] = t11;
|
|
64
|
-
} else t11 = $[13];
|
|
65
|
-
let t12;
|
|
66
|
-
if ($[14] !== t11 || $[15] !== t7) {
|
|
67
|
-
t12 = /* @__PURE__ */ jsxs("div", {
|
|
68
|
-
className: t7,
|
|
69
|
-
children: [t8, t11]
|
|
70
|
-
});
|
|
71
|
-
$[14] = t11;
|
|
72
|
-
$[15] = t7;
|
|
73
|
-
$[16] = t12;
|
|
74
|
-
} else t12 = $[16];
|
|
75
|
-
const t13 = variant === "vertical" && as === "button";
|
|
76
|
-
const t14 = as === "link";
|
|
77
|
-
const t15 = as === "button";
|
|
78
|
-
let t16;
|
|
79
|
-
if ($[17] !== t13 || $[18] !== t14 || $[19] !== t15) {
|
|
80
|
-
t16 = clsx("flex items-center justify-center", {
|
|
81
|
-
"flex-col": t13,
|
|
82
|
-
"gap-file-upload-content-gap-text-to-text": t14,
|
|
83
|
-
"gap-file-upload-content-gap-content-to-button": t15
|
|
84
|
-
});
|
|
85
|
-
$[17] = t13;
|
|
86
|
-
$[18] = t14;
|
|
87
|
-
$[19] = t15;
|
|
88
|
-
$[20] = t16;
|
|
89
|
-
} else t16 = $[20];
|
|
90
|
-
const t17 = singleFile ? "label-2" : "label-3";
|
|
91
|
-
const t18 = variant === "vertical";
|
|
92
|
-
let t19;
|
|
93
|
-
if ($[21] !== isDisabled || $[22] !== t18) {
|
|
94
|
-
t19 = clsx("text-text-default-2", {
|
|
95
|
-
"text-center": t18,
|
|
96
|
-
"opacity-50": isDisabled
|
|
97
|
-
});
|
|
98
|
-
$[21] = isDisabled;
|
|
99
|
-
$[22] = t18;
|
|
100
|
-
$[23] = t19;
|
|
101
|
-
} else t19 = $[23];
|
|
102
|
-
let t20;
|
|
103
|
-
if ($[24] !== t17 || $[25] !== t19 || $[26] !== uploadText) {
|
|
104
|
-
t20 = /* @__PURE__ */ jsx(Typography, {
|
|
105
|
-
variant: "default",
|
|
106
|
-
size: t17,
|
|
107
|
-
as: "span",
|
|
108
|
-
className: t19,
|
|
109
|
-
children: uploadText
|
|
110
|
-
});
|
|
111
|
-
$[24] = t17;
|
|
112
|
-
$[25] = t19;
|
|
113
|
-
$[26] = uploadText;
|
|
114
|
-
$[27] = t20;
|
|
115
|
-
} else t20 = $[27];
|
|
116
|
-
let t21;
|
|
117
|
-
if ($[28] !== as || $[29] !== browseText || $[30] !== hideButton || $[31] !== isDisabled) {
|
|
118
|
-
t21 = !hideButton && browseText && (as === "link" ? /* @__PURE__ */ jsx(TextButton, {
|
|
119
|
-
className: "text-interactive-text-primary-idle lowercase",
|
|
120
|
-
children: browseText
|
|
121
|
-
}) : /* @__PURE__ */ jsx(Button, {
|
|
122
|
-
variant: "outlined",
|
|
123
|
-
size: "xs",
|
|
124
|
-
width: "hug",
|
|
125
|
-
isDisabled,
|
|
126
|
-
children: browseText
|
|
127
|
-
}));
|
|
128
|
-
$[28] = as;
|
|
129
|
-
$[29] = browseText;
|
|
130
|
-
$[30] = hideButton;
|
|
131
|
-
$[31] = isDisabled;
|
|
132
|
-
$[32] = t21;
|
|
133
|
-
} else t21 = $[32];
|
|
134
|
-
let t22;
|
|
135
|
-
if ($[33] !== t16 || $[34] !== t20 || $[35] !== t21) {
|
|
136
|
-
t22 = /* @__PURE__ */ jsxs("div", {
|
|
137
|
-
className: t16,
|
|
138
|
-
children: [t20, t21]
|
|
139
|
-
});
|
|
140
|
-
$[33] = t16;
|
|
141
|
-
$[34] = t20;
|
|
142
|
-
$[35] = t21;
|
|
143
|
-
$[36] = t22;
|
|
144
|
-
} else t22 = $[36];
|
|
145
|
-
let t23;
|
|
146
|
-
if ($[37] !== t12 || $[38] !== t22 || $[39] !== t4) {
|
|
147
|
-
t23 = /* @__PURE__ */ jsxs("div", {
|
|
148
|
-
className: t4,
|
|
149
|
-
children: [t12, t22]
|
|
150
|
-
});
|
|
151
|
-
$[37] = t12;
|
|
152
|
-
$[38] = t22;
|
|
153
|
-
$[39] = t4;
|
|
154
|
-
$[40] = t23;
|
|
155
|
-
} else t23 = $[40];
|
|
156
|
-
return t23;
|
|
8
|
+
var FileUploadContentEmpty = ({ variant, as, isDisabled, title, browseText, uploadText, singleFile, hideButton = false, className }) => {
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
+
className: clsx("flex w-full items-center gap-file-upload-content-gap-text-to-text", className, {
|
|
11
|
+
"flex-col": variant === "vertical",
|
|
12
|
+
"min-h-11 flex-row justify-between": variant === "horizontal"
|
|
13
|
+
}),
|
|
14
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
15
|
+
className: clsx("flex items-center gap-file-upload-content-gap-icon-to-content", {
|
|
16
|
+
"flex-col": variant === "vertical",
|
|
17
|
+
"flex-row": variant === "horizontal",
|
|
18
|
+
"opacity-50": isDisabled
|
|
19
|
+
}),
|
|
20
|
+
children: [/* @__PURE__ */ jsx(UploadIcon, { className: "h-6 w-6 text-text-default-1" }), /* @__PURE__ */ jsx(Typography, {
|
|
21
|
+
variant: "prominent-1",
|
|
22
|
+
size: "label-1",
|
|
23
|
+
as: "span",
|
|
24
|
+
className: clsx("self-stretch text-text-default-1", { "text-center": variant === "vertical" }),
|
|
25
|
+
children: title
|
|
26
|
+
})]
|
|
27
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
28
|
+
className: clsx("flex items-center justify-center", {
|
|
29
|
+
"flex-col": variant === "vertical" && as === "button",
|
|
30
|
+
"gap-file-upload-content-gap-text-to-text": as === "link",
|
|
31
|
+
"gap-file-upload-content-gap-content-to-button": as === "button"
|
|
32
|
+
}),
|
|
33
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
34
|
+
variant: "default",
|
|
35
|
+
size: singleFile ? "label-2" : "label-3",
|
|
36
|
+
as: "span",
|
|
37
|
+
className: clsx("text-text-default-2", {
|
|
38
|
+
"text-center": variant === "vertical",
|
|
39
|
+
"opacity-50": isDisabled
|
|
40
|
+
}),
|
|
41
|
+
children: uploadText
|
|
42
|
+
}), !hideButton && browseText && (as === "link" ? /* @__PURE__ */ jsx(TextButton, {
|
|
43
|
+
className: "text-interactive-text-primary-idle lowercase",
|
|
44
|
+
children: browseText
|
|
45
|
+
}) : /* @__PURE__ */ jsx(Button, {
|
|
46
|
+
variant: "outlined",
|
|
47
|
+
size: "xs",
|
|
48
|
+
width: "hug",
|
|
49
|
+
isDisabled,
|
|
50
|
+
children: browseText
|
|
51
|
+
}))]
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
157
54
|
};
|
|
158
55
|
//#endregion
|
|
159
56
|
export { FileUploadContentEmpty };
|