@povio/ui 3.3.0 → 3.4.0-rc.10
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/locales/en/translation.json.d.ts +158 -0
- package/dist/assets/locales/sl/translation.json.d.ts +154 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -7
- package/dist/components/Menu/MenuDesktop.js +1 -1
- package/dist/components/Menu/MenuItem.js +4 -4
- package/dist/components/Menu/MenuMobile.js +5 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/PillButton/PillButton.js +4 -4
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
- package/dist/components/buttons/shared/ButtonContent.js +2 -2
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -2
- package/dist/components/inputs/Checkbox/Checkbox.js +95 -102
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +2 -3
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +111 -115
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +17 -22
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +17 -23
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -25
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +225 -238
- package/dist/components/inputs/DateTime/shared/Calendar.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +7 -10
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +8 -12
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +4 -4
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +8 -16
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +3 -3
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +2 -2
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +1 -1
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +4 -5
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +10 -11
- package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
- 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.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +20 -20
- package/dist/components/inputs/File/InputUpload.d.ts +1 -1
- package/dist/components/inputs/File/InputUpload.js +19 -19
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/inputUpload.types.d.ts +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 +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentError.js +5 -6
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +5 -6
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +4 -5
- package/dist/components/inputs/File/shared/InputUploadContent.js +4 -4
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
- package/dist/components/inputs/FormField/FormFieldError.js +1 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +4 -4
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +3 -3
- package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +2 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +109 -107
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +265 -254
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +25 -24
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +3 -4
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +2 -1
- package/dist/components/inputs/Input/TextArea/TextArea.js +118 -117
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/Input/TextInput/TextInput.js +129 -129
- package/dist/components/inputs/Input/shared/InputContent.d.ts +2 -1
- package/dist/components/inputs/Input/shared/InputContent.js +50 -48
- package/dist/components/inputs/Inputs/Form.d.ts +4 -4
- package/dist/components/inputs/Inputs/Form.js +1 -1
- package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
- package/dist/components/inputs/Inputs/InputItem.js +36 -37
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.js +109 -113
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +16 -16
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +20 -20
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +20 -20
- package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +23 -23
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +34 -37
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +58 -56
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +57 -56
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +2 -2
- 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 +5 -4
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +3 -3
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/select.context.js +5 -9
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +10 -7
- package/dist/components/inputs/Slider/Slider.d.ts +1 -1
- package/dist/components/inputs/Slider/Slider.js +20 -20
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +20 -20
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +2 -2
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +5 -8
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +6 -9
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
- package/dist/components/inputs/Toggle/Toggle.js +61 -65
- package/dist/components/inputs/shared/CheckContent.js +1 -1
- package/dist/components/inputs/shared/InputClear.js +45 -28
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
- package/dist/components/inputs/shared/form.binding.d.ts +27 -0
- package/dist/components/inputs/shared/form.binding.js +57 -0
- package/dist/components/inputs/shared/form.types.d.ts +9 -8
- package/dist/components/inputs/shared/form.types.js +8 -0
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/inputs/shared/useStaticInputHandoff.js +64 -38
- package/dist/components/navigation/Accordion/Accordion.js +1 -1
- package/dist/components/navigation/Accordion/AccordionItem.js +3 -3
- package/dist/components/navigation/Stepper/Stepper.js +2 -2
- package/dist/components/navigation/Stepper/StepperItem.js +4 -4
- package/dist/components/overlays/ActionModal/ActionModal.js +1 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.js +3 -3
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -4
- package/dist/components/overlays/Drawer/Drawer.js +2 -2
- package/dist/components/overlays/Modal/Modal.js +3 -3
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +15 -8
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
- package/dist/components/segment/Segment.d.ts +1 -1
- package/dist/components/segment/Segment.js +21 -21
- package/dist/components/segment/SegmentItem.js +1 -1
- package/dist/components/segment/segment.types.d.ts +1 -1
- package/dist/components/shared/pagination/Pagination.js +1 -1
- package/dist/components/shared/pagination/PaginationList.js +6 -9
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/InfiniteTable.js +1 -1
- package/dist/components/table/Table.js +6 -8
- package/dist/components/text/Link/Link.js +1 -1
- package/dist/components/text/Pill/Pill.js +3 -3
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +1 -1
- package/dist/config/router.context.js +1 -1
- package/dist/config/theme.context.js +1 -1
- package/dist/config/uiConfig.context.d.ts +14 -5
- package/dist/config/uiConfig.context.js +9 -11
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +1 -1
- package/dist/helpers/dynamicInputs.d.ts +7 -7
- package/dist/hooks/useAutosave.d.ts +4 -4
- package/dist/hooks/useAutosave.js +64 -49
- package/dist/hooks/useFilters.js +1 -1
- package/dist/hooks/useForm.d.ts +39 -15
- package/dist/hooks/useForm.js +96 -43
- package/dist/hooks/useFormAutosave.d.ts +8 -9
- package/dist/hooks/useFormAutosave.js +23 -9
- 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.d.ts +1 -263
- package/dist/index.js +11 -71
- package/dist/rhf/Inputs.d.ts +60 -0
- package/dist/rhf/Inputs.js +148 -0
- package/dist/rhf/components.d.ts +80 -0
- package/dist/rhf/components.js +101 -0
- package/dist/rhf/dynamicInputs.d.ts +18 -0
- package/dist/rhf/dynamicInputs.js +5 -0
- package/dist/rhf/fieldAdapter.d.ts +7 -0
- package/dist/rhf/fieldAdapter.js +40 -0
- package/dist/rhf/form.types.d.ts +12 -0
- package/dist/rhf/useAutosave.d.ts +10 -0
- package/dist/rhf/useAutosave.js +71 -0
- package/dist/rhf/useForm.d.ts +18 -0
- package/dist/rhf/useForm.js +48 -0
- package/dist/rhf/useFormAutosave.d.ts +15 -0
- package/dist/rhf/useFormAutosave.js +59 -0
- package/dist/rhf.d.ts +225 -0
- package/dist/tanstack.d.ts +224 -0
- package/dist/tanstack.js +141 -0
- package/package.json +15 -3
- 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
- /package/dist/{hooks/useAutosave.spec.d.ts → rhf/entrypoints.type-test.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
2
|
import { CalendarCell } from "./CalendarCell.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
6
6
|
//#region src/components/inputs/DateTime/shared/CalendarGrid.tsx
|
|
7
7
|
var WEEK_INDICES = [
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
|
|
2
|
-
import { ArrowDropUpIcon } from "../../../../assets/icons/ArrowDropUp.js";
|
|
3
|
-
import { ChevronLeftIcon } from "../../../../assets/icons/ChevronLeft.js";
|
|
4
|
-
import { ChevronRightIcon } from "../../../../assets/icons/ChevronRight.js";
|
|
5
1
|
import { PillButton } from "../../../buttons/PillButton/PillButton.js";
|
|
6
|
-
import {
|
|
2
|
+
import { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from "lucide-react";
|
|
7
3
|
import { clsx } from "clsx";
|
|
8
4
|
import { Button, ToggleButtonGroup } from "react-aria-components";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
6
|
import { CalendarDateTime, Time } from "@internationalized/date";
|
|
10
7
|
import { useDateFormatter } from "@react-aria/i18n";
|
|
11
8
|
//#region src/components/inputs/DateTime/shared/CalendarHeader.tsx
|
|
@@ -43,7 +40,7 @@ var CalendarHeader = ({ calendarState, datePickerState, prevButtonProps, nextBut
|
|
|
43
40
|
...prevButtonProps,
|
|
44
41
|
isDisabled: !!toggleState,
|
|
45
42
|
className: clsx("shrink-0 focus-visible:outline-interactive-contained-secondary-focus", !!toggleState && "opacity-0"),
|
|
46
|
-
children: /* @__PURE__ */ jsx(
|
|
43
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "size-6 text-interactive-text-secondary-idle" })
|
|
47
44
|
})
|
|
48
45
|
}),
|
|
49
46
|
/* @__PURE__ */ jsxs(ToggleButtonGroup, {
|
|
@@ -53,7 +50,7 @@ var CalendarHeader = ({ calendarState, datePickerState, prevButtonProps, nextBut
|
|
|
53
50
|
color: "secondary",
|
|
54
51
|
variant: "subtle",
|
|
55
52
|
iconPosition: "right",
|
|
56
|
-
icon: toggleState === "month" ?
|
|
53
|
+
icon: toggleState === "month" ? ChevronUp : ChevronDown,
|
|
57
54
|
toggle: true,
|
|
58
55
|
isSelected: toggleState === "month",
|
|
59
56
|
onChange: (isSelected) => {
|
|
@@ -73,7 +70,7 @@ var CalendarHeader = ({ calendarState, datePickerState, prevButtonProps, nextBut
|
|
|
73
70
|
color: "secondary",
|
|
74
71
|
variant: "subtle",
|
|
75
72
|
iconPosition: "right",
|
|
76
|
-
icon: toggleState === "year" ?
|
|
73
|
+
icon: toggleState === "year" ? ChevronUp : ChevronDown,
|
|
77
74
|
toggle: true,
|
|
78
75
|
isSelected: toggleState === "year",
|
|
79
76
|
onChange: (isSelected_0) => {
|
|
@@ -97,7 +94,7 @@ var CalendarHeader = ({ calendarState, datePickerState, prevButtonProps, nextBut
|
|
|
97
94
|
color: "secondary",
|
|
98
95
|
variant: "subtle",
|
|
99
96
|
iconPosition: "right",
|
|
100
|
-
icon: toggleState === "time" ?
|
|
97
|
+
icon: toggleState === "time" ? ChevronUp : ChevronDown,
|
|
101
98
|
toggle: true,
|
|
102
99
|
isSelected: toggleState === "time",
|
|
103
100
|
onChange: (isSelected_1) => setToggleState(isSelected_1 ? "time" : null),
|
|
@@ -111,7 +108,7 @@ var CalendarHeader = ({ calendarState, datePickerState, prevButtonProps, nextBut
|
|
|
111
108
|
...nextButtonProps,
|
|
112
109
|
isDisabled: !!toggleState,
|
|
113
110
|
className: clsx("shrink-0 focus-visible:outline-interactive-contained-secondary-focus", !!toggleState && "opacity-0"),
|
|
114
|
-
children: /* @__PURE__ */ jsx(
|
|
111
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-6 text-interactive-text-secondary-idle" })
|
|
115
112
|
})
|
|
116
113
|
})
|
|
117
114
|
]
|
|
@@ -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
|
-
import {
|
|
5
|
+
import { ChevronDown, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from "lucide-react";
|
|
11
6
|
import { useMemo } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
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
|
})
|
|
@@ -15,6 +15,7 @@ interface DateFieldProps extends Omit<DateFieldStateOptions, "locale" | "createC
|
|
|
15
15
|
timeZone?: string;
|
|
16
16
|
segmentGroup?: string;
|
|
17
17
|
shouldAutoFixYear?: boolean;
|
|
18
|
+
preserveNullValue?: boolean;
|
|
18
19
|
}
|
|
19
|
-
export declare const DateField: ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity, isTimeOptional, format, timeZone, segmentGroup, shouldAutoFixYear, ...props }: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const DateField: ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity, isTimeOptional, format, timeZone, segmentGroup, shouldAutoFixYear, preserveNullValue, ...props }: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { DateSegmentItem } from "./DateSegmentItem.js";
|
|
2
2
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
3
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
4
|
import { useCallback, useEffect, useImperativeHandle, useMemo, useRef } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
6
6
|
import { useDateField, useLocale } from "react-aria";
|
|
7
7
|
import { CalendarDate, CalendarDateTime, createCalendar } from "@internationalized/date";
|
|
8
8
|
import { DateTime } from "luxon";
|
|
9
9
|
import { useDateFieldState } from "react-stately";
|
|
10
10
|
//#region src/components/inputs/DateTime/shared/DateField.tsx
|
|
11
11
|
var omitNullValue = ({ value: _value, ...props }) => props;
|
|
12
|
-
var DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity = "day", isTimeOptional = false, format, timeZone, segmentGroup, shouldAutoFixYear = false, ...props }) => {
|
|
12
|
+
var DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity = "day", isTimeOptional = false, format, timeZone, segmentGroup, shouldAutoFixYear = false, preserveNullValue = false, ...props }) => {
|
|
13
13
|
const { locale } = useLocale();
|
|
14
14
|
const previousValueRef = useRef(props.value);
|
|
15
|
-
const dateFieldProps = props.value == null ? omitNullValue(props) : props;
|
|
15
|
+
const dateFieldProps = props.value == null && !preserveNullValue ? omitNullValue(props) : props;
|
|
16
16
|
const state = useDateFieldState({
|
|
17
17
|
...dateFieldProps,
|
|
18
18
|
isDisabled,
|
|
@@ -130,7 +130,7 @@ var DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManua
|
|
|
130
130
|
return formattedDate.toFormat(format);
|
|
131
131
|
};
|
|
132
132
|
const formattedDisplayValue = getFormattedDisplayValue();
|
|
133
|
-
let fieldContent = /* @__PURE__ */ jsx(Fragment, { children: segmentsToRender.map((segment_7, i) => /* @__PURE__ */ jsx(DateSegmentItem, {
|
|
133
|
+
let fieldContent = /* @__PURE__ */ jsx(Fragment$1, { children: segmentsToRender.map((segment_7, i) => /* @__PURE__ */ jsx(DateSegmentItem, {
|
|
134
134
|
segment: segment_7,
|
|
135
135
|
segmentGroup,
|
|
136
136
|
state,
|
|
@@ -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;
|
|
@@ -39,8 +40,7 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
39
40
|
timeZone?: string;
|
|
40
41
|
isTimeOptional?: boolean;
|
|
41
42
|
format?: string;
|
|
42
|
-
fireBlurOnChange?: boolean;
|
|
43
43
|
onClear?: () => void;
|
|
44
44
|
}
|
|
45
|
-
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,
|
|
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;
|
|
46
46
|
export {};
|
|
@@ -10,14 +10,14 @@ import { datePickerInputContentRowDefinition } from "./datePickerInput.cva.js";
|
|
|
10
10
|
import { renderDatePickerTodayIcon } from "./datePickerTodayIcon.js";
|
|
11
11
|
import { useFirefoxDateSegmentSelectionGuard } from "./useFirefoxDateSegmentSelectionGuard.js";
|
|
12
12
|
import { InputClear } from "../../shared/InputClear.js";
|
|
13
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
13
|
import { clsx } from "clsx";
|
|
15
14
|
import { useCallback, useImperativeHandle, useRef, useState } from "react";
|
|
16
15
|
import { Button } from "react-aria-components";
|
|
16
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
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,
|
|
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();
|
|
@@ -51,22 +51,17 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
|
|
|
51
51
|
shouldAutoFixYear: autoFixYear
|
|
52
52
|
} : void 0;
|
|
53
53
|
const clearInput = useCallback(() => {
|
|
54
|
-
dateFieldRef.current?.clearField();
|
|
55
|
-
endDateFieldRef.current?.clearField();
|
|
56
54
|
if (onClearProp) onClearProp();
|
|
57
55
|
else {
|
|
56
|
+
dateFieldRef.current?.clearField();
|
|
57
|
+
endDateFieldRef.current?.clearField();
|
|
58
58
|
fieldProps.onChange?.(null);
|
|
59
59
|
endFieldProps?.onChange?.(null);
|
|
60
|
-
if (fireBlurOnChange) {
|
|
61
|
-
fieldProps.onBlur?.(null);
|
|
62
|
-
endFieldProps?.onBlur?.(null);
|
|
63
|
-
}
|
|
64
60
|
}
|
|
65
61
|
setCanClear(false);
|
|
66
62
|
}, [
|
|
67
63
|
endFieldProps,
|
|
68
64
|
fieldProps,
|
|
69
|
-
fireBlurOnChange,
|
|
70
65
|
onClearProp
|
|
71
66
|
]);
|
|
72
67
|
useImperativeHandle(ref, () => ({
|
|
@@ -76,7 +71,7 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
|
|
|
76
71
|
const onClearChange = useCallback((canClearInput) => {
|
|
77
72
|
setCanClear(canClearInput);
|
|
78
73
|
}, []);
|
|
79
|
-
const showClear = canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null;
|
|
74
|
+
const showClear = (!isDisabled || isClearableIfDisabled === true) && (canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null);
|
|
80
75
|
const isTodayIconDisabled = isDisabled || buttonProps.isDisabled;
|
|
81
76
|
const onToday = () => {
|
|
82
77
|
if (isTodayIconDisabled) return;
|
|
@@ -88,10 +83,6 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
|
|
|
88
83
|
fieldProps.onChange?.(today(effectiveTimeZone));
|
|
89
84
|
if (endFieldProps) endFieldProps.onChange?.(today(effectiveTimeZone));
|
|
90
85
|
}
|
|
91
|
-
if (fireBlurOnChange) {
|
|
92
|
-
fieldProps.onBlur?.(null);
|
|
93
|
-
endFieldProps?.onBlur?.(null);
|
|
94
|
-
}
|
|
95
86
|
};
|
|
96
87
|
const hidePlaceholder = as === "floating" && !fieldProps.value && !isFocused;
|
|
97
88
|
const todayIconButton = renderDatePickerTodayIcon(todayIcon, {
|
|
@@ -149,7 +140,7 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
|
|
|
149
140
|
size: "label-1",
|
|
150
141
|
className: "text-text-default-3",
|
|
151
142
|
children: placeholder
|
|
152
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DateField, {
|
|
143
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(DateField, {
|
|
153
144
|
ref: dateFieldRef,
|
|
154
145
|
...normalizedFieldProps,
|
|
155
146
|
isDisabled,
|
|
@@ -159,10 +150,11 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
|
|
|
159
150
|
disableManualEntry,
|
|
160
151
|
dateGranularity,
|
|
161
152
|
isTimeOptional,
|
|
153
|
+
preserveNullValue: isValueControlled && !endFieldProps,
|
|
162
154
|
format,
|
|
163
155
|
timeZone: effectiveTimeZone,
|
|
164
156
|
segmentGroup: normalizedEndFieldProps ? "start" : void 0
|
|
165
|
-
}), normalizedEndFieldProps && /* @__PURE__ */ jsxs(Fragment, { children: [!((as === "floating" || as === "filter") && hidePlaceholder) && /* @__PURE__ */ jsx("span", {
|
|
157
|
+
}), normalizedEndFieldProps && /* @__PURE__ */ jsxs(Fragment$1, { children: [!((as === "floating" || as === "filter") && hidePlaceholder) && /* @__PURE__ */ jsx("span", {
|
|
166
158
|
className: clsx("pointer-events-none select-none", isDisabled && "text-interactive-text-secondary-disabled"),
|
|
167
159
|
children: "–"
|
|
168
160
|
}), /* @__PURE__ */ jsx(DateField, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c } from "react/compiler-runtime";
|
|
2
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
1
|
import { clsx } from "clsx";
|
|
4
2
|
import { useRef } from "react";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useDateSegment } from "react-aria";
|
|
6
6
|
//#region src/components/inputs/DateTime/shared/DateSegmentItem.tsx
|
|
7
7
|
var getPlaceholder = (segment) => {
|
|
@@ -93,7 +93,7 @@ var DateSegmentItemView = (t0) => {
|
|
|
93
93
|
const t12 = isPlaceholder ? "" : text;
|
|
94
94
|
let t13;
|
|
95
95
|
if ($[10] !== t11 || $[11] !== t12) {
|
|
96
|
-
t13 = /* @__PURE__ */ jsxs(Fragment, { children: [t11, t12] });
|
|
96
|
+
t13 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t11, t12] });
|
|
97
97
|
$[10] = t11;
|
|
98
98
|
$[11] = t12;
|
|
99
99
|
$[12] = t13;
|
|
@@ -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
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
5
|
import clsx$1 from "clsx";
|
|
8
6
|
import { Dialog, Popover } from "react-aria-components";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/inputs/DateTime/shared/DateTimeDialog.tsx
|
|
10
10
|
var DateTimeDialog = (t0) => {
|
|
11
11
|
const $ = c(26);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../../config/i18n.js";
|
|
2
2
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
//#region src/components/inputs/DateTime/shared/DateTimeDialogFooter.tsx
|
|
7
7
|
var DateTimeDialogFooter = ({ isValid = true, isDisabled = false, onTodayPress, onApply }) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
2
|
import { clsx } from "clsx";
|
|
5
3
|
import { useRef } from "react";
|
|
6
4
|
import { ListBox, ListBoxItem } from "react-aria-components";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx } from "react/jsx-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
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
3
|
import { clsx } from "clsx";
|
|
6
4
|
import { useRef } from "react";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-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,14 +1,13 @@
|
|
|
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 {
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronDown, ChevronUp } from "lucide-react";
|
|
10
7
|
import { clsx } from "clsx";
|
|
11
8
|
import { useEffect, useRef } from "react";
|
|
9
|
+
import { c } from "react/compiler-runtime";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import { useDateSegment, useLocale, useTimeField } from "react-aria";
|
|
13
12
|
import { Time } from "@internationalized/date";
|
|
14
13
|
import { useTimeFieldState } from "@react-stately/datepicker";
|
|
@@ -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,12 +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
|
-
fireBlurOnChange?: boolean;
|
|
23
23
|
}
|
|
24
|
-
export declare const TimePickerInput: ({ ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, onClear,
|
|
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;
|
|
25
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
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
10
|
import { clsx } from "clsx";
|
|
13
11
|
import { useRef, useState } from "react";
|
|
14
12
|
import { Button } from "react-aria-components";
|
|
13
|
+
import { c } from "react/compiler-runtime";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-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
19
|
const $ = c(69);
|
|
20
|
-
const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, onClear,
|
|
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,19 +147,18 @@ var TimePickerInput = (t0) => {
|
|
|
147
147
|
$[32] = t22;
|
|
148
148
|
} else t22 = $[32];
|
|
149
149
|
let t23;
|
|
150
|
-
if ($[33] !== canClear || $[34] !==
|
|
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
|
-
|
|
154
|
-
|
|
155
|
-
if (fireBlurOnChange) fieldProps.onBlur?.(null);
|
|
153
|
+
if (onClear) onClear();
|
|
154
|
+
else state.setValue(null);
|
|
156
155
|
},
|
|
157
|
-
show: canClear
|
|
156
|
+
show: canClear && (!isDisabled || isClearableIfDisabled === true)
|
|
158
157
|
});
|
|
159
158
|
$[33] = canClear;
|
|
160
|
-
$[34] =
|
|
161
|
-
$[35] =
|
|
162
|
-
$[36] =
|
|
159
|
+
$[34] = isClearable;
|
|
160
|
+
$[35] = isClearableIfDisabled;
|
|
161
|
+
$[36] = isDisabled;
|
|
163
162
|
$[37] = onClear;
|
|
164
163
|
$[38] = state;
|
|
165
164
|
$[39] = t23;
|
|
@@ -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
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
3
|
import { clsx } from "clsx";
|
|
6
4
|
import { useRef } from "react";
|
|
7
5
|
import { ListBox, ListBoxItem } from "react-aria-components";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { jsx } from "react/jsx-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 {
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx } from "react/jsx-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 = ["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);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldValues } from '
|
|
1
|
+
import { FieldValues } from '../shared/form.binding';
|
|
2
2
|
import { FileUploadProps } from './fileUpload.types';
|
|
3
3
|
export type { DefaultFile, FileUploadBaseProps, FileUploadButtonProps, FileUploadError, FileUploadProps, FileUploadRequest, FileUploadResponse, FileUploadState, } from './fileUpload.types';
|
|
4
4
|
export declare const FileUpload: <TFieldValues extends FieldValues = FieldValues>(props: FileUploadProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
3
|
import "../../../config/i18n.js";
|
|
4
|
+
import { FieldController } from "../shared/form.binding.js";
|
|
4
5
|
import { FormField } from "../FormField/FormField.js";
|
|
5
6
|
import { FileUtils } from "../../../utils/file.utils.js";
|
|
6
7
|
import { FileCardList } from "./shared/FileCardList.js";
|
|
7
8
|
import { FileUploadContentEmpty } from "./shared/FileUploadContentEmpty.js";
|
|
8
9
|
import { FileUploadContent } from "./shared/FileUploadContent.js";
|
|
9
10
|
import { fileUploadDropZoneDefinition } from "./shared/fileUpload.cva.js";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import { clsx } from "clsx";
|
|
13
12
|
import { useCallback, useState } from "react";
|
|
14
13
|
import { DropZone } from "react-aria-components";
|
|
14
|
+
import { c } from "react/compiler-runtime";
|
|
15
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
15
16
|
import { mergeRefs, useLabels } from "@react-aria/utils";
|
|
16
17
|
import { useTranslation } from "react-i18next";
|
|
17
|
-
import { Controller } from "react-hook-form";
|
|
18
18
|
//#region src/components/inputs/File/FileUpload.tsx
|
|
19
19
|
var FileUploadBase = (props) => {
|
|
20
20
|
const { t } = useTranslation("ui");
|
|
@@ -142,7 +142,7 @@ var FileUploadBase = (props) => {
|
|
|
142
142
|
isContainer: !!children,
|
|
143
143
|
className: "group/file-upload-drop-zone"
|
|
144
144
|
}),
|
|
145
|
-
children: children ? /* @__PURE__ */ jsxs(Fragment, { children: [children({
|
|
145
|
+
children: children ? /* @__PURE__ */ jsxs(Fragment$1, { children: [children({
|
|
146
146
|
files: uploadState,
|
|
147
147
|
onRemove: handleRemove,
|
|
148
148
|
onCancel: handleCancelUpload
|
|
@@ -192,32 +192,32 @@ var FileUploadBase = (props) => {
|
|
|
192
192
|
};
|
|
193
193
|
var FileUpload = (props) => {
|
|
194
194
|
const $ = c(15);
|
|
195
|
-
if ("
|
|
196
|
-
let
|
|
195
|
+
if ("field" in props && props.field) {
|
|
196
|
+
let field;
|
|
197
197
|
let innerProps;
|
|
198
198
|
let ref;
|
|
199
199
|
if ($[0] !== props) {
|
|
200
|
-
({
|
|
200
|
+
({field, ref, ...innerProps} = props);
|
|
201
201
|
$[0] = props;
|
|
202
|
-
$[1] =
|
|
202
|
+
$[1] = field;
|
|
203
203
|
$[2] = innerProps;
|
|
204
204
|
$[3] = ref;
|
|
205
205
|
} else {
|
|
206
|
-
|
|
206
|
+
field = $[1];
|
|
207
207
|
innerProps = $[2];
|
|
208
208
|
ref = $[3];
|
|
209
209
|
}
|
|
210
210
|
let t0;
|
|
211
211
|
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
212
212
|
t0 = (t1) => {
|
|
213
|
-
const { field, fieldState: t2 } = t1;
|
|
213
|
+
const { field: field_0, fieldState: t2 } = t1;
|
|
214
214
|
const { error } = t2;
|
|
215
215
|
return /* @__PURE__ */ jsx(FileUploadBase, {
|
|
216
216
|
...innerProps,
|
|
217
|
-
ref: mergeRefs(ref,
|
|
218
|
-
value:
|
|
219
|
-
onChange:
|
|
220
|
-
isDisabled:
|
|
217
|
+
ref: mergeRefs(ref, field_0.ref),
|
|
218
|
+
value: field_0.value,
|
|
219
|
+
onChange: field_0.onChange,
|
|
220
|
+
isDisabled: field_0.disabled || props.isDisabled,
|
|
221
221
|
error: props.error ?? error?.message
|
|
222
222
|
});
|
|
223
223
|
};
|
|
@@ -228,14 +228,14 @@ var FileUpload = (props) => {
|
|
|
228
228
|
$[8] = t0;
|
|
229
229
|
} else t0 = $[8];
|
|
230
230
|
let t1;
|
|
231
|
-
if ($[9] !==
|
|
232
|
-
t1 = /* @__PURE__ */ jsx(
|
|
233
|
-
control:
|
|
234
|
-
name:
|
|
231
|
+
if ($[9] !== field.form || $[10] !== field.name || $[11] !== t0) {
|
|
232
|
+
t1 = /* @__PURE__ */ jsx(FieldController, {
|
|
233
|
+
control: field.form,
|
|
234
|
+
name: field.name,
|
|
235
235
|
render: t0
|
|
236
236
|
});
|
|
237
|
-
$[9] =
|
|
238
|
-
$[10] =
|
|
237
|
+
$[9] = field.form;
|
|
238
|
+
$[10] = field.name;
|
|
239
239
|
$[11] = t0;
|
|
240
240
|
$[12] = t1;
|
|
241
241
|
} else t1 = $[12];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldValues } from '
|
|
1
|
+
import { FieldValues } from '../shared/form.binding';
|
|
2
2
|
import { InputUploadProps } from './inputUpload.types';
|
|
3
3
|
export type { InputUploadBaseProps, InputUploadProps } from './inputUpload.types';
|
|
4
4
|
export declare const InputUpload: <TFieldValues extends FieldValues = FieldValues>(props: InputUploadProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|