@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.
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 +2 -1
  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 +2 -1
  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
@@ -114,6 +114,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
114
114
  }), { name: 'onesy-CalendarViews' });
115
115
  const CalendarViews = react_1.default.forwardRef((props_, ref) => {
116
116
  const theme = (0, style_react_1.useOnesyTheme)();
117
+ const l = theme.l;
117
118
  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.onesyCalendarViews) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
118
119
  const CalendarMonth = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.CalendarMonth) || CalendarMonth_1.default; }, [theme]);
119
120
  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,7 +124,11 @@ const CalendarViews = react_1.default.forwardRef((props_, ref) => {
123
124
  const Button = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Button) || Button_1.default; }, [theme]);
124
125
  const Select = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Select) || Select_1.default; }, [theme]);
125
126
  const CalendarWeek = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.CalendarWeek) || CalendarWeek_1.default; }, [theme]);
126
- const { viewDefault, dateDefault, times: timesProps, events, views: viewsProps = ['month', 'week', 'day'], render, onTimeClick, onChangeView: onChangeViewProps, onChangeDate: onChangeDateProps, startHeader, endHeader, startLeft, endLeft, startRight, endRight, noViews, IconPrevious = IconMaterialArrowBackIosNewW100_1.default, IconNext = IconMaterialArrowForwardIosW100_1.default, WeekProps, DayProps, CalendarMonthProps, className } = props, other = __rest(props, ["viewDefault", "dateDefault", "times", "events", "views", "render", "onTimeClick", "onChangeView", "onChangeDate", "startHeader", "endHeader", "startLeft", "endLeft", "startRight", "endRight", "noViews", "IconPrevious", "IconNext", "WeekProps", "DayProps", "CalendarMonthProps", "className"]);
127
+ const { viewDefault, dateDefault, times: timesProps, events, views: viewsProps = [
128
+ { name: l('Month'), value: 'month' },
129
+ { name: l('Week'), value: 'week' },
130
+ { name: l('Day'), value: 'day' }
131
+ ], render, onTimeClick, onChangeView: onChangeViewProps, onChangeDate: onChangeDateProps, startHeader, endHeader, startLeft, endLeft, startRight, endRight, noViews, IconPrevious = IconMaterialArrowBackIosNewW100_1.default, IconNext = IconMaterialArrowForwardIosW100_1.default, WeekProps, DayProps, CalendarMonthProps, className } = props, other = __rest(props, ["viewDefault", "dateDefault", "times", "events", "views", "render", "onTimeClick", "onChangeView", "onChangeDate", "startHeader", "endHeader", "startLeft", "endLeft", "startRight", "endRight", "noViews", "IconPrevious", "IconNext", "WeekProps", "DayProps", "CalendarMonthProps", "className"]);
127
132
  const { classes } = useStyle(props);
128
133
  const [now, setNow] = react_1.default.useState(new date_1.OnesyDate());
129
134
  const [date, setDate] = react_1.default.useState(dateDefault || new date_1.OnesyDate());
@@ -155,8 +160,8 @@ const CalendarViews = react_1.default.forwardRef((props_, ref) => {
155
160
  }, [events, timesProps]);
156
161
  const viewOptions = react_1.default.useMemo(() => {
157
162
  return viewsProps === null || viewsProps === void 0 ? void 0 : viewsProps.map(item => ({
158
- name: (0, utils_1.capitalize)(item),
159
- value: item
163
+ name: item === null || item === void 0 ? void 0 : item.name,
164
+ value: item === null || item === void 0 ? void 0 : item.value
160
165
  }));
161
166
  }, [viewsProps]);
162
167
  const formattedDate = react_1.default.useMemo(() => {
@@ -204,13 +209,13 @@ const CalendarViews = react_1.default.forwardRef((props_, ref) => {
204
209
  }, [render, view]);
205
210
  const renderDayName = react_1.default.useCallback((order) => {
206
211
  const values = {
207
- 1: 'Mon',
208
- 2: 'Tue',
209
- 3: 'Wed',
210
- 4: 'Thu',
211
- 5: 'Fri',
212
- 6: 'Sat',
213
- 7: 'Sun'
212
+ 1: l('Mo'),
213
+ 2: l('Tu'),
214
+ 3: l('We'),
215
+ 4: l('Th'),
216
+ 5: l('Fr'),
217
+ 6: l('Sa'),
218
+ 7: l('Su')
214
219
  };
215
220
  return values[order];
216
221
  }, []);
@@ -241,10 +246,10 @@ const CalendarViews = react_1.default.forwardRef((props_, ref) => {
241
246
  (0, utils_2.staticClassName)('CalendarViews', theme) && [
242
247
  'onesy-CalendarViews-header'
243
248
  ]
244
- ]) }, { children: [startHeader, (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 2, direction: 'row', wrap: 'wrap', justify: 'space-between', align: 'center', fullWidth: true }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1.5, direction: 'row', wrap: 'wrap', align: 'center', className: classes.aside }, { children: [startLeft, (0, jsx_runtime_1.jsx)(Button, Object.assign({ color: 'inherit', version: 'outlined', size: 'small', onClick: onToday, selected: now.days === date.days }, { children: "Today" })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: `Previous ${view}` }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onPrevious }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconPrevious, Object.assign({}, iconProps)) })) })), (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: `Next ${view}` }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onNext }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconNext, Object.assign({}, iconProps)) })) }))] })), (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'h2', weight: 500, whiteSpace: 'nowrap' }, { children: formattedDate })), endLeft] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1.5, direction: 'row', align: 'center', flexNo: true, className: (0, style_react_1.classNames)([
249
+ ]) }, { children: [startHeader, (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 2, direction: 'row', wrap: 'wrap', justify: 'space-between', align: 'center', fullWidth: true }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1.5, direction: 'row', wrap: 'wrap', align: 'center', className: classes.aside }, { children: [startLeft, (0, jsx_runtime_1.jsx)(Button, Object.assign({ color: 'inherit', version: 'outlined', size: 'small', onClick: onToday, selected: now.days === date.days }, { children: l('Today') })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: `${l('Previous')} ${view}` }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onPrevious }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconPrevious, Object.assign({}, iconProps)) })) })), (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: `${l('Next')} ${view}` }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: onNext }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconNext, Object.assign({}, iconProps)) })) }))] })), (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'h2', weight: 500, whiteSpace: 'nowrap' }, { children: formattedDate })), endLeft] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1.5, direction: 'row', align: 'center', flexNo: true, className: (0, style_react_1.classNames)([
245
250
  classes.aside,
246
251
  classes.overflowX
247
- ]) }, { children: [startRight, !noViews && ((0, jsx_runtime_1.jsx)(Select, { name: 'View', value: view, onChange: onChangeView, options: viewOptions, size: 'small', MenuProps: {
252
+ ]) }, { children: [startRight, !noViews && ((0, jsx_runtime_1.jsx)(Select, { name: l('View'), value: view, onChange: onChangeView, options: viewOptions, size: 'small', MenuProps: {
248
253
  portal: true,
249
254
  size: 'regular'
250
255
  }, WrapperProps: {
package/Chart/Chart.js CHANGED
@@ -275,6 +275,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
275
275
  const Chart = react_1.default.forwardRef((props_, ref) => {
276
276
  var _a, _b, _c, _d;
277
277
  const theme = (0, style_react_1.useOnesyTheme)();
278
+ const l = theme.l;
278
279
  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.onesyChart) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
279
280
  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]);
280
281
  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]);
@@ -78,6 +78,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
78
78
  }), { name: 'onesy-ColorTextField' });
79
79
  const ColorTextField = react_1.default.forwardRef((props_, ref) => {
80
80
  const theme = (0, style_react_1.useOnesyTheme)();
81
+ const l = theme.l;
81
82
  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.onesyColorTextField) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
82
83
  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]);
83
84
  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]);
@@ -172,7 +173,7 @@ const ColorTextField = react_1.default.forwardRef((props_, ref) => {
172
173
  return ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ ref: ref, gap: 1, fullWidth: true, className: (0, style_react_1.classNames)([
173
174
  className,
174
175
  classes.root
175
- ]) }, other, { children: [root, (0, jsx_runtime_1.jsx)(SliderInput, { name: 'Opacity', value: valueOpacity, onChange: onChangeOpacity, min: 0, max: 100 })] })));
176
+ ]) }, other, { children: [root, (0, jsx_runtime_1.jsx)(SliderInput, { name: l('Opacity'), value: valueOpacity, onChange: onChangeOpacity, min: 0, max: 100 })] })));
176
177
  }
177
178
  return root;
178
179
  });
@@ -49,6 +49,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
49
49
  const Confirm = react_1.default.forwardRef((props_, ref) => {
50
50
  var _a, _b, _c, _d;
51
51
  const theme = (0, style_react_1.useOnesyTheme)();
52
+ const l = theme.l;
52
53
  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.onesyConfirm) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
53
54
  const ModalHeader = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ModalHeader) || ModalHeader_1.default; }, [theme]);
54
55
  const ModalFooter = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ModalFooter) || ModalFooter_1.default; }, [theme]);
@@ -81,8 +82,8 @@ const Confirm = react_1.default.forwardRef((props_, ref) => {
81
82
  (0, utils_1.setObjectValue)(refs.modal.current, 'buttons.negative.text', '');
82
83
  if (((_d = (_c = refs.modal.current.buttons) === null || _c === void 0 ? void 0 : _c.positive) === null || _d === void 0 ? void 0 : _d.text) === undefined)
83
84
  (0, utils_1.setObjectValue)(refs.modal.current, 'buttons.positive.text', '');
84
- refs.modal.current.buttons.negative.text = ((_f = (_e = value === null || value === void 0 ? void 0 : value.buttons) === null || _e === void 0 ? void 0 : _e.negative) === null || _f === void 0 ? void 0 : _f.text) !== undefined ? (_h = (_g = value === null || value === void 0 ? void 0 : value.buttons) === null || _g === void 0 ? void 0 : _g.negative) === null || _h === void 0 ? void 0 : _h.text : 'Cancel';
85
- refs.modal.current.buttons.positive.text = ((_k = (_j = value === null || value === void 0 ? void 0 : value.buttons) === null || _j === void 0 ? void 0 : _j.positive) === null || _k === void 0 ? void 0 : _k.text) !== undefined ? (_m = (_l = value === null || value === void 0 ? void 0 : value.buttons) === null || _l === void 0 ? void 0 : _l.positive) === null || _m === void 0 ? void 0 : _m.text : 'Confirm';
85
+ refs.modal.current.buttons.negative.text = ((_f = (_e = value === null || value === void 0 ? void 0 : value.buttons) === null || _e === void 0 ? void 0 : _e.negative) === null || _f === void 0 ? void 0 : _f.text) !== undefined ? (_h = (_g = value === null || value === void 0 ? void 0 : value.buttons) === null || _g === void 0 ? void 0 : _g.negative) === null || _h === void 0 ? void 0 : _h.text : l('Cancel');
86
+ refs.modal.current.buttons.positive.text = ((_k = (_j = value === null || value === void 0 ? void 0 : value.buttons) === null || _j === void 0 ? void 0 : _j.positive) === null || _k === void 0 ? void 0 : _k.text) !== undefined ? (_m = (_l = value === null || value === void 0 ? void 0 : value.buttons) === null || _l === void 0 ? void 0 : _l.positive) === null || _m === void 0 ? void 0 : _m.text : l('Confirm');
86
87
  refs.modal.current.throwError = (value === null || value === void 0 ? void 0 : value.throwError) !== undefined ? value.throwError : refs.props.current.throwError;
87
88
  const promise = new Promise((resolve, reject) => {
88
89
  refs.promise.resolve.current = resolve;
@@ -127,7 +128,7 @@ const Confirm = react_1.default.forwardRef((props_, ref) => {
127
128
  classes.root
128
129
  ]) }, other, otherModal, { children: (0, utils_1.is)('function', modal) ?
129
130
  modal({ resolve: refs.promise.resolve.current, reject: refs.promise.reject.current }) :
130
- ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [name !== false && ((0, jsx_runtime_1.jsx)(ModalHeader, { children: (0, jsx_runtime_1.jsx)(ModalTitle, Object.assign({ version: 't1', weight: 500 }, { children: name || 'Confirmation' })) })), (0, jsx_runtime_1.jsx)(ModalMain, { children: (0, jsx_runtime_1.jsx)(ModalText, Object.assign({ version: 'b1', weight: 200 }, { children: description !== undefined ? description : 'Are you sure you want to proceed?' })) }), (0, jsx_runtime_1.jsxs)(ModalFooter, { children: [(0, jsx_runtime_1.jsx)(Button, Object.assign({ version: 'text', color: 'inherit', tonal: true, onClick: () => close(false) }, ButtonNegativeProps, { children: ((_a = buttons === null || buttons === void 0 ? void 0 : buttons.negative) === null || _a === void 0 ? void 0 : _a.text) !== undefined ? (_b = buttons === null || buttons === void 0 ? void 0 : buttons.negative) === null || _b === void 0 ? void 0 : _b.text : 'Cancel' })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ version: 'text', color: 'inherit', tonal: true, onClick: () => close(true) }, ButtonPositiveProps, { children: ((_c = buttons === null || buttons === void 0 ? void 0 : buttons.positive) === null || _c === void 0 ? void 0 : _c.text) !== undefined ? (_d = buttons === null || buttons === void 0 ? void 0 : buttons.positive) === null || _d === void 0 ? void 0 : _d.text : 'Confirm' }))] })] })) }))] })));
131
+ ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [name !== false && ((0, jsx_runtime_1.jsx)(ModalHeader, { children: (0, jsx_runtime_1.jsx)(ModalTitle, Object.assign({ version: 't1', weight: 500 }, { children: name || l('Confirmation') })) })), (0, jsx_runtime_1.jsx)(ModalMain, { children: (0, jsx_runtime_1.jsx)(ModalText, Object.assign({ version: 'b1', weight: 200 }, { children: description !== undefined ? description : l('Are you sure you want to proceed?') })) }), (0, jsx_runtime_1.jsxs)(ModalFooter, { children: [(0, jsx_runtime_1.jsx)(Button, Object.assign({ version: 'text', color: 'inherit', tonal: true, onClick: () => close(false) }, ButtonNegativeProps, { children: ((_a = buttons === null || buttons === void 0 ? void 0 : buttons.negative) === null || _a === void 0 ? void 0 : _a.text) !== undefined ? (_b = buttons === null || buttons === void 0 ? void 0 : buttons.negative) === null || _b === void 0 ? void 0 : _b.text : l('Cancel') })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ version: 'text', color: 'inherit', tonal: true, onClick: () => close(true) }, ButtonPositiveProps, { children: ((_c = buttons === null || buttons === void 0 ? void 0 : buttons.positive) === null || _c === void 0 ? void 0 : _c.text) !== undefined ? (_d = buttons === null || buttons === void 0 ? void 0 : buttons.positive) === null || _d === void 0 ? void 0 : _d.text : l('Confirm') }))] })] })) }))] })));
131
132
  });
132
133
  Confirm.displayName = 'onesy-Confirm';
133
134
  exports.default = Confirm;
@@ -47,6 +47,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
47
47
  }), { name: 'onesy-CookieBanner' });
48
48
  const CookieBanner = react_1.default.forwardRef((props_, ref) => {
49
49
  const theme = (0, style_react_1.useOnesyTheme)();
50
+ const l = theme.l;
50
51
  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.onesyBanner) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
51
52
  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]);
52
53
  const Slide = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Slide) || Slide_1.default; }, [theme]);
@@ -58,7 +59,7 @@ const CookieBanner = react_1.default.forwardRef((props_, ref) => {
58
59
  const TransitionElement = noTransition ? react_1.default.Fragment : TransitionElementProps;
59
60
  const WrapperProps = noTransition ? undefined : Object.assign(Object.assign({}, TransitionProps), { in: inProp });
60
61
  const buttonProps = Object.assign({ size }, ButtonProps);
61
- return ((0, jsx_runtime_1.jsx)(TransitionElement, Object.assign({}, WrapperProps, { children: (0, jsx_runtime_1.jsx)(Line, Object.assign({ ref: ref, gap: 1.5, align: 'center', fullWidth: true, Component: Surface, color: 'default', role: 'region', "aria-label": 'Cookie Banner', className: (0, style_react_1.classNames)([
62
+ return ((0, jsx_runtime_1.jsx)(TransitionElement, Object.assign({}, WrapperProps, { children: (0, jsx_runtime_1.jsx)(Line, Object.assign({ ref: ref, gap: 1.5, align: 'center', fullWidth: true, Component: Surface, color: 'default', role: 'region', "aria-label": l('Cookie Banner'), className: (0, style_react_1.classNames)([
62
63
  (0, utils_2.staticClassName)('CookieBanner', theme) && [
63
64
  'onesy-CookieBanner-root',
64
65
  `onesy-CookieBanner-size-${size}`
@@ -72,7 +73,7 @@ const CookieBanner = react_1.default.forwardRef((props_, ref) => {
72
73
  ],
73
74
  MainProps === null || MainProps === void 0 ? void 0 : MainProps.className,
74
75
  classes.main
75
- ]) }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.25 }, { children: [(0, utils_1.is)('string', name) ? ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: size === 'large' ? 't1' : size === 'regular' ? 't2' : 't3', weight: 500 }, NameProps, { children: name }))) : name, (0, utils_1.is)('string', description) ? ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: size === 'large' ? 'b1' : size === 'regular' ? 'b2' : 'b3' }, DescriptionProps, { children: description }))) : description] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center' }, { children: [startActions, (0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onReject, color: 'default' }, buttonProps, RejectButtonProps, { children: "Reject All" })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onAllow, color: 'primary', version: 'filled' }, buttonProps, AllowButtonProps, { children: "Accept All" })), endActions] }))] })) })) })));
76
+ ]) }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.25 }, { children: [(0, utils_1.is)('string', name) ? ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: size === 'large' ? 't1' : size === 'regular' ? 't2' : 't3', weight: 500 }, NameProps, { children: name }))) : name, (0, utils_1.is)('string', description) ? ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: size === 'large' ? 'b1' : size === 'regular' ? 'b2' : 'b3' }, DescriptionProps, { children: description }))) : description] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center' }, { children: [startActions, (0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onReject, color: 'default' }, buttonProps, RejectButtonProps, { children: l('Reject All') })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onAllow, color: 'primary', version: 'filled' }, buttonProps, AllowButtonProps, { children: l('Accept All') })), endActions] }))] })) })) })));
76
77
  });
77
78
  CookieBanner.displayName = 'onesy-CookieBanner';
78
79
  exports.default = CookieBanner;
@@ -94,6 +94,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
94
94
  }), { name: 'onesy-Countdown' });
95
95
  const Countdown = react_1.default.forwardRef((props_, ref) => {
96
96
  const theme = (0, style_react_1.useOnesyTheme)();
97
+ const l = theme.l;
97
98
  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.onesyCountdown) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
98
99
  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]);
99
100
  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]);
@@ -215,19 +216,19 @@ const Countdown = react_1.default.forwardRef((props_, ref) => {
215
216
  ]) }, other, { children: [icon && ((0, jsx_runtime_1.jsx)(Icon_, Object.assign({ size: 'medium' }, IconProps, { style: Object.assign({ marginBottom: 4 }, IconProps === null || IconProps === void 0 ? void 0 : IconProps.style) }))), status === 'initial' && ((0, jsx_runtime_1.jsx)(Fade, Object.assign({ in: true, add: true }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'flex-end', style: {
216
217
  marginTop: 12,
217
218
  marginBottom: -8
218
- } }, { children: [(0, jsx_runtime_1.jsx)(NumericTextField, Object.assign({ label: 'Hours', min: 0, max: 23, value: values.hours, onChange: valueNew => updateValues('hours', !valueNew ? 0 : valueNew) }, NumericTextFieldProps, { className: (0, style_react_1.classNames)([
219
+ } }, { children: [(0, jsx_runtime_1.jsx)(NumericTextField, Object.assign({ name: l('Hours'), min: 0, max: 23, value: values.hours, onChange: valueNew => updateValues('hours', !valueNew ? 0 : valueNew) }, NumericTextFieldProps, { className: (0, style_react_1.classNames)([
219
220
  (0, utils_2.staticClassName)('Countdown', theme) && [
220
221
  'onesy-Countdown-numeric-text-field'
221
222
  ],
222
223
  NumericTextFieldProps === null || NumericTextFieldProps === void 0 ? void 0 : NumericTextFieldProps.className,
223
224
  classes.numericTextField
224
- ]) })), (0, jsx_runtime_1.jsx)(NumericTextField, Object.assign({ label: 'Minutes', min: 0, max: 59, value: values.minutes, onChange: valueNew => updateValues('minutes', !valueNew ? 0 : valueNew) }, NumericTextFieldProps, { className: (0, style_react_1.classNames)([
225
+ ]) })), (0, jsx_runtime_1.jsx)(NumericTextField, Object.assign({ name: l('Minutes'), min: 0, max: 59, value: values.minutes, onChange: valueNew => updateValues('minutes', !valueNew ? 0 : valueNew) }, NumericTextFieldProps, { className: (0, style_react_1.classNames)([
225
226
  (0, utils_2.staticClassName)('Countdown', theme) && [
226
227
  'onesy-Countdown-numeric-text-field'
227
228
  ],
228
229
  NumericTextFieldProps === null || NumericTextFieldProps === void 0 ? void 0 : NumericTextFieldProps.className,
229
230
  classes.numericTextField
230
- ]) })), (0, jsx_runtime_1.jsx)(NumericTextField, Object.assign({ label: 'Seconds', min: 0, max: 59, value: values.seconds, onChange: valueNew => updateValues('seconds', !valueNew ? 0 : valueNew) }, NumericTextFieldProps, { className: (0, style_react_1.classNames)([
231
+ ]) })), (0, jsx_runtime_1.jsx)(NumericTextField, Object.assign({ name: l('Seconds'), min: 0, max: 59, value: values.seconds, onChange: valueNew => updateValues('seconds', !valueNew ? 0 : valueNew) }, NumericTextFieldProps, { className: (0, style_react_1.classNames)([
231
232
  (0, utils_2.staticClassName)('Countdown', theme) && [
232
233
  'onesy-Countdown-numeric-text-field'
233
234
  ],
@@ -259,7 +260,7 @@ const Countdown = react_1.default.forwardRef((props_, ref) => {
259
260
  'onesy-Countdown-meta'
260
261
  ],
261
262
  classes.meta
262
- ]) }, { children: ["Total ", (0, date_1.duration)(refs.total.current, false)] }))] })) }))), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'center' }, { 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, disabled: !((values.hours || 0) + (values.minutes || 0) + (values.seconds || 0)) }, 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: '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: '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, {}) })) }))] }) })))] }))] })));
263
+ ]) }, { children: [l('Total'), " ", (0, date_1.duration)(refs.total.current, false)] }))] })) }))), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'center' }, { 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, disabled: !((values.hours || 0) + (values.minutes || 0) + (values.seconds || 0)) }, 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('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('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, {}) })) }))] }) })))] }))] })));
263
264
  });
264
265
  Countdown.displayName = 'onesy-Countdown';
265
266
  exports.default = Countdown;
@@ -127,6 +127,7 @@ exports.SEPARATOR_SYMBOL = `–`;
127
127
  exports.SEPARATOR = ` ${exports.SEPARATOR_SYMBOL} `;
128
128
  const DatePicker = react_1.default.forwardRef((props__, ref) => {
129
129
  const theme = (0, style_react_1.useOnesyTheme)();
130
+ const l = theme.l;
130
131
  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.onesyDatePicker) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props__)); }, [props__]);
131
132
  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]);
132
133
  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]);
@@ -140,7 +141,7 @@ const DatePicker = react_1.default.forwardRef((props__, ref) => {
140
141
  const Divider = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Divider) || Divider_1.default; }, [theme]);
141
142
  const Slide = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Slide) || Slide_1.default; }, [theme]);
142
143
  const ClickListener = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ClickListener) || ClickListener_1.default; }, [theme]);
143
- const { tonal = true, color = 'primary', version: version_ = 'auto', size = 'regular', value: value_, valueDefault, onChange, calendar: calendar_, calendarDefault, onChangeCalendar, range, now, static: static_, openMobile = 'select', placeholder: placeholder_, calendars = props.range ? 2 : 1, min, max, validate, name, nameFrom, nameTo, label: label_, labelFrom: labelFrom_ = `Date from`, labelTo: labelTo_ = `Date to`, modeModalSubHeadingText = 'Select date', modeModalSubHeadingTextRange = `Date from${exports.SEPARATOR}Date to`, selectModeHeadingText = 'Select date', inputModeHeadingText = 'Enter date', useHelperText: useHelperText_, weekStartDay = 'Monday', switch: switch__, fullScreen, today, clear = true, heading: heading_ = true, actions: actions_ = true, fullWidth, readOnly, disabled, valid: valid_, onClick: onClick_, onClose: onClose_, onToday: onToday_, onClear: onClear_, onCancel: onCancel_, onOk: onOk_, Icon: Icon_ = IconMaterialCalendarTodayW100Filled_1.default, IconEnter = IconMaterialEditW100_1.default, IconClose = IconMaterialCloseW100_1.default, WrapperProps, CalendarProps, CalendarPropsDesktop, CalendarPropsMobile, IconButtonProps, AdvancedTextFieldProps, TooltipProps, ButtonProps, ModalProps, IconProps, MobileSurfaceProps, className } = props, other = __rest(props, ["tonal", "color", "version", "size", "value", "valueDefault", "onChange", "calendar", "calendarDefault", "onChangeCalendar", "range", "now", "static", "openMobile", "placeholder", "calendars", "min", "max", "validate", "name", "nameFrom", "nameTo", "label", "labelFrom", "labelTo", "modeModalSubHeadingText", "modeModalSubHeadingTextRange", "selectModeHeadingText", "inputModeHeadingText", "useHelperText", "weekStartDay", "switch", "fullScreen", "today", "clear", "heading", "actions", "fullWidth", "readOnly", "disabled", "valid", "onClick", "onClose", "onToday", "onClear", "onCancel", "onOk", "Icon", "IconEnter", "IconClose", "WrapperProps", "CalendarProps", "CalendarPropsDesktop", "CalendarPropsMobile", "IconButtonProps", "AdvancedTextFieldProps", "TooltipProps", "ButtonProps", "ModalProps", "IconProps", "MobileSurfaceProps", "className"]);
144
+ const { tonal = true, color = 'primary', version: version_ = 'auto', size = 'regular', value: value_, valueDefault, onChange, calendar: calendar_, calendarDefault, onChangeCalendar, range, now, static: static_, openMobile = 'select', placeholder: placeholder_, calendars = props.range ? 2 : 1, min, max, validate, name, nameFrom, nameTo, label: label_, labelFrom: labelFrom_ = l('Date from'), labelTo: labelTo_ = l('Date to'), modeModalSubHeadingText = l('Select date'), modeModalSubHeadingTextRange = `${l('Date from')}${exports.SEPARATOR}${l('Date to')}`, selectModeHeadingText = l('Select date'), inputModeHeadingText = l('Enter date'), useHelperText: useHelperText_, weekStartDay = 'Monday', switch: switch__, fullScreen, today, clear = true, heading: heading_ = true, actions: actions_ = true, fullWidth, readOnly, disabled, valid: valid_, onClick: onClick_, onClose: onClose_, onToday: onToday_, onClear: onClear_, onCancel: onCancel_, onOk: onOk_, Icon: Icon_ = IconMaterialCalendarTodayW100Filled_1.default, IconEnter = IconMaterialEditW100_1.default, IconClose = IconMaterialCloseW100_1.default, WrapperProps, CalendarProps, CalendarPropsDesktop, CalendarPropsMobile, IconButtonProps, AdvancedTextFieldProps, TooltipProps, ButtonProps, ModalProps, IconProps, MobileSurfaceProps, className } = props, other = __rest(props, ["tonal", "color", "version", "size", "value", "valueDefault", "onChange", "calendar", "calendarDefault", "onChangeCalendar", "range", "now", "static", "openMobile", "placeholder", "calendars", "min", "max", "validate", "name", "nameFrom", "nameTo", "label", "labelFrom", "labelTo", "modeModalSubHeadingText", "modeModalSubHeadingTextRange", "selectModeHeadingText", "inputModeHeadingText", "useHelperText", "weekStartDay", "switch", "fullScreen", "today", "clear", "heading", "actions", "fullWidth", "readOnly", "disabled", "valid", "onClick", "onClose", "onToday", "onClear", "onCancel", "onOk", "Icon", "IconEnter", "IconClose", "WrapperProps", "CalendarProps", "CalendarPropsDesktop", "CalendarPropsMobile", "IconButtonProps", "AdvancedTextFieldProps", "TooltipProps", "ButtonProps", "ModalProps", "IconProps", "MobileSurfaceProps", "className"]);
144
145
  const { classes } = useStyle();
145
146
  const refs = {
146
147
  root: react_1.default.useRef(undefined)
@@ -429,10 +430,10 @@ const DatePicker = react_1.default.forwardRef((props__, ref) => {
429
430
  'onesy-DatePicker-actions'
430
431
  ],
431
432
  classes.actions
432
- ]) }, { children: [(today || clear) && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [today && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onToday }, buttonProps, { children: "Today" }))), clear && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onClear }, 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({ onClick: onCancel }, buttonProps, { children: "Cancel" })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onOk }, buttonProps, { children: "Ok" }))] }))] })));
433
+ ]) }, { children: [(today || clear) && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [today && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onToday }, buttonProps, { children: l('Today') }))), clear && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onClear }, 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({ onClick: onCancel }, buttonProps, { children: l('Cancel') })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onOk }, buttonProps, { children: l('Ok') }))] }))] })));
433
434
  const moreProps = {};
434
435
  if (version === 'desktop') {
435
- moreProps.end = ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: color, version: 'text', onClick: onOpen, "aria-label": `Choose date${range ? ' range' : ''}`, disabled: disabled || readOnly }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(Icon_, Object.assign({}, IconProps)) })));
436
+ moreProps.end = ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: color, version: 'text', onClick: onOpen, "aria-label": `${l('Choose date')}${range ? ' range' : ''}`, disabled: disabled || readOnly }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(Icon_, Object.assign({}, IconProps)) })));
436
437
  }
437
438
  if (version === 'mobile') {
438
439
  if (!(readOnly || disabled))
@@ -442,7 +443,7 @@ const DatePicker = react_1.default.forwardRef((props__, ref) => {
442
443
  if (range) {
443
444
  textHeading = `${(0, date_1.format)(value[0], 'MMM')} ${(0, date_1.format)(value[0], 'DD')}${exports.SEPARATOR}${(0, date_1.format)(value[1], 'MMM')} ${(0, date_1.format)(value[1], 'DD')}`;
444
445
  }
445
- const dayNames = ['M', 'T', 'W', 'T', 'F', 'S', 'S'];
446
+ const dayNames = [l('Mo'), l('Tu'), l('We'), l('Th'), l('Fr'), l('Sa'), l('Su')];
446
447
  const mobile = ((0, jsx_runtime_1.jsxs)(Surface, Object.assign({ color: 'default', tonal: tonal, gap: 0, direction: 'column', Component: Line, className: (0, style_react_1.classNames)([
447
448
  (0, utils_2.staticClassName)('DatePicker', theme) && [
448
449
  'onesy-DatePicker-mobile'
@@ -459,7 +460,7 @@ const DatePicker = react_1.default.forwardRef((props__, ref) => {
459
460
  width: '100%',
460
461
  marginBottom: 8,
461
462
  padding: `0px ${theme.methods.space.value(1, 'px')} 0px ${theme.methods.space.value(1.5, 'px')}`
462
- } }, { children: [(0, jsx_runtime_1.jsx)(IconButton, Object.assign({ color: 'inherit', version: 'text', onClick: onClose, "aria-label": 'Close' }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconClose, Object.assign({}, IconProps)) })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onOk }, buttonProps, { children: "Save" }))] }))), heading_ && ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'l2', className: (0, style_react_1.classNames)([
463
+ } }, { children: [(0, jsx_runtime_1.jsx)(IconButton, Object.assign({ color: 'inherit', version: 'text', onClick: onClose, "aria-label": l('Close') }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconClose, Object.assign({}, IconProps)) })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onOk }, buttonProps, { children: l('Save') }))] }))), heading_ && ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'l2', className: (0, style_react_1.classNames)([
463
464
  (0, utils_2.staticClassName)('DatePicker', theme) && [
464
465
  'onesy-DatePicker-subheading'
465
466
  ],
@@ -471,13 +472,13 @@ const DatePicker = react_1.default.forwardRef((props__, ref) => {
471
472
  ],
472
473
  classes.heading,
473
474
  fullScreen && classes.heading_fullScreen
474
- ]) }, { children: [(0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'h1' }, { children: textHeading })), switch_ && ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Enter date' }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: 'inherit', onClick: () => onMode('input'), "aria-label": 'Enter date' }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconEnter, Object.assign({}, IconProps)) })) })))] }))), mode === 'input' && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ direction: 'row', align: 'flex-start', justify: 'space-between', className: (0, style_react_1.classNames)([
475
+ ]) }, { children: [(0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'h1' }, { children: textHeading })), switch_ && ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Enter date') }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: 'inherit', onClick: () => onMode('input'), "aria-label": l('Enter date') }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconEnter, Object.assign({}, IconProps)) })) })))] }))), mode === 'input' && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ direction: 'row', align: 'flex-start', justify: 'space-between', className: (0, style_react_1.classNames)([
475
476
  (0, utils_2.staticClassName)('DatePicker', theme) && [
476
477
  'onesy-DatePicker-heading'
477
478
  ],
478
479
  classes.heading,
479
480
  fullScreen && classes.heading_fullScreen
480
- ]) }, { children: [(0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'h1' }, { children: inputModeHeadingText })), switch_ && ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Select date' }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: 'inherit', onClick: () => onMode('select'), "aria-label": 'Choose date' }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(Icon_, Object.assign({}, IconProps)) })) })))] })))] })), mode === 'select' && fullScreen && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center', justify: 'space-between', className: (0, style_react_1.classNames)([
481
+ ]) }, { children: [(0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'h1' }, { children: inputModeHeadingText })), switch_ && ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Select date') }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: 'inherit', onClick: () => onMode('select'), "aria-label": l('Select date') }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(Icon_, Object.assign({}, IconProps)) })) })))] })))] })), mode === 'select' && fullScreen && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center', justify: 'space-between', className: (0, style_react_1.classNames)([
481
482
  (0, utils_2.staticClassName)('DatePicker', theme) && [
482
483
  'onesy-DatePicker-day-names'
483
484
  ],
@@ -503,7 +504,7 @@ const DatePicker = react_1.default.forwardRef((props__, ref) => {
503
504
  classes.calendar_mobile
504
505
  ]) }))), mode === 'input' && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 1.5, direction: 'row', align: 'flex-start', className: (0, style_react_1.classNames)([
505
506
  classes.modal_input
506
- ]) }, { children: (0, jsx_runtime_1.jsx)(AdvancedTextField, Object.assign({ tonal: tonal, color: color, version: 'outlined', size: size, label: label, mask: mask, placeholder: placeholder, value: inputModal, onChange: onInputChangeModal, helperText: useHelperText ? placeholder : undefined, error: error, readOnly: readOnly, disabled: disabled }, AdvancedTextFieldProps, { className: (0, style_react_1.classNames)([
507
+ ]) }, { children: (0, jsx_runtime_1.jsx)(AdvancedTextField, Object.assign({ tonal: tonal, color: color, version: 'outlined', size: size, name: label, mask: mask, placeholder: placeholder, value: inputModal, onChange: onInputChangeModal, helperText: useHelperText ? placeholder : undefined, error: error, readOnly: readOnly, disabled: disabled }, AdvancedTextFieldProps, { className: (0, style_react_1.classNames)([
507
508
  AdvancedTextFieldProps === null || AdvancedTextFieldProps === void 0 ? void 0 : AdvancedTextFieldProps.className,
508
509
  classes.input_mobile
509
510
  ]) })) }))), fullScreen && ((0, jsx_runtime_1.jsx)(Divider, { tonal: false, className: (0, style_react_1.classNames)([
@@ -553,7 +554,7 @@ const DatePicker = react_1.default.forwardRef((props__, ref) => {
553
554
  ref.current = item;
554
555
  }
555
556
  refs.root.current = item;
556
- }, tonal: tonal, color: color, version: 'outlined', size: size, label: label, mask: mask, placeholder: placeholder, value: input, onChange: onInputChange, helperText: useHelperText ? placeholder : undefined, 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, fullScreen: fullScreen, onClose: onClose }, ModalProps, { children: mobile }))), 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-Calendar-list'] }, { children: desktop }))) }, TooltipProps)))] })));
557
+ }, tonal: tonal, color: color, version: 'outlined', size: size, name: label, mask: mask, placeholder: placeholder, value: input, onChange: onInputChange, helperText: useHelperText ? placeholder : undefined, 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, fullScreen: fullScreen, onClose: onClose }, ModalProps, { children: mobile }))), 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-Calendar-list'] }, { children: desktop }))) }, TooltipProps)))] })));
557
558
  });
558
559
  DatePicker.displayName = 'onesy-DatePicker';
559
560
  exports.default = DatePicker;
@@ -60,6 +60,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
60
60
  }), { name: 'onesy-DateTimePicker' });
61
61
  const DateTimePicker = react_1.default.forwardRef((props__, ref) => {
62
62
  const theme = (0, style_react_1.useOnesyTheme)();
63
+ const l = theme.l;
63
64
  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.onesyDateTimePicker) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props__)); }, [props__]);
64
65
  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]);
65
66
  const AdvancedTextField = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.AdvancedTextField) || AdvancedTextField_1.default; }, [theme]);
@@ -73,7 +74,7 @@ const DateTimePicker = react_1.default.forwardRef((props__, ref) => {
73
74
  const DatePicker = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.DatePicker) || DatePicker_1.default; }, [theme]);
74
75
  const TimePicker = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.TimePicker) || TimePicker_1.default; }, [theme]);
75
76
  const ClickListener = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.ClickListener) || ClickListener_1.default; }, [theme]);
76
- const { tonal = true, color = 'primary', version: version_ = 'auto', value: value_, valueDefault, onChange, label, range, now, static: static_, min, max, validate, headingText = 'Select date & time', headingTextTime, headingTextTimeRange, headingTextDate, headingTextDateRange, useHelperText: useHelperText_, format = '12', hour = true, minute = true, second = false, today, clear = true, size, placeholder: placeholder_, fullWidth, readOnly, disabled, valid: valid_, onClose: onClose_, onToday: onToday_, onClear: onClear_, onCancel: onCancel_, onOk: onOk_, Icon: Icon_ = IconMaterialDateRangeW100Filled_1.default, IconDate = IconMaterialCalendarTodayW100Filled_1.default, IconTime = IconMaterialScheduleW100_1.default, WrapperProps, ModalProps, TooltipProps, AdvancedTextFieldProps, DatePickerProps, TimePickerProps, IconButtonProps, ModeDesktopProps, ModeMobileProps, ButtonProps, PickerProps: PickerProps_, MiddleProps, MainProps, IconProps, className } = props, other = __rest(props, ["tonal", "color", "version", "value", "valueDefault", "onChange", "label", "range", "now", "static", "min", "max", "validate", "headingText", "headingTextTime", "headingTextTimeRange", "headingTextDate", "headingTextDateRange", "useHelperText", "format", "hour", "minute", "second", "today", "clear", "size", "placeholder", "fullWidth", "readOnly", "disabled", "valid", "onClose", "onToday", "onClear", "onCancel", "onOk", "Icon", "IconDate", "IconTime", "WrapperProps", "ModalProps", "TooltipProps", "AdvancedTextFieldProps", "DatePickerProps", "TimePickerProps", "IconButtonProps", "ModeDesktopProps", "ModeMobileProps", "ButtonProps", "PickerProps", "MiddleProps", "MainProps", "IconProps", "className"]);
77
+ const { tonal = true, color = 'primary', version: version_ = 'auto', value: value_, valueDefault, onChange, label, range, now, static: static_, min, max, validate, headingText = l('Select date & time'), headingTextTime, headingTextTimeRange, headingTextDate, headingTextDateRange, useHelperText: useHelperText_, format = '12', hour = true, minute = true, second = false, today, clear = true, size, placeholder: placeholder_, fullWidth, readOnly, disabled, valid: valid_, onClose: onClose_, onToday: onToday_, onClear: onClear_, onCancel: onCancel_, onOk: onOk_, Icon: Icon_ = IconMaterialDateRangeW100Filled_1.default, IconDate = IconMaterialCalendarTodayW100Filled_1.default, IconTime = IconMaterialScheduleW100_1.default, WrapperProps, ModalProps, TooltipProps, AdvancedTextFieldProps, DatePickerProps, TimePickerProps, IconButtonProps, ModeDesktopProps, ModeMobileProps, ButtonProps, PickerProps: PickerProps_, MiddleProps, MainProps, IconProps, className } = props, other = __rest(props, ["tonal", "color", "version", "value", "valueDefault", "onChange", "label", "range", "now", "static", "min", "max", "validate", "headingText", "headingTextTime", "headingTextTimeRange", "headingTextDate", "headingTextDateRange", "useHelperText", "format", "hour", "minute", "second", "today", "clear", "size", "placeholder", "fullWidth", "readOnly", "disabled", "valid", "onClose", "onToday", "onClear", "onCancel", "onOk", "Icon", "IconDate", "IconTime", "WrapperProps", "ModalProps", "TooltipProps", "AdvancedTextFieldProps", "DatePickerProps", "TimePickerProps", "IconButtonProps", "ModeDesktopProps", "ModeMobileProps", "ButtonProps", "PickerProps", "MiddleProps", "MainProps", "IconProps", "className"]);
77
78
  const { classes } = useStyle();
78
79
  const refs = {
79
80
  root: react_1.default.useRef(undefined),
@@ -413,7 +414,7 @@ const DateTimePicker = react_1.default.forwardRef((props__, ref) => {
413
414
  'onesy-TimePicker-footer'
414
415
  ],
415
416
  classes.footer
416
- ]) }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: tab === 'date' ? 'Time' : 'Date' }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: 'inherit', onClick: onPickSwitch, "aria-label": tab === 'date' ? 'Time' : 'Date' }, iconButtonProps, { children: tab === 'date' ? (0, jsx_runtime_1.jsx)(IconTime, Object.assign({}, IconProps)) : (0, jsx_runtime_1.jsx)(IconDate, Object.assign({}, IconProps)) })) })), today && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onToday }, buttonProps, { children: "Today" }))), clear && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onClear }, 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', onClick: onCancel }, buttonProps, { children: "Cancel" })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: color, version: 'text', onClick: onOk }, buttonProps, { children: "Ok" }))] }))] })));
417
+ ]) }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: tab === 'date' ? l('Time') : l('Date') }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: 'inherit', onClick: onPickSwitch, "aria-label": tab === 'date' ? l('Time') : l('Date') }, iconButtonProps, { children: tab === 'date' ? (0, jsx_runtime_1.jsx)(IconTime, Object.assign({}, IconProps)) : (0, jsx_runtime_1.jsx)(IconDate, Object.assign({}, IconProps)) })) })), today && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onToday }, buttonProps, { children: l('Today') }))), clear && ((0, jsx_runtime_1.jsx)(Button, Object.assign({ onClick: onClear }, 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', onClick: onCancel }, buttonProps, { children: l('Cancel') })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: color, version: 'text', onClick: onOk }, buttonProps, { children: l('Ok') }))] }))] })));
417
418
  const heading = (range ? (tab === 'date' ? headingTextDateRange : headingTextTimeRange) : (tab === 'date' ? headingTextDate : headingTextTime)) || headingText;
418
419
  const PickerProps = Object.assign(Object.assign(Object.assign({ value, onChange: onPickerChange, now, static: true, range,
419
420
  valid,
@@ -441,7 +442,7 @@ const DateTimePicker = react_1.default.forwardRef((props__, ref) => {
441
442
  ]) }, { children: tab === 'date' ? ((0, jsx_runtime_1.jsx)(DatePicker, Object.assign({ calendar: calendar, onChangeCalendar: onChangeCalendar, size: size }, PickerProps))) : ((0, jsx_runtime_1.jsx)(TimePicker, Object.assign({ format: format, hour: hour, minute: minute, second: second, size: size }, PickerProps))) })), actions] })));
442
443
  const moreProps = {};
443
444
  if (version === 'desktop') {
444
- moreProps.end = ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: color, version: 'text', onClick: onOpen, "aria-label": 'Choose date and time', disabled: disabled || readOnly }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(Icon_, Object.assign({}, IconProps)) })));
445
+ moreProps.end = ((0, jsx_runtime_1.jsx)(IconButton, Object.assign({ tonal: tonal, color: color, version: 'text', onClick: onOpen, "aria-label": l('Choose date and time'), disabled: disabled || readOnly }, iconButtonProps, { children: (0, jsx_runtime_1.jsx)(Icon_, Object.assign({}, IconProps)) })));
445
446
  }
446
447
  if (version === 'mobile') {
447
448
  if (!(readOnly || disabled))
@@ -470,7 +471,7 @@ const DateTimePicker = react_1.default.forwardRef((props__, ref) => {
470
471
  ref.current = item;
471
472
  }
472
473
  refs.root.current = item;
473
- }, tonal: tonal, color: color, version: 'outlined', label: label, mask: mask, placeholder: placeholder, value: input, onChange: onInputChange, helperText: useHelperText ? placeholder : undefined, endVerticalAlign: 'center', size: size, 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-DateTimePicker-main', '.onesy-Calendar-list'] }, { children: element }))) }, TooltipProps)))] })));
474
+ }, tonal: tonal, color: color, version: 'outlined', name: label, mask: mask, placeholder: placeholder, value: input, onChange: onInputChange, helperText: useHelperText ? placeholder : undefined, endVerticalAlign: 'center', size: size, 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-DateTimePicker-main', '.onesy-Calendar-list'] }, { children: element }))) }, TooltipProps)))] })));
474
475
  });
475
476
  DateTimePicker.displayName = 'onesy-DateTimePicker';
476
477
  exports.default = DateTimePicker;
@@ -122,6 +122,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
122
122
  }), { name: 'onesy-Drawing' });
123
123
  const Drawing = react_1.default.forwardRef((props__, ref) => {
124
124
  const theme = (0, style_react_1.useOnesyTheme)();
125
+ const l = theme.l;
125
126
  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.onesyDrawing) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props__)); }, [props__]);
126
127
  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]);
127
128
  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]);
@@ -349,7 +350,7 @@ const Drawing = react_1.default.forwardRef((props__, ref) => {
349
350
  const IconProps = Object.assign({ size: 'small' }, IconProps_);
350
351
  const WrapperToggleButton = react_1.default.useCallback(react_1.default.forwardRef((props_, ref_) => {
351
352
  const { open: open_, label, children } = props_, other_ = __rest(props_, ["open", "label", "children"]);
352
- return ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ open: open_ !== undefined ? open_ : undefined, label: label }, TooltipProps, { children: react_1.default.cloneElement(children, Object.assign(Object.assign({}, other_), children.props)) })));
353
+ return ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ open: open_ !== undefined ? open_ : undefined, name: label }, TooltipProps, { children: react_1.default.cloneElement(children, Object.assign(Object.assign({}, other_), children.props)) })));
353
354
  }), []);
354
355
  const WrapperAppend = react_1.default.useCallback((props_) => {
355
356
  const { open: open_, element, anchorElement, onClose, children } = props_, other_ = __rest(props_, ["open", "element", "anchorElement", "onClose", "children"]);
@@ -388,7 +389,7 @@ const Drawing = react_1.default.forwardRef((props__, ref) => {
388
389
  onClose();
389
390
  } }, index_))) }), index)))] })), (0, jsx_runtime_1.jsx)(Divider, {}), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.5, direction: 'row', align: 'center', style: {
390
391
  width: '100%'
391
- } }, { children: [(0, jsx_runtime_1.jsx)(ColorTextField, Object.assign({ tonal: tonal, color: color, label: 'Custom color', version: 'outlined', size: 'small', value: refs.inputValues.current[version_], onChange: valueNew => updateInputValues(version_, valueNew) }, ColorTextFieldProps, { className: (0, style_react_1.classNames)([
392
+ } }, { children: [(0, jsx_runtime_1.jsx)(ColorTextField, Object.assign({ tonal: tonal, color: color, name: l('Custom color'), version: 'outlined', size: 'small', value: refs.inputValues.current[version_], onChange: valueNew => updateInputValues(version_, valueNew) }, ColorTextFieldProps, { className: (0, style_react_1.classNames)([
392
393
  (0, utils_2.staticClassName)('Drawing', theme) && [
393
394
  'onesy-Drawing-text-field-color'
394
395
  ],
@@ -397,7 +398,7 @@ const Drawing = react_1.default.forwardRef((props__, ref) => {
397
398
  ]) })), (0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: 'inherit', version: 'text', size: 'small', onClick: () => {
398
399
  onUpdate(refs.inputValues.current[version_]);
399
400
  onClose();
400
- } }, { children: "Apply" }))] }))] })));
401
+ } }, { children: l('Apply') }))] }))] })));
401
402
  }), []);
402
403
  const valueNew_ = ((0, utils_1.is)('array', value) ? value : [value]).filter(Boolean);
403
404
  const valueNewActive = mouseDown && valueNew_[valueNew_.length - 1];
@@ -465,7 +466,7 @@ const Drawing = react_1.default.forwardRef((props__, ref) => {
465
466
  ToolbarUpdatesProps === null || ToolbarUpdatesProps === void 0 ? void 0 : ToolbarUpdatesProps.className,
466
467
  classes.toolbar,
467
468
  classes.toolbar_updates
468
- ]) }, { children: [includes('stroke-width') && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'flex-start' }, { children: includes('stroke-width') && ((0, jsx_runtime_1.jsx)(Select, Object.assign({ label: 'Stroke Width', valueDefault: stroke_width.find(item => String(item.value).includes('1')).value, value: inputValues['strokeWidth'], onChange: (valueNew) => updateInputValues('strokeWidth', valueNew) }, SelectProps, { className: (0, style_react_1.classNames)([
469
+ ]) }, { children: [includes('stroke-width') && ((0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'flex-start' }, { children: includes('stroke-width') && ((0, jsx_runtime_1.jsx)(Select, Object.assign({ name: l('Stroke Width'), valueDefault: stroke_width.find(item => String(item.value).includes('1')).value, value: inputValues['strokeWidth'], onChange: (valueNew) => updateInputValues('strokeWidth', valueNew) }, SelectProps, { className: (0, style_react_1.classNames)([
469
470
  (0, utils_2.staticClassName)('Drawing', theme) && [
470
471
  'onesy-Drawing-select'
471
472
  ],
@@ -473,12 +474,12 @@ const Drawing = react_1.default.forwardRef((props__, ref) => {
473
474
  classes.select
474
475
  ]), style: {
475
476
  minWidth: '90px'
476
- } }, { children: stroke_width.map(item => ((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ primary: item.label, value: item.value, button: true }, ListItemProps), item.value))) }))) }))), includes('stroke-color') && ((0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: includes('stroke-color') && ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.strokeColor, anchorElement: refs.elements.strokeColor.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('strokeColor', false), include: [refs.elements.strokeColor, refs.elements.strokeColor.current] }, { children: (0, jsx_runtime_1.jsx)(Palette, Object.assign({ onClose: () => updateOpen('strokeColor', false), onUpdate: (valueNew) => updateInputValues('strokeColor', valueNew) }, PaletteProps)) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Stroke Color', open: refs.open.current.strokeColor ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('stroke-color', ToggleButtonProps, refs.value.current) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.strokeColor }, ToggleButtonProps, { selected: refs.open.current.strokeColor, onClick: () => updateOpen('strokeColor', !refs.open.current.strokeColor) }, { children: (0, jsx_runtime_1.jsx)(IconStrokeColor, Object.assign({}, IconProps)) }))) })) }))) }))), includes('size') && ((0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: includes('size') && ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.size, anchorElement: refs.elements.size.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('size', false), include: [refs.elements.size] }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, tonal: tonal, color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed', Component: Surface, className: (0, style_react_1.classNames)([
477
+ } }, { children: stroke_width.map(item => ((0, jsx_runtime_1.jsx)(ListItem, Object.assign({ primary: item.label, value: item.value, button: true }, ListItemProps), item.value))) }))) }))), includes('stroke-color') && ((0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: includes('stroke-color') && ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.strokeColor, anchorElement: refs.elements.strokeColor.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('strokeColor', false), include: [refs.elements.strokeColor, refs.elements.strokeColor.current] }, { children: (0, jsx_runtime_1.jsx)(Palette, Object.assign({ onClose: () => updateOpen('strokeColor', false), onUpdate: (valueNew) => updateInputValues('strokeColor', valueNew) }, PaletteProps)) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Stroke Color'), open: refs.open.current.strokeColor ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('stroke-color', ToggleButtonProps, refs.value.current) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.strokeColor }, ToggleButtonProps, { selected: refs.open.current.strokeColor, onClick: () => updateOpen('strokeColor', !refs.open.current.strokeColor) }, { children: (0, jsx_runtime_1.jsx)(IconStrokeColor, Object.assign({}, IconProps)) }))) })) }))) }))), includes('size') && ((0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: includes('size') && ((0, jsx_runtime_1.jsx)(WrapperAppend, Object.assign({ open: refs.open.current.size, anchorElement: refs.elements.size.current, element: ((0, jsx_runtime_1.jsx)(ClickListener, Object.assign({ onClickOutside: () => updateOpen('size', false), include: [refs.elements.size] }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, tonal: tonal, color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed', Component: Surface, className: (0, style_react_1.classNames)([
477
478
  (0, utils_2.staticClassName)('Drawing', theme) && [
478
479
  'onesy-Drawing-modal'
479
480
  ],
480
481
  classes.modal
481
- ]) }, SizeProps, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'center' }, { children: [(0, jsx_runtime_1.jsx)(NumericTextField, { label: 'Width', tonal: tonal, color: color, size: 'small', version: 'outlined', min: 1, increment: false, decrement: false, value: refs.inputValues.current.widthInput, onChange: valueNew => updateInputValues('widthInput', !valueNew ? 1 : valueNew) }), "\u00D7", (0, jsx_runtime_1.jsx)(NumericTextField, { label: 'Height', tonal: tonal, color: color, size: 'small', version: 'outlined', min: 1, increment: false, decrement: false, value: refs.inputValues.current.heightInput, onChange: valueNew => updateInputValues('heightInput', !valueNew ? 1 : valueNew) })] })), (0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'flex-end', style: {
482
+ ]) }, SizeProps, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'center' }, { children: [(0, jsx_runtime_1.jsx)(NumericTextField, { name: l('Width'), tonal: tonal, color: color, size: 'small', version: 'outlined', min: 1, increment: false, decrement: false, value: refs.inputValues.current.widthInput, onChange: valueNew => updateInputValues('widthInput', !valueNew ? 1 : valueNew) }), "\u00D7", (0, jsx_runtime_1.jsx)(NumericTextField, { name: l('Height'), tonal: tonal, color: color, size: 'small', version: 'outlined', min: 1, increment: false, decrement: false, value: refs.inputValues.current.heightInput, onChange: valueNew => updateInputValues('heightInput', !valueNew ? 1 : valueNew) })] })), (0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center', justify: 'flex-end', style: {
482
483
  width: '100%'
483
484
  } }, { children: (0, jsx_runtime_1.jsx)(Button, Object.assign({ tonal: tonal, color: 'inherit', version: 'text', size: 'small', onClick: () => {
484
485
  var _a;
@@ -491,7 +492,7 @@ const Drawing = react_1.default.forwardRef((props__, ref) => {
491
492
  updateInputValues('width', refs.inputValues.current.widthInput);
492
493
  updateInputValues('height', refs.inputValues.current.heightInput);
493
494
  updateOpen('size', false);
494
- } }, { children: "Update" })) }))] })) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Size', open: refs.open.current.size ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('size', ToggleButtonProps, refs.value.current) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.size }, ToggleButtonProps, { selected: refs.open.current.size, onClick: () => updateOpen('size', !refs.open.current.size) }, { children: (0, jsx_runtime_1.jsx)(IconSize, Object.assign({}, IconProps)) }))) })) }))) })))] }))), (updates_ && actions_) && ((0, jsx_runtime_1.jsx)(Divider, Object.assign({}, DividerProps, { className: (0, style_react_1.classNames)([
495
+ } }, { children: "Update" })) }))] })) }))) }, { children: (0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Size'), open: refs.open.current.size ? false : undefined }, { children: (0, utils_1.is)('function', render) ? render('size', ToggleButtonProps, refs.value.current) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({ ref: refs.elements.size }, ToggleButtonProps, { selected: refs.open.current.size, onClick: () => updateOpen('size', !refs.open.current.size) }, { children: (0, jsx_runtime_1.jsx)(IconSize, Object.assign({}, IconProps)) }))) })) }))) })))] }))), (updates_ && actions_) && ((0, jsx_runtime_1.jsx)(Divider, Object.assign({}, DividerProps, { className: (0, style_react_1.classNames)([
495
496
  (0, utils_2.staticClassName)('Drawing', theme) && [
496
497
  'onesy-Drawing-divider'
497
498
  ],
@@ -507,7 +508,7 @@ const Drawing = react_1.default.forwardRef((props__, ref) => {
507
508
  classes.toolbar_actions
508
509
  ]) }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ direction: 'row', align: 'center', justify: 'space-between', style: {
509
510
  width: '100%'
510
- } }, { children: [(0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start' }, { children: includes('clear') && ((0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: includes('clear') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Clear' }, { children: (0, utils_1.is)('function', render) ? render('clear', ToggleButtonProps, refs.value.current) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: onClear }, { children: (0, jsx_runtime_1.jsx)(IconClear, Object.assign({}, IconProps)) }))) }))) }))) })), (0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start' }, { children: includes('download') && ((0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: includes('download') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ label: 'Download' }, { children: (0, utils_1.is)('function', render) ? render('download', ToggleButtonProps, refs.value.current) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { loading: loading, onClick: onDownload }, { children: (0, jsx_runtime_1.jsx)(IconDownload, Object.assign({}, IconProps)) }))) }))) }))) }))] })) }))), (0, jsx_runtime_1.jsx)(Divider, Object.assign({}, DividerProps, { className: (0, style_react_1.classNames)([
511
+ } }, { children: [(0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start' }, { children: includes('clear') && ((0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: includes('clear') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Clear') }, { children: (0, utils_1.is)('function', render) ? render('clear', ToggleButtonProps, refs.value.current) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { onClick: onClear }, { children: (0, jsx_runtime_1.jsx)(IconClear, Object.assign({}, IconProps)) }))) }))) }))) })), (0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 2, direction: 'row', align: 'center', justify: 'flex-start' }, { children: includes('download') && ((0, jsx_runtime_1.jsx)(ToggleButtons, Object.assign({}, ToggleButtonsProps, { children: includes('download') && ((0, jsx_runtime_1.jsx)(WrapperToggleButton, Object.assign({ name: l('Download') }, { children: (0, utils_1.is)('function', render) ? render('download', ToggleButtonProps, refs.value.current) : ((0, jsx_runtime_1.jsx)(ToggleButton, Object.assign({}, ToggleButtonProps, { loading: loading, onClick: onDownload }, { children: (0, jsx_runtime_1.jsx)(IconDownload, Object.assign({}, IconProps)) }))) }))) }))) }))] })) }))), (0, jsx_runtime_1.jsx)(Divider, Object.assign({}, DividerProps, { className: (0, style_react_1.classNames)([
511
512
  (0, utils_2.staticClassName)('Drawing', theme) && [
512
513
  'onesy-Drawing-divider'
513
514
  ],
@@ -4,6 +4,7 @@ import { IElement, IVersion } from '../types';
4
4
  export type IDropZone = IFileChoose & {
5
5
  version?: IVersion;
6
6
  start?: IElement;
7
+ dropText?: any;
7
8
  onFocus?: (event: React.FocusEvent<any>) => any;
8
9
  onBlur?: (event: React.FocusEvent<any>) => any;
9
10
  onDrop?: (event: React.DragEvent<any>) => any;
@@ -55,13 +55,14 @@ const useStyle = (0, style_react_1.style)(theme => ({
55
55
  }), { name: 'onesy-DropZone' });
56
56
  const DropZone = react_1.default.forwardRef((props_, ref) => {
57
57
  const theme = (0, style_react_1.useOnesyTheme)();
58
+ const l = theme.l;
58
59
  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.onesyDropZone) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
59
60
  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]);
60
61
  const FileChoose = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.FileChoose) || FileChoose_1.default; }, [theme]);
61
62
  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]);
62
63
  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]);
63
64
  const Interaction = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Interaction) || Interaction_1.default; }, [theme]);
64
- const { tonal = true, color = 'default', version, start, files, multiple, max, allowedTypes, valueDefault, value: value_, onChange: onChange_, IconStart = IconMaterialCloudUploadW100_1.default, onFocus: onFocus_, onBlur: onBlur_, onDrop: onDrop_, onDragOver: onDragOver_, onDragEnter: onDragEnter_, onDragLeave: onDragLeave_, disabled, children, className } = props, otherProps = __rest(props, ["tonal", "color", "version", "start", "files", "multiple", "max", "allowedTypes", "valueDefault", "value", "onChange", "IconStart", "onFocus", "onBlur", "onDrop", "onDragOver", "onDragEnter", "onDragLeave", "disabled", "children", "className"]);
65
+ const { tonal = true, color = 'default', version, start, files, multiple, max, allowedTypes, dropText = l('Drop files here'), valueDefault, value: value_, onChange: onChange_, IconStart = IconMaterialCloudUploadW100_1.default, onFocus: onFocus_, onBlur: onBlur_, onDrop: onDrop_, onDragOver: onDragOver_, onDragEnter: onDragEnter_, onDragLeave: onDragLeave_, disabled, children, className } = props, otherProps = __rest(props, ["tonal", "color", "version", "start", "files", "multiple", "max", "allowedTypes", "dropText", "valueDefault", "value", "onChange", "IconStart", "onFocus", "onBlur", "onDrop", "onDragOver", "onDragEnter", "onDragLeave", "disabled", "children", "className"]);
65
66
  const other = otherProps;
66
67
  const { classes } = useStyle();
67
68
  const [init, setInit] = react_1.default.useState(false);
@@ -200,7 +201,7 @@ const DropZone = react_1.default.forwardRef((props_, ref) => {
200
201
  'onesy-DropZone-wrapper-text'
201
202
  ],
202
203
  classes.wrapperText
203
- ]) }, { children: [(0, jsx_runtime_1.jsx)(IconStart, {}), (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 't1' }, { children: "Drop files here" }))] })))] })));
204
+ ]) }, { children: [(0, jsx_runtime_1.jsx)(IconStart, {}), (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 't1' }, { children: dropText }))] })))] })));
204
205
  });
205
206
  DropZone.displayName = 'onesy-DropZone';
206
207
  exports.default = DropZone;