@popsure/dirty-swan 0.59.0-alpha → 0.59.0-beta-2
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 +87 -93
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/button/index.d.ts +1 -1
- package/dist/cjs/lib/components/cards/card/index.d.ts +4 -1
- package/dist/cjs/lib/components/cards/card/index.stories.d.ts +2 -1
- package/dist/cjs/lib/components/cards/infoCard/index.d.ts +9 -7
- package/dist/cjs/lib/components/cards/infoCard/index.stories.d.ts +23 -17
- package/dist/cjs/lib/components/input/currency/input.stories.d.ts +1 -0
- package/dist/cjs/lib/components/input/input.stories.d.ts +2 -1
- package/dist/cjs/lib/components/input/stories/config.d.ts +1 -0
- package/dist/cjs/lib/components/table/components/TableCell/BaseCell/BaseCell.d.ts +1 -1
- package/dist/cjs/lib/scss/public/borders.stories.d.ts +13 -0
- package/dist/esm/{Calendar-2d7e51b5.js → Calendar-5ad3eccf.js} +2 -2
- package/dist/esm/Calendar-5ad3eccf.js.map +1 -0
- package/dist/esm/{TableSection-5277dae1.js → TableSection-018d8e8f.js} +1 -1
- package/dist/esm/{TableSection-5277dae1.js.map → TableSection-018d8e8f.js.map} +1 -1
- package/dist/esm/components/accordion/index.js +2 -2
- package/dist/esm/components/accordion/index.js.map +1 -1
- package/dist/esm/components/button/index.js +4 -5
- package/dist/esm/components/button/index.js.map +1 -1
- package/dist/esm/components/button/index.stories.js +5 -9
- package/dist/esm/components/button/index.stories.js.map +1 -1
- package/dist/esm/components/cards/card/index.js +6 -6
- package/dist/esm/components/cards/card/index.js.map +1 -1
- package/dist/esm/components/cards/card/index.stories.js +8 -3
- package/dist/esm/components/cards/card/index.stories.js.map +1 -1
- package/dist/esm/components/cards/cardButton/index.js +6 -4
- package/dist/esm/components/cards/cardButton/index.js.map +1 -1
- package/dist/esm/components/cards/cardButton/index.stories.js +2 -2
- package/dist/esm/components/cards/cardButton/index.stories.js.map +1 -1
- package/dist/esm/components/cards/index.js +7 -21
- package/dist/esm/components/cards/index.js.map +1 -1
- package/dist/esm/components/cards/infoCard/index.js +34 -8
- package/dist/esm/components/cards/infoCard/index.js.map +1 -1
- package/dist/esm/components/cards/infoCard/index.stories.js +44 -31
- package/dist/esm/components/cards/infoCard/index.stories.js.map +1 -1
- package/dist/esm/components/comparisonTable/components/AccordionItem/AccordionItem.js +1 -1
- package/dist/esm/components/comparisonTable/components/Chevron.js +1 -1
- package/dist/esm/components/comparisonTable/components/Chevron.js.map +1 -1
- package/dist/esm/components/comparisonTable/components/Row/index.js +1 -1
- package/dist/esm/components/comparisonTable/components/TableArrows/index.js +1 -1
- package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js +3 -3
- package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js.map +1 -1
- package/dist/esm/components/comparisonTable/components/TableRating/index.js +1 -1
- package/dist/esm/components/comparisonTable/components/TableTrueFalse.js +2 -2
- package/dist/esm/components/comparisonTable/components/TableTrueFalse.js.map +1 -1
- package/dist/esm/components/comparisonTable/index.js +2 -2
- package/dist/esm/components/comparisonTable/index.js.map +1 -1
- package/dist/esm/components/dateSelector/components/Calendar.js +1 -1
- package/dist/esm/components/dateSelector/index.js +1 -1
- package/dist/esm/components/dateSelector/index.stories.js +1 -1
- package/dist/esm/components/dateSelector/index.test.js +1 -1
- package/dist/esm/components/icon/icons/BasketballSports.js +2 -2
- package/dist/esm/components/icon/icons/BasketballSports.js.map +1 -1
- package/dist/esm/components/icon/icons/BookOpen.js +2 -2
- package/dist/esm/components/icon/icons/BookOpen.js.map +1 -1
- package/dist/esm/components/icon/icons/Heart.js +2 -2
- package/dist/esm/components/icon/icons/Heart.js.map +1 -1
- package/dist/esm/components/icon/icons/Info.js +2 -2
- package/dist/esm/components/icon/icons/Info.js.map +1 -1
- package/dist/esm/components/icon/icons/Star.js +2 -2
- package/dist/esm/components/icon/icons/Star.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/input/currency/input.stories.js +1 -1
- package/dist/esm/components/input/index.js +5 -5
- package/dist/esm/components/input/index.js.map +1 -1
- package/dist/esm/components/input/input.stories.js +3 -3
- package/dist/esm/components/input/input.stories.js.map +1 -1
- package/dist/esm/components/input/toggle/index.js +1 -1
- package/dist/esm/components/modal/index.stories.js +7 -7
- package/dist/esm/components/modal/index.stories.js.map +1 -1
- package/dist/esm/components/segmentedControl/index.js +1 -1
- package/dist/esm/components/table/Table.js +4 -5
- package/dist/esm/components/table/Table.js.map +1 -1
- package/dist/esm/components/table/Table.stories.js +1 -1
- package/dist/esm/components/table/Table.test.js +1 -1
- package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js +3 -3
- package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/ButtonCell/ButtonCell.js +2 -2
- package/dist/esm/components/table/components/TableCell/ButtonCell/ButtonCell.js.map +1 -1
- package/dist/esm/components/table/components/TableCell/TableCell.js +1 -1
- package/dist/esm/components/table/components/TableCell/TableCell.js.map +1 -1
- package/dist/esm/components/table/components/TableContents/TableContents.js +6 -5
- package/dist/esm/components/table/components/TableContents/TableContents.js.map +1 -1
- package/dist/esm/components/table/components/TableContents/TableContents.test.js +1 -1
- package/dist/esm/components/table/components/TableControls/TableControls.js +4 -3
- package/dist/esm/components/table/components/TableControls/TableControls.js.map +1 -1
- package/dist/esm/components/table/components/TableSection/TableSection.js +1 -1
- package/dist/esm/components/table/components/TableSection/TableSection.test.js +1 -1
- package/dist/esm/{config-4b5ffe4f.js → config-bc609993.js} +3 -2
- package/dist/esm/config-bc609993.js.map +1 -0
- package/dist/esm/{index-d2e06251.js → index-7427c96f.js} +11 -11
- package/dist/esm/{index-d2e06251.js.map → index-7427c96f.js.map} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/lib/components/button/index.d.ts +1 -1
- package/dist/esm/lib/components/cards/card/index.d.ts +4 -1
- package/dist/esm/lib/components/cards/card/index.stories.d.ts +2 -1
- package/dist/esm/lib/components/cards/infoCard/index.d.ts +9 -7
- package/dist/esm/lib/components/cards/infoCard/index.stories.d.ts +23 -17
- package/dist/esm/lib/components/input/currency/input.stories.d.ts +1 -0
- package/dist/esm/lib/components/input/input.stories.d.ts +2 -1
- package/dist/esm/lib/components/input/stories/config.d.ts +1 -0
- package/dist/esm/lib/components/table/components/TableCell/BaseCell/BaseCell.d.ts +1 -1
- package/dist/esm/lib/scss/public/borders.stories.d.ts +13 -0
- package/dist/esm/scss/public/borders.stories.js +86 -0
- package/dist/esm/scss/public/borders.stories.js.map +1 -0
- package/dist/index.css +212 -122
- package/dist/index.css.map +1 -1
- package/dist/lib/scss/index.scss +1 -0
- package/dist/lib/scss/private/base/_typography.scss +21 -52
- package/dist/lib/scss/private/borders/_index.scss +1 -0
- package/dist/lib/scss/private/borders/default.scss +61 -0
- package/dist/lib/scss/private/components/_buttons.scss +105 -63
- package/dist/lib/scss/private/components/_cards.scss +2 -1
- package/dist/lib/scss/private/components/_input.scss +32 -26
- package/dist/lib/scss/private/components/_spinner.scss +2 -2
- package/dist/lib/scss/public/borders.stories.tsx +124 -0
- package/dist/lib/scss/public/colors/default.scss +1 -0
- package/dist/lib/scss/public/shadows.scss +5 -5
- package/package.json +1 -1
- package/src/lib/components/accordion/index.tsx +1 -0
- package/src/lib/components/accordion/style.module.scss +0 -4
- package/src/lib/components/button/index.stories.tsx +22 -57
- package/src/lib/components/button/index.tsx +7 -9
- package/src/lib/components/cards/card/index.stories.tsx +60 -1
- package/src/lib/components/cards/card/index.tsx +13 -3
- package/src/lib/components/cards/card/style.module.scss +87 -10
- package/src/lib/components/cards/cardButton/index.stories.tsx +2 -2
- package/src/lib/components/cards/cardButton/index.tsx +4 -2
- package/src/lib/components/cards/cardButton/style.module.scss +4 -0
- package/src/lib/components/cards/infoCard/index.stories.tsx +164 -40
- package/src/lib/components/cards/infoCard/index.tsx +72 -37
- package/src/lib/components/cards/infoCard/style.module.scss +46 -33
- package/src/lib/components/comparisonTable/components/AccordionItem/AccordionItem.module.scss +2 -2
- package/src/lib/components/comparisonTable/components/Chevron.tsx +1 -1
- package/src/lib/components/comparisonTable/components/Row/style.module.scss +0 -4
- package/src/lib/components/comparisonTable/components/TableArrows/style.module.scss +6 -5
- package/src/lib/components/comparisonTable/components/TableInfoButton/index.tsx +2 -2
- package/src/lib/components/comparisonTable/components/TableInfoButton/style.module.scss +3 -4
- package/src/lib/components/comparisonTable/components/TableRating/style.module.scss +2 -2
- package/src/lib/components/comparisonTable/components/TableTrueFalse.tsx +2 -2
- package/src/lib/components/comparisonTable/index.tsx +1 -1
- package/src/lib/components/comparisonTable/style.module.scss +6 -2
- package/src/lib/components/dateSelector/components/Calendar.tsx +1 -1
- package/src/lib/components/input/index.tsx +2 -1
- package/src/lib/components/input/input.stories.tsx +3 -1
- package/src/lib/components/input/stories/config.ts +4 -1
- package/src/lib/components/input/style.module.scss +8 -4
- package/src/lib/components/input/toggle/styles.module.scss +8 -4
- package/src/lib/components/modal/index.stories.tsx +23 -23
- package/src/lib/components/segmentedControl/style.module.scss +1 -1
- package/src/lib/components/table/Table.module.scss +18 -0
- package/src/lib/components/table/Table.tsx +1 -2
- package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.module.scss +0 -10
- package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.tsx +6 -9
- package/src/lib/components/table/components/TableCell/ButtonCell/ButtonCell.module.scss +1 -2
- package/src/lib/components/table/components/TableCell/ButtonCell/ButtonCell.tsx +1 -1
- package/src/lib/components/table/components/TableCell/TableCell.tsx +1 -1
- package/src/lib/components/table/components/TableContents/TableContents.module.scss +19 -0
- package/src/lib/components/table/components/TableContents/TableContents.tsx +3 -1
- package/src/lib/components/table/components/TableControls/TableControls.module.scss +7 -3
- package/src/lib/components/table/components/TableControls/TableControls.tsx +38 -25
- package/src/lib/scss/index.scss +1 -0
- package/src/lib/scss/private/base/_typography.scss +21 -52
- package/src/lib/scss/private/borders/_index.scss +1 -0
- package/src/lib/scss/private/borders/default.scss +61 -0
- package/src/lib/scss/private/components/_buttons.scss +105 -63
- package/src/lib/scss/private/components/_cards.scss +2 -1
- package/src/lib/scss/private/components/_input.scss +32 -26
- package/src/lib/scss/private/components/_spinner.scss +2 -2
- package/src/lib/scss/public/borders.stories.tsx +124 -0
- package/src/lib/scss/public/colors/default.scss +1 -0
- package/src/lib/scss/public/shadows.scss +5 -5
- package/dist/esm/Calendar-2d7e51b5.js.map +0 -1
- package/dist/esm/config-4b5ffe4f.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InfoCard, InfoCardProps } from '.';
|
|
2
2
|
import { images } from '../../../util/images';
|
|
3
|
+
import { BookOpenIcon, HeartIcon, StarIcon, ShieldIcon } from '../../icon';
|
|
3
4
|
|
|
4
5
|
const story = {
|
|
5
6
|
title: 'JSX/Cards/InfoCard',
|
|
@@ -7,64 +8,187 @@ const story = {
|
|
|
7
8
|
argTypes: {
|
|
8
9
|
title: {
|
|
9
10
|
description: 'Title text that needs to be displayed',
|
|
11
|
+
control: 'text',
|
|
10
12
|
},
|
|
11
13
|
children: {
|
|
12
|
-
type: 'text',
|
|
13
14
|
description: 'Content that is displayed inside the card',
|
|
14
|
-
|
|
15
|
-
state: {
|
|
16
|
-
description: 'State that describe the interation with the card',
|
|
15
|
+
control: 'text',
|
|
17
16
|
},
|
|
18
17
|
topIcon: {
|
|
19
|
-
description: 'Icon displayed on the top of the card
|
|
18
|
+
description: 'Icon displayed on the top of the card',
|
|
19
|
+
},
|
|
20
|
+
topIconType: {
|
|
21
|
+
description: 'Type of top icon display',
|
|
22
|
+
control: 'select',
|
|
23
|
+
options: ['icon', 'image', 'banner'],
|
|
24
|
+
},
|
|
25
|
+
showIcon: {
|
|
26
|
+
description: 'Whether to show the arrow icon in the title',
|
|
27
|
+
control: 'boolean',
|
|
20
28
|
},
|
|
21
|
-
|
|
22
|
-
description: '
|
|
29
|
+
disabled: {
|
|
30
|
+
description: 'Whether the card is disabled',
|
|
31
|
+
control: 'boolean',
|
|
23
32
|
},
|
|
24
|
-
|
|
25
|
-
description: '
|
|
33
|
+
onClick: {
|
|
34
|
+
description: 'Click handler for the card',
|
|
26
35
|
},
|
|
27
36
|
className: {
|
|
28
37
|
description: 'Class name for most top parent element',
|
|
38
|
+
control: 'text',
|
|
29
39
|
},
|
|
30
40
|
},
|
|
31
41
|
args: {
|
|
32
|
-
title: '
|
|
33
|
-
children: '
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
rightIcon: {
|
|
40
|
-
src: images.washingMachine,
|
|
41
|
-
alt: 'Icon alt'
|
|
42
|
-
},
|
|
43
|
-
dropshadow: true,
|
|
42
|
+
title: 'Knowledge Base',
|
|
43
|
+
children: 'Find the answers you\'re looking for in our comprehensive, fact-checked library of articles and resources.',
|
|
44
|
+
topIcon: <BookOpenIcon size={40} />,
|
|
45
|
+
topIconType: 'icon',
|
|
46
|
+
showIcon: true,
|
|
47
|
+
disabled: false,
|
|
44
48
|
className: '',
|
|
45
49
|
}
|
|
46
50
|
};
|
|
47
51
|
|
|
48
|
-
export const InfoCardStory = ({
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
52
|
+
export const InfoCardStory = (args: InfoCardProps) => {
|
|
53
|
+
return (
|
|
54
|
+
<div className='bg-neutral-50 p32'>
|
|
55
|
+
<div className='wmx4'>
|
|
56
|
+
<InfoCard
|
|
57
|
+
{...args}
|
|
58
|
+
onClick={() => console.log('InfoCard clicked!')}
|
|
59
|
+
>
|
|
60
|
+
{args.children}
|
|
61
|
+
</InfoCard>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const IconTypes = () => {
|
|
68
|
+
return (
|
|
69
|
+
<div className='bg-neutral-50 p32'>
|
|
70
|
+
<div className='d-flex gap32 flex-wrap'>
|
|
71
|
+
<div className='wmx4'>
|
|
72
|
+
<div className='mb16 fw-bold'>Book Icon</div>
|
|
73
|
+
<InfoCard
|
|
74
|
+
title='Knowledge Base'
|
|
75
|
+
topIcon={<BookOpenIcon size={40} />}
|
|
76
|
+
topIconType='icon'
|
|
77
|
+
onClick={() => console.log('Book clicked!')}
|
|
78
|
+
>
|
|
79
|
+
Find answers in our comprehensive library of articles.
|
|
80
|
+
</InfoCard>
|
|
81
|
+
</div>
|
|
82
|
+
<div className='wmx4'>
|
|
83
|
+
<div className='mb16 fw-bold'>Heart Icon</div>
|
|
84
|
+
<InfoCard
|
|
85
|
+
title='Favorites'
|
|
86
|
+
topIcon={<HeartIcon size={40} />}
|
|
87
|
+
topIconType='icon'
|
|
88
|
+
onClick={() => console.log('Heart clicked!')}
|
|
89
|
+
>
|
|
90
|
+
Save and organize your favorite items.
|
|
91
|
+
</InfoCard>
|
|
92
|
+
</div>
|
|
93
|
+
<div className='wmx4'>
|
|
94
|
+
<div className='mb16 fw-bold'>Star Icon</div>
|
|
95
|
+
<InfoCard
|
|
96
|
+
title='Premium Features'
|
|
97
|
+
topIcon={<StarIcon size={40} />}
|
|
98
|
+
topIconType='icon'
|
|
99
|
+
onClick={() => console.log('Star clicked!')}
|
|
100
|
+
>
|
|
101
|
+
Unlock advanced features with premium.
|
|
102
|
+
</InfoCard>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export const TopIconTypes = () => {
|
|
110
|
+
return (
|
|
111
|
+
<div className='bg-neutral-50 p32'>
|
|
112
|
+
<div className='d-flex gap32 flex-wrap'>
|
|
113
|
+
<div className='wmx4'>
|
|
114
|
+
<div className='mb16 fw-bold'>Icon Type</div>
|
|
115
|
+
<InfoCard
|
|
116
|
+
title='Help Center'
|
|
117
|
+
topIcon={<BookOpenIcon size={40} />}
|
|
118
|
+
topIconType='icon'
|
|
119
|
+
onClick={() => console.log('Icon type clicked!')}
|
|
120
|
+
>
|
|
121
|
+
Icon is displayed in a circular background.
|
|
122
|
+
</InfoCard>
|
|
123
|
+
</div>
|
|
124
|
+
<div className='wmx4'>
|
|
125
|
+
<div className='mb16 fw-bold'>Image Type</div>
|
|
126
|
+
<InfoCard
|
|
127
|
+
title='Image Gallery'
|
|
128
|
+
topIcon={<img src="https://placehold.co/80x80" alt="Image" style={{borderRadius: '8px'}} />}
|
|
129
|
+
topIconType='image'
|
|
130
|
+
onClick={() => console.log('Image type clicked!')}
|
|
131
|
+
>
|
|
132
|
+
Image is displayed as-is without background.
|
|
133
|
+
</InfoCard>
|
|
134
|
+
</div>
|
|
135
|
+
<div className='wmx4'>
|
|
136
|
+
<div className='mb16 fw-bold'>Banner Type</div>
|
|
137
|
+
<InfoCard
|
|
138
|
+
title='Featured Content'
|
|
139
|
+
topIcon={<img src="https://placehold.co/600x200" alt="Banner" />}
|
|
140
|
+
topIconType='banner'
|
|
141
|
+
onClick={() => console.log('Banner type clicked!')}
|
|
142
|
+
>
|
|
143
|
+
Banner spans the full width of the card.
|
|
144
|
+
</InfoCard>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export const States = () => {
|
|
57
152
|
return (
|
|
58
|
-
<
|
|
59
|
-
className=
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
153
|
+
<div className='bg-neutral-50 p32'>
|
|
154
|
+
<div className='d-flex gap32 flex-wrap'>
|
|
155
|
+
<div className='wmx4'>
|
|
156
|
+
<div className='mb16 fw-bold'>Default State</div>
|
|
157
|
+
<InfoCard
|
|
158
|
+
title='Default Card'
|
|
159
|
+
topIcon={<BookOpenIcon size={40} />}
|
|
160
|
+
topIconType='icon'
|
|
161
|
+
onClick={() => console.log('Default clicked!')}
|
|
162
|
+
>
|
|
163
|
+
This is a default interactive card.
|
|
164
|
+
</InfoCard>
|
|
165
|
+
</div>
|
|
166
|
+
<div className='wmx4'>
|
|
167
|
+
<div className='mb16 fw-bold'>Disabled State</div>
|
|
168
|
+
<InfoCard
|
|
169
|
+
title='Disabled Card'
|
|
170
|
+
topIcon={<BookOpenIcon size={40} />}
|
|
171
|
+
topIconType='icon'
|
|
172
|
+
disabled={true}
|
|
173
|
+
onClick={() => console.log('This should not fire')}
|
|
174
|
+
>
|
|
175
|
+
This card is disabled and non-interactive.
|
|
176
|
+
</InfoCard>
|
|
177
|
+
</div>
|
|
178
|
+
<div className='wmx4'>
|
|
179
|
+
<div className='mb16 fw-bold'>Without Arrow Icon</div>
|
|
180
|
+
<InfoCard
|
|
181
|
+
title='No Arrow'
|
|
182
|
+
topIcon={<BookOpenIcon size={40} />}
|
|
183
|
+
topIconType='icon'
|
|
184
|
+
showIcon={false}
|
|
185
|
+
onClick={() => console.log('No arrow clicked!')}
|
|
186
|
+
>
|
|
187
|
+
This card has no arrow icon in the title.
|
|
188
|
+
</InfoCard>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
68
192
|
);
|
|
69
193
|
}
|
|
70
194
|
|
|
@@ -1,49 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import ArrowRight from '../../icon/icons/ArrowRight';
|
|
3
|
+
import { Card, CardProps } from '../card';
|
|
3
4
|
|
|
4
5
|
import styles from './style.module.scss';
|
|
6
|
+
import classNames from 'classnames';
|
|
5
7
|
|
|
6
|
-
export
|
|
7
|
-
topIcon:
|
|
8
|
-
|
|
8
|
+
export interface InfoCardProps extends CardProps {
|
|
9
|
+
topIcon: ReactNode;
|
|
10
|
+
showIcon?: boolean;
|
|
11
|
+
topIconType?: 'image' | 'icon' | 'banner';
|
|
12
|
+
disabled?: boolean;
|
|
9
13
|
};
|
|
10
14
|
|
|
11
15
|
export const InfoCard = ({
|
|
12
16
|
className,
|
|
17
|
+
showIcon = true,
|
|
13
18
|
title,
|
|
14
19
|
children,
|
|
15
20
|
topIcon,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
...
|
|
21
|
+
topIconType,
|
|
22
|
+
disabled = false,
|
|
23
|
+
onClick,
|
|
24
|
+
...cardProps
|
|
20
25
|
}: InfoCardProps) => (
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
26
|
+
<Card
|
|
27
|
+
{...cardProps}
|
|
28
|
+
label={topIcon && (
|
|
29
|
+
<>
|
|
30
|
+
{topIconType === 'icon' ? (
|
|
31
|
+
<div
|
|
32
|
+
className={classNames(
|
|
33
|
+
'd-flex ai-center jc-center bg-orange-200 br-circle p16',
|
|
34
|
+
styles.topIconWrapper
|
|
35
|
+
)}
|
|
36
|
+
>
|
|
37
|
+
{topIcon}
|
|
38
|
+
</div>
|
|
39
|
+
) : (
|
|
40
|
+
<div className={classNames(
|
|
41
|
+
'd-flex ai-center jc-center',
|
|
42
|
+
{ [styles.topIconBanner]: topIconType === 'banner' }
|
|
43
|
+
)}>
|
|
44
|
+
{topIcon}
|
|
45
|
+
</div>
|
|
46
|
+
)}
|
|
47
|
+
</>
|
|
48
|
+
)}
|
|
49
|
+
title={title && (
|
|
50
|
+
<>
|
|
51
|
+
{title}
|
|
52
|
+
|
|
53
|
+
{showIcon && <ArrowRight size={20} />}
|
|
54
|
+
</>
|
|
55
|
+
)}
|
|
56
|
+
titleVariant='medium'
|
|
57
|
+
description={children}
|
|
58
|
+
descriptionVariant='small'
|
|
59
|
+
actionIcon={null}
|
|
60
|
+
showActionIcon={false}
|
|
61
|
+
classNames={{
|
|
62
|
+
buttonWrapper: styles.buttonWrapper,
|
|
63
|
+
wrapper: classNames({
|
|
64
|
+
[styles.wrapper]: true,
|
|
65
|
+
[styles.disabled]: disabled,
|
|
66
|
+
'pt40': topIcon && topIconType === 'icon',
|
|
67
|
+
'mt40': topIcon && topIconType === 'icon',
|
|
68
|
+
[styles.bannerWrapper]: topIcon && topIconType === 'banner',
|
|
69
|
+
}),
|
|
70
|
+
label: classNames({
|
|
71
|
+
[styles.floatingLabel]: topIcon && topIconType !== 'image',
|
|
72
|
+
}),
|
|
73
|
+
title: classNames(
|
|
74
|
+
{'mt16': topIcon && topIconType === 'banner'},
|
|
75
|
+
'd-flex ai-center jc-center my8'
|
|
76
|
+
),
|
|
77
|
+
description: 'ta-center',
|
|
78
|
+
contentWrapper: styles.contentWrapper,
|
|
79
|
+
}}
|
|
80
|
+
variant='default'
|
|
81
|
+
onClick={disabled ? undefined : onClick}
|
|
82
|
+
density='compact'
|
|
83
|
+
/>
|
|
49
84
|
);
|
|
@@ -1,53 +1,66 @@
|
|
|
1
|
-
@use "../../../scss/public/
|
|
1
|
+
@use "../../../scss/public/colors" as *;
|
|
2
|
+
@use "../../../scss/public/shadows" as *;
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
opacity: 0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
to {
|
|
9
|
-
opacity: 1;
|
|
10
|
-
}
|
|
4
|
+
.bannerWrapper {
|
|
5
|
+
padding-top: 124px;
|
|
11
6
|
}
|
|
12
7
|
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
.right-icon {
|
|
19
|
-
visibility: visible;
|
|
8
|
+
.buttonWrapper:focus .wrapper {
|
|
9
|
+
border-color: $ds-neutral-700;
|
|
10
|
+
box-shadow: $bs-xs, 0 0 0 1px $ds-neutral-700;
|
|
11
|
+
}
|
|
20
12
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
13
|
+
.buttonWrapper:focus-visible .wrapper {
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
border-color: $ds-neutral-900;
|
|
16
|
+
box-shadow: $bs-xs, 0 0 0 1px $ds-neutral-900;
|
|
26
17
|
}
|
|
27
18
|
|
|
28
|
-
.
|
|
19
|
+
.topIconWrapper {
|
|
29
20
|
position: absolute;
|
|
21
|
+
width: 80px;
|
|
22
|
+
height: 80px;
|
|
30
23
|
|
|
31
24
|
left: 50%;
|
|
32
|
-
transform: translateX(-50%) translateY(-
|
|
25
|
+
transform: translateX(-50%) translateY(-80px);
|
|
33
26
|
|
|
34
27
|
&--muted {
|
|
35
28
|
opacity: 0.25;
|
|
36
29
|
}
|
|
37
30
|
}
|
|
38
31
|
|
|
39
|
-
.
|
|
40
|
-
visibility: hidden;
|
|
32
|
+
.topIconBanner {
|
|
41
33
|
position: absolute;
|
|
42
|
-
top:
|
|
43
|
-
|
|
34
|
+
top: -123px;
|
|
35
|
+
left: -15px;
|
|
36
|
+
right: -15px;
|
|
37
|
+
height: 124px;
|
|
38
|
+
width: calc(100% + 30px);
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
|
|
41
|
+
img {
|
|
42
|
+
position: absolute;
|
|
43
|
+
border-top-left-radius: 6px;
|
|
44
|
+
border-top-right-radius: 6px;
|
|
45
|
+
top: 0;
|
|
46
|
+
left: 0;
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 100%;
|
|
49
|
+
object-fit: cover;
|
|
50
|
+
min-width: 100%;
|
|
51
|
+
min-height: 100%;
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
.contentWrapper {
|
|
56
|
+
gap: 0!important;
|
|
57
|
+
}
|
|
49
58
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
59
|
+
.floatingLabel {
|
|
60
|
+
position: relative;
|
|
53
61
|
}
|
|
62
|
+
|
|
63
|
+
.disabled {
|
|
64
|
+
opacity: 0.25;
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
}
|
package/src/lib/components/comparisonTable/components/AccordionItem/AccordionItem.module.scss
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
.headerButton {
|
|
23
23
|
border: none;
|
|
24
|
-
background: $ds-
|
|
24
|
+
background: $ds-orange-50;
|
|
25
25
|
column-gap: 16px;
|
|
26
26
|
cursor: pointer;
|
|
27
27
|
font-family: inherit;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
|
|
32
32
|
|
|
33
33
|
&:hover {
|
|
34
|
-
background: $ds-
|
|
34
|
+
background: $ds-orange-100;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
height: 100%;
|
|
8
8
|
padding: 0 16px;
|
|
9
9
|
justify-content: space-between;
|
|
10
|
-
align-items:
|
|
10
|
+
align-items: stretch;
|
|
11
11
|
display: flex;
|
|
12
12
|
@include p-size-tablet {
|
|
13
13
|
display: none;
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
|
|
25
25
|
.arrow {
|
|
26
26
|
width: 32px;
|
|
27
|
-
height:
|
|
27
|
+
height: 56px;
|
|
28
28
|
z-index: 3;
|
|
29
29
|
|
|
30
30
|
padding: 0;
|
|
31
31
|
|
|
32
|
-
border-radius:
|
|
32
|
+
border-radius: 8px;
|
|
33
33
|
background-color: $ds-neutral-100;
|
|
34
34
|
|
|
35
35
|
justify-content: center;
|
|
36
36
|
align-items: center;
|
|
37
37
|
|
|
38
|
-
stroke: $ds-
|
|
38
|
+
stroke: $ds-neutral-500;
|
|
39
39
|
|
|
40
40
|
&:hover,
|
|
41
41
|
&:focus {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.active {
|
|
48
|
-
stroke: $ds-
|
|
48
|
+
stroke: $ds-neutral-900;
|
|
49
49
|
|
|
50
50
|
&:hover,
|
|
51
51
|
&:focus {
|
|
@@ -55,5 +55,6 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.noPointerEvents {
|
|
58
|
+
visibility: hidden;
|
|
58
59
|
pointer-events: none;
|
|
59
60
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { InfoIcon } from '../../../icon';
|
|
2
2
|
import styles from './style.module.scss';
|
|
3
3
|
|
|
4
4
|
const TableInfoButton = ({
|
|
@@ -16,7 +16,7 @@ const TableInfoButton = ({
|
|
|
16
16
|
aria-label="View more information"
|
|
17
17
|
title="View more information"
|
|
18
18
|
>
|
|
19
|
-
<
|
|
19
|
+
<InfoIcon size={20} />
|
|
20
20
|
</button>
|
|
21
21
|
);
|
|
22
22
|
|
|
@@ -17,11 +17,10 @@
|
|
|
17
17
|
|
|
18
18
|
&:hover,
|
|
19
19
|
&:focus {
|
|
20
|
-
background-color:
|
|
21
|
-
|
|
20
|
+
background-color: transparent;
|
|
22
21
|
svg {
|
|
23
22
|
path {
|
|
24
|
-
fill: $ds-
|
|
23
|
+
fill: $ds-neutral-600;
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
}
|
|
@@ -34,6 +33,6 @@
|
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
&:focus-visible {
|
|
37
|
-
box-shadow: 0 0 0 2px $ds-
|
|
36
|
+
box-shadow: 0 0 0 2px $ds-neutral-900;
|
|
38
37
|
}
|
|
39
38
|
}
|
|
@@ -16,7 +16,7 @@ const TableTrueFalse = ({
|
|
|
16
16
|
>
|
|
17
17
|
<path
|
|
18
18
|
d="M15.667 1.833L6.5 11 2.333 6.833"
|
|
19
|
-
stroke="#
|
|
19
|
+
stroke="#26262e"
|
|
20
20
|
strokeWidth="3"
|
|
21
21
|
strokeLinecap="round"
|
|
22
22
|
strokeLinejoin="round"
|
|
@@ -31,7 +31,7 @@ const TableTrueFalse = ({
|
|
|
31
31
|
fillRule="evenodd"
|
|
32
32
|
clipRule="evenodd"
|
|
33
33
|
d="M11.707 1.707A1 1 0 0010.293.293L6 4.586 1.707.293A1 1 0 00.293 1.707L4.586 6 .293 10.293a1 1 0 101.414 1.414L6 7.414l4.293 4.293a1 1 0 001.414-1.414L7.414 6l4.293-4.293z"
|
|
34
|
-
fill="#
|
|
34
|
+
fill="#d2d2d9"
|
|
35
35
|
/>
|
|
36
36
|
</svg>
|
|
37
37
|
);
|
|
@@ -277,7 +277,7 @@ const ComparisonTable = <T extends { id: number }>(
|
|
|
277
277
|
<div>
|
|
278
278
|
<button
|
|
279
279
|
className={classNames(
|
|
280
|
-
'w100 d-flex p-
|
|
280
|
+
'w100 d-flex p-h4 c-pointer',
|
|
281
281
|
baseStyles['show-details-button'],
|
|
282
282
|
classNameOverrides?.hideDetailsButton
|
|
283
283
|
)}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
.group-title {
|
|
63
63
|
width: 100%;
|
|
64
64
|
|
|
65
|
-
background-color: $ds-
|
|
65
|
+
background-color: $ds-orange-50;
|
|
66
66
|
border-radius: 8px;
|
|
67
67
|
|
|
68
68
|
& > h4 {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
|
|
109
109
|
.show-details-button {
|
|
110
110
|
font-family: inherit;
|
|
111
|
-
background-color: $ds-
|
|
111
|
+
background-color: $ds-orange-50;
|
|
112
112
|
|
|
113
113
|
border: none;
|
|
114
114
|
border-radius: 8px;
|
|
@@ -121,6 +121,10 @@
|
|
|
121
121
|
svg {
|
|
122
122
|
margin-left: 8px;
|
|
123
123
|
}
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
background-color: $ds-orange-100;
|
|
127
|
+
}
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
.icon-inverted {
|
|
@@ -75,7 +75,8 @@ export const Input = React.forwardRef(
|
|
|
75
75
|
className={classnames(
|
|
76
76
|
styles.prefix,
|
|
77
77
|
{ [styles['prefix--with-error']]: error },
|
|
78
|
-
{ [styles['prefix--disabled']]: disabled }
|
|
78
|
+
{ [styles['prefix--disabled']]: disabled },
|
|
79
|
+
{ [styles['prefix--with-value']]: props.value }
|
|
79
80
|
)}
|
|
80
81
|
>
|
|
81
82
|
{prefix}
|