@povio/ui 2.1.14 → 2.1.16
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/README.md +80 -0
- package/dist/AclGuard.js +12 -0
- package/dist/ActionModal.js +51 -0
- package/dist/Alert.js +46 -0
- package/dist/AlignCenter.js +13 -0
- package/dist/AlignLeft.js +13 -0
- package/dist/AlignLeftRight.js +13 -0
- package/dist/AlignRight.js +13 -0
- package/dist/ArrowDropDown.js +13 -0
- package/dist/ArrowDropUp.js +13 -0
- package/dist/ArrowLeft.js +13 -0
- package/dist/ArrowRight.js +13 -0
- package/dist/AuthGuard.js +22 -0
- package/dist/Autocomplete.js +28 -0
- package/dist/Bold.js +13 -0
- package/dist/BottomSheet.js +191 -0
- package/dist/BulletedList.js +13 -0
- package/dist/Button.js +54 -0
- package/dist/ButtonContent.js +28 -0
- package/dist/Calendar.js +15 -0
- package/dist/Calendar2.js +54 -0
- package/dist/CalendarCell.js +130 -0
- package/dist/CalendarGrid.js +50 -0
- package/dist/CalendarHeader.js +75 -0
- package/dist/CalendarSelectHeader.js +170 -0
- package/dist/Can.js +13 -0
- package/dist/CellText.js +13 -0
- package/dist/Check.js +15 -0
- package/dist/CheckCircle.js +13 -0
- package/dist/CheckContent.js +16 -0
- package/dist/Checkbox.js +61 -0
- package/dist/CheckboxCheckmark.js +16 -0
- package/dist/CheckboxCheckmark2.js +25 -0
- package/dist/CheckboxIndeterminate.js +16 -0
- package/dist/ChevronDown.js +15 -0
- package/dist/ChevronLeft.js +15 -0
- package/dist/ChevronRight.js +15 -0
- package/dist/ChevronUp.js +15 -0
- package/dist/ChevronsLeft.js +15 -0
- package/dist/ChevronsRight.js +15 -0
- package/dist/Clock.js +13 -0
- package/dist/Close.js +13 -0
- package/dist/ColorPicker.js +16 -0
- package/dist/ColorPickerDropdown.js +51 -0
- package/dist/ColumnConfig.js +81 -0
- package/dist/DateField.js +89 -0
- package/dist/DatePicker.js +197 -0
- package/dist/DatePickerInput.js +158 -0
- package/dist/DateRangePicker.js +601 -0
- package/dist/DateSegmentItem.js +29 -0
- package/dist/DateTime.js +18 -0
- package/dist/DateTimeDialog.js +49 -0
- package/dist/DateTimeDialogFooter.js +25 -0
- package/dist/DateTimePicker.js +209 -0
- package/dist/Drag.js +13 -0
- package/dist/Drawer.js +43 -0
- package/dist/File.js +15 -0
- package/dist/FileCard.js +50 -0
- package/dist/FileCardList.js +17 -0
- package/dist/FileUpload.js +189 -0
- package/dist/FileUploadContainer.js +12 -0
- package/dist/FileUploadContent.js +61 -0
- package/dist/FileUploadContentEmpty.js +54 -0
- package/dist/FileUploadContentError.js +109 -0
- package/dist/FileUploadContentFilled.js +112 -0
- package/dist/FileUploadContentLoading.js +76 -0
- package/dist/Form.js +42 -0
- package/dist/FormField.js +35 -0
- package/dist/FormFieldError.js +11 -0
- package/dist/FormFieldHeader.js +36 -0
- package/dist/FormFieldHeaderClose.js +15 -0
- package/dist/FormFieldLabel.js +32 -0
- package/dist/HeaderText.js +10 -0
- package/dist/Highlight.js +13 -0
- package/dist/HighlightOn.js +19 -0
- package/dist/HyperlinkAction.js +70 -0
- package/dist/IconButton.js +12 -0
- package/dist/InfiniteTable.js +31 -0
- package/dist/Info.js +18 -0
- package/dist/InlineIconButton.js +13 -0
- package/dist/InputClear.js +19 -0
- package/dist/InputContent.js +94 -0
- package/dist/InputItem.js +54 -0
- package/dist/InputUpload.js +111 -0
- package/dist/InputUploadContent.js +52 -0
- package/dist/InputUploadFilled.js +26 -0
- package/dist/Inputs.js +15 -0
- package/dist/Italic.js +13 -0
- package/dist/Link.js +13 -0
- package/dist/Link2.js +19 -0
- package/dist/Loader.js +32 -0
- package/dist/Menu.js +13 -0
- package/dist/Menu2.js +9 -0
- package/dist/MenuDesktop.js +53 -0
- package/dist/MenuItem.js +21 -0
- package/dist/MenuMobile.js +64 -0
- package/dist/MenuPopover.js +30 -0
- package/dist/Modal.js +49 -0
- package/dist/MonthPicker.js +56 -0
- package/dist/NumberInput.js +132 -0
- package/dist/NumberedList.js +13 -0
- package/dist/PaginatedTable.js +26 -0
- package/dist/Pagination.js +43 -0
- package/dist/PaginationList.js +105 -0
- package/dist/PasswordInput.js +21 -0
- package/dist/PillButton.js +37 -0
- package/dist/PointerHorizontal.js +13 -0
- package/dist/PointerVertical.js +13 -0
- package/dist/ProgressBar.js +25 -0
- package/dist/QueryAutocomplete.js +18 -0
- package/dist/RadioGroup.js +81 -0
- package/dist/RangeCalendar.js +96 -0
- package/dist/ResponsivePopover.js +41 -0
- package/dist/Segment.js +82 -0
- package/dist/SegmentItem.js +23 -0
- package/dist/Select.js +24 -0
- package/dist/SelectBase.js +28 -0
- package/dist/SelectDesktop.js +147 -0
- package/dist/SelectInput.js +159 -0
- package/dist/SelectInputTags.js +29 -0
- package/dist/SelectListBox.js +73 -0
- package/dist/SelectListBoxItem.js +48 -0
- package/dist/SelectListBoxItemSelectAll.js +31 -0
- package/dist/SelectListBoxLoadingItem.js +41 -0
- package/dist/SelectListBoxSelectionBar.js +25 -0
- package/dist/SelectMobile.js +111 -0
- package/dist/Send.js +15 -0
- package/dist/Slider.js +93 -0
- package/dist/SplitButton.js +36 -0
- package/dist/Strikethrough.js +13 -0
- package/dist/Table.js +248 -0
- package/dist/Tag.js +42 -0
- package/dist/TextAlignSelect.js +44 -0
- package/dist/TextArea.js +120 -0
- package/dist/TextButton.js +13 -0
- package/dist/TextColor.js +16 -0
- package/dist/TextColorSelect.js +22 -0
- package/dist/TextEditor.js +143 -0
- package/dist/TextEditorToolbar.js +30 -0
- package/dist/TextHighlightSelect.js +24 -0
- package/dist/TextInput.js +125 -0
- package/dist/TextListActions.js +42 -0
- package/dist/TextMarksActions.js +67 -0
- package/dist/TextStyleSelect.js +52 -0
- package/dist/TimeField.js +17 -0
- package/dist/TimePicker.js +158 -0
- package/dist/TimePickerForm.js +158 -0
- package/dist/TimePickerInput.js +92 -0
- package/dist/Toast.js +58 -0
- package/dist/Today.js +13 -0
- package/dist/Toggle.js +60 -0
- package/dist/ToggleButton.js +13 -0
- package/dist/Tooltip.js +49 -0
- package/dist/TooltipEllipsis.js +18 -0
- package/dist/TooltipWrapper.js +19 -0
- package/dist/Typography.js +14 -0
- package/dist/Underlined.js +15 -0
- package/dist/Upload.js +16 -0
- package/dist/View.js +13 -0
- package/dist/ViewOff.js +13 -0
- package/dist/WarningFilled.js +15 -0
- package/dist/YearPicker.js +64 -0
- package/dist/ability.context.js +35 -0
- package/dist/alert.cva.js +62 -0
- package/dist/array.utils.js +8 -0
- package/dist/auth.context.js +37 -0
- package/dist/auth.js +6 -12
- package/dist/button.cva.js +656 -0
- package/dist/buttonContent.cva.js +10 -0
- package/dist/checkbox.cva.js +47 -0
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +2 -2
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +5 -0
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +3 -1
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +3 -1
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +3 -1
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +8 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -1
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -0
- package/dist/components/inputs/FormField/FormField.d.ts +4 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +4 -2
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -0
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -1
- package/dist/components/inputs/Input/shared/InputContent.d.ts +4 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.d.ts +2 -0
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/compoundMapper.js +11 -0
- package/dist/config/uiStyle.context.d.ts +2 -1
- package/dist/confirmation.context.js +78 -0
- package/dist/date-time.utils.js +50 -0
- package/dist/date.utils.js +17 -0
- package/dist/dom.utils.js +17 -0
- package/dist/dynamicColumns.js +272 -0
- package/dist/dynamicInputs.js +186 -0
- package/dist/error-handling.js +87 -0
- package/dist/file.utils.js +43 -0
- package/dist/fileUpload.cva.js +49 -0
- package/dist/i18n.js +8 -0
- package/dist/index.js +136 -278
- package/dist/input.cva.js +210 -0
- package/dist/inputUploadButton.cva.js +27 -0
- package/dist/isEqual.js +57 -0
- package/dist/label.cva.js +104 -0
- package/dist/link.context.js +17 -0
- package/dist/link.cva.js +7 -0
- package/dist/loader.cva.js +16 -0
- package/dist/logger.js +17 -0
- package/dist/menu.cva.js +27 -0
- package/dist/minWidth.cva.js +9 -0
- package/dist/modal.cva.js +31 -0
- package/dist/object.utils.js +36 -0
- package/dist/outline.clsx.js +4 -0
- package/dist/pillButton.cva.js +254 -0
- package/dist/queries.utils.js +7 -0
- package/dist/radio.cva.js +42 -0
- package/dist/react.js +6 -0
- package/dist/rest-interceptor.js +22 -0
- package/dist/rest.utils.js +31 -0
- package/dist/rolldown_runtime.js +16 -0
- package/dist/router.context.js +37 -0
- package/dist/routing.utils.js +9 -0
- package/dist/segment.cva.js +25 -0
- package/dist/select.context.js +190 -0
- package/dist/status.cva.js +57 -0
- package/dist/string.utils.js +10 -0
- package/dist/table.cva.js +35 -0
- package/dist/tag.cva.js +50 -0
- package/dist/text-editor.js +2 -4
- package/dist/textEditor.types.js +38 -0
- package/dist/theme.context.js +65 -0
- package/dist/toast.cva.js +158 -0
- package/dist/toggle.cva.js +27 -0
- package/dist/tooltip.cva.js +30 -0
- package/dist/translation.js +147 -0
- package/dist/translation2.js +145 -0
- package/dist/typography.cva.js +124 -0
- package/dist/uiConfig.context.js +58 -0
- package/dist/uiStyle.context.js +16 -0
- package/dist/useAutosave.js +62 -0
- package/dist/useBreakpoint.js +28 -0
- package/dist/useDebounceCallback.js +23 -0
- package/dist/useDeepCompare.js +21 -0
- package/dist/useFilters.js +121 -0
- package/dist/useForm.js +12 -0
- package/dist/useFormAutosave.js +52 -0
- package/dist/useIntersectionObserver.js +23 -0
- package/dist/useLocalStorage.js +35 -0
- package/dist/useLongPressRepeat.js +27 -0
- package/dist/usePagination.js +26 -0
- package/dist/useScrollableListBox.js +24 -0
- package/dist/useSelectItems.js +82 -0
- package/dist/useSorting.js +34 -0
- package/dist/useStateAndRef.js +15 -0
- package/dist/useTableColumnConfig.js +38 -0
- package/dist/useTableNav.js +279 -0
- package/dist/useToast.js +63 -0
- package/dist/useTranslationMemo.js +10 -0
- package/dist/zod.utils.js +17 -0
- package/package.json +14 -14
- package/dist/assets/icons/AlignCenter.js +0 -21
- package/dist/assets/icons/AlignLeft.js +0 -21
- package/dist/assets/icons/AlignLeftRight.js +0 -21
- package/dist/assets/icons/AlignRight.js +0 -21
- package/dist/assets/icons/ArrowDropDown.js +0 -21
- package/dist/assets/icons/ArrowDropUp.js +0 -21
- package/dist/assets/icons/ArrowLeft.js +0 -21
- package/dist/assets/icons/ArrowRight.js +0 -21
- package/dist/assets/icons/Bold.js +0 -21
- package/dist/assets/icons/BulletedList.js +0 -21
- package/dist/assets/icons/Calendar.js +0 -23
- package/dist/assets/icons/Check.js +0 -23
- package/dist/assets/icons/CheckCircle.js +0 -21
- package/dist/assets/icons/CheckboxCheckmark.js +0 -24
- package/dist/assets/icons/CheckboxIndeterminate.js +0 -24
- package/dist/assets/icons/ChevronDown.js +0 -23
- package/dist/assets/icons/ChevronLeft.js +0 -23
- package/dist/assets/icons/ChevronRight.js +0 -23
- package/dist/assets/icons/ChevronUp.js +0 -23
- package/dist/assets/icons/ChevronsLeft.js +0 -23
- package/dist/assets/icons/ChevronsRight.js +0 -23
- package/dist/assets/icons/Clock.js +0 -21
- package/dist/assets/icons/Close.js +0 -21
- package/dist/assets/icons/DateTime.js +0 -32
- package/dist/assets/icons/Drag.js +0 -21
- package/dist/assets/icons/File.js +0 -23
- package/dist/assets/icons/Highlight.js +0 -21
- package/dist/assets/icons/HighlightOn.js +0 -30
- package/dist/assets/icons/Info.js +0 -32
- package/dist/assets/icons/Italic.js +0 -21
- package/dist/assets/icons/Link.js +0 -21
- package/dist/assets/icons/Menu.js +0 -21
- package/dist/assets/icons/NumberedList.js +0 -21
- package/dist/assets/icons/PointerHorizontal.js +0 -21
- package/dist/assets/icons/PointerVertical.js +0 -21
- package/dist/assets/icons/Send.js +0 -23
- package/dist/assets/icons/Strikethrough.js +0 -21
- package/dist/assets/icons/TextColor.js +0 -30
- package/dist/assets/icons/Today.js +0 -21
- package/dist/assets/icons/Underlined.js +0 -23
- package/dist/assets/icons/Upload.js +0 -30
- package/dist/assets/icons/View.js +0 -18
- package/dist/assets/icons/ViewOff.js +0 -18
- package/dist/assets/icons/WarningFilled.js +0 -23
- package/dist/assets/locales/en/translation.json.js +0 -14
- package/dist/assets/locales/sl/translation.json.js +0 -14
- package/dist/components/Menu/Menu.js +0 -14
- package/dist/components/Menu/MenuDesktop.js +0 -74
- package/dist/components/Menu/MenuItem.js +0 -27
- package/dist/components/Menu/MenuMobile.js +0 -83
- package/dist/components/Menu/MenuPopover.js +0 -43
- package/dist/components/Menu/menu.cva.js +0 -45
- package/dist/components/buttons/Button/Button.js +0 -73
- package/dist/components/buttons/Button/button.cva.js +0 -666
- package/dist/components/buttons/IconButton/IconButton.js +0 -17
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +0 -18
- package/dist/components/buttons/PillButton/PillButton.js +0 -44
- package/dist/components/buttons/PillButton/pillButton.cva.js +0 -268
- package/dist/components/buttons/SplitButton/SplitButton.js +0 -65
- package/dist/components/buttons/TextButton/TextButton.js +0 -18
- package/dist/components/buttons/ToggleButton/ToggleButton.js +0 -21
- package/dist/components/buttons/shared/ButtonContent.js +0 -53
- package/dist/components/buttons/shared/buttonContent.cva.js +0 -16
- package/dist/components/inputs/Checkbox/Checkbox.js +0 -81
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +0 -32
- package/dist/components/inputs/Checkbox/checkbox.cva.js +0 -51
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +0 -251
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +0 -689
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +0 -265
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +0 -217
- package/dist/components/inputs/DateTime/shared/Calendar.js +0 -85
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +0 -160
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +0 -67
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +0 -89
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +0 -203
- package/dist/components/inputs/DateTime/shared/DateField.js +0 -77
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +0 -206
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +0 -55
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +0 -76
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +0 -47
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +0 -82
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +0 -133
- package/dist/components/inputs/DateTime/shared/TimeField.js +0 -26
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +0 -186
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +0 -125
- package/dist/components/inputs/DateTime/shared/YearPicker.js +0 -89
- package/dist/components/inputs/File/FileUpload.js +0 -257
- package/dist/components/inputs/File/FileUploadContainer.js +0 -17
- package/dist/components/inputs/File/InputUpload.js +0 -174
- package/dist/components/inputs/File/shared/FileCard.js +0 -67
- package/dist/components/inputs/File/shared/FileCardList.js +0 -20
- package/dist/components/inputs/File/shared/FileUploadContent.js +0 -92
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +0 -92
- package/dist/components/inputs/File/shared/FileUploadContentError.js +0 -167
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +0 -173
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +0 -128
- package/dist/components/inputs/File/shared/InputUploadContent.js +0 -73
- package/dist/components/inputs/File/shared/InputUploadFilled.js +0 -45
- package/dist/components/inputs/File/shared/ProgressBar.js +0 -42
- package/dist/components/inputs/File/shared/fileUpload.cva.js +0 -58
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +0 -49
- package/dist/components/inputs/FormField/FormField.js +0 -54
- package/dist/components/inputs/FormField/FormFieldError.js +0 -16
- package/dist/components/inputs/FormField/FormFieldHeader.js +0 -57
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +0 -20
- package/dist/components/inputs/FormField/FormFieldLabel.js +0 -37
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +0 -166
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +0 -26
- package/dist/components/inputs/Input/TextArea/TextArea.js +0 -155
- package/dist/components/inputs/Input/TextInput/TextInput.js +0 -162
- package/dist/components/inputs/Input/shared/InputContent.js +0 -114
- package/dist/components/inputs/Inputs/Form.js +0 -68
- package/dist/components/inputs/Inputs/InputItem.js +0 -61
- package/dist/components/inputs/Inputs/Inputs.js +0 -32
- package/dist/components/inputs/RadioGroup/RadioGroup.js +0 -103
- package/dist/components/inputs/RadioGroup/radio.cva.js +0 -57
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +0 -39
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +0 -25
- package/dist/components/inputs/Selection/Select/Select.js +0 -32
- package/dist/components/inputs/Selection/shared/SelectBase.js +0 -27
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +0 -223
- package/dist/components/inputs/Selection/shared/SelectInput.js +0 -234
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +0 -49
- package/dist/components/inputs/Selection/shared/SelectListBox.js +0 -127
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +0 -78
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +0 -45
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +0 -47
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +0 -42
- package/dist/components/inputs/Selection/shared/SelectMobile.js +0 -165
- package/dist/components/inputs/Selection/shared/select.context.js +0 -244
- package/dist/components/inputs/Selection/shared/useSelectItems.js +0 -94
- package/dist/components/inputs/Slider/Slider.js +0 -137
- package/dist/components/inputs/TextEditor/TextEditor.js +0 -223
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +0 -34
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +0 -80
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +0 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +0 -56
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +0 -33
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +0 -31
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +0 -37
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +0 -51
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +0 -73
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +0 -61
- package/dist/components/inputs/TextEditor/textEditor.types.js +0 -40
- package/dist/components/inputs/Toggle/Toggle.js +0 -65
- package/dist/components/inputs/Toggle/toggle.cva.js +0 -44
- package/dist/components/inputs/shared/CheckContent.js +0 -22
- package/dist/components/inputs/shared/InputClear.js +0 -27
- package/dist/components/inputs/shared/TooltipWrapper.js +0 -23
- package/dist/components/inputs/shared/input.cva.js +0 -174
- package/dist/components/inputs/shared/label.cva.js +0 -128
- package/dist/components/outline.clsx.js +0 -11
- package/dist/components/overlays/ActionModal/ActionModal.js +0 -80
- package/dist/components/overlays/BottomSheet/BottomSheet.js +0 -261
- package/dist/components/overlays/Drawer/Drawer.js +0 -84
- package/dist/components/overlays/Modal/Modal.js +0 -64
- package/dist/components/overlays/Modal/modal.cva.js +0 -53
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +0 -71
- package/dist/components/overlays/Tooltip/Tooltip.js +0 -92
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +0 -27
- package/dist/components/overlays/Tooltip/tooltip.cva.js +0 -60
- package/dist/components/segment/Segment.js +0 -118
- package/dist/components/segment/SegmentItem.js +0 -35
- package/dist/components/segment/segment.cva.js +0 -35
- package/dist/components/shared/pagination/Pagination.js +0 -75
- package/dist/components/shared/pagination/PaginationList.js +0 -145
- package/dist/components/shared/pagination/minWidth.cva.js +0 -15
- package/dist/components/status/Alert/Alert.js +0 -41
- package/dist/components/status/Alert/alert.cva.js +0 -64
- package/dist/components/status/Loader/Loader.js +0 -37
- package/dist/components/status/Loader/loader.cva.js +0 -27
- package/dist/components/status/Toast/Toast.js +0 -65
- package/dist/components/status/Toast/toast.cva.js +0 -150
- package/dist/components/status/Toast/useToast.js +0 -94
- package/dist/components/status/shared/status.cva.js +0 -62
- package/dist/components/table/CellText.js +0 -18
- package/dist/components/table/ColumnConfig.js +0 -124
- package/dist/components/table/HeaderText.js +0 -15
- package/dist/components/table/InfiniteTable.js +0 -40
- package/dist/components/table/PaginatedTable.js +0 -33
- package/dist/components/table/Table.js +0 -370
- package/dist/components/table/table.cva.js +0 -63
- package/dist/components/text/Link/Link.js +0 -24
- package/dist/components/text/Link/link.cva.js +0 -18
- package/dist/components/text/Tag/Tag.js +0 -49
- package/dist/components/text/Tag/tag.cva.js +0 -59
- package/dist/components/text/Typography/Typography.js +0 -22
- package/dist/components/text/Typography/typography.cva.js +0 -100
- package/dist/config/confirmation.context.js +0 -107
- package/dist/config/i18n.js +0 -15
- package/dist/config/link.context.js +0 -19
- package/dist/config/router.context.js +0 -39
- package/dist/config/theme.context.js +0 -73
- package/dist/config/uiConfig.context.js +0 -69
- package/dist/config/uiStyle.context.js +0 -16
- package/dist/helpers/dynamicColumns.js +0 -359
- package/dist/helpers/dynamicInputs.js +0 -212
- package/dist/hooks/useAutosave.js +0 -83
- package/dist/hooks/useBreakpoint.js +0 -33
- package/dist/hooks/useDebounceCallback.js +0 -29
- package/dist/hooks/useDeepCompare.js +0 -25
- package/dist/hooks/useFilters.js +0 -160
- package/dist/hooks/useForm.js +0 -22
- package/dist/hooks/useFormAutosave.js +0 -67
- package/dist/hooks/useIntersectionObserver.js +0 -27
- package/dist/hooks/useLocalStorage.js +0 -54
- package/dist/hooks/useLongPressRepeat.js +0 -33
- package/dist/hooks/usePagination.js +0 -35
- package/dist/hooks/useScrollableListBox.js +0 -30
- package/dist/hooks/useSorting.js +0 -32
- package/dist/hooks/useStateAndRef.js +0 -17
- package/dist/hooks/useTableColumnConfig.js +0 -63
- package/dist/hooks/useTableNav.js +0 -394
- package/dist/hooks/useTranslationMemo.js +0 -14
- package/dist/utils/array.utils.js +0 -12
- package/dist/utils/compoundMapper.js +0 -14
- package/dist/utils/date-time.utils.js +0 -77
- package/dist/utils/date.utils.js +0 -23
- package/dist/utils/dom.utils.js +0 -13
- package/dist/utils/file.utils.js +0 -63
- package/dist/utils/isEqual.js +0 -95
- package/dist/utils/logger.js +0 -19
- package/dist/utils/object.utils.js +0 -53
- package/dist/utils/queries.utils.js +0 -9
- package/dist/utils/rest.utils.js +0 -51
- package/dist/utils/routing.utils.js +0 -15
- package/dist/utils/string.utils.js +0 -12
- package/dist/utils/vendor/acl/AclGuard.js +0 -14
- package/dist/utils/vendor/acl/Can.js +0 -18
- package/dist/utils/vendor/acl/ability.context.js +0 -37
- package/dist/utils/vendor/auth/AuthGuard.js +0 -26
- package/dist/utils/vendor/auth/auth.context.js +0 -41
- package/dist/utils/vendor/error-handling.js +0 -119
- package/dist/utils/vendor/rest-interceptor.js +0 -21
- package/dist/utils/zod.utils.js +0 -21
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { now, getLocalTimeZone, today } from "@internationalized/date";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { useState, useRef, useCallback, useMemo } from "react";
|
|
5
|
-
import { useHover, useFocusWithin, useFocusVisible } from "react-aria";
|
|
6
|
-
import { Button } from "react-aria-components";
|
|
7
|
-
import useMeasure from "react-use-measure";
|
|
8
|
-
import { CalendarIcon } from "../../../../assets/icons/Calendar.js";
|
|
9
|
-
import { DateTimeIcon } from "../../../../assets/icons/DateTime.js";
|
|
10
|
-
import { TodayIcon } from "../../../../assets/icons/Today.js";
|
|
11
|
-
import { IconButton } from "../../../buttons/IconButton/IconButton.js";
|
|
12
|
-
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
13
|
-
import { DateField } from "./DateField.js";
|
|
14
|
-
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
15
|
-
import { InputClear } from "../../shared/InputClear.js";
|
|
16
|
-
import { useInputCva, inputSide } from "../../shared/input.cva.js";
|
|
17
|
-
import { Typography } from "../../../text/Typography/Typography.js";
|
|
18
|
-
import { UIStyle } from "../../../../config/uiStyle.context.js";
|
|
19
|
-
const DatePickerInput = ({
|
|
20
|
-
ref,
|
|
21
|
-
as,
|
|
22
|
-
groupProps,
|
|
23
|
-
fieldProps,
|
|
24
|
-
endFieldProps,
|
|
25
|
-
buttonProps,
|
|
26
|
-
isDisabled,
|
|
27
|
-
isInvalid,
|
|
28
|
-
disableDropdown,
|
|
29
|
-
variant,
|
|
30
|
-
size,
|
|
31
|
-
isDateTime,
|
|
32
|
-
isClearable,
|
|
33
|
-
headerProps,
|
|
34
|
-
todayIcon,
|
|
35
|
-
disableManualEntry,
|
|
36
|
-
placeholder,
|
|
37
|
-
onOpenDropdown,
|
|
38
|
-
...props
|
|
39
|
-
}) => {
|
|
40
|
-
const inputCva = useInputCva();
|
|
41
|
-
const uiStyle = UIStyle.useConfig();
|
|
42
|
-
const inputSideCva = uiStyle?.input?.sideCva ?? inputSide;
|
|
43
|
-
const [canClear, setCanClear] = useState(false);
|
|
44
|
-
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
45
|
-
const [isFocused, setIsFocused] = useState(false);
|
|
46
|
-
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
|
|
47
|
-
const { isFocusVisible } = useFocusVisible();
|
|
48
|
-
const dateFieldRef = useRef(null);
|
|
49
|
-
const endDateFieldRef = useRef(null);
|
|
50
|
-
const [labelContentRef, { width: labelWidth }] = useMeasure();
|
|
51
|
-
const onClearChange = useCallback((canClearInput) => {
|
|
52
|
-
setCanClear(canClearInput);
|
|
53
|
-
}, []);
|
|
54
|
-
const onClear = () => {
|
|
55
|
-
dateFieldRef.current?.clearField();
|
|
56
|
-
fieldProps.onChange?.(null);
|
|
57
|
-
endDateFieldRef.current?.clearField();
|
|
58
|
-
setCanClear(false);
|
|
59
|
-
};
|
|
60
|
-
const onToday = () => {
|
|
61
|
-
if (isDateTime) {
|
|
62
|
-
fieldProps.onChange?.(now(getLocalTimeZone()));
|
|
63
|
-
if (endFieldProps) {
|
|
64
|
-
endFieldProps.onChange?.(now(getLocalTimeZone()));
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
fieldProps.onChange?.(today(getLocalTimeZone()));
|
|
68
|
-
if (endFieldProps) {
|
|
69
|
-
endFieldProps.onChange?.(today(getLocalTimeZone()));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
const hidePlaceholder = as === "floating" && !fieldProps.value && !isFocused;
|
|
74
|
-
const style = useMemo(() => {
|
|
75
|
-
const paddingLeft = as === "filter" ? `calc(var(${inputSideCva({ size, type: "var" })}) + ${labelWidth}px)` : "0px";
|
|
76
|
-
return {
|
|
77
|
-
paddingLeft
|
|
78
|
-
};
|
|
79
|
-
}, [labelWidth, as, size, inputSideCva]);
|
|
80
|
-
return /* @__PURE__ */ jsxs(
|
|
81
|
-
"div",
|
|
82
|
-
{
|
|
83
|
-
ref,
|
|
84
|
-
className: inputCva({
|
|
85
|
-
variant,
|
|
86
|
-
as,
|
|
87
|
-
size,
|
|
88
|
-
...props,
|
|
89
|
-
className: clsx(
|
|
90
|
-
"group/date-picker-content relative flex min-w-input-width-min-width items-center justify-between gap-2"
|
|
91
|
-
)
|
|
92
|
-
}),
|
|
93
|
-
"data-rac": "",
|
|
94
|
-
"data-hovered": isHovered || void 0,
|
|
95
|
-
"data-disabled": isDisabled || void 0,
|
|
96
|
-
"data-invalid": isInvalid || void 0,
|
|
97
|
-
"data-is-empty": fieldProps.value === null || void 0,
|
|
98
|
-
"data-focus-within": isFocused || void 0,
|
|
99
|
-
"data-focus-visible": isFocused && isFocusVisible || void 0,
|
|
100
|
-
"data-has-selection": fieldProps.value !== null || void 0,
|
|
101
|
-
...groupProps,
|
|
102
|
-
...focusWithinProps,
|
|
103
|
-
...hoverProps,
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
106
|
-
as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(
|
|
107
|
-
FormFieldLabel,
|
|
108
|
-
{
|
|
109
|
-
ref: labelContentRef,
|
|
110
|
-
as,
|
|
111
|
-
...headerProps
|
|
112
|
-
}
|
|
113
|
-
),
|
|
114
|
-
/* @__PURE__ */ jsxs(
|
|
115
|
-
"div",
|
|
116
|
-
{
|
|
117
|
-
className: "flex items-center gap-2",
|
|
118
|
-
style,
|
|
119
|
-
children: [
|
|
120
|
-
disableManualEntry && /* @__PURE__ */ jsx(
|
|
121
|
-
Button,
|
|
122
|
-
{
|
|
123
|
-
onPress: onOpenDropdown,
|
|
124
|
-
className: "absolute inset-0 z-0",
|
|
125
|
-
isDisabled
|
|
126
|
-
}
|
|
127
|
-
),
|
|
128
|
-
todayIcon && /* @__PURE__ */ jsx(
|
|
129
|
-
IconButton,
|
|
130
|
-
{
|
|
131
|
-
label: "",
|
|
132
|
-
icon: TodayIcon,
|
|
133
|
-
size: "none",
|
|
134
|
-
onPress: onToday,
|
|
135
|
-
className: "relative z-1"
|
|
136
|
-
}
|
|
137
|
-
),
|
|
138
|
-
disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(
|
|
139
|
-
Typography,
|
|
140
|
-
{
|
|
141
|
-
size: "label-1",
|
|
142
|
-
className: "text-text-default-3",
|
|
143
|
-
children: placeholder
|
|
144
|
-
}
|
|
145
|
-
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
146
|
-
/* @__PURE__ */ jsx(
|
|
147
|
-
DateField,
|
|
148
|
-
{
|
|
149
|
-
ref: dateFieldRef,
|
|
150
|
-
...fieldProps,
|
|
151
|
-
isDisabled,
|
|
152
|
-
isInvalid,
|
|
153
|
-
onClearChange,
|
|
154
|
-
hidePlaceholder,
|
|
155
|
-
disableManualEntry
|
|
156
|
-
}
|
|
157
|
-
),
|
|
158
|
-
endFieldProps && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
159
|
-
!((as === "floating" || as === "filter") && hidePlaceholder) && /* @__PURE__ */ jsx(
|
|
160
|
-
"span",
|
|
161
|
-
{
|
|
162
|
-
className: clsx(
|
|
163
|
-
"pointer-events-none select-none",
|
|
164
|
-
isDisabled && "text-interactive-text-secondary-disabled"
|
|
165
|
-
),
|
|
166
|
-
children: "–"
|
|
167
|
-
}
|
|
168
|
-
),
|
|
169
|
-
/* @__PURE__ */ jsx(
|
|
170
|
-
DateField,
|
|
171
|
-
{
|
|
172
|
-
ref: endDateFieldRef,
|
|
173
|
-
...endFieldProps,
|
|
174
|
-
isDisabled,
|
|
175
|
-
isInvalid,
|
|
176
|
-
onClearChange,
|
|
177
|
-
hidePlaceholder,
|
|
178
|
-
disableManualEntry
|
|
179
|
-
}
|
|
180
|
-
)
|
|
181
|
-
] })
|
|
182
|
-
] })
|
|
183
|
-
]
|
|
184
|
-
}
|
|
185
|
-
)
|
|
186
|
-
] }),
|
|
187
|
-
/* @__PURE__ */ jsxs("div", { className: "relative z-1 flex items-center gap-2", children: [
|
|
188
|
-
isClearable && canClear && /* @__PURE__ */ jsx(InputClear, { onClear }),
|
|
189
|
-
(!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(
|
|
190
|
-
InlineIconButton,
|
|
191
|
-
{
|
|
192
|
-
label: "",
|
|
193
|
-
color: "secondary",
|
|
194
|
-
...buttonProps,
|
|
195
|
-
icon: isDateTime ? DateTimeIcon : CalendarIcon,
|
|
196
|
-
isDisabled
|
|
197
|
-
}
|
|
198
|
-
)
|
|
199
|
-
] })
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
);
|
|
203
|
-
};
|
|
204
|
-
export {
|
|
205
|
-
DatePickerInput
|
|
206
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { useRef } from "react";
|
|
4
|
-
import { useDateSegment } from "react-aria";
|
|
5
|
-
const getPlaceholder = (segment) => {
|
|
6
|
-
if (!segment.isPlaceholder) {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
switch (segment.type) {
|
|
10
|
-
case "hour":
|
|
11
|
-
return "hh";
|
|
12
|
-
case "minute":
|
|
13
|
-
return "mm";
|
|
14
|
-
case "second":
|
|
15
|
-
return "ss";
|
|
16
|
-
default:
|
|
17
|
-
return segment.placeholder;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
const DateSegmentItem = ({ segment, state, isDisabled, timePickerOnly, hidePlaceholder }) => {
|
|
21
|
-
const ref = useRef(null);
|
|
22
|
-
const { segmentProps } = useDateSegment(segment, state, ref);
|
|
23
|
-
const isInputEmpty = !state.value;
|
|
24
|
-
return /* @__PURE__ */ jsx(
|
|
25
|
-
"div",
|
|
26
|
-
{
|
|
27
|
-
...segmentProps,
|
|
28
|
-
ref,
|
|
29
|
-
className: clsx(
|
|
30
|
-
"box-content rounded-input-rounding-default",
|
|
31
|
-
isDisabled && "text-interactive-text-secondary-disabled",
|
|
32
|
-
!isDisabled && isInputEmpty && "text-text-default-3 group-focus-within:text-text-default-1",
|
|
33
|
-
!isDisabled && !isInputEmpty && "text-text-default-1",
|
|
34
|
-
"focus-within:outline-1 focus-within:outline-interactive-contained-primary-idle focus-within:outline-offset-1",
|
|
35
|
-
["hour", "dayPeriod"].includes(segment.type) && !timePickerOnly && "ml-1",
|
|
36
|
-
hidePlaceholder && "opacity-0"
|
|
37
|
-
),
|
|
38
|
-
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
39
|
-
segment.isPlaceholder && /* @__PURE__ */ jsx(
|
|
40
|
-
"span",
|
|
41
|
-
{
|
|
42
|
-
"aria-hidden": "true",
|
|
43
|
-
className: "pointer-events-none",
|
|
44
|
-
children: getPlaceholder(segment)
|
|
45
|
-
}
|
|
46
|
-
),
|
|
47
|
-
segment.isPlaceholder ? "" : segment.text
|
|
48
|
-
] })
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
DateSegmentItem,
|
|
54
|
-
getPlaceholder
|
|
55
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Popover, Dialog } from "react-aria-components";
|
|
3
|
-
import { FormFieldHeader } from "../../FormField/FormFieldHeader.js";
|
|
4
|
-
import { FormFieldHeaderClose } from "../../FormField/FormFieldHeaderClose.js";
|
|
5
|
-
import { BottomSheet } from "../../../overlays/BottomSheet/BottomSheet.js";
|
|
6
|
-
import { useBreakpoint } from "../../../../hooks/useBreakpoint.js";
|
|
7
|
-
const DateTimeDialog = ({
|
|
8
|
-
hideSidebar,
|
|
9
|
-
children,
|
|
10
|
-
footer,
|
|
11
|
-
sidebar,
|
|
12
|
-
label,
|
|
13
|
-
isOpen,
|
|
14
|
-
triggerRef,
|
|
15
|
-
dialogProps,
|
|
16
|
-
onOpenChange
|
|
17
|
-
}) => {
|
|
18
|
-
const isDesktop = useBreakpoint("md");
|
|
19
|
-
if (isDesktop) {
|
|
20
|
-
if (!isOpen) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
24
|
-
Popover,
|
|
25
|
-
{
|
|
26
|
-
triggerRef,
|
|
27
|
-
isOpen,
|
|
28
|
-
placement: "bottom start",
|
|
29
|
-
onOpenChange,
|
|
30
|
-
children: /* @__PURE__ */ jsx(
|
|
31
|
-
Dialog,
|
|
32
|
-
{
|
|
33
|
-
...dialogProps,
|
|
34
|
-
className: "outline-none!",
|
|
35
|
-
"aria-label": label,
|
|
36
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex overflow-hidden rounded-input-rounding-default border border-elevation-outline-default-1 border-solid bg-elevation-fill-default-1 shadow-5", children: [
|
|
37
|
-
!hideSidebar && sidebar,
|
|
38
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col justify-between", children: [
|
|
39
|
-
children,
|
|
40
|
-
footer
|
|
41
|
-
] })
|
|
42
|
-
] })
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
return /* @__PURE__ */ jsx(
|
|
49
|
-
BottomSheet,
|
|
50
|
-
{
|
|
51
|
-
label,
|
|
52
|
-
footer,
|
|
53
|
-
isOpen,
|
|
54
|
-
onOpenChange,
|
|
55
|
-
sheetMarginBottom: 0,
|
|
56
|
-
isScrollable: false,
|
|
57
|
-
height: "auto",
|
|
58
|
-
isDismissable: true,
|
|
59
|
-
children: (close) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
-
/* @__PURE__ */ jsx(
|
|
61
|
-
FormFieldHeader,
|
|
62
|
-
{
|
|
63
|
-
label,
|
|
64
|
-
className: "mb-8! shrink-0 px-4 pt-3",
|
|
65
|
-
rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close })
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
children,
|
|
69
|
-
!hideSidebar && sidebar
|
|
70
|
-
] })
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
};
|
|
74
|
-
export {
|
|
75
|
-
DateTimeDialog
|
|
76
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
5
|
-
import { ns } from "../../../../config/i18n.js";
|
|
6
|
-
const DateTimeDialogFooter = ({
|
|
7
|
-
isValid = true,
|
|
8
|
-
isDisabled = false,
|
|
9
|
-
onTodayPress,
|
|
10
|
-
onApply
|
|
11
|
-
}) => {
|
|
12
|
-
const { t } = useTranslation(ns);
|
|
13
|
-
return /* @__PURE__ */ jsxs(
|
|
14
|
-
"footer",
|
|
15
|
-
{
|
|
16
|
-
className: clsx(
|
|
17
|
-
"flex shrink-0 items-center gap-2 bg-elevation-fill-default-2 px-4 py-3 md:border-elevation-outline-default-1 md:border-t md:bg-elevation-fill-default-1 md:py-1-5",
|
|
18
|
-
onTodayPress ? "justify-between" : "justify-end"
|
|
19
|
-
),
|
|
20
|
-
children: [
|
|
21
|
-
onTodayPress && /* @__PURE__ */ jsx(
|
|
22
|
-
TextButton,
|
|
23
|
-
{
|
|
24
|
-
type: "button",
|
|
25
|
-
color: "primary",
|
|
26
|
-
isDisabled,
|
|
27
|
-
onPress: onTodayPress,
|
|
28
|
-
children: t(($) => $.ui.datePicker.today)
|
|
29
|
-
}
|
|
30
|
-
),
|
|
31
|
-
/* @__PURE__ */ jsx(
|
|
32
|
-
TextButton,
|
|
33
|
-
{
|
|
34
|
-
type: "button",
|
|
35
|
-
color: "secondary",
|
|
36
|
-
onPress: onApply,
|
|
37
|
-
isDisabled: !isValid,
|
|
38
|
-
children: t(($) => $.ui.datePicker.save)
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
export {
|
|
46
|
-
DateTimeDialogFooter
|
|
47
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useDateFormatter } from "@react-aria/i18n";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { ListBox, ListBoxItem } from "react-aria-components";
|
|
5
|
-
import { Typography } from "../../../text/Typography/Typography.js";
|
|
6
|
-
const MonthPicker = ({ state, onSelectionChange }) => {
|
|
7
|
-
const formatter = useDateFormatter({
|
|
8
|
-
month: "long",
|
|
9
|
-
timeZone: state.timeZone
|
|
10
|
-
});
|
|
11
|
-
const numMonths = state.focusedDate.calendar.getMonthsInYear(state.focusedDate);
|
|
12
|
-
const getMonths = () => {
|
|
13
|
-
const months = [];
|
|
14
|
-
for (let i = 1; i <= numMonths; i++) {
|
|
15
|
-
const date = state.focusedDate.set({ month: i });
|
|
16
|
-
months.push(formatter.format(date.toDate(state.timeZone)));
|
|
17
|
-
}
|
|
18
|
-
return months;
|
|
19
|
-
};
|
|
20
|
-
const isMonthDisabled = (month) => {
|
|
21
|
-
if (state.minValue && state.focusedDate.set({ month }) < state.minValue) {
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
if (state.maxValue && state.focusedDate.set({ month }) > state.maxValue) {
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
return false;
|
|
28
|
-
};
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
30
|
-
ListBox,
|
|
31
|
-
{
|
|
32
|
-
autoFocus: true,
|
|
33
|
-
"aria-label": "Month",
|
|
34
|
-
selectionMode: "single",
|
|
35
|
-
layout: "grid",
|
|
36
|
-
selectedKeys: [state.focusedDate.month],
|
|
37
|
-
onSelectionChange: (key) => {
|
|
38
|
-
if (key === "all") {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
const index = [...key][0];
|
|
42
|
-
if (typeof index === "number") {
|
|
43
|
-
const date = state.focusedDate.set({ month: [...key][0] });
|
|
44
|
-
state.setFocusedDate(date);
|
|
45
|
-
}
|
|
46
|
-
onSelectionChange(key);
|
|
47
|
-
},
|
|
48
|
-
className: "grid size-full min-h-72 grid-cols-3 grid-rows-4 gap-2 p-3 md:w-80",
|
|
49
|
-
children: getMonths().map((month, index) => {
|
|
50
|
-
const isDisabled = isMonthDisabled(index + 1);
|
|
51
|
-
return /* @__PURE__ */ jsx(
|
|
52
|
-
ListBoxItem,
|
|
53
|
-
{
|
|
54
|
-
id: index + 1,
|
|
55
|
-
textValue: month,
|
|
56
|
-
isDisabled,
|
|
57
|
-
className: clsx(
|
|
58
|
-
"flex items-center justify-center text-interactive-text-secondary-idle",
|
|
59
|
-
"rounded-button-rounding-m border border-elevation-outline-default-1 border-solid bg-elevation-fill-default-1",
|
|
60
|
-
"hover:text-interactive-text-secondary-hover",
|
|
61
|
-
"selected:border-interactive-contained-primary-idle selected:bg-interactive-contained-primary-idle selected:text-interactive-text-secondary-idle-inverted",
|
|
62
|
-
"focus:outline-none focus-visible:outline-1 focus-visible:outline-interactive-contained-primary-focus focus-visible:outline-offset-1",
|
|
63
|
-
isDisabled ? "cursor-default opacity-50" : "cursor-pointer"
|
|
64
|
-
),
|
|
65
|
-
children: /* @__PURE__ */ jsx(
|
|
66
|
-
Typography,
|
|
67
|
-
{
|
|
68
|
-
as: "span",
|
|
69
|
-
size: "label-2",
|
|
70
|
-
children: month
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
},
|
|
74
|
-
month
|
|
75
|
-
);
|
|
76
|
-
})
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
export {
|
|
81
|
-
MonthPicker
|
|
82
|
-
};
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useRangeCalendar } from "@react-aria/calendar";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { useRef, useMemo } from "react";
|
|
5
|
-
import { CalendarGrid } from "./CalendarGrid.js";
|
|
6
|
-
import { CalendarSelectHeader } from "./CalendarSelectHeader.js";
|
|
7
|
-
const RangeCalendar = ({
|
|
8
|
-
className,
|
|
9
|
-
leftCalendarState,
|
|
10
|
-
rightCalendarState,
|
|
11
|
-
calendarProps,
|
|
12
|
-
onApply,
|
|
13
|
-
onRangeChange: _onRangeChange,
|
|
14
|
-
onDateSelection,
|
|
15
|
-
onDateHover,
|
|
16
|
-
rangeSelection,
|
|
17
|
-
hoverDate,
|
|
18
|
-
onKeyboardNavigation
|
|
19
|
-
}) => {
|
|
20
|
-
const leftRef = useRef(null);
|
|
21
|
-
const rightRef = useRef(null);
|
|
22
|
-
const { calendarProps: leftCalendarAriaProps } = useRangeCalendar(calendarProps, leftCalendarState, leftRef);
|
|
23
|
-
const { calendarProps: rightCalendarAriaProps } = useRangeCalendar(calendarProps, rightCalendarState, rightRef);
|
|
24
|
-
const leftDate = leftCalendarState.visibleRange.start;
|
|
25
|
-
const rightDate = rightCalendarState.visibleRange.start;
|
|
26
|
-
const handleLeftKeyboardNavigation = (event, date) => {
|
|
27
|
-
return onKeyboardNavigation?.(event, date, "left") ?? false;
|
|
28
|
-
};
|
|
29
|
-
const handleRightKeyboardNavigation = (event, date) => {
|
|
30
|
-
return onKeyboardNavigation?.(event, date, "right") ?? false;
|
|
31
|
-
};
|
|
32
|
-
const handleLeftNavigate = (newDate) => {
|
|
33
|
-
const rightCurrentDate = rightCalendarState.visibleRange.start;
|
|
34
|
-
if (newDate.year < rightCurrentDate.year || newDate.year === rightCurrentDate.year && newDate.month < rightCurrentDate.month) {
|
|
35
|
-
leftCalendarState.setFocusedDate(newDate);
|
|
36
|
-
} else {
|
|
37
|
-
const closestValidDate = rightCurrentDate.subtract({ months: 1 });
|
|
38
|
-
leftCalendarState.setFocusedDate(closestValidDate);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const handleRightNavigate = (newDate) => {
|
|
42
|
-
const leftCurrentDate = leftCalendarState.visibleRange.start;
|
|
43
|
-
if (newDate.year > leftCurrentDate.year || newDate.year === leftCurrentDate.year && newDate.month > leftCurrentDate.month) {
|
|
44
|
-
rightCalendarState.setFocusedDate(newDate);
|
|
45
|
-
} else {
|
|
46
|
-
const closestValidDate = leftCurrentDate.add({ months: 1 });
|
|
47
|
-
rightCalendarState.setFocusedDate(closestValidDate);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
const isNextDisabled = useMemo(() => {
|
|
51
|
-
const leftNextDate = leftDate.add({ months: 1 });
|
|
52
|
-
return leftNextDate.year > rightDate.year || leftNextDate.year === rightDate.year && leftNextDate.month === rightDate.month;
|
|
53
|
-
}, [leftDate, rightDate]);
|
|
54
|
-
const isPrevDisabled = useMemo(() => {
|
|
55
|
-
const rightPrevDate = rightDate.subtract({ months: 1 });
|
|
56
|
-
return rightPrevDate.year < leftDate.year || rightPrevDate.year === leftDate.year && rightPrevDate.month === leftDate.month;
|
|
57
|
-
}, [leftDate, rightDate]);
|
|
58
|
-
return /* @__PURE__ */ jsx("div", { className: clsx("flex w-fit flex-col items-center bg-elevation-fill-default-1", className), children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
|
|
59
|
-
/* @__PURE__ */ jsxs(
|
|
60
|
-
"div",
|
|
61
|
-
{
|
|
62
|
-
...leftCalendarAriaProps,
|
|
63
|
-
ref: leftRef,
|
|
64
|
-
className: "flex flex-col items-center",
|
|
65
|
-
children: [
|
|
66
|
-
/* @__PURE__ */ jsx(
|
|
67
|
-
CalendarSelectHeader,
|
|
68
|
-
{
|
|
69
|
-
state: leftCalendarState,
|
|
70
|
-
isNextMonthDisabled: isNextDisabled,
|
|
71
|
-
isNextYearDisabled: isNextDisabled,
|
|
72
|
-
onNavigate: handleLeftNavigate,
|
|
73
|
-
maxDate: rightDate
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
/* @__PURE__ */ jsx(
|
|
77
|
-
CalendarGrid,
|
|
78
|
-
{
|
|
79
|
-
state: leftCalendarState,
|
|
80
|
-
onApply,
|
|
81
|
-
shouldCloseOnSelect: false,
|
|
82
|
-
onDateSelection,
|
|
83
|
-
rangeSelection,
|
|
84
|
-
onDateHover,
|
|
85
|
-
hoverDate,
|
|
86
|
-
onKeyboardNavigation: handleLeftKeyboardNavigation,
|
|
87
|
-
className: "h-64 w-[304px]!",
|
|
88
|
-
calendarSide: "left"
|
|
89
|
-
}
|
|
90
|
-
)
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
/* @__PURE__ */ jsxs(
|
|
95
|
-
"div",
|
|
96
|
-
{
|
|
97
|
-
...rightCalendarAriaProps,
|
|
98
|
-
ref: rightRef,
|
|
99
|
-
className: "hidden flex-col items-center md:flex",
|
|
100
|
-
children: [
|
|
101
|
-
/* @__PURE__ */ jsx(
|
|
102
|
-
CalendarSelectHeader,
|
|
103
|
-
{
|
|
104
|
-
state: rightCalendarState,
|
|
105
|
-
isPrevMonthDisabled: isPrevDisabled,
|
|
106
|
-
isPrevYearDisabled: isPrevDisabled,
|
|
107
|
-
onNavigate: handleRightNavigate,
|
|
108
|
-
minDate: leftDate
|
|
109
|
-
}
|
|
110
|
-
),
|
|
111
|
-
/* @__PURE__ */ jsx(
|
|
112
|
-
CalendarGrid,
|
|
113
|
-
{
|
|
114
|
-
state: rightCalendarState,
|
|
115
|
-
onApply,
|
|
116
|
-
shouldCloseOnSelect: false,
|
|
117
|
-
onDateSelection,
|
|
118
|
-
rangeSelection,
|
|
119
|
-
onDateHover,
|
|
120
|
-
hoverDate,
|
|
121
|
-
onKeyboardNavigation: handleRightKeyboardNavigation,
|
|
122
|
-
className: "h-64 w-[304px]!",
|
|
123
|
-
calendarSide: "right"
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
)
|
|
129
|
-
] }) });
|
|
130
|
-
};
|
|
131
|
-
export {
|
|
132
|
-
RangeCalendar
|
|
133
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { DateSegmentItem } from "./DateSegmentItem.js";
|
|
3
|
-
const TimeField = ({ ref, fieldProps, state, isDisabled, hidePlaceholder }) => {
|
|
4
|
-
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
5
|
-
"div",
|
|
6
|
-
{
|
|
7
|
-
...fieldProps,
|
|
8
|
-
ref,
|
|
9
|
-
className: "flex",
|
|
10
|
-
children: state.segments.map((segment, i) => /* @__PURE__ */ jsx(
|
|
11
|
-
DateSegmentItem,
|
|
12
|
-
{
|
|
13
|
-
segment,
|
|
14
|
-
state,
|
|
15
|
-
isDisabled,
|
|
16
|
-
timePickerOnly: true,
|
|
17
|
-
hidePlaceholder
|
|
18
|
-
},
|
|
19
|
-
i
|
|
20
|
-
))
|
|
21
|
-
}
|
|
22
|
-
) });
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
TimeField
|
|
26
|
-
};
|