@gem-sdk/components 2.0.0-dev.514 → 2.0.0-dev.515

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.
@@ -15,7 +15,7 @@ var getStyle = require('./common/getStyle.js');
15
15
 
16
16
  const Countdown = (props)=>{
17
17
  const { setting, styles, builderProps, advanced } = props;
18
- const { labelTypo, numTypo, labelTypography, numTypography } = styles ?? {};
18
+ const { labelTypo, numTypo, labelTypography, numTypography, enableNumberTextStyle, enableLabelTextStyle } = styles ?? {};
19
19
  const { weekLabel, dayLabel, hourLabel, minuteLabel, secondLabel, enableWeek, enableDay, enableHour, enableMinute, enableSecond, redirectUrl } = setting ?? {};
20
20
  const mode = core.useEditorMode();
21
21
  const { week, day, hour, minute, second, timeLeft, ref } = useCountDownTimer.default(setting, builderProps);
@@ -78,7 +78,7 @@ const Countdown = (props)=>{
78
78
  style: dateStyle,
79
79
  className: dateClasses(textLabel),
80
80
  children: [
81
- /*#__PURE__*/ jsxRuntime.jsx(Text.default, {
81
+ system.If(!!enableNumberTextStyle, /*#__PURE__*/ jsxRuntime.jsx(Text.default, {
82
82
  styles: {
83
83
  typography: numTypography,
84
84
  typo: numTypo
@@ -90,8 +90,8 @@ const Countdown = (props)=>{
90
90
  },
91
91
  className: textFrontClasses,
92
92
  style: textFrontStyle
93
- }),
94
- /*#__PURE__*/ jsxRuntime.jsx(Text.default, {
93
+ })),
94
+ system.If(!!enableLabelTextStyle, /*#__PURE__*/ jsxRuntime.jsx(Text.default, {
95
95
  styles: {
96
96
  typography: labelTypography,
97
97
  typo: labelTypo
@@ -103,7 +103,7 @@ const Countdown = (props)=>{
103
103
  },
104
104
  style: textBackStyle,
105
105
  className: textBackClasses(textLabel)
106
- })
106
+ }))
107
107
  ]
108
108
  });
109
109
  };
@@ -12,7 +12,7 @@ var getClasses = require('./common/getClasses.js');
12
12
 
13
13
  const Countdown = (props)=>{
14
14
  const { setting, styles, builderProps, advanced, pageContext } = props;
15
- const { labelTypo, numTypo, numTypography, labelTypography } = styles ?? {};
15
+ const { labelTypo, numTypo, numTypography, labelTypography, enableNumberTextStyle, enableLabelTextStyle } = styles ?? {};
16
16
  const { weekLabel, dayLabel, hourLabel, minuteLabel, secondLabel, enableWeek, enableDay, enableHour, enableMinute, enableSecond, redirectUrl, translate } = setting ?? {};
17
17
  const hasLinkCover = !!redirectUrl?.link;
18
18
  const { urlData } = helpers.getInsertLinkData('', redirectUrl);
@@ -64,7 +64,8 @@ const Countdown = (props)=>{
64
64
  const textFrontLabel = '00';
65
65
  return core.template`
66
66
  <div style="${dateStyle}" class="${dateClasses(textLabel)}">
67
- ${Text_liquid.default({
67
+ ${system.If(!!enableNumberTextStyle, core.template`
68
+ ${Text_liquid.default({
68
69
  styles: {
69
70
  typography: numTypography,
70
71
  typo: numTypo
@@ -86,7 +87,9 @@ const Countdown = (props)=>{
86
87
  uidInteraction: `${builderProps?.uid}-text`
87
88
  }
88
89
  })}
89
- ${Text_liquid.default({
90
+ `)}
91
+ ${system.If(!!enableLabelTextStyle, core.template`
92
+ ${Text_liquid.default({
90
93
  styles: {
91
94
  typography: labelTypography,
92
95
  typo: labelTypo
@@ -106,6 +109,7 @@ const Countdown = (props)=>{
106
109
  },
107
110
  pageContext
108
111
  })}
112
+ `)}
109
113
  </div>
110
114
  `;
111
115
  };
@@ -534,8 +534,7 @@ const CountdownSettings = [
534
534
  units: [
535
535
  'px'
536
536
  ],
537
- default: '0px',
538
- placeholder: 'Auto'
537
+ default: '0px'
539
538
  },
540
539
  {
541
540
  id: 'horizontalGap',
@@ -241,7 +241,7 @@ const SettingUIV2 = [
241
241
  controls: [
242
242
  {
243
243
  label: {
244
- en: 'Item style'
244
+ en: 'Time'
245
245
  },
246
246
  setting: {
247
247
  id: 'enableLabelTextStyle'
@@ -253,7 +253,7 @@ const SettingUIV2 = [
253
253
  },
254
254
  {
255
255
  label: {
256
- en: 'Time'
256
+ en: 'Item style'
257
257
  },
258
258
  conditionDisplay: 'enableLabelTextStyle == true',
259
259
  type: 'combo',
@@ -302,6 +302,14 @@ const SettingUIV2 = [
302
302
  layout: 'vertical'
303
303
  }
304
304
  ]
305
+ },
306
+ {
307
+ label: {
308
+ en: 'Item gap'
309
+ },
310
+ setting: {
311
+ id: 'verticalGap'
312
+ }
305
313
  }
306
314
  ]
307
315
  },
@@ -11,7 +11,7 @@ import { getWrapperStyle, getContainStyle, getDateStyle, getTextFrontStyle, getT
11
11
 
12
12
  const Countdown = (props)=>{
13
13
  const { setting, styles, builderProps, advanced } = props;
14
- const { labelTypo, numTypo, labelTypography, numTypography } = styles ?? {};
14
+ const { labelTypo, numTypo, labelTypography, numTypography, enableNumberTextStyle, enableLabelTextStyle } = styles ?? {};
15
15
  const { weekLabel, dayLabel, hourLabel, minuteLabel, secondLabel, enableWeek, enableDay, enableHour, enableMinute, enableSecond, redirectUrl } = setting ?? {};
16
16
  const mode = useEditorMode();
17
17
  const { week, day, hour, minute, second, timeLeft, ref } = useCountDownTimer(setting, builderProps);
@@ -74,7 +74,7 @@ const Countdown = (props)=>{
74
74
  style: dateStyle,
75
75
  className: dateClasses(textLabel),
76
76
  children: [
77
- /*#__PURE__*/ jsx(Text, {
77
+ If(!!enableNumberTextStyle, /*#__PURE__*/ jsx(Text, {
78
78
  styles: {
79
79
  typography: numTypography,
80
80
  typo: numTypo
@@ -86,8 +86,8 @@ const Countdown = (props)=>{
86
86
  },
87
87
  className: textFrontClasses,
88
88
  style: textFrontStyle
89
- }),
90
- /*#__PURE__*/ jsx(Text, {
89
+ })),
90
+ If(!!enableLabelTextStyle, /*#__PURE__*/ jsx(Text, {
91
91
  styles: {
92
92
  typography: labelTypography,
93
93
  typo: labelTypo
@@ -99,7 +99,7 @@ const Countdown = (props)=>{
99
99
  },
100
100
  style: textBackStyle,
101
101
  className: textBackClasses(textLabel)
102
- })
102
+ }))
103
103
  ]
104
104
  });
105
105
  };
@@ -8,7 +8,7 @@ import { getTextFrontClasses, getWrapperClasses, getContentClasses, getLinkClass
8
8
 
9
9
  const Countdown = (props)=>{
10
10
  const { setting, styles, builderProps, advanced, pageContext } = props;
11
- const { labelTypo, numTypo, numTypography, labelTypography } = styles ?? {};
11
+ const { labelTypo, numTypo, numTypography, labelTypography, enableNumberTextStyle, enableLabelTextStyle } = styles ?? {};
12
12
  const { weekLabel, dayLabel, hourLabel, minuteLabel, secondLabel, enableWeek, enableDay, enableHour, enableMinute, enableSecond, redirectUrl, translate } = setting ?? {};
13
13
  const hasLinkCover = !!redirectUrl?.link;
14
14
  const { urlData } = getInsertLinkData('', redirectUrl);
@@ -60,7 +60,8 @@ const Countdown = (props)=>{
60
60
  const textFrontLabel = '00';
61
61
  return template`
62
62
  <div style="${dateStyle}" class="${dateClasses(textLabel)}">
63
- ${Text({
63
+ ${If(!!enableNumberTextStyle, template`
64
+ ${Text({
64
65
  styles: {
65
66
  typography: numTypography,
66
67
  typo: numTypo
@@ -82,7 +83,9 @@ const Countdown = (props)=>{
82
83
  uidInteraction: `${builderProps?.uid}-text`
83
84
  }
84
85
  })}
85
- ${Text({
86
+ `)}
87
+ ${If(!!enableLabelTextStyle, template`
88
+ ${Text({
86
89
  styles: {
87
90
  typography: labelTypography,
88
91
  typo: labelTypo
@@ -102,6 +105,7 @@ const Countdown = (props)=>{
102
105
  },
103
106
  pageContext
104
107
  })}
108
+ `)}
105
109
  </div>
106
110
  `;
107
111
  };
@@ -532,8 +532,7 @@ const CountdownSettings = [
532
532
  units: [
533
533
  'px'
534
534
  ],
535
- default: '0px',
536
- placeholder: 'Auto'
535
+ default: '0px'
537
536
  },
538
537
  {
539
538
  id: 'horizontalGap',
@@ -239,7 +239,7 @@ const SettingUIV2 = [
239
239
  controls: [
240
240
  {
241
241
  label: {
242
- en: 'Item style'
242
+ en: 'Time'
243
243
  },
244
244
  setting: {
245
245
  id: 'enableLabelTextStyle'
@@ -251,7 +251,7 @@ const SettingUIV2 = [
251
251
  },
252
252
  {
253
253
  label: {
254
- en: 'Time'
254
+ en: 'Item style'
255
255
  },
256
256
  conditionDisplay: 'enableLabelTextStyle == true',
257
257
  type: 'combo',
@@ -300,6 +300,14 @@ const SettingUIV2 = [
300
300
  layout: 'vertical'
301
301
  }
302
302
  ]
303
+ },
304
+ {
305
+ label: {
306
+ en: 'Item gap'
307
+ },
308
+ setting: {
309
+ id: 'verticalGap'
310
+ }
303
311
  }
304
312
  ]
305
313
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.514",
3
+ "version": "2.0.0-dev.515",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",