@popsure/dirty-swan 0.57.1 → 0.57.3

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 (27) hide show
  1. package/dist/cjs/index.js +5 -9
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/lib/components/table/types.d.ts +1 -0
  4. package/dist/esm/{TableSection-a6e85f15.js → TableSection-a26ba0c5.js} +2 -6
  5. package/dist/esm/TableSection-a26ba0c5.js.map +1 -0
  6. package/dist/esm/components/table/Table.js +3 -3
  7. package/dist/esm/components/table/Table.js.map +1 -1
  8. package/dist/esm/components/table/Table.stories.js +10 -3
  9. package/dist/esm/components/table/Table.stories.js.map +1 -1
  10. package/dist/esm/components/table/Table.test.js +1 -1
  11. package/dist/esm/components/table/components/TableContents/TableContents.js +1 -1
  12. package/dist/esm/components/table/components/TableContents/TableContents.test.js +1 -1
  13. package/dist/esm/components/table/components/TableControls/TableControls.js +2 -2
  14. package/dist/esm/components/table/components/TableControls/TableControls.js.map +1 -1
  15. package/dist/esm/components/table/components/TableSection/TableSection.js +1 -1
  16. package/dist/esm/components/table/components/TableSection/TableSection.test.js +1 -1
  17. package/dist/esm/index.js +1 -1
  18. package/dist/esm/lib/components/table/types.d.ts +1 -0
  19. package/package.json +1 -1
  20. package/src/lib/components/table/Table.module.scss +0 -1
  21. package/src/lib/components/table/Table.stories.tsx +9 -2
  22. package/src/lib/components/table/Table.tsx +1 -1
  23. package/src/lib/components/table/components/TableControls/TableControls.module.scss +0 -1
  24. package/src/lib/components/table/components/TableControls/TableControls.tsx +1 -1
  25. package/src/lib/components/table/components/TableSection/TableSection.tsx +1 -7
  26. package/src/lib/components/table/types.ts +1 -0
  27. package/dist/esm/TableSection-a6e85f15.js.map +0 -1
package/dist/cjs/index.js CHANGED
@@ -16250,7 +16250,7 @@ var TableCell = React__default['default'].memo(function (_a) {
16250
16250
  : (_c = cellProps.fontVariant) !== null && _c !== void 0 ? _c : 'NORMAL' }))), cellProps.type === 'CTA' && jsxRuntime.jsx(CTACell, __assign({}, cellProps)), cellProps.type === 'BUTTON' && jsxRuntime.jsx(ButtonCell, __assign({}, cellProps)), cellProps.type === 'CARD' && jsxRuntime.jsx(CardCell, __assign({}, cellProps))] })));
16251
16251
  });
16252
16252
 
16253
- var css_248z$4 = ".Table-module_wrapper__2MMNq {\n position: relative;\n}\n\n.Table-module_container__3VFLP {\n overflow-x: auto;\n overflow-y: hidden;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n -webkit-overflow-scrolling: touch;\n scroll-snap-type: x mandatory;\n}\n.Table-module_container__3VFLP::-webkit-scrollbar {\n display: none;\n}\n@media (min-width: 34rem) {\n .Table-module_container__3VFLP {\n scroll-snap-type: unset;\n }\n}\n\n.Table-module_stickyHeader__2uEpP {\n display: flex;\n position: sticky;\n z-index: 9;\n top: 0;\n}\n\n@media (max-width: 34rem) {\n .Table-module_modalContent__1PNgv {\n min-width: initial;\n }\n}";
16253
+ var css_248z$4 = ".Table-module_wrapper__2MMNq {\n position: relative;\n}\n\n.Table-module_container__3VFLP {\n overflow-x: auto;\n overflow-y: hidden;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n -webkit-overflow-scrolling: touch;\n scroll-snap-type: x mandatory;\n}\n.Table-module_container__3VFLP::-webkit-scrollbar {\n display: none;\n}\n@media (min-width: 34rem) {\n .Table-module_container__3VFLP {\n scroll-snap-type: unset;\n }\n}\n\n.Table-module_stickyHeader__2uEpP {\n display: flex;\n position: sticky;\n z-index: 9;\n}\n\n@media (max-width: 34rem) {\n .Table-module_modalContent__1PNgv {\n min-width: initial;\n }\n}";
16254
16254
  var styles$4 = {"wrapper":"Table-module_wrapper__2MMNq","container":"Table-module_container__3VFLP","stickyHeader":"Table-module_stickyHeader__2uEpP","modalContent":"Table-module_modalContent__1PNgv"};
16255
16255
  styleInject(css_248z$4);
16256
16256
 
@@ -16363,16 +16363,12 @@ var TableSection = function (_a) {
16363
16363
  var key = "".concat(rowIndex, "-").concat(cellIndex);
16364
16364
  var isFirstCellInRow = cellIndex === 0;
16365
16365
  var titleFromRow = getModalTitleFromRowHeader(row);
16366
- var titleFromColumnOrRow = getModalTitleFromColumnHeader(cellIndex) ||
16367
- getModalTitleFromRowHeader(row);
16368
16366
  var cellReplacementData = (tableCellData.cellId &&
16369
16367
  (cellReplacements === null || cellReplacements === void 0 ? void 0 : cellReplacements[tableCellData.cellId])) ||
16370
16368
  {};
16371
16369
  var cellProps = __assign(__assign(__assign({}, tableCellData), cellReplacementData), {
16372
16370
  openModal: openModal,
16373
- modalTitle: isFirstCellInRow
16374
- ? titleFromRow
16375
- : titleFromColumnOrRow,
16371
+ modalTitle: (tableCellData === null || tableCellData === void 0 ? void 0 : tableCellData.modalTitle) || titleFromRow,
16376
16372
  align: isFirstCellInRow ? 'left' : 'center',
16377
16373
  });
16378
16374
  return (!hideColumns.includes(cellIndex) && (jsxRuntime.jsx(TableCell, __assign({ isBelowDesktop: isBelowDesktop, isFirstCellInRow: isFirstCellInRow }, cellProps, { imageComponent: imageComponent }), key)));
@@ -16502,13 +16498,13 @@ var useTableNavigation = function (_a) {
16502
16498
  };
16503
16499
  };
16504
16500
 
16505
- var css_248z = ".TableControls-module_stickyHeader__1f6Ta {\n display: flex;\n position: sticky;\n left: 0;\n right: 0;\n min-height: 72px;\n z-index: 9;\n top: 0;\n}\n\n.TableControls-module_controlButton__2kQiG {\n border-radius: 50% !important;\n width: 32px;\n height: 32px;\n padding: 0;\n min-width: 32px;\n}";
16501
+ var css_248z = ".TableControls-module_stickyHeader__1f6Ta {\n display: flex;\n position: sticky;\n left: 0;\n right: 0;\n min-height: 72px;\n z-index: 9;\n}\n\n.TableControls-module_controlButton__2kQiG {\n border-radius: 50% !important;\n width: 32px;\n height: 32px;\n padding: 0;\n min-width: 32px;\n}";
16506
16502
  var styles = {"stickyHeader":"TableControls-module_stickyHeader__1f6Ta","controlButton":"TableControls-module_controlButton__2kQiG"};
16507
16503
  styleInject(css_248z);
16508
16504
 
16509
16505
  var TableControls = function (_a) {
16510
16506
  var activeSection = _a.activeSection, children = _a.children, columnsLength = _a.columnsLength, stickyHeaderTopOffset = _a.stickyHeaderTopOffset, navigateTable = _a.navigateTable;
16511
- return (jsxRuntime.jsxs("div", { "aria-hidden": true, className: classNames$1('d-flex ai-center jc-between bg-white px8', styles.stickyHeader), style: { paddingTop: "".concat(stickyHeaderTopOffset, "px") }, children: [jsxRuntime.jsx(Button, { className: styles.controlButton, disabled: activeSection <= 1, hideLabel: true, leftIcon: jsxRuntime.jsx(ChevronLeftIcon, {}), onClick: function () { return navigateTable(); }, type: "button", variant: "filledGray", "data-testid": "previous-section-button", children: "Previous section" }), children, jsxRuntime.jsx(Button, { className: styles.controlButton, disabled: activeSection >= columnsLength - 1, hideLabel: true, leftIcon: jsxRuntime.jsx(ChevronRightIcon, {}), onClick: function () { return navigateTable(true); }, type: "button", variant: "filledGray", "data-testid": "next-section-button", children: "Next section" })] }));
16507
+ return (jsxRuntime.jsxs("div", { "aria-hidden": true, className: classNames$1('d-flex ai-center jc-between bg-white px8', styles.stickyHeader), style: { top: "".concat(stickyHeaderTopOffset, "px") }, children: [jsxRuntime.jsx(Button, { className: styles.controlButton, disabled: activeSection <= 1, hideLabel: true, leftIcon: jsxRuntime.jsx(ChevronLeftIcon, {}), onClick: function () { return navigateTable(); }, type: "button", variant: "filledGray", "data-testid": "previous-section-button", children: "Previous section" }), children, jsxRuntime.jsx(Button, { className: styles.controlButton, disabled: activeSection >= columnsLength - 1, hideLabel: true, leftIcon: jsxRuntime.jsx(ChevronRightIcon, {}), onClick: function () { return navigateTable(true); }, type: "button", variant: "filledGray", "data-testid": "next-section-button", children: "Next section" })] }));
16512
16508
  };
16513
16509
 
16514
16510
  var useScrollSync = function (sourceRef, targetRef, enabled) {
@@ -16579,7 +16575,7 @@ var Table = function (_a) {
16579
16575
  });
16580
16576
  },
16581
16577
  }
16582
- : {}), activeCellProps, { imageComponent: imageComponent, isNavigation: true })) })] })) : (jsxRuntime.jsx("div", { "aria-hidden": true, className: styles$4.stickyHeader, style: { paddingTop: "".concat(stickyHeaderTopOffset, "px") }, children: jsxRuntime.jsx("div", { className: styles$4.container, ref: headerRef, children: jsxRuntime.jsx(TableSection, { cellReplacements: cellReplacements, className: className, hideColumns: hideColumns, openModal: handleOpenModal, tableCellRows: [(_j = (_h = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _h === void 0 ? void 0 : _h.rows) === null || _j === void 0 ? void 0 : _j[0]], title: title, imageComponent: imageComponent }) }) })), jsxRuntime.jsx("div", { ref: containerRef, className: classNames$1(styles$4.container, 'pb8'), children: jsxRuntime.jsx(TableContents, { tableData: tableData, title: title, className: className, collapsibleSections: collapsibleSections, hideColumns: hideColumns, hideDetails: hideDetails, isMobile: isMobile, shouldHideDetails: shouldHideDetails, openModal: handleOpenModal, cellReplacements: cellReplacements, imageComponent: imageComponent }) }), (tableData === null || tableData === void 0 ? void 0 : tableData.length) > 1 && hideDetails && (jsxRuntime.jsx(Card, { "data-testid": "show-hide-details", classNames: {
16578
+ : {}), activeCellProps, { imageComponent: imageComponent, isNavigation: true })) })] })) : (jsxRuntime.jsx("div", { "aria-hidden": true, className: styles$4.stickyHeader, style: { top: "".concat(stickyHeaderTopOffset, "px") }, children: jsxRuntime.jsx("div", { className: styles$4.container, ref: headerRef, children: jsxRuntime.jsx(TableSection, { cellReplacements: cellReplacements, className: className, hideColumns: hideColumns, openModal: handleOpenModal, tableCellRows: [(_j = (_h = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _h === void 0 ? void 0 : _h.rows) === null || _j === void 0 ? void 0 : _j[0]], title: title, imageComponent: imageComponent }) }) })), jsxRuntime.jsx("div", { ref: containerRef, className: classNames$1(styles$4.container, 'pb8'), children: jsxRuntime.jsx(TableContents, { tableData: tableData, title: title, className: className, collapsibleSections: collapsibleSections, hideColumns: hideColumns, hideDetails: hideDetails, isMobile: isMobile, shouldHideDetails: shouldHideDetails, openModal: handleOpenModal, cellReplacements: cellReplacements, imageComponent: imageComponent }) }), (tableData === null || tableData === void 0 ? void 0 : tableData.length) > 1 && hideDetails && (jsxRuntime.jsx(Card, { "data-testid": "show-hide-details", classNames: {
16583
16579
  buttonWrapper: 'm8 mt32',
16584
16580
  title: 'd-flex gap8 ai-center jc-center fw-bold',
16585
16581
  wrapper: 'bg-grey-200',