@jumpgroup/jump-design-system 0.3.89 → 0.3.91
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/dist/cjs/jump-card-ecommerce.cjs.entry.js +3 -3
- package/dist/cjs/jump-card-ecommerce.cjs.entry.js.map +1 -1
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.css +47 -0
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js +2 -2
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js.map +1 -1
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js +212 -0
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js.map +1 -1
- package/dist/components/jump-card-ecommerce.js +3 -3
- package/dist/components/jump-card-ecommerce.js.map +1 -1
- package/dist/esm/jump-card-ecommerce.entry.js +3 -3
- package/dist/esm/jump-card-ecommerce.entry.js.map +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/p-34bfbe0b.entry.js +2 -0
- package/dist/jump-design-system/p-34bfbe0b.entry.js.map +1 -0
- package/dist/types/components/jump-card-ecommerce/jump-card-ecommerce.stories.d.ts +4 -0
- package/package.json +1 -1
- package/dist/jump-design-system/p-2e545a70.entry.js +0 -2
- package/dist/jump-design-system/p-2e545a70.entry.js.map +0 -1
|
@@ -388,4 +388,216 @@ export const CardWithAutoSelection = TemplateWithVariations.bind({});
|
|
|
388
388
|
CardWithAutoSelection.args = Object.assign(Object.assign({}, Card.args), { productName: 'T-shirt con selezione automatica', subtitle: 'La prima variazione viene selezionata automaticamente', autoSelectFirstVariation: true });
|
|
389
389
|
export const CardWithoutAutoSelection = TemplateWithVariations.bind({});
|
|
390
390
|
CardWithoutAutoSelection.args = Object.assign(Object.assign({}, Card.args), { productName: 'T-shirt senza selezione automatica', subtitle: 'L\'utente deve selezionare manualmente la variazione', autoSelectFirstVariation: false });
|
|
391
|
+
export const CardArchiveGrid = () => formatHtml(`
|
|
392
|
+
<div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 900px; margin: 0 auto;">
|
|
393
|
+
<jump-card-ecommerce
|
|
394
|
+
product-name="T-shirt Uomo"
|
|
395
|
+
subtitle="Cotone 100%"
|
|
396
|
+
has-favorite="true"
|
|
397
|
+
img="https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1"
|
|
398
|
+
img-alt="T-shirt Uomo"
|
|
399
|
+
price="15"
|
|
400
|
+
sale-price="10"
|
|
401
|
+
badge="In offerta"
|
|
402
|
+
badge-color="secondary"
|
|
403
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
404
|
+
>
|
|
405
|
+
<jump-card-ecommerce-option code="s" label="Small (S)" order="1"></jump-card-ecommerce-option>
|
|
406
|
+
<jump-card-ecommerce-option code="m" label="Medium (M)" order="2"></jump-card-ecommerce-option>
|
|
407
|
+
<jump-card-ecommerce-option code="l" label="Large (L)" order="3"></jump-card-ecommerce-option>
|
|
408
|
+
<jump-quantity label="quantityà" slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
409
|
+
</jump-card-ecommerce>
|
|
410
|
+
<jump-card-ecommerce
|
|
411
|
+
product-name="Felpa Donna"
|
|
412
|
+
subtitle="Felpa con cappuccio"
|
|
413
|
+
img="https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800"
|
|
414
|
+
img-alt="Felpa Donna"
|
|
415
|
+
price="29"
|
|
416
|
+
badge="Novità"
|
|
417
|
+
badge-color="primary"
|
|
418
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
419
|
+
>
|
|
420
|
+
<jump-card-ecommerce-option code="xs" label="XS" order="1"></jump-card-ecommerce-option>
|
|
421
|
+
<jump-card-ecommerce-option code="s" label="S" order="2"></jump-card-ecommerce-option>
|
|
422
|
+
<jump-card-ecommerce-option code="m" label="M" order="3"></jump-card-ecommerce-option>
|
|
423
|
+
<jump-card-ecommerce-option code="l" label="L" order="4"></jump-card-ecommerce-option>
|
|
424
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
425
|
+
</jump-card-ecommerce>
|
|
426
|
+
<jump-card-ecommerce
|
|
427
|
+
product-name="Jeans Slim"
|
|
428
|
+
subtitle="Denim elasticizzato"
|
|
429
|
+
img="https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800"
|
|
430
|
+
img-alt="Jeans Slim"
|
|
431
|
+
price="49"
|
|
432
|
+
badge="Best Seller"
|
|
433
|
+
badge-color="success"
|
|
434
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
435
|
+
>
|
|
436
|
+
<jump-card-ecommerce-option code="30" label="Taglia 30" order="1"></jump-card-ecommerce-option>
|
|
437
|
+
<jump-card-ecommerce-option code="32" label="Taglia 32" order="2"></jump-card-ecommerce-option>
|
|
438
|
+
<jump-card-ecommerce-option code="34" label="Taglia 34" order="3"></jump-card-ecommerce-option>
|
|
439
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
440
|
+
</jump-card-ecommerce>
|
|
441
|
+
<jump-card-ecommerce
|
|
442
|
+
product-name="Giacca Leggera"
|
|
443
|
+
subtitle="Primavera/Estate"
|
|
444
|
+
img="https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800"
|
|
445
|
+
img-alt="Giacca Leggera"
|
|
446
|
+
price="59"
|
|
447
|
+
out-of-stock="true"
|
|
448
|
+
sale-price="45"
|
|
449
|
+
badge="Promo"
|
|
450
|
+
badge-color="danger"
|
|
451
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
452
|
+
>
|
|
453
|
+
<jump-card-ecommerce-option code="m" label="M" order="1"></jump-card-ecommerce-option>
|
|
454
|
+
<jump-card-ecommerce-option code="l" label="L" order="2"></jump-card-ecommerce-option>
|
|
455
|
+
<jump-card-ecommerce-option code="xl" label="XL" order="3"></jump-card-ecommerce-option>
|
|
456
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
457
|
+
</jump-card-ecommerce>
|
|
458
|
+
<jump-card-ecommerce
|
|
459
|
+
has-background
|
|
460
|
+
product-name="T-shirt Uomo"
|
|
461
|
+
subtitle="Cotone 100%"
|
|
462
|
+
img="https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1"
|
|
463
|
+
img-alt="T-shirt Uomo"
|
|
464
|
+
price="15"
|
|
465
|
+
sale-price="10"
|
|
466
|
+
badge="In offerta"
|
|
467
|
+
badge-color="secondary"
|
|
468
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
469
|
+
>
|
|
470
|
+
<jump-card-ecommerce-option code="s" label="Small (S)" order="1"></jump-card-ecommerce-option>
|
|
471
|
+
<jump-card-ecommerce-option code="m" label="Medium (M)" order="2"></jump-card-ecommerce-option>
|
|
472
|
+
<jump-card-ecommerce-option code="l" label="Large (L)" order="3"></jump-card-ecommerce-option>
|
|
473
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
474
|
+
</jump-card-ecommerce>
|
|
475
|
+
<jump-card-ecommerce
|
|
476
|
+
has-background
|
|
477
|
+
product-name="Felpa Donna"
|
|
478
|
+
subtitle="Felpa con cappuccio"
|
|
479
|
+
img="https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800"
|
|
480
|
+
img-alt="Felpa Donna"
|
|
481
|
+
price="29"
|
|
482
|
+
sale-price="25"
|
|
483
|
+
badge="Novità"
|
|
484
|
+
badge-color="primary"
|
|
485
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
486
|
+
>
|
|
487
|
+
<jump-card-ecommerce-option code="xs" label="XS" order="1"></jump-card-ecommerce-option>
|
|
488
|
+
<jump-card-ecommerce-option code="s" label="S" order="2"></jump-card-ecommerce-option>
|
|
489
|
+
<jump-card-ecommerce-option code="m" label="M" order="3"></jump-card-ecommerce-option>
|
|
490
|
+
<jump-card-ecommerce-option code="l" label="L" order="4"></jump-card-ecommerce-option>
|
|
491
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
492
|
+
</jump-card-ecommerce>
|
|
493
|
+
<jump-card-ecommerce
|
|
494
|
+
has-background
|
|
495
|
+
product-name="Jeans Slim"
|
|
496
|
+
subtitle="Denim elasticizzato"
|
|
497
|
+
img="https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800"
|
|
498
|
+
img-alt="Jeans Slim"
|
|
499
|
+
price="49"
|
|
500
|
+
badge="Best Seller"
|
|
501
|
+
badge-color="success"
|
|
502
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
503
|
+
enable-zoom
|
|
504
|
+
>
|
|
505
|
+
<jump-card-ecommerce-option code="30" label="Taglia 30" order="1"></jump-card-ecommerce-option>
|
|
506
|
+
<jump-card-ecommerce-option code="32" label="Taglia 32" order="2"></jump-card-ecommerce-option>
|
|
507
|
+
<jump-card-ecommerce-option code="34" label="Taglia 34" order="3"></jump-card-ecommerce-option>
|
|
508
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
509
|
+
</jump-card-ecommerce>
|
|
510
|
+
<jump-card-ecommerce
|
|
511
|
+
has-background
|
|
512
|
+
product-name="Giacca Leggera"
|
|
513
|
+
subtitle="Primavera/Estate"
|
|
514
|
+
img="https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800"
|
|
515
|
+
img-alt="Giacca Leggera"
|
|
516
|
+
price="59"
|
|
517
|
+
sale-price="45"
|
|
518
|
+
badge="Promo"
|
|
519
|
+
badge-color="danger"
|
|
520
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
521
|
+
enable-zoom
|
|
522
|
+
>
|
|
523
|
+
<jump-card-ecommerce-option code="m" label="M" order="1"></jump-card-ecommerce-option>
|
|
524
|
+
<jump-card-ecommerce-option code="l" label="L" order="2"></jump-card-ecommerce-option>
|
|
525
|
+
<jump-card-ecommerce-option code="xl" label="XL" order="3"></jump-card-ecommerce-option>
|
|
526
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
527
|
+
</jump-card-ecommerce>
|
|
528
|
+
<jump-card-ecommerce
|
|
529
|
+
has-background
|
|
530
|
+
product-name="T-shirt Uomo"
|
|
531
|
+
subtitle="Cotone 100%"
|
|
532
|
+
img="https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1"
|
|
533
|
+
img-alt="T-shirt Uomo"
|
|
534
|
+
price="15"
|
|
535
|
+
sale-price="10"
|
|
536
|
+
badge="In offerta"
|
|
537
|
+
badge-color="secondary"
|
|
538
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
539
|
+
enable-zoom
|
|
540
|
+
>
|
|
541
|
+
<jump-card-ecommerce-option code="s" label="Small (S)" order="1"></jump-card-ecommerce-option>
|
|
542
|
+
<jump-card-ecommerce-option code="m" label="Medium (M)" order="2"></jump-card-ecommerce-option>
|
|
543
|
+
<jump-card-ecommerce-option code="l" label="Large (L)" order="3"></jump-card-ecommerce-option>
|
|
544
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
545
|
+
</jump-card-ecommerce>
|
|
546
|
+
<jump-card-ecommerce
|
|
547
|
+
has-background
|
|
548
|
+
product-name="Felpa Donna"
|
|
549
|
+
subtitle="Felpa con cappuccio"
|
|
550
|
+
img="https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800"
|
|
551
|
+
img-alt="Felpa Donna"
|
|
552
|
+
price="29"
|
|
553
|
+
sale-price="25"
|
|
554
|
+
badge="Novità"
|
|
555
|
+
badge-color="primary"
|
|
556
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
557
|
+
enable-zoom
|
|
558
|
+
>
|
|
559
|
+
<jump-card-ecommerce-option code="xs" label="XS" order="1"></jump-card-ecommerce-option>
|
|
560
|
+
<jump-card-ecommerce-option code="s" label="S" order="2"></jump-card-ecommerce-option>
|
|
561
|
+
<jump-card-ecommerce-option code="m" label="M" order="3"></jump-card-ecommerce-option>
|
|
562
|
+
<jump-card-ecommerce-option code="l" label="L" order="4"></jump-card-ecommerce-option>
|
|
563
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
564
|
+
</jump-card-ecommerce>
|
|
565
|
+
<jump-card-ecommerce
|
|
566
|
+
has-background
|
|
567
|
+
product-name="Jeans Slim"
|
|
568
|
+
subtitle="Denim elasticizzato"
|
|
569
|
+
img="https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800"
|
|
570
|
+
img-alt="Jeans Slim"
|
|
571
|
+
price="49"
|
|
572
|
+
badge="Best Seller"
|
|
573
|
+
badge-color="success"
|
|
574
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
575
|
+
enable-zoom
|
|
576
|
+
>
|
|
577
|
+
<jump-card-ecommerce-option code="30" label="Taglia 30" order="1"></jump-card-ecommerce-option>
|
|
578
|
+
<jump-card-ecommerce-option code="32" label="Taglia 32" order="2"></jump-card-ecommerce-option>
|
|
579
|
+
<jump-card-ecommerce-option code="34" label="Taglia 34" order="3"></jump-card-ecommerce-option>
|
|
580
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
581
|
+
</jump-card-ecommerce>
|
|
582
|
+
<jump-card-ecommerce
|
|
583
|
+
has-background
|
|
584
|
+
product-name="Giacca Leggera"
|
|
585
|
+
subtitle="Primavera/Estate"
|
|
586
|
+
img="https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800"
|
|
587
|
+
img-alt="Giacca Leggera"
|
|
588
|
+
price="59"
|
|
589
|
+
sale-price="45"
|
|
590
|
+
badge="Promo"
|
|
591
|
+
badge-color="danger"
|
|
592
|
+
add-to-cart-text="Aggiungi al carrello"
|
|
593
|
+
enable-zoom
|
|
594
|
+
>
|
|
595
|
+
<jump-card-ecommerce-option code="m" label="M" order="1"></jump-card-ecommerce-option>
|
|
596
|
+
<jump-card-ecommerce-option code="l" label="L" order="2"></jump-card-ecommerce-option>
|
|
597
|
+
<jump-card-ecommerce-option code="xl" label="XL" order="3"></jump-card-ecommerce-option>
|
|
598
|
+
<jump-quantity slot="quantity" min="1" max="10" value="1"></jump-quantity>
|
|
599
|
+
</jump-card-ecommerce>
|
|
600
|
+
</div>
|
|
601
|
+
`);
|
|
602
|
+
CardArchiveGrid.storyName = 'Archivio (Grid X colonne con variazioni e quantità)';
|
|
391
603
|
//# sourceMappingURL=jump-card-ecommerce.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-card-ecommerce.stories.js","sourceRoot":"","sources":["../../../src/components/jump-card-ecommerce/jump-card-ecommerce.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE1E,eAAe;IACb,KAAK,EAAE,+BAA+B;IACtC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,aAAa,EAAE;YACb,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,yCAAyC;YACtD,OAAO,EAAE,SAAS;SACnB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,4DAA4D;YACzE,OAAO,EAAE,SAAS;SACnB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,kBAAkB;YAC/B,OAAO,EAAE,MAAM;SAChB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,SAAS;SACnB;QACD,WAAW,EAAE;YACX,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BAAqB,CAAC,IAAI,mCACrB,IAAI,CAAC,IAAI,KACZ,WAAW,EAAE,kCAAkC,EAC/C,QAAQ,EAAE,uDAAuD,EACjE,wBAAwB,EAAE,IAAI,GAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxE,wBAAwB,CAAC,IAAI,mCACxB,IAAI,CAAC,IAAI,KACZ,WAAW,EAAE,oCAAoC,EACjD,QAAQ,EAAE,sDAAsD,EAChE,wBAAwB,EAAE,KAAK,GAChC,CAAC","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport default {\n title: 'Components/CardEcommerce/Card',\n tags: ['autodocs'],\n argTypes: {\n hasBackground: {\n name: 'has-background',\n description: 'Aggiungi o meno il background alla card',\n control: 'boolean',\n },\n onlyIconButton: {\n name: 'only-icon-button',\n description: 'Cambia lo stile della card mostrando solo il bottone icona',\n control: 'boolean',\n },\n badge: {\n name: 'badge',\n description: 'Badge della card',\n control: 'text',\n },\n favorite: {\n name: 'favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasFavorite: {\n name: 'has-favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasSlotForFavorite: {\n name: 'has-slot-for-favorite',\n description: 'Di default la card ecommerce ha un bottone icona per il favorite che emette un evento; Se hasSlotForFavorite è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: true,\n },\n link: {\n name: 'link',\n description: 'Link della card',\n control: 'text',\n },\n img: {\n name: 'img',\n description: 'Url dell\\'immagine da visualizzare, si attiva solo se non è presente video-src',\n control: 'text',\n defaultValue: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n imgAlt: {\n name: 'img-alt',\n description: 'Alt dell\\'immagine da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n hoverImg: {\n name: 'hover-img',\n description: 'Url dell\\'immagine in hover da visualizzare, si attiva solo se non è presente videoSrc',\n control: 'text',\n defaultValue: 'https://ch.benetton.com/dw/image/v2/BBSF_PRD/on/demandware.static/-/Sites-ucb-master/default/dwf2799586/images/Full_Card_v/UCB-Bambino_24P_3096C10JA_0Z3_FS_Full_Card_v.jpg?sw=600&sh=800',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n hoverImgAlt: {\n name: 'hover-img-alt',\n description: 'Alt dell\\'immagine in hover da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n videoSrc: {\n name: 'video-src',\n description: 'Url del video da visualizzare, si attiva solo se non è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: false\n }\n },\n notificationUrl: {\n name: 'notification-url',\n description: 'Url della notifica da visualizzare',\n control: 'text',\n },\n notificationText: {\n name: 'notification-text',\n description: 'Testo della notifica da visualizzare',\n control: 'text',\n },\n productName: {\n name: 'product-name',\n description: 'Nome del prodotto',\n control: 'text',\n },\n subtitle: {\n name: 'subtitle',\n description: 'Sottotitolo della card',\n control: 'text',\n },\n productId: {\n name: 'product-id',\n description: 'ID del prodotto',\n control: 'text',\n },\n price: {\n name: 'price',\n description: 'Prezzo del prodotto; Se la card è in versione Mini gli va passato il prezzo scontato',\n control: 'number',\n },\n salePrice: {\n name: 'sale-price',\n description: 'Prezzo scontato del prodotto',\n control: 'number',\n },\n addToCartText: {\n name: 'add-to-cart-text',\n description: 'Testo bottone aggiungi al carrello',\n control: 'text',\n },\n addToCartColor: {\n name: 'add-to-cart-color',\n description: 'Colore del bottone aggiungi al carrello',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'white'\n ],\n },\n hasSlotAddToCart: {\n name: 'has-slot-add-to-cart',\n description: 'Di default la card ecommerce ha un bottone per l\\'aggiunta al carrello; Se has-slot-add-to-cart è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: false,\n },\n badgeColor: {\n name: 'badge-color',\n description: 'Colore del badge',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'warning',\n 'success',\n 'danger',\n ],\n },\n outOfStock: {\n name: 'out-of-stock',\n description: 'Indica se il prodotto è esaurito',\n control: 'boolean',\n defaultValue: false\n },\n outOfStockText: {\n name: 'out-of-stock-text',\n description: 'Testo da visualizzare se il prodotto è esaurito',\n control: 'text',\n },\n waitingListText: {\n name: 'waiting-list-text',\n description: 'cta per richiedere l\\'avviso se il prodotto torna disponibile',\n control: 'text',\n },\n isMini: {\n name: 'is-mini',\n description: 'Indica se la card è di dimensioni ridotte',\n control: 'boolean',\n defaultValue: false\n },\n enableZoom: {\n name: 'enable-zoom',\n description: 'Indica se è attivo lo zoom all\\'hover',\n control: 'boolean',\n defaultValue: false\n },\n imageObjectFit: {\n name: 'image-object-fit',\n description: 'Controlla il comportamento dell\\'object-fit delle immagini',\n control: 'select',\n options: ['cover', 'scale-down', 'contain', 'fill', 'none'],\n defaultValue: 'cover'\n },\n autoSelectFirstVariation: {\n name: 'auto-select-first-variation',\n description: 'Indica se selezionare automaticamente la prima variazione disponibile',\n control: 'boolean',\n defaultValue: true\n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n </jump-card-ecommerce>\n `);\n}\n\nexport const Card = Template.bind({});\nCard.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n favorite: false,\n hasFavorite: true,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'secondary',\n hasSlotAddToCart: false,\n badgeColor: 'secondary',\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n enableZoom: false,\n imageObjectFit: 'cover',\n autoSelectFirstVariation: true,\n};\n\nconst TemplateWithEvent = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n\n <jump-card-ecommerce-option code=\"size1\" label=\"sono una select un pò lunga\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"size2\" label=\"L\" sku=\"cod123\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"size3\" label=\"XL\" sku=\"cod124\" order=\"3\"></jump-card-ecommerce-option>\n\n <div slot=\"addtocart\"><a href=\"\">Sono un bottone dentro lo slot addotocart</a></div>\n </jump-card-ecommerce>\n <script>\n\n (function() {\n let container;\n container = document.querySelector('#story--${id}');\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-toggle-favorite', ev => {\n let productId = ev.detail.productId;\n let favorite = ev.detail.favorite;\n if(favorite){\n console.log( 'Prodotto ' + productId + ' aggiunto ai preferiti');\n } else {\n console.log( 'Prodotto ' + productId + ' rimosso dai preferiti');\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-add-to-cart', ev => {\n let productId = ev.detail.productId;\n let addedToCart = ev.detail.addedToCart;\n let variation = ev.detail.variation;\n if(addedToCart){\n console.log( 'Prodotto ' + productId + ' aggiunto al carrello');\n console.log( 'Variazione selezionata:', variation);\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {\n let variation = ev.detail;\n console.log('Variation selected automatically:', variation);\n });\n\n })();\n\n </script>\n ` );\n}\n\nexport const CardEvent = TemplateWithEvent.bind({});\nCardEvent.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n hasFavorite: false,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n currency: '€',\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'primary',\n hasSlotAddToCart: false,\n badgeColor: 'primary',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: true,\n autoSelectFirstVariation: true,\n};\n\nconst TemplateDisallowAllowCart = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n </jump-card-ecommerce>\n `);\n}\n\nexport const CardWithZoom = Template.bind({});\nCardWithZoom.args = {\n ...Card.args,\n enableZoom: true,\n hoverImg: '',\n hoverImgAlt: '',\n};\n\nexport const CardDisallow = TemplateDisallowAllowCart.bind({});\nCardDisallow.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n favorite: false,\n hasFavorite: true,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'secondary',\n hasSlotAddToCart: false,\n badgeColor: 'secondary',\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n disallowAddToCart: true,\n};\n\n// Storia per mostrare l'utilizzo della proprietà imageObjectFit\nexport const CardWithScaleDown = Template.bind({});\nCardWithScaleDown.args = {\n ...Card.args,\n imageObjectFit: 'scale-down',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n productName: 'Card con scale-down',\n subtitle: 'L\\'immagine usa object-fit: scale-down'\n};\n\n// Storia per mostrare la selezione automatica delle variazioni\nconst TemplateWithVariations = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"Extra Large (XL)\" order=\"4\"></jump-card-ecommerce-option>\n \n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <script>\n (function() {\n let container = document.querySelector('#story--${id}');\n container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {\n let variation = ev.detail;\n console.log('Variazione selezionata automaticamente:', variation);\n });\n })();\n </script>\n `);\n};\n\nexport const CardWithAutoSelection = TemplateWithVariations.bind({});\nCardWithAutoSelection.args = {\n ...Card.args,\n productName: 'T-shirt con selezione automatica',\n subtitle: 'La prima variazione viene selezionata automaticamente',\n autoSelectFirstVariation: true,\n};\n\nexport const CardWithoutAutoSelection = TemplateWithVariations.bind({});\nCardWithoutAutoSelection.args = {\n ...Card.args,\n productName: 'T-shirt senza selezione automatica',\n subtitle: 'L\\'utente deve selezionare manualmente la variazione',\n autoSelectFirstVariation: false,\n};"]}
|
|
1
|
+
{"version":3,"file":"jump-card-ecommerce.stories.js","sourceRoot":"","sources":["../../../src/components/jump-card-ecommerce/jump-card-ecommerce.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE1E,eAAe;IACb,KAAK,EAAE,+BAA+B;IACtC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,aAAa,EAAE;YACb,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,yCAAyC;YACtD,OAAO,EAAE,SAAS;SACnB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,4DAA4D;YACzE,OAAO,EAAE,SAAS;SACnB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,kBAAkB;YAC/B,OAAO,EAAE,MAAM;SAChB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,SAAS;SACnB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,SAAS;SACnB;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EAAE,6JAA6J;YAC1K,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,IAAI;SACnB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,iB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AC,IAAI,KACZ,WAAW,EAAE,oCAAoC,EACjD,QAAQ,EAAE,sDAAsD,EAChE,wBAAwB,EAAE,KAAK,GAChC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkN/C,CAAC,CAAC;AACH,eAAe,CAAC,SAAS,GAAG,qDAAqD,CAAC","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport default {\n title: 'Components/CardEcommerce/Card',\n tags: ['autodocs'],\n argTypes: {\n hasBackground: {\n name: 'has-background',\n description: 'Aggiungi o meno il background alla card',\n control: 'boolean',\n },\n onlyIconButton: {\n name: 'only-icon-button',\n description: 'Cambia lo stile della card mostrando solo il bottone icona',\n control: 'boolean',\n },\n badge: {\n name: 'badge',\n description: 'Badge della card',\n control: 'text',\n },\n favorite: {\n name: 'favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasFavorite: {\n name: 'has-favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasSlotForFavorite: {\n name: 'has-slot-for-favorite',\n description: 'Di default la card ecommerce ha un bottone icona per il favorite che emette un evento; Se hasSlotForFavorite è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: true,\n },\n link: {\n name: 'link',\n description: 'Link della card',\n control: 'text',\n },\n img: {\n name: 'img',\n description: 'Url dell\\'immagine da visualizzare, si attiva solo se non è presente video-src',\n control: 'text',\n defaultValue: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n imgAlt: {\n name: 'img-alt',\n description: 'Alt dell\\'immagine da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n hoverImg: {\n name: 'hover-img',\n description: 'Url dell\\'immagine in hover da visualizzare, si attiva solo se non è presente videoSrc',\n control: 'text',\n defaultValue: 'https://ch.benetton.com/dw/image/v2/BBSF_PRD/on/demandware.static/-/Sites-ucb-master/default/dwf2799586/images/Full_Card_v/UCB-Bambino_24P_3096C10JA_0Z3_FS_Full_Card_v.jpg?sw=600&sh=800',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n hoverImgAlt: {\n name: 'hover-img-alt',\n description: 'Alt dell\\'immagine in hover da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n videoSrc: {\n name: 'video-src',\n description: 'Url del video da visualizzare, si attiva solo se non è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: false\n }\n },\n notificationUrl: {\n name: 'notification-url',\n description: 'Url della notifica da visualizzare',\n control: 'text',\n },\n notificationText: {\n name: 'notification-text',\n description: 'Testo della notifica da visualizzare',\n control: 'text',\n },\n productName: {\n name: 'product-name',\n description: 'Nome del prodotto',\n control: 'text',\n },\n subtitle: {\n name: 'subtitle',\n description: 'Sottotitolo della card',\n control: 'text',\n },\n productId: {\n name: 'product-id',\n description: 'ID del prodotto',\n control: 'text',\n },\n price: {\n name: 'price',\n description: 'Prezzo del prodotto; Se la card è in versione Mini gli va passato il prezzo scontato',\n control: 'number',\n },\n salePrice: {\n name: 'sale-price',\n description: 'Prezzo scontato del prodotto',\n control: 'number',\n },\n addToCartText: {\n name: 'add-to-cart-text',\n description: 'Testo bottone aggiungi al carrello',\n control: 'text',\n },\n addToCartColor: {\n name: 'add-to-cart-color',\n description: 'Colore del bottone aggiungi al carrello',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'white'\n ],\n },\n hasSlotAddToCart: {\n name: 'has-slot-add-to-cart',\n description: 'Di default la card ecommerce ha un bottone per l\\'aggiunta al carrello; Se has-slot-add-to-cart è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: false,\n },\n badgeColor: {\n name: 'badge-color',\n description: 'Colore del badge',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'warning',\n 'success',\n 'danger',\n ],\n },\n outOfStock: {\n name: 'out-of-stock',\n description: 'Indica se il prodotto è esaurito',\n control: 'boolean',\n defaultValue: false\n },\n outOfStockText: {\n name: 'out-of-stock-text',\n description: 'Testo da visualizzare se il prodotto è esaurito',\n control: 'text',\n },\n waitingListText: {\n name: 'waiting-list-text',\n description: 'cta per richiedere l\\'avviso se il prodotto torna disponibile',\n control: 'text',\n },\n isMini: {\n name: 'is-mini',\n description: 'Indica se la card è di dimensioni ridotte',\n control: 'boolean',\n defaultValue: false\n },\n enableZoom: {\n name: 'enable-zoom',\n description: 'Indica se è attivo lo zoom all\\'hover',\n control: 'boolean',\n defaultValue: false\n },\n imageObjectFit: {\n name: 'image-object-fit',\n description: 'Controlla il comportamento dell\\'object-fit delle immagini',\n control: 'select',\n options: ['cover', 'scale-down', 'contain', 'fill', 'none'],\n defaultValue: 'cover'\n },\n autoSelectFirstVariation: {\n name: 'auto-select-first-variation',\n description: 'Indica se selezionare automaticamente la prima variazione disponibile',\n control: 'boolean',\n defaultValue: true\n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n </jump-card-ecommerce>\n `);\n}\n\nexport const Card = Template.bind({});\nCard.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n favorite: false,\n hasFavorite: true,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'secondary',\n hasSlotAddToCart: false,\n badgeColor: 'secondary',\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n enableZoom: false,\n imageObjectFit: 'cover',\n autoSelectFirstVariation: true,\n};\n\nconst TemplateWithEvent = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n\n <jump-card-ecommerce-option code=\"size1\" label=\"sono una select un pò lunga\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"size2\" label=\"L\" sku=\"cod123\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"size3\" label=\"XL\" sku=\"cod124\" order=\"3\"></jump-card-ecommerce-option>\n\n <div slot=\"addtocart\"><a href=\"\">Sono un bottone dentro lo slot addotocart</a></div>\n </jump-card-ecommerce>\n <script>\n\n (function() {\n let container;\n container = document.querySelector('#story--${id}');\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-toggle-favorite', ev => {\n let productId = ev.detail.productId;\n let favorite = ev.detail.favorite;\n if(favorite){\n console.log( 'Prodotto ' + productId + ' aggiunto ai preferiti');\n } else {\n console.log( 'Prodotto ' + productId + ' rimosso dai preferiti');\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-add-to-cart', ev => {\n let productId = ev.detail.productId;\n let addedToCart = ev.detail.addedToCart;\n let variation = ev.detail.variation;\n if(addedToCart){\n console.log( 'Prodotto ' + productId + ' aggiunto al carrello');\n console.log( 'Variazione selezionata:', variation);\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {\n let variation = ev.detail;\n console.log('Variation selected automatically:', variation);\n });\n\n })();\n\n </script>\n ` );\n}\n\nexport const CardEvent = TemplateWithEvent.bind({});\nCardEvent.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n hasFavorite: false,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n currency: '€',\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'primary',\n hasSlotAddToCart: false,\n badgeColor: 'primary',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: true,\n autoSelectFirstVariation: true,\n};\n\nconst TemplateDisallowAllowCart = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n </jump-card-ecommerce>\n `);\n}\n\nexport const CardWithZoom = Template.bind({});\nCardWithZoom.args = {\n ...Card.args,\n enableZoom: true,\n hoverImg: '',\n hoverImgAlt: '',\n};\n\nexport const CardDisallow = TemplateDisallowAllowCart.bind({});\nCardDisallow.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n favorite: false,\n hasFavorite: true,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'secondary',\n hasSlotAddToCart: false,\n badgeColor: 'secondary',\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n disallowAddToCart: true,\n};\n\n// Storia per mostrare l'utilizzo della proprietà imageObjectFit\nexport const CardWithScaleDown = Template.bind({});\nCardWithScaleDown.args = {\n ...Card.args,\n imageObjectFit: 'scale-down',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n productName: 'Card con scale-down',\n subtitle: 'L\\'immagine usa object-fit: scale-down'\n};\n\n// Storia per mostrare la selezione automatica delle variazioni\nconst TemplateWithVariations = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"Extra Large (XL)\" order=\"4\"></jump-card-ecommerce-option>\n \n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <script>\n (function() {\n let container = document.querySelector('#story--${id}');\n container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {\n let variation = ev.detail;\n console.log('Variazione selezionata automaticamente:', variation);\n });\n })();\n </script>\n `);\n};\n\nexport const CardWithAutoSelection = TemplateWithVariations.bind({});\nCardWithAutoSelection.args = {\n ...Card.args,\n productName: 'T-shirt con selezione automatica',\n subtitle: 'La prima variazione viene selezionata automaticamente',\n autoSelectFirstVariation: true,\n};\n\nexport const CardWithoutAutoSelection = TemplateWithVariations.bind({});\nCardWithoutAutoSelection.args = {\n ...Card.args,\n productName: 'T-shirt senza selezione automatica',\n subtitle: 'L\\'utente deve selezionare manualmente la variazione',\n autoSelectFirstVariation: false,\n};\n\nexport const CardArchiveGrid = () => formatHtml(`\n <div style=\"display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 900px; margin: 0 auto;\">\n <jump-card-ecommerce\n product-name=\"T-shirt Uomo\"\n subtitle=\"Cotone 100%\"\n has-favorite=\"true\"\n img=\"https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1\"\n img-alt=\"T-shirt Uomo\"\n price=\"15\"\n sale-price=\"10\"\n badge=\"In offerta\"\n badge-color=\"secondary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity label=\"quantityà\" slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n product-name=\"Felpa Donna\"\n subtitle=\"Felpa con cappuccio\"\n img=\"https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Felpa Donna\"\n price=\"29\"\n badge=\"Novità\"\n badge-color=\"primary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"xs\" label=\"XS\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"s\" label=\"S\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"4\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n product-name=\"Jeans Slim\"\n subtitle=\"Denim elasticizzato\"\n img=\"https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Jeans Slim\"\n price=\"49\"\n badge=\"Best Seller\"\n badge-color=\"success\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"30\" label=\"Taglia 30\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"32\" label=\"Taglia 32\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"34\" label=\"Taglia 34\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n product-name=\"Giacca Leggera\"\n subtitle=\"Primavera/Estate\"\n img=\"https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Giacca Leggera\"\n price=\"59\"\n out-of-stock=\"true\"\n sale-price=\"45\"\n badge=\"Promo\"\n badge-color=\"danger\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"XL\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"T-shirt Uomo\"\n subtitle=\"Cotone 100%\"\n img=\"https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1\"\n img-alt=\"T-shirt Uomo\"\n price=\"15\"\n sale-price=\"10\"\n badge=\"In offerta\"\n badge-color=\"secondary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Felpa Donna\"\n subtitle=\"Felpa con cappuccio\"\n img=\"https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Felpa Donna\"\n price=\"29\"\n sale-price=\"25\"\n badge=\"Novità\"\n badge-color=\"primary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"xs\" label=\"XS\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"s\" label=\"S\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"4\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Jeans Slim\"\n subtitle=\"Denim elasticizzato\"\n img=\"https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Jeans Slim\"\n price=\"49\"\n badge=\"Best Seller\"\n badge-color=\"success\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"30\" label=\"Taglia 30\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"32\" label=\"Taglia 32\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"34\" label=\"Taglia 34\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Giacca Leggera\"\n subtitle=\"Primavera/Estate\"\n img=\"https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Giacca Leggera\"\n price=\"59\"\n sale-price=\"45\"\n badge=\"Promo\"\n badge-color=\"danger\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"XL\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"T-shirt Uomo\"\n subtitle=\"Cotone 100%\"\n img=\"https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1\"\n img-alt=\"T-shirt Uomo\"\n price=\"15\"\n sale-price=\"10\"\n badge=\"In offerta\"\n badge-color=\"secondary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Felpa Donna\"\n subtitle=\"Felpa con cappuccio\"\n img=\"https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Felpa Donna\"\n price=\"29\"\n sale-price=\"25\"\n badge=\"Novità\"\n badge-color=\"primary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"xs\" label=\"XS\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"s\" label=\"S\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"4\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Jeans Slim\"\n subtitle=\"Denim elasticizzato\"\n img=\"https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Jeans Slim\"\n price=\"49\"\n badge=\"Best Seller\"\n badge-color=\"success\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"30\" label=\"Taglia 30\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"32\" label=\"Taglia 32\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"34\" label=\"Taglia 34\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Giacca Leggera\"\n subtitle=\"Primavera/Estate\"\n img=\"https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Giacca Leggera\"\n price=\"59\"\n sale-price=\"45\"\n badge=\"Promo\"\n badge-color=\"danger\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"XL\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n </div>\n`);\nCardArchiveGrid.storyName = 'Archivio (Grid X colonne con variazioni e quantità)';"]}
|
|
@@ -3,7 +3,7 @@ import { d as defineCustomElement$4 } from './jump-badge2.js';
|
|
|
3
3
|
import { d as defineCustomElement$3 } from './jump-button2.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './jump-icon2.js';
|
|
5
5
|
|
|
6
|
-
const jumpCardEcommerceCss = ":host{--card-max-width:450px
|
|
6
|
+
const jumpCardEcommerceCss = ":host {\n --card-max-width: 450px;\n --jump-card-max-width-horizontal: 100%;\n --jump-card-color: var(--neutral-grey-primary);\n --jump-card-background: transparent;\n --jump-card-border-color: var(--neutral-grey-background);\n --jump-card-padding: 0.5rem;\n --jump-card-commerce-out-of-stock-color: var(--status-danger-standard);\n --jump-card-ecommerce-discount-color: var(--status-danger-standard);\n --image-object-fit: cover;\n max-width: var(--card-max-width);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n font-family: var(--ff-primary, \"Arial\"), sans-serif;\n line-height: var(--lh-400, 1.3);\n background-color: var(--jump-card-background);\n color: var(--jump-card-color);\n}\n:host .Footer,\n:host .Body {\n display: flex;\n width: 100%;\n}\n:host .Footer {\n container-type: inline-size;\n flex-direction: row;\n}\n@container (max-width: 239px) {\n :host .Footer {\n flex-direction: column;\n }\n :host .Footer .OutOfStock {\n margin-bottom: 0.25rem;\n }\n}\n:host jump-badge {\n position: absolute;\n top: 1rem;\n left: 1rem;\n z-index: 2;\n}\n:host jump-badge.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n left: calc(1rem + 8px);\n}\n:host .Favorite {\n position: absolute;\n top: 1rem;\n right: 1rem;\n z-index: 2;\n}\n:host .Favorite.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n right: calc(1rem + 8px);\n}\n:host .Media {\n overflow: hidden;\n position: relative;\n border-radius: 3px;\n aspect-ratio: 1/1;\n}\n:host .Media .Images {\n height: 100%;\n margin: 0;\n position: relative;\n}\n:host .Media .Images img {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n object-fit: var(--image-object-fit, cover);\n}\n:host .Media .Images__Front {\n z-index: 1;\n transition: opacity 0.5s linear;\n cursor: pointer;\n}\n:host .Media .Images.has-hover-image:hover .Images__Front {\n opacity: 0;\n}\n:host .Media .Images.enable-zoom {\n overflow: hidden;\n}\n:host .Media .Images.enable-zoom .Images__Front {\n transition: transform 0s ease-out;\n cursor: zoom-in;\n}\n:host .Media .Images.enable-zoom:hover .Images__Front {\n transform: scale(1.5);\n}\n:host .Media.hasBackground {\n background-color: var(--neutral-white);\n}\n:host .Media.hasBackground.iconOnly {\n border-top-left-radius: 6px;\n border-top-right-radius: 6px;\n padding: var(--jump-card-padding) var(--jump-card-padding) 0;\n}\n:host .Media.hasBackground.iconOnly img {\n border-radius: 6px;\n}\n:host .Media.iconOnly {\n border-bottom-right-radius: 0;\n}\n:host .Media.is-mini {\n max-width: 180px;\n}\n:host .NotificationCart {\n display: none;\n position: absolute;\n bottom: 0px;\n width: 100%;\n padding: 2rem 1rem;\n background-color: hsla(0, 0%, 0%, 0.35);\n box-sizing: border-box;\n z-index: 2;\n transform: translate3d(0, 0, 0);\n}\n:host .NotificationCart.is-active {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n:host .Content {\n container-type: inline-size;\n}\n:host .Content.hasBackground {\n background-color: var(--neutral-white);\n padding: calc(var(--jump-card-padding) * 2);\n}\n:host .Content.iconOnly {\n padding: calc(var(--jump-card-padding) * 2) var(--jump-card-padding);\n}\n:host .Content.is-mini {\n max-width: 180px;\n}\n:host .Body {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: var(--jump-card-padding) 0;\n container-type: inline-size;\n}\n:host .Body > * {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n:host .Body > * > * {\n flex: 0 1 auto;\n}\n:host .Body .Body__Top {\n display: flex;\n flex-direction: row;\n}\n:host .Body .Body__Bottom {\n display: flex;\n flex-direction: row;\n}\n@container (max-width: 239px) {\n :host .Body .Body__Top {\n flex-direction: column;\n }\n :host .Body .Body__Bottom {\n flex-direction: column;\n }\n :host .Body .SelectVariations {\n max-width: 100%;\n margin-bottom: 0.5rem;\n }\n :host .Body .SelectVariations select {\n width: 100%;\n }\n :host .Body .Price {\n display: flex;\n flex-direction: column-reverse;\n margin-top: 0.5rem;\n align-items: start;\n }\n}\n:host .Body.hasBackground {\n padding: 0 0 var(--jump-card-padding);\n}\n:host .Body.iconOnly {\n padding: 0;\n}\n:host .Body.is-mini {\n padding: calc(var(--jump-card-padding) / 2) 0;\n}\n:host .Body.is-mini > * {\n flex-direction: column;\n}\n:host .Product {\n font-size: var(--fs-400);\n color: var(--neutral-grey-primary);\n text-decoration: none;\n}\n:host .Subtitle {\n font-size: var(--fs-300);\n color: var(--neutral-grey-secondary);\n line-height: 1.2;\n}\n:host .Footer {\n line-height: var(--lh-400);\n justify-content: end;\n padding: var(--jump-card-padding) 0;\n align-items: flex-end;\n}\n:host .Footer.justify-between {\n justify-content: space-between;\n}\n:host .Footer.hasBackground {\n padding-bottom: 0;\n}\n:host .Footer.iconOnly {\n padding: 0;\n}\n:host .Footer.is-mini {\n padding: calc(var(--jump-card-padding) / 2) 0;\n}\n:host .Footer__AddToCart {\n --jump-button-color: var(--jump-card-ecommerce-add-to-cart-color);\n --jump-button-background: var(--jump-card-ecommerce-add-to-cart-background);\n --jump-button-color-hover: var(--jump-card-ecommerce-add-to-cart-color-hover);\n --jump-button-background-hover: var(--jump-card-ecommerce-add-to-cart-background-hover);\n}\n:host .OutOfStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n color: var(--jump-card-commerce-out-of-stock-color);\n}\n:host .OnlyIconButton {\n position: absolute;\n bottom: 0;\n right: 0;\n background: var(--neutral-white);\n border-top-left-radius: 20px;\n padding: 8px 8px 0px 8px;\n z-index: 2;\n}\n:host .Price {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n grid-template-rows: 1.5rem 1.5rem auto;\n justify-items: end;\n align-items: end;\n column-gap: 0.5rem;\n margin-top: 0;\n font-size: var(--fs-500);\n font-weight: var(--fw-900);\n line-height: var(--lh-400);\n}\n:host .Price > * {\n display: inline-flex;\n}\n:host .Price__Regular {\n text-align: right;\n}\n:host .Price__Regular.sale {\n text-decoration: line-through;\n color: var(--neutral-grey-secondary);\n font-weight: var(--fw-400);\n font-size: var(--fs-400);\n grid-column: 2;\n grid-row: 1;\n}\n:host .Price__Sale {\n grid-column: 2;\n grid-row: 2;\n}\n:host .Price__Discount {\n color: var(--jump-card-ecommerce-discount-color);\n font-weight: var(--fw-400);\n font-size: var(--fs-300);\n grid-column: 1;\n grid-row: 1;\n}\n:host .Price.is-mini {\n display: flex;\n font-size: var(--fs-400);\n}\n:host .SelectVariations {\n display: flex;\n align-items: flex-end;\n max-width: calc(50% - 1rem);\n margin-bottom: 0;\n}\n:host .SelectVariations select {\n appearance: none;\n background-color: transparent;\n border: 1px solid var(--neutral-grey-secondary);\n border-radius: 3px;\n color: var(--neutral-grey-secondary);\n font-size: var(--fs-300);\n padding: 0.5rem 0.75rem;\n max-width: 100%;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");\n background-position: right 0.5rem center;\n background-repeat: no-repeat;\n background-size: 1.5em 1.5em;\n padding-right: 2.5rem;\n -webkit-print-color-adjust: exact;\n}\n\n.slide-in-bottom {\n animation: slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.slide-out-bottom {\n animation: slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;\n}\n\n.fade-in-out {\n animation-name: fade-in-out;\n animation-duration: 6s;\n animation-timing-function: ease-in-out;\n}\n\n@keyframes fade-in-out {\n from {\n opacity: 0;\n transform: translateY(100px);\n }\n 50% {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(100px);\n }\n}";
|
|
7
7
|
const JumpCardEcommerceStyle0 = jumpCardEcommerceCss;
|
|
8
8
|
|
|
9
9
|
const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcommerce extends HTMLElement {
|
|
@@ -308,7 +308,7 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
|
|
|
308
308
|
h("div", { class: "OnlyIconButton" }, h("jump-button", { variant: "secondary", size: "large", pill: true, onlyIcon: true, onClick: () => this.addProductToCart() }, h("jump-icon", { slot: "prefix", name: "cart-shopping", category: "regular" })))
|
|
309
309
|
: '', !this.isMini && this.onlyIconButton && this.hasSlotAddToCart ?
|
|
310
310
|
h("div", { class: "OnlyIconButton" }, h("slot", { name: "add-to-cart" }))
|
|
311
|
-
: ''), h("div", { class: `Content ${backgroundClass} ${iconOnlyClass} ${miniCard}` }, h("div", { class: `Body ${backgroundClass} ${iconOnlyClass} ${miniCard}` }, h("div",
|
|
311
|
+
: ''), h("div", { class: `Content ${backgroundClass} ${iconOnlyClass} ${miniCard}` }, h("div", { class: `Body ${backgroundClass} ${iconOnlyClass} ${miniCard}` }, h("div", { class: "Body__Top" }, h("div", { class: "Info" }, h("a", { href: this.link, class: "Product" }, this.productName), this.subtitle ? h("div", { class: "Subtitle" }, this.subtitle) : null), this.price ?
|
|
312
312
|
h("div", { class: `Price ${miniCard}` }, !this.isMini && this.salePrice && this.salePrice < this.price ?
|
|
313
313
|
h("div", { class: "Price__Discount" }, " ", calculateDiscount(this.price, this.salePrice), "% ")
|
|
314
314
|
: null, !this.isMini ?
|
|
@@ -318,7 +318,7 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
|
|
|
318
318
|
h("div", { class: "Price__Sale" }, this.currency, this.salePriceFormatted)
|
|
319
319
|
: null)
|
|
320
320
|
: null), !this.isMini || sortedVariations.length != 0 ?
|
|
321
|
-
h("div",
|
|
321
|
+
h("div", { class: "Body__Bottom" }, sortedVariations.length != 0 ?
|
|
322
322
|
h("div", { class: "SelectVariations" }, h("select", { ref: (el) => (this.variationSelectEl = el), onChange: () => {
|
|
323
323
|
this.onVariationSelected();
|
|
324
324
|
} }, sortedVariations
|