@sc-360-v2/storefront-cms-library 0.3.9 → 0.3.11

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.
@@ -18,213 +18,213 @@ $shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
18
18
  top: 0;
19
19
  background: rgba(112, 112, 112, 0.13);
20
20
  z-index: 9999;
21
- }
22
-
23
- // Container overlay
24
- .sidebar-overlay {
25
- position: fixed;
26
- top: 0;
27
- left: 0;
28
- width: 100vw;
29
- height: 100vh;
30
- background: rgba(20, 20, 20, 0.4); // Glass effect
31
- backdrop-filter: blur(3px);
32
- z-index: 1000;
33
- }
34
21
 
35
- // Sidebar slide-in
36
- .sidebar-container {
37
- position: fixed;
38
- top: 0;
39
- right: 0;
40
- width: 400px;
41
- max-width: 100%;
42
- height: 100vh;
43
- background: $background-color;
44
- box-shadow: $shadow;
45
- z-index: 1001;
46
- display: flex;
47
- flex-direction: column;
48
- animation: slide-in 0.3s ease-out;
49
- .container {
50
- padding: 0px 24px;
51
- overflow-y: auto;
52
- width: 100%;
53
- height: calc(100vh - 40px);
22
+ // Container overlay
23
+ .sidebar-overlay {
24
+ position: fixed;
25
+ top: 0;
26
+ left: 0;
27
+ width: 100vw;
28
+ height: 100vh;
29
+ background: rgba(20, 20, 20, 0.4); // Glass effect
30
+ backdrop-filter: blur(3px);
31
+ z-index: 1000;
54
32
  }
55
33
 
56
- @keyframes slide-in {
57
- from {
58
- transform: translateX(100%);
34
+ // Sidebar slide-in
35
+ .sidebar-container {
36
+ position: fixed;
37
+ top: 0;
38
+ right: 0;
39
+ width: 400px;
40
+ max-width: 100%;
41
+ height: 100vh;
42
+ background: $background-color;
43
+ box-shadow: $shadow;
44
+ z-index: 1001;
45
+ display: flex;
46
+ flex-direction: column;
47
+ animation: slide-in 0.3s ease-out;
48
+ .container {
49
+ padding: 0px 24px;
50
+ overflow-y: auto;
51
+ width: 100%;
52
+ height: calc(100vh - 40px);
59
53
  }
60
- to {
61
- transform: translateX(0);
54
+
55
+ @keyframes slide-in {
56
+ from {
57
+ transform: translateX(100%);
58
+ }
59
+ to {
60
+ transform: translateX(0);
61
+ }
62
62
  }
63
63
  }
64
- }
65
64
 
66
- // Header
67
- .sidebar-header {
68
- display: flex;
69
- justify-content: space-between;
70
- align-items: center;
71
- padding: 16px 0px;
72
- position: sticky;
73
- top: 0px;
74
- background: #fff;
75
- margin: 0 -14px;
76
-
77
- h2 {
78
- font-size: 18px;
79
- font-weight: 600;
80
- color: $text-color;
81
- }
65
+ // Header
66
+ .sidebar-header {
67
+ display: flex;
68
+ justify-content: space-between;
69
+ align-items: center;
70
+ padding: 16px 0px;
71
+ position: sticky;
72
+ top: 0px;
73
+ background: #fff;
74
+ margin: 0 -14px;
75
+
76
+ h2 {
77
+ font-size: 18px;
78
+ font-weight: 600;
79
+ color: $text-color;
80
+ }
82
81
 
83
- .close-btn {
84
- font-size: 24px;
85
- background: none;
86
- border: none;
87
- cursor: pointer;
88
- color: $text-color;
82
+ .close-btn {
83
+ font-size: 24px;
84
+ background: none;
85
+ border: none;
86
+ cursor: pointer;
87
+ color: $text-color;
88
+ }
89
89
  }
90
- }
91
90
 
92
- // Form fields
93
- .form-group {
94
- display: flex;
95
- flex-direction: column;
96
- margin-bottom: 16px;
91
+ // Form fields
92
+ .form-group {
93
+ display: flex;
94
+ flex-direction: column;
95
+ margin-bottom: 16px;
97
96
 
98
- label {
99
- font-weight: 500;
100
- margin-bottom: 6px;
101
- color: $text-color;
102
- }
97
+ label {
98
+ font-weight: 500;
99
+ margin-bottom: 6px;
100
+ color: $text-color;
101
+ }
103
102
 
104
- input {
105
- padding: 10px 12px;
106
- font-size: 14px;
107
- border-radius: $border-radius;
108
- border: 1px solid $input-border;
109
- outline: none;
103
+ input {
104
+ padding: 10px 12px;
105
+ font-size: 14px;
106
+ border-radius: $border-radius;
107
+ border: 1px solid $input-border;
108
+ outline: none;
110
109
 
111
- &:focus {
112
- border-color: $primary-color;
110
+ &:focus {
111
+ border-color: $primary-color;
112
+ }
113
113
  }
114
- }
115
114
 
116
- .hint {
117
- font-size: 12px;
118
- color: $hint-color;
119
- margin-top: 4px;
120
- }
115
+ .hint {
116
+ font-size: 12px;
117
+ color: $hint-color;
118
+ margin-top: 4px;
119
+ }
121
120
 
122
- .error {
123
- color: $error-color;
124
- font-size: 12px;
125
- margin-top: 4px;
121
+ .error {
122
+ color: $error-color;
123
+ font-size: 12px;
124
+ margin-top: 4px;
125
+ }
126
126
  }
127
- }
128
127
 
129
- // Chip Input
130
- .input-wrapper {
131
- display: flex;
132
- flex-wrap: wrap;
133
- align-items: center;
134
- gap: 6px;
135
- padding: 8px 0px;
136
- border: 1px solid #ccc;
137
- border-radius: 8px;
138
- min-height: 44px;
139
- cursor: text;
140
- }
141
-
142
- .chips-input-wrapper:focus-within {
143
- border-color: $primary-color;
144
- }
128
+ // Chip Input
129
+ .input-wrapper {
130
+ display: flex;
131
+ flex-wrap: wrap;
132
+ align-items: center;
133
+ gap: 6px;
134
+ padding: 8px 0px;
135
+ border: 1px solid #ccc;
136
+ border-radius: 8px;
137
+ min-height: 44px;
138
+ cursor: text;
139
+ }
145
140
 
146
- .chips-input {
147
- flex: 1;
148
- border: none;
149
- outline: none;
150
- min-width: 120px;
151
- font-size: 14px;
152
- }
141
+ .chips-input-wrapper:focus-within {
142
+ border-color: $primary-color;
143
+ }
153
144
 
154
- .chip {
155
- display: flex;
156
- align-items: center;
157
- background-color: #f1f1f1;
158
- padding: 4px 8px;
159
- border-radius: 999px;
160
- font-size: 13px;
161
-
162
- button {
163
- margin-left: 6px;
164
- background: transparent;
145
+ .chips-input {
146
+ flex: 1;
165
147
  border: none;
166
- font-size: 16px;
167
- cursor: pointer;
168
- line-height: 1;
148
+ outline: none;
149
+ min-width: 120px;
150
+ font-size: 14px;
169
151
  }
170
- }
171
152
 
172
- // Footer buttons
173
- .sidebar-footer {
174
- margin-top: auto;
175
- display: flex;
176
- justify-content: space-between;
177
- padding: 12px;
178
- border-top: 1px solid #eee;
179
-
180
- .discard-btn {
181
- background: none;
182
- border: none;
183
- color: $text-color;
184
- cursor: pointer;
185
- font-weight: 500;
153
+ .chip {
154
+ display: flex;
155
+ align-items: center;
156
+ background-color: #f1f1f1;
157
+ padding: 4px 8px;
158
+ border-radius: 999px;
159
+ font-size: 13px;
160
+
161
+ button {
162
+ margin-left: 6px;
163
+ background: transparent;
164
+ border: none;
165
+ font-size: 16px;
166
+ cursor: pointer;
167
+ line-height: 1;
168
+ }
186
169
  }
187
170
 
188
- .share-btn {
189
- background: $primary-color;
190
- color: $background-color;
191
- border: none;
192
- padding: 10px 16px;
193
- border-radius: $border-radius;
194
- cursor: pointer;
195
- font-weight: 600;
196
- transition: background 0.2s;
197
- // if it needed import the darken function from sass
198
- // &:hover {
199
- // background: darken($primary-color, 5%);
200
- // }
171
+ // Footer buttons
172
+ .sidebar-footer {
173
+ margin-top: auto;
174
+ display: flex;
175
+ justify-content: space-between;
176
+ padding: 12px;
177
+ border-top: 1px solid #eee;
178
+
179
+ .discard-btn {
180
+ background: none;
181
+ border: none;
182
+ color: $text-color;
183
+ cursor: pointer;
184
+ font-weight: 500;
185
+ }
186
+
187
+ .share-btn {
188
+ background: $primary-color;
189
+ color: $background-color;
190
+ border: none;
191
+ padding: 10px 16px;
192
+ border-radius: $border-radius;
193
+ cursor: pointer;
194
+ font-weight: 600;
195
+ transition: background 0.2s;
196
+ // if it needed import the darken function from sass
197
+ // &:hover {
198
+ // background: darken($primary-color, 5%);
199
+ // }
200
+ }
201
201
  }
202
- }
203
202
 
204
- // PhoneInput override
205
- .react-tel-input {
206
- input {
207
- width: 100% !important;
208
- border-radius: $border-radius !important;
209
- border-color: $input-border !important;
203
+ // PhoneInput override
204
+ .react-tel-input {
205
+ input {
206
+ width: 100% !important;
207
+ border-radius: $border-radius !important;
208
+ border-color: $input-border !important;
209
+ }
210
210
  }
211
- }
212
211
 
213
- .form-group.checkbox-group {
214
- display: flex;
215
- align-items: center;
216
- gap: 8px; // spacing between checkbox and label
217
- margin-top: 12px;
212
+ .form-group.checkbox-group {
213
+ display: flex;
214
+ align-items: center;
215
+ gap: 8px; // spacing between checkbox and label
216
+ margin-top: 12px;
218
217
 
219
- input[type="checkbox"] {
220
- width: 16px;
221
- height: 16px;
222
- cursor: pointer;
223
- }
218
+ input[type="checkbox"] {
219
+ width: 16px;
220
+ height: 16px;
221
+ cursor: pointer;
222
+ }
224
223
 
225
- label {
226
- font-size: 14px;
227
- color: $text-color;
228
- cursor: pointer;
224
+ label {
225
+ font-size: 14px;
226
+ color: $text-color;
227
+ cursor: pointer;
228
+ }
229
229
  }
230
230
  }
@@ -0,0 +1 @@
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["storefront-cms-library"]=e():t["storefront-cms-library"]=e()}(this,(()=>(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,l,u=[],c=!0,a=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){a=!0,o=t}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(a)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t){return Object.entries(t).filter((function(t){var e=o(t,2);return null!=(e[0],e[1])})).map((function(t){var e=o(t,2),r=e[0],n=e[1];return"".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n))})).join("&")}t.r(e),t.d(e,{createQueryStringForCollection:()=>i,parseThemeSettings:()=>l});var l=function(t){var e=Object.assign({},t);return["layout","colors","typography","buttons","animations"].forEach((function(t){if("string"==typeof e[t]&&e[t].length>0)try{e[t]=JSON.parse(e[t])}catch(t){}else"object"===r(e[t])&&null!==e[t]&&(e[t]=JSON.stringify(e[t]))})),e};return e})()));
@@ -1,18 +1,18 @@
1
1
  .toggle__button {
2
- position: relative;
3
- width: 36px;
4
- height: 20px;
5
- background-color: #d0d5dd;
6
- border-radius: 12px;
2
+ position: var(--_p-relative);
3
+ width: var(--_width-36);
4
+ height: var(--_height-20);
5
+ background-color: var(--_gray-100);
6
+ border-radius: var(--_br-12);
7
7
  cursor: pointer;
8
8
 
9
9
  .toggle__slider {
10
- position: absolute;
11
- top: 2px;
12
- left: 2px;
10
+ position: var(--_p-absolute);
11
+ top: var(--_top-2);
12
+ left: var(--_left-2);
13
13
  transform: translateY(0%);
14
- width: 16px;
15
- height: 16px;
14
+ width: var(--_width-16);
15
+ height: var(--_width-16);
16
16
  background-color: #fff;
17
17
  border-radius: 50%;
18
18
  transition: transform 0.3s ease;
@@ -22,10 +22,10 @@
22
22
  }
23
23
 
24
24
  &.toggle__active {
25
- background: #132067;
25
+ background: var(--_primary-600);
26
26
 
27
27
  .toggle__slider {
28
- top: 2px;
28
+ top: var(--_top-2);
29
29
  transform: translateX(16px);
30
30
  }
31
31
  }
@@ -1,6 +1,5 @@
1
- import { CSSUnitOption, ThemeSettingsInterface } from "../interfaces/global";
1
+ import { CSSUnitOption } from "../interfaces/global";
2
2
  export declare const CSSUnits: CSSUnitOption[];
3
3
  export declare function setTimeoutAsyncV2(timeout: any): Promise<void>;
4
- export declare const parseThemeSettings: (data: ThemeSettingsInterface) => ThemeSettingsInterface;
5
4
  declare const commonFunctions: any;
6
5
  export default commonFunctions;
@@ -1,2 +1 @@
1
1
  export declare const dateTimeFormat: (dateString: string | number, isTime?: boolean, formatStr?: string, timeZone?: string, locale?: string) => string | null;
2
- export declare function createQueryStringForCollection(queryObject: any): string;
@@ -0,0 +1,3 @@
1
+ import { ThemeSettingsInterface } from "../builder/interfaces/global";
2
+ export declare function createQueryStringForCollection(queryObject: any): string;
3
+ export declare const parseThemeSettings: (data: ThemeSettingsInterface) => ThemeSettingsInterface;
package/dist/widget.scss CHANGED
@@ -108,6 +108,7 @@
108
108
  @use "./layouter-pro-item.scss";
109
109
  @use "./user-elements.scss";
110
110
  @use "./filter-results.scss";
111
+ @use "./product-sizechart.scss";
111
112
  @use "./toggle-button.scss";
112
113
  @use "./employee-bulk-order.scss";
113
114
  @use "./confirmationModal.scss";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sc-360-v2/storefront-cms-library",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "main": "/dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {
@@ -32,6 +32,10 @@
32
32
  "import": "./dist/functions.js",
33
33
  "types": "./dist/types/helper/helper-functions.d.ts"
34
34
  },
35
+ "./ssrFunctions": {
36
+ "import": "./dist/ssrFunctions.js",
37
+ "types": "./dist/types/helper/ssr-functions.d.ts"
38
+ },
35
39
  "./textEditor.scss": {
36
40
  "import": "./dist/text-editor.scss"
37
41
  },