@gem-sdk/components 2.0.0-dev.411 → 2.0.0-dev.413

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 (58) hide show
  1. package/dist/cjs/button/setting/configs/settings.js +1 -2
  2. package/dist/cjs/form/components/contact/common/composeStyles.js +3 -0
  3. package/dist/cjs/form/components/form-email/FormEmail.js +19 -18
  4. package/dist/cjs/form/components/form-email/FormEmail.liquid.js +6 -1
  5. package/dist/cjs/form/components/form-email/common/composeClasses.js +2 -2
  6. package/dist/cjs/form/components/textarea/TextArea.js +10 -18
  7. package/dist/cjs/form/components/textarea/TextArea.liquid.js +2 -2
  8. package/dist/cjs/form/components/textarea/common/composeStyles.js +8 -4
  9. package/dist/cjs/form/components/textfield/TextField.js +11 -19
  10. package/dist/cjs/form/components/textfield/TextField.liquid.js +2 -2
  11. package/dist/cjs/form/components/textfield/common/composeClasses.js +1 -1
  12. package/dist/cjs/form/components/textfield/common/composeStyles.js +11 -4
  13. package/dist/cjs/form/components/textinput/common/composeClasses.js +1 -1
  14. package/dist/cjs/form/setting/contact/ContactInitConfig.js +243 -12
  15. package/dist/cjs/form/setting/form-checkbox/configs/uiV2.js +56 -56
  16. package/dist/cjs/form/setting/form-dropdown/configs/uiV2.js +115 -121
  17. package/dist/cjs/form/setting/form-email/configs/settings.js +2 -1
  18. package/dist/cjs/form/setting/form-email/configs/uiV2.js +200 -205
  19. package/dist/cjs/form/setting/form-textarea/configs/settings.js +56 -0
  20. package/dist/cjs/form/setting/form-textarea/configs/uiV2.js +61 -5
  21. package/dist/cjs/form/setting/newsletter/NewsletterInitConfig.js +15 -0
  22. package/dist/cjs/form/setting/newsletter/configs/settings.js +77 -1
  23. package/dist/cjs/form/setting/newsletter/configs/uiV2.js +5 -8
  24. package/dist/cjs/form/setting/text-field/configs/settings.js +57 -0
  25. package/dist/cjs/form/setting/text-field/configs/uiV2.js +82 -5
  26. package/dist/cjs/grid/row/commons/getClass.js +1 -1
  27. package/dist/cjs/grid/row/hooks/useRowSetting.js +1 -1
  28. package/dist/cjs/grid/row/setting/configs/settings.js +1 -16
  29. package/dist/esm/button/setting/configs/settings.js +1 -2
  30. package/dist/esm/form/components/contact/common/composeStyles.js +4 -1
  31. package/dist/esm/form/components/form-email/FormEmail.js +19 -18
  32. package/dist/esm/form/components/form-email/FormEmail.liquid.js +6 -1
  33. package/dist/esm/form/components/form-email/common/composeClasses.js +2 -2
  34. package/dist/esm/form/components/textarea/TextArea.js +10 -18
  35. package/dist/esm/form/components/textarea/TextArea.liquid.js +2 -2
  36. package/dist/esm/form/components/textarea/common/composeStyles.js +9 -5
  37. package/dist/esm/form/components/textfield/TextField.js +11 -19
  38. package/dist/esm/form/components/textfield/TextField.liquid.js +2 -2
  39. package/dist/esm/form/components/textfield/common/composeClasses.js +1 -1
  40. package/dist/esm/form/components/textfield/common/composeStyles.js +12 -5
  41. package/dist/esm/form/components/textinput/common/composeClasses.js +1 -1
  42. package/dist/esm/form/setting/contact/ContactInitConfig.js +243 -12
  43. package/dist/esm/form/setting/form-checkbox/configs/uiV2.js +56 -56
  44. package/dist/esm/form/setting/form-dropdown/configs/uiV2.js +115 -121
  45. package/dist/esm/form/setting/form-email/configs/settings.js +2 -1
  46. package/dist/esm/form/setting/form-email/configs/uiV2.js +200 -205
  47. package/dist/esm/form/setting/form-textarea/configs/settings.js +56 -0
  48. package/dist/esm/form/setting/form-textarea/configs/uiV2.js +61 -5
  49. package/dist/esm/form/setting/newsletter/NewsletterInitConfig.js +15 -0
  50. package/dist/esm/form/setting/newsletter/configs/settings.js +77 -1
  51. package/dist/esm/form/setting/newsletter/configs/uiV2.js +5 -8
  52. package/dist/esm/form/setting/text-field/configs/settings.js +57 -0
  53. package/dist/esm/form/setting/text-field/configs/uiV2.js +82 -5
  54. package/dist/esm/grid/row/commons/getClass.js +1 -1
  55. package/dist/esm/grid/row/hooks/useRowSetting.js +2 -2
  56. package/dist/esm/grid/row/setting/configs/settings.js +1 -16
  57. package/dist/types/index.d.ts +17 -34
  58. package/package.json +2 -2
@@ -154,7 +154,7 @@ const NewsletterSettings = [
154
154
  devices: {
155
155
  desktop: {
156
156
  default: {
157
- width: 'Auto',
157
+ width: '480px',
158
158
  height: 'Auto',
159
159
  padding: {
160
160
  type: 'medium',
@@ -199,6 +199,82 @@ const NewsletterSettings = [
199
199
  'shape',
200
200
  'gap'
201
201
  ]
202
+ },
203
+ {
204
+ id: 'shapeBorder',
205
+ type: 'border-v2',
206
+ devices: {
207
+ desktop: {
208
+ default: {
209
+ borderType: 'none',
210
+ border: 'none',
211
+ borderWidth: '1px',
212
+ width: '1px 1px 1px 1px',
213
+ color: '#121212',
214
+ isCustom: true
215
+ }
216
+ }
217
+ },
218
+ compoDefaultValue: {
219
+ desktop: {
220
+ default: {
221
+ border: 'solid',
222
+ color: '#121212',
223
+ width: '1px',
224
+ borderWidth: '1px'
225
+ }
226
+ }
227
+ }
228
+ },
229
+ {
230
+ id: 'shapeRounded',
231
+ type: 'corner-v2',
232
+ devices: {
233
+ desktop: {
234
+ default: {
235
+ btrr: '0px',
236
+ bblr: '0px',
237
+ bbrr: '0px',
238
+ btlr: '0px',
239
+ radiusType: 'none'
240
+ }
241
+ }
242
+ },
243
+ compoDefaultValue: {
244
+ desktop: {
245
+ default: {
246
+ btrr: '8px',
247
+ bblr: '8px',
248
+ bbrr: '8px',
249
+ btlr: '8px',
250
+ radiusType: 'rounded'
251
+ }
252
+ }
253
+ }
254
+ },
255
+ {
256
+ id: 'shapeBoxShadow',
257
+ type: 'shadow-v2',
258
+ devices: {
259
+ desktop: {
260
+ default: {
261
+ enable: false
262
+ }
263
+ }
264
+ },
265
+ compoDefaultValue: {
266
+ desktop: {
267
+ default: {
268
+ type: 'shadow-2',
269
+ distance: '12px',
270
+ blur: '12px',
271
+ spread: '0px',
272
+ color: 'rgba(18, 18, 18, 0.2)',
273
+ angle: 45,
274
+ enable: true
275
+ }
276
+ }
277
+ }
202
278
  }
203
279
  ]
204
280
  }
@@ -96,8 +96,8 @@ const SettingUIV2 = [
96
96
  },
97
97
  displayOptions: [
98
98
  {
99
- label: 'Fit content',
100
- value: 'Auto',
99
+ label: 'Full',
100
+ value: '100%',
101
101
  showValue: true
102
102
  }
103
103
  ]
@@ -129,8 +129,7 @@ const SettingUIV2 = [
129
129
  en: 'Border'
130
130
  },
131
131
  setting: {
132
- id: 'border',
133
- state: 'normal'
132
+ id: 'shapeBorder'
134
133
  }
135
134
  },
136
135
  {
@@ -138,8 +137,7 @@ const SettingUIV2 = [
138
137
  en: 'Corner'
139
138
  },
140
139
  setting: {
141
- id: 'rounded',
142
- state: 'normal'
140
+ id: 'shapeRounded'
143
141
  }
144
142
  },
145
143
  {
@@ -147,8 +145,7 @@ const SettingUIV2 = [
147
145
  en: 'Shadow'
148
146
  },
149
147
  setting: {
150
- id: 'boxShadow',
151
- state: 'normal'
148
+ id: 'shapeBoxShadow'
152
149
  }
153
150
  }
154
151
  ]
@@ -142,6 +142,63 @@ const TextFieldSettings = [
142
142
  }
143
143
  }
144
144
  ]
145
+ },
146
+ {
147
+ id: 'style',
148
+ controls: [
149
+ {
150
+ id: 'globalSize',
151
+ type: 'size-setting',
152
+ devices: {
153
+ desktop: {
154
+ default: {
155
+ width: '100%',
156
+ height: 'Auto',
157
+ padding: {
158
+ type: 'medium',
159
+ top: '12px',
160
+ bottom: '12px',
161
+ left: '12px',
162
+ right: '12px'
163
+ }
164
+ }
165
+ }
166
+ },
167
+ settingConfig: {
168
+ width: {
169
+ displayOptions: [
170
+ 'full',
171
+ 'auto',
172
+ 'small',
173
+ 'large',
174
+ 'medium'
175
+ ],
176
+ sizeConfig: {
177
+ small: '100px',
178
+ medium: '116px',
179
+ large: '132px'
180
+ }
181
+ },
182
+ height: {
183
+ displayOptions: [
184
+ 'auto',
185
+ 'small',
186
+ 'large',
187
+ 'medium'
188
+ ],
189
+ sizeConfig: {
190
+ small: '28px',
191
+ medium: '36px',
192
+ large: '44px'
193
+ }
194
+ }
195
+ },
196
+ hiddenSettings: [
197
+ 'shape',
198
+ 'gap'
199
+ ]
200
+ }
201
+ ]
145
202
  }
146
203
  ];
147
204
 
@@ -38,16 +38,93 @@ const SettingUIV2 = [
38
38
  label: {
39
39
  en: 'Width'
40
40
  },
41
- setting: {
42
- id: 'width'
43
- }
41
+ controlConfig: {
42
+ id: 'width',
43
+ type: 'dropdown:input',
44
+ label: 'Width',
45
+ inputType: 'number',
46
+ units: [
47
+ 'px',
48
+ '%'
49
+ ],
50
+ hideUnit: false,
51
+ linkWithSetting: {
52
+ name: 'globalSize',
53
+ field: 'width'
54
+ },
55
+ displayOptions: [
56
+ {
57
+ label: 'Fit content',
58
+ value: 'Auto',
59
+ showValue: true
60
+ },
61
+ {
62
+ label: 'Full',
63
+ value: '100%',
64
+ showValue: true
65
+ },
66
+ {
67
+ label: 'Small',
68
+ value: '100px',
69
+ showValue: true
70
+ },
71
+ {
72
+ label: 'Medium',
73
+ value: '116px',
74
+ showValue: true
75
+ },
76
+ {
77
+ label: 'Large',
78
+ value: '132px',
79
+ showValue: true
80
+ }
81
+ ]
82
+ },
83
+ layout: 'horizontal'
84
+ },
85
+ {
86
+ label: {
87
+ en: 'Height'
88
+ },
89
+ controlConfig: {
90
+ id: 'height',
91
+ type: 'dropdown:input',
92
+ label: 'Height',
93
+ inputType: 'number',
94
+ units: [
95
+ 'px',
96
+ '%'
97
+ ],
98
+ hideUnit: false,
99
+ linkWithSetting: {
100
+ name: 'globalSize',
101
+ field: 'height'
102
+ }
103
+ },
104
+ layout: 'horizontal'
44
105
  },
45
106
  {
46
107
  label: {
47
108
  en: 'Padding'
48
109
  },
49
- setting: {
50
- id: 'size'
110
+ controlConfig: {
111
+ id: 'padding',
112
+ type: 'padding-v2',
113
+ linkWithSetting: {
114
+ name: 'globalSize',
115
+ field: 'padding'
116
+ },
117
+ compoDefaultValue: {
118
+ desktop: {
119
+ default: {
120
+ type: 'medium',
121
+ top: '12px',
122
+ bottom: '12px',
123
+ left: '12px',
124
+ right: '12px'
125
+ }
126
+ }
127
+ }
51
128
  }
52
129
  }
53
130
  ]
@@ -24,7 +24,7 @@ const getClass = (props)=>{
24
24
  'gp-mx-auto gp-max-w-full [&_*]:gp-max-w-full': true
25
25
  });
26
26
  const wrapperYoutubeClasses = createClass({
27
- 'gp-pb-[56.25%] gp-h-full gp-w-full !gp-max-w-none': true
27
+ 'gp-pb-[56.25%] gp-h-full gp-w-full !gp-max-w-none gp-background-article': true
28
28
  });
29
29
  const iframeYoutubeClasses = createClass({
30
30
  '!gp-w-[500%] !gp-ml-[-200%] !gp-h-full !gp-max-w-none gp-scale-[104%]': true
@@ -1,5 +1,5 @@
1
1
  import { useState, useMemo } from 'react';
2
- import { useCurrentDevice, useEditorMode, usePageType, getValueByDevice, isEmptyChildren, getResponsiveValue } from '@gem-sdk/core';
2
+ import { useCurrentDevice, useEditorMode, usePageType, getBgVideoByDevice, isEmptyChildren, getResponsiveValue } from '@gem-sdk/core';
3
3
  import { createClass } from '@gem-sdk/system';
4
4
  import { useInView } from '../../../intersection-observer/useInView.js';
5
5
 
@@ -11,7 +11,7 @@ const useRowSettings = (rowProps)=>{
11
11
  const [cacheHeightOutViewport, setCacheHeightOutViewport] = useState(500);
12
12
  const mode = useEditorMode();
13
13
  const pageType = usePageType();
14
- const bgVideo = getValueByDevice(background, currentDevice);
14
+ const bgVideo = getBgVideoByDevice(background, currentDevice);
15
15
  const isRowEmpty = useMemo(()=>{
16
16
  return isEmptyChildren(children);
17
17
  }, [
@@ -235,22 +235,7 @@ const RowSettings = [
235
235
  showVideo: true,
236
236
  devices: {
237
237
  desktop: {
238
- default: {
239
- type: 'color',
240
- color: 'transparent',
241
- image: {
242
- src: '',
243
- width: 0,
244
- height: 0
245
- },
246
- size: 'cover',
247
- position: {
248
- x: 50,
249
- y: 50
250
- },
251
- repeat: 'no-repeat',
252
- attachment: 'scroll'
253
- }
238
+ default: undefined
254
239
  }
255
240
  },
256
241
  compoDefaultValue: {
@@ -1473,7 +1473,7 @@ type FormCheckboxStyle = {
1473
1473
  };
1474
1474
  type FormCheckboxProps = BaseProps<FormCheckboxSetting, FormCheckboxStyle>;
1475
1475
  type Advanced = any;
1476
- type TextAreaProps = BasePropsWrap<{
1476
+ type TextAreaSetting = {
1477
1477
  text?: string;
1478
1478
  placeholder?: string;
1479
1479
  translate?: string;
@@ -1496,7 +1496,11 @@ type TextAreaProps = BasePropsWrap<{
1496
1496
  color?: ColorValueType$1;
1497
1497
  transform?: TransformProp;
1498
1498
  align?: ObjectDevices$1<AlignProp>;
1499
- }, {}, Advanced> & Omit<React.ComponentPropsWithoutRef<'input'>, ''>;
1499
+ };
1500
+ type TextAreaStyle = {
1501
+ globalSize?: ObjectDevices$1<SizeSettingGlobal>;
1502
+ };
1503
+ type TextAreaProps = BasePropsWrap<TextAreaSetting, TextAreaStyle, Advanced> & Omit<React.ComponentPropsWithoutRef<'input'>, ''>;
1500
1504
  type FormDropdownSetting = {
1501
1505
  name?: string;
1502
1506
  childItem?: string[];
@@ -1597,6 +1601,9 @@ type NewsLetterSetting = {
1597
1601
  };
1598
1602
  type NewsLetterStyle = {
1599
1603
  globalSize?: ObjectDevices$1<SizeSettingGlobal>;
1604
+ shapeBorder?: ObjectDevices$1<Border>;
1605
+ shapeRounded?: ObjectDevices$1<CornerRadius>;
1606
+ shapeBoxShadow?: ObjectDevices$1<ShadowProps$1>;
1600
1607
  };
1601
1608
  type NewsletterProps = BasePropsWrap<NewsLetterSetting, NewsLetterStyle> & {
1602
1609
  children?: React.ReactNode;
@@ -1612,7 +1619,7 @@ type SubmitButtonStyle = ButtonProps['styles'];
1612
1619
  type SubmitButtonProps = BasePropsWrap<SubmitButtonSetting, SubmitButtonStyle> & {
1613
1620
  children: React.ReactNode;
1614
1621
  };
1615
- type TextFieldProps = BasePropsWrap<{
1622
+ type TextFieldSetting = {
1616
1623
  text?: string;
1617
1624
  placeholder?: string;
1618
1625
  translate?: string;
@@ -1635,7 +1642,11 @@ type TextFieldProps = BasePropsWrap<{
1635
1642
  color?: ColorValueType$1;
1636
1643
  transform?: TransformProp;
1637
1644
  align?: ObjectDevices$1<AlignProp>;
1638
- }, {}, Advanced> & Omit<React.ComponentPropsWithoutRef<'input'>, ''>;
1645
+ };
1646
+ type TextFieldStyle = {
1647
+ globalSize?: ObjectDevices$1<SizeSettingGlobal>;
1648
+ };
1649
+ type TextFieldProps = BasePropsWrap<TextFieldSetting, TextFieldStyle, Advanced> & Omit<React.ComponentPropsWithoutRef<'input'>, ''>;
1639
1650
  type InputType = 'text' | 'textarea' | 'email' | 'phone' | 'number';
1640
1651
  type TextInputSetting = {
1641
1652
  text?: string;
@@ -6126,42 +6137,14 @@ declare const SubmitButton: ({ setting, builderProps, builderAttrs, style, style
6126
6137
  pageContext?: PageContext | undefined;
6127
6138
  }) => string;
6128
6139
 
6129
- declare const TextField: ({ setting, builderProps, className, builderAttrs, advanced, pageContext, }: _gem_sdk_core.BaseProps<{
6130
- text?: string | undefined;
6131
- placeholder?: string | undefined;
6132
- translate?: string | undefined;
6133
- name?: string | undefined;
6134
- required?: boolean | undefined;
6135
- size?: _gem_sdk_core.SizeSetting | undefined;
6136
- fullWidth?: Partial<Record<_gem_sdk_core.NameDevices, boolean>> | undefined;
6137
- width?: Partial<Record<_gem_sdk_core.NameDevices, string | number | undefined>> | undefined;
6138
- typography?: _gem_sdk_core.TypographySetting | undefined;
6139
- typo?: _gem_sdk_core.TypographySettingV2 | undefined;
6140
- color?: _gem_sdk_core.ColorValueType | undefined;
6141
- transform?: _gem_sdk_core.TransformProp | undefined;
6142
- align?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.AlignProp>> | undefined;
6143
- }, {}, any> & {
6140
+ declare const TextField: ({ setting, builderProps, className, builderAttrs, advanced, pageContext, styles, }: _gem_sdk_core.BaseProps<TextFieldSetting, TextFieldStyle, any> & {
6144
6141
  builderAttrs?: Record<string, any> | undefined;
6145
6142
  style?: React.CSSProperties | undefined;
6146
6143
  } & Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, ""> & {
6147
6144
  pageContext?: PageContext | undefined;
6148
6145
  }) => string;
6149
6146
 
6150
- declare const FormTextarea: ({ setting, builderProps, className, builderAttrs, advanced, pageContext, }: _gem_sdk_core.BaseProps<{
6151
- text?: string | undefined;
6152
- placeholder?: string | undefined;
6153
- translate?: string | undefined;
6154
- name?: string | undefined;
6155
- required?: boolean | undefined;
6156
- size?: _gem_sdk_core.SizeSetting | undefined;
6157
- fullWidth?: Partial<Record<_gem_sdk_core.NameDevices, boolean>> | undefined;
6158
- width?: Partial<Record<_gem_sdk_core.NameDevices, string | number | undefined>> | undefined;
6159
- typography?: _gem_sdk_core.TypographySetting | undefined;
6160
- typo?: _gem_sdk_core.TypographySettingV2 | undefined;
6161
- color?: _gem_sdk_core.ColorValueType | undefined;
6162
- transform?: _gem_sdk_core.TransformProp | undefined;
6163
- align?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.AlignProp>> | undefined;
6164
- }, {}, any> & {
6147
+ declare const FormTextarea: ({ setting, builderProps, className, builderAttrs, advanced, pageContext, styles, }: _gem_sdk_core.BaseProps<TextAreaSetting, TextAreaStyle, any> & {
6165
6148
  builderAttrs?: Record<string, any> | undefined;
6166
6149
  style?: React.CSSProperties | undefined;
6167
6150
  } & Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, ""> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.411",
3
+ "version": "2.0.0-dev.413",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -23,7 +23,7 @@
23
23
  "update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
24
24
  },
25
25
  "devDependencies": {
26
- "@gem-sdk/core": "2.0.0-dev.403",
26
+ "@gem-sdk/core": "2.0.0-dev.413",
27
27
  "@gem-sdk/styles": "2.0.0-dev.381",
28
28
  "@gem-sdk/system": "2.0.0-dev.371",
29
29
  "@types/react-transition-group": "^4.4.5"