@gem-sdk/components 2.0.0-dev.468 → 2.0.0-dev.470

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.
@@ -84,15 +84,10 @@ const ArticleDateSettings = [
84
84
  default: {
85
85
  type: 'subheading-3',
86
86
  custom: {
87
- lineHeight: {
88
- desktop: '120%',
89
- tablet: '120%',
90
- mobile: '120%'
91
- },
92
87
  letterSpacing: '0px'
93
88
  },
94
89
  attrs: {
95
- color: '#212121'
90
+ color: 'text-1'
96
91
  }
97
92
  },
98
93
  ignoreReRender: true
@@ -11,11 +11,12 @@ var system = require('@gem-sdk/system');
11
11
  var getAttr = require('./common/getAttr.js');
12
12
  var getStyle = require('./common/getStyle.js');
13
13
  var getClasses = require('./common/getClasses.js');
14
+ var ButtonIcon = require('../../button/components/ButtonIcon.js');
14
15
 
15
16
  const Dialog = (props)=>{
16
17
  const { setting, children, builderProps, style, advanced, builderAttrs } = props;
17
18
  const display = advanced?.d;
18
- const { name, fullScreen, width, height, position, overlayColor, overlayOpacity, iconSize, closeButtonPosition } = setting ?? {};
19
+ const { name, fullScreen, width, height, position, overlayColor, overlayOpacity, iconSize, closeButtonPosition, iconSvg } = setting ?? {};
19
20
  const mode = core.useEditorMode();
20
21
  const { ref, overlay, handleClickOverlay, closeModal, open, dialogId } = useDialog.useDialog(setting, builderProps, mode === 'edit');
21
22
  const enableEffect = open;
@@ -84,6 +85,9 @@ const Dialog = (props)=>{
84
85
  const svgContentStyle = system.createStyle({
85
86
  ...getStyle.getSvgContentStyle(iconSize)
86
87
  });
88
+ const svgContentClasses = system.createClass({
89
+ ...getClasses.getSvgContentClasses()
90
+ });
87
91
  const bodyContentStyle = system.createStyle({
88
92
  ...getStyle.getBodyContentStyle(setting, style)
89
93
  });
@@ -130,13 +134,12 @@ const Dialog = (props)=>{
130
134
  className: buttonContentClasses,
131
135
  style: buttonContentStyle,
132
136
  onClick: closeModal,
133
- children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
134
- viewBox: "0 0 12 12",
135
- fill: "currentColor",
136
- style: svgContentStyle,
137
- children: /*#__PURE__*/ jsxRuntime.jsx("path", {
138
- d: "M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"
139
- })
137
+ children: /*#__PURE__*/ jsxRuntime.jsx(ButtonIcon.default, {
138
+ iconSvg: iconSvg ?? `<svg viewBox="0 0 12 12" fill="currentColor" style={svgContentStyle}>
139
+ <path d="M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"></path>
140
+ </svg>`,
141
+ styles: svgContentStyle,
142
+ classes: svgContentClasses
140
143
  })
141
144
  }),
142
145
  /*#__PURE__*/ jsxRuntime.jsx("div", {
@@ -8,12 +8,13 @@ var getAttr = require('./common/getAttr.js');
8
8
  var getStyle = require('./common/getStyle.js');
9
9
  var getClasses = require('./common/getClasses.js');
10
10
  var helpers = require('../../helpers.js');
11
+ var ButtonIcon = require('../../button/components/ButtonIcon.js');
11
12
 
12
13
  const Dialog = (props)=>{
13
14
  const { setting, children, builderProps, style, advanced, builderAttrs } = props;
14
15
  const display = advanced?.d;
15
16
  const { frequency = 3, triggerPercentage = 0, trigger, triggerTime, frequencyMode = 'once', mobileTrigger, mobileTriggerTime, closeOnClickOutside } = setting ?? {};
16
- const { name, fullScreen, width, height, position, overlayColor, overlayOpacity, iconSize, closeButtonPosition } = setting ?? {};
17
+ const { name, fullScreen, width, height, position, overlayColor, overlayOpacity, iconSize, closeButtonPosition, iconSvg } = setting ?? {};
17
18
  const dialogId = setting?.dialogId ?? builderProps?.uid;
18
19
  const stateData = system.createStateOrContext({
19
20
  dialogId,
@@ -93,6 +94,9 @@ const Dialog = (props)=>{
93
94
  const svgContentStyle = system.createStyle({
94
95
  ...getStyle.getSvgContentStyle(iconSize)
95
96
  });
97
+ const svgContentClasses = system.createClass({
98
+ ...getClasses.getSvgContentClasses()
99
+ });
96
100
  const bodyContentStyle = system.createStyle({
97
101
  ...getStyle.getBodyContentStyle(setting, style)
98
102
  });
@@ -148,13 +152,13 @@ const Dialog = (props)=>{
148
152
  class="${buttonContentClasses}"
149
153
  style="${buttonContentStyle}"
150
154
  >
151
- <svg
152
- viewBox="0 0 12 12"
153
- fill="currentColor"
154
- style="${svgContentStyle}"
155
- >
156
- <path d="M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"></path>
157
- </svg>
155
+ ${ButtonIcon.default({
156
+ iconSvg: iconSvg ?? `<svg viewBox="0 0 12 12" fill="currentColor" style={svgContentStyle}>
157
+ <path d="M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"></path>
158
+ </svg>`,
159
+ styles: svgContentStyle,
160
+ classes: svgContentClasses
161
+ })}
158
162
  </button>
159
163
  <div
160
164
  aria-label="Dialog body"
@@ -65,6 +65,12 @@ const getButtonContentClasses = (closeButtonPosition)=>{
65
65
  ...composeClasses(classList)
66
66
  };
67
67
  };
68
+ const getSvgContentClasses = ()=>{
69
+ const classList = 'gp-h-[var(--height-icon)] gp-w-auto [&>svg]:!gp-h-full [&>svg]:!gp-w-full';
70
+ return {
71
+ ...composeClasses(classList)
72
+ };
73
+ };
68
74
  const getBodyContentClasses = ()=>{
69
75
  const classList = 'gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen';
70
76
  return {
@@ -79,3 +85,4 @@ exports.getContainClasses = getContainClasses;
79
85
  exports.getDialogContentClasses = getDialogContentClasses;
80
86
  exports.getHeadContentClasses = getHeadContentClasses;
81
87
  exports.getOverlayClasses = getOverlayClasses;
88
+ exports.getSvgContentClasses = getSvgContentClasses;
@@ -76,10 +76,7 @@ const getSvgContentStyle = (iconSize)=>{
76
76
  let composeStyles = {};
77
77
  if (iconSize) {
78
78
  composeStyles = {
79
- ...core.makeStyle({
80
- w: iconSize,
81
- h: iconSize
82
- })
79
+ '--height-icon': `${iconSize}`
83
80
  };
84
81
  }
85
82
  return filterTruthyStyles(composeStyles);
@@ -49,7 +49,7 @@ const DialogSettings = [
49
49
  value: 'vertical'
50
50
  },
51
51
  {
52
- label: '3d Unfold',
52
+ label: '3d unfold',
53
53
  value: 'unfold'
54
54
  },
55
55
  {
@@ -197,6 +197,16 @@ const DialogSettings = [
197
197
  type: 'input:stepper',
198
198
  default: 32
199
199
  },
200
+ {
201
+ id: 'iconSvg',
202
+ label: 'SVG Icon',
203
+ type: 'icon',
204
+ default: `
205
+ <svg viewBox="0 0 12 12" fill="currentColor">
206
+ <path d="M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"></path>
207
+ </svg>
208
+ `
209
+ },
200
210
  {
201
211
  id: 'btnWidth',
202
212
  type: 'input:unit',
@@ -226,6 +236,9 @@ const DialogSettings = [
226
236
  {
227
237
  id: 'btnPadding',
228
238
  type: 'padding-v2',
239
+ devices: {
240
+ desktop: {}
241
+ },
229
242
  compoDefaultValue: {
230
243
  desktop: {
231
244
  default: {
@@ -241,7 +254,7 @@ const DialogSettings = [
241
254
  {
242
255
  id: 'iconSize',
243
256
  type: 'input:stepper',
244
- default: '12px',
257
+ default: '16px',
245
258
  includeUnit: 'px'
246
259
  },
247
260
  // {
@@ -258,7 +271,7 @@ const DialogSettings = [
258
271
  {
259
272
  id: 'btnColor',
260
273
  type: 'color-picker-v2',
261
- default: 'line-3'
274
+ default: 'text-1'
262
275
  },
263
276
  {
264
277
  id: 'trigger',
@@ -21,6 +21,14 @@ const SettingUIV2 = [
21
21
  en: 'Button close'
22
22
  },
23
23
  controls: [
24
+ {
25
+ label: {
26
+ en: 'Icon'
27
+ },
28
+ setting: {
29
+ id: 'iconSvg'
30
+ }
31
+ },
24
32
  {
25
33
  label: {
26
34
  en: 'Icon size'
@@ -106,18 +114,18 @@ const SettingUIV2 = [
106
114
  },
107
115
  {
108
116
  label: {
109
- en: 'Click to close'
117
+ en: 'Opacity'
110
118
  },
111
119
  setting: {
112
- id: 'closeOnClickOutside'
120
+ id: 'overlayOpacity'
113
121
  }
114
122
  },
115
123
  {
116
124
  label: {
117
- en: 'Opacity'
125
+ en: 'Click to close'
118
126
  },
119
127
  setting: {
120
- id: 'overlayOpacity'
128
+ id: 'closeOnClickOutside'
121
129
  }
122
130
  }
123
131
  ]
@@ -275,6 +275,7 @@ const ProductProperties = ({ setting, styles, builderProps })=>{
275
275
  name,
276
276
  handleChange
277
277
  },
278
+ currentProductId: currentProductId,
278
279
  styles: styles,
279
280
  defaultName: builderProps?.uid
280
281
  }),
@@ -10,11 +10,11 @@ var getProductPropertiesChoiceStyles = require('./common/getProductPropertiesCho
10
10
  var getProductPropertiesChoiceInlineCss = require('./common/getProductPropertiesChoiceInlineCss.js');
11
11
  var system = require('@gem-sdk/system');
12
12
 
13
- const ProductPropertyChoice = ({ setting, styles, defaultName })=>{
13
+ const ProductPropertyChoice = ({ setting, styles, defaultName, currentProductId })=>{
14
14
  const uniqId = core.useUniqProductID();
15
15
  const { name, type, handleChange, childItem } = setting ?? {};
16
16
  const { specialValueTextColor } = styles ?? {};
17
- const inputName = name || defaultName;
17
+ const inputName = `${(name || defaultName) ?? ''}-${currentProductId}`;
18
18
  const activeChoiceCss = getProductPropertiesChoiceInlineCss.getPPCInlineStyleChoice(defaultName, specialValueTextColor);
19
19
  const wrapperClasses = system.createClass({
20
20
  ...getProductPropertiesChoiceClasses.getPPCWrapperClasses()
@@ -82,15 +82,10 @@ const ArticleDateSettings = [
82
82
  default: {
83
83
  type: 'subheading-3',
84
84
  custom: {
85
- lineHeight: {
86
- desktop: '120%',
87
- tablet: '120%',
88
- mobile: '120%'
89
- },
90
85
  letterSpacing: '0px'
91
86
  },
92
87
  attrs: {
93
- color: '#212121'
88
+ color: 'text-1'
94
89
  }
95
90
  },
96
91
  ignoreReRender: true
@@ -6,12 +6,13 @@ import { useDialog } from './hooks/useDialog.js';
6
6
  import { createAttr, createStyle, createClass, If } from '@gem-sdk/system';
7
7
  import { getAttr, getAttrContainer, getAttrOverlay, getAttrClose } from './common/getAttr.js';
8
8
  import { getWrapperStyle, getContainStyle, getBackdropStyle, getOverlayStyle, getDialogContentStyle, getButtonContentStyle, getSvgContentStyle, getBodyContentStyle } from './common/getStyle.js';
9
- import { getContainClasses, getBackdropClasses, getOverlayClasses, getDialogContentClasses, getHeadContentClasses, getButtonContentClasses, getBodyContentClasses } from './common/getClasses.js';
9
+ import { getContainClasses, getBackdropClasses, getOverlayClasses, getDialogContentClasses, getHeadContentClasses, getButtonContentClasses, getSvgContentClasses, getBodyContentClasses } from './common/getClasses.js';
10
+ import ButtonIcon from '../../button/components/ButtonIcon.js';
10
11
 
11
12
  const Dialog = (props)=>{
12
13
  const { setting, children, builderProps, style, advanced, builderAttrs } = props;
13
14
  const display = advanced?.d;
14
- const { name, fullScreen, width, height, position, overlayColor, overlayOpacity, iconSize, closeButtonPosition } = setting ?? {};
15
+ const { name, fullScreen, width, height, position, overlayColor, overlayOpacity, iconSize, closeButtonPosition, iconSvg } = setting ?? {};
15
16
  const mode = useEditorMode();
16
17
  const { ref, overlay, handleClickOverlay, closeModal, open, dialogId } = useDialog(setting, builderProps, mode === 'edit');
17
18
  const enableEffect = open;
@@ -80,6 +81,9 @@ const Dialog = (props)=>{
80
81
  const svgContentStyle = createStyle({
81
82
  ...getSvgContentStyle(iconSize)
82
83
  });
84
+ const svgContentClasses = createClass({
85
+ ...getSvgContentClasses()
86
+ });
83
87
  const bodyContentStyle = createStyle({
84
88
  ...getBodyContentStyle(setting, style)
85
89
  });
@@ -126,13 +130,12 @@ const Dialog = (props)=>{
126
130
  className: buttonContentClasses,
127
131
  style: buttonContentStyle,
128
132
  onClick: closeModal,
129
- children: /*#__PURE__*/ jsx("svg", {
130
- viewBox: "0 0 12 12",
131
- fill: "currentColor",
132
- style: svgContentStyle,
133
- children: /*#__PURE__*/ jsx("path", {
134
- d: "M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"
135
- })
133
+ children: /*#__PURE__*/ jsx(ButtonIcon, {
134
+ iconSvg: iconSvg ?? `<svg viewBox="0 0 12 12" fill="currentColor" style={svgContentStyle}>
135
+ <path d="M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"></path>
136
+ </svg>`,
137
+ styles: svgContentStyle,
138
+ classes: svgContentClasses
136
139
  })
137
140
  }),
138
141
  /*#__PURE__*/ jsx("div", {
@@ -2,14 +2,15 @@ import { template, RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
2
2
  import { createStateOrContext, createAttr, createStyle, createClass, If } from '@gem-sdk/system';
3
3
  import { getAttr, getAttrContainer, getAttrOverlay, getAttrClose } from './common/getAttr.js';
4
4
  import { getWrapperStyle, getContainStyle, getBackdropStyle, getOverlayStyle, getDialogContentStyle, getButtonContentStyle, getSvgContentStyle, getBodyContentStyle } from './common/getStyle.js';
5
- import { getContainClasses, getBackdropClasses, getOverlayClasses, getDialogContentClasses, getHeadContentClasses, getButtonContentClasses, getBodyContentClasses } from './common/getClasses.js';
5
+ import { getContainClasses, getBackdropClasses, getOverlayClasses, getDialogContentClasses, getHeadContentClasses, getButtonContentClasses, getSvgContentClasses, getBodyContentClasses } from './common/getClasses.js';
6
6
  import { getSettingPreloadData } from '../../helpers.js';
7
+ import ButtonIcon from '../../button/components/ButtonIcon.js';
7
8
 
8
9
  const Dialog = (props)=>{
9
10
  const { setting, children, builderProps, style, advanced, builderAttrs } = props;
10
11
  const display = advanced?.d;
11
12
  const { frequency = 3, triggerPercentage = 0, trigger, triggerTime, frequencyMode = 'once', mobileTrigger, mobileTriggerTime, closeOnClickOutside } = setting ?? {};
12
- const { name, fullScreen, width, height, position, overlayColor, overlayOpacity, iconSize, closeButtonPosition } = setting ?? {};
13
+ const { name, fullScreen, width, height, position, overlayColor, overlayOpacity, iconSize, closeButtonPosition, iconSvg } = setting ?? {};
13
14
  const dialogId = setting?.dialogId ?? builderProps?.uid;
14
15
  const stateData = createStateOrContext({
15
16
  dialogId,
@@ -89,6 +90,9 @@ const Dialog = (props)=>{
89
90
  const svgContentStyle = createStyle({
90
91
  ...getSvgContentStyle(iconSize)
91
92
  });
93
+ const svgContentClasses = createClass({
94
+ ...getSvgContentClasses()
95
+ });
92
96
  const bodyContentStyle = createStyle({
93
97
  ...getBodyContentStyle(setting, style)
94
98
  });
@@ -144,13 +148,13 @@ const Dialog = (props)=>{
144
148
  class="${buttonContentClasses}"
145
149
  style="${buttonContentStyle}"
146
150
  >
147
- <svg
148
- viewBox="0 0 12 12"
149
- fill="currentColor"
150
- style="${svgContentStyle}"
151
- >
152
- <path d="M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"></path>
153
- </svg>
151
+ ${ButtonIcon({
152
+ iconSvg: iconSvg ?? `<svg viewBox="0 0 12 12" fill="currentColor" style={svgContentStyle}>
153
+ <path d="M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"></path>
154
+ </svg>`,
155
+ styles: svgContentStyle,
156
+ classes: svgContentClasses
157
+ })}
154
158
  </button>
155
159
  <div
156
160
  aria-label="Dialog body"
@@ -63,6 +63,12 @@ const getButtonContentClasses = (closeButtonPosition)=>{
63
63
  ...composeClasses(classList)
64
64
  };
65
65
  };
66
+ const getSvgContentClasses = ()=>{
67
+ const classList = 'gp-h-[var(--height-icon)] gp-w-auto [&>svg]:!gp-h-full [&>svg]:!gp-w-full';
68
+ return {
69
+ ...composeClasses(classList)
70
+ };
71
+ };
66
72
  const getBodyContentClasses = ()=>{
67
73
  const classList = 'gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen';
68
74
  return {
@@ -70,4 +76,4 @@ const getBodyContentClasses = ()=>{
70
76
  };
71
77
  };
72
78
 
73
- export { getBackdropClasses, getBodyContentClasses, getButtonContentClasses, getContainClasses, getDialogContentClasses, getHeadContentClasses, getOverlayClasses };
79
+ export { getBackdropClasses, getBodyContentClasses, getButtonContentClasses, getContainClasses, getDialogContentClasses, getHeadContentClasses, getOverlayClasses, getSvgContentClasses };
@@ -74,10 +74,7 @@ const getSvgContentStyle = (iconSize)=>{
74
74
  let composeStyles = {};
75
75
  if (iconSize) {
76
76
  composeStyles = {
77
- ...makeStyle({
78
- w: iconSize,
79
- h: iconSize
80
- })
77
+ '--height-icon': `${iconSize}`
81
78
  };
82
79
  }
83
80
  return filterTruthyStyles(composeStyles);
@@ -47,7 +47,7 @@ const DialogSettings = [
47
47
  value: 'vertical'
48
48
  },
49
49
  {
50
- label: '3d Unfold',
50
+ label: '3d unfold',
51
51
  value: 'unfold'
52
52
  },
53
53
  {
@@ -195,6 +195,16 @@ const DialogSettings = [
195
195
  type: 'input:stepper',
196
196
  default: 32
197
197
  },
198
+ {
199
+ id: 'iconSvg',
200
+ label: 'SVG Icon',
201
+ type: 'icon',
202
+ default: `
203
+ <svg viewBox="0 0 12 12" fill="currentColor">
204
+ <path d="M7.1,6l4.5,4.5l-1.1,1.1L6,7.1l-4.5,4.5l-1.1-1.1L4.9,6L0.5,1.5l1.1-1.1L6,4.9l4.5-4.5l1.1,1.1L7.1,6z"></path>
205
+ </svg>
206
+ `
207
+ },
198
208
  {
199
209
  id: 'btnWidth',
200
210
  type: 'input:unit',
@@ -224,6 +234,9 @@ const DialogSettings = [
224
234
  {
225
235
  id: 'btnPadding',
226
236
  type: 'padding-v2',
237
+ devices: {
238
+ desktop: {}
239
+ },
227
240
  compoDefaultValue: {
228
241
  desktop: {
229
242
  default: {
@@ -239,7 +252,7 @@ const DialogSettings = [
239
252
  {
240
253
  id: 'iconSize',
241
254
  type: 'input:stepper',
242
- default: '12px',
255
+ default: '16px',
243
256
  includeUnit: 'px'
244
257
  },
245
258
  // {
@@ -256,7 +269,7 @@ const DialogSettings = [
256
269
  {
257
270
  id: 'btnColor',
258
271
  type: 'color-picker-v2',
259
- default: 'line-3'
272
+ default: 'text-1'
260
273
  },
261
274
  {
262
275
  id: 'trigger',
@@ -19,6 +19,14 @@ const SettingUIV2 = [
19
19
  en: 'Button close'
20
20
  },
21
21
  controls: [
22
+ {
23
+ label: {
24
+ en: 'Icon'
25
+ },
26
+ setting: {
27
+ id: 'iconSvg'
28
+ }
29
+ },
22
30
  {
23
31
  label: {
24
32
  en: 'Icon size'
@@ -104,18 +112,18 @@ const SettingUIV2 = [
104
112
  },
105
113
  {
106
114
  label: {
107
- en: 'Click to close'
115
+ en: 'Opacity'
108
116
  },
109
117
  setting: {
110
- id: 'closeOnClickOutside'
118
+ id: 'overlayOpacity'
111
119
  }
112
120
  },
113
121
  {
114
122
  label: {
115
- en: 'Opacity'
123
+ en: 'Click to close'
116
124
  },
117
125
  setting: {
118
- id: 'overlayOpacity'
126
+ id: 'closeOnClickOutside'
119
127
  }
120
128
  }
121
129
  ]
@@ -271,6 +271,7 @@ const ProductProperties = ({ setting, styles, builderProps })=>{
271
271
  name,
272
272
  handleChange
273
273
  },
274
+ currentProductId: currentProductId,
274
275
  styles: styles,
275
276
  defaultName: builderProps?.uid
276
277
  }),
@@ -6,11 +6,11 @@ import { getPPCWrapperStyles, getPPCContainerStyles, getPPCLabelStyles } from '.
6
6
  import { getPPCInlineStyleChoice } from './common/getProductPropertiesChoiceInlineCss.js';
7
7
  import { createClass, createStyle } from '@gem-sdk/system';
8
8
 
9
- const ProductPropertyChoice = ({ setting, styles, defaultName })=>{
9
+ const ProductPropertyChoice = ({ setting, styles, defaultName, currentProductId })=>{
10
10
  const uniqId = useUniqProductID();
11
11
  const { name, type, handleChange, childItem } = setting ?? {};
12
12
  const { specialValueTextColor } = styles ?? {};
13
- const inputName = name || defaultName;
13
+ const inputName = `${(name || defaultName) ?? ''}-${currentProductId}`;
14
14
  const activeChoiceCss = getPPCInlineStyleChoice(defaultName, specialValueTextColor);
15
15
  const wrapperClasses = createClass({
16
16
  ...getPPCWrapperClasses()
@@ -1404,6 +1404,7 @@ type Setting$2 = {
1404
1404
  btnPadding?: ObjectDevices$1<PaddingType$1>;
1405
1405
  background?: ObjectDevices$1<BackgroundMedia>;
1406
1406
  iconSize?: string;
1407
+ iconSvg?: string;
1407
1408
  effectType?: 'fade' | 'zoom' | 'zoom-out' | 'horizontal' | 'vertical' | 'unfold' | 'none';
1408
1409
  position?: 'center' | 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left';
1409
1410
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.468",
3
+ "version": "2.0.0-dev.470",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",