@gem-sdk/components 2.0.0-dev.465 → 2.0.0-dev.467

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.
@@ -62,6 +62,11 @@ const ArticleContent = ({ styles, builderProps })=>{
62
62
  ...core.getGlobalColorStateStyle('c', styles?.color),
63
63
  ...core.makeStyleResponsive('ta', styles?.textAlign),
64
64
  ...hasLineClamp && !open ? core.makeStyleResponsive('line-clamp', styles?.lineClamp) : {},
65
+ ...core.getStyleShadow({
66
+ value: styles?.typo?.custom?.textShadow,
67
+ styleAppliedFor: 'text-shadow',
68
+ isEnableShadow: styles?.typo?.custom?.hasShadowText
69
+ }),
65
70
  ...core.makeStyle({
66
71
  tt: styles?.transform
67
72
  }),
@@ -19,7 +19,12 @@ const ArticleContent = ({ styles, builderProps })=>{
19
19
  };
20
20
  const collapseStyle = {
21
21
  ...defaultStyle,
22
- ...core.makeStyleResponsive('line-clamp', core.makeLineClamp(styles?.lineClamp, styles?.hasLineClamp))
22
+ ...core.makeStyleResponsive('line-clamp', core.makeLineClamp(styles?.lineClamp, styles?.hasLineClamp)),
23
+ ...core.getStyleShadow({
24
+ value: styles?.typo?.custom?.textShadow,
25
+ styleAppliedFor: 'text-shadow',
26
+ isEnableShadow: styles?.typo?.custom?.hasShadowText
27
+ })
23
28
  };
24
29
  return core.template`
25
30
  <gp-article-content data-id="${builderProps?.uid}" >
@@ -11,12 +11,13 @@ const uiV2 = [
11
11
  en: 'Prefix'
12
12
  },
13
13
  getValueFromSettingID: 'prefix',
14
+ iconName: 'gp-prefix',
14
15
  type: 'combo',
15
16
  defaultValueWhenClear: '',
16
17
  controls: [
17
18
  {
18
19
  label: {
19
- en: 'Content'
20
+ en: 'Prefix'
20
21
  },
21
22
  type: 'control',
22
23
  setting: {
@@ -21,10 +21,7 @@ const ArticleDatePresets = [
21
21
  },
22
22
  styles: {
23
23
  typo: {
24
- type: 'paragraph-3',
25
- attrs: {
26
- color: '#212121'
27
- }
24
+ type: 'paragraph-3'
28
25
  }
29
26
  }
30
27
  }
@@ -180,7 +180,7 @@ const uiV2 = [
180
180
  },
181
181
  {
182
182
  label: {
183
- en: 'Quality'
183
+ en: 'Optimize LCP'
184
184
  },
185
185
  controls: [
186
186
  {
@@ -194,7 +194,7 @@ const uiV2 = [
194
194
  {
195
195
  layout: 'horizontal',
196
196
  label: {
197
- en: ' '
197
+ en: 'Quality'
198
198
  },
199
199
  conditionDisplay: 'qualityType == "custom"',
200
200
  setting: {
@@ -55,21 +55,21 @@ const uiV2 = [
55
55
  noRecordHistory: true
56
56
  }
57
57
  }
58
- },
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ label: {
63
+ en: 'SEO'
64
+ },
65
+ controls: [
59
66
  {
60
67
  label: {
61
- en: 'SEO'
68
+ en: 'HTML tag'
62
69
  },
63
- controls: [
64
- {
65
- label: {
66
- en: 'HTML tag'
67
- },
68
- setting: {
69
- id: 'htmlTag'
70
- }
71
- }
72
- ]
70
+ setting: {
71
+ id: 'htmlTag'
72
+ }
73
73
  }
74
74
  ]
75
75
  }
@@ -131,8 +131,9 @@ const SettingUIV2 = [
131
131
  },
132
132
  controlConfig: {
133
133
  id: 'width',
134
- type: 'input',
134
+ type: 'dropdown:input',
135
135
  label: 'Width',
136
+ inputType: 'number',
136
137
  units: [
137
138
  'px',
138
139
  '%'
@@ -142,7 +143,19 @@ const SettingUIV2 = [
142
143
  linkWithSetting: {
143
144
  name: 'globalSize',
144
145
  field: 'width'
145
- }
146
+ },
147
+ displayOptions: [
148
+ {
149
+ label: 'Fit content',
150
+ value: 'Auto',
151
+ showValue: true
152
+ },
153
+ {
154
+ label: 'Full',
155
+ value: '100%',
156
+ showValue: true
157
+ }
158
+ ]
146
159
  },
147
160
  layout: 'horizontal'
148
161
  },
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
- import { useArticleStore, useCurrentDevice, getResponsiveValueByScreen, composeTypographyClassName, composeTypographyStyle, isSafari, cls, getGlobalColorStateStyle, makeStyleResponsive, makeStyle } from '@gem-sdk/core';
3
+ import { useArticleStore, useCurrentDevice, getResponsiveValueByScreen, composeTypographyClassName, composeTypographyStyle, isSafari, cls, getGlobalColorStateStyle, makeStyleResponsive, getStyleShadow, makeStyle } from '@gem-sdk/core';
4
4
  import { useState, useRef, useEffect } from 'react';
5
5
 
6
6
  const ArticleContent = ({ styles, builderProps })=>{
@@ -58,6 +58,11 @@ const ArticleContent = ({ styles, builderProps })=>{
58
58
  ...getGlobalColorStateStyle('c', styles?.color),
59
59
  ...makeStyleResponsive('ta', styles?.textAlign),
60
60
  ...hasLineClamp && !open ? makeStyleResponsive('line-clamp', styles?.lineClamp) : {},
61
+ ...getStyleShadow({
62
+ value: styles?.typo?.custom?.textShadow,
63
+ styleAppliedFor: 'text-shadow',
64
+ isEnableShadow: styles?.typo?.custom?.hasShadowText
65
+ }),
61
66
  ...makeStyle({
62
67
  tt: styles?.transform
63
68
  }),
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { composeTypographyClassName, composeTypographyStyle, makeStyleResponsive, getGlobalColorStateStyle, makeStyle, makeLineClamp, template, cls, getGlobalColorStateClass, RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
2
+ import { composeTypographyClassName, composeTypographyStyle, makeStyleResponsive, getGlobalColorStateStyle, makeStyle, makeLineClamp, getStyleShadow, template, cls, getGlobalColorStateClass, RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
3
3
  import { getSettingPreloadData } from '../../helpers.js';
4
4
 
5
5
  const ArticleContent = ({ styles, builderProps })=>{
@@ -15,7 +15,12 @@ const ArticleContent = ({ styles, builderProps })=>{
15
15
  };
16
16
  const collapseStyle = {
17
17
  ...defaultStyle,
18
- ...makeStyleResponsive('line-clamp', makeLineClamp(styles?.lineClamp, styles?.hasLineClamp))
18
+ ...makeStyleResponsive('line-clamp', makeLineClamp(styles?.lineClamp, styles?.hasLineClamp)),
19
+ ...getStyleShadow({
20
+ value: styles?.typo?.custom?.textShadow,
21
+ styleAppliedFor: 'text-shadow',
22
+ isEnableShadow: styles?.typo?.custom?.hasShadowText
23
+ })
19
24
  };
20
25
  return template`
21
26
  <gp-article-content data-id="${builderProps?.uid}" >
@@ -9,12 +9,13 @@ const uiV2 = [
9
9
  en: 'Prefix'
10
10
  },
11
11
  getValueFromSettingID: 'prefix',
12
+ iconName: 'gp-prefix',
12
13
  type: 'combo',
13
14
  defaultValueWhenClear: '',
14
15
  controls: [
15
16
  {
16
17
  label: {
17
- en: 'Content'
18
+ en: 'Prefix'
18
19
  },
19
20
  type: 'control',
20
21
  setting: {
@@ -19,10 +19,7 @@ const ArticleDatePresets = [
19
19
  },
20
20
  styles: {
21
21
  typo: {
22
- type: 'paragraph-3',
23
- attrs: {
24
- color: '#212121'
25
- }
22
+ type: 'paragraph-3'
26
23
  }
27
24
  }
28
25
  }
@@ -178,7 +178,7 @@ const uiV2 = [
178
178
  },
179
179
  {
180
180
  label: {
181
- en: 'Quality'
181
+ en: 'Optimize LCP'
182
182
  },
183
183
  controls: [
184
184
  {
@@ -192,7 +192,7 @@ const uiV2 = [
192
192
  {
193
193
  layout: 'horizontal',
194
194
  label: {
195
- en: ' '
195
+ en: 'Quality'
196
196
  },
197
197
  conditionDisplay: 'qualityType == "custom"',
198
198
  setting: {
@@ -53,21 +53,21 @@ const uiV2 = [
53
53
  noRecordHistory: true
54
54
  }
55
55
  }
56
- },
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ label: {
61
+ en: 'SEO'
62
+ },
63
+ controls: [
57
64
  {
58
65
  label: {
59
- en: 'SEO'
66
+ en: 'HTML tag'
60
67
  },
61
- controls: [
62
- {
63
- label: {
64
- en: 'HTML tag'
65
- },
66
- setting: {
67
- id: 'htmlTag'
68
- }
69
- }
70
- ]
68
+ setting: {
69
+ id: 'htmlTag'
70
+ }
71
71
  }
72
72
  ]
73
73
  }
@@ -129,8 +129,9 @@ const SettingUIV2 = [
129
129
  },
130
130
  controlConfig: {
131
131
  id: 'width',
132
- type: 'input',
132
+ type: 'dropdown:input',
133
133
  label: 'Width',
134
+ inputType: 'number',
134
135
  units: [
135
136
  'px',
136
137
  '%'
@@ -140,7 +141,19 @@ const SettingUIV2 = [
140
141
  linkWithSetting: {
141
142
  name: 'globalSize',
142
143
  field: 'width'
143
- }
144
+ },
145
+ displayOptions: [
146
+ {
147
+ label: 'Fit content',
148
+ value: 'Auto',
149
+ showValue: true
150
+ },
151
+ {
152
+ label: 'Full',
153
+ value: '100%',
154
+ showValue: true
155
+ }
156
+ ]
144
157
  },
145
158
  layout: 'horizontal'
146
159
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.465",
3
+ "version": "2.0.0-dev.467",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",