@onesy/ui-react 1.0.58 → 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.
Files changed (114) hide show
  1. package/AudioPlayer/AudioPlayer.js +6 -23
  2. package/AudioRecorder/AudioRecorder.js +2 -1
  3. package/AutoComplete/AutoComplete.js +5 -4
  4. package/AutoCompleteCountry/AutoCompleteCountry.js +2 -1
  5. package/AutoCompleteCurrency/AutoCompleteCurrency.js +2 -1
  6. package/Breadcrumbs/Breadcrumbs.js +3 -2
  7. package/BubbleChart/BubbleChart.js +3 -2
  8. package/Calendar/Calendar.js +7 -6
  9. package/CalendarAvailability/CalendarAvailability.d.ts +4 -1
  10. package/CalendarAvailability/CalendarAvailability.js +23 -18
  11. package/CalendarMenu/CalendarMenu.js +6 -5
  12. package/CalendarMonth/CalendarMonth.js +8 -7
  13. package/CalendarViews/CalendarViews.d.ts +4 -1
  14. package/CalendarViews/CalendarViews.js +17 -12
  15. package/Chart/Chart.js +1 -0
  16. package/ColorTextField/ColorTextField.js +2 -1
  17. package/Confirm/Confirm.js +4 -3
  18. package/CookieBanner/CookieBanner.js +3 -2
  19. package/Countdown/Countdown.js +5 -4
  20. package/DatePicker/DatePicker.js +10 -9
  21. package/DateTimePicker/DateTimePicker.js +5 -4
  22. package/Drawing/Drawing.js +9 -8
  23. package/DropZone/DropZone.d.ts +1 -0
  24. package/DropZone/DropZone.js +3 -2
  25. package/Emojis/Emojis.js +46 -43
  26. package/Frame/Frame.js +6 -5
  27. package/ImageEdit/ImageEdit.js +21 -20
  28. package/Info/Info.js +2 -1
  29. package/Links/Links.d.ts +2 -0
  30. package/Links/Links.js +7 -6
  31. package/Medias/Medias.js +2 -1
  32. package/MenuDesktop/MenuDesktop.js +1 -3
  33. package/NavigationItem/NavigationItem.js +1 -1
  34. package/NotFound/NotFound.d.ts +1 -0
  35. package/NotFound/NotFound.js +3 -2
  36. package/Page/Page.js +2 -1
  37. package/PieChart/PieChart.js +4 -3
  38. package/RichTextEditor/RichTextEditor.js +57 -56
  39. package/ScreenCapture/ScreenCapture.js +2 -1
  40. package/SectionAction/SectionAction.js +2 -1
  41. package/SectionBoxes/SectionBoxes.js +2 -1
  42. package/SectionCards/SectionCards.js +2 -1
  43. package/SectionCarousel/SectionCarousel.js +2 -1
  44. package/SectionMedia/SectionMedia.js +2 -1
  45. package/SectionTextMedia/SectionTextMedia.js +2 -1
  46. package/Select/Select.js +9 -14
  47. package/Share/Share.js +15 -14
  48. package/SmartTextField/SmartTextField.js +13 -12
  49. package/SpeechToText/SpeechToText.js +3 -2
  50. package/SpeedDial/SpeedDial.js +1 -1
  51. package/SpeedDialItem/SpeedDialItem.js +1 -1
  52. package/TableCell/TableCell.js +2 -1
  53. package/TablePagination/TablePagination.js +2 -1
  54. package/TextField/TextField.d.ts +1 -0
  55. package/TextToSpeech/TextToSpeech.js +4 -3
  56. package/TimePicker/TimePicker.js +9 -8
  57. package/Timer/Timer.js +3 -2
  58. package/VideoPlayer/VideoPlayer.js +5 -4
  59. package/Widgets/Widgets.js +3 -2
  60. package/esm/AudioPlayer/AudioPlayer.js +7 -30
  61. package/esm/AudioRecorder/AudioRecorder.js +8 -7
  62. package/esm/AutoComplete/AutoComplete.js +5 -4
  63. package/esm/AutoCompleteCountry/AutoCompleteCountry.js +2 -0
  64. package/esm/AutoCompleteCurrency/AutoCompleteCurrency.js +2 -1
  65. package/esm/Breadcrumbs/Breadcrumbs.js +3 -2
  66. package/esm/BubbleChart/BubbleChart.js +3 -2
  67. package/esm/Calendar/Calendar.js +9 -8
  68. package/esm/CalendarAvailability/CalendarAvailability.js +31 -21
  69. package/esm/CalendarMenu/CalendarMenu.js +7 -6
  70. package/esm/CalendarMonth/CalendarMonth.js +8 -7
  71. package/esm/CalendarViews/CalendarViews.js +25 -15
  72. package/esm/Chart/Chart.js +1 -0
  73. package/esm/ColorTextField/ColorTextField.js +2 -1
  74. package/esm/Confirm/Confirm.js +7 -6
  75. package/esm/CookieBanner/CookieBanner.js +4 -3
  76. package/esm/Countdown/Countdown.js +10 -9
  77. package/esm/DatePicker/DatePicker.js +22 -21
  78. package/esm/DateTimePicker/DateTimePicker.js +11 -10
  79. package/esm/Drawing/Drawing.js +11 -10
  80. package/esm/DropZone/DropZone.js +4 -2
  81. package/esm/Emojis/Emojis.js +37 -34
  82. package/esm/Frame/Frame.js +6 -5
  83. package/esm/ImageEdit/ImageEdit.js +25 -24
  84. package/esm/Info/Info.js +2 -1
  85. package/esm/Links/Links.js +9 -6
  86. package/esm/Medias/Medias.js +2 -1
  87. package/esm/MenuDesktop/MenuDesktop.js +1 -2
  88. package/esm/NavigationItem/NavigationItem.js +1 -1
  89. package/esm/NotFound/NotFound.js +5 -3
  90. package/esm/Page/Page.js +3 -2
  91. package/esm/PieChart/PieChart.js +4 -4
  92. package/esm/RichTextEditor/RichTextEditor.js +76 -75
  93. package/esm/ScreenCapture/ScreenCapture.js +4 -3
  94. package/esm/SectionAction/SectionAction.js +2 -1
  95. package/esm/SectionBoxes/SectionBoxes.js +2 -1
  96. package/esm/SectionCards/SectionCards.js +2 -1
  97. package/esm/SectionCarousel/SectionCarousel.js +2 -1
  98. package/esm/SectionMedia/SectionMedia.js +2 -1
  99. package/esm/SectionTextMedia/SectionTextMedia.js +2 -1
  100. package/esm/Select/Select.js +11 -7
  101. package/esm/Share/Share.js +16 -15
  102. package/esm/SmartTextField/SmartTextField.js +15 -14
  103. package/esm/SpeechToText/SpeechToText.js +3 -2
  104. package/esm/SpeedDial/SpeedDial.js +1 -1
  105. package/esm/SpeedDialItem/SpeedDialItem.js +1 -1
  106. package/esm/TableCell/TableCell.js +2 -1
  107. package/esm/TablePagination/TablePagination.js +2 -1
  108. package/esm/TextToSpeech/TextToSpeech.js +4 -3
  109. package/esm/TimePicker/TimePicker.js +19 -18
  110. package/esm/Timer/Timer.js +7 -6
  111. package/esm/VideoPlayer/VideoPlayer.js +7 -6
  112. package/esm/Widgets/Widgets.js +3 -2
  113. package/esm/index.js +1 -1
  114. package/package.json +2 -2
package/Select/Select.js CHANGED
@@ -111,6 +111,7 @@ const getValue = (value) => (value === null || value === void 0 ? void 0 : value
111
111
  const Select = react_1.default.forwardRef((props_, ref) => {
112
112
  var _a;
113
113
  const theme = (0, style_react_1.useOnesyTheme)();
114
+ const l = theme.l;
114
115
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesySelect) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
115
116
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
116
117
  const ListItem = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ListItem) || ListItem_1.default; }, [theme]);
@@ -120,7 +121,7 @@ const Select = react_1.default.forwardRef((props_, ref) => {
120
121
  const Chips = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Chips) || Chips_1.default; }, [theme]);
121
122
  const TextField = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.TextField) || TextField_1.default; }, [theme]);
122
123
  const IconButton = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.IconButton) || IconButton_1.default; }, [theme]);
123
- const { tonal = true, color = 'primary', size = 'regular', version = 'filled', value: value_, valueDefault, onChange: onChange_, options, name, multiple, prefix, sufix, start, end, autoWidth = true, getLabel: getLabel_, fullWidth, chip, clear, readOnly, noSelectText, disabled, renderValues: renderValues_, renderChip, IconClear = IconMaterialCloseW100_1.default, IconDropdown = IconMaterialArrowDropDownW100_1.default, WrapperProps, ChipProps, ChiProps, ListProps = {
124
+ const { tonal = true, color = 'primary', size = 'regular', version = 'filled', value: value_, valueDefault, onChange: onChange_, options, name, multiple, prefix, sufix, start, end, autoWidth = true, getLabel: getLabel_, fullWidth, chip, clear, readOnly, noSelectText, disabled, renderValues: renderValues_, renderChip, IconClear = IconMaterialCloseW100_1.default, IconDropdown = IconMaterialArrowDropDownW100_1.default, inputProps, InputWrapperProps, WrapperProps, ChipProps, ChiProps, ListProps = {
124
125
  style: {
125
126
  maxHeight: 250,
126
127
  overflowY: 'auto',
@@ -128,7 +129,7 @@ const Select = react_1.default.forwardRef((props_, ref) => {
128
129
  }
129
130
  }, MenuProps = {
130
131
  portal: true
131
- }, IconButtonProps, IconProps, className, style, children: children_ } = props, other = __rest(props, ["tonal", "color", "size", "version", "value", "valueDefault", "onChange", "options", "name", "multiple", "prefix", "sufix", "start", "end", "autoWidth", "getLabel", "fullWidth", "chip", "clear", "readOnly", "noSelectText", "disabled", "renderValues", "renderChip", "IconClear", "IconDropdown", "WrapperProps", "ChipProps", "ChiProps", "ListProps", "MenuProps", "IconButtonProps", "IconProps", "className", "style", "children"]);
132
+ }, IconButtonProps, IconProps, className, style, children: children_ } = props, other = __rest(props, ["tonal", "color", "size", "version", "value", "valueDefault", "onChange", "options", "name", "multiple", "prefix", "sufix", "start", "end", "autoWidth", "getLabel", "fullWidth", "chip", "clear", "readOnly", "noSelectText", "disabled", "renderValues", "renderChip", "IconClear", "IconDropdown", "inputProps", "InputWrapperProps", "WrapperProps", "ChipProps", "ChiProps", "ListProps", "MenuProps", "IconButtonProps", "IconProps", "className", "style", "children"]);
132
133
  const children = react_1.default.Children.toArray(children_);
133
134
  const [value, setValue] = react_1.default.useState(() => {
134
135
  const values = valueDefault !== undefined ? valueDefault : value_;
@@ -296,7 +297,7 @@ const Select = react_1.default.forwardRef((props_, ref) => {
296
297
  });
297
298
  const endIcons = [
298
299
  end,
299
- clear && !!(multiple ? value.length : ![undefined, null].includes(value)) && ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onClear, size: 'small', "aria-label": 'Input clear' }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconClear, Object.assign({}, IconProps)) }))),
300
+ clear && !!(multiple ? value.length : ![undefined, null].includes(value)) && ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onClear, size: 'small', "aria-label": l('Input clear') }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconClear, Object.assign({}, IconProps)) }))),
300
301
  ...(!readOnly ? [
301
302
  (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ size: 'regular', onClick: onClickArrowDown, "aria-expanded": open, "aria-controls": refs.ids.list }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconDropdown, Object.assign({ size: 'large' }, IconProps, { className: (0, style_react_1.classNames)([
302
303
  IconProps === null || IconProps === void 0 ? void 0 : IconProps.className,
@@ -342,11 +343,13 @@ const Select = react_1.default.forwardRef((props_, ref) => {
342
343
  classes.root,
343
344
  open && classes.open,
344
345
  disabled && classes.disabled
345
- ]), tonal: tonal, color: color, size: size, version: version, name: name, prefix: prefix, sufix: sufix, start: start, end: endIcons, readOnly: readOnly, endVerticalAlign: 'center', role: 'combobox', "aria-multiselectable": multiple, "aria-controls": refs.ids.list, "aria-expanded": open, "aria-haspopup": 'listbox', "aria-labelledby": name, "aria-disabled": disabled, fullWidth: fullWidth, disabled: disabled, InputWrapperProps: {
346
- className: (0, style_react_1.classNames)([
346
+ ]), tonal: tonal, color: color, size: size, version: version, name: name, prefix: prefix, sufix: sufix, start: start, end: endIcons, readOnly: readOnly, endVerticalAlign: 'center', role: 'combobox', "aria-multiselectable": multiple, "aria-controls": refs.ids.list, "aria-expanded": open, "aria-haspopup": 'listbox', "aria-labelledby": name, "aria-disabled": disabled, fullWidth: fullWidth, disabled: disabled, InputWrapperProps: Object.assign(Object.assign({ onMouseDown,
347
+ onMouseUp,
348
+ onClick, onKeyDown: onEnterKeyDown }, InputWrapperProps), { className: (0, style_react_1.classNames)([
347
349
  (0, utils_2.staticClassName)('Select', theme) && [
348
350
  'onesy-Select-input-wrapper'
349
351
  ],
352
+ InputWrapperProps === null || InputWrapperProps === void 0 ? void 0 : InputWrapperProps.className,
350
353
  classes.inputWrapper,
351
354
  chip && [
352
355
  classes.chip,
@@ -354,15 +357,7 @@ const Select = react_1.default.forwardRef((props_, ref) => {
354
357
  ],
355
358
  open && classes.open,
356
359
  readOnly && classes.readOnly
357
- ]),
358
- onMouseDown,
359
- onMouseUp,
360
- onClick,
361
- onKeyDown: onEnterKeyDown
362
- }, inputProps: {
363
- disabled: true,
364
- readOnly: true
365
- }, style: Object.assign(Object.assign({}, style), styles.root) }, other, { children: (0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 0, direction: 'row', className: (0, style_react_1.classNames)([
360
+ ]) }), inputProps: Object.assign({ disabled: true, readOnly: true }, inputProps), style: Object.assign(Object.assign({}, style), styles.root) }, other, { children: (0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 0, direction: 'row', className: (0, style_react_1.classNames)([
366
361
  (0, utils_2.staticClassName)('Select', theme) && [
367
362
  'onesy-Select-input'
368
363
  ],
package/Share/Share.js CHANGED
@@ -123,6 +123,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
123
123
  }), { name: 'onesy-Share' });
124
124
  const Share = react_1.default.forwardRef((props_, ref) => {
125
125
  const theme = (0, style_react_1.useOnesyTheme)();
126
+ const l = theme.l;
126
127
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyShare) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
127
128
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
128
129
  const Type = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Type) || Type_1.default; }, [theme]);
@@ -225,18 +226,18 @@ const Share = react_1.default.forwardRef((props_, ref) => {
225
226
  }, []);
226
227
  const size = props.size !== undefined ? props.size : mobile ? 'small' : 'regular';
227
228
  const options = [
228
- { name: 'Facebook', Icon: IconFacebook, color: '#316FF6' },
229
- { name: 'X', Icon: IconX, color: '#000000' },
230
- { name: 'Linkedin', Icon: IconLinkedin, color: '#0077b5' },
231
- { name: 'Pinterest', Icon: IconPinterest, color: '#bd081c' },
232
- { name: 'Reddit', Icon: IconReddit, color: '#ff4500' },
233
- { name: 'Whatsapp', Icon: IconWhatsapp, color: '#25d366' },
234
- { name: 'Viber', Icon: IconViber, color: '#7360f2' },
235
- { name: 'Email', Icon: IconEmail, title: 'Send email', color: theme.palette.color.info[50] },
236
- { name: 'Copy', Icon: IconCopy, title: 'Copy', color: theme.palette.color.secondary[50] },
237
- { name: 'Print', Icon: IconPrint, title: 'Print', color: theme.palette.color.neutral[70] }
229
+ { name: l('Facebook'), Icon: IconFacebook, color: '#316FF6' },
230
+ { name: l('X'), Icon: IconX, color: '#000000' },
231
+ { name: l('Linkedin'), Icon: IconLinkedin, color: '#0077b5' },
232
+ { name: l('Pinterest'), Icon: IconPinterest, color: '#bd081c' },
233
+ { name: l('Reddit'), Icon: IconReddit, color: '#ff4500' },
234
+ { name: l('Whatsapp'), Icon: IconWhatsapp, color: '#25d366' },
235
+ { name: l('Viber'), Icon: IconViber, color: '#7360f2' },
236
+ { name: l('Email'), Icon: IconEmail, title: 'Send email', color: theme.palette.color.info[50] },
237
+ { name: l('Copy'), Icon: IconCopy, title: 'Copy', color: theme.palette.color.secondary[50] },
238
+ { name: l('Print'), Icon: IconPrint, title: 'Print', color: theme.palette.color.neutral[70] }
238
239
  ];
239
- const optionMore = { name: 'More', Icon: IconMore, title: 'More', color: theme.palette.color.quaternary[40] };
240
+ const optionMore = { name: l('More'), Icon: IconMore, title: l('More'), color: theme.palette.color.quaternary[40] };
240
241
  const exclude = [...(exclude_ || [])];
241
242
  if (!mobile)
242
243
  exclude.push('whatsapp', 'viber');
@@ -293,7 +294,7 @@ const Share = react_1.default.forwardRef((props_, ref) => {
293
294
  };
294
295
  if ((0, utils_1.is)('function', render))
295
296
  return render(item.name, itemProps_);
296
- return ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: (item.name === 'Copy' && copied) ? 'Copied!' : item.title || `Share to ${item.name}` }, AppendProps, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ onClick: (event) => onClick(item, event) }, itemProps_, { className: (0, style_react_1.classNames)([
297
+ return ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: (item.name === l('Copy') && copied) ? l('Copied!') : item.title || `${l('Share to')} ${item.name}` }, AppendProps, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ onClick: (event) => onClick(item, event) }, itemProps_, { className: (0, style_react_1.classNames)([
297
298
  (0, utils_2.staticClassName)('Share', theme) && [
298
299
  'onesy-Share-item',
299
300
  'onesy-Share-visible',
@@ -312,7 +313,7 @@ const Share = react_1.default.forwardRef((props_, ref) => {
312
313
  maxHeight: 240,
313
314
  overflowY: 'auto'
314
315
  }
315
- } }, { children: (0, jsx_runtime_1.jsx)(Line, { children: (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: optionMore.title || 'More' }, AppendProps, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ className: (0, style_react_1.classNames)([
316
+ } }, { children: (0, jsx_runtime_1.jsx)(Line, { children: (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: optionMore.title || l('More') }, AppendProps, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ className: (0, style_react_1.classNames)([
316
317
  (0, utils_2.staticClassName)('Share', theme) && [
317
318
  'onesy-Share-item',
318
319
  'onesy-Share-visible',
@@ -322,7 +323,7 @@ const Share = react_1.default.forwardRef((props_, ref) => {
322
323
  ]), style: {
323
324
  color: theme.methods.palette.color.text(optionMore.color),
324
325
  backgroundColor: optionMore.color
325
- } }, { children: [(0, jsx_runtime_1.jsx)(Interaction, {}), (0, jsx_runtime_1.jsx)(optionMore.Icon, { size: 'regular' })] })) })) }) }))), !!(moreOptions === null || moreOptions === void 0 ? void 0 : moreOptions.length) && mobile && ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: optionMore.title || 'More' }, AppendProps, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ onClick: onOpenBottomSheet, className: (0, style_react_1.classNames)([
326
+ } }, { children: [(0, jsx_runtime_1.jsx)(Interaction, {}), (0, jsx_runtime_1.jsx)(optionMore.Icon, { size: 'regular' })] })) })) }) }))), !!(moreOptions === null || moreOptions === void 0 ? void 0 : moreOptions.length) && mobile && ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: optionMore.title || l('More') }, AppendProps, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ onClick: onOpenBottomSheet, className: (0, style_react_1.classNames)([
326
327
  'onesy-Share-item',
327
328
  'onesy-Share-visible',
328
329
  classes.item,
@@ -105,6 +105,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
105
105
  const SmartTextField = react_1.default.forwardRef((props_, ref) => {
106
106
  var _a;
107
107
  const theme = (0, style_react_1.useOnesyTheme)();
108
+ const l = theme.l;
108
109
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesySmartTextField) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
109
110
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
110
111
  const TextField = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.TextField) || TextField_1.default; }, [theme]);
@@ -657,7 +658,7 @@ const SmartTextField = react_1.default.forwardRef((props_, ref) => {
657
658
  classes.inputWrapper
658
659
  ]) }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.5, direction: 'row', align: 'center', style: {
659
660
  width: '100%'
660
- } }, { children: [(0, jsx_runtime_1.jsx)(InputComponent, Object.assign({ label: labelInput, version: 'outlined', size: 'small', valueDefault: value__, onChange: onChange__ }, InputProps, { style: {
661
+ } }, { children: [(0, jsx_runtime_1.jsx)(InputComponent, Object.assign({ name: labelInput, version: 'outlined', size: 'small', valueDefault: value__, onChange: onChange__ }, InputProps, { style: {
661
662
  width: 'unset',
662
663
  flex: '1 1 auto'
663
664
  } })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ color: 'inherit', version: 'text', size: 'small', onClick: onClick }, { children: labelButton }))] })) })));
@@ -672,15 +673,15 @@ const SmartTextField = react_1.default.forwardRef((props_, ref) => {
672
673
  ]) }, { children: (0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: open_, add: true }, { children: react_1.default.cloneElement(element) })) }))), anchorElement: anchorElement, portal: true, alignment: 'center', position: 'bottom' }, AppendProps, { children: react_1.default.cloneElement(childrenWrapperAppend, Object.assign(Object.assign({}, other_), childrenWrapperAppend.props)) })));
673
674
  }, []);
674
675
  const WrapperToggleButton = react_1.default.useCallback(react_1.default.forwardRef((propsWrapperToggleButton, ref_) => {
675
- const { open: open_, label: labelWrapperToogleButton, children: childrenWrapperToggleButton } = propsWrapperToggleButton, other_ = __rest(propsWrapperToggleButton, ["open", "label", "children"]);
676
- return ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ open: open_ !== undefined ? open_ : undefined, label: labelWrapperToogleButton }, TooltipProps, { children: react_1.default.cloneElement(childrenWrapperToggleButton, Object.assign(Object.assign({}, other_), childrenWrapperToggleButton.props)) })));
676
+ const { open: open_, name: nameWrapperToogleButton, children: childrenWrapperToggleButton } = propsWrapperToggleButton, other_ = __rest(propsWrapperToggleButton, ["open", "name", "children"]);
677
+ return ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ open: open_ !== undefined ? open_ : undefined, name: nameWrapperToogleButton }, TooltipProps, { children: react_1.default.cloneElement(childrenWrapperToggleButton, Object.assign(Object.assign({}, other_), childrenWrapperToggleButton.props)) })));
677
678
  }), []);
678
679
  const updateElements = {
679
- 'italic': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Italic' }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.textSelected.current.includes('italic'), onClick: textMethod('italic') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialFormatItalicW100_1.default, Object.assign({}, IconProps)) })) }))),
680
- 'underline': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Underline' }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.textSelected.current.includes('underline'), onClick: textMethod('underline') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialFormatUnderlinedW100_1.default, Object.assign({}, IconProps)) })) }))),
681
- 'bold': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Bold', onClick: textMethod('bold') }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.textSelected.current.includes('bold') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialFormatBoldW100_1.default, Object.assign({}, IconProps)) })) }))),
682
- 'strike-line': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Strike Line', onClick: textMethod('strike-line') }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.textSelected.current.includes('strike-line') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialStrikethroughSW100_1.default, Object.assign({}, IconProps)) })) }))),
683
- 'link-add': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.linkMiniMenu, anchorElement: refs.miniMenuElements.linkAdd, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('linkMiniMenu', false), include: [refs.miniMenuElements.linkAdd] }, { children: (0, jsx_runtime_1.jsx)(Input, { ref: refs.miniMenuElements.linkAddInput, label: 'Link', labelButton: 'Add', value: refs.inputValues.current.link, onChange: (valueNew) => updateInputValues('link', valueNew), onClick: () => {
680
+ 'italic': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Italic') }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.textSelected.current.includes('italic'), onClick: textMethod('italic') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialFormatItalicW100_1.default, Object.assign({}, IconProps)) })) }))),
681
+ 'underline': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Underline') }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.textSelected.current.includes('underline'), onClick: textMethod('underline') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialFormatUnderlinedW100_1.default, Object.assign({}, IconProps)) })) }))),
682
+ 'bold': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Bold'), onClick: textMethod('bold') }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.textSelected.current.includes('bold') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialFormatBoldW100_1.default, Object.assign({}, IconProps)) })) }))),
683
+ 'strike-line': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Strike Line'), onClick: textMethod('strike-line') }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { selected: refs.textSelected.current.includes('strike-line') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialStrikethroughSW100_1.default, Object.assign({}, IconProps)) })) }))),
684
+ 'link-add': ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.linkMiniMenu, anchorElement: refs.miniMenuElements.linkAdd, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('linkMiniMenu', false), include: [refs.miniMenuElements.linkAdd] }, { children: (0, jsx_runtime_1.jsx)(Input, { ref: refs.miniMenuElements.linkAddInput, name: l('Link'), labelButton: l('Add'), value: refs.inputValues.current.link, onChange: (valueNew) => updateInputValues('link', valueNew), onClick: () => {
684
685
  if (refs.range.current) {
685
686
  const selection_ = refs.rootWindow.current.getSelection();
686
687
  if (!selection_)
@@ -691,11 +692,11 @@ const SmartTextField = react_1.default.forwardRef((props_, ref) => {
691
692
  textMethod('link-add')(refs.inputValues.current.link);
692
693
  updateOpen('linkMiniMenu', false);
693
694
  updateInputValues('link', '');
694
- }, className: classes.inputLink }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Insert Link', open: refs.open.current.linkMiniMenu ? false : undefined }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.miniMenuElements.linkAdd }, ToggleButtonProps, { selected: refs.open.current.linkMiniMenu, onClick: () => updateOpen('linkMiniMenu', !refs.open.current.linkMiniMenu) }, { children: (0, jsx_runtime_1.jsx)(IconMaterialAddLinkW100_1.default, Object.assign({}, IconProps)) })) })) }))),
695
- 'link-remove': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Remove Link' }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: textMethod('link-remove') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialLinkOffW100_1.default, Object.assign({}, IconProps)) })) })))
695
+ }, className: classes.inputLink }) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Insert Link'), open: refs.open.current.linkMiniMenu ? false : undefined }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.miniMenuElements.linkAdd }, ToggleButtonProps, { selected: refs.open.current.linkMiniMenu, onClick: () => updateOpen('linkMiniMenu', !refs.open.current.linkMiniMenu) }, { children: (0, jsx_runtime_1.jsx)(IconMaterialAddLinkW100_1.default, Object.assign({}, IconProps)) })) })) }))),
696
+ 'link-remove': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Remove Link') }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: textMethod('link-remove') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialLinkOffW100_1.default, Object.assign({}, IconProps)) })) })))
696
697
  };
697
698
  const actionElements = {
698
- 'clear': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Clear' }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: textMethod('clear') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialFormatClearW100_1.default, Object.assign({}, IconProps)) })) })))
699
+ 'clear': ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Clear') }, { children: (0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: textMethod('clear') }, { children: (0, jsx_runtime_1.jsx)(IconMaterialFormatClearW100_1.default, Object.assign({}, IconProps)) })) })))
699
700
  };
700
701
  const miniMenu = react_1.default.useMemo(() => {
701
702
  return ((0, jsx_runtime_1.jsx)(Append, Object.assign({ open: !!textSelection, element: (body) => {
@@ -717,7 +718,7 @@ const SmartTextField = react_1.default.forwardRef((props_, ref) => {
717
718
  classes.textMiniMenuWrapper
718
719
  ]) }, { children: (0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: !!textSelection, add: true }, { children: (0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => {
719
720
  setTextSelection(null);
720
- }, include: [refs.miniMenu, refs.miniMenu.current, refs.miniMenuElements.linkAddInput, refs.miniMenuElements.linkAddInput.current] }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start', role: 'toolbar', color: 'themed', "aria-label": 'Mini menu', Component: Surface, className: (0, style_react_1.classNames)([
721
+ }, include: [refs.miniMenu, refs.miniMenu.current, refs.miniMenuElements.linkAddInput, refs.miniMenuElements.linkAddInput.current] }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start', role: 'toolbar', color: 'themed', "aria-label": l('Mini menu'), Component: Surface, className: (0, style_react_1.classNames)([
721
722
  classes.textMiniMenu
722
723
  ]) }, { children: [(0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [updateElements['italic'], updateElements['underline'], updateElements['bold'], updateElements['strike-line']] })), (0, jsx_runtime_1.jsxs)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: [updateElements['link-add'], updateElements['link-remove']] })), (0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: actionElements['clear'] }))] })) })) })) })));
723
724
  }, parent: refs.root.current, anchor: textSelection === null || textSelection === void 0 ? void 0 : textSelection.selection, portal: true, alignment: 'center', position: 'bottom', clearOnClose: true }, AppendProps)));
@@ -37,6 +37,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
37
37
  }), { name: 'onesy-SpeechToText' });
38
38
  const SpeechToText = react_1.default.forwardRef((props_, ref) => {
39
39
  const theme = (0, style_react_1.useOnesyTheme)();
40
+ const l = theme.l;
40
41
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesySpeechToText) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
41
42
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
42
43
  const Tooltip = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Tooltip) || Tooltip_1.default; }, [theme]);
@@ -146,10 +147,10 @@ const SpeechToText = react_1.default.forwardRef((props_, ref) => {
146
147
  if (!supported)
147
148
  return null;
148
149
  let IconToUse = Icon_;
149
- let name = 'Speech to text';
150
+ let name = l('Speech to text');
150
151
  if (status === 'started') {
151
152
  IconToUse = IconStop;
152
- name = 'Stop';
153
+ name = l('Stop');
153
154
  }
154
155
  return ((0, jsx_runtime_1.jsx)(Line, Object.assign({ ref: (item) => {
155
156
  if (ref) {
@@ -391,7 +391,7 @@ const SpeedDial = react_1.default.forwardRef((props_, ref) => {
391
391
  onBlur,
392
392
  onFocus,
393
393
  TooltipProps: Object.assign({}, TooltipProps)
394
- }) }), index))) }))), (0, jsx_runtime_1.jsx)(FabTransitionComponent, Object.assign({ in: inProp }, FabTransitionComponentProps, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'column' }, FabWrapperProps, { children: [start, (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: tooltipLabel }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(Fab, Object.assign({ ref: refs.fab, tonal: tonal, color: color, version: version, onClick: onClick, onBlur: onBlur, onFocus: onFocus, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, className: (0, style_react_1.classNames)([
394
+ }) }), index))) }))), (0, jsx_runtime_1.jsx)(FabTransitionComponent, Object.assign({ in: inProp }, FabTransitionComponentProps, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'column' }, FabWrapperProps, { children: [start, (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: tooltipLabel }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(Fab, Object.assign({ ref: refs.fab, tonal: tonal, color: color, version: version, onClick: onClick, onBlur: onBlur, onFocus: onFocus, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, className: (0, style_react_1.classNames)([
395
395
  (0, utils_2.staticClassName)('SpeedDial', theme) && [
396
396
  `onesy-SpeedDial-fab`
397
397
  ],
@@ -63,7 +63,7 @@ const SpeedDialItem = react_1.default.forwardRef((props_, ref) => {
63
63
  render(Object.assign({ onBlur,
64
64
  onFocus,
65
65
  TooltipProps }, other)) :
66
- (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: label, portal: true, nowrap: true }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onBlur: onBlur, onFocus: onFocus }, other, { children: (0, jsx_runtime_1.jsx)(Icon, {}) })) })) })));
66
+ (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: label, portal: true, nowrap: true }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onBlur: onBlur, onFocus: onFocus }, other, { children: (0, jsx_runtime_1.jsx)(Icon, {}) })) })) })));
67
67
  });
68
68
  SpeedDialItem.displayName = 'onesy-SpeedDialItem';
69
69
  exports.default = SpeedDialItem;
@@ -102,6 +102,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
102
102
  }), { name: 'onesy-TableCell' });
103
103
  const TableCell = react_1.default.forwardRef((props_, ref) => {
104
104
  const theme = (0, style_react_1.useOnesyTheme)();
105
+ const l = theme.l;
105
106
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyTableCell) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
106
107
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
107
108
  const Type = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Type) || Type_1.default; }, [theme]);
@@ -211,7 +212,7 @@ const TableCell = react_1.default.forwardRef((props_, ref) => {
211
212
  TypeProps === null || TypeProps === void 0 ? void 0 : TypeProps.className
212
213
  ]) }, { children: children }))) : (children && react_1.default.cloneElement(children, {
213
214
  tabIndex: sort !== undefined ? 0 : undefined
214
- })), sort && ((0, jsx_runtime_1.jsx)(Tooltip_1.default, Object.assign({ name: sortedBy === 'asc' ? 'Ascending' : 'Descending' }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ size: 'small', onClick: onSort, disabled: disabled, className: (0, style_react_1.classNames)([
215
+ })), sort && ((0, jsx_runtime_1.jsx)(Tooltip_1.default, Object.assign({ name: sortedBy === 'asc' ? l('Ascending') : l('Descending') }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ size: 'small', onClick: onSort, disabled: disabled, className: (0, style_react_1.classNames)([
215
216
  (0, utils_2.staticClassName)('TableCell', theme) && [
216
217
  `onesy-TableCell-sort-icon-button`
217
218
  ],
@@ -39,6 +39,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
39
39
  }), { name: 'onesy-TablePagination' });
40
40
  const TablePagination = react_1.default.forwardRef((props_, ref) => {
41
41
  const theme = (0, style_react_1.useOnesyTheme)();
42
+ const l = theme.l;
42
43
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyTablePagination) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
43
44
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
44
45
  const Type = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Type) || Type_1.default; }, [theme]);
@@ -94,7 +95,7 @@ const TablePagination = react_1.default.forwardRef((props_, ref) => {
94
95
  `onesy-TablePagination-text`
95
96
  ],
96
97
  classes.text
97
- ]) }, { children: [(0, jsx_runtime_1.jsxs)("span", { children: [(page * rowsPerPage) + 1, " - ", ((page + 1) * rowsPerPage) || total] }), " ", (0, jsx_runtime_1.jsx)("span", { children: "of" }), " ", (0, jsx_runtime_1.jsx)("span", { children: total })] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', justify: 'flex-start', align: 'center' }, { children: [first && ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => update(0), disabled: page === 0 }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconFirst, {}) }))), before && ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => update((0, utils_1.clamp)(page - 1, 0, maxPage)), disabled: page === 0 }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconBefore, {}) }))), next && ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => update((0, utils_1.clamp)(page + 1, 0, maxPage)), disabled: page === maxPage }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconNext, {}) }))), last && ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => update(maxPage), disabled: page === maxPage }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconLast, {}) })))] }))] })));
98
+ ]) }, { children: [(0, jsx_runtime_1.jsxs)("span", { children: [(page * rowsPerPage) + 1, " - ", ((page + 1) * rowsPerPage) || total] }), " ", (0, jsx_runtime_1.jsx)("span", { children: l('of') }), " ", (0, jsx_runtime_1.jsx)("span", { children: total })] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', justify: 'flex-start', align: 'center' }, { children: [first && ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => update(0), disabled: page === 0 }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconFirst, {}) }))), before && ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => update((0, utils_1.clamp)(page - 1, 0, maxPage)), disabled: page === 0 }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconBefore, {}) }))), next && ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => update((0, utils_1.clamp)(page + 1, 0, maxPage)), disabled: page === maxPage }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconNext, {}) }))), last && ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => update(maxPage), disabled: page === maxPage }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconLast, {}) })))] }))] })));
98
99
  });
99
100
  TablePagination.displayName = 'onesy-TablePagination';
100
101
  exports.default = TablePagination;
@@ -39,6 +39,7 @@ export type ITextField = Omit<IBaseElement, 'onChange'> & {
39
39
  footer?: IElement;
40
40
  controlled?: boolean;
41
41
  restoreSelection?: boolean;
42
+ maxLength?: number;
42
43
  minWidth?: number;
43
44
  subscription?: OnesySubscription;
44
45
  minimal?: boolean;
@@ -37,6 +37,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
37
37
  }), { name: 'onesy-TextToSpeech' });
38
38
  const TextToSpeech = react_1.default.forwardRef((props_, ref) => {
39
39
  const theme = (0, style_react_1.useOnesyTheme)();
40
+ const l = theme.l;
40
41
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyTextToSpeech) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
41
42
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
42
43
  const Tooltip = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Tooltip) || Tooltip_1.default; }, [theme]);
@@ -124,13 +125,13 @@ const TextToSpeech = react_1.default.forwardRef((props_, ref) => {
124
125
  if (!supported)
125
126
  return null;
126
127
  let IconToUse = Icon_;
127
- let name = 'Text to speech';
128
+ let name = l('Text to speech');
128
129
  if (['started', 'resumed'].includes(status)) {
129
130
  IconToUse = IconPause;
130
- name = 'Pause';
131
+ name = l('Pause');
131
132
  }
132
133
  if (status === 'paused')
133
- name = 'Resume';
134
+ name = l('Resume');
134
135
  return ((0, jsx_runtime_1.jsx)(Line, Object.assign({ ref: (item) => {
135
136
  if (ref) {
136
137
  if ((0, utils_1.is)('function', ref))
@@ -200,6 +200,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
200
200
  }), { name: 'onesy-TimePicker' });
201
201
  const TimePicker = react_1.default.forwardRef((props__, ref) => {
202
202
  const theme = (0, style_react_1.useOnesyTheme)();
203
+ const l = theme.l;
203
204
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyTimePicker) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props__)); }, [props__]);
204
205
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
205
206
  const IconButton = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.IconButton) || IconButton_1.default; }, [theme]);
@@ -216,7 +217,7 @@ const TimePicker = react_1.default.forwardRef((props__, ref) => {
216
217
  const Clock = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Clock) || Clock_1.default; }, [theme]);
217
218
  const Tab = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Tab) || Tab_1.default; }, [theme]);
218
219
  const Tabs = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Tabs) || Tabs_1.default; }, [theme]);
219
- const { tonal = true, color = 'primary', version: version_ = 'auto', value: value_, valueDefault, onChange, selecting: selecting_, selectingDefault, onChangeSelecting, size = 'regular', range, now, label, min, max, validate, autoNext: autoNext_, autoCloseOnLast: autoCloseOnLast_, openMobile = 'select', openDesktop = 'select', selectModalSubHeadingText = 'Select time', selectModalSubHeadingTextRange = `Select from${DatePicker_1.SEPARATOR}to time`, inputModalSubHeadingText = 'Enter time', inputModalSubHeadingTextRange = `Enter from${DatePicker_1.SEPARATOR}to time`, orientation: orientation_, format = '12', hour = true, minute = true, second = false, switch: switch__, static: static_, today, clear = true, placeholder: placeholder_, heading: heading_ = true, actions: actions_ = true, fullWidth, readOnly, disabled, valid: valid_, onClick: onClick_, onClose: onClose_, onCancel: onCancel_, onNow: onNow_, onToday: onToday_, onClear: onClear_, onOk: onOk_, renderValue, Icon: Icon_ = IconMaterialScheduleW100_1.default, IconEnter = IconMaterialKeyboardAltW100_1.default, WrapperProps, MainProps, ModalProps, MiddleProps, ButtonProps, TooltipProps, ToggleButtonsProps, ToggleButtonProps, IconButtonProps, InputProps, ClockProps, TabsProps, TabFromProps, TabToProps, AdvancedTextFieldProps, IconProps, className } = props, other = __rest(props, ["tonal", "color", "version", "value", "valueDefault", "onChange", "selecting", "selectingDefault", "onChangeSelecting", "size", "range", "now", "label", "min", "max", "validate", "autoNext", "autoCloseOnLast", "openMobile", "openDesktop", "selectModalSubHeadingText", "selectModalSubHeadingTextRange", "inputModalSubHeadingText", "inputModalSubHeadingTextRange", "orientation", "format", "hour", "minute", "second", "switch", "static", "today", "clear", "placeholder", "heading", "actions", "fullWidth", "readOnly", "disabled", "valid", "onClick", "onClose", "onCancel", "onNow", "onToday", "onClear", "onOk", "renderValue", "Icon", "IconEnter", "WrapperProps", "MainProps", "ModalProps", "MiddleProps", "ButtonProps", "TooltipProps", "ToggleButtonsProps", "ToggleButtonProps", "IconButtonProps", "InputProps", "ClockProps", "TabsProps", "TabFromProps", "TabToProps", "AdvancedTextFieldProps", "IconProps", "className"]);
220
+ const { tonal = true, color = 'primary', version: version_ = 'auto', value: value_, valueDefault, onChange, selecting: selecting_, selectingDefault, onChangeSelecting, size = 'regular', range, now, label, min, max, validate, autoNext: autoNext_, autoCloseOnLast: autoCloseOnLast_, openMobile = 'select', openDesktop = 'select', selectModalSubHeadingText = l('Select time'), selectModalSubHeadingTextRange = `${l('Select from')}${DatePicker_1.SEPARATOR}${l('to time')}`, inputModalSubHeadingText = l('Enter time'), inputModalSubHeadingTextRange = `${l('Enter from')}${DatePicker_1.SEPARATOR}${l('to time')}`, orientation: orientation_, format = '12', hour = true, minute = true, second = false, switch: switch__, static: static_, today, clear = true, placeholder: placeholder_, heading: heading_ = true, actions: actions_ = true, fullWidth, readOnly, disabled, valid: valid_, onClick: onClick_, onClose: onClose_, onCancel: onCancel_, onNow: onNow_, onToday: onToday_, onClear: onClear_, onOk: onOk_, renderValue, Icon: Icon_ = IconMaterialScheduleW100_1.default, IconEnter = IconMaterialKeyboardAltW100_1.default, WrapperProps, MainProps, ModalProps, MiddleProps, ButtonProps, TooltipProps, ToggleButtonsProps, ToggleButtonProps, IconButtonProps, InputProps, ClockProps, TabsProps, TabFromProps, TabToProps, AdvancedTextFieldProps, IconProps, className } = props, other = __rest(props, ["tonal", "color", "version", "value", "valueDefault", "onChange", "selecting", "selectingDefault", "onChangeSelecting", "size", "range", "now", "label", "min", "max", "validate", "autoNext", "autoCloseOnLast", "openMobile", "openDesktop", "selectModalSubHeadingText", "selectModalSubHeadingTextRange", "inputModalSubHeadingText", "inputModalSubHeadingTextRange", "orientation", "format", "hour", "minute", "second", "switch", "static", "today", "clear", "placeholder", "heading", "actions", "fullWidth", "readOnly", "disabled", "valid", "onClick", "onClose", "onCancel", "onNow", "onToday", "onClear", "onOk", "renderValue", "Icon", "IconEnter", "WrapperProps", "MainProps", "ModalProps", "MiddleProps", "ButtonProps", "TooltipProps", "ToggleButtonsProps", "ToggleButtonProps", "IconButtonProps", "InputProps", "ClockProps", "TabsProps", "TabFromProps", "TabToProps", "AdvancedTextFieldProps", "IconProps", "className"]);
220
221
  const { classes } = useStyle();
221
222
  const refs = {
222
223
  root: react_1.default.useRef(undefined),
@@ -566,7 +567,7 @@ const TimePicker = react_1.default.forwardRef((props__, ref) => {
566
567
  const clock = (index = 0) => ((0, jsx_runtime_1.jsx)(Clock, Object.assign({ size: size, format: format, value: value[index] || new date_1.OnesyDate(), dayTime: dayTime[index] || (0, date_1.format)(new date_1.OnesyDate(), 'a'), selecting: selecting[index], onChange: valueNew => onChangeClock(valueNew, index), onChangeSelecting: valueNew => onChangeSelectingClock(valueNew, index), onDoneSelecting: onDoneSelecting, renderValue: renderValue, valid: valid, hour: hour, minute: minute, second: second, autoNext: autoNext, disabled: disabled }, ClockProps)));
567
568
  const moreProps = {};
568
569
  if (version === 'desktop') {
569
- moreProps.end = ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: color, size: size, version: 'text', onClick: onOpen, "aria-label": 'Choose time', disabled: disabled || readOnly }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(Icon_, Object.assign({}, IconProps)) })));
570
+ moreProps.end = ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: color, size: size, version: 'text', onClick: onOpen, "aria-label": l('Choose time'), disabled: disabled || readOnly }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(Icon_, Object.assign({}, IconProps)) })));
570
571
  }
571
572
  const makeInputs = (index = 0) => {
572
573
  const inputProps = Object.assign({ tonal,
@@ -610,7 +611,7 @@ const TimePicker = react_1.default.forwardRef((props__, ref) => {
610
611
  const inputs = [];
611
612
  if (hour) {
612
613
  buttons.push((0, jsx_runtime_1.jsx)(Button, Object.assign({}, buttonProps_, { selected: selecting[index] === 'hour', onClick: () => onUpdateSelecting('hour', index) }, { children: (0, date_1.format)(value[index], format === '12' ? 'hh' : 'HH') })));
613
- inputs.push((0, jsx_runtime_1.jsx)(AdvancedTextField, Object.assign({ helperText: 'Hour', value: (0, date_1.format)(value[index], format === '12' ? 'hh' : 'HH'), onChange: (valueNew) => onInputModalChange(valueNew, 'hour', index), placeholder: '00', mask: [
614
+ inputs.push((0, jsx_runtime_1.jsx)(AdvancedTextField, Object.assign({ helperText: l('Hour'), value: (0, date_1.format)(value[index], format === '12' ? 'hh' : 'HH'), onChange: (valueNew) => onInputModalChange(valueNew, 'hour', index), placeholder: '00', mask: [
614
615
  ...(format === '12' ? [
615
616
  { pattern: '[0-1]' },
616
617
  (item, result, valueInput) => /^([0][0-9]|1[0-2]).*/.test(valueInput)
@@ -626,7 +627,7 @@ const TimePicker = react_1.default.forwardRef((props__, ref) => {
626
627
  inputs.push(separator);
627
628
  }
628
629
  buttons.push((0, jsx_runtime_1.jsx)(Button, Object.assign({}, buttonProps_, { selected: selecting[index] === 'minute', onClick: () => onUpdateSelecting('minute', index) }, { children: (0, date_1.format)(value[index], 'mm') })));
629
- inputs.push((0, jsx_runtime_1.jsx)(AdvancedTextField, Object.assign({ helperText: 'Minute', value: (0, date_1.format)(value[index], 'mm'), onChange: (valueNew) => onInputModalChange(valueNew, 'minute', index), placeholder: '00', mask: [
630
+ inputs.push((0, jsx_runtime_1.jsx)(AdvancedTextField, Object.assign({ helperText: l('Minute'), value: (0, date_1.format)(value[index], 'mm'), onChange: (valueNew) => onInputModalChange(valueNew, 'minute', index), placeholder: '00', mask: [
630
631
  { pattern: '[0-5]' },
631
632
  { pattern: '[0-9]' }
632
633
  ] }, inputProps)));
@@ -637,7 +638,7 @@ const TimePicker = react_1.default.forwardRef((props__, ref) => {
637
638
  inputs.push(separator);
638
639
  }
639
640
  buttons.push((0, jsx_runtime_1.jsx)(Button, Object.assign({}, buttonProps_, { selected: selecting[index] === 'second', onClick: () => onUpdateSelecting('second', index) }, { children: (0, date_1.format)(value[index], 'ss') })));
640
- inputs.push((0, jsx_runtime_1.jsx)(AdvancedTextField, Object.assign({ helperText: 'Second', value: (0, date_1.format)(value[index], 'ss'), onChange: (valueNew) => onInputModalChange(valueNew, 'second', index), placeholder: '00', mask: [
641
+ inputs.push((0, jsx_runtime_1.jsx)(AdvancedTextField, Object.assign({ helperText: l('Second'), value: (0, date_1.format)(value[index], 'ss'), onChange: (valueNew) => onInputModalChange(valueNew, 'second', index), placeholder: '00', mask: [
641
642
  { pattern: '[0-5]' },
642
643
  { pattern: '[0-9]' }
643
644
  ] }, inputProps)));
@@ -675,7 +676,7 @@ const TimePicker = react_1.default.forwardRef((props__, ref) => {
675
676
  ],
676
677
  classes.footer,
677
678
  classes[`footer_size_${size}`]
678
- ]) }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [switch_ && ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: mode === 'select' ? 'Enter time' : 'Select time' }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: 'inherit', size: size, onClick: onModeSwitch, "aria-label": mode === 'select' ? 'Enter time' : 'Select time' }, iconButtonProps, { children: mode === 'select' ? (0, jsx_runtime_1.jsx)(IconEnter, Object.assign({}, IconProps)) : (0, jsx_runtime_1.jsx)(Icon_, Object.assign({}, IconProps)) })) }))), today && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onToday, version: 'text', size: size }, buttonProps, { children: "Now" }))), clear && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onClear, version: 'text', size: size }, buttonProps, { children: "Clear" })))] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: color, version: 'text', size: size, onClick: onCancel }, buttonProps, { children: "Cancel" })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: color, version: 'text', size: size, onClick: onOk }, buttonProps, { children: "Ok" }))] }))] })));
679
+ ]) }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [switch_ && ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: mode === 'select' ? l('Enter time') : l('Select time') }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: 'inherit', size: size, onClick: onModeSwitch, "aria-label": mode === 'select' ? l('Enter time') : l('Select time') }, iconButtonProps, { children: mode === 'select' ? (0, jsx_runtime_1.jsx)(IconEnter, Object.assign({}, IconProps)) : (0, jsx_runtime_1.jsx)(Icon_, Object.assign({}, IconProps)) })) }))), today && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onToday, version: 'text', size: size }, buttonProps, { children: l('Now') }))), clear && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onClear, version: 'text', size: size }, buttonProps, { children: l('Clear') })))] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: color, version: 'text', size: size, onClick: onCancel }, buttonProps, { children: l('Cancel') })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: color, version: 'text', size: size, onClick: onOk }, buttonProps, { children: l('Ok') }))] }))] })));
679
680
  const element = ((0, jsx_runtime_1.jsxs)(Surface, Object.assign({ gap: 0, direction: 'column', align: 'center', Component: Line }, MainProps, { className: (0, style_react_1.classNames)([
680
681
  (0, utils_2.staticClassName)('TimePicker', theme) && [
681
682
  'onesy-TimePicker-main'
@@ -696,7 +697,7 @@ const TimePicker = react_1.default.forwardRef((props__, ref) => {
696
697
  TabsProps === null || TabsProps === void 0 ? void 0 : TabsProps.className,
697
698
  classes.tabs,
698
699
  heading_ && classes.tabs_padding
699
- ]) }, { children: [(0, jsx_runtime_1.jsx)(Tab, Object.assign({ value: 0, label: 'From' }, TabFromProps)), (0, jsx_runtime_1.jsx)(Tab, Object.assign({ value: 1, label: 'To' }, TabToProps))] }))), (0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 0, className: (0, style_react_1.classNames)([
700
+ ]) }, { children: [(0, jsx_runtime_1.jsx)(Tab, Object.assign({ value: 0, name: l('From') }, TabFromProps)), (0, jsx_runtime_1.jsx)(Tab, Object.assign({ value: 1, name: l('To') }, TabToProps))] }))), (0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 0, className: (0, style_react_1.classNames)([
700
701
  (0, utils_2.staticClassName)('TimePicker', theme) && [
701
702
  'onesy-TimePicker-middle'
702
703
  ],
@@ -730,7 +731,7 @@ const TimePicker = react_1.default.forwardRef((props__, ref) => {
730
731
  ref.current = item;
731
732
  }
732
733
  refs.root.current = item;
733
- }, tonal: tonal, color: color, version: 'outlined', size: size, label: label, mask: mask, placeholder: placeholder, value: input, onChange: onInputChange, endVerticalAlign: 'center', error: error, fullWidth: fullWidth, readOnly: readOnly, disabled: disabled }, moreProps, other, AdvancedTextFieldProps)), version === 'mobile' && ((0, jsx_runtime_1.jsx)(Modal, Object.assign({ open: open, modalWrapperSurface: false, TransitionComponent: Slide, onClose: onClose }, ModalProps, { children: element }))), version === 'desktop' && ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ open: open, portal: true, anchorElement: refs.root.current, alignment: 'center', position: 'bottom', hover: false, focus: false, longPress: false, maxWidth: 'unset', noMargin: true, label: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: onCancel, includeParentQueries: ['.onesy-TimePicker-main'] }, { children: element }))) }, TooltipProps)))] })));
734
+ }, tonal: tonal, color: color, version: 'outlined', size: size, name: label, mask: mask, placeholder: placeholder, value: input, onChange: onInputChange, endVerticalAlign: 'center', error: error, fullWidth: fullWidth, readOnly: readOnly, disabled: disabled }, moreProps, other, AdvancedTextFieldProps)), version === 'mobile' && ((0, jsx_runtime_1.jsx)(Modal, Object.assign({ open: open, modalWrapperSurface: false, TransitionComponent: Slide, onClose: onClose }, ModalProps, { children: element }))), version === 'desktop' && ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ open: open, portal: true, anchorElement: refs.root.current, alignment: 'center', position: 'bottom', hover: false, focus: false, longPress: false, maxWidth: 'unset', noMargin: true, name: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: onCancel, includeParentQueries: ['.onesy-TimePicker-main'] }, { children: element }))) }, TooltipProps)))] })));
734
735
  });
735
736
  TimePicker.displayName = 'onesy-TimePicker';
736
737
  exports.default = TimePicker;
package/Timer/Timer.js CHANGED
@@ -61,6 +61,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
61
61
  }), { name: 'onesy-Timer' });
62
62
  const Timer = react_1.default.forwardRef((props_, ref) => {
63
63
  const theme = (0, style_react_1.useOnesyTheme)();
64
+ const l = theme.l;
64
65
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyTimer) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
65
66
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
66
67
  const Fade = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Fade) || Fade_1.default; }, [theme]);
@@ -185,7 +186,7 @@ const Timer = react_1.default.forwardRef((props_, ref) => {
185
186
  ],
186
187
  classes.flags_wrapper
187
188
  ]) }, { children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Surface, Object.assign({ tonal: tonal, color: color }, { children: ({ palette }) => {
188
- return ((0, jsx_runtime_1.jsx)(Tree, Object.assign({ openDefault: true, middle: 'Flags', indicator: true, indicatorPosition: 'end', parent: refs.root.current, TreeProps: {
189
+ return ((0, jsx_runtime_1.jsx)(Tree, Object.assign({ openDefault: true, middle: l('Flags'), indicator: true, indicatorPosition: 'end', parent: refs.root.current, TreeProps: {
189
190
  className: (0, style_react_1.classNames)([
190
191
  (0, utils_2.staticClassName)('Timer', theme) && [
191
192
  'onesy-Timer-flags'
@@ -202,7 +203,7 @@ const Timer = react_1.default.forwardRef((props_, ref) => {
202
203
  'onesy-Timer-actions'
203
204
  ],
204
205
  classes.actions
205
- ]) }, { children: [status === 'initial' && ((0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: true, add: true }, { children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Start' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onStart }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconStart, {}) })) })) }) }))), status === 'running' && ((0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: true, add: true }, { children: (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Flag' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onFlag }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconFlag, {}) })) })), (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Pause' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onPause }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconPause, {}) })) }))] }) }))), status === 'paused' && ((0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: true, add: true }, { children: (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Stop' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onStop }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconStop, {}) })) })), (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Resume' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onResume }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconStart, {}) })) }))] }) })))] }))] })));
206
+ ]) }, { children: [status === 'initial' && ((0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: true, add: true }, { children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Start') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onStart }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconStart, {}) })) })) }) }))), status === 'running' && ((0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: true, add: true }, { children: (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Flag') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onFlag }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconFlag, {}) })) })), (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Pause') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onPause }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconPause, {}) })) }))] }) }))), status === 'paused' && ((0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: true, add: true }, { children: (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Stop') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onStop }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconStop, {}) })) })), (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Resume') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onResume }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconStart, {}) })) }))] }) })))] }))] })));
206
207
  });
207
208
  Timer.displayName = 'onesy-Timer';
208
209
  exports.default = Timer;
@@ -163,6 +163,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
163
163
  const VideoPlayer = react_1.default.forwardRef((props_, ref) => {
164
164
  var _a, _b, _c;
165
165
  const theme = (0, style_react_1.useOnesyTheme)();
166
+ const l = theme.l;
166
167
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyVideoPlayer) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
167
168
  const Line = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Line) || Line_1.default; }, [theme]);
168
169
  const Surface = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Surface) || Surface_1.default; }, [theme]);
@@ -569,13 +570,13 @@ const VideoPlayer = react_1.default.forwardRef((props_, ref) => {
569
570
  };
570
571
  const items = [];
571
572
  if (openMenu) {
572
- items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconBack, { size: 'very small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: "Back" }))), onClick: () => setOpenMenu(null) }, itemProps), 'back'));
573
+ items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconBack, { size: 'very small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: l('Back') }))), onClick: () => setOpenMenu(null) }, itemProps), 'back'));
573
574
  }
574
575
  if (!openMenu) {
575
576
  if (playbackSpeed_)
576
- items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconPlaybackSpeed, { size: 'small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: "Playback speed" }))), end: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3', priority: 'secondary' }, { children: playbackSpeed === 1 ? 'Normal' : playbackSpeed }))), onClick: () => setOpenMenu('playbackSpeed') }, itemProps), 'playbackSpeed'));
577
+ items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconPlaybackSpeed, { size: 'small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: l('Playback speed') }))), end: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3', priority: 'secondary' }, { children: playbackSpeed === 1 ? l('Normal') : playbackSpeed }))), onClick: () => setOpenMenu('playbackSpeed') }, itemProps), 'playbackSpeed'));
577
578
  if (quality_)
578
- items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconQuality, { size: 'small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: "Quality" }))), end: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3', priority: 'secondary' }, { children: !quality ? 'Original' : `${(_a = quality === null || quality === void 0 ? void 0 : quality.meta) === null || _a === void 0 ? void 0 : _a.resolution}p` }))), onClick: () => setOpenMenu('quality') }, itemProps), 'quality'));
579
+ items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ start: ((0, jsx_runtime_1.jsx)(IconQuality, { size: 'small' })), primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: l('Quality') }))), end: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3', priority: 'secondary' }, { children: !quality ? l('Original') : `${(_a = quality === null || quality === void 0 ? void 0 : quality.meta) === null || _a === void 0 ? void 0 : _a.resolution}p` }))), onClick: () => setOpenMenu('quality') }, itemProps), 'quality'));
579
580
  }
580
581
  else if (openMenu === 'quality') {
581
582
  items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: `${meta === null || meta === void 0 ? void 0 : meta.resolution}p (original)` }))), onClick: () => quality ? onQuality(null) : undefined, selected: !quality }, itemProps), 'original'));
@@ -588,7 +589,7 @@ const VideoPlayer = react_1.default.forwardRef((props_, ref) => {
588
589
  else if (openMenu === 'playbackSpeed') {
589
590
  const options = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
590
591
  options.forEach(option => {
591
- items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: option === 1 ? 'Normal' : option }))), onClick: () => onPlaybackSpeed(option), selected: playbackSpeed === option }, itemProps), option));
592
+ items.push((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: option === 1 ? l('Normal') : option }))), onClick: () => onPlaybackSpeed(option), selected: playbackSpeed === option }, itemProps), option));
592
593
  });
593
594
  }
594
595
  return items;
@@ -95,6 +95,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
95
95
  }), { name: 'onesy-Widgets' });
96
96
  const Widgets = react_1.default.forwardRef((props_, ref) => {
97
97
  const theme = (0, style_react_1.useOnesyTheme)();
98
+ const l = theme.l;
98
99
  const props = react_1.default.useMemo(() => { var _a, _b, _c, _d, _e, _f, _g, _h; return (Object.assign(Object.assign(Object.assign({}, (_d = (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _a === void 0 ? void 0 : _a.elements) === null || _b === void 0 ? void 0 : _b.all) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.default), (_h = (_g = (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.ui) === null || _e === void 0 ? void 0 : _e.elements) === null || _f === void 0 ? void 0 : _f.onesyWidgets) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
99
100
  const SpeedDial = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.SpeedDial) || SpeedDial_1.default; }, [theme]);
100
101
  const SpeedDialItem = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.SpeedDialItem) || SpeedDialItem_1.default; }, [theme]);
@@ -138,9 +139,9 @@ const Widgets = react_1.default.forwardRef((props_, ref) => {
138
139
  refs.value.current.close = close;
139
140
  refs.value.current.closeAll = closeAll;
140
141
  const widgetsToUse = [...(widgets || [])].reverse();
141
- return ((0, jsx_runtime_1.jsxs)(Context_1.default.Provider, Object.assign({ value: refs.value.current }, { children: [(widgets === null || widgets === void 0 ? void 0 : widgets.length) && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SpeedDial, Object.assign({ ref: ref, direction: 'top', position: 'bottom', alignment: 'start', Icon: Icon_, noRotate: true }, SpeedDialProps, { children: widgets.map((item, index) => {
142
+ return ((0, jsx_runtime_1.jsxs)(Context_1.default.Provider, Object.assign({ value: refs.value.current }, { children: [(widgets === null || widgets === void 0 ? void 0 : widgets.length) && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SpeedDial, Object.assign({ ref: ref, direction: 'top', position: 'bottom', alignment: 'start', Icon: Icon_, noRotate: true }, SpeedDialProps, other, { children: widgets.map((item, index) => {
142
143
  const valueItem = item.value !== undefined ? item.value : item.label;
143
- return ((0, jsx_runtime_1.jsx)(SpeedDialItem, { onClick: () => !openItems.includes(valueItem) ? open(valueItem) : close(valueItem), label: !openItems.includes(valueItem) ? item.label : `Close ${item.label}`, Icon: item.Icon }, index));
144
+ return ((0, jsx_runtime_1.jsx)(SpeedDialItem, { onClick: () => !openItems.includes(valueItem) ? open(valueItem) : close(valueItem), label: !openItems.includes(valueItem) ? item.label : `${l('Close')} ${item.label}`, Icon: item.Icon }, index));
144
145
  }) })), widgetsToUse.map((item, index) => {
145
146
  const valueItem = item.value !== undefined ? item.value : item.label;
146
147
  const WidgetWrapper = Move;