@faststore/core 4.5.0-dev.0 → 4.5.0-dev.1
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.
- package/.turbo/turbo-generate.log +4 -4
- package/.turbo/turbo-test.log +132 -60
- package/@generated/cached-operations.json +2 -0
- package/@generated/gql.ts +18 -0
- package/@generated/graphql.ts +68 -0
- package/@generated/persisted-documents.json +3 -0
- package/@generated/schema.graphql +41 -0
- package/CHANGELOG.md +20 -0
- package/cms/faststore/components/cms_component__recommendationshelf.jsonc +86 -0
- package/cms/faststore/schema.json +89 -0
- package/discovery.config.default.js +3 -0
- package/discovery.config.js +10 -1
- package/discovery.config.local.example.js +62 -0
- package/package.json +6 -6
- package/public/icons.svg +4 -0
- package/src/Layout.tsx +6 -0
- package/src/components/account/Drawer/OrganizationDrawer/ContractSwitcher/ContractSwitcher.tsx +376 -0
- package/src/components/account/Drawer/OrganizationDrawer/ContractSwitcher/index.ts +2 -0
- package/src/components/account/Drawer/OrganizationDrawer/OrganizationDrawer.tsx +51 -26
- package/src/components/account/Drawer/OrganizationDrawer/OrganizationDrawerFooter.tsx +55 -0
- package/src/components/account/Drawer/OrganizationDrawer/OrganizationDrawerHeader.tsx +45 -5
- package/src/components/account/Drawer/OrganizationDrawer/index.ts +5 -0
- package/src/components/account/Drawer/OrganizationDrawer/section.module.scss +452 -54
- package/src/components/cms/global/Components.ts +10 -0
- package/src/components/sections/ProductGallery/ProductGallery.tsx +1 -1
- package/src/components/sections/RecommendationShelf/RecommendationShelf.tsx +223 -0
- package/src/components/sections/RecommendationShelf/RecommendationShelf.types.ts +111 -0
- package/src/components/sections/RecommendationShelf/index.ts +1 -0
- package/src/components/sections/RecommendationShelf/section.module.scss +49 -0
- package/src/components/sections/RecommendationShelf/useRecommendationUserId.ts +49 -0
- package/src/components/sections/RecommendationShelf/useRecommendations.ts +55 -0
- package/src/components/sections/RecommendationShelf/vrn.ts +55 -0
- package/src/pages/[slug]/p.tsx +45 -0
- package/src/sdk/account/changeContractToken.ts +119 -0
- package/src/sdk/account/clearPersistedSessionState.ts +26 -0
- package/src/sdk/account/refreshToken.ts +21 -8
- package/src/sdk/account/useAvailableContracts.ts +49 -0
- package/src/sdk/account/useSwitchContract.ts +60 -0
- package/src/sdk/analytics/hooks/useStartRecommendationSession.ts +96 -0
- package/src/sdk/analytics/utils.ts +9 -0
- package/src/utils/retry.ts +69 -0
- package/test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx +235 -0
- package/test/components/RecommendationShelf/useRecommendationUserId.test.ts +69 -0
- package/test/components/RecommendationShelf/useRecommendations.test.ts +52 -0
- package/test/components/RecommendationShelf/vrn.test.ts +56 -0
- package/test/components/account/ContractSwitcher.browser.test.tsx +236 -0
- package/test/components/account/OrganizationDrawer.browser.test.tsx +197 -0
- package/test/components/account/OrganizationDrawerFooter.browser.test.tsx +54 -0
- package/test/components/account/OrganizationDrawerHeader.browser.test.tsx +55 -0
- package/test/components/account/doLogout.browser.test.ts +102 -0
- package/test/sdk/account/changeContractToken.browser.test.ts +157 -0
- package/test/sdk/account/clearPersistedSessionState.browser.test.ts +41 -0
- package/test/sdk/account/clearPersistedSessionState.test.ts +20 -0
- package/test/sdk/account/refreshToken.browser.test.ts +34 -0
- package/test/sdk/account/refreshToken.test.ts +87 -0
- package/test/sdk/account/useAvailableContracts.browser.test.ts +124 -0
- package/test/sdk/account/useSwitchContract.browser.test.ts +111 -0
- package/test/sdk/analytics/useStartRecommendationSession.test.ts +69 -0
- package/test/sdk/analytics/utils.test.ts +23 -0
- package/test/server/index.test.ts +3 -0
- package/test/utils/retry.test.ts +59 -0
|
@@ -3,68 +3,369 @@
|
|
|
3
3
|
|
|
4
4
|
@layer components {
|
|
5
5
|
.section {
|
|
6
|
-
@include meta.load-css(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@include meta.load-css(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@include meta.load-css(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@include meta.load-css(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@include meta.load-css(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@include meta.load-css(
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
@include meta.load-css(
|
|
7
|
+
"~@faststore/ui/src/components/atoms/Icon/styles.scss"
|
|
8
|
+
);
|
|
9
|
+
@include meta.load-css(
|
|
10
|
+
"~@faststore/ui/src/components/atoms/Overlay/styles.scss"
|
|
11
|
+
);
|
|
12
|
+
@include meta.load-css(
|
|
13
|
+
"~@faststore/ui/src/components/atoms/Badge/styles.scss"
|
|
14
|
+
);
|
|
15
|
+
@include meta.load-css(
|
|
16
|
+
"~@faststore/ui/src/components/atoms/Button/styles.scss"
|
|
17
|
+
);
|
|
18
|
+
@include meta.load-css(
|
|
19
|
+
"~@faststore/ui/src/components/atoms/Link/styles.scss"
|
|
20
|
+
);
|
|
21
|
+
@include meta.load-css(
|
|
22
|
+
"~@faststore/ui/src/components/atoms/List/styles.scss"
|
|
23
|
+
);
|
|
24
|
+
@include meta.load-css(
|
|
25
|
+
"~@faststore/ui/src/components/atoms/Loader/styles.scss"
|
|
26
|
+
);
|
|
27
|
+
@include meta.load-css(
|
|
28
|
+
"~@faststore/ui/src/components/atoms/Price/styles.scss"
|
|
29
|
+
);
|
|
30
|
+
@include meta.load-css(
|
|
31
|
+
"~@faststore/ui/src/components/molecules/Alert/styles.scss"
|
|
32
|
+
);
|
|
33
|
+
@include meta.load-css(
|
|
34
|
+
"~@faststore/ui/src/components/molecules/Modal/styles.scss"
|
|
35
|
+
);
|
|
36
|
+
@include meta.load-css(
|
|
37
|
+
"~@faststore/ui/src/components/molecules/CartItem/styles.scss"
|
|
38
|
+
);
|
|
39
|
+
@include meta.load-css(
|
|
40
|
+
"~@faststore/ui/src/components/molecules/Gift/styles.scss"
|
|
41
|
+
);
|
|
42
|
+
@include meta.load-css(
|
|
43
|
+
"~@faststore/ui/src/components/molecules/QuantitySelector/styles.scss"
|
|
44
|
+
);
|
|
45
|
+
@include meta.load-css(
|
|
46
|
+
"~@faststore/ui/src/components/molecules/OrderSummary/styles.scss"
|
|
47
|
+
);
|
|
48
|
+
@include meta.load-css(
|
|
49
|
+
"~@faststore/ui/src/components/molecules/ProductPrice/styles.scss"
|
|
50
|
+
);
|
|
51
|
+
@include meta.load-css(
|
|
52
|
+
"~@faststore/ui/src/components/organisms/EmptyState/styles.scss"
|
|
53
|
+
);
|
|
54
|
+
@include meta.load-css(
|
|
55
|
+
"~@faststore/ui/src/components/organisms/SlideOver/styles.scss"
|
|
56
|
+
);
|
|
57
|
+
@include meta.load-css(
|
|
58
|
+
"~@faststore/ui/src/components/organisms/CartSidebar/styles.scss"
|
|
59
|
+
);
|
|
24
60
|
|
|
25
61
|
[data-fs-organization-drawer] {
|
|
26
|
-
--fs-organization-drawer-header-contract-color: #cbe9ff;
|
|
27
|
-
--fs-organization-drawer-body-link-color: #f5f5f5;
|
|
28
|
-
|
|
29
62
|
display: flex;
|
|
30
63
|
flex-direction: column;
|
|
31
64
|
|
|
65
|
+
// Menu view wrapper (position: relative anchors the absolute footer card)
|
|
66
|
+
[data-fs-organization-drawer-menu] {
|
|
67
|
+
position: relative;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex: 1;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
min-height: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
[data-fs-organization-drawer-menu-scroll] {
|
|
75
|
+
flex: 1;
|
|
76
|
+
padding-bottom: 160px;
|
|
77
|
+
overflow-y: auto;
|
|
78
|
+
}
|
|
79
|
+
|
|
32
80
|
// Header
|
|
33
81
|
[data-fs-slide-over-header] {
|
|
34
|
-
--fs-slide-over-header-height:
|
|
35
|
-
--fs-slide-over-header-bkg: #
|
|
82
|
+
--fs-slide-over-header-height: 3.75rem; // 60px (Figma 103:5442)
|
|
83
|
+
--fs-slide-over-header-bkg-color: #f8f8f8;
|
|
36
84
|
|
|
37
85
|
flex-direction: row;
|
|
38
|
-
align-items:
|
|
86
|
+
align-items: center;
|
|
39
87
|
justify-content: flex-end;
|
|
40
88
|
height: var(--fs-slide-over-header-height);
|
|
41
|
-
padding: var(--fs-spacing-2);
|
|
42
|
-
|
|
89
|
+
padding: 0 var(--fs-spacing-2);
|
|
90
|
+
|
|
91
|
+
[data-fs-slide-over-header-icon] {
|
|
92
|
+
margin-inline-start: auto;
|
|
93
|
+
}
|
|
43
94
|
}
|
|
44
95
|
|
|
45
96
|
[data-fs-organization-drawer-header] {
|
|
46
97
|
display: flex;
|
|
47
|
-
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
gap: var(--fs-spacing-1);
|
|
100
|
+
padding: 0 var(--fs-spacing-6) var(--fs-spacing-3);
|
|
101
|
+
|
|
102
|
+
// Gray band stops mid-avatar (Figma: 60px top bar + 40px = 100px),
|
|
103
|
+
// so the avatar overlaps it and the contract name sits on white.
|
|
104
|
+
background:
|
|
105
|
+
linear-gradient(
|
|
106
|
+
to bottom,
|
|
107
|
+
#f8f8f8 2.5rem,
|
|
108
|
+
transparent 2.5rem
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-fs-organization-drawer-header-row] {
|
|
113
|
+
display: flex;
|
|
114
|
+
gap: var(--fs-spacing-3);
|
|
115
|
+
align-items: center;
|
|
48
116
|
justify-content: space-between;
|
|
49
|
-
|
|
117
|
+
width: 100%;
|
|
118
|
+
margin-top: var(--fs-spacing-1);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
[data-fs-organization-drawer-header-actions] {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
gap: var(--fs-spacing-3);
|
|
125
|
+
align-items: center;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[data-fs-organization-drawer-header-default] {
|
|
129
|
+
flex-shrink: 0;
|
|
130
|
+
color: var(--fs-color-link);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[data-fs-organization-drawer-header-change] {
|
|
134
|
+
--fs-button-border-radius: var(--fs-border-radius-pill);
|
|
135
|
+
--fs-button-secondary-text-color: var(--fs-color-link);
|
|
136
|
+
--fs-button-secondary-bkg-color: transparent;
|
|
137
|
+
--fs-button-secondary-bkg-color-hover: var(--fs-color-neutral-1);
|
|
138
|
+
--fs-button-secondary-border-color: var(--fs-border-color-light);
|
|
139
|
+
--fs-button-secondary-border-color-hover: var(--fs-border-color-light);
|
|
140
|
+
--fs-button-secondary-text-color-hover: var(--fs-color-link);
|
|
141
|
+
--fs-button-height: var(--fs-spacing-6);
|
|
142
|
+
--fs-button-text-size: var(--fs-text-size-1);
|
|
143
|
+
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Contract switcher (sub-view) — replaces the whole drawer body while open.
|
|
148
|
+
[data-fs-contract-switcher] {
|
|
149
|
+
--fs-contract-switcher-avatar-size:
|
|
150
|
+
calc(
|
|
151
|
+
var(--fs-spacing-4) + var(--fs-spacing-0)
|
|
152
|
+
);
|
|
153
|
+
--fs-contract-switcher-row-min-height: var(--fs-spacing-8);
|
|
154
|
+
--fs-contract-switcher-option-selected-bkg: #f4faff;
|
|
155
|
+
--fs-contract-switcher-search-bkg: var(--fs-color-neutral-1);
|
|
156
|
+
|
|
157
|
+
display: flex;
|
|
158
|
+
flex: 1;
|
|
159
|
+
flex-direction: column;
|
|
160
|
+
min-height: 0;
|
|
161
|
+
|
|
162
|
+
// Header: back / title / close
|
|
163
|
+
[data-fs-contract-switcher-header] {
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-shrink: 0;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: space-between;
|
|
168
|
+
padding: var(--fs-spacing-1) var(--fs-spacing-2);
|
|
169
|
+
border-bottom:
|
|
170
|
+
var(--fs-border-width) solid
|
|
171
|
+
var(--fs-border-color-light);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
[data-fs-contract-switcher-title] {
|
|
175
|
+
flex: 1;
|
|
176
|
+
padding: 0 var(--fs-spacing-2);
|
|
177
|
+
font-size: var(--fs-text-size-3);
|
|
178
|
+
font-weight: var(--fs-text-weight-semibold);
|
|
179
|
+
color: var(--fs-color-text);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Scrollable content
|
|
183
|
+
[data-fs-contract-switcher-content] {
|
|
184
|
+
display: flex;
|
|
185
|
+
flex: 1;
|
|
186
|
+
flex-direction: column;
|
|
187
|
+
gap: var(--fs-spacing-3);
|
|
188
|
+
min-height: 0;
|
|
189
|
+
padding: var(--fs-spacing-6);
|
|
190
|
+
overflow-y: auto;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
[data-fs-contract-switcher-loading] {
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
justify-content: center;
|
|
197
|
+
padding: var(--fs-spacing-6) 0;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
[data-fs-contract-switcher-message] {
|
|
201
|
+
font-size: var(--fs-text-size-1);
|
|
202
|
+
color: var(--fs-color-text-light);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// Current session
|
|
206
|
+
[data-fs-contract-switcher-label] {
|
|
207
|
+
display: block;
|
|
208
|
+
margin-bottom: var(--fs-spacing-1);
|
|
209
|
+
font-size: var(--fs-text-size-0);
|
|
210
|
+
color: var(--fs-color-text-light);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
[data-fs-contract-switcher-current-card] {
|
|
214
|
+
display: flex;
|
|
215
|
+
gap: var(--fs-spacing-2);
|
|
216
|
+
align-items: center;
|
|
217
|
+
min-height: var(--fs-contract-switcher-row-min-height);
|
|
218
|
+
padding: var(--fs-spacing-2);
|
|
219
|
+
border: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
220
|
+
border-radius: var(--fs-border-radius);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Avatar (initial)
|
|
224
|
+
[data-fs-contract-switcher-avatar] {
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-shrink: 0;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
width: var(--fs-contract-switcher-avatar-size);
|
|
230
|
+
height: var(--fs-contract-switcher-avatar-size);
|
|
231
|
+
font-size: var(--fs-text-size-0);
|
|
232
|
+
font-weight: var(--fs-text-weight-bold);
|
|
233
|
+
color: var(--fs-color-neutral-0);
|
|
234
|
+
background-color: var(--fs-color-neutral-7);
|
|
235
|
+
border-radius: var(--fs-border-radius-circle);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
[data-fs-contract-switcher-count] {
|
|
239
|
+
font-size: var(--fs-text-size-1);
|
|
240
|
+
color: var(--fs-color-text);
|
|
241
|
+
|
|
242
|
+
strong {
|
|
243
|
+
font-weight: var(--fs-text-weight-medium);
|
|
244
|
+
color: var(--fs-color-link);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Search
|
|
249
|
+
[data-fs-contract-switcher-search] {
|
|
250
|
+
display: flex;
|
|
251
|
+
gap: var(--fs-spacing-2);
|
|
252
|
+
align-items: center;
|
|
253
|
+
min-height: var(--fs-spacing-6);
|
|
254
|
+
padding: 0 var(--fs-spacing-3);
|
|
255
|
+
background-color: var(--fs-contract-switcher-search-bkg);
|
|
256
|
+
border: var(--fs-border-width) solid transparent;
|
|
257
|
+
border-radius: var(--fs-border-radius-pill);
|
|
258
|
+
|
|
259
|
+
&:focus-within {
|
|
260
|
+
background-color: var(--fs-color-neutral-0);
|
|
261
|
+
border-color: var(--fs-border-color-active);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
input {
|
|
265
|
+
flex: 1;
|
|
266
|
+
font-size: var(--fs-text-size-1);
|
|
267
|
+
color: var(--fs-color-text);
|
|
268
|
+
background-color: transparent;
|
|
269
|
+
border: none;
|
|
270
|
+
outline: none;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
[data-fs-contract-switcher-search-clear] {
|
|
275
|
+
display: flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
justify-content: center;
|
|
278
|
+
color: var(--fs-color-text-light);
|
|
279
|
+
cursor: pointer;
|
|
280
|
+
background-color: transparent;
|
|
281
|
+
border: none;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Alternatives list
|
|
285
|
+
[data-fs-contract-switcher-list] {
|
|
286
|
+
display: flex;
|
|
287
|
+
flex-direction: column;
|
|
288
|
+
gap: var(--fs-spacing-1);
|
|
289
|
+
padding: 0;
|
|
290
|
+
margin: 0;
|
|
291
|
+
list-style: none;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
[data-fs-contract-switcher-option] {
|
|
295
|
+
display: flex;
|
|
296
|
+
gap: var(--fs-spacing-2);
|
|
297
|
+
align-items: center;
|
|
298
|
+
width: 100%;
|
|
299
|
+
min-height: var(--fs-contract-switcher-row-min-height);
|
|
300
|
+
padding: var(--fs-spacing-2);
|
|
301
|
+
font-size: var(--fs-text-size-1);
|
|
302
|
+
font-weight: var(--fs-text-weight-medium);
|
|
303
|
+
color: var(--fs-color-text);
|
|
304
|
+
text-align: left;
|
|
305
|
+
cursor: pointer;
|
|
306
|
+
background-color: transparent;
|
|
307
|
+
border: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
308
|
+
border-radius: var(--fs-border-radius);
|
|
309
|
+
|
|
310
|
+
&:hover:not([disabled]) {
|
|
311
|
+
background-color: var(--fs-color-neutral-1);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&[data-fs-contract-switcher-option-selected="true"] {
|
|
315
|
+
background-color: var(--fs-contract-switcher-option-selected-bkg);
|
|
316
|
+
border-color: var(--fs-border-color-active);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&[disabled] {
|
|
320
|
+
cursor: default;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
[data-fs-contract-switcher-option-name] {
|
|
325
|
+
flex: 1;
|
|
326
|
+
overflow: hidden;
|
|
327
|
+
text-overflow: ellipsis;
|
|
328
|
+
white-space: nowrap;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
[data-fs-contract-switcher-default] {
|
|
332
|
+
flex-shrink: 0;
|
|
333
|
+
color: var(--fs-color-link);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// Footer: Cancel / Confirm
|
|
337
|
+
[data-fs-contract-switcher-footer] {
|
|
338
|
+
display: flex;
|
|
339
|
+
flex-shrink: 0;
|
|
340
|
+
gap: var(--fs-spacing-2);
|
|
341
|
+
align-items: center;
|
|
342
|
+
justify-content: flex-end;
|
|
343
|
+
padding: var(--fs-spacing-4) var(--fs-spacing-6);
|
|
344
|
+
background-color: var(--fs-color-neutral-0);
|
|
345
|
+
border-top: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
346
|
+
}
|
|
50
347
|
}
|
|
51
348
|
|
|
52
349
|
[data-fs-organization-drawer-header-contract-link] {
|
|
53
|
-
|
|
350
|
+
width: fit-content;
|
|
351
|
+
text-decoration: none;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
[data-fs-organization-drawer-header-contract-name-link] {
|
|
355
|
+
min-width: 0;
|
|
54
356
|
text-decoration: none;
|
|
55
357
|
}
|
|
56
358
|
|
|
57
359
|
[data-fs-organization-drawer-header-contract-name] {
|
|
58
|
-
|
|
360
|
+
margin: 0;
|
|
59
361
|
font-size: var(--fs-text-size-3);
|
|
60
|
-
font-weight: var(--fs-text-weight-
|
|
362
|
+
font-weight: var(--fs-text-weight-semibold);
|
|
61
363
|
color: var(--fs-color-text);
|
|
62
364
|
text-decoration: none;
|
|
63
|
-
|
|
64
|
-
transition: all 1s ease;
|
|
365
|
+
letter-spacing: -0.04em;
|
|
65
366
|
}
|
|
66
367
|
|
|
67
|
-
[data-fs-organization-drawer-header-contract-name]:hover {
|
|
368
|
+
[data-fs-organization-drawer-header-contract-name-link]:hover [data-fs-organization-drawer-header-contract-name] {
|
|
68
369
|
text-decoration: underline;
|
|
69
370
|
}
|
|
70
371
|
|
|
@@ -72,53 +373,150 @@
|
|
|
72
373
|
display: flex;
|
|
73
374
|
align-items: center;
|
|
74
375
|
justify-content: center;
|
|
75
|
-
width:
|
|
76
|
-
height:
|
|
376
|
+
width: 3.75rem;
|
|
377
|
+
height: 3.75rem;
|
|
77
378
|
overflow: hidden;
|
|
78
|
-
color: var(--fs-
|
|
79
|
-
background-color:
|
|
80
|
-
border: var(--fs-border-
|
|
81
|
-
border-radius: var(--fs-border-radius-pill);
|
|
379
|
+
color: var(--fs-color-neutral-0);
|
|
380
|
+
background-color: #000;
|
|
381
|
+
border-radius: var(--fs-border-radius-circle);
|
|
82
382
|
|
|
83
383
|
[data-fs-organization-drawer-header-contract-image-fallback] {
|
|
84
|
-
font-size: var(--fs-text-size-
|
|
85
|
-
font-weight: var(--fs-text-weight-
|
|
384
|
+
font-size: var(--fs-text-size-3);
|
|
385
|
+
font-weight: var(--fs-text-weight-semibold);
|
|
86
386
|
}
|
|
87
387
|
}
|
|
88
388
|
|
|
89
389
|
// Body
|
|
90
390
|
[data-fs-organization-drawer-body] {
|
|
91
391
|
flex: 1;
|
|
92
|
-
padding: var(--fs-spacing-2) var(--fs-spacing-
|
|
392
|
+
padding: var(--fs-spacing-2) var(--fs-spacing-5) var(--fs-spacing-3);
|
|
93
393
|
|
|
94
394
|
[data-fs-organization-drawer-body-contents] {
|
|
95
395
|
display: grid;
|
|
96
396
|
width: 100%;
|
|
97
397
|
|
|
98
398
|
[data-fs-organization-drawer-body-link] {
|
|
99
|
-
|
|
399
|
+
display: flex;
|
|
400
|
+
align-items: center;
|
|
401
|
+
height: var(--fs-spacing-6);
|
|
402
|
+
padding: 0 calc(var(--fs-spacing-3) + var(--fs-spacing-0));
|
|
100
403
|
font-size: var(--fs-text-size-1);
|
|
101
|
-
font-weight: var(--fs-text-weight-
|
|
102
|
-
|
|
103
|
-
color: var(--fs-color-neutral-7);
|
|
404
|
+
font-weight: var(--fs-text-weight-medium);
|
|
405
|
+
color: var(--fs-color-text-light);
|
|
104
406
|
text-decoration: none;
|
|
105
407
|
border-radius: var(--fs-border-radius-pill);
|
|
106
408
|
}
|
|
107
409
|
|
|
108
410
|
[data-fs-organization-drawer-body-link]:hover {
|
|
411
|
+
color: var(--fs-color-text);
|
|
109
412
|
text-decoration: none;
|
|
110
|
-
background-color: var(--fs-
|
|
111
|
-
transition: all 0.5s ease;
|
|
413
|
+
background-color: var(--fs-color-neutral-1);
|
|
112
414
|
}
|
|
113
415
|
}
|
|
114
416
|
}
|
|
115
417
|
|
|
116
|
-
// Footer
|
|
117
|
-
[data-fs-organization-drawer-footer
|
|
118
|
-
|
|
418
|
+
// Footer card (absolute, anchored inside data-fs-organization-drawer-menu)
|
|
419
|
+
[data-fs-organization-drawer-footer] {
|
|
420
|
+
position: absolute;
|
|
421
|
+
right: var(--fs-spacing-6);
|
|
422
|
+
bottom: var(--fs-spacing-6);
|
|
423
|
+
left: var(--fs-spacing-6);
|
|
424
|
+
z-index: 1;
|
|
425
|
+
overflow: hidden;
|
|
426
|
+
background-color: var(--fs-color-neutral-0);
|
|
427
|
+
border: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
428
|
+
border-radius: 4px;
|
|
429
|
+
}
|
|
119
430
|
|
|
120
|
-
|
|
121
|
-
|
|
431
|
+
[data-fs-organization-drawer-footer-org] {
|
|
432
|
+
display: flex;
|
|
433
|
+
align-items: center;
|
|
434
|
+
justify-content: space-between;
|
|
435
|
+
padding: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
|
|
436
|
+
border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
[data-fs-organization-drawer-footer-org-info] {
|
|
440
|
+
display: flex;
|
|
441
|
+
gap: var(--fs-spacing-1);
|
|
442
|
+
align-items: center;
|
|
443
|
+
min-width: 0;
|
|
444
|
+
overflow: hidden;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
[data-fs-organization-drawer-footer-org-icon] {
|
|
448
|
+
flex-shrink: 0;
|
|
449
|
+
color: var(--fs-color-link);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
[data-fs-organization-drawer-footer-org-name] {
|
|
453
|
+
overflow: hidden;
|
|
454
|
+
font-size: var(--fs-text-size-1);
|
|
455
|
+
font-weight: var(--fs-text-weight-medium);
|
|
456
|
+
color: var(--fs-color-text);
|
|
457
|
+
text-overflow: ellipsis;
|
|
458
|
+
white-space: nowrap;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
[data-fs-organization-drawer-footer-manage] {
|
|
462
|
+
flex-shrink: 0;
|
|
463
|
+
margin-left: var(--fs-spacing-1);
|
|
464
|
+
font-size: var(--fs-text-size-1);
|
|
465
|
+
font-weight: var(--fs-text-weight-medium);
|
|
466
|
+
color: var(--fs-color-link);
|
|
467
|
+
text-decoration: none;
|
|
468
|
+
|
|
469
|
+
&:hover {
|
|
470
|
+
text-decoration: underline;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
[data-fs-organization-drawer-footer-user] {
|
|
475
|
+
display: flex;
|
|
476
|
+
align-items: center;
|
|
477
|
+
justify-content: space-between;
|
|
478
|
+
padding: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
[data-fs-organization-drawer-footer-user-info] {
|
|
482
|
+
display: flex;
|
|
483
|
+
flex-direction: column;
|
|
484
|
+
gap: var(--fs-spacing-0);
|
|
485
|
+
min-width: 0;
|
|
486
|
+
overflow: hidden;
|
|
487
|
+
|
|
488
|
+
p {
|
|
489
|
+
margin: 0;
|
|
490
|
+
overflow: hidden;
|
|
491
|
+
font-size: var(--fs-text-size-1);
|
|
492
|
+
font-weight: var(--fs-text-weight-medium);
|
|
493
|
+
text-overflow: ellipsis;
|
|
494
|
+
white-space: nowrap;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
[data-fs-organization-drawer-footer-user-name] {
|
|
499
|
+
color: var(--fs-color-text);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
[data-fs-organization-drawer-footer-user-email] {
|
|
503
|
+
color: var(--fs-color-text-light);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
[data-fs-organization-drawer-footer-logout] {
|
|
507
|
+
flex-shrink: 0;
|
|
508
|
+
|
|
509
|
+
[data-fs-button-wrapper] {
|
|
510
|
+
width: var(--fs-spacing-6);
|
|
511
|
+
height: var(--fs-spacing-6);
|
|
512
|
+
padding: 0;
|
|
513
|
+
color: var(--fs-color-text);
|
|
514
|
+
border-color: transparent;
|
|
515
|
+
border-radius: var(--fs-border-radius-circle);
|
|
516
|
+
|
|
517
|
+
&:hover {
|
|
518
|
+
background-color: var(--fs-color-neutral-1);
|
|
519
|
+
}
|
|
122
520
|
}
|
|
123
521
|
}
|
|
124
522
|
}
|
|
@@ -44,6 +44,14 @@ const ShoppingAssistant = dynamic(
|
|
|
44
44
|
{ ssr: false }
|
|
45
45
|
)
|
|
46
46
|
|
|
47
|
+
const RecommendationShelf = dynamic(
|
|
48
|
+
() =>
|
|
49
|
+
import(
|
|
50
|
+
/* webpackChunkName: "RecommendationShelf" */ 'src/components/sections/RecommendationShelf'
|
|
51
|
+
).then((mod) => mod.RecommendationShelf),
|
|
52
|
+
{ ssr: false }
|
|
53
|
+
)
|
|
54
|
+
|
|
47
55
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
48
56
|
[getComponentKey(Alert, 'Alert')]: Alert,
|
|
49
57
|
[getComponentKey(Navbar, 'Navbar')]: Navbar,
|
|
@@ -54,6 +62,8 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
|
54
62
|
[getComponentKey(RegionSlider, 'RegionSlider')]: RegionSlider, // out of viewport
|
|
55
63
|
[getComponentKey(Footer, 'Footer')]: Footer, // out of viewport
|
|
56
64
|
[getComponentKey(ShoppingAssistant, 'ShoppingAssistant')]: ShoppingAssistant,
|
|
65
|
+
[getComponentKey(RecommendationShelf, 'RecommendationShelf')]:
|
|
66
|
+
RecommendationShelf,
|
|
57
67
|
...PLUGINS_COMPONENTS,
|
|
58
68
|
...CUSTOM_COMPONENTS,
|
|
59
69
|
}
|
|
@@ -40,7 +40,7 @@ function ProductGallerySection({
|
|
|
40
40
|
const [title, searchTerm] = isSearchPage(context)
|
|
41
41
|
? [context?.data?.title, context?.data?.searchTerm]
|
|
42
42
|
: isPLP(context)
|
|
43
|
-
? [context?.data?.collection?.seo?.title]
|
|
43
|
+
? [(context as PLPContext)?.data?.collection?.seo?.title]
|
|
44
44
|
: ['']
|
|
45
45
|
|
|
46
46
|
const totalCount = context?.data?.search?.products?.pageInfo?.totalCount ?? 0
|