@gem-sdk/components 2.0.0-dev.609 → 2.0.0-dev.611

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.
@@ -17,6 +17,7 @@ var index = require('./common/index.js');
17
17
  const AccordionItem = (props)=>{
18
18
  const { children, index: index$1, parentUid, title, childrenIcon } = props;
19
19
  const { iconSvg, titleTypo, layoutHeader, iconGlobalSize, iconCollapseSize, iconCollapse, iconExpand, alignment, configIconSize, iconPosition } = index.getParentSettings(props.parentSetting) ?? {};
20
+ console.log('titleTypo', titleTypo);
20
21
  const { refContainer, getIdDropdownItem, makeIcon, isShow, uniqueId, composeIconColor, isRenderChildren, composeContentSizeStyle, hasTransitionedIn, isMounted, productID } = useAccordionItem.default(props);
21
22
  const composeContainerClasses = system.createClass(classes.getItemContainerClasses);
22
23
  const composeDropdownClasses = system.createClass(classes.getDropdownClasses(props.parentStyle, {
@@ -44,7 +45,7 @@ const AccordionItem = (props)=>{
44
45
  const composeGapStyles = system.createStyle(styles.getGapStyles(iconGlobalSize, alignment));
45
46
  const inlineFlexClass = system.createClass(core.composeClasses('gp-inline-flex'));
46
47
  const composeLayoutIconClasses = system.createClass(classes.getLayoutIconClasses);
47
- const composeLayoutTextStyles = system.createStyle(styles.getLayoutTextStyles(composeIconColor, configIconSize));
48
+ const composeLayoutIconStyles = system.createStyle(styles.getIconStyles(composeIconColor, configIconSize));
48
49
  const composeRenderChildrenClasses = system.createClass(classes.getRenderChildrenClasses(props.parentStyle, {
49
50
  isShow,
50
51
  hasTransitionedIn,
@@ -99,7 +100,7 @@ const AccordionItem = (props)=>{
99
100
  },
100
101
  children: /*#__PURE__*/ jsxRuntime.jsx("span", {
101
102
  className: composeLayoutIconClasses,
102
- style: composeLayoutTextStyles,
103
+ style: composeLayoutIconStyles,
103
104
  dangerouslySetInnerHTML: {
104
105
  __html: childrenIcon ?? ''
105
106
  }
@@ -128,7 +129,7 @@ const AccordionItem = (props)=>{
128
129
  },
129
130
  children: /*#__PURE__*/ jsxRuntime.jsx("span", {
130
131
  className: composeLayoutIconClasses,
131
- style: composeLayoutTextStyles,
132
+ style: composeLayoutIconStyles,
132
133
  dangerouslySetInnerHTML: {
133
134
  __html: childrenIcon ?? ''
134
135
  }
@@ -39,7 +39,7 @@ const AccordionItem = (props)=>{
39
39
  const composeGapStyles = system.createStyle(styles.getGapStyles(iconGlobalSize, alignment));
40
40
  const inlineFlexClass = system.createClass(core.composeClasses('gp-inline-flex'));
41
41
  const composeLayoutIconClasses = system.createClass(classes.getLayoutIconClasses);
42
- const composeLayoutTextStyles = system.createStyle(styles.getLayoutTextStyles(composeIconColor, configIconSize));
42
+ const composeLayoutIconStyles = system.createStyle(styles.getIconStyles(composeIconColor, configIconSize));
43
43
  const composeRenderChildrenClasses = system.createClass(classes.getRenderChildrenClasses(props.parentStyle, {
44
44
  isShow,
45
45
  hasTransitionedIn: false,
@@ -79,7 +79,7 @@ const AccordionItem = (props)=>{
79
79
  }}">
80
80
  <span
81
81
  class="${composeLayoutIconClasses}"
82
- style="${composeLayoutTextStyles}">
82
+ style="${composeLayoutIconStyles}">
83
83
  ${childrenIcon ?? ''}</span>
84
84
  </div>
85
85
  `)}
@@ -101,7 +101,7 @@ const AccordionItem = (props)=>{
101
101
  }}">
102
102
  <span
103
103
  class="${composeLayoutIconClasses}"
104
- style="${composeLayoutTextStyles}">
104
+ style="${composeLayoutIconStyles}">
105
105
  ${childrenIcon ?? ''}</span>
106
106
  </div>
107
107
  `)}
@@ -65,7 +65,6 @@ const composePosition = (iconPosition)=>{
65
65
  const getDropdownStyles = (styles, extraData)=>{
66
66
  const { headerContentPadding, widthHeightSize, itemHeaderSpacing, bgColor, textColor, headerBorder } = styles ?? {};
67
67
  const { isShow, iconPosition } = extraData ?? {};
68
- console.log('handleConvertBorderWidth(headerBorder)', core.handleConvertBorderWidth(headerBorder));
69
68
  return {
70
69
  ...headerContentPadding && headerContentPaddingSize(headerContentPadding).padding,
71
70
  ...!itemHeaderSpacing?.type && !headerContentPadding ? core.composeSize(itemHeaderSpacing?.custom) : {},
@@ -106,7 +105,7 @@ const getGapStyles = (iconGlobalSize, alignment)=>{
106
105
  ...core.makeStyleResponsive('jc', alignment)
107
106
  };
108
107
  };
109
- const getLayoutTextStyles = (composeIconColor, configIconSize)=>{
108
+ const getIconStyles = (composeIconColor, configIconSize)=>{
110
109
  const size = configIconSize ? `${configIconSize}px` : '16px';
111
110
  return {
112
111
  ...composeIconColor,
@@ -132,7 +131,7 @@ exports.getDropdownStyles = getDropdownStyles;
132
131
  exports.getGapStyles = getGapStyles;
133
132
  exports.getIconGlobalSize = getIconGlobalSize;
134
133
  exports.getIconRotateStyles = getIconRotateStyles;
134
+ exports.getIconStyles = getIconStyles;
135
135
  exports.getItemContainerStyles = getItemContainerStyles;
136
- exports.getLayoutTextStyles = getLayoutTextStyles;
137
136
  exports.getRenderChildrenStyles = getRenderChildrenStyles;
138
137
  exports.getTemplateRow = getTemplateRow;
@@ -56,8 +56,7 @@ const config = {
56
56
  ],
57
57
  layoutHeader: 'text-only'
58
58
  },
59
- styles: {
60
- },
59
+ styles: {},
61
60
  advanced: {
62
61
  margin: {
63
62
  bottom: 'var(--g-s-l)'
@@ -178,18 +177,18 @@ const config = {
178
177
  layoutHeader: 'before-text'
179
178
  },
180
179
  styles: {
181
- bgColor: {
182
- normal: '#333333'
183
- },
184
- iconColor: {
185
- normal: '#EAEAEA'
186
- },
187
- textColor: {
188
- normal: '#EAEAEA'
189
- },
190
- color: {
191
- normal: '#EAEAEA'
192
- },
180
+ // bgColor: {
181
+ // normal: '#333333',
182
+ // },
183
+ // iconColor: {
184
+ // normal: '#EAEAEA',
185
+ // },
186
+ // textColor: {
187
+ // normal: '#EAEAEA',
188
+ // },
189
+ // color: {
190
+ // normal: '#EAEAEA',
191
+ // },
193
192
  itemGap: '16px'
194
193
  },
195
194
  advanced: {
@@ -351,7 +351,9 @@ const AccordionSettings = [
351
351
  type: 'color-picker-v2',
352
352
  label: 'Text color',
353
353
  default: {
354
- normal: '#121212'
354
+ normal: 'text-1',
355
+ hover: '#ffffff',
356
+ active: '#ffffff'
355
357
  },
356
358
  state: {
357
359
  hover: true,
@@ -364,7 +366,9 @@ const AccordionSettings = [
364
366
  type: 'color-picker-v2',
365
367
  label: 'Collapsible icon color',
366
368
  default: {
367
- normal: '#121212'
369
+ normal: 'text-1',
370
+ hover: '#ffffff',
371
+ active: '#ffffff'
368
372
  },
369
373
  state: {
370
374
  hover: true,
@@ -377,7 +381,9 @@ const AccordionSettings = [
377
381
  type: 'color-picker-v2',
378
382
  label: 'Collapsible icon color',
379
383
  default: {
380
- normal: '#121212'
384
+ normal: 'text-1',
385
+ hover: '#ffffff',
386
+ active: '#ffffff'
381
387
  },
382
388
  state: {
383
389
  hover: true,
@@ -390,7 +396,9 @@ const AccordionSettings = [
390
396
  type: 'color-picker-v2',
391
397
  label: 'Background Color',
392
398
  default: {
393
- normal: '#ffffff'
399
+ normal: '#121212',
400
+ hover: '#121212',
401
+ active: '#121212'
394
402
  },
395
403
  state: {
396
404
  hover: true,
@@ -20,7 +20,7 @@ const ProductPricePreset = [
20
20
  styles: {
21
21
  typo: {
22
22
  default: {
23
- type: 'subheading-2'
23
+ type: 'paragraph-1'
24
24
  }
25
25
  }
26
26
  },
@@ -58,7 +58,7 @@ const ProductPricePreset = [
58
58
  styles: {
59
59
  typo: {
60
60
  default: {
61
- type: 'subheading-2'
61
+ type: 'paragraph-1'
62
62
  }
63
63
  },
64
64
  color: {
@@ -6,13 +6,14 @@ import ChildrenDroppable from '../../grid/components/ChildrenDroppable.js';
6
6
  import Text from '../../text/components/Text.js';
7
7
  import useAccordionItem from '../hooks/useAccordionItem.js';
8
8
  import { createClass, createStyle, If } from '@gem-sdk/system';
9
- import { getItemContainerStyles, getDropdownStyles, getIconRotateStyles, getIconGlobalSize, getGapStyles, getLayoutTextStyles, getRenderChildrenStyles } from './common/styles.js';
9
+ import { getItemContainerStyles, getDropdownStyles, getIconRotateStyles, getIconGlobalSize, getGapStyles, getIconStyles, getRenderChildrenStyles } from './common/styles.js';
10
10
  import { getItemContainerClasses, getDropdownClasses, getIconClasses, getIconRotateClasses, getContentClasses, getGapClasses, getLayoutIconClasses, getRenderChildrenClasses } from './common/classes.js';
11
11
  import { getParentSettings, MINIMUM_CHILD, BODY_CHILD_INDEX } from './common/index.js';
12
12
 
13
13
  const AccordionItem = (props)=>{
14
14
  const { children, index, parentUid, title, childrenIcon } = props;
15
15
  const { iconSvg, titleTypo, layoutHeader, iconGlobalSize, iconCollapseSize, iconCollapse, iconExpand, alignment, configIconSize, iconPosition } = getParentSettings(props.parentSetting) ?? {};
16
+ console.log('titleTypo', titleTypo);
16
17
  const { refContainer, getIdDropdownItem, makeIcon, isShow, uniqueId, composeIconColor, isRenderChildren, composeContentSizeStyle, hasTransitionedIn, isMounted, productID } = useAccordionItem(props);
17
18
  const composeContainerClasses = createClass(getItemContainerClasses);
18
19
  const composeDropdownClasses = createClass(getDropdownClasses(props.parentStyle, {
@@ -40,7 +41,7 @@ const AccordionItem = (props)=>{
40
41
  const composeGapStyles = createStyle(getGapStyles(iconGlobalSize, alignment));
41
42
  const inlineFlexClass = createClass(composeClasses('gp-inline-flex'));
42
43
  const composeLayoutIconClasses = createClass(getLayoutIconClasses);
43
- const composeLayoutTextStyles = createStyle(getLayoutTextStyles(composeIconColor, configIconSize));
44
+ const composeLayoutIconStyles = createStyle(getIconStyles(composeIconColor, configIconSize));
44
45
  const composeRenderChildrenClasses = createClass(getRenderChildrenClasses(props.parentStyle, {
45
46
  isShow,
46
47
  hasTransitionedIn,
@@ -95,7 +96,7 @@ const AccordionItem = (props)=>{
95
96
  },
96
97
  children: /*#__PURE__*/ jsx("span", {
97
98
  className: composeLayoutIconClasses,
98
- style: composeLayoutTextStyles,
99
+ style: composeLayoutIconStyles,
99
100
  dangerouslySetInnerHTML: {
100
101
  __html: childrenIcon ?? ''
101
102
  }
@@ -124,7 +125,7 @@ const AccordionItem = (props)=>{
124
125
  },
125
126
  children: /*#__PURE__*/ jsx("span", {
126
127
  className: composeLayoutIconClasses,
127
- style: composeLayoutTextStyles,
128
+ style: composeLayoutIconStyles,
128
129
  dangerouslySetInnerHTML: {
129
130
  __html: childrenIcon ?? ''
130
131
  }
@@ -3,7 +3,7 @@ import Text from '../../text/components/Text.liquid.js';
3
3
  import { getParentSettings, getSettingItemLiquid, MINIMUM_CHILD, BODY_CHILD_INDEX } from './common/index.js';
4
4
  import { createClass, createStyle, If } from '@gem-sdk/system';
5
5
  import { getItemContainerClasses, getDropdownClasses, getIconClasses, getIconRotateClasses, getContentClasses, getGapClasses, getLayoutIconClasses, getRenderChildrenClasses } from './common/classes.js';
6
- import { getIconGlobalSize, getItemContainerStyles, getDropdownStyles, getIconRotateStyles, getGapStyles, getLayoutTextStyles, getTemplateRow, getRenderChildrenStyles } from './common/styles.js';
6
+ import { getIconGlobalSize, getItemContainerStyles, getDropdownStyles, getIconRotateStyles, getGapStyles, getIconStyles, getTemplateRow, getRenderChildrenStyles } from './common/styles.js';
7
7
 
8
8
  const AccordionItem = (props)=>{
9
9
  const { parentUid, childrenIcon, rawChildren, index, builderProps, title } = props;
@@ -35,7 +35,7 @@ const AccordionItem = (props)=>{
35
35
  const composeGapStyles = createStyle(getGapStyles(iconGlobalSize, alignment));
36
36
  const inlineFlexClass = createClass(composeClasses('gp-inline-flex'));
37
37
  const composeLayoutIconClasses = createClass(getLayoutIconClasses);
38
- const composeLayoutTextStyles = createStyle(getLayoutTextStyles(composeIconColor, configIconSize));
38
+ const composeLayoutIconStyles = createStyle(getIconStyles(composeIconColor, configIconSize));
39
39
  const composeRenderChildrenClasses = createClass(getRenderChildrenClasses(props.parentStyle, {
40
40
  isShow,
41
41
  hasTransitionedIn: false,
@@ -75,7 +75,7 @@ const AccordionItem = (props)=>{
75
75
  }}">
76
76
  <span
77
77
  class="${composeLayoutIconClasses}"
78
- style="${composeLayoutTextStyles}">
78
+ style="${composeLayoutIconStyles}">
79
79
  ${childrenIcon ?? ''}</span>
80
80
  </div>
81
81
  `)}
@@ -97,7 +97,7 @@ const AccordionItem = (props)=>{
97
97
  }}">
98
98
  <span
99
99
  class="${composeLayoutIconClasses}"
100
- style="${composeLayoutTextStyles}">
100
+ style="${composeLayoutIconStyles}">
101
101
  ${childrenIcon ?? ''}</span>
102
102
  </div>
103
103
  `)}
@@ -1,4 +1,4 @@
1
- import { getStyleBackgroundByDevice, makeStyle, getSingleColorVariable, makeStyleResponsive, getStyleShadow, getRadiusStyleActiveState, handleConvertBorderWidth, composeSize, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderColor, makeGlobalSize, makeWidth } from '@gem-sdk/core';
1
+ import { getStyleBackgroundByDevice, makeStyle, getSingleColorVariable, makeStyleResponsive, getStyleShadow, getRadiusStyleActiveState, composeSize, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, makeGlobalSize, makeWidth } from '@gem-sdk/core';
2
2
 
3
3
  const filterStyles = (style)=>{
4
4
  const delList = [
@@ -63,7 +63,6 @@ const composePosition = (iconPosition)=>{
63
63
  const getDropdownStyles = (styles, extraData)=>{
64
64
  const { headerContentPadding, widthHeightSize, itemHeaderSpacing, bgColor, textColor, headerBorder } = styles ?? {};
65
65
  const { isShow, iconPosition } = extraData ?? {};
66
- console.log('handleConvertBorderWidth(headerBorder)', handleConvertBorderWidth(headerBorder));
67
66
  return {
68
67
  ...headerContentPadding && headerContentPaddingSize(headerContentPadding).padding,
69
68
  ...!itemHeaderSpacing?.type && !headerContentPadding ? composeSize(itemHeaderSpacing?.custom) : {},
@@ -104,7 +103,7 @@ const getGapStyles = (iconGlobalSize, alignment)=>{
104
103
  ...makeStyleResponsive('jc', alignment)
105
104
  };
106
105
  };
107
- const getLayoutTextStyles = (composeIconColor, configIconSize)=>{
106
+ const getIconStyles = (composeIconColor, configIconSize)=>{
108
107
  const size = configIconSize ? `${configIconSize}px` : '16px';
109
108
  return {
110
109
  ...composeIconColor,
@@ -125,4 +124,4 @@ const getRenderChildrenStyles = ()=>{
125
124
  };
126
125
  const getIconGlobalSize = (iconGlobalSize)=>makeGlobalSize(iconGlobalSize)?.padding;
127
126
 
128
- export { getContainerStyles, getDropdownStyles, getGapStyles, getIconGlobalSize, getIconRotateStyles, getItemContainerStyles, getLayoutTextStyles, getRenderChildrenStyles, getTemplateRow };
127
+ export { getContainerStyles, getDropdownStyles, getGapStyles, getIconGlobalSize, getIconRotateStyles, getIconStyles, getItemContainerStyles, getRenderChildrenStyles, getTemplateRow };
@@ -52,8 +52,7 @@ const config = {
52
52
  ],
53
53
  layoutHeader: 'text-only'
54
54
  },
55
- styles: {
56
- },
55
+ styles: {},
57
56
  advanced: {
58
57
  margin: {
59
58
  bottom: 'var(--g-s-l)'
@@ -174,18 +173,18 @@ const config = {
174
173
  layoutHeader: 'before-text'
175
174
  },
176
175
  styles: {
177
- bgColor: {
178
- normal: '#333333'
179
- },
180
- iconColor: {
181
- normal: '#EAEAEA'
182
- },
183
- textColor: {
184
- normal: '#EAEAEA'
185
- },
186
- color: {
187
- normal: '#EAEAEA'
188
- },
176
+ // bgColor: {
177
+ // normal: '#333333',
178
+ // },
179
+ // iconColor: {
180
+ // normal: '#EAEAEA',
181
+ // },
182
+ // textColor: {
183
+ // normal: '#EAEAEA',
184
+ // },
185
+ // color: {
186
+ // normal: '#EAEAEA',
187
+ // },
189
188
  itemGap: '16px'
190
189
  },
191
190
  advanced: {
@@ -349,7 +349,9 @@ const AccordionSettings = [
349
349
  type: 'color-picker-v2',
350
350
  label: 'Text color',
351
351
  default: {
352
- normal: '#121212'
352
+ normal: 'text-1',
353
+ hover: '#ffffff',
354
+ active: '#ffffff'
353
355
  },
354
356
  state: {
355
357
  hover: true,
@@ -362,7 +364,9 @@ const AccordionSettings = [
362
364
  type: 'color-picker-v2',
363
365
  label: 'Collapsible icon color',
364
366
  default: {
365
- normal: '#121212'
367
+ normal: 'text-1',
368
+ hover: '#ffffff',
369
+ active: '#ffffff'
366
370
  },
367
371
  state: {
368
372
  hover: true,
@@ -375,7 +379,9 @@ const AccordionSettings = [
375
379
  type: 'color-picker-v2',
376
380
  label: 'Collapsible icon color',
377
381
  default: {
378
- normal: '#121212'
382
+ normal: 'text-1',
383
+ hover: '#ffffff',
384
+ active: '#ffffff'
379
385
  },
380
386
  state: {
381
387
  hover: true,
@@ -388,7 +394,9 @@ const AccordionSettings = [
388
394
  type: 'color-picker-v2',
389
395
  label: 'Background Color',
390
396
  default: {
391
- normal: '#ffffff'
397
+ normal: '#121212',
398
+ hover: '#121212',
399
+ active: '#121212'
392
400
  },
393
401
  state: {
394
402
  hover: true,
@@ -18,7 +18,7 @@ const ProductPricePreset = [
18
18
  styles: {
19
19
  typo: {
20
20
  default: {
21
- type: 'subheading-2'
21
+ type: 'paragraph-1'
22
22
  }
23
23
  }
24
24
  },
@@ -56,7 +56,7 @@ const ProductPricePreset = [
56
56
  styles: {
57
57
  typo: {
58
58
  default: {
59
- type: 'subheading-2'
59
+ type: 'paragraph-1'
60
60
  }
61
61
  },
62
62
  color: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.609",
3
+ "version": "2.0.0-dev.611",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",