@gem-sdk/components 2.0.0-dev.434 → 2.0.0-dev.436

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.
@@ -376,7 +376,8 @@ const SettingUIV2 = [
376
376
  type: 'combo',
377
377
  iconName: 'polaris-edit',
378
378
  isHideClear: true,
379
- fixedValue: 'Background',
379
+ fixedValue: 'Enable',
380
+ enableCheckSettingsValue: true,
380
381
  popoverLabel: {
381
382
  en: 'Hover effect'
382
383
  },
@@ -13,7 +13,7 @@ var useSticky = require('./hooks/useSticky.js');
13
13
  var system = require('@gem-sdk/system');
14
14
 
15
15
  const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
16
- const { minimize, background, preloadBgImage } = setting ?? {};
16
+ const { background, preloadBgImage } = setting ?? {};
17
17
  const { w, displayStyle, positionStyle, getCSSAlign } = useSticky.default(setting);
18
18
  const computedContainerStyles = system.createStyle({
19
19
  margin: '0 auto',
@@ -25,63 +25,42 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
25
25
  ...getCSSAlign,
26
26
  zIndex: _const.ELEMENT_Z_INDEX.STICKY
27
27
  });
28
- const computedMinimizeClasses = system.createClass(core.composeClasses('sticky-minimize gp-fixed gp-flex gp-h-[32px] gp-w-[76px] gp-cursor-pointer gp-items-center gp-gap-[4px] gp-border gp-border-[#D8E1FF] gp-bg-white hover:gp-bg-[#D8E1FF]'));
29
- if (minimize) {
30
- return /*#__PURE__*/ jsxRuntime.jsxs("div", {
31
- className: computedMinimizeClasses,
32
- "data-uid": builderProps?.uid,
33
- "data-id": builderProps?.uid,
34
- ...builderAttrs,
35
- style: {
36
- ...displayStyle,
37
- zIndex: _const.ELEMENT_Z_INDEX.STICKY
38
- },
39
- children: [
40
- useSticky.minimizeSvg,
41
- /*#__PURE__*/ jsxRuntime.jsx("span", {
42
- className: "gp-text-[12px] gp-font-medium gp-text-[#3C67FF]",
43
- children: "Sticky"
44
- })
45
- ]
46
- });
47
- } else {
48
- return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
49
- children: [
50
- !!preloadBgImage && /*#__PURE__*/ jsxRuntime.jsxs(Head, {
51
- children: [
52
- !!background?.desktop?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
53
- rel: "preload",
54
- href: background.desktop.image.src,
55
- as: "image"
56
- }),
57
- !!background?.tablet?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
58
- rel: "preload",
59
- href: background.tablet.image.src,
60
- as: "image"
61
- }),
62
- !!background?.mobile?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
63
- rel: "preload",
64
- href: background.mobile.image.src,
65
- as: "image"
66
- })
67
- ]
68
- }),
69
- /*#__PURE__*/ jsxRuntime.jsx("div", {
70
- className: core.cls('sticky-wrapper', builderProps?.uid),
71
- id: builderProps?.uid,
72
- style: computedContainerStyles,
73
- children: /*#__PURE__*/ jsxRuntime.jsx("div", {
74
- ...builderAttrs,
75
- "data-id": builderProps?.uid,
76
- "data-width": {
77
- ...w
78
- },
79
- children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : children
28
+ return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
29
+ children: [
30
+ !!preloadBgImage && /*#__PURE__*/ jsxRuntime.jsxs(Head, {
31
+ children: [
32
+ !!background?.desktop?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
33
+ rel: "preload",
34
+ href: background.desktop.image.src,
35
+ as: "image"
36
+ }),
37
+ !!background?.tablet?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
38
+ rel: "preload",
39
+ href: background.tablet.image.src,
40
+ as: "image"
41
+ }),
42
+ !!background?.mobile?.image?.src && /*#__PURE__*/ jsxRuntime.jsx("link", {
43
+ rel: "preload",
44
+ href: background.mobile.image.src,
45
+ as: "image"
80
46
  })
47
+ ]
48
+ }),
49
+ /*#__PURE__*/ jsxRuntime.jsx("div", {
50
+ className: core.cls('sticky-wrapper', builderProps?.uid),
51
+ id: builderProps?.uid,
52
+ style: computedContainerStyles,
53
+ children: /*#__PURE__*/ jsxRuntime.jsx("div", {
54
+ ...builderAttrs,
55
+ "data-id": builderProps?.uid,
56
+ "data-width": {
57
+ ...w
58
+ },
59
+ children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx(ChildrenDroppable.default, {}) : children
81
60
  })
82
- ]
83
- });
84
- }
61
+ })
62
+ ]
63
+ });
85
64
  };
86
65
 
87
66
  exports.default = Sticky;
@@ -6,51 +6,6 @@ var core = require('@gem-sdk/core');
6
6
  var helpers = require('../../../grid/row/commons/helpers.js');
7
7
  var React = require('react');
8
8
 
9
- const minimizeSvg = ` <svg
10
- className="gp-ml-[7px]"
11
- width="16"
12
- height="16"
13
- viewBox="0 0 16 16"
14
- fill="none"
15
- xmlns="http://www.w3.org/2000/svg"
16
- >
17
- <path
18
- fillRule="evenodd"
19
- clipRule="evenodd"
20
- d="M5.75 1.25C4.64543 1.25 3.75 2.14543 3.75 3.25C3.75 4.35457 4.64543 5.25 5.75 5.25C6.85457 5.25 7.75 4.35457 7.75 3.25C7.75 2.14543 6.85457 1.25 5.75 1.25ZM4.75 3.25C4.75 2.69772 5.19772 2.25 5.75 2.25C6.30228 2.25 6.75 2.69772 6.75 3.25C6.75 3.80228 6.30228 4.25 5.75 4.25C5.19772 4.25 4.75 3.80228 4.75 3.25Z"
21
- fill="#3C67FF"
22
- />
23
- <path
24
- fillRule="evenodd"
25
- clipRule="evenodd"
26
- d="M5.75 6C4.64543 6 3.75 6.89543 3.75 8C3.75 9.10457 4.64543 10 5.75 10C6.85457 10 7.75 9.10457 7.75 8C7.75 6.89543 6.85457 6 5.75 6ZM4.75 8C4.75 7.44772 5.19772 7 5.75 7C6.30228 7 6.75 7.44772 6.75 8C6.75 8.55228 6.30228 9 5.75 9C5.19772 9 4.75 8.55228 4.75 8Z"
27
- fill="#3C67FF"
28
- />
29
- <path
30
- fillRule="evenodd"
31
- clipRule="evenodd"
32
- d="M3.75 12.75C3.75 11.6454 4.64543 10.75 5.75 10.75C6.85457 10.75 7.75 11.6454 7.75 12.75C7.75 13.8546 6.85457 14.75 5.75 14.75C4.64543 14.75 3.75 13.8546 3.75 12.75ZM5.75 11.75C5.19772 11.75 4.75 12.1977 4.75 12.75C4.75 13.3023 5.19772 13.75 5.75 13.75C6.30228 13.75 6.75 13.3023 6.75 12.75C6.75 12.1977 6.30228 11.75 5.75 11.75Z"
33
- fill="#3C67FF"
34
- />
35
- <path
36
- fillRule="evenodd"
37
- clipRule="evenodd"
38
- d="M10.25 1.25C9.14543 1.25 8.25 2.14543 8.25 3.25C8.25 4.35457 9.14543 5.25 10.25 5.25C11.3546 5.25 12.25 4.35457 12.25 3.25C12.25 2.14543 11.3546 1.25 10.25 1.25ZM9.25 3.25C9.25 2.69772 9.69772 2.25 10.25 2.25C10.8023 2.25 11.25 2.69772 11.25 3.25C11.25 3.80228 10.8023 4.25 10.25 4.25C9.69772 4.25 9.25 3.80228 9.25 3.25Z"
39
- fill="#3C67FF"
40
- />
41
- <path
42
- fillRule="evenodd"
43
- clipRule="evenodd"
44
- d="M8.25 8C8.25 6.89543 9.14543 6 10.25 6C11.3546 6 12.25 6.89543 12.25 8C12.25 9.10457 11.3546 10 10.25 10C9.14543 10 8.25 9.10457 8.25 8ZM10.25 7C9.69772 7 9.25 7.44772 9.25 8C9.25 8.55228 9.69772 9 10.25 9C10.8023 9 11.25 8.55228 11.25 8C11.25 7.44772 10.8023 7 10.25 7Z"
45
- fill="#3C67FF"
46
- />
47
- <path
48
- fillRule="evenodd"
49
- clipRule="evenodd"
50
- d="M10.25 10.75C9.14543 10.75 8.25 11.6454 8.25 12.75C8.25 13.8546 9.14543 14.75 10.25 14.75C11.3546 14.75 12.25 13.8546 12.25 12.75C12.25 11.6454 11.3546 10.75 10.25 10.75ZM9.25 12.75C9.25 12.1977 9.69772 11.75 10.25 11.75C10.8023 11.75 11.25 12.1977 11.25 12.75C11.25 13.3023 10.8023 13.75 10.25 13.75C9.69772 13.75 9.25 13.3023 9.25 12.75Z"
51
- fill="#3C67FF"
52
- />
53
- </svg>`;
54
9
  const useSticky = (setting)=>{
55
10
  const { width, fullWidth, position } = setting ?? {};
56
11
  const styleObject = helpers.createStyleObject(width, fullWidth ?? {
@@ -126,4 +81,3 @@ const useSticky = (setting)=>{
126
81
  };
127
82
 
128
83
  exports.default = useSticky;
129
- exports.minimizeSvg = minimizeSvg;
@@ -4,10 +4,6 @@ const StickySettings = [
4
4
  {
5
5
  id: 'setting',
6
6
  controls: [
7
- {
8
- id: 'minimize',
9
- type: 'toggle'
10
- },
11
7
  {
12
8
  id: 'fullWidth',
13
9
  label: 'Full Width',
@@ -4,10 +4,6 @@ const StickySettingsV2 = [
4
4
  {
5
5
  id: 'setting',
6
6
  controls: [
7
- {
8
- id: 'minimize',
9
- type: 'toggle'
10
- },
11
7
  {
12
8
  id: 'fullWidth',
13
9
  label: 'Full Width',
@@ -37,7 +33,7 @@ const StickySettingsV2 = [
37
33
  isRowWith: true,
38
34
  devices: {
39
35
  desktop: {
40
- default: 'default'
36
+ default: '100%'
41
37
  }
42
38
  },
43
39
  displayOptions: [
@@ -61,7 +57,7 @@ const StickySettingsV2 = [
61
57
  desktop: {
62
58
  default: {
63
59
  type: 'color',
64
- color: '#FFFFFF',
60
+ color: 'transparent',
65
61
  image: {
66
62
  src: '',
67
63
  width: 0,
@@ -81,7 +77,7 @@ const StickySettingsV2 = [
81
77
  desktop: {
82
78
  default: {
83
79
  type: 'color',
84
- color: '#DDDDDD',
80
+ color: '',
85
81
  image: {
86
82
  src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
87
83
  width: 1200,
@@ -108,20 +104,21 @@ const StickySettingsV2 = [
108
104
  },
109
105
  {
110
106
  id: 'position',
111
- label: 'Position',
112
- type: 'layout-segment',
113
- iconViewBox: '0 0 64 48',
114
- enableItemBackground: true,
107
+ label: 'Layout',
108
+ type: 'layout-selector',
109
+ iconViewBox: '0 0 80 48',
110
+ itemPerRow: 2,
111
+ itemSpacing: 'large',
115
112
  options: [
116
113
  {
117
114
  label: 'Bottom',
118
115
  value: 'bottom',
119
- type: 'sticky-position'
116
+ iconName: 'gp-sticky-position-bottom'
120
117
  },
121
118
  {
122
119
  label: 'Top',
123
120
  value: 'top',
124
- type: 'sticky-position'
121
+ iconName: 'gp-sticky-position-top'
125
122
  }
126
123
  ],
127
124
  devices: {
@@ -141,13 +138,9 @@ const StickySettingsV2 = [
141
138
  },
142
139
  options: [
143
140
  {
144
- label: 'Always',
141
+ label: 'Always show',
145
142
  value: 'always'
146
143
  },
147
- // {
148
- // label: 'After first scroll',
149
- // value: 'after-first-scroll',
150
- // },
151
144
  {
152
145
  label: 'After first cart button',
153
146
  value: 'after-first-cart-button'
@@ -1,6 +1,19 @@
1
1
  'use strict';
2
2
 
3
3
  const SettingUIV2 = [
4
+ {
5
+ label: {
6
+ en: 'Layout'
7
+ },
8
+ controls: [
9
+ {
10
+ setting: {
11
+ id: 'position'
12
+ },
13
+ layout: 'vertical'
14
+ }
15
+ ]
16
+ },
4
17
  {
5
18
  label: {
6
19
  en: 'Size'
@@ -146,27 +159,12 @@ const SettingUIV2 = [
146
159
  },
147
160
  {
148
161
  label: {
149
- en: 'Position'
150
- },
151
- controls: [
152
- {
153
- label: {
154
- en: 'Position'
155
- },
156
- setting: {
157
- id: 'position'
158
- }
159
- }
160
- ]
161
- },
162
- {
163
- label: {
164
- en: 'Display condition'
162
+ en: 'Display option'
165
163
  },
166
164
  controls: [
167
165
  {
168
166
  label: {
169
- en: 'Display'
167
+ en: 'Condition'
170
168
  },
171
169
  setting: {
172
170
  id: 'display'
@@ -937,12 +937,12 @@ const StickyPresetScrollToTop = {
937
937
  },
938
938
  preloadBgImage: false,
939
939
  width: {
940
- desktop: '96%'
940
+ desktop: '100%'
941
941
  },
942
942
  background: {
943
943
  desktop: {
944
944
  type: 'color',
945
- color: '#00000000',
945
+ color: '',
946
946
  image: {
947
947
  src: '',
948
948
  width: 0,
@@ -959,6 +959,19 @@ const StickyPresetScrollToTop = {
959
959
  },
960
960
  isScrollToTop: true
961
961
  },
962
+ advanced: {
963
+ 'spacing-setting': {
964
+ desktop: {
965
+ padding: {
966
+ type: 'custom',
967
+ top: '16px',
968
+ bottom: '16px',
969
+ left: '24px',
970
+ right: '24px'
971
+ }
972
+ }
973
+ }
974
+ },
962
975
  childrens: [
963
976
  {
964
977
  tag: 'Col',
@@ -977,7 +990,8 @@ const StickyPresetScrollToTop = {
977
990
  disabled: false,
978
991
  htmlType: 'button',
979
992
  iconAlign: 'left',
980
- iconSvg: '<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817550824243560">\n <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M208.49,143.51a12,12,0,0,1-17,17L140,109V224a12,12,0,0,1-24,0V109L64.49,160.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0ZM216,28H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z" /></svg>',
993
+ iconSvg: `<svg height="20px" width="20px" data-name="arrow-line-up-bold" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor">
994
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M208.49,143.51a12,12,0,0,1-17,17L140,109V224a12,12,0,0,1-24,0V109L64.49,160.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0ZM216,28H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"></path></svg>`,
981
995
  iconVisible: true,
982
996
  label: '',
983
997
  shouldClearSpace: true,
@@ -988,10 +1002,10 @@ const StickyPresetScrollToTop = {
988
1002
  desktop: 'right'
989
1003
  },
990
1004
  backgroundColor: {
991
- normal: '#000000',
992
- hover: '#000000'
1005
+ normal: 'brand',
1006
+ hover: 'highlight'
993
1007
  },
994
- borderBtn: {
1008
+ borderBtnV2: {
995
1009
  normal: {
996
1010
  border: 'none',
997
1011
  borderType: 'none',
@@ -1000,7 +1014,7 @@ const StickyPresetScrollToTop = {
1000
1014
  width: '1px 1px 1px 1px'
1001
1015
  }
1002
1016
  },
1003
- boxShadowBtn: {
1017
+ boxShadowBtnV2: {
1004
1018
  normal: {
1005
1019
  angle: 90,
1006
1020
  blur: '12px',
@@ -1039,13 +1053,15 @@ const StickyPresetScrollToTop = {
1039
1053
  desktop: '24px'
1040
1054
  },
1041
1055
  iconSizeAuto: true,
1042
- roundedBtn: {
1043
- normal: {
1044
- bblr: '999999px',
1045
- bbrr: '999999px',
1046
- btlr: '999999px',
1047
- btrr: '999999px',
1048
- radiusType: 'custom'
1056
+ roundedBtnV2: {
1057
+ desktop: {
1058
+ normal: {
1059
+ bblr: '999999px',
1060
+ bbrr: '999999px',
1061
+ btlr: '999999px',
1062
+ btrr: '999999px',
1063
+ radiusType: 'custom'
1064
+ }
1049
1065
  }
1050
1066
  },
1051
1067
  size: {
@@ -374,7 +374,8 @@ const SettingUIV2 = [
374
374
  type: 'combo',
375
375
  iconName: 'polaris-edit',
376
376
  isHideClear: true,
377
- fixedValue: 'Background',
377
+ fixedValue: 'Enable',
378
+ enableCheckSettingsValue: true,
378
379
  popoverLabel: {
379
380
  en: 'Hover effect'
380
381
  },
@@ -1,15 +1,15 @@
1
1
  'use client';
2
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
- import { getStyleBackgroundByDevice, composeClasses, cls, isEmptyChildren } from '@gem-sdk/core';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
+ import { getStyleBackgroundByDevice, cls, isEmptyChildren } from '@gem-sdk/core';
4
4
  import Head from 'next/head';
5
5
  import ChildrenDroppable from '../../grid/components/ChildrenDroppable.js';
6
6
  import 'react';
7
7
  import { ELEMENT_Z_INDEX } from '../../common/const.js';
8
- import useSticky, { minimizeSvg } from './hooks/useSticky.js';
9
- import { createStyle, createClass } from '@gem-sdk/system';
8
+ import useSticky from './hooks/useSticky.js';
9
+ import { createStyle } from '@gem-sdk/system';
10
10
 
11
11
  const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
12
- const { minimize, background, preloadBgImage } = setting ?? {};
12
+ const { background, preloadBgImage } = setting ?? {};
13
13
  const { w, displayStyle, positionStyle, getCSSAlign } = useSticky(setting);
14
14
  const computedContainerStyles = createStyle({
15
15
  margin: '0 auto',
@@ -21,63 +21,42 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps })=>{
21
21
  ...getCSSAlign,
22
22
  zIndex: ELEMENT_Z_INDEX.STICKY
23
23
  });
24
- const computedMinimizeClasses = createClass(composeClasses('sticky-minimize gp-fixed gp-flex gp-h-[32px] gp-w-[76px] gp-cursor-pointer gp-items-center gp-gap-[4px] gp-border gp-border-[#D8E1FF] gp-bg-white hover:gp-bg-[#D8E1FF]'));
25
- if (minimize) {
26
- return /*#__PURE__*/ jsxs("div", {
27
- className: computedMinimizeClasses,
28
- "data-uid": builderProps?.uid,
29
- "data-id": builderProps?.uid,
30
- ...builderAttrs,
31
- style: {
32
- ...displayStyle,
33
- zIndex: ELEMENT_Z_INDEX.STICKY
34
- },
35
- children: [
36
- minimizeSvg,
37
- /*#__PURE__*/ jsx("span", {
38
- className: "gp-text-[12px] gp-font-medium gp-text-[#3C67FF]",
39
- children: "Sticky"
40
- })
41
- ]
42
- });
43
- } else {
44
- return /*#__PURE__*/ jsxs(Fragment, {
45
- children: [
46
- !!preloadBgImage && /*#__PURE__*/ jsxs(Head, {
47
- children: [
48
- !!background?.desktop?.image?.src && /*#__PURE__*/ jsx("link", {
49
- rel: "preload",
50
- href: background.desktop.image.src,
51
- as: "image"
52
- }),
53
- !!background?.tablet?.image?.src && /*#__PURE__*/ jsx("link", {
54
- rel: "preload",
55
- href: background.tablet.image.src,
56
- as: "image"
57
- }),
58
- !!background?.mobile?.image?.src && /*#__PURE__*/ jsx("link", {
59
- rel: "preload",
60
- href: background.mobile.image.src,
61
- as: "image"
62
- })
63
- ]
64
- }),
65
- /*#__PURE__*/ jsx("div", {
66
- className: cls('sticky-wrapper', builderProps?.uid),
67
- id: builderProps?.uid,
68
- style: computedContainerStyles,
69
- children: /*#__PURE__*/ jsx("div", {
70
- ...builderAttrs,
71
- "data-id": builderProps?.uid,
72
- "data-width": {
73
- ...w
74
- },
75
- children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : children
24
+ return /*#__PURE__*/ jsxs(Fragment, {
25
+ children: [
26
+ !!preloadBgImage && /*#__PURE__*/ jsxs(Head, {
27
+ children: [
28
+ !!background?.desktop?.image?.src && /*#__PURE__*/ jsx("link", {
29
+ rel: "preload",
30
+ href: background.desktop.image.src,
31
+ as: "image"
32
+ }),
33
+ !!background?.tablet?.image?.src && /*#__PURE__*/ jsx("link", {
34
+ rel: "preload",
35
+ href: background.tablet.image.src,
36
+ as: "image"
37
+ }),
38
+ !!background?.mobile?.image?.src && /*#__PURE__*/ jsx("link", {
39
+ rel: "preload",
40
+ href: background.mobile.image.src,
41
+ as: "image"
76
42
  })
43
+ ]
44
+ }),
45
+ /*#__PURE__*/ jsx("div", {
46
+ className: cls('sticky-wrapper', builderProps?.uid),
47
+ id: builderProps?.uid,
48
+ style: computedContainerStyles,
49
+ children: /*#__PURE__*/ jsx("div", {
50
+ ...builderAttrs,
51
+ "data-id": builderProps?.uid,
52
+ "data-width": {
53
+ ...w
54
+ },
55
+ children: isEmptyChildren(children) ? /*#__PURE__*/ jsx(ChildrenDroppable, {}) : children
77
56
  })
78
- ]
79
- });
80
- }
57
+ })
58
+ ]
59
+ });
81
60
  };
82
61
 
83
62
  export { Sticky as default };
@@ -2,51 +2,6 @@ import { makeStyleResponsive, usePageStore, useCurrentDevice } from '@gem-sdk/co
2
2
  import { createStyleObject } from '../../../grid/row/commons/helpers.js';
3
3
  import { useMemo } from 'react';
4
4
 
5
- const minimizeSvg = ` <svg
6
- className="gp-ml-[7px]"
7
- width="16"
8
- height="16"
9
- viewBox="0 0 16 16"
10
- fill="none"
11
- xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <path
14
- fillRule="evenodd"
15
- clipRule="evenodd"
16
- d="M5.75 1.25C4.64543 1.25 3.75 2.14543 3.75 3.25C3.75 4.35457 4.64543 5.25 5.75 5.25C6.85457 5.25 7.75 4.35457 7.75 3.25C7.75 2.14543 6.85457 1.25 5.75 1.25ZM4.75 3.25C4.75 2.69772 5.19772 2.25 5.75 2.25C6.30228 2.25 6.75 2.69772 6.75 3.25C6.75 3.80228 6.30228 4.25 5.75 4.25C5.19772 4.25 4.75 3.80228 4.75 3.25Z"
17
- fill="#3C67FF"
18
- />
19
- <path
20
- fillRule="evenodd"
21
- clipRule="evenodd"
22
- d="M5.75 6C4.64543 6 3.75 6.89543 3.75 8C3.75 9.10457 4.64543 10 5.75 10C6.85457 10 7.75 9.10457 7.75 8C7.75 6.89543 6.85457 6 5.75 6ZM4.75 8C4.75 7.44772 5.19772 7 5.75 7C6.30228 7 6.75 7.44772 6.75 8C6.75 8.55228 6.30228 9 5.75 9C5.19772 9 4.75 8.55228 4.75 8Z"
23
- fill="#3C67FF"
24
- />
25
- <path
26
- fillRule="evenodd"
27
- clipRule="evenodd"
28
- d="M3.75 12.75C3.75 11.6454 4.64543 10.75 5.75 10.75C6.85457 10.75 7.75 11.6454 7.75 12.75C7.75 13.8546 6.85457 14.75 5.75 14.75C4.64543 14.75 3.75 13.8546 3.75 12.75ZM5.75 11.75C5.19772 11.75 4.75 12.1977 4.75 12.75C4.75 13.3023 5.19772 13.75 5.75 13.75C6.30228 13.75 6.75 13.3023 6.75 12.75C6.75 12.1977 6.30228 11.75 5.75 11.75Z"
29
- fill="#3C67FF"
30
- />
31
- <path
32
- fillRule="evenodd"
33
- clipRule="evenodd"
34
- d="M10.25 1.25C9.14543 1.25 8.25 2.14543 8.25 3.25C8.25 4.35457 9.14543 5.25 10.25 5.25C11.3546 5.25 12.25 4.35457 12.25 3.25C12.25 2.14543 11.3546 1.25 10.25 1.25ZM9.25 3.25C9.25 2.69772 9.69772 2.25 10.25 2.25C10.8023 2.25 11.25 2.69772 11.25 3.25C11.25 3.80228 10.8023 4.25 10.25 4.25C9.69772 4.25 9.25 3.80228 9.25 3.25Z"
35
- fill="#3C67FF"
36
- />
37
- <path
38
- fillRule="evenodd"
39
- clipRule="evenodd"
40
- d="M8.25 8C8.25 6.89543 9.14543 6 10.25 6C11.3546 6 12.25 6.89543 12.25 8C12.25 9.10457 11.3546 10 10.25 10C9.14543 10 8.25 9.10457 8.25 8ZM10.25 7C9.69772 7 9.25 7.44772 9.25 8C9.25 8.55228 9.69772 9 10.25 9C10.8023 9 11.25 8.55228 11.25 8C11.25 7.44772 10.8023 7 10.25 7Z"
41
- fill="#3C67FF"
42
- />
43
- <path
44
- fillRule="evenodd"
45
- clipRule="evenodd"
46
- d="M10.25 10.75C9.14543 10.75 8.25 11.6454 8.25 12.75C8.25 13.8546 9.14543 14.75 10.25 14.75C11.3546 14.75 12.25 13.8546 12.25 12.75C12.25 11.6454 11.3546 10.75 10.25 10.75ZM9.25 12.75C9.25 12.1977 9.69772 11.75 10.25 11.75C10.8023 11.75 11.25 12.1977 11.25 12.75C11.25 13.3023 10.8023 13.75 10.25 13.75C9.69772 13.75 9.25 13.3023 9.25 12.75Z"
47
- fill="#3C67FF"
48
- />
49
- </svg>`;
50
5
  const useSticky = (setting)=>{
51
6
  const { width, fullWidth, position } = setting ?? {};
52
7
  const styleObject = createStyleObject(width, fullWidth ?? {
@@ -121,4 +76,4 @@ const useSticky = (setting)=>{
121
76
  };
122
77
  };
123
78
 
124
- export { useSticky as default, minimizeSvg };
79
+ export { useSticky as default };
@@ -2,10 +2,6 @@ const StickySettings = [
2
2
  {
3
3
  id: 'setting',
4
4
  controls: [
5
- {
6
- id: 'minimize',
7
- type: 'toggle'
8
- },
9
5
  {
10
6
  id: 'fullWidth',
11
7
  label: 'Full Width',
@@ -2,10 +2,6 @@ const StickySettingsV2 = [
2
2
  {
3
3
  id: 'setting',
4
4
  controls: [
5
- {
6
- id: 'minimize',
7
- type: 'toggle'
8
- },
9
5
  {
10
6
  id: 'fullWidth',
11
7
  label: 'Full Width',
@@ -35,7 +31,7 @@ const StickySettingsV2 = [
35
31
  isRowWith: true,
36
32
  devices: {
37
33
  desktop: {
38
- default: 'default'
34
+ default: '100%'
39
35
  }
40
36
  },
41
37
  displayOptions: [
@@ -59,7 +55,7 @@ const StickySettingsV2 = [
59
55
  desktop: {
60
56
  default: {
61
57
  type: 'color',
62
- color: '#FFFFFF',
58
+ color: 'transparent',
63
59
  image: {
64
60
  src: '',
65
61
  width: 0,
@@ -79,7 +75,7 @@ const StickySettingsV2 = [
79
75
  desktop: {
80
76
  default: {
81
77
  type: 'color',
82
- color: '#DDDDDD',
78
+ color: '',
83
79
  image: {
84
80
  src: 'https://ucarecdn.com/5e27d43d-eb1e-4e71-b7e1-4158f3071bb6/-/format/auto/',
85
81
  width: 1200,
@@ -106,20 +102,21 @@ const StickySettingsV2 = [
106
102
  },
107
103
  {
108
104
  id: 'position',
109
- label: 'Position',
110
- type: 'layout-segment',
111
- iconViewBox: '0 0 64 48',
112
- enableItemBackground: true,
105
+ label: 'Layout',
106
+ type: 'layout-selector',
107
+ iconViewBox: '0 0 80 48',
108
+ itemPerRow: 2,
109
+ itemSpacing: 'large',
113
110
  options: [
114
111
  {
115
112
  label: 'Bottom',
116
113
  value: 'bottom',
117
- type: 'sticky-position'
114
+ iconName: 'gp-sticky-position-bottom'
118
115
  },
119
116
  {
120
117
  label: 'Top',
121
118
  value: 'top',
122
- type: 'sticky-position'
119
+ iconName: 'gp-sticky-position-top'
123
120
  }
124
121
  ],
125
122
  devices: {
@@ -139,13 +136,9 @@ const StickySettingsV2 = [
139
136
  },
140
137
  options: [
141
138
  {
142
- label: 'Always',
139
+ label: 'Always show',
143
140
  value: 'always'
144
141
  },
145
- // {
146
- // label: 'After first scroll',
147
- // value: 'after-first-scroll',
148
- // },
149
142
  {
150
143
  label: 'After first cart button',
151
144
  value: 'after-first-cart-button'
@@ -1,4 +1,17 @@
1
1
  const SettingUIV2 = [
2
+ {
3
+ label: {
4
+ en: 'Layout'
5
+ },
6
+ controls: [
7
+ {
8
+ setting: {
9
+ id: 'position'
10
+ },
11
+ layout: 'vertical'
12
+ }
13
+ ]
14
+ },
2
15
  {
3
16
  label: {
4
17
  en: 'Size'
@@ -144,27 +157,12 @@ const SettingUIV2 = [
144
157
  },
145
158
  {
146
159
  label: {
147
- en: 'Position'
148
- },
149
- controls: [
150
- {
151
- label: {
152
- en: 'Position'
153
- },
154
- setting: {
155
- id: 'position'
156
- }
157
- }
158
- ]
159
- },
160
- {
161
- label: {
162
- en: 'Display condition'
160
+ en: 'Display option'
163
161
  },
164
162
  controls: [
165
163
  {
166
164
  label: {
167
- en: 'Display'
165
+ en: 'Condition'
168
166
  },
169
167
  setting: {
170
168
  id: 'display'
@@ -935,12 +935,12 @@ const StickyPresetScrollToTop = {
935
935
  },
936
936
  preloadBgImage: false,
937
937
  width: {
938
- desktop: '96%'
938
+ desktop: '100%'
939
939
  },
940
940
  background: {
941
941
  desktop: {
942
942
  type: 'color',
943
- color: '#00000000',
943
+ color: '',
944
944
  image: {
945
945
  src: '',
946
946
  width: 0,
@@ -957,6 +957,19 @@ const StickyPresetScrollToTop = {
957
957
  },
958
958
  isScrollToTop: true
959
959
  },
960
+ advanced: {
961
+ 'spacing-setting': {
962
+ desktop: {
963
+ padding: {
964
+ type: 'custom',
965
+ top: '16px',
966
+ bottom: '16px',
967
+ left: '24px',
968
+ right: '24px'
969
+ }
970
+ }
971
+ }
972
+ },
960
973
  childrens: [
961
974
  {
962
975
  tag: 'Col',
@@ -975,7 +988,8 @@ const StickyPresetScrollToTop = {
975
988
  disabled: false,
976
989
  htmlType: 'button',
977
990
  iconAlign: 'left',
978
- iconSvg: '<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817550824243560">\n <path fill="currentColor" strokeLinecap="round" strokeLinejoin="round" fill="currentColor" d="M208.49,143.51a12,12,0,0,1-17,17L140,109V224a12,12,0,0,1-24,0V109L64.49,160.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0ZM216,28H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z" /></svg>',
991
+ iconSvg: `<svg height="20px" width="20px" data-name="arrow-line-up-bold" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor">
992
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M208.49,143.51a12,12,0,0,1-17,17L140,109V224a12,12,0,0,1-24,0V109L64.49,160.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0ZM216,28H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"></path></svg>`,
979
993
  iconVisible: true,
980
994
  label: '',
981
995
  shouldClearSpace: true,
@@ -986,10 +1000,10 @@ const StickyPresetScrollToTop = {
986
1000
  desktop: 'right'
987
1001
  },
988
1002
  backgroundColor: {
989
- normal: '#000000',
990
- hover: '#000000'
1003
+ normal: 'brand',
1004
+ hover: 'highlight'
991
1005
  },
992
- borderBtn: {
1006
+ borderBtnV2: {
993
1007
  normal: {
994
1008
  border: 'none',
995
1009
  borderType: 'none',
@@ -998,7 +1012,7 @@ const StickyPresetScrollToTop = {
998
1012
  width: '1px 1px 1px 1px'
999
1013
  }
1000
1014
  },
1001
- boxShadowBtn: {
1015
+ boxShadowBtnV2: {
1002
1016
  normal: {
1003
1017
  angle: 90,
1004
1018
  blur: '12px',
@@ -1037,13 +1051,15 @@ const StickyPresetScrollToTop = {
1037
1051
  desktop: '24px'
1038
1052
  },
1039
1053
  iconSizeAuto: true,
1040
- roundedBtn: {
1041
- normal: {
1042
- bblr: '999999px',
1043
- bbrr: '999999px',
1044
- btlr: '999999px',
1045
- btrr: '999999px',
1046
- radiusType: 'custom'
1054
+ roundedBtnV2: {
1055
+ desktop: {
1056
+ normal: {
1057
+ bblr: '999999px',
1058
+ bbrr: '999999px',
1059
+ btlr: '999999px',
1060
+ btrr: '999999px',
1061
+ radiusType: 'custom'
1062
+ }
1047
1063
  }
1048
1064
  },
1049
1065
  size: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.434",
3
+ "version": "2.0.0-dev.436",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -23,7 +23,7 @@
23
23
  "update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
24
24
  },
25
25
  "devDependencies": {
26
- "@gem-sdk/core": "2.0.0-dev.431",
26
+ "@gem-sdk/core": "2.0.0-dev.435",
27
27
  "@gem-sdk/styles": "2.0.0-dev.381",
28
28
  "@gem-sdk/system": "2.0.0-dev.433",
29
29
  "@types/react-transition-group": "^4.4.5"