@capillarytech/creatives-library 8.0.242-alpha.0 → 8.0.242-alpha.1

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 (215) hide show
  1. package/assets/Android.png +0 -0
  2. package/assets/iOS.png +0 -0
  3. package/constants/unified.js +2 -1
  4. package/initialReducer.js +2 -0
  5. package/package.json +1 -1
  6. package/sagas/__tests__/assetPolling.test.js +74 -3
  7. package/sagas/assetPolling.js +8 -1
  8. package/services/api.js +10 -5
  9. package/services/tests/api.test.js +18 -0
  10. package/translations/en.json +0 -1
  11. package/utils/common.js +5 -0
  12. package/utils/commonUtils.js +14 -1
  13. package/utils/tests/commonUtil.test.js +224 -0
  14. package/utils/transformTemplateConfig.js +0 -10
  15. package/utils/transformerUtils.js +0 -42
  16. package/v2Components/CapDeviceContent/index.js +61 -56
  17. package/v2Components/CapImageUpload/constants.js +0 -2
  18. package/v2Components/CapImageUpload/index.js +14 -54
  19. package/v2Components/CapImageUpload/index.scss +1 -4
  20. package/v2Components/CapImageUpload/messages.js +0 -4
  21. package/v2Components/CapTagList/index.js +6 -1
  22. package/v2Components/CapTagListWithInput/index.js +5 -1
  23. package/v2Components/CapTagListWithInput/messages.js +1 -1
  24. package/v2Components/CapWhatsappCTA/tests/index.test.js +5 -0
  25. package/v2Components/ErrorInfoNote/index.js +412 -72
  26. package/v2Components/ErrorInfoNote/messages.js +22 -0
  27. package/v2Components/ErrorInfoNote/style.scss +279 -2
  28. package/v2Components/HtmlEditor/HTMLEditor.js +210 -89
  29. package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +1132 -133
  30. package/v2Components/HtmlEditor/__tests__/index.lazy.test.js +17 -12
  31. package/v2Components/HtmlEditor/_htmlEditor.scss +8 -23
  32. package/v2Components/HtmlEditor/_index.lazy.scss +1 -1
  33. package/v2Components/HtmlEditor/components/CodeEditorPane/_codeEditorPane.scss +13 -101
  34. package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +148 -139
  35. package/v2Components/HtmlEditor/components/DeviceToggle/_deviceToggle.scss +2 -1
  36. package/v2Components/HtmlEditor/components/DeviceToggle/index.js +3 -3
  37. package/v2Components/HtmlEditor/components/EditorToolbar/index.js +1 -1
  38. package/v2Components/HtmlEditor/components/FullscreenModal/_fullscreenModal.scss +1 -0
  39. package/v2Components/HtmlEditor/components/InAppPreviewPane/DeviceFrame.js +4 -7
  40. package/v2Components/HtmlEditor/components/InAppPreviewPane/__tests__/DeviceFrame.test.js +35 -45
  41. package/v2Components/HtmlEditor/components/InAppPreviewPane/_inAppPreviewPane.scss +1 -3
  42. package/v2Components/HtmlEditor/components/InAppPreviewPane/constants.js +33 -33
  43. package/v2Components/HtmlEditor/components/InAppPreviewPane/index.js +7 -6
  44. package/v2Components/HtmlEditor/components/PreviewPane/_previewPane.scss +3 -6
  45. package/v2Components/HtmlEditor/components/PreviewPane/index.js +10 -11
  46. package/v2Components/HtmlEditor/components/SplitContainer/_splitContainer.scss +1 -1
  47. package/v2Components/HtmlEditor/components/ValidationErrorDisplay/__tests__/index.test.js +87 -62
  48. package/v2Components/HtmlEditor/components/ValidationErrorDisplay/index.js +49 -31
  49. package/v2Components/HtmlEditor/components/ValidationTabs/_validationTabs.scss +254 -0
  50. package/v2Components/HtmlEditor/components/ValidationTabs/index.js +362 -0
  51. package/v2Components/HtmlEditor/components/ValidationTabs/messages.js +51 -0
  52. package/v2Components/HtmlEditor/constants.js +29 -20
  53. package/v2Components/HtmlEditor/hooks/__tests__/useInAppContent.test.js +373 -16
  54. package/v2Components/HtmlEditor/hooks/useEditorContent.js +5 -2
  55. package/v2Components/HtmlEditor/hooks/useInAppContent.js +88 -146
  56. package/v2Components/HtmlEditor/index.js +1 -1
  57. package/v2Components/HtmlEditor/messages.js +95 -85
  58. package/v2Components/HtmlEditor/utils/liquidTemplateSupport.js +99 -101
  59. package/v2Components/HtmlEditor/utils/properSyntaxHighlighting.js +23 -25
  60. package/v2Components/HtmlEditor/utils/validationAdapter.js +34 -41
  61. package/v2Components/MobilePushPreviewV2/index.js +32 -7
  62. package/v2Components/TemplatePreview/_templatePreview.scss +44 -24
  63. package/v2Components/TemplatePreview/index.js +47 -32
  64. package/v2Components/TemplatePreview/messages.js +4 -0
  65. package/v2Components/TestAndPreviewSlidebox/index.js +31 -25
  66. package/v2Containers/App/constants.js +0 -5
  67. package/v2Containers/BeeEditor/index.js +82 -80
  68. package/v2Containers/BeePopupEditor/constants.js +10 -0
  69. package/v2Containers/BeePopupEditor/index.js +193 -0
  70. package/v2Containers/BeePopupEditor/tests/index.test.js +627 -0
  71. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +0 -1
  72. package/v2Containers/CreativesContainer/SlideBoxContent.js +148 -120
  73. package/v2Containers/CreativesContainer/SlideBoxFooter.js +9 -3
  74. package/v2Containers/CreativesContainer/SlideBoxHeader.js +2 -2
  75. package/v2Containers/CreativesContainer/constants.js +1 -2
  76. package/v2Containers/CreativesContainer/index.js +173 -193
  77. package/v2Containers/CreativesContainer/messages.js +4 -4
  78. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +38 -50
  79. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +36 -0
  80. package/v2Containers/Email/actions.js +7 -0
  81. package/v2Containers/Email/constants.js +5 -1
  82. package/v2Containers/Email/index.js +13 -0
  83. package/v2Containers/Email/messages.js +32 -0
  84. package/v2Containers/Email/reducer.js +12 -1
  85. package/v2Containers/Email/sagas.js +41 -6
  86. package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +2 -0
  87. package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +1045 -0
  88. package/v2Containers/EmailWrapper/components/EmailWrapperView.js +193 -7
  89. package/v2Containers/EmailWrapper/components/HTMLEditorTesting.js +40 -74
  90. package/v2Containers/EmailWrapper/components/__tests__/HTMLEditorTesting.test.js +2 -67
  91. package/v2Containers/EmailWrapper/constants.js +2 -0
  92. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +436 -67
  93. package/v2Containers/EmailWrapper/index.js +99 -23
  94. package/v2Containers/EmailWrapper/messages.js +61 -1
  95. package/v2Containers/EmailWrapper/tests/EmailWrapperView.test.js +26 -1
  96. package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +111 -77
  97. package/v2Containers/InApp/__tests__/InAppHTMLEditor.test.js +376 -0
  98. package/v2Containers/InApp/__tests__/sagas.test.js +363 -0
  99. package/v2Containers/InApp/actions.js +7 -0
  100. package/v2Containers/InApp/constants.js +20 -4
  101. package/v2Containers/InApp/index.js +800 -357
  102. package/v2Containers/InApp/index.scss +4 -3
  103. package/v2Containers/InApp/messages.js +7 -3
  104. package/v2Containers/InApp/reducer.js +21 -3
  105. package/v2Containers/InApp/sagas.js +29 -9
  106. package/v2Containers/InApp/selectors.js +25 -5
  107. package/v2Containers/InApp/tests/index.test.js +154 -50
  108. package/v2Containers/InApp/tests/reducer.test.js +34 -0
  109. package/v2Containers/InApp/tests/sagas.test.js +61 -9
  110. package/v2Containers/InApp/tests/selectors.test.js +612 -0
  111. package/v2Containers/InAppWrapper/components/InAppWrapperView.js +162 -0
  112. package/v2Containers/InAppWrapper/components/__tests__/InAppWrapperView.test.js +267 -0
  113. package/v2Containers/InAppWrapper/components/inAppWrapperView.scss +9 -0
  114. package/v2Containers/InAppWrapper/constants.js +16 -0
  115. package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +473 -0
  116. package/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +198 -0
  117. package/v2Containers/InAppWrapper/index.js +148 -0
  118. package/v2Containers/InAppWrapper/messages.js +49 -0
  119. package/v2Containers/InappAdvance/index.js +1099 -0
  120. package/v2Containers/InappAdvance/index.scss +10 -0
  121. package/v2Containers/InappAdvance/tests/index.test.js +448 -0
  122. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -3
  123. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -2
  124. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +2 -25
  125. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +9 -18
  126. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +12 -46
  127. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +0 -4
  128. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4 -8
  129. package/v2Containers/TagList/index.js +67 -1
  130. package/v2Containers/Templates/ChannelTypeIllustration.js +1 -13
  131. package/v2Containers/Templates/_templates.scss +56 -200
  132. package/v2Containers/Templates/actions.js +1 -2
  133. package/v2Containers/Templates/constants.js +0 -1
  134. package/v2Containers/Templates/index.js +124 -277
  135. package/v2Containers/Templates/messages.js +4 -24
  136. package/v2Containers/Templates/reducer.js +0 -2
  137. package/v2Containers/Templates/tests/index.test.js +0 -10
  138. package/v2Containers/TemplatesV2/index.js +2 -3
  139. package/v2Containers/TemplatesV2/messages.js +0 -4
  140. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +35 -132
  141. package/v2Components/CapImageUrlUpload/constants.js +0 -19
  142. package/v2Components/CapImageUrlUpload/index.js +0 -455
  143. package/v2Components/CapImageUrlUpload/index.scss +0 -35
  144. package/v2Components/CapImageUrlUpload/messages.js +0 -47
  145. package/v2Containers/WebPush/Create/components/ButtonForm.js +0 -175
  146. package/v2Containers/WebPush/Create/components/ButtonItem.js +0 -101
  147. package/v2Containers/WebPush/Create/components/ButtonList.js +0 -144
  148. package/v2Containers/WebPush/Create/components/_buttons.scss +0 -246
  149. package/v2Containers/WebPush/Create/components/tests/ButtonForm.test.js +0 -554
  150. package/v2Containers/WebPush/Create/components/tests/ButtonItem.test.js +0 -607
  151. package/v2Containers/WebPush/Create/components/tests/ButtonList.test.js +0 -633
  152. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonForm.test.js.snap +0 -666
  153. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonItem.test.js.snap +0 -74
  154. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonList.test.js.snap +0 -80
  155. package/v2Containers/WebPush/Create/index.js +0 -1755
  156. package/v2Containers/WebPush/Create/index.scss +0 -123
  157. package/v2Containers/WebPush/Create/messages.js +0 -199
  158. package/v2Containers/WebPush/Create/preview/DevicePreviewContent.js +0 -241
  159. package/v2Containers/WebPush/Create/preview/NotificationContainer.js +0 -290
  160. package/v2Containers/WebPush/Create/preview/PreviewContent.js +0 -81
  161. package/v2Containers/WebPush/Create/preview/PreviewControls.js +0 -240
  162. package/v2Containers/WebPush/Create/preview/PreviewDisclaimer.js +0 -23
  163. package/v2Containers/WebPush/Create/preview/WebPushPreview.js +0 -144
  164. package/v2Containers/WebPush/Create/preview/assets/Light.svg +0 -53
  165. package/v2Containers/WebPush/Create/preview/assets/Top.svg +0 -5
  166. package/v2Containers/WebPush/Create/preview/assets/chrome-icon.png +0 -0
  167. package/v2Containers/WebPush/Create/preview/assets/edge-icon.png +0 -0
  168. package/v2Containers/WebPush/Create/preview/assets/firefox-icon.svg +0 -106
  169. package/v2Containers/WebPush/Create/preview/assets/iOS.svg +0 -26
  170. package/v2Containers/WebPush/Create/preview/assets/opera-icon.svg +0 -18
  171. package/v2Containers/WebPush/Create/preview/assets/safari-icon.svg +0 -29
  172. package/v2Containers/WebPush/Create/preview/components/AndroidMobileChromeHeader.js +0 -44
  173. package/v2Containers/WebPush/Create/preview/components/AndroidMobileExpanded.js +0 -110
  174. package/v2Containers/WebPush/Create/preview/components/IOSHeader.js +0 -45
  175. package/v2Containers/WebPush/Create/preview/components/NotificationExpandedContent.js +0 -72
  176. package/v2Containers/WebPush/Create/preview/components/NotificationHeader.js +0 -55
  177. package/v2Containers/WebPush/Create/preview/components/WindowsChromeExpanded.js +0 -70
  178. package/v2Containers/WebPush/Create/preview/components/tests/AndroidMobileExpanded.test.js +0 -512
  179. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/AndroidMobileExpanded.test.js.snap +0 -77
  180. package/v2Containers/WebPush/Create/preview/config/notificationMappings.js +0 -527
  181. package/v2Containers/WebPush/Create/preview/constants.js +0 -162
  182. package/v2Containers/WebPush/Create/preview/notification-container.scss +0 -104
  183. package/v2Containers/WebPush/Create/preview/preview.scss +0 -409
  184. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-chrome.scss +0 -300
  185. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-edge.scss +0 -12
  186. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-firefox.scss +0 -12
  187. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-opera.scss +0 -12
  188. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-chrome.scss +0 -303
  189. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-edge.scss +0 -11
  190. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-firefox.scss +0 -11
  191. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-opera.scss +0 -11
  192. package/v2Containers/WebPush/Create/preview/styles/_base.scss +0 -188
  193. package/v2Containers/WebPush/Create/preview/styles/_ios.scss +0 -106
  194. package/v2Containers/WebPush/Create/preview/styles/_ipados.scss +0 -107
  195. package/v2Containers/WebPush/Create/preview/styles/_macos-chrome.scss +0 -75
  196. package/v2Containers/WebPush/Create/preview/styles/_windows-chrome.scss +0 -174
  197. package/v2Containers/WebPush/Create/preview/tests/DevicePreviewContent.test.js +0 -909
  198. package/v2Containers/WebPush/Create/preview/tests/NotificationContainer.test.js +0 -1077
  199. package/v2Containers/WebPush/Create/preview/tests/PreviewControls.test.js +0 -723
  200. package/v2Containers/WebPush/Create/preview/tests/WebPushPreview.test.js +0 -943
  201. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/DevicePreviewContent.test.js.snap +0 -128
  202. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/NotificationContainer.test.js.snap +0 -121
  203. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/PreviewControls.test.js.snap +0 -144
  204. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/WebPushPreview.test.js.snap +0 -127
  205. package/v2Containers/WebPush/Create/utils/urlValidation.js +0 -116
  206. package/v2Containers/WebPush/Create/utils/urlValidation.test.js +0 -449
  207. package/v2Containers/WebPush/actions.js +0 -60
  208. package/v2Containers/WebPush/constants.js +0 -108
  209. package/v2Containers/WebPush/index.js +0 -2
  210. package/v2Containers/WebPush/reducer.js +0 -104
  211. package/v2Containers/WebPush/sagas.js +0 -119
  212. package/v2Containers/WebPush/selectors.js +0 -65
  213. package/v2Containers/WebPush/tests/reducer.test.js +0 -863
  214. package/v2Containers/WebPush/tests/sagas.test.js +0 -566
  215. package/v2Containers/WebPush/tests/selectors.test.js +0 -960
@@ -1,104 +0,0 @@
1
- /**
2
- * Notification Container Styles
3
- *
4
- * Standalone, reusable notification container component.
5
- * Supports multiple platform + browser + state combinations.
6
- *
7
- * Usage:
8
- * <div className="notification-container macos-chrome expanded">
9
- * <!-- notification content -->
10
- * </div>
11
- *
12
- * Modifiers:
13
- * - Platform: macos, ios, ipados, windows, android-mobile, android-tablet
14
- * - Browser: chrome, firefox, edge, safari, opera
15
- * - State: expanded, collapsed
16
- *
17
- * This file imports all platform-specific styles from the styles/ directory.
18
- */
19
-
20
- // Import base styles (common notification container structure)
21
- @import './styles/_base';
22
-
23
- // Import implemented platform + browser combinations
24
- @import './styles/_macos-chrome';
25
- @import './styles/_windows-chrome';
26
- @import './styles/_android-mobile-chrome';
27
- @import './styles/_android-mobile-firefox';
28
- @import './styles/_android-mobile-edge';
29
- @import './styles/_android-mobile-opera';
30
- @import './styles/_android-tablet-chrome';
31
- @import './styles/_android-tablet-firefox';
32
- @import './styles/_android-tablet-edge';
33
- @import './styles/_android-tablet-opera';
34
- @import './styles/_ios';
35
- @import './styles/_ipados';
36
-
37
- // ============================================================================
38
- // Placeholder styles for other platform + browser combinations
39
- // These can be implemented as needed
40
- // ============================================================================
41
-
42
- // macOS + Firefox
43
- .notification-container.macos-firefox {
44
- // TODO: Implement macOS Firefox styles
45
- @extend .notification-container.macos-chrome;
46
- }
47
-
48
- // macOS + Safari
49
- .notification-container.macos-safari {
50
- // TODO: Implement macOS Safari styles
51
- @extend .notification-container.macos-chrome;
52
- }
53
-
54
- // macOS + Edge
55
- .notification-container.macos-edge {
56
- // TODO: Implement macOS Edge styles
57
- @extend .notification-container.macos-chrome;
58
- }
59
-
60
- // macOS + Opera
61
- .notification-container.macos-opera {
62
- // TODO: Implement macOS Opera styles
63
- @extend .notification-container.macos-chrome;
64
- }
65
-
66
- // iOS and iPadOS styles are imported from _ios.scss and _ipados.scss
67
- // All browsers on iOS/iPadOS use the same simple notification style
68
-
69
- // Windows + Firefox - Reuse Windows Chrome styles
70
- .notification-container.windows-firefox {
71
- @extend .notification-container.windows-chrome;
72
- }
73
-
74
- // Windows + Edge - Reuse Windows Chrome styles
75
- .notification-container.windows-edge {
76
- @extend .notification-container.windows-chrome;
77
- }
78
-
79
- // Windows + Opera - Reuse Windows Chrome styles
80
- .notification-container.windows-opera {
81
- @extend .notification-container.windows-chrome;
82
- }
83
-
84
- // Android (Mobile) + Firefox - Reuse Android Chrome styles
85
- // Styles are imported from _android-mobile-firefox.scss
86
-
87
- // Android (Mobile) + Edge - Reuse Android Chrome styles
88
- // Styles are imported from _android-mobile-edge.scss
89
-
90
- // Android (Mobile) + Opera - Reuse Android Chrome styles
91
- // Styles are imported from _android-mobile-opera.scss
92
-
93
- // Android (Tablet) + Chrome
94
- // Styles are imported from _android-tablet-chrome.scss
95
-
96
- // Android (Tablet) + Firefox - Reuse Android Tablet Chrome styles
97
- // Styles are imported from _android-tablet-firefox.scss
98
-
99
- // Android (Tablet) + Edge - Reuse Android Tablet Chrome styles
100
- // Styles are imported from _android-tablet-edge.scss
101
-
102
- // Android (Tablet) + Opera - Reuse Android Tablet Chrome styles
103
- // Styles are imported from _android-tablet-opera.scss
104
-
@@ -1,409 +0,0 @@
1
- @import '~@capillarytech/cap-ui-library/styles/_variables';
2
- @import './notification-container';
3
-
4
- .webpush-preview-container {
5
- .preview-controls {
6
- display: flex;
7
- margin-bottom: 1rem;
8
-
9
- .preview-control-os,
10
- .preview-control-browser,
11
- .preview-control-state {
12
- flex: 1;
13
- min-width: 0;
14
-
15
- > * {
16
- max-width: 100%;
17
- }
18
- }
19
-
20
- .preview-control-browser {
21
- margin-left: 1rem;
22
- }
23
-
24
- .preview-control-label {
25
- margin-bottom: 0.5rem;
26
- display: block;
27
- color: $FONT_COLOR_01;
28
- }
29
- }
30
-
31
- .preview-controls-compact {
32
- display: block;
33
- margin-bottom: 1rem;
34
-
35
- .preview-control {
36
- display: inline-block;
37
- vertical-align: top;
38
- margin-right: 0.75rem;
39
- width: auto;
40
-
41
- &:last-child {
42
- margin-right: 0;
43
- }
44
-
45
- > * {
46
- max-width: none;
47
- }
48
- }
49
-
50
- .preview-control-os,
51
- .preview-control-browser,
52
- .preview-control-state {
53
- flex: none;
54
- min-width: 0;
55
- }
56
-
57
- .preview-control-browser {
58
- margin-left: 0;
59
- }
60
-
61
- .preview-control-label {
62
- margin-bottom: 0.5rem;
63
- display: block;
64
- color: $FONT_COLOR_01;
65
- }
66
- }
67
-
68
- .preview-controls-state {
69
- // Additional spacing below State dropdown when shown
70
- // This ensures proper spacing between State dropdown and notification preview
71
- margin-bottom: 1rem;
72
-
73
- .preview-control-state {
74
- > * {
75
- max-width: 100%;
76
- }
77
- }
78
-
79
- .preview-control-label {
80
- margin-bottom: 0.5rem;
81
- display: block;
82
- color: $FONT_COLOR_01;
83
- }
84
- }
85
-
86
- .preview-content {
87
- margin-bottom: 1rem;
88
-
89
- .preview-content-wrapper {
90
- width: 100%;
91
- }
92
-
93
- .preview-placeholder {
94
- padding: 1.25rem;
95
- background-color: $CAP_G09;
96
- border-radius: 0.5rem;
97
- min-height: 12.5rem;
98
- display: flex;
99
- align-items: center;
100
- justify-content: center;
101
- color: $CAP_G05;
102
- font-size: $FONT_SIZE_S;
103
- }
104
-
105
- // Notification preview wrapper - styles for preview area container only
106
- // This class handles positioning, background, padding, and layout constraints
107
- // The actual notification styles are in notification-container.scss
108
- .notification-preview {
109
- background-color: $CAP_G09;
110
- border-radius: 0.5rem;
111
- padding: 1.25rem;
112
- display: flex;
113
- align-items: center;
114
- justify-content: center;
115
- // Additional positioning/container styles can be added here
116
- // but NOT styles for .notification-container itself
117
- &.preview-unavailable {
118
- background-color: transparent;
119
- border: 1px dashed $CAP_G06;
120
- min-height: 5.25rem;
121
- }
122
-
123
- // ========================================================================
124
- // Width Override for All Platforms in Sidebar Preview
125
- // ========================================================================
126
- // Override: Set width to 100% for all notification containers to prevent
127
- // overflow in the small sidebar preview.
128
- // Note: This override is necessary only for the sidebar preview.
129
- // Users will select "Preview in all devices" to get the most accurate
130
- // preview as written in the disclaimer.
131
- .notification-container {
132
- width: 100% !important;
133
- }
134
- }
135
- }
136
-
137
- .preview-disclaimer {
138
- .disclaimer-text {
139
- color: $CAP_G05;
140
- font-size: $FONT_SIZE_S;
141
- line-height: 1.5;
142
- text-align: center;
143
- }
144
- }
145
-
146
- .preview-all-devices-button {
147
- margin-top: 1rem;
148
- text-align: center;
149
-
150
- .preview-all-devices-trigger {
151
- border: none;
152
- background: transparent;
153
- color: map-get($CAP_SECONDARY, base);
154
- font-weight: $FONT_WEIGHT_MEDIUM;
155
- border-radius: 0.5rem;
156
- padding: 0.5rem 1rem;
157
-
158
- &:hover:not(:disabled) {
159
- background: $CAP_G09;
160
- }
161
-
162
- &:disabled {
163
- color: $CAP_G05;
164
- cursor: not-allowed;
165
- background: transparent;
166
- }
167
- }
168
- }
169
- }
170
-
171
- // Make the backdrop transparent for the preview slidebox
172
- // This prevents double-darkening when it opens over an existing slidebox
173
- .webpush-preview-slidebox.cap-slide-box-v2 {
174
- background: transparent;
175
- }
176
-
177
- // ============================================================================
178
- // Device Preview Container Styles
179
- // ============================================================================
180
-
181
- /**
182
- * Device Preview Container
183
- *
184
- * Background container for device frame previews in the SlideBox.
185
- *
186
- * Specifications:
187
- * - Width: 100% (responsive)
188
- * - Height: Determined by device frame content (auto)
189
- * - Background: $CAP_G09
190
- * - Padding: 1.5rem 1rem 1rem 1rem (top right bottom left)
191
- */
192
- .device-preview-container {
193
- width: 100%;
194
- background-color: $CAP_G09;
195
- padding: 1.5rem 1rem 1rem 1rem;
196
- box-sizing: border-box;
197
- display: flex;
198
- align-items: center;
199
- justify-content: center;
200
- position: relative;
201
- margin: 0 auto;
202
- // Height is determined by the device frame content
203
-
204
- /**
205
- * Device Frame Wrapper
206
- *
207
- * Wraps the device frame SVG and positions it centered within the container.
208
- * This wrapper will also serve as the positioning reference for notifications
209
- * in later phases.
210
- */
211
- .device-frame-wrapper {
212
- position: relative;
213
- display: flex;
214
- align-items: center;
215
- justify-content: center;
216
- width: 100%;
217
- // Height determined by device frame image
218
-
219
- /**
220
- * Device Frame Asset
221
- *
222
- * Wraps the frame image and provides the positioning context for the
223
- * notification overlay. Anchors notification coordinates to the frame image
224
- * itself instead of the background container.
225
- */
226
- .device-frame-asset {
227
- position: relative;
228
- display: inline-block;
229
- max-width: 100%;
230
- width: auto;
231
- height: auto;
232
- line-height: 0; // remove inline-block whitespace
233
- }
234
-
235
- /**
236
- * Device Frame Image
237
- *
238
- * The SVG device frame asset. It should maintain its aspect ratio
239
- * and be centered within the wrapper.
240
- *
241
- * IMPORTANT - CSS Global Scope Override:
242
- * This selector has increased specificity to override global styles from
243
- * InAppPreviewPane component (_inAppPreviewPane.scss) which also uses .device-frame.
244
- * The codebase uses global CSS extraction (not CSS modules), so styles leak between components.
245
- *
246
- * HOVER/ANIMATION EFFECTS:
247
- * If you need to remove hover effects, shadows, or animations on the device frame,
248
- * look for the following CSS properties in this selector or its parent:
249
- * - box-shadow (for shadow effects)
250
- * - transition (for animation effects)
251
- * - transform (for hover transformations)
252
- * - filter (for hover effects like brightness, contrast)
253
- */
254
- .device-frame {
255
- // Override InAppPreviewPane global styles with higher specificity
256
- // These resets prevent style leakage from _inAppPreviewPane.scss
257
- filter: none !important; // Override: Removes drop-shadow from InAppPreviewPane
258
- transition: none !important; // Override: Removes transition from InAppPreviewPane
259
- transform: none !important; // Override: Removes transform from InAppPreviewPane
260
-
261
- // Remove hover effects from InAppPreviewPane
262
- &:hover {
263
- filter: none !important; // HOVER EFFECT OVERRIDE - Removes InAppPreviewPane hover filter
264
- transform: none !important; // HOVER EFFECT OVERRIDE - Removes InAppPreviewPane hover transform
265
- }
266
-
267
- // WebPush-specific device frame styles
268
- max-width: 100%;
269
- width: auto;
270
- height: auto;
271
- display: block; // ensure the image defines the wrapping box size
272
- object-fit: contain;
273
- // Ensure the frame maintains its aspect ratio
274
- // and is centered both horizontally and vertically
275
- // Height is determined by the SVG's natural aspect ratio
276
-
277
- // HOVER/ANIMATION EFFECTS - None currently applied for WebPush preview
278
- // If you need to add hover effects later, add them here and mark clearly:
279
- // Example:
280
- // transition: transform 0.3s ease; // HOVER EFFECT - Remove if incompatible
281
- // &:hover {
282
- // transform: scale(1.02); // HOVER EFFECT - Remove if incompatible
283
- // box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); // SHADOW EFFECT - Remove if incompatible
284
- // }
285
- }
286
-
287
- /**
288
- * Device Notification Wrapper
289
- *
290
- * Wraps the notification container and positions it relative to the device frame.
291
- * This ensures the notification is anchored to the device frame, not the background container.
292
- */
293
- .device-notification-wrapper {
294
- position: absolute;
295
- z-index: 10;
296
- line-height: normal; // prevent zero line-height inheritance from frame asset
297
- // Position is set inline via style prop for precise control
298
- &.preview-unavailable {
299
- width: 1rem;
300
- height: 1rem;
301
- border: 1px dashed $CAP_G06;
302
- border-radius: 0.25rem;
303
- background: transparent;
304
- }
305
- }
306
-
307
- }
308
-
309
- /**
310
- * Notification Container Width Override for Device Preview
311
- *
312
- * In the device preview slidebox, the notification container should have
313
- * a fixed width of 21rem instead of 100% to match the design requirements.
314
- * This override only applies within the device-preview-container context.
315
- *
316
- * Higher specificity selector ensures this overrides the default width
317
- * from notification-container.scss without affecting the main preview.
318
- */
319
- .device-notification-wrapper .notification-container.macos-chrome {
320
- width: 21rem !important;
321
- // Override the default 100% width from notification-container.scss
322
- // This only affects notifications in the device preview slidebox
323
- // Using !important to ensure it overrides the base styles
324
- }
325
- .device-notification-wrapper .notification-container.macos-safari {
326
- width: 21rem !important;
327
- }
328
- .device-notification-wrapper .notification-container.windows-chrome {
329
- width: 21rem !important;
330
- }
331
- .device-notification-wrapper .notification-container.android-mobile-chrome.collapsed,
332
- .device-notification-wrapper .notification-container.android-mobile-firefox.collapsed,
333
- .device-notification-wrapper .notification-container.android-mobile-edge.collapsed,
334
- .device-notification-wrapper .notification-container.android-mobile-opera.collapsed {
335
- width: 20.375rem !important;
336
- height: 4.875rem !important;
337
- }
338
-
339
- .device-notification-wrapper .notification-container.android-mobile-chrome.collapsed .notification-header.android-mobile-chrome-header,
340
- .device-notification-wrapper .notification-container.android-mobile-firefox.collapsed .notification-header.android-mobile-chrome-header,
341
- .device-notification-wrapper .notification-container.android-mobile-edge.collapsed .notification-header.android-mobile-chrome-header,
342
- .device-notification-wrapper .notification-container.android-mobile-opera.collapsed .notification-header.android-mobile-chrome-header {
343
- align-items: center;
344
- }
345
-
346
- .device-notification-wrapper .notification-container.android-tablet-chrome.collapsed,
347
- .device-notification-wrapper .notification-container.android-tablet-firefox.collapsed,
348
- .device-notification-wrapper .notification-container.android-tablet-edge.collapsed,
349
- .device-notification-wrapper .notification-container.android-tablet-opera.collapsed {
350
- width: 30rem !important;
351
- height: 4.875rem !important;
352
- }
353
-
354
- .device-notification-wrapper .notification-container.android-tablet-chrome.collapsed .notification-header.android-mobile-chrome-header,
355
- .device-notification-wrapper .notification-container.android-tablet-firefox.collapsed .notification-header.android-mobile-chrome-header,
356
- .device-notification-wrapper .notification-container.android-tablet-edge.collapsed .notification-header.android-mobile-chrome-header,
357
- .device-notification-wrapper .notification-container.android-tablet-opera.collapsed .notification-header.android-mobile-chrome-header {
358
- align-items: center;
359
- }
360
-
361
- .device-notification-wrapper .notification-container.android-tablet-chrome.expanded,
362
- .device-notification-wrapper .notification-container.android-tablet-firefox.expanded,
363
- .device-notification-wrapper .notification-container.android-tablet-edge.expanded,
364
- .device-notification-wrapper .notification-container.android-tablet-opera.expanded {
365
- width: 30rem !important;
366
- min-height: 4.875rem !important;
367
- }
368
-
369
- // iOS notifications (mobile width)
370
- .device-notification-wrapper .notification-container.ios-chrome.collapsed,
371
- .device-notification-wrapper .notification-container.ios-safari.collapsed,
372
- .device-notification-wrapper .notification-container.ios-firefox.collapsed,
373
- .device-notification-wrapper .notification-container.ios-edge.collapsed,
374
- .device-notification-wrapper .notification-container.ios-opera.collapsed {
375
- width: 20.375rem !important;
376
- height: 4.875rem !important;
377
- }
378
-
379
- .device-notification-wrapper .notification-container.ios-chrome.collapsed .notification-header.ios-header,
380
- .device-notification-wrapper .notification-container.ios-safari.collapsed .notification-header.ios-header,
381
- .device-notification-wrapper .notification-container.ios-firefox.collapsed .notification-header.ios-header,
382
- .device-notification-wrapper .notification-container.ios-edge.collapsed .notification-header.ios-header,
383
- .device-notification-wrapper .notification-container.ios-opera.collapsed .notification-header.ios-header {
384
- align-items: center;
385
- }
386
-
387
- // iPadOS notifications (tablet width)
388
- .device-notification-wrapper .notification-container.ipados-chrome.collapsed,
389
- .device-notification-wrapper .notification-container.ipados-safari.collapsed,
390
- .device-notification-wrapper .notification-container.ipados-firefox.collapsed,
391
- .device-notification-wrapper .notification-container.ipados-edge.collapsed,
392
- .device-notification-wrapper .notification-container.ipados-opera.collapsed {
393
- width: 30rem !important;
394
- height: 4.875rem !important;
395
- }
396
-
397
- .device-notification-wrapper .notification-container.ipados-chrome.collapsed .notification-header.ios-header,
398
- .device-notification-wrapper .notification-container.ipados-safari.collapsed .notification-header.ios-header,
399
- .device-notification-wrapper .notification-container.ipados-firefox.collapsed .notification-header.ios-header,
400
- .device-notification-wrapper .notification-container.ipados-edge.collapsed .notification-header.ios-header,
401
- .device-notification-wrapper .notification-container.ipados-opera.collapsed .notification-header.ios-header {
402
- align-items: center;
403
- }
404
-
405
- .device-notification-wrapper .notification-title {
406
- line-height: 1.2;
407
- }
408
- }
409
-