@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
|
@@ -5,248 +5,107 @@ import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconBu
|
|
|
5
5
|
import "../../../../config/i18n.js";
|
|
6
6
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
7
7
|
import { WarningFilledIcon } from "../../../../assets/icons/WarningFilled.js";
|
|
8
|
-
import { c } from "react/compiler-runtime";
|
|
9
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { clsx } from "clsx";
|
|
11
10
|
import { FileTrigger } from "react-aria-components";
|
|
12
11
|
import { useTranslation } from "react-i18next";
|
|
13
12
|
//#region src/components/inputs/File/shared/FileUploadContentError.tsx
|
|
14
|
-
var FileUploadContentError = (
|
|
15
|
-
const $ = c(52);
|
|
16
|
-
const { variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon: t1, singleFile, onRemove } = t0;
|
|
17
|
-
const removeWithIcon = t1 === void 0 ? false : t1;
|
|
13
|
+
var FileUploadContentError = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove }) => {
|
|
18
14
|
const { t } = useTranslation("ui");
|
|
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
|
-
|
|
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
|
-
className: t21,
|
|
110
|
-
children: t22
|
|
111
|
-
});
|
|
112
|
-
$[21] = t19;
|
|
113
|
-
$[22] = t21;
|
|
114
|
-
$[23] = t22;
|
|
115
|
-
$[24] = t23;
|
|
116
|
-
} else t23 = $[24];
|
|
117
|
-
let t24;
|
|
118
|
-
if ($[25] !== t14 || $[26] !== t18 || $[27] !== t23) {
|
|
119
|
-
t24 = /* @__PURE__ */ jsxs("div", {
|
|
120
|
-
className: t14,
|
|
121
|
-
children: [t18, t23]
|
|
122
|
-
});
|
|
123
|
-
$[25] = t14;
|
|
124
|
-
$[26] = t18;
|
|
125
|
-
$[27] = t23;
|
|
126
|
-
$[28] = t24;
|
|
127
|
-
} else t24 = $[28];
|
|
128
|
-
let t25;
|
|
129
|
-
if ($[29] !== t10 || $[30] !== t24) {
|
|
130
|
-
t25 = /* @__PURE__ */ jsxs("div", {
|
|
131
|
-
className: t10,
|
|
132
|
-
children: [t11, t24]
|
|
133
|
-
});
|
|
134
|
-
$[29] = t10;
|
|
135
|
-
$[30] = t24;
|
|
136
|
-
$[31] = t25;
|
|
137
|
-
} else t25 = $[31];
|
|
138
|
-
const t26 = variant === "vertical" && as === "button";
|
|
139
|
-
const t27 = as === "link";
|
|
140
|
-
const t28 = as === "button";
|
|
141
|
-
let t29;
|
|
142
|
-
if ($[32] !== t26 || $[33] !== t27 || $[34] !== t28) {
|
|
143
|
-
t29 = clsx("flex flex-none items-center justify-end", {
|
|
144
|
-
"flex-col": t26,
|
|
145
|
-
"gap-file-upload-content-gap-text-to-text": t27,
|
|
146
|
-
"gap-file-upload-content-gap-content-to-button": t28
|
|
147
|
-
});
|
|
148
|
-
$[32] = t26;
|
|
149
|
-
$[33] = t27;
|
|
150
|
-
$[34] = t28;
|
|
151
|
-
$[35] = t29;
|
|
152
|
-
} else t29 = $[35];
|
|
153
|
-
let t30;
|
|
154
|
-
if ($[36] !== as || $[37] !== browseText || $[38] !== fileTriggerProps || $[39] !== isDisabled || $[40] !== onRemove || $[41] !== removeWithIcon || $[42] !== state.id || $[43] !== t) {
|
|
155
|
-
t30 = as === "link" ? /* @__PURE__ */ jsxs(Fragment, { children: [fileTriggerProps && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FileTrigger, {
|
|
156
|
-
...fileTriggerProps,
|
|
157
|
-
children: /* @__PURE__ */ jsx(TextButton, {
|
|
158
|
-
className: "text-interactive-text-primary-idle",
|
|
159
|
-
children: browseText ?? ""
|
|
160
|
-
})
|
|
161
|
-
}), /* @__PURE__ */ jsx(Typography, {
|
|
162
|
-
variant: "default",
|
|
163
|
-
size: "label-2",
|
|
164
|
-
as: "span",
|
|
165
|
-
className: "text-text-default-2",
|
|
166
|
-
children: t(_temp)
|
|
167
|
-
})] }), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
|
|
168
|
-
label: "Cancel",
|
|
169
|
-
color: "secondary",
|
|
170
|
-
onPress: () => {
|
|
171
|
-
onRemove(state.id ?? "");
|
|
172
|
-
},
|
|
173
|
-
icon: CloseIcon
|
|
174
|
-
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
175
|
-
className: "text-interactive-text-primary-idle lowercase",
|
|
176
|
-
onPress: () => {
|
|
177
|
-
onRemove(state.id ?? "");
|
|
178
|
-
},
|
|
179
|
-
children: t(_temp2)
|
|
180
|
-
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
181
|
-
className: "flex items-center justify-center gap-file-upload-content-gap-button-to-button self-stretch",
|
|
182
|
-
children: [fileTriggerProps && /* @__PURE__ */ jsx(FileTrigger, {
|
|
183
|
-
...fileTriggerProps,
|
|
184
|
-
children: /* @__PURE__ */ jsx(Button$1, {
|
|
185
|
-
variant: "outlined",
|
|
186
|
-
size: "xs",
|
|
187
|
-
width: "hug",
|
|
188
|
-
isDisabled,
|
|
189
|
-
children: browseText ?? ""
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className: clsx("flex w-full flex-fill flex-col items-start"),
|
|
17
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: clsx("flex w-full items-center", {
|
|
19
|
+
"flex-row gap-file-upload-content-gap-left-to-right-content": variant === "horizontal",
|
|
20
|
+
"flex-col": variant === "vertical",
|
|
21
|
+
"gap-file-upload-content-gap-content-to-button": variant === "vertical" && as === "button",
|
|
22
|
+
"gap-file-upload-content-gap-text-to-text": variant === "vertical" && as === "link"
|
|
23
|
+
}),
|
|
24
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: clsx("flex min-w-0 max-w-full flex-grow items-center gap-file-upload-content-gap-icon-to-content", {
|
|
26
|
+
"flex-col": variant === "vertical",
|
|
27
|
+
"flex-row": variant === "horizontal",
|
|
28
|
+
"opacity-50": isDisabled
|
|
29
|
+
}),
|
|
30
|
+
children: [/* @__PURE__ */ jsx(WarningFilledIcon, { className: "h-6 w-6 text-elevation-fill-warning-1" }), /* @__PURE__ */ jsxs("div", {
|
|
31
|
+
className: clsx("flex flex-col gap-file-upload-content-gap-text-to-text", {
|
|
32
|
+
"max-w-full items-center": variant === "vertical",
|
|
33
|
+
"max-w-[calc(100%_-_32px)]": variant === "horizontal"
|
|
34
|
+
}),
|
|
35
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
36
|
+
variant: "prominent-1",
|
|
37
|
+
size: "label-1",
|
|
38
|
+
as: "span",
|
|
39
|
+
className: clsx("self-stretch truncate text-text-default-1", { "text-center": variant === "vertical" }),
|
|
40
|
+
children: state.file?.name ?? state.displayName ?? ""
|
|
41
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
42
|
+
variant: "default",
|
|
43
|
+
size: singleFile ? "label-2" : "label-3",
|
|
44
|
+
as: "span",
|
|
45
|
+
className: clsx("text-text-default-2", { "text-center": variant === "vertical" }),
|
|
46
|
+
children: state.error?.serverMessage ?? state.error?.message
|
|
47
|
+
})]
|
|
48
|
+
})]
|
|
49
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
50
|
+
className: clsx("flex flex-none items-center justify-end", {
|
|
51
|
+
"flex-col": variant === "vertical" && as === "button",
|
|
52
|
+
"gap-file-upload-content-gap-text-to-text": as === "link",
|
|
53
|
+
"gap-file-upload-content-gap-content-to-button": as === "button"
|
|
54
|
+
}),
|
|
55
|
+
children: as === "link" ? /* @__PURE__ */ jsxs(Fragment, { children: [fileTriggerProps && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FileTrigger, {
|
|
56
|
+
...fileTriggerProps,
|
|
57
|
+
children: /* @__PURE__ */ jsx(TextButton, {
|
|
58
|
+
className: "text-interactive-text-primary-idle",
|
|
59
|
+
children: browseText ?? ""
|
|
60
|
+
})
|
|
61
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
62
|
+
variant: "default",
|
|
63
|
+
size: "label-2",
|
|
64
|
+
as: "span",
|
|
65
|
+
className: "text-text-default-2",
|
|
66
|
+
children: t(($) => $.ui.fileUpload.or)
|
|
67
|
+
})] }), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
|
|
68
|
+
label: "Cancel",
|
|
69
|
+
color: "secondary",
|
|
70
|
+
onPress: () => {
|
|
71
|
+
onRemove(state.id ?? "");
|
|
72
|
+
},
|
|
73
|
+
icon: CloseIcon
|
|
74
|
+
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
75
|
+
className: "text-interactive-text-primary-idle lowercase",
|
|
76
|
+
onPress: () => {
|
|
77
|
+
onRemove(state.id ?? "");
|
|
78
|
+
},
|
|
79
|
+
children: t(($) => $.ui.fileUpload.removeFile)
|
|
80
|
+
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
81
|
+
className: "flex items-center justify-center gap-file-upload-content-gap-button-to-button self-stretch",
|
|
82
|
+
children: [fileTriggerProps && /* @__PURE__ */ jsx(FileTrigger, {
|
|
83
|
+
...fileTriggerProps,
|
|
84
|
+
children: /* @__PURE__ */ jsx(Button$1, {
|
|
85
|
+
variant: "outlined",
|
|
86
|
+
size: "xs",
|
|
87
|
+
width: "hug",
|
|
88
|
+
isDisabled,
|
|
89
|
+
children: browseText ?? ""
|
|
90
|
+
})
|
|
91
|
+
}), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
|
|
92
|
+
label: "Cancel",
|
|
93
|
+
color: "secondary",
|
|
94
|
+
onPress: () => {
|
|
95
|
+
onRemove(state.id ?? "");
|
|
96
|
+
},
|
|
97
|
+
icon: CloseIcon
|
|
98
|
+
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
99
|
+
color: "secondary",
|
|
100
|
+
onPress: () => {
|
|
101
|
+
onRemove(state.id ?? "");
|
|
102
|
+
},
|
|
103
|
+
children: t(($) => $.ui.fileUpload.removeFile)
|
|
104
|
+
})]
|
|
190
105
|
})
|
|
191
|
-
}), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
|
|
192
|
-
label: "Cancel",
|
|
193
|
-
color: "secondary",
|
|
194
|
-
onPress: () => {
|
|
195
|
-
onRemove(state.id ?? "");
|
|
196
|
-
},
|
|
197
|
-
icon: CloseIcon
|
|
198
|
-
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
199
|
-
color: "secondary",
|
|
200
|
-
onPress: () => {
|
|
201
|
-
onRemove(state.id ?? "");
|
|
202
|
-
},
|
|
203
|
-
children: t(_temp3)
|
|
204
106
|
})]
|
|
205
|
-
})
|
|
206
|
-
|
|
207
|
-
$[37] = browseText;
|
|
208
|
-
$[38] = fileTriggerProps;
|
|
209
|
-
$[39] = isDisabled;
|
|
210
|
-
$[40] = onRemove;
|
|
211
|
-
$[41] = removeWithIcon;
|
|
212
|
-
$[42] = state.id;
|
|
213
|
-
$[43] = t;
|
|
214
|
-
$[44] = t30;
|
|
215
|
-
} else t30 = $[44];
|
|
216
|
-
let t31;
|
|
217
|
-
if ($[45] !== t29 || $[46] !== t30) {
|
|
218
|
-
t31 = /* @__PURE__ */ jsx("div", {
|
|
219
|
-
className: t29,
|
|
220
|
-
children: t30
|
|
221
|
-
});
|
|
222
|
-
$[45] = t29;
|
|
223
|
-
$[46] = t30;
|
|
224
|
-
$[47] = t31;
|
|
225
|
-
} else t31 = $[47];
|
|
226
|
-
let t32;
|
|
227
|
-
if ($[48] !== t25 || $[49] !== t31 || $[50] !== t7) {
|
|
228
|
-
t32 = /* @__PURE__ */ jsx("div", {
|
|
229
|
-
className: t2,
|
|
230
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
231
|
-
className: t7,
|
|
232
|
-
children: [t25, t31]
|
|
233
|
-
})
|
|
234
|
-
});
|
|
235
|
-
$[48] = t25;
|
|
236
|
-
$[49] = t31;
|
|
237
|
-
$[50] = t7;
|
|
238
|
-
$[51] = t32;
|
|
239
|
-
} else t32 = $[51];
|
|
240
|
-
return t32;
|
|
107
|
+
})
|
|
108
|
+
});
|
|
241
109
|
};
|
|
242
|
-
function _temp($) {
|
|
243
|
-
return $.ui.fileUpload.or;
|
|
244
|
-
}
|
|
245
|
-
function _temp2($_0) {
|
|
246
|
-
return $_0.ui.fileUpload.removeFile;
|
|
247
|
-
}
|
|
248
|
-
function _temp3($_1) {
|
|
249
|
-
return $_1.ui.fileUpload.removeFile;
|
|
250
|
-
}
|
|
251
110
|
//#endregion
|
|
252
111
|
export { FileUploadContentError };
|