@onesy/ui-react 1.0.131 → 1.0.132
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/Accordion/Accordion.d.ts +2 -2
- package/AdvancedTextField/AdvancedTextField.d.ts +1 -1
- package/Append/Append.d.ts +3 -3
- package/AreaChart/AreaChart.d.ts +1 -1
- package/AreaChartItem/AreaChartItem.d.ts +1 -1
- package/AudioPlayer/AudioPlayer.d.ts +1 -1
- package/AudioRecorder/AudioRecorder.d.ts +1 -1
- package/AutoComplete/AutoComplete.d.ts +3 -3
- package/AutoComplete/AutoComplete.js +2 -2
- package/AutoCompleteCountry/AutoCompleteCountry.d.ts +1 -1
- package/AutoCompleteCurrency/AutoCompleteCurrency.d.ts +1 -1
- package/Avatar/Avatar.d.ts +1 -1
- package/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/Backdrop/Backdrop.d.ts +1 -1
- package/Badge/Badge.d.ts +1 -1
- package/Banner/Banner.d.ts +1 -1
- package/BottomAppBar/BottomAppBar.d.ts +1 -1
- package/BottomSheet/BottomSheet.d.ts +1 -1
- package/Box/Box.d.ts +1 -1
- package/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/BubbleChart/BubbleChart.d.ts +1 -1
- package/BubbleChartItem/BubbleChartItem.d.ts +1 -1
- package/Button/Button.d.ts +1 -1
- package/Buttons/Buttons.d.ts +1 -1
- package/Buttons/Buttons.js +7 -31
- package/Calendar/Calendar.d.ts +3 -3
- package/Calendar/Calendar.js +6 -6
- package/CalendarAvailability/CalendarAvailability.d.ts +2 -2
- package/CalendarAvailability/CalendarAvailability.js +8 -8
- package/CalendarMenu/CalendarMenu.d.ts +1 -1
- package/CalendarMenu/CalendarMenu.js +5 -5
- package/CalendarMonth/CalendarMonth.d.ts +5 -5
- package/CalendarViews/CalendarViews.d.ts +2 -2
- package/CalendarWeek/CalendarWeek.d.ts +1 -1
- package/Card/Card.d.ts +1 -1
- package/CardButton/CardButton.d.ts +1 -1
- package/CardFooter/CardFooter.d.ts +1 -1
- package/CardHeader/CardHeader.d.ts +1 -1
- package/CardImage/CardImage.d.ts +1 -1
- package/CardMain/CardMain.d.ts +1 -1
- package/Carousel/Carousel.d.ts +4 -4
- package/Carousel/Carousel.js +8 -8
- package/Chart/Chart.d.ts +4 -4
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Chip/Chip.d.ts +1 -1
- package/Chips/Chips.d.ts +1 -1
- package/ClickListener/ClickListener.d.ts +1 -1
- package/Clock/Clock.d.ts +5 -5
- package/ColorTextField/ColorTextField.d.ts +1 -1
- package/ColumnChart/ColumnChart.d.ts +1 -1
- package/ColumnChartItem/ColumnChartItem.d.ts +1 -1
- package/Confirm/Confirm.d.ts +4 -4
- package/Container/Container.d.ts +1 -1
- package/CookieBanner/CookieBanner.d.ts +1 -1
- package/Countdown/Countdown.d.ts +1 -1
- package/DatePicker/DatePicker.d.ts +1 -1
- package/DatePicker/DatePicker.js +6 -6
- package/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/DateTimePicker/DateTimePicker.js +6 -6
- package/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -1
- package/Divider/Divider.d.ts +1 -1
- package/DonutChart/DonutChart.d.ts +1 -1
- package/DragAndDropList/DragAndDropList.d.ts +1 -1
- package/Drawing/Drawing.d.ts +2 -2
- package/Drawing/Drawing.js +12 -12
- package/DropZone/DropZone.d.ts +1 -1
- package/Emojis/Emojis.d.ts +3 -3
- package/Emojis/Emojis.js +2 -2
- package/Expand/Expand.d.ts +1 -1
- package/Fab/Fab.d.ts +1 -1
- package/Fade/Fade.d.ts +1 -1
- package/FileChoose/FileChoose.d.ts +2 -2
- package/Focus/Focus.d.ts +1 -1
- package/Form/Form.d.ts +1 -1
- package/FormRow/FormRow.d.ts +1 -1
- package/Forms/Forms.d.ts +1 -1
- package/Frame/Frame.d.ts +1 -1
- package/Grid/Grid.d.ts +2 -2
- package/Grow/Grow.d.ts +1 -1
- package/HTMLCanvas/HTMLCanvas.d.ts +2 -2
- package/HTMLCanvas/index.js +1 -2
- package/IFrame/IFrame.d.ts +1 -1
- package/Icon/Icon.d.ts +1 -1
- package/Icon/index.js +1 -2
- package/IconButton/IconButton.d.ts +1 -1
- package/Image/Image.d.ts +1 -1
- package/ImageCrop/ImageCrop.d.ts +2 -2
- package/ImageCrop/ImageCrop.js +17 -17
- package/ImageEdit/ImageEdit.d.ts +2 -2
- package/ImageEdit/ImageEdit.js +4 -4
- package/ImageGallery/ImageGallery.d.ts +1 -1
- package/ImageList/ImageList.d.ts +1 -1
- package/ImageListItem/ImageListItem.d.ts +1 -1
- package/ImageListItemBox/ImageListItemBox.d.ts +1 -1
- package/Info/Info.d.ts +1 -1
- package/Interaction/Interaction.d.ts +2 -2
- package/Keyframes/Keyframes.d.ts +3 -3
- package/Keyframes/index.js +1 -2
- package/Label/Label.d.ts +1 -1
- package/Labels/Labels.d.ts +1 -1
- package/Line/Line.d.ts +6 -6
- package/LineChart/LineChart.d.ts +1 -1
- package/LineChartItem/LineChartItem.d.ts +1 -1
- package/LinearMeter/LinearMeter.d.ts +1 -1
- package/LinearProgress/LinearProgress.d.ts +1 -1
- package/Link/Link.d.ts +1 -1
- package/Links/Links.d.ts +2 -2
- package/List/List.d.ts +1 -1
- package/ListItem/ListItem.d.ts +1 -1
- package/ListItem/ListItem.js +3 -3
- package/ListSubheader/ListSubheader.d.ts +1 -1
- package/MainProgress/MainProgress.d.ts +3 -3
- package/Markdown/Markdown.d.ts +1 -1
- package/Masonry/Masonry.d.ts +1 -1
- package/Medias/Medias.d.ts +3 -3
- package/Menu/Menu.d.ts +1 -1
- package/Menu/Menu.js +13 -13
- package/MenuDesktop/MenuDesktop.d.ts +3 -3
- package/MenuItem/MenuItem.d.ts +1 -1
- package/Meta/Meta.d.ts +1 -1
- package/Modal/Modal.d.ts +1 -1
- package/ModalFooter/ModalFooter.d.ts +1 -1
- package/ModalHeader/ModalHeader.d.ts +1 -1
- package/ModalIcon/ModalIcon.d.ts +1 -1
- package/ModalMain/ModalMain.d.ts +1 -1
- package/ModalText/ModalText.d.ts +1 -1
- package/ModalTitle/ModalTitle.d.ts +1 -1
- package/MoreOptions/MoreOptions.d.ts +1 -1
- package/Move/Move.d.ts +1 -1
- package/NavigationBar/NavigationBar.d.ts +2 -2
- package/NavigationDrawer/NavigationDrawer.d.ts +1 -1
- package/NavigationItem/NavigationItem.d.ts +2 -2
- package/NavigationRail/NavigationRail.d.ts +1 -1
- package/NotFound/NotFound.d.ts +1 -1
- package/NumericTextField/NumericTextField.d.ts +1 -1
- package/Page/Page.d.ts +2 -2
- package/PageTransition/PageTransition.d.ts +1 -1
- package/Pagination/Pagination.d.ts +1 -1
- package/PaginationItem/PaginationItem.d.ts +1 -1
- package/Parallax/Parallax.d.ts +2 -2
- package/Path/Path.d.ts +1 -1
- package/PieChart/PieChart.d.ts +1 -1
- package/Placeholder/Placeholder.d.ts +1 -1
- package/Portal/Portal.d.ts +1 -1
- package/Properties/Properties.d.ts +2 -2
- package/Property/Property.d.ts +1 -1
- package/Radio/Radio.d.ts +1 -1
- package/Radios/Radios.d.ts +1 -1
- package/Rating/Rating.d.ts +1 -1
- package/Reset/Reset.d.ts +1 -1
- package/Reveal/Reveal.d.ts +1 -1
- package/RichTextEditor/RichTextEditor.d.ts +1 -1
- package/RichTextEditor/RichTextEditor.js +20 -20
- package/RoundMeter/RoundMeter.d.ts +1 -1
- package/RoundProgress/RoundProgress.d.ts +1 -1
- package/ScatterChart/ScatterChart.d.ts +1 -1
- package/ScatterChartItem/ScatterChartItem.d.ts +1 -1
- package/ScreenCapture/ScreenCapture.d.ts +2 -2
- package/Section/Section.d.ts +2 -2
- package/SectionAction/SectionAction.d.ts +1 -1
- package/SectionBoxes/SectionBoxes.d.ts +2 -2
- package/SectionCards/SectionCards.d.ts +2 -2
- package/SectionCarousel/SectionCarousel.d.ts +2 -2
- package/SectionContact/SectionContact.d.ts +1 -1
- package/SectionImageGallery/SectionImageGallery.d.ts +1 -1
- package/SectionLogos/SectionLogos.d.ts +1 -1
- package/SectionMedia/SectionMedia.d.ts +1 -1
- package/SectionReviews/SectionReviews.d.ts +2 -2
- package/SectionTextMedia/SectionTextMedia.d.ts +1 -1
- package/SectionTimeline/SectionTimeline.d.ts +2 -2
- package/SectionWatch/SectionWatch.d.ts +1 -1
- package/Select/Select.d.ts +1 -1
- package/Select/Select.js +2 -2
- package/Share/Share.d.ts +1 -1
- package/Slide/Slide.d.ts +1 -1
- package/Slider/Slider.d.ts +2 -2
- package/SmartTextField/SmartTextField.d.ts +1 -1
- package/SmartTextField/SmartTextField.js +16 -16
- package/Snackbar/Snackbar.d.ts +1 -1
- package/Snackbars/Context.d.ts +1 -1
- package/Snackbars/Snackbars.d.ts +2 -2
- package/Space/Space.d.ts +1 -1
- package/Space/Space.js +26 -26
- package/Space/index.js +1 -2
- package/SpeechToText/SpeechToText.d.ts +1 -1
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDialItem/SpeedDialItem.d.ts +1 -1
- package/SpyScroll/SpyScroll.d.ts +1 -1
- package/Step/Step.d.ts +1 -1
- package/Stepper/Stepper.d.ts +1 -1
- package/Surface/Surface.d.ts +1 -1
- package/Switch/Switch.d.ts +1 -1
- package/Tab/Tab.d.ts +1 -1
- package/Table/Table.d.ts +1 -1
- package/TableBody/TableBody.d.ts +1 -1
- package/TableCell/TableCell.d.ts +2 -2
- package/TableFooter/TableFooter.d.ts +1 -1
- package/TableHead/TableHead.d.ts +1 -1
- package/TableHeader/TableHeader.d.ts +1 -1
- package/TablePagination/TablePagination.d.ts +1 -1
- package/TableRow/TableRow.d.ts +1 -1
- package/Tabs/Tabs.d.ts +1 -1
- package/Text/Text.d.ts +1 -1
- package/TextField/TextField.d.ts +1 -1
- package/TextToSpeech/TextToSpeech.d.ts +1 -1
- package/TimePicker/TimePicker.d.ts +3 -3
- package/TimePicker/TimePicker.js +12 -12
- package/TimeRangePicker/TimeRangePicker.d.ts +1 -1
- package/Timeline/Timeline.d.ts +1 -1
- package/TimelineItem/TimelineItem.d.ts +1 -1
- package/Timer/Timer.d.ts +1 -1
- package/ToggleButton/ToggleButton.d.ts +1 -1
- package/ToggleButtons/ToggleButtons.d.ts +1 -1
- package/Tooltip/Tooltip.d.ts +1 -1
- package/TopAppBar/TopAppBar.d.ts +1 -1
- package/Transition/Transition.d.ts +3 -3
- package/Transition/index.js +1 -2
- package/Transitions/Transitions.d.ts +2 -2
- package/Transitions/Transitions.js +2 -2
- package/Tree/Tree.d.ts +1 -1
- package/Type/Type.d.ts +1 -1
- package/VideoPlayer/VideoPlayer.d.ts +1 -1
- package/VideoPlayer/VideoPlayer.js +4 -4
- package/ViewSplit/ViewSplit.d.ts +1 -1
- package/Watch/Watch.d.ts +1 -1
- package/Weather/Weather.d.ts +4 -4
- package/Whiteboard/Whiteboard.d.ts +5 -5
- package/Widgets/Widgets.d.ts +2 -2
- package/WindowSplit/WindowSplit.d.ts +1 -1
- package/Zoom/Zoom.d.ts +1 -1
- package/esm/Append/Append.js +6 -8
- package/esm/AutoComplete/AutoComplete.js +8 -20
- package/esm/Breadcrumbs/Breadcrumbs.js +1 -3
- package/esm/Buttons/Buttons.js +8 -33
- package/esm/Calendar/Calendar.js +74 -80
- package/esm/CalendarAvailability/CalendarAvailability.js +1 -2
- package/esm/CalendarMenu/CalendarMenu.js +2 -2
- package/esm/CalendarMonth/CalendarMonth.js +65 -68
- package/esm/CalendarWeek/CalendarWeek.js +3 -7
- package/esm/Carousel/Carousel.js +4 -12
- package/esm/Chart/Chart.js +19 -25
- package/esm/Clock/Clock.js +5 -8
- package/esm/Confirm/Confirm.js +1 -2
- package/esm/DatePicker/DatePicker.js +8 -13
- package/esm/DateTimePicker/DateTimePicker.js +6 -9
- package/esm/Drawing/Drawing.js +1 -6
- package/esm/Expand/Expand.js +1 -2
- package/esm/Fade/Fade.js +1 -2
- package/esm/Focus/Focus.js +1 -2
- package/esm/Grow/Grow.js +1 -2
- package/esm/HTMLCanvas/HTMLCanvas.js +2 -5
- package/esm/ImageCrop/ImageCrop.js +2 -5
- package/esm/ImageEdit/ImageEdit.js +5 -12
- package/esm/ImageGallery/ImageGallery.js +1 -2
- package/esm/Interaction/Interaction.js +1 -2
- package/esm/Keyframes/Keyframes.js +1 -2
- package/esm/LinearMeter/LinearMeter.js +77 -80
- package/esm/Markdown/Markdown.js +41 -144
- package/esm/MenuDesktop/MenuDesktop.js +5 -6
- package/esm/Rating/Rating.js +2 -4
- package/esm/RichTextEditor/RichTextEditor.js +36 -50
- package/esm/RoundMeter/RoundMeter.js +70 -73
- package/esm/ScreenCapture/ScreenCapture.js +2 -5
- package/esm/Select/Select.js +5 -9
- package/esm/Share/Share.js +4 -5
- package/esm/Slide/Slide.js +2 -4
- package/esm/Slider/Slider.js +3 -6
- package/esm/SmartTextField/SmartTextField.js +2 -4
- package/esm/Snackbar/Snackbar.js +1 -2
- package/esm/Snackbars/Snackbars.js +3 -3
- package/esm/Space/Space.js +3 -6
- package/esm/Switch/Switch.js +1 -2
- package/esm/Tabs/Tabs.js +1 -2
- package/esm/TimePicker/TimePicker.js +27 -38
- package/esm/Timer/Timer.js +3 -4
- package/esm/Tooltip/Tooltip.js +1 -2
- package/esm/ViewSplit/ViewSplit.js +1 -2
- package/esm/Watch/Watch.js +4 -5
- package/esm/Weather/Weather.js +14 -17
- package/esm/Whiteboard/Whiteboard.js +1 -4
- package/esm/WindowSplit/WindowSplit.js +1 -2
- package/esm/Zoom/Zoom.js +1 -2
- package/esm/index.js +1 -1
- package/esm/useForm/useForm.js +1 -4
- package/esm/useLocation/useLocation.js +1 -2
- package/esm/useSwipe/useSwipe.js +1 -2
- package/esm/utils.js +3 -11
- package/index.js +2 -3
- package/package.json +3 -3
- package/types.d.ts +27 -27
- package/useForm/useForm.d.ts +2 -2
- package/useForm/validate.d.ts +12 -12
- package/useForm/validate.js +20 -20
- package/useLocation/useLocation.d.ts +1 -1
- package/useMediaQuery/useMediaQuery.d.ts +1 -1
- package/useScroll/useScroll.d.ts +2 -2
- package/useSwipe/useSwipe.d.ts +2 -2
- package/useVisible/useVisible.d.ts +2 -2
package/ImageCrop/ImageCrop.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IBaseElement, IPropsAny } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type TImageCrop = {
|
|
4
4
|
x?: number;
|
|
5
5
|
y?: number;
|
|
6
6
|
width?: number;
|
|
7
7
|
height?: number;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type IImageCrop = IBaseElement & {
|
|
10
10
|
image?: string | HTMLCanvasElement;
|
|
11
11
|
minWidth?: number;
|
|
12
12
|
minHeight?: number;
|
package/ImageCrop/ImageCrop.js
CHANGED
|
@@ -412,7 +412,7 @@ const ImageCrop = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
412
412
|
// Move
|
|
413
413
|
const onMove = (x, y) => {
|
|
414
414
|
if (refs.mouseDown.current && refs.previousMouseEvent.current) {
|
|
415
|
-
var _refs$mouseDown$curre2, _refs$mouseDown$curre3, _refs$mouseDown$curre4, _refs$mouseDown$curre5, _refs$mouseDown$curre6, _refs$mouseDown$curre7, _refs$mouseDown$curre8, _refs$mouseDown$curre9, _refs$mouseDown$
|
|
415
|
+
var _refs$mouseDown$curre2, _refs$mouseDown$curre3, _refs$mouseDown$curre4, _refs$mouseDown$curre5, _refs$mouseDown$curre6, _refs$mouseDown$curre7, _refs$mouseDown$curre8, _refs$mouseDown$curre9, _refs$mouseDown$curre0, _refs$mouseDown$curre1;
|
|
416
416
|
const {
|
|
417
417
|
top: previousTop,
|
|
418
418
|
left: previousLeft
|
|
@@ -441,8 +441,8 @@ const ImageCrop = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
441
441
|
if (((_refs$selector$curren5 = refs.selector.current) === null || _refs$selector$curren5 === void 0 ? void 0 : _refs$selector$curren5.left) < previousLeft && left < ((_refs$selector$curren6 = refs.selector.current) === null || _refs$selector$curren6 === void 0 ? void 0 : _refs$selector$curren6.left) && (top <= 0 || ((_refs$selector$curren7 = refs.selector.current) === null || _refs$selector$curren7 === void 0 ? void 0 : _refs$selector$curren7.top) + ((_refs$selector$curren8 = refs.selector.current) === null || _refs$selector$curren8 === void 0 ? void 0 : _refs$selector$curren8.height) >= rootRect.height)) return;
|
|
442
442
|
}
|
|
443
443
|
if (top < previousTop) {
|
|
444
|
-
var _refs$selector$curren9, _refs$selector$
|
|
445
|
-
if (((_refs$selector$curren9 = refs.selector.current) === null || _refs$selector$curren9 === void 0 ? void 0 : _refs$selector$curren9.top) < previousTop && top < ((_refs$selector$
|
|
444
|
+
var _refs$selector$curren9, _refs$selector$curren0, _refs$selector$curren1, _refs$selector$curren10;
|
|
445
|
+
if (((_refs$selector$curren9 = refs.selector.current) === null || _refs$selector$curren9 === void 0 ? void 0 : _refs$selector$curren9.top) < previousTop && top < ((_refs$selector$curren0 = refs.selector.current) === null || _refs$selector$curren0 === void 0 ? void 0 : _refs$selector$curren0.top) && (left <= 0 || ((_refs$selector$curren1 = refs.selector.current) === null || _refs$selector$curren1 === void 0 ? void 0 : _refs$selector$curren1.left) + ((_refs$selector$curren10 = refs.selector.current) === null || _refs$selector$curren10 === void 0 ? void 0 : _refs$selector$curren10.width) >= rootRect.width)) return;
|
|
446
446
|
}
|
|
447
447
|
|
|
448
448
|
// Max surface
|
|
@@ -510,9 +510,9 @@ const ImageCrop = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
510
510
|
let width = (0, _utils.clamp)(selectorRect.right - left, 0);
|
|
511
511
|
let height = (0, _utils.clamp)(selectorRect.bottom - top, 0);
|
|
512
512
|
if (refs.aspectRatio.current !== undefined) {
|
|
513
|
-
var _refs$selector$
|
|
513
|
+
var _refs$selector$curren11;
|
|
514
514
|
// Left
|
|
515
|
-
if (left < refs.selector.current.left && refs.selector.current.left < previousLeft && ((_refs$selector$
|
|
515
|
+
if (left < refs.selector.current.left && refs.selector.current.left < previousLeft && ((_refs$selector$curren11 = refs.selector.current) === null || _refs$selector$curren11 === void 0 ? void 0 : _refs$selector$curren11.top) === 0) return;
|
|
516
516
|
|
|
517
517
|
// Max surface
|
|
518
518
|
if (width + width / refs.aspectRatio.current >= height + height * refs.aspectRatio.current) {
|
|
@@ -645,9 +645,9 @@ const ImageCrop = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
645
645
|
|
|
646
646
|
// Left
|
|
647
647
|
if (refs.aspectRatio.current !== undefined) {
|
|
648
|
-
var _refs$selector$
|
|
648
|
+
var _refs$selector$curren12, _refs$selector$curren13;
|
|
649
649
|
// Left
|
|
650
|
-
if (left < refs.selector.current.left && ((_refs$selector$
|
|
650
|
+
if (left < refs.selector.current.left && ((_refs$selector$curren12 = refs.selector.current) === null || _refs$selector$curren12 === void 0 ? void 0 : _refs$selector$curren12.top) + ((_refs$selector$curren13 = refs.selector.current) === null || _refs$selector$curren13 === void 0 ? void 0 : _refs$selector$curren13.height) >= rootRect.height) return;
|
|
651
651
|
height = width / refs.aspectRatio.current;
|
|
652
652
|
|
|
653
653
|
// Max width
|
|
@@ -733,15 +733,15 @@ const ImageCrop = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
733
733
|
width,
|
|
734
734
|
height
|
|
735
735
|
}));
|
|
736
|
-
} else if (((_refs$mouseDown$
|
|
736
|
+
} else if (((_refs$mouseDown$curre0 = refs.mouseDown.current) === null || _refs$mouseDown$curre0 === void 0 ? void 0 : _refs$mouseDown$curre0.version) === 'left') {
|
|
737
737
|
const inc = x - refs.previousMouseEvent.current.clientX;
|
|
738
738
|
const left = (0, _utils.clamp)(selectorRect.left + inc, 0);
|
|
739
739
|
if (selectorRect.right - left < 0) refs.mouseDown.current.version = 'right';
|
|
740
740
|
let width = (0, _utils.clamp)(selectorRect.right - left, 0);
|
|
741
741
|
let height = refs.selector.current.height;
|
|
742
742
|
if (refs.aspectRatio.current !== undefined) {
|
|
743
|
-
var _refs$selector$
|
|
744
|
-
if (left < refs.selector.current.left && ((_refs$selector$
|
|
743
|
+
var _refs$selector$curren14, _refs$selector$curren15;
|
|
744
|
+
if (left < refs.selector.current.left && ((_refs$selector$curren14 = refs.selector.current) === null || _refs$selector$curren14 === void 0 ? void 0 : _refs$selector$curren14.top) + ((_refs$selector$curren15 = refs.selector.current) === null || _refs$selector$curren15 === void 0 ? void 0 : _refs$selector$curren15.height) >= rootRect.height) return;
|
|
745
745
|
height = width / refs.aspectRatio.current;
|
|
746
746
|
|
|
747
747
|
// Max width
|
|
@@ -761,7 +761,7 @@ const ImageCrop = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
761
761
|
width,
|
|
762
762
|
height
|
|
763
763
|
}));
|
|
764
|
-
} else if (((_refs$mouseDown$
|
|
764
|
+
} else if (((_refs$mouseDown$curre1 = refs.mouseDown.current) === null || _refs$mouseDown$curre1 === void 0 ? void 0 : _refs$mouseDown$curre1.version) === 'right') {
|
|
765
765
|
const inc = x - refs.previousMouseEvent.current.clientX;
|
|
766
766
|
if (selectorRect.width + inc < 0) refs.mouseDown.current.version = 'left';
|
|
767
767
|
let width = (0, _utils.clamp)(Math.abs(selectorRect.width + inc), 0, rootRect.width - selectorRect.left);
|
|
@@ -985,19 +985,19 @@ const ImageCrop = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
985
985
|
});
|
|
986
986
|
}, []);
|
|
987
987
|
const onTouchStartBorder = version => event => {
|
|
988
|
-
var _refs$selector$
|
|
988
|
+
var _refs$selector$curren16, _refs$selector$curren17, _refs$selector$curren18, _refs$selector$curren19;
|
|
989
989
|
setMouseDown({
|
|
990
990
|
version,
|
|
991
|
-
top: ((_refs$selector$
|
|
992
|
-
left: ((_refs$selector$
|
|
991
|
+
top: ((_refs$selector$curren16 = refs.selector.current) === null || _refs$selector$curren16 === void 0 ? void 0 : _refs$selector$curren16.top) + ((_refs$selector$curren17 = refs.selector.current) === null || _refs$selector$curren17 === void 0 ? void 0 : _refs$selector$curren17.height),
|
|
992
|
+
left: ((_refs$selector$curren18 = refs.selector.current) === null || _refs$selector$curren18 === void 0 ? void 0 : _refs$selector$curren18.left) + ((_refs$selector$curren19 = refs.selector.current) === null || _refs$selector$curren19 === void 0 ? void 0 : _refs$selector$curren19.width)
|
|
993
993
|
});
|
|
994
994
|
};
|
|
995
995
|
const onMouseDownBorder = version => event => {
|
|
996
|
-
var _refs$selector$
|
|
996
|
+
var _refs$selector$curren20, _refs$selector$curren21, _refs$selector$curren22, _refs$selector$curren23;
|
|
997
997
|
setMouseDown({
|
|
998
998
|
version,
|
|
999
|
-
top: ((_refs$selector$
|
|
1000
|
-
left: ((_refs$selector$
|
|
999
|
+
top: ((_refs$selector$curren20 = refs.selector.current) === null || _refs$selector$curren20 === void 0 ? void 0 : _refs$selector$curren20.top) + ((_refs$selector$curren21 = refs.selector.current) === null || _refs$selector$curren21 === void 0 ? void 0 : _refs$selector$curren21.height),
|
|
1000
|
+
left: ((_refs$selector$curren22 = refs.selector.current) === null || _refs$selector$curren22 === void 0 ? void 0 : _refs$selector$curren22.left) + ((_refs$selector$curren23 = refs.selector.current) === null || _refs$selector$curren23 === void 0 ? void 0 : _refs$selector$curren23.width)
|
|
1001
1001
|
});
|
|
1002
1002
|
};
|
|
1003
1003
|
const rect = (_refs$root$current4 = refs.root.current) === null || _refs$root$current4 === void 0 ? void 0 : _refs$root$current4.getBoundingClientRect();
|
package/ImageEdit/ImageEdit.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { TMethod } from '@onesy/models';
|
|
3
3
|
import { ILine } from '../Line/Line';
|
|
4
4
|
import { IElementReference, IElement, IPropsAny } from '../types';
|
|
5
|
-
export
|
|
5
|
+
export type TImageEditFilter = {
|
|
6
6
|
label?: string;
|
|
7
7
|
Icon?: IElementReference;
|
|
8
8
|
value?: string;
|
|
@@ -10,7 +10,7 @@ export declare type TImageEditFilter = {
|
|
|
10
10
|
renderIconButton: (value: string, selected: boolean, onChangeFilter: TMethod) => IElement;
|
|
11
11
|
renderSlider: (value: string, filterValuesCopy: any, onFilterSliderChange: TMethod) => IElement;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type IImageEdit = Omit<ILine, 'onChange'> & {
|
|
14
14
|
image?: string | HTMLCanvasElement;
|
|
15
15
|
name?: string;
|
|
16
16
|
type?: string;
|
package/ImageEdit/ImageEdit.js
CHANGED
|
@@ -172,12 +172,12 @@ const ImageEdit = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
172
172
|
return (theme === null || theme === void 0 || (_theme$elements9 = theme.elements) === null || _theme$elements9 === void 0 ? void 0 : _theme$elements9.NumericTextField) || _NumericTextField.default;
|
|
173
173
|
}, [theme]);
|
|
174
174
|
const ImageCrop = _react.default.useMemo(() => {
|
|
175
|
-
var _theme$
|
|
176
|
-
return (theme === null || theme === void 0 || (_theme$
|
|
175
|
+
var _theme$elements0;
|
|
176
|
+
return (theme === null || theme === void 0 || (_theme$elements0 = theme.elements) === null || _theme$elements0 === void 0 ? void 0 : _theme$elements0.ImageCrop) || _ImageCrop.default;
|
|
177
177
|
}, [theme]);
|
|
178
178
|
const Chip = _react.default.useMemo(() => {
|
|
179
|
-
var _theme$
|
|
180
|
-
return (theme === null || theme === void 0 || (_theme$
|
|
179
|
+
var _theme$elements1;
|
|
180
|
+
return (theme === null || theme === void 0 || (_theme$elements1 = theme.elements) === null || _theme$elements1 === void 0 ? void 0 : _theme$elements1.Chip) || _Chip.default;
|
|
181
181
|
}, [theme]);
|
|
182
182
|
const {
|
|
183
183
|
tonal = true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ILine } from '../Line/Line';
|
|
3
3
|
import { IElementReference, IMediaObject } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type IImageGallery = ILine & {
|
|
5
5
|
version?: 'regular' | 'modal';
|
|
6
6
|
open?: boolean;
|
|
7
7
|
size?: 'small' | 'regular' | 'large';
|
package/ImageList/ImageList.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IBaseElement, IValueBreakpoints } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type IImageList = IBaseElement & {
|
|
4
4
|
version?: 'standard' | 'vowen' | 'masonry';
|
|
5
5
|
gap?: number | Partial<Record<IValueBreakpoints, number>>;
|
|
6
6
|
rowGap?: number | Partial<Record<IValueBreakpoints, number>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ILine } from '../Line/Line';
|
|
3
3
|
import { IValueBreakpoints } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type IImageListItem = ILine & {
|
|
5
5
|
rows?: number | Partial<Record<IValueBreakpoints, number>>;
|
|
6
6
|
columns?: number | Partial<Record<IValueBreakpoints, number>>;
|
|
7
7
|
version?: 'standard' | 'vowen' | 'masonry';
|
package/Info/Info.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import OnesySubscription from '@onesy/subscription/OnesySubscription';
|
|
3
3
|
import { IBaseElement } from '../types';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type TMethodsVersion = 'add' | 'pulse' | 'remove';
|
|
5
|
+
export type IInteraction = IBaseElement & {
|
|
6
6
|
wave?: boolean;
|
|
7
7
|
background?: boolean;
|
|
8
8
|
border?: boolean;
|
package/Keyframes/Keyframes.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TTransitionsDurationProperties } from '@onesy/style-react';
|
|
3
3
|
import { IBaseElement, IRef } from '../types';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type TKeyframesStatus = 'appended' | 'add' | 'adding' | 'added' | 'removed';
|
|
5
|
+
export type IKeyframe = {
|
|
6
6
|
name: string;
|
|
7
7
|
timeout: number;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type IKeyframes = Omit<IBaseElement, 'className'> & {
|
|
10
10
|
ref?: IRef;
|
|
11
11
|
className?: boolean;
|
|
12
12
|
prefix?: string;
|
package/Keyframes/index.js
CHANGED
|
@@ -40,5 +40,4 @@ Object.keys(_Keyframes).forEach(function (key) {
|
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
|
-
function
|
|
44
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
43
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
package/Label/Label.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ILine } from '../Line/Line';
|
|
3
3
|
import { IColor, IVersion, IElement, IPropsAny } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type ILabel = Omit<ILine, 'onChange'> & {
|
|
5
5
|
colorUnchecked?: IColor;
|
|
6
6
|
version?: IVersion;
|
|
7
7
|
position?: 'start' | 'top' | 'bottom' | 'end';
|
package/Labels/Labels.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ILine } from '../Line/Line';
|
|
3
3
|
import { IColor, IVersion, IElement, IPropsAny } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type ILabels = Omit<ILine, 'onChange'> & {
|
|
5
5
|
colorUnchecked?: IColor;
|
|
6
6
|
version?: IVersion;
|
|
7
7
|
name?: IElement;
|
package/Line/Line.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IBaseElement, IPropsAny, IValueBreakpoints } from '../types';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
3
|
+
export type TLineAlign = 'inherit' | 'initial' | 'flex-start' | 'center' | 'flex-end' | 'baseline' | 'stretch' | 'unset';
|
|
4
|
+
export type TLineJustify = 'inherit' | 'initial' | 'flex-start' | 'center' | 'flex-end' | 'space-around' | 'space-between' | 'space-evenly' | 'unset';
|
|
5
|
+
export type TLineDirection = 'inherit' | 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
6
|
+
export type TLineWrap = 'inherit' | 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
7
|
+
export type TLineDisplay = 'inherit' | 'flex' | 'inline-flex';
|
|
8
|
+
export type ILine = IBaseElement & {
|
|
9
9
|
display?: TLineDisplay | Partial<Record<IValueBreakpoints, TLineDisplay>>;
|
|
10
10
|
direction?: TLineDirection | Partial<Record<IValueBreakpoints, TLineDirection>>;
|
|
11
11
|
align?: TLineAlign | Partial<Record<IValueBreakpoints, TLineAlign>>;
|
package/LineChart/LineChart.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TMethod } from '@onesy/models';
|
|
3
3
|
import { IChart, IChartValueValues } from '../Chart/Chart';
|
|
4
|
-
export
|
|
4
|
+
export type ILineChartItem = IChart & {
|
|
5
5
|
name?: string;
|
|
6
6
|
refs?: {
|
|
7
7
|
wrapper?: HTMLElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IBaseElement, IStyle, IElement, IPropsAny } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type ILinearMeter = IBaseElement & {
|
|
4
4
|
parts?: number;
|
|
5
5
|
lineCap?: 'inherit' | 'round' | 'square' | 'butt';
|
|
6
6
|
orientation?: 'vertical' | 'horizontal';
|
package/Link/Link.d.ts
CHANGED
package/Links/Links.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IBaseElement, IMediaObject } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type ILinksItem = {
|
|
4
4
|
version?: 'primary' | 'secondary' | 'default';
|
|
5
5
|
name?: any;
|
|
6
6
|
url?: string;
|
|
@@ -8,7 +8,7 @@ export declare type ILinksItem = {
|
|
|
8
8
|
share?: boolean;
|
|
9
9
|
props?: any;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type ILinks = IBaseElement & {
|
|
12
12
|
name?: any;
|
|
13
13
|
short_description?: any;
|
|
14
14
|
links?: ILinksItem[];
|
package/List/List.d.ts
CHANGED
package/ListItem/ListItem.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ISurface } from '../Surface/Surface';
|
|
3
3
|
import { IColor, IElement, IElementReference, IPropsAny } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type IListItem = ISurface & {
|
|
5
5
|
colorSelected?: IColor;
|
|
6
6
|
inset?: boolean;
|
|
7
7
|
primary?: IElement;
|
package/ListItem/ListItem.js
CHANGED
|
@@ -222,7 +222,7 @@ const useStyle = (0, _styleReact.style)(theme => {
|
|
|
222
222
|
name: 'onesy-ListItem'
|
|
223
223
|
});
|
|
224
224
|
const ListItem = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
225
|
-
var _type, _type2, _type3, _type4, _type5, _type6, _props, _props2, _props3, _type7, _type8, _type9,
|
|
225
|
+
var _type, _type2, _type3, _type4, _type5, _type6, _props, _props2, _props3, _type7, _type8, _type9, _type0, _type1, _type10, _type11, _props4, _props5, _props6, _type12;
|
|
226
226
|
const theme = (0, _styleReact.useOnesyTheme)();
|
|
227
227
|
const props = _react.default.useMemo(() => {
|
|
228
228
|
var _theme$ui, _theme$ui2;
|
|
@@ -380,10 +380,10 @@ const ListItem = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
380
380
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('ListItem', theme) && ['onesy-ListItem-text', 'onesy-ListItem-text-tertiary'], TertiaryProps === null || TertiaryProps === void 0 ? void 0 : TertiaryProps.className, classes.text, classes.text_tertiary]),
|
|
381
381
|
style: _objectSpread(_objectSpread({}, styles.tertiary), TertiaryProps === null || TertiaryProps === void 0 ? void 0 : TertiaryProps.style)
|
|
382
382
|
}), tertiary) : tertiary)), end && /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({}, AsideProps, AsideEndProps, {
|
|
383
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('ListItem', theme) && ['onesy-ListItem-aside', 'onesy-ListItem-end', `onesy-ListItem-end-${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(end === null || end === void 0 || (_type8 = end.type) === null || _type8 === void 0 ? void 0 : _type8.displayName) ? 'button' : ['onesy-Switch'].includes(end === null || end === void 0 || (_type9 = end.type) === null || _type9 === void 0 ? void 0 : _type9.displayName) ? 'switch' : 'icon'}`], AsideProps === null || AsideProps === void 0 ? void 0 : AsideProps.className, AsideEndProps === null || AsideEndProps === void 0 ? void 0 : AsideEndProps.classname, classes.aside, classes.end, classes[`align_${endAlign}`], classes[`${menuItem ? 'menuItem_' : ''}end_${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(end === null || end === void 0 || (
|
|
383
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('ListItem', theme) && ['onesy-ListItem-aside', 'onesy-ListItem-end', `onesy-ListItem-end-${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(end === null || end === void 0 || (_type8 = end.type) === null || _type8 === void 0 ? void 0 : _type8.displayName) ? 'button' : ['onesy-Switch'].includes(end === null || end === void 0 || (_type9 = end.type) === null || _type9 === void 0 ? void 0 : _type9.displayName) ? 'switch' : 'icon'}`], AsideProps === null || AsideProps === void 0 ? void 0 : AsideProps.className, AsideEndProps === null || AsideEndProps === void 0 ? void 0 : AsideEndProps.classname, classes.aside, classes.end, classes[`align_${endAlign}`], classes[`${menuItem ? 'menuItem_' : ''}end_${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(end === null || end === void 0 || (_type0 = end.type) === null || _type0 === void 0 ? void 0 : _type0.displayName) ? 'button' : ['onesy-Switch'].includes(end === null || end === void 0 || (_type1 = end.type) === null || _type1 === void 0 ? void 0 : _type1.displayName) ? 'switch' : 'icon'}`], classes[`${menuItem ? 'menuItem_' : ''}end_${['onesy-Avatar', 'onesy-IconButton', 'onesy-Checkbox', 'onesy-Radio'].includes(end === null || end === void 0 || (_type10 = end.type) === null || _type10 === void 0 ? void 0 : _type10.displayName) ? 'button' : ['onesy-Switch'].includes(end === null || end === void 0 || (_type11 = end.type) === null || _type11 === void 0 ? void 0 : _type11.displayName) ? 'switch' : 'icon'}_size_${size}`]])
|
|
384
384
|
}), (0, _utils.is)('string', end) ? end : /*#__PURE__*/_react.default.cloneElement(end, {
|
|
385
385
|
color: ((_props4 = end.props) === null || _props4 === void 0 ? void 0 : _props4.color) || 'inherit',
|
|
386
|
-
size: ((_props5 = end.props) === null || _props5 === void 0 ? void 0 : _props5.size) !== undefined ? (_props6 = end.props) === null || _props6 === void 0 ? void 0 : _props6.size : ['onesy-Switch'].includes(end === null || end === void 0 || (
|
|
386
|
+
size: ((_props5 = end.props) === null || _props5 === void 0 ? void 0 : _props5.size) !== undefined ? (_props6 = end.props) === null || _props6 === void 0 ? void 0 : _props6.size : ['onesy-Switch'].includes(end === null || end === void 0 || (_type12 = end.type) === null || _type12 === void 0 ? void 0 : _type12.displayName) ? 'small' : 'regular',
|
|
387
387
|
disabled
|
|
388
388
|
}))), footer);
|
|
389
389
|
});
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ILinearProress } from '../LinearProgress/LinearProgress';
|
|
3
3
|
import { IElementReference, IPropsAny } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type IMainProgressStartArgument = {
|
|
5
5
|
tonal?: boolean;
|
|
6
6
|
color?: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type IMainProgressValue = {
|
|
9
9
|
start: (value?: IMainProgressStartArgument) => void;
|
|
10
10
|
increment: () => void;
|
|
11
11
|
update: (value: number) => void;
|
|
12
12
|
done: () => void;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type IMainProgress = ILinearProress & {
|
|
15
15
|
min?: number;
|
|
16
16
|
max?: number;
|
|
17
17
|
firstIncrement?: boolean;
|
package/Markdown/Markdown.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IBaseElement } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type IMarkdown = IBaseElement & {
|
|
4
4
|
value?: string;
|
|
5
5
|
render?: (element: string, className: string, style: string, ...args: any[]) => string;
|
|
6
6
|
elementClassNames?: Record<string, string>;
|
package/Masonry/Masonry.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ILine } from '../Line/Line';
|
|
3
3
|
import { IValueBreakpoints } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type IMasonry = Omit<ILine, 'gap'> & {
|
|
5
5
|
gap?: number | Partial<Record<IValueBreakpoints, number>>;
|
|
6
6
|
columns?: number | Partial<Record<IValueBreakpoints, number>>;
|
|
7
7
|
noMasonry?: boolean;
|
package/Medias/Medias.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ILine } from '../Line/Line';
|
|
3
3
|
import { IMediaObject, IPropsAny } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type IMediasItem = {
|
|
5
5
|
value: IMediaObject;
|
|
6
6
|
props?: any;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type IMediasMediaVersion = 'embed' | 'image' | 'audio' | 'video' | 'other';
|
|
9
|
+
export type IMedias = ILine & {
|
|
10
10
|
size?: 'small' | 'regular' | 'large';
|
|
11
11
|
values?: IMediasItem | IMediasItem[];
|
|
12
12
|
imageGallery?: boolean;
|
package/Menu/Menu.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const MENUS: {
|
|
|
7
7
|
add: (value: any) => void;
|
|
8
8
|
remove: (value: any) => void;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type IMenu = Omit<ITooltip, 'name' | 'label'> & {
|
|
11
11
|
open?: boolean;
|
|
12
12
|
openDefault?: boolean;
|
|
13
13
|
name?: ((method: (item: any, index: number) => any) => any) | IElement;
|
package/Menu/Menu.js
CHANGED
|
@@ -190,9 +190,9 @@ const Menu = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
190
190
|
const onClose = () => {
|
|
191
191
|
if (open_ === undefined) setOpen(false);
|
|
192
192
|
if (refs.props.current.autoSelectOnBlur) {
|
|
193
|
-
var _item$
|
|
193
|
+
var _item$props0, _item$props1, _item$props10;
|
|
194
194
|
const item = _react.default.Children.toArray(refs.props.current.children)[refs.preselected.current];
|
|
195
|
-
if (item && (0, _utils.is)('function', refs.props.current.onSelect)) refs.props.current.onSelect(((_item$
|
|
195
|
+
if (item && (0, _utils.is)('function', refs.props.current.onSelect)) refs.props.current.onSelect(((_item$props0 = item.props) === null || _item$props0 === void 0 ? void 0 : _item$props0.value) !== undefined ? (_item$props1 = item.props) === null || _item$props1 === void 0 ? void 0 : _item$props1.value : (_item$props10 = item.props) === null || _item$props10 === void 0 ? void 0 : _item$props10.primary);
|
|
196
196
|
}
|
|
197
197
|
setPreselected('');
|
|
198
198
|
if ((0, _utils.is)('function', onClose_)) onClose_();
|
|
@@ -209,16 +209,16 @@ const Menu = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
209
209
|
}
|
|
210
210
|
if (open) MENUS.add(id);else MENUS.remove(id);
|
|
211
211
|
const methodItem = (item, index) => {
|
|
212
|
-
var _item$
|
|
212
|
+
var _item$props11, _item$props12, _item$props13, _item$props14;
|
|
213
213
|
return _objectSpread({
|
|
214
214
|
key: item.key || index,
|
|
215
215
|
role: 'menuitem',
|
|
216
216
|
menuId: id,
|
|
217
|
-
MenuProps: _objectSpread(_objectSpread({}, (_item$
|
|
218
|
-
className: (0, _styleReact.classNames)([(_item$
|
|
217
|
+
MenuProps: _objectSpread(_objectSpread({}, (_item$props11 = item.props) === null || _item$props11 === void 0 ? void 0 : _item$props11.MenuProps), {}, {
|
|
218
|
+
className: (0, _styleReact.classNames)([(_item$props12 = item.props) === null || _item$props12 === void 0 || (_item$props12 = _item$props12.MenuProps) === null || _item$props12 === void 0 ? void 0 : _item$props12.className, refs.menuClassName.current])
|
|
219
219
|
}),
|
|
220
220
|
onClose
|
|
221
|
-
}, ((_item$
|
|
221
|
+
}, ((_item$props13 = item.props) !== null && _item$props13 !== void 0 && _item$props13.button || (_item$props14 = item.props) !== null && _item$props14 !== void 0 && _item$props14.href) && !item.props.disabled ? {
|
|
222
222
|
onMouseEnter: () => {
|
|
223
223
|
setPreselected(index);
|
|
224
224
|
},
|
|
@@ -227,16 +227,16 @@ const Menu = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
227
227
|
},
|
|
228
228
|
preselected: index === preselected,
|
|
229
229
|
onClick: event => {
|
|
230
|
-
var _item$
|
|
231
|
-
if ((0, _utils.is)('function', (_item$
|
|
232
|
-
if ((_item$
|
|
230
|
+
var _item$props15, _item$props16, _item$props17;
|
|
231
|
+
if ((0, _utils.is)('function', (_item$props15 = item.props) === null || _item$props15 === void 0 ? void 0 : _item$props15.onClick)) (_item$props16 = item.props) === null || _item$props16 === void 0 || _item$props16.onClick(event);
|
|
232
|
+
if ((_item$props17 = item.props) !== null && _item$props17 !== void 0 && _item$props17.menuCloseOnClick) onClose();
|
|
233
233
|
},
|
|
234
234
|
onKeyDown: event => {
|
|
235
235
|
if (event.target === event.currentTarget && event.key === 'Enter') {
|
|
236
|
-
var _item$
|
|
237
|
-
if ((0, _utils.is)('function', (_item$
|
|
238
|
-
if ((0, _utils.is)('function', (_item$
|
|
239
|
-
if ((_item$
|
|
236
|
+
var _item$props18, _item$props19, _item$props20, _item$props21, _item$props22;
|
|
237
|
+
if ((0, _utils.is)('function', (_item$props18 = item.props) === null || _item$props18 === void 0 ? void 0 : _item$props18.onClick)) (_item$props19 = item.props) === null || _item$props19 === void 0 || _item$props19.onClick();
|
|
238
|
+
if ((0, _utils.is)('function', (_item$props20 = item.props) === null || _item$props20 === void 0 ? void 0 : _item$props20.onKeyDown)) (_item$props21 = item.props) === null || _item$props21 === void 0 || _item$props21.onKeyDown(event);
|
|
239
|
+
if ((_item$props22 = item.props) !== null && _item$props22 !== void 0 && _item$props22.menuCloseOnClick) onClose();
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
} : {});
|
|
@@ -2,14 +2,14 @@ import React from 'react';
|
|
|
2
2
|
import { TTransitionStatus } from '../Transition';
|
|
3
3
|
import { ILine } from '../Line/Line';
|
|
4
4
|
import { IElement, IStyle, IElementReference, IPropsAny, IVersion } from '../types';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type TMenuDesktopValue = string | number;
|
|
6
|
+
export type TMenuDesktopItem = {
|
|
7
7
|
value?: TMenuDesktopValue;
|
|
8
8
|
label?: IElement;
|
|
9
9
|
name?: IElement;
|
|
10
10
|
menu?: IElement;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type IMenuDesktop = Omit<ILine, 'onChange'> & {
|
|
13
13
|
version?: IVersion;
|
|
14
14
|
items?: Array<TMenuDesktopItem>;
|
|
15
15
|
valueDefault?: TMenuDesktopValue;
|
package/MenuItem/MenuItem.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IElement, IHTMLElement, IElementReference, IPropsAny } from '../types';
|
|
3
3
|
import { IListItem } from '../ListItem/ListItem';
|
|
4
|
-
export
|
|
4
|
+
export type IMenuItem = IListItem & {
|
|
5
5
|
menu?: IElement;
|
|
6
6
|
menuId?: string;
|
|
7
7
|
menuOpen?: boolean;
|
package/Meta/Meta.d.ts
CHANGED
package/Modal/Modal.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TMethod } from '@onesy/utils';
|
|
3
3
|
import { IBaseElement, IElementReference, IPropsAny, IRef } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type IModal = IBaseElement & {
|
|
5
5
|
open?: boolean;
|
|
6
6
|
openDefault?: boolean;
|
|
7
7
|
mainRef?: IRef;
|