@povio/ui 3.4.0-rc.4 → 3.4.0-rc.6
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/components/Breadcrumbs/Breadcrumbs.js +13 -4
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuDesktop.js +1 -1
- package/dist/components/Menu/MenuItem.js +6 -3
- package/dist/components/Menu/MenuMobile.js +6 -3
- package/dist/components/Menu/MenuPopover.js +1 -1
- package/dist/components/buttons/IconButton/IconButton.js +1 -1
- package/dist/components/buttons/PillButton/PillButton.js +3 -3
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
- package/dist/components/buttons/TextButton/TextButton.js +1 -1
- package/dist/components/buttons/ToggleButton/ToggleButton.js +1 -1
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +1 -1
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +2 -3
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +2 -1
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +2 -1
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +2 -1
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +196 -191
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +13 -9
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +7 -11
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +2 -2
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +1 -1
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +1 -1
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +1 -1
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +1 -1
- package/dist/components/inputs/DateTime/shared/TimeField.js +1 -1
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +3 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +46 -44
- package/dist/components/inputs/DateTime/shared/YearPicker.js +1 -1
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +46 -1
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +1 -1
- package/dist/components/inputs/File/FileUpload.js +1 -1
- package/dist/components/inputs/File/FileUploadContainer.js +1 -1
- package/dist/components/inputs/File/InputUpload.js +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +1 -1
- package/dist/components/inputs/File/shared/FileCardList.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContent.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +5 -2
- package/dist/components/inputs/File/shared/FileUploadContentError.js +8 -5
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +8 -5
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +7 -4
- package/dist/components/inputs/File/shared/InputUploadContent.js +3 -3
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
- package/dist/components/inputs/FormField/FormField.js +1 -1
- package/dist/components/inputs/FormField/FormFieldError.js +1 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +4 -3
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +6 -3
- package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +89 -87
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +264 -253
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +5 -4
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +3 -4
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +99 -98
- package/dist/components/inputs/Input/TextInput/TextInput.js +92 -90
- package/dist/components/inputs/Input/shared/InputContent.d.ts +2 -1
- package/dist/components/inputs/Input/shared/InputContent.js +49 -47
- package/dist/components/inputs/Inputs/Form.js +1 -1
- package/dist/components/inputs/Inputs/InputItem.js +1 -1
- package/dist/components/inputs/Inputs/Inputs.js +1 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/SelectBase.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +55 -53
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +56 -54
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +7 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +6 -3
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +2 -2
- package/dist/components/inputs/Slider/Slider.js +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -3
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +6 -9
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +5 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +9 -6
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +6 -9
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +1 -1
- package/dist/components/inputs/Toggle/Toggle.js +1 -1
- package/dist/components/inputs/shared/CheckContent.js +1 -1
- package/dist/components/inputs/shared/InputClear.js +7 -4
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
- package/dist/components/inputs/shared/TooltipWrapper.js +1 -1
- package/dist/components/inputs/shared/form.binding.js +1 -1
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/inputs/shared/useStaticInputHandoff.js +64 -38
- package/dist/components/navigation/Accordion/AccordionItem.js +5 -2
- package/dist/components/navigation/Stepper/StepperItem.js +6 -3
- package/dist/components/navigation/Stepper/StepperSeparator.js +1 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.js +1 -1
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +6 -3
- package/dist/components/overlays/Drawer/Drawer.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +2 -2
- package/dist/components/overlays/Tooltip/Tooltip.js +14 -5
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
- package/dist/components/segment/Segment.js +1 -1
- package/dist/components/segment/SegmentItem.js +1 -1
- package/dist/components/shared/pagination/PaginationList.js +6 -9
- package/dist/components/status/Loader/Loader.js +1 -1
- package/dist/components/status/Toast/Toast.js +1 -1
- package/dist/components/status/Toast/useToast.js +1 -1
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/PaginatedTable.js +1 -1
- package/dist/components/table/Table.js +148 -40
- package/dist/components/text/Link/Link.js +1 -1
- package/dist/components/text/Pill/Pill.js +5 -2
- package/dist/components/text/Tag/Tag.js +5 -2
- package/dist/config/link.context.js +1 -1
- package/dist/config/router.context.js +1 -1
- package/dist/config/uiConfig.context.js +13 -6
- package/dist/config/uiOverrides.context.js +1 -1
- package/dist/hooks/useFilters.js +1 -1
- package/dist/hooks/useForm.js +1 -1
- package/dist/hooks/useIntersectionObserver.js +1 -1
- package/dist/hooks/useLocalStorage.js +1 -1
- package/dist/hooks/usePagination.js +1 -1
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.js +1 -1
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/index.js +1 -40
- package/dist/node_modules/.pnpm/react-icons-sprite@1.1.1_lucide-react@1.28.0_react@19.2.3__react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-icons-sprite/dist/icon.js +15 -0
- package/dist/react-icons-sprite-4cbd6962.svg +1 -0
- package/dist/rhf/Inputs.js +1 -1
- package/dist/rhf.d.ts +0 -39
- package/dist/tanstack.d.ts +0 -39
- package/dist/tanstack.js +1 -40
- package/package.json +2 -1
- package/dist/assets/icons/Account.d.ts +0 -2
- package/dist/assets/icons/AlignCenter.d.ts +0 -2
- package/dist/assets/icons/AlignCenter.js +0 -30
- package/dist/assets/icons/AlignLeft.d.ts +0 -2
- package/dist/assets/icons/AlignLeft.js +0 -30
- package/dist/assets/icons/AlignLeftRight.d.ts +0 -2
- package/dist/assets/icons/AlignLeftRight.js +0 -30
- package/dist/assets/icons/AlignRight.d.ts +0 -2
- package/dist/assets/icons/AlignRight.js +0 -30
- package/dist/assets/icons/ArrowDropDown.d.ts +0 -2
- package/dist/assets/icons/ArrowDropDown.js +0 -30
- package/dist/assets/icons/ArrowDropUp.d.ts +0 -2
- package/dist/assets/icons/ArrowDropUp.js +0 -30
- package/dist/assets/icons/ArrowLeft.d.ts +0 -2
- package/dist/assets/icons/ArrowLeft.js +0 -30
- package/dist/assets/icons/ArrowRight.d.ts +0 -2
- package/dist/assets/icons/ArrowRight.js +0 -30
- package/dist/assets/icons/Board.d.ts +0 -2
- package/dist/assets/icons/Bold.d.ts +0 -2
- package/dist/assets/icons/Bold.js +0 -30
- package/dist/assets/icons/BulletedList.d.ts +0 -2
- package/dist/assets/icons/BulletedList.js +0 -30
- package/dist/assets/icons/Calendar.d.ts +0 -2
- package/dist/assets/icons/Calendar.js +0 -32
- package/dist/assets/icons/Check.d.ts +0 -2
- package/dist/assets/icons/Check.js +0 -32
- package/dist/assets/icons/CheckCircle.d.ts +0 -2
- package/dist/assets/icons/CheckCircle.js +0 -30
- package/dist/assets/icons/CheckboxCheckmark.d.ts +0 -2
- package/dist/assets/icons/CheckboxCheckmark.js +0 -33
- package/dist/assets/icons/CheckboxIndeterminate.d.ts +0 -2
- package/dist/assets/icons/CheckboxIndeterminate.js +0 -33
- package/dist/assets/icons/ChevronDown.d.ts +0 -2
- package/dist/assets/icons/ChevronDown.js +0 -32
- package/dist/assets/icons/ChevronLeft.d.ts +0 -2
- package/dist/assets/icons/ChevronLeft.js +0 -32
- package/dist/assets/icons/ChevronRight.d.ts +0 -2
- package/dist/assets/icons/ChevronRight.js +0 -32
- package/dist/assets/icons/ChevronUp.d.ts +0 -2
- package/dist/assets/icons/ChevronUp.js +0 -32
- package/dist/assets/icons/ChevronsLeft.d.ts +0 -2
- package/dist/assets/icons/ChevronsLeft.js +0 -32
- package/dist/assets/icons/ChevronsRight.d.ts +0 -2
- package/dist/assets/icons/ChevronsRight.js +0 -32
- package/dist/assets/icons/Clock.d.ts +0 -2
- package/dist/assets/icons/Clock.js +0 -30
- package/dist/assets/icons/Close.d.ts +0 -2
- package/dist/assets/icons/Close.js +0 -30
- package/dist/assets/icons/DateTime.d.ts +0 -2
- package/dist/assets/icons/DateTime.js +0 -39
- package/dist/assets/icons/DragIndicator.d.ts +0 -2
- package/dist/assets/icons/DragIndicator.js +0 -30
- package/dist/assets/icons/Edit.d.ts +0 -2
- package/dist/assets/icons/Emoji.d.ts +0 -2
- package/dist/assets/icons/File.d.ts +0 -2
- package/dist/assets/icons/File.js +0 -32
- package/dist/assets/icons/Grid.d.ts +0 -2
- package/dist/assets/icons/Highlight.d.ts +0 -2
- package/dist/assets/icons/Highlight.js +0 -30
- package/dist/assets/icons/HighlightOn.d.ts +0 -6
- package/dist/assets/icons/HighlightOn.js +0 -55
- package/dist/assets/icons/Home.d.ts +0 -2
- package/dist/assets/icons/Home.js +0 -30
- package/dist/assets/icons/Image.d.ts +0 -2
- package/dist/assets/icons/ImageError.d.ts +0 -2
- package/dist/assets/icons/Info.d.ts +0 -2
- package/dist/assets/icons/Info.js +0 -41
- package/dist/assets/icons/Italic.d.ts +0 -2
- package/dist/assets/icons/Italic.js +0 -30
- package/dist/assets/icons/Link.d.ts +0 -2
- package/dist/assets/icons/Link.js +0 -30
- package/dist/assets/icons/Loader.d.ts +0 -2
- package/dist/assets/icons/MapPin.d.ts +0 -2
- package/dist/assets/icons/Menu.d.ts +0 -2
- package/dist/assets/icons/Menu.js +0 -30
- package/dist/assets/icons/Minus.d.ts +0 -2
- package/dist/assets/icons/MoreHoriz.d.ts +0 -2
- package/dist/assets/icons/NumberedList.d.ts +0 -2
- package/dist/assets/icons/NumberedList.js +0 -30
- package/dist/assets/icons/Pause.d.ts +0 -2
- package/dist/assets/icons/Plus.d.ts +0 -2
- package/dist/assets/icons/PointerHorizontal.d.ts +0 -2
- package/dist/assets/icons/PointerHorizontal.js +0 -30
- package/dist/assets/icons/PointerVertical.d.ts +0 -2
- package/dist/assets/icons/PointerVertical.js +0 -30
- package/dist/assets/icons/Retry.d.ts +0 -2
- package/dist/assets/icons/Search.d.ts +0 -2
- package/dist/assets/icons/Search.js +0 -30
- package/dist/assets/icons/Send.d.ts +0 -2
- package/dist/assets/icons/Send.js +0 -32
- package/dist/assets/icons/Share.d.ts +0 -2
- package/dist/assets/icons/Slash.d.ts +0 -2
- package/dist/assets/icons/Strikethrough.d.ts +0 -2
- package/dist/assets/icons/Strikethrough.js +0 -30
- package/dist/assets/icons/TextColor.d.ts +0 -6
- package/dist/assets/icons/TextColor.js +0 -52
- package/dist/assets/icons/Today.d.ts +0 -2
- package/dist/assets/icons/Today.js +0 -30
- package/dist/assets/icons/Trash.d.ts +0 -2
- package/dist/assets/icons/Underlined.d.ts +0 -2
- package/dist/assets/icons/Underlined.js +0 -32
- package/dist/assets/icons/Upload.d.ts +0 -2
- package/dist/assets/icons/Upload.js +0 -39
- package/dist/assets/icons/User.d.ts +0 -2
- package/dist/assets/icons/Visibility.d.ts +0 -2
- package/dist/assets/icons/Visibility.js +0 -30
- package/dist/assets/icons/VisibilityOff.d.ts +0 -2
- package/dist/assets/icons/VisibilityOff.js +0 -30
- package/dist/assets/icons/WarningFilled.d.ts +0 -2
- package/dist/assets/icons/WarningFilled.js +0 -32
- package/dist/assets/icons/WarningOutlined.d.ts +0 -2
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
|
|
2
|
-
import { ChevronLeftIcon } from "../../../../assets/icons/ChevronLeft.js";
|
|
3
|
-
import { ChevronRightIcon } from "../../../../assets/icons/ChevronRight.js";
|
|
4
|
-
import { ChevronsLeftIcon } from "../../../../assets/icons/ChevronsLeft.js";
|
|
5
|
-
import { ChevronsRightIcon } from "../../../../assets/icons/ChevronsRight.js";
|
|
6
1
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
7
2
|
import { PillButton } from "../../../buttons/PillButton/PillButton.js";
|
|
8
3
|
import "../../../../config/i18n.js";
|
|
9
4
|
import { Select } from "../../Selection/Select/Select.js";
|
|
10
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
6
|
import { useMemo } from "react";
|
|
7
|
+
import { ChevronDown, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from "lucide-react";
|
|
12
8
|
import { useTranslation } from "react-i18next";
|
|
13
9
|
import { useDateFormatter } from "@react-aria/i18n";
|
|
14
10
|
//#region src/components/inputs/DateTime/shared/CalendarSelectHeader.tsx
|
|
@@ -105,13 +101,13 @@ var CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled, is
|
|
|
105
101
|
color: "secondary",
|
|
106
102
|
isDisabled: isPrevYearDisabled,
|
|
107
103
|
onClick: handlePrevYear,
|
|
108
|
-
icon:
|
|
104
|
+
icon: ChevronsLeft,
|
|
109
105
|
label: t(($) => $.ui.datePicker.navigation.previousYear)
|
|
110
106
|
}), /* @__PURE__ */ jsx(InlineIconButton, {
|
|
111
107
|
color: "secondary",
|
|
112
108
|
isDisabled: isPrevMonthDisabled,
|
|
113
109
|
onClick: handlePrevMonth,
|
|
114
|
-
icon:
|
|
110
|
+
icon: ChevronLeft,
|
|
115
111
|
label: t(($_0) => $_0.ui.datePicker.navigation.previousMonth)
|
|
116
112
|
})]
|
|
117
113
|
}),
|
|
@@ -124,7 +120,7 @@ var CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled, is
|
|
|
124
120
|
color: "secondary",
|
|
125
121
|
variant: "subtle",
|
|
126
122
|
iconPosition: "right",
|
|
127
|
-
icon:
|
|
123
|
+
icon: ChevronDown,
|
|
128
124
|
children: MONTHS[currentMonth].slice(0, 3)
|
|
129
125
|
}),
|
|
130
126
|
ignoreTriggerWidth: true,
|
|
@@ -142,7 +138,7 @@ var CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled, is
|
|
|
142
138
|
color: "secondary",
|
|
143
139
|
variant: "subtle",
|
|
144
140
|
iconPosition: "right",
|
|
145
|
-
icon:
|
|
141
|
+
icon: ChevronDown,
|
|
146
142
|
children: currentYear.toString()
|
|
147
143
|
}),
|
|
148
144
|
items: availableYears.map(({ year: year_0, isDisabled: isDisabled_3 }) => ({
|
|
@@ -160,13 +156,13 @@ var CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled, is
|
|
|
160
156
|
color: "secondary",
|
|
161
157
|
isDisabled: isNextMonthDisabled,
|
|
162
158
|
onClick: handleNextMonth,
|
|
163
|
-
icon:
|
|
159
|
+
icon: ChevronRight,
|
|
164
160
|
label: t(($_1) => $_1.ui.datePicker.navigation.nextMonth)
|
|
165
161
|
}), /* @__PURE__ */ jsx(InlineIconButton, {
|
|
166
162
|
color: "secondary",
|
|
167
163
|
isDisabled: isNextYearDisabled,
|
|
168
164
|
onClick: handleNextYear,
|
|
169
|
-
icon:
|
|
165
|
+
icon: ChevronsRight,
|
|
170
166
|
label: t(($_2) => $_2.ui.datePicker.navigation.nextYear)
|
|
171
167
|
})]
|
|
172
168
|
})
|
|
@@ -23,6 +23,7 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
23
23
|
isDateTime?: boolean;
|
|
24
24
|
shouldShrinkInput?: boolean;
|
|
25
25
|
isClearable?: boolean;
|
|
26
|
+
isClearableIfDisabled?: boolean;
|
|
26
27
|
headerProps?: FormFieldHeaderProps;
|
|
27
28
|
todayIcon?: DatePickerTodayIcon;
|
|
28
29
|
todayIconButtonSize?: DatePickerTodayIconButtonSize;
|
|
@@ -41,5 +42,5 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
41
42
|
format?: string;
|
|
42
43
|
onClear?: () => void;
|
|
43
44
|
}
|
|
44
|
-
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, headerProps, todayIcon, todayIconButtonSize, todayIconButtonComponent, todayIconPlacement, isDirty, isRequired, disableManualEntry, autoFixYear, placeholder, className, onOpenDropdown, dateGranularity, timeZone: timeZoneProp, isTimeOptional, format, onClear: onClearProp, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, isClearableIfDisabled, headerProps, todayIcon, todayIconButtonSize, todayIconButtonComponent, todayIconPlacement, isDirty, isRequired, disableManualEntry, autoFixYear, placeholder, className, onOpenDropdown, dateGranularity, timeZone: timeZoneProp, isTimeOptional, format, onClear: onClearProp, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
46
|
export {};
|
|
@@ -17,7 +17,7 @@ import { Button } from "react-aria-components";
|
|
|
17
17
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
18
18
|
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
19
19
|
//#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
|
|
20
|
-
var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, headerProps, todayIcon, todayIconButtonSize = "none", todayIconButtonComponent, todayIconPlacement = "content", isDirty, isRequired, disableManualEntry, autoFixYear = false, placeholder, className, onOpenDropdown, dateGranularity = "day", timeZone: timeZoneProp, isTimeOptional = false, format, onClear: onClearProp, ...props }) => {
|
|
20
|
+
var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, isClearableIfDisabled, headerProps, todayIcon, todayIconButtonSize = "none", todayIconButtonComponent, todayIconPlacement = "content", isDirty, isRequired, disableManualEntry, autoFixYear = false, placeholder, className, onOpenDropdown, dateGranularity = "day", timeZone: timeZoneProp, isTimeOptional = false, format, onClear: onClearProp, ...props }) => {
|
|
21
21
|
const uiConfig = UIConfig.useConfig();
|
|
22
22
|
const timeZone = timeZoneProp ?? uiConfig.dateInput.timeZone;
|
|
23
23
|
let effectiveTimeZone = getLocalTimeZone();
|
|
@@ -71,7 +71,7 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
|
|
|
71
71
|
const onClearChange = useCallback((canClearInput) => {
|
|
72
72
|
setCanClear(canClearInput);
|
|
73
73
|
}, []);
|
|
74
|
-
const showClear = canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null;
|
|
74
|
+
const showClear = (!isDisabled || isClearableIfDisabled === true) && (canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null);
|
|
75
75
|
const isTodayIconDisabled = isDisabled || buttonProps.isDisabled;
|
|
76
76
|
const onToday = () => {
|
|
77
77
|
if (isTodayIconDisabled) return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c } from "react/compiler-runtime";
|
|
2
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { clsx } from "clsx";
|
|
4
3
|
import { useRef } from "react";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { useDateSegment } from "react-aria";
|
|
6
6
|
//#region src/components/inputs/DateTime/shared/DateSegmentItem.tsx
|
|
7
7
|
var getPlaceholder = (segment) => {
|
|
@@ -2,10 +2,10 @@ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { BottomSheet } from "../../../overlays/BottomSheet/BottomSheet.js";
|
|
3
3
|
import { useBreakpoint } from "../../../../hooks/useBreakpoint.js";
|
|
4
4
|
import { popoverDefinition } from "../../../shared/popover.cva.js";
|
|
5
|
-
import { c } from "react/compiler-runtime";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import clsx$1 from "clsx";
|
|
8
7
|
import { Dialog, Popover } from "react-aria-components";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
9
9
|
//#region src/components/inputs/DateTime/shared/DateTimeDialog.tsx
|
|
10
10
|
var DateTimeDialog = (t0) => {
|
|
11
11
|
const $ = c(26);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
4
|
import { useRef } from "react";
|
|
6
5
|
import { ListBox, ListBoxItem } from "react-aria-components";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { useDateFormatter } from "@react-aria/i18n";
|
|
8
8
|
//#region src/components/inputs/DateTime/shared/MonthPicker.tsx
|
|
9
9
|
var MonthPicker = (t0) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CalendarGrid } from "./CalendarGrid.js";
|
|
2
2
|
import { CalendarSelectHeader } from "./CalendarSelectHeader.js";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { useRef } from "react";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { useRangeCalendar } from "@react-aria/calendar";
|
|
8
8
|
//#region src/components/inputs/DateTime/shared/RangeCalendar.tsx
|
|
9
9
|
var RangeCalendar = (t0) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DateSegmentItem } from "./DateSegmentItem.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
4
|
//#region src/components/inputs/DateTime/shared/TimeField.tsx
|
|
5
5
|
var TimeField = (t0) => {
|
|
6
6
|
const $ = c(8);
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { ChevronDownIcon } from "../../../../assets/icons/ChevronDown.js";
|
|
2
|
-
import { ChevronUpIcon } from "../../../../assets/icons/ChevronUp.js";
|
|
3
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
4
2
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
3
|
import { useBreakpoint } from "../../../../hooks/useBreakpoint.js";
|
|
6
4
|
import { getPlaceholder } from "./DateSegmentItem.js";
|
|
7
5
|
import { useLongPressRepeat } from "../../../../hooks/useLongPressRepeat.js";
|
|
8
|
-
import { c } from "react/compiler-runtime";
|
|
9
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
7
|
import { clsx } from "clsx";
|
|
11
8
|
import { useEffect, useRef } from "react";
|
|
9
|
+
import { c } from "react/compiler-runtime";
|
|
12
10
|
import { useDateSegment, useLocale, useTimeField } from "react-aria";
|
|
11
|
+
import { ChevronDown, ChevronUp } from "lucide-react";
|
|
13
12
|
import { Time } from "@internationalized/date";
|
|
14
13
|
import { useTimeFieldState } from "@react-stately/datepicker";
|
|
15
14
|
//#region src/components/inputs/DateTime/shared/TimePickerForm.tsx
|
|
@@ -289,7 +288,7 @@ var TimeSegmentButton = (t0) => {
|
|
|
289
288
|
} else t6 = $[10];
|
|
290
289
|
return t6;
|
|
291
290
|
}
|
|
292
|
-
const Icon = type === "increment" ?
|
|
291
|
+
const Icon = type === "increment" ? ChevronUp : ChevronDown;
|
|
293
292
|
let t6;
|
|
294
293
|
if ($[11] !== Icon || $[12] !== onPressEnd || $[13] !== onPressStart) {
|
|
295
294
|
t6 = /* @__PURE__ */ jsx("div", {
|
|
@@ -14,11 +14,12 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
14
14
|
disableDropdown?: boolean;
|
|
15
15
|
headerProps?: FormFieldHeaderProps;
|
|
16
16
|
isClearable?: boolean;
|
|
17
|
+
isClearableIfDisabled?: boolean;
|
|
17
18
|
disableManualEntry?: boolean;
|
|
18
19
|
placeholder?: string;
|
|
19
20
|
className?: string;
|
|
20
21
|
onPress: () => void;
|
|
21
22
|
onClear?: () => void;
|
|
22
23
|
}
|
|
23
|
-
export declare const TimePickerInput: ({ ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, onClear, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const TimePickerInput: ({ ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, isClearableIfDisabled, headerProps, disableManualEntry, placeholder, className, onPress, onClear, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
export {};
|
|
@@ -7,17 +7,17 @@ import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva
|
|
|
7
7
|
import { useFirefoxDateSegmentSelectionGuard } from "./useFirefoxDateSegmentSelectionGuard.js";
|
|
8
8
|
import { InputClear } from "../../shared/InputClear.js";
|
|
9
9
|
import { TimeField } from "./TimeField.js";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import { clsx } from "clsx";
|
|
13
12
|
import { useRef, useState } from "react";
|
|
14
13
|
import { Button } from "react-aria-components";
|
|
14
|
+
import { c } from "react/compiler-runtime";
|
|
15
15
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
16
16
|
import { mergeRefs } from "@react-aria/utils";
|
|
17
17
|
//#region src/components/inputs/DateTime/shared/TimePickerInput.tsx
|
|
18
18
|
var TimePickerInput = (t0) => {
|
|
19
|
-
const $ = c(
|
|
20
|
-
const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, onClear, ...props } = t0;
|
|
19
|
+
const $ = c(69);
|
|
20
|
+
const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, isClearableIfDisabled, headerProps, disableManualEntry, placeholder, className, onPress, onClear, ...props } = t0;
|
|
21
21
|
const uiConfig = UIConfig.useConfig();
|
|
22
22
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
23
23
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
@@ -147,22 +147,24 @@ var TimePickerInput = (t0) => {
|
|
|
147
147
|
$[32] = t22;
|
|
148
148
|
} else t22 = $[32];
|
|
149
149
|
let t23;
|
|
150
|
-
if ($[33] !== canClear || $[34] !== isClearable || $[35] !==
|
|
150
|
+
if ($[33] !== canClear || $[34] !== isClearable || $[35] !== isClearableIfDisabled || $[36] !== isDisabled || $[37] !== onClear || $[38] !== state) {
|
|
151
151
|
t23 = isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
152
152
|
onClear: () => {
|
|
153
153
|
if (onClear) onClear();
|
|
154
154
|
else state.setValue(null);
|
|
155
155
|
},
|
|
156
|
-
show: canClear
|
|
156
|
+
show: canClear && (!isDisabled || isClearableIfDisabled === true)
|
|
157
157
|
});
|
|
158
158
|
$[33] = canClear;
|
|
159
159
|
$[34] = isClearable;
|
|
160
|
-
$[35] =
|
|
161
|
-
$[36] =
|
|
162
|
-
$[37] =
|
|
163
|
-
|
|
160
|
+
$[35] = isClearableIfDisabled;
|
|
161
|
+
$[36] = isDisabled;
|
|
162
|
+
$[37] = onClear;
|
|
163
|
+
$[38] = state;
|
|
164
|
+
$[39] = t23;
|
|
165
|
+
} else t23 = $[39];
|
|
164
166
|
let t24;
|
|
165
|
-
if ($[
|
|
167
|
+
if ($[40] !== disableDropdown || $[41] !== disableManualEntry || $[42] !== isDisabled || $[43] !== onPress || $[44] !== uiConfig) {
|
|
166
168
|
t24 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
167
169
|
label: "",
|
|
168
170
|
color: "secondary",
|
|
@@ -172,26 +174,26 @@ var TimePickerInput = (t0) => {
|
|
|
172
174
|
className: "border-0!",
|
|
173
175
|
"data-static-press-action": ""
|
|
174
176
|
});
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
} else t24 = $[
|
|
177
|
+
$[40] = disableDropdown;
|
|
178
|
+
$[41] = disableManualEntry;
|
|
179
|
+
$[42] = isDisabled;
|
|
180
|
+
$[43] = onPress;
|
|
181
|
+
$[44] = uiConfig;
|
|
182
|
+
$[45] = t24;
|
|
183
|
+
} else t24 = $[45];
|
|
182
184
|
let t25;
|
|
183
|
-
if ($[
|
|
185
|
+
if ($[46] !== t22 || $[47] !== t23 || $[48] !== t24) {
|
|
184
186
|
t25 = /* @__PURE__ */ jsxs("div", {
|
|
185
187
|
className: t22,
|
|
186
188
|
children: [t23, t24]
|
|
187
189
|
});
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
} else t25 = $[
|
|
190
|
+
$[46] = t22;
|
|
191
|
+
$[47] = t23;
|
|
192
|
+
$[48] = t24;
|
|
193
|
+
$[49] = t25;
|
|
194
|
+
} else t25 = $[49];
|
|
193
195
|
let t26;
|
|
194
|
-
if ($[
|
|
196
|
+
if ($[50] !== fieldProps || $[51] !== focusWithinProps || $[52] !== hoverProps || $[53] !== t10 || $[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== t14 || $[58] !== t15 || $[59] !== t16 || $[60] !== t21 || $[61] !== t25 || $[62] !== t4 || $[63] !== t5 || $[64] !== t6 || $[65] !== t7 || $[66] !== t8 || $[67] !== t9) {
|
|
195
197
|
t26 = /* @__PURE__ */ jsxs("div", {
|
|
196
198
|
ref: t4,
|
|
197
199
|
className: t5,
|
|
@@ -213,26 +215,26 @@ var TimePickerInput = (t0) => {
|
|
|
213
215
|
...hoverProps,
|
|
214
216
|
children: [t21, t25]
|
|
215
217
|
});
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
} else t26 = $[
|
|
218
|
+
$[50] = fieldProps;
|
|
219
|
+
$[51] = focusWithinProps;
|
|
220
|
+
$[52] = hoverProps;
|
|
221
|
+
$[53] = t10;
|
|
222
|
+
$[54] = t11;
|
|
223
|
+
$[55] = t12;
|
|
224
|
+
$[56] = t13;
|
|
225
|
+
$[57] = t14;
|
|
226
|
+
$[58] = t15;
|
|
227
|
+
$[59] = t16;
|
|
228
|
+
$[60] = t21;
|
|
229
|
+
$[61] = t25;
|
|
230
|
+
$[62] = t4;
|
|
231
|
+
$[63] = t5;
|
|
232
|
+
$[64] = t6;
|
|
233
|
+
$[65] = t7;
|
|
234
|
+
$[66] = t8;
|
|
235
|
+
$[67] = t9;
|
|
236
|
+
$[68] = t26;
|
|
237
|
+
} else t26 = $[68];
|
|
236
238
|
return t26;
|
|
237
239
|
};
|
|
238
240
|
function _temp(segment) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
2
|
import { useScrollableListBox } from "../../../../hooks/useScrollableListBox.js";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { useRef } from "react";
|
|
7
6
|
import { ListBox, ListBoxItem } from "react-aria-components";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { today } from "@internationalized/date";
|
|
9
9
|
import { useDateFormatter } from "@react-aria/i18n";
|
|
10
10
|
//#region src/components/inputs/DateTime/shared/YearPicker.tsx
|
|
@@ -1,8 +1,53 @@
|
|
|
1
1
|
import { IconButton } from "../../../buttons/IconButton/IconButton.js";
|
|
2
2
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
3
|
-
import { TodayIcon } from "../../../../assets/icons/Today.js";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
5
|
//#region src/components/inputs/DateTime/shared/datePickerTodayIcon.tsx
|
|
6
|
+
var TodayIcon = (t0) => {
|
|
7
|
+
const $ = c(9);
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
if ($[0] !== t0) {
|
|
11
|
+
({className, ...props} = t0);
|
|
12
|
+
$[0] = t0;
|
|
13
|
+
$[1] = className;
|
|
14
|
+
$[2] = props;
|
|
15
|
+
} else {
|
|
16
|
+
className = $[1];
|
|
17
|
+
props = $[2];
|
|
18
|
+
}
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[3] !== className) {
|
|
21
|
+
t1 = ["size-4! fill-current", className].filter(Boolean);
|
|
22
|
+
$[3] = className;
|
|
23
|
+
$[4] = t1;
|
|
24
|
+
} else t1 = $[4];
|
|
25
|
+
const t2 = t1.join(" ");
|
|
26
|
+
let t3;
|
|
27
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28
|
+
t3 = /* @__PURE__ */ jsx("path", {
|
|
29
|
+
fill: "currentColor",
|
|
30
|
+
d: "M9.184 9.672v-.945h5.628v.945h-2.27V16H11.45V9.672z",
|
|
31
|
+
transform: "translate(12 12) scale(1.65) translate(-12 -12)"
|
|
32
|
+
});
|
|
33
|
+
$[5] = t3;
|
|
34
|
+
} else t3 = $[5];
|
|
35
|
+
let t4;
|
|
36
|
+
if ($[6] !== props || $[7] !== t2) {
|
|
37
|
+
t4 = /* @__PURE__ */ jsx("svg", {
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
fill: "none",
|
|
40
|
+
viewBox: "0 0 24 24",
|
|
41
|
+
...props,
|
|
42
|
+
className: t2,
|
|
43
|
+
children: t3
|
|
44
|
+
});
|
|
45
|
+
$[6] = props;
|
|
46
|
+
$[7] = t2;
|
|
47
|
+
$[8] = t4;
|
|
48
|
+
} else t4 = $[8];
|
|
49
|
+
return t4;
|
|
50
|
+
};
|
|
6
51
|
var getDatePickerTodayIcon = (todayIcon) => {
|
|
7
52
|
if (!todayIcon) return null;
|
|
8
53
|
return todayIcon === true ? TodayIcon : todayIcon;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c } from "react/compiler-runtime";
|
|
2
1
|
import { useLayoutEffect } from "react";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { isFirefox } from "@react-aria/utils";
|
|
4
4
|
//#region src/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.ts
|
|
5
5
|
var isEditableElement = (element) => element instanceof HTMLElement && (element.matches("input, textarea") || element.isContentEditable);
|
|
@@ -8,11 +8,11 @@ import { FileCardList } from "./shared/FileCardList.js";
|
|
|
8
8
|
import { FileUploadContentEmpty } from "./shared/FileUploadContentEmpty.js";
|
|
9
9
|
import { FileUploadContent } from "./shared/FileUploadContent.js";
|
|
10
10
|
import { fileUploadDropZoneDefinition } from "./shared/fileUpload.cva.js";
|
|
11
|
-
import { c } from "react/compiler-runtime";
|
|
12
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
12
|
import { clsx } from "clsx";
|
|
14
13
|
import { useCallback, useState } from "react";
|
|
15
14
|
import { DropZone } from "react-aria-components";
|
|
15
|
+
import { c } from "react/compiler-runtime";
|
|
16
16
|
import { mergeRefs, useLabels } from "@react-aria/utils";
|
|
17
17
|
import { useTranslation } from "react-i18next";
|
|
18
18
|
//#region src/components/inputs/File/FileUpload.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileUpload } from "./FileUpload.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
4
|
//#region src/components/inputs/File/FileUploadContainer.tsx
|
|
5
5
|
var FileUploadContainer = (props) => {
|
|
6
6
|
const $ = c(2);
|
|
@@ -4,10 +4,10 @@ import { FormField } from "../FormField/FormField.js";
|
|
|
4
4
|
import { FileUtils } from "../../../utils/file.utils.js";
|
|
5
5
|
import { InputUploadContent } from "./shared/InputUploadContent.js";
|
|
6
6
|
import { InputUploadFilled } from "./shared/InputUploadFilled.js";
|
|
7
|
-
import { c } from "react/compiler-runtime";
|
|
8
7
|
import { jsx } from "react/jsx-runtime";
|
|
9
8
|
import { clsx } from "clsx";
|
|
10
9
|
import { useState } from "react";
|
|
10
|
+
import { c } from "react/compiler-runtime";
|
|
11
11
|
import { mergeRefs, useLabels } from "@react-aria/utils";
|
|
12
12
|
//#region src/components/inputs/File/InputUpload.tsx
|
|
13
13
|
var InputUploadBase = ({ ref: _ref, label, tooltipText, variant, helperText, isRequired, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, onChange, onInvalidFileType, value, defaultValue, allowsMultiple = false, hideLabel, acceptedFileTypes, size, ...rest }) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
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 { c } from "react/compiler-runtime";
|
|
7
7
|
//#region src/components/inputs/File/shared/FileCard.tsx
|
|
8
8
|
var FileCard = (t0) => {
|
|
9
9
|
const $ = c(31);
|
|
@@ -1,7 +1,7 @@
|
|
|
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";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
5
|
//#region src/components/inputs/File/shared/FileCardList.tsx
|
|
6
6
|
var FileCardList = (t0) => {
|
|
7
7
|
const $ = c(20);
|
|
@@ -2,9 +2,9 @@ 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";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
8
8
|
//#region src/components/inputs/File/shared/FileUploadContent.tsx
|
|
9
9
|
var FileUploadContent = (t0) => {
|
|
10
10
|
const $ = c(63);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { ReactIconsSpriteIcon } from "../../../../node_modules/.pnpm/react-icons-sprite@1.1.1_lucide-react@1.28.0_react@19.2.3__react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-icons-sprite/dist/icon.js";
|
|
1
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
3
|
import { Button } from "../../../buttons/Button/Button.js";
|
|
3
4
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
4
|
-
import { UploadIcon } from "../../../../assets/icons/Upload.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
7
|
//#region src/components/inputs/File/shared/FileUploadContentEmpty.tsx
|
|
@@ -18,7 +18,10 @@ var FileUploadContentEmpty = ({ variant, as, isDisabled, title, browseText, uplo
|
|
|
18
18
|
"flex-row": variant === "horizontal",
|
|
19
19
|
"opacity-50": isDisabled
|
|
20
20
|
}),
|
|
21
|
-
children: [/* @__PURE__ */ jsx(
|
|
21
|
+
children: [/* @__PURE__ */ jsx(ReactIconsSpriteIcon, {
|
|
22
|
+
iconId: "ri-lucide-react-Upload",
|
|
23
|
+
className: "h-6 w-6 text-text-default-1"
|
|
24
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
22
25
|
variant: "prominent-1",
|
|
23
26
|
size: "label-1",
|
|
24
27
|
as: "span",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactIconsSpriteIcon } from "../../../../node_modules/.pnpm/react-icons-sprite@1.1.1_lucide-react@1.28.0_react@19.2.3__react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-icons-sprite/dist/icon.js";
|
|
2
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
3
|
import { Button as Button$1 } from "../../../buttons/Button/Button.js";
|
|
4
4
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
5
|
import "../../../../config/i18n.js";
|
|
6
6
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
7
|
-
import { WarningFilledIcon } from "../../../../assets/icons/WarningFilled.js";
|
|
8
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { clsx } from "clsx";
|
|
10
9
|
import { FileTrigger } from "react-aria-components";
|
|
10
|
+
import { X } from "lucide-react";
|
|
11
11
|
import { useTranslation } from "react-i18next";
|
|
12
12
|
//#region src/components/inputs/File/shared/FileUploadContentError.tsx
|
|
13
13
|
var FileUploadContentError = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove, browseButtonProps }) => {
|
|
@@ -28,7 +28,10 @@ var FileUploadContentError = ({ variant, as, isDisabled, state, browseText, file
|
|
|
28
28
|
"flex-row": variant === "horizontal",
|
|
29
29
|
"opacity-50": isDisabled
|
|
30
30
|
}),
|
|
31
|
-
children: [/* @__PURE__ */ jsx(
|
|
31
|
+
children: [/* @__PURE__ */ jsx(ReactIconsSpriteIcon, {
|
|
32
|
+
iconId: "ri-lucide-react-CircleAlert",
|
|
33
|
+
className: "h-6 w-6 text-elevation-fill-warning-1"
|
|
34
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
32
35
|
className: clsx("flex flex-col gap-file-upload-content-gap-text-to-text", {
|
|
33
36
|
"max-w-full items-center": variant === "vertical",
|
|
34
37
|
"max-w-[calc(100%_-_32px)]": variant === "horizontal"
|
|
@@ -71,7 +74,7 @@ var FileUploadContentError = ({ variant, as, isDisabled, state, browseText, file
|
|
|
71
74
|
onPress: () => {
|
|
72
75
|
onRemove(state.id ?? "");
|
|
73
76
|
},
|
|
74
|
-
icon:
|
|
77
|
+
icon: X
|
|
75
78
|
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
76
79
|
className: "text-interactive-text-primary-idle lowercase",
|
|
77
80
|
onPress: () => {
|
|
@@ -96,7 +99,7 @@ var FileUploadContentError = ({ variant, as, isDisabled, state, browseText, file
|
|
|
96
99
|
onPress: () => {
|
|
97
100
|
onRemove(state.id ?? "");
|
|
98
101
|
},
|
|
99
|
-
icon:
|
|
102
|
+
icon: X
|
|
100
103
|
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
101
104
|
color: "secondary",
|
|
102
105
|
onPress: () => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactIconsSpriteIcon } from "../../../../node_modules/.pnpm/react-icons-sprite@1.1.1_lucide-react@1.28.0_react@19.2.3__react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-icons-sprite/dist/icon.js";
|
|
2
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
3
|
import { Button as Button$1 } from "../../../buttons/Button/Button.js";
|
|
4
4
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
5
|
import "../../../../config/i18n.js";
|
|
6
6
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
7
7
|
import { FileUtils } from "../../../../utils/file.utils.js";
|
|
8
|
-
import { CheckCircleIcon } from "../../../../assets/icons/CheckCircle.js";
|
|
9
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { clsx } from "clsx";
|
|
11
10
|
import { FileTrigger } from "react-aria-components";
|
|
11
|
+
import { X } from "lucide-react";
|
|
12
12
|
import { useTranslation } from "react-i18next";
|
|
13
13
|
//#region src/components/inputs/File/shared/FileUploadContentFilled.tsx
|
|
14
14
|
var FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove, browseButtonProps }) => {
|
|
@@ -29,7 +29,10 @@ var FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, fil
|
|
|
29
29
|
"flex-row": variant === "horizontal",
|
|
30
30
|
"opacity-50": isDisabled
|
|
31
31
|
}),
|
|
32
|
-
children: [/* @__PURE__ */ jsx(
|
|
32
|
+
children: [/* @__PURE__ */ jsx(ReactIconsSpriteIcon, {
|
|
33
|
+
iconId: "ri-lucide-react-CheckCircle",
|
|
34
|
+
className: "h-6 w-6 text-text-default-1"
|
|
35
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
33
36
|
className: clsx("flex flex-col gap-file-upload-content-gap-text-to-text", {
|
|
34
37
|
"max-w-full items-center": variant === "vertical",
|
|
35
38
|
"max-w-[calc(100%-32px)]": variant === "horizontal"
|
|
@@ -73,7 +76,7 @@ var FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, fil
|
|
|
73
76
|
onPress: () => {
|
|
74
77
|
onRemove(state.id ?? "");
|
|
75
78
|
},
|
|
76
|
-
icon:
|
|
79
|
+
icon: X
|
|
77
80
|
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
78
81
|
className: clsx(variant === "vertical" && "text-interactive-text-primary-idle lowercase [&>span>span]:font-medium!"),
|
|
79
82
|
color: variant === "horizontal" ? "secondary" : "primary",
|
|
@@ -99,7 +102,7 @@ var FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, fil
|
|
|
99
102
|
onPress: () => {
|
|
100
103
|
onRemove(state.id ?? "");
|
|
101
104
|
},
|
|
102
|
-
icon:
|
|
105
|
+
icon: X,
|
|
103
106
|
isDisabled
|
|
104
107
|
}) : /* @__PURE__ */ jsx(TextButton, {
|
|
105
108
|
color: "secondary",
|