@onesy/ui-react 1.0.1 → 1.0.2
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 +1 -1
- package/Accordion/Accordion.js +1 -1
- package/Append/Append.d.ts +1 -1
- package/AreaChartItem/AreaChartItem.js +8 -8
- package/AudioPlayer/AudioPlayer.js +16 -16
- package/AudioRecorder/AudioRecorder.js +5 -5
- package/AutoComplete/AutoComplete.d.ts +2 -2
- package/Avatar/Avatar.js +4 -4
- package/BubbleChartItem/BubbleChartItem.js +6 -6
- package/Calendar/Calendar.d.ts +2 -2
- package/Calendar/Calendar.js +4 -4
- package/CalendarMonth/CalendarMonth.d.ts +3 -3
- package/CalendarMonth/CalendarMonth.js +2 -2
- package/CalendarViews/CalendarViews.d.ts +1 -1
- package/Carousel/Carousel.d.ts +2 -2
- package/Chart/Chart.d.ts +1 -1
- package/Clock/Clock.d.ts +4 -4
- package/Clock/Clock.js +11 -11
- package/ColumnChartItem/ColumnChartItem.js +6 -6
- package/Confirm/Confirm.js +4 -4
- package/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/DragAndDropList/DragAndDropList.js +5 -5
- package/Drawing/Drawing.d.ts +1 -1
- package/FileChoose/FileChoose.d.ts +1 -1
- package/Grid/Grid.d.ts +1 -1
- package/HTMLCanvas/HTMLCanvas.js +5 -5
- package/ImageCrop/ImageCrop.d.ts +1 -1
- package/ImageCrop/ImageCrop.js +22 -22
- package/ImageEdit/ImageEdit.d.ts +1 -1
- package/ImageEdit/ImageEdit.js +9 -9
- package/ImageGallery/ImageGallery.js +11 -11
- package/Interaction/Interaction.d.ts +1 -1
- package/Keyframes/Keyframes.d.ts +1 -1
- package/Line/Line.d.ts +5 -5
- package/LineChartItem/LineChartItem.js +7 -7
- package/MainProgress/MainProgress.js +13 -13
- package/Medias/Medias.d.ts +1 -1
- package/MenuDesktop/MenuDesktop.d.ts +2 -2
- package/NavigationBar/NavigationBar.d.ts +1 -1
- package/NavigationItem/NavigationItem.d.ts +1 -1
- package/Parallax/Parallax.d.ts +1 -1
- package/RichTextEditor/RichTextEditor.js +33 -33
- package/ScatterChartItem/ScatterChartItem.js +6 -6
- package/ScreenCapture/ScreenCapture.d.ts +1 -1
- package/ScreenCapture/ScreenCapture.js +4 -4
- package/Section/Section.d.ts +1 -1
- package/Slider/Slider.d.ts +1 -1
- package/SmartTextField/SmartTextField.js +24 -24
- package/TableCell/TableCell.d.ts +1 -1
- package/TimePicker/TimePicker.d.ts +2 -2
- package/Transition/Transition.d.ts +1 -1
- package/Transitions/Transitions.d.ts +1 -1
- package/Tree/Tree.js +2 -2
- package/VideoPlayer/VideoPlayer.js +17 -17
- package/Weather/Weather.d.ts +3 -3
- package/esm/Accordion/Accordion.js +1 -1
- package/esm/AreaChartItem/AreaChartItem.js +8 -8
- package/esm/AudioPlayer/AudioPlayer.js +16 -16
- package/esm/AudioRecorder/AudioRecorder.js +5 -5
- package/esm/Avatar/Avatar.js +2 -2
- package/esm/BubbleChartItem/BubbleChartItem.js +6 -6
- package/esm/Calendar/Calendar.js +4 -4
- package/esm/CalendarMonth/CalendarMonth.js +2 -2
- package/esm/Clock/Clock.js +11 -11
- package/esm/ColumnChartItem/ColumnChartItem.js +6 -6
- package/esm/Confirm/Confirm.js +4 -4
- package/esm/DragAndDropList/DragAndDropList.js +5 -5
- package/esm/HTMLCanvas/HTMLCanvas.js +5 -5
- package/esm/ImageCrop/ImageCrop.js +22 -22
- package/esm/ImageEdit/ImageEdit.js +9 -9
- package/esm/ImageGallery/ImageGallery.js +11 -11
- package/esm/LineChartItem/LineChartItem.js +7 -7
- package/esm/MainProgress/MainProgress.js +13 -13
- package/esm/RichTextEditor/RichTextEditor.js +33 -33
- package/esm/ScatterChartItem/ScatterChartItem.js +6 -6
- package/esm/ScreenCapture/ScreenCapture.js +4 -4
- package/esm/SmartTextField/SmartTextField.js +24 -24
- package/esm/Tree/Tree.js +2 -2
- package/esm/VideoPlayer/VideoPlayer.js +17 -17
- package/esm/index.js +1 -1
- package/esm/useScroll/useScroll.js +2 -2
- package/package.json +1 -1
- package/types.d.ts +23 -23
- package/useForm/validate.d.ts +6 -6
- package/useScroll/useScroll.d.ts +1 -1
- package/useScroll/useScroll.js +2 -2
@@ -42,14 +42,14 @@ const LineChartItem = react_1.default.forwardRef((props_, ref) => {
|
|
42
42
|
const { tonal = true, color = 'primary', name, values, refs: refs_, rects, updateDefs, updateLegend, minMax, animate: animate_, animateTimeout: animateTimeout_, smooth = true, smoothRatio = 0.14, PathProps, BackgroundProps, BorderProps, LegendItemProps, className } = props, other = __rest(props, ["tonal", "color", "name", "values", "refs", "rects", "updateDefs", "updateLegend", "minMax", "animate", "animateTimeout", "smooth", "smoothRatio", "PathProps", "BackgroundProps", "BorderProps", "LegendItemProps", "className"]);
|
43
43
|
const { classes } = useStyle();
|
44
44
|
const refs = {
|
45
|
-
minMax: react_1.default.useRef(
|
46
|
-
smooth: react_1.default.useRef(
|
47
|
-
theme: react_1.default.useRef(
|
48
|
-
path: react_1.default.useRef(),
|
45
|
+
minMax: react_1.default.useRef(null),
|
46
|
+
smooth: react_1.default.useRef(null),
|
47
|
+
theme: react_1.default.useRef(null),
|
48
|
+
path: react_1.default.useRef(null),
|
49
49
|
pathStyle: react_1.default.useRef({}),
|
50
|
-
animate: react_1.default.useRef(
|
51
|
-
animateTimeout: react_1.default.useRef(),
|
52
|
-
init: react_1.default.useRef(
|
50
|
+
animate: react_1.default.useRef(null),
|
51
|
+
animateTimeout: react_1.default.useRef(null),
|
52
|
+
init: react_1.default.useRef(null)
|
53
53
|
};
|
54
54
|
const keys = react_1.default.useMemo(() => {
|
55
55
|
const result = [];
|
@@ -56,19 +56,19 @@ const MainProgress = react_1.default.forwardRef((props_, ref) => {
|
|
56
56
|
const [value, setValue] = react_1.default.useState(min);
|
57
57
|
const refs = {
|
58
58
|
value_: react_1.default.useRef({}),
|
59
|
-
value: react_1.default.useRef(),
|
60
|
-
min: react_1.default.useRef(),
|
61
|
-
max: react_1.default.useRef(),
|
62
|
-
firstIncrement: react_1.default.useRef(),
|
63
|
-
incrementMin: react_1.default.useRef(),
|
64
|
-
incrementMax: react_1.default.useRef(),
|
65
|
-
stepInterval: react_1.default.useRef(),
|
66
|
-
stepMin: react_1.default.useRef(),
|
67
|
-
stepMax: react_1.default.useRef(),
|
68
|
-
TransitionComponentProps: react_1.default.useRef(
|
69
|
-
linearProgress: react_1.default.useRef(
|
70
|
-
interval: react_1.default.useRef(
|
71
|
-
props: react_1.default.useRef(
|
59
|
+
value: react_1.default.useRef(null),
|
60
|
+
min: react_1.default.useRef(null),
|
61
|
+
max: react_1.default.useRef(null),
|
62
|
+
firstIncrement: react_1.default.useRef(null),
|
63
|
+
incrementMin: react_1.default.useRef(null),
|
64
|
+
incrementMax: react_1.default.useRef(null),
|
65
|
+
stepInterval: react_1.default.useRef(null),
|
66
|
+
stepMin: react_1.default.useRef(null),
|
67
|
+
stepMax: react_1.default.useRef(null),
|
68
|
+
TransitionComponentProps: react_1.default.useRef(null),
|
69
|
+
linearProgress: react_1.default.useRef(null),
|
70
|
+
interval: react_1.default.useRef(null),
|
71
|
+
props: react_1.default.useRef(null)
|
72
72
|
};
|
73
73
|
refs.value.current = value;
|
74
74
|
refs.props.current = props;
|
package/Medias/Medias.d.ts
CHANGED
@@ -5,7 +5,7 @@ export interface IMediasItem {
|
|
5
5
|
value: IMediaObject;
|
6
6
|
props?: any;
|
7
7
|
}
|
8
|
-
export
|
8
|
+
export type IMediasMediaVersion = 'embed' | 'image' | 'audio' | 'video' | 'other';
|
9
9
|
export interface IMedias extends ILine {
|
10
10
|
size?: 'small' | 'regular' | 'large';
|
11
11
|
values?: IMediasItem | IMediasItem[];
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
2
2
|
import { TTransitionStatus } from '../Transition';
|
3
3
|
import { ILine } from '../Line/Line';
|
4
4
|
import { IElement, ITonal, IStyle, IElementReference, IPropsAny, IVersion, IColor } 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;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ISurface } from '../Surface/Surface';
|
3
3
|
import { INavigationItemVersion } from '../NavigationItem/NavigationItem';
|
4
|
-
export
|
4
|
+
export type TNavigationBarValue = Array<string>;
|
5
5
|
export interface INavigationBar extends Omit<ISurface, 'version'> {
|
6
6
|
value?: TNavigationBarValue;
|
7
7
|
valueDefault?: TNavigationBarValue;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ITooltip } from '../Tooltip/Tooltip';
|
3
3
|
import { ITonal, IColor, IElement, IElementReference, IPropsAny } from '../types';
|
4
|
-
export
|
4
|
+
export type INavigationItemVersion = 'regular' | 'auto';
|
5
5
|
export interface INavigationItem extends ITooltip {
|
6
6
|
tonal?: ITonal;
|
7
7
|
color?: IColor;
|
package/Parallax/Parallax.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IBaseElement, IPropsAny, IStyle, IValueBreakpoints } from '../types';
|
3
|
-
export
|
3
|
+
export type TParallaxDirection = 'vertical' | 'horizontal';
|
4
4
|
export interface IParallax extends IBaseElement {
|
5
5
|
value?: number;
|
6
6
|
root?: Element | DocumentFragment;
|
@@ -274,43 +274,43 @@ const RichTextEditor = react_1.default.forwardRef((props__, ref) => {
|
|
274
274
|
const [selected, setSelected] = react_1.default.useState([]);
|
275
275
|
const [selection, setSelection] = react_1.default.useState();
|
276
276
|
const refs = {
|
277
|
-
root: react_1.default.useRef(
|
278
|
-
value: react_1.default.useRef(
|
279
|
-
range: react_1.default.useRef(
|
280
|
-
inputValues: react_1.default.useRef(
|
281
|
-
open: react_1.default.useRef(
|
282
|
-
props: react_1.default.useRef(
|
283
|
-
selected: react_1.default.useRef(
|
284
|
-
miniMenu: react_1.default.useRef(
|
285
|
-
miniMenuInclude: react_1.default.useRef(
|
277
|
+
root: react_1.default.useRef(null),
|
278
|
+
value: react_1.default.useRef(null),
|
279
|
+
range: react_1.default.useRef(null),
|
280
|
+
inputValues: react_1.default.useRef(null),
|
281
|
+
open: react_1.default.useRef(null),
|
282
|
+
props: react_1.default.useRef(null),
|
283
|
+
selected: react_1.default.useRef(null),
|
284
|
+
miniMenu: react_1.default.useRef(null),
|
285
|
+
miniMenuInclude: react_1.default.useRef(null),
|
286
286
|
miniMenuElements: {
|
287
|
-
color: react_1.default.useRef(
|
288
|
-
colorPalette: react_1.default.useRef(
|
289
|
-
background: react_1.default.useRef(
|
290
|
-
backgroundPalette: react_1.default.useRef(
|
291
|
-
linkAdd: react_1.default.useRef(
|
292
|
-
linkAddInput: react_1.default.useRef(
|
293
|
-
linkRemove: react_1.default.useRef(
|
287
|
+
color: react_1.default.useRef(null),
|
288
|
+
colorPalette: react_1.default.useRef(null),
|
289
|
+
background: react_1.default.useRef(null),
|
290
|
+
backgroundPalette: react_1.default.useRef(null),
|
291
|
+
linkAdd: react_1.default.useRef(null),
|
292
|
+
linkAddInput: react_1.default.useRef(null),
|
293
|
+
linkRemove: react_1.default.useRef(null),
|
294
294
|
},
|
295
295
|
elements: {
|
296
|
-
color: react_1.default.useRef(
|
297
|
-
background: react_1.default.useRef(
|
298
|
-
linkAdd: react_1.default.useRef(
|
299
|
-
linkRemove: react_1.default.useRef(
|
300
|
-
quote: react_1.default.useRef(
|
301
|
-
image: react_1.default.useRef(
|
302
|
-
video: react_1.default.useRef(
|
303
|
-
videoYoutube: react_1.default.useRef(
|
304
|
-
table: react_1.default.useRef(
|
305
|
-
drawing: react_1.default.useRef(
|
306
|
-
drawingSvg: react_1.default.useRef(
|
307
|
-
drawingSize: react_1.default.useRef(
|
308
|
-
drawingSelect: react_1.default.useRef(
|
309
|
-
drawingPalette: react_1.default.useRef(
|
310
|
-
code: react_1.default.useRef(
|
296
|
+
color: react_1.default.useRef(null),
|
297
|
+
background: react_1.default.useRef(null),
|
298
|
+
linkAdd: react_1.default.useRef(null),
|
299
|
+
linkRemove: react_1.default.useRef(null),
|
300
|
+
quote: react_1.default.useRef(null),
|
301
|
+
image: react_1.default.useRef(null),
|
302
|
+
video: react_1.default.useRef(null),
|
303
|
+
videoYoutube: react_1.default.useRef(null),
|
304
|
+
table: react_1.default.useRef(null),
|
305
|
+
drawing: react_1.default.useRef(null),
|
306
|
+
drawingSvg: react_1.default.useRef(null),
|
307
|
+
drawingSize: react_1.default.useRef(null),
|
308
|
+
drawingSelect: react_1.default.useRef(null),
|
309
|
+
drawingPalette: react_1.default.useRef(null),
|
310
|
+
code: react_1.default.useRef(null)
|
311
311
|
},
|
312
|
-
rootDocument: react_1.default.useRef(),
|
313
|
-
rootWindow: react_1.default.useRef()
|
312
|
+
rootDocument: react_1.default.useRef(null),
|
313
|
+
rootWindow: react_1.default.useRef(null)
|
314
314
|
};
|
315
315
|
refs.inputValues.current = inputValues;
|
316
316
|
refs.open.current = open;
|
@@ -43,13 +43,13 @@ const ScatterChartItem = react_1.default.forwardRef((props_, ref) => {
|
|
43
43
|
const { tonal = true, color = 'primary', name, values, refs: refs_, rects, updateDefs, updateLegend, minMax, animate: animate_, animateTimeout: animateTimeout_, PathProps, BackgroundProps, BorderProps, LegendItemProps, className } = props, other = __rest(props, ["tonal", "color", "name", "values", "refs", "rects", "updateDefs", "updateLegend", "minMax", "animate", "animateTimeout", "PathProps", "BackgroundProps", "BorderProps", "LegendItemProps", "className"]);
|
44
44
|
const { classes } = useStyle();
|
45
45
|
const refs = {
|
46
|
-
minMax: react_1.default.useRef(
|
47
|
-
path: react_1.default.useRef(
|
48
|
-
theme: react_1.default.useRef(
|
46
|
+
minMax: react_1.default.useRef(null),
|
47
|
+
path: react_1.default.useRef(null),
|
48
|
+
theme: react_1.default.useRef(null),
|
49
49
|
pathStyle: react_1.default.useRef({}),
|
50
|
-
animate: react_1.default.useRef(
|
51
|
-
animateTimeout: react_1.default.useRef(),
|
52
|
-
init: react_1.default.useRef(
|
50
|
+
animate: react_1.default.useRef(null),
|
51
|
+
animateTimeout: react_1.default.useRef(null),
|
52
|
+
init: react_1.default.useRef(null)
|
53
53
|
};
|
54
54
|
const keys = react_1.default.useMemo(() => {
|
55
55
|
const result = [];
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ISurface } from '../Surface/Surface';
|
3
3
|
import { IElementReference, IPropsAny } from '../types';
|
4
|
-
export
|
4
|
+
export type TTrackValueVersion = 'image' | 'canvas';
|
5
5
|
export interface IScreenCapture extends ISurface {
|
6
6
|
nameDefault?: string;
|
7
7
|
name?: string;
|
@@ -68,10 +68,10 @@ const ScreenCapture = react_1.default.forwardRef((props_, ref) => {
|
|
68
68
|
const [canvasSelectorValue, setCanvasSelectorValue] = react_1.default.useState();
|
69
69
|
const [supported, setSupported] = react_1.default.useState(true);
|
70
70
|
const refs = {
|
71
|
-
root: react_1.default.useRef(
|
72
|
-
canvas: react_1.default.useRef(
|
73
|
-
canvasSelectorValue: react_1.default.useRef(
|
74
|
-
element: react_1.default.useRef()
|
71
|
+
root: react_1.default.useRef(null),
|
72
|
+
canvas: react_1.default.useRef(null),
|
73
|
+
canvasSelectorValue: react_1.default.useRef(null),
|
74
|
+
element: react_1.default.useRef(null)
|
75
75
|
};
|
76
76
|
const touch = (0, useMediaQuery_1.default)('(pointer: coarse)', { element: refs.root.current });
|
77
77
|
refs.canvas.current = canvas;
|
package/Section/Section.d.ts
CHANGED
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import { TPaletteVersion } from '@onesy/style-react';
|
3
3
|
import { ILine } from '../Line/Line';
|
4
4
|
import { IValueBreakpoints, IMediaObject, IPropsAny } from '../types';
|
5
|
-
export
|
5
|
+
export type ISize = 'extra_small' | 'small' | 'regular' | 'large' | 'extra_large' | 'extra_extra_large';
|
6
6
|
export interface ISection extends ILine {
|
7
7
|
themed?: boolean;
|
8
8
|
title?: string | Partial<Record<IValueBreakpoints, string>>;
|
package/Slider/Slider.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IBaseElement, ITonal, IColor, ISize, IElement, IPropsAny } from '../types';
|
3
|
-
export
|
3
|
+
export type TSliderValue = number | Array<number>;
|
4
4
|
export interface ISlider extends IBaseElement {
|
5
5
|
tonal?: ITonal;
|
6
6
|
color?: IColor;
|
@@ -133,35 +133,35 @@ const SmartTextField = react_1.default.forwardRef((props_, ref) => {
|
|
133
133
|
const [open, setOpen] = react_1.default.useState({});
|
134
134
|
const [inputValues, setInputValues] = react_1.default.useState({});
|
135
135
|
const refs = {
|
136
|
-
root: react_1.default.useRef(
|
137
|
-
input: react_1.default.useRef(
|
138
|
-
searchElement: react_1.default.useRef(
|
139
|
-
error: react_1.default.useRef(
|
140
|
-
search: react_1.default.useRef(
|
141
|
-
open: react_1.default.useRef(
|
142
|
-
openMenu: react_1.default.useRef(
|
143
|
-
selectionMenu: react_1.default.useRef(
|
144
|
-
caret: react_1.default.useRef(
|
145
|
-
value: react_1.default.useRef(
|
136
|
+
root: react_1.default.useRef(null),
|
137
|
+
input: react_1.default.useRef(null),
|
138
|
+
searchElement: react_1.default.useRef(null),
|
139
|
+
error: react_1.default.useRef(null),
|
140
|
+
search: react_1.default.useRef(null),
|
141
|
+
open: react_1.default.useRef(null),
|
142
|
+
openMenu: react_1.default.useRef(null),
|
143
|
+
selectionMenu: react_1.default.useRef(null),
|
144
|
+
caret: react_1.default.useRef(null),
|
145
|
+
value: react_1.default.useRef(null),
|
146
146
|
version: react_1.default.useRef(version),
|
147
147
|
optionsMention: react_1.default.useRef(optionsMention),
|
148
148
|
validateMeta: react_1.default.useRef({}),
|
149
|
-
range: react_1.default.useRef(
|
150
|
-
inputValues: react_1.default.useRef(
|
151
|
-
miniMenu: react_1.default.useRef(
|
149
|
+
range: react_1.default.useRef(null),
|
150
|
+
inputValues: react_1.default.useRef(null),
|
151
|
+
miniMenu: react_1.default.useRef(null),
|
152
152
|
miniMenuElements: {
|
153
|
-
color: react_1.default.useRef(
|
154
|
-
colorPalette: react_1.default.useRef(
|
155
|
-
background: react_1.default.useRef(
|
156
|
-
backgroundPalette: react_1.default.useRef(
|
157
|
-
linkAdd: react_1.default.useRef(
|
158
|
-
linkAddInput: react_1.default.useRef(
|
159
|
-
linkRemove: react_1.default.useRef(
|
153
|
+
color: react_1.default.useRef(null),
|
154
|
+
colorPalette: react_1.default.useRef(null),
|
155
|
+
background: react_1.default.useRef(null),
|
156
|
+
backgroundPalette: react_1.default.useRef(null),
|
157
|
+
linkAdd: react_1.default.useRef(null),
|
158
|
+
linkAddInput: react_1.default.useRef(null),
|
159
|
+
linkRemove: react_1.default.useRef(null)
|
160
160
|
},
|
161
|
-
textSelected: react_1.default.useRef(
|
162
|
-
textSelection: react_1.default.useRef(
|
163
|
-
rootDocument: react_1.default.useRef(),
|
164
|
-
rootWindow: react_1.default.useRef(),
|
161
|
+
textSelected: react_1.default.useRef(null),
|
162
|
+
textSelection: react_1.default.useRef(null),
|
163
|
+
rootDocument: react_1.default.useRef(null),
|
164
|
+
rootWindow: react_1.default.useRef(null),
|
165
165
|
edit: react_1.default.useRef(edit),
|
166
166
|
multiline: react_1.default.useRef(multiline),
|
167
167
|
readOnly: react_1.default.useRef(readOnly),
|
package/TableCell/TableCell.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { TLineAlign, TLineJustify } from '../Line/Line';
|
3
3
|
import { IBaseElement, ITonal, IColor, ISize, IPropsAny } from '../types';
|
4
|
-
export
|
4
|
+
export type ITableCellSort = 'asc' | 'desc';
|
5
5
|
export interface ITableCell extends IBaseElement {
|
6
6
|
tonal?: ITonal;
|
7
7
|
color?: IColor;
|
@@ -3,8 +3,8 @@ import { OnesyDate } from '@onesy/date';
|
|
3
3
|
import { TClockUnit } from '../Clock/Clock';
|
4
4
|
import { IAdvancedTextField } from '../AdvancedTextField/AdvancedTextField';
|
5
5
|
import { ISize, IValueBreakpoints, IElementReference, IPropsAny } from '../types';
|
6
|
-
export
|
7
|
-
export
|
6
|
+
export type TTimePickerValue = OnesyDate | [OnesyDate, OnesyDate];
|
7
|
+
export type TTimePickerSelecting = TClockUnit | [TClockUnit, TClockUnit];
|
8
8
|
export interface ITimePicker extends Omit<IAdvancedTextField, 'version'> {
|
9
9
|
version?: 'auto' | 'mobile' | 'desktop';
|
10
10
|
value?: TTimePickerValue;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { TTransitionsDurationProperties } from '@onesy/style-react';
|
3
3
|
import { IBaseElement } from '../types';
|
4
|
-
export
|
4
|
+
export type TTransitionStatus = 'appended' | 'add' | 'adding' | 'added' | 'enter' | 'entering' | 'entered' | 'exit' | 'exiting' | 'exited' | 'removed';
|
5
5
|
export declare const STATUS: Record<TTransitionStatus, TTransitionStatus>;
|
6
6
|
export interface ITransitionDelay {
|
7
7
|
default?: number;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IPropsAny } from '../types';
|
3
|
-
export
|
3
|
+
export type TTransitionsMode = 'in-out' | 'in-out-follow' | 'out-in';
|
4
4
|
export interface ITransitions {
|
5
5
|
id?: string;
|
6
6
|
mode?: TTransitionsMode;
|
package/Tree/Tree.js
CHANGED
@@ -55,7 +55,6 @@ const useStyle = (0, style_react_1.style)(theme => ({
|
|
55
55
|
lineHeight: '1.15',
|
56
56
|
margin: '0',
|
57
57
|
position: 'relative',
|
58
|
-
color: 'inherit',
|
59
58
|
padding: `${theme.methods.space.value(0.25, 'px')} ${theme.methods.space.value(1, 'px')}`,
|
60
59
|
borderRadius: `${theme.shape.radius.unit * 0.5}px`
|
61
60
|
},
|
@@ -69,6 +68,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
|
|
69
68
|
height: '14px',
|
70
69
|
borderLeft: '2px solid',
|
71
70
|
borderBottom: '2px solid',
|
71
|
+
color: theme.palette.color.neutral['90'],
|
72
72
|
borderColor: theme.palette.light ? theme.palette.color.neutral['90'] : theme.palette.color.neutral['20'],
|
73
73
|
borderBottomLeftRadius: '6px',
|
74
74
|
transform: `rotateY(${theme.direction === 'ltr' ? 0 : 180}deg)`
|
@@ -133,7 +133,7 @@ const Tree = react_1.default.forwardRef((props_, ref) => {
|
|
133
133
|
ids: {
|
134
134
|
middle: react_1.default.useId()
|
135
135
|
},
|
136
|
-
inProgressTransition: react_1.default.useRef()
|
136
|
+
inProgressTransition: react_1.default.useRef(null)
|
137
137
|
};
|
138
138
|
const styles = {
|
139
139
|
root: {}
|
@@ -190,25 +190,25 @@ const VideoPlayer = react_1.default.forwardRef((props_, ref) => {
|
|
190
190
|
const [playbackSpeed, setPlaybackSpeed] = react_1.default.useState(1);
|
191
191
|
const [openMenu, setOpenMenu] = react_1.default.useState();
|
192
192
|
const refs = {
|
193
|
-
root: react_1.default.useRef(
|
194
|
-
video: react_1.default.useRef(),
|
195
|
-
controls: react_1.default.useRef(
|
196
|
-
duration: react_1.default.useRef(
|
197
|
-
time: react_1.default.useRef(
|
198
|
-
play: react_1.default.useRef(
|
199
|
-
updating: react_1.default.useRef(
|
200
|
-
onPlay: react_1.default.useRef(
|
201
|
-
onPause: react_1.default.useRef(
|
202
|
-
onTimeChange: react_1.default.useRef(
|
203
|
-
onBackward: react_1.default.useRef(
|
204
|
-
onForward: react_1.default.useRef(
|
205
|
-
onStop: react_1.default.useRef(
|
206
|
-
startMediaSession: react_1.default.useRef(
|
207
|
-
updateMediaSession: react_1.default.useRef(
|
208
|
-
startMediaSessionOnPlay: react_1.default.useRef(
|
193
|
+
root: react_1.default.useRef(null),
|
194
|
+
video: react_1.default.useRef(null),
|
195
|
+
controls: react_1.default.useRef(null),
|
196
|
+
duration: react_1.default.useRef(null),
|
197
|
+
time: react_1.default.useRef(null),
|
198
|
+
play: react_1.default.useRef(null),
|
199
|
+
updating: react_1.default.useRef(null),
|
200
|
+
onPlay: react_1.default.useRef(null),
|
201
|
+
onPause: react_1.default.useRef(null),
|
202
|
+
onTimeChange: react_1.default.useRef(null),
|
203
|
+
onBackward: react_1.default.useRef(null),
|
204
|
+
onForward: react_1.default.useRef(null),
|
205
|
+
onStop: react_1.default.useRef(null),
|
206
|
+
startMediaSession: react_1.default.useRef(null),
|
207
|
+
updateMediaSession: react_1.default.useRef(null),
|
208
|
+
startMediaSessionOnPlay: react_1.default.useRef(null),
|
209
209
|
fullScreen: react_1.default.useRef(fullScreen),
|
210
210
|
mouseMoved: react_1.default.useRef(mouseMoved),
|
211
|
-
timeoutMouseMoved: react_1.default.useRef(
|
211
|
+
timeoutMouseMoved: react_1.default.useRef(null)
|
212
212
|
};
|
213
213
|
refs.duration.current = duration;
|
214
214
|
refs.time.current = time;
|
package/Weather/Weather.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ISurface } from '../Surface/Surface';
|
3
3
|
import { ISize, IElementReference, IPropsAny } from '../types';
|
4
|
-
export
|
5
|
-
export
|
6
|
-
export
|
4
|
+
export type TWeatherDayTime = 'day' | 'night';
|
5
|
+
export type TWeather = 'clear' | 'partly clear' | 'rainy' | 'partly rainy' | 'snowy' | 'partly snowy';
|
6
|
+
export type TTemperature = number;
|
7
7
|
export interface IWeather extends ISurface {
|
8
8
|
size?: ISize;
|
9
9
|
shadow?: boolean;
|
@@ -72,15 +72,15 @@ const AreaChartItem = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
72
72
|
classes
|
73
73
|
} = useStyle();
|
74
74
|
const refs = {
|
75
|
-
minMax: React.useRef(
|
76
|
-
smooth: React.useRef(
|
77
|
-
theme: React.useRef(
|
78
|
-
path: React.useRef(),
|
79
|
-
pathBackground: React.useRef(),
|
75
|
+
minMax: React.useRef(null),
|
76
|
+
smooth: React.useRef(null),
|
77
|
+
theme: React.useRef(null),
|
78
|
+
path: React.useRef(null),
|
79
|
+
pathBackground: React.useRef(null),
|
80
80
|
pathStyle: React.useRef({}),
|
81
|
-
animate: React.useRef(
|
82
|
-
animateTimeout: React.useRef(),
|
83
|
-
init: React.useRef(
|
81
|
+
animate: React.useRef(null),
|
82
|
+
animateTimeout: React.useRef(null),
|
83
|
+
init: React.useRef(null)
|
84
84
|
};
|
85
85
|
const keys = React.useMemo(() => {
|
86
86
|
const result = [];
|
@@ -188,22 +188,22 @@ const AudioPlayer = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
188
188
|
const [playbackSpeed, setPlaybackSpeed] = React.useState(1);
|
189
189
|
const [openMenu, setOpenMenu] = React.useState();
|
190
190
|
const refs = {
|
191
|
-
root: React.useRef(
|
192
|
-
audio: React.useRef(),
|
193
|
-
controls: React.useRef(
|
194
|
-
duration: React.useRef(
|
195
|
-
time: React.useRef(
|
196
|
-
play: React.useRef(
|
197
|
-
updating: React.useRef(
|
198
|
-
onPlay: React.useRef(
|
199
|
-
onPause: React.useRef(
|
200
|
-
onTimeChange: React.useRef(
|
201
|
-
onBackward: React.useRef(
|
202
|
-
onForward: React.useRef(
|
203
|
-
onStop: React.useRef(
|
204
|
-
startMediaSession: React.useRef(
|
205
|
-
updateMediaSession: React.useRef(
|
206
|
-
startMediaSessionOnPlay: React.useRef(
|
191
|
+
root: React.useRef(null),
|
192
|
+
audio: React.useRef(null),
|
193
|
+
controls: React.useRef(null),
|
194
|
+
duration: React.useRef(null),
|
195
|
+
time: React.useRef(null),
|
196
|
+
play: React.useRef(null),
|
197
|
+
updating: React.useRef(null),
|
198
|
+
onPlay: React.useRef(null),
|
199
|
+
onPause: React.useRef(null),
|
200
|
+
onTimeChange: React.useRef(null),
|
201
|
+
onBackward: React.useRef(null),
|
202
|
+
onForward: React.useRef(null),
|
203
|
+
onStop: React.useRef(null),
|
204
|
+
startMediaSession: React.useRef(null),
|
205
|
+
updateMediaSession: React.useRef(null),
|
206
|
+
startMediaSessionOnPlay: React.useRef(null)
|
207
207
|
};
|
208
208
|
refs.duration.current = duration;
|
209
209
|
refs.time.current = time;
|
@@ -100,14 +100,14 @@ const AudioRecorder = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
100
100
|
classes
|
101
101
|
} = useStyle();
|
102
102
|
const refs = {
|
103
|
-
root: React.useRef(
|
104
|
-
mediaRecorder: React.useRef(),
|
103
|
+
root: React.useRef(null),
|
104
|
+
mediaRecorder: React.useRef(null),
|
105
105
|
mediaRecorderBytes: React.useRef([]),
|
106
106
|
start: React.useRef(0),
|
107
107
|
valuePaused: React.useRef(0),
|
108
|
-
value: React.useRef(
|
109
|
-
animationFrame: React.useRef(
|
110
|
-
onData: React.useRef(
|
108
|
+
value: React.useRef(null),
|
109
|
+
animationFrame: React.useRef(null),
|
110
|
+
onData: React.useRef(null)
|
111
111
|
};
|
112
112
|
refs.onData.current = onData;
|
113
113
|
const supported = isEnvironment('browser') && window.navigator.mediaDevices?.getUserMedia;
|
package/esm/Avatar/Avatar.js
CHANGED
@@ -5,11 +5,11 @@ const _excluded = ["tonal", "version", "size", "color", "image", "alt", "square"
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
7
7
|
import React from 'react';
|
8
|
+
import { stringToColor } from '@onesy/utils';
|
8
9
|
import { classNames, style as styleMethod, useOnesyTheme } from '@onesy/style-react';
|
9
10
|
import ButtonElement from '../Button';
|
10
11
|
import TypeElement from '../Type';
|
11
12
|
import { staticClassName } from '../utils';
|
12
|
-
import { stringToColor } from '@onesy/utils';
|
13
13
|
const useStyle = styleMethod(theme => ({
|
14
14
|
root: {
|
15
15
|
'&.onesy-Button-root': {
|
@@ -81,7 +81,7 @@ const Avatar = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
81
81
|
if (size === 'small') typeProps.size = '0.75rem';else if (size === 'regular') typeProps.size = '1rem';else if (size === 'large') typeProps.size = '1.25rem';else if (!['small', 'regular', 'large'].includes(size)) typeProps.size = `${size * 0.4 / 16}rem`;
|
82
82
|
children = /*#__PURE__*/React.createElement(Type, _extends({}, typeProps, TypeProps), children);
|
83
83
|
}
|
84
|
-
const color = color_ === 'auto' ? stringToColor(children_) : color_;
|
84
|
+
const color = color_ === 'auto' ? stringToColor(children_ || '') : color_;
|
85
85
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
86
86
|
ref: ref,
|
87
87
|
tonal: tonal,
|
@@ -58,13 +58,13 @@ const BubbleChartItem = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
58
58
|
classes
|
59
59
|
} = useStyle();
|
60
60
|
const refs = {
|
61
|
-
minMax: React.useRef(
|
62
|
-
theme: React.useRef(
|
63
|
-
path: React.useRef(),
|
61
|
+
minMax: React.useRef(null),
|
62
|
+
theme: React.useRef(null),
|
63
|
+
path: React.useRef(null),
|
64
64
|
pathStyle: React.useRef({}),
|
65
|
-
animate: React.useRef(
|
66
|
-
animateTimeout: React.useRef(),
|
67
|
-
init: React.useRef(
|
65
|
+
animate: React.useRef(null),
|
66
|
+
animateTimeout: React.useRef(null),
|
67
|
+
init: React.useRef(null)
|
68
68
|
};
|
69
69
|
const keys = React.useMemo(() => {
|
70
70
|
const result = [];
|
package/esm/Calendar/Calendar.js
CHANGED
@@ -192,10 +192,10 @@ const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
192
192
|
classes
|
193
193
|
} = useStyle();
|
194
194
|
const refs = {
|
195
|
-
root: React.useRef(
|
196
|
-
month: React.useRef(
|
197
|
-
year: React.useRef(
|
198
|
-
inProgressTransition: React.useRef()
|
195
|
+
root: React.useRef(null),
|
196
|
+
month: React.useRef(null),
|
197
|
+
year: React.useRef(null),
|
198
|
+
inProgressTransition: React.useRef(null)
|
199
199
|
};
|
200
200
|
const [value, setValue] = React.useState(() => {
|
201
201
|
const valueResult = (valueDefault !== undefined ? valueDefault : value_) || now && (range ? [new OnesyDate(), new OnesyDate()] : [new OnesyDate()]);
|
@@ -232,8 +232,8 @@ const CalendarMonth = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
232
232
|
id: React.useRef(`${month.year} ${month.month}`),
|
233
233
|
previous: React.useRef(month),
|
234
234
|
previousTheme: React.useRef(theme.palette.light),
|
235
|
-
move: React.useRef(),
|
236
|
-
noTransition: React.useRef(
|
235
|
+
move: React.useRef(null),
|
236
|
+
noTransition: React.useRef(null)
|
237
237
|
};
|
238
238
|
const weekStartDay = !['Monday', 'Sunday'].includes(weekStartDay_) ? 'Monday' : weekStartDay_;
|
239
239
|
|