@gem-sdk/components 2.0.0-dev.347 → 2.0.0-dev.348

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/countdown-timer/components/Countdown.js +103 -307
  2. package/dist/cjs/countdown-timer/components/Countdown.liquid.js +92 -56
  3. package/dist/cjs/countdown-timer/components/common/getAttr.js +15 -0
  4. package/dist/cjs/countdown-timer/components/common/getClasses.js +69 -0
  5. package/dist/cjs/countdown-timer/components/common/getStyle.js +66 -0
  6. package/dist/cjs/countdown-timer/components/hooks/useCountDownTimer.js +67 -0
  7. package/dist/cjs/countdown-timer/{hooks → components/hooks}/useTimeLeft.js +1 -1
  8. package/dist/cjs/countdown-timer/index.js +1 -1
  9. package/dist/cjs/countdown-timer/setting/Countdown.js +1 -1
  10. package/dist/cjs/countdown-timer/setting/configs/settings.js +1 -1
  11. package/dist/cjs/product/components/ProductProperties/ProductPropertyInput/ProductPropertyInput.liquid.js +1 -1
  12. package/dist/cjs/product/setting/product-properties/configs/settingsV2.js +43 -14
  13. package/dist/cjs/product/setting/product-properties/configs/uiV2.js +5 -2
  14. package/dist/cjs/third-party/components/AliReviews.liquid.js +1 -1
  15. package/dist/cjs/third-party/components/FeraReviews/FeraReviewsSampleContent.js +3 -3
  16. package/dist/cjs/third-party/components/FeraReviews/LiquidTemplateByWidget.js +2 -2
  17. package/dist/cjs/third-party/components/FeraReviews.js +0 -5
  18. package/dist/cjs/third-party/components/GoogleReviewsByReputon.liquid.js +2 -2
  19. package/dist/cjs/third-party/components/JudgemeReviews.liquid.js +5 -5
  20. package/dist/cjs/third-party/components/KachingBundles.liquid.js +1 -1
  21. package/dist/cjs/third-party/components/KingProductOptions.liquid.js +1 -1
  22. package/dist/cjs/third-party/components/LaiProductReviews/LiquidTemplateByWiget.js +3 -3
  23. package/dist/cjs/third-party/components/LooxReviews.liquid.js +1 -1
  24. package/dist/cjs/third-party/components/Ryviu.liquid.js +1 -1
  25. package/dist/cjs/third-party/components/Vitals.liquid.js +2 -2
  26. package/dist/cjs/third-party/setting/TrustshopProductReviews.js +3 -3
  27. package/dist/cjs/third-party/setting/WhatmoreShoppableVideosreel.js +36 -36
  28. package/dist/cjs/third-party/types/index.js +5 -0
  29. package/dist/esm/countdown-timer/components/Countdown.js +104 -308
  30. package/dist/esm/countdown-timer/components/Countdown.liquid.js +93 -57
  31. package/dist/esm/countdown-timer/components/common/getAttr.js +12 -0
  32. package/dist/esm/countdown-timer/components/common/getClasses.js +61 -0
  33. package/dist/esm/countdown-timer/components/common/getStyle.js +60 -0
  34. package/dist/esm/countdown-timer/components/hooks/useCountDownTimer.js +63 -0
  35. package/dist/esm/countdown-timer/{hooks → components/hooks}/useTimeLeft.js +1 -1
  36. package/dist/esm/countdown-timer/index.js +1 -1
  37. package/dist/esm/countdown-timer/setting/Countdown.js +1 -1
  38. package/dist/esm/countdown-timer/setting/configs/settings.js +1 -1
  39. package/dist/esm/product/components/ProductProperties/ProductPropertyInput/ProductPropertyInput.liquid.js +1 -1
  40. package/dist/esm/product/setting/product-properties/configs/settingsV2.js +43 -14
  41. package/dist/esm/product/setting/product-properties/configs/uiV2.js +5 -2
  42. package/dist/esm/third-party/components/AliReviews.liquid.js +1 -1
  43. package/dist/esm/third-party/components/FeraReviews/FeraReviewsSampleContent.js +1 -1
  44. package/dist/esm/third-party/components/FeraReviews/LiquidTemplateByWidget.js +1 -1
  45. package/dist/esm/third-party/components/FeraReviews.js +1 -5
  46. package/dist/esm/third-party/components/GoogleReviewsByReputon.liquid.js +2 -2
  47. package/dist/esm/third-party/components/JudgemeReviews.liquid.js +5 -5
  48. package/dist/esm/third-party/components/KachingBundles.liquid.js +1 -1
  49. package/dist/esm/third-party/components/KingProductOptions.liquid.js +1 -1
  50. package/dist/esm/third-party/components/LaiProductReviews/LiquidTemplateByWiget.js +3 -3
  51. package/dist/esm/third-party/components/LooxReviews.liquid.js +1 -1
  52. package/dist/esm/third-party/components/Ryviu.liquid.js +1 -1
  53. package/dist/esm/third-party/components/Vitals.liquid.js +2 -2
  54. package/dist/esm/third-party/setting/TrustshopProductReviews.js +3 -3
  55. package/dist/esm/third-party/setting/WhatmoreShoppableVideosreel.js +36 -36
  56. package/dist/esm/third-party/types/index.js +5 -1
  57. package/dist/types/index.d.ts +1541 -1531
  58. package/package.json +1 -1
@@ -130,12 +130,12 @@ const config = {
130
130
  }
131
131
  },
132
132
  {
133
- type: "control",
133
+ type: 'control',
134
134
  label: {
135
- en: "Choose widget"
135
+ en: 'Choose widget'
136
136
  },
137
137
  setting: {
138
- id: "widgetType"
138
+ id: 'widgetType'
139
139
  }
140
140
  },
141
141
  {
@@ -67,65 +67,65 @@ const config = {
67
67
  default: 'app-block'
68
68
  },
69
69
  {
70
- id: "whatMoreSettings",
71
- type: "group",
70
+ id: 'whatMoreSettings',
71
+ type: 'group',
72
72
  controls: [
73
73
  {
74
- id: "heading",
75
- type: "input",
76
- default: "Watch and Buy"
74
+ id: 'heading',
75
+ type: 'input',
76
+ default: 'Watch and Buy'
77
77
  },
78
78
  {
79
- id: "templateType",
79
+ id: 'templateType',
80
80
  label: 'Choose widget',
81
81
  type: 'select',
82
82
  options: [
83
83
  {
84
- label: "Video-Card",
85
- value: "template-a"
84
+ label: 'Video-Card',
85
+ value: 'template-a'
86
86
  },
87
87
  {
88
- label: "Video-Card feed",
89
- value: "template-feed-a"
88
+ label: 'Video-Card feed',
89
+ value: 'template-feed-a'
90
90
  },
91
91
  {
92
- label: "Video-Card with see-more option.",
93
- value: "template-a-1"
92
+ label: 'Video-Card with see-more option.',
93
+ value: 'template-a-1'
94
94
  },
95
95
  {
96
- label: "Product-Video-Card",
97
- value: "template-b"
96
+ label: 'Product-Video-Card',
97
+ value: 'template-b'
98
98
  },
99
99
  {
100
- label: "Grid Style - Theme Border",
101
- value: "template-c"
100
+ label: 'Grid Style - Theme Border',
101
+ value: 'template-c'
102
102
  },
103
103
  {
104
- label: "Grid Style - No Border",
105
- value: "template-d"
104
+ label: 'Grid Style - No Border',
105
+ value: 'template-d'
106
106
  },
107
107
  {
108
- label: "Single Tile",
109
- value: "template-e"
108
+ label: 'Single Tile',
109
+ value: 'template-e'
110
110
  },
111
111
  {
112
- label: "Video-card with product-info",
113
- value: "template-f"
112
+ label: 'Video-card with product-info',
113
+ value: 'template-f'
114
114
  },
115
115
  {
116
- label: "Video-card with text-overlay",
117
- value: "template-g"
116
+ label: 'Video-card with text-overlay',
117
+ value: 'template-g'
118
118
  },
119
119
  {
120
- label: "Focussed-video-card with product-info",
121
- value: "template-h"
120
+ label: 'Focussed-video-card with product-info',
121
+ value: 'template-h'
122
122
  },
123
123
  {
124
- label: "Video-stories",
125
- value: "template-stories"
124
+ label: 'Video-stories',
125
+ value: 'template-stories'
126
126
  }
127
127
  ],
128
- default: "template-f"
128
+ default: 'template-f'
129
129
  },
130
130
  {
131
131
  id: 'showViews',
@@ -248,24 +248,24 @@ const config = {
248
248
  }
249
249
  },
250
250
  {
251
- type: "group",
251
+ type: 'group',
252
252
  controls: [
253
253
  {
254
- type: "control",
254
+ type: 'control',
255
255
  label: {
256
- en: "Heading"
256
+ en: 'Heading'
257
257
  },
258
258
  setting: {
259
- id: "heading"
259
+ id: 'heading'
260
260
  }
261
261
  },
262
262
  {
263
- type: "control",
263
+ type: 'control',
264
264
  label: {
265
- en: "Tile Type"
265
+ en: 'Tile Type'
266
266
  },
267
267
  setting: {
268
- id: "templateType"
268
+ id: 'templateType'
269
269
  }
270
270
  },
271
271
  {
@@ -4,5 +4,10 @@ const WISER_VERSION = {
4
4
  V1: 'V1',
5
5
  V2: 'V2'
6
6
  };
7
+ const FERA_VERSION = {
8
+ V2: 'V2',
9
+ V3: 'V3'
10
+ };
7
11
 
12
+ exports.FERA_VERSION = FERA_VERSION;
8
13
  exports.WISER_VERSION = WISER_VERSION;
@@ -1,335 +1,131 @@
1
1
  'use client';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
- import { formatTime, convertTime } from '../helpers.js';
4
- import useTimeLeft from '../hooks/useTimeLeft.js';
5
- import { useEditorMode, useInteraction, makeStyleResponsive, composeSize, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, composeRadius, makeStyle, getGlobalColorCSSProp, cls, getGlobalColorClass, genSizeClass } from '@gem-sdk/core';
6
- import { useRef } from 'react';
3
+ import { formatTime } from '../helpers.js';
7
4
  import Text from '../../text/components/Text.js';
8
- import { useTransition } from '../../product/components/ProductVariants/common/common.js';
5
+ import { useEditorMode } from '@gem-sdk/core';
6
+ import useCountDownTimer from './hooks/useCountDownTimer.js';
7
+ import { createClass, createAttr, createStyle, If } from '@gem-sdk/system';
8
+ import { getAttr } from './common/getAttr.js';
9
+ import { getTextExpireClasses, getWrapperClasses, getContentClasses, getTextFrontClasses, getLinkClasses, getDateClasses, getTextBackClasses } from './common/getClasses.js';
10
+ import { getWrapperStyle, getContainStyle, getDateStyle, getTextFrontStyle, getTextBackStyle } from './common/getStyle.js';
9
11
 
10
- const Countdown = ({ setting, styles, builderProps })=>{
11
- const { colorNumber, colorLabel } = styles ?? {};
12
+ const Countdown = (props)=>{
13
+ const { setting, styles, builderProps, advanced } = props;
14
+ const { labelTypo, numTypo, labelTypography, numTypography } = styles ?? {};
15
+ const { weekLabel, dayLabel, hourLabel, minuteLabel, secondLabel, enableWeek, enableDay, enableHour, enableMinute, enableSecond, redirectUrl } = setting ?? {};
12
16
  const mode = useEditorMode();
13
- const ref = useRef(null);
14
- const { trigger } = useInteraction();
15
- const timeLeft = useTimeLeft({
16
- timerDaily: setting?.timerDaily,
17
- timerEverygreen: setting?.timerEverygreen,
18
- dateStandard: setting?.dateStandard,
19
- behaviour: setting?.behaviour,
20
- loopAfterFinish: setting?.loopAfterFinish,
21
- redirectUrl: setting?.redirectUrl,
22
- timeZone: setting?.timeZone
17
+ const { week, day, hour, minute, second, timeLeft, ref } = useCountDownTimer(setting, builderProps);
18
+ const hasLinkCover = !!redirectUrl?.link && mode !== 'edit';
19
+ const textExpireClasses = createClass({
20
+ ...getTextExpireClasses()
23
21
  });
24
- const { week, day, hour, minute, second } = convertTime(timeLeft, {
25
- enableWeek: setting?.enableWeek,
26
- enableDay: setting?.enableDay,
27
- enableHour: setting?.enableHour,
28
- enableMinute: setting?.enableMinute,
29
- enableSecond: setting?.enableSecond
30
- });
31
- useTransition((preTimeLeft)=>{
32
- if (preTimeLeft !== timeLeft) {
33
- dispatchInteractionCountdownTimer(timeLeft);
34
- }
35
- }, [
36
- timeLeft
37
- ]);
38
- const dispatchInteractionCountdownTimer = (timeLeft)=>{
39
- const element = ref.current;
40
- const gpInteractionCounter = new Map(Object.entries(JSON.parse(element?.getAttribute('gp-interaction-counter') ?? '{}')));
41
- if (gpInteractionCounter.size <= 0) return;
42
- gpInteractionCounter.forEach((_, key)=>{
43
- if (timeLeft !== Number(key)) return;
44
- trigger({
45
- event: 'gp:countdown-timer',
46
- selector: `[data-id="${builderProps?.uid}"]`,
47
- element,
48
- data: Number(key)
49
- });
50
- if (!setting?.loopAfterFinish) {
51
- gpInteractionCounter.delete(key);
52
- element.setAttribute('gp-interaction-counter', JSON.stringify(Object.fromEntries(gpInteractionCounter)));
53
- }
54
- });
55
- };
56
- const renderClassWithCondition = (condition, className)=>condition ? className : '';
57
22
  if (setting?.autoHideWhenTimeout && timeLeft <= 0) {
58
23
  if (mode !== 'edit') {
59
24
  return null;
60
25
  }
61
26
  return /*#__PURE__*/ jsx("div", {
62
- className: "gp-flex gp-h-12 gp-items-center gp-justify-center gp-bg-[#d6d6d6] gp-opacity-70",
27
+ className: textExpireClasses,
63
28
  children: /*#__PURE__*/ jsx("span", {
64
29
  children: "Countdown is run out of time (this only visible in the editor)"
65
30
  })
66
31
  });
67
32
  }
68
- return /*#__PURE__*/ jsx("div", {
69
- ref: ref,
70
- "data-id": builderProps?.uid,
71
- className: "gp-flex",
72
- style: {
73
- ...makeStyleResponsive('jc', styles?.textAlign)
74
- },
75
- children: /*#__PURE__*/ jsxs("div", {
76
- className: "gp-flex gp-w-max gp-flex-wrap",
77
- style: {
78
- gap: styles?.horizontalGap,
79
- ...makeStyleResponsive('jc', styles?.textAlign)
80
- },
33
+ const attrs = createAttr({
34
+ ...getAttr({
35
+ uid: builderProps?.uid || ''
36
+ })
37
+ });
38
+ const wrapperStyle = createStyle({
39
+ ...getWrapperStyle(styles)
40
+ });
41
+ const wrapperClasses = createClass({
42
+ ...getWrapperClasses(advanced?.cssClass)
43
+ });
44
+ const containClasses = createClass({
45
+ ...getContentClasses()
46
+ });
47
+ const containStyle = createStyle({
48
+ ...getContainStyle(styles)
49
+ });
50
+ const dateStyle = createStyle({
51
+ ...getDateStyle(styles)
52
+ });
53
+ const dateClasses = (dateLabel)=>createClass({
54
+ ...getDateClasses(styles, dateLabel)
55
+ });
56
+ const textFrontClasses = createClass({
57
+ ...getTextFrontClasses(styles)
58
+ });
59
+ const textFrontStyle = createStyle({
60
+ ...getTextFrontStyle(styles)
61
+ });
62
+ const textBackStyle = createStyle({
63
+ ...getTextBackStyle(styles)
64
+ });
65
+ const textBackClasses = (textLabel)=>createClass({
66
+ ...getTextBackClasses(styles, textLabel)
67
+ });
68
+ const linkClasses = createClass({
69
+ ...getLinkClasses()
70
+ });
71
+ const timeTemplate = (time, textLabel)=>{
72
+ const textFrontLabel = formatTime(time);
73
+ return /*#__PURE__*/ jsxs("div", {
74
+ style: dateStyle,
75
+ className: dateClasses(textLabel),
81
76
  children: [
82
- setting?.enableWeek && /*#__PURE__*/ jsxs("div", {
83
- style: {
84
- ...!styles?.itemPadding?.type ? composeSize(styles?.itemPadding?.custom) : {},
85
- ...handleConvertBorderStyle(styles?.borderState),
86
- ...handleConvertBorderWidth(styles?.borderState),
87
- ...handleConvertBorderColor(styles?.borderState),
88
- ...composeRadius(styles?.roundedState),
89
- ...makeStyle({
90
- bg: getGlobalColorCSSProp(styles?.backgroundItemColor)
91
- })
77
+ /*#__PURE__*/ jsx(Text, {
78
+ styles: {
79
+ typography: numTypography,
80
+ typo: numTypo
92
81
  },
93
- className: cls(getGlobalColorClass('bg', styles?.backgroundItemColor), 'gp-min-w-max !gp-max-w-max gp-flex-1 gp-text-center ', styles?.itemPadding?.type ? genSizeClass(styles?.itemPadding?.type) : '', renderClassWithCondition(!setting?.weekLabel, 'gp-content-center')),
94
- children: [
95
- /*#__PURE__*/ jsx(Text, {
96
- className: cls(getGlobalColorClass('text', colorNumber)),
97
- styles: {
98
- typography: styles?.numTypography,
99
- typo: styles?.numTypo
100
- },
101
- style: {
102
- ...makeStyle({
103
- mb: styles?.verticalGap,
104
- c: getGlobalColorCSSProp(colorNumber)
105
- })
106
- },
107
- setting: {
108
- text: formatTime(week),
109
- htmlTag: 'div',
110
- excludeFlex: true
111
- }
112
- }),
113
- /*#__PURE__*/ jsx(Text, {
114
- className: cls(getGlobalColorClass('text', colorLabel), renderClassWithCondition(!setting?.weekLabel, 'gp-hidden')),
115
- styles: {
116
- typography: styles?.labelTypography,
117
- typo: styles?.labelTypo
118
- },
119
- style: {
120
- ...makeStyle({
121
- c: getGlobalColorCSSProp(colorLabel)
122
- })
123
- },
124
- setting: {
125
- text: setting?.weekLabel,
126
- htmlTag: 'p',
127
- excludeFlex: true
128
- }
129
- })
130
- ]
131
- }),
132
- setting?.enableDay && /*#__PURE__*/ jsxs("div", {
133
- style: {
134
- ...!styles?.itemPadding?.type ? composeSize(styles?.itemPadding?.custom) : {},
135
- ...handleConvertBorderStyle(styles?.borderState),
136
- ...handleConvertBorderWidth(styles?.borderState),
137
- ...handleConvertBorderColor(styles?.borderState),
138
- ...composeRadius(styles?.roundedState),
139
- ...makeStyle({
140
- bg: getGlobalColorCSSProp(styles?.backgroundItemColor)
141
- })
142
- },
143
- className: cls(getGlobalColorClass('bg', styles?.backgroundItemColor), 'gp-min-w-max !gp-max-w-max gp-flex-1 gp-text-center', styles?.itemPadding?.type ? genSizeClass(styles?.itemPadding?.type) : '', renderClassWithCondition(!setting?.dayLabel, 'gp-content-center')),
144
- children: [
145
- /*#__PURE__*/ jsx(Text, {
146
- className: cls(getGlobalColorClass('text', colorNumber)),
147
- styles: {
148
- typography: styles?.numTypography,
149
- typo: styles?.numTypo
150
- },
151
- style: {
152
- ...makeStyle({
153
- mb: styles?.verticalGap,
154
- c: getGlobalColorCSSProp(colorNumber)
155
- })
156
- },
157
- setting: {
158
- text: formatTime(day),
159
- htmlTag: 'div',
160
- excludeFlex: true
161
- }
162
- }),
163
- /*#__PURE__*/ jsx(Text, {
164
- className: `${cls(getGlobalColorClass('text', colorLabel), renderClassWithCondition(!setting?.dayLabel, 'gp-hidden'))} , `,
165
- styles: {
166
- typography: styles?.labelTypography,
167
- typo: styles?.labelTypo
168
- },
169
- style: {
170
- ...makeStyle({
171
- c: getGlobalColorCSSProp(colorLabel)
172
- })
173
- },
174
- setting: {
175
- text: setting?.dayLabel,
176
- htmlTag: 'p',
177
- excludeFlex: true
178
- }
179
- })
180
- ]
181
- }),
182
- setting?.enableHour && /*#__PURE__*/ jsxs("div", {
183
- className: cls(getGlobalColorClass('bg', styles?.backgroundItemColor), 'gp-min-w-max !gp-max-w-max gp-flex-1 gp-text-center', styles?.itemPadding?.type ? genSizeClass(styles?.itemPadding?.type) : '', renderClassWithCondition(!setting?.hourLabel, 'gp-content-center')),
184
- style: {
185
- ...!styles?.itemPadding?.type ? composeSize(styles?.itemPadding?.custom) : {},
186
- ...handleConvertBorderStyle(styles?.borderState),
187
- ...handleConvertBorderWidth(styles?.borderState),
188
- ...handleConvertBorderColor(styles?.borderState),
189
- ...composeRadius(styles?.roundedState),
190
- ...makeStyle({
191
- bg: getGlobalColorCSSProp(styles?.backgroundItemColor)
192
- })
82
+ setting: {
83
+ htmlTag: 'div',
84
+ text: textFrontLabel,
85
+ excludeFlex: true
193
86
  },
194
- children: [
195
- /*#__PURE__*/ jsx(Text, {
196
- className: cls(getGlobalColorClass('text', colorNumber)),
197
- styles: {
198
- typography: styles?.numTypography,
199
- typo: styles?.numTypo
200
- },
201
- style: {
202
- ...makeStyle({
203
- mb: styles?.verticalGap,
204
- c: getGlobalColorCSSProp(colorNumber)
205
- })
206
- },
207
- setting: {
208
- text: formatTime(hour),
209
- htmlTag: 'div',
210
- excludeFlex: true
211
- }
212
- }),
213
- /*#__PURE__*/ jsx(Text, {
214
- className: cls(getGlobalColorClass('text', colorLabel), renderClassWithCondition(!setting?.hourLabel, 'gp-hidden')),
215
- styles: {
216
- typography: styles?.labelTypography,
217
- typo: styles?.labelTypo
218
- },
219
- style: {
220
- ...makeStyle({
221
- c: getGlobalColorCSSProp(colorLabel)
222
- })
223
- },
224
- setting: {
225
- text: setting?.hourLabel,
226
- htmlTag: 'p',
227
- excludeFlex: true
228
- }
229
- })
230
- ]
87
+ className: textFrontClasses,
88
+ style: textFrontStyle
231
89
  }),
232
- setting?.enableMinute && /*#__PURE__*/ jsxs("div", {
233
- className: cls(getGlobalColorClass('bg', styles?.backgroundItemColor), 'gp-min-w-max !gp-max-w-max gp-flex-1 gp-text-center', styles?.itemPadding?.type ? genSizeClass(styles?.itemPadding?.type) : '', renderClassWithCondition(!setting?.minuteLabel, 'gp-content-center')),
234
- style: {
235
- ...!styles?.itemPadding?.type ? composeSize(styles?.itemPadding?.custom) : {},
236
- ...handleConvertBorderStyle(styles?.borderState),
237
- ...handleConvertBorderWidth(styles?.borderState),
238
- ...handleConvertBorderColor(styles?.borderState),
239
- ...composeRadius(styles?.roundedState),
240
- ...makeStyle({
241
- bg: getGlobalColorCSSProp(styles?.backgroundItemColor)
242
- })
90
+ /*#__PURE__*/ jsx(Text, {
91
+ styles: {
92
+ typography: labelTypography,
93
+ typo: labelTypo
243
94
  },
244
- children: [
245
- /*#__PURE__*/ jsx(Text, {
246
- className: cls(getGlobalColorClass('text', colorNumber)),
247
- styles: {
248
- typography: styles?.numTypography,
249
- typo: styles?.numTypo
250
- },
251
- style: {
252
- ...makeStyle({
253
- mb: styles?.verticalGap,
254
- c: getGlobalColorCSSProp(colorNumber)
255
- })
256
- },
257
- setting: {
258
- text: formatTime(minute),
259
- htmlTag: 'div',
260
- excludeFlex: true
261
- }
262
- }),
263
- /*#__PURE__*/ jsx(Text, {
264
- className: cls(getGlobalColorClass('text', colorLabel), renderClassWithCondition(!setting?.minuteLabel, 'gp-hidden')),
265
- styles: {
266
- typography: styles?.labelTypography,
267
- typo: styles?.labelTypo
268
- },
269
- style: {
270
- ...makeStyle({
271
- c: getGlobalColorCSSProp(colorLabel)
272
- })
273
- },
274
- setting: {
275
- text: setting?.minuteLabel,
276
- htmlTag: 'p',
277
- excludeFlex: true
278
- }
279
- })
280
- ]
281
- }),
282
- setting?.enableSecond && /*#__PURE__*/ jsxs("div", {
283
- className: cls(getGlobalColorClass('bg', styles?.backgroundItemColor), 'gp-min-w-max !gp-max-w-max gp-flex-1 gp-text-center', styles?.itemPadding?.type ? genSizeClass(styles?.itemPadding?.type) : '', renderClassWithCondition(!setting?.secondLabel, 'gp-content-center')),
284
- style: {
285
- ...!styles?.itemPadding?.type ? composeSize(styles?.itemPadding?.custom) : {},
286
- ...handleConvertBorderStyle(styles?.borderState),
287
- ...handleConvertBorderWidth(styles?.borderState),
288
- ...handleConvertBorderColor(styles?.borderState),
289
- ...composeRadius(styles?.roundedState),
290
- ...makeStyle({
291
- bg: getGlobalColorCSSProp(styles?.backgroundItemColor)
292
- })
95
+ setting: {
96
+ text: textLabel,
97
+ htmlTag: 'p',
98
+ excludeFlex: true
293
99
  },
294
- children: [
295
- /*#__PURE__*/ jsx(Text, {
296
- className: cls(getGlobalColorClass('text', colorNumber)),
297
- styles: {
298
- typography: styles?.numTypography,
299
- typo: styles?.numTypo
300
- },
301
- style: {
302
- ...makeStyle({
303
- mb: styles?.verticalGap,
304
- c: getGlobalColorCSSProp(colorNumber)
305
- })
306
- },
307
- setting: {
308
- text: formatTime(second),
309
- htmlTag: 'div',
310
- excludeFlex: true
311
- }
312
- }),
313
- /*#__PURE__*/ jsx(Text, {
314
- className: cls(getGlobalColorClass('text', colorLabel), renderClassWithCondition(!setting?.secondLabel, 'gp-hidden')),
315
- styles: {
316
- typography: styles?.labelTypography,
317
- typo: styles?.labelTypo
318
- },
319
- style: {
320
- ...makeStyle({
321
- c: getGlobalColorCSSProp(colorLabel)
322
- })
323
- },
324
- setting: {
325
- text: setting?.secondLabel,
326
- htmlTag: 'p',
327
- excludeFlex: true
328
- }
329
- })
330
- ]
100
+ style: textBackStyle,
101
+ className: textBackClasses(textLabel)
331
102
  })
332
103
  ]
104
+ });
105
+ };
106
+ return /*#__PURE__*/ jsx("div", {
107
+ ref: ref,
108
+ ...attrs,
109
+ className: wrapperClasses,
110
+ style: wrapperStyle,
111
+ children: /*#__PURE__*/ jsxs("div", {
112
+ className: containClasses,
113
+ style: containStyle,
114
+ children: [
115
+ If(hasLinkCover, /*#__PURE__*/ jsx("a", {
116
+ href: redirectUrl?.link,
117
+ target: redirectUrl?.target,
118
+ "aria-label": "Countdown link",
119
+ className: linkClasses,
120
+ children: ' '
121
+ })),
122
+ If(enableWeek, timeTemplate(week, weekLabel)),
123
+ If(enableWeek, timeTemplate(week, weekLabel)),
124
+ If(enableDay, timeTemplate(day, dayLabel)),
125
+ If(enableHour, timeTemplate(hour, hourLabel)),
126
+ If(enableMinute, timeTemplate(minute, minuteLabel)),
127
+ If(enableSecond, timeTemplate(second, secondLabel))
128
+ ]
333
129
  })
334
130
  });
335
131
  };