@pushwoosh/dumb-components 1.1.135 → 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 (144) hide show
  1. package/AccessForbidden/AccessForbidden.js +17 -11
  2. package/Alert/Alert.d.ts +1 -2
  3. package/Alert/Alert.js +31 -25
  4. package/ApplicationPreloader/ApplicationPreloader.d.ts +1 -2
  5. package/ApplicationPreloader/ApplicationPreloader.js +5 -4
  6. package/Badge/Badge.js +2 -2
  7. package/Banner/Banner.js +40 -24
  8. package/Button/Button.js +20 -9
  9. package/Button/RemoveButton.js +7 -6
  10. package/Calendar/CalendarDropdown/CalendarDropdown.js +121 -108
  11. package/Calendar/CalendarMonth/CalendarMonth.js +68 -66
  12. package/Calendar/CalendarMonthSlider/CalendarMonthSlider.d.ts +2 -2
  13. package/Calendar/CalendarMonthSlider/CalendarMonthSlider.js +68 -55
  14. package/Calendar/CalendarSuperForm/CalendarSuperForm.js +75 -70
  15. package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.d.ts +2 -2
  16. package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.js +3 -2
  17. package/Calendar/CalendarSuperForm/components/CalendarTimeAndTimezoneSection/CalendarTimeAndTimezoneSection.js +106 -88
  18. package/Calendar/CalendarSuperForm/components/CalendarTimeInput.d.ts +1 -2
  19. package/Calendar/CalendarSuperForm/components/CalendarTimeInput.js +2 -2
  20. package/Calendar/CalendarSuperForm/components/CalendarTimezoneSelect.js +3 -2
  21. package/CardMetric/CardChildren.js +9 -6
  22. package/CardMetric/CardCollapse.js +8 -6
  23. package/CardMetric/CardMetric.js +52 -33
  24. package/Checkbox/Checkbox.js +30 -24
  25. package/Chip/Chip.d.ts +6 -7
  26. package/Chip/Chip.js +22 -15
  27. package/CodeEditor/CodeEditor.d.ts +1 -2
  28. package/CodeEditor/CodeEditor.js +2 -2
  29. package/CrashScreen/CrashScreen.js +18 -10
  30. package/DateTimePicker/components/AutosizeInput/AutosizeInput.js +17 -13
  31. package/DateTimePicker/components/DatePicker/DatePicker.js +35 -32
  32. package/DateTimePicker/components/DatePickerField/DatePickerField.js +31 -24
  33. package/DateTimePicker/components/DateTimePicker/DateTimePicker.js +22 -20
  34. package/DateTimePicker/components/DateTimePickerField/DateTimePickerField.js +29 -24
  35. package/DateTimePicker/components/DecadeView/DecadeView.js +19 -17
  36. package/DateTimePicker/components/Input/Input.js +2 -2
  37. package/DateTimePicker/components/Month/Month.js +51 -35
  38. package/DateTimePicker/components/MonthView/MonthView.js +21 -17
  39. package/DateTimePicker/components/NumberPicker/NumberPicker.js +49 -40
  40. package/DateTimePicker/components/PickerPlate/PickerPlate.js +17 -14
  41. package/DateTimePicker/components/YearView/YearView.js +22 -18
  42. package/Drawer/components/Drawer/Drawer.js +18 -13
  43. package/Drawer/components/Drawer/styles.d.ts +2 -2
  44. package/Drawer/components/Drawer/styles.js +5 -4
  45. package/Drawer/components/DrawerDocs/DrawerDocs.js +25 -20
  46. package/DropdownMenu/components/DropdownMenu/DropdownMenu.js +28 -24
  47. package/DropdownMenu/components/DropdownMenuButton/DropdownMenuButton.js +8 -6
  48. package/DropdownMenu/components/DropdownMenuItem/DropdownMenuItem.js +6 -4
  49. package/DropdownMenu/components/DropdownMenuSection/DropdownMenuSection.js +13 -10
  50. package/DropdownMenu/components/DropdownMenuSubmenu/DropdownMenuSubmenu.js +40 -31
  51. package/EditableField/EditableField.js +55 -43
  52. package/EmailTemplatePreview/EmailTemplatePreview.js +10 -8
  53. package/EmailTemplatePreview/components/NoEmailTemplatePreview/NoEmailTemplatePreview.js +28 -22
  54. package/EnhancedInput/EnhancedInput.d.ts +3 -4
  55. package/EnhancedInput/EnhancedInput.js +14 -10
  56. package/EnhancedInput/SearchInput.js +3 -3
  57. package/ExportResult/ExportResult.js +33 -23
  58. package/ExternalImagePreview/ExternalImagePreview.js +24 -20
  59. package/FieldBox/FieldBox.js +50 -37
  60. package/FrequencyCapping/FrequencyCappingEdit.js +41 -33
  61. package/FrequencyCapping/FrequencyCappingInApps.js +41 -33
  62. package/FrequencyCapping/FrequencyCappingReadonly.d.ts +1 -2
  63. package/FrequencyCapping/FrequencyCappingReadonly.js +24 -20
  64. package/FrequencyCapping/components/Condition/index.d.ts +1 -2
  65. package/FrequencyCapping/components/Condition/index.js +24 -20
  66. package/FrequencyCapping/components/Description/index.d.ts +2 -2
  67. package/FrequencyCapping/components/Description/index.js +7 -5
  68. package/FrequencyCapping/components/Settings/EditCappingSettings.js +28 -20
  69. package/FrequencyCapping/components/Settings/EditInAppCappingSettings.js +86 -71
  70. package/FrequencyCapping/helpers/getReadonlyCappingHelpers.d.ts +1 -2
  71. package/FrequencyCapping/helpers/getReadonlyCappingHelpers.js +41 -32
  72. package/GetStartedPage/GetStartedPage.js +44 -25
  73. package/InputFile/InputFile.js +44 -35
  74. package/Link/Link.js +2 -2
  75. package/Modal/components/Modal/Modal.js +17 -12
  76. package/Modal/components/Modal/styles.js +5 -4
  77. package/Modal/components/ModalConfirm/ModalConfirm.js +33 -19
  78. package/Modal/components/ModalConfirm/ModalConfirmProvider.d.ts +2 -2
  79. package/Modal/components/ModalConfirm/ModalConfirmProvider.js +8 -6
  80. package/Modal/components/ModalTitle/ModalTitle.js +10 -8
  81. package/NotificationInbox/NotificationBar.js +19 -11
  82. package/NotificationInbox/NotificationBell.js +15 -12
  83. package/NotificationInbox/NotificationInbox.js +159 -118
  84. package/NumberPicker/NumberPicker.js +53 -44
  85. package/NumberPicker/components/AutosizeInput/AutosizeInput.js +19 -15
  86. package/PageHeader/components/AutosizeInput/AutosizeInput.js +30 -22
  87. package/PageHeader/components/PageHeader/PageHeader.js +44 -27
  88. package/PageHeader/components/PageHeaderEditable/PageHeaderEditable.js +51 -34
  89. package/PageHeader/components/PageHeaderError/PageHeaderError.js +17 -10
  90. package/PageHeader/components/PageHeaderSkeleton/PageHeaderSkeleton.js +20 -16
  91. package/Pagination/Pagination.js +60 -49
  92. package/Popover/Popover.js +6 -5
  93. package/ProgressBar/ProgressBar.js +25 -10
  94. package/PushPreview/PushPreview.js +30 -22
  95. package/PushPreview/components/MissedContentPreview/MissedContentPreview.js +22 -15
  96. package/PushPreview/components/SilentPushPreview/SilentPushPreview.js +20 -13
  97. package/Radio/Radio.js +32 -26
  98. package/RadioCard/RadioCard.js +17 -9
  99. package/ReCaptcha/ReCaptcha.js +2 -2
  100. package/RichMessageEditor/EditorEmojiPicker.js +9 -7
  101. package/RichMessageEditor/RichMessageEditor.js +77 -67
  102. package/RichMessageEditor/RichMessageViewer.js +19 -13
  103. package/RichMessageEditor/slate/DynamicContentElement.d.ts +1 -2
  104. package/RichMessageEditor/slate/DynamicContentElement.js +13 -9
  105. package/RichMessageEditor/slate/SlateEditor.js +9 -7
  106. package/RichmediaPreview/RichmediaPreview.js +13 -11
  107. package/Select/Select.js +10 -8
  108. package/SendRate/SendRateEdit.d.ts +1 -2
  109. package/SendRate/SendRateEdit.js +42 -34
  110. package/SendRate/SendRateReadonly.d.ts +1 -2
  111. package/SendRate/SendRateReadonly.js +24 -20
  112. package/SendRate/components/Condition/index.d.ts +1 -2
  113. package/SendRate/components/Condition/index.js +15 -13
  114. package/SendRate/components/Description/index.d.ts +2 -2
  115. package/SendRate/components/Description/index.js +30 -22
  116. package/SendRate/components/Settings/index.d.ts +1 -2
  117. package/SendRate/components/Settings/index.js +20 -14
  118. package/SendRate/helpers/getReadonlySendRateHelpers.d.ts +1 -2
  119. package/SendRate/helpers/getReadonlySendRateHelpers.js +39 -30
  120. package/Skeleton/TextSkeleton.js +5 -4
  121. package/SortButton/SortButton.js +11 -7
  122. package/Spinner/Spinner.js +7 -4
  123. package/StatisticCard/StatisticCard.js +44 -29
  124. package/Switch/Switch.js +16 -13
  125. package/Tabs/components/Tab/Tab.d.ts +3 -4
  126. package/Tabs/components/Tab/Tab.js +6 -4
  127. package/Tabs/components/TabBar/TabBar.d.ts +3 -4
  128. package/Tabs/components/TabBar/TabBar.js +12 -4
  129. package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.d.ts +1 -2
  130. package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.js +27 -21
  131. package/Tabs/components/TabBase/TabBase.d.ts +3 -4
  132. package/Tabs/components/TabBase/TabBase.js +11 -6
  133. package/Tabs/components/TabPanel/TabPanel.js +4 -2
  134. package/Tabs/components/Tabs/Tabs.js +8 -4
  135. package/Toast/Toast.js +31 -18
  136. package/Toast/ToastProvider.d.ts +2 -3
  137. package/Toast/ToastProvider.js +10 -8
  138. package/Tooltip/Tooltip.js +2 -2
  139. package/Tooltip/TooltipTrigger.js +13 -11
  140. package/package.json +2 -2
  141. package/polyglot/__tests__/render.test.js +46 -16
  142. package/polyglot/liquid/render.d.ts +2 -2
  143. package/polyglot/liquid/render.js +7 -6
  144. package/polyglot/react.js +7 -5
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import { Color, ShapeRadius } from '@pushwoosh/kit-constants';
3
4
  import { Columns, Horizontal, Vertical } from '@pushwoosh/kit-helpers';
4
5
  import { TimeIcon } from '@pushwoosh/kit-icons';
@@ -53,93 +54,110 @@ export const CalendarTimeAndTimezoneSection = ({
53
54
  backgroundColor = Color.SOFT_LIGHT;
54
55
  borderRadius = ShapeRadius.SECTION;
55
56
  }
56
- return React.createElement(Vertical, {
57
+ return _jsx(Vertical, {
57
58
  "$padding": padding,
58
59
  "$borderRadius": borderRadius,
59
- "$bgColor": backgroundColor
60
- }, showCollapsed ? React.createElement(Columns, {
61
- "$sizes": "max-content 1fr max-content",
62
- "$gap": 6,
63
- "$alignItems": "center"
64
- }, React.createElement(TimeIcon, {
65
- size: "small",
66
- view: "lined"
67
- }), React.createElement(Text, {
68
- "$variant": "footnote"
69
- }, getSelectedTimeText(), ' ', timezoneShort), React.createElement(Button, {
70
- color: "secondary",
71
- size: "compact",
72
- view: "ghost",
73
- onClick: () => setExpanded(true)
74
- }, React.createElement(Lang, {
75
- message: "DUMB.CALENDAR.EXPAND_TIME"
76
- }))) : React.createElement(React.Fragment, null, isRangePicker && React.createElement(Columns, {
77
- "$sizes": "1fr max-content",
78
- "$gap": 8,
79
- "$alignItems": "center"
80
- }, React.createElement(H5, null, React.createElement(Lang, {
81
- message: "DUMB.CALENDAR.TIME_RANGE"
82
- })), React.createElement(Button, {
83
- color: "secondary",
84
- size: "compact",
85
- view: "ghost",
86
- onClick: () => setExpanded(false)
87
- }, React.createElement(Lang, {
88
- message: "DUMB.CALENDAR.COLLAPSE_TIME"
89
- }))), !isRangePicker ? React.createElement(Horizontal, {
90
- "$alignItems": "center",
91
- "$gap": 8,
92
- "$justifyContent": "start"
93
- }, React.createElement(CalendarTimeInput, {
94
- value: value,
95
- onChange: time => {
96
- const newStruct = extendPeriodStruct(value, time);
97
- onChange(newStruct);
98
- },
99
- disabled: isDisabled
100
- }), React.createElement(CalendarTimezoneSelect, {
101
- timezone: timezone,
102
- onChange: onChangeTimezone,
103
- isDisabled: isDisabled
104
- })) : React.createElement(Columns, {
105
- "$sizes": visibleCount === 1 ? '1fr' : 'auto 1fr',
106
- "$gap": 8
107
- }, React.createElement(Horizontal, {
108
- "$alignItems": "center",
109
- "$gap": 8,
110
- "$justifyContent": "start"
111
- }, React.createElement(CalendarTimeInput, {
112
- value: value[0],
113
- onChange: time => {
114
- const oldStruct = value[0];
115
- const newStruct = extendPeriodStruct(oldStruct, time);
116
- const newValue = value.length === 2 ? [newStruct, value[1]] : [newStruct];
117
- onChange(newValue);
118
- },
119
- disabled: isDisabled
120
- }), React.createElement("span", null, "\u2013"), React.createElement(CalendarTimeInput, {
121
- value: value[1],
122
- onChange: time => {
123
- const oldStruct = value[1];
124
- const newStruct = extendPeriodStruct(oldStruct, time);
125
- const newValue = value.length === 2 ? [value[0], newStruct] : [newStruct];
126
- onChange(newValue);
127
- },
128
- endPeriod: true,
129
- disabled: isDisabled
130
- })), React.createElement(CalendarTimezoneSelect, {
131
- timezone: timezone,
132
- onChange: onChangeTimezone,
133
- isDisabled: isDisabled
134
- })), isDisabled && React.createElement(Horizontal, {
135
- "$margin": {
136
- top: 4
137
- }
138
- }, React.createElement(Text, {
139
- "$variant": "footnote",
140
- "$color": Color.LOCKED
141
- }, React.createElement(Lang, {
142
- message: "DUMB.CALENDAR.SELECT_FIRST_HINT",
143
- isRange: Boolean(isRangePicker)
144
- })))));
60
+ "$bgColor": backgroundColor,
61
+ children: showCollapsed ? _jsxs(Columns, {
62
+ "$sizes": "max-content 1fr max-content",
63
+ "$gap": 6,
64
+ "$alignItems": "center",
65
+ children: [_jsx(TimeIcon, {
66
+ size: "small",
67
+ view: "lined"
68
+ }), _jsxs(Text, {
69
+ "$variant": "footnote",
70
+ children: [getSelectedTimeText(), ' ', timezoneShort]
71
+ }), _jsx(Button, {
72
+ color: "secondary",
73
+ size: "compact",
74
+ view: "ghost",
75
+ onClick: () => setExpanded(true),
76
+ children: _jsx(Lang, {
77
+ message: "DUMB.CALENDAR.EXPAND_TIME"
78
+ })
79
+ })]
80
+ }) : _jsxs(_Fragment, {
81
+ children: [isRangePicker && _jsxs(Columns, {
82
+ "$sizes": "1fr max-content",
83
+ "$gap": 8,
84
+ "$alignItems": "center",
85
+ children: [_jsx(H5, {
86
+ children: _jsx(Lang, {
87
+ message: "DUMB.CALENDAR.TIME_RANGE"
88
+ })
89
+ }), _jsx(Button, {
90
+ color: "secondary",
91
+ size: "compact",
92
+ view: "ghost",
93
+ onClick: () => setExpanded(false),
94
+ children: _jsx(Lang, {
95
+ message: "DUMB.CALENDAR.COLLAPSE_TIME"
96
+ })
97
+ })]
98
+ }), !isRangePicker ? _jsxs(Horizontal, {
99
+ "$alignItems": "center",
100
+ "$gap": 8,
101
+ "$justifyContent": "start",
102
+ children: [_jsx(CalendarTimeInput, {
103
+ value: value,
104
+ onChange: time => {
105
+ const newStruct = extendPeriodStruct(value, time);
106
+ onChange(newStruct);
107
+ },
108
+ disabled: isDisabled
109
+ }), _jsx(CalendarTimezoneSelect, {
110
+ timezone: timezone,
111
+ onChange: onChangeTimezone,
112
+ isDisabled: isDisabled
113
+ })]
114
+ }) : _jsxs(Columns, {
115
+ "$sizes": visibleCount === 1 ? '1fr' : 'auto 1fr',
116
+ "$gap": 8,
117
+ children: [_jsxs(Horizontal, {
118
+ "$alignItems": "center",
119
+ "$gap": 8,
120
+ "$justifyContent": "start",
121
+ children: [_jsx(CalendarTimeInput, {
122
+ value: value[0],
123
+ onChange: time => {
124
+ const oldStruct = value[0];
125
+ const newStruct = extendPeriodStruct(oldStruct, time);
126
+ const newValue = value.length === 2 ? [newStruct, value[1]] : [newStruct];
127
+ onChange(newValue);
128
+ },
129
+ disabled: isDisabled
130
+ }), _jsx("span", {
131
+ children: "\u2013"
132
+ }), _jsx(CalendarTimeInput, {
133
+ value: value[1],
134
+ onChange: time => {
135
+ const oldStruct = value[1];
136
+ const newStruct = extendPeriodStruct(oldStruct, time);
137
+ const newValue = value.length === 2 ? [value[0], newStruct] : [newStruct];
138
+ onChange(newValue);
139
+ },
140
+ endPeriod: true,
141
+ disabled: isDisabled
142
+ })]
143
+ }), _jsx(CalendarTimezoneSelect, {
144
+ timezone: timezone,
145
+ onChange: onChangeTimezone,
146
+ isDisabled: isDisabled
147
+ })]
148
+ }), isDisabled && _jsx(Horizontal, {
149
+ "$margin": {
150
+ top: 4
151
+ },
152
+ children: _jsx(Text, {
153
+ "$variant": "footnote",
154
+ "$color": Color.LOCKED,
155
+ children: _jsx(Lang, {
156
+ message: "DUMB.CALENDAR.SELECT_FIRST_HINT",
157
+ isRange: Boolean(isRangePicker)
158
+ })
159
+ })
160
+ })]
161
+ })
162
+ });
145
163
  };
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  export type CalendarTimeInputProps<T extends {
3
2
  hour: number;
4
3
  minute: number;
@@ -16,4 +15,4 @@ export type CalendarTimeInputProps<T extends {
16
15
  export declare const CalendarTimeInput: <T extends {
17
16
  hour: number;
18
17
  minute: number;
19
- }>({ value, onChange, disabled, endPeriod, }: CalendarTimeInputProps<T>) => React.JSX.Element;
18
+ }>({ value, onChange, disabled, endPeriod, }: CalendarTimeInputProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { NativeTimeInput } from '../../../native';
3
3
  import { formatTwoDigitNumber } from '../../helpers';
4
4
  export const CalendarTimeInput = ({
@@ -9,7 +9,7 @@ export const CalendarTimeInput = ({
9
9
  }) => {
10
10
  const defaultHour = endPeriod ? 23 : 0;
11
11
  const defaultMinute = endPeriod ? 59 : 0;
12
- return React.createElement(NativeTimeInput, {
12
+ return _jsx(NativeTimeInput, {
13
13
  value: `${formatTwoDigitNumber((value === null || value === void 0 ? void 0 : value.hour) ?? defaultHour)}:${formatTwoDigitNumber((value === null || value === void 0 ? void 0 : value.minute) ?? defaultMinute)}`,
14
14
  onChange: e => {
15
15
  const [hour, minute] = e.target.value.split(':').map(Number);
@@ -1,4 +1,5 @@
1
- import React, { useMemo } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
2
3
  import { Select } from '../../../Select';
3
4
  import { getSortedTimezones } from '../../helpers-tz';
4
5
  export const CalendarTimezoneSelect = ({
@@ -9,7 +10,7 @@ export const CalendarTimezoneSelect = ({
9
10
  const timezonesOptions = useMemo(() => {
10
11
  return getSortedTimezones();
11
12
  }, []);
12
- return React.createElement(Select, {
13
+ return _jsx(Select, {
13
14
  value: timezonesOptions.find(op => op.value === timezone),
14
15
  onChange: value => onChange(value.value),
15
16
  options: timezonesOptions,
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Spinner } from '../Spinner';
3
3
  import { CardCollapse } from './CardCollapse';
4
4
  export function CardChildren(props) {
@@ -12,14 +12,17 @@ export function CardChildren(props) {
12
12
  return null;
13
13
  }
14
14
  if (loading) {
15
- return React.createElement(Spinner, {
15
+ return _jsx(Spinner, {
16
16
  size: "medium"
17
17
  });
18
18
  }
19
19
  if (collapse !== undefined) {
20
- return React.createElement(CardCollapse, {
21
- isCollapsed: isCollapsed
22
- }, children);
20
+ return _jsx(CardCollapse, {
21
+ isCollapsed: isCollapsed,
22
+ children: children
23
+ });
23
24
  }
24
- return React.createElement(React.Fragment, null, children);
25
+ return _jsx(_Fragment, {
26
+ children: children
27
+ });
25
28
  }
@@ -1,13 +1,15 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CollapseContainer, CollapseInner } from './styles';
3
3
  export function CardCollapse(props) {
4
4
  const {
5
5
  children,
6
6
  isCollapsed
7
7
  } = props;
8
- return React.createElement(CollapseContainer, {
9
- isCollapsed: isCollapsed
10
- }, React.createElement(CollapseInner, {
11
- isCollapsed: isCollapsed
12
- }, children));
8
+ return _jsx(CollapseContainer, {
9
+ isCollapsed: isCollapsed,
10
+ children: _jsx(CollapseInner, {
11
+ isCollapsed: isCollapsed,
12
+ children: children
13
+ })
14
+ });
13
15
  }
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import { Color } from '@pushwoosh/kit-constants';
3
4
  import { InfoRoundIcon, ChevronIcon } from '@pushwoosh/kit-icons';
4
5
  import { Spinner } from '../Spinner';
@@ -24,38 +25,56 @@ export function CardMetric({
24
25
  const [isCollapsed, setIsCollapsed] = useState(!!(collapse !== null && collapse !== void 0 && collapse.isCollapsed));
25
26
  const onMouseOver = () => setVisibleInfo(true);
26
27
  const onMouseOut = () => setVisibleInfo(false);
27
- return React.createElement(CardContainer, {
28
+ return _jsxs(CardContainer, {
28
29
  view: view,
29
30
  focus: focus,
30
- ...otherProps
31
- }, (!!title || !!headerExtra) && React.createElement(CardHeader, null, React.createElement(CardHeaderLeft, null, React.createElement(CardTitle, {
32
- onClick: () => {
33
- if (collapse !== undefined) {
34
- setIsCollapsed(prevState => !prevState);
35
- }
36
- },
37
- collapsable: collapse !== undefined
38
- }, title, collapse !== undefined && React.createElement(ChevronIcon, {
39
- direction: isCollapsed ? 'down' : 'up',
40
- size: "small"
41
- }), React.createElement(CardInfo, {
42
- hide: !tooltip,
43
- onMouseOver: onMouseOver,
44
- onMouseOut: onMouseOut
45
- }, React.createElement(Tooltip, {
46
- isVisible: visibleInfo,
47
- content: tooltip
48
- }, React.createElement("div", null, React.createElement(InfoRoundIcon, {
49
- size: "small",
50
- view: "lined",
51
- color: visibleInfo ? Color.PRIMARY_HOVER : Color.SOFT
52
- }))))), metric !== undefined && (loading ? React.createElement(Spinner, {
53
- size: "medium"
54
- }) : React.createElement(CardMetricValue, null, metric, React.createElement(CardExtraMetric, {
55
- color: extraMetricColor
56
- }, extraMetric)))), React.createElement("div", null, headerExtra)), React.createElement(CardChildren, {
57
- loading: loading,
58
- collapse: collapse,
59
- isCollapsed: isCollapsed
60
- }, children), !!description && React.createElement(CardDescription, null, description));
31
+ ...otherProps,
32
+ children: [(!!title || !!headerExtra) && _jsxs(CardHeader, {
33
+ children: [_jsxs(CardHeaderLeft, {
34
+ children: [_jsxs(CardTitle, {
35
+ onClick: () => {
36
+ if (collapse !== undefined) {
37
+ setIsCollapsed(prevState => !prevState);
38
+ }
39
+ },
40
+ collapsable: collapse !== undefined,
41
+ children: [title, collapse !== undefined && _jsx(ChevronIcon, {
42
+ direction: isCollapsed ? 'down' : 'up',
43
+ size: "small"
44
+ }), _jsx(CardInfo, {
45
+ hide: !tooltip,
46
+ onMouseOver: onMouseOver,
47
+ onMouseOut: onMouseOut,
48
+ children: _jsx(Tooltip, {
49
+ isVisible: visibleInfo,
50
+ content: tooltip,
51
+ children: _jsx("div", {
52
+ children: _jsx(InfoRoundIcon, {
53
+ size: "small",
54
+ view: "lined",
55
+ color: visibleInfo ? Color.PRIMARY_HOVER : Color.SOFT
56
+ })
57
+ })
58
+ })
59
+ })]
60
+ }), metric !== undefined && (loading ? _jsx(Spinner, {
61
+ size: "medium"
62
+ }) : _jsxs(CardMetricValue, {
63
+ children: [metric, _jsx(CardExtraMetric, {
64
+ color: extraMetricColor,
65
+ children: extraMetric
66
+ })]
67
+ }))]
68
+ }), _jsx("div", {
69
+ children: headerExtra
70
+ })]
71
+ }), _jsx(CardChildren, {
72
+ loading: loading,
73
+ collapse: collapse,
74
+ isCollapsed: isCollapsed,
75
+ children: children
76
+ }), !!description && _jsx(CardDescription, {
77
+ children: description
78
+ })]
79
+ });
61
80
  }
@@ -1,4 +1,5 @@
1
- import React, { useRef, useEffect, useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef, useEffect, useState } from 'react';
2
3
  import { Color } from '@pushwoosh/kit-constants';
3
4
  import { Horizontal } from '@pushwoosh/kit-helpers';
4
5
  import { NativeLabel, NativeCheckbox } from './styles';
@@ -31,32 +32,37 @@ export function Checkbox(props) {
31
32
  checkboxRef.current.indeterminate = isIndeterminate ?? false;
32
33
  }
33
34
  }, [checkboxRef, isIndeterminate]);
34
- const checkboxMarkup = React.createElement(NativeLabel, {
35
+ const checkboxMarkup = _jsxs(NativeLabel, {
35
36
  htmlFor: localId,
36
- "$color": isDisabled ? Color.LOCKED : Color.MAIN
37
- }, React.createElement(Horizontal, {
38
- "$padding": 3
39
- }, React.createElement(NativeCheckbox, {
40
- type: "checkbox",
41
- id: localId,
42
- ref: checkboxRef,
43
- value: value,
44
- name: name,
45
- "$color": activeCheckboxColor,
46
- checked: isChecked,
47
- disabled: isDisabled,
48
- "$type": type,
49
- onChange: event => onChange === null || onChange === void 0 ? void 0 : onChange(event.currentTarget.checked)
50
- })), label && React.createElement("span", null, label));
37
+ "$color": isDisabled ? Color.LOCKED : Color.MAIN,
38
+ children: [_jsx(Horizontal, {
39
+ "$padding": 3,
40
+ children: _jsx(NativeCheckbox, {
41
+ type: "checkbox",
42
+ id: localId,
43
+ ref: checkboxRef,
44
+ value: value,
45
+ name: name,
46
+ "$color": activeCheckboxColor,
47
+ checked: isChecked,
48
+ disabled: isDisabled,
49
+ "$type": type,
50
+ onChange: event => onChange === null || onChange === void 0 ? void 0 : onChange(event.currentTarget.checked)
51
+ })
52
+ }), label && _jsx("span", {
53
+ children: label
54
+ })]
55
+ });
51
56
  if (tooltip) {
52
- return React.createElement(Horizontal, {
57
+ return _jsxs(Horizontal, {
53
58
  "$gap": 4,
54
- "$alignItems": "start"
55
- }, checkboxMarkup, React.createElement(TooltipTrigger, {
56
- content: tooltip,
57
- padding: "4px 0",
58
- view: "question"
59
- }));
59
+ "$alignItems": "start",
60
+ children: [checkboxMarkup, _jsx(TooltipTrigger, {
61
+ content: tooltip,
62
+ padding: "4px 0",
63
+ view: "question"
64
+ })]
65
+ });
60
66
  }
61
67
  return checkboxMarkup;
62
68
  }
package/Chip/Chip.d.ts CHANGED
@@ -1,13 +1,12 @@
1
- import React from 'react';
2
- export declare const Chip: React.ForwardRefExoticComponent<{
1
+ export declare const Chip: import("react").ForwardRefExoticComponent<{
3
2
  $variant?: import("./Chip.types").ChipVariant;
4
3
  $selected?: boolean;
5
- $onClose?: React.HTMLAttributes<HTMLDivElement>["onClick"];
4
+ $onClose?: import("react").HTMLAttributes<HTMLDivElement>["onClick"];
6
5
  $readOnly?: boolean;
7
6
  $maxWidth?: string;
8
- $icon?: React.ReactNode;
9
- $tooltip?: React.ReactNode;
7
+ $icon?: import("react").ReactNode;
8
+ $tooltip?: import("react").ReactNode;
10
9
  as?: string;
11
10
  } & {
12
- children?: React.ReactNode | undefined;
13
- } & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
11
+ children?: import("react").ReactNode | undefined;
12
+ } & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
package/Chip/Chip.js CHANGED
@@ -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 { TooltipTrigger } from '../Tooltip';
3
4
  import { ChipCloseIcon, ChipLabel, ChipSlotIcon, ChipStyled } from './styles';
4
5
  export const Chip = forwardRef(({
@@ -18,7 +19,7 @@ export const Chip = forwardRef(({
18
19
  if ($readOnly && $onClose) {
19
20
  console.error('[Chip]: $onClose is ignored when $readOnly is true — read-only chips have no close button.');
20
21
  }
21
- return React.createElement(ChipStyled, {
22
+ return _jsxs(ChipStyled, {
22
23
  ref: ref,
23
24
  "$variant": $variant,
24
25
  "$selected": $selected,
@@ -27,17 +28,23 @@ export const Chip = forwardRef(({
27
28
  "$readOnly": $readOnly,
28
29
  "$maxWidth": $maxWidth,
29
30
  as: as,
30
- ...rest
31
- }, $icon && React.createElement(ChipSlotIcon, null, $icon), React.createElement(ChipLabel, {
32
- "$truncated": $maxWidth !== undefined
33
- }, children), isCloseable && React.createElement(ChipCloseIcon, {
34
- size: "small",
35
- onClick: $onClose,
36
- forwardedAs: "span"
37
- }), hasTooltip && React.createElement(ChipSlotIcon, null, React.createElement(TooltipTrigger, {
38
- view: "question",
39
- size: "small",
40
- position: "top-middle",
41
- content: $tooltip
42
- })));
31
+ ...rest,
32
+ children: [$icon && _jsx(ChipSlotIcon, {
33
+ children: $icon
34
+ }), _jsx(ChipLabel, {
35
+ "$truncated": $maxWidth !== undefined,
36
+ children: children
37
+ }), isCloseable && _jsx(ChipCloseIcon, {
38
+ size: "small",
39
+ onClick: $onClose,
40
+ forwardedAs: "span"
41
+ }), hasTooltip && _jsx(ChipSlotIcon, {
42
+ children: _jsx(TooltipTrigger, {
43
+ view: "question",
44
+ size: "small",
45
+ position: "top-middle",
46
+ content: $tooltip
47
+ })
48
+ })]
49
+ });
43
50
  });
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
1
  import { type CodeEditorProps } from './types';
3
- export declare const CodeEditor: ({ value, onChange, readOnly, width, height, onBlur, extensions, themeOptions, hasError, placeholder, }: CodeEditorProps) => React.JSX.Element;
2
+ export declare const CodeEditor: ({ value, onChange, readOnly, width, height, onBlur, extensions, themeOptions, hasError, placeholder, }: CodeEditorProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import createTheme from '@uiw/codemirror-themes';
2
- import React from 'react';
3
3
  import { defaultTheme } from './constants';
4
4
  import { CodeMirrorStyled } from './styles';
5
5
  export const CodeEditor = ({
@@ -14,7 +14,7 @@ export const CodeEditor = ({
14
14
  hasError,
15
15
  placeholder
16
16
  }) => {
17
- return React.createElement(CodeMirrorStyled, {
17
+ return _jsx(CodeMirrorStyled, {
18
18
  value: value,
19
19
  theme: themeOptions ? createTheme(themeOptions) : defaultTheme,
20
20
  readOnly: readOnly,
@@ -1,16 +1,24 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Color } from '@pushwoosh/kit-constants';
3
3
  import { WarningRoundIcon } from '@pushwoosh/kit-icons';
4
4
  import { Lang } from './polyglot';
5
5
  import { RootBox, IconBox, TitleBox, DescriptionBox } from './styles';
6
6
  export function CrashScreen() {
7
- return React.createElement(RootBox, null, React.createElement(IconBox, null, React.createElement(WarningRoundIcon, {
8
- size: "medium",
9
- view: "filled",
10
- color: Color.WARNING
11
- })), React.createElement(TitleBox, null, React.createElement(Lang, {
12
- message: "DUMB.CRASH_SCREEN.TITLE"
13
- })), React.createElement(DescriptionBox, null, React.createElement(Lang, {
14
- message: "DUMB.CRASH_SCREEN.DESCRIPTION"
15
- })));
7
+ return _jsxs(RootBox, {
8
+ children: [_jsx(IconBox, {
9
+ children: _jsx(WarningRoundIcon, {
10
+ size: "medium",
11
+ view: "filled",
12
+ color: Color.WARNING
13
+ })
14
+ }), _jsx(TitleBox, {
15
+ children: _jsx(Lang, {
16
+ message: "DUMB.CRASH_SCREEN.TITLE"
17
+ })
18
+ }), _jsx(DescriptionBox, {
19
+ children: _jsx(Lang, {
20
+ message: "DUMB.CRASH_SCREEN.DESCRIPTION"
21
+ })
22
+ })]
23
+ });
16
24
  }
@@ -1,4 +1,5 @@
1
- import React, { useRef, useState, useEffect } from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef, useState, useEffect } from 'react';
2
3
  import { Input } from '../Input';
3
4
  import { Hidden } from './styles';
4
5
  export function AutosizeInput(props) {
@@ -20,16 +21,19 @@ export function AutosizeInput(props) {
20
21
  const addWidth = offsetWidth ? 12 : 16;
21
22
  setWidth(offsetWidth + addWidth);
22
23
  }, [value]);
23
- return React.createElement(React.Fragment, null, React.createElement(Input, {
24
- value: value,
25
- placeholder: placeholder,
26
- width: width,
27
- isDisabled: isDisabled,
28
- onChange: onChange,
29
- onKeyUp: onKeyUp,
30
- onKeyDown: onKeyDown,
31
- onBlur: onBlur
32
- }), React.createElement(Hidden, {
33
- ref: ref
34
- }, value || placeholder));
24
+ return _jsxs(_Fragment, {
25
+ children: [_jsx(Input, {
26
+ value: value,
27
+ placeholder: placeholder,
28
+ width: width,
29
+ isDisabled: isDisabled,
30
+ onChange: onChange,
31
+ onKeyUp: onKeyUp,
32
+ onKeyDown: onKeyDown,
33
+ onBlur: onBlur
34
+ }), _jsx(Hidden, {
35
+ ref: ref,
36
+ children: value || placeholder
37
+ })]
38
+ });
35
39
  }