@gem-sdk/components 2.0.0-dev.377 → 2.0.0-dev.379

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 (34) hide show
  1. package/dist/cjs/article/components/ArticleImage.liquid.js +2 -1
  2. package/dist/cjs/article/components/ArticleTitle.liquid.js +2 -1
  3. package/dist/cjs/article/setting/configs/ArticleImage/settings.js +14 -3
  4. package/dist/cjs/article/setting/configs/ArticleImage/uiV2.js +8 -0
  5. package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +12 -12
  6. package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +1 -179
  7. package/dist/cjs/article/setting/configs/ArticleTitle/settings.js +15 -4
  8. package/dist/cjs/article/setting/configs/ArticleTitle/uiV2.js +8 -0
  9. package/dist/cjs/form/components/textinput/TextInput.js +25 -30
  10. package/dist/cjs/form/components/textinput/TextInput.liquid.js +3 -3
  11. package/dist/cjs/form/components/textinput/common/composeClasses.js +0 -6
  12. package/dist/cjs/form/components/textinput/common/composeStyles.js +8 -2
  13. package/dist/cjs/form/setting/text-input/configs/settings.js +23 -48
  14. package/dist/cjs/form/setting/text-input/configs/uiV2.js +72 -11
  15. package/dist/cjs/helpers.js +4 -0
  16. package/dist/cjs/index.js +1 -0
  17. package/dist/esm/article/components/ArticleImage.liquid.js +2 -1
  18. package/dist/esm/article/components/ArticleTitle.liquid.js +2 -1
  19. package/dist/esm/article/setting/configs/ArticleImage/settings.js +14 -3
  20. package/dist/esm/article/setting/configs/ArticleImage/uiV2.js +8 -0
  21. package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +12 -12
  22. package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +1 -179
  23. package/dist/esm/article/setting/configs/ArticleTitle/settings.js +15 -4
  24. package/dist/esm/article/setting/configs/ArticleTitle/uiV2.js +8 -0
  25. package/dist/esm/form/components/textinput/TextInput.js +28 -33
  26. package/dist/esm/form/components/textinput/TextInput.liquid.js +5 -5
  27. package/dist/esm/form/components/textinput/common/composeClasses.js +1 -6
  28. package/dist/esm/form/components/textinput/common/composeStyles.js +9 -4
  29. package/dist/esm/form/setting/text-input/configs/settings.js +23 -48
  30. package/dist/esm/form/setting/text-input/configs/uiV2.js +72 -11
  31. package/dist/esm/helpers.js +4 -1
  32. package/dist/esm/index.js +1 -1
  33. package/dist/types/index.d.ts +21 -4
  34. package/package.json +1 -1
@@ -17,9 +17,20 @@ const SettingUIV2 = [
17
17
  controls: [
18
18
  {
19
19
  layout: 'vertical',
20
+ label: {
21
+ en: 'Content'
22
+ },
20
23
  setting: {
21
24
  id: 'placeholder'
22
25
  }
26
+ },
27
+ {
28
+ setting: {
29
+ id: 'placeholderColor'
30
+ },
31
+ label: {
32
+ en: 'Color'
33
+ }
23
34
  }
24
35
  ]
25
36
  },
@@ -165,23 +176,61 @@ const SettingUIV2 = [
165
176
  label: {
166
177
  en: 'Corner'
167
178
  },
168
- controlConfig: {
169
- id: 'corner',
170
- type: 'corner-v2',
171
- linkWithSetting: {
172
- name: 'borderRadius'
173
- }
179
+ setting: {
180
+ id: 'rounded',
181
+ state: 'normal'
174
182
  }
175
183
  },
176
184
  {
177
185
  label: {
178
186
  en: 'Shadow'
179
187
  },
180
- controlConfig: {
181
- id: 'shadow',
182
- type: 'shadow-v2',
183
- linkWithSetting: {
184
- name: 'shadow'
188
+ setting: {
189
+ id: 'boxShadow',
190
+ state: 'normal'
191
+ },
192
+ options: {
193
+ updateFields: [
194
+ {
195
+ field: 'enable',
196
+ settingId: 'hasBoxShadow',
197
+ state: 'normal'
198
+ }
199
+ ]
200
+ },
201
+ controlChangeTrigger: {
202
+ settings: [
203
+ {
204
+ condition: `boxShadow.normal.enable === true`,
205
+ source: [
206
+ 'boxShadow',
207
+ 'hasBoxShadow'
208
+ ],
209
+ action: {
210
+ controlId: 'hasBoxShadow',
211
+ groupType: 'advanced',
212
+ controlType: 'advanced',
213
+ state: 'normal',
214
+ newValue: true
215
+ }
216
+ },
217
+ {
218
+ condition: `boxShadow.normal.enable === false`,
219
+ source: [
220
+ 'boxShadow',
221
+ 'hasBoxShadow'
222
+ ],
223
+ action: {
224
+ controlId: 'hasBoxShadow',
225
+ groupType: 'advanced',
226
+ controlType: 'advanced',
227
+ state: 'normal',
228
+ newValue: false
229
+ }
230
+ }
231
+ ],
232
+ options: {
233
+ noRecordHistory: true
185
234
  }
186
235
  }
187
236
  }
@@ -200,6 +249,15 @@ const SettingUIV2 = [
200
249
  id: 'formType'
201
250
  }
202
251
  },
252
+ {
253
+ label: {
254
+ en: 'Visible text lines'
255
+ },
256
+ setting: {
257
+ id: 'textLine'
258
+ },
259
+ conditionDisplay: `formType === 'textarea'`
260
+ },
203
261
  {
204
262
  label: {
205
263
  en: 'Required'
@@ -212,6 +270,9 @@ const SettingUIV2 = [
212
270
  label: {
213
271
  en: 'Field name'
214
272
  },
273
+ help: {
274
+ content: 'Identify the information submitted via this element.'
275
+ },
215
276
  conditionDisplay: `formType === 'text'`,
216
277
  controlConfig: {
217
278
  id: 'name_text',
@@ -2,6 +2,9 @@
2
2
 
3
3
  var Link = require('./link/components/Link.js');
4
4
 
5
+ const getLinkArticle = (linkArticle, customURL)=>{
6
+ return linkArticle == 'scroll-to' ? customURL?.link : '{{article.url}}';
7
+ };
5
8
  const isTransparentColor = (str)=>{
6
9
  if (!str) return false;
7
10
  if (str.startsWith('#')) {
@@ -215,6 +218,7 @@ exports.filterTruthyStyles = filterTruthyStyles;
215
218
  exports.getDisplayStyle = getDisplayStyle;
216
219
  exports.getDynamicSourceLocales = getDynamicSourceLocales;
217
220
  exports.getInsertLinkData = getInsertLinkData;
221
+ exports.getLinkArticle = getLinkArticle;
218
222
  exports.getLinkData = getLinkData;
219
223
  exports.getSettingPreloadData = getSettingPreloadData;
220
224
  exports.getStaticLocale = getStaticLocale;
package/dist/cjs/index.js CHANGED
@@ -390,6 +390,7 @@ exports.filterTruthyStyles = helpers.filterTruthyStyles;
390
390
  exports.getDisplayStyle = helpers.getDisplayStyle;
391
391
  exports.getDynamicSourceLocales = helpers.getDynamicSourceLocales;
392
392
  exports.getInsertLinkData = helpers.getInsertLinkData;
393
+ exports.getLinkArticle = helpers.getLinkArticle;
393
394
  exports.getLinkData = helpers.getLinkData;
394
395
  exports.getSettingPreloadData = helpers.getSettingPreloadData;
395
396
  exports.getStaticLocale = helpers.getStaticLocale;
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { template, cls } from '@gem-sdk/core';
3
3
  import Image from '../../image/components/Image.liquid.js';
4
+ import { getLinkArticle } from '../../helpers.js';
4
5
 
5
6
  const ArticleImage = (props)=>{
6
7
  const setting = props?.setting ?? {};
@@ -8,7 +9,7 @@ const ArticleImage = (props)=>{
8
9
  return template`
9
10
  <div class="${cls('gp-text-center gp-overflow-hidden', props?.className)}" style="border-radius: inherit">
10
11
  ${setting?.linkArticle ? `
11
- <a href="{{article.url}}" title="{{article.title}}">
12
+ <a href="${getLinkArticle(setting.linkArticle, setting.customURL)}" title="{{article.title}}">
12
13
  ${Image({
13
14
  ...props,
14
15
  styles: props.styles,
@@ -1,12 +1,13 @@
1
1
  'use client';
2
2
  import { template } from '@gem-sdk/core';
3
3
  import Text from '../../text/components/Text.liquid.js';
4
+ import { getLinkArticle } from '../../helpers.js';
4
5
 
5
6
  const ArticleTitle = ({ setting, styles, advanced, builderProps })=>{
6
7
  const target = setting?.openNewTab ? '_blank' : '_self';
7
8
  return template`
8
9
  ${setting?.enableLink && setting?.linkArticle ? `
9
- <a href="{{article.url}}" target="${{
10
+ <a href="${getLinkArticle(setting.linkArticle, setting.customURL)}" target="${{
10
11
  target
11
12
  }}" title="{{article.title}}">
12
13
  ${Text({
@@ -61,16 +61,27 @@ const ArticleImageSettings = [
61
61
  options: [
62
62
  {
63
63
  label: 'Go to article',
64
- value: true
64
+ value: 'go-to-article'
65
65
  },
66
66
  {
67
67
  label: 'Scroll to',
68
- value: false
68
+ value: 'scroll-to'
69
69
  }
70
70
  ],
71
- default: true,
71
+ default: 'go-to-article',
72
72
  info: 'Ability to click on article title to go to article detail page.'
73
73
  },
74
+ {
75
+ id: 'customURL',
76
+ label: 'Custom URL',
77
+ type: 'pick-link',
78
+ default: {
79
+ target: '_self',
80
+ type: 'scroll-to'
81
+ },
82
+ isHiddenOpenLinkSelect: true,
83
+ hide: true
84
+ },
74
85
  {
75
86
  id: 'openNewTab',
76
87
  type: 'option:value',
@@ -102,6 +102,14 @@ const uiV2 = [
102
102
  setting: {
103
103
  id: 'openNewTab'
104
104
  }
105
+ },
106
+ {
107
+ type: 'control',
108
+ conditionDisplay: "linkArticle === 'scroll-to'",
109
+ layout: 'vertical',
110
+ setting: {
111
+ id: 'customURL'
112
+ }
105
113
  }
106
114
  ]
107
115
  },
@@ -17,18 +17,18 @@ const ArticleReadMoreSettings = [
17
17
  value: 'button',
18
18
  iconName: 'gp-article-filled-square'
19
19
  },
20
- {
21
- label: 'Rounded',
22
- value: 'rounded',
23
- iconName: 'gp-article-rounded'
24
- },
25
- {
26
- label: 'Outline',
27
- value: 'outline',
28
- iconName: 'gp-article-outline'
29
- },
30
- {
31
- label: 'Text',
20
+ // {
21
+ // label: 'Rounded',
22
+ // value: 'rounded',
23
+ // iconName: 'gp-article-rounded',
24
+ // },
25
+ // {
26
+ // label: 'Outline',
27
+ // value: 'outline',
28
+ // iconName: 'gp-article-outline',
29
+ // },
30
+ {
31
+ label: 'Text only',
32
32
  value: 'text',
33
33
  iconName: 'gp-article-link'
34
34
  }
@@ -8,185 +8,7 @@ const uiV2 = [
8
8
  setting: {
9
9
  id: 'readMoreType'
10
10
  },
11
- layout: 'vertical',
12
- controlChangeTrigger: {
13
- settings: [
14
- {
15
- condition: `readMoreType === 'outline'`,
16
- source: [
17
- 'readMoreType'
18
- ],
19
- action: {
20
- controlId: 'borderBtnV2',
21
- groupType: 'style',
22
- controlType: 'style',
23
- newValue: {
24
- normal: {
25
- border: 'solid',
26
- color: '#121212',
27
- width: '1px',
28
- borderWidth: '1px',
29
- borderType: '1px'
30
- },
31
- hover: {
32
- border: 'solid',
33
- color: '#121212',
34
- width: '1px',
35
- borderWidth: '1px',
36
- borderType: '1px'
37
- }
38
- }
39
- }
40
- },
41
- {
42
- condition: `readMoreType === 'button'`,
43
- source: [
44
- 'readMoreType'
45
- ],
46
- action: {
47
- controlId: 'roundedBtnV2',
48
- groupType: 'style',
49
- controlType: 'style',
50
- newValue: {
51
- normal: {},
52
- hover: {}
53
- }
54
- }
55
- },
56
- {
57
- condition: `readMoreType === 'outline'`,
58
- source: [
59
- 'readMoreType'
60
- ],
61
- action: {
62
- controlId: 'backgroundColorV2',
63
- groupType: 'style',
64
- controlType: 'style',
65
- newValue: {
66
- normal: '#212121',
67
- hover: '#303030'
68
- }
69
- }
70
- },
71
- {
72
- condition: `readMoreType === 'button' || readMoreType === 'rounded'`,
73
- source: [
74
- 'readMoreType'
75
- ],
76
- action: {
77
- controlId: 'backgroundColorV2',
78
- groupType: 'style',
79
- controlType: 'style',
80
- newValue: {
81
- normal: '#212121',
82
- hover: '#303030'
83
- }
84
- }
85
- },
86
- {
87
- condition: `readMoreType === 'outline'`,
88
- source: [
89
- 'readMoreType'
90
- ],
91
- action: {
92
- controlId: 'borderBtnV2',
93
- groupType: 'style',
94
- controlType: 'style',
95
- newValue: {
96
- normal: {},
97
- hover: {}
98
- }
99
- }
100
- },
101
- {
102
- condition: `readMoreType === 'outline'`,
103
- source: [
104
- 'readMoreType'
105
- ],
106
- action: {
107
- controlId: 'backgroundColorV2',
108
- groupType: 'style',
109
- controlType: 'style',
110
- newValue: {
111
- normal: 'transparent',
112
- hover: '#ECECEC'
113
- }
114
- }
115
- },
116
- {
117
- condition: `readMoreType === 'rounded'`,
118
- source: [
119
- 'readMoreType'
120
- ],
121
- action: {
122
- controlId: 'roundedBtnV2',
123
- groupType: 'style',
124
- controlType: 'style',
125
- newValue: {
126
- normal: {
127
- btrr: '99999px',
128
- bblr: '99999px',
129
- bbrr: '99999px',
130
- btlr: '99999px',
131
- radiusType: 'circle'
132
- },
133
- hover: {
134
- btrr: '99999px',
135
- bblr: '99999px',
136
- bbrr: '99999px',
137
- btlr: '99999px',
138
- radiusType: 'circle'
139
- }
140
- }
141
- }
142
- },
143
- {
144
- condition: `readMoreType === 'rounded'`,
145
- source: [
146
- 'readMoreType'
147
- ],
148
- action: {
149
- controlId: 'roundedBtnV2',
150
- groupType: 'style',
151
- controlType: 'style',
152
- newValue: {
153
- normal: {
154
- btrr: '99999px',
155
- bblr: '99999px',
156
- bbrr: '99999px',
157
- btlr: '99999px',
158
- radiusType: 'circle'
159
- },
160
- hover: {
161
- btrr: '99999px',
162
- bblr: '99999px',
163
- bbrr: '99999px',
164
- btlr: '99999px',
165
- radiusType: 'circle'
166
- }
167
- }
168
- }
169
- },
170
- {
171
- condition: `readMoreType !== 'rounded'`,
172
- source: [
173
- 'readMoreType'
174
- ],
175
- action: {
176
- controlId: 'roundedBtnV2',
177
- groupType: 'style',
178
- controlType: 'style',
179
- newValue: {
180
- normal: {},
181
- hover: {}
182
- }
183
- }
184
- }
185
- ],
186
- options: {
187
- noRecordHistory: true
188
- }
189
- }
11
+ layout: 'vertical'
190
12
  }
191
13
  ]
192
14
  },
@@ -50,17 +50,28 @@ const ArticleTitleSettings = [
50
50
  type: 'select',
51
51
  options: [
52
52
  {
53
- label: 'View article',
54
- value: true
53
+ label: 'Go to article',
54
+ value: 'go-to-article'
55
55
  },
56
56
  {
57
57
  label: 'None',
58
- value: false
58
+ value: 'scroll-to'
59
59
  }
60
60
  ],
61
- default: true,
61
+ default: 'go-to-article',
62
62
  info: 'Ability to click on article title to go to article detail page.'
63
63
  },
64
+ {
65
+ id: 'customURL',
66
+ label: 'Custom URL',
67
+ type: 'pick-link',
68
+ default: {
69
+ target: '_self',
70
+ type: 'scroll-to'
71
+ },
72
+ isHiddenOpenLinkSelect: true,
73
+ hide: true
74
+ },
64
75
  {
65
76
  id: 'openNewTab',
66
77
  type: 'segment',
@@ -106,6 +106,14 @@ const uiV2 = [
106
106
  id: 'linkArticle'
107
107
  }
108
108
  },
109
+ {
110
+ type: 'control',
111
+ conditionDisplay: "linkArticle === 'scroll-to'",
112
+ layout: 'vertical',
113
+ setting: {
114
+ id: 'customURL'
115
+ }
116
+ },
109
117
  {
110
118
  conditionDisplay: 'enableLink === true',
111
119
  label: {
@@ -1,8 +1,8 @@
1
1
  'use client';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { createStyle, createClass, If } from '@gem-sdk/system';
4
- import { composeContainerStyles, composeTextareaStyles } from './common/composeStyles.js';
5
- import { composeContainerClasses, composeTextFieldClasses, composeTextAreaClasses } from './common/composeClasses.js';
4
+ import { composeContainerStyles, composeTextareaStyles, getRowsTextArea } from './common/composeStyles.js';
5
+ import { composeContainerClasses, composeTextFieldClasses } from './common/composeClasses.js';
6
6
 
7
7
  const TextInput = ({ setting, builderProps, className, builderAttrs, advanced, children, styles })=>{
8
8
  const { text, name, placeholder, required, formType } = setting ?? {};
@@ -12,42 +12,37 @@ const TextInput = ({ setting, builderProps, className, builderAttrs, advanced, c
12
12
  const composedTextFieldClasses = createClass(composeTextFieldClasses(setting, builderProps, className ?? ''));
13
13
  const composedTextFieldStyles = createStyle(composeTextareaStyles(advanced, setting, styles));
14
14
  const composedTextAreaClasses = createClass({
15
- composedTextFieldClasses: true,
16
- ...composeTextAreaClasses()
15
+ composedTextFieldClasses: true
17
16
  });
17
+ const rowsTextArea = getRowsTextArea(setting);
18
18
  const isTextArea = formType === 'textarea';
19
- return /*#__PURE__*/ jsxs("div", {
19
+ return /*#__PURE__*/ jsx("div", {
20
20
  ...builderAttrs,
21
21
  "data-id": builderProps?.uid,
22
22
  className: composedContainerClasses,
23
23
  style: composedContainerStyles,
24
- children: [
25
- /*#__PURE__*/ jsx("span", {
26
- className: "gp-text-16 gp-text-[#121212]",
27
- children: placeholder
28
- }),
29
- /*#__PURE__*/ jsxs("div", {
30
- children: [
31
- If(!isTextArea, /*#__PURE__*/ jsx("input", {
32
- type: formType,
33
- className: composedTextFieldClasses,
34
- style: composedTextFieldStyles,
35
- placeholder: placeholder,
36
- required: required,
37
- name: defaultName,
38
- value: text
39
- }), /*#__PURE__*/ jsx("textarea", {
40
- className: composedTextAreaClasses,
41
- placeholder: placeholder,
42
- style: composedTextFieldStyles,
43
- required: required,
44
- name: defaultName,
45
- value: text
46
- })),
47
- children
48
- ]
49
- })
50
- ]
24
+ children: /*#__PURE__*/ jsxs("div", {
25
+ children: [
26
+ If(!isTextArea, /*#__PURE__*/ jsx("input", {
27
+ type: formType,
28
+ className: composedTextFieldClasses,
29
+ style: composedTextFieldStyles,
30
+ placeholder: placeholder,
31
+ required: required,
32
+ name: defaultName,
33
+ value: text
34
+ }), /*#__PURE__*/ jsx("textarea", {
35
+ rows: rowsTextArea,
36
+ className: composedTextAreaClasses,
37
+ placeholder: placeholder,
38
+ style: composedTextFieldStyles,
39
+ required: required,
40
+ name: defaultName,
41
+ value: text
42
+ })),
43
+ children
44
+ ]
45
+ })
51
46
  });
52
47
  };
53
48
 
@@ -1,8 +1,8 @@
1
1
  import { template } from '@gem-sdk/core';
2
2
  import { getDynamicSourceLocales } from '../../../helpers.js';
3
3
  import { createStyle, createClass, If } from '@gem-sdk/system';
4
- import { composeContainerStyles, composeTextareaStyles } from './common/composeStyles.js';
5
- import { composeContainerClasses, composeTextFieldClasses, composeTextAreaClasses } from './common/composeClasses.js';
4
+ import { composeContainerStyles, composeTextareaStyles, getRowsTextArea } from './common/composeStyles.js';
5
+ import { composeContainerClasses, composeTextFieldClasses } from './common/composeClasses.js';
6
6
 
7
7
  const TextInput = ({ setting, builderProps, className, builderAttrs, advanced, pageContext, styles })=>{
8
8
  const { text, name, placeholder, required, translate, formType } = setting ?? {};
@@ -19,9 +19,9 @@ const TextInput = ({ setting, builderProps, className, builderAttrs, advanced, p
19
19
  const composedTextFieldClasses = createClass(composeTextFieldClasses(setting, builderProps, className ?? ''));
20
20
  const composedTextFieldStyles = createStyle(composeTextareaStyles(advanced, setting, styles));
21
21
  const composedTextAreaClasses = createClass({
22
- composedTextFieldClasses: true,
23
- ...composeTextAreaClasses()
22
+ composedTextFieldClasses: true
24
23
  });
24
+ const rowsTextArea = getRowsTextArea(setting);
25
25
  const isTextArea = formType === 'textarea';
26
26
  return template`
27
27
  <div
@@ -30,7 +30,6 @@ const TextInput = ({ setting, builderProps, className, builderAttrs, advanced, p
30
30
  class="${composedContainerClasses}"
31
31
  style="${composedContainerStyles}"
32
32
  >
33
- <span class="gp-text-16 gp-text-[#121212]">${placeholder}</span>
34
33
  <div>
35
34
  ${If(!isTextArea, template`<input
36
35
  type="text"
@@ -41,6 +40,7 @@ const TextInput = ({ setting, builderProps, className, builderAttrs, advanced, p
41
40
  name="${defaultName}"
42
41
  value="${text}"
43
42
  ></input>`, template`<textarea
43
+ rows="${rowsTextArea}"
44
44
  class="${composedTextAreaClasses}"
45
45
  style="${composedTextFieldStyles}"
46
46
  placeholder="${placeholderVal}"
@@ -20,10 +20,5 @@ const composeTextFieldClasses = (setting, builderProps, className)=>{
20
20
  'gp-form-item !gp-outline-none focus:!gp-shadow-none hover:!gp-shadow-none !gp-bg-none !gp-border-box': true
21
21
  });
22
22
  };
23
- const composeTextAreaClasses = ()=>{
24
- return composeClasses({
25
- 'gp-min-h-[150px]': true
26
- });
27
- };
28
23
 
29
- export { composeContainerClasses, composeTextAreaClasses, composeTextFieldClasses };
24
+ export { composeContainerClasses, composeTextFieldClasses };
@@ -1,5 +1,5 @@
1
1
  import { filterTruthy } from '../../../helpers/common.js';
2
- import { composeAdvanceStyle, makeStyleResponsive, makeGlobalSize, composeTypographyStyle, getGlobalColorStyle, makeStyle, getSingleColorVariable, getBorderStyle, getBorderRadiusStyle, getStyleShadow } from '@gem-sdk/core';
2
+ import { composeAdvanceStyle, makeStyleResponsive, makeGlobalSize, composeTypographyStyle, getGlobalColorStyle, makeStyle, getSingleColorVariable, getBorderStyle, getBorderRadiusStyle, getStyleShadow, getStyleBackgroundByDevice, getGradientBgrStyleByDevice } from '@gem-sdk/core';
3
3
 
4
4
  const composeStyles = (styles)=>filterTruthy(styles);
5
5
  const composeContainerStyles = (advanced, setting)=>{
@@ -26,7 +26,7 @@ const composeContainerStyles = (advanced, setting)=>{
26
26
  const composeTextareaStyles = (advanced, setting, styles)=>{
27
27
  const { wrapperBorder, borderRadius, shadow, globalSize } = styles ?? {};
28
28
  const { border, rounded, hasBoxShadow, boxShadow } = advanced ?? {};
29
- const { typography } = setting ?? {};
29
+ const { typography, background } = setting ?? {};
30
30
  const composeGlobalSize = makeGlobalSize(globalSize);
31
31
  const appendTypoStyle = composeTypographyStyle(setting?.typo, typography);
32
32
  const inputStyle = composeAdvanceStyle({
@@ -58,8 +58,13 @@ const composeTextareaStyles = (advanced, setting, styles)=>{
58
58
  value: shadow,
59
59
  styleAppliedFor: 'box-shadow',
60
60
  isEnableShadow: shadow?.type !== 'none'
61
- })
61
+ }),
62
+ ...getStyleBackgroundByDevice(background),
63
+ ...getGradientBgrStyleByDevice(background)
62
64
  });
63
65
  };
66
+ const getRowsTextArea = (setting)=>{
67
+ return setting?.textLine;
68
+ };
64
69
 
65
- export { composeContainerStyles, composeTextareaStyles };
70
+ export { composeContainerStyles, composeTextareaStyles, getRowsTextArea };