@povio/ui 2.3.3 → 3.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/AlignCenter.js +26 -11
- package/dist/assets/icons/AlignLeft.js +26 -11
- package/dist/assets/icons/AlignLeftRight.js +26 -11
- package/dist/assets/icons/AlignRight.js +26 -11
- package/dist/assets/icons/ArrowDropDown.js +26 -11
- package/dist/assets/icons/ArrowDropUp.js +26 -11
- package/dist/assets/icons/ArrowLeft.js +26 -11
- package/dist/assets/icons/ArrowRight.js +26 -11
- package/dist/assets/icons/Bold.js +26 -11
- package/dist/assets/icons/BulletedList.js +26 -11
- package/dist/assets/icons/Calendar.js +28 -13
- package/dist/assets/icons/Check.js +28 -13
- package/dist/assets/icons/CheckCircle.js +26 -11
- package/dist/assets/icons/CheckboxCheckmark.js +29 -14
- package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
- package/dist/assets/icons/ChevronDown.js +28 -13
- package/dist/assets/icons/ChevronLeft.js +28 -13
- package/dist/assets/icons/ChevronRight.js +28 -13
- package/dist/assets/icons/ChevronUp.js +28 -13
- package/dist/assets/icons/ChevronsLeft.js +28 -13
- package/dist/assets/icons/ChevronsRight.js +28 -13
- package/dist/assets/icons/Clock.js +26 -11
- package/dist/assets/icons/Close.js +26 -11
- package/dist/assets/icons/DateTime.js +35 -14
- package/dist/assets/icons/DragIndicator.js +26 -11
- package/dist/assets/icons/File.js +28 -13
- package/dist/assets/icons/Highlight.js +26 -11
- package/dist/assets/icons/HighlightOn.js +49 -15
- package/dist/assets/icons/Home.js +26 -11
- package/dist/assets/icons/Info.js +37 -16
- package/dist/assets/icons/Italic.js +26 -11
- package/dist/assets/icons/Link.js +26 -11
- package/dist/assets/icons/Menu.js +26 -11
- package/dist/assets/icons/NumberedList.js +26 -11
- package/dist/assets/icons/PointerHorizontal.js +26 -11
- package/dist/assets/icons/PointerVertical.js +26 -11
- package/dist/assets/icons/Search.js +26 -11
- package/dist/assets/icons/Send.js +28 -13
- package/dist/assets/icons/Strikethrough.js +26 -11
- package/dist/assets/icons/TextColor.js +48 -14
- package/dist/assets/icons/Today.js +26 -11
- package/dist/assets/icons/Underlined.js +28 -13
- package/dist/assets/icons/Upload.js +35 -14
- package/dist/assets/icons/Visibility.js +26 -11
- package/dist/assets/icons/VisibilityOff.js +26 -11
- package/dist/assets/icons/WarningFilled.js +28 -13
- package/dist/components/Breadcrumbs/Breadcrumbs.js +215 -64
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +40 -14
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +21 -18
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +35 -12
- package/dist/components/Menu/MenuMobile.js +103 -44
- package/dist/components/Menu/MenuPopover.js +110 -34
- package/dist/components/Menu/menu.cva.d.ts +35 -13
- package/dist/components/Menu/menu.cva.js +30 -24
- package/dist/components/buttons/Button/Button.js +7 -7
- package/dist/components/buttons/Button/button.cva.d.ts +95 -26
- package/dist/components/buttons/Button/button.cva.js +601 -589
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +59 -21
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -9
- package/dist/components/buttons/PillButton/pillButton.cva.js +247 -239
- package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
- package/dist/components/buttons/TextButton/TextButton.js +30 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
- package/dist/components/buttons/shared/ButtonContent.js +83 -25
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +3 -5
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -8
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +203 -37
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +28 -14
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +26 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.js +47 -40
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +371 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +482 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +13 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +267 -47
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +611 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +338 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +249 -93
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.js +286 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +13 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +387 -143
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +96 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +84 -30
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
- package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +214 -69
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +27 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +40 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +85 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +87 -44
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +151 -37
- package/dist/components/inputs/File/shared/InputUploadFilled.js +51 -10
- package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +26 -9
- package/dist/components/inputs/File/shared/fileUpload.cva.js +48 -40
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +23 -6
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +29 -20
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +27 -7
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
- package/dist/components/inputs/FormField/FormFieldHelper.js +28 -8
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +46 -15
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldError.cva.js +11 -8
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +22 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +13 -0
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +11 -8
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +450 -100
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +575 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +12 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +4 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +309 -94
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +422 -93
- package/dist/components/inputs/Input/shared/InputContent.js +196 -63
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
- package/dist/components/inputs/Inputs/InputItem.js +69 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +356 -64
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +101 -6
- package/dist/components/inputs/RadioGroup/radio.cva.js +74 -24
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +214 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +104 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +36 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +173 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +225 -18
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +396 -141
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +398 -119
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +88 -38
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +72 -19
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +73 -24
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +12 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +36 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +10 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +4 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -6
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +21 -18
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +37 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +82 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +548 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -76
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +450 -101
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +105 -33
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.js +217 -40
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +15 -6
- package/dist/components/inputs/Toggle/toggle.cva.js +25 -21
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +23 -13
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +88 -12
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +137 -16
- package/dist/components/inputs/shared/input.cva.js +317 -273
- package/dist/components/inputs/shared/label.cva.d.ts +15 -6
- package/dist/components/inputs/shared/label.cva.js +28 -25
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +12 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +4 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +14 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +100 -0
- package/dist/components/navigation/Accordion/Accordion.js +71 -24
- package/dist/components/navigation/Accordion/AccordionItem.js +97 -52
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +109 -44
- package/dist/components/navigation/Accordion/accordion.cva.js +114 -84
- package/dist/components/navigation/Stepper/Stepper.js +69 -24
- package/dist/components/navigation/Stepper/StepperItem.js +112 -39
- package/dist/components/navigation/Stepper/StepperSeparator.js +25 -7
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +86 -30
- package/dist/components/navigation/Stepper/stepper.cva.js +104 -83
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
- package/dist/components/overlays/Drawer/Drawer.js +62 -20
- package/dist/components/overlays/Modal/Modal.js +5 -5
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -9
- package/dist/components/overlays/Modal/modal.cva.js +38 -27
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +86 -30
- package/dist/components/overlays/Tooltip/Tooltip.js +143 -34
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +45 -17
- package/dist/components/overlays/Tooltip/tooltip.cva.js +38 -26
- package/dist/components/segment/Segment.js +221 -60
- package/dist/components/segment/SegmentItem.js +70 -13
- package/dist/components/segment/segment.cva.d.ts +18 -7
- package/dist/components/segment/segment.cva.js +24 -21
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/popover.cva.d.ts +7 -3
- package/dist/components/shared/popover.cva.js +3 -3
- package/dist/components/status/Alert/Alert.js +103 -36
- package/dist/components/status/Alert/alert.cva.d.ts +18 -6
- package/dist/components/status/Alert/alert.cva.js +60 -57
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Loader/loader.cva.d.ts +23 -4
- package/dist/components/status/Loader/loader.cva.js +22 -13
- package/dist/components/status/Toast/Toast.js +27 -20
- package/dist/components/status/Toast/toast.cva.d.ts +61 -10
- package/dist/components/status/Toast/toast.cva.js +129 -64
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/status/shared/status.cva.d.ts +30 -8
- package/dist/components/status/shared/status.cva.js +56 -50
- package/dist/components/table/CellText.js +3 -3
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/HeaderText.js +3 -3
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +34 -33
- package/dist/components/table/table.cva.d.ts +52 -19
- package/dist/components/table/table.cva.js +44 -35
- package/dist/components/text/Link/Link.js +22 -10
- package/dist/components/text/Link/link.cva.d.ts +11 -5
- package/dist/components/text/Link/link.cva.js +8 -5
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/components/text/Tag/tag.cva.d.ts +15 -5
- package/dist/components/text/Tag/tag.cva.js +51 -48
- package/dist/components/text/Typography/Typography.js +25 -10
- package/dist/components/text/Typography/typography.cva.d.ts +93 -7
- package/dist/components/text/Typography/typography.cva.js +126 -122
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +23 -9
- package/dist/config/router.context.js +42 -16
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.d.ts +20 -6
- package/dist/config/uiConfig.context.js +68 -14
- package/dist/config/uiOverrides.context.d.ts +192 -0
- package/dist/config/uiOverrides.context.js +113 -0
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +3 -0
- package/dist/hooks/useAutosave.d.ts +2 -1
- package/dist/hooks/useAutosave.js +12 -4
- package/dist/hooks/useAutosave.spec.d.ts +1 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.d.ts +3 -1
- package/dist/hooks/useFormAutosave.js +122 -30
- package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useKeyInteractions.d.ts +20 -0
- package/dist/hooks/useKeyInteractions.js +54 -0
- package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +57 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +37 -1
- package/dist/index.js +34 -3
- package/dist/tw-ui-plugin.js +6 -0
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +136 -22
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/dist/utils/style-merge.util.d.ts +43 -0
- package/dist/utils/style-merge.util.js +233 -0
- package/dist/utils/style-merge.util.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/config/uiStyle.context.d.ts +0 -162
- package/dist/config/uiStyle.context.js +0 -30
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CalendarDate } from '@internationalized/date';
|
|
2
2
|
import { CalendarState, CalendarStateOptions } from '@react-stately/calendar';
|
|
3
|
+
import { DateValue } from 'react-aria';
|
|
3
4
|
import { DatePickerState } from 'react-stately';
|
|
4
5
|
type DateTimeCalendarProps = {
|
|
5
6
|
includesTime?: false;
|
|
@@ -14,12 +15,14 @@ type CalendarProps = DateTimeCalendarProps & {
|
|
|
14
15
|
className?: string;
|
|
15
16
|
state: CalendarState;
|
|
16
17
|
calendarProps: Omit<CalendarStateOptions, "locale" | "createCalendar">;
|
|
17
|
-
onApply: () => void;
|
|
18
|
+
onApply: (selectedDate?: DateValue) => void;
|
|
19
|
+
onDateSelectionChange?: (selectedDate: DateValue) => void;
|
|
20
|
+
setDateValueOnDateSelection?: boolean;
|
|
18
21
|
onMonthYearChange?: (selectedDate: CalendarDate) => void;
|
|
19
22
|
onMonthYearCommit?: () => void;
|
|
20
23
|
selectedDate?: CalendarDate | null;
|
|
21
24
|
granularity?: "day" | "month" | "year";
|
|
22
25
|
};
|
|
23
26
|
export type ToggleState = "month" | "year" | "time";
|
|
24
|
-
export declare const Calendar: ({ className, includesTime, datePickerState, hourCycle, onApply, onMonthYearChange, onMonthYearCommit, selectedDate, granularity, ...props }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const Calendar: ({ className, includesTime, datePickerState, hourCycle, onApply, onMonthYearChange, onMonthYearCommit, selectedDate, granularity, setDateValueOnDateSelection, onDateSelectionChange, ...props }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
28
|
export {};
|
|
@@ -3,137 +3,313 @@ import { CalendarHeader } from "./CalendarHeader.js";
|
|
|
3
3
|
import { MonthPicker } from "./MonthPicker.js";
|
|
4
4
|
import { TimePickerForm } from "./TimePickerForm.js";
|
|
5
5
|
import { YearPicker } from "./YearPicker.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { clsx } from "clsx";
|
|
8
9
|
import { useEffect, useState } from "react";
|
|
9
10
|
import { useCalendar } from "@react-aria/calendar";
|
|
10
11
|
//#region src/components/inputs/DateTime/shared/Calendar.tsx
|
|
11
|
-
var Calendar = (
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
var Calendar = (t0) => {
|
|
13
|
+
const $ = c(90);
|
|
14
|
+
let className;
|
|
15
|
+
let datePickerState;
|
|
16
|
+
let hourCycle;
|
|
17
|
+
let includesTime;
|
|
18
|
+
let onApply;
|
|
19
|
+
let onDateSelectionChange;
|
|
20
|
+
let onMonthYearChange;
|
|
21
|
+
let onMonthYearCommit;
|
|
22
|
+
let props;
|
|
23
|
+
let selectedDate;
|
|
24
|
+
let t1;
|
|
25
|
+
let t2;
|
|
26
|
+
if ($[0] !== t0) {
|
|
27
|
+
({className, includesTime, datePickerState, hourCycle, onApply, onMonthYearChange, onMonthYearCommit, selectedDate, granularity: t1, setDateValueOnDateSelection: t2, onDateSelectionChange, ...props} = t0);
|
|
28
|
+
$[0] = t0;
|
|
29
|
+
$[1] = className;
|
|
30
|
+
$[2] = datePickerState;
|
|
31
|
+
$[3] = hourCycle;
|
|
32
|
+
$[4] = includesTime;
|
|
33
|
+
$[5] = onApply;
|
|
34
|
+
$[6] = onDateSelectionChange;
|
|
35
|
+
$[7] = onMonthYearChange;
|
|
36
|
+
$[8] = onMonthYearCommit;
|
|
37
|
+
$[9] = props;
|
|
38
|
+
$[10] = selectedDate;
|
|
39
|
+
$[11] = t1;
|
|
40
|
+
$[12] = t2;
|
|
41
|
+
} else {
|
|
42
|
+
className = $[1];
|
|
43
|
+
datePickerState = $[2];
|
|
44
|
+
hourCycle = $[3];
|
|
45
|
+
includesTime = $[4];
|
|
46
|
+
onApply = $[5];
|
|
47
|
+
onDateSelectionChange = $[6];
|
|
48
|
+
onMonthYearChange = $[7];
|
|
49
|
+
onMonthYearCommit = $[8];
|
|
50
|
+
props = $[9];
|
|
51
|
+
selectedDate = $[10];
|
|
52
|
+
t1 = $[11];
|
|
53
|
+
t2 = $[12];
|
|
54
|
+
}
|
|
55
|
+
const granularity = t1 === void 0 ? "day" : t1;
|
|
56
|
+
const setDateValueOnDateSelection = t2 === void 0 ? false : t2;
|
|
57
|
+
let t3;
|
|
58
|
+
if ($[13] !== granularity) {
|
|
59
|
+
t3 = () => {
|
|
60
|
+
if (granularity === "year") return "year";
|
|
61
|
+
if (granularity === "month") return "month";
|
|
62
|
+
return null;
|
|
63
|
+
};
|
|
64
|
+
$[13] = granularity;
|
|
65
|
+
$[14] = t3;
|
|
66
|
+
} else t3 = $[14];
|
|
67
|
+
const [toggleState, setToggleState] = useState(t3);
|
|
17
68
|
const { calendarProps, prevButtonProps, nextButtonProps } = useCalendar(props.calendarProps, props.state);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
69
|
+
let t4;
|
|
70
|
+
let t5;
|
|
71
|
+
if ($[15] !== granularity || $[16] !== includesTime || $[17] !== toggleState) {
|
|
72
|
+
t4 = () => {
|
|
73
|
+
if (granularity === "year" && toggleState !== "year") {
|
|
74
|
+
setToggleState("year");
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (granularity === "month" && toggleState === null) {
|
|
78
|
+
setToggleState("month");
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (granularity === "month" && toggleState === "time") {
|
|
82
|
+
setToggleState("month");
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (granularity === "day" && toggleState === "time" && !includesTime) setToggleState(null);
|
|
86
|
+
};
|
|
87
|
+
t5 = [
|
|
88
|
+
granularity,
|
|
89
|
+
toggleState,
|
|
90
|
+
includesTime
|
|
91
|
+
];
|
|
92
|
+
$[15] = granularity;
|
|
93
|
+
$[16] = includesTime;
|
|
94
|
+
$[17] = toggleState;
|
|
95
|
+
$[18] = t4;
|
|
96
|
+
$[19] = t5;
|
|
97
|
+
} else {
|
|
98
|
+
t4 = $[18];
|
|
99
|
+
t5 = $[19];
|
|
100
|
+
}
|
|
101
|
+
useEffect(t4, t5);
|
|
102
|
+
let t6;
|
|
103
|
+
if ($[20] !== granularity) {
|
|
104
|
+
t6 = () => {
|
|
105
|
+
if (granularity === "day") {
|
|
106
|
+
setToggleState(null);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
50
109
|
setToggleState("month");
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
110
|
+
};
|
|
111
|
+
$[20] = granularity;
|
|
112
|
+
$[21] = t6;
|
|
113
|
+
} else t6 = $[21];
|
|
114
|
+
const onMonthSelectionChange = t6;
|
|
115
|
+
let t7;
|
|
116
|
+
if ($[22] !== granularity) {
|
|
117
|
+
t7 = () => {
|
|
118
|
+
if (granularity === "day") {
|
|
119
|
+
setToggleState(null);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (granularity === "month") {
|
|
123
|
+
setToggleState("month");
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
setToggleState("year");
|
|
127
|
+
};
|
|
128
|
+
$[22] = granularity;
|
|
129
|
+
$[23] = t7;
|
|
130
|
+
} else t7 = $[23];
|
|
131
|
+
const onYearSelectionChange = t7;
|
|
132
|
+
let t8;
|
|
133
|
+
if ($[24] !== onMonthYearChange || $[25] !== props.state || $[26] !== toggleState) {
|
|
134
|
+
t8 = (months) => {
|
|
135
|
+
if (toggleState) return;
|
|
136
|
+
if (!onMonthYearChange) return;
|
|
137
|
+
const focusedDate = props.state.focusedDate;
|
|
138
|
+
if (months === -1) {
|
|
139
|
+
onMonthYearChange(focusedDate.subtract({ months: 1 }));
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
onMonthYearChange(focusedDate.add({ months: 1 }));
|
|
143
|
+
};
|
|
144
|
+
$[24] = onMonthYearChange;
|
|
145
|
+
$[25] = props.state;
|
|
146
|
+
$[26] = toggleState;
|
|
147
|
+
$[27] = t8;
|
|
148
|
+
} else t8 = $[27];
|
|
149
|
+
const handleHeaderMonthNavigation = t8;
|
|
150
|
+
let t9;
|
|
151
|
+
if ($[28] !== handleHeaderMonthNavigation || $[29] !== prevButtonProps) {
|
|
152
|
+
t9 = (event) => {
|
|
68
153
|
prevButtonProps.onPress?.(event);
|
|
69
154
|
handleHeaderMonthNavigation(-1);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
155
|
+
};
|
|
156
|
+
$[28] = handleHeaderMonthNavigation;
|
|
157
|
+
$[29] = prevButtonProps;
|
|
158
|
+
$[30] = t9;
|
|
159
|
+
} else t9 = $[30];
|
|
160
|
+
let t10;
|
|
161
|
+
if ($[31] !== prevButtonProps || $[32] !== t9) {
|
|
162
|
+
t10 = {
|
|
163
|
+
...prevButtonProps,
|
|
164
|
+
onPress: t9
|
|
165
|
+
};
|
|
166
|
+
$[31] = prevButtonProps;
|
|
167
|
+
$[32] = t9;
|
|
168
|
+
$[33] = t10;
|
|
169
|
+
} else t10 = $[33];
|
|
170
|
+
const headerPrevButtonProps = t10;
|
|
171
|
+
let t11;
|
|
172
|
+
if ($[34] !== handleHeaderMonthNavigation || $[35] !== nextButtonProps) {
|
|
173
|
+
t11 = (event_0) => {
|
|
174
|
+
nextButtonProps.onPress?.(event_0);
|
|
76
175
|
handleHeaderMonthNavigation(1);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
176
|
+
};
|
|
177
|
+
$[34] = handleHeaderMonthNavigation;
|
|
178
|
+
$[35] = nextButtonProps;
|
|
179
|
+
$[36] = t11;
|
|
180
|
+
} else t11 = $[36];
|
|
181
|
+
let t12;
|
|
182
|
+
if ($[37] !== nextButtonProps || $[38] !== t11) {
|
|
183
|
+
t12 = {
|
|
184
|
+
...nextButtonProps,
|
|
185
|
+
onPress: t11
|
|
186
|
+
};
|
|
187
|
+
$[37] = nextButtonProps;
|
|
188
|
+
$[38] = t11;
|
|
189
|
+
$[39] = t12;
|
|
190
|
+
} else t12 = $[39];
|
|
191
|
+
const headerNextButtonProps = t12;
|
|
192
|
+
let t13;
|
|
193
|
+
if ($[40] !== datePickerState || $[41] !== includesTime || $[42] !== setDateValueOnDateSelection) {
|
|
194
|
+
t13 = (date) => {
|
|
195
|
+
if (!includesTime || !setDateValueOnDateSelection) return;
|
|
196
|
+
datePickerState.setDateValue(date);
|
|
197
|
+
};
|
|
198
|
+
$[40] = datePickerState;
|
|
199
|
+
$[41] = includesTime;
|
|
200
|
+
$[42] = setDateValueOnDateSelection;
|
|
201
|
+
$[43] = t13;
|
|
202
|
+
} else t13 = $[43];
|
|
203
|
+
const onDateSelection = t13;
|
|
204
|
+
let t14;
|
|
205
|
+
if ($[44] !== datePickerState || $[45] !== includesTime || $[46] !== onApply || $[47] !== onDateSelectionChange || $[48] !== props.state || $[49] !== setDateValueOnDateSelection || $[50] !== toggleState) {
|
|
206
|
+
t14 = (selectedDate_0) => {
|
|
207
|
+
const resolvedDate = selectedDate_0 ?? props.state.focusedDate;
|
|
208
|
+
if (includesTime && resolvedDate && setDateValueOnDateSelection) {
|
|
209
|
+
datePickerState.setDateValue(resolvedDate);
|
|
210
|
+
onDateSelectionChange?.(resolvedDate);
|
|
211
|
+
}
|
|
212
|
+
if (includesTime && toggleState !== "time") {
|
|
213
|
+
if (!setDateValueOnDateSelection && resolvedDate) {
|
|
214
|
+
datePickerState.setDateValue(resolvedDate);
|
|
215
|
+
onDateSelectionChange?.(resolvedDate);
|
|
216
|
+
}
|
|
217
|
+
setToggleState("time");
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
if (datePickerState?.value && !setDateValueOnDateSelection) onApply(resolvedDate);
|
|
221
|
+
};
|
|
222
|
+
$[44] = datePickerState;
|
|
223
|
+
$[45] = includesTime;
|
|
224
|
+
$[46] = onApply;
|
|
225
|
+
$[47] = onDateSelectionChange;
|
|
226
|
+
$[48] = props.state;
|
|
227
|
+
$[49] = setDateValueOnDateSelection;
|
|
228
|
+
$[50] = toggleState;
|
|
229
|
+
$[51] = t14;
|
|
230
|
+
} else t14 = $[51];
|
|
231
|
+
const handleDateChange = t14;
|
|
232
|
+
let t15;
|
|
233
|
+
if ($[52] !== datePickerState || $[53] !== granularity || $[54] !== handleDateChange || $[55] !== includesTime || $[56] !== onApply || $[57] !== onDateSelection || $[58] !== onMonthSelectionChange || $[59] !== onMonthYearChange || $[60] !== onMonthYearCommit || $[61] !== onYearSelectionChange || $[62] !== props.state || $[63] !== selectedDate || $[64] !== setDateValueOnDateSelection || $[65] !== toggleState) {
|
|
234
|
+
t15 = () => {
|
|
235
|
+
if (!toggleState) {
|
|
236
|
+
if (granularity === "month") return /* @__PURE__ */ jsx(MonthPicker, {
|
|
237
|
+
state: props.state,
|
|
238
|
+
onSelectionChange: onMonthSelectionChange,
|
|
239
|
+
onDateChange: onMonthYearChange,
|
|
240
|
+
onCommit: onMonthYearCommit,
|
|
241
|
+
selectedDate
|
|
242
|
+
});
|
|
243
|
+
if (granularity === "year") return /* @__PURE__ */ jsx(YearPicker, {
|
|
244
|
+
state: props.state,
|
|
245
|
+
onSelectionChange: onYearSelectionChange,
|
|
246
|
+
onDateChange: onMonthYearChange,
|
|
247
|
+
onCommit: onMonthYearCommit,
|
|
248
|
+
selectedDate
|
|
249
|
+
});
|
|
250
|
+
return /* @__PURE__ */ jsx(CalendarGrid, {
|
|
251
|
+
state: props.state,
|
|
252
|
+
onApply: handleDateChange,
|
|
253
|
+
onDoubleClickApply: !includesTime ? onApply : void 0,
|
|
254
|
+
onDateSelection,
|
|
255
|
+
shouldApplyOnDateSelection: !includesTime || setDateValueOnDateSelection
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
if (toggleState === "month") {
|
|
259
|
+
if (granularity === "year") return /* @__PURE__ */ jsx(YearPicker, {
|
|
260
|
+
state: props.state,
|
|
261
|
+
onSelectionChange: onYearSelectionChange,
|
|
262
|
+
onDateChange: onMonthYearChange,
|
|
263
|
+
onCommit: onMonthYearCommit,
|
|
264
|
+
selectedDate
|
|
265
|
+
});
|
|
266
|
+
return /* @__PURE__ */ jsx(MonthPicker, {
|
|
267
|
+
state: props.state,
|
|
268
|
+
onSelectionChange: onMonthSelectionChange,
|
|
269
|
+
onDateChange: onMonthYearChange,
|
|
270
|
+
onCommit: onMonthYearCommit,
|
|
271
|
+
selectedDate
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
if (toggleState === "year") return /* @__PURE__ */ jsx(YearPicker, {
|
|
106
275
|
state: props.state,
|
|
107
276
|
onSelectionChange: onYearSelectionChange,
|
|
108
277
|
onDateChange: onMonthYearChange,
|
|
109
278
|
onCommit: onMonthYearCommit,
|
|
110
279
|
selectedDate
|
|
111
280
|
});
|
|
112
|
-
return /* @__PURE__ */ jsx(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
onDateChange: onMonthYearChange,
|
|
116
|
-
onCommit: onMonthYearCommit,
|
|
117
|
-
selectedDate
|
|
281
|
+
if (toggleState === "time" && includesTime) return /* @__PURE__ */ jsx("div", {
|
|
282
|
+
className: "flex h-72 w-80 items-center justify-center",
|
|
283
|
+
children: /* @__PURE__ */ jsx(TimePickerForm, { datePickerState })
|
|
118
284
|
});
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
285
|
+
return null;
|
|
286
|
+
};
|
|
287
|
+
$[52] = datePickerState;
|
|
288
|
+
$[53] = granularity;
|
|
289
|
+
$[54] = handleDateChange;
|
|
290
|
+
$[55] = includesTime;
|
|
291
|
+
$[56] = onApply;
|
|
292
|
+
$[57] = onDateSelection;
|
|
293
|
+
$[58] = onMonthSelectionChange;
|
|
294
|
+
$[59] = onMonthYearChange;
|
|
295
|
+
$[60] = onMonthYearCommit;
|
|
296
|
+
$[61] = onYearSelectionChange;
|
|
297
|
+
$[62] = props.state;
|
|
298
|
+
$[63] = selectedDate;
|
|
299
|
+
$[64] = setDateValueOnDateSelection;
|
|
300
|
+
$[65] = toggleState;
|
|
301
|
+
$[66] = t15;
|
|
302
|
+
} else t15 = $[66];
|
|
303
|
+
const getContent = t15;
|
|
304
|
+
let t16;
|
|
305
|
+
if ($[67] !== className) {
|
|
306
|
+
t16 = clsx("flex min-h-0 w-full flex-col items-center", className);
|
|
307
|
+
$[67] = className;
|
|
308
|
+
$[68] = t16;
|
|
309
|
+
} else t16 = $[68];
|
|
310
|
+
let t17;
|
|
311
|
+
if ($[69] !== datePickerState || $[70] !== granularity || $[71] !== headerNextButtonProps || $[72] !== headerPrevButtonProps || $[73] !== hourCycle || $[74] !== includesTime || $[75] !== props.state || $[76] !== toggleState) {
|
|
312
|
+
t17 = /* @__PURE__ */ jsx(CalendarHeader, {
|
|
137
313
|
calendarState: props.state,
|
|
138
314
|
datePickerState,
|
|
139
315
|
prevButtonProps: headerPrevButtonProps,
|
|
@@ -143,11 +319,54 @@ var Calendar = ({ className, includesTime, datePickerState, hourCycle, onApply,
|
|
|
143
319
|
granularity,
|
|
144
320
|
toggleState,
|
|
145
321
|
setToggleState
|
|
146
|
-
})
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
322
|
+
});
|
|
323
|
+
$[69] = datePickerState;
|
|
324
|
+
$[70] = granularity;
|
|
325
|
+
$[71] = headerNextButtonProps;
|
|
326
|
+
$[72] = headerPrevButtonProps;
|
|
327
|
+
$[73] = hourCycle;
|
|
328
|
+
$[74] = includesTime;
|
|
329
|
+
$[75] = props.state;
|
|
330
|
+
$[76] = toggleState;
|
|
331
|
+
$[77] = t17;
|
|
332
|
+
} else t17 = $[77];
|
|
333
|
+
const t18 = toggleState !== "year" && "pb-8 md:pb-0";
|
|
334
|
+
let t19;
|
|
335
|
+
if ($[78] !== t18) {
|
|
336
|
+
t19 = clsx("flex min-h-0 w-full flex-1 flex-col items-center", t18);
|
|
337
|
+
$[78] = t18;
|
|
338
|
+
$[79] = t19;
|
|
339
|
+
} else t19 = $[79];
|
|
340
|
+
let t20;
|
|
341
|
+
if ($[80] !== getContent) {
|
|
342
|
+
t20 = getContent();
|
|
343
|
+
$[80] = getContent;
|
|
344
|
+
$[81] = t20;
|
|
345
|
+
} else t20 = $[81];
|
|
346
|
+
let t21;
|
|
347
|
+
if ($[82] !== t19 || $[83] !== t20) {
|
|
348
|
+
t21 = /* @__PURE__ */ jsx("div", {
|
|
349
|
+
className: t19,
|
|
350
|
+
children: t20
|
|
351
|
+
});
|
|
352
|
+
$[82] = t19;
|
|
353
|
+
$[83] = t20;
|
|
354
|
+
$[84] = t21;
|
|
355
|
+
} else t21 = $[84];
|
|
356
|
+
let t22;
|
|
357
|
+
if ($[85] !== calendarProps || $[86] !== t16 || $[87] !== t17 || $[88] !== t21) {
|
|
358
|
+
t22 = /* @__PURE__ */ jsxs("div", {
|
|
359
|
+
...calendarProps,
|
|
360
|
+
className: t16,
|
|
361
|
+
children: [t17, t21]
|
|
362
|
+
});
|
|
363
|
+
$[85] = calendarProps;
|
|
364
|
+
$[86] = t16;
|
|
365
|
+
$[87] = t17;
|
|
366
|
+
$[88] = t21;
|
|
367
|
+
$[89] = t22;
|
|
368
|
+
} else t22 = $[89];
|
|
369
|
+
return t22;
|
|
151
370
|
};
|
|
152
371
|
//#endregion
|
|
153
372
|
export { Calendar };
|
|
@@ -4,7 +4,9 @@ import { KeyboardEvent } from 'react';
|
|
|
4
4
|
import { DateValue } from 'react-aria';
|
|
5
5
|
interface CalendarCellProps extends AriaCalendarCellProps {
|
|
6
6
|
state: CalendarState | RangeCalendarState;
|
|
7
|
-
onApply?: () => void;
|
|
7
|
+
onApply?: (selectedDate?: DateValue) => void;
|
|
8
|
+
onDoubleClickApply?: (selectedDate?: DateValue) => void;
|
|
9
|
+
shouldApplyOnDateSelection?: boolean;
|
|
8
10
|
shouldCloseOnSelect?: boolean;
|
|
9
11
|
onDateSelection?: (date: DateValue) => void;
|
|
10
12
|
onDateHover?: (date: DateValue | null) => void;
|
|
@@ -16,5 +18,5 @@ interface CalendarCellProps extends AriaCalendarCellProps {
|
|
|
16
18
|
hoverDate?: DateValue | null;
|
|
17
19
|
onKeyboardNavigation?: (event: KeyboardEvent, date: DateValue) => boolean;
|
|
18
20
|
}
|
|
19
|
-
export declare const CalendarCell: ({ state, onApply, shouldCloseOnSelect, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, ...props }: CalendarCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const CalendarCell: ({ state, onApply, onDoubleClickApply, shouldApplyOnDateSelection, shouldCloseOnSelect, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, ...props }: CalendarCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
22
|
export {};
|