@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
package/Emojis/Emojis.js CHANGED
@@ -153,6 +153,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
153
153
  }), { name: 'onesy-Emojis' });
154
154
  const Emojis = react_1.default.forwardRef((props_, ref) => {
155
155
  const theme = (0, style_react_1.useOnesyTheme)();
156
+ const l = theme.l;
156
157
  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.onesyEmojis) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
157
158
  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]);
158
159
  const Menu = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Menu) || Menu_1.default; }, [theme]);
@@ -164,48 +165,50 @@ const Emojis = react_1.default.forwardRef((props_, ref) => {
164
165
  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]);
165
166
  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]);
166
167
  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]);
167
- const EMOJI_CATEGORIES = [
168
- {
169
- "name": "Smileys and People",
170
- "groups": ["Smiley", "Gesture", "Person", "Clothing"],
171
- "icon": (0, jsx_runtime_1.jsx)(IconMaterialMoodW100_1.default, {})
172
- },
173
- {
174
- "name": "Animals and Nature",
175
- "groups": ["Animal", "Nature"],
176
- "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiNatureW100_1.default, {})
177
- },
178
- {
179
- "name": "Food and Drink",
180
- "groups": ["Food"],
181
- "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiFoodBeverageW100_1.default, {})
182
- },
183
- {
184
- "name": "Activity",
185
- "groups": ["Activity"],
186
- "icon": (0, jsx_runtime_1.jsx)(IconMaterialHikingW100_1.default, {})
187
- },
188
- {
189
- "name": "Travel and Places",
190
- "groups": ["Travel"],
191
- "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiTransportationW100_1.default, {})
192
- },
193
- {
194
- "name": "Objects",
195
- "groups": ["Object"],
196
- "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiObjectsW100_1.default, {})
197
- },
198
- {
199
- "name": "Symbols",
200
- "groups": ["Symbol"],
201
- "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiSymbolsW100_1.default, {})
202
- },
203
- {
204
- "name": "Flags and Countries",
205
- "groups": ["Flag", "Country"],
206
- "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiFlagsW100_1.default, {})
207
- }
208
- ];
168
+ const EMOJI_CATEGORIES = react_1.default.useMemo(() => {
169
+ return [
170
+ {
171
+ "name": l("Smileys and People"),
172
+ "groups": ["Smiley", "Gesture", "Person", "Clothing"],
173
+ "icon": (0, jsx_runtime_1.jsx)(IconMaterialMoodW100_1.default, {})
174
+ },
175
+ {
176
+ "name": l("Animals and Nature"),
177
+ "groups": ["Animal", "Nature"],
178
+ "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiNatureW100_1.default, {})
179
+ },
180
+ {
181
+ "name": l("Food and Drink"),
182
+ "groups": ["Food"],
183
+ "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiFoodBeverageW100_1.default, {})
184
+ },
185
+ {
186
+ "name": l("Activity"),
187
+ "groups": ["Activity"],
188
+ "icon": (0, jsx_runtime_1.jsx)(IconMaterialHikingW100_1.default, {})
189
+ },
190
+ {
191
+ "name": l("Travel and Places"),
192
+ "groups": ["Travel"],
193
+ "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiTransportationW100_1.default, {})
194
+ },
195
+ {
196
+ "name": l("Objects"),
197
+ "groups": ["Object"],
198
+ "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiObjectsW100_1.default, {})
199
+ },
200
+ {
201
+ "name": l("Symbols"),
202
+ "groups": ["Symbol"],
203
+ "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiSymbolsW100_1.default, {})
204
+ },
205
+ {
206
+ "name": l("Flags and Countries"),
207
+ "groups": ["Flag", "Country"],
208
+ "icon": (0, jsx_runtime_1.jsx)(IconMaterialEmojiFlagsW100_1.default, {})
209
+ }
210
+ ];
211
+ }, []);
209
212
  const { tonal = true, color = 'themed', label: label_, onSelect: onSelect_, emojis = emojis_list_1.default, categories = EMOJI_CATEGORIES, selected, size = 'regular', search: search_ = true, tabs: tabs_ = true, className } = props, other = __rest(props, ["tonal", "color", "label", "onSelect", "emojis", "categories", "selected", "size", "search", "tabs", "className"]);
210
213
  const { classes } = useStyle();
211
214
  const [open, setOpen] = react_1.default.useState(false);
@@ -294,7 +297,7 @@ const Emojis = react_1.default.forwardRef((props_, ref) => {
294
297
  const label = ((0, jsx_runtime_1.jsx)(Line, Object.assign({ tonal: tonal, color: color, Component: Surface, className: (0, style_react_1.classNames)([
295
298
  classes.wrapper,
296
299
  classes[`size_${size}`]
297
- ]) }, { children: (0, jsx_runtime_1.jsx)(SpyScroll, Object.assign({ ids: categoriesUsedIDs, parent: openElement, onActive: onActiveTab }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, align: 'unset', justify: 'unset', fullWidth: true, className: classes.categories }, { children: [(search_ || tabs_) && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, fullWidth: true, className: classes.header }, { children: [search_ && ((0, jsx_runtime_1.jsx)(TextField, { name: 'Search', version: 'outlined', value: search || '', onChange: onChangeSearch, size: ['small', 'regular'].includes(size) ? 'small' : 'regular', fullWidth: true, clear: true })), tabs_ && !!categoriesUsed.length && ((0, jsx_runtime_1.jsx)(Tabs, Object.assign({ valueDefault: tab, value: tab, onChange: onChangeTabs, size: 'small', initialLineUpdateTimeout: 440, noDivider: true, className: classes.tabs }, { children: tabs.map((item, index) => ((0, jsx_runtime_1.jsx)(Tab, Object.assign({ value: item.value, onClick: () => onTabClick(item.value), "data-onesy-spy-scroll": categoryToID(item.value), className: (0, style_react_1.classNames)([
300
+ ]) }, { children: (0, jsx_runtime_1.jsx)(SpyScroll, Object.assign({ ids: categoriesUsedIDs, parent: openElement, onActive: onActiveTab }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, align: 'unset', justify: 'unset', fullWidth: true, className: classes.categories }, { children: [(search_ || tabs_) && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, fullWidth: true, className: classes.header }, { children: [search_ && ((0, jsx_runtime_1.jsx)(TextField, { name: l('Search'), version: 'outlined', value: search || '', onChange: onChangeSearch, size: ['small', 'regular'].includes(size) ? 'small' : 'regular', fullWidth: true, clear: true })), tabs_ && !!categoriesUsed.length && ((0, jsx_runtime_1.jsx)(Tabs, Object.assign({ valueDefault: tab, value: tab, onChange: onChangeTabs, size: 'small', initialLineUpdateTimeout: 440, noDivider: true, className: classes.tabs }, { children: tabs.map((item, index) => ((0, jsx_runtime_1.jsx)(Tab, Object.assign({ value: item.value, onClick: () => onTabClick(item.value), "data-onesy-spy-scroll": categoryToID(item.value), className: (0, style_react_1.classNames)([
298
301
  classes.tab,
299
302
  classes[`tab_size_${size}`]
300
303
  ]) }, { children: react_1.default.cloneElement(item.name, {
package/Frame/Frame.js CHANGED
@@ -62,6 +62,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
62
62
  }), { name: 'onesy-Frame' });
63
63
  const Frame = react_1.default.forwardRef((props_, ref) => {
64
64
  const theme = (0, style_react_1.useOnesyTheme)();
65
+ const l = theme.l;
65
66
  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.onesyFrame) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
66
67
  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]);
67
68
  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]);
@@ -78,10 +79,10 @@ const Frame = react_1.default.forwardRef((props_, ref) => {
78
79
  });
79
80
  }, []);
80
81
  const responsiveOptions = [
81
- { name: 'Mobile', icon: IconMobile, disabled: (0, utils_1.isEnvironment)('browser') && window.innerWidth < 375 },
82
- { name: 'Tablet', icon: IconTablet, disabled: (0, utils_1.isEnvironment)('browser') && window.innerWidth < 768 },
83
- { name: 'Laptop', icon: IconLaptop, disabled: (0, utils_1.isEnvironment)('browser') && window.innerWidth < 1440 },
84
- { name: 'Desktop', icon: IconDesktop, disabled: (0, utils_1.isEnvironment)('browser') && window.innerWidth < 1920 }
82
+ { name: l('Mobile'), icon: IconMobile, disabled: (0, utils_1.isEnvironment)('browser') && window.innerWidth < 375 },
83
+ { name: l('Tablet'), icon: IconTablet, disabled: (0, utils_1.isEnvironment)('browser') && window.innerWidth < 768 },
84
+ { name: l('Laptop'), icon: IconLaptop, disabled: (0, utils_1.isEnvironment)('browser') && window.innerWidth < 1440 },
85
+ { name: l('Desktop'), icon: IconDesktop, disabled: (0, utils_1.isEnvironment)('browser') && window.innerWidth < 1920 }
85
86
  ];
86
87
  const WrapperStyle = {};
87
88
  if (responsive) {
@@ -137,7 +138,7 @@ const Frame = react_1.default.forwardRef((props_, ref) => {
137
138
  ],
138
139
  OptionsProps === null || OptionsProps === void 0 ? void 0 : OptionsProps.className,
139
140
  classes.options
140
- ]) }, { children: [startOptions, responsiveOptions.map((item, index) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: item.name }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ size: 'small', selected: item.name === responsive, onClick: () => onResponsive(item.name), disabled: item.disabled }, OptionProps, { className: (0, style_react_1.classNames)([
141
+ ]) }, { children: [startOptions, responsiveOptions.map((item, index) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: item.name }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ size: 'small', selected: item.name === responsive, onClick: () => onResponsive(item.name), disabled: item.disabled }, OptionProps, { className: (0, style_react_1.classNames)([
141
142
  (0, utils_2.staticClassName)('Frame', theme) && [
142
143
  'onesy-Frame-option'
143
144
  ],
@@ -132,6 +132,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
132
132
  const ImageEdit = react_1.default.forwardRef((props_, ref) => {
133
133
  var _a, _b;
134
134
  const theme = (0, style_react_1.useOnesyTheme)();
135
+ const l = theme.l;
135
136
  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.onesyImageEdit) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
136
137
  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]);
137
138
  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]);
@@ -511,11 +512,11 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
511
512
  };
512
513
  let filters = react_1.default.useMemo(() => [
513
514
  {
514
- label: 'Brightness',
515
+ label: l('Brightness'),
515
516
  Icon: IconBrightness,
516
517
  value: 'brightness',
517
518
  method: utils_2.canvasBrightness,
518
- renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Brightness' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconBrightness, {}) })) }), value__)),
519
+ renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Brightness') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconBrightness, {}) })) }), value__)),
519
520
  renderSlider: (value__, filterValuesCopy_, onFilterSliderChange_) => ((0, jsx_runtime_1.jsx)(Slider, Object.assign({ valueDefault: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, value: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, min: -100, max: 100, precision: 1, marks: [
520
521
  { value: -100, label: '-100' },
521
522
  { value: 0, label: '0' },
@@ -532,11 +533,11 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
532
533
  ]) }), value__))
533
534
  },
534
535
  {
535
- label: 'Contrast',
536
+ label: l('Contrast'),
536
537
  Icon: IconContrast,
537
538
  value: 'contrast',
538
539
  method: utils_2.canvasContrast,
539
- renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Contrast' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconContrast, {}) })) }), value__)),
540
+ renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Contrast') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconContrast, {}) })) }), value__)),
540
541
  renderSlider: (value__, filterValuesCopy_, onFilterSliderChange_) => ((0, jsx_runtime_1.jsx)(Slider, Object.assign({ valueDefault: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, value: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, min: -100, max: 100, precision: 1, marks: [
541
542
  { value: -100, label: '-100' },
542
543
  { value: 0, label: '0' },
@@ -553,11 +554,11 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
553
554
  ]) }), value__))
554
555
  },
555
556
  {
556
- label: 'Saturation',
557
+ label: l('Saturation'),
557
558
  Icon: IconSaturation,
558
559
  value: 'saturation',
559
560
  method: utils_2.canvasSaturation,
560
- renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Saturation' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconSaturation, {}) })) }), value__)),
561
+ renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Saturation') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconSaturation, {}) })) }), value__)),
561
562
  renderSlider: (value__, filterValuesCopy_, onFilterSliderChange_) => ((0, jsx_runtime_1.jsx)(Slider, Object.assign({ valueDefault: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, value: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, min: -100, max: 100, precision: 1, marks: [
562
563
  { value: -100, label: '-100' },
563
564
  { value: 0, label: '0' },
@@ -574,11 +575,11 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
574
575
  ]) }), value__))
575
576
  },
576
577
  {
577
- label: 'Fade',
578
+ label: l('Fade'),
578
579
  Icon: IconFade,
579
580
  value: 'fade',
580
581
  method: utils_2.canvasFade,
581
- renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Fade' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconFade, {}) })) }), value__)),
582
+ renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Fade') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconFade, {}) })) }), value__)),
582
583
  renderSlider: (value__, filterValuesCopy_, onFilterSliderChange_) => ((0, jsx_runtime_1.jsx)(Slider, Object.assign({ valueDefault: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, value: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, min: 0, max: 100, precision: 1, marks: [
583
584
  { value: 0, label: '0' },
584
585
  { value: 100, label: '100' }
@@ -594,11 +595,11 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
594
595
  ]) }), value__))
595
596
  },
596
597
  {
597
- label: 'Invert',
598
+ label: l('Invert'),
598
599
  Icon: IconInvert,
599
600
  value: 'invert',
600
601
  method: utils_2.canvasInvert,
601
- renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Invert' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconInvert, {}) })) }), value__)),
602
+ renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Invert') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconInvert, {}) })) }), value__)),
602
603
  renderSlider: (value__, filterValuesCopy_, onFilterSliderChange_) => ((0, jsx_runtime_1.jsx)(Slider, Object.assign({ valueDefault: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, value: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, min: 0, max: 1, precision: 1, marks: [
603
604
  { value: 0, label: 'Not inverted' },
604
605
  { value: 1, label: 'Inverted' }
@@ -614,11 +615,11 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
614
615
  ]) }), value__))
615
616
  },
616
617
  {
617
- label: 'Old photo',
618
+ label: l('Old photo'),
618
619
  Icon: IconOldPhoto,
619
620
  value: 'old_photo',
620
621
  method: utils_2.canvasOldPhoto,
621
- renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Old photo' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconOldPhoto, {}) })) }), value__)),
622
+ renderIconButton: (value__, selected_, onChangeFilter_) => ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Old photo') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: selected_, onClick: () => onChangeFilter_(value__) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconOldPhoto, {}) })) }), value__)),
622
623
  renderSlider: (value__, filterValuesCopy_, onFilterSliderChange_) => ((0, jsx_runtime_1.jsx)(Slider, Object.assign({ valueDefault: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, value: (filterValuesCopy_ === null || filterValuesCopy_ === void 0 ? void 0 : filterValuesCopy_[value__]) || 0, min: -40, max: 40, precision: 1, marks: [
623
624
  { value: -40, label: '-40' },
624
625
  { value: 0, label: 'No filter' },
@@ -650,10 +651,10 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
650
651
  { label: '16:9', value: 16 / 9 }
651
652
  ];
652
653
  const options = [
653
- filtersOption && { label: 'Filters', value: 'filters', Icon: IconFilters },
654
- cropOption && { label: 'Crop', value: 'crop', Icon: IconCrop },
655
- resizeOption && { label: 'Resize', value: 'resize', Icon: IconResize },
656
- qualityOption && { label: 'Quality', value: 'quality', Icon: IconQuality }
654
+ filtersOption && { label: l('Filters'), value: 'filters', Icon: IconFilters },
655
+ cropOption && { label: l('Crop'), value: 'crop', Icon: IconCrop },
656
+ resizeOption && { label: l('Resize'), value: 'resize', Icon: IconResize },
657
+ qualityOption && { label: l('Quality'), value: 'quality', Icon: IconQuality }
657
658
  ]
658
659
  .filter(Boolean);
659
660
  const MetaTypeProps = {
@@ -739,7 +740,7 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
739
740
  'onesy-ImageEdit-inputs'
740
741
  ],
741
742
  classes.inputs
742
- ]) }, { children: [(0, utils_1.is)('function', renderInput) ? renderInput(value, valueCopy, resize, onChangeResize, 'width') : ((0, jsx_runtime_1.jsx)(NumericTextField, { tonal: tonal, label: 'Width', color: 'default', version: 'text', size: 'small', min: 1, max: value === null || value === void 0 ? void 0 : value.width, valueDefault: value === null || value === void 0 ? void 0 : value.width, value: resize === null || resize === void 0 ? void 0 : resize[0], onChange: (valueNew) => onChangeResize(valueNew) })), (0, utils_1.is)('function', renderInput) ? renderInput(value, valueCopy, resize, onChangeResize, 'height') : ((0, jsx_runtime_1.jsx)(NumericTextField, { tonal: tonal, label: 'Height', color: 'default', version: 'text', size: 'small', min: 1, max: value === null || value === void 0 ? void 0 : value.height, valueDefault: value === null || value === void 0 ? void 0 : value.height, value: resize === null || resize === void 0 ? void 0 : resize[1], onChange: (valueNew) => onChangeResize(valueNew, false) }))] }))), openedOption === 'quality' && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 3, direction: 'row', align: 'center', style: {
743
+ ]) }, { children: [(0, utils_1.is)('function', renderInput) ? renderInput(value, valueCopy, resize, onChangeResize, 'width') : ((0, jsx_runtime_1.jsx)(NumericTextField, { tonal: tonal, name: l('Width'), color: 'default', version: 'text', size: 'small', min: 1, max: value === null || value === void 0 ? void 0 : value.width, valueDefault: value === null || value === void 0 ? void 0 : value.width, value: resize === null || resize === void 0 ? void 0 : resize[0], onChange: (valueNew) => onChangeResize(valueNew) })), (0, utils_1.is)('function', renderInput) ? renderInput(value, valueCopy, resize, onChangeResize, 'height') : ((0, jsx_runtime_1.jsx)(NumericTextField, { tonal: tonal, name: l('Height'), color: 'default', version: 'text', size: 'small', min: 1, max: value === null || value === void 0 ? void 0 : value.height, valueDefault: value === null || value === void 0 ? void 0 : value.height, value: resize === null || resize === void 0 ? void 0 : resize[1], onChange: (valueNew) => onChangeResize(valueNew, false) }))] }))), openedOption === 'quality' && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 3, direction: 'row', align: 'center', style: {
743
744
  width: '100%'
744
745
  } }, { children: [(0, jsx_runtime_1.jsx)(Slider, Object.assign({ valueDefault: quality, value: quality, min: 1, max: 100, precision: 1, marks: [
745
746
  { value: 1 },
@@ -763,7 +764,7 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
763
764
  'onesy-ImageEdit-action'
764
765
  ],
765
766
  classes.action
766
- ]) }, { children: [(0, utils_1.is)('function', renderSave) ? renderSave(onSave) : ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Save' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', onClick: onSave }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconSave, {}) })) }))), (0, utils_1.is)('function', renderCancel) ? renderCancel(onSave) : ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Cancel' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', onClick: onCancel }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconCancel, {}) })) })))] }))] })), (0, jsx_runtime_1.jsx)(Divider, { color: 'inherit', className: (0, style_react_1.classNames)([
767
+ ]) }, { children: [(0, utils_1.is)('function', renderSave) ? renderSave(onSave) : ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Save') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', onClick: onSave }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconSave, {}) })) }))), (0, utils_1.is)('function', renderCancel) ? renderCancel(onSave) : ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Cancel') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', onClick: onCancel }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconCancel, {}) })) })))] }))] })), (0, jsx_runtime_1.jsx)(Divider, { color: 'inherit', className: (0, style_react_1.classNames)([
767
768
  (0, utils_2.staticClassName)('ImageEdit', theme) && [
768
769
  'onesy-ImageEdit-divider'
769
770
  ],
@@ -773,7 +774,7 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
773
774
  'onesy-ImageEdit-options'
774
775
  ],
775
776
  classes.options
776
- ]) }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', justify: 'flex-start' }, { children: [options.map((item, index) => ((0, utils_1.is)('function', renderOption) ? renderOption(item, open && (openOption === item.value), openOption) : ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: item.label }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: open && (openedOption === item.value), onClick: () => openOption(item.value) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(item.Icon, {}) })) }), index)))), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [downloadOption && (0, utils_1.is)('function', renderDownload) ? renderDownload(onDownload) : ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Download' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'text', onClick: onDownload }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconDownload, {}) })) }))), (0, utils_1.is)('function', renderOptionClear) ? renderOptionClear(onReset) : ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: 'Reset' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'text', onClick: onReset }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconClear, {}) })) })))] }))] })) }))] }), children, meta && value && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Divider, { color: 'inherit', className: (0, style_react_1.classNames)([
777
+ ]) }, { children: (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', justify: 'flex-start' }, { children: [options.map((item, index) => ((0, utils_1.is)('function', renderOption) ? renderOption(item, open && (openOption === item.value), openOption) : ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: item.label }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'outlined', selected: open && (openedOption === item.value), onClick: () => openOption(item.value) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(item.Icon, {}) })) }), index)))), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center' }, { children: [downloadOption && (0, utils_1.is)('function', renderDownload) ? renderDownload(onDownload) : ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Download') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'text', onClick: onDownload }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconDownload, {}) })) }))), (0, utils_1.is)('function', renderOptionClear) ? renderOptionClear(onReset) : ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: l('Reset') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ version: 'text', onClick: onReset }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconClear, {}) })) })))] }))] })) }))] }), children, meta && value && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Divider, { color: 'inherit', className: (0, style_react_1.classNames)([
777
778
  (0, utils_2.staticClassName)('ImageEdit', theme) && [
778
779
  'onesy-ImageEdit-divider'
779
780
  ],
@@ -783,7 +784,7 @@ const ImageEdit = react_1.default.forwardRef((props_, ref) => {
783
784
  'onesy-ImageEdit-meta'
784
785
  ],
785
786
  classes.meta
786
- ]) }, { children: [(0, jsx_runtime_1.jsxs)(Type, Object.assign({}, MetaTypeProps, { children: ["Dimensions: ", (_a = (!open ? value : valueCopy)) === null || _a === void 0 ? void 0 : _a.width, "x", (_b = (!open ? value : valueCopy)) === null || _b === void 0 ? void 0 : _b.height] })), (0, jsx_runtime_1.jsx)(Type, Object.assign({}, MetaTypeProps, { children: "\u00B7" })), (0, jsx_runtime_1.jsxs)(Type, Object.assign({}, MetaTypeProps, { children: ["Size: ", size] }))] }))] })] })));
787
+ ]) }, { children: [(0, jsx_runtime_1.jsxs)(Type, Object.assign({}, MetaTypeProps, { children: [l('Dimensions'), ": ", (_a = (!open ? value : valueCopy)) === null || _a === void 0 ? void 0 : _a.width, "x", (_b = (!open ? value : valueCopy)) === null || _b === void 0 ? void 0 : _b.height] })), (0, jsx_runtime_1.jsx)(Type, Object.assign({}, MetaTypeProps, { children: "\u00B7" })), (0, jsx_runtime_1.jsxs)(Type, Object.assign({}, MetaTypeProps, { children: [l('Size'), ": ", size] }))] }))] })] })));
787
788
  });
788
789
  ImageEdit.displayName = 'onesy-ImageEdit';
789
790
  exports.default = ImageEdit;
package/Info/Info.js CHANGED
@@ -41,6 +41,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
41
41
  }), { name: 'onesy-Info' });
42
42
  const Info = react_1.default.forwardRef((props_, ref) => {
43
43
  const theme = (0, style_react_1.useOnesyTheme)();
44
+ const l = theme.l;
44
45
  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.onesyInfo) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
45
46
  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]);
46
47
  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,7 +61,7 @@ const Info = react_1.default.forwardRef((props_, ref) => {
60
61
  ],
61
62
  className,
62
63
  classes.root
63
- ]) }, other, { children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: name !== undefined ? name : 'Info' }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({}, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(Icon, Object.assign({}, IconProps)) })) })) }) })));
64
+ ]) }, other, { children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: name !== undefined ? name : l('Info') }, TooltipProps, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({}, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(Icon, Object.assign({}, IconProps)) })) })) }) })));
64
65
  });
65
66
  Info.displayName = 'onesy-Info';
66
67
  exports.default = Info;
package/Links/Links.d.ts CHANGED
@@ -14,6 +14,8 @@ export type ILinks = IBaseElement & {
14
14
  links?: ILinksItem[];
15
15
  cover?: IMediaObject;
16
16
  profile?: IMediaObject;
17
+ sensitiveText?: any;
18
+ sensitiveDescription?: any;
17
19
  share?: boolean;
18
20
  start?: any;
19
21
  end?: any;
package/Links/Links.js CHANGED
@@ -85,6 +85,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
85
85
  }), { name: 'onesy-Links' });
86
86
  const Element = react_1.default.forwardRef((props_, ref) => {
87
87
  const theme = (0, style_react_1.useOnesyTheme)();
88
+ const l = theme.l;
88
89
  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.onesyLinks) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
89
90
  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]);
90
91
  const Section = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Section) || Section_1.default; }, [theme]);
@@ -95,17 +96,17 @@ const Element = react_1.default.forwardRef((props_, ref) => {
95
96
  const MenuItem = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.MenuItem) || MenuItem_1.default; }, [theme]);
96
97
  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]);
97
98
  const { classes } = useStyle();
98
- const { name, short_description, cover, profile, links, share = true, start, end, IconMore = IconMaterialMoreVertW100_1.default, IconShare = IconMaterialShareW100_1.default, ShareProps, ItemShareProps, IconButtonProps, IconProps, NameProps, ShortDescriptionProps, LinkProps, LinkTypeProps, className } = props, other = __rest(props, ["name", "short_description", "cover", "profile", "links", "share", "start", "end", "IconMore", "IconShare", "ShareProps", "ItemShareProps", "IconButtonProps", "IconProps", "NameProps", "ShortDescriptionProps", "LinkProps", "LinkTypeProps", "className"]);
99
+ const { name, short_description, cover, profile, links, share = true, start, end, sensitiveText = l('Sensitive URL'), sensitiveDescription = l('This is URL might contain sensitive information, confirm you are 18+ to continue.'), IconMore = IconMaterialMoreVertW100_1.default, IconShare = IconMaterialShareW100_1.default, ShareProps, ItemShareProps, IconButtonProps, IconProps, NameProps, ShortDescriptionProps, LinkProps, LinkTypeProps, className } = props, other = __rest(props, ["name", "short_description", "cover", "profile", "links", "share", "start", "end", "sensitiveText", "sensitiveDescription", "IconMore", "IconShare", "ShareProps", "ItemShareProps", "IconButtonProps", "IconProps", "NameProps", "ShortDescriptionProps", "LinkProps", "LinkTypeProps", "className"]);
99
100
  const confirm = (0, Confirm_1.useConfirm)();
100
101
  const onOpenLink = react_1.default.useCallback(async (item) => {
101
102
  const confirmed = (item.sensitivity && !['none'].includes(item.sensitivity)) ? await confirm.open({
102
- name: 'Sensitive URL',
103
- description: `This is URL might contain sensitive information, confirm you are 18+ to continue.`
103
+ name: sensitiveText,
104
+ description: sensitiveDescription
104
105
  }) : true;
105
106
  if (confirmed) {
106
107
  window.open(item.url, 'blank');
107
108
  }
108
- }, []);
109
+ }, [sensitiveText, sensitiveDescription]);
109
110
  return ((0, jsx_runtime_1.jsxs)(Section, Object.assign({ ref: ref, gap: 2, align: 'center', maxWidth: false, padding: false, fullWidth: true, className: (0, style_react_1.classNames)([
110
111
  (0, utils_2.staticClassName)('Links', theme) && [
111
112
  'onesy-Links-root'
@@ -140,8 +141,8 @@ const Element = react_1.default.forwardRef((props_, ref) => {
140
141
  LinkProps === null || LinkProps === void 0 ? void 0 : LinkProps.className,
141
142
  (_a = item.props) === null || _a === void 0 ? void 0 : _a.className,
142
143
  classes.link
143
- ]) }, { children: (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b1', weight: 300 }, LinkTypeProps, { children: item.name || 'Link' })) })), (0, jsx_runtime_1.jsx)(Menu, Object.assign({ menuItems: [
144
- (0, jsx_runtime_1.jsx)(MenuItem, { start: ((0, jsx_runtime_1.jsx)(IconShare, Object.assign({ size: 'small' }, IconProps))), startAlign: 'center', primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: "Share" }))), menu: item.share ? ((0, jsx_runtime_1.jsx)(Share, Object.assign({ version: 'menu-items', name: item.name, url: item.url, exclude: ['print'] }, ItemShareProps, { ListItemProps: Object.assign({ size: 'small', noBackground: true }, ItemShareProps === null || ItemShareProps === void 0 ? void 0 : ItemShareProps.ListItemProps) }))) : undefined, MenuProps: {
144
+ ]) }, { children: (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b1', weight: 300 }, LinkTypeProps, { children: item.name || l('Link') })) })), (0, jsx_runtime_1.jsx)(Menu, Object.assign({ menuItems: [
145
+ (0, jsx_runtime_1.jsx)(MenuItem, { start: ((0, jsx_runtime_1.jsx)(IconShare, Object.assign({ size: 'small' }, IconProps))), startAlign: 'center', primary: ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: l('Share') }))), menu: item.share ? ((0, jsx_runtime_1.jsx)(Share, Object.assign({ version: 'menu-items', name: item.name, url: item.url, exclude: ['print'] }, ItemShareProps, { ListItemProps: Object.assign({ size: 'small', noBackground: true }, ItemShareProps === null || ItemShareProps === void 0 ? void 0 : ItemShareProps.ListItemProps) }))) : undefined, MenuProps: {
145
146
  ListProps: {
146
147
  noChildrenTransform: true
147
148
  }
package/Medias/Medias.js CHANGED
@@ -151,6 +151,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
151
151
  const Medias = react_1.default.forwardRef((props_, ref) => {
152
152
  var _a, _b, _c;
153
153
  const theme = (0, style_react_1.useOnesyTheme)();
154
+ const l = theme.l;
154
155
  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.onesyMedias) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
155
156
  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]);
156
157
  const Link = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Link) || Link_1.default; }, [theme]);
@@ -275,7 +276,7 @@ const Medias = react_1.default.forwardRef((props_, ref) => {
275
276
  ],
276
277
  NameProps === null || NameProps === void 0 ? void 0 : NameProps.className,
277
278
  classes.name
278
- ]) }, { children: (media === null || media === void 0 ? void 0 : media.name) || 'No name' })));
279
+ ]) }, { children: (media === null || media === void 0 ? void 0 : media.name) || l('No name') })));
279
280
  if (version === 'embed') {
280
281
  return getLink(media, index);
281
282
  }
@@ -128,7 +128,6 @@ const MenuDesktop = react_1.default.forwardRef((props_, ref) => {
128
128
  const [openItem, setOpenItem] = react_1.default.useState();
129
129
  const [focus, setFocus] = react_1.default.useState();
130
130
  const [append, setAppend] = react_1.default.useState();
131
- const [menuOpened, setMenuOpened] = react_1.default.useState();
132
131
  const [menu, setMenu] = react_1.default.useState();
133
132
  const refs = {
134
133
  root: react_1.default.useRef(undefined),
@@ -401,8 +400,7 @@ const MenuDesktop = react_1.default.forwardRef((props_, ref) => {
401
400
  'onesy-MenuDesktop-menu-wrapper'
402
401
  ],
403
402
  WrapperMenuProps === null || WrapperMenuProps === void 0 ? void 0 : WrapperMenuProps.className,
404
- classes.menuWrapper,
405
- menuOpened && classes.menuWrapper_open
403
+ classes.menuWrapper
406
404
  ]), style: Object.assign(Object.assign({}, append), WrapperMenuProps === null || WrapperMenuProps === void 0 ? void 0 : WrapperMenuProps.style) }, { children: [menu && menuTransition && ((0, jsx_runtime_1.jsx)(Transitions, Object.assign({ switch: true, mode: 'in-out-follow' }, { children: (0, jsx_runtime_1.jsx)(Transition, { children: (status) => {
407
405
  var _a, _b;
408
406
  return (react_1.default.cloneElement(menu, {
@@ -232,7 +232,7 @@ const NavigationItem = react_1.default.forwardRef((props_, ref) => {
232
232
  ]);
233
233
  }
234
234
  const Icon = (selected && iconSelected) || icon;
235
- return ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ label: label || value, position: 'top', alignment: 'center', longPress: true, touch: false, hover: false, focus: false }, TooltipProps, { children: (0, jsx_runtime_1.jsx)("span", Object.assign({ tabIndex: !disabled ? 0 : undefined, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onTouchStart: onTouchStart, onMouseDown: onMouseDown, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, className: (0, style_react_1.classNames)([
235
+ return ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: label || value, position: 'top', alignment: 'center', longPress: true, touch: false, hover: false, focus: false }, TooltipProps, { children: (0, jsx_runtime_1.jsx)("span", Object.assign({ tabIndex: !disabled ? 0 : undefined, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onTouchStart: onTouchStart, onMouseDown: onMouseDown, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, className: (0, style_react_1.classNames)([
236
236
  (0, utils_2.staticClassName)('NavigationItem', theme) && [
237
237
  'onesy-NavigationItem-root',
238
238
  selected && 'onesy-NavigationItem-selected',
@@ -7,6 +7,7 @@ export type INotFound = ISection & {
7
7
  link?: string;
8
8
  start?: any;
9
9
  end?: any;
10
+ buttonText?: any;
10
11
  renderButton?: (props: any) => any;
11
12
  fullHeight?: any;
12
13
  ButtonProps?: any;
@@ -31,11 +31,12 @@ const useStyle = (0, style_react_1.style)(theme => ({
31
31
  }), { name: 'onesy-NotFound' });
32
32
  const NotFound = react_1.default.forwardRef((props_, ref) => {
33
33
  const theme = (0, style_react_1.useOnesyTheme)();
34
+ const l = theme.l;
34
35
  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.onesyNotFound) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
35
36
  const Section = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Section) || Section_1.default; }, [theme]);
36
37
  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]);
37
38
  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]);
38
- const { name = 'Page not found 🫠', to = '/', link = '', renderButton, fullHeight, start, end, ButtonProps, TypeProps, className } = props, other = __rest(props, ["name", "to", "link", "renderButton", "fullHeight", "start", "end", "ButtonProps", "TypeProps", "className"]);
39
+ const { name = l('Page not found'), to = '/', link = '', renderButton, fullHeight, start, end, buttonText = l('Back'), ButtonProps, TypeProps, className } = props, other = __rest(props, ["name", "to", "link", "renderButton", "fullHeight", "start", "end", "buttonText", "ButtonProps", "TypeProps", "className"]);
39
40
  const { classes } = useStyle();
40
41
  const navigate = (0, utils_1.isEnvironment)('browser') && (0, react_router_dom_1.useNavigate)();
41
42
  const onTo = react_1.default.useCallback(() => {
@@ -62,7 +63,7 @@ const NotFound = react_1.default.forwardRef((props_, ref) => {
62
63
  ],
63
64
  ButtonProps === null || ButtonProps === void 0 ? void 0 : ButtonProps.className,
64
65
  classes.button
65
- ]) }, { children: "Back" }))), end] })));
66
+ ]) }, { children: buttonText }))), end] })));
66
67
  });
67
68
  NotFound.displayName = 'onesy-NotFound';
68
69
  exports.default = NotFound;
package/Page/Page.js CHANGED
@@ -45,6 +45,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
45
45
  }), { name: 'onesy' });
46
46
  const Page = react_1.default.forwardRef((props_, ref) => {
47
47
  const theme = (0, style_react_1.useOnesyTheme)();
48
+ const l = theme.l;
48
49
  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.onesyPage) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
49
50
  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]);
50
51
  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]);
@@ -56,7 +57,7 @@ const Page = react_1.default.forwardRef((props_, ref) => {
56
57
  const IconButtonProps = {
57
58
  color: 'inherit'
58
59
  };
59
- const navigation = (back || forward) && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ direction: 'row', align: 'center', justify: 'space-between', fullWidth: true }, { children: [back ? ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: ((back === null || back === void 0 ? void 0 : back.name) !== undefined ? back.name : back === null || back === void 0 ? void 0 : back.label) || 'Back' }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => navigate(back === null || back === void 0 ? void 0 : back.to) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconBack, {}) })) }))) : (0, jsx_runtime_1.jsx)("span", {}), forward ? ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: ((forward === null || forward === void 0 ? void 0 : forward.name) !== undefined ? forward.name : forward === null || forward === void 0 ? void 0 : forward.label) || 'Forward' }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => navigate(forward === null || forward === void 0 ? void 0 : forward.to) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconForward, {}) })) }))) : (0, jsx_runtime_1.jsx)("span", {})] })));
60
+ const navigation = (back || forward) && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ direction: 'row', align: 'center', justify: 'space-between', fullWidth: true }, { children: [back ? ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: ((back === null || back === void 0 ? void 0 : back.name) !== undefined ? back.name : back === null || back === void 0 ? void 0 : back.label) || l('Back') }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => navigate(back === null || back === void 0 ? void 0 : back.to) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconBack, {}) })) }))) : (0, jsx_runtime_1.jsx)("span", {}), forward ? ((0, jsx_runtime_1.jsx)(Tooltip, Object.assign({ name: ((forward === null || forward === void 0 ? void 0 : forward.name) !== undefined ? forward.name : forward === null || forward === void 0 ? void 0 : forward.label) || l('Forward') }, { children: (0, jsx_runtime_1.jsx)(IconButton, Object.assign({ onClick: () => navigate(forward === null || forward === void 0 ? void 0 : forward.to) }, IconButtonProps, { children: (0, jsx_runtime_1.jsx)(IconForward, {}) })) }))) : (0, jsx_runtime_1.jsx)("span", {})] })));
60
61
  const header = !noHeader && (navigation || name) && ((0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 2, direction: 'column', fullWidth: true }, { children: [navigation, (0, jsx_runtime_1.jsx)(Line, Object.assign({ gap: 0, direction: 'row', align: 'center', justify: 'center', fullWidth: true }, { children: (0, utils_1.is)('string', name) ? ((0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 't1', color: 'inherit', align: 'center', className: classes.name }, { children: name }))) : name }))] })));
61
62
  return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({ ref: ref, gap: 4, direction: 'column', justify: 'unset', align: 'unset', fullWidth: true, flex: true, className: (0, style_react_1.classNames)([
62
63
  (0, utils_2.staticClassName)('Page', theme) && [
@@ -58,6 +58,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
58
58
  }), { name: 'onesy-PieChart' });
59
59
  const PieChart = react_1.default.forwardRef((props_, ref) => {
60
60
  const theme = (0, style_react_1.useOnesyTheme)();
61
+ const l = theme.l;
61
62
  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.onesyPieChart) === null || _g === void 0 ? void 0 : _g.props) === null || _h === void 0 ? void 0 : _h.default), props_)); }, [props_]);
62
63
  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]);
63
64
  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]);
@@ -120,7 +121,7 @@ const PieChart = react_1.default.forwardRef((props_, ref) => {
120
121
  // normalized in rect width, height values
121
122
  // invert y so 0, 0 is at bottom left
122
123
  if (refs.rects.current && values) {
123
- const { width, height } = refs.rects.current.wrapper;
124
+ const { width } = refs.rects.current.wrapper;
124
125
  // Legend
125
126
  const legend_ = values.map((item) => {
126
127
  return {
@@ -251,9 +252,9 @@ const PieChart = react_1.default.forwardRef((props_, ref) => {
251
252
  background: !refs.theme.current.palette.color[color_] ? color_ : refs.theme.current.palette.color[color_][tone]
252
253
  } }), (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: name }))] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.4, direction: 'column' }, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3', style: {
253
254
  fontWeight: 600
254
- } }, { children: (names === null || names === void 0 ? void 0 : names.value) || 'Value' })), (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: valueValue }))] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3', style: {
255
+ } }, { children: (names === null || names === void 0 ? void 0 : names.value) || l('Value') })), (0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3' }, { children: valueValue }))] })), (0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 1, direction: 'row', align: 'center' }, { children: [(0, jsx_runtime_1.jsx)(Type, Object.assign({ version: 'b3', style: {
255
256
  fontWeight: 600
256
- } }, { children: (names === null || names === void 0 ? void 0 : names.percentage) || 'Percentage' })), (0, jsx_runtime_1.jsxs)(Type, Object.assign({ version: 'b3' }, { children: [valuePercentage, "%"] }))] }))] }))] })))
257
+ } }, { children: (names === null || names === void 0 ? void 0 : names.percentage) || l('Percentage') })), (0, jsx_runtime_1.jsxs)(Type, Object.assign({ version: 'b3' }, { children: [valuePercentage, "%"] }))] }))] }))] })))
257
258
  };
258
259
  };
259
260
  return ((0, jsx_runtime_1.jsx)(Chart, Object.assign({ ref: item => {