@popsure/dirty-swan 0.54.18 → 0.54.20

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 (37) hide show
  1. package/dist/cjs/index.js +21 -21
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/lib/components/button/index.d.ts +4 -9
  4. package/dist/cjs/lib/components/button/index.stories.d.ts +2 -10
  5. package/dist/cjs/lib/components/table/Table.d.ts +0 -1
  6. package/dist/esm/{Calendar-4888a88a.js → Calendar-b3696fae.js} +1 -1
  7. package/dist/esm/{Calendar-4888a88a.js.map → Calendar-b3696fae.js.map} +1 -1
  8. package/dist/esm/{TableSection-88c788b5.js → TableSection-acee6473.js} +1 -1
  9. package/dist/esm/{TableSection-88c788b5.js.map → TableSection-acee6473.js.map} +1 -1
  10. package/dist/esm/components/button/index.js +2 -3
  11. package/dist/esm/components/button/index.js.map +1 -1
  12. package/dist/esm/components/button/index.stories.js +3 -12
  13. package/dist/esm/components/button/index.stories.js.map +1 -1
  14. package/dist/esm/components/cards/card/index.js.map +1 -1
  15. package/dist/esm/components/dateSelector/components/Calendar.js +1 -1
  16. package/dist/esm/components/dateSelector/index.js +1 -1
  17. package/dist/esm/components/dateSelector/index.stories.js +1 -1
  18. package/dist/esm/components/dateSelector/index.test.js +1 -1
  19. package/dist/esm/components/table/Table.js +20 -19
  20. package/dist/esm/components/table/Table.js.map +1 -1
  21. package/dist/esm/components/table/Table.stories.js +1 -1
  22. package/dist/esm/components/table/Table.test.js +1 -1
  23. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js +1 -1
  24. package/dist/esm/components/table/components/TableContents/TableContents.js +1 -1
  25. package/dist/esm/components/table/components/TableContents/TableContents.test.js +1 -1
  26. package/dist/esm/components/table/components/TableSection/TableSection.js +1 -1
  27. package/dist/esm/components/table/components/TableSection/TableSection.test.js +1 -1
  28. package/dist/esm/index.js +2 -2
  29. package/dist/esm/lib/components/button/index.d.ts +4 -9
  30. package/dist/esm/lib/components/button/index.stories.d.ts +2 -10
  31. package/dist/esm/lib/components/table/Table.d.ts +0 -1
  32. package/package.json +1 -1
  33. package/src/lib/components/button/index.stories.tsx +1 -26
  34. package/src/lib/components/button/index.tsx +10 -21
  35. package/src/lib/components/cards/card/index.tsx +1 -1
  36. package/src/lib/components/table/Table.tsx +38 -23
  37. package/src/lib/components/table/components/TableCell/BaseCell/BaseCell.module.scss +1 -5
package/dist/cjs/index.js CHANGED
@@ -3852,9 +3852,8 @@ var buttonTypeClassNameMap = {
3852
3852
  filledError: 'p-btn--danger',
3853
3853
  };
3854
3854
  var Button = require$$0__default['default'].forwardRef(function (_a, ref) {
3855
- var as = _a.as, className = _a.className, _b = _a.loading, loading = _b === void 0 ? false : _b, children = _a.children, _c = _a.variant, variant = _c === void 0 ? 'filledColor' : _c, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, hideLabel = _a.hideLabel, props = __rest$1(_a, ["as", "className", "loading", "children", "variant", "leftIcon", "rightIcon", "hideLabel"]);
3856
- var ButtonTag = as || 'button';
3857
- return (jsxRuntime.jsx(ButtonTag, __assign({ ref: ref, className: classNames$1(buttonTypeClassNameMap[variant], className, {
3855
+ var className = _a.className, _b = _a.loading, loading = _b === void 0 ? false : _b, children = _a.children, _c = _a.variant, variant = _c === void 0 ? 'filledColor' : _c, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, hideLabel = _a.hideLabel, props = __rest$1(_a, ["className", "loading", "children", "variant", "leftIcon", "rightIcon", "hideLabel"]);
3856
+ return (jsxRuntime.jsx("button", __assign({ ref: ref, className: classNames$1(buttonTypeClassNameMap[variant], className, {
3858
3857
  'p-btn--loading': loading,
3859
3858
  'tc-transparent': loading,
3860
3859
  'p-btn--icon-only': hideLabel,
@@ -14361,7 +14360,7 @@ var css_248z$9 = ".TableCell-module_th__2rjCU {\n vertical-align: middle;\n sc
14361
14360
  var styles$9 = {"th":"TableCell-module_th__2rjCU","thNavigation":"TableCell-module_thNavigation__qZ2sY","fixedCell":"TableCell-module_fixedCell__cL3-m","fixedCard":"TableCell-module_fixedCard__2LO8s"};
14362
14361
  styleInject(css_248z$9);
14363
14362
 
14364
- var css_248z$8 = ".BaseCell-module_relative__1v2X0 {\n position: relative;\n}\n\n.BaseCell-module_infoButtonAbsolute__Mpjrz {\n position: absolute;\n right: -32px;\n}\n\n.BaseCell-module_icon__1775U {\n margin: 2px;\n}\n\n.BaseCell-module_description__3_kfe {\n word-break: break-word;\n}\n\n.BaseCell-module_bigWithUnderline__2xx5X {\n position: relative;\n display: none;\n line-height: 38px;\n text-decoration: underline;\n text-decoration-color: #8e8cee;\n text-decoration-thickness: 4px;\n text-underline-offset: 8px;\n}\n@media (min-width: 34rem) {\n .BaseCell-module_bigWithUnderline__2xx5X {\n display: flex;\n }\n}";
14363
+ var css_248z$8 = ".BaseCell-module_relative__1v2X0 {\n position: relative;\n}\n\n.BaseCell-module_infoButtonAbsolute__Mpjrz {\n position: absolute;\n right: -32px;\n}\n\n.BaseCell-module_icon__1775U {\n margin: 2px;\n}\n\n.BaseCell-module_description__3_kfe {\n word-break: break-word;\n}\n\n.BaseCell-module_bigWithUnderline__2xx5X {\n position: relative;\n display: flex;\n line-height: 38px;\n text-decoration: underline;\n text-decoration-color: #8e8cee;\n text-decoration-thickness: 4px;\n text-underline-offset: 8px;\n}";
14365
14364
  var styles$8 = {"relative":"BaseCell-module_relative__1v2X0","infoButtonAbsolute":"BaseCell-module_infoButtonAbsolute__Mpjrz","icon":"BaseCell-module_icon__1775U","description":"BaseCell-module_description__3_kfe","bigWithUnderline":"BaseCell-module_bigWithUnderline__2xx5X"};
14366
14365
  styleInject(css_248z$8);
14367
14366
 
@@ -14772,22 +14771,23 @@ var defaultTextOverrides = {
14772
14771
  hideDetails: 'Hide details',
14773
14772
  };
14774
14773
  var Table = function (_a) {
14775
- var _b, _c, _d, _e, _f;
14776
- var cellReplacements = _a.cellReplacements, className = _a.className, collapsibleSections = _a.collapsibleSections, _g = _a.hideColumns, hideColumns = _g === void 0 ? [] : _g, hideDetails = _a.hideDetails, imageComponent = _a.imageComponent, modalContentRenderer = _a.modalContentRenderer, onModalOpen = _a.onModalOpen, onSelectionChanged = _a.onSelectionChanged, _h = _a.stickyHeaderTopOffset, stickyHeaderTopOffset = _h === void 0 ? 0 : _h, tableData = _a.tableData, definedTextOverrides = _a.textOverrides, title = _a.title;
14774
+ var _b, _c, _d, _e, _f, _g, _h, _j;
14775
+ var cellReplacements = _a.cellReplacements, className = _a.className, collapsibleSections = _a.collapsibleSections, _k = _a.hideColumns, hideColumns = _k === void 0 ? [] : _k, hideDetails = _a.hideDetails, imageComponent = _a.imageComponent, modalContentRenderer = _a.modalContentRenderer, onModalOpen = _a.onModalOpen, onSelectionChanged = _a.onSelectionChanged, _l = _a.stickyHeaderTopOffset, stickyHeaderTopOffset = _l === void 0 ? 0 : _l, tableData = _a.tableData, definedTextOverrides = _a.textOverrides, title = _a.title;
14777
14776
  var textOverrides = __assign(__assign({}, defaultTextOverrides), definedTextOverrides);
14778
14777
  var isMobile = useMediaQuery('BELOW_MOBILE');
14779
- var _j = require$$0.useState(null), infoModalData = _j[0], setInfoModalData = _j[1];
14780
- var _k = require$$0.useState(true), shouldHideDetails = _k[0], setShouldHideDetails = _k[1];
14778
+ var _m = require$$0.useState(null), infoModalData = _m[0], setInfoModalData = _m[1];
14779
+ var _o = require$$0.useState(true), shouldHideDetails = _o[0], setShouldHideDetails = _o[1];
14781
14780
  var containerRef = require$$0.useRef(null);
14782
14781
  var headerRef = require$$0.useRef(null);
14783
14782
  var columnsLength = tableData[0].rows[0].length;
14784
14783
  useScrollSync(headerRef, containerRef, !isMobile);
14785
- var _l = useTableNavigation({
14784
+ var _p = useTableNavigation({
14786
14785
  enabled: isMobile,
14787
14786
  containerRef: containerRef,
14788
14787
  onSelectionChanged: onSelectionChanged,
14789
- }), activeSection = _l.activeSection, navigateTable = _l.navigateTable;
14790
- var currentActiveSection = (_d = (_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]) === null || _d === void 0 ? void 0 : _d[activeSection];
14788
+ }), activeSection = _p.activeSection, navigateTable = _p.navigateTable;
14789
+ var titleCell = __assign({ text: '' }, ((_d = (_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]) === null || _d === void 0 ? void 0 : _d[0]) || {});
14790
+ var currentActiveSection = (_g = (_f = (_e = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _e === void 0 ? void 0 : _e.rows) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g[activeSection];
14791
14791
  var currentActiveSectionReplacements = (currentActiveSection.cellId &&
14792
14792
  (cellReplacements === null || cellReplacements === void 0 ? void 0 : cellReplacements[currentActiveSection.cellId])) ||
14793
14793
  {};
@@ -14797,16 +14797,16 @@ var Table = function (_a) {
14797
14797
  onModalOpen === null || onModalOpen === void 0 ? void 0 : onModalOpen({ body: body, title: title });
14798
14798
  setInfoModalData({ body: body, title: title });
14799
14799
  }, []);
14800
- return (jsxRuntime.jsxs("div", { className: classNames$1(styles$4.wrapper, 'bg-white'), children: [isMobile ? (jsxRuntime.jsx(TableControls, { activeSection: activeSection, columnsLength: columnsLength, navigateTable: navigateTable, stickyHeaderTopOffset: stickyHeaderTopOffset, children: jsxRuntime.jsx(TableCell, __assign({}, (isBaseCell(currentActiveSection)
14801
- ? {
14802
- openModal: function (body) {
14803
- return handleOpenModal({
14804
- body: body,
14805
- title: currentActiveSection === null || currentActiveSection === void 0 ? void 0 : currentActiveSection.text,
14806
- });
14807
- },
14808
- }
14809
- : {}), 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: [(_f = (_e = tableData === null || tableData === void 0 ? void 0 : tableData[0]) === null || _e === void 0 ? void 0 : _e.rows) === null || _f === void 0 ? void 0 : _f[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 }) }), hideDetails && (jsxRuntime.jsx(Card, { "data-testid": "show-hide-details", classNames: {
14800
+ return (jsxRuntime.jsxs("div", { className: classNames$1(styles$4.wrapper, 'bg-white'), children: [isMobile ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(titleCell === null || titleCell === void 0 ? void 0 : titleCell.text) && (jsxRuntime.jsx(TableCell, __assign({}, titleCell, { align: 'left', isNavigation: true, isTopLeftCell: true, type: undefined }))), jsxRuntime.jsx(TableControls, { activeSection: activeSection, columnsLength: columnsLength, navigateTable: navigateTable, stickyHeaderTopOffset: stickyHeaderTopOffset, children: jsxRuntime.jsx(TableCell, __assign({}, (isBaseCell(currentActiveSection)
14801
+ ? {
14802
+ openModal: function (body) {
14803
+ return handleOpenModal({
14804
+ body: body,
14805
+ title: currentActiveSection === null || currentActiveSection === void 0 ? void 0 : currentActiveSection.text,
14806
+ });
14807
+ },
14808
+ }
14809
+ : {}), 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 }) }), hideDetails && (jsxRuntime.jsx(Card, { "data-testid": "show-hide-details", classNames: {
14810
14810
  buttonWrapper: 'm8 mt32',
14811
14811
  title: 'd-flex gap8 ai-center jc-center',
14812
14812
  wrapper: 'bg-grey-200',