@popsure/dirty-swan 0.66.17 → 0.66.19
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/index.js +23 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/comparisonTable/index.stories.d.ts +4 -0
- package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +2 -1
- package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +1 -1
- package/dist/esm/components/comparisonTable/components/AccordionItem/AccordionItem.js +2 -2
- package/dist/esm/components/comparisonTable/components/AccordionItem/AccordionItem.js.map +1 -1
- package/dist/esm/components/comparisonTable/components/Row/index.js +4 -3
- package/dist/esm/components/comparisonTable/components/Row/index.js.map +1 -1
- package/dist/esm/components/comparisonTable/index.js +6 -6
- package/dist/esm/components/comparisonTable/index.js.map +1 -1
- package/dist/esm/components/comparisonTable/index.stories.js +267 -6
- package/dist/esm/components/comparisonTable/index.stories.js.map +1 -1
- package/dist/esm/components/icon/icons/Activity.js +2 -2
- package/dist/esm/components/icon/icons/Activity.js.map +1 -1
- package/dist/esm/components/icon/icons/DentalToothTeeth.js +2 -2
- package/dist/esm/components/icon/icons/DentalToothTeeth.js.map +1 -1
- package/dist/esm/components/icon/icons/DependentsFamily.js +2 -2
- package/dist/esm/components/icon/icons/DependentsFamily.js.map +1 -1
- package/dist/esm/components/icon/icons/GlobeNetworkEarth.js +2 -2
- package/dist/esm/components/icon/icons/GlobeNetworkEarth.js.map +1 -1
- package/dist/esm/components/icon/icons/HospitalBuilding.js +2 -2
- package/dist/esm/components/icon/icons/HospitalBuilding.js.map +1 -1
- package/dist/esm/components/icon/icons.stories.js +1 -1
- package/dist/esm/components/icon/index.stories.js +1 -1
- package/dist/esm/components/table/Table.js +1 -1
- package/dist/esm/components/table/Table.stories.js +8 -8
- package/dist/esm/components/table/Table.stories.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js +1 -1
- package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js +4 -2
- package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/TableCell.js +4 -3
- package/dist/esm/components/table/components/TableCell/TableCell.js.map +1 -1
- package/dist/esm/components/table/components/TableContents/TableContents.js +1 -1
- package/dist/esm/{index-BWJpOVlt.js → index-D41W71Hh.js} +11 -11
- package/dist/esm/{index-BWJpOVlt.js.map → index-D41W71Hh.js.map} +1 -1
- package/dist/esm/lib/components/comparisonTable/index.stories.d.ts +4 -0
- package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +2 -1
- package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +1 -1
- package/package.json +1 -1
- package/src/lib/components/comparisonTable/components/AccordionItem/AccordionItem.module.scss +19 -3
- package/src/lib/components/comparisonTable/components/AccordionItem/AccordionItem.tsx +2 -1
- package/src/lib/components/comparisonTable/components/Row/index.tsx +2 -1
- package/src/lib/components/comparisonTable/components/Row/style.module.scss +20 -5
- package/src/lib/components/comparisonTable/index.stories.tsx +370 -0
- package/src/lib/components/comparisonTable/index.tsx +1 -5
- package/src/lib/components/comparisonTable/style.module.scss +10 -8
- package/src/lib/components/table/Table.module.scss +1 -1
- package/src/lib/components/table/Table.stories.tsx +5 -8
- package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.tsx +1 -1
- package/src/lib/components/table/components/TableCell/CTACell/CTACell.tsx +5 -1
- package/src/lib/components/table/components/TableCell/TableCell.module.scss +4 -0
- package/src/lib/components/table/components/TableCell/TableCell.tsx +4 -1
- package/src/lib/components/table/components/TableContents/TableContents.module.scss +4 -0
package/src/lib/components/comparisonTable/components/AccordionItem/AccordionItem.module.scss
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '../../../../scss/public/colors' as colors;
|
|
2
|
+
@use '../../../../scss/public/grid' as *;
|
|
2
3
|
|
|
3
4
|
.container {
|
|
4
5
|
width: var(--growContent, min-content);
|
|
@@ -21,17 +22,32 @@
|
|
|
21
22
|
|
|
22
23
|
.headerButton {
|
|
23
24
|
border: none;
|
|
24
|
-
|
|
25
|
+
border-bottom: 1px solid colors.$ds-neutral-300;
|
|
26
|
+
background: white;
|
|
27
|
+
color: colors.$ds-neutral-900;
|
|
25
28
|
column-gap: 16px;
|
|
26
29
|
cursor: pointer;
|
|
27
30
|
font-family: inherit;
|
|
28
31
|
outline: none;
|
|
32
|
+
padding: 24px 0;
|
|
29
33
|
position: relative;
|
|
30
34
|
text-align: inherit;
|
|
31
|
-
transition:
|
|
35
|
+
transition: color 0.3s ease-in-out, transform 0.2s ease-in-out;
|
|
36
|
+
|
|
37
|
+
@include p-size-tablet {
|
|
38
|
+
padding: 24px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[aria-expanded='true'] {
|
|
42
|
+
border-bottom-color: transparent;
|
|
43
|
+
}
|
|
32
44
|
|
|
33
45
|
&:hover {
|
|
34
|
-
|
|
46
|
+
color: colors.$ds-neutral-700;
|
|
47
|
+
|
|
48
|
+
:global(.p-h3) {
|
|
49
|
+
color: colors.$ds-neutral-700;
|
|
50
|
+
}
|
|
35
51
|
}
|
|
36
52
|
}
|
|
37
53
|
|
|
@@ -74,13 +74,14 @@ export const AccordionItem = ({
|
|
|
74
74
|
className={`d-flex fd-column ${styles.container} ${className}`}
|
|
75
75
|
>
|
|
76
76
|
<button
|
|
77
|
+
aria-expanded={isOpen}
|
|
77
78
|
className={`d-flex ai-center jc-between ${styles.headerButton} ${headerClassName}`}
|
|
78
79
|
onClick={handleClick}
|
|
79
80
|
type="button"
|
|
80
81
|
>
|
|
81
82
|
<div className={`d-flex ai-center ${styles.iconAndTextContainer}`}>
|
|
82
83
|
{typeof label === 'string' ? (
|
|
83
|
-
<h4 className="p-
|
|
84
|
+
<h4 className="p-h3">{label}</h4>
|
|
84
85
|
) : (
|
|
85
86
|
<>{label}</>
|
|
86
87
|
)}
|
|
@@ -20,6 +20,7 @@ const Row = <T extends { id: number }>(props: RowProps<T>) => {
|
|
|
20
20
|
key={rowId}
|
|
21
21
|
className={classNames('d-flex w-100', {
|
|
22
22
|
[styles.header]: isRowHeader,
|
|
23
|
+
[styles.row]: !isRowHeader,
|
|
23
24
|
})}
|
|
24
25
|
>
|
|
25
26
|
<h4
|
|
@@ -47,7 +48,7 @@ const Row = <T extends { id: number }>(props: RowProps<T>) => {
|
|
|
47
48
|
|
|
48
49
|
return (
|
|
49
50
|
<div
|
|
50
|
-
className={classNames('ta-
|
|
51
|
+
className={classNames('ta-left', styles.cell, cellClassName)}
|
|
51
52
|
key={`${rowId}-${item.id}`}
|
|
52
53
|
>
|
|
53
54
|
{
|
|
@@ -3,9 +3,28 @@
|
|
|
3
3
|
|
|
4
4
|
$cell-min-width: var(--cellWidth, 211px); // 195 + 16px
|
|
5
5
|
|
|
6
|
+
.row {
|
|
7
|
+
border-bottom: 1px solid $ds-neutral-300;
|
|
8
|
+
|
|
9
|
+
&:last-child {
|
|
10
|
+
border-bottom: none;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
6
14
|
.header {
|
|
7
15
|
position: relative;
|
|
8
16
|
|
|
17
|
+
.cell {
|
|
18
|
+
align-items: flex-start;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
text-align: center;
|
|
21
|
+
|
|
22
|
+
@include p-size-tablet {
|
|
23
|
+
justify-content: flex-start;
|
|
24
|
+
text-align: left;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
9
28
|
& > div {
|
|
10
29
|
width: var(--tableWidth);
|
|
11
30
|
max-width: 100vw;
|
|
@@ -24,7 +43,7 @@ $cell-min-width: var(--cellWidth, 211px); // 195 + 16px
|
|
|
24
43
|
|
|
25
44
|
.cell {
|
|
26
45
|
display: flex;
|
|
27
|
-
justify-content:
|
|
46
|
+
justify-content: flex-start;
|
|
28
47
|
align-items: center;
|
|
29
48
|
|
|
30
49
|
scroll-snap-align: end;
|
|
@@ -84,8 +103,6 @@ h4.cell {
|
|
|
84
103
|
|
|
85
104
|
display: none;
|
|
86
105
|
|
|
87
|
-
line-height: 38px;
|
|
88
|
-
|
|
89
106
|
@include p-size-tablet {
|
|
90
107
|
display: flex;
|
|
91
108
|
}
|
|
@@ -102,13 +119,11 @@ h4.cell {
|
|
|
102
119
|
width: 50vw;
|
|
103
120
|
|
|
104
121
|
@include p-size-tablet {
|
|
105
|
-
border-right: 1px solid $ds-neutral-50;
|
|
106
122
|
flex: 1 0 288px;
|
|
107
123
|
}
|
|
108
124
|
}
|
|
109
125
|
|
|
110
126
|
h4.addon {
|
|
111
|
-
border-right: none;
|
|
112
127
|
max-width: calc(100vw - 64px);
|
|
113
128
|
width: 100%;
|
|
114
129
|
|
|
@@ -2,11 +2,22 @@ import {
|
|
|
2
2
|
ComparisonTable,
|
|
3
3
|
ComparisonTableProps,
|
|
4
4
|
TableButton,
|
|
5
|
+
TableInfoButton,
|
|
5
6
|
TableRating,
|
|
6
7
|
TableRowHeader,
|
|
7
8
|
TableTrueFalse,
|
|
8
9
|
} from '.';
|
|
9
10
|
import { CardButton } from '../cards';
|
|
11
|
+
import {
|
|
12
|
+
ActivityIcon,
|
|
13
|
+
DentalToothTeethIcon,
|
|
14
|
+
DependentsFamilyIcon,
|
|
15
|
+
EyeVisionIcon,
|
|
16
|
+
GlobeNetworkEarthIcon,
|
|
17
|
+
HeartIcon,
|
|
18
|
+
HospitalBuildingIcon,
|
|
19
|
+
} from '../icon';
|
|
20
|
+
import { MiniProgressBar } from '../table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar';
|
|
10
21
|
|
|
11
22
|
const headers = [
|
|
12
23
|
{
|
|
@@ -372,6 +383,365 @@ export const ComparisonTableStory = {
|
|
|
372
383
|
name: 'ComparisonTable',
|
|
373
384
|
};
|
|
374
385
|
|
|
386
|
+
interface PlanData {
|
|
387
|
+
id: number;
|
|
388
|
+
name: string;
|
|
389
|
+
cashback: string | boolean;
|
|
390
|
+
dependents: string | boolean;
|
|
391
|
+
deductible: string | boolean;
|
|
392
|
+
generalDoctor: string;
|
|
393
|
+
specialist: string;
|
|
394
|
+
dentalCleanings: string | boolean;
|
|
395
|
+
dentalTreatments: string | boolean;
|
|
396
|
+
physiotherapy: string | boolean;
|
|
397
|
+
mentalHealth: string | boolean;
|
|
398
|
+
glasses: string | boolean;
|
|
399
|
+
laserEyeSurgery: string | boolean;
|
|
400
|
+
pregnancyCheckups: string | boolean;
|
|
401
|
+
childbirth: string | boolean;
|
|
402
|
+
hospitalAccommodation: string;
|
|
403
|
+
sickDayPayout: string | boolean;
|
|
404
|
+
emergencyAbroad: string | boolean;
|
|
405
|
+
repatriation: boolean;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const planData: PlanData[] = [
|
|
409
|
+
{
|
|
410
|
+
id: 1,
|
|
411
|
+
name: 'Standard',
|
|
412
|
+
cashback: 'Available',
|
|
413
|
+
dependents: 'Optional',
|
|
414
|
+
deductible: '€0 / €1,200 / €3,000',
|
|
415
|
+
generalDoctor: '100%',
|
|
416
|
+
specialist: '80%',
|
|
417
|
+
dentalCleanings: '80%',
|
|
418
|
+
dentalTreatments: false,
|
|
419
|
+
physiotherapy: '75%-90%',
|
|
420
|
+
mentalHealth: false,
|
|
421
|
+
glasses: false,
|
|
422
|
+
laserEyeSurgery: false,
|
|
423
|
+
pregnancyCheckups: '100%',
|
|
424
|
+
childbirth: 'Shared room',
|
|
425
|
+
hospitalAccommodation: 'Shared room',
|
|
426
|
+
sickDayPayout: '€2,000',
|
|
427
|
+
emergencyAbroad: 'Up to 6 weeks',
|
|
428
|
+
repatriation: false,
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
id: 2,
|
|
432
|
+
name: 'Plus',
|
|
433
|
+
cashback: 'Available',
|
|
434
|
+
dependents: 'Optional',
|
|
435
|
+
deductible: '€0 / €1,200 / €3,000',
|
|
436
|
+
generalDoctor: '100%',
|
|
437
|
+
specialist: '100%',
|
|
438
|
+
dentalCleanings: '90%',
|
|
439
|
+
dentalTreatments: '75%-90%',
|
|
440
|
+
physiotherapy: '80%-100%',
|
|
441
|
+
mentalHealth: '80%',
|
|
442
|
+
glasses: 'Up to €300',
|
|
443
|
+
laserEyeSurgery: false,
|
|
444
|
+
pregnancyCheckups: '100%',
|
|
445
|
+
childbirth: 'Twin room',
|
|
446
|
+
hospitalAccommodation: 'Twin room',
|
|
447
|
+
sickDayPayout: '€3,500',
|
|
448
|
+
emergencyAbroad: 'Up to 6 months',
|
|
449
|
+
repatriation: true,
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
id: 3,
|
|
453
|
+
name: 'Premium',
|
|
454
|
+
cashback: 'Available',
|
|
455
|
+
dependents: 'Optional',
|
|
456
|
+
deductible: '€0 / €1,200 / €3,000',
|
|
457
|
+
generalDoctor: '100%',
|
|
458
|
+
specialist: '100%',
|
|
459
|
+
dentalCleanings: '100%',
|
|
460
|
+
dentalTreatments: '80%-100%',
|
|
461
|
+
physiotherapy: '100%',
|
|
462
|
+
mentalHealth: '100%',
|
|
463
|
+
glasses: 'Up to €500',
|
|
464
|
+
laserEyeSurgery: 'Up to €1,000',
|
|
465
|
+
pregnancyCheckups: '100%',
|
|
466
|
+
childbirth: 'Private room',
|
|
467
|
+
hospitalAccommodation: 'Private room',
|
|
468
|
+
sickDayPayout: '€5,000',
|
|
469
|
+
emergencyAbroad: 'Unlimited',
|
|
470
|
+
repatriation: true,
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
id: 4,
|
|
474
|
+
name: 'Public',
|
|
475
|
+
cashback: false,
|
|
476
|
+
dependents: true,
|
|
477
|
+
deductible: false,
|
|
478
|
+
generalDoctor: '100%',
|
|
479
|
+
specialist: 'Referral needed',
|
|
480
|
+
dentalCleanings: false,
|
|
481
|
+
dentalTreatments: false,
|
|
482
|
+
physiotherapy: 'Copay applies',
|
|
483
|
+
mentalHealth: 'Limited sessions',
|
|
484
|
+
glasses: false,
|
|
485
|
+
laserEyeSurgery: false,
|
|
486
|
+
pregnancyCheckups: '100%',
|
|
487
|
+
childbirth: 'Shared room',
|
|
488
|
+
hospitalAccommodation: 'Shared room',
|
|
489
|
+
sickDayPayout: '70% of income',
|
|
490
|
+
emergencyAbroad: 'EU only',
|
|
491
|
+
repatriation: false,
|
|
492
|
+
},
|
|
493
|
+
];
|
|
494
|
+
|
|
495
|
+
const progressLookup: Record<string, number> = {
|
|
496
|
+
'30%': 1,
|
|
497
|
+
'50%': 2,
|
|
498
|
+
'70%': 3,
|
|
499
|
+
'75%': 4,
|
|
500
|
+
'80%': 4,
|
|
501
|
+
'90%': 4,
|
|
502
|
+
'75%-90%': 4,
|
|
503
|
+
'75%-100%': 4,
|
|
504
|
+
'80%-100%': 4,
|
|
505
|
+
'100%': 5,
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
const renderStringWithProgress = (value: string) => (
|
|
509
|
+
<div className="d-flex fd-column">
|
|
510
|
+
{value}
|
|
511
|
+
{progressLookup[value] !== undefined && (
|
|
512
|
+
<MiniProgressBar nFilledBars={progressLookup[value]} />
|
|
513
|
+
)}
|
|
514
|
+
</div>
|
|
515
|
+
);
|
|
516
|
+
|
|
517
|
+
const renderStringOrBoolean = (value: string | boolean) =>
|
|
518
|
+
typeof value === 'string' ? (
|
|
519
|
+
renderStringWithProgress(value)
|
|
520
|
+
) : (
|
|
521
|
+
<TableTrueFalse value={value} />
|
|
522
|
+
);
|
|
523
|
+
|
|
524
|
+
const renderPlanName = (name: string) => <p className="p-h3">{name}</p>;
|
|
525
|
+
|
|
526
|
+
const renderWithInfo = (value: string | boolean) => (
|
|
527
|
+
<div className="d-flex ai-center gap8">
|
|
528
|
+
{typeof value === 'string' ? value : <TableTrueFalse value={value} />}
|
|
529
|
+
<TableInfoButton onClick={() => {}} />
|
|
530
|
+
</div>
|
|
531
|
+
);
|
|
532
|
+
|
|
533
|
+
const renderDeductible = (value: string | boolean) =>
|
|
534
|
+
typeof value === 'string' ? (
|
|
535
|
+
<div>
|
|
536
|
+
<p className="p-p">{value}</p>
|
|
537
|
+
<p className="p-p tc-neutral-500">Adjustable</p>
|
|
538
|
+
</div>
|
|
539
|
+
) : (
|
|
540
|
+
<TableTrueFalse value={value} />
|
|
541
|
+
);
|
|
542
|
+
|
|
543
|
+
const sectionLabel = (icon: React.ReactNode, title: string) => (
|
|
544
|
+
<p className="d-flex ai-center p-h3 c-gap8">
|
|
545
|
+
{icon} {title}
|
|
546
|
+
</p>
|
|
547
|
+
);
|
|
548
|
+
|
|
549
|
+
const privateHealthHeaders: Array<
|
|
550
|
+
ComparisonTableProps<PlanData>['headers'][number]
|
|
551
|
+
> = [
|
|
552
|
+
{
|
|
553
|
+
id: 0,
|
|
554
|
+
label: '',
|
|
555
|
+
default: true,
|
|
556
|
+
cells: [
|
|
557
|
+
{
|
|
558
|
+
key: 'name',
|
|
559
|
+
label: 'Our plans',
|
|
560
|
+
render: renderPlanName,
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
key: 'cashback',
|
|
564
|
+
label: 'Cashback',
|
|
565
|
+
render: renderStringOrBoolean,
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
key: 'dependents',
|
|
569
|
+
label: 'Dependents coverage',
|
|
570
|
+
render: renderWithInfo,
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
key: 'deductible',
|
|
574
|
+
label: <TableRowHeader label="Deductible" onClickInfo={() => {}} />,
|
|
575
|
+
render: renderDeductible,
|
|
576
|
+
},
|
|
577
|
+
],
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
id: 1,
|
|
581
|
+
label: sectionLabel(<HeartIcon size={20} noMargin />, 'General'),
|
|
582
|
+
cells: [
|
|
583
|
+
{
|
|
584
|
+
key: 'generalDoctor',
|
|
585
|
+
label: (
|
|
586
|
+
<TableRowHeader
|
|
587
|
+
label="General doctors' visits"
|
|
588
|
+
onClickInfo={() => {}}
|
|
589
|
+
/>
|
|
590
|
+
),
|
|
591
|
+
render: renderStringOrBoolean,
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
key: 'specialist',
|
|
595
|
+
label: <TableRowHeader label="Specialists" onClickInfo={() => {}} />,
|
|
596
|
+
render: renderStringOrBoolean,
|
|
597
|
+
},
|
|
598
|
+
],
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
id: 2,
|
|
602
|
+
label: sectionLabel(<DentalToothTeethIcon size={20} noMargin />, 'Dental'),
|
|
603
|
+
cells: [
|
|
604
|
+
{
|
|
605
|
+
key: 'dentalCleanings',
|
|
606
|
+
label: <TableRowHeader label="Dental cleanings" />,
|
|
607
|
+
render: renderStringOrBoolean,
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
key: 'dentalTreatments',
|
|
611
|
+
label: (
|
|
612
|
+
<TableRowHeader label="Dental treatments" onClickInfo={() => {}} />
|
|
613
|
+
),
|
|
614
|
+
render: renderStringOrBoolean,
|
|
615
|
+
},
|
|
616
|
+
],
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
id: 3,
|
|
620
|
+
label: sectionLabel(
|
|
621
|
+
<ActivityIcon size={20} noMargin />,
|
|
622
|
+
'Treatment and therapies'
|
|
623
|
+
),
|
|
624
|
+
cells: [
|
|
625
|
+
{
|
|
626
|
+
key: 'physiotherapy',
|
|
627
|
+
label: <TableRowHeader label="Physiotherapy" onClickInfo={() => {}} />,
|
|
628
|
+
render: renderStringOrBoolean,
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
key: 'mentalHealth',
|
|
632
|
+
label: <TableRowHeader label="Mental health therapy" />,
|
|
633
|
+
render: renderStringOrBoolean,
|
|
634
|
+
},
|
|
635
|
+
],
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
id: 4,
|
|
639
|
+
label: sectionLabel(<EyeVisionIcon size={20} noMargin />, 'Vision'),
|
|
640
|
+
cells: [
|
|
641
|
+
{
|
|
642
|
+
key: 'glasses',
|
|
643
|
+
label: (
|
|
644
|
+
<TableRowHeader
|
|
645
|
+
label="Glasses & contact lenses"
|
|
646
|
+
onClickInfo={() => {}}
|
|
647
|
+
/>
|
|
648
|
+
),
|
|
649
|
+
render: renderStringOrBoolean,
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
key: 'laserEyeSurgery',
|
|
653
|
+
label: <TableRowHeader label="Laser eye surgery" />,
|
|
654
|
+
render: renderStringOrBoolean,
|
|
655
|
+
},
|
|
656
|
+
],
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
id: 5,
|
|
660
|
+
label: sectionLabel(
|
|
661
|
+
<DependentsFamilyIcon size={20} noMargin />,
|
|
662
|
+
'Pregnancy and childbirth'
|
|
663
|
+
),
|
|
664
|
+
cells: [
|
|
665
|
+
{
|
|
666
|
+
key: 'pregnancyCheckups',
|
|
667
|
+
label: <TableRowHeader label="Pregnancy check-ups" />,
|
|
668
|
+
render: renderStringOrBoolean,
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
key: 'childbirth',
|
|
672
|
+
label: <TableRowHeader label="Childbirth" onClickInfo={() => {}} />,
|
|
673
|
+
render: renderStringOrBoolean,
|
|
674
|
+
},
|
|
675
|
+
],
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
id: 6,
|
|
679
|
+
label: sectionLabel(
|
|
680
|
+
<HospitalBuildingIcon size={20} noMargin />,
|
|
681
|
+
'Hospital'
|
|
682
|
+
),
|
|
683
|
+
cells: [
|
|
684
|
+
{
|
|
685
|
+
key: 'hospitalAccommodation',
|
|
686
|
+
label: <TableRowHeader label="Accommodation" onClickInfo={() => {}} />,
|
|
687
|
+
render: renderStringOrBoolean,
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
key: 'sickDayPayout',
|
|
691
|
+
label: (
|
|
692
|
+
<TableRowHeader
|
|
693
|
+
label="Sick day payout"
|
|
694
|
+
subtitle="After 6 weeks of illness"
|
|
695
|
+
/>
|
|
696
|
+
),
|
|
697
|
+
render: renderStringOrBoolean,
|
|
698
|
+
},
|
|
699
|
+
],
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
id: 7,
|
|
703
|
+
label: sectionLabel(
|
|
704
|
+
<GlobeNetworkEarthIcon size={20} noMargin />,
|
|
705
|
+
'Outside of Germany'
|
|
706
|
+
),
|
|
707
|
+
cells: [
|
|
708
|
+
{
|
|
709
|
+
key: 'emergencyAbroad',
|
|
710
|
+
label: (
|
|
711
|
+
<TableRowHeader
|
|
712
|
+
label="Emergency care abroad"
|
|
713
|
+
onClickInfo={() => {}}
|
|
714
|
+
/>
|
|
715
|
+
),
|
|
716
|
+
render: renderStringOrBoolean,
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
key: 'repatriation',
|
|
720
|
+
label: <TableRowHeader label="Medical repatriation" />,
|
|
721
|
+
render: renderStringOrBoolean,
|
|
722
|
+
},
|
|
723
|
+
],
|
|
724
|
+
},
|
|
725
|
+
];
|
|
726
|
+
|
|
727
|
+
export const PrivateHealthQuoteWidget = {
|
|
728
|
+
render: () => (
|
|
729
|
+
<div className="bg-white">
|
|
730
|
+
<ComparisonTable
|
|
731
|
+
data={planData}
|
|
732
|
+
headers={privateHealthHeaders}
|
|
733
|
+
collapsibleSections
|
|
734
|
+
hideScrollBarsMobile
|
|
735
|
+
hideDetails
|
|
736
|
+
showDetailsCaption="What's covered?"
|
|
737
|
+
hideDetailsCaption="Hide details"
|
|
738
|
+
/>
|
|
739
|
+
</div>
|
|
740
|
+
),
|
|
741
|
+
|
|
742
|
+
name: 'Private Health - Quote Widget',
|
|
743
|
+
};
|
|
744
|
+
|
|
375
745
|
export const HeaderType = () => (
|
|
376
746
|
<pre>
|
|
377
747
|
{`export interface Header<T> {
|
|
@@ -124,7 +124,7 @@ const ComparisonTable = <T extends { id: number }>(
|
|
|
124
124
|
<ScrollSync onSync={headerRefCallbackRef}>
|
|
125
125
|
<div
|
|
126
126
|
style={cssVariablesStyle}
|
|
127
|
-
className={classNames({
|
|
127
|
+
className={classNames(baseStyles.card, {
|
|
128
128
|
[baseStyles.noScrollBars]: hideScrollBars,
|
|
129
129
|
[baseStyles.noScrollBarsMobile]: hideScrollBarsMobile,
|
|
130
130
|
})}
|
|
@@ -191,11 +191,9 @@ const ComparisonTable = <T extends { id: number }>(
|
|
|
191
191
|
{headerGroup.label && collapsibleSections ? (
|
|
192
192
|
<AccordionItem
|
|
193
193
|
className={classNames(
|
|
194
|
-
baseStyles['collapsible-section'],
|
|
195
194
|
classNameOverrides?.collapsibleSection
|
|
196
195
|
)}
|
|
197
196
|
label={headerGroup.label}
|
|
198
|
-
headerClassName="p24 br8"
|
|
199
197
|
isOpen={openSectionId === headerGroup.id}
|
|
200
198
|
onToggle={() =>
|
|
201
199
|
setOpenSectionId((prev) =>
|
|
@@ -213,7 +211,6 @@ const ComparisonTable = <T extends { id: number }>(
|
|
|
213
211
|
<div
|
|
214
212
|
className={classNames(
|
|
215
213
|
baseStyles.container,
|
|
216
|
-
'pb16',
|
|
217
214
|
classNameOverrides?.container,
|
|
218
215
|
{
|
|
219
216
|
[baseStyles.noScrollBars]: hideScrollBars,
|
|
@@ -244,7 +241,6 @@ const ComparisonTable = <T extends { id: number }>(
|
|
|
244
241
|
<div
|
|
245
242
|
className={classNames(
|
|
246
243
|
baseStyles.container,
|
|
247
|
-
'pb16',
|
|
248
244
|
classNameOverrides?.container,
|
|
249
245
|
{
|
|
250
246
|
[baseStyles.noScrollBars]: hideScrollBars,
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
@use "../../scss/public/grid" as *;
|
|
2
2
|
@use "../../scss/public/colors" as *;
|
|
3
3
|
|
|
4
|
+
.card {
|
|
5
|
+
border: 1px solid $ds-neutral-200;
|
|
6
|
+
border-radius: 12px;
|
|
7
|
+
padding: 24px;
|
|
8
|
+
|
|
9
|
+
section:last-of-type > button {
|
|
10
|
+
border-bottom: none;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
4
14
|
.container {
|
|
5
15
|
width: 100%;
|
|
6
16
|
overflow-x: auto;
|
|
@@ -39,10 +49,6 @@
|
|
|
39
49
|
}
|
|
40
50
|
}
|
|
41
51
|
|
|
42
|
-
.collapsible-section {
|
|
43
|
-
margin-top: 6px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
52
|
.section + .section {
|
|
47
53
|
margin-top: 48px;
|
|
48
54
|
|
|
@@ -82,10 +88,6 @@
|
|
|
82
88
|
|
|
83
89
|
top: 0;
|
|
84
90
|
left: 0;
|
|
85
|
-
|
|
86
|
-
@include p-size-tablet {
|
|
87
|
-
border-right: 1px solid $ds-neutral-50;
|
|
88
|
-
}
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
.header {
|
|
@@ -581,7 +581,6 @@ export const SinglePlanQuoteWebsite = {
|
|
|
581
581
|
tableData={singlePlanWebsiteData}
|
|
582
582
|
title="Single plan quote website"
|
|
583
583
|
collapsibleSections
|
|
584
|
-
hideTableNavigation
|
|
585
584
|
/>
|
|
586
585
|
</div>
|
|
587
586
|
),
|
|
@@ -612,8 +611,8 @@ const twoPlanWebsiteData: TableData = [
|
|
|
612
611
|
text: 'Monthly price',
|
|
613
612
|
description: 'Label description with additional pricing context',
|
|
614
613
|
},
|
|
615
|
-
{ text: '~€14-35', fontVariant: 'PRICE' },
|
|
616
|
-
{ text: '~€50-91', fontVariant: 'PRICE' },
|
|
614
|
+
{ text: '~€14-35', fontVariant: 'PRICE', modalContent: 'Price info' },
|
|
615
|
+
{ text: '~€50-91', fontVariant: 'PRICE', modalContent: 'Price info' },
|
|
617
616
|
],
|
|
618
617
|
[
|
|
619
618
|
{
|
|
@@ -727,7 +726,6 @@ export const TwoPlanQuoteWebsite = {
|
|
|
727
726
|
tableData={twoPlanWebsiteData}
|
|
728
727
|
title="Two plan quote website"
|
|
729
728
|
collapsibleSections
|
|
730
|
-
hideTableNavigation
|
|
731
729
|
/>
|
|
732
730
|
</div>
|
|
733
731
|
),
|
|
@@ -767,9 +765,9 @@ const threePlanWebsiteData: TableData = [
|
|
|
767
765
|
],
|
|
768
766
|
[
|
|
769
767
|
{ text: 'Monthly price' },
|
|
770
|
-
{ text: '€–', fontVariant: 'PRICE' },
|
|
771
|
-
{ text: '€–', fontVariant: 'PRICE' },
|
|
772
|
-
{ text: '€–', fontVariant: 'PRICE' },
|
|
768
|
+
{ text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },
|
|
769
|
+
{ text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },
|
|
770
|
+
{ text: '€–', fontVariant: 'PRICE', modalContent: 'Price info' },
|
|
773
771
|
],
|
|
774
772
|
[
|
|
775
773
|
{ text: 'Label with star rating' },
|
|
@@ -849,7 +847,6 @@ export const ThreePlanQuoteWebsite = {
|
|
|
849
847
|
tableData={threePlanWebsiteData}
|
|
850
848
|
title="Three plan quote website"
|
|
851
849
|
collapsibleSections
|
|
852
|
-
hideTableNavigation
|
|
853
850
|
/>
|
|
854
851
|
</div>
|
|
855
852
|
),
|
|
@@ -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,
|
|
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
|
>
|