@popsure/dirty-swan 0.66.16 → 0.66.18

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.
Files changed (57) hide show
  1. package/dist/cjs/index.js +23 -19
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/lib/components/comparisonTable/index.stories.d.ts +4 -0
  4. package/dist/cjs/lib/components/table/Table.stories.d.ts +12 -0
  5. package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +2 -1
  6. package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +1 -1
  7. package/dist/esm/components/comparisonTable/components/AccordionItem/AccordionItem.js +2 -2
  8. package/dist/esm/components/comparisonTable/components/AccordionItem/AccordionItem.js.map +1 -1
  9. package/dist/esm/components/comparisonTable/components/Row/index.js +4 -3
  10. package/dist/esm/components/comparisonTable/components/Row/index.js.map +1 -1
  11. package/dist/esm/components/comparisonTable/index.js +6 -6
  12. package/dist/esm/components/comparisonTable/index.js.map +1 -1
  13. package/dist/esm/components/comparisonTable/index.stories.js +267 -6
  14. package/dist/esm/components/comparisonTable/index.stories.js.map +1 -1
  15. package/dist/esm/components/icon/icons/Activity.js +2 -2
  16. package/dist/esm/components/icon/icons/Activity.js.map +1 -1
  17. package/dist/esm/components/icon/icons/DentalToothTeeth.js +2 -2
  18. package/dist/esm/components/icon/icons/DentalToothTeeth.js.map +1 -1
  19. package/dist/esm/components/icon/icons/DependentsFamily.js +2 -2
  20. package/dist/esm/components/icon/icons/DependentsFamily.js.map +1 -1
  21. package/dist/esm/components/icon/icons/GlobeNetworkEarth.js +2 -2
  22. package/dist/esm/components/icon/icons/GlobeNetworkEarth.js.map +1 -1
  23. package/dist/esm/components/icon/icons/HospitalBuilding.js +2 -2
  24. package/dist/esm/components/icon/icons/HospitalBuilding.js.map +1 -1
  25. package/dist/esm/components/icon/icons.stories.js +1 -1
  26. package/dist/esm/components/icon/index.stories.js +1 -1
  27. package/dist/esm/components/table/Table.js +1 -1
  28. package/dist/esm/components/table/Table.stories.js +355 -1
  29. package/dist/esm/components/table/Table.stories.js.map +1 -1
  30. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js +1 -1
  31. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js.map +1 -1
  32. package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js +4 -2
  33. package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js.map +1 -1
  34. package/dist/esm/components/table/components/TableCell/TableCell.js +4 -3
  35. package/dist/esm/components/table/components/TableCell/TableCell.js.map +1 -1
  36. package/dist/esm/components/table/components/TableContents/Collapsible.js +1 -1
  37. package/dist/esm/{index-BWJpOVlt.js → index-D41W71Hh.js} +11 -11
  38. package/dist/esm/{index-BWJpOVlt.js.map → index-D41W71Hh.js.map} +1 -1
  39. package/dist/esm/lib/components/comparisonTable/index.stories.d.ts +4 -0
  40. package/dist/esm/lib/components/table/Table.stories.d.ts +12 -0
  41. package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +2 -1
  42. package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +1 -1
  43. package/package.json +1 -1
  44. package/src/lib/components/comparisonTable/components/AccordionItem/AccordionItem.module.scss +15 -3
  45. package/src/lib/components/comparisonTable/components/AccordionItem/AccordionItem.tsx +1 -1
  46. package/src/lib/components/comparisonTable/components/Row/index.tsx +2 -1
  47. package/src/lib/components/comparisonTable/components/Row/style.module.scss +20 -5
  48. package/src/lib/components/comparisonTable/index.stories.tsx +370 -0
  49. package/src/lib/components/comparisonTable/index.tsx +1 -5
  50. package/src/lib/components/comparisonTable/style.module.scss +10 -8
  51. package/src/lib/components/table/Table.module.scss +1 -1
  52. package/src/lib/components/table/Table.stories.tsx +387 -0
  53. package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.tsx +2 -2
  54. package/src/lib/components/table/components/TableCell/CTACell/CTACell.tsx +5 -1
  55. package/src/lib/components/table/components/TableCell/TableCell.module.scss +4 -0
  56. package/src/lib/components/table/components/TableCell/TableCell.tsx +4 -1
  57. package/src/lib/components/table/components/TableContents/Collapsible.module.scss +1 -0
@@ -467,6 +467,393 @@ export const SinglePlanQuoteTable = {
467
467
  name: 'Single Plan Quote',
468
468
  };
469
469
 
470
+ const singlePlanWebsiteData: TableData = [
471
+ {
472
+ rows: [
473
+ [
474
+ { text: 'Our plans' },
475
+ {
476
+ type: 'CTA',
477
+ title: 'Plan name',
478
+ buttonCaption: 'Get a quote',
479
+ href: 'http://example.com',
480
+ },
481
+ ],
482
+ [
483
+ { text: 'Monthly price' },
484
+ {
485
+ text: '~€99',
486
+ fontVariant: 'PRICE',
487
+ modalContent: 'Price info',
488
+ },
489
+ ],
490
+ [
491
+ { text: 'Label with a description value' },
492
+ { text: 'Value', description: 'Value description' },
493
+ ],
494
+ [
495
+ {
496
+ text: 'Label with a long text that wraps into multiple lines in the table',
497
+ },
498
+ {
499
+ checkmarkValue: true,
500
+ modalContent: 'Checkmark info',
501
+ },
502
+ ],
503
+ [
504
+ {
505
+ text: 'Label with a boolean value',
506
+ },
507
+ { checkmarkValue: false },
508
+ ],
509
+ [
510
+ {
511
+ text: 'Label with info',
512
+ modalContent: 'Label info',
513
+ },
514
+ { text: 'Text value' },
515
+ ],
516
+ ],
517
+ },
518
+ {
519
+ section: {
520
+ title: 'First section',
521
+ },
522
+ rows: [
523
+ [{ text: 'Row label' }, { checkmarkValue: true }],
524
+ [{ text: 'Row label' }, { checkmarkValue: true }],
525
+ [{ text: 'Row label' }, { checkmarkValue: true }],
526
+ ],
527
+ },
528
+ {
529
+ section: {
530
+ title: 'Second section',
531
+ },
532
+ rows: [
533
+ [{ text: 'Row label' }, { checkmarkValue: true }],
534
+ [{ text: 'Row label' }, { checkmarkValue: false }],
535
+ ],
536
+ },
537
+ {
538
+ section: {
539
+ title: 'Third section',
540
+ },
541
+ rows: [
542
+ [
543
+ { text: 'Row label' },
544
+ { text: 'Up to €1,500', description: 'Value description' },
545
+ ],
546
+ ],
547
+ },
548
+ {
549
+ section: {
550
+ title: 'Fourth section',
551
+ },
552
+ rows: [
553
+ [{ text: 'Row label' }, { checkmarkValue: true }],
554
+ [{ text: 'Row label' }, { checkmarkValue: true }],
555
+ ],
556
+ },
557
+ {
558
+ section: {
559
+ title: 'Fifth section',
560
+ },
561
+ rows: [
562
+ [{ text: 'Row label' }, { checkmarkValue: true }],
563
+ [{ text: 'Row label' }, { checkmarkValue: true }],
564
+ ],
565
+ },
566
+ {
567
+ section: {
568
+ title: 'Sixth section',
569
+ },
570
+ rows: [
571
+ [{ text: 'Row label' }, { text: 'Up to €5,000' }],
572
+ [{ text: 'Row label' }, { checkmarkValue: true }],
573
+ ],
574
+ },
575
+ ];
576
+
577
+ export const SinglePlanQuoteWebsite = {
578
+ render: () => (
579
+ <div style={{ maxWidth: 756 }}>
580
+ <Table
581
+ tableData={singlePlanWebsiteData}
582
+ title="Single plan quote website"
583
+ collapsibleSections
584
+ />
585
+ </div>
586
+ ),
587
+
588
+ name: 'Single Plan - Website',
589
+ };
590
+
591
+ const twoPlanWebsiteData: TableData = [
592
+ {
593
+ rows: [
594
+ [
595
+ { text: 'Our plans' },
596
+ {
597
+ type: 'CTA',
598
+ title: 'Plan name',
599
+ buttonCaption: 'Get a quote',
600
+ href: 'http://example.com',
601
+ },
602
+ {
603
+ type: 'CTA',
604
+ title: 'Plan name',
605
+ buttonCaption: 'Get a quote',
606
+ href: 'http://example.com',
607
+ },
608
+ ],
609
+ [
610
+ {
611
+ text: 'Monthly price',
612
+ description: 'Label description with additional pricing context',
613
+ },
614
+ { text: '~€14-35', fontVariant: 'PRICE', modalContent: 'Price info' },
615
+ { text: '~€50-91', fontVariant: 'PRICE', modalContent: 'Price info' },
616
+ ],
617
+ [
618
+ {
619
+ text: 'Label with info',
620
+ modalContent: 'Label info',
621
+ },
622
+ { text: 'Text value' },
623
+ { text: 'Text value' },
624
+ ],
625
+ [
626
+ {
627
+ text: 'Label with info',
628
+ modalContent: 'Label info',
629
+ },
630
+ { text: 'Text value', modalContent: 'Value info' },
631
+ { text: 'Text value', modalContent: 'Value info' },
632
+ ],
633
+ [
634
+ { text: 'Label with a boolean value' },
635
+ { checkmarkValue: true, description: 'Value description' },
636
+ { checkmarkValue: true, description: 'Value description' },
637
+ ],
638
+ ],
639
+ },
640
+ {
641
+ section: {
642
+ title: 'First section',
643
+ },
644
+ rows: [
645
+ [
646
+ { text: 'Row label' },
647
+ { text: 'Up to €1,500' },
648
+ { text: 'Up to €3,000' },
649
+ ],
650
+ ],
651
+ },
652
+ {
653
+ section: {
654
+ title: 'Second section',
655
+ },
656
+ rows: [
657
+ [
658
+ { text: 'Row label', description: 'Row label description' },
659
+ { checkmarkValue: true },
660
+ { checkmarkValue: true },
661
+ ],
662
+ [
663
+ { text: 'Row label' },
664
+ { checkmarkValue: false },
665
+ { checkmarkValue: false },
666
+ ],
667
+ [
668
+ { text: 'Row label', description: 'Row label description' },
669
+ { checkmarkValue: false },
670
+ { checkmarkValue: true },
671
+ ],
672
+ [
673
+ { text: 'Row label' },
674
+ { text: 'Text value' },
675
+ { checkmarkValue: true },
676
+ ],
677
+ [
678
+ { text: 'Row label' },
679
+ { text: 'Text value', description: 'Value description' },
680
+ { text: 'Text value', description: 'Value description' },
681
+ ],
682
+ ],
683
+ },
684
+ {
685
+ section: {
686
+ title: 'Third section',
687
+ },
688
+ rows: [
689
+ [
690
+ { text: 'Row label' },
691
+ { checkmarkValue: true },
692
+ { checkmarkValue: true },
693
+ ],
694
+ ],
695
+ },
696
+ {
697
+ section: {
698
+ title: 'Fourth section',
699
+ },
700
+ rows: [
701
+ [
702
+ { text: 'Row label' },
703
+ { checkmarkValue: false },
704
+ { checkmarkValue: true },
705
+ ],
706
+ ],
707
+ },
708
+ {
709
+ section: {
710
+ title: 'Fifth section',
711
+ },
712
+ rows: [
713
+ [
714
+ { text: 'Row label' },
715
+ { text: 'Text value' },
716
+ { text: 'Text value' },
717
+ ],
718
+ ],
719
+ },
720
+ ];
721
+
722
+ export const TwoPlanQuoteWebsite = {
723
+ render: () => (
724
+ <div style={{ maxWidth: 900 }}>
725
+ <Table
726
+ tableData={twoPlanWebsiteData}
727
+ title="Two plan quote website"
728
+ collapsibleSections
729
+ />
730
+ </div>
731
+ ),
732
+
733
+ name: 'Two Plan - Website',
734
+ };
735
+
736
+ const threePlanWebsiteData: TableData = [
737
+ {
738
+ rows: [
739
+ [
740
+ { text: 'Our plans' },
741
+ {
742
+ type: 'CTA',
743
+ icon: 'https://placehold.co/24x24/green/white',
744
+ title: 'Plan name',
745
+ buttonCaption: 'Get a quote',
746
+ href: '',
747
+ onClick: () => {},
748
+ },
749
+ {
750
+ type: 'CTA',
751
+ icon: 'https://placehold.co/24x24/blue/white',
752
+ title: 'Plan name',
753
+ buttonCaption: 'Get a quote',
754
+ href: '',
755
+ onClick: () => {},
756
+ },
757
+ {
758
+ type: 'CTA',
759
+ icon: 'https://placehold.co/24x24/orange/white',
760
+ title: 'Plan name',
761
+ buttonCaption: 'Get a quote',
762
+ href: '',
763
+ onClick: () => {},
764
+ },
765
+ ],
766
+ [
767
+ { text: 'Monthly price' },
768
+ { text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },
769
+ { text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },
770
+ { text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },
771
+ ],
772
+ [
773
+ { text: 'Label with star rating' },
774
+ { rating: { type: 'star', value: 2 }, modalContent: 'Rating info' },
775
+ { rating: { type: 'star', value: 3 } },
776
+ { rating: { type: 'star', value: 3 } },
777
+ ],
778
+ [
779
+ { text: 'Label with zap rating' },
780
+ { rating: { type: 'zap', value: 3 } },
781
+ { rating: { type: 'zap', value: 3 }, modalContent: 'Rating info' },
782
+ { rating: { type: 'zap', value: 3 }, modalContent: 'Rating info' },
783
+ ],
784
+ [
785
+ { text: 'Label with info', modalContent: 'Label info' },
786
+ { checkmarkValue: true },
787
+ { checkmarkValue: true },
788
+ { checkmarkValue: true },
789
+ ],
790
+ [
791
+ { text: 'Label with progress bar' },
792
+ { text: '100%' },
793
+ { text: '70%' },
794
+ { text: '100%' },
795
+ ],
796
+ ],
797
+ },
798
+ {
799
+ section: {
800
+ title: 'First section',
801
+ },
802
+ rows: [
803
+ [
804
+ { text: 'Row label with info', modalContent: 'Label info' },
805
+ { text: 'Up to €2 million' },
806
+ { text: 'Up to €1.5 million' },
807
+ { text: 'Up to €1.5 million' },
808
+ ],
809
+ [
810
+ { text: 'Row label with info', modalContent: 'Label info' },
811
+ { text: 'Text value' },
812
+ { text: 'Text value' },
813
+ { text: 'Text value' },
814
+ ],
815
+ [
816
+ { text: 'Row label' },
817
+ { text: '80% covered' },
818
+ { text: '80% covered' },
819
+ { text: '80% covered' },
820
+ ],
821
+ [
822
+ { text: 'Row label' },
823
+ { checkmarkValue: false },
824
+ { checkmarkValue: false },
825
+ { checkmarkValue: false },
826
+ ],
827
+ [
828
+ { text: 'Row label' },
829
+ { checkmarkValue: false },
830
+ { checkmarkValue: true },
831
+ { checkmarkValue: true },
832
+ ],
833
+ [
834
+ { text: 'Row label' },
835
+ { checkmarkValue: true },
836
+ { checkmarkValue: true },
837
+ { checkmarkValue: true },
838
+ ],
839
+ ],
840
+ },
841
+ ];
842
+
843
+ export const ThreePlanQuoteWebsite = {
844
+ render: () => (
845
+ <div style={{ maxWidth: 900 }}>
846
+ <Table
847
+ tableData={threePlanWebsiteData}
848
+ title="Three plan quote website"
849
+ collapsibleSections
850
+ />
851
+ </div>
852
+ ),
853
+
854
+ name: 'Three Plan - Website',
855
+ };
856
+
470
857
  export const TableDataType = () => {
471
858
  return (
472
859
  <pre>
@@ -127,7 +127,7 @@ export const BaseCell = ({
127
127
  </span>
128
128
  )}
129
129
 
130
- <div className="d-inline">
130
+ <div className="d-flex ai-center">
131
131
  {text && fontVariant === 'NORMAL' && (
132
132
  <div className={classNames(
133
133
  "p-p d-inline",
@@ -141,7 +141,7 @@ export const BaseCell = ({
141
141
 
142
142
  {text && fontVariant === 'PRICE' && (
143
143
  <div
144
- className="p-h1 p--serif tc-neutral-900"
144
+ className="p-h2 tc-neutral-900"
145
145
  data-testid="table-cell-content"
146
146
  >
147
147
  {text}
@@ -13,6 +13,7 @@ export type CTACellProps = {
13
13
  buttonCaption?: ReactNode;
14
14
  grey?: boolean;
15
15
  narrow?: boolean;
16
+ centered?: boolean;
16
17
  href: string;
17
18
  className?: string;
18
19
  dataTestId?: string;
@@ -26,6 +27,7 @@ export const CTACell = ({
26
27
  icon,
27
28
  grey,
28
29
  narrow,
30
+ centered,
29
31
  href,
30
32
  buttonCaption,
31
33
  imageComponent,
@@ -40,7 +42,9 @@ export const CTACell = ({
40
42
 
41
43
  return (
42
44
  <div
43
- className={classNames(className, "ta-left")}
45
+ className={classNames(className, 'ta-left', {
46
+ 'd-flex fd-column ai-center': centered,
47
+ })}
44
48
  data-cy={dataCy}
45
49
  data-testid={dataTestId}
46
50
  >
@@ -23,6 +23,10 @@
23
23
  }
24
24
  }
25
25
 
26
+ .navigationTitle {
27
+ padding-left: 0;
28
+ }
29
+
26
30
  .headerCell {
27
31
  vertical-align: top;
28
32
  }
@@ -54,6 +54,7 @@ const TableCell = React.memo(
54
54
  'ta-left': isFirstCellInRow,
55
55
  [styles.headerCell]: isHeader,
56
56
  [styles.thNavigation]: isNavigation,
57
+ [styles.navigationTitle]: isNavigation && isTopLeftCell,
57
58
  [styles.fixedCell]: isFirstCellInRow && colSpan < 1 ,
58
59
  [styles.fixedCard]: cellProps.type === 'CARD',
59
60
  [styles.selectedColumnTop]: selectedColumnPosition === 'top',
@@ -71,7 +72,9 @@ const TableCell = React.memo(
71
72
  }
72
73
  />
73
74
  )}
74
- {cellProps.type === 'CTA' && <CTACell {...cellProps} />}
75
+ {cellProps.type === 'CTA' && (
76
+ <CTACell {...cellProps} centered={isNavigation} />
77
+ )}
75
78
  {cellProps.type === 'BUTTON' && <ButtonCell {...cellProps} />}
76
79
  {cellProps.type === 'CARD' && <CardCell {...cellProps} />}
77
80
  </Tag>
@@ -1,4 +1,5 @@
1
1
  .collapsible {
2
+ display: flow-root;
2
3
  transition: max-height 0.3s ease-in-out;
3
4
  overflow-y: clip;
4
5
  }