@popsure/dirty-swan 0.54.2 → 0.54.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/cjs/index.js +355 -262
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/lib/components/table/components/TableCell/BaseCell/BaseCell.d.ts +17 -0
  4. package/dist/cjs/lib/components/table/components/TableCell/BaseCell/BaseCell.stories.d.ts +22 -0
  5. package/dist/cjs/lib/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.d.ts +3 -0
  6. package/dist/cjs/lib/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.stories.d.ts +25 -0
  7. package/dist/cjs/lib/components/table/components/TableCell/ButtonCell/ButtonCell.d.ts +9 -0
  8. package/dist/cjs/lib/components/table/components/TableCell/ButtonCell/ButtonCell.stories.d.ts +17 -0
  9. package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +10 -0
  10. package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +18 -0
  11. package/dist/cjs/lib/components/table/components/TableCell/TableCell.d.ts +5 -17
  12. package/dist/cjs/lib/components/table/types.d.ts +19 -2
  13. package/dist/cjs/lib/components/table/utils/useTableNavigation/useTableNavigation.d.ts +1 -2
  14. package/dist/esm/TableSection-f6d0028e.js +80 -0
  15. package/dist/esm/TableSection-f6d0028e.js.map +1 -0
  16. package/dist/esm/components/cards/card/index.stories.js +2 -2
  17. package/dist/esm/components/cards/card/index.stories.js.map +1 -1
  18. package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js +2 -2
  19. package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js.map +1 -1
  20. package/dist/esm/components/comparisonTable/index.js +3 -1526
  21. package/dist/esm/components/comparisonTable/index.js.map +1 -1
  22. package/dist/esm/components/comparisonTable/index.stories.js +1 -0
  23. package/dist/esm/components/comparisonTable/index.stories.js.map +1 -1
  24. package/dist/esm/components/icon/icons/Info.js +2 -2
  25. package/dist/esm/components/icon/icons/Info.js.map +1 -1
  26. package/dist/esm/components/icon/icons.stories.js +1 -1
  27. package/dist/esm/components/icon/index.stories.js +1 -1
  28. package/dist/esm/components/table/Table.js +22 -13
  29. package/dist/esm/components/table/Table.js.map +1 -1
  30. package/dist/esm/components/table/Table.stories.js +100 -32
  31. package/dist/esm/components/table/Table.stories.js.map +1 -1
  32. package/dist/esm/components/table/Table.test.js +15 -12
  33. package/dist/esm/components/table/Table.test.js.map +1 -1
  34. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js +50 -0
  35. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js.map +1 -0
  36. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.stories.js +43 -0
  37. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.stories.js.map +1 -0
  38. package/dist/esm/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.js +15 -0
  39. package/dist/esm/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.js.map +1 -0
  40. package/dist/esm/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.stories.js +31 -0
  41. package/dist/esm/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.stories.js.map +1 -0
  42. package/dist/esm/components/table/components/TableCell/ButtonCell/ButtonCell.js +23 -0
  43. package/dist/esm/components/table/components/TableCell/ButtonCell/ButtonCell.js.map +1 -0
  44. package/dist/esm/components/table/components/TableCell/ButtonCell/ButtonCell.stories.js +28 -0
  45. package/dist/esm/components/table/components/TableCell/ButtonCell/ButtonCell.stories.js.map +1 -0
  46. package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js +21 -0
  47. package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js.map +1 -0
  48. package/dist/esm/components/table/components/TableCell/CTACell/CTACell.stories.js +26 -0
  49. package/dist/esm/components/table/components/TableCell/CTACell/CTACell.stories.js.map +1 -0
  50. package/dist/esm/components/table/components/TableCell/TableCell.js +24 -20
  51. package/dist/esm/components/table/components/TableCell/TableCell.js.map +1 -1
  52. package/dist/esm/components/table/components/TableCell/TableCell.test.js +26 -14
  53. package/dist/esm/components/table/components/TableCell/TableCell.test.js.map +1 -1
  54. package/dist/esm/components/table/components/TableContents/TableContents.js +11 -3
  55. package/dist/esm/components/table/components/TableContents/TableContents.js.map +1 -1
  56. package/dist/esm/components/table/components/TableContents/TableContents.test.js +14 -7
  57. package/dist/esm/components/table/components/TableContents/TableContents.test.js.map +1 -1
  58. package/dist/esm/components/table/components/TableSection/TableSection.js +17 -53
  59. package/dist/esm/components/table/components/TableSection/TableSection.js.map +1 -1
  60. package/dist/esm/components/table/components/TableSection/TableSection.test.js +12 -5
  61. package/dist/esm/components/table/components/TableSection/TableSection.test.js.map +1 -1
  62. package/dist/esm/components/table/utils/useTableNavigation/useTableNavigation.test.js +1 -5
  63. package/dist/esm/components/table/utils/useTableNavigation/useTableNavigation.test.js.map +1 -1
  64. package/dist/esm/index-3d286178.js +1529 -0
  65. package/dist/esm/index-3d286178.js.map +1 -0
  66. package/dist/esm/{index-0bb5a2ee.js → index-7506ae25.js} +3 -3
  67. package/dist/esm/{index-0bb5a2ee.js.map → index-7506ae25.js.map} +1 -1
  68. package/dist/esm/index.js +7 -2
  69. package/dist/esm/index.js.map +1 -1
  70. package/dist/esm/lib/components/table/components/TableCell/BaseCell/BaseCell.d.ts +17 -0
  71. package/dist/esm/lib/components/table/components/TableCell/BaseCell/BaseCell.stories.d.ts +22 -0
  72. package/dist/esm/lib/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.d.ts +3 -0
  73. package/dist/esm/lib/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.stories.d.ts +25 -0
  74. package/dist/esm/lib/components/table/components/TableCell/ButtonCell/ButtonCell.d.ts +9 -0
  75. package/dist/esm/lib/components/table/components/TableCell/ButtonCell/ButtonCell.stories.d.ts +17 -0
  76. package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +10 -0
  77. package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +18 -0
  78. package/dist/esm/lib/components/table/components/TableCell/TableCell.d.ts +5 -17
  79. package/dist/esm/lib/components/table/types.d.ts +19 -2
  80. package/dist/esm/lib/components/table/utils/useTableNavigation/useTableNavigation.d.ts +1 -2
  81. package/dist/esm/{useTableNavigation-8e50b121.js → useTableNavigation-2899712c.js} +12 -16
  82. package/dist/esm/useTableNavigation-2899712c.js.map +1 -0
  83. package/package.json +1 -1
  84. package/src/lib/components/table/Table.stories.tsx +87 -25
  85. package/src/lib/components/table/Table.test.tsx +3 -6
  86. package/src/lib/components/table/Table.tsx +11 -9
  87. package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.module.scss +36 -0
  88. package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.stories.tsx +45 -0
  89. package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.tsx +158 -0
  90. package/src/lib/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.module.scss +44 -0
  91. package/src/lib/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.stories.tsx +29 -0
  92. package/src/lib/components/table/components/TableCell/BaseCell/MiniProgressBar/MiniProgressBar.tsx +35 -0
  93. package/src/lib/components/table/components/TableCell/ButtonCell/ButtonCell.module.scss +43 -0
  94. package/src/lib/components/table/components/TableCell/ButtonCell/ButtonCell.stories.tsx +65 -0
  95. package/src/lib/components/table/components/TableCell/ButtonCell/ButtonCell.tsx +40 -0
  96. package/src/lib/components/table/components/TableCell/CTACell/CTACell.module.scss +3 -0
  97. package/src/lib/components/table/components/TableCell/CTACell/CTACell.stories.tsx +37 -0
  98. package/src/lib/components/table/components/TableCell/CTACell/CTACell.tsx +42 -0
  99. package/src/lib/components/table/components/TableCell/TableCell.module.scss +0 -43
  100. package/src/lib/components/table/components/TableCell/TableCell.test.tsx +26 -13
  101. package/src/lib/components/table/components/TableCell/TableCell.tsx +20 -122
  102. package/src/lib/components/table/components/TableContents/TableContents.test.tsx +6 -6
  103. package/src/lib/components/table/components/TableSection/TableSection.test.tsx +5 -5
  104. package/src/lib/components/table/components/TableSection/TableSection.tsx +67 -41
  105. package/src/lib/components/table/types.ts +16 -2
  106. package/src/lib/components/table/utils/useTableNavigation/useTableNavigation.test.tsx +0 -4
  107. package/src/lib/components/table/utils/useTableNavigation/useTableNavigation.ts +13 -20
  108. package/dist/esm/useTableNavigation-8e50b121.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ export type FontVariant = 'NORMAL' | 'BIG_WITH_UNDERLINE' | 'PRICE';
3
+ export type Alignment = 'center' | 'left' | 'right';
4
+ export type BaseCellProps = {
5
+ align?: Alignment;
6
+ checkmarkValue?: boolean;
7
+ fontVariant?: FontVariant;
8
+ description?: ReactNode;
9
+ modalContent?: ReactNode;
10
+ openModal?: (modalContent: ReactNode) => void;
11
+ text?: ReactNode;
12
+ rating?: {
13
+ value: number;
14
+ type: 'zap' | 'star';
15
+ };
16
+ };
17
+ export declare const BaseCell: ({ align, checkmarkValue, fontVariant, description, modalContent, openModal, rating, text, }: BaseCellProps) => JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { BaseCell } from './BaseCell';
2
+ declare const story: {
3
+ title: string;
4
+ component: ({ align, checkmarkValue, fontVariant, description, modalContent, openModal, rating, text, }: import("./BaseCell").BaseCellProps) => JSX.Element;
5
+ argTypes: {};
6
+ args: {
7
+ text: string;
8
+ description: string;
9
+ modalContent: string;
10
+ fontVariant: string;
11
+ checkmarkValue: undefined;
12
+ rating: {
13
+ value: number;
14
+ type: string;
15
+ };
16
+ };
17
+ };
18
+ export declare const BaseCellStory: {
19
+ ({ text, description, modalContent, checkmarkValue, rating, fontVariant, align, }: React.ComponentProps<typeof BaseCell>): JSX.Element;
20
+ storyName: string;
21
+ };
22
+ export default story;
@@ -0,0 +1,3 @@
1
+ export declare const MiniProgressBar: ({ nFilledBars }: {
2
+ nFilledBars: number;
3
+ }) => JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { MiniProgressBar } from './MiniProgressBar';
2
+ declare const story: {
3
+ title: string;
4
+ component: ({ nFilledBars }: {
5
+ nFilledBars: number;
6
+ }) => JSX.Element;
7
+ argTypes: {
8
+ nFilledBars: {
9
+ description: string;
10
+ control: {
11
+ min: number;
12
+ max: number;
13
+ type: string;
14
+ };
15
+ };
16
+ };
17
+ args: {
18
+ nFilledBars: number;
19
+ };
20
+ };
21
+ export declare const MiniProgressBarStory: {
22
+ ({ nFilledBars, }: React.ComponentProps<typeof MiniProgressBar>): JSX.Element;
23
+ storyName: string;
24
+ };
25
+ export default story;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export type ButtonCellProps = {
3
+ buttonCaption: ReactNode;
4
+ disabled?: boolean;
5
+ isSelected?: boolean;
6
+ onClick: () => void;
7
+ price?: ReactNode;
8
+ };
9
+ export declare const ButtonCell: ({ isSelected, onClick, buttonCaption, price, disabled, }: ButtonCellProps) => JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { ButtonCell } from './ButtonCell';
2
+ declare const story: {
3
+ title: string;
4
+ component: ({ isSelected, onClick, buttonCaption, price, disabled, }: import("./ButtonCell").ButtonCellProps) => JSX.Element;
5
+ argTypes: {};
6
+ args: {
7
+ buttonCaption: string;
8
+ price: string;
9
+ isSelected: boolean;
10
+ disabled: boolean;
11
+ };
12
+ };
13
+ export declare const ButtonCellStory: {
14
+ ({ isSelected, buttonCaption, price, disabled, }: React.ComponentProps<typeof ButtonCell>): JSX.Element;
15
+ storyName: string;
16
+ };
17
+ export default story;
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export type CTACellProps = {
3
+ title: ReactNode;
4
+ price?: ReactNode;
5
+ buttonCaption?: ReactNode;
6
+ grey?: boolean;
7
+ narrow?: boolean;
8
+ href: string;
9
+ };
10
+ export declare const CTACell: ({ title, price, grey, narrow, href, buttonCaption, }: CTACellProps) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { CTACell } from './CTACell';
2
+ declare const story: {
3
+ title: string;
4
+ component: ({ title, price, grey, narrow, href, buttonCaption, }: import("./CTACell").CTACellProps) => JSX.Element;
5
+ argTypes: {};
6
+ args: {
7
+ title: string;
8
+ price: string;
9
+ buttonCaption: string;
10
+ grey: boolean;
11
+ narrow: boolean;
12
+ };
13
+ };
14
+ export declare const CTACellStory: {
15
+ ({ title, price, buttonCaption, grey, narrow, }: React.ComponentProps<typeof CTACell>): JSX.Element;
16
+ storyName: string;
17
+ };
18
+ export default story;
@@ -1,22 +1,10 @@
1
- import { ReactNode } from 'react';
2
- interface BaseTableCellProps {
3
- align?: 'center' | 'left' | 'right';
4
- checkmarkValue?: boolean;
5
- content?: ReactNode;
6
- modalContent?: ReactNode;
7
- openModal?: (modalContent: ReactNode) => void;
8
- subContent?: ReactNode;
9
- rating?: {
10
- value: number;
11
- type: 'zap' | 'star';
12
- };
13
- }
14
- interface PositionalTableCellProps {
1
+ import { TableCellData } from '../../types';
2
+ type PositionalTableCellProps = {
15
3
  isHeader?: boolean;
16
4
  isFirstCellInRow?: boolean;
17
5
  isTopLeftCell?: boolean;
18
6
  isNavigation?: boolean;
19
- }
20
- export type TableCellProps = BaseTableCellProps & PositionalTableCellProps;
21
- declare const TableCell: ({ align, checkmarkValue, content, isFirstCellInRow, isHeader, isNavigation, isTopLeftCell, modalContent, openModal, rating, subContent, }: TableCellProps) => JSX.Element;
7
+ };
8
+ export type TableCellProps = TableCellData & PositionalTableCellProps;
9
+ declare const TableCell: ({ isFirstCellInRow, isHeader, isNavigation, isTopLeftCell, ...cellProps }: TableCellProps) => JSX.Element;
22
10
  export { TableCell };
@@ -1,5 +1,21 @@
1
1
  import { ReactNode } from 'react';
2
- import type { TableCellProps } from './components/TableCell/TableCell';
2
+ import { BaseCellProps } from './components/TableCell/BaseCell/BaseCell';
3
+ import { CTACellProps } from './components/TableCell/CTACell/CTACell';
4
+ import { ButtonCellProps } from './components/TableCell/ButtonCell/ButtonCell';
5
+ type BaseCellData = BaseCellProps & {
6
+ type?: undefined;
7
+ cellId?: string;
8
+ };
9
+ type CTACellData = CTACellProps & {
10
+ type: 'CTA';
11
+ cellId?: string;
12
+ };
13
+ type ButtonCellData = ButtonCellProps & {
14
+ type: 'BUTTON';
15
+ cellId?: string;
16
+ };
17
+ export type TableCellData = BaseCellData | CTACellData | ButtonCellData;
18
+ export declare const isBaseCell: (tableCellData: TableCellData) => tableCellData is BaseCellData;
3
19
  export type TableSectionType = {
4
20
  title?: string;
5
21
  icon?: ReactNode;
@@ -8,10 +24,11 @@ export type ModalData = {
8
24
  title?: ReactNode;
9
25
  body?: ReactNode;
10
26
  };
11
- export type TableCellRowData = TableCellProps[];
27
+ export type TableCellRowData = TableCellData[];
12
28
  export type TableSectionData = {
13
29
  section?: TableSectionType;
14
30
  rows: TableCellRowData[];
15
31
  };
16
32
  export type TableData = TableSectionData[];
17
33
  export type ModalFunction = (modalData: ModalData) => void;
34
+ export {};
@@ -5,9 +5,8 @@ interface UseTableNavigationReturn {
5
5
  }
6
6
  interface UseTableNavigationProps {
7
7
  containerRef: React.RefObject<HTMLElement>;
8
- columnsLength: number;
9
8
  enabled?: boolean;
10
9
  onSelectionChanged?: (index: number) => void;
11
10
  }
12
- export declare const useTableNavigation: ({ enabled, containerRef, columnsLength, onSelectionChanged }: UseTableNavigationProps) => UseTableNavigationReturn;
11
+ export declare const useTableNavigation: ({ enabled, containerRef, onSelectionChanged }: UseTableNavigationProps) => UseTableNavigationReturn;
13
12
  export {};
@@ -0,0 +1,80 @@
1
+ import { a as __assign } from './tslib.es6-a39f91fc.js';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { c as classNames } from './index-6ea95111.js';
4
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
5
+ import { TableCell } from './components/table/components/TableCell/TableCell.js';
6
+
7
+ var css_248z = ".TableSection-module_table__sNbDq {\n border-collapse: collapse;\n table-layout: fixed;\n}\n@media (min-width: 34rem) {\n .TableSection-module_table__sNbDq {\n min-width: 845px;\n }\n}\n\n.TableSection-module_tr__UbkbE {\n min-height: 72px;\n}";
8
+ var styles = {"table":"TableSection-module_table__sNbDq","tr":"TableSection-module_tr__UbkbE"};
9
+ styleInject(css_248z);
10
+
11
+ var isBaseCell = function (tableCellData) {
12
+ return !tableCellData.type;
13
+ };
14
+
15
+ var TableSection = function (_a) {
16
+ var className = _a.className, tableCellRows = _a.tableCellRows, hideHeader = _a.hideHeader, openModal = _a.openModal, title = _a.title, width = _a.width;
17
+ var headerRow = tableCellRows === null || tableCellRows === void 0 ? void 0 : tableCellRows[0];
18
+ var getModalTitleFromColumnHeader = function (cellIndex) {
19
+ var _a;
20
+ var firstCellInColumn = (_a = tableCellRows === null || tableCellRows === void 0 ? void 0 : tableCellRows[0]) === null || _a === void 0 ? void 0 : _a[cellIndex];
21
+ var titleFromColumn;
22
+ switch (firstCellInColumn.type) {
23
+ case 'BUTTON':
24
+ titleFromColumn = firstCellInColumn.buttonCaption;
25
+ break;
26
+ case 'CTA':
27
+ titleFromColumn = firstCellInColumn.title;
28
+ break;
29
+ case undefined:
30
+ titleFromColumn = firstCellInColumn.text || '';
31
+ break;
32
+ }
33
+ return titleFromColumn;
34
+ };
35
+ var getModalTitleFromRowHeader = function (currentRow) {
36
+ var firstCellInRow = currentRow === null || currentRow === void 0 ? void 0 : currentRow[0];
37
+ var titleFromRow = (isBaseCell(firstCellInRow) && firstCellInRow.text) || '';
38
+ return titleFromRow;
39
+ };
40
+ return (jsxs("table", { className: classNames(className, 'w100', styles.table), width: width, children: [jsx("caption", { className: "sr-only", children: title }), headerRow && (jsx("thead", { className: hideHeader ? 'sr-only' : '', children: jsx("tr", { children: headerRow.map(function (tableCellData, cellIndex) {
41
+ var isFirstCellInRow = cellIndex === 0;
42
+ return (jsx(TableCell, __assign({ isHeader: true, isFirstCellInRow: isFirstCellInRow, isTopLeftCell: isFirstCellInRow }, tableCellData, (isBaseCell(tableCellData)
43
+ ? {
44
+ openModal: function (body) {
45
+ return openModal === null || openModal === void 0 ? void 0 : openModal({
46
+ body: body,
47
+ title: tableCellData.text ||
48
+ getModalTitleFromColumnHeader(cellIndex),
49
+ });
50
+ },
51
+ align: isFirstCellInRow ? 'left' : 'center',
52
+ }
53
+ : {})), cellIndex));
54
+ }) }) })), jsx("tbody", { children: tableCellRows.map(function (row, rowIndex) {
55
+ row.length === 1;
56
+ return (rowIndex > 0 && (jsx("tr", { className: styles.tr, children: row.map(function (tableCellData, cellIndex) {
57
+ var key = "".concat(rowIndex, "-").concat(cellIndex);
58
+ var isFirstCellInRow = cellIndex === 0;
59
+ return (jsx(TableCell, __assign({ isFirstCellInRow: isFirstCellInRow }, tableCellData, (isBaseCell(tableCellData)
60
+ ? {
61
+ openModal: function (body) {
62
+ var titleFromRow = getModalTitleFromRowHeader(row);
63
+ var titleFromColumnOrRow = getModalTitleFromColumnHeader(cellIndex) ||
64
+ getModalTitleFromRowHeader(row);
65
+ return openModal === null || openModal === void 0 ? void 0 : openModal({
66
+ body: body,
67
+ title: isFirstCellInRow
68
+ ? titleFromRow
69
+ : titleFromColumnOrRow,
70
+ });
71
+ },
72
+ align: isFirstCellInRow ? 'left' : 'center',
73
+ }
74
+ : {})), key));
75
+ }) }, rowIndex)));
76
+ }) })] }));
77
+ };
78
+
79
+ export { TableSection as T, isBaseCell as i };
80
+ //# sourceMappingURL=TableSection-f6d0028e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSection-f6d0028e.js","sources":["../../../src/lib/components/table/types.ts","../../../src/lib/components/table/components/TableSection/TableSection.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport { BaseCellProps } from './components/TableCell/BaseCell/BaseCell';\nimport { CTACellProps } from './components/TableCell/CTACell/CTACell';\nimport { ButtonCellProps } from './components/TableCell/ButtonCell/ButtonCell';\n\ntype BaseCellData = BaseCellProps & { type?: undefined; cellId?: string };\ntype CTACellData = CTACellProps & { type: 'CTA'; cellId?: string };\ntype ButtonCellData = ButtonCellProps & { type: 'BUTTON'; cellId?: string };\n\nexport type TableCellData = BaseCellData | CTACellData | ButtonCellData;\n\nexport const isBaseCell = (\n tableCellData: TableCellData\n): tableCellData is BaseCellData => {\n return !tableCellData.type;\n};\n\nexport type TableSectionType = {\n title?: string;\n icon?: ReactNode;\n};\n\nexport type ModalData = {\n title?: ReactNode;\n body?: ReactNode;\n};\n\nexport type TableCellRowData = TableCellData[];\n\nexport type TableSectionData = {\n section?: TableSectionType;\n rows: TableCellRowData[];\n};\n\nexport type TableData = TableSectionData[];\n\nexport type ModalFunction = (modalData: ModalData) => void;\n","import classNames from 'classnames';\n\nimport styles from './TableSection.module.scss';\nimport { TableCell, TableCellProps } from '../TableCell/TableCell';\nimport { ReactNode, useCallback } from 'react';\nimport {\n isBaseCell,\n ModalData,\n ModalFunction,\n TableCellRowData,\n} from '../../types';\n\nexport interface TableSectionProps {\n className?: string;\n tableCellRows: TableCellRowData[];\n hideHeader?: boolean;\n openModal?: ModalFunction;\n title: string;\n width?: number | string;\n}\n\nconst TableSection = ({\n className,\n tableCellRows,\n hideHeader,\n openModal,\n title,\n width,\n}: TableSectionProps) => {\n const headerRow = tableCellRows?.[0];\n\n const getModalTitleFromColumnHeader = (cellIndex: number) => {\n const firstCellInColumn = tableCellRows?.[0]?.[cellIndex];\n let titleFromColumn;\n\n switch (firstCellInColumn.type) {\n case 'BUTTON':\n titleFromColumn = firstCellInColumn.buttonCaption;\n break;\n case 'CTA':\n titleFromColumn = firstCellInColumn.title;\n break;\n case undefined:\n titleFromColumn = firstCellInColumn.text || '';\n break;\n }\n\n return titleFromColumn;\n };\n\n const getModalTitleFromRowHeader = (currentRow: TableCellRowData) => {\n const firstCellInRow = currentRow?.[0];\n const titleFromRow =\n (isBaseCell(firstCellInRow) && firstCellInRow.text) || '';\n\n return titleFromRow;\n };\n\n return (\n <table\n className={classNames(className, 'w100', styles.table)}\n width={width}\n >\n <caption className=\"sr-only\">{title}</caption>\n\n {headerRow && (\n <thead className={hideHeader ? 'sr-only' : ''}>\n <tr>\n {headerRow.map((tableCellData, cellIndex) => {\n const isFirstCellInRow = cellIndex === 0;\n\n return (\n <TableCell\n key={cellIndex}\n isHeader\n isFirstCellInRow={isFirstCellInRow}\n isTopLeftCell={isFirstCellInRow}\n {...tableCellData}\n {...(isBaseCell(tableCellData)\n ? {\n openModal: (body: ReactNode) =>\n openModal?.({\n body,\n title:\n tableCellData.text ||\n getModalTitleFromColumnHeader(cellIndex),\n }),\n align: isFirstCellInRow ? 'left' : 'center',\n }\n : {})}\n />\n );\n })}\n </tr>\n </thead>\n )}\n\n <tbody>\n {tableCellRows.map((row, rowIndex) => {\n const isSingleCell = row.length === 1;\n\n return (\n rowIndex > 0 && (\n <tr key={rowIndex} className={styles.tr}>\n {row.map((tableCellData, cellIndex) => {\n const key = `${rowIndex}-${cellIndex}`;\n const isFirstCellInRow = cellIndex === 0;\n\n return (\n <TableCell\n isFirstCellInRow={isFirstCellInRow}\n key={key}\n {...tableCellData}\n {...(isBaseCell(tableCellData)\n ? {\n openModal: (body: ReactNode) => {\n const titleFromRow =\n getModalTitleFromRowHeader(row);\n const titleFromColumnOrRow =\n getModalTitleFromColumnHeader(cellIndex) ||\n getModalTitleFromRowHeader(row);\n\n return openModal?.({\n body,\n title: isFirstCellInRow\n ? titleFromRow\n : titleFromColumnOrRow,\n });\n },\n align: isFirstCellInRow ? 'left' : 'center',\n }\n : {})}\n />\n );\n })}\n </tr>\n )\n );\n })}\n </tbody>\n </table>\n );\n};\n\nexport type { TableCellProps };\n\nexport { TableSection };\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;IAWa,UAAU,GAAG,UACxB,aAA4B;IAE5B,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;AAC7B;;ICMM,YAAY,GAAG,UAAC,EAOF;QANlB,SAAS,eAAA,EACT,aAAa,mBAAA,EACb,UAAU,gBAAA,EACV,SAAS,e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EAAE,gBAAgB,GAAG,MAAM,GAAG,QAAQ;iCAC5C;kCACD,EAAE,IApBD,GAAG,CAqBR,EACF;yBACH,CAAC,IA/BK,QAAQ,CAgCZ,CACN,EACD;iBACH,CAAC,GACI,IACF,EACR;AACJ;;;;"}
@@ -4,7 +4,7 @@ import { i as illustrations } from '../../../index-29e6f39e.js';
4
4
  import { Button } from '../../button/index.js';
5
5
  import { Badge } from '../../badge/index.js';
6
6
  import CheckIcon from '../../icon/icons/Check.js';
7
- import InfoIcon from '../../icon/icons/Info.js';
7
+ import Info from '../../icon/icons/Info.js';
8
8
  import MehIcon from '../../icon/icons/Meh.js';
9
9
  import PlusCircleIcon from '../../icon/icons/PlusCircle.js';
10
10
  import XIcon from '../../icon/icons/X.js';
@@ -96,7 +96,7 @@ var CardStory = function (_a) {
96
96
  return (jsx("div", { className: 'd-flex p24 bg-grey-200', children: jsx(Card, { as: as, classNames: classNames, description: description, descriptionVariant: descriptionVariant, density: density, dropShadow: dropShadow, icon: icon, label: label, title: title, titleVariant: titleVariant, onClick: onClick, actionIcon: actionIcon, showActionIcon: showActionIcon, verticalAlignment: verticalAlignment, children: children }) }));
97
97
  };
98
98
  CardStory.storyName = "Card";
99
- var CardAsOtherComponents = function () { return (jsxs("div", { className: 'd-flex fd-column gap16 p24 bg-grey-200', children: [jsx("h3", { className: 'p-h3', children: "As an anchor:" }), jsx(Card, { as: "a", href: "https://feather-insurance.com", target: "_blank", title: "Card with an a tag", density: 'compact' }), jsx("h3", { className: 'p-h3', children: "As a nav:" }), jsx(Card, { as: "nav", title: "Card with a nav tag", density: 'compact' }), jsxs("p", { className: 'p-p p-p--small fw-bold d-flex ai-center gap8 mt32', children: [jsx(InfoIcon, {}), "Inspect elements to see the different HTML tags being rendered."] })] })); };
99
+ var CardAsOtherComponents = function () { return (jsxs("div", { className: 'd-flex fd-column gap16 p24 bg-grey-200', children: [jsx("h3", { className: 'p-h3', children: "As an anchor:" }), jsx(Card, { as: "a", href: "https://feather-insurance.com", target: "_blank", title: "Card with an a tag", density: 'compact' }), jsx("h3", { className: 'p-h3', children: "As a nav:" }), jsx(Card, { as: "nav", title: "Card with a nav tag", density: 'compact' }), jsxs("p", { className: 'p-p p-p--small fw-bold d-flex ai-center gap8 mt32', children: [jsx(Info, {}), "Inspect elements to see the different HTML tags being rendered."] })] })); };
100
100
  var CardDensities = function () { return (jsxs("div", { className: 'd-flex fd-column gap16 p24 bg-grey-200', children: [jsx(Card, { title: 'Card density: Compact', density: 'compact' }), jsx(Card, { title: 'Card density: Balanced', density: 'balanced' }), jsx(Card, { title: 'Card density: Spacious', density: 'spacious' })] })); };
101
101
  var CardsWithIcons = function (_a) {
102
102
  var title = _a.title;
@@ -1 +1 @@
1
- {"version":3,"file":"index.stories.js","sources":["../../../../../../src/lib/components/cards/card/index.stories.tsx"],"sourcesContent":["import { Card, CardProps } from '.';\nimport { illustrations } from '../../../util/images';\nimport { Button } from '../../button';\nimport { Badge } from '../../badge';\nimport { CheckIcon, InfoIcon, MehIcon, PlusCircleIcon, XIcon } from '../../icon';\n\nconst story = {\n title: 'JSX/Cards/Card',\n component: Card,\n argTypes: {\n as: {\n control: 'text',\n description: 'Allow wrapper element type to be custom defined'\n },\n density: {\n description: 'Spacing around the card'\n },\n label: {\n description: 'Content to be rendered as label'\n },\n title: {\n description: 'Content to be rendered as title'\n },\n titleVariant: {\n description: 'Variant that allows changing title sizing styles.'\n },\n description: {\n description: 'Content to be rendered as description'\n },\n descriptionVariant: {\n description: 'Variant that allows changing description sizing styles.'\n },\n icon: {\n description: 'ReactNode to be rendered on the left side of the card',\n },\n children: {\n control: 'text',\n description: 'Content that is displayed inside the card under the pre-defined props',\n },\n onClick: {\n action: true,\n table: {\n category: \"Callbacks\",\n },\n description: 'On click action to be triggered on card click.',\n },\n dropShadow: {\n description: 'Wether to display card with drop shadow styles or not.',\n },\n actionIcon: {\n control: 'text',\n description: 'ReactNode to be rendered on the right side of the card when there is an onClick action. By default it renders the ChevronRightIcon.',\n },\n showActionIcon: {\n description: 'Property that always displays action icon even if no onClick is set.',\n },\n verticalAlignment: {\n description: 'Vertical alignment of the card content',\n control: { type: 'select' },\n },\n },\n args: {\n density: 'balanced',\n description: 'Believe you’re a great fit but can’t find a position listed for your skill set? We’d love to hear from you!',\n descriptionVariant: 'large',\n label: 'Label',\n title: 'Honest, simple insurance',\n titleVariant: 'large',\n icon: 'ABC',\n children: '',\n classNames: {\n wrapper: '',\n label: '',\n title: '',\n description: '',\n children: '',\n icon: ''\n },\n dropShadow: true,\n verticalAlignment: 'center',\n }\n};\n\nexport const CardStory = ({ \n as,\n actionIcon,\n showActionIcon,\n children,\n classNames,\n density,\n description,\n descriptionVariant,\n dropShadow,\n icon,\n label,\n onClick,\n title,\n titleVariant,\n verticalAlignment,\n}: CardProps) => (\n <div className='d-flex p24 bg-grey-200'>\n <Card\n as={as}\n classNames={classNames}\n description={description}\n descriptionVariant={descriptionVariant}\n density={density}\n dropShadow={dropShadow}\n icon={icon}\n label={label}\n title={title}\n titleVariant={titleVariant}\n onClick={onClick}\n actionIcon={actionIcon}\n showActionIcon={showActionIcon}\n verticalAlignment={verticalAlignment}\n >\n {children}\n </Card>\n </div>\n);\n\nCardStory.storyName = \"Card\";\n\nexport const CardAsOtherComponents = () => (\n <div className='d-flex fd-column gap16 p24 bg-grey-200'>\n \n <h3 className='p-h3'>As an anchor:</h3>\n <Card\n as=\"a\"\n href=\"https://feather-insurance.com\"\n target=\"_blank\"\n title=\"Card with an a tag\"\n density='compact'\n />\n\n <h3 className='p-h3'>As a nav:</h3>\n <Card\n as=\"nav\"\n title=\"Card with a nav tag\"\n density='compact'\n />\n\n <p className='p-p p-p--small fw-bold d-flex ai-center gap8 mt32'>\n <InfoIcon />\n Inspect elements to see the different HTML tags being rendered.\n </p>\n </div>\n);\n\nexport const CardDensities = () => (\n <div className='d-flex fd-column gap16 p24 bg-grey-200'>\n <Card\n title={'Card density: Compact'}\n density='compact'\n />\n <Card\n title={'Card density: Balanced'}\n density='balanced'\n />\n <Card\n title={'Card density: Spacious'}\n density='spacious'\n />\n </div>\n);\n\nexport const CardsWithIcons = ({ title }: CardProps) => (\n <div className='d-flex gap16 p24 bg-grey-200'>\n <Card\n icon={\n <img\n alt=\"\"\n src={illustrations.aids}\n width={24}\n />\n }\n title={title}\n />\n <Card\n icon={<MehIcon size={24} noMargin />}\n title={title}\n />\n </div>\n);\n\nexport const CardWithOnClickAction = ({ \n children,\n title,\n}: CardProps) => (\n <div className='d-flex p24 bg-grey-200'>\n <Card\n icon={\n <img\n alt=\"\"\n src={illustrations.aids}\n width={24}\n />\n }\n title={title}\n titleVariant={'medium'}\n onClick={() => {}}\n >\n {children}\n </Card>\n </div>\n);\n\nexport const CardOverridesStyles = ({ \n children,\n label,\n title,\n}: CardProps) => (\n <div className='d-flex p24 bg-grey-200'>\n <Card\n label={label}\n title={title}\n titleVariant={'medium'}\n icon={<PlusCircleIcon color=\"grey-100\" size={32} />}\n classNames={{ \n wrapper: 'bg-grey-700',\n label: 'tc-white',\n title: 'tc-white'\n }}\n >\n {children}\n </Card>\n </div>\n);\n\nexport const CardsWithinCardsAndComplexLayout = () => (\n <div className='d-flex p24 bg-grey-200'>\n <Card\n label={(\n <Badge size='small' variant='success'>\n Active\n </Badge>\n )}\n title={(\n <div className='d-flex jc-between ai-center w100'>\n Coverage overview\n\n <Button\n onClick={() => {}}\n variant='filledGray'\n >\n Full coverage details\n </Button>\n </div>\n )}\n >\n <div className='d-flex gap16 mt16'>\n <Card\n description=\"Lost keys\"\n classNames={{ wrapper: 'bg-grey-300' }}\n icon={<CheckIcon color={'primary-500'} />}\n density='compact'\n />\n <Card\n description=\"Broken glass\"\n classNames={{ wrapper: 'bg-grey-300' }}\n icon={<XIcon color={'primary-500'} />}\n density='compact'\n />\n </div>\n \n <div className='d-flex gap16 mt16'>\n <Card\n description=\"Damage to property\"\n classNames={{ wrapper: 'bg-grey-300' }}\n icon={<CheckIcon color={'primary-500'} />}\n density='compact'\n />\n <Card\n description=\"Drones\"\n classNames={{ wrapper: 'bg-grey-300' }}\n icon={<XIcon color={'primary-500'} />}\n density='compact'\n />\n </div>\n </Card>\n </div>\n);\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;IAMM,KAAK,GAAG;IACZ,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE;QACR,EAAE,EAAE;YACF,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,iDAAiD;SAC/D;QACD,OAAO,EAAE;YACP,WAAW,EAAE,yBAAyB;SACvC;QACD,KAAK,EAAE;YACL,WAAW,EAAE,iCAAiC;SAC/C;QACD,KAAK,EAAE;YACL,WAAW,EAAE,iCAAiC;SAC/C;QACD,YAAY,EAAE;YACZ,WAAW,EAAE,mDAAmD;SACjE;QACD,WAAW,EAAE;YACX,WAAW,EAAE,uCAAuC;SACrD;QACD,kBAAkB,EAAE;YAClB,WAAW,EAAE,yDAAyD;SACvE;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,uDAAuD;SACrE;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,uEAAuE;SACrF;QACD,OAAO,EAAE;YACP,MAAM,EAAE,IAAI;YACZ,KAAK,EAAE;gBACL,QAAQ,EAAE,WAAW;aACtB;YACD,WAAW,EAAE,gDAAgD;SAC9D;QACD,UAAU,EAAE;YACV,WAAW,EAAE,wDAAwD;SACtE;QACD,UAAU,EAAE;YACV,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,qIAAqI;SACnJ;QACD,cAAc,EAAE;YACd,WAAW,EAAE,sEAAsE;SACpF;QACD,iBAAiB,EAAE;YACjB,WAAW,EAAE,wCAAwC;YACrD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B;KACF;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,UAAU;QACnB,WAAW,EAAE,6GAA6G;QAC1H,kBAAkB,EAAE,OAAO;QAC3B,K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C,KAAK,EAAE,aAAa,GAAI,EACrC,OAAO,EAAC,SAAS,GACjB,IACE,EAENC,cAAK,SAAS,EAAC,mBAAmB,aAChCD,IAAC,IAAI,IACH,WAAW,EAAC,oBAAoB,EAChC,UAAU,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EACtC,IAAI,EAAEA,IAAC,SAAS,IAAC,KAAK,EAAE,aAAa,GAAI,EACzC,OAAO,EAAC,SAAS,GACjB,EACFA,IAAC,IAAI,IACH,WAAW,EAAC,QAAQ,EACpB,UAAU,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EACtC,IAAI,EAAEA,IAAC,KAAK,IAAC,KAAK,EAAE,aAAa,GAAI,EACrC,OAAO,EAAC,SAAS,GACjB,IACE,IACD,GACH;;;;;"}
1
+ {"version":3,"file":"index.stories.js","sources":["../../../../../../src/lib/components/cards/card/index.stories.tsx"],"sourcesContent":["import { Card, CardProps } from '.';\nimport { illustrations } from '../../../util/images';\nimport { Button } from '../../button';\nimport { Badge } from '../../badge';\nimport { CheckIcon, InfoIcon, MehIcon, PlusCircleIcon, XIcon } from '../../icon';\n\nconst story = {\n title: 'JSX/Cards/Card',\n component: Card,\n argTypes: {\n as: {\n control: 'text',\n description: 'Allow wrapper element type to be custom defined'\n },\n density: {\n description: 'Spacing around the card'\n },\n label: {\n description: 'Content to be rendered as label'\n },\n title: {\n description: 'Content to be rendered as title'\n },\n titleVariant: {\n description: 'Variant that allows changing title sizing styles.'\n },\n description: {\n description: 'Content to be rendered as description'\n },\n descriptionVariant: {\n description: 'Variant that allows changing description sizing styles.'\n },\n icon: {\n description: 'ReactNode to be rendered on the left side of the card',\n },\n children: {\n control: 'text',\n description: 'Content that is displayed inside the card under the pre-defined props',\n },\n onClick: {\n action: true,\n table: {\n category: \"Callbacks\",\n },\n description: 'On click action to be triggered on card click.',\n },\n dropShadow: {\n description: 'Wether to display card with drop shadow styles or not.',\n },\n actionIcon: {\n control: 'text',\n description: 'ReactNode to be rendered on the right side of the card when there is an onClick action. By default it renders the ChevronRightIcon.',\n },\n showActionIcon: {\n description: 'Property that always displays action icon even if no onClick is set.',\n },\n verticalAlignment: {\n description: 'Vertical alignment of the card content',\n control: { type: 'select' },\n },\n },\n args: {\n density: 'balanced',\n description: 'Believe you’re a great fit but can’t find a position listed for your skill set? We’d love to hear from you!',\n descriptionVariant: 'large',\n label: 'Label',\n title: 'Honest, simple insurance',\n titleVariant: 'large',\n icon: 'ABC',\n children: '',\n classNames: {\n wrapper: '',\n label: '',\n title: '',\n description: '',\n children: '',\n icon: ''\n },\n dropShadow: true,\n verticalAlignment: 'center',\n }\n};\n\nexport const CardStory = ({ \n as,\n actionIcon,\n showActionIcon,\n children,\n classNames,\n density,\n description,\n descriptionVariant,\n dropShadow,\n icon,\n label,\n onClick,\n title,\n titleVariant,\n verticalAlignment,\n}: CardProps) => (\n <div className='d-flex p24 bg-grey-200'>\n <Card\n as={as}\n classNames={classNames}\n description={description}\n descriptionVariant={descriptionVariant}\n density={density}\n dropShadow={dropShadow}\n icon={icon}\n label={label}\n title={title}\n titleVariant={titleVariant}\n onClick={onClick}\n actionIcon={actionIcon}\n showActionIcon={showActionIcon}\n verticalAlignment={verticalAlignment}\n >\n {children}\n </Card>\n </div>\n);\n\nCardStory.storyName = \"Card\";\n\nexport const CardAsOtherComponents = () => (\n <div className='d-flex fd-column gap16 p24 bg-grey-200'>\n \n <h3 className='p-h3'>As an anchor:</h3>\n <Card\n as=\"a\"\n href=\"https://feather-insurance.com\"\n target=\"_blank\"\n title=\"Card with an a tag\"\n density='compact'\n />\n\n <h3 className='p-h3'>As a nav:</h3>\n <Card\n as=\"nav\"\n title=\"Card with a nav tag\"\n density='compact'\n />\n\n <p className='p-p p-p--small fw-bold d-flex ai-center gap8 mt32'>\n <InfoIcon />\n Inspect elements to see the different HTML tags being rendered.\n </p>\n </div>\n);\n\nexport const CardDensities = () => (\n <div className='d-flex fd-column gap16 p24 bg-grey-200'>\n <Card\n title={'Card density: Compact'}\n density='compact'\n />\n <Card\n title={'Card density: Balanced'}\n density='balanced'\n />\n <Card\n title={'Card density: Spacious'}\n density='spacious'\n />\n </div>\n);\n\nexport const CardsWithIcons = ({ title }: CardProps) => (\n <div className='d-flex gap16 p24 bg-grey-200'>\n <Card\n icon={\n <img\n alt=\"\"\n src={illustrations.aids}\n width={24}\n />\n }\n title={title}\n />\n <Card\n icon={<MehIcon size={24} noMargin />}\n title={title}\n />\n </div>\n);\n\nexport const CardWithOnClickAction = ({ \n children,\n title,\n}: CardProps) => (\n <div className='d-flex p24 bg-grey-200'>\n <Card\n icon={\n <img\n alt=\"\"\n src={illustrations.aids}\n width={24}\n />\n }\n title={title}\n titleVariant={'medium'}\n onClick={() => {}}\n >\n {children}\n </Card>\n </div>\n);\n\nexport const CardOverridesStyles = ({ \n children,\n label,\n title,\n}: CardProps) => (\n <div className='d-flex p24 bg-grey-200'>\n <Card\n label={label}\n title={title}\n titleVariant={'medium'}\n icon={<PlusCircleIcon color=\"grey-100\" size={32} />}\n classNames={{ \n wrapper: 'bg-grey-700',\n label: 'tc-white',\n title: 'tc-white'\n }}\n >\n {children}\n </Card>\n </div>\n);\n\nexport const CardsWithinCardsAndComplexLayout = () => (\n <div className='d-flex p24 bg-grey-200'>\n <Card\n label={(\n <Badge size='small' variant='success'>\n Active\n </Badge>\n )}\n title={(\n <div className='d-flex jc-between ai-center w100'>\n Coverage overview\n\n <Button\n onClick={() => {}}\n variant='filledGray'\n >\n Full coverage details\n </Button>\n </div>\n )}\n >\n <div className='d-flex gap16 mt16'>\n <Card\n description=\"Lost keys\"\n classNames={{ wrapper: 'bg-grey-300' }}\n icon={<CheckIcon color={'primary-500'} />}\n density='compact'\n />\n <Card\n description=\"Broken glass\"\n classNames={{ wrapper: 'bg-grey-300' }}\n icon={<XIcon color={'primary-500'} />}\n density='compact'\n />\n </div>\n \n <div className='d-flex gap16 mt16'>\n <Card\n description=\"Damage to property\"\n classNames={{ wrapper: 'bg-grey-300' }}\n icon={<CheckIcon color={'primary-500'} />}\n density='compact'\n />\n <Card\n description=\"Drones\"\n classNames={{ wrapper: 'bg-grey-300' }}\n icon={<XIcon color={'primary-500'} />}\n density='compact'\n />\n </div>\n </Card>\n </div>\n);\n\nexport default story;\n"],"names":["_jsx","_jsxs","InfoIcon"],"mappings":";;;;;;;;;;;;;;;;;IAMM,KAAK,GAAG;IACZ,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE;QACR,EAAE,EAAE;YACF,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,iDAAiD;SAC/D;QACD,OAAO,EAAE;YACP,WAAW,EAAE,yBAAyB;SACvC;QACD,KAAK,EAAE;YACL,WAAW,EAAE,iCAAiC;SAC/C;QACD,KAAK,EAAE;YACL,WAAW,EAAE,iCAAiC;SAC/C;QACD,YAAY,EAAE;YACZ,WAAW,EAAE,mDAAmD;SACjE;QACD,WAAW,EAAE;YACX,WAAW,EAAE,uCAAuC;SACrD;QACD,kBAAkB,EAAE;YAClB,WAAW,EAAE,yDAAyD;SACvE;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,uDAAuD;SACrE;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,uEAAuE;SACrF;QACD,OAAO,EAAE;YACP,MAAM,EAAE,IAAI;YACZ,KAAK,EAAE;gBACL,QAAQ,EAAE,WAAW;aACtB;YACD,WAAW,EAAE,gDAAgD;SAC9D;QACD,UAAU,EAAE;YACV,WAAW,EAAE,wDAAwD;SACtE;QACD,UAAU,EAAE;YACV,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,qIAAqI;SACnJ;QACD,cAAc,EAAE;YACd,WAAW,EAAE,sEAAsE;SACpF;QACD,iBAAiB,EAAE;YACjB,WAAW,EAAE,wCAAwC;YACrD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B;KACF;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,UAAU;QACnB,WAAW,EAAE,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Aa,EAAE,EACtC,IAAI,EAAEA,IAAC,KAAK,IAAC,KAAK,EAAE,aAAa,GAAI,EACrC,OAAO,EAAC,SAAS,GACjB,IACE,EAENC,cAAK,SAAS,EAAC,mBAAmB,aAChCD,IAAC,IAAI,IACH,WAAW,EAAC,oBAAoB,EAChC,UAAU,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EACtC,IAAI,EAAEA,IAAC,SAAS,IAAC,KAAK,EAAE,aAAa,GAAI,EACzC,OAAO,EAAC,SAAS,GACjB,EACFA,IAAC,IAAI,IACH,WAAW,EAAC,QAAQ,EACpB,UAAU,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EACtC,IAAI,EAAEA,IAAC,KAAK,IAAC,KAAK,EAAE,aAAa,GAAI,EACrC,OAAO,EAAC,SAAS,GACjB,IACE,IACD,GACH;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import InfoIcon from '../../../icon/icons/Info.js';
2
+ import Info 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';
@@ -12,7 +12,7 @@ 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, children: jsx(InfoIcon, { size: 20 }) }));
15
+ return (jsx("button", { className: "p-btn--secondary ".concat(styles.button, " ").concat(className), type: "button", "data-testid": "ds-table-info-button", onClick: onClick, children: jsx(Info, { 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 Info from '../../../icon/icons/Info';\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 >\n <Info size={20} />\n </button>\n);\n\nexport default TableInfoButton;\n"],"names":["_jsx","Info"],"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,YAEhBA,IAACC,QAAI,IAAC,IAAI,EAAE,EAAE,GAAI,GACX;AARL;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../src/lib/components/comparisonTable/components/TableInfoButton/index.tsx"],"sourcesContent":["import Info from '../../../icon/icons/Info';\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 >\n <Info 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,YAEhBA,IAAC,IAAI,IAAC,IAAI,EAAE,EAAE,GAAI,GACX;AARL;;;;"}