@gem-sdk/components 17.0.0-dev.82 → 17.0.0-dev.83

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 (57) hide show
  1. package/dist/cjs/common/components/NoDataState.js +0 -1
  2. package/dist/cjs/countdown-timer/hooks/useTimeLeft.js +1 -1
  3. package/dist/cjs/grid/components/row/common/styles.js +1 -0
  4. package/dist/cjs/image/common/classes.js +1 -1
  5. package/dist/cjs/index.js +1 -1
  6. package/dist/cjs/link/components/CustomLink.js +2 -1
  7. package/dist/esm/common/components/NoDataState.js +0 -1
  8. package/dist/esm/countdown-timer/hooks/useTimeLeft.js +1 -1
  9. package/dist/esm/grid/components/row/common/styles.js +1 -0
  10. package/dist/esm/image/common/classes.js +1 -1
  11. package/dist/esm/index.js +1 -1
  12. package/dist/esm/link/components/CustomLink.js +2 -1
  13. package/dist/types/index.d.ts +4 -24
  14. package/package.json +5 -17
  15. package/dist/cjs/grid/components/server/Col.server.js +0 -1
  16. package/dist/cjs/grid/components/server/Root.server.js +0 -1
  17. package/dist/cjs/grid/components/server/Row.server.js +0 -1
  18. package/dist/cjs/grid/components/server/RowEmbeded.client.js +0 -2
  19. package/dist/cjs/grid/components/server/Section.server.js +0 -1
  20. package/dist/cjs/header/components/server/Header.server.js +0 -1
  21. package/dist/cjs/heading/components/server/Heading.server.js +0 -1
  22. package/dist/cjs/icon/components/server/Icon.server.js +0 -1
  23. package/dist/cjs/icon-list-hoz/components/server/IconListHoz.server.js +0 -1
  24. package/dist/cjs/icon-list-hoz/components/server/IconListHozItem.server.js +0 -1
  25. package/dist/cjs/icon-list-v2/components/server/IconList.server.js +0 -1
  26. package/dist/cjs/image/common/attrsServer.js +0 -1
  27. package/dist/cjs/image/components/server/AdaptiveImage.server.js +0 -1
  28. package/dist/cjs/image/components/server/Image.server.js +0 -1
  29. package/dist/cjs/image/components/server/NextImage.server.js +0 -1
  30. package/dist/cjs/line/components/Line.server.js +0 -1
  31. package/dist/cjs/link/components/server/Link.server.js +0 -1
  32. package/dist/cjs/server.js +0 -1
  33. package/dist/cjs/sticky/components/Sticky.server.js +0 -1
  34. package/dist/cjs/sticky/hooks/useServerSticky.js +0 -1
  35. package/dist/cjs/text/components/Text.server.js +0 -1
  36. package/dist/esm/grid/components/server/Col.server.js +0 -1
  37. package/dist/esm/grid/components/server/Root.server.js +0 -1
  38. package/dist/esm/grid/components/server/Row.server.js +0 -1
  39. package/dist/esm/grid/components/server/RowEmbeded.client.js +0 -2
  40. package/dist/esm/grid/components/server/Section.server.js +0 -1
  41. package/dist/esm/header/components/server/Header.server.js +0 -1
  42. package/dist/esm/heading/components/server/Heading.server.js +0 -1
  43. package/dist/esm/icon/components/server/Icon.server.js +0 -1
  44. package/dist/esm/icon-list-hoz/components/server/IconListHoz.server.js +0 -1
  45. package/dist/esm/icon-list-hoz/components/server/IconListHozItem.server.js +0 -1
  46. package/dist/esm/icon-list-v2/components/server/IconList.server.js +0 -1
  47. package/dist/esm/image/common/attrsServer.js +0 -1
  48. package/dist/esm/image/components/server/AdaptiveImage.server.js +0 -1
  49. package/dist/esm/image/components/server/Image.server.js +0 -1
  50. package/dist/esm/image/components/server/NextImage.server.js +0 -1
  51. package/dist/esm/line/components/Line.server.js +0 -1
  52. package/dist/esm/link/components/server/Link.server.js +0 -1
  53. package/dist/esm/server.js +0 -1
  54. package/dist/esm/sticky/components/Sticky.server.js +0 -1
  55. package/dist/esm/sticky/hooks/useServerSticky.js +0 -1
  56. package/dist/esm/text/components/Text.server.js +0 -1
  57. package/dist/types/server.d.ts +0 -459
@@ -1,459 +0,0 @@
1
- import { BasePropsWrap, ObjectDevices, BackgroundMedia, SizeSettingGlobal, ColorValueType, StateProp, ShadowProps, TypographySettingV2, AlignProp, TransformProp, TypographySetting, Border, CornerRadius, PageContext, BaseProps, Ratio, ResponsiveStateProp, Background, PaddingType, SizeSetting, ObjectLayoutValue } from '@gem-sdk/core';
2
- import { Property } from 'csstype';
3
-
4
- type TextStyleProps = {
5
- textColor?: ColorValueType;
6
- parentTextColor?: StateProp<ColorValueType>;
7
- textShadowNotState?: ShadowProps;
8
- hasTextShadowNotState?: boolean;
9
- color?: StateProp<ColorValueType>;
10
- lineColor?: StateProp<ColorValueType>;
11
- typo?: TypographySettingV2;
12
- textAlign?: ObjectDevices<AlignProp>;
13
- lineClamp?: ObjectDevices<number>;
14
- hasLineClamp?: ObjectDevices<boolean>;
15
- hasTextShadow?: StateProp<boolean>;
16
- textShadow?: StateProp<ShadowProps>;
17
- transform?: TransformProp;
18
- spacing?: string;
19
- thickness?: string | number;
20
- underlineLink?: {
21
- hover: boolean;
22
- normal: boolean;
23
- };
24
- /**
25
- * @deprecated please use `typo` instead
26
- */
27
- typography?: TypographySetting;
28
- /**
29
- * @deprecated this prop do not use anymore
30
- */
31
- hasBoxShadow?: StateProp<boolean>;
32
- /**
33
- * @deprecated this prop do not use anymore
34
- */
35
- boxShadow?: StateProp<ShadowProps>;
36
- align?: ObjectDevices<AlignProp>;
37
- shapeBorder?: ObjectDevices<Border>;
38
- shapeRounded?: ObjectDevices<CornerRadius>;
39
- shapeBoxShadow?: ObjectDevices<ShadowProps>;
40
- isForceValue?: boolean;
41
- lineThrough?: boolean;
42
- opacityPrice?: number;
43
- enableHoverEffect?: boolean;
44
- };
45
- type HTMLTag = 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'small' | 'mark' | 'kbd' | 'i';
46
- type TextSettingProps = {
47
- text?: string | number;
48
- translateSetting?: string;
49
- htmlTag?: HTMLTag;
50
- opacityPrice?: number;
51
- options?: {
52
- useState?: boolean;
53
- uniqueId?: string | undefined;
54
- productID?: string | undefined;
55
- isCannotEditing?: boolean | undefined;
56
- disablePointerEvent?: boolean;
57
- customClass?: {
58
- wrapper?: string;
59
- };
60
- };
61
- tagWidth?: Record<string, string>;
62
- background?: ObjectDevices<BackgroundMedia>;
63
- globalSize?: ObjectDevices<SizeSettingGlobal>;
64
- excludeFlex?: boolean;
65
- isForceValue?: boolean;
66
- };
67
- type TextProps = BasePropsWrap<TextSettingProps, TextStyleProps> & Omit<React.ComponentPropsWithoutRef<'p'>, ''> & {
68
- disableEdit?: boolean;
69
- pageContext?: PageContext;
70
- };
71
-
72
- type Position = 'top' | 'bottom';
73
- type DisplayOptionValue = 'always' | 'after-first-scroll' | 'after-first-cart-button' | 'meet-section';
74
- type StickySettingProps = {
75
- display: ObjectDevices<DisplayOptionValue>;
76
- fullWidth?: ObjectDevices<boolean>;
77
- width?: ObjectDevices<string>;
78
- background: ObjectDevices<BackgroundMedia>;
79
- position: ObjectDevices<Position>;
80
- padding?: ObjectDevices<string>;
81
- preloadBgImage?: boolean;
82
- isScrollToTop?: boolean;
83
- minimize?: boolean;
84
- };
85
- type StickyProps = BasePropsWrap<StickySettingProps> & {
86
- children?: React.ReactNode;
87
- pageContext?: PageContext;
88
- };
89
-
90
- type LinkSettingProps = {
91
- type?: 'auto' | 'product' | 'collection' | 'custom';
92
- label?: string;
93
- noFollow?: boolean;
94
- target?: HTMLAnchorElement['target'];
95
- href?: HTMLAnchorElement['href'];
96
- };
97
- type LinkProps = BaseProps<LinkSettingProps> & {
98
- className?: string;
99
- style?: React.CSSProperties;
100
- children?: React.ReactNode;
101
- title?: string;
102
- dataId?: string;
103
- };
104
-
105
- type LineSettingProps = {
106
- enableIconText?: ObjectDevices<boolean>;
107
- text?: string;
108
- iconSvg?: string;
109
- position?: AlignProp;
110
- };
111
- type LineStyleProps = {
112
- lineStyle: ObjectDevices<string>;
113
- color?: ColorValueType;
114
- thickness?: ObjectDevices<string | number>;
115
- fullWidth?: ObjectDevices<boolean>;
116
- width?: ObjectDevices<string | number>;
117
- align?: ObjectDevices<AlignProp>;
118
- typography?: TypographySetting;
119
- typo?: TypographySettingV2;
120
- textColor?: ColorValueType;
121
- textSpacing?: string | number;
122
- iconSize?: ObjectDevices<string | number>;
123
- iconRotate?: string | number;
124
- iconColor?: ColorValueType;
125
- iconSpacing?: string | number;
126
- transform?: string | number;
127
- customTransform?: string | number;
128
- };
129
- type LineProps = {
130
- children?: React.ReactNode;
131
- className?: string;
132
- } & BaseProps<LineSettingProps, LineStyleProps>;
133
-
134
- type ObjectFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
135
- type IImageStorageType = 'THEME' | 'FILE_CONTENT' | 'SHOPIFY_CDN';
136
- type BaseImageData = {
137
- alt?: string;
138
- src?: string;
139
- width?: number;
140
- height?: number;
141
- base64?: string;
142
- backupFileKey?: string;
143
- backupFilePath?: string;
144
- storage?: IImageStorageType;
145
- metafieldDefinitionKey?: string;
146
- };
147
- type SharedProps = {
148
- aspectRatio?: ObjectDevices<string>;
149
- layout?: ObjectDevices<ObjectFit>;
150
- objectFit?: ObjectDevices<ObjectFit>;
151
- borderRadius?: ResponsiveStateProp<string>;
152
- image?: BaseImageData;
153
- };
154
- type ImageStyleProps = {
155
- shape?: ObjectDevices<SizeSettingGlobal>;
156
- customAspectRadio?: ObjectDevices<Ratio>;
157
- fullWidth?: ObjectDevices<boolean>;
158
- width?: ObjectDevices<number | string>;
159
- align?: ObjectDevices<AlignProp>;
160
- opacity?: StateProp<number>;
161
- opacityColor?: StateProp<ColorValueType>;
162
- hasBoxShadowImg?: StateProp<boolean>;
163
- boxShadowImg?: StateProp<ShadowProps>;
164
- roundedImg?: StateProp<CornerRadius>;
165
- borderImg?: StateProp<Border>;
166
- borderRadius?: CornerRadius;
167
- wrapperBorder?: Border;
168
- hasActiveShadow?: boolean;
169
- shadow?: ShadowProps;
170
- } & Pick<SharedProps, 'layout' | 'aspectRatio' | 'objectFit'>;
171
- type ImageLink = {
172
- type?: string;
173
- link?: string;
174
- target?: string;
175
- noFollow?: boolean;
176
- isTranslate?: boolean;
177
- };
178
- type ImageSettingProps = {
179
- imageStyle?: 'rectangle' | 'circle';
180
- priority?: boolean;
181
- quality?: number;
182
- vw?: ObjectDevices<number>;
183
- alt?: string;
184
- title?: string;
185
- isAdaptive?: boolean;
186
- imageLink?: ImageLink;
187
- hoverEffect?: string;
188
- image?: BaseImageData;
189
- isNotLazyload?: boolean;
190
- enableImageLink?: boolean;
191
- disableNoDataState?: boolean;
192
- srcSet?: ObjectDevices<BaseImageData>;
193
- qualityPercent?: ObjectDevices<number>;
194
- qualityType?: ObjectDevices<QualityType>;
195
- };
196
- type QualityType = 'finest' | 'high' | 'medium' | 'custom';
197
- type ImageProps = BasePropsWrap<ImageSettingProps, ImageStyleProps> & {
198
- className?: string;
199
- children?: React.ReactNode;
200
- onClick?: React.MouseEventHandler<any>;
201
- onLoad?: React.ReactEventHandler<any>;
202
- } & {
203
- advanced?: any;
204
- };
205
-
206
- type IconListSettingProps = {
207
- childItem?: string[];
208
- textTypo?: TypographySettingV2;
209
- iconSvg?: string;
210
- iconWidth?: ObjectDevices<number>;
211
- childConfig?: string[];
212
- globalSize?: ObjectDevices<SizeSettingGlobal>;
213
- iconType?: 'matching' | 'different';
214
- };
215
- type IconListStyleProps = {
216
- horizontalSpacing?: ObjectDevices<Property.Padding>;
217
- verticalSpacing?: ObjectDevices<Property.Padding>;
218
- position?: ObjectDevices<'center' | 'baseline'>;
219
- align?: ObjectDevices<AlignProp>;
220
- iconColor?: ColorValueType;
221
- backgroundColor?: ColorValueType;
222
- iconBorder?: Border;
223
- iconRounded?: CornerRadius;
224
- background?: ObjectDevices<Background>;
225
- panelAlign?: ObjectDevices<AlignProp>;
226
- contentBoxWidth?: ObjectDevices<string | number>;
227
- contentBoxPadding?: ObjectDevices<PaddingType>;
228
- contentBoxBorder?: ObjectDevices<Border>;
229
- contentBoxRounded?: ObjectDevices<CornerRadius>;
230
- contentBoxShadow?: ObjectDevices<ShadowProps>;
231
- };
232
- type IconListProps = BasePropsWrap<IconListSettingProps, IconListStyleProps> & {
233
- pageContext?: PageContext;
234
- };
235
-
236
- type IconListHozSettingProps = {
237
- childItem?: string[];
238
- preload?: boolean;
239
- };
240
- type IconListHozStyleProps = {
241
- background?: ObjectDevices<Background>;
242
- align?: ObjectDevices<AlignProp>;
243
- verticalAlign?: ObjectDevices<'start' | 'end' | 'center' | 'space-between'>;
244
- horizontalSpacing?: Property.Padding;
245
- };
246
- type IconListHozProps = BasePropsWrap<IconListHozSettingProps, IconListHozStyleProps> & {
247
- children?: React.ReactNode;
248
- };
249
- type IconListItemProps = BasePropsWrap & React.ComponentPropsWithoutRef<'div'> & {
250
- horizontalSpacing?: ObjectDevices<Property.Padding>;
251
- };
252
-
253
- type IconSettingProps = {
254
- iconSvg?: string;
255
- iconLinkEnable?: boolean;
256
- iconLink?: {
257
- type?: string;
258
- link?: string;
259
- target?: string;
260
- title?: string;
261
- noFollow?: boolean;
262
- };
263
- };
264
- type IconStyleProps = {
265
- iconHeight?: string | number;
266
- iconSize?: ObjectDevices<Ratio>;
267
- align?: ObjectDevices<AlignProp>;
268
- iconWidth?: ObjectDevices<string | number>;
269
- bgColor?: StateProp<ColorValueType>;
270
- color?: StateProp<ColorValueType>;
271
- iconBorder?: StateProp<Border>;
272
- iconRotate?: number;
273
- spin?: boolean;
274
- iconRounded?: StateProp<CornerRadius>;
275
- iconSpacing?: SizeSetting;
276
- globalSize?: ObjectDevices<SizeSettingGlobal>;
277
- iconShadow?: ShadowProps;
278
- };
279
- type IconProps = BasePropsWrap<IconSettingProps, IconStyleProps> & {
280
- className?: string;
281
- style?: React.CSSProperties;
282
- } & {
283
- advanced?: any;
284
- } & Omit<React.ComponentPropsWithoutRef<'div'>, ''>;
285
-
286
- type HeadingSettingProps = {
287
- htmlTag?: number;
288
- text?: string;
289
- globalSize?: ObjectDevices<SizeSettingGlobal>;
290
- background?: ObjectDevices<BackgroundMedia>;
291
- };
292
- type HeadingStyleProps = {
293
- textShadowNotState?: ShadowProps;
294
- hasTextShadowNotState?: boolean;
295
- /**
296
- * @deprecated please use `typo` instead
297
- */
298
- typography?: TypographySetting;
299
- typo?: TypographySettingV2;
300
- textAlign?: ObjectDevices<AlignProp>;
301
- lineClamp?: ObjectDevices<number>;
302
- hasLineClamp?: ObjectDevices<boolean>;
303
- hasTextShadow?: StateProp<boolean>;
304
- textShadow?: StateProp<ShadowProps>;
305
- align?: ObjectDevices<AlignProp>;
306
- shapeBorder?: ObjectDevices<Border>;
307
- shapeRounded?: ObjectDevices<CornerRadius>;
308
- shapeBoxShadow?: ObjectDevices<ShadowProps>;
309
- };
310
- type HeadingProps = BasePropsWrap<HeadingSettingProps, HeadingStyleProps> & Omit<React.ComponentPropsWithoutRef<'h1'>, 'children'> & {
311
- children: React.ReactNode;
312
- };
313
-
314
- type MenuData = {
315
- ROOT: SubMenu;
316
- } & Menu;
317
- type SubMenu = {
318
- id: string;
319
- title: string;
320
- link?: string;
321
- childrens?: string[];
322
- };
323
- type Menu = Record<string, SubMenu>;
324
-
325
- type HeaderStyle = 'basic' | 'morden';
326
- type MenuItemProps = {
327
- id: string;
328
- menu?: MenuData;
329
- depth?: number;
330
- maxDepth?: number;
331
- arrow?: string;
332
- textColor?: StateProp<ColorValueType>;
333
- menuTextColor?: StateProp<ColorValueType>;
334
- typography?: TypographySetting;
335
- typo?: TypographySettingV2;
336
- closeMenu?: () => void;
337
- menuBg?: ObjectDevices<ColorValueType>;
338
- headerBg?: ObjectDevices<ColorValueType>;
339
- enableHoverEffect?: boolean;
340
- enableDropdownHoverEffect?: boolean;
341
- };
342
- type HeaderOriginalSettingProps = {
343
- logo?: NonNullable<ImageProps['setting']>['srcSet'];
344
- logoWidth?: ObjectDevices<string>;
345
- logoAspectRatio?: ObjectDevices<string>;
346
- customAspectRadio?: ObjectDevices<Ratio>;
347
- layout?: ObjectDevices<ObjectFit>;
348
- breakpoint?: 'tablet' | 'mobile' | 'desktop';
349
- cartIcon?: string;
350
- openMode?: 'popup' | 'page';
351
- buyNow?: boolean;
352
- cardEnableHoverEffect?: boolean;
353
- itemEnableHoverEffect?: boolean;
354
- enableDropdownHoverEffect?: boolean;
355
- };
356
- type HeaderSettingProps = HeaderOriginalSettingProps & Pick<MenuItemProps, 'arrow' | 'menu'>;
357
- type HeaderStyleProps = {
358
- height?: ObjectDevices<string>;
359
- cartIconColor?: StateProp<ColorValueType>;
360
- btnType?: 'primary' | 'secondary';
361
- btnRounded?: StateProp<CornerRadius>;
362
- btnBgColor?: StateProp<ColorValueType>;
363
- btnTextColor?: StateProp<ColorValueType>;
364
- btnWidth?: ObjectDevices<string | number | undefined>;
365
- btnTypography?: TypographySetting;
366
- btnSpacing?: SizeSetting;
367
- btnBorder?: StateProp<Border>;
368
- } & Pick<MenuItemProps, 'typography' | 'typo' | 'menuTextColor' | 'menuBg' | 'headerBg' | 'textColor'>;
369
- type HeaderProps = BasePropsWrap<HeaderSettingProps & {
370
- kind?: HeaderStyle;
371
- }, HeaderStyleProps> & {
372
- children: React.ReactNode;
373
- };
374
-
375
- type ColSettingProps = {
376
- allowSameHeight?: boolean;
377
- sameHeightSubgridContainer?: boolean;
378
- };
379
- type ColStyleProps = {
380
- order?: ObjectDevices<number>;
381
- gap?: ObjectDevices<string>;
382
- alignItem?: ObjectDevices<Property.AlignItems>;
383
- justifyContent?: ObjectDevices<Property.JustifyContent>;
384
- display?: ObjectDevices<Property.Display>;
385
- fullWidth?: boolean;
386
- };
387
- type ColProps = BasePropsWrap<ColSettingProps, ColStyleProps> & React.ComponentPropsWithoutRef<'div'> & {
388
- justifyContent?: ObjectDevices<Property.JustifyContent>;
389
- order?: ObjectDevices<number>;
390
- className?: string;
391
- children?: any;
392
- layout?: ObjectDevices<ObjectLayoutValue>;
393
- parentTag?: string;
394
- rawChildren?: any[];
395
- hiddenEmptyCol?: boolean;
396
- } & {
397
- advanced?: any;
398
- };
399
- type RowSettingProps = {
400
- responsive?: ObjectDevices<string>;
401
- layout?: ObjectDevices<ObjectLayoutValue>;
402
- verticalAlign?: ObjectDevices<'start' | 'end' | 'center' | 'space-between'>;
403
- horizontalAlign?: ObjectDevices<'start' | 'end' | 'center' | 'space-between'>;
404
- order?: ObjectDevices<number>;
405
- inlineAlignment?: 'start' | 'end' | 'center';
406
- blockAlignment?: 'start' | 'end' | 'center';
407
- allowSameHeight?: boolean;
408
- sameHeightSubgridContainer?: boolean;
409
- isSection?: boolean;
410
- lazy?: boolean;
411
- priority?: boolean;
412
- as?: 'div' | 'section';
413
- };
414
- type RowStyleProps = {
415
- enablePagePadding?: ObjectDevices<boolean>;
416
- fullWidth?: ObjectDevices<boolean>;
417
- width?: ObjectDevices<string>;
418
- height?: ObjectDevices<'auto' | '100%'>;
419
- preloadBgImage?: boolean;
420
- columnGap?: ObjectDevices<string>;
421
- rowGap?: string;
422
- border?: ObjectDevices<StateProp<Border>>;
423
- rounded?: ObjectDevices<StateProp<CornerRadius>>;
424
- padding?: ObjectDevices<SizeSettingGlobal>;
425
- verticalGutter?: ObjectDevices<string>;
426
- verticalGutterMobile?: ObjectDevices<string>;
427
- background?: ObjectDevices<BackgroundMedia>;
428
- boxShadow?: ObjectDevices<StateProp<ShadowProps>>;
429
- };
430
- type RowProps = BasePropsWrap<RowSettingProps, RowStyleProps> & React.ComponentPropsWithoutRef<'div'> & {
431
- maxWidthWithEmptyChildren?: string | number;
432
- isNotFullWidth?: boolean;
433
- rawChildren?: any[];
434
- hiddenEmptyCol?: boolean;
435
- parentStyle?: React.CSSProperties;
436
- pageContext?: PageContext;
437
- };
438
-
439
- declare const _default: {
440
- Col: React.FC<ColProps>;
441
- Header: ({ builderProps, style, setting, styles, children }: HeaderProps) => React.JSX.Element;
442
- Heading: React.FC<HeadingProps>;
443
- Icon: React.FC<IconProps>;
444
- IconListHoz: React.FC<IconListHozProps>;
445
- IconListItemHoz: React.FC<IconListItemProps>;
446
- IconListV2: React.FC<IconListProps>;
447
- Image: React.FC<ImageProps>;
448
- Line: React.FC<LineProps>;
449
- Link: React.FC<LinkProps>;
450
- Root: React.FC<{
451
- children?: React.ReactNode;
452
- }>;
453
- Row: React.FC<RowProps>;
454
- Section: React.FC<RowProps>;
455
- Sticky: React.FC<StickyProps>;
456
- Text: React.FC<TextProps>;
457
- };
458
-
459
- export { _default as default };