@commercetools-frontend/experimental-components 7.2.3 → 8.0.0

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.
@@ -12,5 +12,8 @@ declare namespace Button {
12
12
  isDisabled: any;
13
13
  children: any;
14
14
  'aria-label': any;
15
+ variant: any;
16
+ fullWidth: any;
17
+ isAlt: any;
15
18
  };
16
19
  }
@@ -5,24 +5,27 @@ export type CarouselItem = {
5
5
  /** An identifier used to create keys */
6
6
  id: string;
7
7
  /** The source URL for the main image content. Should be 384px x 200px. */
8
- imgSrc: string;
8
+ imgSrc?: string;
9
9
  /** An alt message for image accessibility */
10
- imgAlt: MessageDescriptor;
10
+ imgAlt?: MessageDescriptor;
11
11
  /** The label of the header stamp */
12
- stampLabel: MessageDescriptor;
12
+ stampLabel?: MessageDescriptor;
13
13
  /** UI-Kit-compatible color for the header stamp */
14
- stampTone: React.ComponentProps<typeof Stamp>['tone'];
14
+ stampTone?: React.ComponentProps<typeof Stamp>['tone'];
15
15
  /** Text of the carousel slide. Shouldn't exceed ~70 characters. */
16
16
  textContent: MessageDescriptor;
17
17
  /** Where the content should redirect to on user click */
18
- linkTo: (projectKey?: string) => string;
18
+ linkTo?: (projectKey?: string) => string;
19
19
  /** Governs whether the redirection happens outside of the Merchant Center. */
20
- isExternal: boolean;
20
+ isExternal?: boolean;
21
21
  /** Feature flag to control visibility of the item */
22
22
  flag?: string;
23
23
  };
24
24
  type CarouselProps = {
25
25
  items: CarouselItem[];
26
+ fullWidth?: boolean;
27
+ borderless?: boolean;
28
+ hasPadding?: boolean;
26
29
  };
27
- declare const Carousel: ({ items }: CarouselProps) => import("@emotion/react/jsx-runtime").JSX.Element;
30
+ declare const Carousel: ({ items, fullWidth, borderless, hasPadding, }: CarouselProps) => import("@emotion/react/jsx-runtime").JSX.Element;
28
31
  export default Carousel;
@@ -12,7 +12,6 @@ export class SearchInput extends Component<any, any, any> {
12
12
  throttleMS: any;
13
13
  onChange: any;
14
14
  disabled: any;
15
- enableDisabledStyle: any;
16
15
  isGranular: any;
17
16
  shouldClearOnSubmit: any;
18
17
  inputRef: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/experimental-components",
3
- "version": "7.2.3",
3
+ "version": "8.0.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,10 +33,10 @@
33
33
  "@commercetools-frontend/l10n": "24.2.1",
34
34
  "@commercetools-frontend/sdk": "24.2.1",
35
35
  "@commercetools-frontend/sentry": "24.2.1",
36
- "@commercetools-frontend/ui-kit": "20.2.1",
37
- "@commercetools-uikit/design-system": "20.2.1",
38
- "@commercetools-uikit/select-utils": "20.2.1",
39
- "@commercetools-uikit/utils": "20.2.1",
36
+ "@commercetools-frontend/ui-kit": "20.2.2",
37
+ "@commercetools-uikit/design-system": "20.2.2",
38
+ "@commercetools-uikit/select-utils": "20.2.2",
39
+ "@commercetools-uikit/utils": "20.2.2",
40
40
  "@emotion/react": "11.14.0",
41
41
  "@hello-pangea/dnd": "^18.0.1",
42
42
  "classnames": "2.5.1",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "@apollo/client": "3.12.4",
64
- "@commercetools/composable-commerce-test-data": "13.0.0",
64
+ "@commercetools/composable-commerce-test-data": "13.2.0",
65
65
  "@testing-library/react": "16.1.0",
66
66
  "@types/debounce-promise": "3.1.9",
67
67
  "@types/jest": "^29.5.2",
@@ -80,8 +80,8 @@
80
80
  "react-test-renderer": "17.0.2",
81
81
  "redux": "4.2.1",
82
82
  "typescript": "5.2.2",
83
- "@commercetools-local/test-utils": "1.2.22",
84
- "@commercetools-local/test-data": "1.2.22"
83
+ "@commercetools-local/test-data": "1.2.22",
84
+ "@commercetools-local/test-utils": "1.2.22"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@apollo/client": "3.x",
package/dist/styles.css DELETED
@@ -1,612 +0,0 @@
1
- /* imported from selectable-field-search-input.module.css */
2
-
3
- .selectable-field-search-input-module__container___z2ltR {
4
- width: 100%;
5
- position: relative;
6
- display: flex;
7
- z-index: 3;
8
- max-width: var(--constraint-15);
9
- }
10
-
11
- .selectable-field-search-input-module__search-mode-menu___Od6Le {
12
- border-radius: var(--border-radius-6);
13
- border: 1px solid var(--color-primary);
14
- margin-top: 2px;
15
- position: absolute;
16
- }
17
- /* imported from required-indicator.module.css */
18
-
19
- .required-indicator-module__colored____YUFm {
20
- color: var(--color-warning);
21
- }
22
-
23
- .required-indicator-module__indicatorAsterisk___3lEdX {
24
- font-style: normal;
25
- margin-left: 2px;
26
- }
27
- /* imported from validated-input.module.css */
28
-
29
- .validated-input-module__invalid___380EL {
30
- /* this needs !important because react-select has a :focus style that
31
- stops the border colour being set unless the element is blurred */
32
- border-color: var(--color-error) !important;
33
- }
34
-
35
- .validated-input-module__container___3L2KB {
36
- display: inline;
37
- }
38
- /* imported from store-select-input.module.css */
39
-
40
- .store-select-input-module__customOption___2SC00 {
41
- margin-top: 10px;
42
- }
43
- /* imported from label-range.module.css */
44
-
45
- .label-range-module__label___3Tb0p {
46
- font-size: 0.9rem;
47
- font-weight: bold;
48
- }
49
- /* imported from multi-value-search-input.module.css */
50
-
51
- .multi-value-search-input-module__container___2u64d {
52
- position: relative;
53
- }
54
-
55
- .multi-value-search-input-module__searchInput___363nj input {
56
- border-color: var(--border-color-for-input);
57
- }
58
-
59
- .multi-value-search-input-module__searchInput___363nj input::placeholder {
60
- color: var(--font-color-for-input-when-disabled);
61
- }
62
-
63
- .multi-value-search-input-module__submittingTip___2339U {
64
- margin-top: var(--spacing-xs);
65
- background: var(--background-color-for-input);
66
- border: solid 1px var(--border-color-for-input-when-focused);
67
- border-radius: var(--border-radius-for-input);
68
- position: relative;
69
- cursor: default;
70
- }
71
-
72
- .multi-value-search-input-module__submitting-tip-single___1LcNy {
73
- padding: var(--spacing-s);
74
- color: var(--font-color-for-input-when-disabled);
75
- }
76
-
77
- .multi-value-search-input-module__submitting-tip-content___IyuVb {
78
- padding: var(--spacing-s);
79
- }
80
-
81
- .multi-value-search-input-module__submitting-tip-content-separate___3Y_CI {
82
- padding-top: var(--spacing-s);
83
- }
84
-
85
- .multi-value-search-input-module__submitting-tip-content-hoverable___2TK6S:hover {
86
- background-color: var(--color-neutral-95);
87
- border-radius: var(--border-radius-for-input);
88
- }
89
-
90
- .multi-value-search-input-module__submitting-tip-content-separate-hoverable___3VUnV:hover {
91
- background-color: var(--color-neutral-95);
92
- border-bottom-left-radius: var(--border-radius-for-input);
93
- border-bottom-right-radius: var(--border-radius-for-input);
94
- }
95
- /* imported from numeric-format-input.module.css */
96
-
97
- .numeric-format-input-module__invalid___3LcyE {
98
- /* this needs !important because react-select has a :focus style that
99
- stops the border colour being set unless the element is blurred */
100
- border-color: var(--color-error) !important;
101
- border: 1px solid;
102
- }
103
-
104
- .numeric-format-input-module__disabled___hb6h4 {
105
- cursor: not-allowed;
106
- }
107
- /* imported from search-input.module.css */
108
-
109
- .search-input-module__block___1uM-y {
110
- display: inline-flex;
111
- flex-direction: row;
112
- align-items: flex-start;
113
- width: 100%;
114
- max-width: 800px;
115
- }
116
-
117
- .search-input-module__container___9u6if {
118
- position: relative;
119
- flex-grow: 1;
120
- }
121
-
122
- .search-input-module__input-container___mJnyZ {
123
- border-color: var(--border-color-for-input);
124
- height: var(--height-for-input);
125
- }
126
-
127
- .search-input-module__input-container___mJnyZ > input::placeholder {
128
- font-weight: var(--font-weight-400);
129
- font-size: 1rem;
130
- font-family: var(--font-family);
131
- color: var(--color-neutral-60);
132
- }
133
-
134
- .search-input-module__input-container___mJnyZ > input {
135
- padding-right: calc(var(--spacing-xl) * 2);
136
- }
137
-
138
- .search-input-module__input-container-disabled___23jR8 > input {
139
- border-color: var(--color-neutral);
140
- }
141
-
142
- .search-input-module__input-container-hoverable___1xjqn > input:hover {
143
- border: 1px solid var(--border-color-for-input);
144
- background-color: var(--background-color-for-input-when-hovered);
145
- }
146
- .search-input-module__input-container-hoverable___1xjqn > input:focus {
147
- box-shadow: var(
148
- --shadow-for-input-when-focused,
149
- inset 0 0 0 1px var(--color-primary)
150
- );
151
- border-color: var(--border-color-for-input-when-focused);
152
- }
153
-
154
- .search-input-module__input-container-granular___33Pm- {
155
- border-color: var(--color-primary);
156
- position: relative;
157
- right: 3px;
158
- }
159
-
160
- .search-input-module__search-icon-container___cbHQY {
161
- background-color: transparent;
162
- border-color: transparent;
163
- position: absolute;
164
- right: 9px;
165
- top: 8px;
166
- }
167
-
168
- .search-input-module__clear-icon-container___3RQvu {
169
- background-color: transparent;
170
- border-color: transparent;
171
- position: absolute;
172
- right: 36px;
173
- top: 11px;
174
- z-index: 2;
175
- }
176
-
177
- .search-input-module__clear-icon-container-granular___1mbin {
178
- right: 41px;
179
- }
180
-
181
- .search-input-module__search-icon-container-hoverable___1kTwJ {
182
- cursor: pointer;
183
- }
184
-
185
- .search-input-module__search-icon-container-granular___3fAsR {
186
- right: 15px;
187
- }
188
-
189
- .search-input-module__hidden___z07GX {
190
- display: none !important;
191
- }
192
-
193
- .search-input-module__action___1GqGT {
194
- flex-shrink: 1;
195
- margin-left: var(--spacing-s);
196
- }
197
- /* imported from throttled-field.module.css */
198
-
199
- .throttled-field-module__size___324jx {
200
- width: 100%;
201
- }
202
-
203
- .throttled-field-module__size___324jx {
204
- min-height: var(--height-for-input);
205
- }
206
-
207
- .throttled-field-module__input-text___3zFFp {
208
- transition: 0.2s ease;
209
- border-radius: 6px;
210
- border-style: solid;
211
- border-width: 1px;
212
- color: var(--color-solid);
213
- font-weight: 500;
214
- font-size: 1rem;
215
- font-family: 'Open Sans', sans-serif !important;
216
- padding: 7.5px 10px;
217
- outline: none;
218
- box-shadow: none;
219
- appearance: none;
220
- }
221
-
222
- .throttled-field-module__input-secondary___cFo9e {
223
- background-color: var(--color-neutral-95);
224
- border-color: var(--color-surface);
225
- width: 100%;
226
- }
227
-
228
- .throttled-field-module__input-primary___26G3R {
229
- border-color: var(--color-neutral);
230
- background-color: var(--color-surface);
231
- }
232
-
233
- .throttled-field-module__textarea___3ZNEs {
234
- width: 100%;
235
- min-height: 36px;
236
- resize: vertical;
237
- }
238
-
239
- .throttled-field-module__textarea-primary___24Wwt {
240
- border-color: var(--color-neutral);
241
- background-color: var(--color-surface);
242
- }
243
-
244
- .throttled-field-module__textarea-secondary___2rmFG {
245
- background-color: var(--color-neutral-95);
246
- border-color: var(--color-surface);
247
- width: 100%;
248
- }
249
-
250
- .throttled-field-module__invalid___1yZLW {
251
- /* this needs !important because react-select has a :focus style that
252
- stops the border colour being set unless the element is blurred */
253
- border-color: var(--color-error) !important;
254
- border: 1px solid;
255
- }
256
-
257
- .throttled-field-module__disabled___qVj79 {
258
- cursor: not-allowed;
259
- background-color: var(--color-accent-98);
260
- color: var(--color-solid);
261
- opacity: 1; /* fix for mobile safari */
262
- }
263
-
264
- .throttled-field-module__granular___2LXJf {
265
- border-top-left-radius: 0;
266
- border-bottom-left-radius: 0;
267
- margin-left: 0;
268
- }
269
- /* imported from button.module.css */
270
-
271
- /* Generic button */
272
-
273
- .button-module__button___1OzVf {
274
- background: var(--color-neutral);
275
- border: none;
276
- border-radius: 6px;
277
- color: var(--color-solid);
278
- cursor: pointer;
279
- display: inline-block;
280
- font-family: 'Open Sans', sans-serif;
281
- font-size: 1rem;
282
- padding: 7px 15px;
283
- transition: background-color var(--transition-linear-80ms);
284
- vertical-align: middle;
285
- min-height: 32px;
286
- }
287
-
288
- /* Specific types of buttons */
289
-
290
- .button-module__cancel___1-jYL {
291
- background: var(--color-surface);
292
- border: 1px solid var(--color-neutral);
293
- }
294
-
295
- .button-module__confirm___-W92x {
296
- background: var(--color-primary);
297
- color: var(--color-surface);
298
- }
299
-
300
- .button-module__save___1-KXp {
301
- color: var(--color-surface) !important;
302
- }
303
-
304
- .button-module__add___1fbPS {
305
- background: var(--color-surface);
306
- border: 1px solid var(--color-neutral);
307
- color: var(--color-solid);
308
- padding: 5.5px 15px 5.5px 10px;
309
- }
310
-
311
- .button-module__add-url___1e6xE {
312
- }
313
-
314
- .button-module__icon-add___2X7fc {
315
- color: var(--color-neutral-60);
316
- float: left;
317
- font-size: 1rem;
318
- margin: 3px 10px 0 0;
319
- }
320
-
321
- .button-module__icon-chain___1pvWT {
322
- color: var(--color-neutral-60);
323
- float: left;
324
- font-size: 1.4rem;
325
- margin: 0 10px 0 0;
326
- }
327
-
328
- .button-module__add___1fbPS:hover .button-module__icon-add___2X7fc,
329
- .button-module__add-url___1e6xE:hover .button-module__icon-chain___1pvWT {
330
- color: var(--color-surface);
331
- }
332
-
333
- /* Base of switch buttons */
334
-
335
- .button-module__switch___2bt5z {
336
- background: var(--color-surface);
337
- border: 1px var(--color-neutral) solid;
338
- color: var(--color-solid);
339
- font-weight: 100;
340
- position: relative;
341
- }
342
-
343
- .button-module__switch___2bt5z .button-module__icon___wuw4Z {
344
- color: var(--color-neutral-60);
345
- }
346
-
347
- .button-module__switch___2bt5z:disabled {
348
- color: var(--color-neutral-60);
349
- border-color: var(--color-neutral);
350
- }
351
-
352
- .button-module__switch___2bt5z:hover {
353
- color: var(--color-surface);
354
- border-color: var(--color-info);
355
- background: var(--color-info);
356
- }
357
-
358
- .button-module__switch___2bt5z:hover .button-module__icon___wuw4Z {
359
- color: var(--color-surface);
360
- }
361
-
362
- .button-module__switch--active___1s4ZM {
363
- }
364
-
365
- .button-module__switch___2bt5z:disabled {
366
- background: transparent;
367
- color: var(--color-neutral-60);
368
- }
369
-
370
- .button-module__switch___2bt5z:disabled .button-module__icon___wuw4Z {
371
- color: var(--color-neutral-60);
372
- }
373
-
374
- .button-module__switch___2bt5z:disabled,
375
- .button-module__switch--active___1s4ZM:disabled {
376
- opacity: 1; /* exception for disabled switch button */
377
- user-select: none;
378
- cursor: default;
379
- }
380
-
381
- .button-module__switch--active___1s4ZM:disabled .button-module__icon___wuw4Z,
382
- .button-module__switch--active___1s4ZM .button-module__icon___wuw4Z {
383
- color: var(--color-info);
384
- }
385
-
386
- .button-module__switch--active___1s4ZM:disabled {
387
- color: var(--color-info);
388
- border-color: var(--color-info);
389
- }
390
-
391
- /* Switch type squared */
392
-
393
- .button-module__switch-squared___QnrOG {
394
- padding: 4.5px 15px 4.5px 40px;
395
- }
396
-
397
- .button-module__switch-squared--active___2ZbEC {
398
- }
399
-
400
- /* Switch type rounded */
401
-
402
- /* When the button has no text but icon */
403
-
404
- .button-module__switch-rounded___1CBs_ {
405
- padding: 0;
406
- border-width: 1px;
407
- width: 36px;
408
- height: 36px;
409
- border-radius: 36px;
410
- }
411
-
412
- .button-module__switch-rounded--active___2Ckga {
413
- }
414
-
415
- .button-module__switch-rounded___1CBs_ .button-module__switch-label___2FAdy {
416
- display: none;
417
- }
418
-
419
- /* States */
420
-
421
- .button-module__cancel___1-jYL:hover {
422
- border-color: var(--color-primary);
423
- color: var(--color-primary);
424
- }
425
-
426
- .button-module__confirm___-W92x:hover {
427
- background: var(--color-primary-25);
428
- }
429
-
430
- .button-module__add___1fbPS:hover {
431
- background: var(--color-primary);
432
- border-color: var(--color-primary);
433
- color: var(--color-surface);
434
- }
435
-
436
- /* Variations */
437
-
438
- .button-module__disabled___2Azpu {
439
- pointer-events: none;
440
- opacity: 0.5;
441
- }
442
-
443
- .button-module__full___264Zw {
444
- width: 100%;
445
- }
446
-
447
- .button-module__alt___Z6PWx {
448
- color: var(--color-surface);
449
- border-radius: 20px;
450
- border: 2px var(--color-surface) solid;
451
- padding-left: 30px;
452
- padding-right: 30px;
453
- }
454
-
455
- .button-module__confirm-alt___2Zcqz {
456
- border-color: transparent;
457
- }
458
-
459
- .button-module__cancel-alt___u5EAw {
460
- background: none;
461
- }
462
-
463
- .button-module__save-alt___6iHMF {
464
- border-color: transparent;
465
- }
466
-
467
- /* Add Button */
468
-
469
- .button-module__add-button___1f093 {
470
- min-height: 32px;
471
- }
472
- /* imported from file-input.module.css */
473
-
474
- /** Button */
475
-
476
- .file-input-module__button___2KypN {
477
- display: inline-flex;
478
- background-color: var(--color-surface);
479
- border: 1px solid var(--color-neutral);
480
- box-shadow: none;
481
- border-radius: var(--border-radius-4);
482
- color: var(--color-solid);
483
- height: var(--height-for-button-as-big);
484
- font-size: var(--font-size-20);
485
- font-weight: var(--font-weight-500);
486
- align-items: center;
487
- transition: background-color var(--transition-linear-80ms);
488
- padding: 0 var(--spacing-m);
489
- }
490
-
491
- .file-input-module__button___2KypN:hover,
492
- .file-input-module__button___2KypN:focus {
493
- cursor: pointer;
494
- background-color: var(--background-color-for-button-when-hovered);
495
- box-shadow: none;
496
- }
497
-
498
- .file-input-module__button___2KypN:active {
499
- box-shadow: var(--shadow-9);
500
- background-color: var(--color-surface);
501
- }
502
-
503
- .file-input-module__input___3MP4D {
504
- visibility: hidden;
505
- width: 1px;
506
- height: 1px;
507
- }
508
- /* imported from custom-money-input.module.css */
509
-
510
- .custom-money-input-module__container___1fdO2 {
511
- width: 100%;
512
- }
513
- /* imported from centered-loading-spinner.module.css */
514
-
515
- .centered-loading-spinner-module__loading-container___3_9-h {
516
- height: 100%;
517
- display: flex;
518
- flex-grow: 1;
519
- align-items: center;
520
- justify-content: center;
521
- }
522
- /* imported from divider.module.css */
523
-
524
- .divider-module__divider___4-vdy {
525
- box-sizing: border-box;
526
- margin: 0;
527
- border: 0;
528
- border-color: var(--color-neutral-90);
529
- }
530
-
531
- .divider-module__divider-horizontal___RuUcj {
532
- width: 100%;
533
- border-top-width: 1px;
534
- }
535
-
536
- .divider-module__divider-vertical___32kJG {
537
- width: 1px;
538
- height: 2vmax;
539
- border-left-width: 1px;
540
- }
541
-
542
- .divider-module__divider-solid___3Fs4q {
543
- border-style: solid;
544
- }
545
-
546
- .divider-module__divider-dashed___2Em8A {
547
- border-style: dashed;
548
- }
549
- /* imported from reference-search.module.css */
550
-
551
- .reference-search-module__container___3-iK3 {
552
- width: 100%;
553
- }
554
-
555
- .reference-search-module__container___3-iK3 > div {
556
- width: 100%;
557
- }
558
-
559
- .reference-search-module__missing-label___az9AO {
560
- color: var(--color-warning);
561
- font-size: 0.9rem;
562
- margin-left: var(--spacing-xs);
563
- }
564
- /* imported from set-buttons.module.css */
565
-
566
- .set-buttons-module__topAlign___3AZwc {
567
- padding-top: var(--spacing-xs);
568
- }
569
-
570
- .set-buttons-module__gap___38Qr0 {
571
- padding: 20px;
572
- }
573
- /* imported from stores-search-selector.module.css */
574
-
575
- .stores-search-selector-module__renderLabelContainer___3_PBc {
576
- display: flex;
577
- flex-direction: column;
578
- justify-content: space-between;
579
- }
580
-
581
- .stores-search-selector-module__customLabel___1Xse8 > div {
582
- border-bottom: 1px solid var(--color-neutral-90) !important;
583
- padding-bottom: 4px;
584
- }
585
-
586
- .stores-search-selector-module__renderLabelContainer___3_PBc div:nth-of-type(2) {
587
- margin-top: 25px;
588
- }
589
-
590
- .stores-search-selector-module__renderLabelContainer___3_PBc div:nth-of-type(1) {
591
- margin-top: -4px;
592
- }
593
- /* imported from platform-limits-customers-status.module.css */
594
-
595
- .platform-limits-customers-status-module__status___3rXYM {
596
- min-width: max-content;
597
- }
598
- /* imported from platform-limits-customers-combined.module.css */
599
-
600
- .platform-limits-customers-combined-module__combined___OszDd {
601
- margin-bottom: var(--spacing-s);
602
- }
603
- /* imported from platform-limits-customer-groups-status.module.css */
604
-
605
- .platform-limits-customer-groups-status-module__status___6099G {
606
- min-width: max-content;
607
- }
608
- /* imported from platform-limits-customer-groups-combined.module.css */
609
-
610
- .platform-limits-customer-groups-combined-module__combined___WjRoI {
611
- margin-bottom: var(--spacing-s);
612
- }