@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
@@ -438,9 +438,363 @@ var SinglePlanQuoteTable = {
438
438
  render: function () { return (jsx("div", { style: { maxWidth: 756 }, children: jsx(Table, { tableData: singlePlanData, title: "Single plan quote", collapsibleSections: true, hideTableNavigation: true, hideStickyHeader: true, showSelectedColumn: true }) })); },
439
439
  name: 'Single Plan Quote',
440
440
  };
441
+ var singlePlanWebsiteData = [
442
+ {
443
+ rows: [
444
+ [
445
+ { text: 'Our plans' },
446
+ {
447
+ type: 'CTA',
448
+ title: 'Plan name',
449
+ buttonCaption: 'Get a quote',
450
+ href: 'http://example.com',
451
+ },
452
+ ],
453
+ [
454
+ { text: 'Monthly price' },
455
+ {
456
+ text: '~€99',
457
+ fontVariant: 'PRICE',
458
+ modalContent: 'Price info',
459
+ },
460
+ ],
461
+ [
462
+ { text: 'Label with a description value' },
463
+ { text: 'Value', description: 'Value description' },
464
+ ],
465
+ [
466
+ {
467
+ text: 'Label with a long text that wraps into multiple lines in the table',
468
+ },
469
+ {
470
+ checkmarkValue: true,
471
+ modalContent: 'Checkmark info',
472
+ },
473
+ ],
474
+ [
475
+ {
476
+ text: 'Label with a boolean value',
477
+ },
478
+ { checkmarkValue: false },
479
+ ],
480
+ [
481
+ {
482
+ text: 'Label with info',
483
+ modalContent: 'Label info',
484
+ },
485
+ { text: 'Text value' },
486
+ ],
487
+ ],
488
+ },
489
+ {
490
+ section: {
491
+ title: 'First section',
492
+ },
493
+ rows: [
494
+ [{ text: 'Row label' }, { checkmarkValue: true }],
495
+ [{ text: 'Row label' }, { checkmarkValue: true }],
496
+ [{ text: 'Row label' }, { checkmarkValue: true }],
497
+ ],
498
+ },
499
+ {
500
+ section: {
501
+ title: 'Second section',
502
+ },
503
+ rows: [
504
+ [{ text: 'Row label' }, { checkmarkValue: true }],
505
+ [{ text: 'Row label' }, { checkmarkValue: false }],
506
+ ],
507
+ },
508
+ {
509
+ section: {
510
+ title: 'Third section',
511
+ },
512
+ rows: [
513
+ [
514
+ { text: 'Row label' },
515
+ { text: 'Up to €1,500', description: 'Value description' },
516
+ ],
517
+ ],
518
+ },
519
+ {
520
+ section: {
521
+ title: 'Fourth section',
522
+ },
523
+ rows: [
524
+ [{ text: 'Row label' }, { checkmarkValue: true }],
525
+ [{ text: 'Row label' }, { checkmarkValue: true }],
526
+ ],
527
+ },
528
+ {
529
+ section: {
530
+ title: 'Fifth section',
531
+ },
532
+ rows: [
533
+ [{ text: 'Row label' }, { checkmarkValue: true }],
534
+ [{ text: 'Row label' }, { checkmarkValue: true }],
535
+ ],
536
+ },
537
+ {
538
+ section: {
539
+ title: 'Sixth section',
540
+ },
541
+ rows: [
542
+ [{ text: 'Row label' }, { text: 'Up to €5,000' }],
543
+ [{ text: 'Row label' }, { checkmarkValue: true }],
544
+ ],
545
+ },
546
+ ];
547
+ var SinglePlanQuoteWebsite = {
548
+ render: function () { return (jsx("div", { style: { maxWidth: 756 }, children: jsx(Table, { tableData: singlePlanWebsiteData, title: "Single plan quote website", collapsibleSections: true }) })); },
549
+ name: 'Single Plan - Website',
550
+ };
551
+ var twoPlanWebsiteData = [
552
+ {
553
+ rows: [
554
+ [
555
+ { text: 'Our plans' },
556
+ {
557
+ type: 'CTA',
558
+ title: 'Plan name',
559
+ buttonCaption: 'Get a quote',
560
+ href: 'http://example.com',
561
+ },
562
+ {
563
+ type: 'CTA',
564
+ title: 'Plan name',
565
+ buttonCaption: 'Get a quote',
566
+ href: 'http://example.com',
567
+ },
568
+ ],
569
+ [
570
+ {
571
+ text: 'Monthly price',
572
+ description: 'Label description with additional pricing context',
573
+ },
574
+ { text: '~€14-35', fontVariant: 'PRICE', modalContent: 'Price info' },
575
+ { text: '~€50-91', fontVariant: 'PRICE', modalContent: 'Price info' },
576
+ ],
577
+ [
578
+ {
579
+ text: 'Label with info',
580
+ modalContent: 'Label info',
581
+ },
582
+ { text: 'Text value' },
583
+ { text: 'Text value' },
584
+ ],
585
+ [
586
+ {
587
+ text: 'Label with info',
588
+ modalContent: 'Label info',
589
+ },
590
+ { text: 'Text value', modalContent: 'Value info' },
591
+ { text: 'Text value', modalContent: 'Value info' },
592
+ ],
593
+ [
594
+ { text: 'Label with a boolean value' },
595
+ { checkmarkValue: true, description: 'Value description' },
596
+ { checkmarkValue: true, description: 'Value description' },
597
+ ],
598
+ ],
599
+ },
600
+ {
601
+ section: {
602
+ title: 'First section',
603
+ },
604
+ rows: [
605
+ [
606
+ { text: 'Row label' },
607
+ { text: 'Up to €1,500' },
608
+ { text: 'Up to €3,000' },
609
+ ],
610
+ ],
611
+ },
612
+ {
613
+ section: {
614
+ title: 'Second section',
615
+ },
616
+ rows: [
617
+ [
618
+ { text: 'Row label', description: 'Row label description' },
619
+ { checkmarkValue: true },
620
+ { checkmarkValue: true },
621
+ ],
622
+ [
623
+ { text: 'Row label' },
624
+ { checkmarkValue: false },
625
+ { checkmarkValue: false },
626
+ ],
627
+ [
628
+ { text: 'Row label', description: 'Row label description' },
629
+ { checkmarkValue: false },
630
+ { checkmarkValue: true },
631
+ ],
632
+ [
633
+ { text: 'Row label' },
634
+ { text: 'Text value' },
635
+ { checkmarkValue: true },
636
+ ],
637
+ [
638
+ { text: 'Row label' },
639
+ { text: 'Text value', description: 'Value description' },
640
+ { text: 'Text value', description: 'Value description' },
641
+ ],
642
+ ],
643
+ },
644
+ {
645
+ section: {
646
+ title: 'Third section',
647
+ },
648
+ rows: [
649
+ [
650
+ { text: 'Row label' },
651
+ { checkmarkValue: true },
652
+ { checkmarkValue: true },
653
+ ],
654
+ ],
655
+ },
656
+ {
657
+ section: {
658
+ title: 'Fourth section',
659
+ },
660
+ rows: [
661
+ [
662
+ { text: 'Row label' },
663
+ { checkmarkValue: false },
664
+ { checkmarkValue: true },
665
+ ],
666
+ ],
667
+ },
668
+ {
669
+ section: {
670
+ title: 'Fifth section',
671
+ },
672
+ rows: [
673
+ [
674
+ { text: 'Row label' },
675
+ { text: 'Text value' },
676
+ { text: 'Text value' },
677
+ ],
678
+ ],
679
+ },
680
+ ];
681
+ var TwoPlanQuoteWebsite = {
682
+ render: function () { return (jsx("div", { style: { maxWidth: 900 }, children: jsx(Table, { tableData: twoPlanWebsiteData, title: "Two plan quote website", collapsibleSections: true }) })); },
683
+ name: 'Two Plan - Website',
684
+ };
685
+ var threePlanWebsiteData = [
686
+ {
687
+ rows: [
688
+ [
689
+ { text: 'Our plans' },
690
+ {
691
+ type: 'CTA',
692
+ icon: 'https://placehold.co/24x24/green/white',
693
+ title: 'Plan name',
694
+ buttonCaption: 'Get a quote',
695
+ href: '',
696
+ onClick: function () { },
697
+ },
698
+ {
699
+ type: 'CTA',
700
+ icon: 'https://placehold.co/24x24/blue/white',
701
+ title: 'Plan name',
702
+ buttonCaption: 'Get a quote',
703
+ href: '',
704
+ onClick: function () { },
705
+ },
706
+ {
707
+ type: 'CTA',
708
+ icon: 'https://placehold.co/24x24/orange/white',
709
+ title: 'Plan name',
710
+ buttonCaption: 'Get a quote',
711
+ href: '',
712
+ onClick: function () { },
713
+ },
714
+ ],
715
+ [
716
+ { text: 'Monthly price' },
717
+ { text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },
718
+ { text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },
719
+ { text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },
720
+ ],
721
+ [
722
+ { text: 'Label with star rating' },
723
+ { rating: { type: 'star', value: 2 }, modalContent: 'Rating info' },
724
+ { rating: { type: 'star', value: 3 } },
725
+ { rating: { type: 'star', value: 3 } },
726
+ ],
727
+ [
728
+ { text: 'Label with zap rating' },
729
+ { rating: { type: 'zap', value: 3 } },
730
+ { rating: { type: 'zap', value: 3 }, modalContent: 'Rating info' },
731
+ { rating: { type: 'zap', value: 3 }, modalContent: 'Rating info' },
732
+ ],
733
+ [
734
+ { text: 'Label with info', modalContent: 'Label info' },
735
+ { checkmarkValue: true },
736
+ { checkmarkValue: true },
737
+ { checkmarkValue: true },
738
+ ],
739
+ [
740
+ { text: 'Label with progress bar' },
741
+ { text: '100%' },
742
+ { text: '70%' },
743
+ { text: '100%' },
744
+ ],
745
+ ],
746
+ },
747
+ {
748
+ section: {
749
+ title: 'First section',
750
+ },
751
+ rows: [
752
+ [
753
+ { text: 'Row label with info', modalContent: 'Label info' },
754
+ { text: 'Up to €2 million' },
755
+ { text: 'Up to €1.5 million' },
756
+ { text: 'Up to €1.5 million' },
757
+ ],
758
+ [
759
+ { text: 'Row label with info', modalContent: 'Label info' },
760
+ { text: 'Text value' },
761
+ { text: 'Text value' },
762
+ { text: 'Text value' },
763
+ ],
764
+ [
765
+ { text: 'Row label' },
766
+ { text: '80% covered' },
767
+ { text: '80% covered' },
768
+ { text: '80% covered' },
769
+ ],
770
+ [
771
+ { text: 'Row label' },
772
+ { checkmarkValue: false },
773
+ { checkmarkValue: false },
774
+ { checkmarkValue: false },
775
+ ],
776
+ [
777
+ { text: 'Row label' },
778
+ { checkmarkValue: false },
779
+ { checkmarkValue: true },
780
+ { checkmarkValue: true },
781
+ ],
782
+ [
783
+ { text: 'Row label' },
784
+ { checkmarkValue: true },
785
+ { checkmarkValue: true },
786
+ { checkmarkValue: true },
787
+ ],
788
+ ],
789
+ },
790
+ ];
791
+ var ThreePlanQuoteWebsite = {
792
+ render: function () { return (jsx("div", { style: { maxWidth: 900 }, children: jsx(Table, { tableData: threePlanWebsiteData, title: "Three plan quote website", collapsibleSections: true }) })); },
793
+ name: 'Three Plan - Website',
794
+ };
441
795
  var TableDataType = function () {
442
796
  return (jsx("pre", { children: "\ntype TableData = {\n section?: \n title?: string;\n icon?: ReactNode;\n };\n rows: {\n align?: 'center' | 'left' | 'right';\n checkmarkValue?: boolean;\n text?: ReactNode;\n modalContent?: ReactNode;\n subContent?: ReactNode;\n rating?: {\n value: number;\n type: 'zap' | 'star';\n }\n openModal?: (modalContent: ReactNode) => void;\n }[][];\n}[];\n " }));
443
797
  };
444
798
 
445
- export { SinglePlanQuoteTable, TableDataType, TableStory, story as default };
799
+ export { SinglePlanQuoteTable, SinglePlanQuoteWebsite, TableDataType, TableStory, ThreePlanQuoteWebsite, TwoPlanQuoteWebsite, story as default };
446
800
  //# sourceMappingURL=Table.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.stories.js","sources":["../../../../../src/lib/components/table/Table.stories.tsx"],"sourcesContent":["import { Table, TableProps } from './Table';\nimport { DentalPlusIcon, PlaneIcon } from '../icon';\nimport { TableData } from './types';\nimport { useState } from 'react';\nimport { Input } from '../input';\n\nconst initialData: TableData = [\n {\n rows: [\n [\n { text: 'Our plans' },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/orange/white',\n title: 'Standard',\n price: '€234',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/green/white',\n title: 'Plus',\n price: '€344',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n {\n type: 'CTA',\n icon: <PlaneIcon size={24} noMargin />,\n title: 'Premium',\n price: '€556',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n ],\n [\n { text: 'Select a plan' },\n {\n type: 'BUTTON',\n buttonCaption: 'Standard',\n price: '€234',\n onClick: () => {},\n },\n {\n type: 'BUTTON',\n buttonCaption: 'Plus',\n price: '€344',\n onClick: () => {},\n },\n {\n type: 'BUTTON',\n buttonCaption: 'Premium',\n price: '€556',\n onClick: () => {},\n },\n ],\n [\n {\n text: 'Your contribution',\n },\n {\n cellId: '#1',\n text: '€210',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n {\n cellId: '#2',\n text: '€275',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n {\n cellId: '#3',\n text: '€310',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n ],\n [\n {\n text: 'Regular vet visits & medication',\n description: 'Pflegepflichtversicherungrightno',\n modalContent: 'Some stories about vets',\n },\n { text: 'No', description: 'Annual Only' },\n { text: '50%' },\n { text: '80%-100%' },\n ],\n [\n {\n text: 'Operations',\n modalContent: 'Operations info',\n modalTitle: 'Custom operations modal title',\n },\n {\n checkmarkValue: true,\n modalContent: 'Operations info column 2',\n modalTitle: 'Custom operations modal title column 2',\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'Rating info' },\n { rating: { type: 'zap', value: 1 } },\n {\n rating: { type: 'zap', value: 3 },\n modalContent: 'Rating info column 3',\n },\n { rating: { type: 'star', value: 3 } },\n ],\n ],\n },\n {\n section: {\n title: 'Dental',\n },\n rows: [\n [\n { text: 'Regular vet visits & medication' },\n { text: 'No' },\n { text: 'Yes' },\n { text: 'Yes' },\n ],\n [\n { text: 'Operations', modalContent: 'info' },\n {\n text: 'This is a table cell with a lot of text',\n modalContent: 'Maybe',\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n {\n type: 'CARD',\n colSpan: 3,\n title: 'Dental add-on',\n href: 'https://example.com',\n icon: 'https://placehold.co/24x24/green/yellow',\n description:\n 'Get your dental cleanings and additional treatments covered for just 10.90€ a month.',\n },\n ],\n ],\n },\n {\n section: {\n title: 'Travel',\n icon: 'https://placehold.co/24x24/red/yellow',\n },\n rows: [\n [\n { text: 'Regular vet visits & medication' },\n { text: 'No', checkmarkValue: false },\n { text: 'Yes' },\n { text: 'Yes' },\n ],\n [\n { text: 'Operations', modalContent: 'info' },\n {\n checkmarkValue: true,\n modalContent: 'Maybe',\n description: 'This is a table cell with a long subtitle',\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n ],\n },\n];\n\nconst story = {\n title: 'JSX/Table',\n component: Table,\n argTypes: {\n tableData: {\n subContent:\n 'This property allows to set the data of the Table component.',\n },\n title: {\n subContent:\n 'This property allows to add a title to the Table component for accessibility purposes.',\n },\n collapsibleSections: {\n subContent: 'This property allows to collapse the sections of the table.',\n },\n scrollOnOpen: {\n subContent:\n 'When enabled, the page scrolls to the top of a newly expanded section.',\n },\n scrollTopOffset: {\n subContent:\n 'Offset in pixels from the top of the viewport when scrolling to an expanded section.',\n },\n hideDetails: {\n subContent: 'This property allows to hide the details of the table.',\n },\n hideStickyHeader: {\n subContent:\n 'This property allows to hide the sticky header row on desktop, e.g. for single plan tables without a plan selector.',\n },\n stickyHeaderTopOffset: {\n subContent:\n 'This property allows to set the offset of the sticky header.',\n },\n className: {\n subContent:\n 'This property allows to set a custom class to the Table component.',\n },\n textOverrides: {\n subContent:\n 'This property allows to set custom text for the show and hide details buttons.',\n },\n hideColumns: {\n subContent: 'This property allows to hide defined columns by index.',\n },\n hideRows: {\n subContent: 'This property allows to hide selected rows by index.',\n },\n modalContentRenderer: {\n subContent: 'This property allows to render custom modal content.',\n },\n onSelectionChanged: {\n subContent:\n 'This event is triggered when a selection is changed. It receives the index of the selection as an argument.',\n table: {\n category: 'Events',\n },\n },\n onModalOpen: {\n subContent:\n 'This event is triggered when a modal is opened. It receives the title and body of the modal as arguments.',\n table: {\n category: 'Events',\n },\n },\n },\n args: {\n tableData: initialData,\n collapsibleSections: true,\n scrollOnOpen: true,\n scrollTopOffset: 0,\n hideDetails: false,\n stickyHeaderTopOffset: 0,\n title: 'Title of the table',\n className: '',\n textOverrides: {\n showDetails: 'Show details',\n hideDetails: 'Hide details',\n },\n hideColumns: [],\n hideRows: [],\n hideTableNavigation: true,\n showSelectedColumn: false,\n },\n};\n\nexport const TableStory = {\n render: ({\n collapsibleSections,\n scrollOnOpen,\n scrollTopOffset,\n tableData,\n hideColumns,\n hideDetails,\n hideRows,\n stickyHeaderTopOffset,\n textOverrides,\n title,\n activeSection,\n hideTableNavigation,\n showSelectedColumn,\n }: TableProps) => {\n const [price, setPrice] = useState(999);\n return (\n <div>\n <div className=\"d-flex fd-column p24 mb80 gap16 wmx5\">\n <label htmlFor=\"\">Change price to see replacement in action: </label>\n <Input\n id=\"#stuff\"\n type=\"text\"\n onChange={(e) => setPrice(Number(e.target.value))}\n value={price}\n />\n </div>\n\n <Table\n cellReplacements={{\n '#1': {\n type: 'CTA',\n title: 'Replaced!',\n price: `€${price}`,\n buttonCaption: 'I got replaced',\n href: 'http://example.com',\n },\n '#2': {\n type: 'BUTTON',\n buttonCaption: 'I got replaced too',\n },\n '#3': {\n description: 'per year',\n },\n }}\n collapsibleSections={collapsibleSections}\n scrollOnOpen={scrollOnOpen}\n scrollTopOffset={scrollTopOffset}\n tableData={tableData}\n hideColumns={hideColumns}\n hideDetails={hideDetails}\n hideRows={hideRows}\n stickyHeaderTopOffset={stickyHeaderTopOffset}\n textOverrides={textOverrides}\n title={title}\n activeSection={activeSection}\n hideTableNavigation={hideTableNavigation}\n showSelectedColumn={showSelectedColumn}\n />\n </div>\n );\n },\n\n name: 'Table',\n};\n\nconst singlePlanData: TableData = [\n {\n rows: [\n [{ text: '' }, { text: '' }],\n [\n { text: 'Price' },\n {\n text: '€9.99',\n description: 'With monthly cancellation',\n fontVariant: 'PRICE',\n },\n ],\n [\n {\n text: 'Regular vet visits & medication',\n modalContent: 'Some stories about vets',\n },\n { text: 'Up to €1 million' },\n ],\n [\n {\n text: 'Specialist visits',\n modalContent: 'Some stories about specialists',\n },\n { text: '4 visits per year' },\n ],\n [{ text: 'Medication' }, { text: '80% covered' }],\n [{ text: 'Grooming' }, { checkmarkValue: false }],\n [{ text: 'Boarding fees' }, { checkmarkValue: false }],\n [\n {\n text: 'Alternative treatments',\n description: 'E.g. physiotherapy, hydrotherapy',\n },\n { checkmarkValue: false },\n ],\n ],\n },\n {\n section: {\n title: 'Dental',\n },\n rows: [\n [{ text: 'Dental cleanings' }, { text: 'Up to €500' }],\n [{ text: 'Dental treatments' }, { text: 'Up to €500' }],\n [{ text: 'Operations' }, { checkmarkValue: true }],\n ],\n },\n {\n section: {\n title: 'Travel',\n },\n rows: [\n [{ text: 'Trips abroad' }, { checkmarkValue: true }],\n [{ text: 'Emergency care abroad' }, { checkmarkValue: true }],\n ],\n },\n {\n section: {\n title: 'Add-ons',\n },\n rows: [\n [{ text: 'Extended coverage' }, { checkmarkValue: true }],\n [{ text: 'Equipment protection' }, { checkmarkValue: true }],\n ],\n },\n];\n\nexport const SinglePlanQuoteTable = {\n render: () => (\n <div style={{ maxWidth: 756 }}>\n <Table\n tableData={singlePlanData}\n title=\"Single plan quote\"\n collapsibleSections\n hideTableNavigation\n hideStickyHeader\n showSelectedColumn\n />\n </div>\n ),\n\n name: 'Single Plan Quote',\n};\n\nexport const TableDataType = () => {\n return (\n <pre>\n {`\ntype TableData = {\n section?: \n title?: string;\n icon?: ReactNode;\n };\n rows: {\n align?: 'center' | 'left' | 'right';\n checkmarkValue?: boolean;\n text?: ReactNode;\n modalContent?: ReactNode;\n subContent?: ReactNode;\n rating?: {\n value: number;\n type: 'zap' | 'star';\n }\n openModal?: (modalContent: ReactNode) => void;\n }[][];\n}[];\n `}\n </pre>\n );\n};\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAM,WAAW,GAAc;AAC7B,IAAA;AACE,QAAA,IAAI,EAAE;AACJ,YAAA;gBACE,EAAE,IAAI,EAAE,WAAW,EAAE;AACrB,gBAAA;AACE,oBAAA,IAAI,EAAE,KAAK;AACX,oBAAA,IAAI,EAAE,yCAAyC;AAC/C,oBAAA,KAAK,EAAE,UAAU;AACjB,oBAAA,KAAK,EAAE,MAAM;AACb,oBAAA,aAAa,EAAE,aAAa;AAC5B,oBAAA,IAAI,EAAE,oBAAoB;AAC3B,iBAAA;AACD,gBAAA;AACE,oBAAA,IAAI,EAAE,KAAK;AACX,oBAAA,IAAI,EAAE,wCAAwC;AAC9C,oBAAA,KAAK,EAAE,MAAM;AACb,oBAAA,KAAK,EAAE,MAAM;AACb,oBAAA,aAAa,EAAE,aAAa;AAC5B,oBAAA,IAAI,EAAE,oBAAoB;AAC3B,iBAAA;AACD,gBAAA;AACE,oBAAA,IAAI,EAAE,KAAK;oBACX,IAAI,EAAEA,IAAC,SAAS,EAAA,EAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAA,IAAA,EAAA,CA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AI,EAAE,CAAC;AACnD,SAAA;AACF,KAAA;AACD,IAAA;AACE,QAAA,OAAO,EAAE;AACP,YAAA,KAAK,EAAE,QAAQ;AAChB,SAAA;AACD,QAAA,IAAI,EAAE;YACJ,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;YACpD,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;AAC9D,SAAA;AACF,KAAA;AACD,IAAA;AACE,QAAA,OAAO,EAAE;AACP,YAAA,KAAK,EAAE,SAAS;AACjB,SAAA;AACD,QAAA,IAAI,EAAE;YACJ,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;YACzD,CAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;AAC7D,SAAA;AACF,KAAA;CACF;AAEM,IAAM,oBAAoB,GAAG;AAClC,IAAA,MAAM,EAAE,YAAA,EAAM,QACZA,aAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAA,QAAA,EAC3BA,GAAA,CAAC,KAAK,EAAA,EACJ,SAAS,EAAE,cAAc,EACzB,KAAK,EAAC,mBAAmB,EACzB,mBAAmB,EAAA,IAAA,EACnB,mBAAmB,EAAA,IAAA,EACnB,gBAAgB,QAChB,kBAAkB,EAAA,IAAA,EAAA,CAClB,EAAA,CACE,GAVM,CAWb;AAED,IAAA,IAAI,EAAE,mBAAmB;;AAGpB,IAAM,aAAa,GAAG,YAAA;AAC3B,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAA,QAAA,EACG,mZAmBA,EAAA,CACG;AAEV;;;;"}
1
+ {"version":3,"file":"Table.stories.js","sources":["../../../../../src/lib/components/table/Table.stories.tsx"],"sourcesContent":["import { Table, TableProps } from './Table';\nimport { DentalPlusIcon, PlaneIcon } from '../icon';\nimport { TableData } from './types';\nimport { useState } from 'react';\nimport { Input } from '../input';\n\nconst initialData: TableData = [\n {\n rows: [\n [\n { text: 'Our plans' },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/orange/white',\n title: 'Standard',\n price: '€234',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/green/white',\n title: 'Plus',\n price: '€344',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n {\n type: 'CTA',\n icon: <PlaneIcon size={24} noMargin />,\n title: 'Premium',\n price: '€556',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n ],\n [\n { text: 'Select a plan' },\n {\n type: 'BUTTON',\n buttonCaption: 'Standard',\n price: '€234',\n onClick: () => {},\n },\n {\n type: 'BUTTON',\n buttonCaption: 'Plus',\n price: '€344',\n onClick: () => {},\n },\n {\n type: 'BUTTON',\n buttonCaption: 'Premium',\n price: '€556',\n onClick: () => {},\n },\n ],\n [\n {\n text: 'Your contribution',\n },\n {\n cellId: '#1',\n text: '€210',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n {\n cellId: '#2',\n text: '€275',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n {\n cellId: '#3',\n text: '€310',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n ],\n [\n {\n text: 'Regular vet visits & medication',\n description: 'Pflegepflichtversicherungrightno',\n modalContent: 'Some stories about vets',\n },\n { text: 'No', description: 'Annual Only' },\n { text: '50%' },\n { text: '80%-100%' },\n ],\n [\n {\n text: 'Operations',\n modalContent: 'Operations info',\n modalTitle: 'Custom operations modal title',\n },\n {\n checkmarkValue: true,\n modalContent: 'Operations info column 2',\n modalTitle: 'Custom operations modal title column 2',\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'Rating info' },\n { rating: { type: 'zap', value: 1 } },\n {\n rating: { type: 'zap', value: 3 },\n modalContent: 'Rating info column 3',\n },\n { rating: { type: 'star', value: 3 } },\n ],\n ],\n },\n {\n section: {\n title: 'Dental',\n },\n rows: [\n [\n { text: 'Regular vet visits & medication' },\n { text: 'No' },\n { text: 'Yes' },\n { text: 'Yes' },\n ],\n [\n { text: 'Operations', modalContent: 'info' },\n {\n text: 'This is a table cell with a lot of text',\n modalContent: 'Maybe',\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n {\n type: 'CARD',\n colSpan: 3,\n title: 'Dental add-on',\n href: 'https://example.com',\n icon: 'https://placehold.co/24x24/green/yellow',\n description:\n 'Get your dental cleanings and additional treatments covered for just 10.90€ a month.',\n },\n ],\n ],\n },\n {\n section: {\n title: 'Travel',\n icon: 'https://placehold.co/24x24/red/yellow',\n },\n rows: [\n [\n { text: 'Regular vet visits & medication' },\n { text: 'No', checkmarkValue: false },\n { text: 'Yes' },\n { text: 'Yes' },\n ],\n [\n { text: 'Operations', modalContent: 'info' },\n {\n checkmarkValue: true,\n modalContent: 'Maybe',\n description: 'This is a table cell with a long subtitle',\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n ],\n },\n];\n\nconst story = {\n title: 'JSX/Table',\n component: Table,\n argTypes: {\n tableData: {\n subContent:\n 'This property allows to set the data of the Table component.',\n },\n title: {\n subContent:\n 'This property allows to add a title to the Table component for accessibility purposes.',\n },\n collapsibleSections: {\n subContent: 'This property allows to collapse the sections of the table.',\n },\n scrollOnOpen: {\n subContent:\n 'When enabled, the page scrolls to the top of a newly expanded section.',\n },\n scrollTopOffset: {\n subContent:\n 'Offset in pixels from the top of the viewport when scrolling to an expanded section.',\n },\n hideDetails: {\n subContent: 'This property allows to hide the details of the table.',\n },\n hideStickyHeader: {\n subContent:\n 'This property allows to hide the sticky header row on desktop, e.g. for single plan tables without a plan selector.',\n },\n stickyHeaderTopOffset: {\n subContent:\n 'This property allows to set the offset of the sticky header.',\n },\n className: {\n subContent:\n 'This property allows to set a custom class to the Table component.',\n },\n textOverrides: {\n subContent:\n 'This property allows to set custom text for the show and hide details buttons.',\n },\n hideColumns: {\n subContent: 'This property allows to hide defined columns by index.',\n },\n hideRows: {\n subContent: 'This property allows to hide selected rows by index.',\n },\n modalContentRenderer: {\n subContent: 'This property allows to render custom modal content.',\n },\n onSelectionChanged: {\n subContent:\n 'This event is triggered when a selection is changed. It receives the index of the selection as an argument.',\n table: {\n category: 'Events',\n },\n },\n onModalOpen: {\n subContent:\n 'This event is triggered when a modal is opened. It receives the title and body of the modal as arguments.',\n table: {\n category: 'Events',\n },\n },\n },\n args: {\n tableData: initialData,\n collapsibleSections: true,\n scrollOnOpen: true,\n scrollTopOffset: 0,\n hideDetails: false,\n stickyHeaderTopOffset: 0,\n title: 'Title of the table',\n className: '',\n textOverrides: {\n showDetails: 'Show details',\n hideDetails: 'Hide details',\n },\n hideColumns: [],\n hideRows: [],\n hideTableNavigation: true,\n showSelectedColumn: false,\n },\n};\n\nexport const TableStory = {\n render: ({\n collapsibleSections,\n scrollOnOpen,\n scrollTopOffset,\n tableData,\n hideColumns,\n hideDetails,\n hideRows,\n stickyHeaderTopOffset,\n textOverrides,\n title,\n activeSection,\n hideTableNavigation,\n showSelectedColumn,\n }: TableProps) => {\n const [price, setPrice] = useState(999);\n return (\n <div>\n <div className=\"d-flex fd-column p24 mb80 gap16 wmx5\">\n <label htmlFor=\"\">Change price to see replacement in action: </label>\n <Input\n id=\"#stuff\"\n type=\"text\"\n onChange={(e) => setPrice(Number(e.target.value))}\n value={price}\n />\n </div>\n\n <Table\n cellReplacements={{\n '#1': {\n type: 'CTA',\n title: 'Replaced!',\n price: `€${price}`,\n buttonCaption: 'I got replaced',\n href: 'http://example.com',\n },\n '#2': {\n type: 'BUTTON',\n buttonCaption: 'I got replaced too',\n },\n '#3': {\n description: 'per year',\n },\n }}\n collapsibleSections={collapsibleSections}\n scrollOnOpen={scrollOnOpen}\n scrollTopOffset={scrollTopOffset}\n tableData={tableData}\n hideColumns={hideColumns}\n hideDetails={hideDetails}\n hideRows={hideRows}\n stickyHeaderTopOffset={stickyHeaderTopOffset}\n textOverrides={textOverrides}\n title={title}\n activeSection={activeSection}\n hideTableNavigation={hideTableNavigation}\n showSelectedColumn={showSelectedColumn}\n />\n </div>\n );\n },\n\n name: 'Table',\n};\n\nconst singlePlanData: TableData = [\n {\n rows: [\n [{ text: '' }, { text: '' }],\n [\n { text: 'Price' },\n {\n text: '€9.99',\n description: 'With monthly cancellation',\n fontVariant: 'PRICE',\n },\n ],\n [\n {\n text: 'Regular vet visits & medication',\n modalContent: 'Some stories about vets',\n },\n { text: 'Up to €1 million' },\n ],\n [\n {\n text: 'Specialist visits',\n modalContent: 'Some stories about specialists',\n },\n { text: '4 visits per year' },\n ],\n [{ text: 'Medication' }, { text: '80% covered' }],\n [{ text: 'Grooming' }, { checkmarkValue: false }],\n [{ text: 'Boarding fees' }, { checkmarkValue: false }],\n [\n {\n text: 'Alternative treatments',\n description: 'E.g. physiotherapy, hydrotherapy',\n },\n { checkmarkValue: false },\n ],\n ],\n },\n {\n section: {\n title: 'Dental',\n },\n rows: [\n [{ text: 'Dental cleanings' }, { text: 'Up to €500' }],\n [{ text: 'Dental treatments' }, { text: 'Up to €500' }],\n [{ text: 'Operations' }, { checkmarkValue: true }],\n ],\n },\n {\n section: {\n title: 'Travel',\n },\n rows: [\n [{ text: 'Trips abroad' }, { checkmarkValue: true }],\n [{ text: 'Emergency care abroad' }, { checkmarkValue: true }],\n ],\n },\n {\n section: {\n title: 'Add-ons',\n },\n rows: [\n [{ text: 'Extended coverage' }, { checkmarkValue: true }],\n [{ text: 'Equipment protection' }, { checkmarkValue: true }],\n ],\n },\n];\n\nexport const SinglePlanQuoteTable = {\n render: () => (\n <div style={{ maxWidth: 756 }}>\n <Table\n tableData={singlePlanData}\n title=\"Single plan quote\"\n collapsibleSections\n hideTableNavigation\n hideStickyHeader\n showSelectedColumn\n />\n </div>\n ),\n\n name: 'Single Plan Quote',\n};\n\nconst singlePlanWebsiteData: TableData = [\n {\n rows: [\n [\n { text: 'Our plans' },\n {\n type: 'CTA',\n title: 'Plan name',\n buttonCaption: 'Get a quote',\n href: 'http://example.com',\n },\n ],\n [\n { text: 'Monthly price' },\n {\n text: '~€99',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n ],\n [\n { text: 'Label with a description value' },\n { text: 'Value', description: 'Value description' },\n ],\n [\n {\n text: 'Label with a long text that wraps into multiple lines in the table',\n },\n {\n checkmarkValue: true,\n modalContent: 'Checkmark info',\n },\n ],\n [\n {\n text: 'Label with a boolean value',\n },\n { checkmarkValue: false },\n ],\n [\n {\n text: 'Label with info',\n modalContent: 'Label info',\n },\n { text: 'Text value' },\n ],\n ],\n },\n {\n section: {\n title: 'First section',\n },\n rows: [\n [{ text: 'Row label' }, { checkmarkValue: true }],\n [{ text: 'Row label' }, { checkmarkValue: true }],\n [{ text: 'Row label' }, { checkmarkValue: true }],\n ],\n },\n {\n section: {\n title: 'Second section',\n },\n rows: [\n [{ text: 'Row label' }, { checkmarkValue: true }],\n [{ text: 'Row label' }, { checkmarkValue: false }],\n ],\n },\n {\n section: {\n title: 'Third section',\n },\n rows: [\n [\n { text: 'Row label' },\n { text: 'Up to €1,500', description: 'Value description' },\n ],\n ],\n },\n {\n section: {\n title: 'Fourth section',\n },\n rows: [\n [{ text: 'Row label' }, { checkmarkValue: true }],\n [{ text: 'Row label' }, { checkmarkValue: true }],\n ],\n },\n {\n section: {\n title: 'Fifth section',\n },\n rows: [\n [{ text: 'Row label' }, { checkmarkValue: true }],\n [{ text: 'Row label' }, { checkmarkValue: true }],\n ],\n },\n {\n section: {\n title: 'Sixth section',\n },\n rows: [\n [{ text: 'Row label' }, { text: 'Up to €5,000' }],\n [{ text: 'Row label' }, { checkmarkValue: true }],\n ],\n },\n];\n\nexport const SinglePlanQuoteWebsite = {\n render: () => (\n <div style={{ maxWidth: 756 }}>\n <Table\n tableData={singlePlanWebsiteData}\n title=\"Single plan quote website\"\n collapsibleSections\n />\n </div>\n ),\n\n name: 'Single Plan - Website',\n};\n\nconst twoPlanWebsiteData: TableData = [\n {\n rows: [\n [\n { text: 'Our plans' },\n {\n type: 'CTA',\n title: 'Plan name',\n buttonCaption: 'Get a quote',\n href: 'http://example.com',\n },\n {\n type: 'CTA',\n title: 'Plan name',\n buttonCaption: 'Get a quote',\n href: 'http://example.com',\n },\n ],\n [\n {\n text: 'Monthly price',\n description: 'Label description with additional pricing context',\n },\n { text: '~€14-35', fontVariant: 'PRICE', modalContent: 'Price info' },\n { text: '~€50-91', fontVariant: 'PRICE', modalContent: 'Price info' },\n ],\n [\n {\n text: 'Label with info',\n modalContent: 'Label info',\n },\n { text: 'Text value' },\n { text: 'Text value' },\n ],\n [\n {\n text: 'Label with info',\n modalContent: 'Label info',\n },\n { text: 'Text value', modalContent: 'Value info' },\n { text: 'Text value', modalContent: 'Value info' },\n ],\n [\n { text: 'Label with a boolean value' },\n { checkmarkValue: true, description: 'Value description' },\n { checkmarkValue: true, description: 'Value description' },\n ],\n ],\n },\n {\n section: {\n title: 'First section',\n },\n rows: [\n [\n { text: 'Row label' },\n { text: 'Up to €1,500' },\n { text: 'Up to €3,000' },\n ],\n ],\n },\n {\n section: {\n title: 'Second section',\n },\n rows: [\n [\n { text: 'Row label', description: 'Row label description' },\n { checkmarkValue: true },\n { checkmarkValue: true },\n ],\n [\n { text: 'Row label' },\n { checkmarkValue: false },\n { checkmarkValue: false },\n ],\n [\n { text: 'Row label', description: 'Row label description' },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Row label' },\n { text: 'Text value' },\n { checkmarkValue: true },\n ],\n [\n { text: 'Row label' },\n { text: 'Text value', description: 'Value description' },\n { text: 'Text value', description: 'Value description' },\n ],\n ],\n },\n {\n section: {\n title: 'Third section',\n },\n rows: [\n [\n { text: 'Row label' },\n { checkmarkValue: true },\n { checkmarkValue: true },\n ],\n ],\n },\n {\n section: {\n title: 'Fourth section',\n },\n rows: [\n [\n { text: 'Row label' },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n ],\n },\n {\n section: {\n title: 'Fifth section',\n },\n rows: [\n [\n { text: 'Row label' },\n { text: 'Text value' },\n { text: 'Text value' },\n ],\n ],\n },\n];\n\nexport const TwoPlanQuoteWebsite = {\n render: () => (\n <div style={{ maxWidth: 900 }}>\n <Table\n tableData={twoPlanWebsiteData}\n title=\"Two plan quote website\"\n collapsibleSections\n />\n </div>\n ),\n\n name: 'Two Plan - Website',\n};\n\nconst threePlanWebsiteData: TableData = [\n {\n rows: [\n [\n { text: 'Our plans' },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/green/white',\n title: 'Plan name',\n buttonCaption: 'Get a quote',\n href: '',\n onClick: () => {},\n },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/blue/white',\n title: 'Plan name',\n buttonCaption: 'Get a quote',\n href: '',\n onClick: () => {},\n },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/orange/white',\n title: 'Plan name',\n buttonCaption: 'Get a quote',\n href: '',\n onClick: () => {},\n },\n ],\n [\n { text: 'Monthly price' },\n { text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },\n { text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },\n { text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },\n ],\n [\n { text: 'Label with star rating' },\n { rating: { type: 'star', value: 2 }, modalContent: 'Rating info' },\n { rating: { type: 'star', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n { text: 'Label with zap rating' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'zap', value: 3 }, modalContent: 'Rating info' },\n { rating: { type: 'zap', value: 3 }, modalContent: 'Rating info' },\n ],\n [\n { text: 'Label with info', modalContent: 'Label info' },\n { checkmarkValue: true },\n { checkmarkValue: true },\n { checkmarkValue: true },\n ],\n [\n { text: 'Label with progress bar' },\n { text: '100%' },\n { text: '70%' },\n { text: '100%' },\n ],\n ],\n },\n {\n section: {\n title: 'First section',\n },\n rows: [\n [\n { text: 'Row label with info', modalContent: 'Label info' },\n { text: 'Up to €2 million' },\n { text: 'Up to €1.5 million' },\n { text: 'Up to €1.5 million' },\n ],\n [\n { text: 'Row label with info', modalContent: 'Label info' },\n { text: 'Text value' },\n { text: 'Text value' },\n { text: 'Text value' },\n ],\n [\n { text: 'Row label' },\n { text: '80% covered' },\n { text: '80% covered' },\n { text: '80% covered' },\n ],\n [\n { text: 'Row label' },\n { checkmarkValue: false },\n { checkmarkValue: false },\n { checkmarkValue: false },\n ],\n [\n { text: 'Row label' },\n { checkmarkValue: false },\n { checkmarkValue: true },\n { checkmarkValue: true },\n ],\n [\n { text: 'Row label' },\n { checkmarkValue: true },\n { checkmarkValue: true },\n { checkmarkValue: true },\n ],\n ],\n },\n];\n\nexport const ThreePlanQuoteWebsite = {\n render: () => (\n <div style={{ maxWidth: 900 }}>\n <Table\n tableData={threePlanWebsiteData}\n title=\"Three plan quote website\"\n collapsibleSections\n />\n </div>\n ),\n\n name: 'Three Plan - Website',\n};\n\nexport const TableDataType = () => {\n return (\n <pre>\n {`\ntype TableData = {\n section?: \n title?: string;\n icon?: ReactNode;\n };\n rows: {\n align?: 'center' | 'left' | 'right';\n checkmarkValue?: boolean;\n text?: ReactNode;\n modalContent?: ReactNode;\n subContent?: ReactNode;\n rating?: {\n value: number;\n type: 'zap' | 'star';\n }\n openModal?: (modalContent: ReactNode) => void;\n }[][];\n}[];\n `}\n </pre>\n );\n};\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAM,WAAW,GAAc;AAC7B,IAAA;AACE,QAAA,IAAI,EAAE;AACJ,YAAA;gBACE,EAAE,IAAI,EAAE,WAAW,EAAE;AACrB,gBAAA;AACE,oBAAA,IAAI,EAAE,KAAK;AACX,oBAAA,IAAI,EAAE,yCAAyC;AAC/C,oBAAA,KAAK,EAAE,UAAU;AACjB,oBAAA,KAAK,EAAE,MAAM;AACb,oBAAA,aAAa,EAAE,aAAa;AAC5B,oBAAA,IAAI,EAAE,o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A;AACD,YAAA;gBACE,EAAE,IAAI,EAAE,WAAW,EAAE;gBACrB,EAAE,cAAc,EAAE,KAAK,EAAE;gBACzB,EAAE,cAAc,EAAE,KAAK,EAAE;gBACzB,EAAE,cAAc,EAAE,KAAK,EAAE;AAC1B,aAAA;AACD,YAAA;gBACE,EAAE,IAAI,EAAE,WAAW,EAAE;gBACrB,EAAE,cAAc,EAAE,KAAK,EAAE;gBACzB,EAAE,cAAc,EAAE,IAAI,EAAE;gBACxB,EAAE,cAAc,EAAE,IAAI,EAAE;AACzB,aAAA;AACD,YAAA;gBACE,EAAE,IAAI,EAAE,WAAW,EAAE;gBACrB,EAAE,cAAc,EAAE,IAAI,EAAE;gBACxB,EAAE,cAAc,EAAE,IAAI,EAAE;gBACxB,EAAE,cAAc,EAAE,IAAI,EAAE;AACzB,aAAA;AACF,SAAA;AACF,KAAA;CACF;AAEM,IAAM,qBAAqB,GAAG;AACnC,IAAA,MAAM,EAAE,YAAA,EAAM,QACZA,GAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAA,QAAA,EAC3BA,GAAA,CAAC,KAAK,EAAA,EACJ,SAAS,EAAE,oBAAoB,EAC/B,KAAK,EAAC,0BAA0B,EAChC,mBAAmB,EAAA,IAAA,EAAA,CACnB,EAAA,CACE,GAPM,CAQb;AAED,IAAA,IAAI,EAAE,sBAAsB;;AAGvB,IAAM,aAAa,GAAG,YAAA;AAC3B,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAA,QAAA,EACG,mZAmBA,EAAA,CACG;AAEV;;;;"}
@@ -50,7 +50,7 @@ var BaseCell = function (_a) {
50
50
  'jc-center': align === 'center',
51
51
  }), children: jsxs("div", { className: classNames('d-flex fd-column', alignClassName, (_b = {},
52
52
  _b[styles.maxWidth] = modalContent && align === 'center',
53
- _b)), children: [jsxs("div", { className: "d-flex ai-center", children: [(rating === null || rating === void 0 ? void 0 : rating.value) && (jsx("span", { "data-testid": "table-cell-rating", title: "".concat(rating === null || rating === void 0 ? void 0 : rating.value, " out of 3"), children: validRatingValues.map(function (value) { return (jsx(SelectedIcon, { "aria-hidden": "true", color: value <= (rating === null || rating === void 0 ? void 0 : rating.value) ? 'neutral-900' : 'neutral-400', className: styles.icon, size: (rating === null || rating === void 0 ? void 0 : rating.type) === 'zap' ? 16 : 14 }, value)); }) })), checkmarkValue !== undefined && (jsx("span", { className: 'd-inline-block mx8', title: checkmarkValue ? 'Yes' : 'No', children: checkmarkValue ? (jsx(CheckThickIcon, { noMargin: true, "data-testid": "table-cell-boolean-yes", size: 24, "aria-hidden": true, color: "neutral-900" })) : (jsx(XIcon, { noMargin: true, "data-testid": "table-cell-boolean-no", size: 24, "aria-hidden": true, color: "neutral-500" })) })), jsxs("div", { className: "d-inline", children: [text && fontVariant === 'NORMAL' && (jsx("div", { className: classNames("p-p d-inline", { 'ml8': align !== 'left' }), "data-testid": "table-cell-text", children: text })), text && fontVariant === 'PRICE' && (jsx("div", { className: "p-h1 p--serif tc-neutral-900", "data-testid": "table-cell-content", children: text })), text && fontVariant === 'TITLE' && (jsx("h2", { "aria-hidden": true, className: "tc-grey-800 p-h2 p--serif", children: text })), modalContent && openModal && (jsx("span", { className: "ml8", children: jsx(TableInfoButton, { onClick: function () {
53
+ _b)), children: [jsxs("div", { className: "d-flex ai-center", children: [(rating === null || rating === void 0 ? void 0 : rating.value) && (jsx("span", { "data-testid": "table-cell-rating", title: "".concat(rating === null || rating === void 0 ? void 0 : rating.value, " out of 3"), children: validRatingValues.map(function (value) { return (jsx(SelectedIcon, { "aria-hidden": "true", color: value <= (rating === null || rating === void 0 ? void 0 : rating.value) ? 'neutral-900' : 'neutral-400', className: styles.icon, size: (rating === null || rating === void 0 ? void 0 : rating.type) === 'zap' ? 16 : 14 }, value)); }) })), checkmarkValue !== undefined && (jsx("span", { className: 'd-inline-block mx8', title: checkmarkValue ? 'Yes' : 'No', children: checkmarkValue ? (jsx(CheckThickIcon, { noMargin: true, "data-testid": "table-cell-boolean-yes", size: 24, "aria-hidden": true, color: "neutral-900" })) : (jsx(XIcon, { noMargin: true, "data-testid": "table-cell-boolean-no", size: 24, "aria-hidden": true, color: "neutral-500" })) })), jsxs("div", { className: "d-flex ai-center", children: [text && fontVariant === 'NORMAL' && (jsx("div", { className: classNames("p-p d-inline", { 'ml8': align !== 'left' }), "data-testid": "table-cell-text", children: text })), text && fontVariant === 'PRICE' && (jsx("div", { className: "p-h2 tc-neutral-900", "data-testid": "table-cell-content", children: text })), text && fontVariant === 'TITLE' && (jsx("h2", { "aria-hidden": true, className: "tc-grey-800 p-h2 p--serif", children: text })), modalContent && openModal && (jsx("span", { className: "ml8", children: jsx(TableInfoButton, { onClick: function () {
54
54
  return openModal({
55
55
  title: modalTitle,
56
56
  body: modalContent,
@@ -1 +1 @@
1
- {"version":3,"file":"BaseCell.js","sources":["../../../../../../../../src/lib/components/table/components/TableCell/BaseCell/BaseCell.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport {\n CheckThickIcon,\n StarFilledIcon,\n XIcon,\n ZapFilledIcon,\n} from '../../../../icon';\nimport { ReactNode } from 'react';\nimport styles from './BaseCell.module.scss';\nimport { MiniProgressBar } from './MiniProgressBar/MiniProgressBar';\nimport { TableInfoButton } from '../../../../comparisonTable';\nimport { ModalFunction } from '../../../types';\n\nexport type FontVariant = 'NORMAL' | 'TITLE' | 'PRICE';\n\nconst progressLookup: Record<string, number> = {\n '30%': 1,\n '50%': 2,\n '70%': 3,\n '75%': 4,\n '80%': 4,\n '90%': 4,\n '75%-90%': 4,\n '75%-100%': 4,\n '80%-100%': 4,\n '100%': 5,\n};\n\nexport type Alignment = 'center' | 'left' | 'right';\n\nexport type BaseCellProps = {\n align?: Alignment;\n checkmarkValue?: boolean;\n description?: ReactNode;\n fontVariant?: FontVariant;\n hideProgressBar?: boolean;\n modalTitle?: ReactNode;\n modalContent?: ReactNode;\n openModal?: ModalFunction;\n text?: ReactNode;\n rating?: {\n value: number;\n type: 'zap' | 'star';\n };\n className?: string;\n dataTestId?: string;\n dataCy?: string;\n};\n\nexport const BaseCell = ({\n align = 'center',\n checkmarkValue,\n description = '',\n fontVariant = 'NORMAL',\n hideProgressBar = false,\n modalTitle = '',\n modalContent = '',\n openModal,\n rating,\n text = '',\n className,\n}: BaseCellProps) => {\n const alignClassName = {\n center: 'ta-center jc-center ai-center',\n left: 'ta-left jc-start',\n right: 'ta-right jc-end ai-end',\n }[align];\n\n const validRatingValues: number[] = [1, 2, 3];\n const SelectedIcon = rating?.type === 'zap' ? ZapFilledIcon : StarFilledIcon;\n\n const progressBarValue =\n !hideProgressBar && typeof text === 'string'\n ? progressLookup[text]\n : undefined;\n\n return (\n <div\n className={classNames(\n className,\n 'd-flex gap8 ai-center', {\n 'jc-center': align === 'center',\n })}\n >\n <div\n className={classNames('d-flex fd-column', alignClassName, {\n [styles.maxWidth]: modalContent && align === 'center',\n })}\n >\n <div className=\"d-flex ai-center\">\n {rating?.value && (\n <span\n data-testid=\"table-cell-rating\"\n title={`${rating?.value} out of 3`}\n >\n {validRatingValues.map((value) => (\n <SelectedIcon\n aria-hidden=\"true\"\n key={value}\n color={value <= rating?.value ? 'neutral-900' : 'neutral-400'}\n className={styles.icon}\n size={rating?.type === 'zap' ? 16 : 14}\n />\n ))}\n </span>\n )}\n\n {checkmarkValue !== undefined && (\n <span className='d-inline-block mx8' title={checkmarkValue ? 'Yes' : 'No'}>\n {checkmarkValue ? (\n <CheckThickIcon\n noMargin\n data-testid=\"table-cell-boolean-yes\"\n size={24}\n aria-hidden\n color=\"neutral-900\"\n />\n ) : (\n <XIcon\n noMargin\n data-testid=\"table-cell-boolean-no\"\n size={24}\n aria-hidden\n color=\"neutral-500\"\n />\n )}\n </span>\n )}\n\n <div className=\"d-inline\">\n {text && fontVariant === 'NORMAL' && (\n <div className={classNames(\n \"p-p d-inline\",\n { 'ml8': align !== 'left' }\n )}\n data-testid=\"table-cell-text\"\n >\n {text}\n </div>\n )}\n\n {text && fontVariant === 'PRICE' && (\n <div\n className=\"p-h1 p--serif tc-neutral-900\"\n data-testid=\"table-cell-content\"\n >\n {text}\n </div>\n )}\n\n {text && fontVariant === 'TITLE' && (\n <h2\n aria-hidden\n className=\"tc-grey-800 p-h2 p--serif\"\n >\n {text}\n </h2>\n )}\n\n {modalContent && openModal && (\n <span className=\"ml8\">\n <TableInfoButton\n onClick={() =>\n openModal({\n title: modalTitle,\n body: modalContent,\n })\n }\n />\n </span>\n )}\n </div>\n </div>\n\n {progressBarValue !== undefined && (\n <MiniProgressBar nFilledBars={progressBarValue} />\n )}\n\n {description && (\n <div\n className={classNames(\n styles.description,\n 'd-flex p-p--small tc-neutral-600',\n alignClassName\n )}\n >\n {description}\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAM,cAAc,GAA2B;AAC7C,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,MAAM,EAAE,CAAC;CACV;AAuBM,IAAM,QAAQ,GAAG,UAAC,EAYT,EAAA;;QAXd,EAAA,GAAA,EAAA,CAAA,KAAgB,EAAhB,KAAK,GAAA,EAAA,KAAA,MAAA,GAAG,QAAQ,GAAA,EAAA,EAChB,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,EAAA,GAAA,EAAA,CAAA,WAAgB,EAAhB,WAAW,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EAChB,EAAA,GAAA,EAAA,CAAA,WAAsB,EAAtB,WAAW,GAAA,EAAA,KAAA,MAAA,GAAG,QAAQ,GAAA,EAAA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A,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,UAAU,CACnB,MAAM,CAAC,WAAW,EAClB,kCAAkC,EAClC,cAAc,CACf,YAEA,WAAW,EAAA,CACR,CACP,CAAA,EAAA,CACG,EAAA,CACF;AAEV;;;;"}
1
+ {"version":3,"file":"BaseCell.js","sources":["../../../../../../../../src/lib/components/table/components/TableCell/BaseCell/BaseCell.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport {\n CheckThickIcon,\n StarFilledIcon,\n XIcon,\n ZapFilledIcon,\n} from '../../../../icon';\nimport { ReactNode } from 'react';\nimport styles from './BaseCell.module.scss';\nimport { MiniProgressBar } from './MiniProgressBar/MiniProgressBar';\nimport { TableInfoButton } from '../../../../comparisonTable';\nimport { ModalFunction } from '../../../types';\n\nexport type FontVariant = 'NORMAL' | 'TITLE' | 'PRICE';\n\nconst progressLookup: Record<string, number> = {\n '30%': 1,\n '50%': 2,\n '70%': 3,\n '75%': 4,\n '80%': 4,\n '90%': 4,\n '75%-90%': 4,\n '75%-100%': 4,\n '80%-100%': 4,\n '100%': 5,\n};\n\nexport type Alignment = 'center' | 'left' | 'right';\n\nexport type BaseCellProps = {\n align?: Alignment;\n checkmarkValue?: boolean;\n description?: ReactNode;\n fontVariant?: FontVariant;\n hideProgressBar?: boolean;\n modalTitle?: ReactNode;\n modalContent?: ReactNode;\n openModal?: ModalFunction;\n text?: ReactNode;\n rating?: {\n value: number;\n type: 'zap' | 'star';\n };\n className?: string;\n dataTestId?: string;\n dataCy?: string;\n};\n\nexport const BaseCell = ({\n align = 'center',\n checkmarkValue,\n description = '',\n fontVariant = 'NORMAL',\n hideProgressBar = false,\n modalTitle = '',\n modalContent = '',\n openModal,\n rating,\n text = '',\n className,\n}: BaseCellProps) => {\n const alignClassName = {\n center: 'ta-center jc-center ai-center',\n left: 'ta-left jc-start',\n right: 'ta-right jc-end ai-end',\n }[align];\n\n const validRatingValues: number[] = [1, 2, 3];\n const SelectedIcon = rating?.type === 'zap' ? ZapFilledIcon : StarFilledIcon;\n\n const progressBarValue =\n !hideProgressBar && typeof text === 'string'\n ? progressLookup[text]\n : undefined;\n\n return (\n <div\n className={classNames(\n className,\n 'd-flex gap8 ai-center', {\n 'jc-center': align === 'center',\n })}\n >\n <div\n className={classNames('d-flex fd-column', alignClassName, {\n [styles.maxWidth]: modalContent && align === 'center',\n })}\n >\n <div className=\"d-flex ai-center\">\n {rating?.value && (\n <span\n data-testid=\"table-cell-rating\"\n title={`${rating?.value} out of 3`}\n >\n {validRatingValues.map((value) => (\n <SelectedIcon\n aria-hidden=\"true\"\n key={value}\n color={value <= rating?.value ? 'neutral-900' : 'neutral-400'}\n className={styles.icon}\n size={rating?.type === 'zap' ? 16 : 14}\n />\n ))}\n </span>\n )}\n\n {checkmarkValue !== undefined && (\n <span className='d-inline-block mx8' title={checkmarkValue ? 'Yes' : 'No'}>\n {checkmarkValue ? (\n <CheckThickIcon\n noMargin\n data-testid=\"table-cell-boolean-yes\"\n size={24}\n aria-hidden\n color=\"neutral-900\"\n />\n ) : (\n <XIcon\n noMargin\n data-testid=\"table-cell-boolean-no\"\n size={24}\n aria-hidden\n color=\"neutral-500\"\n />\n )}\n </span>\n )}\n\n <div className=\"d-flex ai-center\">\n {text && fontVariant === 'NORMAL' && (\n <div className={classNames(\n \"p-p d-inline\",\n { 'ml8': align !== 'left' }\n )}\n data-testid=\"table-cell-text\"\n >\n {text}\n </div>\n )}\n\n {text && fontVariant === 'PRICE' && (\n <div\n className=\"p-h2 tc-neutral-900\"\n data-testid=\"table-cell-content\"\n >\n {text}\n </div>\n )}\n\n {text && fontVariant === 'TITLE' && (\n <h2\n aria-hidden\n className=\"tc-grey-800 p-h2 p--serif\"\n >\n {text}\n </h2>\n )}\n\n {modalContent && openModal && (\n <span className=\"ml8\">\n <TableInfoButton\n onClick={() =>\n openModal({\n title: modalTitle,\n body: modalContent,\n })\n }\n />\n </span>\n )}\n </div>\n </div>\n\n {progressBarValue !== undefined && (\n <MiniProgressBar nFilledBars={progressBarValue} />\n )}\n\n {description && (\n <div\n className={classNames(\n styles.description,\n 'd-flex p-p--small tc-neutral-600',\n alignClassName\n )}\n >\n {description}\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAM,cAAc,GAA2B;AAC7C,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,MAAM,EAAE,CAAC;CACV;AAuBM,IAAM,QAAQ,GAAG,UAAC,EAYT,EAAA;;QAXd,EAAA,GAAA,EAAA,CAAA,KAAgB,EAAhB,KAAK,GAAA,EAAA,KAAA,MAAA,GAAG,QAAQ,GAAA,EAAA,EAChB,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,EAAA,GAAA,EAAA,CAAA,WAAgB,EAAhB,WAAW,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EAChB,EAAA,GAAA,EAAA,CAAA,WAAsB,EAAtB,WAAW,GAAA,EAAA,KAAA,MAAA,GAAG,QAAQ,GAAA,EAAA,EACtB,EAAA,GAAA,EAAA,CAAA,eAAuB,EAAvB,eAAe,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,EACvB,EAAA,GAAA,EAAA,CAAA,UAAe,EAAf,UAAU,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACf,EAAA,GAAA,EAAA,CAAA,YAAiB,EAAjB,YAAY,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACjB,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,MAAM,GAAA,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,cAAc,EACd,EAAE,KAAK,EAAE,KAAK,KAAK,MAAM,EAAE,CAC5B,EAAA,aAAA,EACW,iBAAiB,EAAA,QAAA,EAE1B,IAAI,EAAA,CACD,CACP,EAEA,IAAI,IAAI,WAAW,KAAK,OAAO,KAC9BA,GAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAC,qBAAqB,EAAA,aAAA,EACnB,oBAAoB,EAAA,QAAA,EAE/B,IAAI,EAAA,CACD,CACP,EAEA,IAAI,IAAI,WAAW,KAAK,OAAO,KAC9BA,GAAA,CAAA,IAAA,EAAA,EAAA,aAAA,EAAA,IAAA,EAEE,SAAS,EAAC,2BAA2B,EAAA,QAAA,EAEpC,IAAI,EAAA,CACF,CACN,EAEA,YAAY,IAAI,SAAS,KACxBA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,KAAK,EAAA,QAAA,EACnBA,GAAA,CAAC,eAAe,EAAA,EACd,OAAO,EAAE,YAAA;AACP,4CAAA,OAAA,SAAS,CAAC;AACR,gDAAA,KAAK,EAAE,UAAU;AACjB,gDAAA,IAAI,EAAE,YAAY;6CACnB,CAAC;AAHF,wCAAA,CAGE,GAEJ,EAAA,CACG,CACR,IACG,CAAA,EAAA,CACF,EAEL,gBAAgB,KAAK,SAAS,KAC7BA,GAAA,CAAC,eAAe,EAAA,EAAC,WAAW,EAAE,gBAAgB,EAAA,CAAI,CACnD,EAEA,WAAW,KACVA,GAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,UAAU,CACnB,MAAM,CAAC,WAAW,EAClB,kCAAkC,EAClC,cAAc,CACf,YAEA,WAAW,EAAA,CACR,CACP,CAAA,EAAA,CACG,EAAA,CACF;AAEV;;;;"}
@@ -13,9 +13,11 @@ styleInject(css_248z);
13
13
 
14
14
  var CTACell = function (_a) {
15
15
  var _b;
16
- var title = _a.title, price = _a.price, icon = _a.icon, grey = _a.grey, narrow = _a.narrow, href = _a.href, buttonCaption = _a.buttonCaption, imageComponent = _a.imageComponent, className = _a.className, dataCy = _a.dataCy, dataTestId = _a.dataTestId, onClick = _a.onClick;
16
+ var title = _a.title, price = _a.price, icon = _a.icon, grey = _a.grey, narrow = _a.narrow, centered = _a.centered, href = _a.href, buttonCaption = _a.buttonCaption, imageComponent = _a.imageComponent, className = _a.className, dataCy = _a.dataCy, dataTestId = _a.dataTestId, onClick = _a.onClick;
17
17
  var renderedIcon = (jsx(IconRenderer, { icon: icon, imageComponent: imageComponent }));
18
- return (jsxs("div", { className: classNames(className, "ta-left"), "data-cy": dataCy, "data-testid": dataTestId, children: [jsxs("div", { className: "d-flex ai-center gap8", children: [renderedIcon, jsxs("p", { className: "p-h3", children: [title, price && jsxs("span", { className: "tc-purple-600", children: [" ", price] })] })] }), jsx(Button, __assign({}, onClick ? { onClick: onClick } : {
18
+ return (jsxs("div", { className: classNames(className, 'ta-left', {
19
+ 'd-flex fd-column ai-center': centered,
20
+ }), "data-cy": dataCy, "data-testid": dataTestId, children: [jsxs("div", { className: "d-flex ai-center gap8", children: [renderedIcon, jsxs("p", { className: "p-h3", children: [title, price && jsxs("span", { className: "tc-purple-600", children: [" ", price] })] })] }), jsx(Button, __assign({}, onClick ? { onClick: onClick } : {
19
21
  as: 'a',
20
22
  href: href,
21
23
  target: '_blank',