@povio/ui 3.1.0 → 3.2.0
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 +207 -56
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +32 -9
- package/dist/components/Menu/MenuMobile.js +102 -39
- package/dist/components/Menu/MenuPopover.js +105 -29
- package/dist/components/buttons/Button/button.cva.d.ts +3 -3
- 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 +55 -17
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- 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 +80 -22
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +342 -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 +233 -98
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
- 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 +211 -65
- 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 +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -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 +41 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +91 -46
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/index.d.ts +1 -1
- 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 +148 -34
- package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
- package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
- 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 +25 -5
- 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 +26 -6
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
- 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 +574 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
- package/dist/components/inputs/Input/shared/InputContent.js +193 -59
- 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 +353 -61
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +227 -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 +393 -138
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
- 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 +85 -35
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
- 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 +14 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -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 +6 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -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 +83 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +612 -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 +447 -98
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
- 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 +214 -37
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
- package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +21 -11
- 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 +28 -0
- package/dist/components/inputs/shared/input.cva.js +38 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +104 -31
- package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
- 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/ResponsivePopover/ResponsivePopover.js +85 -28
- package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/segment/Segment.js +218 -57
- package/dist/components/segment/SegmentItem.js +67 -10
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Toast/Toast.js +28 -14
- package/dist/components/status/Toast/toast.cva.d.ts +1 -1
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +28 -27
- package/dist/components/text/Link/Link.js +19 -7
- package/dist/components/text/Typography/Typography.js +23 -8
- 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 +30 -11
- package/dist/config/uiOverrides.context.js +54 -14
- package/dist/helpers/dynamicInputs.d.ts +12 -9
- package/dist/helpers/dynamicInputs.js +13 -8
- 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 +72 -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 +18 -3
- package/dist/index.js +15 -5
- 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/zod.utils.d.ts +2 -0
- package/dist/utils/zod.utils.js +5 -0
- package/package.json +2 -2
|
@@ -2,45 +2,100 @@ 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";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import clsx$1 from "clsx";
|
|
7
8
|
import { Dialog, Popover } from "react-aria-components";
|
|
8
9
|
//#region src/components/inputs/DateTime/shared/DateTimeDialog.tsx
|
|
9
|
-
var DateTimeDialog = (
|
|
10
|
+
var DateTimeDialog = (t0) => {
|
|
11
|
+
const $ = c(26);
|
|
12
|
+
const { hideSidebar, children, footer, sidebar, label, isOpen, triggerRef, dialogProps, bottomSheetProps, onOpenChange } = t0;
|
|
10
13
|
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
11
14
|
if (useBreakpoint("md")) {
|
|
12
15
|
if (!isOpen) return null;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
let t1;
|
|
17
|
+
if ($[0] !== popoverCva) {
|
|
18
|
+
t1 = clsx$1(popoverCva({}), "flex overflow-hidden");
|
|
19
|
+
$[0] = popoverCva;
|
|
20
|
+
$[1] = t1;
|
|
21
|
+
} else t1 = $[1];
|
|
22
|
+
const t2 = !hideSidebar && sidebar;
|
|
23
|
+
let t3;
|
|
24
|
+
if ($[2] !== children || $[3] !== footer) {
|
|
25
|
+
t3 = /* @__PURE__ */ jsxs("div", {
|
|
26
|
+
className: "flex flex-1 flex-col justify-between",
|
|
27
|
+
children: [children, footer]
|
|
28
|
+
});
|
|
29
|
+
$[2] = children;
|
|
30
|
+
$[3] = footer;
|
|
31
|
+
$[4] = t3;
|
|
32
|
+
} else t3 = $[4];
|
|
33
|
+
let t4;
|
|
34
|
+
if ($[5] !== t1 || $[6] !== t2 || $[7] !== t3) {
|
|
35
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: t1,
|
|
37
|
+
children: [t2, t3]
|
|
38
|
+
});
|
|
39
|
+
$[5] = t1;
|
|
40
|
+
$[6] = t2;
|
|
41
|
+
$[7] = t3;
|
|
42
|
+
$[8] = t4;
|
|
43
|
+
} else t4 = $[8];
|
|
44
|
+
let t5;
|
|
45
|
+
if ($[9] !== dialogProps || $[10] !== label || $[11] !== t4) {
|
|
46
|
+
t5 = /* @__PURE__ */ jsx(Dialog, {
|
|
19
47
|
...dialogProps,
|
|
20
48
|
className: "outline-none!",
|
|
21
49
|
"aria-label": label,
|
|
22
|
-
children:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
50
|
+
children: t4
|
|
51
|
+
});
|
|
52
|
+
$[9] = dialogProps;
|
|
53
|
+
$[10] = label;
|
|
54
|
+
$[11] = t4;
|
|
55
|
+
$[12] = t5;
|
|
56
|
+
} else t5 = $[12];
|
|
57
|
+
let t6;
|
|
58
|
+
if ($[13] !== isOpen || $[14] !== onOpenChange || $[15] !== t5 || $[16] !== triggerRef) {
|
|
59
|
+
t6 = /* @__PURE__ */ jsx(Popover, {
|
|
60
|
+
triggerRef,
|
|
61
|
+
isOpen,
|
|
62
|
+
placement: "bottom start",
|
|
63
|
+
onOpenChange,
|
|
64
|
+
children: t5
|
|
65
|
+
});
|
|
66
|
+
$[13] = isOpen;
|
|
67
|
+
$[14] = onOpenChange;
|
|
68
|
+
$[15] = t5;
|
|
69
|
+
$[16] = triggerRef;
|
|
70
|
+
$[17] = t6;
|
|
71
|
+
} else t6 = $[17];
|
|
72
|
+
return t6;
|
|
31
73
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
74
|
+
const t1 = !hideSidebar && sidebar;
|
|
75
|
+
let t2;
|
|
76
|
+
if ($[18] !== bottomSheetProps || $[19] !== children || $[20] !== footer || $[21] !== isOpen || $[22] !== label || $[23] !== onOpenChange || $[24] !== t1) {
|
|
77
|
+
t2 = /* @__PURE__ */ jsxs(BottomSheet, {
|
|
78
|
+
sheetMarginBottom: 0,
|
|
79
|
+
isScrollable: true,
|
|
80
|
+
height: "auto",
|
|
81
|
+
isDismissable: true,
|
|
82
|
+
...bottomSheetProps,
|
|
83
|
+
label,
|
|
84
|
+
footer,
|
|
85
|
+
isOpen,
|
|
86
|
+
onOpenChange,
|
|
87
|
+
children: [children, t1]
|
|
88
|
+
});
|
|
89
|
+
$[18] = bottomSheetProps;
|
|
90
|
+
$[19] = children;
|
|
91
|
+
$[20] = footer;
|
|
92
|
+
$[21] = isOpen;
|
|
93
|
+
$[22] = label;
|
|
94
|
+
$[23] = onOpenChange;
|
|
95
|
+
$[24] = t1;
|
|
96
|
+
$[25] = t2;
|
|
97
|
+
} else t2 = $[25];
|
|
98
|
+
return t2;
|
|
44
99
|
};
|
|
45
100
|
//#endregion
|
|
46
101
|
export { DateTimeDialog };
|
|
@@ -1,27 +1,76 @@
|
|
|
1
1
|
import "../../../../config/i18n.js";
|
|
2
2
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { clsx } from "clsx";
|
|
5
6
|
import { useTranslation } from "react-i18next";
|
|
6
7
|
//#region src/components/inputs/DateTime/shared/DateTimeDialogFooter.tsx
|
|
7
|
-
var DateTimeDialogFooter = (
|
|
8
|
+
var DateTimeDialogFooter = (t0) => {
|
|
9
|
+
const $ = c(16);
|
|
10
|
+
const { isValid: t1, isDisabled: t2, onTodayPress, onApply } = t0;
|
|
11
|
+
const isValid = t1 === void 0 ? true : t1;
|
|
12
|
+
const isDisabled = t2 === void 0 ? false : t2;
|
|
8
13
|
const { t } = useTranslation("ui");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
const t3 = onTodayPress ? "justify-between" : "justify-end";
|
|
15
|
+
let t4;
|
|
16
|
+
if ($[0] !== t3) {
|
|
17
|
+
t4 = clsx("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", t3);
|
|
18
|
+
$[0] = t3;
|
|
19
|
+
$[1] = t4;
|
|
20
|
+
} else t4 = $[1];
|
|
21
|
+
let t5;
|
|
22
|
+
if ($[2] !== isDisabled || $[3] !== onTodayPress || $[4] !== t) {
|
|
23
|
+
t5 = onTodayPress && /* @__PURE__ */ jsx(TextButton, {
|
|
12
24
|
type: "button",
|
|
13
25
|
color: "primary",
|
|
14
26
|
isDisabled,
|
|
15
27
|
onPress: onTodayPress,
|
|
16
|
-
children: t(
|
|
17
|
-
})
|
|
28
|
+
children: t(_temp)
|
|
29
|
+
});
|
|
30
|
+
$[2] = isDisabled;
|
|
31
|
+
$[3] = onTodayPress;
|
|
32
|
+
$[4] = t;
|
|
33
|
+
$[5] = t5;
|
|
34
|
+
} else t5 = $[5];
|
|
35
|
+
const t6 = !isValid;
|
|
36
|
+
let t7;
|
|
37
|
+
if ($[6] !== t) {
|
|
38
|
+
t7 = t(_temp2);
|
|
39
|
+
$[6] = t;
|
|
40
|
+
$[7] = t7;
|
|
41
|
+
} else t7 = $[7];
|
|
42
|
+
let t8;
|
|
43
|
+
if ($[8] !== onApply || $[9] !== t6 || $[10] !== t7) {
|
|
44
|
+
t8 = /* @__PURE__ */ jsx(TextButton, {
|
|
18
45
|
type: "button",
|
|
19
46
|
color: "secondary",
|
|
20
47
|
onPress: onApply,
|
|
21
|
-
isDisabled:
|
|
22
|
-
children:
|
|
23
|
-
})
|
|
24
|
-
|
|
48
|
+
isDisabled: t6,
|
|
49
|
+
children: t7
|
|
50
|
+
});
|
|
51
|
+
$[8] = onApply;
|
|
52
|
+
$[9] = t6;
|
|
53
|
+
$[10] = t7;
|
|
54
|
+
$[11] = t8;
|
|
55
|
+
} else t8 = $[11];
|
|
56
|
+
let t9;
|
|
57
|
+
if ($[12] !== t4 || $[13] !== t5 || $[14] !== t8) {
|
|
58
|
+
t9 = /* @__PURE__ */ jsxs("footer", {
|
|
59
|
+
className: t4,
|
|
60
|
+
children: [t5, t8]
|
|
61
|
+
});
|
|
62
|
+
$[12] = t4;
|
|
63
|
+
$[13] = t5;
|
|
64
|
+
$[14] = t8;
|
|
65
|
+
$[15] = t9;
|
|
66
|
+
} else t9 = $[15];
|
|
67
|
+
return t9;
|
|
25
68
|
};
|
|
69
|
+
function _temp($) {
|
|
70
|
+
return $.ui.datePicker.today;
|
|
71
|
+
}
|
|
72
|
+
function _temp2($_0) {
|
|
73
|
+
return $_0.ui.datePicker.save;
|
|
74
|
+
}
|
|
26
75
|
//#endregion
|
|
27
76
|
export { DateTimeDialogFooter };
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { clsx } from "clsx";
|
|
4
5
|
import { useRef } from "react";
|
|
5
6
|
import { ListBox, ListBoxItem } from "react-aria-components";
|
|
6
7
|
import { useDateFormatter } from "@react-aria/i18n";
|
|
7
8
|
//#region src/components/inputs/DateTime/shared/MonthPicker.tsx
|
|
8
|
-
var MonthPicker = (
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
var MonthPicker = (t0) => {
|
|
10
|
+
const $ = c(15);
|
|
11
|
+
const { state, onSelectionChange, onDateChange, onCommit, selectedDate } = t0;
|
|
12
|
+
let t1;
|
|
13
|
+
if ($[0] !== state.timeZone) {
|
|
14
|
+
t1 = {
|
|
15
|
+
month: "long",
|
|
16
|
+
timeZone: state.timeZone
|
|
17
|
+
};
|
|
18
|
+
$[0] = state.timeZone;
|
|
19
|
+
$[1] = t1;
|
|
20
|
+
} else t1 = $[1];
|
|
21
|
+
const formatter = useDateFormatter(t1);
|
|
13
22
|
const numMonths = state.focusedDate.calendar.getMonthsInYear(state.focusedDate);
|
|
14
23
|
const getMonths = () => {
|
|
15
24
|
const months = [];
|
|
@@ -24,67 +33,103 @@ var MonthPicker = ({ state, onSelectionChange, onDateChange, onCommit, selectedD
|
|
|
24
33
|
if (state.maxValue && state.focusedDate.set({ month }) > state.maxValue) return true;
|
|
25
34
|
return false;
|
|
26
35
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
let t2;
|
|
37
|
+
if ($[2] !== selectedDate) {
|
|
38
|
+
const getSelectedMonth = () => {
|
|
39
|
+
if (!selectedDate) return null;
|
|
40
|
+
return selectedDate.month;
|
|
41
|
+
};
|
|
42
|
+
t2 = getSelectedMonth();
|
|
43
|
+
$[2] = selectedDate;
|
|
44
|
+
$[3] = t2;
|
|
45
|
+
} else t2 = $[3];
|
|
46
|
+
const selectedMonth = t2;
|
|
32
47
|
const lastPressedMonthRef = useRef(null);
|
|
33
|
-
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const selectedKey = [...key][0];
|
|
48
|
+
let listBoxSelectionProps;
|
|
49
|
+
if ($[4] !== selectedMonth) {
|
|
50
|
+
listBoxSelectionProps = {};
|
|
51
|
+
if (selectedMonth !== null) listBoxSelectionProps.selectedKeys = [selectedMonth];
|
|
52
|
+
$[4] = selectedMonth;
|
|
53
|
+
$[5] = listBoxSelectionProps;
|
|
54
|
+
} else listBoxSelectionProps = $[5];
|
|
55
|
+
const parseMonthFromKey = _temp;
|
|
56
|
+
const T0 = ListBox;
|
|
57
|
+
const t3 = true;
|
|
58
|
+
const t4 = "Month";
|
|
59
|
+
const t5 = "single";
|
|
60
|
+
const t6 = "grid";
|
|
61
|
+
let t7;
|
|
62
|
+
if ($[6] !== onDateChange || $[7] !== onSelectionChange || $[8] !== state) {
|
|
63
|
+
t7 = (key_0) => {
|
|
64
|
+
if (key_0 === "all") return;
|
|
65
|
+
const selectedKey = [...key_0][0];
|
|
52
66
|
const selectedMonthValue = parseMonthFromKey(selectedKey);
|
|
53
67
|
if (selectedMonthValue !== null) {
|
|
54
68
|
const nextSelectedDate = state.focusedDate.set({ month: selectedMonthValue });
|
|
55
69
|
state.setFocusedDate(nextSelectedDate);
|
|
56
70
|
onDateChange?.(nextSelectedDate);
|
|
57
71
|
}
|
|
58
|
-
onSelectionChange(
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
72
|
+
onSelectionChange(key_0);
|
|
73
|
+
};
|
|
74
|
+
$[6] = onDateChange;
|
|
75
|
+
$[7] = onSelectionChange;
|
|
76
|
+
$[8] = state;
|
|
77
|
+
$[9] = t7;
|
|
78
|
+
} else t7 = $[9];
|
|
79
|
+
const t8 = "grid size-full min-h-72 grid-cols-3 grid-rows-4 gap-2 p-3 md:w-80";
|
|
80
|
+
const t9 = getMonths().map((month_0, index) => {
|
|
81
|
+
const monthNumber = index + 1;
|
|
82
|
+
const isDisabled = isMonthDisabled(monthNumber);
|
|
83
|
+
return /* @__PURE__ */ jsx(ListBoxItem, {
|
|
84
|
+
id: monthNumber,
|
|
85
|
+
textValue: month_0,
|
|
86
|
+
isDisabled,
|
|
87
|
+
onPress: () => {
|
|
88
|
+
const isSecondConsecutivePress = lastPressedMonthRef.current === monthNumber;
|
|
89
|
+
lastPressedMonthRef.current = monthNumber;
|
|
90
|
+
const nextSelectedDate_0 = state.focusedDate.set({ month: monthNumber });
|
|
91
|
+
state.setFocusedDate(nextSelectedDate_0);
|
|
92
|
+
onDateChange?.(nextSelectedDate_0);
|
|
93
|
+
if (!isSecondConsecutivePress) return;
|
|
94
|
+
if (selectedMonth === null) return;
|
|
95
|
+
if (monthNumber !== selectedMonth) return;
|
|
96
|
+
onCommit?.();
|
|
97
|
+
},
|
|
98
|
+
className: clsx("flex items-center justify-center text-interactive-text-secondary-idle", "rounded-button-rounding-m border border-elevation-outline-default-1 border-solid bg-elevation-fill-default-1", "hover:text-interactive-text-secondary-hover", "selected:border-interactive-contained-primary-idle selected:bg-interactive-contained-primary-idle selected:text-interactive-text-secondary-idle-inverted", "focus:outline-none focus-visible:outline-1 focus-visible:outline-interactive-contained-primary-focus focus-visible:outline-offset-1", isDisabled ? "cursor-default opacity-50" : "cursor-pointer"),
|
|
99
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
100
|
+
as: "span",
|
|
101
|
+
size: "label-2",
|
|
102
|
+
children: month_0
|
|
103
|
+
})
|
|
104
|
+
}, monthNumber);
|
|
87
105
|
});
|
|
106
|
+
let t10;
|
|
107
|
+
if ($[10] !== T0 || $[11] !== listBoxSelectionProps || $[12] !== t7 || $[13] !== t9) {
|
|
108
|
+
t10 = /* @__PURE__ */ jsx(T0, {
|
|
109
|
+
autoFocus: t3,
|
|
110
|
+
"aria-label": t4,
|
|
111
|
+
selectionMode: t5,
|
|
112
|
+
layout: t6,
|
|
113
|
+
...listBoxSelectionProps,
|
|
114
|
+
onSelectionChange: t7,
|
|
115
|
+
className: t8,
|
|
116
|
+
children: t9
|
|
117
|
+
});
|
|
118
|
+
$[10] = T0;
|
|
119
|
+
$[11] = listBoxSelectionProps;
|
|
120
|
+
$[12] = t7;
|
|
121
|
+
$[13] = t9;
|
|
122
|
+
$[14] = t10;
|
|
123
|
+
} else t10 = $[14];
|
|
124
|
+
return t10;
|
|
88
125
|
};
|
|
126
|
+
function _temp(key) {
|
|
127
|
+
if (typeof key === "number") return key;
|
|
128
|
+
if (typeof key === "string") {
|
|
129
|
+
const parsedMonth = Number.parseInt(key, 10);
|
|
130
|
+
if (!Number.isNaN(parsedMonth)) return parsedMonth;
|
|
131
|
+
}
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
89
134
|
//#endregion
|
|
90
135
|
export { MonthPicker };
|