@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,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
6
|
-
import '../../icon/icons/
|
|
1
|
+
import { a as __assign } from '../../../tslib.es6-a39f91fc.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { InfoCard } from './index.js';
|
|
4
|
+
import BookOpenIcon from '../../icon/icons/BookOpen.js';
|
|
5
|
+
import HeartIcon from '../../icon/icons/Heart.js';
|
|
6
|
+
import StarIcon from '../../icon/icons/Star.js';
|
|
7
|
+
import '../../icon/icons/ArrowRight.js';
|
|
7
8
|
import 'react';
|
|
8
9
|
import '../../icon/IconWrapper/IconWrapper.js';
|
|
9
10
|
import '../../../index-6ea95111.js';
|
|
10
11
|
import '../../../style-inject.es-1f59c1d0.js';
|
|
11
12
|
import '../card/index.js';
|
|
13
|
+
import '../../icon/icons/ChevronRight.js';
|
|
12
14
|
|
|
13
15
|
var story = {
|
|
14
16
|
title: 'JSX/Cards/InfoCard',
|
|
@@ -16,49 +18,60 @@ var story = {
|
|
|
16
18
|
argTypes: {
|
|
17
19
|
title: {
|
|
18
20
|
description: 'Title text that needs to be displayed',
|
|
21
|
+
control: 'text',
|
|
19
22
|
},
|
|
20
23
|
children: {
|
|
21
|
-
type: 'text',
|
|
22
24
|
description: 'Content that is displayed inside the card',
|
|
23
|
-
|
|
24
|
-
state: {
|
|
25
|
-
description: 'State that describe the interation with the card',
|
|
25
|
+
control: 'text',
|
|
26
26
|
},
|
|
27
27
|
topIcon: {
|
|
28
|
-
description: 'Icon displayed on the top of the card
|
|
28
|
+
description: 'Icon displayed on the top of the card',
|
|
29
29
|
},
|
|
30
|
-
|
|
31
|
-
description: '
|
|
30
|
+
topIconType: {
|
|
31
|
+
description: 'Type of top icon display',
|
|
32
|
+
control: 'select',
|
|
33
|
+
options: ['icon', 'image', 'banner'],
|
|
32
34
|
},
|
|
33
|
-
|
|
34
|
-
description: '
|
|
35
|
+
showIcon: {
|
|
36
|
+
description: 'Whether to show the arrow icon in the title',
|
|
37
|
+
control: 'boolean',
|
|
38
|
+
},
|
|
39
|
+
disabled: {
|
|
40
|
+
description: 'Whether the card is disabled',
|
|
41
|
+
control: 'boolean',
|
|
42
|
+
},
|
|
43
|
+
onClick: {
|
|
44
|
+
description: 'Click handler for the card',
|
|
35
45
|
},
|
|
36
46
|
className: {
|
|
37
47
|
description: 'Class name for most top parent element',
|
|
48
|
+
control: 'text',
|
|
38
49
|
},
|
|
39
50
|
},
|
|
40
51
|
args: {
|
|
41
|
-
title: '
|
|
42
|
-
children: '
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
rightIcon: {
|
|
49
|
-
src: images.washingMachine,
|
|
50
|
-
alt: 'Icon alt'
|
|
51
|
-
},
|
|
52
|
-
dropshadow: true,
|
|
52
|
+
title: 'Knowledge Base',
|
|
53
|
+
children: 'Find the answers you\'re looking for in our comprehensive, fact-checked library of articles and resources.',
|
|
54
|
+
topIcon: jsx(BookOpenIcon, { size: 40 }),
|
|
55
|
+
topIconType: 'icon',
|
|
56
|
+
showIcon: true,
|
|
57
|
+
disabled: false,
|
|
53
58
|
className: '',
|
|
54
59
|
}
|
|
55
60
|
};
|
|
56
|
-
var InfoCardStory = function (
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
var InfoCardStory = function (args) {
|
|
62
|
+
return (jsx("div", { className: 'bg-neutral-50 p32', children: jsx("div", { className: 'wmx4', children: jsx(InfoCard, __assign({}, args, { onClick: function () { return console.log('InfoCard clicked!'); }, children: args.children })) }) }));
|
|
63
|
+
};
|
|
64
|
+
var IconTypes = function () {
|
|
65
|
+
return (jsx("div", { className: 'bg-neutral-50 p32', children: jsxs("div", { className: 'd-flex gap32 flex-wrap', children: [jsxs("div", { className: 'wmx4', children: [jsx("div", { className: 'mb16 fw-bold', children: "Book Icon" }), jsx(InfoCard, { title: 'Knowledge Base', topIcon: jsx(BookOpenIcon, { size: 40 }), topIconType: 'icon', onClick: function () { return console.log('Book clicked!'); }, children: "Find answers in our comprehensive library of articles." })] }), jsxs("div", { className: 'wmx4', children: [jsx("div", { className: 'mb16 fw-bold', children: "Heart Icon" }), jsx(InfoCard, { title: 'Favorites', topIcon: jsx(HeartIcon, { size: 40 }), topIconType: 'icon', onClick: function () { return console.log('Heart clicked!'); }, children: "Save and organize your favorite items." })] }), jsxs("div", { className: 'wmx4', children: [jsx("div", { className: 'mb16 fw-bold', children: "Star Icon" }), jsx(InfoCard, { title: 'Premium Features', topIcon: jsx(StarIcon, { size: 40 }), topIconType: 'icon', onClick: function () { return console.log('Star clicked!'); }, children: "Unlock advanced features with premium." })] })] }) }));
|
|
66
|
+
};
|
|
67
|
+
var TopIconTypes = function () {
|
|
68
|
+
return (jsx("div", { className: 'bg-neutral-50 p32', children: jsxs("div", { className: 'd-flex gap32 flex-wrap', children: [jsxs("div", { className: 'wmx4', children: [jsx("div", { className: 'mb16 fw-bold', children: "Icon Type" }), jsx(InfoCard, { title: 'Help Center', topIcon: jsx(BookOpenIcon, { size: 40 }), topIconType: 'icon', onClick: function () { return console.log('Icon type clicked!'); }, children: "Icon is displayed in a circular background." })] }), jsxs("div", { className: 'wmx4', children: [jsx("div", { className: 'mb16 fw-bold', children: "Image Type" }), jsx(InfoCard, { title: 'Image Gallery', topIcon: jsx("img", { src: "https://placehold.co/80x80", alt: "Image", style: { borderRadius: '8px' } }), topIconType: 'image', onClick: function () { return console.log('Image type clicked!'); }, children: "Image is displayed as-is without background." })] }), jsxs("div", { className: 'wmx4', children: [jsx("div", { className: 'mb16 fw-bold', children: "Banner Type" }), jsx(InfoCard, { title: 'Featured Content', topIcon: jsx("img", { src: "https://placehold.co/600x200", alt: "Banner" }), topIconType: 'banner', onClick: function () { return console.log('Banner type clicked!'); }, children: "Banner spans the full width of the card." })] })] }) }));
|
|
69
|
+
};
|
|
70
|
+
var States = function () {
|
|
71
|
+
return (jsx("div", { className: 'bg-neutral-50 p32', children: jsxs("div", { className: 'd-flex gap32 flex-wrap', children: [jsxs("div", { className: 'wmx4', children: [jsx("div", { className: 'mb16 fw-bold', children: "Default State" }), jsx(InfoCard, { title: 'Default Card', topIcon: jsx(BookOpenIcon, { size: 40 }), topIconType: 'icon', onClick: function () { return console.log('Default clicked!'); }, children: "This is a default interactive card." })] }), jsxs("div", { className: 'wmx4', children: [jsx("div", { className: 'mb16 fw-bold', children: "Disabled State" }), jsx(InfoCard, { title: 'Disabled Card', topIcon: jsx(BookOpenIcon, { size: 40 }), topIconType: 'icon', disabled: true, onClick: function () { return console.log('This should not fire'); }, children: "This card is disabled and non-interactive." })] }), jsxs("div", { className: 'wmx4', children: [jsx("div", { className: 'mb16 fw-bold', children: "Without Arrow Icon" }), jsx(InfoCard, { title: 'No Arrow', topIcon: jsx(BookOpenIcon, { size: 40 }), topIconType: 'icon', showIcon: false, onClick: function () { return console.log('No arrow clicked!'); }, children: "This card has no arrow icon in the title." })] })] }) }));
|
|
59
72
|
};
|
|
60
73
|
InfoCardStory.storyName = "InfoCard";
|
|
61
74
|
|
|
62
75
|
export default story;
|
|
63
|
-
export { InfoCardStory };
|
|
76
|
+
export { IconTypes, InfoCardStory, States, TopIconTypes };
|
|
64
77
|
//# sourceMappingURL=index.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.stories.js","sources":["../../../../../../src/lib/components/cards/infoCard/index.stories.tsx"],"sourcesContent":["import { InfoCard, InfoCardProps } from '.';\nimport { images } from '../../../util/images';\n\nconst story = {\n title: 'JSX/Cards/InfoCard',\n component: InfoCard,\n argTypes: {\n title: {\n description: 'Title text that needs to be displayed',\n },\n children: {\n
|
|
1
|
+
{"version":3,"file":"index.stories.js","sources":["../../../../../../src/lib/components/cards/infoCard/index.stories.tsx"],"sourcesContent":["import { InfoCard, InfoCardProps } from '.';\nimport { images } from '../../../util/images';\nimport { BookOpenIcon, HeartIcon, StarIcon, ShieldIcon } from '../../icon';\n\nconst story = {\n title: 'JSX/Cards/InfoCard',\n component: InfoCard,\n argTypes: {\n title: {\n description: 'Title text that needs to be displayed',\n control: 'text',\n },\n children: {\n description: 'Content that is displayed inside the card',\n control: 'text',\n },\n topIcon: {\n description: 'Icon displayed on the top of the card',\n },\n topIconType: {\n description: 'Type of top icon display',\n control: 'select',\n options: ['icon', 'image', 'banner'],\n },\n showIcon: {\n description: 'Whether to show the arrow icon in the title',\n control: 'boolean',\n },\n disabled: {\n description: 'Whether the card is disabled',\n control: 'boolean',\n },\n onClick: {\n description: 'Click handler for the card',\n },\n className: {\n description: 'Class name for most top parent element',\n control: 'text',\n },\n },\n args: {\n title: 'Knowledge Base',\n children: 'Find the answers you\\'re looking for in our comprehensive, fact-checked library of articles and resources.',\n topIcon: <BookOpenIcon size={40} />,\n topIconType: 'icon',\n showIcon: true,\n disabled: false,\n className: '',\n }\n};\n\nexport const InfoCardStory = (args: InfoCardProps) => {\n return (\n <div className='bg-neutral-50 p32'>\n <div className='wmx4'>\n <InfoCard\n {...args}\n onClick={() => console.log('InfoCard clicked!')}\n >\n {args.children}\n </InfoCard>\n </div>\n </div>\n );\n}\n\nexport const IconTypes = () => {\n return (\n <div className='bg-neutral-50 p32'>\n <div className='d-flex gap32 flex-wrap'>\n <div className='wmx4'>\n <div className='mb16 fw-bold'>Book Icon</div>\n <InfoCard\n title='Knowledge Base'\n topIcon={<BookOpenIcon size={40} />}\n topIconType='icon'\n onClick={() => console.log('Book clicked!')}\n >\n Find answers in our comprehensive library of articles.\n </InfoCard>\n </div>\n <div className='wmx4'>\n <div className='mb16 fw-bold'>Heart Icon</div>\n <InfoCard\n title='Favorites'\n topIcon={<HeartIcon size={40} />}\n topIconType='icon'\n onClick={() => console.log('Heart clicked!')}\n >\n Save and organize your favorite items.\n </InfoCard>\n </div>\n <div className='wmx4'>\n <div className='mb16 fw-bold'>Star Icon</div>\n <InfoCard\n title='Premium Features'\n topIcon={<StarIcon size={40} />}\n topIconType='icon'\n onClick={() => console.log('Star clicked!')}\n >\n Unlock advanced features with premium.\n </InfoCard>\n </div>\n </div>\n </div>\n );\n}\n\nexport const TopIconTypes = () => {\n return (\n <div className='bg-neutral-50 p32'>\n <div className='d-flex gap32 flex-wrap'>\n <div className='wmx4'>\n <div className='mb16 fw-bold'>Icon Type</div>\n <InfoCard\n title='Help Center'\n topIcon={<BookOpenIcon size={40} />}\n topIconType='icon'\n onClick={() => console.log('Icon type clicked!')}\n >\n Icon is displayed in a circular background.\n </InfoCard>\n </div>\n <div className='wmx4'>\n <div className='mb16 fw-bold'>Image Type</div>\n <InfoCard\n title='Image Gallery'\n topIcon={<img src=\"https://placehold.co/80x80\" alt=\"Image\" style={{borderRadius: '8px'}} />}\n topIconType='image'\n onClick={() => console.log('Image type clicked!')}\n >\n Image is displayed as-is without background.\n </InfoCard>\n </div>\n <div className='wmx4'>\n <div className='mb16 fw-bold'>Banner Type</div>\n <InfoCard\n title='Featured Content'\n topIcon={<img src=\"https://placehold.co/600x200\" alt=\"Banner\" />}\n topIconType='banner'\n onClick={() => console.log('Banner type clicked!')}\n >\n Banner spans the full width of the card.\n </InfoCard>\n </div>\n </div>\n </div>\n );\n}\n\nexport const States = () => {\n return (\n <div className='bg-neutral-50 p32'>\n <div className='d-flex gap32 flex-wrap'>\n <div className='wmx4'>\n <div className='mb16 fw-bold'>Default State</div>\n <InfoCard\n title='Default Card'\n topIcon={<BookOpenIcon size={40} />}\n topIconType='icon'\n onClick={() => console.log('Default clicked!')}\n >\n This is a default interactive card.\n </InfoCard>\n </div>\n <div className='wmx4'>\n <div className='mb16 fw-bold'>Disabled State</div>\n <InfoCard\n title='Disabled Card'\n topIcon={<BookOpenIcon size={40} />}\n topIconType='icon'\n disabled={true}\n onClick={() => console.log('This should not fire')}\n >\n This card is disabled and non-interactive.\n </InfoCard>\n </div>\n <div className='wmx4'>\n <div className='mb16 fw-bold'>Without Arrow Icon</div>\n <InfoCard\n title='No Arrow'\n topIcon={<BookOpenIcon size={40} />}\n topIconType='icon'\n showIcon={false}\n onClick={() => console.log('No arrow clicked!')}\n >\n This card has no arrow icon in the title.\n </InfoCard>\n </div>\n </div>\n </div>\n );\n}\n\nInfoCardStory.storyName = \"InfoCard\";\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;IAIM,KAAK,GAAG;IACZ,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,QAAQ;IACnB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,WAAW,EAAE,uCAAuC;YACpD,OAAO,EAAE,MAAM;SAChB;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,2CAA2C;YACxD,OAAO,EAAE,MAAM;SAChB;QACD,OAAO,EAAE;YACP,WAAW,EAAE,uCAAuC;SACrD;QACD,WAAW,EAAE;YACX,WAAW,EAAE,0BAA0B;YACvC,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;SACrC;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,6CAA6C;YAC1D,OAAO,EAAE,SAAS;SACnB;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,8BAA8B;YAC3C,OAAO,EAAE,SAAS;SACnB;QACD,OAAO,EAAE;YACP,WAAW,EAAE,4BAA4B;SAC1C;QACD,SAAS,EAAE;YACT,WAA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{ s as styleInject } from '../../../../style-inject.es-1f59c1d0.js';
|
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../../../../index-6ea95111.js';
|
|
6
6
|
|
|
7
|
-
var css_248z = ".AccordionItem-module_container__29xle {\n width: min-content;\n width: var(--growContent, min-content);\n max-width: 100%;\n margin-left: auto;\n margin-right: auto;\n}\n\n.AccordionItem-module_chevron__1Pdoe {\n transition: filter 0.3s ease-in-out, transform 0.2s ease-in-out;\n}\n\n.AccordionItem-module_chevronClosed__1Sq5g {\n transform: rotate(180deg);\n}\n\n.AccordionItem-module_iconAndTextContainer__1K9NF {\n column-gap: 12px;\n}\n\n.AccordionItem-module_headerButton__1C03u {\n border: none;\n background: #
|
|
7
|
+
var css_248z = ".AccordionItem-module_container__29xle {\n width: min-content;\n width: var(--growContent, min-content);\n max-width: 100%;\n margin-left: auto;\n margin-right: auto;\n}\n\n.AccordionItem-module_chevron__1Pdoe {\n transition: filter 0.3s ease-in-out, transform 0.2s ease-in-out;\n}\n\n.AccordionItem-module_chevronClosed__1Sq5g {\n transform: rotate(180deg);\n}\n\n.AccordionItem-module_iconAndTextContainer__1K9NF {\n column-gap: 12px;\n}\n\n.AccordionItem-module_headerButton__1C03u {\n border: none;\n background: #FAF8F5;\n column-gap: 16px;\n cursor: pointer;\n font-family: inherit;\n outline: none;\n position: relative;\n text-align: inherit;\n transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;\n}\n.AccordionItem-module_headerButton__1C03u:hover {\n background: #FCF7EF;\n}\n\n.AccordionItem-module_headerButton__1C03u:hover .AccordionItem-module_chevron__1Pdoe {\n filter: brightness(0.425);\n}";
|
|
8
8
|
var styles = {"container":"AccordionItem-module_container__29xle","chevron":"AccordionItem-module_chevron__1Pdoe","chevronClosed":"AccordionItem-module_chevronClosed__1Sq5g","iconAndTextContainer":"AccordionItem-module_iconAndTextContainer__1K9NF","headerButton":"AccordionItem-module_headerButton__1C03u"};
|
|
9
9
|
styleInject(css_248z);
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
|
|
3
3
|
var Chevron = function (_a) {
|
|
4
4
|
var className = _a.className;
|
|
5
|
-
return (jsx("svg", { width: "20", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M15 12.5l-5-5-5 5", stroke: "#
|
|
5
|
+
return (jsx("svg", { width: "20", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M15 12.5l-5-5-5 5", stroke: "#26262e", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export default Chevron;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron.js","sources":["../../../../../../src/lib/components/comparisonTable/components/Chevron.tsx"],"sourcesContent":["const Chevron = ({ className }: { className?: string }) => (\n <svg\n width=\"20\"\n height=\"20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path\n d=\"M15 12.5l-5-5-5 5\"\n stroke=\"#
|
|
1
|
+
{"version":3,"file":"Chevron.js","sources":["../../../../../../src/lib/components/comparisonTable/components/Chevron.tsx"],"sourcesContent":["const Chevron = ({ className }: { className?: string }) => (\n <svg\n width=\"20\"\n height=\"20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path\n d=\"M15 12.5l-5-5-5 5\"\n stroke=\"#26262e\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["_jsx"],"mappings":";;IAAM,OAAO,GAAG,UAAC,EAAqC;QAAnC,SAAS,eAAA;IAA+B,QACzDA,aACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAE,SAAS,YAEpBA,cACE,CAAC,EAAC,mBAAmB,EACrB,MAAM,EAAC,SAAS,EAChB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE;AAfmD;;;;"}
|
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import { s as styleInject } from '../../../../style-inject.es-1f59c1d0.js';
|
|
4
4
|
import { c as classNames } from '../../../../index-6ea95111.js';
|
|
5
5
|
|
|
6
|
-
var css_248z = ".style-module_header__32rw- {\n position: relative;\n}\n.style-module_header__32rw- > div {\n width: var(--tableWidth);\n max-width: 100vw;\n}\n.style-module_header__32rw- > div:nth-child(n+3) {\n margin: 0;\n}\n@media (min-width: 34rem) {\n .style-module_header__32rw- > div {\n width: 211px;\n width: var(--cellWidth, 211px);\n max-width: var(--tableWidth);\n scroll-snap-align: unset;\n }\n}\n\n.style-module_cell__1NoZ6 {\n display: flex;\n justify-content: center;\n align-items: center;\n scroll-snap-align: end;\n line-height: 24px;\n padding: 16px 8px;\n color: #26262e;\n width: 50vw;\n max-width: calc(var(--tableWidth) / 2);\n}\n.style-module_cell__1NoZ6:first-child {\n padding: 16px 8px 16px 16px;\n}\n.style-module_cell__1NoZ6:first-child {\n background-color: white;\n /** Add scroll snap to every column except the first one */\n scroll-snap-align: unset;\n}\n.style-module_cell__1NoZ6:nth-child(n+3) {\n margin-left: 50vw;\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6:nth-child(n+3) {\n margin-left: unset;\n }\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6 {\n flex: 1 0 211px;\n flex: 1 0 var(--cellWidth, 211px);\n width: 211px;\n width: var(--cellWidth, 211px);\n padding: 24px 8px;\n }\n .style-module_cell__1NoZ6:first-child {\n padding: 24px 8px 24px 24px;\n }\n}\n\nh4.style-module_cell__1NoZ6 {\n max-width: min(212px, calc(var(--tableWidth) / 2));\n max-width: min(var(--firstColumnWidth, 212px), calc(var(--tableWidth) / 2));\n}\n\n.style-module_title__1xYvu {\n position: relative;\n color: #26262e;\n display: none;\n line-height: 38px;\n
|
|
6
|
+
var css_248z = ".style-module_header__32rw- {\n position: relative;\n}\n.style-module_header__32rw- > div {\n width: var(--tableWidth);\n max-width: 100vw;\n}\n.style-module_header__32rw- > div:nth-child(n+3) {\n margin: 0;\n}\n@media (min-width: 34rem) {\n .style-module_header__32rw- > div {\n width: 211px;\n width: var(--cellWidth, 211px);\n max-width: var(--tableWidth);\n scroll-snap-align: unset;\n }\n}\n\n.style-module_cell__1NoZ6 {\n display: flex;\n justify-content: center;\n align-items: center;\n scroll-snap-align: end;\n line-height: 24px;\n padding: 16px 8px;\n color: #26262e;\n width: 50vw;\n max-width: calc(var(--tableWidth) / 2);\n}\n.style-module_cell__1NoZ6:first-child {\n padding: 16px 8px 16px 16px;\n}\n.style-module_cell__1NoZ6:first-child {\n background-color: white;\n /** Add scroll snap to every column except the first one */\n scroll-snap-align: unset;\n}\n.style-module_cell__1NoZ6:nth-child(n+3) {\n margin-left: 50vw;\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6:nth-child(n+3) {\n margin-left: unset;\n }\n}\n@media (min-width: 34rem) {\n .style-module_cell__1NoZ6 {\n flex: 1 0 211px;\n flex: 1 0 var(--cellWidth, 211px);\n width: 211px;\n width: var(--cellWidth, 211px);\n padding: 24px 8px;\n }\n .style-module_cell__1NoZ6:first-child {\n padding: 24px 8px 24px 24px;\n }\n}\n\nh4.style-module_cell__1NoZ6 {\n max-width: min(212px, calc(var(--tableWidth) / 2));\n max-width: min(var(--firstColumnWidth, 212px), calc(var(--tableWidth) / 2));\n}\n\n.style-module_title__1xYvu {\n position: relative;\n color: #26262e;\n display: none;\n line-height: 38px;\n}\n@media (min-width: 34rem) {\n .style-module_title__1xYvu {\n display: flex;\n }\n}\n\n.style-module_sticky__2T5jm {\n position: sticky;\n justify-content: flex-start;\n z-index: 1;\n top: 0;\n left: 0;\n width: 50vw;\n}\n@media (min-width: 34rem) {\n .style-module_sticky__2T5jm {\n border-right: 1px solid #f9f9fd;\n flex: 1 0 288px;\n }\n}\n\nh4.style-module_addon__CPf60 {\n border-right: none;\n max-width: calc(100vw - 64px);\n width: 100%;\n}\n@media (min-width: 64rem) {\n h4.style-module_addon__CPf60 {\n max-width: 976px;\n }\n}";
|
|
7
7
|
var styles = {"header":"style-module_header__32rw-","cell":"style-module_cell__1NoZ6","title":"style-module_title__1xYvu","sticky":"style-module_sticky__2T5jm","addon":"style-module_addon__CPf60"};
|
|
8
8
|
styleInject(css_248z);
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { c as classNames } from '../../../../index-6ea95111.js';
|
|
|
3
3
|
import ArrowIcon from './Arrow.js';
|
|
4
4
|
import { s as styleInject } from '../../../../style-inject.es-1f59c1d0.js';
|
|
5
5
|
|
|
6
|
-
var css_248z = ".style-module_container__3BxOi {\n position: absolute;\n width: 100%;\n height: 100%;\n padding: 0 16px;\n justify-content: space-between;\n align-items:
|
|
6
|
+
var css_248z = ".style-module_container__3BxOi {\n position: absolute;\n width: 100%;\n height: 100%;\n padding: 0 16px;\n justify-content: space-between;\n align-items: stretch;\n display: flex;\n}\n@media (min-width: 34rem) {\n .style-module_container__3BxOi {\n display: none;\n }\n}\n\n.style-module_next__3yJsi {\n transform: rotate(-90deg);\n}\n\n.style-module_prev__3rIR_ {\n transform: rotate(90deg);\n}\n\n.style-module_arrow__1tlbD {\n width: 32px;\n height: 56px;\n z-index: 3;\n padding: 0;\n border-radius: 8px;\n background-color: #f7f7fd;\n justify-content: center;\n align-items: center;\n stroke: #b8b8c0;\n}\n.style-module_arrow__1tlbD:hover, .style-module_arrow__1tlbD:focus {\n background-color: #f7f7fd;\n cursor: not-allowed;\n}\n\n.style-module_active__2kklB {\n stroke: #26262e;\n}\n.style-module_active__2kklB:hover, .style-module_active__2kklB:focus {\n background-color: #f7f7fd;\n cursor: pointer;\n}\n\n.style-module_noPointerEvents__21KuB {\n visibility: hidden;\n pointer-events: none;\n}";
|
|
7
7
|
var styles = {"container":"style-module_container__3BxOi","next":"style-module_next__3yJsi","prev":"style-module_prev__3rIR_","arrow":"style-module_arrow__1tlbD","active":"style-module_active__2kklB","noPointerEvents":"style-module_noPointerEvents__21KuB"};
|
|
8
8
|
styleInject(css_248z);
|
|
9
9
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import InfoIcon from '../../../icon/icons/Info.js';
|
|
3
3
|
import { s as styleInject } from '../../../../style-inject.es-1f59c1d0.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../../../icon/IconWrapper/IconWrapper.js';
|
|
6
6
|
import '../../../../tslib.es6-a39f91fc.js';
|
|
7
7
|
import '../../../../index-6ea95111.js';
|
|
8
8
|
|
|
9
|
-
var css_248z = ".style-module_button__3TkNT {\n padding: 0;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: bottom;\n border-radius: 12px;\n width: 24px;\n height: 24px;\n transition: all 0.3s ease;\n}\n.style-module_button__3TkNT:hover, .style-module_button__3TkNT:focus {\n background-color:
|
|
9
|
+
var css_248z = ".style-module_button__3TkNT {\n padding: 0;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: bottom;\n border-radius: 12px;\n width: 24px;\n height: 24px;\n transition: all 0.3s ease;\n}\n.style-module_button__3TkNT:hover, .style-module_button__3TkNT:focus {\n background-color: transparent;\n}\n.style-module_button__3TkNT:hover svg path, .style-module_button__3TkNT:focus svg path {\n fill: #919199;\n}\n.style-module_button__3TkNT svg {\n transition: all 0.3s ease;\n}\n.style-module_button__3TkNT svg path {\n fill: #d2d2d9;\n}\n.style-module_button__3TkNT:focus-visible {\n box-shadow: 0 0 0 2px #26262e;\n}";
|
|
10
10
|
var styles = {"button":"style-module_button__3TkNT"};
|
|
11
11
|
styleInject(css_248z);
|
|
12
12
|
|
|
13
13
|
var TableInfoButton = function (_a) {
|
|
14
14
|
var onClick = _a.onClick, _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
15
|
-
return (jsx("button", { className: "p-btn--secondary ".concat(styles.button, " ").concat(className), type: "button", "data-testid": "ds-table-info-button", onClick: onClick, "aria-label": "View more information", title: "View more information", children: jsx(
|
|
15
|
+
return (jsx("button", { className: "p-btn--secondary ".concat(styles.button, " ").concat(className), type: "button", "data-testid": "ds-table-info-button", onClick: onClick, "aria-label": "View more information", title: "View more information", children: jsx(InfoIcon, { size: 20 }) }));
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export default TableInfoButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../src/lib/components/comparisonTable/components/TableInfoButton/index.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../src/lib/components/comparisonTable/components/TableInfoButton/index.tsx"],"sourcesContent":["import { InfoIcon } from '../../../icon';\nimport styles from './style.module.scss';\n\nconst TableInfoButton = ({\n onClick,\n className = '',\n}: {\n onClick: () => void;\n className?: string;\n}) => (\n <button\n className={`p-btn--secondary ${styles.button} ${className}`}\n type=\"button\"\n data-testid=\"ds-table-info-button\"\n onClick={onClick}\n aria-label=\"View more information\"\n title=\"View more information\"\n >\n <InfoIcon size={20} />\n </button>\n);\n\nexport default TableInfoButton;\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;IAGM,eAAe,GAAG,UAAC,EAMxB;QALC,OAAO,aAAA,EACP,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA;IAIV,QACJA,gBACE,SAAS,EAAE,2BAAoB,MAAM,CAAC,MAAM,cAAI,SAAS,CAAE,EAC3D,IAAI,EAAC,QAAQ,iBACD,sBAAsB,EAClC,OAAO,EAAE,OAAO,gBACL,uBAAuB,EAClC,KAAK,EAAC,uBAAuB,YAE7BA,IAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,GAAI,GACf;AAVL;;;;"}
|
|
@@ -4,7 +4,7 @@ import StarIcon from './StarIcon.js';
|
|
|
4
4
|
import ZapIcon from './ZapIcon.js';
|
|
5
5
|
import { s as styleInject } from '../../../../style-inject.es-1f59c1d0.js';
|
|
6
6
|
|
|
7
|
-
var css_248z = ".style-module_icon__1ep7- {\n margin-right: 4px;\n}\n\n.style-module_filled__3l-v0 {\n fill: #
|
|
7
|
+
var css_248z = ".style-module_icon__1ep7- {\n margin-right: 4px;\n}\n\n.style-module_filled__3l-v0 {\n fill: #26262e;\n}\n\n.style-module_empty__Ikg_s {\n fill: #d2d2d9;\n}";
|
|
8
8
|
var styles = {"icon":"style-module_icon__1ep7-","filled":"style-module_filled__3l-v0","empty":"style-module_empty__Ikg_s"};
|
|
9
9
|
styleInject(css_248z);
|
|
10
10
|
|
|
@@ -3,9 +3,9 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
var TableTrueFalse = function (_a) {
|
|
4
4
|
var value = _a.value, _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
5
5
|
if (value) {
|
|
6
|
-
return (jsx("svg", { width: "18", height: "13", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M15.667 1.833L6.5 11 2.333 6.833", stroke: "#
|
|
6
|
+
return (jsx("svg", { width: "18", height: "13", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M15.667 1.833L6.5 11 2.333 6.833", stroke: "#26262e", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
7
7
|
}
|
|
8
|
-
return (jsx("svg", { width: "12", height: "12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", 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", fill: "#
|
|
8
|
+
return (jsx("svg", { width: "12", height: "12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", 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", fill: "#d2d2d9" }) }));
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export default TableTrueFalse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableTrueFalse.js","sources":["../../../../../../src/lib/components/comparisonTable/components/TableTrueFalse.tsx"],"sourcesContent":["const TableTrueFalse = ({\n value,\n className = '',\n}: {\n value: boolean;\n className?: string;\n}) => {\n if (value) {\n return (\n <svg\n width=\"18\"\n height=\"13\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path\n d=\"M15.667 1.833L6.5 11 2.333 6.833\"\n stroke=\"#
|
|
1
|
+
{"version":3,"file":"TableTrueFalse.js","sources":["../../../../../../src/lib/components/comparisonTable/components/TableTrueFalse.tsx"],"sourcesContent":["const TableTrueFalse = ({\n value,\n className = '',\n}: {\n value: boolean;\n className?: string;\n}) => {\n if (value) {\n return (\n <svg\n width=\"18\"\n height=\"13\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n <path\n d=\"M15.667 1.833L6.5 11 2.333 6.833\"\n stroke=\"#26262e\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n }\n\n return (\n <svg width=\"12\" height=\"12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"#d2d2d9\"\n />\n </svg>\n );\n};\n\nexport default TableTrueFalse;\n"],"names":["_jsx"],"mappings":";;IAAM,cAAc,GAAG,UAAC,EAMvB;QALC,KAAK,WAAA,EACL,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA;IAKd,IAAI,KAAK,EAAE;QACT,QACEA,aACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAE,SAAS,YAEpBA,cACE,CAAC,EAAC,kCAAkC,EACpC,MAAM,EAAC,SAAS,EAChB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,EACN;KACH;IAED,QACEA,aAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,YACxEA,cACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,4KAA4K,EAC9K,IAAI,EAAC,SAAS,GACd,GACE,EACN;AACJ;;;;"}
|
|
@@ -138,7 +138,7 @@ var useComparisonTable = function (_a) {
|
|
|
138
138
|
};
|
|
139
139
|
};
|
|
140
140
|
|
|
141
|
-
var css_248z = ".style-module_container__xHPlk {\n width: 100%;\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n scroll-snap-type: x mandatory;\n}\n@media (min-width: 34rem) {\n .style-module_container__xHPlk {\n scroll-snap-type: unset;\n }\n}\n\n.style-module_noScrollBars__1ri_E {\n scrollbar-width: none;\n /* Firefox */\n -ms-overflow-style: none;\n /* Internet Explorer 10+ */\n}\n.style-module_noScrollBars__1ri_E::-webkit-scrollbar {\n /* WebKit */\n width: 0;\n height: 0;\n}\n\n@media (max-width: 34rem) {\n .style-module_noScrollBarsMobile__1txeg * {\n scrollbar-width: none;\n /* Firefox */\n -ms-overflow-style: none;\n /* Internet Explorer 10+ */\n }\n .style-module_noScrollBarsMobile__1txeg * -webkit-scrollbar {\n /* WebKit */\n width: 0;\n height: 0;\n display: none;\n }\n}\n\n.style-module_section__1bf_0 + .style-module_section__1bf_0 {\n margin-top: 48px;\n}\n@media (min-width: 34rem) {\n .style-module_section__1bf_0 + .style-module_section__1bf_0 {\n margin-top: 72px;\n }\n}\n\n.style-module_overflow-container__oBPQw {\n width: max-content;\n min-width: 100%;\n}\n\n.style-module_group-container__2G6Ix {\n display: flex;\n flex-flow: column;\n width: max-content;\n width: var(--growContent, max-content);\n margin: auto;\n}\n\n.style-module_group-title__2vvRm {\n width: 100%;\n background-color: #
|
|
141
|
+
var css_248z = ".style-module_container__xHPlk {\n width: 100%;\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n scroll-snap-type: x mandatory;\n}\n@media (min-width: 34rem) {\n .style-module_container__xHPlk {\n scroll-snap-type: unset;\n }\n}\n\n.style-module_noScrollBars__1ri_E {\n scrollbar-width: none;\n /* Firefox */\n -ms-overflow-style: none;\n /* Internet Explorer 10+ */\n}\n.style-module_noScrollBars__1ri_E::-webkit-scrollbar {\n /* WebKit */\n width: 0;\n height: 0;\n}\n\n@media (max-width: 34rem) {\n .style-module_noScrollBarsMobile__1txeg * {\n scrollbar-width: none;\n /* Firefox */\n -ms-overflow-style: none;\n /* Internet Explorer 10+ */\n }\n .style-module_noScrollBarsMobile__1txeg * -webkit-scrollbar {\n /* WebKit */\n width: 0;\n height: 0;\n display: none;\n }\n}\n\n.style-module_section__1bf_0 + .style-module_section__1bf_0 {\n margin-top: 48px;\n}\n@media (min-width: 34rem) {\n .style-module_section__1bf_0 + .style-module_section__1bf_0 {\n margin-top: 72px;\n }\n}\n\n.style-module_overflow-container__oBPQw {\n width: max-content;\n min-width: 100%;\n}\n\n.style-module_group-container__2G6Ix {\n display: flex;\n flex-flow: column;\n width: max-content;\n width: var(--growContent, max-content);\n margin: auto;\n}\n\n.style-module_group-title__2vvRm {\n width: 100%;\n background-color: #FAF8F5;\n border-radius: 8px;\n}\n.style-module_group-title__2vvRm > h4 {\n padding: 24px;\n display: inline-block;\n}\n\n.style-module_sticky__2Xmbl {\n position: sticky;\n justify-content: flex-start;\n z-index: 1;\n top: 0;\n left: 0;\n}\n@media (min-width: 34rem) {\n .style-module_sticky__2Xmbl {\n border-right: 1px solid #f9f9fd;\n }\n}\n\n.style-module_header__23SZy {\n position: sticky;\n top: 0;\n top: var(--stickyHeaderTopOffset, 0);\n z-index: 2;\n background-color: white;\n}\n.style-module_header__23SZy .style-module_container__xHPlk {\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n}\n.style-module_header__23SZy .style-module_container__xHPlk::-webkit-scrollbar {\n display: none;\n}\n\n.style-module_show-details-container__1smn4 {\n width: 100%;\n border: none;\n}\n\n.style-module_show-details-button__3HR-p {\n font-family: inherit;\n background-color: #FAF8F5;\n border: none;\n border-radius: 8px;\n height: 64px;\n justify-content: center;\n align-items: center;\n}\n.style-module_show-details-button__3HR-p svg {\n margin-left: 8px;\n}\n.style-module_show-details-button__3HR-p:hover {\n background-color: #FCF7EF;\n}\n\n.style-module_icon-inverted__1SnO1 {\n transform: rotate(180deg);\n transition: all 0.25s ease;\n}";
|
|
142
142
|
var baseStyles = {"container":"style-module_container__xHPlk","noScrollBars":"style-module_noScrollBars__1ri_E","noScrollBarsMobile":"style-module_noScrollBarsMobile__1txeg","section":"style-module_section__1bf_0","overflow-container":"style-module_overflow-container__oBPQw","group-container":"style-module_group-container__2G6Ix","group-title":"style-module_group-title__2vvRm","sticky":"style-module_sticky__2Xmbl","header":"style-module_header__23SZy","show-details-container":"style-module_show-details-container__1smn4","show-details-button":"style-module_show-details-button__3HR-p","icon-inverted":"style-module_icon-inverted__1SnO1"};
|
|
143
143
|
styleInject(css_248z);
|
|
144
144
|
|
|
@@ -181,7 +181,7 @@ var ComparisonTable = function (props) {
|
|
|
181
181
|
* Print a table subheader if the `label` value is present
|
|
182
182
|
*/
|
|
183
183
|
headerGroup.label && !collapsibleSections && (jsx("div", { className: baseStyles['group-title'], children: jsx("h4", { className: "p-h4 ".concat(baseStyles.sticky), children: headerGroup.label }) })), content] }) }) }) }) }, idString)) }, idString));
|
|
184
|
-
}), hideDetails && (jsx("div", { className: classNames(baseStyles['show-details-container'], baseStyles.sticky, 'mt48'), children: jsx("div", { children: jsxs("button", { className: classNames('w100 d-flex p-
|
|
184
|
+
}), hideDetails && (jsx("div", { className: classNames(baseStyles['show-details-container'], baseStyles.sticky, 'mt48'), children: jsx("div", { children: jsxs("button", { className: classNames('w100 d-flex p-h4 c-pointer', baseStyles['show-details-button'], classNameOverrides === null || classNameOverrides === void 0 ? void 0 : classNameOverrides.hideDetailsButton), onClick: toggleMoreRows, type: "button", children: [showMore ? hideDetailsCaption : showDetailsCaption, jsx(Chevron, { className: showMore ? '' : baseStyles['icon-inverted'] })] }) }) }))] })] }) }));
|
|
185
185
|
};
|
|
186
186
|
|
|
187
187
|
export { ComparisonTable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/lib/components/comparisonTable/hooks/useComparisonTable.ts","../../../../../src/lib/components/comparisonTable/index.tsx"],"sourcesContent":["import debounce from 'lodash.debounce';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport generateId from '../../../util/generateId';\nimport { ArrowValues } from '../components/TableArrows';\n\nexport const useComparisonTable = ({\n onSelectionChanged,\n}: {\n onSelectionChanged?: (selectedIndex: number) => void;\n}) => {\n const [showMore, setShowMore] = useState<boolean>(false);\n const [headerWidth, setHeaderWidth] = useState(1400);\n const [selectedTabIndex, setSelectedTabIndex] = useState(0);\n const [selectedSection, setSelectedSection] = useState('');\n const [headerId, setHeaderId] = useState('');\n const headerRef = useRef<HTMLDivElement | null>(null);\n const contentContainerRef = useRef<HTMLDivElement | null>(null);\n const observerRef = useRef<ResizeObserver | null>(null);\n\n const headerRefCallbackRef = useCallback((node) => {\n if (node) {\n setHeaderWidth(node.clientWidth);\n }\n\n headerRef.current = node;\n }, []);\n\n useEffect(() => {\n if (!observerRef.current) {\n observerRef.current = new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n const currentTabIndex = Math.round(\n entry.target.scrollLeft / entry.contentRect.width\n );\n\n setHeaderWidth(entry.contentRect.width);\n\n // Update selectedTabIndex to match the calculated current tab index\n setSelectedTabIndex(currentTabIndex);\n });\n });\n }\n\n if (headerRef.current) {\n observerRef.current.observe(headerRef.current);\n }\n\n return () => {\n if (headerRef.current) {\n observerRef.current?.unobserve(headerRef.current);\n }\n observerRef.current?.disconnect();\n };\n }, []);\n\n useEffect(() => {\n const resetHeaderWidth = () => {\n if (headerRef.current) {\n setHeaderWidth(headerRef.current.clientWidth);\n }\n };\n\n window.addEventListener('resize', resetHeaderWidth);\n\n return () => window.removeEventListener('resize', resetHeaderWidth);\n }, []);\n\n const handleTableScroll = () => {\n if (!headerRef.current) {\n return;\n }\n\n const headerWidth = headerRef.current.getBoundingClientRect().width;\n\n const currentTabIndex = Math.round(\n headerRef.current.scrollLeft / headerWidth\n );\n\n setSelectedTabIndex(currentTabIndex);\n };\n\n const debouncedTableScroll = debounce(handleTableScroll, 150);\n\n useEffect(() => {\n headerRef.current?.addEventListener('scroll', debouncedTableScroll, {\n passive: true,\n });\n\n return headerRef.current?.removeEventListener('scroll', handleTableScroll);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleArrowsClick = (value: ArrowValues) => {\n if (headerRef.current) {\n const currentTabIndex = Math.round(\n headerRef.current.scrollLeft / headerRef.current.clientWidth\n );\n\n const direction = value === 'next' ? 1 : -1;\n\n const newTabIndex = currentTabIndex + direction;\n\n headerRef.current.scroll({\n top: 0,\n left: headerWidth * newTabIndex,\n behavior: 'smooth',\n });\n\n setSelectedTabIndex(() => {\n return newTabIndex;\n });\n }\n };\n\n const toggleMoreRows = async () => {\n setShowMore(!showMore);\n };\n\n useEffect(() => {\n if (headerRef.current) {\n return;\n }\n\n const headerById = document.getElementById(headerId);\n\n if (headerById) {\n headerRefCallbackRef(headerById);\n }\n }, [headerId, headerRefCallbackRef]);\n\n useEffect(() => {\n setHeaderId(generateId());\n }, []);\n\n useEffect(() => {\n onSelectionChanged?.(selectedTabIndex);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedTabIndex]);\n\n return {\n headerWidth,\n headerId,\n contentContainerRef,\n selectedSection,\n setSelectedSection,\n selectedTabIndex,\n setSelectedTabIndex,\n headerRefCallbackRef,\n handleArrowsClick,\n toggleMoreRows,\n showMore,\n };\n};\n","import classNames from 'classnames';\nimport { Fragment } from 'react';\nimport { ScrollSync, ScrollSyncPane } from 'react-scroll-sync';\n\nimport { AccordionItem } from './components/AccordionItem';\nimport Chevron from './components/Chevron';\nimport Row from './components/Row';\nimport TableArrows from './components/TableArrows';\nimport TableButton from './components/TableButton';\nimport TableInfoButton from './components/TableInfoButton';\nimport TableRating from './components/TableRating';\nimport TableRowHeader from './components/TableRowHeader';\nimport TableTrueFalse from './components/TableTrueFalse';\nimport { useComparisonTable } from './hooks/useComparisonTable';\nimport baseStyles from './style.module.scss';\n\nexport interface CellBaseProps<T> {\n /** Used to display the row's title */\n label?: React.ReactNode;\n /**\n *\n * @param value The current data value\n * @param element The complete data object\n */\n render?: (value: any, element: T) => React.ReactNode; // TODO: add typing to value param\n}\n\ninterface CellWithId<T> extends CellBaseProps<T> {\n /** Used when adding component add-ons */\n addonId: string | number;\n}\n\nexport type Cell<T> =\n | ({ key: Extract<keyof T, string> } & CellBaseProps<T>)\n | ({ key?: undefined } & CellWithId<T>);\n\nexport interface TableHeader<T> {\n /** Required unique id number for each table group */\n id: number;\n /** Used to display a table group subheader */\n label?: React.ReactNode;\n cells: Array<Cell<T>>;\n default?: boolean;\n}\n\nexport interface ComparisonTableProps<T> {\n headers: Array<TableHeader<T>>;\n data: Array<T>;\n hideDetails?: boolean;\n hideDetailsCaption?: string;\n showDetailsCaption?: string;\n hideScrollBars?: boolean;\n hideScrollBarsMobile?: boolean;\n collapsibleSections?: boolean;\n cellWidth?: number;\n firstColumnWidth?: number;\n stickyHeaderTopOffset?: number;\n growContent?: boolean;\n classNameOverrides?: ClassNameOverrides;\n onSelectionChanged?: (selectedIndex: number) => void;\n}\n\nexport interface ClassNameOverrides {\n header?: string;\n container?: string;\n cell?: string;\n headerCell?: string;\n collapsibleSection?: string;\n section?: string;\n hideDetailsButton?: string;\n}\n\nconst ComparisonTable = <T extends { id: number }>(\n props: ComparisonTableProps<T>\n) => {\n const {\n headers,\n data,\n hideDetails,\n hideDetailsCaption = 'Hide details',\n showDetailsCaption = 'Show details',\n classNameOverrides,\n hideScrollBars,\n hideScrollBarsMobile = true,\n collapsibleSections,\n cellWidth,\n firstColumnWidth,\n stickyHeaderTopOffset,\n growContent,\n onSelectionChanged,\n } = props;\n\n const {\n headerWidth,\n headerId,\n contentContainerRef,\n selectedSection,\n setSelectedSection,\n selectedTabIndex,\n headerRefCallbackRef,\n handleArrowsClick,\n toggleMoreRows,\n showMore,\n } = useComparisonTable({ onSelectionChanged });\n\n const cssVariablesStyle = {\n '--tableWidth': `${headerWidth}px`,\n ...(cellWidth ? { '--cellWidth': `${cellWidth}px` } : {}),\n ...(firstColumnWidth\n ? { '--firstColumnWidth': `${firstColumnWidth}px` }\n : {}),\n ...(stickyHeaderTopOffset\n ? { '--stickyHeaderTopOffset': `${stickyHeaderTopOffset}px` }\n : {}),\n ...(growContent ? { '--growContent': '100%' } : {}),\n } as React.CSSProperties;\n\n return (\n <ScrollSync onSync={headerRefCallbackRef}>\n <div\n style={cssVariablesStyle}\n className={classNames({\n [baseStyles.noScrollBars]: hideScrollBars,\n [baseStyles.noScrollBarsMobile]: hideScrollBarsMobile,\n })}\n >\n <div\n id={headerId}\n className={classNames(baseStyles.header, classNameOverrides?.header)}\n >\n <ScrollSyncPane>\n <div className={classNames(baseStyles.container)}>\n <div className={classNames(baseStyles['overflow-container'])}>\n <div className={baseStyles['group-container']}>\n <TableArrows\n onClick={handleArrowsClick}\n active={{\n left: selectedTabIndex > 0,\n right: selectedTabIndex < data.length - 1,\n }}\n />\n <Row<T>\n key=\"table-header-row\"\n rowId=\"table-header-row\"\n cell={headers[0].cells[0]}\n data={data}\n isRowHeader\n cellClassName={classNameOverrides?.headerCell}\n />\n </div>\n </div>\n </div>\n </ScrollSyncPane>\n </div>\n <div ref={contentContainerRef}>\n {Array.isArray(headers) &&\n headers\n .filter(\n (headerGroup) => !hideDetails || showMore || headerGroup.default\n )\n .map((headerGroup, headerGroupIndex) => {\n const content = headerGroup.cells?.map((cell, index) => {\n const rowId = `${headerGroup.id}-${\n cell.key ?? 'addon'\n }-${index}`;\n\n /** Do not render the first row */\n if (index === 0 && headerGroupIndex === 0) return null;\n\n return (\n <Row<T>\n key={rowId}\n rowId={rowId}\n cell={cell}\n data={data}\n cellClassName={classNameOverrides?.cell}\n />\n );\n });\n\n const idString = `headerGroup-${headerGroup.id}`;\n\n return (\n <Fragment key={idString}>\n {headerGroup.label && collapsibleSections ? (\n <AccordionItem\n className={classNames(\n 'mt16',\n classNameOverrides?.collapsibleSection\n )}\n label={headerGroup.label}\n headerClassName=\"p24 br8\"\n isOpen={selectedSection === idString}\n onOpen={() => setSelectedSection(idString)}\n onClose={() => setSelectedSection('')}\n >\n <ScrollSyncPane>\n <div\n className={classNames(\n baseStyles.container,\n 'pb16',\n classNameOverrides?.container,\n {\n [baseStyles.noScrollBars]: hideScrollBars,\n }\n )}\n >\n <div\n className={classNames(\n baseStyles['overflow-container']\n )}\n >\n <div className={baseStyles['group-container']}>\n {content}\n </div>\n </div>\n </div>\n </ScrollSyncPane>\n </AccordionItem>\n ) : (\n <section\n key={idString}\n className={classNames(\n baseStyles.section,\n classNameOverrides?.section\n )}\n >\n <ScrollSyncPane>\n <div\n className={classNames(\n baseStyles.container,\n 'pb16',\n classNameOverrides?.container,\n {\n [baseStyles.noScrollBars]: hideScrollBars,\n }\n )}\n >\n <div\n className={classNames(\n baseStyles['overflow-container']\n )}\n >\n <div className={baseStyles['group-container']}>\n {\n /**\n * Print a table subheader if the `label` value is present\n */\n headerGroup.label && !collapsibleSections && (\n <div className={baseStyles['group-title']}>\n <h4\n className={`p-h4 ${baseStyles.sticky}`}\n >\n {headerGroup.label}\n </h4>\n </div>\n )\n }\n {content}\n </div>\n </div>\n </div>\n </ScrollSyncPane>\n </section>\n )}\n </Fragment>\n );\n })}\n {hideDetails && (\n <div\n className={classNames(\n baseStyles['show-details-container'],\n baseStyles.sticky,\n 'mt48'\n )}\n >\n <div>\n <button\n className={classNames(\n 'w100 d-flex p-a p-h4 c-pointer',\n baseStyles['show-details-button'],\n classNameOverrides?.hideDetailsButton\n )}\n onClick={toggleMoreRows}\n type=\"button\"\n >\n {showMore ? hideDetailsCaption : showDetailsCaption}\n <Chevron\n className={showMore ? '' : baseStyles['icon-inverted']}\n />\n </button>\n </div>\n </div>\n )}\n </div>\n </div>\n </ScrollSync>\n );\n};\n\nexport {\n ComparisonTable,\n TableButton,\n TableInfoButton,\n TableRating,\n TableRowHeader,\n TableTrueFalse,\n};\n"],"names":["debounce","_jsx","ScrollSync","_jsxs","ScrollSyncPane"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAM,kBAAkB,GAAG,UAAC,EAIlC;QAHC,kBAAkB,wBAAA;IAIZ,IAAA,KAA0B,QAAQ,CAAU,KAAK,CAAC,EAAjD,QAAQ,QAAA,EAAE,WAAW,QAA4B,CAAC;IACnD,IAAA,KAAgC,QAAQ,CAAC,IAAI,CAAC,EAA7C,WAAW,QAAA,EAAE,cAAc,QAAkB,CAAC;IAC/C,IAAA,KAA0C,QAAQ,CAAC,CAAC,CAAC,EAApD,gBAAgB,QAAA,EAAE,mBAAmB,QAAe,CAAC;IACtD,IAAA,KAAwC,QAAQ,CAAC,EAAE,CAAC,EAAnD,eAAe,QAAA,EAAE,kBAAkB,QAAgB,CAAC;IACrD,IAAA,KAA0B,QAAQ,CAAC,EAAE,CAAC,EAArC,QAAQ,QAA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"file":"index.js","sources":["../../../../../src/lib/components/comparisonTable/hooks/useComparisonTable.ts","../../../../../src/lib/components/comparisonTable/index.tsx"],"sourcesContent":["import debounce from 'lodash.debounce';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport generateId from '../../../util/generateId';\nimport { ArrowValues } from '../components/TableArrows';\n\nexport const useComparisonTable = ({\n onSelectionChanged,\n}: {\n onSelectionChanged?: (selectedIndex: number) => void;\n}) => {\n const [showMore, setShowMore] = useState<boolean>(false);\n const [headerWidth, setHeaderWidth] = useState(1400);\n const [selectedTabIndex, setSelectedTabIndex] = useState(0);\n const [selectedSection, setSelectedSection] = useState('');\n const [headerId, setHeaderId] = useState('');\n const headerRef = useRef<HTMLDivElement | null>(null);\n const contentContainerRef = useRef<HTMLDivElement | null>(null);\n const observerRef = useRef<ResizeObserver | null>(null);\n\n const headerRefCallbackRef = useCallback((node) => {\n if (node) {\n setHeaderWidth(node.clientWidth);\n }\n\n headerRef.current = node;\n }, []);\n\n useEffect(() => {\n if (!observerRef.current) {\n observerRef.current = new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n const currentTabIndex = Math.round(\n entry.target.scrollLeft / entry.contentRect.width\n );\n\n setHeaderWidth(entry.contentRect.width);\n\n // Update selectedTabIndex to match the calculated current tab index\n setSelectedTabIndex(currentTabIndex);\n });\n });\n }\n\n if (headerRef.current) {\n observerRef.current.observe(headerRef.current);\n }\n\n return () => {\n if (headerRef.current) {\n observerRef.current?.unobserve(headerRef.current);\n }\n observerRef.current?.disconnect();\n };\n }, []);\n\n useEffect(() => {\n const resetHeaderWidth = () => {\n if (headerRef.current) {\n setHeaderWidth(headerRef.current.clientWidth);\n }\n };\n\n window.addEventListener('resize', resetHeaderWidth);\n\n return () => window.removeEventListener('resize', resetHeaderWidth);\n }, []);\n\n const handleTableScroll = () => {\n if (!headerRef.current) {\n return;\n }\n\n const headerWidth = headerRef.current.getBoundingClientRect().width;\n\n const currentTabIndex = Math.round(\n headerRef.current.scrollLeft / headerWidth\n );\n\n setSelectedTabIndex(currentTabIndex);\n };\n\n const debouncedTableScroll = debounce(handleTableScroll, 150);\n\n useEffect(() => {\n headerRef.current?.addEventListener('scroll', debouncedTableScroll, {\n passive: true,\n });\n\n return headerRef.current?.removeEventListener('scroll', handleTableScroll);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleArrowsClick = (value: ArrowValues) => {\n if (headerRef.current) {\n const currentTabIndex = Math.round(\n headerRef.current.scrollLeft / headerRef.current.clientWidth\n );\n\n const direction = value === 'next' ? 1 : -1;\n\n const newTabIndex = currentTabIndex + direction;\n\n headerRef.current.scroll({\n top: 0,\n left: headerWidth * newTabIndex,\n behavior: 'smooth',\n });\n\n setSelectedTabIndex(() => {\n return newTabIndex;\n });\n }\n };\n\n const toggleMoreRows = async () => {\n setShowMore(!showMore);\n };\n\n useEffect(() => {\n if (headerRef.current) {\n return;\n }\n\n const headerById = document.getElementById(headerId);\n\n if (headerById) {\n headerRefCallbackRef(headerById);\n }\n }, [headerId, headerRefCallbackRef]);\n\n useEffect(() => {\n setHeaderId(generateId());\n }, []);\n\n useEffect(() => {\n onSelectionChanged?.(selectedTabIndex);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedTabIndex]);\n\n return {\n headerWidth,\n headerId,\n contentContainerRef,\n selectedSection,\n setSelectedSection,\n selectedTabIndex,\n setSelectedTabIndex,\n headerRefCallbackRef,\n handleArrowsClick,\n toggleMoreRows,\n showMore,\n };\n};\n","import classNames from 'classnames';\nimport { Fragment } from 'react';\nimport { ScrollSync, ScrollSyncPane } from 'react-scroll-sync';\n\nimport { AccordionItem } from './components/AccordionItem';\nimport Chevron from './components/Chevron';\nimport Row from './components/Row';\nimport TableArrows from './components/TableArrows';\nimport TableButton from './components/TableButton';\nimport TableInfoButton from './components/TableInfoButton';\nimport TableRating from './components/TableRating';\nimport TableRowHeader from './components/TableRowHeader';\nimport TableTrueFalse from './components/TableTrueFalse';\nimport { useComparisonTable } from './hooks/useComparisonTable';\nimport baseStyles from './style.module.scss';\n\nexport interface CellBaseProps<T> {\n /** Used to display the row's title */\n label?: React.ReactNode;\n /**\n *\n * @param value The current data value\n * @param element The complete data object\n */\n render?: (value: any, element: T) => React.ReactNode; // TODO: add typing to value param\n}\n\ninterface CellWithId<T> extends CellBaseProps<T> {\n /** Used when adding component add-ons */\n addonId: string | number;\n}\n\nexport type Cell<T> =\n | ({ key: Extract<keyof T, string> } & CellBaseProps<T>)\n | ({ key?: undefined } & CellWithId<T>);\n\nexport interface TableHeader<T> {\n /** Required unique id number for each table group */\n id: number;\n /** Used to display a table group subheader */\n label?: React.ReactNode;\n cells: Array<Cell<T>>;\n default?: boolean;\n}\n\nexport interface ComparisonTableProps<T> {\n headers: Array<TableHeader<T>>;\n data: Array<T>;\n hideDetails?: boolean;\n hideDetailsCaption?: string;\n showDetailsCaption?: string;\n hideScrollBars?: boolean;\n hideScrollBarsMobile?: boolean;\n collapsibleSections?: boolean;\n cellWidth?: number;\n firstColumnWidth?: number;\n stickyHeaderTopOffset?: number;\n growContent?: boolean;\n classNameOverrides?: ClassNameOverrides;\n onSelectionChanged?: (selectedIndex: number) => void;\n}\n\nexport interface ClassNameOverrides {\n header?: string;\n container?: string;\n cell?: string;\n headerCell?: string;\n collapsibleSection?: string;\n section?: string;\n hideDetailsButton?: string;\n}\n\nconst ComparisonTable = <T extends { id: number }>(\n props: ComparisonTableProps<T>\n) => {\n const {\n headers,\n data,\n hideDetails,\n hideDetailsCaption = 'Hide details',\n showDetailsCaption = 'Show details',\n classNameOverrides,\n hideScrollBars,\n hideScrollBarsMobile = true,\n collapsibleSections,\n cellWidth,\n firstColumnWidth,\n stickyHeaderTopOffset,\n growContent,\n onSelectionChanged,\n } = props;\n\n const {\n headerWidth,\n headerId,\n contentContainerRef,\n selectedSection,\n setSelectedSection,\n selectedTabIndex,\n headerRefCallbackRef,\n handleArrowsClick,\n toggleMoreRows,\n showMore,\n } = useComparisonTable({ onSelectionChanged });\n\n const cssVariablesStyle = {\n '--tableWidth': `${headerWidth}px`,\n ...(cellWidth ? { '--cellWidth': `${cellWidth}px` } : {}),\n ...(firstColumnWidth\n ? { '--firstColumnWidth': `${firstColumnWidth}px` }\n : {}),\n ...(stickyHeaderTopOffset\n ? { '--stickyHeaderTopOffset': `${stickyHeaderTopOffset}px` }\n : {}),\n ...(growContent ? { '--growContent': '100%' } : {}),\n } as React.CSSProperties;\n\n return (\n <ScrollSync onSync={headerRefCallbackRef}>\n <div\n style={cssVariablesStyle}\n className={classNames({\n [baseStyles.noScrollBars]: hideScrollBars,\n [baseStyles.noScrollBarsMobile]: hideScrollBarsMobile,\n })}\n >\n <div\n id={headerId}\n className={classNames(baseStyles.header, classNameOverrides?.header)}\n >\n <ScrollSyncPane>\n <div className={classNames(baseStyles.container)}>\n <div className={classNames(baseStyles['overflow-container'])}>\n <div className={baseStyles['group-container']}>\n <TableArrows\n onClick={handleArrowsClick}\n active={{\n left: selectedTabIndex > 0,\n right: selectedTabIndex < data.length - 1,\n }}\n />\n <Row<T>\n key=\"table-header-row\"\n rowId=\"table-header-row\"\n cell={headers[0].cells[0]}\n data={data}\n isRowHeader\n cellClassName={classNameOverrides?.headerCell}\n />\n </div>\n </div>\n </div>\n </ScrollSyncPane>\n </div>\n <div ref={contentContainerRef}>\n {Array.isArray(headers) &&\n headers\n .filter(\n (headerGroup) => !hideDetails || showMore || headerGroup.default\n )\n .map((headerGroup, headerGroupIndex) => {\n const content = headerGroup.cells?.map((cell, index) => {\n const rowId = `${headerGroup.id}-${\n cell.key ?? 'addon'\n }-${index}`;\n\n /** Do not render the first row */\n if (index === 0 && headerGroupIndex === 0) return null;\n\n return (\n <Row<T>\n key={rowId}\n rowId={rowId}\n cell={cell}\n data={data}\n cellClassName={classNameOverrides?.cell}\n />\n );\n });\n\n const idString = `headerGroup-${headerGroup.id}`;\n\n return (\n <Fragment key={idString}>\n {headerGroup.label && collapsibleSections ? (\n <AccordionItem\n className={classNames(\n 'mt16',\n classNameOverrides?.collapsibleSection\n )}\n label={headerGroup.label}\n headerClassName=\"p24 br8\"\n isOpen={selectedSection === idString}\n onOpen={() => setSelectedSection(idString)}\n onClose={() => setSelectedSection('')}\n >\n <ScrollSyncPane>\n <div\n className={classNames(\n baseStyles.container,\n 'pb16',\n classNameOverrides?.container,\n {\n [baseStyles.noScrollBars]: hideScrollBars,\n }\n )}\n >\n <div\n className={classNames(\n baseStyles['overflow-container']\n )}\n >\n <div className={baseStyles['group-container']}>\n {content}\n </div>\n </div>\n </div>\n </ScrollSyncPane>\n </AccordionItem>\n ) : (\n <section\n key={idString}\n className={classNames(\n baseStyles.section,\n classNameOverrides?.section\n )}\n >\n <ScrollSyncPane>\n <div\n className={classNames(\n baseStyles.container,\n 'pb16',\n classNameOverrides?.container,\n {\n [baseStyles.noScrollBars]: hideScrollBars,\n }\n )}\n >\n <div\n className={classNames(\n baseStyles['overflow-container']\n )}\n >\n <div className={baseStyles['group-container']}>\n {\n /**\n * Print a table subheader if the `label` value is present\n */\n headerGroup.label && !collapsibleSections && (\n <div className={baseStyles['group-title']}>\n <h4\n className={`p-h4 ${baseStyles.sticky}`}\n >\n {headerGroup.label}\n </h4>\n </div>\n )\n }\n {content}\n </div>\n </div>\n </div>\n </ScrollSyncPane>\n </section>\n )}\n </Fragment>\n );\n })}\n {hideDetails && (\n <div\n className={classNames(\n baseStyles['show-details-container'],\n baseStyles.sticky,\n 'mt48'\n )}\n >\n <div>\n <button\n className={classNames(\n 'w100 d-flex p-h4 c-pointer',\n baseStyles['show-details-button'],\n classNameOverrides?.hideDetailsButton\n )}\n onClick={toggleMoreRows}\n type=\"button\"\n >\n {showMore ? hideDetailsCaption : showDetailsCaption}\n <Chevron\n className={showMore ? '' : baseStyles['icon-inverted']}\n />\n </button>\n </div>\n </div>\n )}\n </div>\n </div>\n </ScrollSync>\n );\n};\n\nexport {\n ComparisonTable,\n TableButton,\n TableInfoButton,\n TableRating,\n TableRowHeader,\n TableTrueFalse,\n};\n"],"names":["debounce","_js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Y,QAAQ,CAkFZ,EACX;6BACH,CAAC,EACL,WAAW,KACVA,aACE,SAAS,EAAE,UAAU,CACnB,UAAU,CAAC,wBAAwB,CAAC,EACpC,UAAU,CAAC,MAAM,EACjB,MAAM,CACP,YAEDA,uBACEE,iBACE,SAAS,EAAE,UAAU,CACnB,4BAA4B,EAC5B,UAAU,CAAC,qBAAqB,CAAC,EACjC,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,iBAAiB,CACtC,EACD,OAAO,EAAE,cAAc,EACvB,IAAI,EAAC,QAAQ,aAEZ,QAAQ,GAAG,kBAAkB,GAAG,kBAAkB,EACnDF,IAAC,OAAO,IACN,SAAS,EAAE,QAAQ,GAAG,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,GACtD,IACK,GACL,GACF,CACP,IACG,IACF,GACK,EACb;AACJ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { C as Calendar } from '../../../Calendar-
|
|
3
|
+
export { C as Calendar } from '../../../Calendar-5ad3eccf.js';
|
|
4
4
|
import '../../icon/icons/Calendar.js';
|
|
5
5
|
import '../../button/index.js';
|
|
6
6
|
import '../../../_commonjsHelpers-4730bd53.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as __assign } from '../../tslib.es6-a39f91fc.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState, useEffect } from 'react';
|
|
4
|
-
import { a as dayjs, C as Calendar } from '../../Calendar-
|
|
4
|
+
import { a as dayjs, C as Calendar } from '../../Calendar-5ad3eccf.js';
|
|
5
5
|
import { c as commonjsGlobal } from '../../_commonjsHelpers-4730bd53.js';
|
|
6
6
|
import { s as styleInject } from '../../style-inject.es-1f59c1d0.js';
|
|
7
7
|
import { Input } from '../input/index.js';
|
|
@@ -2,7 +2,7 @@ import { jsx, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { DateSelector } from './index.js';
|
|
4
4
|
import { c as commonjsGlobal } from '../../_commonjsHelpers-4730bd53.js';
|
|
5
|
-
import { d as dayjs_min } from '../../Calendar-
|
|
5
|
+
import { d as dayjs_min } from '../../Calendar-5ad3eccf.js';
|
|
6
6
|
import '../../tslib.es6-a39f91fc.js';
|
|
7
7
|
import '../../style-inject.es-1f59c1d0.js';
|
|
8
8
|
import '../input/index.js';
|
|
@@ -6,7 +6,7 @@ import 'react';
|
|
|
6
6
|
import 'react-dom';
|
|
7
7
|
import '../../_commonjsHelpers-4730bd53.js';
|
|
8
8
|
import 'react-dom/test-utils';
|
|
9
|
-
import '../../Calendar-
|
|
9
|
+
import '../../Calendar-5ad3eccf.js';
|
|
10
10
|
import '../icon/icons/Calendar.js';
|
|
11
11
|
import '../icon/IconWrapper/IconWrapper.js';
|
|
12
12
|
import '../../index-6ea95111.js';
|
|
@@ -5,9 +5,9 @@ import '../../../tslib.es6-a39f91fc.js';
|
|
|
5
5
|
import '../../../index-6ea95111.js';
|
|
6
6
|
import '../../../style-inject.es-1f59c1d0.js';
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var BasketballSportsIcon = (function (props) {
|
|
9
9
|
return createElement(IconWrapper, props, jsx("circle", { cx: 12, cy: 12, r: 10, stroke: "currentColor", strokeWidth: 2 }), jsx("path", { stroke: "currentColor", strokeWidth: 2, d: "M13.5 2.5c0 6.075-4.925 11-11 11M10 21c0-6.075 4.925-11 11-11" }), jsx("path", { stroke: "currentColor", strokeWidth: 2, d: "M3 7c7.732 0 14 6.268 14 14" }));
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
export default
|
|
12
|
+
export default BasketballSportsIcon;
|
|
13
13
|
//# sourceMappingURL=BasketballSports.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasketballSports.js","sources":["../../../../../../src/lib/components/icon/icons/BasketballSports.tsx"],"sourcesContent":["/* Generated file. Do not modify. */\nimport { createElement } from 'react';\nimport { IconWrapper } from '../IconWrapper';\nimport type { IconWrapperProps } from '../IconWrapper';\nexport default (props: IconWrapperProps) =>\n createElement(\n IconWrapper,\n props,\n <circle cx={12} cy={12} r={10} stroke=\"currentColor\" strokeWidth={2} />,\n <path\n stroke=\"currentColor\"\n strokeWidth={2}\n d=\"M13.5 2.5c0 6.075-4.925 11-11 11M10 21c0-6.075 4.925-11 11-11\"\n />,\n <path\n stroke=\"currentColor\"\n strokeWidth={2}\n d=\"M3 7c7.732 0 14 6.268 14 14\"\n />\n );\n"],"names":["_jsx"],"mappings":";;;;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"BasketballSports.js","sources":["../../../../../../src/lib/components/icon/icons/BasketballSports.tsx"],"sourcesContent":["/* Generated file. Do not modify. */\nimport { createElement } from 'react';\nimport { IconWrapper } from '../IconWrapper';\nimport type { IconWrapperProps } from '../IconWrapper';\nexport default (props: IconWrapperProps) =>\n createElement(\n IconWrapper,\n props,\n <circle cx={12} cy={12} r={10} stroke=\"currentColor\" strokeWidth={2} />,\n <path\n stroke=\"currentColor\"\n strokeWidth={2}\n d=\"M13.5 2.5c0 6.075-4.925 11-11 11M10 21c0-6.075 4.925-11 11-11\"\n />,\n <path\n stroke=\"currentColor\"\n strokeWidth={2}\n d=\"M3 7c7.732 0 14 6.268 14 14\"\n />\n );\n"],"names":["_jsx"],"mappings":";;;;;;;AAIA,4BAAe,UAAC,KAAuB;IACrC,OAAA,aAAa,CACX,WAAW,EACX,KAAK,EACLA,gBAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAC,cAAc,EAAC,WAAW,EAAE,CAAC,GAAI,EACvEA,cACE,MAAM,EAAC,cAAc,EACrB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,+DAA+D,GACjE,EACFA,cACE,MAAM,EAAC,cAAc,EACrB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,6BAA6B,GAC/B,CACH;AAdD,CAcC;;;;"}
|
|
@@ -5,9 +5,9 @@ import '../../../tslib.es6-a39f91fc.js';
|
|
|
5
5
|
import '../../../index-6ea95111.js';
|
|
6
6
|
import '../../../style-inject.es-1f59c1d0.js';
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var BookOpenIcon = (function (props) {
|
|
9
9
|
return createElement(IconWrapper, props, jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 7a4 4 0 0 0-4-4H2v15h7a3 3 0 0 1 3 3m0-14v14m0-14a4 4 0 0 1 4-4h6v15h-7a3 3 0 0 0-3 3" }));
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
export default
|
|
12
|
+
export default BookOpenIcon;
|
|
13
13
|
//# sourceMappingURL=BookOpen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookOpen.js","sources":["../../../../../../src/lib/components/icon/icons/BookOpen.tsx"],"sourcesContent":["/* Generated file. Do not modify. */\nimport { createElement } from 'react';\nimport { IconWrapper } from '../IconWrapper';\nimport type { IconWrapperProps } from '../IconWrapper';\nexport default (props: IconWrapperProps) =>\n createElement(\n IconWrapper,\n props,\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 7a4 4 0 0 0-4-4H2v15h7a3 3 0 0 1 3 3m0-14v14m0-14a4 4 0 0 1 4-4h6v15h-7a3 3 0 0 0-3 3\"\n />\n );\n"],"names":["_jsx"],"mappings":";;;;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"BookOpen.js","sources":["../../../../../../src/lib/components/icon/icons/BookOpen.tsx"],"sourcesContent":["/* Generated file. Do not modify. */\nimport { createElement } from 'react';\nimport { IconWrapper } from '../IconWrapper';\nimport type { IconWrapperProps } from '../IconWrapper';\nexport default (props: IconWrapperProps) =>\n createElement(\n IconWrapper,\n props,\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 7a4 4 0 0 0-4-4H2v15h7a3 3 0 0 1 3 3m0-14v14m0-14a4 4 0 0 1 4-4h6v15h-7a3 3 0 0 0-3 3\"\n />\n );\n"],"names":["_jsx"],"mappings":";;;;;;;AAIA,oBAAe,UAAC,KAAuB;IACrC,OAAA,aAAa,CACX,WAAW,EACX,KAAK,EACLA,cACE,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,2FAA2F,GAC7F,CACH;AAVD,CAUC;;;;"}
|
|
@@ -5,9 +5,9 @@ import '../../../tslib.es6-a39f91fc.js';
|
|
|
5
5
|
import '../../../index-6ea95111.js';
|
|
6
6
|
import '../../../style-inject.es-1f59c1d0.js';
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var HeartIcon = (function (props) {
|
|
9
9
|
return createElement(IconWrapper, props, jsx("path", { stroke: "currentColor", strokeWidth: 2, d: "M17.388 2.698c-2.717 0-4.207 1.687-5.388 2.856-1.181-1.17-2.67-2.856-5.388-2.856-2.717 0-5.527 2.563-5.387 6.226 0 5.2 7.045 9.778 10.775 12.378 3.73-2.6 10.775-7.178 10.775-12.378.14-3.663-2.67-6.226-5.387-6.226Z" }));
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
export default
|
|
12
|
+
export default HeartIcon;
|
|
13
13
|
//# sourceMappingURL=Heart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heart.js","sources":["../../../../../../src/lib/components/icon/icons/Heart.tsx"],"sourcesContent":["/* Generated file. Do not modify. */\nimport { createElement } from 'react';\nimport { IconWrapper } from '../IconWrapper';\nimport type { IconWrapperProps } from '../IconWrapper';\nexport default (props: IconWrapperProps) =>\n createElement(\n IconWrapper,\n props,\n <path\n stroke=\"currentColor\"\n strokeWidth={2}\n d=\"M17.388 2.698c-2.717 0-4.207 1.687-5.388 2.856-1.181-1.17-2.67-2.856-5.388-2.856-2.717 0-5.527 2.563-5.387 6.226 0 5.2 7.045 9.778 10.775 12.378 3.73-2.6 10.775-7.178 10.775-12.378.14-3.663-2.67-6.226-5.387-6.226Z\"\n />\n );\n"],"names":["_jsx"],"mappings":";;;;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"Heart.js","sources":["../../../../../../src/lib/components/icon/icons/Heart.tsx"],"sourcesContent":["/* Generated file. Do not modify. */\nimport { createElement } from 'react';\nimport { IconWrapper } from '../IconWrapper';\nimport type { IconWrapperProps } from '../IconWrapper';\nexport default (props: IconWrapperProps) =>\n createElement(\n IconWrapper,\n props,\n <path\n stroke=\"currentColor\"\n strokeWidth={2}\n d=\"M17.388 2.698c-2.717 0-4.207 1.687-5.388 2.856-1.181-1.17-2.67-2.856-5.388-2.856-2.717 0-5.527 2.563-5.387 6.226 0 5.2 7.045 9.778 10.775 12.378 3.73-2.6 10.775-7.178 10.775-12.378.14-3.663-2.67-6.226-5.387-6.226Z\"\n />\n );\n"],"names":["_jsx"],"mappings":";;;;;;;AAIA,iBAAe,UAAC,KAAuB;IACrC,OAAA,aAAa,CACX,WAAW,EACX,KAAK,EACLA,cACE,MAAM,EAAC,cAAc,EACrB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,uNAAuN,GACzN,CACH;AARD,CAQC;;;;"}
|
|
@@ -5,9 +5,9 @@ import '../../../tslib.es6-a39f91fc.js';
|
|
|
5
5
|
import '../../../index-6ea95111.js';
|
|
6
6
|
import '../../../style-inject.es-1f59c1d0.js';
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var InfoIcon = (function (props) {
|
|
9
9
|
return createElement(IconWrapper, props, jsx("path", { fill: "currentColor", d: "M11 16v1h2v-1h-2Zm2-8.041a1 1 0 1 0-2 0h2Zm-2 .04a1 1 0 1 0 2 0h-2ZM23 12c0-6.075-4.925-11-11-11v2a9 9 0 0 1 9 9h2ZM12 1C5.925 1 1 5.925 1 12h2a9 9 0 0 1 9-9V1ZM1 12c0 6.075 4.925 11 11 11v-2a9 9 0 0 1-9-9H1Zm11 11c6.075 0 11-4.925 11-11h-2a9 9 0 0 1-9 9v2Zm1-7v-5.5h-2V16h2Zm-2-8.041v.04h2v-.04h-2Z" }));
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
export default
|
|
12
|
+
export default InfoIcon;
|
|
13
13
|
//# sourceMappingURL=Info.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Info.js","sources":["../../../../../../src/lib/components/icon/icons/Info.tsx"],"sourcesContent":["/* Generated file. Do not modify. */\nimport { createElement } from 'react';\nimport { IconWrapper } from '../IconWrapper';\nimport type { IconWrapperProps } from '../IconWrapper';\nexport default (props: IconWrapperProps) =>\n createElement(\n IconWrapper,\n props,\n <path\n fill=\"currentColor\"\n d=\"M11 16v1h2v-1h-2Zm2-8.041a1 1 0 1 0-2 0h2Zm-2 .04a1 1 0 1 0 2 0h-2ZM23 12c0-6.075-4.925-11-11-11v2a9 9 0 0 1 9 9h2ZM12 1C5.925 1 1 5.925 1 12h2a9 9 0 0 1 9-9V1ZM1 12c0 6.075 4.925 11 11 11v-2a9 9 0 0 1-9-9H1Zm11 11c6.075 0 11-4.925 11-11h-2a9 9 0 0 1-9 9v2Zm1-7v-5.5h-2V16h2Zm-2-8.041v.04h2v-.04h-2Z\"\n />\n );\n"],"names":["_jsx"],"mappings":";;;;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"Info.js","sources":["../../../../../../src/lib/components/icon/icons/Info.tsx"],"sourcesContent":["/* Generated file. Do not modify. */\nimport { createElement } from 'react';\nimport { IconWrapper } from '../IconWrapper';\nimport type { IconWrapperProps } from '../IconWrapper';\nexport default (props: IconWrapperProps) =>\n createElement(\n IconWrapper,\n props,\n <path\n fill=\"currentColor\"\n d=\"M11 16v1h2v-1h-2Zm2-8.041a1 1 0 1 0-2 0h2Zm-2 .04a1 1 0 1 0 2 0h-2ZM23 12c0-6.075-4.925-11-11-11v2a9 9 0 0 1 9 9h2ZM12 1C5.925 1 1 5.925 1 12h2a9 9 0 0 1 9-9V1ZM1 12c0 6.075 4.925 11 11 11v-2a9 9 0 0 1-9-9H1Zm11 11c6.075 0 11-4.925 11-11h-2a9 9 0 0 1-9 9v2Zm1-7v-5.5h-2V16h2Zm-2-8.041v.04h2v-.04h-2Z\"\n />\n );\n"],"names":["_jsx"],"mappings":";;;;;;;AAIA,gBAAe,UAAC,KAAuB;IACrC,OAAA,aAAa,CACX,WAAW,EACX,KAAK,EACLA,cACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,6SAA6S,GAC/S,CACH;AAPD,CAOC;;;;"}
|