@onesy/ui-react 1.0.59 → 1.0.60
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/AudioPlayer/AudioPlayer.js +6 -23
- package/AudioRecorder/AudioRecorder.js +2 -1
- package/AutoComplete/AutoComplete.js +5 -4
- package/AutoCompleteCountry/AutoCompleteCountry.js +2 -1
- package/AutoCompleteCurrency/AutoCompleteCurrency.js +2 -1
- package/Breadcrumbs/Breadcrumbs.js +3 -2
- package/BubbleChart/BubbleChart.js +3 -2
- package/Calendar/Calendar.js +7 -6
- package/CalendarAvailability/CalendarAvailability.d.ts +4 -1
- package/CalendarAvailability/CalendarAvailability.js +23 -18
- package/CalendarMenu/CalendarMenu.js +6 -5
- package/CalendarMonth/CalendarMonth.js +8 -7
- package/CalendarViews/CalendarViews.d.ts +4 -1
- package/CalendarViews/CalendarViews.js +17 -12
- package/Chart/Chart.js +1 -0
- package/ColorTextField/ColorTextField.js +2 -1
- package/Confirm/Confirm.js +4 -3
- package/CookieBanner/CookieBanner.js +3 -2
- package/Countdown/Countdown.js +5 -4
- package/DatePicker/DatePicker.js +10 -9
- package/DateTimePicker/DateTimePicker.js +5 -4
- package/Drawing/Drawing.js +9 -8
- package/DropZone/DropZone.d.ts +1 -0
- package/DropZone/DropZone.js +3 -2
- package/Emojis/Emojis.js +46 -43
- package/Frame/Frame.js +6 -5
- package/ImageEdit/ImageEdit.js +21 -20
- package/Info/Info.js +2 -1
- package/Links/Links.d.ts +2 -0
- package/Links/Links.js +7 -6
- package/Medias/Medias.js +2 -1
- package/MenuDesktop/MenuDesktop.js +1 -3
- package/NavigationItem/NavigationItem.js +1 -1
- package/NotFound/NotFound.d.ts +1 -0
- package/NotFound/NotFound.js +3 -2
- package/Page/Page.js +2 -1
- package/PieChart/PieChart.js +4 -3
- package/RichTextEditor/RichTextEditor.js +57 -56
- package/ScreenCapture/ScreenCapture.js +2 -1
- package/SectionAction/SectionAction.js +2 -1
- package/SectionBoxes/SectionBoxes.js +2 -1
- package/SectionCards/SectionCards.js +2 -1
- package/SectionCarousel/SectionCarousel.js +2 -1
- package/SectionMedia/SectionMedia.js +2 -1
- package/SectionTextMedia/SectionTextMedia.js +2 -1
- package/Select/Select.js +2 -1
- package/Share/Share.js +15 -14
- package/SmartTextField/SmartTextField.js +13 -12
- package/SpeechToText/SpeechToText.js +3 -2
- package/SpeedDial/SpeedDial.js +1 -1
- package/SpeedDialItem/SpeedDialItem.js +1 -1
- package/TableCell/TableCell.js +2 -1
- package/TablePagination/TablePagination.js +2 -1
- package/TextField/TextField.d.ts +1 -0
- package/TextToSpeech/TextToSpeech.js +4 -3
- package/TimePicker/TimePicker.js +9 -8
- package/Timer/Timer.js +3 -2
- package/VideoPlayer/VideoPlayer.js +5 -4
- package/Widgets/Widgets.js +3 -2
- package/esm/AudioPlayer/AudioPlayer.js +7 -30
- package/esm/AudioRecorder/AudioRecorder.js +8 -7
- package/esm/AutoComplete/AutoComplete.js +5 -4
- package/esm/AutoCompleteCountry/AutoCompleteCountry.js +2 -0
- package/esm/AutoCompleteCurrency/AutoCompleteCurrency.js +2 -1
- package/esm/Breadcrumbs/Breadcrumbs.js +3 -2
- package/esm/BubbleChart/BubbleChart.js +3 -2
- package/esm/Calendar/Calendar.js +9 -8
- package/esm/CalendarAvailability/CalendarAvailability.js +31 -21
- package/esm/CalendarMenu/CalendarMenu.js +7 -6
- package/esm/CalendarMonth/CalendarMonth.js +8 -7
- package/esm/CalendarViews/CalendarViews.js +25 -15
- package/esm/Chart/Chart.js +1 -0
- package/esm/ColorTextField/ColorTextField.js +2 -1
- package/esm/Confirm/Confirm.js +7 -6
- package/esm/CookieBanner/CookieBanner.js +4 -3
- package/esm/Countdown/Countdown.js +10 -9
- package/esm/DatePicker/DatePicker.js +22 -21
- package/esm/DateTimePicker/DateTimePicker.js +11 -10
- package/esm/Drawing/Drawing.js +11 -10
- package/esm/DropZone/DropZone.js +4 -2
- package/esm/Emojis/Emojis.js +37 -34
- package/esm/Frame/Frame.js +6 -5
- package/esm/ImageEdit/ImageEdit.js +25 -24
- package/esm/Info/Info.js +2 -1
- package/esm/Links/Links.js +9 -6
- package/esm/Medias/Medias.js +2 -1
- package/esm/MenuDesktop/MenuDesktop.js +1 -2
- package/esm/NavigationItem/NavigationItem.js +1 -1
- package/esm/NotFound/NotFound.js +5 -3
- package/esm/Page/Page.js +3 -2
- package/esm/PieChart/PieChart.js +4 -4
- package/esm/RichTextEditor/RichTextEditor.js +76 -75
- package/esm/ScreenCapture/ScreenCapture.js +4 -3
- package/esm/SectionAction/SectionAction.js +2 -1
- package/esm/SectionBoxes/SectionBoxes.js +2 -1
- package/esm/SectionCards/SectionCards.js +2 -1
- package/esm/SectionCarousel/SectionCarousel.js +2 -1
- package/esm/SectionMedia/SectionMedia.js +2 -1
- package/esm/SectionTextMedia/SectionTextMedia.js +2 -1
- package/esm/Select/Select.js +2 -1
- package/esm/Share/Share.js +16 -15
- package/esm/SmartTextField/SmartTextField.js +15 -14
- package/esm/SpeechToText/SpeechToText.js +3 -2
- package/esm/SpeedDial/SpeedDial.js +1 -1
- package/esm/SpeedDialItem/SpeedDialItem.js +1 -1
- package/esm/TableCell/TableCell.js +2 -1
- package/esm/TablePagination/TablePagination.js +2 -1
- package/esm/TextToSpeech/TextToSpeech.js +4 -3
- package/esm/TimePicker/TimePicker.js +19 -18
- package/esm/Timer/Timer.js +7 -6
- package/esm/VideoPlayer/VideoPlayer.js +7 -6
- package/esm/Widgets/Widgets.js +3 -2
- package/esm/index.js +1 -1
- package/package.json +2 -2
package/esm/Confirm/Confirm.js
CHANGED
@@ -40,6 +40,7 @@ const useStyle = styleMethod(theme => ({
|
|
40
40
|
});
|
41
41
|
const Confirm = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
42
42
|
const theme = useOnesyTheme();
|
43
|
+
const l = theme.l;
|
43
44
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyConfirm?.props?.default), props_), [props_]);
|
44
45
|
const ModalHeader = React.useMemo(() => theme?.elements?.ModalHeader || ModalHeaderElement, [theme]);
|
45
46
|
const ModalFooter = React.useMemo(() => theme?.elements?.ModalFooter || ModalFooterElement, [theme]);
|
@@ -79,8 +80,8 @@ const Confirm = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
79
80
|
refs.modal.current.description = value?.description !== undefined ? value?.description : 'Are you sure you want to proceed?';
|
80
81
|
if (refs.modal.current.buttons?.negative?.text === undefined) setObjectValue(refs.modal.current, 'buttons.negative.text', '');
|
81
82
|
if (refs.modal.current.buttons?.positive?.text === undefined) setObjectValue(refs.modal.current, 'buttons.positive.text', '');
|
82
|
-
refs.modal.current.buttons.negative.text = value?.buttons?.negative?.text !== undefined ? value?.buttons?.negative?.text : 'Cancel';
|
83
|
-
refs.modal.current.buttons.positive.text = value?.buttons?.positive?.text !== undefined ? value?.buttons?.positive?.text : 'Confirm';
|
83
|
+
refs.modal.current.buttons.negative.text = value?.buttons?.negative?.text !== undefined ? value?.buttons?.negative?.text : l('Cancel');
|
84
|
+
refs.modal.current.buttons.positive.text = value?.buttons?.positive?.text !== undefined ? value?.buttons?.positive?.text : l('Confirm');
|
84
85
|
refs.modal.current.throwError = value?.throwError !== undefined ? value.throwError : refs.props.current.throwError;
|
85
86
|
const promise = new Promise((resolve, reject) => {
|
86
87
|
refs.promise.resolve.current = resolve;
|
@@ -136,20 +137,20 @@ const Confirm = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
136
137
|
}) : /*#__PURE__*/React.createElement(React.Fragment, null, name !== false && /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, {
|
137
138
|
version: "t1",
|
138
139
|
weight: 500
|
139
|
-
}, name || 'Confirmation')), /*#__PURE__*/React.createElement(ModalMain, null, /*#__PURE__*/React.createElement(ModalText, {
|
140
|
+
}, name || l('Confirmation'))), /*#__PURE__*/React.createElement(ModalMain, null, /*#__PURE__*/React.createElement(ModalText, {
|
140
141
|
version: "b1",
|
141
142
|
weight: 200
|
142
|
-
}, description !== undefined ? description : 'Are you sure you want to proceed?')), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, _extends({
|
143
|
+
}, description !== undefined ? description : l('Are you sure you want to proceed?'))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, _extends({
|
143
144
|
version: "text",
|
144
145
|
color: "inherit",
|
145
146
|
tonal: true,
|
146
147
|
onClick: () => close(false)
|
147
|
-
}, ButtonNegativeProps), buttons?.negative?.text !== undefined ? buttons?.negative?.text : 'Cancel'), /*#__PURE__*/React.createElement(Button, _extends({
|
148
|
+
}, ButtonNegativeProps), buttons?.negative?.text !== undefined ? buttons?.negative?.text : l('Cancel')), /*#__PURE__*/React.createElement(Button, _extends({
|
148
149
|
version: "text",
|
149
150
|
color: "inherit",
|
150
151
|
tonal: true,
|
151
152
|
onClick: () => close(true)
|
152
|
-
}, ButtonPositiveProps), buttons?.positive?.text !== undefined ? buttons?.positive?.text : 'Confirm')))));
|
153
|
+
}, ButtonPositiveProps), buttons?.positive?.text !== undefined ? buttons?.positive?.text : l('Confirm'))))));
|
153
154
|
});
|
154
155
|
Confirm.displayName = 'onesy-Confirm';
|
155
156
|
export default Confirm;
|
@@ -38,6 +38,7 @@ const useStyle = styleMethod(theme => ({
|
|
38
38
|
});
|
39
39
|
const CookieBanner = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
40
40
|
const theme = useOnesyTheme();
|
41
|
+
const l = theme.l;
|
41
42
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyBanner?.props?.default), props_), [props_]);
|
42
43
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
43
44
|
const Slide = React.useMemo(() => theme?.elements?.Slide || SlideElement, [theme]);
|
@@ -84,7 +85,7 @@ const CookieBanner = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
84
85
|
Component: Surface,
|
85
86
|
color: "default",
|
86
87
|
role: "region",
|
87
|
-
"aria-label":
|
88
|
+
"aria-label": l('Cookie Banner'),
|
88
89
|
className: classNames([staticClassName('CookieBanner', theme) && ['onesy-CookieBanner-root', `onesy-CookieBanner-size-${size}`], className, classes.root, classes[`size_${size}`]])
|
89
90
|
}, other), /*#__PURE__*/React.createElement(Line, _extends({
|
90
91
|
gap: 1.5,
|
@@ -109,11 +110,11 @@ const CookieBanner = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
109
110
|
}, startActions, /*#__PURE__*/React.createElement(Button, _extends({
|
110
111
|
onClick: onReject,
|
111
112
|
color: "default"
|
112
|
-
}, buttonProps, RejectButtonProps),
|
113
|
+
}, buttonProps, RejectButtonProps), l('Reject All')), /*#__PURE__*/React.createElement(Button, _extends({
|
113
114
|
onClick: onAllow,
|
114
115
|
color: "primary",
|
115
116
|
version: "filled"
|
116
|
-
}, buttonProps, AllowButtonProps),
|
117
|
+
}, buttonProps, AllowButtonProps), l('Accept All')), endActions))));
|
117
118
|
});
|
118
119
|
CookieBanner.displayName = 'onesy-CookieBanner';
|
119
120
|
export default CookieBanner;
|
@@ -87,6 +87,7 @@ const useStyle = styleMethod(theme => ({
|
|
87
87
|
});
|
88
88
|
const Countdown = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
89
89
|
const theme = useOnesyTheme();
|
90
|
+
const l = theme.l;
|
90
91
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyCountdown?.props?.default), props_), [props_]);
|
91
92
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
92
93
|
const Fade = React.useMemo(() => theme?.elements?.Fade || FadeElement, [theme]);
|
@@ -271,7 +272,7 @@ const Countdown = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
271
272
|
marginBottom: -8
|
272
273
|
}
|
273
274
|
}, /*#__PURE__*/React.createElement(NumericTextField, _extends({
|
274
|
-
|
275
|
+
name: l('Hours'),
|
275
276
|
min: 0,
|
276
277
|
max: 23,
|
277
278
|
value: values.hours,
|
@@ -279,7 +280,7 @@ const Countdown = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
279
280
|
}, NumericTextFieldProps, {
|
280
281
|
className: classNames([staticClassName('Countdown', theme) && ['onesy-Countdown-numeric-text-field'], NumericTextFieldProps?.className, classes.numericTextField])
|
281
282
|
})), /*#__PURE__*/React.createElement(NumericTextField, _extends({
|
282
|
-
|
283
|
+
name: l('Minutes'),
|
283
284
|
min: 0,
|
284
285
|
max: 59,
|
285
286
|
value: values.minutes,
|
@@ -287,7 +288,7 @@ const Countdown = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
287
288
|
}, NumericTextFieldProps, {
|
288
289
|
className: classNames([staticClassName('Countdown', theme) && ['onesy-Countdown-numeric-text-field'], NumericTextFieldProps?.className, classes.numericTextField])
|
289
290
|
})), /*#__PURE__*/React.createElement(NumericTextField, _extends({
|
290
|
-
|
291
|
+
name: l('Seconds'),
|
291
292
|
min: 0,
|
292
293
|
max: 59,
|
293
294
|
value: values.seconds,
|
@@ -335,7 +336,7 @@ const Countdown = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
335
336
|
}, value_), /*#__PURE__*/React.createElement(Type, {
|
336
337
|
version: "b3",
|
337
338
|
className: classNames([staticClassName('Countdown', theme) && ['onesy-Countdown-meta'], classes.meta])
|
338
|
-
},
|
339
|
+
}, l('Total'), " ", duration(refs.total.current, false)))), /*#__PURE__*/React.createElement(Line, {
|
339
340
|
gap: 1,
|
340
341
|
direction: "row",
|
341
342
|
align: "center",
|
@@ -344,7 +345,7 @@ const Countdown = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
344
345
|
in: true,
|
345
346
|
add: true
|
346
347
|
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, _extends({
|
347
|
-
|
348
|
+
name: l('Start')
|
348
349
|
}, TooltipProps), /*#__PURE__*/React.createElement(IconButton, _extends({
|
349
350
|
onClick: onStart,
|
350
351
|
disabled: !((values.hours || 0) + (values.minutes || 0) + (values.seconds || 0))
|
@@ -352,22 +353,22 @@ const Countdown = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
352
353
|
in: true,
|
353
354
|
add: true
|
354
355
|
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, _extends({
|
355
|
-
|
356
|
+
name: l('Stop')
|
356
357
|
}, TooltipProps), /*#__PURE__*/React.createElement(IconButton, _extends({
|
357
358
|
onClick: onStop
|
358
359
|
}, IconButtonProps), /*#__PURE__*/React.createElement(IconStop, null))), /*#__PURE__*/React.createElement(Tooltip, _extends({
|
359
|
-
|
360
|
+
name: l('Pause')
|
360
361
|
}, TooltipProps), /*#__PURE__*/React.createElement(IconButton, _extends({
|
361
362
|
onClick: onPause
|
362
363
|
}, IconButtonProps), /*#__PURE__*/React.createElement(IconPause, null))))), status === 'paused' && /*#__PURE__*/React.createElement(Fade, {
|
363
364
|
in: true,
|
364
365
|
add: true
|
365
366
|
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, _extends({
|
366
|
-
|
367
|
+
name: l('Stop')
|
367
368
|
}, TooltipProps), /*#__PURE__*/React.createElement(IconButton, _extends({
|
368
369
|
onClick: onStop
|
369
370
|
}, IconButtonProps), /*#__PURE__*/React.createElement(IconStop, null))), /*#__PURE__*/React.createElement(Tooltip, _extends({
|
370
|
-
|
371
|
+
name: l('Resume')
|
371
372
|
}, TooltipProps), /*#__PURE__*/React.createElement(IconButton, _extends({
|
372
373
|
onClick: onResume
|
373
374
|
}, IconButtonProps), /*#__PURE__*/React.createElement(IconStart, null)))))));
|
@@ -117,6 +117,7 @@ export const SEPARATOR_SYMBOL = `–`;
|
|
117
117
|
export const SEPARATOR = ` ${SEPARATOR_SYMBOL} `;
|
118
118
|
const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
119
119
|
const theme = useOnesyTheme();
|
120
|
+
const l = theme.l;
|
120
121
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyDatePicker?.props?.default), props__), [props__]);
|
121
122
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
122
123
|
const IconButton = React.useMemo(() => theme?.elements?.IconButton || IconButtonElement, [theme]);
|
@@ -154,12 +155,12 @@ const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
154
155
|
nameFrom,
|
155
156
|
nameTo,
|
156
157
|
label: label_,
|
157
|
-
labelFrom: labelFrom_ =
|
158
|
-
labelTo: labelTo_ =
|
159
|
-
modeModalSubHeadingText = 'Select date',
|
160
|
-
modeModalSubHeadingTextRange =
|
161
|
-
selectModeHeadingText = 'Select date',
|
162
|
-
inputModeHeadingText = 'Enter date',
|
158
|
+
labelFrom: labelFrom_ = l('Date from'),
|
159
|
+
labelTo: labelTo_ = l('Date to'),
|
160
|
+
modeModalSubHeadingText = l('Select date'),
|
161
|
+
modeModalSubHeadingTextRange = `${l('Date from')}${SEPARATOR}${l('Date to')}`,
|
162
|
+
selectModeHeadingText = l('Select date'),
|
163
|
+
inputModeHeadingText = l('Enter date'),
|
163
164
|
useHelperText: useHelperText_,
|
164
165
|
weekStartDay = 'Monday',
|
165
166
|
switch: switch__,
|
@@ -516,17 +517,17 @@ const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
516
517
|
align: "center"
|
517
518
|
}, today && /*#__PURE__*/React.createElement(Button, _extends({
|
518
519
|
onClick: onToday
|
519
|
-
}, buttonProps),
|
520
|
+
}, buttonProps), l('Today')), clear && /*#__PURE__*/React.createElement(Button, _extends({
|
520
521
|
onClick: onClear
|
521
|
-
}, buttonProps),
|
522
|
+
}, buttonProps), l('Clear'))), /*#__PURE__*/React.createElement(Line, {
|
522
523
|
gap: 0,
|
523
524
|
direction: "row",
|
524
525
|
align: "center"
|
525
526
|
}, /*#__PURE__*/React.createElement(Button, _extends({
|
526
527
|
onClick: onCancel
|
527
|
-
}, buttonProps),
|
528
|
+
}, buttonProps), l('Cancel')), /*#__PURE__*/React.createElement(Button, _extends({
|
528
529
|
onClick: onOk
|
529
|
-
}, buttonProps),
|
530
|
+
}, buttonProps), l('Ok'))));
|
530
531
|
const moreProps = {};
|
531
532
|
if (version === 'desktop') {
|
532
533
|
moreProps.end = /*#__PURE__*/React.createElement(IconButton, _extends({
|
@@ -534,7 +535,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
534
535
|
color: color,
|
535
536
|
version: "text",
|
536
537
|
onClick: onOpen,
|
537
|
-
"aria-label":
|
538
|
+
"aria-label": `${l('Choose date')}${range ? ' range' : ''}`,
|
538
539
|
disabled: disabled || readOnly
|
539
540
|
}, iconButtonProps), /*#__PURE__*/React.createElement(Icon_, IconProps));
|
540
541
|
}
|
@@ -545,7 +546,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
545
546
|
if (range) {
|
546
547
|
textHeading = `${format(value[0], 'MMM')} ${format(value[0], 'DD')}${SEPARATOR}${format(value[1], 'MMM')} ${format(value[1], 'DD')}`;
|
547
548
|
}
|
548
|
-
const dayNames = ['
|
549
|
+
const dayNames = [l('Mo'), l('Tu'), l('We'), l('Th'), l('Fr'), l('Sa'), l('Su')];
|
549
550
|
const mobile = /*#__PURE__*/React.createElement(Surface, _extends({
|
550
551
|
color: "default",
|
551
552
|
tonal: tonal,
|
@@ -571,10 +572,10 @@ const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
571
572
|
color: "inherit",
|
572
573
|
version: "text",
|
573
574
|
onClick: onClose,
|
574
|
-
"aria-label":
|
575
|
+
"aria-label": l('Close')
|
575
576
|
}, iconButtonProps), /*#__PURE__*/React.createElement(IconClose, IconProps)), /*#__PURE__*/React.createElement(Button, _extends({
|
576
577
|
onClick: onOk
|
577
|
-
}, buttonProps),
|
578
|
+
}, buttonProps), l('Save'))), heading_ && /*#__PURE__*/React.createElement(Type, {
|
578
579
|
version: "l2",
|
579
580
|
className: classNames([staticClassName('DatePicker', theme) && ['onesy-DatePicker-subheading'], classes.subheading, fullScreen && classes.subheading_fullScreen])
|
580
581
|
}, !range ? modeModalSubHeadingText : modeModalSubHeadingTextRange), mode === 'select' && /*#__PURE__*/React.createElement(Line, {
|
@@ -585,12 +586,12 @@ const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
585
586
|
}, /*#__PURE__*/React.createElement(Type, {
|
586
587
|
version: "h1"
|
587
588
|
}, textHeading), switch_ && /*#__PURE__*/React.createElement(Tooltip, {
|
588
|
-
|
589
|
+
name: l('Enter date')
|
589
590
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
590
591
|
tonal: tonal,
|
591
592
|
color: "inherit",
|
592
593
|
onClick: () => onMode('input'),
|
593
|
-
"aria-label":
|
594
|
+
"aria-label": l('Enter date')
|
594
595
|
}, iconButtonProps), /*#__PURE__*/React.createElement(IconEnter, IconProps)))), mode === 'input' && /*#__PURE__*/React.createElement(Line, {
|
595
596
|
direction: "row",
|
596
597
|
align: "flex-start",
|
@@ -599,12 +600,12 @@ const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
599
600
|
}, /*#__PURE__*/React.createElement(Type, {
|
600
601
|
version: "h1"
|
601
602
|
}, inputModeHeadingText), switch_ && /*#__PURE__*/React.createElement(Tooltip, {
|
602
|
-
|
603
|
+
name: l('Select date')
|
603
604
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
604
605
|
tonal: tonal,
|
605
606
|
color: "inherit",
|
606
607
|
onClick: () => onMode('select'),
|
607
|
-
"aria-label":
|
608
|
+
"aria-label": l('Select date')
|
608
609
|
}, iconButtonProps), /*#__PURE__*/React.createElement(Icon_, IconProps))))), mode === 'select' && fullScreen && /*#__PURE__*/React.createElement(Line, {
|
609
610
|
gap: 0,
|
610
611
|
direction: "row",
|
@@ -657,7 +658,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
657
658
|
color: color,
|
658
659
|
version: "outlined",
|
659
660
|
size: size,
|
660
|
-
|
661
|
+
name: label,
|
661
662
|
mask: mask,
|
662
663
|
placeholder: placeholder,
|
663
664
|
value: inputModal,
|
@@ -714,7 +715,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
714
715
|
color: color,
|
715
716
|
version: "outlined",
|
716
717
|
size: size,
|
717
|
-
|
718
|
+
name: label,
|
718
719
|
mask: mask,
|
719
720
|
placeholder: placeholder,
|
720
721
|
value: input,
|
@@ -742,7 +743,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
742
743
|
longPress: false,
|
743
744
|
maxWidth: "unset",
|
744
745
|
noMargin: true,
|
745
|
-
|
746
|
+
name: /*#__PURE__*/React.createElement(ClickListener, {
|
746
747
|
onClickOutside: onCancel,
|
747
748
|
includeParentQueries: ['.onesy-Calendar-list']
|
748
749
|
}, desktop)
|
@@ -51,6 +51,7 @@ const useStyle = styleMethod(theme => ({
|
|
51
51
|
});
|
52
52
|
const DateTimePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
53
53
|
const theme = useOnesyTheme();
|
54
|
+
const l = theme.l;
|
54
55
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyDateTimePicker?.props?.default), props__), [props__]);
|
55
56
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
56
57
|
const AdvancedTextField = React.useMemo(() => theme?.elements?.AdvancedTextField || AdvancedTextFieldElement, [theme]);
|
@@ -78,7 +79,7 @@ const DateTimePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
78
79
|
min,
|
79
80
|
max,
|
80
81
|
validate,
|
81
|
-
headingText = 'Select date & time',
|
82
|
+
headingText = l('Select date & time'),
|
82
83
|
headingTextTime,
|
83
84
|
headingTextTimeRange,
|
84
85
|
headingTextDate,
|
@@ -512,17 +513,17 @@ const DateTimePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
512
513
|
direction: "row",
|
513
514
|
align: "center"
|
514
515
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
515
|
-
|
516
|
+
name: tab === 'date' ? l('Time') : l('Date')
|
516
517
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
517
518
|
tonal: tonal,
|
518
519
|
color: "inherit",
|
519
520
|
onClick: onPickSwitch,
|
520
|
-
"aria-label": tab === 'date' ? 'Time' : 'Date'
|
521
|
+
"aria-label": tab === 'date' ? l('Time') : l('Date')
|
521
522
|
}, iconButtonProps), tab === 'date' ? /*#__PURE__*/React.createElement(IconTime, IconProps) : /*#__PURE__*/React.createElement(IconDate, IconProps))), today && /*#__PURE__*/React.createElement(Button, _extends({
|
522
523
|
onClick: onToday
|
523
|
-
}, buttonProps),
|
524
|
+
}, buttonProps), l('Today')), clear && /*#__PURE__*/React.createElement(Button, _extends({
|
524
525
|
onClick: onClear
|
525
|
-
}, buttonProps),
|
526
|
+
}, buttonProps), l('Clear'))), /*#__PURE__*/React.createElement(Line, {
|
526
527
|
gap: 0,
|
527
528
|
direction: "row",
|
528
529
|
align: "center"
|
@@ -531,12 +532,12 @@ const DateTimePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
531
532
|
color: color,
|
532
533
|
version: "text",
|
533
534
|
onClick: onCancel
|
534
|
-
}, buttonProps),
|
535
|
+
}, buttonProps), l('Cancel')), /*#__PURE__*/React.createElement(Button, _extends({
|
535
536
|
tonal: tonal,
|
536
537
|
color: color,
|
537
538
|
version: "text",
|
538
539
|
onClick: onOk
|
539
|
-
}, buttonProps),
|
540
|
+
}, buttonProps), l('Ok'))));
|
540
541
|
const heading = (range ? tab === 'date' ? headingTextDateRange : headingTextTimeRange : tab === 'date' ? headingTextDate : headingTextTime) || headingText;
|
541
542
|
const PickerProps = _objectSpread(_objectSpread(_objectSpread({
|
542
543
|
value,
|
@@ -583,7 +584,7 @@ const DateTimePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
583
584
|
color: color,
|
584
585
|
version: "text",
|
585
586
|
onClick: onOpen,
|
586
|
-
"aria-label":
|
587
|
+
"aria-label": l('Choose date and time'),
|
587
588
|
disabled: disabled || readOnly
|
588
589
|
}, iconButtonProps), /*#__PURE__*/React.createElement(Icon_, IconProps));
|
589
590
|
}
|
@@ -607,7 +608,7 @@ const DateTimePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
607
608
|
tonal: tonal,
|
608
609
|
color: color,
|
609
610
|
version: "outlined",
|
610
|
-
|
611
|
+
name: label,
|
611
612
|
mask: mask,
|
612
613
|
placeholder: placeholder,
|
613
614
|
value: input,
|
@@ -635,7 +636,7 @@ const DateTimePicker = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
635
636
|
longPress: false,
|
636
637
|
maxWidth: "unset",
|
637
638
|
noMargin: true,
|
638
|
-
|
639
|
+
name: /*#__PURE__*/React.createElement(ClickListener, {
|
639
640
|
onClickOutside: onCancel,
|
640
641
|
includeParentQueries: ['.onesy-DateTimePicker-main', '.onesy-Calendar-list']
|
641
642
|
}, element)
|
package/esm/Drawing/Drawing.js
CHANGED
@@ -117,6 +117,7 @@ const useStyle = styleMethod(theme => ({
|
|
117
117
|
});
|
118
118
|
const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
119
119
|
const theme = useOnesyTheme();
|
120
|
+
const l = theme.l;
|
120
121
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyDrawing?.props?.default), props__), [props__]);
|
121
122
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
122
123
|
const ListItem = React.useMemo(() => theme?.elements?.ListItem || ListItemElement, [theme]);
|
@@ -425,7 +426,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
425
426
|
other_ = _objectWithoutProperties(props_, _excluded2);
|
426
427
|
return /*#__PURE__*/React.createElement(Tooltip, _extends({
|
427
428
|
open: open_ !== undefined ? open_ : undefined,
|
428
|
-
|
429
|
+
name: label
|
429
430
|
}, TooltipProps), /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, other_), children.props)));
|
430
431
|
}), []);
|
431
432
|
const WrapperAppend = React.useCallback(props_ => {
|
@@ -520,7 +521,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
520
521
|
}, /*#__PURE__*/React.createElement(ColorTextField, _extends({
|
521
522
|
tonal: tonal,
|
522
523
|
color: color,
|
523
|
-
|
524
|
+
name: l('Custom color'),
|
524
525
|
version: "outlined",
|
525
526
|
size: "small",
|
526
527
|
value: refs.inputValues.current[version_],
|
@@ -536,7 +537,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
536
537
|
onUpdate(refs.inputValues.current[version_]);
|
537
538
|
onClose();
|
538
539
|
}
|
539
|
-
},
|
540
|
+
}, l('Apply'))));
|
540
541
|
}), []);
|
541
542
|
const valueNew_ = (is('array', value) ? value : [value]).filter(Boolean);
|
542
543
|
const valueNewActive = mouseDown && valueNew_[valueNew_.length - 1];
|
@@ -634,7 +635,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
634
635
|
align: "center",
|
635
636
|
justify: "flex-start"
|
636
637
|
}, includes('stroke-width') && /*#__PURE__*/React.createElement(Select, _extends({
|
637
|
-
|
638
|
+
name: l('Stroke Width'),
|
638
639
|
valueDefault: stroke_width.find(item => String(item.value).includes('1')).value,
|
639
640
|
value: inputValues['strokeWidth'],
|
640
641
|
onChange: valueNew => updateInputValues('strokeWidth', valueNew)
|
@@ -659,7 +660,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
659
660
|
onUpdate: valueNew => updateInputValues('strokeColor', valueNew)
|
660
661
|
}, PaletteProps)))
|
661
662
|
}, /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
662
|
-
|
663
|
+
name: l('Stroke Color'),
|
663
664
|
open: refs.open.current.strokeColor ? false : undefined
|
664
665
|
}, is('function', render) ? render('stroke-color', ToggleButtonProps, refs.value.current) : /*#__PURE__*/React.createElement(ToggleButton, _extends({
|
665
666
|
ref: refs.elements.strokeColor
|
@@ -684,7 +685,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
684
685
|
align: "center",
|
685
686
|
justify: "center"
|
686
687
|
}, /*#__PURE__*/React.createElement(NumericTextField, {
|
687
|
-
|
688
|
+
name: l('Width'),
|
688
689
|
tonal: tonal,
|
689
690
|
color: color,
|
690
691
|
size: "small",
|
@@ -695,7 +696,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
695
696
|
value: refs.inputValues.current.widthInput,
|
696
697
|
onChange: valueNew => updateInputValues('widthInput', !valueNew ? 1 : valueNew)
|
697
698
|
}), "\xD7", /*#__PURE__*/React.createElement(NumericTextField, {
|
698
|
-
|
699
|
+
name: l('Height'),
|
699
700
|
tonal: tonal,
|
700
701
|
color: color,
|
701
702
|
size: "small",
|
@@ -731,7 +732,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
731
732
|
}
|
732
733
|
}, "Update"))))
|
733
734
|
}, /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
734
|
-
|
735
|
+
name: l('Size'),
|
735
736
|
open: refs.open.current.size ? false : undefined
|
736
737
|
}, is('function', render) ? render('size', ToggleButtonProps, refs.value.current) : /*#__PURE__*/React.createElement(ToggleButton, _extends({
|
737
738
|
ref: refs.elements.size
|
@@ -760,7 +761,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
760
761
|
align: "center",
|
761
762
|
justify: "flex-start"
|
762
763
|
}, includes('clear') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('clear') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
763
|
-
|
764
|
+
name: l('Clear')
|
764
765
|
}, is('function', render) ? render('clear', ToggleButtonProps, refs.value.current) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
765
766
|
onClick: onClear
|
766
767
|
}), /*#__PURE__*/React.createElement(IconClear, IconProps))))), /*#__PURE__*/React.createElement(Line, {
|
@@ -769,7 +770,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
769
770
|
align: "center",
|
770
771
|
justify: "flex-start"
|
771
772
|
}, includes('download') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('download') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
772
|
-
|
773
|
+
name: l('Download')
|
773
774
|
}, is('function', render) ? render('download', ToggleButtonProps, refs.value.current) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
774
775
|
loading: loading,
|
775
776
|
onClick: onDownload
|
package/esm/DropZone/DropZone.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
|
-
const _excluded = ["tonal", "color", "version", "start", "files", "multiple", "max", "allowedTypes", "valueDefault", "value", "onChange", "IconStart", "onFocus", "onBlur", "onDrop", "onDragOver", "onDragEnter", "onDragLeave", "disabled", "children", "className"];
|
3
|
+
const _excluded = ["tonal", "color", "version", "start", "files", "multiple", "max", "allowedTypes", "dropText", "valueDefault", "value", "onChange", "IconStart", "onFocus", "onBlur", "onDrop", "onDragOver", "onDragEnter", "onDragLeave", "disabled", "children", "className"];
|
4
4
|
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; }
|
5
5
|
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; }
|
6
6
|
import React from 'react';
|
@@ -45,6 +45,7 @@ const useStyle = styleMethod(theme => ({
|
|
45
45
|
});
|
46
46
|
const DropZone = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
47
47
|
const theme = useOnesyTheme();
|
48
|
+
const l = theme.l;
|
48
49
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyDropZone?.props?.default), props_), [props_]);
|
49
50
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
50
51
|
const FileChoose = React.useMemo(() => theme?.elements?.FileChoose || FileChooseElement, [theme]);
|
@@ -60,6 +61,7 @@ const DropZone = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
60
61
|
multiple,
|
61
62
|
max,
|
62
63
|
allowedTypes,
|
64
|
+
dropText = l('Drop files here'),
|
63
65
|
valueDefault,
|
64
66
|
value: value_,
|
65
67
|
onChange: onChange_,
|
@@ -210,7 +212,7 @@ const DropZone = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
210
212
|
className: classNames([staticClassName('DropZone', theme) && ['onesy-DropZone-wrapper-text'], classes.wrapperText])
|
211
213
|
}, /*#__PURE__*/React.createElement(IconStart, null), /*#__PURE__*/React.createElement(Type, {
|
212
214
|
version: "t1"
|
213
|
-
},
|
215
|
+
}, dropText)));
|
214
216
|
});
|
215
217
|
DropZone.displayName = 'onesy-DropZone';
|
216
218
|
export default DropZone;
|
package/esm/Emojis/Emojis.js
CHANGED
@@ -144,6 +144,7 @@ const useStyle = styleMethod(theme => ({
|
|
144
144
|
});
|
145
145
|
const Emojis = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
146
146
|
const theme = useOnesyTheme();
|
147
|
+
const l = theme.l;
|
147
148
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyEmojis?.props?.default), props_), [props_]);
|
148
149
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
149
150
|
const Menu = React.useMemo(() => theme?.elements?.Menu || MenuElement, [theme]);
|
@@ -155,39 +156,41 @@ const Emojis = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
155
156
|
const Tab = React.useMemo(() => theme?.elements?.Tab || TabElement, [theme]);
|
156
157
|
const Type = React.useMemo(() => theme?.elements?.Type || TypeElement, [theme]);
|
157
158
|
const Surface = React.useMemo(() => theme?.elements?.Surface || SurfaceElement, [theme]);
|
158
|
-
const EMOJI_CATEGORIES =
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
159
|
+
const EMOJI_CATEGORIES = React.useMemo(() => {
|
160
|
+
return [{
|
161
|
+
"name": l("Smileys and People"),
|
162
|
+
"groups": ["Smiley", "Gesture", "Person", "Clothing"],
|
163
|
+
"icon": /*#__PURE__*/React.createElement(IconMaterialMood, null)
|
164
|
+
}, {
|
165
|
+
"name": l("Animals and Nature"),
|
166
|
+
"groups": ["Animal", "Nature"],
|
167
|
+
"icon": /*#__PURE__*/React.createElement(IconMaterialEmojiNature, null)
|
168
|
+
}, {
|
169
|
+
"name": l("Food and Drink"),
|
170
|
+
"groups": ["Food"],
|
171
|
+
"icon": /*#__PURE__*/React.createElement(IconMaterialEmojiFoodBeverage, null)
|
172
|
+
}, {
|
173
|
+
"name": l("Activity"),
|
174
|
+
"groups": ["Activity"],
|
175
|
+
"icon": /*#__PURE__*/React.createElement(IconMaterialHiking, null)
|
176
|
+
}, {
|
177
|
+
"name": l("Travel and Places"),
|
178
|
+
"groups": ["Travel"],
|
179
|
+
"icon": /*#__PURE__*/React.createElement(IconMaterialEmojiTransportation, null)
|
180
|
+
}, {
|
181
|
+
"name": l("Objects"),
|
182
|
+
"groups": ["Object"],
|
183
|
+
"icon": /*#__PURE__*/React.createElement(IconMaterialEmojiObjects, null)
|
184
|
+
}, {
|
185
|
+
"name": l("Symbols"),
|
186
|
+
"groups": ["Symbol"],
|
187
|
+
"icon": /*#__PURE__*/React.createElement(IconMaterialEmojiSymbols, null)
|
188
|
+
}, {
|
189
|
+
"name": l("Flags and Countries"),
|
190
|
+
"groups": ["Flag", "Country"],
|
191
|
+
"icon": /*#__PURE__*/React.createElement(IconMaterialEmojiFlags, null)
|
192
|
+
}];
|
193
|
+
}, []);
|
191
194
|
const {
|
192
195
|
tonal = true,
|
193
196
|
color = 'themed',
|
@@ -302,7 +305,7 @@ const Emojis = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
302
305
|
fullWidth: true,
|
303
306
|
className: classes.header
|
304
307
|
}, search_ && /*#__PURE__*/React.createElement(TextField, {
|
305
|
-
name:
|
308
|
+
name: l('Search'),
|
306
309
|
version: "outlined",
|
307
310
|
value: search || '',
|
308
311
|
onChange: onChangeSearch,
|
package/esm/Frame/Frame.js
CHANGED
@@ -53,6 +53,7 @@ const useStyle = styleMethod(theme => ({
|
|
53
53
|
});
|
54
54
|
const Frame = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
55
55
|
const theme = useOnesyTheme();
|
56
|
+
const l = theme.l;
|
56
57
|
const props = React.useMemo(() => _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyFrame?.props?.default), props_), [props_]);
|
57
58
|
const Line = React.useMemo(() => theme?.elements?.Line || LineElement, [theme]);
|
58
59
|
const IconButton = React.useMemo(() => theme?.elements?.IconButton || IconButtonElement, [theme]);
|
@@ -89,19 +90,19 @@ const Frame = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
89
90
|
});
|
90
91
|
}, []);
|
91
92
|
const responsiveOptions = [{
|
92
|
-
name: 'Mobile',
|
93
|
+
name: l('Mobile'),
|
93
94
|
icon: IconMobile,
|
94
95
|
disabled: isEnvironment('browser') && window.innerWidth < 375
|
95
96
|
}, {
|
96
|
-
name: 'Tablet',
|
97
|
+
name: l('Tablet'),
|
97
98
|
icon: IconTablet,
|
98
99
|
disabled: isEnvironment('browser') && window.innerWidth < 768
|
99
100
|
}, {
|
100
|
-
name: 'Laptop',
|
101
|
+
name: l('Laptop'),
|
101
102
|
icon: IconLaptop,
|
102
103
|
disabled: isEnvironment('browser') && window.innerWidth < 1440
|
103
104
|
}, {
|
104
|
-
name: 'Desktop',
|
105
|
+
name: l('Desktop'),
|
105
106
|
icon: IconDesktop,
|
106
107
|
disabled: isEnvironment('browser') && window.innerWidth < 1920
|
107
108
|
}];
|
@@ -172,7 +173,7 @@ const Frame = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
172
173
|
className: classNames([staticClassName('Frame', theme) && ['onesy-Frame-options'], OptionsProps?.className, classes.options])
|
173
174
|
}), startOptions, responsiveOptions.map((item, index) => /*#__PURE__*/React.createElement(Tooltip, {
|
174
175
|
key: index,
|
175
|
-
|
176
|
+
name: item.name
|
176
177
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
177
178
|
size: "small",
|
178
179
|
selected: item.name === responsive,
|