@gem-sdk/components 2.0.0-dev.494 → 2.0.0-dev.495

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.
@@ -24,15 +24,17 @@ const getTextProps = (props, text)=>{
24
24
  };
25
25
  return {
26
26
  id: `p-price-${builderProps?.uid}`,
27
- styles,
27
+ styles: {
28
+ ...styles,
29
+ lineThrough: isComparePrice && styles?.lineThrough
30
+ },
28
31
  setting: {
29
32
  text: text ?? `${isComparePrice ? priceCompare() : defaultPrice()}`,
30
33
  excludeFlex: true
31
34
  },
32
35
  className: core.cls('gp-price', {
33
36
  'gp-money': !isComparePrice,
34
- 'gp-product-compare-price': isComparePrice,
35
- 'gp-line-through': isComparePrice && styles?.lineThrough
37
+ 'gp-product-compare-price': isComparePrice
36
38
  }, colorClass, classNames)
37
39
  };
38
40
  };
@@ -15,6 +15,7 @@ const StockCounterSettingsV2 = [
15
15
  itemPerRow: 2,
16
16
  itemSpacing: 'large',
17
17
  popoverLabel: 'Type',
18
+ enableItemOpacity: true,
18
19
  options: [
19
20
  {
20
21
  label: 'Full',
@@ -28,6 +28,10 @@ const getContainerStyle = (styles, setting)=>{
28
28
  };
29
29
  const getTextStyle = (styles, setting)=>{
30
30
  const composeGlobalSize = core.makeGlobalSize(setting?.globalSize);
31
+ const tdlStyle = [
32
+ styles?.lineThrough && 'line-through',
33
+ styles?.typo?.attrs?.underline && 'underline'
34
+ ].filter(Boolean);
31
35
  const composeStyles = {
32
36
  ...composeGlobalSize?.width?.['--w'] ? composeGlobalSize.width : {
33
37
  '--w': '100%'
@@ -52,7 +56,10 @@ const getTextStyle = (styles, setting)=>{
52
56
  ...core.getStyleBackgroundByDevice(setting?.background),
53
57
  ...composeGlobalSize.padding,
54
58
  ...core.getGradientBgrStyleByDevice(setting?.background),
55
- overflow: 'hidden'
59
+ overflow: 'hidden',
60
+ ...core.makeStyle({
61
+ tdl: tdlStyle.join(' ')
62
+ })
56
63
  };
57
64
  return filterTruthyStyles(composeStyles);
58
65
  };
@@ -22,15 +22,17 @@ const getTextProps = (props, text)=>{
22
22
  };
23
23
  return {
24
24
  id: `p-price-${builderProps?.uid}`,
25
- styles,
25
+ styles: {
26
+ ...styles,
27
+ lineThrough: isComparePrice && styles?.lineThrough
28
+ },
26
29
  setting: {
27
30
  text: text ?? `${isComparePrice ? priceCompare() : defaultPrice()}`,
28
31
  excludeFlex: true
29
32
  },
30
33
  className: cls('gp-price', {
31
34
  'gp-money': !isComparePrice,
32
- 'gp-product-compare-price': isComparePrice,
33
- 'gp-line-through': isComparePrice && styles?.lineThrough
35
+ 'gp-product-compare-price': isComparePrice
34
36
  }, colorClass, classNames)
35
37
  };
36
38
  };
@@ -13,6 +13,7 @@ const StockCounterSettingsV2 = [
13
13
  itemPerRow: 2,
14
14
  itemSpacing: 'large',
15
15
  popoverLabel: 'Type',
16
+ enableItemOpacity: true,
16
17
  options: [
17
18
  {
18
19
  label: 'Full',
@@ -26,6 +26,10 @@ const getContainerStyle = (styles, setting)=>{
26
26
  };
27
27
  const getTextStyle = (styles, setting)=>{
28
28
  const composeGlobalSize = makeGlobalSize(setting?.globalSize);
29
+ const tdlStyle = [
30
+ styles?.lineThrough && 'line-through',
31
+ styles?.typo?.attrs?.underline && 'underline'
32
+ ].filter(Boolean);
29
33
  const composeStyles = {
30
34
  ...composeGlobalSize?.width?.['--w'] ? composeGlobalSize.width : {
31
35
  '--w': '100%'
@@ -50,7 +54,10 @@ const getTextStyle = (styles, setting)=>{
50
54
  ...getStyleBackgroundByDevice(setting?.background),
51
55
  ...composeGlobalSize.padding,
52
56
  ...getGradientBgrStyleByDevice(setting?.background),
53
- overflow: 'hidden'
57
+ overflow: 'hidden',
58
+ ...makeStyle({
59
+ tdl: tdlStyle.join(' ')
60
+ })
54
61
  };
55
62
  return filterTruthyStyles(composeStyles);
56
63
  };
@@ -131,6 +131,7 @@ type TextProps = BasePropsWrap<{
131
131
  shapeRounded?: ObjectDevices$1<CornerRadius>;
132
132
  shapeBoxShadow?: ObjectDevices$1<ShadowProps$1>;
133
133
  isForceValue?: boolean;
134
+ lineThrough?: boolean;
134
135
  }> & Omit<React.ComponentPropsWithoutRef<'p'>, ''>;
135
136
 
136
137
  declare const Text$2: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<{
@@ -180,6 +181,7 @@ declare const Text$2: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<{
180
181
  shapeRounded?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.CornerRadius>> | undefined;
181
182
  shapeBoxShadow?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.ShadowProps>> | undefined;
182
183
  isForceValue?: boolean | undefined;
184
+ lineThrough?: boolean | undefined;
183
185
  }, Record<string, any>> & {
184
186
  builderAttrs?: Record<string, any> | undefined;
185
187
  style?: React.CSSProperties | undefined;
@@ -5830,6 +5832,7 @@ declare const _default$2: {
5830
5832
  shapeRounded?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.CornerRadius>> | undefined;
5831
5833
  shapeBoxShadow?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.ShadowProps>> | undefined;
5832
5834
  isForceValue?: boolean | undefined;
5835
+ lineThrough?: boolean | undefined;
5833
5836
  }, Record<string, any>> & {
5834
5837
  builderAttrs?: Record<string, any> | undefined;
5835
5838
  style?: React.CSSProperties | undefined;
@@ -6343,6 +6346,7 @@ declare const Text: ({ id, styles, builderAttrs, style, setting, advanced, build
6343
6346
  shapeRounded?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.CornerRadius>> | undefined;
6344
6347
  shapeBoxShadow?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.ShadowProps>> | undefined;
6345
6348
  isForceValue?: boolean | undefined;
6349
+ lineThrough?: boolean | undefined;
6346
6350
  }, Record<string, any>> & {
6347
6351
  builderAttrs?: Record<string, any> | undefined;
6348
6352
  style?: React.CSSProperties | undefined;
@@ -6441,6 +6445,7 @@ declare const ProductTag: ({ setting, styles, builderProps, advanced, pageContex
6441
6445
  shapeRounded?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.CornerRadius>> | undefined;
6442
6446
  shapeBoxShadow?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.ShadowProps>> | undefined;
6443
6447
  isForceValue?: boolean | undefined;
6448
+ lineThrough?: boolean | undefined;
6444
6449
  } & {
6445
6450
  textAlign?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.AlignProp>> | undefined;
6446
6451
  backgroundColor?: _gem_sdk_core.ColorValueType | undefined;
@@ -7477,6 +7482,7 @@ declare const _default$1: {
7477
7482
  shapeRounded?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.CornerRadius>> | undefined;
7478
7483
  shapeBoxShadow?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.ShadowProps>> | undefined;
7479
7484
  isForceValue?: boolean | undefined;
7485
+ lineThrough?: boolean | undefined;
7480
7486
  }, Record<string, any>> & {
7481
7487
  builderAttrs?: Record<string, any> | undefined;
7482
7488
  style?: React.CSSProperties | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.494",
3
+ "version": "2.0.0-dev.495",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",