@gem-sdk/upsell-components 12.0.0-dev.108

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 (187) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/builder.js +2 -0
  3. package/dist/cjs/button/common/attrs.js +1 -0
  4. package/dist/cjs/button/common/classes.js +1 -0
  5. package/dist/cjs/button/common/helpers.js +1 -0
  6. package/dist/cjs/button/common/styles.js +32 -0
  7. package/dist/cjs/button/components/Button.html.js +1 -0
  8. package/dist/cjs/button/components/Button.js +2 -0
  9. package/dist/cjs/button/components/ButtonIcon.js +1 -0
  10. package/dist/cjs/button/components/ButtonLabel.js +1 -0
  11. package/dist/cjs/button/components/ButtonLoadingIndicator.js +1 -0
  12. package/dist/cjs/button/index.js +1 -0
  13. package/dist/cjs/button/next.js +1 -0
  14. package/dist/cjs/button/settings/Button.js +16 -0
  15. package/dist/cjs/button/settings/configs/settings.js +4 -0
  16. package/dist/cjs/button/settings/configs/translate.js +1 -0
  17. package/dist/cjs/button/settings/configs/ui-v1.js +1 -0
  18. package/dist/cjs/button/settings/configs/ui-v2.js +1 -0
  19. package/dist/cjs/common/components/Loading.js +2 -0
  20. package/dist/cjs/common/hooks/useInView.js +2 -0
  21. package/dist/cjs/constant.js +1 -0
  22. package/dist/cjs/grid/components/ChildrenDroppable.js +8 -0
  23. package/dist/cjs/grid/components/col/Col.js +2 -0
  24. package/dist/cjs/grid/components/col/common/attrs.js +1 -0
  25. package/dist/cjs/grid/components/col/common/classes.js +1 -0
  26. package/dist/cjs/grid/components/col/common/styles.js +1 -0
  27. package/dist/cjs/grid/components/root/Root.js +2 -0
  28. package/dist/cjs/grid/components/row/Row.js +1 -0
  29. package/dist/cjs/grid/components/row/common/attrs.js +1 -0
  30. package/dist/cjs/grid/components/row/common/classes.js +1 -0
  31. package/dist/cjs/grid/components/row/common/helpers.js +1 -0
  32. package/dist/cjs/grid/components/row/common/styles.js +2 -0
  33. package/dist/cjs/grid/components/section/Section.js +2 -0
  34. package/dist/cjs/grid/hooks/useRowSetting.js +1 -0
  35. package/dist/cjs/grid/index.js +1 -0
  36. package/dist/cjs/grid/next.js +1 -0
  37. package/dist/cjs/grid/settings/Col.js +1 -0
  38. package/dist/cjs/grid/settings/Root.js +1 -0
  39. package/dist/cjs/grid/settings/Row.js +5 -0
  40. package/dist/cjs/grid/settings/Section.js +1 -0
  41. package/dist/cjs/grid/settings/configs/row/presets.js +23 -0
  42. package/dist/cjs/grid/settings/configs/row/settings.js +1 -0
  43. package/dist/cjs/grid/settings/configs/row/ui-v1.js +1 -0
  44. package/dist/cjs/grid/settings/configs/row/ui-v2.js +1 -0
  45. package/dist/cjs/grid/settings/configs/section/settings.js +1 -0
  46. package/dist/cjs/grid/settings/configs/section/ui-v1.js +1 -0
  47. package/dist/cjs/grid/settings/configs/section/ui-v2.js +1 -0
  48. package/dist/cjs/helpers.js +1 -0
  49. package/dist/cjs/ignoreHashClasses.js +66 -0
  50. package/dist/cjs/image/common/attrs.js +1 -0
  51. package/dist/cjs/image/common/classes.js +1 -0
  52. package/dist/cjs/image/common/helpers.js +1 -0
  53. package/dist/cjs/image/common/styles.js +1 -0
  54. package/dist/cjs/image/components/AdaptiveImage.js +2 -0
  55. package/dist/cjs/image/components/Image.js +2 -0
  56. package/dist/cjs/image/components/NextImage.js +2 -0
  57. package/dist/cjs/image/constants.js +1 -0
  58. package/dist/cjs/image/index.js +1 -0
  59. package/dist/cjs/image/next.js +1 -0
  60. package/dist/cjs/image/settings/Image.js +5 -0
  61. package/dist/cjs/image/settings/configs/presets.js +25 -0
  62. package/dist/cjs/image/settings/configs/settings.js +1 -0
  63. package/dist/cjs/image/settings/configs/ui-v2.js +1 -0
  64. package/dist/cjs/index.html.js +2 -0
  65. package/dist/cjs/index.js +1 -0
  66. package/dist/cjs/link/common/helpers.js +1 -0
  67. package/dist/cjs/link/components/CustomLink.js +2 -0
  68. package/dist/cjs/link/components/Link.js +2 -0
  69. package/dist/cjs/link/components/ProductLink.js +2 -0
  70. package/dist/cjs/link/components/next-link/CustomLink.js +2 -0
  71. package/dist/cjs/link/components/next-link/ProductLink.js +2 -0
  72. package/dist/cjs/link/components/next-link/index.js +2 -0
  73. package/dist/cjs/link/index.js +1 -0
  74. package/dist/cjs/link/next.js +1 -0
  75. package/dist/cjs/link/settings/Link.js +1 -0
  76. package/dist/cjs/link/settings/configs/settings.js +1 -0
  77. package/dist/cjs/next.js +2 -0
  78. package/dist/cjs/safelist.js +199 -0
  79. package/dist/cjs/safelistSection.js +11 -0
  80. package/dist/cjs/setting.js +1 -0
  81. package/dist/cjs/text/common/attrs.js +1 -0
  82. package/dist/cjs/text/common/classes.js +1 -0
  83. package/dist/cjs/text/common/helpers.js +1 -0
  84. package/dist/cjs/text/common/styles.js +1 -0
  85. package/dist/cjs/text/components/Text.js +2 -0
  86. package/dist/cjs/text/index.js +1 -0
  87. package/dist/cjs/text/next.js +1 -0
  88. package/dist/cjs/text/settings/Text.js +5 -0
  89. package/dist/cjs/text/settings/configs/presets.js +3 -0
  90. package/dist/cjs/text/settings/configs/settings.js +1 -0
  91. package/dist/cjs/text/settings/configs/translate.js +1 -0
  92. package/dist/cjs/text/settings/configs/ui-v1.js +1 -0
  93. package/dist/cjs/text/settings/configs/ui-v2.js +1 -0
  94. package/dist/esm/builder.js +2 -0
  95. package/dist/esm/button/common/attrs.js +1 -0
  96. package/dist/esm/button/common/classes.js +1 -0
  97. package/dist/esm/button/common/helpers.js +1 -0
  98. package/dist/esm/button/common/styles.js +32 -0
  99. package/dist/esm/button/components/Button.html.js +1 -0
  100. package/dist/esm/button/components/Button.js +2 -0
  101. package/dist/esm/button/components/ButtonIcon.js +1 -0
  102. package/dist/esm/button/components/ButtonLabel.js +1 -0
  103. package/dist/esm/button/components/ButtonLoadingIndicator.js +1 -0
  104. package/dist/esm/button/index.js +1 -0
  105. package/dist/esm/button/next.js +1 -0
  106. package/dist/esm/button/settings/Button.js +16 -0
  107. package/dist/esm/button/settings/configs/settings.js +4 -0
  108. package/dist/esm/button/settings/configs/translate.js +1 -0
  109. package/dist/esm/button/settings/configs/ui-v1.js +1 -0
  110. package/dist/esm/button/settings/configs/ui-v2.js +1 -0
  111. package/dist/esm/common/components/Loading.js +2 -0
  112. package/dist/esm/common/hooks/useInView.js +2 -0
  113. package/dist/esm/constant.js +1 -0
  114. package/dist/esm/grid/components/ChildrenDroppable.js +8 -0
  115. package/dist/esm/grid/components/col/Col.js +2 -0
  116. package/dist/esm/grid/components/col/common/attrs.js +1 -0
  117. package/dist/esm/grid/components/col/common/classes.js +1 -0
  118. package/dist/esm/grid/components/col/common/styles.js +1 -0
  119. package/dist/esm/grid/components/root/Root.js +2 -0
  120. package/dist/esm/grid/components/row/Row.js +1 -0
  121. package/dist/esm/grid/components/row/common/attrs.js +1 -0
  122. package/dist/esm/grid/components/row/common/classes.js +1 -0
  123. package/dist/esm/grid/components/row/common/helpers.js +1 -0
  124. package/dist/esm/grid/components/row/common/styles.js +2 -0
  125. package/dist/esm/grid/components/section/Section.js +2 -0
  126. package/dist/esm/grid/hooks/useRowSetting.js +1 -0
  127. package/dist/esm/grid/index.js +1 -0
  128. package/dist/esm/grid/next.js +1 -0
  129. package/dist/esm/grid/settings/Col.js +1 -0
  130. package/dist/esm/grid/settings/Root.js +1 -0
  131. package/dist/esm/grid/settings/Row.js +5 -0
  132. package/dist/esm/grid/settings/Section.js +1 -0
  133. package/dist/esm/grid/settings/configs/row/presets.js +23 -0
  134. package/dist/esm/grid/settings/configs/row/settings.js +1 -0
  135. package/dist/esm/grid/settings/configs/row/ui-v1.js +1 -0
  136. package/dist/esm/grid/settings/configs/row/ui-v2.js +1 -0
  137. package/dist/esm/grid/settings/configs/section/settings.js +1 -0
  138. package/dist/esm/grid/settings/configs/section/ui-v1.js +1 -0
  139. package/dist/esm/grid/settings/configs/section/ui-v2.js +1 -0
  140. package/dist/esm/helpers.js +1 -0
  141. package/dist/esm/ignoreHashClasses.js +64 -0
  142. package/dist/esm/image/common/attrs.js +1 -0
  143. package/dist/esm/image/common/classes.js +1 -0
  144. package/dist/esm/image/common/helpers.js +1 -0
  145. package/dist/esm/image/common/styles.js +1 -0
  146. package/dist/esm/image/components/AdaptiveImage.js +2 -0
  147. package/dist/esm/image/components/Image.js +2 -0
  148. package/dist/esm/image/components/NextImage.js +2 -0
  149. package/dist/esm/image/constants.js +1 -0
  150. package/dist/esm/image/index.js +1 -0
  151. package/dist/esm/image/next.js +1 -0
  152. package/dist/esm/image/settings/Image.js +5 -0
  153. package/dist/esm/image/settings/configs/presets.js +25 -0
  154. package/dist/esm/image/settings/configs/settings.js +1 -0
  155. package/dist/esm/image/settings/configs/ui-v2.js +1 -0
  156. package/dist/esm/index.html.js +2 -0
  157. package/dist/esm/index.js +1 -0
  158. package/dist/esm/link/common/helpers.js +1 -0
  159. package/dist/esm/link/components/CustomLink.js +2 -0
  160. package/dist/esm/link/components/Link.js +2 -0
  161. package/dist/esm/link/components/ProductLink.js +2 -0
  162. package/dist/esm/link/components/next-link/CustomLink.js +2 -0
  163. package/dist/esm/link/components/next-link/ProductLink.js +2 -0
  164. package/dist/esm/link/components/next-link/index.js +2 -0
  165. package/dist/esm/link/index.js +1 -0
  166. package/dist/esm/link/next.js +1 -0
  167. package/dist/esm/link/settings/Link.js +1 -0
  168. package/dist/esm/link/settings/configs/settings.js +1 -0
  169. package/dist/esm/next.js +2 -0
  170. package/dist/esm/safelist.js +197 -0
  171. package/dist/esm/safelistSection.js +9 -0
  172. package/dist/esm/setting.js +1 -0
  173. package/dist/esm/text/common/attrs.js +1 -0
  174. package/dist/esm/text/common/classes.js +1 -0
  175. package/dist/esm/text/common/helpers.js +1 -0
  176. package/dist/esm/text/common/styles.js +1 -0
  177. package/dist/esm/text/components/Text.js +2 -0
  178. package/dist/esm/text/index.js +1 -0
  179. package/dist/esm/text/next.js +1 -0
  180. package/dist/esm/text/settings/Text.js +5 -0
  181. package/dist/esm/text/settings/configs/presets.js +3 -0
  182. package/dist/esm/text/settings/configs/settings.js +1 -0
  183. package/dist/esm/text/settings/configs/translate.js +1 -0
  184. package/dist/esm/text/settings/configs/ui-v1.js +1 -0
  185. package/dist/esm/text/settings/configs/ui-v2.js +1 -0
  186. package/dist/types/index.d.ts +480 -0
  187. package/package.json +76 -0
@@ -0,0 +1,480 @@
1
+ import * as _gem_sdk_core from '@gem-sdk/core';
2
+ import { BasePropsWrap, ObjectDevices, AlignProp, StateProp, CornerRadius, ColorValueType, SizeSettingGlobal, BackgroundImageValue, TypographySetting, SizeSetting, TypographySettingV2, Border, ShadowProps, ObjectLayoutValue, BackgroundMedia, TransformProp, Ratio, ResponsiveStateProp, BaseProps, PageContext, NameDevices, RenderMode } from '@gem-sdk/core';
3
+ import { Property } from 'csstype';
4
+
5
+ type MixedProps$1 = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> | Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'type'>;
6
+ type ButtonSettingProps = {
7
+ iconSvg?: string;
8
+ loading?: boolean;
9
+ disabled?: boolean;
10
+ iconVisible?: boolean;
11
+ innerBorder?: boolean;
12
+ label?: React.ReactNode;
13
+ disabledLoading?: boolean;
14
+ shouldClearSpace?: boolean;
15
+ iconAlign?: 'left' | 'right';
16
+ htmlType?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'] | 'link';
17
+ enableBtnLink?: boolean;
18
+ btnLink?: {
19
+ type?: string;
20
+ link?: string;
21
+ target?: string;
22
+ noFollow?: boolean;
23
+ };
24
+ options?: {
25
+ isCannotEditing?: boolean | undefined;
26
+ };
27
+ enableHoverEffect?: boolean;
28
+ enableActiveEffect?: boolean;
29
+ };
30
+ type ButtonStyleProps = {
31
+ size?: ObjectDevices<string>;
32
+ type?: 'primary' | 'secondary';
33
+ align?: ObjectDevices<AlignProp>;
34
+ fullWidth?: ObjectDevices<boolean>;
35
+ roundedBtn?: StateProp<CornerRadius>;
36
+ textColor?: StateProp<ColorValueType>;
37
+ backgroundColor?: StateProp<ColorValueType>;
38
+ globalSize?: ObjectDevices<SizeSettingGlobal>;
39
+ iconDimension?: ObjectDevices<number | string>;
40
+ width?: ObjectDevices<string | number | undefined>;
41
+ height?: ObjectDevices<string | number | undefined>;
42
+ roundedBtnV2?: StateProp<CornerRadius>;
43
+ animation?: StateProp<'none' | 'pulse' | 'grow' | 'bounce'>;
44
+ backgroundColorV2?: StateProp<ColorValueType>;
45
+ backgroundImage?: StateProp<BackgroundImageValue>;
46
+ enableTextStyle?: boolean;
47
+ /**
48
+ * @deprecated please use `typo` instead
49
+ */
50
+ typography?: TypographySetting;
51
+ transform?: string;
52
+ iconSizeAuto?: boolean;
53
+ textOverFlow?: boolean;
54
+ preloadBgImage?: boolean;
55
+ btnSpacing?: SizeSetting;
56
+ typo?: TypographySettingV2;
57
+ borderBtn?: StateProp<Border>;
58
+ iconSpacing?: ObjectDevices<string>;
59
+ textAlign?: ObjectDevices<AlignProp>;
60
+ hasBoxShadowBtn?: StateProp<boolean>;
61
+ boxShadowBtn?: StateProp<ShadowProps>;
62
+ borderBtnV2?: StateProp<Border>;
63
+ boxShadowBtnV2?: StateProp<ShadowProps>;
64
+ };
65
+ type ButtonProps = MixedProps$1 & BasePropsWrap<ButtonSettingProps, ButtonStyleProps> & {
66
+ dataId?: string;
67
+ customAttrs?: any;
68
+ wrapClassName?: string;
69
+ nodePrice?: JSX.Element | string;
70
+ };
71
+
72
+ declare const Button$1: React.FC<ButtonProps>;
73
+
74
+ declare const buttonSetting: {
75
+ Button: _gem_sdk_core.ComponentSetting<ButtonProps>;
76
+ };
77
+
78
+ type RootProps$1 = {
79
+ children?: React.ReactNode;
80
+ };
81
+ declare const Root: React.FC<RootProps$1>;
82
+
83
+ type ColSettingProps = {
84
+ allowSameHeight?: boolean;
85
+ sameHeightSubgridContainer?: boolean;
86
+ };
87
+ type ColStyleProps = {
88
+ order?: ObjectDevices<number>;
89
+ gap?: ObjectDevices<string>;
90
+ alignItem?: ObjectDevices<Property.AlignItems>;
91
+ justifyContent?: ObjectDevices<Property.JustifyContent>;
92
+ display?: ObjectDevices<Property.Display>;
93
+ fullWidth?: boolean;
94
+ };
95
+ type ColProps = BasePropsWrap<ColSettingProps, ColStyleProps> & React.ComponentPropsWithoutRef<'div'> & {
96
+ justifyContent?: ObjectDevices<Property.JustifyContent>;
97
+ order?: ObjectDevices<number>;
98
+ className?: string;
99
+ children?: any;
100
+ layout?: ObjectDevices<ObjectLayoutValue>;
101
+ parentTag?: string;
102
+ rawChildren?: any[];
103
+ hiddenEmptyCol?: boolean;
104
+ } & {
105
+ advanced?: any;
106
+ };
107
+ type RowSettingProps = {
108
+ responsive?: ObjectDevices<string>;
109
+ layout?: ObjectDevices<ObjectLayoutValue>;
110
+ verticalAlign?: ObjectDevices<'start' | 'end' | 'center' | 'space-between'>;
111
+ horizontalAlign?: ObjectDevices<'start' | 'end' | 'center' | 'space-between'>;
112
+ order?: ObjectDevices<number>;
113
+ inlineAlignment?: 'start' | 'end' | 'center';
114
+ blockAlignment?: 'start' | 'end' | 'center';
115
+ allowSameHeight?: boolean;
116
+ sameHeightSubgridContainer?: boolean;
117
+ isSection?: boolean;
118
+ lazy?: boolean;
119
+ priority?: boolean;
120
+ as?: 'div' | 'section';
121
+ };
122
+ type RowStyleProps = {
123
+ enablePagePadding?: ObjectDevices<boolean>;
124
+ fullWidth?: ObjectDevices<boolean>;
125
+ width?: ObjectDevices<string>;
126
+ height?: ObjectDevices<'auto' | '100%'>;
127
+ preloadBgImage?: boolean;
128
+ columnGap?: ObjectDevices<string>;
129
+ rowGap?: string;
130
+ border?: ObjectDevices<StateProp<Border>>;
131
+ rounded?: ObjectDevices<StateProp<CornerRadius>>;
132
+ padding?: ObjectDevices<SizeSettingGlobal>;
133
+ verticalGutter?: ObjectDevices<string>;
134
+ verticalGutterMobile?: ObjectDevices<string>;
135
+ background?: ObjectDevices<BackgroundMedia>;
136
+ boxShadow?: ObjectDevices<StateProp<ShadowProps>>;
137
+ };
138
+ type RowProps = BasePropsWrap<RowSettingProps, RowStyleProps> & React.ComponentPropsWithoutRef<'div'> & {
139
+ maxWidthWithEmptyChildren?: string | number;
140
+ isNotFullWidth?: boolean;
141
+ rawChildren?: any[];
142
+ hiddenEmptyCol?: boolean;
143
+ parentStyle?: React.CSSProperties;
144
+ };
145
+ type RootProps = {
146
+ children?: React.ReactNode;
147
+ };
148
+
149
+ declare const Section: React.FC<RowProps>;
150
+
151
+ declare const Row: React.FC<RowProps>;
152
+
153
+ declare const Column: React.FC<ColProps>;
154
+
155
+ declare const gridSetting: {
156
+ Root: _gem_sdk_core.ComponentSetting<any>;
157
+ Section: _gem_sdk_core.ComponentSetting<RowProps>;
158
+ Row: _gem_sdk_core.ComponentSetting<RowProps>;
159
+ Col: _gem_sdk_core.ComponentSetting<ColProps>;
160
+ };
161
+
162
+ type TextStyleProps = {
163
+ textColor?: ColorValueType;
164
+ parentTextColor?: StateProp<ColorValueType>;
165
+ textShadowNotState?: ShadowProps;
166
+ hasTextShadowNotState?: boolean;
167
+ color?: StateProp<ColorValueType>;
168
+ lineColor?: StateProp<ColorValueType>;
169
+ typo?: TypographySettingV2;
170
+ textAlign?: ObjectDevices<AlignProp>;
171
+ lineClamp?: ObjectDevices<number>;
172
+ hasLineClamp?: ObjectDevices<boolean>;
173
+ hasTextShadow?: StateProp<boolean>;
174
+ textShadow?: StateProp<ShadowProps>;
175
+ transform?: TransformProp;
176
+ spacing?: string;
177
+ thickness?: string | number;
178
+ underlineLink?: {
179
+ hover: boolean;
180
+ normal: boolean;
181
+ };
182
+ /**
183
+ * @deprecated please use `typo` instead
184
+ */
185
+ typography?: TypographySetting;
186
+ /**
187
+ * @deprecated this prop do not use anymore
188
+ */
189
+ hasBoxShadow?: StateProp<boolean>;
190
+ /**
191
+ * @deprecated this prop do not use anymore
192
+ */
193
+ boxShadow?: StateProp<ShadowProps>;
194
+ align?: ObjectDevices<AlignProp>;
195
+ shapeBorder?: ObjectDevices<Border>;
196
+ shapeRounded?: ObjectDevices<CornerRadius>;
197
+ shapeBoxShadow?: ObjectDevices<ShadowProps>;
198
+ isForceValue?: boolean;
199
+ lineThrough?: boolean;
200
+ opacityPrice?: number;
201
+ enableHoverEffect?: boolean;
202
+ };
203
+ type HTMLTag = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'small' | 'mark' | 'kbd' | 'i';
204
+ type TextSettingProps = {
205
+ text?: string | number;
206
+ translateSetting?: string;
207
+ htmlTag?: HTMLTag;
208
+ opacityPrice?: number;
209
+ options?: {
210
+ useState?: boolean;
211
+ uniqueId?: string | undefined;
212
+ productID?: string | undefined;
213
+ isCannotEditing?: boolean | undefined;
214
+ disablePointerEvent?: boolean;
215
+ customClass?: {
216
+ wrapper?: string;
217
+ };
218
+ };
219
+ tagWidth?: Record<string, string>;
220
+ background?: ObjectDevices<BackgroundMedia>;
221
+ globalSize?: ObjectDevices<SizeSettingGlobal>;
222
+ excludeFlex?: boolean;
223
+ isForceValue?: boolean;
224
+ };
225
+ type TextProps = BasePropsWrap<TextSettingProps, TextStyleProps> & Omit<React.ComponentPropsWithoutRef<'p'>, ''> & {
226
+ disableEdit?: boolean;
227
+ };
228
+
229
+ declare const Text: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<TextSettingProps, TextStyleProps, Record<string, any>> & {
230
+ builderAttrs?: Record<string, any> | undefined;
231
+ style?: React.CSSProperties | undefined;
232
+ } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
233
+ disableEdit?: boolean | undefined;
234
+ } & React.RefAttributes<HTMLElement>>;
235
+
236
+ declare const textSetting: {
237
+ Text: _gem_sdk_core.ComponentSetting<TextProps>;
238
+ };
239
+
240
+ type ObjectFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
241
+ type BaseImageData = {
242
+ alt?: string;
243
+ src?: string;
244
+ width?: number;
245
+ height?: number;
246
+ base64?: string;
247
+ backupFileKey?: string;
248
+ backupFilePath?: string;
249
+ storage?: 'THEME' | 'FILE_CONTENT';
250
+ metafieldDefinitionKey?: string;
251
+ };
252
+ type SharedProps = {
253
+ aspectRatio?: ObjectDevices<string>;
254
+ layout?: ObjectDevices<ObjectFit>;
255
+ objectFit?: ObjectDevices<ObjectFit>;
256
+ borderRadius?: ResponsiveStateProp<string>;
257
+ image?: BaseImageData;
258
+ };
259
+ type MixedProps = Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'children' | 'width' | 'height' | 'as' | 'src' | 'srcSet'>;
260
+ type ImgProps = SharedProps & MixedProps;
261
+ type ImageStyleProps = {
262
+ shape?: ObjectDevices<SizeSettingGlobal>;
263
+ customAspectRadio?: ObjectDevices<Ratio>;
264
+ fullWidth?: ObjectDevices<boolean>;
265
+ width?: ObjectDevices<number | string>;
266
+ align?: ObjectDevices<AlignProp>;
267
+ opacity?: StateProp<number>;
268
+ opacityColor?: StateProp<ColorValueType>;
269
+ hasBoxShadowImg?: StateProp<boolean>;
270
+ boxShadowImg?: StateProp<ShadowProps>;
271
+ roundedImg?: StateProp<CornerRadius>;
272
+ borderImg?: StateProp<Border>;
273
+ borderRadius?: CornerRadius;
274
+ wrapperBorder?: Border;
275
+ hasActiveShadow?: boolean;
276
+ shadow?: ShadowProps;
277
+ } & Pick<SharedProps, 'layout' | 'aspectRatio' | 'objectFit'>;
278
+ type ImageLink = {
279
+ type?: string;
280
+ link?: string;
281
+ target?: string;
282
+ noFollow?: boolean;
283
+ isTranslate?: boolean;
284
+ };
285
+ type ImageSettingProps = {
286
+ imageStyle?: 'rectangle' | 'circle';
287
+ priority?: boolean;
288
+ quality?: number;
289
+ vw?: ObjectDevices<number>;
290
+ alt?: string;
291
+ title?: string;
292
+ isAdaptive?: boolean;
293
+ imageLink?: ImageLink;
294
+ hoverEffect?: string;
295
+ image?: BaseImageData;
296
+ isNotLazyload?: boolean;
297
+ enableImageLink?: boolean;
298
+ disableNoDataState?: boolean;
299
+ srcSet?: ObjectDevices<BaseImageData>;
300
+ qualityPercent?: ObjectDevices<number>;
301
+ qualityType?: ObjectDevices<QualityType>;
302
+ };
303
+ type QualityType = 'finest' | 'high' | 'medium' | 'custom';
304
+ type ImageProps = BasePropsWrap<ImageSettingProps, ImageStyleProps> & {
305
+ className?: string;
306
+ children?: React.ReactNode;
307
+ onClick?: React.MouseEventHandler<any>;
308
+ onLoad?: React.ReactEventHandler<any>;
309
+ } & {
310
+ advanced?: any;
311
+ };
312
+
313
+ declare const Image: React.FC<ImageProps>;
314
+
315
+ declare const imageSetting: {
316
+ Image: _gem_sdk_core.ComponentSetting<ImageProps>;
317
+ };
318
+
319
+ type LinkSettingProps = {
320
+ type?: 'auto' | 'product' | 'collection' | 'custom';
321
+ label?: string;
322
+ noFollow?: boolean;
323
+ target?: HTMLAnchorElement['target'];
324
+ href?: HTMLAnchorElement['href'];
325
+ };
326
+ type LinkProps = BaseProps<LinkSettingProps> & {
327
+ className?: string;
328
+ style?: React.CSSProperties;
329
+ children?: React.ReactNode;
330
+ title?: string;
331
+ dataId?: string;
332
+ };
333
+ type MixedNextProps = BaseProps<{
334
+ type?: 'auto' | 'product' | 'collection' | 'custom';
335
+ target?: HTMLAnchorElement['target'];
336
+ href?: HTMLAnchorElement['href'];
337
+ }>;
338
+ type NextLinkProps = MixedNextProps & {
339
+ className?: string;
340
+ style?: React.CSSProperties;
341
+ };
342
+
343
+ declare const Link: React.FC<LinkProps>;
344
+
345
+ declare const linkSetting: {
346
+ Link: _gem_sdk_core.ComponentSetting<LinkProps>;
347
+ };
348
+
349
+ declare const _default$2: {
350
+ Link: React.ComponentType<NextLinkProps>;
351
+ Image: React.ComponentType<ImageProps>;
352
+ Text: React.ComponentType<_gem_sdk_core.BaseProps<TextSettingProps, TextStyleProps, Record<string, any>> & {
353
+ builderAttrs?: Record<string, any> | undefined;
354
+ style?: React.CSSProperties | undefined;
355
+ } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
356
+ disableEdit?: boolean | undefined;
357
+ } & React.RefAttributes<HTMLElement>>;
358
+ Row: React.ComponentType<RowProps>;
359
+ Col: React.ComponentType<ColProps>;
360
+ Section: React.ComponentType<RowProps>;
361
+ Root: React.ComponentType<{
362
+ children?: React.ReactNode;
363
+ }>;
364
+ Button: React.ComponentType<ButtonProps>;
365
+ };
366
+
367
+ declare const Button: () => void;
368
+
369
+ declare const index_html_Button: typeof Button;
370
+ declare namespace index_html {
371
+ export { index_html_Button as Button };
372
+ }
373
+
374
+ declare const _default$1: {
375
+ Button: React.FC<ButtonProps>;
376
+ Root: React.FC<{
377
+ children?: React.ReactNode;
378
+ }>;
379
+ Section: React.FC<RowProps>;
380
+ Row: React.FC<RowProps>;
381
+ Col: React.FC<ColProps>;
382
+ Text: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<TextSettingProps, TextStyleProps, Record<string, any>> & {
383
+ builderAttrs?: Record<string, any> | undefined;
384
+ style?: React.CSSProperties | undefined;
385
+ } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, ""> & {
386
+ disableEdit?: boolean | undefined;
387
+ } & React.RefAttributes<HTMLElement>>;
388
+ Image: React.FC<ImageProps>;
389
+ Link: React.FC<LinkProps>;
390
+ };
391
+
392
+ declare const _default: {
393
+ Link: _gem_sdk_core.ComponentSetting<LinkProps>;
394
+ Image: _gem_sdk_core.ComponentSetting<ImageProps>;
395
+ Text: _gem_sdk_core.ComponentSetting<TextProps>;
396
+ Root: _gem_sdk_core.ComponentSetting<any>;
397
+ Section: _gem_sdk_core.ComponentSetting<RowProps>;
398
+ Row: _gem_sdk_core.ComponentSetting<RowProps>;
399
+ Col: _gem_sdk_core.ComponentSetting<ColProps>;
400
+ Button: _gem_sdk_core.ComponentSetting<ButtonProps>;
401
+ };
402
+
403
+ type DynamicSource = {
404
+ val: React.ReactNode;
405
+ uid?: string;
406
+ settingId?: string;
407
+ isLiquid?: boolean;
408
+ pageContext?: PageContext;
409
+ isCapitalize?: boolean;
410
+ defaultVal?: string;
411
+ isReplaceLocationOrigin?: boolean;
412
+ isReplaceMaxSize?: boolean;
413
+ isReplaceInventoryQuantity?: boolean;
414
+ };
415
+ declare const REGEX_PAGE_TYPE: RegExp;
416
+ declare const isShopifyDomain: (isHyperlink: boolean, urlHref: string) => boolean;
417
+ declare const getLinkArticle: (linkArticle?: string, customURL?: {
418
+ link?: string;
419
+ target?: string;
420
+ type?: any;
421
+ }) => string | undefined;
422
+ declare const isTransparentColor: (str?: string) => boolean;
423
+ declare const isTransparentRGBA: (rgbStr: string) => boolean;
424
+ declare const isHexTransparent: (hex: string) => boolean;
425
+ declare const youtubeShortsRegex: RegExp;
426
+ declare const createTranslateKey: (uid?: string, settingId?: string) => string;
427
+ declare const createSettingId: ({ id, index, suffix, }: {
428
+ id?: string | undefined;
429
+ index?: number | undefined;
430
+ suffix?: string | undefined;
431
+ }) => string;
432
+ declare const getDynamicSourceLocales: ({ val, uid, settingId, isLiquid, pageContext, isCapitalize, defaultVal, isReplaceLocationOrigin, isReplaceMaxSize, isReplaceInventoryQuantity, }: DynamicSource) => string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>;
433
+ declare const getStaticLocale: (tag: string, key: string) => string;
434
+ declare const getSettingPreloadData: (disabledValue: string, enabledValue?: string) => string;
435
+ declare function normalizeMailto(urlHref: string): string;
436
+ declare const getInsertLinkData: (defaultWrap: string, setting?: {
437
+ link?: string;
438
+ target?: string;
439
+ isTranslate?: boolean;
440
+ type?: string;
441
+ noFollow?: boolean;
442
+ isLiquid?: boolean;
443
+ }, htmlType?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'] | 'link') => {
444
+ Wrap: string | React.FC<LinkProps>;
445
+ urlData: Record<string, any>;
446
+ shouldRenderLink: boolean;
447
+ };
448
+ declare const isLinkedToSalesPage: (type?: string) => boolean;
449
+ declare const checkIsScrollToTop: (setting?: ImageLink) => boolean;
450
+ declare const checkIsOpenPopup: (setting?: ImageLink) => boolean | undefined;
451
+ declare const getLinkData: ({ setting, htmlType, defaultWrap, isLiquid, enableImageLink, }: {
452
+ isLiquid?: boolean | undefined;
453
+ defaultWrap: string;
454
+ enableImageLink?: boolean | undefined;
455
+ setting?: ImageLink | undefined;
456
+ htmlType?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'] | 'link';
457
+ }) => {
458
+ Wrapper: string | React.FC<LinkProps>;
459
+ urlData: Record<string, any>;
460
+ shouldRenderLink: boolean;
461
+ };
462
+ declare const replaceLinkData: (text?: string, isTranslate?: boolean) => string | undefined;
463
+ declare function filterTruthyStyles<T extends Record<string, any>>(styles: T): Partial<T>;
464
+ declare function filterTruthyObject<T extends Record<string, any>>(obj: T): Partial<T>;
465
+ declare const getDisplayStyle: (fnCondition: (params: NameDevices) => boolean, defaultValue: string) => any;
466
+ declare const convertUnitToNumber: (value: string | undefined | number, defaultValue: number) => number;
467
+ declare const getAllHrefFromString: (htmlString: string) => string[];
468
+ declare const replaceAllHrefFromString: (htmlString: string, hrefs: string[]) => string;
469
+ declare function isEmptyObject(obj: Record<string, any>): boolean;
470
+ declare const handleClickLink: (setting?: ImageLink, mode?: RenderMode) => void;
471
+ declare const getBackgroundTranslated: ({ background, enableTranslate, uid, pageContext, isTranslateVideo, }: {
472
+ background?: Partial<Record<NameDevices, BackgroundMedia>> | undefined;
473
+ enableTranslate?: boolean | undefined;
474
+ uid?: string | undefined;
475
+ pageContext?: PageContext | undefined;
476
+ isTranslateVideo?: boolean | undefined;
477
+ }) => ObjectDevices<BackgroundMedia>;
478
+ declare const extractProductID: (baseID: string) => string;
479
+
480
+ export { Button$1 as Button, type ButtonProps, Column as Col, type ColProps, Image, type ImageProps, type ImgProps, Link, type LinkProps, type ObjectFit, REGEX_PAGE_TYPE, Root, type RootProps, Row, type RowProps, Section, Text, type TextProps, _default$1 as builderComponent, buttonSetting, checkIsOpenPopup, checkIsScrollToTop, _default as componentSettings, convertUnitToNumber, createSettingId, createTranslateKey, extractProductID, filterTruthyObject, filterTruthyStyles, getAllHrefFromString, getBackgroundTranslated, getDisplayStyle, getDynamicSourceLocales, getInsertLinkData, getLinkArticle, getLinkData, getSettingPreloadData, getStaticLocale, gridSetting, handleClickLink, imageSetting, isEmptyObject, isHexTransparent, isLinkedToSalesPage, isShopifyDomain, isTransparentColor, isTransparentRGBA, linkSetting, index_html as liquidComponents, _default$2 as nextComponent, normalizeMailto, replaceAllHrefFromString, replaceLinkData, textSetting, youtubeShortsRegex };
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@gem-sdk/upsell-components",
3
+ "version": "12.0.0-dev.108",
4
+ "license": "MIT",
5
+ "sideEffects": false,
6
+ "main": "dist/cjs/index.js",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "cleanup": "rimraf es dist lib",
12
+ "prebuild": "yarn cleanup",
13
+ "pre:publish": "node ./scripts/convert-publish.js -p",
14
+ "post:publish": "node ./scripts/convert-publish.js",
15
+ "watch": "rollup -c ./scripts/rollup.config.mjs -w",
16
+ "build": "rollup -c ./scripts/rollup.config.mjs --environment NODE_ENV:production && tsup src/index.ts --dts-only --outDir dist/types",
17
+ "lint": "eslint ./src --ext .tsx,.ts",
18
+ "test": "jest -c ./../../helpers/jest.config.ts",
19
+ "test:watch": "jest -c ./../../helpers/jest.config.ts --watch",
20
+ "type-check": "yarn tsc --noEmit",
21
+ "format": "prettier --write \"./src/**/*.{ts,tsx}\"",
22
+ "relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/element-relationship/index.js",
23
+ "update-img-src-3rd": "node ./scripts/update-img-src-3rd.js",
24
+ "generate-tailwind": "node ./scripts/generateTailwind.js",
25
+ "scan-and-translate": "node ./scripts/scan-and-translate.js",
26
+ "scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
27
+ },
28
+ "devDependencies": {
29
+ "@gem-sdk/core": "12.0.0-dev.103",
30
+ "@gem-sdk/styles": "12.0.0-dev.86",
31
+ "@gem-sdk/system": "12.0.0-dev.53",
32
+ "@types/react-transition-group": "^4.4.12",
33
+ "tsup": "^8.5.0",
34
+ "postcss-import": "^16.1.1",
35
+ "react-transition-group": "^4.4.5",
36
+ "@thedutchcoder/postcss-rem-to-px": "^0.0.2",
37
+ "autoprefixer": "^10.4.21",
38
+ "cssnano": "^7.1.1",
39
+ "postcss": "^8.5.6",
40
+ "postcss-discard-comments": "^7.0.4",
41
+ "postcss-prefixwrap": "^1.57.0",
42
+ "xlsx": "^0.18.5"
43
+ },
44
+ "dependencies": {
45
+ "@gem-sdk/keen-slider": "^6.8.8",
46
+ "@gem-sdk/swiper": "0.0.10",
47
+ "node-html-parser": "^6.1.13",
48
+ "react-transition-group": "^4.4.5",
49
+ "react-youtube": "^10.1.0"
50
+ },
51
+ "peerDependencies": {
52
+ "next": ">=14"
53
+ },
54
+ "module": "dist/esm/index.js",
55
+ "types": "dist/types/index.d.ts",
56
+ "exports": {
57
+ "./package.json": "./package.json",
58
+ ".": {
59
+ "import": "./dist/esm/index.js",
60
+ "require": "./dist/cjs/index.js",
61
+ "types": "./dist/types/index.d.ts"
62
+ },
63
+ "./safelist": {
64
+ "import": "./dist/esm/safelist.js",
65
+ "require": "./dist/cjs/safelist.js"
66
+ },
67
+ "./safelistSection": {
68
+ "import": "./dist/esm/safelistSection.js",
69
+ "require": "./dist/cjs/safelistSection.js"
70
+ },
71
+ "./ignoreHashClasses": {
72
+ "import": "./dist/esm/ignoreHashClasses.js",
73
+ "require": "./dist/cjs/ignoreHashClasses.js"
74
+ }
75
+ }
76
+ }