@tecsinapse/cortex-react 1.13.1 → 1.13.3-beta.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/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 +29 -11
- package/dist/cjs/components/Calendar/CalendarCell.js +12 -16
- package/dist/cjs/components/Calendar/CalendarGrid.js +12 -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 +30 -16
- 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/{DatePicker/Content.js → Content.js} +2 -1
- package/dist/cjs/components/DatePicker/DateField.js +11 -10
- package/dist/cjs/components/DatePicker/DatePickerInput.js +60 -38
- package/dist/cjs/components/DatePicker/DatePickerInputBase.js +34 -29
- package/dist/cjs/components/DatePicker/DateRangePickerInput.js +74 -50
- 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 +5 -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 +8 -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 +6 -2
- package/dist/cjs/components/Menubar/Category.js +6 -2
- package/dist/cjs/components/Menubar/Dropdown.js +7 -5
- package/dist/cjs/components/Menubar/DropdownRoot.js +29 -26
- package/dist/cjs/components/Menubar/Header.js +10 -6
- package/dist/cjs/components/Menubar/IconControlSubItem.js +5 -5
- package/dist/cjs/components/Menubar/Item.js +25 -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 +10 -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 +4 -2
- package/dist/cjs/components/Menubar/Search.js +4 -2
- package/dist/cjs/components/Menubar/SubItem.js +8 -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 +6 -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 +58 -0
- 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 +16 -9
- package/dist/cjs/components/Select/MultiCheckAllOptions.js +13 -9
- package/dist/cjs/components/Select/MultiGroupedOptions.js +22 -13
- package/dist/cjs/components/Select/MultiOption.js +17 -15
- package/dist/cjs/components/Select/MultiOptions.js +15 -8
- package/dist/cjs/components/Select/Option.js +5 -4
- package/dist/cjs/components/Select/Options.js +8 -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 +49 -0
- package/dist/cjs/components/TimePicker/TimeFieldInput.js +85 -0
- package/dist/cjs/components/TimePicker/TimePickerInput.js +85 -0
- package/dist/cjs/components/TimePicker/TimePickerSelector.js +138 -0
- package/dist/cjs/components/Toggle.js +17 -13
- package/dist/cjs/components/Tooltip.js +28 -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 +10 -2
- package/dist/cjs/hooks/useCalendarCell.js +17 -2
- package/dist/cjs/hooks/useDatePickerInput.js +11 -4
- package/dist/cjs/hooks/useDateRangePickerInput.js +7 -2
- package/dist/cjs/hooks/useNumberMask.js +1 -0
- package/dist/cjs/hooks/useRangeCalendar.js +7 -2
- package/dist/cjs/hooks/useTimePickerInput.js +45 -0
- package/dist/cjs/index.js +11 -2
- package/dist/cjs/provider/CalendarProvider.js +24 -0
- package/dist/cjs/provider/CategoriesContext.js +2 -1
- package/dist/cjs/provider/MenubarProvider.js +5 -2
- package/dist/cjs/provider/SnackbarProvider.js +5 -1
- package/dist/cjs/service/SnackbarSonner.js +2 -2
- package/dist/cjs/styles/calendar-cell.js +10 -5
- package/dist/cjs/styles/time-field-input.js +18 -0
- package/dist/cjs/utils/date.js +0 -5
- 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 +29 -11
- package/dist/esm/components/Calendar/CalendarCell.js +12 -16
- package/dist/esm/components/Calendar/CalendarGrid.js +12 -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 +30 -16
- 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 +9 -0
- package/dist/esm/components/DatePicker/DateField.js +13 -12
- package/dist/esm/components/DatePicker/DatePickerInput.js +60 -38
- package/dist/esm/components/DatePicker/DatePickerInputBase.js +35 -30
- package/dist/esm/components/DatePicker/DateRangePickerInput.js +74 -50
- 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 +7 -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 +10 -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 +6 -2
- package/dist/esm/components/Menubar/Category.js +6 -2
- package/dist/esm/components/Menubar/Dropdown.js +7 -5
- package/dist/esm/components/Menubar/DropdownRoot.js +29 -26
- package/dist/esm/components/Menubar/Header.js +10 -6
- package/dist/esm/components/Menubar/IconControlSubItem.js +5 -5
- package/dist/esm/components/Menubar/Item.js +26 -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 +10 -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 +4 -2
- package/dist/esm/components/Menubar/Search.js +4 -2
- package/dist/esm/components/Menubar/SubItem.js +8 -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 +6 -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 +56 -0
- 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 +17 -10
- package/dist/esm/components/Select/MultiCheckAllOptions.js +14 -10
- package/dist/esm/components/Select/MultiGroupedOptions.js +23 -14
- package/dist/esm/components/Select/MultiOption.js +17 -15
- package/dist/esm/components/Select/MultiOptions.js +16 -9
- package/dist/esm/components/Select/Option.js +6 -5
- package/dist/esm/components/Select/Options.js +9 -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 +47 -0
- package/dist/esm/components/TimePicker/TimeFieldInput.js +83 -0
- package/dist/esm/components/TimePicker/TimePickerInput.js +83 -0
- package/dist/esm/components/TimePicker/TimePickerSelector.js +136 -0
- package/dist/esm/components/Toggle.js +18 -14
- package/dist/esm/components/Tooltip.js +29 -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 +10 -2
- package/dist/esm/hooks/useCalendarCell.js +18 -3
- package/dist/esm/hooks/useDatePickerInput.js +11 -4
- package/dist/esm/hooks/useDateRangePickerInput.js +7 -2
- package/dist/esm/hooks/useNumberMask.js +1 -0
- package/dist/esm/hooks/useRangeCalendar.js +7 -2
- package/dist/esm/hooks/useTimePickerInput.js +43 -0
- package/dist/esm/index.js +6 -2
- package/dist/esm/provider/CalendarProvider.js +21 -0
- package/dist/esm/provider/CategoriesContext.js +3 -2
- package/dist/esm/provider/MenubarProvider.js +7 -4
- package/dist/esm/provider/SnackbarProvider.js +6 -2
- package/dist/esm/service/SnackbarSonner.js +2 -2
- package/dist/esm/styles/calendar-cell.js +10 -5
- package/dist/esm/styles/time-field-input.js +16 -0
- package/dist/esm/utils/date.js +2 -6
- 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 +3 -3
- 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/CalendarProvider.d.ts +10 -0
- package/dist/types/components/Calendar/RangeCalendar.d.ts +3 -3
- package/dist/types/components/Calendar/types.d.ts +5 -0
- 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 +5 -0
- package/dist/types/components/DatePicker/DateField.d.ts +1 -2
- package/dist/types/components/DatePicker/DatePickerInput.d.ts +3 -6
- package/dist/types/components/DatePicker/DatePickerInputBase.d.ts +1 -1
- package/dist/types/components/DatePicker/DateRangePickerInput.d.ts +4 -7
- package/dist/types/components/DatePicker/DateSegment.d.ts +1 -2
- package/dist/types/components/DatePicker/types.d.ts +8 -0
- 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 +9 -0
- 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/{TimeField → TimePicker}/TimeField.d.ts +2 -2
- package/dist/types/components/TimePicker/TimeFieldInput.d.ts +13 -0
- package/dist/types/components/TimePicker/TimePickerInput.d.ts +14 -0
- package/dist/types/components/TimePicker/TimePickerSelector.d.ts +13 -0
- package/dist/types/components/TimePicker/index.d.ts +4 -0
- 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/components/index.d.ts +1 -1
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useCalendar.d.ts +3 -1
- package/dist/types/hooks/useCalendarCell.d.ts +2 -0
- package/dist/types/hooks/useDatePickerInput.d.ts +3 -1
- package/dist/types/hooks/useDateRangePickerInput.d.ts +3 -1
- package/dist/types/hooks/useRangeCalendar.d.ts +3 -1
- package/dist/types/hooks/useTimePickerInput.d.ts +14 -0
- package/dist/types/provider/CalendarProvider.d.ts +10 -0
- 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/dist/types/provider/index.d.ts +1 -0
- package/dist/types/styles/calendar-cell.d.ts +18 -3
- package/dist/types/styles/time-field-input.d.ts +25 -0
- package/package.json +2 -2
- package/dist/cjs/components/TimeField/TimeField.js +0 -24
- package/dist/cjs/components/TimeField/TimeFieldInput.js +0 -42
- package/dist/esm/components/DatePicker/Content.js +0 -8
- package/dist/esm/components/TimeField/TimeField.js +0 -22
- package/dist/esm/components/TimeField/TimeFieldInput.js +0 -40
- package/dist/types/components/DatePicker/Content.d.ts +0 -5
- package/dist/types/components/TimeField/TimeFieldInput.d.ts +0 -11
- package/dist/types/components/TimeField/index.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import clsx from 'clsx';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import { LiaAngleRightSolid, LiaAngleDownSolid } from 'react-icons/lia';
|
|
4
4
|
import { useAccordionContext } from './context.js';
|
|
5
5
|
|
|
@@ -29,7 +29,7 @@ const AccordionTrigger = ({
|
|
|
29
29
|
}
|
|
30
30
|
toggle?.();
|
|
31
31
|
};
|
|
32
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ jsxs(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
35
|
className: clsx(
|
|
@@ -39,53 +39,55 @@ const AccordionTrigger = ({
|
|
|
39
39
|
{ "border-r flex-col px-mili": direction === "horizontal" },
|
|
40
40
|
{ "border-b py-mili": direction === "vertical" }
|
|
41
41
|
),
|
|
42
|
-
onClick: action
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
className: clsx(
|
|
48
|
-
"rounded-mili border border-secondary-light flex align-center justify-center p-micro",
|
|
42
|
+
onClick: action,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
"div",
|
|
49
46
|
{
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
className: clsx(
|
|
48
|
+
"rounded-mili border border-secondary-light flex align-center justify-center p-micro",
|
|
49
|
+
{
|
|
50
|
+
"absolute -translate-x-micro translate-y-deca bg-white": floating && direction === "horizontal"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"absolute -translate-y-micro translate-x-deca bg-white": floating && direction === "vertical"
|
|
54
|
+
},
|
|
55
|
+
className
|
|
56
|
+
),
|
|
57
|
+
children: direction === "horizontal" ? /* @__PURE__ */ jsx(
|
|
58
|
+
LiaAngleRightSolid,
|
|
59
|
+
{
|
|
60
|
+
className: clsx(
|
|
61
|
+
"text-secondary-medium transition-transform duration-200",
|
|
62
|
+
{
|
|
63
|
+
"rotate-180": invertedArrow ? !open : open
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
) : /* @__PURE__ */ jsx(
|
|
68
|
+
LiaAngleDownSolid,
|
|
69
|
+
{
|
|
70
|
+
className: clsx(
|
|
71
|
+
"text-secondary-medium transition-transform duration-200",
|
|
72
|
+
{
|
|
73
|
+
"rotate-180": invertedArrow ? !open : open
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
!floating ? /* @__PURE__ */ jsx(
|
|
81
|
+
"span",
|
|
52
82
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
className: clsx(
|
|
62
|
-
"text-secondary-medium transition-transform duration-200",
|
|
63
|
-
{
|
|
64
|
-
"rotate-180": invertedArrow ? !open : open
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
}
|
|
68
|
-
) : /* @__PURE__ */ React__default.createElement(
|
|
69
|
-
LiaAngleDownSolid,
|
|
70
|
-
{
|
|
71
|
-
className: clsx(
|
|
72
|
-
"text-secondary-medium transition-transform duration-200",
|
|
73
|
-
{
|
|
74
|
-
"rotate-180": invertedArrow ? !open : open
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
)
|
|
79
|
-
),
|
|
80
|
-
!floating ? /* @__PURE__ */ React__default.createElement(
|
|
81
|
-
"span",
|
|
82
|
-
{
|
|
83
|
-
className: clsx({
|
|
84
|
-
"-rotate-180 [writing-mode:vertical-lr]": direction === "horizontal"
|
|
85
|
-
})
|
|
86
|
-
},
|
|
87
|
-
label
|
|
88
|
-
) : null
|
|
83
|
+
className: clsx({
|
|
84
|
+
"-rotate-180 [writing-mode:vertical-lr]": direction === "horizontal"
|
|
85
|
+
}),
|
|
86
|
+
children: label
|
|
87
|
+
}
|
|
88
|
+
) : null
|
|
89
|
+
]
|
|
90
|
+
}
|
|
89
91
|
);
|
|
90
92
|
};
|
|
91
93
|
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import clsx from 'clsx';
|
|
2
|
-
import
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import '@internationalized/date';
|
|
4
5
|
import { getNameInitials } from '../utils/string.js';
|
|
5
6
|
|
|
6
7
|
const Avatar = ({ src, name, className, ...rest }) => {
|
|
7
|
-
const [hasError, setHasError] =
|
|
8
|
-
|
|
8
|
+
const [hasError, setHasError] = React.useState(false);
|
|
9
|
+
React.useEffect(() => {
|
|
9
10
|
setHasError(false);
|
|
10
11
|
}, [src]);
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
12
13
|
"div",
|
|
13
14
|
{
|
|
14
15
|
...rest,
|
|
15
16
|
className: clsx(
|
|
16
17
|
"rounded-pill bg-secondary-dark h-mega flex items-center justify-center cursor-pointer aspect-square",
|
|
17
18
|
className
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
19
|
+
),
|
|
20
|
+
children: src && !hasError ? /* @__PURE__ */ jsx(
|
|
21
|
+
"img",
|
|
22
|
+
{
|
|
23
|
+
src,
|
|
24
|
+
alt: name,
|
|
25
|
+
className: "rounded-pill aspect-square h-mega",
|
|
26
|
+
onError: () => setHasError(true),
|
|
27
|
+
"data-testid": "avatar-img"
|
|
28
|
+
}
|
|
29
|
+
) : /* @__PURE__ */ jsx("p", { className: "font-bold text-white text-base", "data-testid": "avatar-p", children: getNameInitials(name) })
|
|
30
|
+
}
|
|
30
31
|
);
|
|
31
32
|
};
|
|
32
33
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
2
|
import { badge, containerBadge } from '@tecsinapse/cortex-core';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
|
|
5
5
|
const Badge = forwardRef((props, ref) => {
|
|
6
6
|
const { value, variants, ...rest } = props;
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
8
|
"div",
|
|
9
9
|
{
|
|
10
10
|
ref,
|
|
@@ -12,9 +12,9 @@ const Badge = forwardRef((props, ref) => {
|
|
|
12
12
|
className: `relative ${variants?.className}`,
|
|
13
13
|
intent: variants?.intent
|
|
14
14
|
}),
|
|
15
|
-
...rest
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
...rest,
|
|
16
|
+
children: value
|
|
17
|
+
}
|
|
18
18
|
);
|
|
19
19
|
});
|
|
20
20
|
function getDisplayValue(value) {
|
|
@@ -24,7 +24,10 @@ function getDisplayValue(value) {
|
|
|
24
24
|
}
|
|
25
25
|
const BadgeAnchor = forwardRef((props, ref) => {
|
|
26
26
|
const { value, variants, children, ...rest } = props;
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ jsxs("div", { className: containerBadge(), children: [
|
|
28
|
+
children,
|
|
29
|
+
/* @__PURE__ */ jsx("div", { ref, className: badge(variants), ...rest, children: getDisplayValue(value) })
|
|
30
|
+
] });
|
|
28
31
|
});
|
|
29
32
|
|
|
30
33
|
export { Badge, BadgeAnchor };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { createElement } from 'react';
|
|
1
3
|
import clsx from 'clsx';
|
|
2
|
-
import React__default from 'react';
|
|
3
4
|
import { MdOutlineKeyboardDoubleArrowRight } from 'react-icons/md';
|
|
4
5
|
|
|
5
6
|
const BreadcrumbItem = ({
|
|
@@ -8,22 +9,25 @@ const BreadcrumbItem = ({
|
|
|
8
9
|
componentProps,
|
|
9
10
|
title
|
|
10
11
|
}) => {
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
return /* @__PURE__ */ createElement(Component, { ...componentProps, key: title }, /* @__PURE__ */ jsxs("div", { className: "flex gap-x-mili items-center", children: [
|
|
13
|
+
/* @__PURE__ */ jsx(
|
|
14
|
+
"p",
|
|
15
|
+
{
|
|
16
|
+
className: clsx(
|
|
17
|
+
"no-underline",
|
|
18
|
+
isLast ? "text-secondary-medium cursor-default" : "text-secondary-xdark cursor-pointer"
|
|
19
|
+
),
|
|
20
|
+
children: title
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
!isLast ? /* @__PURE__ */ jsx(
|
|
24
|
+
MdOutlineKeyboardDoubleArrowRight,
|
|
25
|
+
{
|
|
26
|
+
className: "mt-[0.125rem] text-primary-medium",
|
|
27
|
+
"data-testid": "breadcrumb-item-icon"
|
|
28
|
+
}
|
|
29
|
+
) : /* @__PURE__ */ jsx(Fragment, {})
|
|
30
|
+
] }));
|
|
27
31
|
};
|
|
28
32
|
|
|
29
33
|
export { BreadcrumbItem };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Card } from '../Card.js';
|
|
3
3
|
import { BreadcrumbItem } from './BreadcrumbItem.js';
|
|
4
4
|
|
|
5
5
|
const Breadcrumbs = (props) => {
|
|
6
6
|
const { breadcrumbs, ...rest } = props;
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsx(Card, { className: "flex gap-x-mili w-full items-center py-mili", ...rest, children: breadcrumbs.map((item, index) => {
|
|
8
8
|
const isLast = index === breadcrumbs.length - 1;
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
10
|
BreadcrumbItem,
|
|
11
11
|
{
|
|
12
|
-
key: `${item.title}-${index}`,
|
|
13
12
|
...item,
|
|
14
13
|
isLast
|
|
15
|
-
}
|
|
14
|
+
},
|
|
15
|
+
`${item.title}-${index}`
|
|
16
16
|
);
|
|
17
|
-
}));
|
|
17
|
+
}) });
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export { Breadcrumbs };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { button } from '@tecsinapse/cortex-core';
|
|
2
|
-
import
|
|
3
|
+
import { forwardRef } from 'react';
|
|
3
4
|
|
|
4
5
|
const Button = forwardRef((props, ref) => {
|
|
5
6
|
const { variants, intent, variant, size, children, className, ...rest } = props;
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
7
8
|
"button",
|
|
8
9
|
{
|
|
9
10
|
...rest,
|
|
10
11
|
className: button({ intent, variant, size, ...variants, className }),
|
|
11
|
-
ref
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
ref,
|
|
13
|
+
children
|
|
14
|
+
}
|
|
14
15
|
);
|
|
15
16
|
});
|
|
16
17
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useCalendar } from '../../hooks/useCalendar.js';
|
|
3
3
|
import '@internationalized/date';
|
|
4
|
+
import 'react';
|
|
4
5
|
import 'react-aria';
|
|
6
|
+
import '../../provider/MenubarContext.js';
|
|
7
|
+
import '../../provider/SnackbarProvider.js';
|
|
8
|
+
import { CalendarProvider } from '../../provider/CalendarProvider.js';
|
|
5
9
|
import 'react-stately';
|
|
6
10
|
import '../Popover/Context.js';
|
|
7
11
|
import 'react-dropzone';
|
|
@@ -11,16 +15,30 @@ import 'currency.js';
|
|
|
11
15
|
import { CalendarGrid } from './CalendarGrid.js';
|
|
12
16
|
import { CalendarHeader } from './CalendarHeader.js';
|
|
13
17
|
|
|
14
|
-
const Calendar = ({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const Calendar = ({
|
|
19
|
+
value,
|
|
20
|
+
onChange,
|
|
21
|
+
isTodayHighlited = true,
|
|
22
|
+
minValue,
|
|
23
|
+
maxValue
|
|
24
|
+
}) => {
|
|
25
|
+
const { calendarProps, title, state } = useCalendar({
|
|
26
|
+
value,
|
|
27
|
+
onChange,
|
|
28
|
+
minValue,
|
|
29
|
+
maxValue
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ jsx(CalendarProvider, { isTodayHighlited, children: /* @__PURE__ */ jsxs("div", { ...calendarProps, className: "calendar", "data-testid": "calendar-div", children: [
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
CalendarHeader,
|
|
34
|
+
{
|
|
35
|
+
onClickPrevButton: () => state.focusPreviousPage(),
|
|
36
|
+
onClickNextButton: () => state.focusNextPage(),
|
|
37
|
+
title
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ jsx(CalendarGrid, { state })
|
|
41
|
+
] }) });
|
|
24
42
|
};
|
|
25
43
|
|
|
26
44
|
export { Calendar };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import '@internationalized/date';
|
|
3
3
|
import 'react-aria';
|
|
4
4
|
import 'react-stately';
|
|
5
|
+
import 'react';
|
|
5
6
|
import { useCalendarCell } from '../../hooks/useCalendarCell.js';
|
|
6
7
|
import '../Popover/Context.js';
|
|
7
8
|
import 'react-dropzone';
|
|
@@ -26,30 +27,25 @@ const CalendarCell = ({ state, date }) => {
|
|
|
26
27
|
formattedDate,
|
|
27
28
|
isSelectionStart,
|
|
28
29
|
isSelectionEnd,
|
|
29
|
-
inRange
|
|
30
|
+
inRange,
|
|
31
|
+
isToday,
|
|
32
|
+
isDisabled
|
|
30
33
|
} = useCalendarCell({ state, date });
|
|
31
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
32
35
|
Td,
|
|
33
36
|
{
|
|
34
37
|
...cellProps,
|
|
35
38
|
"data-testid": "calendar-cell-td",
|
|
36
39
|
className: cell({
|
|
37
|
-
isOutsideVisibleRange,
|
|
40
|
+
isDisabled: isOutsideVisibleRange || isDisabled,
|
|
38
41
|
isSelected,
|
|
39
42
|
isSelectionStart,
|
|
40
43
|
isSelectionEnd,
|
|
41
|
-
inRange
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
...buttonProps,
|
|
48
|
-
ref,
|
|
49
|
-
className: button({ isOutsideVisibleRange })
|
|
50
|
-
},
|
|
51
|
-
formattedDate
|
|
52
|
-
)
|
|
44
|
+
inRange,
|
|
45
|
+
isToday
|
|
46
|
+
}),
|
|
47
|
+
children: /* @__PURE__ */ jsx("div", { ...buttonProps, ref, className: button({ isDisabled }), children: formattedDate })
|
|
48
|
+
}
|
|
53
49
|
);
|
|
54
50
|
};
|
|
55
51
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import '@internationalized/date';
|
|
3
3
|
import 'react-aria';
|
|
4
4
|
import 'react-stately';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../../provider/MenubarContext.js';
|
|
7
|
+
import '../../provider/SnackbarProvider.js';
|
|
8
|
+
import '../../provider/CalendarProvider.js';
|
|
5
9
|
import { useCalendarGrid } from '../../hooks/useCalendarGrid.js';
|
|
6
10
|
import '../Popover/Context.js';
|
|
7
11
|
import 'react-dropzone';
|
|
@@ -13,13 +17,16 @@ import { CalendarGridHeaderRow } from './CalendarGridHeaderRow.js';
|
|
|
13
17
|
|
|
14
18
|
const CalendarGrid = ({ state }) => {
|
|
15
19
|
const { gridProps, headerProps, weekDays } = useCalendarGrid({ state });
|
|
16
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
17
21
|
"div",
|
|
18
22
|
{
|
|
19
23
|
className: "bg-white rounded-micro px-deca py-mili",
|
|
20
|
-
"data-testid": "calendar-grid"
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
"data-testid": "calendar-grid",
|
|
25
|
+
children: /* @__PURE__ */ jsxs("table", { ...gridProps, className: "border-separate border-spacing-y-nano", children: [
|
|
26
|
+
/* @__PURE__ */ jsx("thead", { ...headerProps, children: /* @__PURE__ */ jsx(CalendarGridHeaderRow, { weekDays }) }),
|
|
27
|
+
/* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx(CalendarGridBodyRows, { state }) })
|
|
28
|
+
] })
|
|
29
|
+
}
|
|
23
30
|
);
|
|
24
31
|
};
|
|
25
32
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { CalendarCell } from './CalendarCell.js';
|
|
3
3
|
|
|
4
4
|
const CalendarGridBodyRows = ({ state }) => {
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
-
return date ? /* @__PURE__ */
|
|
7
|
-
}))));
|
|
5
|
+
return /* @__PURE__ */ jsx(Fragment, { children: [...new Array(6).keys()].map((weekIndex) => /* @__PURE__ */ jsx("tr", { className: "shadow-0 px-deca", children: state.getDatesInWeek(weekIndex).map((date, i) => {
|
|
6
|
+
return date ? /* @__PURE__ */ jsx(CalendarCell, { state, date }, i) : /* @__PURE__ */ jsx("td", {}, i);
|
|
7
|
+
}) }, weekIndex)) });
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { CalendarGridBodyRows };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { THeadCell } from '../Table.js';
|
|
3
3
|
|
|
4
4
|
const CalendarGridHeaderRow = ({
|
|
5
5
|
weekDays
|
|
6
6
|
}) => {
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsx("tr", { "data-testid": "calendar-grid-header-row", children: weekDays.map((day, index) => /* @__PURE__ */ jsx(THeadCell, { className: "w-11 h-11 aspect-square", children: day }, index)) });
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { CalendarGridHeaderRow };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { FaChevronLeft, FaChevronRight } from 'react-icons/fa';
|
|
3
3
|
import { Button } from '../Button.js';
|
|
4
4
|
|
|
@@ -7,33 +7,35 @@ const CalendarHeader = ({
|
|
|
7
7
|
onClickNextButton,
|
|
8
8
|
title
|
|
9
9
|
}) => {
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsxs(
|
|
11
11
|
"div",
|
|
12
12
|
{
|
|
13
13
|
className: "flex flex-row justify-between items-center gap-x-deca bg-miscellaneous-body p-mili",
|
|
14
|
-
"data-testid": "calendar-header"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
14
|
+
"data-testid": "calendar-header",
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
Button,
|
|
18
|
+
{
|
|
19
|
+
onClick: onClickPrevButton,
|
|
20
|
+
variants: { variant: "text", intent: "secondary", size: "small" },
|
|
21
|
+
"data-testid": "calendar-header-prev-button",
|
|
22
|
+
type: "button",
|
|
23
|
+
children: /* @__PURE__ */ jsx(FaChevronLeft, {})
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ jsx("span", { className: "font-bold capitalize", children: title }),
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
Button,
|
|
29
|
+
{
|
|
30
|
+
onClick: onClickNextButton,
|
|
31
|
+
variants: { variant: "text", intent: "secondary", size: "small" },
|
|
32
|
+
"data-testid": "calendar-header-next-button",
|
|
33
|
+
type: "button",
|
|
34
|
+
children: /* @__PURE__ */ jsx(FaChevronRight, {})
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
]
|
|
38
|
+
}
|
|
37
39
|
);
|
|
38
40
|
};
|
|
39
41
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import '@internationalized/date';
|
|
3
3
|
import 'react-aria';
|
|
4
4
|
import 'react-stately';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../../provider/MenubarContext.js';
|
|
7
|
+
import '../../provider/SnackbarProvider.js';
|
|
8
|
+
import { CalendarProvider } from '../../provider/CalendarProvider.js';
|
|
5
9
|
import '../Popover/Context.js';
|
|
6
10
|
import 'react-dropzone';
|
|
7
11
|
import 'uuid';
|
|
@@ -11,29 +15,39 @@ import { useRangeCalendar } from '../../hooks/useRangeCalendar.js';
|
|
|
11
15
|
import { CalendarGrid } from './CalendarGrid.js';
|
|
12
16
|
import { CalendarHeader } from './CalendarHeader.js';
|
|
13
17
|
|
|
14
|
-
const RangeCalendar = ({
|
|
18
|
+
const RangeCalendar = ({
|
|
19
|
+
value,
|
|
20
|
+
onChange,
|
|
21
|
+
isTodayHighlited = true,
|
|
22
|
+
minValue,
|
|
23
|
+
maxValue
|
|
24
|
+
}) => {
|
|
15
25
|
const { calendarProps, state, title, ref } = useRangeCalendar({
|
|
16
26
|
value,
|
|
17
|
-
onChange
|
|
27
|
+
onChange,
|
|
28
|
+
minValue,
|
|
29
|
+
maxValue
|
|
18
30
|
});
|
|
19
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ jsx(CalendarProvider, { isTodayHighlited, children: /* @__PURE__ */ jsxs(
|
|
20
32
|
"div",
|
|
21
33
|
{
|
|
22
34
|
...calendarProps,
|
|
23
35
|
className: "calendar",
|
|
24
36
|
ref,
|
|
25
|
-
"data-testid": "calendar-range-div"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
"data-testid": "calendar-range-div",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsx(
|
|
40
|
+
CalendarHeader,
|
|
41
|
+
{
|
|
42
|
+
onClickPrevButton: () => state.focusPreviousPage(),
|
|
43
|
+
onClickNextButton: () => state.focusNextPage(),
|
|
44
|
+
title
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ jsx(CalendarGrid, { state })
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
) });
|
|
37
51
|
};
|
|
38
52
|
|
|
39
53
|
export { RangeCalendar };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { card } from '@tecsinapse/cortex-core';
|
|
2
|
-
import
|
|
3
|
+
import { forwardRef } from 'react';
|
|
3
4
|
|
|
4
5
|
const Card = forwardRef((props, ref) => {
|
|
5
6
|
const { children, className, ...rest } = props;
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { className: card({ className }), ref, ...rest, children });
|
|
7
8
|
});
|
|
8
9
|
|
|
9
10
|
export { Card };
|