@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,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Columns } from '@pushwoosh/kit-helpers';
3
3
  import { format, addPeriod, setPeriod, monthName, isSamePeriod } from '../../helpers';
4
4
  import { CellBox, DateInfo } from '../../styles';
@@ -10,23 +10,27 @@ export function YearView(props) {
10
10
  onChange,
11
11
  onSelect
12
12
  } = props;
13
- return React.createElement(PickerPlate, {
13
+ return _jsx(PickerPlate, {
14
14
  onPrev: () => onChange(format(addPeriod(year, 'year', -1), 'year')),
15
15
  onNext: () => onChange(format(addPeriod(year, 'year', 1), 'year')),
16
- slot: React.createElement(DateInfo, null, year)
17
- }, React.createElement(Columns, {
18
- "$sizes": 4,
19
- "$gap": 4,
20
- "$justifyContent": "space-between"
21
- }, Array.from({
22
- length: 12
23
- }).map((_, i) => {
24
- const month = format(setPeriod(year, 'month', i + 1), 'year-month');
25
- return React.createElement(CellBox, {
26
- key: `${year}-${month}`,
27
- height: "59px",
28
- "$isActive": !!activeDay && isSamePeriod(month, activeDay, 'month'),
29
- onClick: () => onSelect(month)
30
- }, monthName(i + 1, 'short'));
31
- })));
16
+ slot: _jsx(DateInfo, {
17
+ children: year
18
+ }),
19
+ children: _jsx(Columns, {
20
+ "$sizes": 4,
21
+ "$gap": 4,
22
+ "$justifyContent": "space-between",
23
+ children: Array.from({
24
+ length: 12
25
+ }).map((_, i) => {
26
+ const month = format(setPeriod(year, 'month', i + 1), 'year-month');
27
+ return _jsx(CellBox, {
28
+ height: "59px",
29
+ "$isActive": !!activeDay && isSamePeriod(month, activeDay, 'month'),
30
+ onClick: () => onSelect(month),
31
+ children: monthName(i + 1, 'short')
32
+ }, `${year}-${month}`);
33
+ })
34
+ })
35
+ });
32
36
  }
@@ -1,4 +1,5 @@
1
- import React, { useRef, useState, useEffect, useCallback } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef, useState, useEffect, useCallback } from 'react';
2
3
  import { createPortal } from 'react-dom';
3
4
  import { drawerSizes } from './maps';
4
5
  import { DrawerBoxTrans, DrawerBox, LockBody, DrawerInner, DrawerContainer } from './styles';
@@ -40,18 +41,22 @@ export function Drawer({
40
41
  handleClose(event);
41
42
  }
42
43
  }, [handleClose, closeOnClickOutside]);
43
- return createPortal(React.createElement(DrawerBoxTrans, {
44
+ return createPortal(_jsx(DrawerBoxTrans, {
44
45
  nodeRef: ref,
45
46
  isOpen: isOpen,
46
- withoutLockScreen: withoutLockScreen
47
- }, React.createElement(DrawerBox, {
48
- ref: ref,
49
- "$zIndex": resolvedZIndex
50
- }, React.createElement(LockBody, null), React.createElement(DrawerInner, {
51
- onMouseDown: handleClickOutside,
52
- "$padding": padding
53
- }, React.createElement(DrawerContainer, {
54
- "$width": drawerSizes[size],
55
- onClick: handleClose
56
- }, children)))), element);
47
+ withoutLockScreen: withoutLockScreen,
48
+ children: _jsxs(DrawerBox, {
49
+ ref: ref,
50
+ "$zIndex": resolvedZIndex,
51
+ children: [_jsx(LockBody, {}), _jsx(DrawerInner, {
52
+ onMouseDown: handleClickOutside,
53
+ "$padding": padding,
54
+ children: _jsx(DrawerContainer, {
55
+ "$width": drawerSizes[size],
56
+ onClick: handleClose,
57
+ children: children
58
+ })
59
+ })]
60
+ })
61
+ }), element);
57
62
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { type FC } from 'react';
2
2
  import type { ContentPadding, DrawerBoxBaseProps, IDrawerBoxTransProps } from './types';
3
3
  export declare const LockBody: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
4
4
  export declare const DrawerBox: import("styled-components").StyledComponent<"div", any, {
@@ -7,7 +7,7 @@ export declare const DrawerBox: import("styled-components").StyledComponent<"div
7
7
  export declare const DrawerInner: import("styled-components").StyledComponent<"div", any, {
8
8
  $padding?: ContentPadding;
9
9
  }, never>;
10
- export declare const DrawerBoxTrans: import("styled-components").StyledComponent<React.FC<DrawerBoxBaseProps>, any, IDrawerBoxTransProps, never>;
10
+ export declare const DrawerBoxTrans: import("styled-components").StyledComponent<FC<DrawerBoxBaseProps>, any, IDrawerBoxTransProps, never>;
11
11
  export declare const DrawerContainer: import("styled-components").StyledComponent<"div", any, {
12
12
  $width: string;
13
13
  }, never>;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CSSTransition } from 'react-transition-group';
3
3
  import styled, { createGlobalStyle } from 'styled-components';
4
4
  import { ShapeRadius } from '@pushwoosh/kit-constants';
@@ -40,14 +40,15 @@ const DrawerBoxBase = props => {
40
40
  className,
41
41
  children
42
42
  } = props;
43
- return React.createElement(CSSTransition, {
43
+ return _jsx(CSSTransition, {
44
44
  appear: true,
45
45
  unmountOnExit: true,
46
46
  in: isOpen,
47
47
  timeout: animationTimeout,
48
48
  classNames: className,
49
- nodeRef: nodeRef
50
- }, children);
49
+ nodeRef: nodeRef,
50
+ children: children
51
+ });
51
52
  };
52
53
  export const DrawerBoxTrans = styled(DrawerBoxBase).withConfig({
53
54
  displayName: "DrawerBoxTrans",
@@ -1,4 +1,5 @@
1
- import React, { useEffect, useRef, useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from 'react';
2
3
  import { DrawerBodyIframe, IframeElement, LoadingBox } from './styles';
3
4
  import { Spinner } from '../../../Spinner';
4
5
  import { Lang, useLang } from '../../polyglot';
@@ -27,25 +28,29 @@ export function DrawerDocs(props) {
27
28
  window.removeEventListener('resize', updateDrawerWidth);
28
29
  };
29
30
  }, [isOpen]);
30
- return React.createElement(Drawer, {
31
+ return _jsx(Drawer, {
31
32
  size: "large",
32
33
  isOpen: isOpen,
33
- onClose: onClose
34
- }, React.createElement(DrawerBodyIframe, {
35
- ref: drawerDocsRef
36
- }, !iframeLoaded && React.createElement(LoadingBox, null, React.createElement(Spinner, {
37
- size: "medium"
38
- }), ' ', React.createElement(Lang, {
39
- message: "DUMB.DRAWER.DOCS_LOADING"
40
- })), React.createElement(IframeElement, {
41
- src: url,
42
- ref: iframeRef,
43
- title: lang({
44
- message: 'DUMB.DRAWER.DOCS_TITLE'
45
- }),
46
- width: drawerWidth,
47
- height: "95%",
48
- "$isLoaded": iframeLoaded,
49
- onLoad: () => setIframeLoaded(true)
50
- })));
34
+ onClose: onClose,
35
+ children: _jsxs(DrawerBodyIframe, {
36
+ ref: drawerDocsRef,
37
+ children: [!iframeLoaded && _jsxs(LoadingBox, {
38
+ children: [_jsx(Spinner, {
39
+ size: "medium"
40
+ }), ' ', _jsx(Lang, {
41
+ message: "DUMB.DRAWER.DOCS_LOADING"
42
+ })]
43
+ }), _jsx(IframeElement, {
44
+ src: url,
45
+ ref: iframeRef,
46
+ title: lang({
47
+ message: 'DUMB.DRAWER.DOCS_TITLE'
48
+ }),
49
+ width: drawerWidth,
50
+ height: "95%",
51
+ "$isLoaded": iframeLoaded,
52
+ onLoad: () => setIframeLoaded(true)
53
+ })]
54
+ })
55
+ });
51
56
  }
@@ -1,5 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { autoPlacement, size, offset, useFloating } from '@floating-ui/react-dom';
2
- import React, { useState, useEffect, useCallback } from 'react';
3
+ import { useState, useEffect, useCallback } from 'react';
3
4
  import { createPortal, flushSync } from 'react-dom';
4
5
  import { Place } from './styles';
5
6
  import { useLayer } from '../../../hooks';
@@ -75,27 +76,30 @@ export const DropdownMenu = ({
75
76
  }
76
77
  }
77
78
  }, [isOpen, isScrollable, refs.floating]);
78
- return React.createElement(DropdownContext.Provider, {
79
- value: setIsOpen
80
- }, renderHandler({
81
- onClick: () => {
82
- if (isOpen) {
83
- handleClose();
84
- } else {
85
- setIsOpen(true);
86
- }
87
- },
88
- ref: refs.setReference,
89
- isOpen
90
- }), isOpen && createPortal(React.createElement(DropdownZIndexContext.Provider, {
91
- value: resolvedZIndex
92
- }, React.createElement(Place, {
93
- ref: refs.setFloating,
94
- style: floatingStyles,
95
- "$color": color,
96
- "$width": width ?? undefined,
97
- "$fitContent": windowWidth === null && !fullWidth,
98
- "$scrollable": isScrollable,
99
- "$zIndex": resolvedZIndex
100
- }, renderChildren(children))), document.body));
79
+ return _jsxs(DropdownContext.Provider, {
80
+ value: setIsOpen,
81
+ children: [renderHandler({
82
+ onClick: () => {
83
+ if (isOpen) {
84
+ handleClose();
85
+ } else {
86
+ setIsOpen(true);
87
+ }
88
+ },
89
+ ref: refs.setReference,
90
+ isOpen
91
+ }), isOpen && createPortal(_jsx(DropdownZIndexContext.Provider, {
92
+ value: resolvedZIndex,
93
+ children: _jsx(Place, {
94
+ ref: refs.setFloating,
95
+ style: floatingStyles,
96
+ "$color": color,
97
+ "$width": width ?? undefined,
98
+ "$fitContent": windowWidth === null && !fullWidth,
99
+ "$scrollable": isScrollable,
100
+ "$zIndex": resolvedZIndex,
101
+ children: renderChildren(children)
102
+ })
103
+ }), document.body)]
104
+ });
101
105
  };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Button } from '../../../Button';
3
3
  import { DropdownMenu } from '../DropdownMenu';
4
4
  export const DropdownMenuButton = ({
@@ -13,7 +13,7 @@ export const DropdownMenuButton = ({
13
13
  children,
14
14
  ...buttonProps
15
15
  }) => {
16
- return React.createElement(DropdownMenu, {
16
+ return _jsx(DropdownMenu, {
17
17
  isScrollable: isScrollable,
18
18
  openOnMount: openOnMount,
19
19
  menuZIndex: menuZIndex,
@@ -23,13 +23,15 @@ export const DropdownMenuButton = ({
23
23
  ref,
24
24
  onClick,
25
25
  isOpen
26
- }) => React.createElement(Button, {
26
+ }) => _jsx(Button, {
27
27
  ...buttonProps,
28
28
  boxRef: ref,
29
29
  onClick: onClick,
30
30
  isOpen: isOpen,
31
31
  isDisabled: isDisabled,
32
- isLoading: isLoading
33
- }, label)
34
- }, children);
32
+ isLoading: isLoading,
33
+ children: label
34
+ }),
35
+ children: children
36
+ });
35
37
  };
@@ -1,4 +1,5 @@
1
- import React, { useContext } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext } from 'react';
2
3
  import { DropdownMenuItemStyled } from './styles';
3
4
  import { DropdownContext } from '../../context';
4
5
  export const DropdownMenuItem = ({
@@ -15,7 +16,7 @@ export const DropdownMenuItem = ({
15
16
  console.error('DropdownMenuItem must be inside DropdownMenu');
16
17
  }
17
18
  }
18
- return React.createElement(DropdownMenuItemStyled, {
19
+ return _jsx(DropdownMenuItemStyled, {
19
20
  "$active": isActive,
20
21
  "$danger": isDanger,
21
22
  onClick: () => {
@@ -25,6 +26,7 @@ export const DropdownMenuItem = ({
25
26
  onClick();
26
27
  },
27
28
  disabled: disabled,
28
- "data-active": isActive || undefined
29
- }, children);
29
+ "data-active": isActive || undefined,
30
+ children: children
31
+ });
30
32
  };
@@ -1,4 +1,4 @@
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 { Horizontal } from '@pushwoosh/kit-helpers';
4
4
  import { Text } from '@pushwoosh/kit-typography';
@@ -8,13 +8,16 @@ export const DropdownMenuSection = ({
8
8
  bgColor,
9
9
  children
10
10
  }) => {
11
- return React.createElement(DropdownMenuSectionRoot, {
12
- "$bgColor": bgColor
13
- }, title && React.createElement(Horizontal, {
14
- "$padding": "8px 12px"
15
- }, React.createElement(Text, {
16
- "$variant": "h5",
17
- "$color": Color.LOCKED,
18
- "$uppercase": true
19
- }, title)), children);
11
+ return _jsxs(DropdownMenuSectionRoot, {
12
+ "$bgColor": bgColor,
13
+ children: [title && _jsx(Horizontal, {
14
+ "$padding": "8px 12px",
15
+ children: _jsx(Text, {
16
+ "$variant": "h5",
17
+ "$color": Color.LOCKED,
18
+ "$uppercase": true,
19
+ children: title
20
+ })
21
+ }), children]
22
+ });
20
23
  };
@@ -1,5 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { flip, shift, useFloating } from '@floating-ui/react-dom';
2
- import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
3
+ import { useCallback, useContext, useEffect, useRef, useState } from 'react';
3
4
  import { createPortal } from 'react-dom';
4
5
  import { ChevronIcon } from '@pushwoosh/kit-icons';
5
6
  import { SubmenuTriggerInner } from './styles';
@@ -58,34 +59,42 @@ export const DropdownMenuSubmenu = ({
58
59
  setIsOpen(false);
59
60
  parentClose === null || parentClose === void 0 || parentClose(false);
60
61
  }, [parentClose]);
61
- return React.createElement(DropdownContext.Provider, {
62
- value: closeChain
63
- }, React.createElement(DropdownZIndexContext.Provider, {
64
- value: submenuZIndex
65
- }, React.createElement(DropdownMenuItemStyled, {
66
- ref: refs.setReference,
67
- type: "button",
68
- "$active": isOpen,
69
- "$danger": isDanger,
70
- disabled: disabled,
71
- onMouseEnter: scheduleOpen,
72
- onMouseLeave: scheduleClose,
73
- onClick: () => {
74
- if (disabled) return;
75
- clearTimers();
76
- openedByClick.current = !isOpen;
77
- setIsOpen(prev => !prev);
78
- }
79
- }, React.createElement(SubmenuTriggerInner, null, React.createElement("span", null, label), React.createElement(ChevronIcon, {
80
- direction: "right",
81
- size: "small"
82
- }))), isOpen && createPortal(React.createElement(Place, {
83
- ref: refs.setFloating,
84
- style: floatingStyles,
85
- "$fitContent": true,
86
- "$zIndex": submenuZIndex,
87
- onMouseEnter: clearTimers,
88
- onMouseLeave: scheduleClose,
89
- onClick: e => e.stopPropagation()
90
- }, renderChildren(children)), document.body)));
62
+ return _jsx(DropdownContext.Provider, {
63
+ value: closeChain,
64
+ children: _jsxs(DropdownZIndexContext.Provider, {
65
+ value: submenuZIndex,
66
+ children: [_jsx(DropdownMenuItemStyled, {
67
+ ref: refs.setReference,
68
+ type: "button",
69
+ "$active": isOpen,
70
+ "$danger": isDanger,
71
+ disabled: disabled,
72
+ onMouseEnter: scheduleOpen,
73
+ onMouseLeave: scheduleClose,
74
+ onClick: () => {
75
+ if (disabled) return;
76
+ clearTimers();
77
+ openedByClick.current = !isOpen;
78
+ setIsOpen(prev => !prev);
79
+ },
80
+ children: _jsxs(SubmenuTriggerInner, {
81
+ children: [_jsx("span", {
82
+ children: label
83
+ }), _jsx(ChevronIcon, {
84
+ direction: "right",
85
+ size: "small"
86
+ })]
87
+ })
88
+ }), isOpen && createPortal(_jsx(Place, {
89
+ ref: refs.setFloating,
90
+ style: floatingStyles,
91
+ "$fitContent": true,
92
+ "$zIndex": submenuZIndex,
93
+ onMouseEnter: clearTimers,
94
+ onMouseLeave: scheduleClose,
95
+ onClick: e => e.stopPropagation(),
96
+ children: renderChildren(children)
97
+ }), document.body)]
98
+ })
99
+ });
91
100
  };
@@ -1,4 +1,5 @@
1
- import React, { useRef } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef } from 'react';
2
3
  import { Color } from '@pushwoosh/kit-constants';
3
4
  import { Vertical } from '@pushwoosh/kit-helpers';
4
5
  import { DropdownIcon, EditIcon } from '@pushwoosh/kit-icons';
@@ -23,46 +24,57 @@ export function EditableField({
23
24
  const rootRef = useRef(null);
24
25
  const buttonRef = useRef(null);
25
26
  useOnClickOutside(rootRef, onCancel);
26
- return React.createElement(PopoverContainer, {
27
- ref: rootRef
28
- }, React.createElement(FieldBox, {
29
- open: open,
30
- onClick: onToggleOpen,
31
- ref: buttonRef
32
- }, React.createElement("span", null, value), open ? React.createElement(DropdownIcon, {
33
- direction: "up",
34
- size: "small",
35
- color: Color.CLEAR
36
- }) : React.createElement(EditIcon, {
37
- view: "lined",
38
- size: "small"
39
- })), React.createElement(Popover, {
40
- open: open,
41
- position: position,
42
- anchorEl: buttonRef,
43
- windowWidth: width,
44
- internalWindowRef: rootRef,
45
- loading: loading,
46
- zIndex: zIndex
47
- }, React.createElement(Vertical, {
48
- "$padding": 16
49
- }, title && React.createElement(TitleBox, null, title), children, React.createElement(ButtonsGroup, {
50
- "$isLoading": loading
51
- }, React.createElement(Button, {
52
- view: "shape",
53
- color: "primary",
54
- size: "compact",
55
- isLoading: loading,
56
- onClick: onSubmit
57
- }, React.createElement(Lang, {
58
- message: "DUMB.EDITABLE_FIELD.SUBMIT"
59
- })), React.createElement(Button, {
60
- view: "shape",
61
- color: "secondary",
62
- size: "compact",
63
- isDisabled: loading,
64
- onClick: onCancel
65
- }, React.createElement(Lang, {
66
- message: "DUMB.EDITABLE_FIELD.CANCEL"
67
- }))))));
27
+ return _jsxs(PopoverContainer, {
28
+ ref: rootRef,
29
+ children: [_jsxs(FieldBox, {
30
+ open: open,
31
+ onClick: onToggleOpen,
32
+ ref: buttonRef,
33
+ children: [_jsx("span", {
34
+ children: value
35
+ }), open ? _jsx(DropdownIcon, {
36
+ direction: "up",
37
+ size: "small",
38
+ color: Color.CLEAR
39
+ }) : _jsx(EditIcon, {
40
+ view: "lined",
41
+ size: "small"
42
+ })]
43
+ }), _jsx(Popover, {
44
+ open: open,
45
+ position: position,
46
+ anchorEl: buttonRef,
47
+ windowWidth: width,
48
+ internalWindowRef: rootRef,
49
+ loading: loading,
50
+ zIndex: zIndex,
51
+ children: _jsxs(Vertical, {
52
+ "$padding": 16,
53
+ children: [title && _jsx(TitleBox, {
54
+ children: title
55
+ }), children, _jsxs(ButtonsGroup, {
56
+ "$isLoading": loading,
57
+ children: [_jsx(Button, {
58
+ view: "shape",
59
+ color: "primary",
60
+ size: "compact",
61
+ isLoading: loading,
62
+ onClick: onSubmit,
63
+ children: _jsx(Lang, {
64
+ message: "DUMB.EDITABLE_FIELD.SUBMIT"
65
+ })
66
+ }), _jsx(Button, {
67
+ view: "shape",
68
+ color: "secondary",
69
+ size: "compact",
70
+ isDisabled: loading,
71
+ onClick: onCancel,
72
+ children: _jsx(Lang, {
73
+ message: "DUMB.EDITABLE_FIELD.CANCEL"
74
+ })
75
+ })]
76
+ })]
77
+ })
78
+ })]
79
+ });
68
80
  }
@@ -1,5 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { Liquid } from 'liquidjs';
2
- import React, { useMemo, useState } from 'react';
3
+ import { useMemo, useState } from 'react';
3
4
  import { replaceLocalization, replacePlaceholders } from './helpers';
4
5
  import { IframeStyled } from './styles';
5
6
  const createLiquidInstance = () => {
@@ -37,13 +38,14 @@ export function EmailTemplatePreview(props) {
37
38
  return `<body style="font-size: 24px; color: darkred">${e.message}</body>`;
38
39
  }
39
40
  }, [template, localization, values, liquidInstance]);
40
- return React.createElement(IframeStyled, {
41
+ return _jsx(IframeStyled, {
41
42
  "$scale": scale,
42
43
  "$width": width,
43
- "$height": height
44
- }, React.createElement("iframe", {
45
- srcDoc: src,
46
- sandbox: "allow-same-origin",
47
- title: "preview"
48
- }));
44
+ "$height": height,
45
+ children: _jsx("iframe", {
46
+ srcDoc: src,
47
+ sandbox: "allow-same-origin",
48
+ title: "preview"
49
+ })
50
+ });
49
51
  }
@@ -1,4 +1,4 @@
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 { Vertical } from '@pushwoosh/kit-helpers';
4
4
  import { Text } from '@pushwoosh/kit-typography';
@@ -7,26 +7,32 @@ import { Container, PreviewMock } from './styles';
7
7
  import { Lang, useLang } from '../../polyglot';
8
8
  export function NoEmailTemplatePreview() {
9
9
  const lang = useLang();
10
- return React.createElement(Container, {
10
+ return _jsxs(Container, {
11
11
  "$padding": "12px 12px 24px",
12
- "$gap": 12
13
- }, React.createElement(PreviewMock, {
14
- "$alignItems": "center",
15
- "$justifyContent": "center"
16
- }, React.createElement("img", {
17
- src: Email,
18
- alt: lang({
19
- message: 'DUMB.EMAIL_TEMPLATE_PREVIEW.ALT'
20
- })
21
- })), React.createElement(Vertical, null, React.createElement(Text, {
22
- "$variant": "footnote",
23
- "$color": Color.LOCKED
24
- }, React.createElement(Lang, {
25
- message: "DUMB.EMAIL_TEMPLATE_PREVIEW.CONTENT_MISSED"
26
- })), React.createElement(Text, {
27
- "$variant": "footnote",
28
- "$color": Color.LOCKED
29
- }, React.createElement(Lang, {
30
- message: "DUMB.EMAIL_TEMPLATE_PREVIEW.HINT"
31
- }))));
12
+ "$gap": 12,
13
+ children: [_jsx(PreviewMock, {
14
+ "$alignItems": "center",
15
+ "$justifyContent": "center",
16
+ children: _jsx("img", {
17
+ src: Email,
18
+ alt: lang({
19
+ message: 'DUMB.EMAIL_TEMPLATE_PREVIEW.ALT'
20
+ })
21
+ })
22
+ }), _jsxs(Vertical, {
23
+ children: [_jsx(Text, {
24
+ "$variant": "footnote",
25
+ "$color": Color.LOCKED,
26
+ children: _jsx(Lang, {
27
+ message: "DUMB.EMAIL_TEMPLATE_PREVIEW.CONTENT_MISSED"
28
+ })
29
+ }), _jsx(Text, {
30
+ "$variant": "footnote",
31
+ "$color": Color.LOCKED,
32
+ children: _jsx(Lang, {
33
+ message: "DUMB.EMAIL_TEMPLATE_PREVIEW.HINT"
34
+ })
35
+ })]
36
+ })]
37
+ });
32
38
  }
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
- export declare const EnhancedInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & import("../native/Input").NativeInputProps & {
3
- $icon?: React.ReactNode;
1
+ export declare const EnhancedInput: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & import("../native/Input").NativeInputProps & {
2
+ $icon?: import("react").ReactNode;
4
3
  $onClear?: () => void;
5
4
  hint?: string;
6
- } & React.RefAttributes<HTMLInputElement>>;
5
+ } & import("react").RefAttributes<HTMLInputElement>>;