@pushwoosh/dumb-components 1.1.134 → 1.1.136

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 (217) hide show
  1. package/AccessForbidden/AccessForbidden.js +19 -5
  2. package/AccessForbidden/polyglot/index.d.ts +2 -0
  3. package/AccessForbidden/polyglot/index.js +10 -0
  4. package/AccessForbidden/polyglot/messages_en.d.ts +3 -0
  5. package/AccessForbidden/polyglot/messages_en.js +4 -0
  6. package/AccessForbidden/polyglot/messages_ru.d.ts +3 -0
  7. package/AccessForbidden/polyglot/messages_ru.js +4 -0
  8. package/AccessForbidden/polyglot/types.d.ts +5 -0
  9. package/AccessForbidden/polyglot/types.js +1 -0
  10. package/Alert/Alert.d.ts +1 -2
  11. package/Alert/Alert.js +31 -25
  12. package/ApplicationPreloader/ApplicationPreloader.d.ts +1 -2
  13. package/ApplicationPreloader/ApplicationPreloader.js +5 -4
  14. package/Badge/Badge.js +2 -2
  15. package/Banner/Banner.js +40 -24
  16. package/Button/Button.js +20 -9
  17. package/Button/RemoveButton.js +7 -6
  18. package/Calendar/CalendarDropdown/CalendarDropdown.js +121 -108
  19. package/Calendar/CalendarMonth/CalendarMonth.js +68 -66
  20. package/Calendar/CalendarMonthSlider/CalendarMonthSlider.d.ts +2 -2
  21. package/Calendar/CalendarMonthSlider/CalendarMonthSlider.js +68 -55
  22. package/Calendar/CalendarSuperForm/CalendarSuperForm.js +75 -70
  23. package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.d.ts +2 -2
  24. package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.js +3 -2
  25. package/Calendar/CalendarSuperForm/components/CalendarTimeAndTimezoneSection/CalendarTimeAndTimezoneSection.js +106 -88
  26. package/Calendar/CalendarSuperForm/components/CalendarTimeInput.d.ts +1 -2
  27. package/Calendar/CalendarSuperForm/components/CalendarTimeInput.js +2 -2
  28. package/Calendar/CalendarSuperForm/components/CalendarTimezoneSelect.js +3 -2
  29. package/CardMetric/CardChildren.js +9 -6
  30. package/CardMetric/CardCollapse.js +8 -6
  31. package/CardMetric/CardMetric.js +52 -33
  32. package/Checkbox/Checkbox.js +30 -24
  33. package/Chip/Chip.d.ts +6 -7
  34. package/Chip/Chip.js +22 -15
  35. package/CodeEditor/CodeEditor.d.ts +1 -2
  36. package/CodeEditor/CodeEditor.js +2 -2
  37. package/CrashScreen/CrashScreen.js +19 -6
  38. package/CrashScreen/polyglot/index.d.ts +2 -0
  39. package/CrashScreen/polyglot/index.js +10 -0
  40. package/CrashScreen/polyglot/messages_en.d.ts +3 -0
  41. package/CrashScreen/polyglot/messages_en.js +4 -0
  42. package/CrashScreen/polyglot/messages_ru.d.ts +3 -0
  43. package/CrashScreen/polyglot/messages_ru.js +4 -0
  44. package/CrashScreen/polyglot/types.d.ts +5 -0
  45. package/CrashScreen/polyglot/types.js +1 -0
  46. package/DateTimePicker/components/AutosizeInput/AutosizeInput.js +17 -13
  47. package/DateTimePicker/components/DatePicker/DatePicker.js +35 -32
  48. package/DateTimePicker/components/DatePickerField/DatePickerField.js +32 -22
  49. package/DateTimePicker/components/DateTimePicker/DateTimePicker.js +22 -20
  50. package/DateTimePicker/components/DateTimePickerField/DateTimePickerField.js +30 -22
  51. package/DateTimePicker/components/DecadeView/DecadeView.js +19 -17
  52. package/DateTimePicker/components/Input/Input.js +2 -2
  53. package/DateTimePicker/components/Month/Month.js +52 -21
  54. package/DateTimePicker/components/MonthView/MonthView.js +21 -17
  55. package/DateTimePicker/components/NumberPicker/NumberPicker.js +49 -40
  56. package/DateTimePicker/components/PickerPlate/PickerPlate.js +17 -14
  57. package/DateTimePicker/components/YearView/YearView.js +22 -18
  58. package/DateTimePicker/polyglot/index.d.ts +2 -0
  59. package/DateTimePicker/polyglot/index.js +9 -0
  60. package/DateTimePicker/polyglot/messages_en.d.ts +3 -0
  61. package/DateTimePicker/polyglot/messages_en.js +11 -0
  62. package/DateTimePicker/polyglot/messages_ru.d.ts +3 -0
  63. package/DateTimePicker/polyglot/messages_ru.js +11 -0
  64. package/DateTimePicker/polyglot/types.d.ts +12 -0
  65. package/DateTimePicker/polyglot/types.js +1 -0
  66. package/Drawer/components/Drawer/Drawer.js +18 -13
  67. package/Drawer/components/Drawer/styles.d.ts +2 -2
  68. package/Drawer/components/Drawer/styles.js +5 -4
  69. package/Drawer/components/DrawerDocs/DrawerDocs.js +28 -17
  70. package/Drawer/polyglot/index.d.ts +2 -0
  71. package/Drawer/polyglot/index.js +10 -0
  72. package/Drawer/polyglot/messages_en.d.ts +3 -0
  73. package/Drawer/polyglot/messages_en.js +4 -0
  74. package/Drawer/polyglot/messages_ru.d.ts +3 -0
  75. package/Drawer/polyglot/messages_ru.js +4 -0
  76. package/Drawer/polyglot/types.d.ts +5 -0
  77. package/Drawer/polyglot/types.js +1 -0
  78. package/DropdownMenu/components/DropdownMenu/DropdownMenu.js +28 -24
  79. package/DropdownMenu/components/DropdownMenuButton/DropdownMenuButton.js +8 -6
  80. package/DropdownMenu/components/DropdownMenuItem/DropdownMenuItem.js +6 -4
  81. package/DropdownMenu/components/DropdownMenuSection/DropdownMenuSection.js +13 -10
  82. package/DropdownMenu/components/DropdownMenuSubmenu/DropdownMenuSubmenu.js +40 -31
  83. package/EditableField/EditableField.js +56 -39
  84. package/EditableField/polyglot/index.d.ts +2 -0
  85. package/EditableField/polyglot/index.js +9 -0
  86. package/EditableField/polyglot/messages_en.d.ts +3 -0
  87. package/EditableField/polyglot/messages_en.js +4 -0
  88. package/EditableField/polyglot/messages_ru.d.ts +3 -0
  89. package/EditableField/polyglot/messages_ru.js +4 -0
  90. package/EditableField/polyglot/types.d.ts +5 -0
  91. package/EditableField/polyglot/types.js +1 -0
  92. package/EmailTemplatePreview/EmailTemplatePreview.js +10 -8
  93. package/EmailTemplatePreview/components/NoEmailTemplatePreview/NoEmailTemplatePreview.js +30 -16
  94. package/EmailTemplatePreview/polyglot/index.d.ts +2 -0
  95. package/EmailTemplatePreview/polyglot/index.js +10 -0
  96. package/EmailTemplatePreview/polyglot/messages_en.d.ts +3 -0
  97. package/EmailTemplatePreview/polyglot/messages_en.js +5 -0
  98. package/EmailTemplatePreview/polyglot/messages_ru.d.ts +3 -0
  99. package/EmailTemplatePreview/polyglot/messages_ru.js +5 -0
  100. package/EmailTemplatePreview/polyglot/types.d.ts +6 -0
  101. package/EmailTemplatePreview/polyglot/types.js +1 -0
  102. package/EnhancedInput/EnhancedInput.d.ts +3 -4
  103. package/EnhancedInput/EnhancedInput.js +14 -10
  104. package/EnhancedInput/SearchInput.js +3 -3
  105. package/ExportResult/ExportResult.js +33 -23
  106. package/ExternalImagePreview/ExternalImagePreview.js +24 -20
  107. package/FieldBox/FieldBox.js +50 -37
  108. package/FrequencyCapping/FrequencyCappingEdit.js +41 -33
  109. package/FrequencyCapping/FrequencyCappingInApps.js +41 -33
  110. package/FrequencyCapping/FrequencyCappingReadonly.d.ts +1 -2
  111. package/FrequencyCapping/FrequencyCappingReadonly.js +24 -20
  112. package/FrequencyCapping/components/Condition/index.d.ts +1 -2
  113. package/FrequencyCapping/components/Condition/index.js +24 -20
  114. package/FrequencyCapping/components/Description/index.d.ts +2 -2
  115. package/FrequencyCapping/components/Description/index.js +7 -5
  116. package/FrequencyCapping/components/Settings/EditCappingSettings.js +28 -20
  117. package/FrequencyCapping/components/Settings/EditInAppCappingSettings.js +86 -71
  118. package/FrequencyCapping/helpers/getReadonlyCappingHelpers.d.ts +1 -2
  119. package/FrequencyCapping/helpers/getReadonlyCappingHelpers.js +41 -32
  120. package/GetStartedPage/GetStartedPage.js +44 -25
  121. package/InputFile/InputFile.js +44 -35
  122. package/Link/Link.js +2 -2
  123. package/Modal/components/Modal/Modal.js +17 -12
  124. package/Modal/components/Modal/styles.js +5 -4
  125. package/Modal/components/ModalConfirm/ModalConfirm.js +51 -24
  126. package/Modal/components/ModalConfirm/ModalConfirmProvider.d.ts +2 -2
  127. package/Modal/components/ModalConfirm/ModalConfirmProvider.js +8 -6
  128. package/Modal/components/ModalConfirm/types.d.ts +1 -1
  129. package/Modal/components/ModalTitle/ModalTitle.js +10 -8
  130. package/Modal/polyglot/index.d.ts +2 -0
  131. package/Modal/polyglot/index.js +9 -0
  132. package/Modal/polyglot/messages_en.d.ts +3 -0
  133. package/Modal/polyglot/messages_en.js +6 -0
  134. package/Modal/polyglot/messages_ru.d.ts +3 -0
  135. package/Modal/polyglot/messages_ru.js +6 -0
  136. package/Modal/polyglot/types.d.ts +7 -0
  137. package/Modal/polyglot/types.js +1 -0
  138. package/NotificationInbox/NotificationBar.js +19 -11
  139. package/NotificationInbox/NotificationBell.js +21 -12
  140. package/NotificationInbox/NotificationInbox.js +160 -105
  141. package/NotificationInbox/polyglot/index.d.ts +2 -0
  142. package/NotificationInbox/polyglot/index.js +10 -0
  143. package/NotificationInbox/polyglot/messages_en.d.ts +3 -0
  144. package/NotificationInbox/polyglot/messages_en.js +8 -0
  145. package/NotificationInbox/polyglot/messages_ru.d.ts +3 -0
  146. package/NotificationInbox/polyglot/messages_ru.js +8 -0
  147. package/NotificationInbox/polyglot/types.d.ts +11 -0
  148. package/NotificationInbox/polyglot/types.js +1 -0
  149. package/NumberPicker/NumberPicker.js +53 -44
  150. package/NumberPicker/components/AutosizeInput/AutosizeInput.js +19 -15
  151. package/PageHeader/components/AutosizeInput/AutosizeInput.js +30 -22
  152. package/PageHeader/components/PageHeader/PageHeader.js +44 -27
  153. package/PageHeader/components/PageHeaderEditable/PageHeaderEditable.js +51 -34
  154. package/PageHeader/components/PageHeaderError/PageHeaderError.js +17 -10
  155. package/PageHeader/components/PageHeaderSkeleton/PageHeaderSkeleton.js +20 -16
  156. package/Pagination/Pagination.js +60 -49
  157. package/Popover/Popover.js +6 -5
  158. package/ProgressBar/ProgressBar.js +25 -10
  159. package/PushPreview/PushPreview.js +30 -22
  160. package/PushPreview/components/MissedContentPreview/MissedContentPreview.js +23 -11
  161. package/PushPreview/components/SilentPushPreview/SilentPushPreview.js +20 -13
  162. package/PushPreview/polyglot/index.d.ts +2 -0
  163. package/PushPreview/polyglot/index.js +9 -0
  164. package/PushPreview/polyglot/messages_en.d.ts +3 -0
  165. package/PushPreview/polyglot/messages_en.js +4 -0
  166. package/PushPreview/polyglot/messages_ru.d.ts +3 -0
  167. package/PushPreview/polyglot/messages_ru.js +4 -0
  168. package/PushPreview/polyglot/types.d.ts +5 -0
  169. package/PushPreview/polyglot/types.js +1 -0
  170. package/Radio/Radio.js +32 -26
  171. package/RadioCard/RadioCard.js +17 -9
  172. package/ReCaptcha/ReCaptcha.js +2 -2
  173. package/RichMessageEditor/EditorEmojiPicker.js +9 -7
  174. package/RichMessageEditor/RichMessageEditor.js +77 -67
  175. package/RichMessageEditor/RichMessageViewer.js +19 -13
  176. package/RichMessageEditor/slate/DynamicContentElement.d.ts +1 -2
  177. package/RichMessageEditor/slate/DynamicContentElement.js +13 -9
  178. package/RichMessageEditor/slate/SlateEditor.js +9 -7
  179. package/RichmediaPreview/RichmediaPreview.js +13 -11
  180. package/Select/Select.js +10 -8
  181. package/SendRate/SendRateEdit.d.ts +1 -2
  182. package/SendRate/SendRateEdit.js +42 -34
  183. package/SendRate/SendRateReadonly.d.ts +1 -2
  184. package/SendRate/SendRateReadonly.js +24 -20
  185. package/SendRate/components/Condition/index.d.ts +1 -2
  186. package/SendRate/components/Condition/index.js +15 -13
  187. package/SendRate/components/Description/index.d.ts +2 -2
  188. package/SendRate/components/Description/index.js +30 -22
  189. package/SendRate/components/Settings/index.d.ts +1 -2
  190. package/SendRate/components/Settings/index.js +20 -14
  191. package/SendRate/helpers/getReadonlySendRateHelpers.d.ts +1 -2
  192. package/SendRate/helpers/getReadonlySendRateHelpers.js +39 -30
  193. package/Skeleton/TextSkeleton.js +5 -4
  194. package/SortButton/SortButton.js +11 -7
  195. package/Spinner/Spinner.js +7 -4
  196. package/StatisticCard/StatisticCard.js +44 -29
  197. package/Switch/Switch.js +16 -13
  198. package/Tabs/components/Tab/Tab.d.ts +3 -4
  199. package/Tabs/components/Tab/Tab.js +6 -4
  200. package/Tabs/components/TabBar/TabBar.d.ts +3 -4
  201. package/Tabs/components/TabBar/TabBar.js +12 -4
  202. package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.d.ts +1 -2
  203. package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.js +27 -21
  204. package/Tabs/components/TabBase/TabBase.d.ts +3 -4
  205. package/Tabs/components/TabBase/TabBase.js +11 -6
  206. package/Tabs/components/TabPanel/TabPanel.js +4 -2
  207. package/Tabs/components/Tabs/Tabs.js +8 -4
  208. package/Toast/Toast.js +31 -18
  209. package/Toast/ToastProvider.d.ts +2 -3
  210. package/Toast/ToastProvider.js +10 -8
  211. package/Tooltip/Tooltip.js +2 -2
  212. package/Tooltip/TooltipTrigger.js +13 -11
  213. package/package.json +2 -2
  214. package/polyglot/__tests__/render.test.js +46 -16
  215. package/polyglot/liquid/render.d.ts +2 -2
  216. package/polyglot/liquid/render.js +7 -6
  217. package/polyglot/react.js +7 -5
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
1
  import { type SendRateReadonlyProps, type SendRateBase } from './types';
3
- export declare function SendRateReadonly<T extends SendRateBase>({ sendRate, globalSendRate, applicationCode, editGlobalClicked, }: SendRateReadonlyProps<T>): React.JSX.Element;
2
+ export declare function SendRateReadonly<T extends SendRateBase>({ sendRate, globalSendRate, applicationCode, editGlobalClicked, }: SendRateReadonlyProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
3
3
  import { OpenIcon } from '@pushwoosh/kit-icons';
4
4
  import { Link } from '../Link';
@@ -18,23 +18,27 @@ export function SendRateReadonly({
18
18
  const isGlobalSendRateDisabled = globalSendRate.count === 0 && globalSendRate.seconds === 0;
19
19
  const globalSendRateLinkText = getGlobalSendRateLinkText(lang, isGlobalSendRateDisabled);
20
20
  const label = getReadonlySendRateLabel(sendRate, isGlobalSendRateDisabled, globalSendRate, lang);
21
- return React.createElement(Vertical, {
22
- "$gap": 24
23
- }, React.createElement(Horizontal, {
24
- "$gap": 8,
25
- "$justifyContent": "start",
26
- "$alignItems": "center"
27
- }, label, policy === 'GLOBAL' && React.createElement(Link, {
28
- href: `/applications/${applicationCode}/message-delivery?tab=sendRate`,
29
- title: globalSendRateLinkText,
30
- target: "_blank",
31
- onClick: editGlobalClicked
32
- }, React.createElement(Horizontal, {
33
- "$gap": 4,
34
- "$justifyContent": "start",
35
- "$alignItems": "center"
36
- }, globalSendRateLinkText, React.createElement(OpenIcon, {
37
- size: "small",
38
- view: "lined"
39
- })))));
21
+ return _jsx(Vertical, {
22
+ "$gap": 24,
23
+ children: _jsxs(Horizontal, {
24
+ "$gap": 8,
25
+ "$justifyContent": "start",
26
+ "$alignItems": "center",
27
+ children: [label, policy === 'GLOBAL' && _jsx(Link, {
28
+ href: `/applications/${applicationCode}/message-delivery?tab=sendRate`,
29
+ title: globalSendRateLinkText,
30
+ target: "_blank",
31
+ onClick: editGlobalClicked,
32
+ children: _jsxs(Horizontal, {
33
+ "$gap": 4,
34
+ "$justifyContent": "start",
35
+ "$alignItems": "center",
36
+ children: [globalSendRateLinkText, _jsx(OpenIcon, {
37
+ size: "small",
38
+ view: "lined"
39
+ })]
40
+ })
41
+ })]
42
+ })
43
+ });
40
44
  }
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  type ChipSendRateProps = {
3
2
  messages: number;
4
3
  tooltip?: string;
5
4
  $inText?: boolean;
6
5
  };
7
- export declare function ChipSendRate({ messages, $inText }: ChipSendRateProps): React.JSX.Element;
6
+ export declare function ChipSendRate({ messages, $inText }: ChipSendRateProps): import("react/jsx-runtime").JSX.Element;
8
7
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ChipWithinTextContainer } from './styles';
3
3
  import { Chip } from '../../../Chip';
4
4
  import { useLang } from '../../polyglot';
@@ -7,16 +7,18 @@ export function ChipSendRate({
7
7
  $inText = false
8
8
  }) {
9
9
  const lang = useLang();
10
- return React.createElement(ChipWithinTextContainer, {
11
- "$inText": $inText
12
- }, React.createElement(Chip, {
13
- "$variant": "primary",
14
- "$readOnly": true,
15
- as: "span"
16
- }, messages === 0 ? lang({
17
- message: 'DUMB.SEND_RATE.CHIP.UNLIMITED'
18
- }) : lang({
19
- message: 'DUMB.SEND_RATE.CHIP.RATE',
20
- messages
21
- })));
10
+ return _jsx(ChipWithinTextContainer, {
11
+ "$inText": $inText,
12
+ children: _jsx(Chip, {
13
+ "$variant": "primary",
14
+ "$readOnly": true,
15
+ as: "span",
16
+ children: messages === 0 ? lang({
17
+ message: 'DUMB.SEND_RATE.CHIP.UNLIMITED'
18
+ }) : lang({
19
+ message: 'DUMB.SEND_RATE.CHIP.RATE',
20
+ messages
21
+ })
22
+ })
23
+ });
22
24
  }
@@ -1,4 +1,4 @@
1
- import React, { type ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  import { type SendRatePolicy } from '../../types';
3
3
  type DescriptionProps = {
4
4
  sendRateOption: SendRatePolicy;
@@ -6,5 +6,5 @@ type DescriptionProps = {
6
6
  seconds: number;
7
7
  children?: ReactNode;
8
8
  };
9
- export declare function Description(props: DescriptionProps): React.JSX.Element | undefined;
9
+ export declare function Description(props: DescriptionProps): import("react/jsx-runtime").JSX.Element | undefined;
10
10
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Paragraph } from '@pushwoosh/kit-typography';
3
3
  import { useLang } from '../../polyglot';
4
4
  import { ChipSendRate } from '../Condition';
@@ -12,32 +12,40 @@ export function Description(props) {
12
12
  const lang = useLang();
13
13
  if (sendRateOption === 'GLOBAL') {
14
14
  if (messages === 0 && seconds === 0) {
15
- return React.createElement(Paragraph, null, lang({
16
- message: 'DUMB.SEND_RATE.DESC.GLOBAL_UNSET_PREFIX'
17
- }), React.createElement(ChipSendRate, {
18
- messages: 0,
15
+ return _jsxs(Paragraph, {
16
+ children: [lang({
17
+ message: 'DUMB.SEND_RATE.DESC.GLOBAL_UNSET_PREFIX'
18
+ }), _jsx(ChipSendRate, {
19
+ messages: 0,
20
+ "$inText": true
21
+ }), lang({
22
+ message: 'DUMB.SEND_RATE.DESC.GLOBAL_UNSET_SUFFIX'
23
+ }), ' ', children]
24
+ });
25
+ }
26
+ return _jsxs(Paragraph, {
27
+ children: [lang({
28
+ message: 'DUMB.SEND_RATE.DESC.GLOBAL_SET_PREFIX'
29
+ }), _jsx(ChipSendRate, {
30
+ messages: messages,
19
31
  "$inText": true
20
32
  }), lang({
21
- message: 'DUMB.SEND_RATE.DESC.GLOBAL_UNSET_SUFFIX'
22
- }), ' ', children);
23
- }
24
- return React.createElement(Paragraph, null, lang({
25
- message: 'DUMB.SEND_RATE.DESC.GLOBAL_SET_PREFIX'
26
- }), React.createElement(ChipSendRate, {
27
- messages: messages,
28
- "$inText": true
29
- }), lang({
30
- message: 'DUMB.SEND_RATE.DESC.GLOBAL_SET_SUFFIX'
31
- }), ' ', children);
33
+ message: 'DUMB.SEND_RATE.DESC.GLOBAL_SET_SUFFIX'
34
+ }), ' ', children]
35
+ });
32
36
  }
33
37
  if (sendRateOption === 'CUSTOM') {
34
- return React.createElement(Paragraph, null, lang({
35
- message: 'DUMB.SEND_RATE.DESC.CUSTOM'
36
- }), ' ', children);
38
+ return _jsxs(Paragraph, {
39
+ children: [lang({
40
+ message: 'DUMB.SEND_RATE.DESC.CUSTOM'
41
+ }), ' ', children]
42
+ });
37
43
  }
38
44
  if (sendRateOption === 'IGNORE') {
39
- return React.createElement(Paragraph, null, lang({
40
- message: 'DUMB.SEND_RATE.DESC.IGNORE'
41
- }), ' ', children);
45
+ return _jsxs(Paragraph, {
46
+ children: [lang({
47
+ message: 'DUMB.SEND_RATE.DESC.IGNORE'
48
+ }), ' ', children]
49
+ });
42
50
  }
43
51
  }
@@ -1,9 +1,8 @@
1
- import React from 'react';
2
1
  type Props = {
3
2
  messages: number;
4
3
  onChange: (messages: number) => void;
5
4
  minValue: number;
6
5
  maxValue: number;
7
6
  };
8
- export declare function EditSendRateSettings(props: Props): React.JSX.Element;
7
+ export declare function EditSendRateSettings(props: Props): import("react/jsx-runtime").JSX.Element;
9
8
  export {};
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback } from 'react';
2
3
  import { Horizontal } from '@pushwoosh/kit-helpers';
3
4
  import { Paragraph } from '@pushwoosh/kit-typography';
4
5
  import { NumberPicker } from '../../../NumberPicker';
@@ -10,23 +11,28 @@ export function EditSendRateSettings(props) {
10
11
  minValue,
11
12
  maxValue
12
13
  } = props;
13
- const onMessagesChange = React.useCallback(value => {
14
+ const onMessagesChange = useCallback(value => {
14
15
  onChange(value);
15
16
  }, [onChange]);
16
- return React.createElement(Horizontal, {
17
+ return _jsxs(Horizontal, {
17
18
  "$gap": 12,
18
19
  "$alignItems": "center",
19
20
  style: {
20
21
  gridTemplateColumns: '145px 70px 150px'
21
- }
22
- }, React.createElement(Paragraph, null, React.createElement(Lang, {
23
- message: "DUMB.SEND_RATE.SETTINGS.LIMIT_TO_MAX"
24
- })), React.createElement(NumberPicker, {
25
- onChange: value => onMessagesChange(value),
26
- value: messages,
27
- minValue: minValue,
28
- maxValue: maxValue
29
- }), React.createElement(Paragraph, null, React.createElement(Lang, {
30
- message: "DUMB.SEND_RATE.SETTINGS.MESSAGES_PER_SEC"
31
- })));
22
+ },
23
+ children: [_jsx(Paragraph, {
24
+ children: _jsx(Lang, {
25
+ message: "DUMB.SEND_RATE.SETTINGS.LIMIT_TO_MAX"
26
+ })
27
+ }), _jsx(NumberPicker, {
28
+ onChange: value => onMessagesChange(value),
29
+ value: messages,
30
+ minValue: minValue,
31
+ maxValue: maxValue
32
+ }), _jsx(Paragraph, {
33
+ children: _jsx(Lang, {
34
+ message: "DUMB.SEND_RATE.SETTINGS.MESSAGES_PER_SEC"
35
+ })
36
+ })]
37
+ });
32
38
  }
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import { type SendRateLang } from '../polyglot';
3
2
  import { type SendRateBase } from '../types';
4
3
  export declare function getReadonlySendRateLabel<T extends SendRateBase>(sendRateOption: T, isGlobalSendRateDisabled: boolean, globalSendRate: {
5
4
  count: number;
6
5
  seconds: number;
7
- }, lang: SendRateLang): React.JSX.Element;
6
+ }, lang: SendRateLang): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Horizontal } from '@pushwoosh/kit-helpers';
3
3
  import { HelpRoundIcon } from '@pushwoosh/kit-icons';
4
4
  import { Tooltip } from '../../Tooltip';
@@ -11,40 +11,49 @@ export function getReadonlySendRateLabel(sendRateOption, isGlobalSendRateDisable
11
11
  } = sendRateOption;
12
12
  const tooltip = getReadonlyTooltip(policy, lang);
13
13
  if (policy === 'CUSTOM') {
14
- return React.createElement(React.Fragment, null, lang({
15
- message: 'DUMB.SEND_RATE.RO.CUSTOM_LABEL'
16
- }), React.createElement(ChipSendRate, {
17
- messages: sendRate
18
- }));
14
+ return _jsxs(_Fragment, {
15
+ children: [lang({
16
+ message: 'DUMB.SEND_RATE.RO.CUSTOM_LABEL'
17
+ }), _jsx(ChipSendRate, {
18
+ messages: sendRate
19
+ })]
20
+ });
19
21
  }
20
22
  if (policy === 'IGNORE') {
21
- return React.createElement(Horizontal, {
23
+ return _jsxs(Horizontal, {
22
24
  "$alignItems": "center",
23
25
  "$gap": 4,
24
- "$justifyContent": "start"
25
- }, lang({
26
- message: 'DUMB.SEND_RATE.RO.IGNORE_LABEL'
27
- }), React.createElement(Tooltip, {
28
- content: tooltip,
29
- position: "top-middle"
30
- }, React.createElement(IconWrapper, {
31
- "$padding": "4px 0"
32
- }, React.createElement(HelpRoundIcon, {
33
- size: "small",
34
- view: "lined"
35
- }))));
26
+ "$justifyContent": "start",
27
+ children: [lang({
28
+ message: 'DUMB.SEND_RATE.RO.IGNORE_LABEL'
29
+ }), _jsx(Tooltip, {
30
+ content: tooltip,
31
+ position: "top-middle",
32
+ children: _jsx(IconWrapper, {
33
+ "$padding": "4px 0",
34
+ children: _jsx(HelpRoundIcon, {
35
+ size: "small",
36
+ view: "lined"
37
+ })
38
+ })
39
+ })]
40
+ });
36
41
  }
37
- return isGlobalSendRateDisabled ? React.createElement(React.Fragment, null, lang({
38
- message: 'DUMB.SEND_RATE.RO.GLOBAL_LABEL'
39
- }), React.createElement(ChipSendRate, {
40
- messages: 0
41
- }), lang({
42
- message: 'DUMB.SEND_RATE.RO.BECAUSE_UNSET'
43
- })) : React.createElement(React.Fragment, null, lang({
44
- message: 'DUMB.SEND_RATE.RO.GLOBAL_LABEL'
45
- }), React.createElement(ChipSendRate, {
46
- messages: globalSendRate.count
47
- }));
42
+ return isGlobalSendRateDisabled ? _jsxs(_Fragment, {
43
+ children: [lang({
44
+ message: 'DUMB.SEND_RATE.RO.GLOBAL_LABEL'
45
+ }), _jsx(ChipSendRate, {
46
+ messages: 0
47
+ }), lang({
48
+ message: 'DUMB.SEND_RATE.RO.BECAUSE_UNSET'
49
+ })]
50
+ }) : _jsxs(_Fragment, {
51
+ children: [lang({
52
+ message: 'DUMB.SEND_RATE.RO.GLOBAL_LABEL'
53
+ }), _jsx(ChipSendRate, {
54
+ messages: globalSendRate.count
55
+ })]
56
+ });
48
57
  }
49
58
  function getReadonlyTooltip(sendRateOption, lang) {
50
59
  if (sendRateOption === 'IGNORE') {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { TextSkeletonTag } from './styles';
3
3
  export function TextSkeleton(props) {
4
4
  const {
@@ -6,11 +6,12 @@ export function TextSkeleton(props) {
6
6
  width,
7
7
  ...rest
8
8
  } = props;
9
- return React.createElement(TextSkeletonTag, {
9
+ return _jsx(TextSkeletonTag, {
10
10
  as: width ? 'div' : 'span',
11
11
  style: width ? {
12
12
  width
13
13
  } : undefined,
14
- ...rest
15
- }, children || '-');
14
+ ...rest,
15
+ children: children || '-'
16
+ });
16
17
  }
@@ -1,4 +1,5 @@
1
- import React, { useCallback } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback } from 'react';
2
3
  import { SortIcon } from '@pushwoosh/kit-icons';
3
4
  import { AVAILABLE_ACTIVE_ORDERS } from './constants';
4
5
  import { IconTypeByOrderMap, NextOrderMap, ReversedNextOrderMap } from './maps';
@@ -19,15 +20,18 @@ export function SortButton(props) {
19
20
  order: isReversed ? ReversedNextOrderMap[order || 'none'] : NextOrderMap[order || 'none']
20
21
  });
21
22
  }, [name, order, isReversed, onClick]);
22
- return React.createElement(SortButtonBox, {
23
+ return _jsxs(SortButtonBox, {
23
24
  ref: boxRef,
24
25
  type: "button",
25
26
  ...rest,
26
27
  onClick: handleClick,
27
- "$isActive": AVAILABLE_ACTIVE_ORDERS.includes(order)
28
- }, React.createElement("span", null, children), React.createElement(SortIcon, {
29
- size: "small",
30
- type: IconTypeByOrderMap[order || 'none']
31
- }));
28
+ "$isActive": AVAILABLE_ACTIVE_ORDERS.includes(order),
29
+ children: [_jsx("span", {
30
+ children: children
31
+ }), _jsx(SortIcon, {
32
+ size: "small",
33
+ type: IconTypeByOrderMap[order || 'none']
34
+ })]
35
+ });
32
36
  }
33
37
  SortButton.displayName = 'SortButton';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { AssetsMap } from './assets';
3
3
  import { SpinnerBox, SpinnerAnimate } from './styles';
4
4
  export function Spinner(props) {
@@ -12,9 +12,12 @@ export function Spinner(props) {
12
12
  console.error(`[Spinner]: incorrect size: ${size}!`);
13
13
  return null;
14
14
  }
15
- return React.createElement(SpinnerBox, {
15
+ return _jsx(SpinnerBox, {
16
16
  ...rest,
17
17
  size: size,
18
- ref: boxRef
19
- }, React.createElement(SpinnerAnimate, null, React.createElement(Icon, null)));
18
+ ref: boxRef,
19
+ children: _jsx(SpinnerAnimate, {
20
+ children: _jsx(Icon, {})
21
+ })
22
+ });
20
23
  }
@@ -1,4 +1,5 @@
1
- import React, { useMemo } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
2
3
  import { Color } from '@pushwoosh/kit-constants';
3
4
  import { formatNumber, Horizontal } from '@pushwoosh/kit-helpers';
4
5
  import { KebabIcon } from '@pushwoosh/kit-icons';
@@ -24,30 +25,36 @@ export function StatisticCard(props) {
24
25
  } = props;
25
26
  const statisticValue = useMemo(() => {
26
27
  if (isLoading) {
27
- return React.createElement(TextSkeleton, {
28
+ return _jsx(TextSkeleton, {
28
29
  width: "92px"
29
30
  });
30
31
  }
31
32
  if (valueSubtext) {
32
- return React.createElement(Horizontal, {
33
+ return _jsxs(Horizontal, {
33
34
  "$alignItems": "end",
34
- "$gap": 8
35
- }, React.createElement(StatValue, null, typeof value === 'number' ? formatNumber(value, 'spaced') : value), React.createElement(Text, {
36
- "$variant": "footnote",
37
- "$color": Color.LOCKED
38
- }, valueSubtext));
35
+ "$gap": 8,
36
+ children: [_jsx(StatValue, {
37
+ children: typeof value === 'number' ? formatNumber(value, 'spaced') : value
38
+ }), _jsx(Text, {
39
+ "$variant": "footnote",
40
+ "$color": Color.LOCKED,
41
+ children: valueSubtext
42
+ })]
43
+ });
39
44
  }
40
- return React.createElement(StatValue, null, typeof value === 'number' ? formatNumber(value, 'spaced') : value);
45
+ return _jsx(StatValue, {
46
+ children: typeof value === 'number' ? formatNumber(value, 'spaced') : value
47
+ });
41
48
  }, [isLoading, value, valueSubtext]);
42
- const resolvedRightSlot = rightSlot ?? (actions ? React.createElement(DropdownMenu, {
49
+ const resolvedRightSlot = rightSlot ?? (actions ? _jsx(DropdownMenu, {
43
50
  renderHandler: ({
44
51
  onClick,
45
52
  ref,
46
53
  isOpen
47
- }) => React.createElement(Button, {
54
+ }) => _jsx(Button, {
48
55
  color: "secondary",
49
56
  view: "ghost",
50
- icon: React.createElement(KebabIcon, {
57
+ icon: _jsx(KebabIcon, {
51
58
  size: "small"
52
59
  }),
53
60
  onClick: onClick,
@@ -57,26 +64,34 @@ export function StatisticCard(props) {
57
64
  width: '28px',
58
65
  height: '28px'
59
66
  }
67
+ }),
68
+ children: _jsx(DropdownMenuSection, {
69
+ children: actions.map(a => _jsx(DropdownMenuItem, {
70
+ onClick: a.onClick,
71
+ disabled: a.disabled,
72
+ children: _jsx(Text, {
73
+ "$ellipsis": true,
74
+ children: a.label
75
+ })
76
+ }, a.id))
60
77
  })
61
- }, React.createElement(DropdownMenuSection, null, actions.map(a => React.createElement(DropdownMenuItem, {
62
- key: a.id,
63
- onClick: a.onClick,
64
- disabled: a.disabled
65
- }, React.createElement(Text, {
66
- "$ellipsis": true
67
- }, a.label))))) : null);
68
- return React.createElement(Container, {
78
+ }) : null);
79
+ return _jsxs(Container, {
69
80
  "$active": active,
70
81
  "$selectable": selectable,
71
82
  "$width": width,
72
83
  onClick: onClick,
73
- ...rest
74
- }, React.createElement(Title, {
75
- "$hasRightSlot": !!resolvedRightSlot
76
- }, title), resolvedRightSlot && React.createElement(RightSlotContainer, {
77
- onClick: e => e.stopPropagation()
78
- }, resolvedRightSlot), statisticValue, footer && React.createElement(Text, {
79
- "$variant": "footnote",
80
- "$color": Color.LOCKED
81
- }, footer));
84
+ ...rest,
85
+ children: [_jsx(Title, {
86
+ "$hasRightSlot": !!resolvedRightSlot,
87
+ children: title
88
+ }), resolvedRightSlot && _jsx(RightSlotContainer, {
89
+ onClick: e => e.stopPropagation(),
90
+ children: resolvedRightSlot
91
+ }), statisticValue, footer && _jsx(Text, {
92
+ "$variant": "footnote",
93
+ "$color": Color.LOCKED,
94
+ children: footer
95
+ })]
96
+ });
82
97
  }
package/Switch/Switch.js CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Container, Box, Circle, Label } from './styles';
3
3
  export function Switch({
4
4
  labelPosition = 'right',
@@ -7,16 +7,19 @@ export function Switch({
7
7
  children,
8
8
  onChange
9
9
  }) {
10
- return React.createElement(Container, {
11
- labelPosition: labelPosition
12
- }, React.createElement(Box, {
13
- enabled: enabled,
14
- isDisabled: isDisabled,
15
- onClick: onChange
16
- }, React.createElement(Circle, {
17
- enabled: enabled,
18
- isDisabled: isDisabled
19
- })), children && React.createElement(Label, {
20
- labelPosition: labelPosition
21
- }, children));
10
+ return _jsxs(Container, {
11
+ labelPosition: labelPosition,
12
+ children: [_jsx(Box, {
13
+ enabled: enabled,
14
+ isDisabled: isDisabled,
15
+ onClick: onChange,
16
+ children: _jsx(Circle, {
17
+ enabled: enabled,
18
+ isDisabled: isDisabled
19
+ })
20
+ }), children && _jsx(Label, {
21
+ labelPosition: labelPosition,
22
+ children: children
23
+ })]
24
+ });
22
25
  }
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
- export declare const Tab: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "onClick"> & Readonly<{
1
+ export declare const Tab: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "onClick"> & Readonly<{
3
2
  code: import("../..").TabCode;
4
3
  onActivate?: (code: import("../..").TabCode) => void;
5
4
  isDisabled?: boolean;
6
5
  isNew?: boolean;
7
- icon?: React.ReactNode;
8
- }> & React.RefAttributes<HTMLDivElement>>;
6
+ icon?: import("react").ReactNode;
7
+ }> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,5 @@
1
- import React, { forwardRef } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
2
3
  import { TabBase } from '../TabBase';
3
4
  import { useTabsContext } from '../../context';
4
5
  export const Tab = forwardRef((props, ref) => {
@@ -12,7 +13,7 @@ export const Tab = forwardRef((props, ref) => {
12
13
  activeTabCode,
13
14
  setActiveTabCode
14
15
  } = useTabsContext();
15
- return React.createElement(TabBase, {
16
+ return _jsx(TabBase, {
16
17
  isActive: code === activeTabCode,
17
18
  ref: ref,
18
19
  onClick: () => {
@@ -21,6 +22,7 @@ export const Tab = forwardRef((props, ref) => {
21
22
  onActivate === null || onActivate === void 0 || onActivate(code);
22
23
  }
23
24
  },
24
- ...rest
25
- }, children);
25
+ ...rest,
26
+ children: children
27
+ });
26
28
  });
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
- export declare const TabBar: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & Readonly<{
3
- title?: React.ReactNode;
4
- }> & React.RefAttributes<HTMLDivElement>>;
1
+ export declare const TabBar: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & Readonly<{
2
+ title?: import("react").ReactNode;
3
+ }> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,5 @@
1
- import React, { forwardRef } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
2
3
  import { H4 } from '@pushwoosh/kit-typography';
3
4
  import { TabBarTitleBox, TabBarContainer } from './styles';
4
5
  import { TabBarScrollableFrame } from '../TabBarScrollableFrame';
@@ -8,9 +9,16 @@ export const TabBar = forwardRef((props, ref) => {
8
9
  title,
9
10
  ...rest
10
11
  } = props;
11
- return React.createElement(TabBarContainer, {
12
+ return _jsxs(TabBarContainer, {
12
13
  hasTitle: !!title,
13
14
  ref: ref,
14
- ...rest
15
- }, title && React.createElement(TabBarTitleBox, null, React.createElement(H4, null, title)), React.createElement(TabBarScrollableFrame, null, children));
15
+ ...rest,
16
+ children: [title && _jsx(TabBarTitleBox, {
17
+ children: _jsx(H4, {
18
+ children: title
19
+ })
20
+ }), _jsx(TabBarScrollableFrame, {
21
+ children: children
22
+ })]
23
+ });
16
24
  });