@tecsinapse/cortex-react 1.13.1-beta.2 → 1.13.1-beta.3
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/cjs/components/Accordion/Content.js +5 -4
- package/dist/cjs/components/Accordion/Face.js +6 -5
- package/dist/cjs/components/Accordion/Root.js +15 -12
- package/dist/cjs/components/Accordion/Trigger.js +49 -47
- package/dist/cjs/components/Avatar.js +14 -13
- package/dist/cjs/components/Badge.js +9 -24
- package/dist/cjs/components/Breadcrumbs/BreadcrumbItem.js +21 -17
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.js +6 -6
- package/dist/cjs/components/Button.js +5 -4
- package/dist/cjs/components/Calendar/Calendar.js +13 -9
- package/dist/cjs/components/Calendar/CalendarCell.js +14 -13
- package/dist/cjs/components/Calendar/CalendarGrid.js +9 -5
- package/dist/cjs/components/Calendar/CalendarGridBodyRows.js +4 -4
- package/dist/cjs/components/Calendar/CalendarGridHeaderRow.js +2 -2
- package/dist/cjs/components/Calendar/CalendarHeader.js +27 -25
- package/dist/cjs/components/Calendar/RangeCalendar.js +16 -13
- package/dist/cjs/components/Card.js +2 -1
- package/dist/cjs/components/Carousel/Carousel.js +29 -23
- package/dist/cjs/components/Carousel/CarouselItem.js +46 -40
- package/dist/cjs/components/Checkbox.js +2 -1
- package/dist/cjs/components/ColorPicker.js +9 -5
- package/dist/cjs/components/Content.js +2 -1
- package/dist/cjs/components/DatePicker/DateField.js +11 -10
- package/dist/cjs/components/DatePicker/DatePickerInput.js +40 -36
- package/dist/cjs/components/DatePicker/DatePickerInputBase.js +34 -29
- package/dist/cjs/components/DatePicker/DateRangePickerInput.js +53 -45
- package/dist/cjs/components/DatePicker/DateSegment.js +5 -4
- package/dist/cjs/components/Divider.js +2 -2
- package/dist/cjs/components/Drawer.js +23 -20
- package/dist/cjs/components/GroupButton.js +24 -24
- package/dist/cjs/components/Hint.js +2 -1
- package/dist/cjs/components/Input/Box.js +23 -19
- package/dist/cjs/components/Input/Face.js +5 -4
- package/dist/cjs/components/Input/Left.js +2 -1
- package/dist/cjs/components/Input/Mask.js +2 -1
- package/dist/cjs/components/Input/Right.js +2 -1
- package/dist/cjs/components/Input/Root.js +2 -1
- package/dist/cjs/components/Input/Search.js +5 -1
- package/dist/cjs/components/Input/index.js +1 -0
- package/dist/cjs/components/Input/masks.js +1 -0
- package/dist/cjs/components/Kanban.js +8 -8
- package/dist/cjs/components/Loading.js +21 -19
- package/dist/cjs/components/Masonry.js +9 -8
- package/dist/cjs/components/Menubar/Categories.js +3 -2
- package/dist/cjs/components/Menubar/Category.js +6 -2
- package/dist/cjs/components/Menubar/Dropdown.js +6 -5
- package/dist/cjs/components/Menubar/DropdownRoot.js +29 -26
- package/dist/cjs/components/Menubar/Header.js +9 -6
- package/dist/cjs/components/Menubar/IconControlSubItem.js +5 -5
- package/dist/cjs/components/Menubar/Item.js +24 -18
- package/dist/cjs/components/Menubar/ItemLink.js +6 -6
- package/dist/cjs/components/Menubar/Left.js +5 -5
- package/dist/cjs/components/Menubar/MostUsed.js +7 -3
- package/dist/cjs/components/Menubar/MostUsedItem.js +9 -7
- package/dist/cjs/components/Menubar/MostUsedList.js +7 -6
- package/dist/cjs/components/Menubar/Right.js +5 -5
- package/dist/cjs/components/Menubar/Root.js +3 -2
- package/dist/cjs/components/Menubar/Search.js +3 -2
- package/dist/cjs/components/Menubar/SubItem.js +7 -6
- package/dist/cjs/components/Modal.js +12 -8
- package/dist/cjs/components/Popover/Content.js +7 -7
- package/dist/cjs/components/Popover/Provider.js +3 -2
- package/dist/cjs/components/Popover/Root.js +2 -2
- package/dist/cjs/components/ProgressBar/Progress.js +3 -3
- package/dist/cjs/components/ProgressBar/ProgressBar.js +2 -2
- package/dist/cjs/components/RadioButton.js +8 -5
- package/dist/cjs/components/ScrollableDigitSelector.js +14 -13
- package/dist/cjs/components/Select/Content.js +2 -1
- package/dist/cjs/components/Select/CustomMultiOption.js +17 -15
- package/dist/cjs/components/Select/CustomOption.js +5 -4
- package/dist/cjs/components/Select/GroupedOptions.js +13 -9
- package/dist/cjs/components/Select/MultiCheckAllOptions.js +13 -9
- package/dist/cjs/components/Select/MultiGroupedOptions.js +19 -13
- package/dist/cjs/components/Select/MultiOption.js +17 -15
- package/dist/cjs/components/Select/MultiOptions.js +12 -8
- package/dist/cjs/components/Select/Option.js +5 -4
- package/dist/cjs/components/Select/Options.js +5 -4
- package/dist/cjs/components/Select/Popover.js +6 -5
- package/dist/cjs/components/Select/Root.js +16 -15
- package/dist/cjs/components/Select/SkeletonOptions.js +2 -2
- package/dist/cjs/components/Select/Trigger.js +34 -28
- package/dist/cjs/components/Skeleton.js +5 -5
- package/dist/cjs/components/Snackbar/BaseSnackbar.js +2 -1
- package/dist/cjs/components/Snackbar/DefaultSnack.js +20 -16
- package/dist/cjs/components/Stepper/Node.js +5 -2
- package/dist/cjs/components/Stepper/Root.js +5 -4
- package/dist/cjs/components/Table.js +12 -9
- package/dist/cjs/components/Tag.js +17 -14
- package/dist/cjs/components/TextArea/Box.js +30 -26
- package/dist/cjs/components/TextArea/Face.js +5 -4
- package/dist/cjs/components/TextArea/Left.js +2 -1
- package/dist/cjs/components/TextArea/Right.js +2 -1
- package/dist/cjs/components/TextArea/Root.js +2 -1
- package/dist/cjs/components/TimePicker/TimeField.js +5 -4
- package/dist/cjs/components/TimePicker/TimeFieldInput.js +51 -48
- package/dist/cjs/components/TimePicker/TimePickerInput.js +35 -31
- package/dist/cjs/components/TimePicker/TimePickerSelector.js +78 -58
- package/dist/cjs/components/Toggle.js +17 -13
- package/dist/cjs/components/Tooltip.js +25 -19
- package/dist/cjs/components/Uploader/Dropzone.js +15 -6
- package/dist/cjs/components/Uploader/Files.js +8 -2
- package/dist/cjs/components/Uploader/Modal.js +20 -14
- package/dist/cjs/components/Uploader/Root.js +20 -17
- package/dist/cjs/components/Uploader/Upload.js +41 -26
- package/dist/cjs/hooks/useCalendar.js +1 -0
- package/dist/cjs/hooks/useDatePickerInput.js +8 -3
- package/dist/cjs/hooks/useDateRangePickerInput.js +1 -0
- package/dist/cjs/hooks/useNumberMask.js +1 -0
- package/dist/cjs/hooks/useRangeCalendar.js +1 -0
- package/dist/cjs/provider/CategoriesContext.js +2 -1
- package/dist/cjs/provider/MenubarProvider.js +2 -1
- package/dist/cjs/provider/SnackbarProvider.js +5 -1
- package/dist/cjs/service/SnackbarSonner.js +2 -2
- package/dist/cjs/utils/react.js +2 -1
- package/dist/esm/components/Accordion/Content.js +6 -5
- package/dist/esm/components/Accordion/Face.js +7 -6
- package/dist/esm/components/Accordion/Root.js +15 -12
- package/dist/esm/components/Accordion/Trigger.js +49 -47
- package/dist/esm/components/Avatar.js +17 -16
- package/dist/esm/components/Badge.js +9 -6
- package/dist/esm/components/Breadcrumbs/BreadcrumbItem.js +21 -17
- package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +6 -6
- package/dist/esm/components/Button.js +6 -5
- package/dist/esm/components/Calendar/Calendar.js +13 -9
- package/dist/esm/components/Calendar/CalendarCell.js +14 -13
- package/dist/esm/components/Calendar/CalendarGrid.js +9 -5
- package/dist/esm/components/Calendar/CalendarGridBodyRows.js +4 -4
- package/dist/esm/components/Calendar/CalendarGridHeaderRow.js +2 -2
- package/dist/esm/components/Calendar/CalendarHeader.js +27 -25
- package/dist/esm/components/Calendar/RangeCalendar.js +16 -13
- package/dist/esm/components/Card.js +3 -2
- package/dist/esm/components/Carousel/Carousel.js +29 -23
- package/dist/esm/components/Carousel/CarouselItem.js +46 -40
- package/dist/esm/components/Checkbox.js +3 -2
- package/dist/esm/components/ColorPicker.js +10 -6
- package/dist/esm/components/Content.js +3 -2
- package/dist/esm/components/DatePicker/DateField.js +13 -12
- package/dist/esm/components/DatePicker/DatePickerInput.js +40 -36
- package/dist/esm/components/DatePicker/DatePickerInputBase.js +35 -30
- package/dist/esm/components/DatePicker/DateRangePickerInput.js +53 -45
- package/dist/esm/components/DatePicker/DateSegment.js +7 -6
- package/dist/esm/components/Divider.js +2 -2
- package/dist/esm/components/Drawer.js +23 -20
- package/dist/esm/components/GroupButton.js +24 -24
- package/dist/esm/components/Hint.js +3 -2
- package/dist/esm/components/Input/Box.js +25 -21
- package/dist/esm/components/Input/Face.js +10 -9
- package/dist/esm/components/Input/Left.js +4 -3
- package/dist/esm/components/Input/Mask.js +4 -3
- package/dist/esm/components/Input/Right.js +4 -3
- package/dist/esm/components/Input/Root.js +4 -3
- package/dist/esm/components/Input/Search.js +7 -3
- package/dist/esm/components/Input/index.js +1 -0
- package/dist/esm/components/Input/masks.js +1 -0
- package/dist/esm/components/Kanban.js +8 -8
- package/dist/esm/components/Loading.js +21 -19
- package/dist/esm/components/Masonry.js +12 -11
- package/dist/esm/components/Menubar/Categories.js +3 -2
- package/dist/esm/components/Menubar/Category.js +6 -2
- package/dist/esm/components/Menubar/Dropdown.js +6 -5
- package/dist/esm/components/Menubar/DropdownRoot.js +29 -26
- package/dist/esm/components/Menubar/Header.js +9 -6
- package/dist/esm/components/Menubar/IconControlSubItem.js +5 -5
- package/dist/esm/components/Menubar/Item.js +25 -19
- package/dist/esm/components/Menubar/ItemLink.js +6 -6
- package/dist/esm/components/Menubar/Left.js +5 -5
- package/dist/esm/components/Menubar/MostUsed.js +7 -3
- package/dist/esm/components/Menubar/MostUsedItem.js +9 -7
- package/dist/esm/components/Menubar/MostUsedList.js +8 -7
- package/dist/esm/components/Menubar/Right.js +5 -5
- package/dist/esm/components/Menubar/Root.js +3 -2
- package/dist/esm/components/Menubar/Search.js +3 -2
- package/dist/esm/components/Menubar/SubItem.js +7 -6
- package/dist/esm/components/Modal.js +13 -9
- package/dist/esm/components/Popover/Content.js +7 -7
- package/dist/esm/components/Popover/Provider.js +3 -2
- package/dist/esm/components/Popover/Root.js +2 -2
- package/dist/esm/components/ProgressBar/Progress.js +3 -3
- package/dist/esm/components/ProgressBar/ProgressBar.js +2 -2
- package/dist/esm/components/RadioButton.js +9 -6
- package/dist/esm/components/ScrollableDigitSelector.js +15 -14
- package/dist/esm/components/Select/Content.js +3 -2
- package/dist/esm/components/Select/CustomMultiOption.js +17 -15
- package/dist/esm/components/Select/CustomOption.js +6 -5
- package/dist/esm/components/Select/GroupedOptions.js +14 -10
- package/dist/esm/components/Select/MultiCheckAllOptions.js +14 -10
- package/dist/esm/components/Select/MultiGroupedOptions.js +20 -14
- package/dist/esm/components/Select/MultiOption.js +17 -15
- package/dist/esm/components/Select/MultiOptions.js +13 -9
- package/dist/esm/components/Select/Option.js +6 -5
- package/dist/esm/components/Select/Options.js +6 -5
- package/dist/esm/components/Select/Popover.js +7 -6
- package/dist/esm/components/Select/Root.js +17 -16
- package/dist/esm/components/Select/SkeletonOptions.js +2 -2
- package/dist/esm/components/Select/Trigger.js +35 -29
- package/dist/esm/components/Skeleton.js +5 -5
- package/dist/esm/components/Snackbar/BaseSnackbar.js +3 -2
- package/dist/esm/components/Snackbar/DefaultSnack.js +20 -16
- package/dist/esm/components/Stepper/Node.js +5 -2
- package/dist/esm/components/Stepper/Root.js +11 -10
- package/dist/esm/components/Table.js +12 -9
- package/dist/esm/components/Tag.js +18 -15
- package/dist/esm/components/TextArea/Box.js +32 -28
- package/dist/esm/components/TextArea/Face.js +8 -7
- package/dist/esm/components/TextArea/Left.js +4 -3
- package/dist/esm/components/TextArea/Right.js +4 -3
- package/dist/esm/components/TextArea/Root.js +4 -3
- package/dist/esm/components/TextArea/utils.js +3 -3
- package/dist/esm/components/TimePicker/TimeField.js +7 -6
- package/dist/esm/components/TimePicker/TimeFieldInput.js +52 -49
- package/dist/esm/components/TimePicker/TimePickerInput.js +35 -31
- package/dist/esm/components/TimePicker/TimePickerSelector.js +79 -59
- package/dist/esm/components/Toggle.js +18 -14
- package/dist/esm/components/Tooltip.js +26 -20
- package/dist/esm/components/Uploader/Dropzone.js +15 -6
- package/dist/esm/components/Uploader/Files.js +8 -2
- package/dist/esm/components/Uploader/Modal.js +20 -14
- package/dist/esm/components/Uploader/Root.js +20 -17
- package/dist/esm/components/Uploader/Upload.js +41 -26
- package/dist/esm/hooks/useCalendar.js +1 -0
- package/dist/esm/hooks/useDatePickerInput.js +8 -3
- package/dist/esm/hooks/useDateRangePickerInput.js +1 -0
- package/dist/esm/hooks/useNumberMask.js +1 -0
- package/dist/esm/hooks/useRangeCalendar.js +1 -0
- package/dist/esm/provider/CategoriesContext.js +3 -2
- package/dist/esm/provider/MenubarProvider.js +4 -3
- package/dist/esm/provider/SnackbarProvider.js +6 -2
- package/dist/esm/service/SnackbarSonner.js +2 -2
- package/dist/esm/utils/react.js +3 -2
- package/dist/types/components/Accordion/Content.d.ts +1 -2
- package/dist/types/components/Accordion/Face.d.ts +1 -2
- package/dist/types/components/Accordion/Root.d.ts +1 -2
- package/dist/types/components/Accordion/Trigger.d.ts +1 -2
- package/dist/types/components/Accordion/index.d.ts +4 -4
- package/dist/types/components/Avatar.d.ts +2 -2
- package/dist/types/components/Breadcrumbs/BreadcrumbItem.d.ts +2 -2
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/types/components/Calendar/Calendar.d.ts +1 -2
- package/dist/types/components/Calendar/CalendarCell.d.ts +1 -2
- package/dist/types/components/Calendar/CalendarGrid.d.ts +1 -2
- package/dist/types/components/Calendar/CalendarGridBodyRows.d.ts +1 -2
- package/dist/types/components/Calendar/CalendarGridHeaderRow.d.ts +1 -2
- package/dist/types/components/Calendar/CalendarHeader.d.ts +1 -2
- package/dist/types/components/Calendar/RangeCalendar.d.ts +1 -2
- package/dist/types/components/Carousel/Carousel.d.ts +1 -2
- package/dist/types/components/Carousel/CarouselItem.d.ts +1 -2
- package/dist/types/components/ColorPicker.d.ts +2 -2
- package/dist/types/components/Content.d.ts +2 -2
- package/dist/types/components/DatePicker/DateField.d.ts +1 -2
- package/dist/types/components/DatePicker/DatePickerInput.d.ts +1 -2
- package/dist/types/components/DatePicker/DatePickerInputBase.d.ts +1 -1
- package/dist/types/components/DatePicker/DateRangePickerInput.d.ts +1 -2
- package/dist/types/components/DatePicker/DateSegment.d.ts +1 -2
- package/dist/types/components/Divider.d.ts +2 -2
- package/dist/types/components/Drawer.d.ts +1 -1
- package/dist/types/components/GroupButton.d.ts +2 -2
- package/dist/types/components/Kanban.d.ts +4 -4
- package/dist/types/components/Loading.d.ts +1 -2
- package/dist/types/components/Menubar/Categories.d.ts +1 -2
- package/dist/types/components/Menubar/Category.d.ts +1 -2
- package/dist/types/components/Menubar/Dropdown.d.ts +1 -2
- package/dist/types/components/Menubar/DropdownRoot.d.ts +1 -2
- package/dist/types/components/Menubar/Header.d.ts +1 -2
- package/dist/types/components/Menubar/IconControlSubItem.d.ts +1 -2
- package/dist/types/components/Menubar/Item.d.ts +1 -2
- package/dist/types/components/Menubar/ItemLink.d.ts +1 -2
- package/dist/types/components/Menubar/Left.d.ts +1 -2
- package/dist/types/components/Menubar/MostUsed.d.ts +1 -2
- package/dist/types/components/Menubar/MostUsedItem.d.ts +1 -2
- package/dist/types/components/Menubar/MostUsedList.d.ts +1 -2
- package/dist/types/components/Menubar/Right.d.ts +1 -2
- package/dist/types/components/Menubar/Root.d.ts +1 -2
- package/dist/types/components/Menubar/Search.d.ts +1 -2
- package/dist/types/components/Menubar/SubItem.d.ts +1 -2
- package/dist/types/components/Menubar/index.d.ts +13 -13
- package/dist/types/components/Popover/Content.d.ts +1 -1
- package/dist/types/components/Popover/Provider.d.ts +2 -2
- package/dist/types/components/Popover/Root.d.ts +1 -1
- package/dist/types/components/Popover/index.d.ts +3 -3
- package/dist/types/components/ProgressBar/Progress.d.ts +1 -2
- package/dist/types/components/ProgressBar/ProgressBar.d.ts +1 -2
- package/dist/types/components/ScrollableDigitSelector.d.ts +1 -2
- package/dist/types/components/Select/Content.d.ts +1 -2
- package/dist/types/components/Select/CustomMultiOption.d.ts +1 -2
- package/dist/types/components/Select/CustomOption.d.ts +1 -2
- package/dist/types/components/Select/GroupedOptions.d.ts +1 -2
- package/dist/types/components/Select/MultiCheckAllOptions.d.ts +1 -2
- package/dist/types/components/Select/MultiGroupedOptions.d.ts +1 -2
- package/dist/types/components/Select/MultiOption.d.ts +1 -2
- package/dist/types/components/Select/MultiOptions.d.ts +1 -2
- package/dist/types/components/Select/Option.d.ts +1 -2
- package/dist/types/components/Select/Options.d.ts +1 -2
- package/dist/types/components/Select/Popover.d.ts +1 -2
- package/dist/types/components/Select/Root.d.ts +1 -2
- package/dist/types/components/Select/SkeletonOptions.d.ts +1 -2
- package/dist/types/components/Select/Trigger.d.ts +1 -2
- package/dist/types/components/Select/index.d.ts +12 -12
- package/dist/types/components/Skeleton.d.ts +1 -1
- package/dist/types/components/Snackbar/DefaultSnack.d.ts +1 -2
- package/dist/types/components/Stepper/Node.d.ts +1 -1
- package/dist/types/components/Stepper/Root.d.ts +1 -1
- package/dist/types/components/Stepper/index.d.ts +2 -2
- package/dist/types/components/Table.d.ts +8 -8
- package/dist/types/components/Tag.d.ts +2 -2
- package/dist/types/components/TimePicker/TimeField.d.ts +1 -2
- package/dist/types/components/TimePicker/TimeFieldInput.d.ts +1 -2
- package/dist/types/components/TimePicker/TimePickerInput.d.ts +1 -2
- package/dist/types/components/TimePicker/TimePickerSelector.d.ts +1 -2
- package/dist/types/components/Uploader/Dropzone.d.ts +1 -2
- package/dist/types/components/Uploader/Files.d.ts +1 -2
- package/dist/types/components/Uploader/Root.d.ts +1 -2
- package/dist/types/components/Uploader/Upload.d.ts +1 -2
- package/dist/types/components/Uploader/index.d.ts +3 -3
- package/dist/types/provider/CategoriesContext.d.ts +2 -2
- package/dist/types/provider/MenubarProvider.d.ts +2 -2
- package/dist/types/provider/SnackbarProvider.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { Time } from '@internationalized/date';
|
|
2
|
-
import
|
|
3
|
+
import { useMemo } from 'react';
|
|
3
4
|
import { ScrollableDigitSelector } from '../ScrollableDigitSelector.js';
|
|
4
5
|
import clsx from 'clsx';
|
|
5
6
|
import { Button } from '../Button.js';
|
|
@@ -50,67 +51,86 @@ const TimePickerSelector = ({
|
|
|
50
51
|
if (value === void 0) return 0;
|
|
51
52
|
return hourCycle === 12 ? value.hour === 0 ? 12 : value.hour > 12 ? value.hour - 12 : value.hour : value.hour;
|
|
52
53
|
}, [value, hourCycle]);
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
className: "p-micro",
|
|
57
|
-
variants: {
|
|
58
|
-
size: "circle",
|
|
59
|
-
variant: "outline"
|
|
60
|
-
},
|
|
61
|
-
onClick: onPressOkButton
|
|
62
|
-
},
|
|
63
|
-
/* @__PURE__ */ React__default.createElement(MdClose, null)
|
|
64
|
-
)), /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-row gap-x-deca max-h-[300px] overflow-hidden" }, /* @__PURE__ */ React__default.createElement("div", { className: "min-w-7 flex flex-col gap-y-micro p-micro" }, /* @__PURE__ */ React__default.createElement("span", { className: "text-base font-bold text-center" }, hourLabel), /* @__PURE__ */ React__default.createElement(
|
|
65
|
-
ScrollableDigitSelector,
|
|
66
|
-
{
|
|
67
|
-
value: displayHour,
|
|
68
|
-
onChange: handleHourChange,
|
|
69
|
-
min: hourCycle === 12 ? 1 : 0,
|
|
70
|
-
max: hourCycle === 12 ? 12 : 23
|
|
71
|
-
}
|
|
72
|
-
)), /* @__PURE__ */ React__default.createElement("div", { className: "min-w-7 flex flex-col gap-y-micro p-micro" }, /* @__PURE__ */ React__default.createElement("span", { className: "text-base font-bold text-center" }, minuteLabel), /* @__PURE__ */ React__default.createElement(
|
|
73
|
-
ScrollableDigitSelector,
|
|
74
|
-
{
|
|
75
|
-
value: value?.minute ?? 0,
|
|
76
|
-
onChange: handleMinuteChange,
|
|
77
|
-
min: 0,
|
|
78
|
-
max: 59,
|
|
79
|
-
step: minuteInterval
|
|
80
|
-
}
|
|
81
|
-
)), hourCycle === 12 && /* @__PURE__ */ React__default.createElement("div", { className: "min-w-7 flex flex-col gap-y-micro p-micro" }, /* @__PURE__ */ React__default.createElement("span", { className: "text-base font-bold text-center" }, dayPeriodLabel), /* @__PURE__ */ React__default.createElement("div", { className: "flex flex-col gap-y-micro p-micro overflow-auto" }, /* @__PURE__ */ React__default.createElement(
|
|
82
|
-
"div",
|
|
83
|
-
{
|
|
84
|
-
onClick: () => handlePeriodChange(false),
|
|
85
|
-
className: "flex justify-center"
|
|
86
|
-
},
|
|
87
|
-
/* @__PURE__ */ React__default.createElement(
|
|
88
|
-
"span",
|
|
54
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
55
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(
|
|
56
|
+
Button,
|
|
89
57
|
{
|
|
90
|
-
className:
|
|
91
|
-
|
|
92
|
-
|
|
58
|
+
className: "p-micro",
|
|
59
|
+
variants: {
|
|
60
|
+
size: "circle",
|
|
61
|
+
variant: "outline"
|
|
62
|
+
},
|
|
63
|
+
onClick: onPressOkButton,
|
|
64
|
+
children: /* @__PURE__ */ jsx(MdClose, {})
|
|
65
|
+
}
|
|
66
|
+
) }),
|
|
67
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-x-deca max-h-[300px] overflow-hidden", children: [
|
|
68
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-7 flex flex-col gap-y-micro p-micro", children: [
|
|
69
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-bold text-center", children: hourLabel }),
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
ScrollableDigitSelector,
|
|
72
|
+
{
|
|
73
|
+
value: displayHour,
|
|
74
|
+
onChange: handleHourChange,
|
|
75
|
+
min: hourCycle === 12 ? 1 : 0,
|
|
76
|
+
max: hourCycle === 12 ? 12 : 23
|
|
77
|
+
}
|
|
93
78
|
)
|
|
94
|
-
},
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
className: clsx(
|
|
107
|
-
dayPeriodStyle,
|
|
108
|
-
isPM && "bg-primary-medium text-white"
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-7 flex flex-col gap-y-micro p-micro", children: [
|
|
81
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-bold text-center", children: minuteLabel }),
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
ScrollableDigitSelector,
|
|
84
|
+
{
|
|
85
|
+
value: value?.minute ?? 0,
|
|
86
|
+
onChange: handleMinuteChange,
|
|
87
|
+
min: 0,
|
|
88
|
+
max: 59,
|
|
89
|
+
step: minuteInterval
|
|
90
|
+
}
|
|
109
91
|
)
|
|
110
|
-
},
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
92
|
+
] }),
|
|
93
|
+
hourCycle === 12 && /* @__PURE__ */ jsxs("div", { className: "min-w-7 flex flex-col gap-y-micro p-micro", children: [
|
|
94
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-bold text-center", children: dayPeriodLabel }),
|
|
95
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-micro p-micro overflow-auto", children: [
|
|
96
|
+
/* @__PURE__ */ jsx(
|
|
97
|
+
"div",
|
|
98
|
+
{
|
|
99
|
+
onClick: () => handlePeriodChange(false),
|
|
100
|
+
className: "flex justify-center",
|
|
101
|
+
children: /* @__PURE__ */ jsx(
|
|
102
|
+
"span",
|
|
103
|
+
{
|
|
104
|
+
className: clsx(
|
|
105
|
+
dayPeriodStyle,
|
|
106
|
+
!isPM && "bg-primary-medium text-white"
|
|
107
|
+
),
|
|
108
|
+
children: "AM"
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ jsx(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
onClick: () => handlePeriodChange(true),
|
|
117
|
+
className: "flex justify-center",
|
|
118
|
+
children: /* @__PURE__ */ jsx(
|
|
119
|
+
"span",
|
|
120
|
+
{
|
|
121
|
+
className: clsx(
|
|
122
|
+
dayPeriodStyle,
|
|
123
|
+
isPM && "bg-primary-medium text-white"
|
|
124
|
+
),
|
|
125
|
+
children: "PM"
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
] })
|
|
131
|
+
] })
|
|
132
|
+
] })
|
|
133
|
+
] });
|
|
114
134
|
};
|
|
115
135
|
|
|
116
136
|
export { TimePickerSelector };
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
2
|
import { styleLabelElement, styleInputElement, toggle } from '@tecsinapse/cortex-core';
|
|
2
|
-
import
|
|
3
|
+
import { forwardRef } from 'react';
|
|
3
4
|
|
|
4
5
|
const Toggle = forwardRef((props, ref) => {
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
6
7
|
"div",
|
|
7
8
|
{
|
|
8
9
|
className: "flex flex-row items-center gap-x-centi",
|
|
9
|
-
"data-testid": "toggle-div"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
"data-testid": "toggle-div",
|
|
11
|
+
children: /* @__PURE__ */ jsxs("label", { className: styleLabelElement(), children: [
|
|
12
|
+
/* @__PURE__ */ jsx(
|
|
13
|
+
"input",
|
|
14
|
+
{
|
|
15
|
+
type: "checkbox",
|
|
16
|
+
className: styleInputElement(),
|
|
17
|
+
ref,
|
|
18
|
+
"data-testid": "toggle-input",
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
/* @__PURE__ */ jsx("div", { className: toggle() })
|
|
23
|
+
] })
|
|
24
|
+
}
|
|
21
25
|
);
|
|
22
26
|
});
|
|
23
27
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { FloatingArrow } from '@floating-ui/react';
|
|
2
|
-
import
|
|
3
|
+
import { forwardRef, useRef } from 'react';
|
|
3
4
|
import '@internationalized/date';
|
|
4
5
|
import 'react-aria';
|
|
5
6
|
import 'react-stately';
|
|
@@ -34,25 +35,30 @@ const Tooltip = forwardRef(
|
|
|
34
35
|
floatingStyles,
|
|
35
36
|
getFloatingProps
|
|
36
37
|
} = useFloatingElement({ placement, arrowRef, trigger, delay });
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
39
|
+
cloneWithProps(children, triggerProps),
|
|
40
|
+
isOpen ? /* @__PURE__ */ jsxs(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
ref: ref || refs.setFloating,
|
|
44
|
+
className: "bg-black text-white p-2 rounded z-50 shadow-md text-justify",
|
|
45
|
+
style: {
|
|
46
|
+
position: strategy,
|
|
47
|
+
top: y ?? 0,
|
|
48
|
+
left: x ?? 0,
|
|
49
|
+
width,
|
|
50
|
+
height,
|
|
51
|
+
...style,
|
|
52
|
+
...floatingStyles
|
|
53
|
+
},
|
|
54
|
+
...getFloatingProps(),
|
|
55
|
+
children: [
|
|
56
|
+
text,
|
|
57
|
+
/* @__PURE__ */ jsx(FloatingArrow, { ref: arrowRef, context, fill: "black" })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
) : null
|
|
61
|
+
] });
|
|
56
62
|
}
|
|
57
63
|
);
|
|
58
64
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { HiOutlineCloudArrowUp } from 'react-icons/hi2';
|
|
3
3
|
import { button } from '@tecsinapse/cortex-core';
|
|
4
4
|
import clsx from 'clsx';
|
|
@@ -11,7 +11,7 @@ const Dropzone = ({
|
|
|
11
11
|
buttonText = "Select File"
|
|
12
12
|
}) => {
|
|
13
13
|
const { getRootProps, getInputProps, isDragActive, isFileLimitReached } = dropzoneProps;
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ jsxs(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
...getRootProps(),
|
|
@@ -20,10 +20,19 @@ const Dropzone = ({
|
|
|
20
20
|
{
|
|
21
21
|
"border-success-medium bg-gray-100": isDragActive
|
|
22
22
|
}
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
),
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsx("input", { ...getInputProps() }),
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center text-center items-center gap-deca", children: [
|
|
27
|
+
/* @__PURE__ */ jsx(HiOutlineCloudArrowUp, { className: "text-primary-medium", size: 35 }),
|
|
28
|
+
/* @__PURE__ */ jsxs("div", { className: "gap-mili", children: [
|
|
29
|
+
/* @__PURE__ */ jsx("p", { className: "text-lg font-semibold", "data-testid": "select-dropzone", children: selectFileText }),
|
|
30
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-secondary-medium", children: dropText })
|
|
31
|
+
] }),
|
|
32
|
+
isFileLimitReached ? /* @__PURE__ */ jsx(Tooltip, { text: "Voc\xEA s\xF3 pode selecionar um \xFAnico arquivo.", children: /* @__PURE__ */ jsx("button", { disabled: true, className: clsx(button(), "cursor-not-allowed"), children: buttonText }) }) : /* @__PURE__ */ jsx("button", { className: button(), children: buttonText })
|
|
33
|
+
] })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
27
36
|
);
|
|
28
37
|
};
|
|
29
38
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { File } from './Upload.js';
|
|
3
3
|
|
|
4
4
|
const Files = ({
|
|
@@ -6,7 +6,13 @@ const Files = ({
|
|
|
6
6
|
onDelete,
|
|
7
7
|
uploadProgressText = "Upload(s) in progress"
|
|
8
8
|
}) => {
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { className: "bg-white w-full border-2 p-deca flex flex-col overflow-y-auto rounded-mili h-[18rem]", children: [
|
|
10
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-mili items-center mb-deca", children: [
|
|
11
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-deca h-deca bg-primary-medium rounded-full text-micro text-white", children: `${files.length}` }),
|
|
12
|
+
/* @__PURE__ */ jsx("h2", { className: "text-md font-semibold", "data-testid": "upload-progress", children: uploadProgressText })
|
|
13
|
+
] }),
|
|
14
|
+
files.map((file, index) => /* @__PURE__ */ jsx(File, { file, index, onDelete }, file.uid))
|
|
15
|
+
] });
|
|
10
16
|
};
|
|
11
17
|
|
|
12
18
|
export { Files };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { MdClose } from 'react-icons/md';
|
|
3
3
|
import { button } from '@tecsinapse/cortex-core';
|
|
4
4
|
import { Modal as Modal$1 } from '../Modal.js';
|
|
@@ -11,23 +11,29 @@ const Modal = ({
|
|
|
11
11
|
title = "File Upload"
|
|
12
12
|
}) => {
|
|
13
13
|
return createPortal(
|
|
14
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */ jsxs(
|
|
15
15
|
Modal$1,
|
|
16
16
|
{
|
|
17
17
|
open,
|
|
18
18
|
onClose,
|
|
19
|
-
className: "flex flex-col bg-secondary-xlight rounded-mili min-w-[70vw] max-w-[95vh] max-h-[95vh] overflow-auto"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
className: "flex flex-col bg-secondary-xlight rounded-mili min-w-[70vw] max-w-[95vh] max-h-[95vh] overflow-auto",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-full items-center justify-between mb-deca", children: [
|
|
22
|
+
/* @__PURE__ */ jsx("div", {}),
|
|
23
|
+
/* @__PURE__ */ jsx("h2", { className: "text-deca font-semibold", children: title }),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
className: button({ size: "square" }),
|
|
28
|
+
onClick: onClose,
|
|
29
|
+
"data-testid": "close-button",
|
|
30
|
+
children: /* @__PURE__ */ jsx(MdClose, { size: 20 })
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] }),
|
|
34
|
+
children
|
|
35
|
+
]
|
|
36
|
+
}
|
|
31
37
|
),
|
|
32
38
|
document.body
|
|
33
39
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Modal } from './Modal.js';
|
|
3
3
|
import { Dropzone } from './Dropzone.js';
|
|
4
4
|
import { Files } from './Files.js';
|
|
@@ -15,22 +15,25 @@ const Root = ({
|
|
|
15
15
|
uploadProgressText,
|
|
16
16
|
titleModal
|
|
17
17
|
}) => {
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
return /* @__PURE__ */ jsx(Modal, { onClose, open, title: titleModal, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col w-full gap-deca md:flex-row", children: [
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
Dropzone,
|
|
21
|
+
{
|
|
22
|
+
dropzoneProps,
|
|
23
|
+
selectFileText,
|
|
24
|
+
dropText,
|
|
25
|
+
buttonText
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
Files,
|
|
30
|
+
{
|
|
31
|
+
files,
|
|
32
|
+
onDelete,
|
|
33
|
+
uploadProgressText
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
] }) });
|
|
34
37
|
};
|
|
35
38
|
|
|
36
39
|
export { Root };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { button } from '@tecsinapse/cortex-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import { FaRegFileLines } from 'react-icons/fa6';
|
|
4
4
|
import { MdClose } from 'react-icons/md';
|
|
5
5
|
import { ProgressBar } from '../ProgressBar/ProgressBar.js';
|
|
@@ -15,31 +15,46 @@ const File = ({ file, index, onDelete }) => {
|
|
|
15
15
|
return "info";
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
19
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border rounded-t-mili shadow p-mili", children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-centi", children: [
|
|
21
|
+
file.file && file.file.type.startsWith("image/") ? /* @__PURE__ */ jsx(
|
|
22
|
+
"img",
|
|
23
|
+
{
|
|
24
|
+
src: URL.createObjectURL(file.file),
|
|
25
|
+
alt: "Preview",
|
|
26
|
+
className: "w-tera h-tera rounded-mili"
|
|
27
|
+
}
|
|
28
|
+
) : /* @__PURE__ */ jsx("span", { className: "border-2 text-kilo text-primary-medium w-tera h-tera flex items-center justify-center rounded-mili", children: /* @__PURE__ */ jsx(FaRegFileLines, {}) }),
|
|
29
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-col", children: [
|
|
30
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold truncate max-w-[200px]", children: file.file.name }),
|
|
31
|
+
/* @__PURE__ */ jsxs("p", { className: "text-sm text-gray-500", children: [
|
|
32
|
+
(file.file.size / 1024).toFixed(2),
|
|
33
|
+
" KB"
|
|
34
|
+
] })
|
|
35
|
+
] })
|
|
36
|
+
] }),
|
|
37
|
+
file.status === "success" && /* @__PURE__ */ jsx(
|
|
38
|
+
"button",
|
|
39
|
+
{
|
|
40
|
+
onClick: () => onDelete(index),
|
|
41
|
+
"data-testid": "remove-button",
|
|
42
|
+
className: button({
|
|
43
|
+
className: " bg-inherit border-2 border-primary-light text-primary-light",
|
|
44
|
+
size: "small"
|
|
45
|
+
}),
|
|
46
|
+
children: /* @__PURE__ */ jsx(MdClose, { size: 20 })
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ jsx(
|
|
51
|
+
ProgressBar,
|
|
52
|
+
{
|
|
53
|
+
intent: statusIntent(file.status),
|
|
54
|
+
infinite: file.status === "uploading"
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
] }, index);
|
|
43
58
|
};
|
|
44
59
|
|
|
45
60
|
export { File };
|
|
@@ -2,6 +2,7 @@ import { createCalendar } from '@internationalized/date';
|
|
|
2
2
|
import { useLocale, useCalendar as useCalendar$1 } from 'react-aria';
|
|
3
3
|
import { useCalendarState } from 'react-stately';
|
|
4
4
|
import { dateToCalendarDateTime, calendarDateToDate } from '../utils/date.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
5
6
|
import 'react';
|
|
6
7
|
|
|
7
8
|
const useCalendar = ({ value, onChange }) => {
|
|
@@ -2,6 +2,7 @@ import { useRef, useEffect } from 'react';
|
|
|
2
2
|
import { useDatePicker } from 'react-aria';
|
|
3
3
|
import { useDatePickerState } from 'react-stately';
|
|
4
4
|
import { dateToCalendarDateTime, calendarDateToDate } from '../utils/date.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
5
6
|
|
|
6
7
|
const useDatePickerInput = ({
|
|
7
8
|
value,
|
|
@@ -9,8 +10,8 @@ const useDatePickerInput = ({
|
|
|
9
10
|
}) => {
|
|
10
11
|
const state = useDatePickerState({
|
|
11
12
|
defaultValue: value ? dateToCalendarDateTime(value) : null,
|
|
12
|
-
onChange: (
|
|
13
|
-
onChange(calendarDateToDate(
|
|
13
|
+
onChange: (_value) => {
|
|
14
|
+
onChange(calendarDateToDate(_value));
|
|
14
15
|
}
|
|
15
16
|
});
|
|
16
17
|
const ref = useRef(null);
|
|
@@ -20,7 +21,11 @@ const useDatePickerInput = ({
|
|
|
20
21
|
ref
|
|
21
22
|
);
|
|
22
23
|
useEffect(() => {
|
|
23
|
-
|
|
24
|
+
if (!value) {
|
|
25
|
+
state.setValue(null);
|
|
26
|
+
} else if (value && state.value?.compare(dateToCalendarDateTime(value)) !== 0) {
|
|
27
|
+
state.setValue(dateToCalendarDateTime(value));
|
|
28
|
+
}
|
|
24
29
|
}, [value]);
|
|
25
30
|
return {
|
|
26
31
|
fieldProps,
|
|
@@ -2,6 +2,7 @@ import { useRef } from 'react';
|
|
|
2
2
|
import { useDateRangePicker } from 'react-aria';
|
|
3
3
|
import { useDateRangePickerState } from 'react-stately';
|
|
4
4
|
import { dateToCalendarDateTime, calendarDateToDate } from '../utils/date.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
5
6
|
|
|
6
7
|
const useDateRangePickerInput = ({
|
|
7
8
|
value,
|
|
@@ -2,6 +2,7 @@ import currency from 'currency.js';
|
|
|
2
2
|
import { useState, useCallback } from 'react';
|
|
3
3
|
import '@internationalized/date';
|
|
4
4
|
import { extractNumbersFromString } from '../utils/extractors.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
5
6
|
|
|
6
7
|
const getRegex = (precision) => new RegExp(`\\B(?=(\\d{${precision}})(?!\\d))`, "g");
|
|
7
8
|
const getInternalNumberAndMask = (value, options) => {
|
|
@@ -3,6 +3,7 @@ import { useRef } from 'react';
|
|
|
3
3
|
import { useLocale, useRangeCalendar as useRangeCalendar$1 } from 'react-aria';
|
|
4
4
|
import { useRangeCalendarState } from 'react-stately';
|
|
5
5
|
import { dateToCalendarDateTime, calendarDateToDate } from '../utils/date.js';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
6
7
|
|
|
7
8
|
const useRangeCalendar = ({
|
|
8
9
|
value,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createContext, useState, useContext } from 'react';
|
|
2
3
|
|
|
3
4
|
const CategoriesContext = createContext(null);
|
|
4
5
|
const CategoriesProvider = ({ children }) => {
|
|
@@ -11,7 +12,7 @@ const CategoriesProvider = ({ children }) => {
|
|
|
11
12
|
};
|
|
12
13
|
});
|
|
13
14
|
};
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ jsx(CategoriesContext.Provider, { value: { expandedMenus, toggleSubmenu }, children });
|
|
15
16
|
};
|
|
16
17
|
const useCategories = () => {
|
|
17
18
|
const context = useContext(CategoriesContext);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React, { useRef, useEffect } from 'react';
|
|
2
3
|
import '@internationalized/date';
|
|
3
4
|
import 'react-aria';
|
|
4
5
|
import 'react-stately';
|
|
@@ -11,7 +12,7 @@ import { useOutsideClickListener } from '../hooks/useOutsideClickListener.js';
|
|
|
11
12
|
import { MenubarContext } from './MenubarContext.js';
|
|
12
13
|
|
|
13
14
|
const MenubarProvider = ({ children }) => {
|
|
14
|
-
const [show, setShow] =
|
|
15
|
+
const [show, setShow] = React.useState(false);
|
|
15
16
|
const ref = useRef(null);
|
|
16
17
|
const showRef = useRef(false);
|
|
17
18
|
useEffect(() => {
|
|
@@ -26,7 +27,7 @@ const MenubarProvider = ({ children }) => {
|
|
|
26
27
|
ref,
|
|
27
28
|
onClickOutside
|
|
28
29
|
});
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ jsx(MenubarContext.Provider, { value: { show, setShow }, children: /* @__PURE__ */ jsx("div", { ref, children }) });
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
export { MenubarProvider };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
2
3
|
import { Toaster } from 'sonner';
|
|
3
4
|
import { SnackbarSonner } from '../service/SnackbarSonner.js';
|
|
4
5
|
|
|
@@ -8,7 +9,10 @@ const SnackbarProvider = ({
|
|
|
8
9
|
options
|
|
9
10
|
}) => {
|
|
10
11
|
const snackbar = new SnackbarSonner(options);
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ jsxs(SnackbarContext.Provider, { value: { snackbar }, children: [
|
|
13
|
+
children,
|
|
14
|
+
/* @__PURE__ */ jsx(Toaster, {})
|
|
15
|
+
] });
|
|
12
16
|
};
|
|
13
17
|
const useSnackbar = () => {
|
|
14
18
|
const context = useContext(SnackbarContext);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { toast } from 'sonner';
|
|
3
3
|
import { DefaultSnack } from '../components/Snackbar/DefaultSnack.js';
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ class SnackbarSonner {
|
|
|
16
16
|
show(type, message, options) {
|
|
17
17
|
return toast.custom(
|
|
18
18
|
(t) => {
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
20
|
DefaultSnack,
|
|
21
21
|
{
|
|
22
22
|
text: message,
|