@gem-sdk/components 2.0.0-dev.426 → 2.0.0-dev.429

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.
@@ -773,7 +773,7 @@ const config = {
773
773
  {
774
774
  tag: 'ArticleTitle',
775
775
  settings: {
776
- htmlTag: 'h1',
776
+ htmlTag: 'h2',
777
777
  linkArticle: 'go-to-article'
778
778
  },
779
779
  styles: {
@@ -17,7 +17,7 @@ const ArticleTitlePresets = [
17
17
  {
18
18
  tag: 'ArticleTitle',
19
19
  settings: {
20
- htmlTag: 'h1',
20
+ htmlTag: 'h2',
21
21
  linkArticle: 'go-to-article'
22
22
  },
23
23
  styles: {
@@ -99,7 +99,10 @@ const ArticleTitleSettings = [
99
99
  id: 'typo',
100
100
  type: 'typography-v2',
101
101
  default: {
102
- type: 'subheading-3'
102
+ type: 'subheading-3',
103
+ attrs: {
104
+ color: '#212121'
105
+ }
103
106
  },
104
107
  ignoreReRender: true
105
108
  },
@@ -134,7 +134,7 @@ const uiV2 = [
134
134
  controls: [
135
135
  {
136
136
  label: {
137
- en: 'SEO tag'
137
+ en: 'HTML tag'
138
138
  },
139
139
  setting: {
140
140
  id: 'htmlTag'
@@ -5,6 +5,7 @@ require('react/jsx-runtime');
5
5
  require('react');
6
6
  var _const = require('../../../common/const.js');
7
7
  var common = require('./common.js');
8
+ var common$1 = require('../../../banner/components/common/common.js');
8
9
 
9
10
  function filterTruthyStyles(styles) {
10
11
  return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
@@ -52,18 +53,19 @@ const getDialogContentStyle = ({ style, width, height, fullScreen })=>{
52
53
  return filterTruthyStyles(composeStyles);
53
54
  };
54
55
  const getButtonContentStyle = (setting)=>{
55
- const { btnSize, btnBg, btnRounded, btnColor } = setting ?? {};
56
+ const { btnBg, btnRounded, btnColor, btnPadding, btnWidth, btnHeight } = setting ?? {};
57
+ const widthSize = btnWidth ? core.makeStyleResponsive('w', common$1.getWidth(btnWidth)) : {};
58
+ const heightSize = btnHeight ? core.makeStyleResponsive('h', common$1.getWidth(btnHeight)) : {};
56
59
  const composeStyles = {
57
- ...core.makeStyle({
58
- w: `${parseInt(btnSize.toString())}px`,
59
- h: `${parseInt(btnSize.toString())}px`
60
- }),
60
+ ...widthSize,
61
+ ...heightSize,
61
62
  ...core.getGlobalColorResponsiveStyle('c', {
62
63
  desktop: btnColor
63
64
  }),
64
65
  ...core.getGlobalColorResponsiveStyle('bgc', {
65
66
  desktop: btnBg
66
67
  }),
68
+ ...core.getResponsiveStylePadding(btnPadding),
67
69
  ...core.composeRadius({
68
70
  normal: btnRounded
69
71
  })
@@ -197,6 +197,47 @@ const DialogSettings = [
197
197
  type: 'input:stepper',
198
198
  default: 32
199
199
  },
200
+ {
201
+ id: 'btnWidth',
202
+ type: 'input:unit',
203
+ units: [
204
+ 'px',
205
+ '%'
206
+ ],
207
+ devices: {
208
+ desktop: {
209
+ default: '32px'
210
+ }
211
+ }
212
+ },
213
+ {
214
+ id: 'btnHeight',
215
+ type: 'input:unit',
216
+ units: [
217
+ 'px',
218
+ '%'
219
+ ],
220
+ devices: {
221
+ desktop: {
222
+ default: '32px'
223
+ }
224
+ }
225
+ },
226
+ {
227
+ id: 'btnPadding',
228
+ type: 'padding-v2',
229
+ compoDefaultValue: {
230
+ desktop: {
231
+ default: {
232
+ type: 'custom',
233
+ top: '4px',
234
+ bottom: '4px',
235
+ left: '4px',
236
+ right: '4px'
237
+ }
238
+ }
239
+ }
240
+ },
200
241
  {
201
242
  id: 'iconSize',
202
243
  type: 'input:stepper',
@@ -37,6 +37,30 @@ const SettingUIV2 = [
37
37
  id: 'btnColor'
38
38
  }
39
39
  },
40
+ {
41
+ label: {
42
+ en: 'Width'
43
+ },
44
+ setting: {
45
+ id: 'btnWidth'
46
+ }
47
+ },
48
+ {
49
+ label: {
50
+ en: 'Height'
51
+ },
52
+ setting: {
53
+ id: 'btnHeight'
54
+ }
55
+ },
56
+ {
57
+ label: {
58
+ en: 'Padding'
59
+ },
60
+ setting: {
61
+ id: 'btnPadding'
62
+ }
63
+ },
40
64
  {
41
65
  label: {
42
66
  en: 'Button size'
@@ -151,6 +175,7 @@ const SettingUIV2 = [
151
175
  devices: {
152
176
  desktop: {
153
177
  default: {
178
+ type: 'custom',
154
179
  top: '32px',
155
180
  bottom: '32px',
156
181
  left: '32px',
@@ -161,6 +186,7 @@ const SettingUIV2 = [
161
186
  compoDefaultValue: {
162
187
  desktop: {
163
188
  default: {
189
+ type: 'custom',
164
190
  top: '32px',
165
191
  bottom: '32px',
166
192
  left: '32px',
@@ -350,7 +376,8 @@ const SettingUIV2 = [
350
376
  },
351
377
  setting: {
352
378
  id: 'frequencyMode'
353
- }
379
+ },
380
+ conditionDisplay: `trigger !== 'none'`
354
381
  },
355
382
  {
356
383
  conditionDisplay: `frequencyMode === 'after-period-time'`,
@@ -139,7 +139,7 @@ const config = {
139
139
  rootOverride: {
140
140
  styles: {
141
141
  align: {
142
- desktop: 'center'
142
+ desktop: 'left'
143
143
  }
144
144
  },
145
145
  advanced: {
@@ -13,6 +13,7 @@ const SettingUIV2 = [
13
13
  },
14
14
  iconName: 'polaris-text-block',
15
15
  getValueFromSettingID: 'label',
16
+ defaultValueWhenClear: '',
16
17
  controls: [
17
18
  {
18
19
  label: {
@@ -16,7 +16,6 @@ var getClasses = require('./common/getClasses.js');
16
16
 
17
17
  const Tabs = (props)=>{
18
18
  const { builderAttrs, builderProps, style, setting, advanced, children } = props;
19
- delete setting?.labelTypoV2?.attrs?.color;
20
19
  const { cssClass } = advanced ?? {};
21
20
  const { panelFullWidth, childItem, labelAlign, labelTypo, labelTypoV2 } = setting ?? {};
22
21
  const { currentDevice, productID, dispatchEventTabActive, activeTab, setActiveKey, refContainer } = useTab.useTab(setting, builderProps);
@@ -8,7 +8,12 @@ const getStyleWrapper = (setting, style)=>{
8
8
  const { background } = setting ?? {};
9
9
  const composeStyles = {
10
10
  ...style,
11
- ...core.getStyleBackgroundByDevice(background)
11
+ ...core.getStyleBackgroundByDevice(background),
12
+ ...core.getGradientBgrStyleByDevice(background, {
13
+ desktop: true,
14
+ tablet: true,
15
+ mobile: true
16
+ })
12
17
  };
13
18
  return helpers.filterTruthyStyles(composeStyles);
14
19
  };
@@ -769,7 +769,7 @@ const config = {
769
769
  {
770
770
  tag: 'ArticleTitle',
771
771
  settings: {
772
- htmlTag: 'h1',
772
+ htmlTag: 'h2',
773
773
  linkArticle: 'go-to-article'
774
774
  },
775
775
  styles: {
@@ -15,7 +15,7 @@ const ArticleTitlePresets = [
15
15
  {
16
16
  tag: 'ArticleTitle',
17
17
  settings: {
18
- htmlTag: 'h1',
18
+ htmlTag: 'h2',
19
19
  linkArticle: 'go-to-article'
20
20
  },
21
21
  styles: {
@@ -97,7 +97,10 @@ const ArticleTitleSettings = [
97
97
  id: 'typo',
98
98
  type: 'typography-v2',
99
99
  default: {
100
- type: 'subheading-3'
100
+ type: 'subheading-3',
101
+ attrs: {
102
+ color: '#212121'
103
+ }
101
104
  },
102
105
  ignoreReRender: true
103
106
  },
@@ -132,7 +132,7 @@ const uiV2 = [
132
132
  controls: [
133
133
  {
134
134
  label: {
135
- en: 'SEO tag'
135
+ en: 'HTML tag'
136
136
  },
137
137
  setting: {
138
138
  id: 'htmlTag'
@@ -1,8 +1,9 @@
1
- import { makeStyle, getGlobalColorResponsiveStyle, makeStyleResponsive, makeWidth, composeRadius, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
1
+ import { makeStyle, getGlobalColorResponsiveStyle, makeStyleResponsive, makeWidth, getResponsiveStylePadding, composeRadius, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import { ELEMENT_Z_INDEX } from '../../../common/const.js';
5
5
  import { pointerEventStyle, getDisplayStyle, getWrapperDialogStyle, getBorderStyle, heightStyle, getInnerStyle, removeHeightPercentForContent } from './common.js';
6
+ import { getWidth } from '../../../banner/components/common/common.js';
6
7
 
7
8
  function filterTruthyStyles(styles) {
8
9
  return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
@@ -50,18 +51,19 @@ const getDialogContentStyle = ({ style, width, height, fullScreen })=>{
50
51
  return filterTruthyStyles(composeStyles);
51
52
  };
52
53
  const getButtonContentStyle = (setting)=>{
53
- const { btnSize, btnBg, btnRounded, btnColor } = setting ?? {};
54
+ const { btnBg, btnRounded, btnColor, btnPadding, btnWidth, btnHeight } = setting ?? {};
55
+ const widthSize = btnWidth ? makeStyleResponsive('w', getWidth(btnWidth)) : {};
56
+ const heightSize = btnHeight ? makeStyleResponsive('h', getWidth(btnHeight)) : {};
54
57
  const composeStyles = {
55
- ...makeStyle({
56
- w: `${parseInt(btnSize.toString())}px`,
57
- h: `${parseInt(btnSize.toString())}px`
58
- }),
58
+ ...widthSize,
59
+ ...heightSize,
59
60
  ...getGlobalColorResponsiveStyle('c', {
60
61
  desktop: btnColor
61
62
  }),
62
63
  ...getGlobalColorResponsiveStyle('bgc', {
63
64
  desktop: btnBg
64
65
  }),
66
+ ...getResponsiveStylePadding(btnPadding),
65
67
  ...composeRadius({
66
68
  normal: btnRounded
67
69
  })
@@ -195,6 +195,47 @@ const DialogSettings = [
195
195
  type: 'input:stepper',
196
196
  default: 32
197
197
  },
198
+ {
199
+ id: 'btnWidth',
200
+ type: 'input:unit',
201
+ units: [
202
+ 'px',
203
+ '%'
204
+ ],
205
+ devices: {
206
+ desktop: {
207
+ default: '32px'
208
+ }
209
+ }
210
+ },
211
+ {
212
+ id: 'btnHeight',
213
+ type: 'input:unit',
214
+ units: [
215
+ 'px',
216
+ '%'
217
+ ],
218
+ devices: {
219
+ desktop: {
220
+ default: '32px'
221
+ }
222
+ }
223
+ },
224
+ {
225
+ id: 'btnPadding',
226
+ type: 'padding-v2',
227
+ compoDefaultValue: {
228
+ desktop: {
229
+ default: {
230
+ type: 'custom',
231
+ top: '4px',
232
+ bottom: '4px',
233
+ left: '4px',
234
+ right: '4px'
235
+ }
236
+ }
237
+ }
238
+ },
198
239
  {
199
240
  id: 'iconSize',
200
241
  type: 'input:stepper',
@@ -35,6 +35,30 @@ const SettingUIV2 = [
35
35
  id: 'btnColor'
36
36
  }
37
37
  },
38
+ {
39
+ label: {
40
+ en: 'Width'
41
+ },
42
+ setting: {
43
+ id: 'btnWidth'
44
+ }
45
+ },
46
+ {
47
+ label: {
48
+ en: 'Height'
49
+ },
50
+ setting: {
51
+ id: 'btnHeight'
52
+ }
53
+ },
54
+ {
55
+ label: {
56
+ en: 'Padding'
57
+ },
58
+ setting: {
59
+ id: 'btnPadding'
60
+ }
61
+ },
38
62
  {
39
63
  label: {
40
64
  en: 'Button size'
@@ -149,6 +173,7 @@ const SettingUIV2 = [
149
173
  devices: {
150
174
  desktop: {
151
175
  default: {
176
+ type: 'custom',
152
177
  top: '32px',
153
178
  bottom: '32px',
154
179
  left: '32px',
@@ -159,6 +184,7 @@ const SettingUIV2 = [
159
184
  compoDefaultValue: {
160
185
  desktop: {
161
186
  default: {
187
+ type: 'custom',
162
188
  top: '32px',
163
189
  bottom: '32px',
164
190
  left: '32px',
@@ -348,7 +374,8 @@ const SettingUIV2 = [
348
374
  },
349
375
  setting: {
350
376
  id: 'frequencyMode'
351
- }
377
+ },
378
+ conditionDisplay: `trigger !== 'none'`
352
379
  },
353
380
  {
354
381
  conditionDisplay: `frequencyMode === 'after-period-time'`,
@@ -135,7 +135,7 @@ const config = {
135
135
  rootOverride: {
136
136
  styles: {
137
137
  align: {
138
- desktop: 'center'
138
+ desktop: 'left'
139
139
  }
140
140
  },
141
141
  advanced: {
@@ -11,6 +11,7 @@ const SettingUIV2 = [
11
11
  },
12
12
  iconName: 'polaris-text-block',
13
13
  getValueFromSettingID: 'label',
14
+ defaultValueWhenClear: '',
14
15
  controls: [
15
16
  {
16
17
  label: {
@@ -12,7 +12,6 @@ import { getClassesWrapper, getContainClasses, getStyleTagClasses, getTabParentL
12
12
 
13
13
  const Tabs = (props)=>{
14
14
  const { builderAttrs, builderProps, style, setting, advanced, children } = props;
15
- delete setting?.labelTypoV2?.attrs?.color;
16
15
  const { cssClass } = advanced ?? {};
17
16
  const { panelFullWidth, childItem, labelAlign, labelTypo, labelTypoV2 } = setting ?? {};
18
17
  const { currentDevice, productID, dispatchEventTabActive, activeTab, setActiveKey, refContainer } = useTab(setting, builderProps);
@@ -1,4 +1,4 @@
1
- import { getStyleBackgroundByDevice, makeStyleResponsive, makeStyle, getSingleColorVariable, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor } from '@gem-sdk/core';
1
+ import { getStyleBackgroundByDevice, getGradientBgrStyleByDevice, makeStyleResponsive, makeStyle, getSingleColorVariable, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor } from '@gem-sdk/core';
2
2
  import { filterTruthyStyles } from '../../../helpers.js';
3
3
  import { getStyleWidthByPositionResponsive, initialStyles } from './common.js';
4
4
 
@@ -6,7 +6,12 @@ const getStyleWrapper = (setting, style)=>{
6
6
  const { background } = setting ?? {};
7
7
  const composeStyles = {
8
8
  ...style,
9
- ...getStyleBackgroundByDevice(background)
9
+ ...getStyleBackgroundByDevice(background),
10
+ ...getGradientBgrStyleByDevice(background, {
11
+ desktop: true,
12
+ tablet: true,
13
+ mobile: true
14
+ })
10
15
  };
11
16
  return filterTruthyStyles(composeStyles);
12
17
  };
@@ -1390,6 +1390,9 @@ type Setting$2 = {
1390
1390
  btnBg?: ColorValueType$1;
1391
1391
  btnRounded?: CornerRadius;
1392
1392
  btnSize?: number;
1393
+ btnWidth?: ObjectDevices$1<string>;
1394
+ btnHeight?: ObjectDevices$1<string>;
1395
+ btnPadding?: ObjectDevices$1<PaddingType$1>;
1393
1396
  background?: ObjectDevices$1<BackgroundMedia>;
1394
1397
  iconSize?: string;
1395
1398
  effectType?: 'fade' | 'zoom' | 'zoom-out' | 'horizontal' | 'vertical' | 'unfold' | 'none';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.426",
3
+ "version": "2.0.0-dev.429",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",