@popsure/dirty-swan 0.58.5 → 0.58.7

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 (80) hide show
  1. package/dist/cjs/index.js +39 -24
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/lib/components/table/Table.d.ts +2 -1
  4. package/dist/cjs/lib/components/table/Table.stories.d.ts +6 -2
  5. package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +2 -1
  6. package/dist/cjs/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +1 -1
  7. package/dist/cjs/lib/components/table/components/TableContents/TableContents.d.ts +2 -1
  8. package/dist/cjs/lib/components/table/components/TableSection/TableSection.d.ts +2 -1
  9. package/dist/esm/{TableSection-f41d4248.js → TableSection-9cf86eb7.js} +4 -3
  10. package/dist/esm/TableSection-9cf86eb7.js.map +1 -0
  11. package/dist/esm/components/icon/icons/Bone.js +1 -1
  12. package/dist/esm/components/icon/icons/Bone.js.map +1 -1
  13. package/dist/esm/components/icon/icons/Car.js +1 -1
  14. package/dist/esm/components/icon/icons/Car.js.map +1 -1
  15. package/dist/esm/components/icon/icons/Files.js +1 -1
  16. package/dist/esm/components/icon/icons/Files.js.map +1 -1
  17. package/dist/esm/components/icon/icons/Id.js +1 -1
  18. package/dist/esm/components/icon/icons/Id.js.map +1 -1
  19. package/dist/esm/components/icon/icons/Prohibit.js +1 -1
  20. package/dist/esm/components/icon/icons/Prohibit.js.map +1 -1
  21. package/dist/esm/components/icon/icons/Receipt.js +1 -1
  22. package/dist/esm/components/icon/icons/Receipt.js.map +1 -1
  23. package/dist/esm/components/icon/icons/Signature.js +1 -1
  24. package/dist/esm/components/icon/icons/Signature.js.map +1 -1
  25. package/dist/esm/components/icon/icons/Stamp.js +1 -1
  26. package/dist/esm/components/icon/icons/Stamp.js.map +1 -1
  27. package/dist/esm/components/icon/icons/Translation.js +2 -2
  28. package/dist/esm/components/icon/icons/Translation.js.map +1 -1
  29. package/dist/esm/components/icon/icons.stories.js +1 -1
  30. package/dist/esm/components/icon/index.stories.js +1 -1
  31. package/dist/esm/components/table/Table.js +8 -8
  32. package/dist/esm/components/table/Table.js.map +1 -1
  33. package/dist/esm/components/table/Table.stories.js +8 -4
  34. package/dist/esm/components/table/Table.stories.js.map +1 -1
  35. package/dist/esm/components/table/Table.test.js +2 -2
  36. package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js +11 -3
  37. package/dist/esm/components/table/components/TableCell/CTACell/CTACell.js.map +1 -1
  38. package/dist/esm/components/table/components/TableCell/CTACell/CTACell.stories.js +1 -0
  39. package/dist/esm/components/table/components/TableCell/CTACell/CTACell.stories.js.map +1 -1
  40. package/dist/esm/components/table/components/TableCell/TableCell.js +1 -1
  41. package/dist/esm/components/table/components/TableCell/TableCell.test.js +1 -1
  42. package/dist/esm/components/table/components/TableContents/TableContents.js +15 -6
  43. package/dist/esm/components/table/components/TableContents/TableContents.js.map +1 -1
  44. package/dist/esm/components/table/components/TableContents/TableContents.test.js +2 -2
  45. package/dist/esm/components/table/components/TableSection/TableSection.js +2 -2
  46. package/dist/esm/components/table/components/TableSection/TableSection.test.js +2 -2
  47. package/dist/esm/{index-608a56e3.js → index-d2e06251.js} +1 -1
  48. package/dist/esm/{index-608a56e3.js.map → index-d2e06251.js.map} +1 -1
  49. package/dist/esm/index.js +1 -1
  50. package/dist/esm/lib/components/table/Table.d.ts +2 -1
  51. package/dist/esm/lib/components/table/Table.stories.d.ts +6 -2
  52. package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.d.ts +2 -1
  53. package/dist/esm/lib/components/table/components/TableCell/CTACell/CTACell.stories.d.ts +1 -1
  54. package/dist/esm/lib/components/table/components/TableContents/TableContents.d.ts +2 -1
  55. package/dist/esm/lib/components/table/components/TableSection/TableSection.d.ts +2 -1
  56. package/package.json +1 -1
  57. package/src/lib/components/icon/assets/bone.svg +5 -5
  58. package/src/lib/components/icon/assets/car.svg +10 -10
  59. package/src/lib/components/icon/assets/files.svg +8 -8
  60. package/src/lib/components/icon/assets/id.svg +9 -9
  61. package/src/lib/components/icon/assets/prohibit.svg +6 -6
  62. package/src/lib/components/icon/assets/receipt.svg +7 -7
  63. package/src/lib/components/icon/assets/signature.svg +6 -6
  64. package/src/lib/components/icon/assets/stamp.svg +7 -7
  65. package/src/lib/components/icon/assets/translation.svg +7 -14
  66. package/src/lib/components/icon/icons/Bone.tsx +2 -2
  67. package/src/lib/components/icon/icons/Car.tsx +4 -4
  68. package/src/lib/components/icon/icons/Files.tsx +4 -4
  69. package/src/lib/components/icon/icons/Id.tsx +3 -3
  70. package/src/lib/components/icon/icons/Prohibit.tsx +4 -7
  71. package/src/lib/components/icon/icons/Receipt.tsx +3 -3
  72. package/src/lib/components/icon/icons/Signature.tsx +2 -2
  73. package/src/lib/components/icon/icons/Stamp.tsx +3 -3
  74. package/src/lib/components/icon/icons/Translation.tsx +26 -25
  75. package/src/lib/components/table/Table.stories.tsx +6 -0
  76. package/src/lib/components/table/Table.tsx +4 -0
  77. package/src/lib/components/table/components/TableCell/CTACell/CTACell.tsx +11 -5
  78. package/src/lib/components/table/components/TableContents/TableContents.tsx +65 -51
  79. package/src/lib/components/table/components/TableSection/TableSection.tsx +8 -1
  80. package/dist/esm/TableSection-f41d4248.js.map +0 -1
@@ -22,11 +22,11 @@ import '../icon/icons/Info.js';
22
22
  import '../../index-5e72c3d4.js';
23
23
  import './components/TableCell/CTACell/CTACell.js';
24
24
  import './components/IconRenderer/IconRenderer.js';
25
+ import '../button/index.js';
25
26
  import './components/TableCell/CardCell/CardCell.js';
26
27
  import '../cards/card/index.js';
27
28
  import '../icon/icons/ChevronRight.js';
28
29
  import './components/TableCell/ButtonCell/ButtonCell.js';
29
- import '../button/index.js';
30
30
  import '../modal/bottomOrRegularModal/index.js';
31
31
  import '../modal/bottomModal/index.js';
32
32
  import '../modal/genericModal/index.js';
@@ -37,7 +37,7 @@ import '../icon/icons/ChevronDown.js';
37
37
  import '../icon/icons/ChevronUp.js';
38
38
  import '../../useMediaQuery-1a3a2432.js';
39
39
  import './components/TableContents/TableContents.js';
40
- import '../../TableSection-f41d4248.js';
40
+ import '../../TableSection-9cf86eb7.js';
41
41
  import './components/TableContents/Collapsible.js';
42
42
  import '../../useTableNavigation-f929fbc9.js';
43
43
  import './components/TableControls/TableControls.js';
@@ -254,6 +254,9 @@ var story = {
254
254
  hideColumns: {
255
255
  subContent: 'This property allows to hide defined columns by index.',
256
256
  },
257
+ hideRows: {
258
+ subContent: 'This property allows to hide selected rows by index.',
259
+ },
257
260
  modalContentRenderer: {
258
261
  subContent: 'This property allows to render custom modal content.',
259
262
  },
@@ -282,10 +285,11 @@ var story = {
282
285
  hideDetails: 'Hide details',
283
286
  },
284
287
  hideColumns: [],
288
+ hideRows: [],
285
289
  },
286
290
  };
287
291
  var TableStory = function (_a) {
288
- var collapsibleSections = _a.collapsibleSections, tableData = _a.tableData, hideColumns = _a.hideColumns, hideDetails = _a.hideDetails, stickyHeaderTopOffset = _a.stickyHeaderTopOffset, textOverrides = _a.textOverrides, title = _a.title;
292
+ var collapsibleSections = _a.collapsibleSections, tableData = _a.tableData, hideColumns = _a.hideColumns, hideDetails = _a.hideDetails, hideRows = _a.hideRows, stickyHeaderTopOffset = _a.stickyHeaderTopOffset, textOverrides = _a.textOverrides, title = _a.title;
289
293
  var _b = useState(999), price = _b[0], setPrice = _b[1];
290
294
  return (jsxs("div", { children: [jsxs("div", { className: "d-flex fd-column p24 mb80 gap16 wmx5", children: [jsx("label", { htmlFor: "", children: "Change price to see replacement in action: " }), jsx(Input, { id: "#stuff", type: "text", onChange: function (e) { return setPrice(Number(e.target.value)); }, value: price })] }), jsx(Table, { cellReplacements: {
291
295
  '#1': {
@@ -302,7 +306,7 @@ var TableStory = function (_a) {
302
306
  '#3': {
303
307
  description: 'per year',
304
308
  },
305
- }, collapsibleSections: collapsibleSections, tableData: tableData, hideColumns: hideColumns, hideDetails: hideDetails, stickyHeaderTopOffset: stickyHeaderTopOffset, textOverrides: textOverrides, title: title })] }));
309
+ }, collapsibleSections: collapsibleSections, tableData: tableData, hideColumns: hideColumns, hideDetails: hideDetails, hideRows: hideRows, stickyHeaderTopOffset: stickyHeaderTopOffset, textOverrides: textOverrides, title: title })] }));
306
310
  };
307
311
  var TableDataType = function () {
308
312
  return (jsx("pre", { children: "\ntype TableData = {\n section?: \n title?: string;\n icon?: ReactNode;\n };\n rows: {\n align?: 'center' | 'left' | 'right';\n checkmarkValue?: boolean;\n text?: ReactNode;\n modalContent?: ReactNode;\n subContent?: ReactNode;\n rating?: {\n value: number;\n type: 'zap' | 'star';\n }\n openModal?: (modalContent: ReactNode) => void;\n }[][];\n}[];\n " }));
@@ -1 +1 @@
1
- {"version":3,"file":"Table.stories.js","sources":["../../../../../src/lib/components/table/Table.stories.tsx"],"sourcesContent":["import { Table, TableProps } from './Table';\nimport { DentalPlusIcon, PlaneIcon } from '../icon';\nimport { TableData } from './types';\nimport { useState } from 'react';\nimport { Input } from '../input';\n\nconst initialData: TableData = [\n {\n rows: [\n [\n { text: 'Our plans' },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/orange/white',\n title: 'Standard',\n price: '€234',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/green/white',\n title: 'Plus',\n price: '€344',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n {\n type: 'CTA',\n icon: <PlaneIcon size={24} noMargin />,\n title: 'Premium',\n price: '€556',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n ],\n [\n { text: 'Select a plan' },\n {\n type: 'BUTTON',\n buttonCaption: 'Standard',\n price: '€234',\n onClick: () => {},\n },\n {\n type: 'BUTTON',\n buttonCaption: 'Plus',\n price: '€344',\n onClick: () => {},\n },\n {\n type: 'BUTTON',\n buttonCaption: 'Premium',\n price: '€556',\n onClick: () => {},\n },\n ],\n [\n {\n text: 'Your contribution',\n },\n {\n cellId: '#1',\n text: '€210',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n {\n cellId: '#2',\n text: '€275',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n {\n cellId: '#3',\n text: '€310',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n ],\n [\n {\n text: 'Regular vet visits & medication',\n description: 'Pflegepflichtversicherungrightno',\n modalContent: 'Some stories about vets',\n },\n { text: 'No', description: 'Annual Only' },\n { text: '50%' },\n { text: '80%-100%' },\n ],\n [\n { text: 'Operations',\n modalContent: 'Operations info',\n modalTitle: 'Custom operations modal title'\n },\n { \n checkmarkValue: true,\n modalContent: 'Operations info column 2',\n modalTitle: 'Custom operations modal title column 2'\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'Rating info' },\n { rating: { type: 'zap', value: 1 } },\n {\n rating: { type: 'zap', value: 3 },\n modalContent: 'Rating info column 3',\n },\n { rating: { type: 'star', value: 3 } },\n ],\n ],\n },\n {\n section: {\n icon: <DentalPlusIcon size={20} noMargin />,\n title: 'Dental',\n },\n rows: [\n [\n { text: 'Regular vet visits & medication' },\n { text: 'No' },\n { text: 'Yes' },\n { text: 'Yes' },\n ],\n [\n { text: 'Operations', modalContent: 'info' },\n {\n text: 'This is a table cell with a lot of text',\n modalContent: 'Maybe',\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n {\n type: 'CARD',\n colSpan: 3,\n title: 'Dental add-on',\n href: 'https://example.com',\n icon: 'https://placehold.co/24x24/green/yellow',\n description:\n 'Get your dental cleanings and additional treatments covered for just 10.90€ a month.',\n },\n ],\n ],\n },\n {\n section: {\n title: 'Travel',\n icon: 'https://placehold.co/24x24/red/yellow',\n },\n rows: [\n [\n { text: 'Regular vet visits & medication' },\n { text: 'No', checkmarkValue: false },\n { text: 'Yes' },\n { text: 'Yes' },\n ],\n [\n { text: 'Operations', modalContent: 'info' },\n {\n checkmarkValue: true,\n modalContent: 'Maybe',\n description: 'This is a table cell with a long subtitle',\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n ],\n },\n];\n\nconst story = {\n title: 'JSX/Table',\n component: Table,\n argTypes: {\n tableData: {\n subContent:\n 'This property allows to set the data of the Table component.',\n },\n title: {\n subContent:\n 'This property allows to add a title to the Table component for accessibility purposes.',\n },\n collapsibleSections: {\n subContent: 'This property allows to collapse the sections of the table.',\n },\n hideDetails: {\n subContent: 'This property allows to hide the details of the table.',\n },\n stickyHeaderTopOffset: {\n subContent:\n 'This property allows to set the offset of the sticky header.',\n },\n className: {\n subContent:\n 'This property allows to set a custom class to the Table component.',\n },\n textOverrides: {\n subContent:\n 'This property allows to set custom text for the show and hide details buttons.',\n },\n hideColumns: {\n subContent: 'This property allows to hide defined columns by index.',\n },\n modalContentRenderer: {\n subContent: 'This property allows to render custom modal content.',\n },\n onSelectionChanged: {\n subContent:\n 'This event is triggered when a selection is changed. It receives the index of the selection as an argument.',\n table: {\n category: 'Events',\n },\n },\n onModalOpen: {\n subContent:\n 'This event is triggered when a modal is opened. It receives the title and body of the modal as arguments.',\n table: {\n category: 'Events',\n },\n },\n },\n args: {\n tableData: initialData,\n collapsibleSections: false,\n hideDetails: false,\n stickyHeaderTopOffset: 0,\n title: 'Title of the table',\n className: '',\n textOverrides: {\n showDetails: 'Show details',\n hideDetails: 'Hide details',\n },\n hideColumns: [],\n },\n};\n\nexport const TableStory = ({\n collapsibleSections,\n tableData,\n hideColumns,\n hideDetails,\n stickyHeaderTopOffset,\n textOverrides,\n title,\n}: TableProps) => {\n const [price, setPrice] = useState(999);\n return (\n <div>\n <div className=\"d-flex fd-column p24 mb80 gap16 wmx5\">\n <label htmlFor=\"\">Change price to see replacement in action: </label>\n <Input\n id=\"#stuff\"\n type=\"text\"\n onChange={(e) => setPrice(Number(e.target.value))}\n value={price}\n />\n </div>\n\n <Table\n cellReplacements={{\n '#1': {\n type: 'CTA',\n title: 'Replaced!',\n price: `€${price}`,\n buttonCaption: 'I got replaced',\n href: 'http://example.com',\n },\n '#2': {\n type: 'BUTTON',\n buttonCaption: 'I got replaced too',\n },\n '#3': {\n description: 'per year',\n },\n }}\n collapsibleSections={collapsibleSections}\n tableData={tableData}\n hideColumns={hideColumns}\n hideDetails={hideDetails}\n stickyHeaderTopOffset={stickyHeaderTopOffset}\n textOverrides={textOverrides}\n title={title}\n />\n </div>\n );\n};\n\nexport const TableDataType = () => {\n return (\n <pre>\n {`\ntype TableData = {\n section?: \n title?: string;\n icon?: ReactNode;\n };\n rows: {\n align?: 'center' | 'left' | 'right';\n checkmarkValue?: boolean;\n text?: ReactNode;\n modalContent?: ReactNode;\n subContent?: ReactNode;\n rating?: {\n value: number;\n type: 'zap' | 'star';\n }\n openModal?: (modalContent: ReactNode) => void;\n }[][];\n}[];\n `}\n </pre>\n );\n};\n\nTableStory.storyName = 'Table';\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAM,WAAW,GAAc;IAC7B;QACE,IAAI,EAAE;YACJ;gBACE,EAAE,IAAI,EAAE,WAAW,EAAE;gBACrB;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,yCAAyC;oBAC/C,KAAK,EAAE,UAAU;oBACjB,KAAK,EAAE,MAAM;oBACb,aAAa,EAAE,aAAa;oBAC5B,IAAI,EAAE,oBAAoB;iBAC3B;gBACD;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,wCAAwC;oB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,QACEA,uBACG,mZAmBA,GACG,EACN;AACJ,EAAE;AAEF,UAAU,CAAC,SAAS,GAAG,OAAO;;;;;"}
1
+ {"version":3,"file":"Table.stories.js","sources":["../../../../../src/lib/components/table/Table.stories.tsx"],"sourcesContent":["import { Table, TableProps } from './Table';\nimport { DentalPlusIcon, PlaneIcon } from '../icon';\nimport { TableData } from './types';\nimport { useState } from 'react';\nimport { Input } from '../input';\n\nconst initialData: TableData = [\n {\n rows: [\n [\n { text: 'Our plans' },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/orange/white',\n title: 'Standard',\n price: '€234',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n {\n type: 'CTA',\n icon: 'https://placehold.co/24x24/green/white',\n title: 'Plus',\n price: '€344',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n {\n type: 'CTA',\n icon: <PlaneIcon size={24} noMargin />,\n title: 'Premium',\n price: '€556',\n buttonCaption: 'Get covered',\n href: 'http://example.com',\n },\n ],\n [\n { text: 'Select a plan' },\n {\n type: 'BUTTON',\n buttonCaption: 'Standard',\n price: '€234',\n onClick: () => {},\n },\n {\n type: 'BUTTON',\n buttonCaption: 'Plus',\n price: '€344',\n onClick: () => {},\n },\n {\n type: 'BUTTON',\n buttonCaption: 'Premium',\n price: '€556',\n onClick: () => {},\n },\n ],\n [\n {\n text: 'Your contribution',\n },\n {\n cellId: '#1',\n text: '€210',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n {\n cellId: '#2',\n text: '€275',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n {\n cellId: '#3',\n text: '€310',\n description: 'per month',\n fontVariant: 'PRICE',\n modalContent: 'Price info',\n },\n ],\n [\n {\n text: 'Regular vet visits & medication',\n description: 'Pflegepflichtversicherungrightno',\n modalContent: 'Some stories about vets',\n },\n { text: 'No', description: 'Annual Only' },\n { text: '50%' },\n { text: '80%-100%' },\n ],\n [\n { text: 'Operations',\n modalContent: 'Operations info',\n modalTitle: 'Custom operations modal title'\n },\n { \n checkmarkValue: true,\n modalContent: 'Operations info column 2',\n modalTitle: 'Custom operations modal title column 2'\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'Rating info' },\n { rating: { type: 'zap', value: 1 } },\n {\n rating: { type: 'zap', value: 3 },\n modalContent: 'Rating info column 3',\n },\n { rating: { type: 'star', value: 3 } },\n ],\n ],\n },\n {\n section: {\n icon: <DentalPlusIcon size={20} noMargin />,\n title: 'Dental',\n },\n rows: [\n [\n { text: 'Regular vet visits & medication' },\n { text: 'No' },\n { text: 'Yes' },\n { text: 'Yes' },\n ],\n [\n { text: 'Operations', modalContent: 'info' },\n {\n text: 'This is a table cell with a lot of text',\n modalContent: 'Maybe',\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n [\n {\n type: 'CARD',\n colSpan: 3,\n title: 'Dental add-on',\n href: 'https://example.com',\n icon: 'https://placehold.co/24x24/green/yellow',\n description:\n 'Get your dental cleanings and additional treatments covered for just 10.90€ a month.',\n },\n ],\n ],\n },\n {\n section: {\n title: 'Travel',\n icon: 'https://placehold.co/24x24/red/yellow',\n },\n rows: [\n [\n { text: 'Regular vet visits & medication' },\n { text: 'No', checkmarkValue: false },\n { text: 'Yes' },\n { text: 'Yes' },\n ],\n [\n { text: 'Operations', modalContent: 'info' },\n {\n checkmarkValue: true,\n modalContent: 'Maybe',\n description: 'This is a table cell with a long subtitle',\n },\n { checkmarkValue: false },\n { checkmarkValue: true },\n ],\n [\n { text: 'Rating', modalContent: 'info' },\n { rating: { type: 'zap', value: 1 }, modalContent: 'Maybe' },\n { rating: { type: 'zap', value: 3 } },\n { rating: { type: 'star', value: 3 } },\n ],\n ],\n },\n];\n\nconst story = {\n title: 'JSX/Table',\n component: Table,\n argTypes: {\n tableData: {\n subContent:\n 'This property allows to set the data of the Table component.',\n },\n title: {\n subContent:\n 'This property allows to add a title to the Table component for accessibility purposes.',\n },\n collapsibleSections: {\n subContent: 'This property allows to collapse the sections of the table.',\n },\n hideDetails: {\n subContent: 'This property allows to hide the details of the table.',\n },\n stickyHeaderTopOffset: {\n subContent:\n 'This property allows to set the offset of the sticky header.',\n },\n className: {\n subContent:\n 'This property allows to set a custom class to the Table component.',\n },\n textOverrides: {\n subContent:\n 'This property allows to set custom text for the show and hide details buttons.',\n },\n hideColumns: {\n subContent: 'This property allows to hide defined columns by index.',\n },\n hideRows: {\n subContent: 'This property allows to hide selected rows by index.',\n },\n modalContentRenderer: {\n subContent: 'This property allows to render custom modal content.',\n },\n onSelectionChanged: {\n subContent:\n 'This event is triggered when a selection is changed. It receives the index of the selection as an argument.',\n table: {\n category: 'Events',\n },\n },\n onModalOpen: {\n subContent:\n 'This event is triggered when a modal is opened. It receives the title and body of the modal as arguments.',\n table: {\n category: 'Events',\n },\n },\n },\n args: {\n tableData: initialData,\n collapsibleSections: false,\n hideDetails: false,\n stickyHeaderTopOffset: 0,\n title: 'Title of the table',\n className: '',\n textOverrides: {\n showDetails: 'Show details',\n hideDetails: 'Hide details',\n },\n hideColumns: [],\n hideRows: [],\n },\n};\n\nexport const TableStory = ({\n collapsibleSections,\n tableData,\n hideColumns,\n hideDetails,\n hideRows,\n stickyHeaderTopOffset,\n textOverrides,\n title,\n}: TableProps) => {\n const [price, setPrice] = useState(999);\n return (\n <div>\n <div className=\"d-flex fd-column p24 mb80 gap16 wmx5\">\n <label htmlFor=\"\">Change price to see replacement in action: </label>\n <Input\n id=\"#stuff\"\n type=\"text\"\n onChange={(e) => setPrice(Number(e.target.value))}\n value={price}\n />\n </div>\n\n <Table\n cellReplacements={{\n '#1': {\n type: 'CTA',\n title: 'Replaced!',\n price: `€${price}`,\n buttonCaption: 'I got replaced',\n href: 'http://example.com',\n },\n '#2': {\n type: 'BUTTON',\n buttonCaption: 'I got replaced too',\n },\n '#3': {\n description: 'per year',\n },\n }}\n collapsibleSections={collapsibleSections}\n tableData={tableData}\n hideColumns={hideColumns}\n hideDetails={hideDetails}\n hideRows={hideRows}\n stickyHeaderTopOffset={stickyHeaderTopOffset}\n textOverrides={textOverrides}\n title={title}\n />\n </div>\n );\n};\n\nexport const TableDataType = () => {\n return (\n <pre>\n {`\ntype TableData = {\n section?: \n title?: string;\n icon?: ReactNode;\n };\n rows: {\n align?: 'center' | 'left' | 'right';\n checkmarkValue?: boolean;\n text?: ReactNode;\n modalContent?: ReactNode;\n subContent?: ReactNode;\n rating?: {\n value: number;\n type: 'zap' | 'star';\n }\n openModal?: (modalContent: ReactNode) => void;\n }[][];\n}[];\n `}\n </pre>\n );\n};\n\nTableStory.storyName = 'Table';\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAM,WAAW,GAAc;IAC7B;QACE,IAAI,EAAE;YACJ;gBACE,EAAE,IAAI,EAAE,WAAW,EAAE;gBACrB;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,yCAAyC;oBAC/C,KAAK,EAAE,UAAU;oBACjB,KAAK,EAAE,MAAM;oBACb,aAAa,EAAE,aAAa;oBAC5B,IAAI,EAAE,oBAAoB;iBAC3B;gBACD;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,wCAAwC;oBAC9C,KAAK,EAAE,MAAM;oBACb,KAAK,EAAE,MAAM;oBACb,aAAa,EAAE,aAAa;oBAC5B,IAAI,EAAE,oBAAoB;iBAC3B;gBACD;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAEA,IAAC,SAAS,IAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,SAAG;oBACtC,KAAK,EAAE,SAAS;oBAChB,KAAK,EAAE,MAAM;oBACb,aAAa,EAAE,aAAa;oBA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ell.js';
24
24
  import './components/IconRenderer/IconRenderer.js';
25
+ import '../button/index.js';
25
26
  import './components/TableCell/CardCell/CardCell.js';
26
27
  import '../cards/card/index.js';
27
28
  import '../icon/icons/ChevronRight.js';
28
29
  import './components/TableCell/ButtonCell/ButtonCell.js';
29
- import '../button/index.js';
30
30
  import '../modal/bottomOrRegularModal/index.js';
31
31
  import '../modal/bottomModal/index.js';
32
32
  import '../modal/genericModal/index.js';
@@ -37,7 +37,7 @@ import '../icon/icons/ChevronDown.js';
37
37
  import '../icon/icons/ChevronUp.js';
38
38
  import '../../useMediaQuery-1a3a2432.js';
39
39
  import './components/TableContents/TableContents.js';
40
- import '../../TableSection-f41d4248.js';
40
+ import '../../TableSection-9cf86eb7.js';
41
41
  import './components/TableContents/Collapsible.js';
42
42
  import '../../useTableNavigation-f929fbc9.js';
43
43
  import './components/TableControls/TableControls.js';
@@ -1,7 +1,10 @@
1
+ import { a as __assign } from '../../../../../tslib.es6-a39f91fc.js';
1
2
  import { jsx, jsxs } from 'react/jsx-runtime';
2
3
  import { c as classNames } from '../../../../../index-6ea95111.js';
3
4
  import { s as styleInject } from '../../../../../style-inject.es-1f59c1d0.js';
4
5
  import { IconRenderer } from '../../IconRenderer/IconRenderer.js';
6
+ import { Button } from '../../../../button/index.js';
7
+ import 'react';
5
8
 
6
9
  var css_248z = ".CTACell-module_narrow__1EPPT {\n height: 40px;\n padding: 8px !important;\n}";
7
10
  var styles = {"narrow":"CTACell-module_narrow__1EPPT"};
@@ -9,14 +12,19 @@ styleInject(css_248z);
9
12
 
10
13
  var CTACell = function (_a) {
11
14
  var _b;
12
- var title = _a.title, price = _a.price, icon = _a.icon, grey = _a.grey, narrow = _a.narrow, href = _a.href, buttonCaption = _a.buttonCaption, imageComponent = _a.imageComponent, className = _a.className, dataCy = _a.dataCy, dataTestId = _a.dataTestId;
15
+ var title = _a.title, price = _a.price, icon = _a.icon, grey = _a.grey, narrow = _a.narrow, href = _a.href, buttonCaption = _a.buttonCaption, imageComponent = _a.imageComponent, className = _a.className, dataCy = _a.dataCy, dataTestId = _a.dataTestId, onClick = _a.onClick;
13
16
  var renderedIcon = (jsx(IconRenderer, { icon: icon, imageComponent: imageComponent }));
14
- return (jsxs("div", { className: classNames(className, "ta-center"), "data-cy": dataCy, "data-testid": dataTestId, children: [jsxs("div", { className: "d-flex jc-center ai-center gap8", children: [renderedIcon, jsxs("p", { className: "p-h3", children: [title, price && jsxs("span", { className: "tc-purple-500", children: [" ", price] })] })] }), jsx("a", { className: classNames('mt16 w100 wmx3', (_b = {
17
+ return (jsxs("div", { className: classNames(className, "ta-center"), "data-cy": dataCy, "data-testid": dataTestId, children: [jsxs("div", { className: "d-flex jc-center ai-center gap8", children: [renderedIcon, jsxs("p", { className: "p-h3", children: [title, price && jsxs("span", { className: "tc-purple-500", children: [" ", price] })] })] }), jsx(Button, __assign({}, onClick ? { onClick: onClick } : {
18
+ as: 'a',
19
+ href: href,
20
+ target: '_blank',
21
+ rel: 'noopener noreferrer',
22
+ }, { className: classNames('mt16 w100 wmx3', (_b = {
15
23
  'p-btn--primary': !grey,
16
24
  'p-btn--secondary-grey': grey
17
25
  },
18
26
  _b[styles.narrow] = narrow,
19
- _b)), href: href, target: "_blank", rel: "noopener noreferrer", children: buttonCaption })] }));
27
+ _b)), children: buttonCaption }))] }));
20
28
  };
21
29
 
22
30
  export { CTACell };
@@ -1 +1 @@
1
- {"version":3,"file":"CTACell.js","sources":["../../../../../../../../src/lib/components/table/components/TableCell/CTACell/CTACell.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { ReactNode } from 'react';\n\nimport styles from './CTACell.module.scss';\nimport { IconRenderer } from '../../IconRenderer/IconRenderer';\n\nexport type CTACellProps = {\n title: ReactNode;\n price?: ReactNode;\n icon?: ReactNode;\n imageComponent?: (args: any) => JSX.Element;\n buttonCaption?: ReactNode;\n grey?: boolean;\n narrow?: boolean;\n href: string;\n className?: string;\n dataTestId?: string;\n dataCy?: string;\n};\n\nexport const CTACell = ({\n title,\n price,\n icon,\n grey,\n narrow,\n href,\n buttonCaption,\n imageComponent,\n className,\n dataCy,\n dataTestId,\n}: CTACellProps) => {\n const renderedIcon = (\n <IconRenderer icon={icon} imageComponent={imageComponent} />\n );\n\n return (\n <div\n className={classNames(className, \"ta-center\")}\n data-cy={dataCy}\n data-testid={dataTestId}\n >\n <div className=\"d-flex jc-center ai-center gap8\">\n {renderedIcon}\n <p className=\"p-h3\">\n {title}\n {price && <span className=\"tc-purple-500\"> {price}</span>}\n </p>\n </div>\n\n <a\n className={classNames('mt16 w100 wmx3', {\n 'p-btn--primary': !grey,\n 'p-btn--secondary-grey': grey,\n [styles.narrow]: narrow,\n })}\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {buttonCaption}\n </a>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;IAoBa,OAAO,GAAG,UAAC,EAYT;;QAXb,KAAK,WAAA,EACL,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,IAAI,UAAA,EACJ,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,aAAa,mBAAA,EACb,cAAc,oBAAA,EACd,SAAS,eAAA,EACT,MAAM,YAAA,EACN,UAAU,gBAAA;IAEV,IAAM,YAAY,IAChBA,IAAC,YAAY,IAAC,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,GAAI,CAC7D,CAAC;IAEF,QACEC,cACE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,WAAW,CAAC,aACpC,MAAM,iBACF,UAAU,aAEvBA,cAAK,SAAS,EAAC,iCAAiC,aAC7C,YAAY,EACbA,YAAG,SAAS,EAAC,MAAM,aAChB,KAAK,EACL,KAAK,IAAIA,eAAM,SAAS,EAAC,eAAe,kBAAG,KAAK,IAAQ,IACvD,IACA,EAEND,WACE,SAAS,EAAE,UAAU,CAAC,gBAAgB;wBACpC,gBAAgB,EAAE,CAAC,IAAI;wBACvB,uBAAuB,EAAE,IAAI;;oBAC7B,GAAC,MAAM,CAAC,MAAM,IAAG,MAAM;wBACvB,EACF,IAAI,EAAE,IAAI,EACV,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,YAExB,aAAa,GACZ,IACA,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"CTACell.js","sources":["../../../../../../../../src/lib/components/table/components/TableCell/CTACell/CTACell.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { ReactNode } from 'react';\n\nimport styles from './CTACell.module.scss';\nimport { IconRenderer } from '../../IconRenderer/IconRenderer';\nimport { Button } from '../../../../button';\n\nexport type CTACellProps = {\n title: ReactNode;\n price?: ReactNode;\n icon?: ReactNode;\n imageComponent?: (args: any) => JSX.Element;\n buttonCaption?: ReactNode;\n grey?: boolean;\n narrow?: boolean;\n href: string;\n className?: string;\n dataTestId?: string;\n dataCy?: string;\n onClick?: () => void;\n};\n\nexport const CTACell = ({\n title,\n price,\n icon,\n grey,\n narrow,\n href,\n buttonCaption,\n imageComponent,\n className,\n dataCy,\n dataTestId,\n onClick,\n}: CTACellProps) => {\n const renderedIcon = (\n <IconRenderer icon={icon} imageComponent={imageComponent} />\n );\n\n return (\n <div\n className={classNames(className, \"ta-center\")}\n data-cy={dataCy}\n data-testid={dataTestId}\n >\n <div className=\"d-flex jc-center ai-center gap8\">\n {renderedIcon}\n <p className=\"p-h3\">\n {title}\n {price && <span className=\"tc-purple-500\"> {price}</span>}\n </p>\n </div>\n\n <Button\n {...onClick ? { onClick } : {\n as: 'a',\n href: href,\n target: '_blank',\n rel: 'noopener noreferrer',\n }}\n className={classNames('mt16 w100 wmx3', {\n 'p-btn--primary': !grey,\n 'p-btn--secondary-grey': grey,\n [styles.narrow]: narrow,\n })}\n >\n {buttonCaption}\n </Button>\n </div>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;IAsBa,OAAO,GAAG,UAAC,EAaT;;QAZb,KAAK,WAAA,EACL,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,IAAI,UAAA,EACJ,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,aAAa,mBAAA,EACb,cAAc,oBAAA,EACd,SAAS,eAAA,EACT,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,OAAO,aAAA;IAEP,IAAM,YAAY,IAChBA,IAAC,YAAY,IAAC,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,GAAI,CAC7D,CAAC;IAEF,QACEC,cACE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,WAAW,CAAC,aACpC,MAAM,iBACF,UAAU,aAEvBA,cAAK,SAAS,EAAC,iCAAiC,aAC7C,YAAY,EACbA,YAAG,SAAS,EAAC,MAAM,aAChB,KAAK,EACL,KAAK,IAAIA,eAAM,SAAS,EAAC,eAAe,kBAAG,KAAK,IAAQ,IACvD,IACA,EAEND,IAAC,MAAM,eACD,OAAO,GAAG,EAAE,OAAO,SAAA,EAAE,GAAG;gBAC1B,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,IAAI;gBACV,MAAM,EAAE,QAAQ;gBAChB,GAAG,EAAE,qBAAqB;aAC3B,IACD,SAAS,EAAE,UAAU,CAAC,gBAAgB;wBACpC,gBAAgB,EAAE,CAAC,IAAI;wBACvB,uBAAuB,EAAE,IAAI;;oBAC7B,GAAC,MAAM,CAAC,MAAM,IAAG,MAAM;wBACvB,YAED,aAAa,IACP,IACL,EACN;AACJ;;;;"}
@@ -7,6 +7,7 @@ import '../../../../../tslib.es6-a39f91fc.js';
7
7
  import '../../../../../index-6ea95111.js';
8
8
  import '../../../../../style-inject.es-1f59c1d0.js';
9
9
  import '../../IconRenderer/IconRenderer.js';
10
+ import '../../../../button/index.js';
10
11
 
11
12
  var story = {
12
13
  title: 'JSX/Table/Cells',
@@ -1 +1 @@
1
- {"version":3,"file":"CTACell.stories.js","sources":["../../../../../../../../src/lib/components/table/components/TableCell/CTACell/CTACell.stories.tsx"],"sourcesContent":["import { PlaneIcon } from '../../../../icon';\nimport { CTACell } from './CTACell';\n\nconst story = {\n title: 'JSX/Table/Cells',\n component: CTACell,\n argTypes: {},\n args: {\n title: 'BARMER',\n price: '€277',\n icon: <PlaneIcon size={24} noMargin />,\n buttonCaption: 'Get covered',\n grey: false,\n narrow: false,\n },\n};\n\nexport const CTACellStory = ({\n title,\n price,\n icon,\n buttonCaption,\n grey,\n narrow,\n}: React.ComponentProps<typeof CTACell>) => (\n <div className=\"p48 d-flex fd-column gap16 bg-white\">\n <CTACell\n title={title}\n price={price}\n icon={icon}\n buttonCaption={buttonCaption}\n href=\"\"\n grey={grey}\n narrow={narrow}\n />\n </div>\n);\n\nCTACellStory.storyName = 'CTACell';\n\nexport default story;\n"],"names":["_jsx"],"mappings":";;;;;;;;;;IAGM,KAAK,GAAG;IACZ,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,MAAM;QACb,IAAI,EAAEA,IAAC,SAAS,IAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,SAAG;QACtC,aAAa,EAAE,aAAa;QAC5B,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,KAAK;KACd;EACD;IAEW,YAAY,GAAG,UAAC,EAOU;QANrC,KAAK,WAAA,EACL,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,aAAa,mBAAA,EACb,IAAI,UAAA,EACJ,MAAM,YAAA;IACoC,QAC1CA,aAAK,SAAS,EAAC,qCAAqC,YAClDA,IAAC,OAAO,IACN,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAC,EAAE,EACP,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACd,GACE;AAXoC,EAY1C;AAEF,YAAY,CAAC,SAAS,GAAG,SAAS;;;;;"}
1
+ {"version":3,"file":"CTACell.stories.js","sources":["../../../../../../../../src/lib/components/table/components/TableCell/CTACell/CTACell.stories.tsx"],"sourcesContent":["import { PlaneIcon } from '../../../../icon';\nimport { CTACell } from './CTACell';\n\nconst story = {\n title: 'JSX/Table/Cells',\n component: CTACell,\n argTypes: {},\n args: {\n title: 'BARMER',\n price: '€277',\n icon: <PlaneIcon size={24} noMargin />,\n buttonCaption: 'Get covered',\n grey: false,\n narrow: false,\n },\n};\n\nexport const CTACellStory = ({\n title,\n price,\n icon,\n buttonCaption,\n grey,\n narrow,\n}: React.ComponentProps<typeof CTACell>) => (\n <div className=\"p48 d-flex fd-column gap16 bg-white\">\n <CTACell\n title={title}\n price={price}\n icon={icon}\n buttonCaption={buttonCaption}\n href=\"\"\n grey={grey}\n narrow={narrow}\n />\n </div>\n);\n\nCTACellStory.storyName = 'CTACell';\n\nexport default story;\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;IAGM,KAAK,GAAG;IACZ,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,MAAM;QACb,IAAI,EAAEA,IAAC,SAAS,IAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,SAAG;QACtC,aAAa,EAAE,aAAa;QAC5B,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,KAAK;KACd;EACD;IAEW,YAAY,GAAG,UAAC,EAOU;QANrC,KAAK,WAAA,EACL,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,aAAa,mBAAA,EACb,IAAI,UAAA,EACJ,MAAM,YAAA;IACoC,QAC1CA,aAAK,SAAS,EAAC,qCAAqC,YAClDA,IAAC,OAAO,IACN,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAC,EAAE,EACP,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACd,GACE;AAXoC,EAY1C;AAEF,YAAY,CAAC,SAAS,GAAG,SAAS;;;;;"}
@@ -19,9 +19,9 @@ import '../../../comparisonTable/components/TableInfoButton/index.js';
19
19
  import '../../../icon/icons/Info.js';
20
20
  import '../../../../index-5e72c3d4.js';
21
21
  import '../IconRenderer/IconRenderer.js';
22
+ import '../../../button/index.js';
22
23
  import '../../../cards/card/index.js';
23
24
  import '../../../icon/icons/ChevronRight.js';
24
- import '../../../button/index.js';
25
25
 
26
26
  var css_248z = ".TableCell-module_th__2rjCU {\n vertical-align: middle;\n scroll-snap-align: end;\n width: 50%;\n}\n@media (min-width: 34rem) {\n .TableCell-module_th__2rjCU {\n width: auto;\n scroll-snap-align: unset;\n }\n}\n.TableCell-module_thNavigation__qZ2sY {\n width: 100%;\n}\n@media (min-width: 34rem) {\n .TableCell-module_thNavigation__qZ2sY {\n width: auto;\n }\n}\n\n.TableCell-module_fixedCell__cL3-m {\n position: sticky;\n left: 0;\n z-index: 2;\n}\n.TableCell-module_fixedCell__cL3-m:after {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 1px;\n background-color: #f5f6fb;\n}\n\n.TableCell-module_fixedCard__2LO8s {\n position: sticky;\n left: 0;\n right: 0;\n z-index: 2;\n width: 100%;\n}";
27
27
  var styles = {"th":"TableCell-module_th__2rjCU","thNavigation":"TableCell-module_thNavigation__qZ2sY","fixedCell":"TableCell-module_fixedCell__cL3-m","fixedCard":"TableCell-module_fixedCard__2LO8s"};
@@ -21,11 +21,11 @@ import '../../../icon/icons/Info.js';
21
21
  import '../../../../index-5e72c3d4.js';
22
22
  import './CTACell/CTACell.js';
23
23
  import '../IconRenderer/IconRenderer.js';
24
+ import '../../../button/index.js';
24
25
  import './CardCell/CardCell.js';
25
26
  import '../../../cards/card/index.js';
26
27
  import '../../../icon/icons/ChevronRight.js';
27
28
  import './ButtonCell/ButtonCell.js';
28
- import '../../../button/index.js';
29
29
 
30
30
  var openModal = jest.fn();
31
31
  var setup = function (_a) {
@@ -1,7 +1,7 @@
1
1
  import { a as __assign, _ as __spreadArray } from '../../../../tslib.es6-a39f91fc.js';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { useState } from 'react';
4
- import { T as TableSection } from '../../../../TableSection-f41d4248.js';
4
+ import { T as TableSection } from '../../../../TableSection-9cf86eb7.js';
5
5
  import ChevronDownIcon from '../../../icon/icons/ChevronDown.js';
6
6
  import ChevronUpIcon from '../../../icon/icons/ChevronUp.js';
7
7
  import { Card } from '../../../cards/card/index.js';
@@ -23,10 +23,10 @@ import '../../../comparisonTable/components/TableInfoButton/index.js';
23
23
  import '../../../icon/icons/Info.js';
24
24
  import '../../../../index-5e72c3d4.js';
25
25
  import '../TableCell/CTACell/CTACell.js';
26
+ import '../../../button/index.js';
26
27
  import '../TableCell/CardCell/CardCell.js';
27
28
  import '../../../icon/icons/ChevronRight.js';
28
29
  import '../TableCell/ButtonCell/ButtonCell.js';
29
- import '../../../button/index.js';
30
30
  import '../../../../useMediaQuery-1a3a2432.js';
31
31
 
32
32
  var css_248z = ".TableContents-module_cardWrapper__2OVMv {\n height: 88px;\n}\n\n.TableContents-module_card__Mmz6h {\n position: absolute;\n left: 0;\n right: 0;\n z-index: 3;\n}\n\n.TableContents-module_cardIcon__2DXbp {\n width: 20px;\n margin-right: 8px;\n}";
@@ -35,8 +35,8 @@ styleInject(css_248z);
35
35
 
36
36
  var TableContents = function (_a) {
37
37
  var _b, _c;
38
- var className = _a.className, collapsibleSections = _a.collapsibleSections, tableData = _a.tableData, _d = _a.hideColumns, hideColumns = _d === void 0 ? [] : _d, hideDetails = _a.hideDetails, isMobile = _a.isMobile, openModal = _a.openModal, shouldHideDetails = _a.shouldHideDetails, title = _a.title, cellReplacements = _a.cellReplacements, imageComponent = _a.imageComponent;
39
- var _e = useState(null), isSectionOpen = _e[0], setOpenSection = _e[1];
38
+ var className = _a.className, collapsibleSections = _a.collapsibleSections, tableData = _a.tableData, _d = _a.hideColumns, hideColumns = _d === void 0 ? [] : _d, hideDetails = _a.hideDetails, _e = _a.hideRows, hideRows = _e === void 0 ? [] : _e, isMobile = _a.isMobile, openModal = _a.openModal, shouldHideDetails = _a.shouldHideDetails, title = _a.title, cellReplacements = _a.cellReplacements, imageComponent = _a.imageComponent;
39
+ var _f = useState(null), isSectionOpen = _f[0], setOpenSection = _f[1];
40
40
  var firstHeadRow = (_c = (_b = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _b === void 0 ? void 0 : _b.rows) === null || _c === void 0 ? void 0 : _c[0];
41
41
  var tableWidth = isMobile ? "".concat((firstHeadRow === null || firstHeadRow === void 0 ? void 0 : firstHeadRow.length) * 50, "%") : '';
42
42
  var handleToggleSection = function (index) {
@@ -44,6 +44,8 @@ var TableContents = function (_a) {
44
44
  return currentSection === index ? null : index;
45
45
  });
46
46
  };
47
+ // Calculate global row offset for each section
48
+ var globalRowOffset = 0;
47
49
  return (jsx("div", { style: { width: tableWidth }, children: tableData.map(function (_a, index) {
48
50
  var rows = _a.rows, _b = _a.section, section = _b === void 0 ? {} : _b;
49
51
  var isFirstSection = index === 0;
@@ -52,14 +54,21 @@ var TableContents = function (_a) {
52
54
  : isSectionOpen === index || isFirstSection;
53
55
  var isVisible = hideDetails ? !shouldHideDetails : true;
54
56
  var renderedIcon = (jsx(IconRenderer, { icon: section.icon, imageComponent: imageComponent, width: 20 }));
55
- return ((isFirstSection || isVisible) && (jsxs("div", { children: [(section === null || section === void 0 ? void 0 : section.title) && (jsx("div", { className: styles.cardWrapper, children: jsx("div", { className: classNames(styles.card, 'p0'), children: jsx(Card, __assign({ actionIcon: isExpanded ? (jsx(ChevronUpIcon, { size: 24 })) : (jsx(ChevronDownIcon, { size: 24 })), "aria-expanded": isExpanded ? 'true' : 'false', "aria-hidden": true, classNames: {
57
+ // Calculate section-specific hideRows based on global offset
58
+ var sectionHideRows = hideRows
59
+ .map(function (globalRowIndex) { return globalRowIndex - globalRowOffset; })
60
+ .filter(function (localRowIndex) { return localRowIndex >= 0 && localRowIndex < rows.length; });
61
+ var result = (isFirstSection || isVisible) && (jsxs("div", { children: [(section === null || section === void 0 ? void 0 : section.title) && (jsx("div", { className: styles.cardWrapper, children: jsx("div", { className: classNames(styles.card, 'p0'), children: jsx(Card, __assign({ actionIcon: isExpanded ? (jsx(ChevronUpIcon, { size: 24 })) : (jsx(ChevronDownIcon, { size: 24 })), "aria-expanded": isExpanded ? 'true' : 'false', "aria-hidden": true, classNames: {
56
62
  wrapper: 'bg-purple-50 pl16',
57
63
  icon: classNames(styles.cardIcon, 'tc-grey-900'),
58
64
  }, dropShadow: false, icon: renderedIcon, title: section.title, titleVariant: "medium" }, (collapsibleSections
59
65
  ? {
60
66
  onClick: function () { return handleToggleSection(index); },
61
67
  }
62
- : {}))) }) })), jsx(Collapsible, { isExpanded: isExpanded, children: jsx(TableSection, { className: classNames(className, 'mb24'), tableCellRows: isFirstSection ? rows : __spreadArray([firstHeadRow], rows, true), hideColumns: hideColumns, hideHeader: true, openModal: openModal, title: "".concat(title).concat((section === null || section === void 0 ? void 0 : section.title) ? " - ".concat(section.title) : ''), width: tableWidth, cellReplacements: cellReplacements, imageComponent: imageComponent }) })] }, index)));
68
+ : {}))) }) })), jsx(Collapsible, { isExpanded: isExpanded, children: jsx(TableSection, { className: classNames(className, 'mb24'), tableCellRows: isFirstSection ? rows : __spreadArray([firstHeadRow], rows, true), hideColumns: hideColumns, hideRows: sectionHideRows, hideHeader: true, openModal: openModal, title: "".concat(title).concat((section === null || section === void 0 ? void 0 : section.title) ? " - ".concat(section.title) : ''), width: tableWidth, cellReplacements: cellReplacements, imageComponent: imageComponent }) })] }, index));
69
+ // Update global offset for next section (excluding header row for non-first sections)
70
+ globalRowOffset += rows.length;
71
+ return result;
63
72
  }) }));
64
73
  };
65
74
 
@@ -1 +1 @@
1
- {"version":3,"file":"TableContents.js","sources":["../../../../../../../src/lib/components/table/components/TableContents/TableContents.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { TableSection } from '../TableSection/TableSection';\nimport { ChevronDownIcon, ChevronUpIcon } from '../../../icon';\nimport { Card } from '../../../cards/card';\n\nimport styles from './TableContents.module.scss';\nimport classNames from 'classnames';\nimport { Collapsible } from './Collapsible';\nimport { CellReplacements, ModalFunction, TableData } from '../../types';\nimport { IconRenderer } from '../IconRenderer/IconRenderer';\n\nexport interface TableContentsProps {\n className?: string;\n collapsibleSections?: boolean;\n tableData: TableData;\n hideColumns?: number[];\n hideDetails?: boolean;\n isMobile?: boolean;\n openModal?: ModalFunction;\n shouldHideDetails?: boolean;\n title: string;\n cellReplacements?: CellReplacements;\n imageComponent?: (args: any) => JSX.Element;\n}\n\nconst TableContents = ({\n className,\n collapsibleSections,\n tableData,\n hideColumns = [],\n hideDetails,\n isMobile,\n openModal,\n shouldHideDetails,\n title,\n cellReplacements,\n imageComponent,\n}: TableContentsProps) => {\n const [isSectionOpen, setOpenSection] = useState<number | null>(null);\n const firstHeadRow = tableData?.[0]?.rows?.[0];\n const tableWidth = isMobile ? `${firstHeadRow?.length * 50}%` : '';\n const handleToggleSection = (index: number) => {\n setOpenSection((currentSection) =>\n currentSection === index ? null : index\n );\n };\n\n return (\n <div style={{ width: tableWidth }}>\n {tableData.map(({ rows, section = {} }, index) => {\n const isFirstSection = index === 0;\n const isExpanded = !collapsibleSections\n ? true\n : isSectionOpen === index || isFirstSection;\n const isVisible = hideDetails ? !shouldHideDetails : true;\n\n const renderedIcon = (\n <IconRenderer icon={section.icon} imageComponent={imageComponent} width={20} />\n );\n\n return (\n (isFirstSection || isVisible) && (\n <div key={index}>\n {section?.title && (\n <div className={styles.cardWrapper}>\n <div className={classNames(styles.card, 'p0')}>\n <Card\n actionIcon={\n isExpanded ? (\n <ChevronUpIcon size={24} />\n ) : (\n <ChevronDownIcon size={24} />\n )\n }\n aria-expanded={isExpanded ? 'true' : 'false'}\n aria-hidden\n classNames={{\n wrapper: 'bg-purple-50 pl16',\n icon: classNames(styles.cardIcon, 'tc-grey-900'),\n }}\n dropShadow={false}\n icon={renderedIcon}\n title={section.title}\n titleVariant=\"medium\"\n {...(collapsibleSections\n ? {\n onClick: () => handleToggleSection(index),\n }\n : {})}\n />\n </div>\n </div>\n )}\n\n <Collapsible isExpanded={isExpanded}>\n <TableSection\n className={classNames(className, 'mb24')}\n tableCellRows={\n isFirstSection ? rows : [firstHeadRow, ...rows]\n }\n hideColumns={hideColumns}\n hideHeader\n openModal={openModal}\n title={`${title}${\n section?.title ? ` - ${section.title}` : ''\n }`}\n width={tableWidth}\n cellReplacements={cellReplacements}\n imageComponent={imageComponent}\n />\n </Collapsible>\n </div>\n )\n );\n })}\n </div>\n );\n};\n\nexport { TableContents };\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyBM,aAAa,GAAG,UAAC,EAYF;;QAXnB,SAAS,eAAA,EACT,mBAAmB,yBAAA,EACnB,SAAS,eAAA,EACT,mBAAgB,EAAhB,WAAW,mBAAG,EAAE,KAAA,EAChB,WAAW,iBAAA,EACX,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,iBAAiB,uBAAA,EACjB,KAAK,WAAA,EACL,gBAAgB,sBAAA,EAChB,cAAc,oBAAA;IAER,IAAA,KAAkC,QAAQ,CAAgB,IAAI,CAAC,EAA9D,aAAa,QAAA,EAAE,cAAc,QAAiC,CAAC;IACtE,IAAM,YAAY,GAAG,MAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,CAAC,CAAC,0CAAE,IAAI,0CAAG,CAAC,CAAC,CAAC;IAC/C,IAAM,UAAU,GAAG,QAAQ,GAAG,UAAG,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,IAAG,EAAE,MAAG,GAAG,EAAE,CAAC;IACnE,IAAM,mBAAmB,GAAG,UAAC,KAAa;QACxC,cAAc,CAAC,UAAC,cAAc;YAC5B,OAAA,cAAc,KAAK,KAAK,GAAG,IAAI,GAAG,KAAK;SAAA,CACxC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AAA,mBAAmB,CAAC,KAAK,CAAC,GAAA;iCAC1C;kCACD,EAAE,GACN,GACE,GACF,CACP,EAEDA,IAAC,WAAW,IAAC,UAAU,EAAE,UAAU,YACjCA,IAAC,YAAY,IACX,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,EACxC,aAAa,EACX,cAAc,GAAG,IAAI,kBAAI,YAAY,GAAK,IAAI,OAAC,EAEjD,WAAW,EAAE,WAAW,EACxB,UAAU,QACV,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,UAAG,KAAK,SACb,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,IAAG,aAAM,OAAO,CAAC,KAAK,CAAE,GAAG,EAAE,CAC3C,EACF,KAAK,EAAE,UAAU,EACjB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,GAC9B,GACU,KAhDN,KAAK,CAiDT,CACP,EACD;SACH,CAAC,GACE,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"TableContents.js","sources":["../../../../../../../src/lib/components/table/components/TableContents/TableContents.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { TableSection } from '../TableSection/TableSection';\nimport { ChevronDownIcon, ChevronUpIcon } from '../../../icon';\nimport { Card } from '../../../cards/card';\n\nimport styles from './TableContents.module.scss';\nimport classNames from 'classnames';\nimport { Collapsible } from './Collapsible';\nimport { CellReplacements, ModalFunction, TableData } from '../../types';\nimport { IconRenderer } from '../IconRenderer/IconRenderer';\n\nexport interface TableContentsProps {\n className?: string;\n collapsibleSections?: boolean;\n tableData: TableData;\n hideColumns?: number[];\n hideDetails?: boolean;\n hideRows?: number[];\n isMobile?: boolean;\n openModal?: ModalFunction;\n shouldHideDetails?: boolean;\n title: string;\n cellReplacements?: CellReplacements;\n imageComponent?: (args: any) => JSX.Element;\n}\n\nconst TableContents = ({\n className,\n collapsibleSections,\n tableData,\n hideColumns = [],\n hideDetails,\n hideRows = [],\n isMobile,\n openModal,\n shouldHideDetails,\n title,\n cellReplacements,\n imageComponent,\n}: TableContentsProps) => {\n const [isSectionOpen, setOpenSection] = useState<number | null>(null);\n const firstHeadRow = tableData?.[0]?.rows?.[0];\n const tableWidth = isMobile ? `${firstHeadRow?.length * 50}%` : '';\n const handleToggleSection = (index: number) => {\n setOpenSection((currentSection) =>\n currentSection === index ? null : index\n );\n };\n\n // Calculate global row offset for each section\n let globalRowOffset = 0;\n\n return (\n <div style={{ width: tableWidth }}>\n {tableData.map(({ rows, section = {} }, index) => {\n const isFirstSection = index === 0;\n const isExpanded = !collapsibleSections\n ? true\n : isSectionOpen === index || isFirstSection;\n const isVisible = hideDetails ? !shouldHideDetails : true;\n\n const renderedIcon = (\n <IconRenderer icon={section.icon} imageComponent={imageComponent} width={20} />\n );\n\n // Calculate section-specific hideRows based on global offset\n const sectionHideRows = hideRows\n .map(globalRowIndex => globalRowIndex - globalRowOffset)\n .filter(localRowIndex => localRowIndex >= 0 && localRowIndex < rows.length);\n\n const result = (isFirstSection || isVisible) && (\n <div key={index}>\n {section?.title && (\n <div className={styles.cardWrapper}>\n <div className={classNames(styles.card, 'p0')}>\n <Card\n actionIcon={\n isExpanded ? (\n <ChevronUpIcon size={24} />\n ) : (\n <ChevronDownIcon size={24} />\n )\n }\n aria-expanded={isExpanded ? 'true' : 'false'}\n aria-hidden\n classNames={{\n wrapper: 'bg-purple-50 pl16',\n icon: classNames(styles.cardIcon, 'tc-grey-900'),\n }}\n dropShadow={false}\n icon={renderedIcon}\n title={section.title}\n titleVariant=\"medium\"\n {...(collapsibleSections\n ? {\n onClick: () => handleToggleSection(index),\n }\n : {})}\n />\n </div>\n </div>\n )}\n\n <Collapsible isExpanded={isExpanded}>\n <TableSection\n className={classNames(className, 'mb24')}\n tableCellRows={\n isFirstSection ? rows : [firstHeadRow, ...rows]\n }\n hideColumns={hideColumns}\n hideRows={sectionHideRows}\n hideHeader\n openModal={openModal}\n title={`${title}${\n section?.title ? ` - ${section.title}` : ''\n }`}\n width={tableWidth}\n cellReplacements={cellReplacements}\n imageComponent={imageComponent}\n />\n </Collapsible>\n </div>\n );\n\n // Update global offset for next section (excluding header row for non-first sections)\n globalRowOffset += rows.length;\n\n return result;\n })}\n </div>\n );\n};\n\nexport { TableContents };\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0BM,aAAa,GAAG,UAAC,EAaF;;QAZnB,SAAS,eAAA,EACT,mBAAmB,yBAAA,EACnB,SAAS,eAAA,EACT,mBAAgB,EAAhB,WAAW,mBAAG,EAAE,KAAA,EAChB,WAAW,iBAAA,EACX,gBAAa,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,iBAAiB,uBAAA,EACjB,KAAK,WAAA,EACL,gBAAgB,sBAAA,EAChB,cAAc,oBAAA;IAER,IAAA,KAAkC,QAAQ,CAAgB,IAAI,CAAC,EAA9D,aAAa,QAAA,EAAE,cAAc,QAAiC,CAAC;IACtE,IAAM,YAAY,GAAG,MAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,CAAC,CAAC,0CAAE,IAAI,0CAAG,CAAC,CAAC,CAAC;IAC/C,IAAM,UAAU,GAAG,QAAQ,GAAG,UAAG,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,IAAG,EAAE,MAAG,GAAG,EAAE,CAAC;IACnE,IAAM,mBAAmB,GAAG,UAAC,KAAa;QACxC,cAAc,CAAC,UAAC,cAAc;YAC5B,OAAA,cAAc,KAAK,KAAK,GAAG,IAAI,GAAG,KAAK;SAAA,CACxC,CAAC;KACH,CAAC;;IAGF,IAAI,eAAe,GAAG,CAAC,CAAC;IAExB,QACEA,aAAK,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,YAC9B,SAAS,CAAC,GAAG,CAAC,UAAC,EAAsB,EAAE,KAAK;gBAA3B,IAAI,UAAA,EAAE,eAAY,EAAZ,OAA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AC,QAAQ,KAChB,mBAAmB;kCACpB;oCACE,OAAO,EAAE,cAAM,OAAA,mBAAmB,CAAC,KAAK,CAAC,GAAA;iCAC1C;kCACD,EAAE,GACN,GACE,GACF,CACP,EAEDA,IAAC,WAAW,IAAC,UAAU,EAAE,UAAU,YACjCA,IAAC,YAAY,IACX,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,EACxC,aAAa,EACX,cAAc,GAAG,IAAI,kBAAI,YAAY,GAAK,IAAI,OAAC,EAEjD,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,eAAe,EACzB,UAAU,QACV,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,UAAG,KAAK,SACb,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,IAAG,aAAM,OAAO,CAAC,KAAK,CAAE,GAAG,EAAE,CAC3C,EACF,KAAK,EAAE,UAAU,EACjB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,GAC9B,GACU,KAjDN,KAAK,CAkDT,CACP,CAAC;;YAGF,eAAe,IAAI,IAAI,CAAC,MAAM,CAAC;YAE/B,OAAO,MAAM,CAAC;SACf,CAAC,GACE,EACN;AACJ;;;;"}
@@ -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 '../../../../TableSection-f41d4248.js';
9
+ import '../../../../TableSection-9cf86eb7.js';
10
10
  import '../../../../index-6ea95111.js';
11
11
  import '../../../../style-inject.es-1f59c1d0.js';
12
12
  import '../TableCell/TableCell.js';
@@ -23,11 +23,11 @@ import '../../../icon/icons/Info.js';
23
23
  import '../../../../index-5e72c3d4.js';
24
24
  import '../TableCell/CTACell/CTACell.js';
25
25
  import '../IconRenderer/IconRenderer.js';
26
+ import '../../../button/index.js';
26
27
  import '../TableCell/CardCell/CardCell.js';
27
28
  import '../../../cards/card/index.js';
28
29
  import '../../../icon/icons/ChevronRight.js';
29
30
  import '../TableCell/ButtonCell/ButtonCell.js';
30
- import '../../../button/index.js';
31
31
  import '../../../../useMediaQuery-1a3a2432.js';
32
32
  import '../../../icon/icons/ChevronDown.js';
33
33
  import '../../../icon/icons/ChevronUp.js';
@@ -1,7 +1,7 @@
1
1
  import '../../../../tslib.es6-a39f91fc.js';
2
2
  import 'react/jsx-runtime';
3
3
  import '../../../../index-6ea95111.js';
4
- export { T as TableSection } from '../../../../TableSection-f41d4248.js';
4
+ export { T as TableSection } from '../../../../TableSection-9cf86eb7.js';
5
5
  import '../TableCell/TableCell.js';
6
6
  import 'react';
7
7
  import '../../../../useMediaQuery-1a3a2432.js';
@@ -20,9 +20,9 @@ import '../../../icon/icons/Info.js';
20
20
  import '../../../../index-5e72c3d4.js';
21
21
  import '../TableCell/CTACell/CTACell.js';
22
22
  import '../IconRenderer/IconRenderer.js';
23
+ import '../../../button/index.js';
23
24
  import '../TableCell/CardCell/CardCell.js';
24
25
  import '../../../cards/card/index.js';
25
26
  import '../../../icon/icons/ChevronRight.js';
26
27
  import '../TableCell/ButtonCell/ButtonCell.js';
27
- import '../../../button/index.js';
28
28
  //# sourceMappingURL=TableSection.js.map
@@ -1,7 +1,7 @@
1
1
  import { a as __assign } from '../../../../tslib.es6-a39f91fc.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { c as customRender, s as screen } from '../../../../customRender-be47569b.js';
4
- import { T as TableSection } from '../../../../TableSection-f41d4248.js';
4
+ import { T as TableSection } from '../../../../TableSection-9cf86eb7.js';
5
5
  import 'react';
6
6
  import 'react-dom';
7
7
  import '../../../../_commonjsHelpers-4730bd53.js';
@@ -22,11 +22,11 @@ import '../../../icon/icons/Info.js';
22
22
  import '../../../../index-5e72c3d4.js';
23
23
  import '../TableCell/CTACell/CTACell.js';
24
24
  import '../IconRenderer/IconRenderer.js';
25
+ import '../../../button/index.js';
25
26
  import '../TableCell/CardCell/CardCell.js';
26
27
  import '../../../cards/card/index.js';
27
28
  import '../../../icon/icons/ChevronRight.js';
28
29
  import '../TableCell/ButtonCell/ButtonCell.js';
29
- import '../../../button/index.js';
30
30
  import '../../../../useMediaQuery-1a3a2432.js';
31
31
 
32
32
  var tableCellRows = [
@@ -786,4 +786,4 @@ var icons = /*#__PURE__*/Object.freeze({
786
786
  });
787
787
 
788
788
  export { icons as i };
789
- //# sourceMappingURL=index-608a56e3.js.map
789
+ //# sourceMappingURL=index-d2e06251.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-608a56e3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index-d2e06251.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/esm/index.js CHANGED
@@ -458,7 +458,7 @@ import './components/table/components/IconRenderer/IconRenderer.js';
458
458
  import './components/table/components/TableCell/CardCell/CardCell.js';
459
459
  import './components/table/components/TableCell/ButtonCell/ButtonCell.js';
460
460
  import './components/table/components/TableContents/TableContents.js';
461
- import './TableSection-f41d4248.js';
461
+ import './TableSection-9cf86eb7.js';
462
462
  import './components/table/components/TableContents/Collapsible.js';
463
463
  import './useTableNavigation-f929fbc9.js';
464
464
  import './components/table/components/TableControls/TableControls.js';
@@ -10,6 +10,7 @@ export interface TableProps {
10
10
  collapsibleSections?: boolean;
11
11
  hideColumns?: number[];
12
12
  hideDetails?: boolean;
13
+ hideRows?: number[];
13
14
  imageComponent?: (args: any) => JSX.Element;
14
15
  modalContentRenderer?: (content: ReactNode) => ReactNode;
15
16
  onModalOpen?: ModalFunction;
@@ -19,5 +20,5 @@ export interface TableProps {
19
20
  textOverrides?: TextOverrides;
20
21
  title: string;
21
22
  }
22
- declare const Table: ({ cellReplacements, className, collapsibleSections, hideColumns, hideDetails, imageComponent, modalContentRenderer, onModalOpen, onSelectionChanged, stickyHeaderTopOffset, tableData, textOverrides: definedTextOverrides, title, }: TableProps) => JSX.Element;
23
+ declare const Table: ({ cellReplacements, className, collapsibleSections, hideColumns, hideDetails, hideRows, imageComponent, modalContentRenderer, onModalOpen, onSelectionChanged, stickyHeaderTopOffset, tableData, textOverrides: definedTextOverrides, title, }: TableProps) => JSX.Element;
23
24
  export { Table };
@@ -2,7 +2,7 @@ import { TableProps } from './Table';
2
2
  import { TableData } from './types';
3
3
  declare const story: {
4
4
  title: string;
5
- component: ({ cellReplacements, className, collapsibleSections, hideColumns, hideDetails, imageComponent, modalContentRenderer, onModalOpen, onSelectionChanged, stickyHeaderTopOffset, tableData, textOverrides: definedTextOverrides, title, }: TableProps) => JSX.Element;
5
+ component: ({ cellReplacements, className, collapsibleSections, hideColumns, hideDetails, hideRows, imageComponent, modalContentRenderer, onModalOpen, onSelectionChanged, stickyHeaderTopOffset, tableData, textOverrides: definedTextOverrides, title, }: TableProps) => JSX.Element;
6
6
  argTypes: {
7
7
  tableData: {
8
8
  subContent: string;
@@ -28,6 +28,9 @@ declare const story: {
28
28
  hideColumns: {
29
29
  subContent: string;
30
30
  };
31
+ hideRows: {
32
+ subContent: string;
33
+ };
31
34
  modalContentRenderer: {
32
35
  subContent: string;
33
36
  };
@@ -56,10 +59,11 @@ declare const story: {
56
59
  hideDetails: string;
57
60
  };
58
61
  hideColumns: never[];
62
+ hideRows: never[];
59
63
  };
60
64
  };
61
65
  export declare const TableStory: {
62
- ({ collapsibleSections, tableData, hideColumns, hideDetails, stickyHeaderTopOffset, textOverrides, title, }: TableProps): JSX.Element;
66
+ ({ collapsibleSections, tableData, hideColumns, hideDetails, hideRows, stickyHeaderTopOffset, textOverrides, title, }: TableProps): JSX.Element;
63
67
  storyName: string;
64
68
  };
65
69
  export declare const TableDataType: () => JSX.Element;
@@ -11,5 +11,6 @@ export type CTACellProps = {
11
11
  className?: string;
12
12
  dataTestId?: string;
13
13
  dataCy?: string;
14
+ onClick?: () => void;
14
15
  };
15
- export declare const CTACell: ({ title, price, icon, grey, narrow, href, buttonCaption, imageComponent, className, dataCy, dataTestId, }: CTACellProps) => JSX.Element;
16
+ export declare const CTACell: ({ title, price, icon, grey, narrow, href, buttonCaption, imageComponent, className, dataCy, dataTestId, onClick, }: CTACellProps) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { CTACell } from './CTACell';
2
2
  declare const story: {
3
3
  title: string;
4
- component: ({ title, price, icon, grey, narrow, href, buttonCaption, imageComponent, className, dataCy, dataTestId, }: import("./CTACell").CTACellProps) => JSX.Element;
4
+ component: ({ title, price, icon, grey, narrow, href, buttonCaption, imageComponent, className, dataCy, dataTestId, onClick, }: import("./CTACell").CTACellProps) => JSX.Element;
5
5
  argTypes: {};
6
6
  args: {
7
7
  title: string;
@@ -5,6 +5,7 @@ export interface TableContentsProps {
5
5
  tableData: TableData;
6
6
  hideColumns?: number[];
7
7
  hideDetails?: boolean;
8
+ hideRows?: number[];
8
9
  isMobile?: boolean;
9
10
  openModal?: ModalFunction;
10
11
  shouldHideDetails?: boolean;
@@ -12,5 +13,5 @@ export interface TableContentsProps {
12
13
  cellReplacements?: CellReplacements;
13
14
  imageComponent?: (args: any) => JSX.Element;
14
15
  }
15
- declare const TableContents: ({ className, collapsibleSections, tableData, hideColumns, hideDetails, isMobile, openModal, shouldHideDetails, title, cellReplacements, imageComponent, }: TableContentsProps) => JSX.Element;
16
+ declare const TableContents: ({ className, collapsibleSections, tableData, hideColumns, hideDetails, hideRows, isMobile, openModal, shouldHideDetails, title, cellReplacements, imageComponent, }: TableContentsProps) => JSX.Element;
16
17
  export { TableContents };
@@ -3,6 +3,7 @@ export interface TableSectionProps {
3
3
  className?: string;
4
4
  tableCellRows: TableCellRowData[];
5
5
  hideColumns?: number[];
6
+ hideRows?: number[];
6
7
  hideHeader?: boolean;
7
8
  openModal?: ModalFunction;
8
9
  title: string;
@@ -10,5 +11,5 @@ export interface TableSectionProps {
10
11
  cellReplacements?: CellReplacements;
11
12
  imageComponent?: (args: any) => JSX.Element;
12
13
  }
13
- declare const TableSection: ({ className, tableCellRows, hideColumns, hideHeader, openModal, title, width, cellReplacements, imageComponent, }: TableSectionProps) => JSX.Element;
14
+ declare const TableSection: ({ className, tableCellRows, hideColumns, hideRows, hideHeader, openModal, title, width, cellReplacements, imageComponent, }: TableSectionProps) => JSX.Element;
14
15
  export { TableSection };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popsure/dirty-swan",
3
- "version": "0.58.5",
3
+ "version": "0.58.7",
4
4
  "author": "Vincent Audoire <vincent@getpopsure.com>",
5
5
  "license": "MIT",
6
6
  "private": false,