@popsure/dirty-swan 0.41.9 → 0.41.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +13 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/card/index.js +4 -3
- package/dist/esm/components/card/index.js.map +1 -1
- package/dist/esm/components/comparisonTable/index.js +10 -1
- package/dist/esm/components/comparisonTable/index.js.map +1 -1
- package/dist/esm/scss/public/demo.js +5 -0
- package/dist/esm/scss/public/demo.js.map +1 -1
- package/dist/lib/scss/public/demo.tsx +5 -0
- package/package.json +1 -1
- package/src/lib/components/card/index.tsx +73 -69
- package/src/lib/components/card/style.module.scss +7 -3
- package/src/lib/components/comparisonTable/hooks/useComparisonTable.ts +13 -1
- package/src/lib/scss/public/demo.tsx +5 -0
package/dist/cjs/index.js
CHANGED
|
@@ -8747,12 +8747,13 @@ var associatedClassForCardState = function (state, dropshadow) {
|
|
|
8747
8747
|
return baseClass;
|
|
8748
8748
|
};
|
|
8749
8749
|
|
|
8750
|
-
var css_248z$f = ".style-module_button__KWY7b {\n background-color: transparent;\n
|
|
8750
|
+
var css_248z$f = ".style-module_button__KWY7b {\n background-color: transparent;\n color: #26262e;\n outline: 1px solid transparent;\n transition: all 0.2s ease-in-out;\n}\n.style-module_button__KWY7b:hover {\n outline: 1px solid #8e8cee;\n color: #8e8cee;\n}\n.style-module_button__KWY7b:focus-visible {\n outline: 2px solid #8e8cee;\n color: #8e8cee;\n}\n\n.style-module_icon__N6B2P {\n margin-right: 12px;\n}\n.style-module_iconbalanced__3JdKC {\n margin-right: 16px;\n}\n.style-module_iconspacious__36ovv {\n margin-right: 24px;\n}\n\n.style-module_actionIcon__2klnb {\n margin-left: 12px;\n}\n.style-module_actionIconbalanced__1duYl {\n margin-left: 16px;\n}\n.style-module_actionIconspacious__1sjsd {\n margin-left: 24px;\n}";
|
|
8751
8751
|
var styles$e = {"button":"style-module_button__KWY7b","icon":"style-module_icon__N6B2P","iconbalanced":"style-module_iconbalanced__3JdKC","iconspacious":"style-module_iconspacious__36ovv","actionIcon":"style-module_actionIcon__2klnb","actionIconbalanced":"style-module_actionIconbalanced__1duYl","actionIconspacious":"style-module_actionIconspacious__1sjsd"};
|
|
8752
8752
|
styleInject(css_248z$f);
|
|
8753
8753
|
|
|
8754
8754
|
var CardContent = function (_a) {
|
|
8755
8755
|
var children = _a.children, classNames$1 = _a.classNames, _b = _a.density, density = _b === void 0 ? 'balanced' : _b, description = _a.description, _c = _a.descriptionVariant, descriptionVariant = _c === void 0 ? 'large' : _c, _d = _a.dropShadow, dropShadow = _d === void 0 ? true : _d, icon = _a.icon, label = _a.label, onClick = _a.onClick, actionIcon = _a.actionIcon, title = _a.title, _e = _a.titleVariant, titleVariant = _e === void 0 ? 'large' : _e;
|
|
8756
|
+
var hideActionIcon = typeof actionIcon !== 'undefined' && !actionIcon;
|
|
8756
8757
|
return (jsxRuntime.jsxs("section", __assign({ className: classNames('d-flex fd-column jc-center br8 bg-white w100 ta-left', { 'bs-sm': dropShadow }, {
|
|
8757
8758
|
compact: 'p16',
|
|
8758
8759
|
balanced: 'p24',
|
|
@@ -8765,14 +8766,14 @@ var CardContent = function (_a) {
|
|
|
8765
8766
|
small: 'p-p',
|
|
8766
8767
|
}[titleVariant]) }, { children: title }), void 0)),
|
|
8767
8768
|
description && (jsxRuntime.jsx("div", __assign({ className: classNames('tc-grey-600', classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.description, descriptionVariant === 'small' ? 'p-p--small' : 'p-p') }, { children: description }), void 0))] }), void 0),
|
|
8768
|
-
onClick && (jsxRuntime.jsx("div", __assign({ className: classNames(styles$e.actionIcon, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.actionIcon, styles$e["actionIcon" + density], 'd-flex ai-center') }, { children: actionIcon || jsxRuntime.jsx(ChevronRightIcon, { size: 24 }, void 0) }), void 0))] }), void 0)] }), void 0),
|
|
8769
|
+
onClick && !hideActionIcon && (jsxRuntime.jsx("div", __assign({ className: classNames(styles$e.actionIcon, classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.actionIcon, styles$e["actionIcon" + density], 'd-flex ai-center') }, { children: actionIcon || jsxRuntime.jsx(ChevronRightIcon, { size: 24 }, void 0) }), void 0))] }), void 0)] }), void 0),
|
|
8769
8770
|
children && jsxRuntime.jsx("div", __assign({ className: classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.children }, { children: children }), void 0)] }), void 0));
|
|
8770
8771
|
};
|
|
8771
8772
|
var Card = function (props) {
|
|
8772
8773
|
var _a;
|
|
8773
8774
|
var onClick = props.onClick;
|
|
8774
8775
|
if (onClick) {
|
|
8775
|
-
return (jsxRuntime.jsx("button", __assign({ className: classNames('c-pointer d-flex w100 br8', styles$e.button, (_a = props.classNames) === null || _a === void 0 ? void 0 : _a.buttonWrapper), onClick: onClick, type: "button" }, { children: jsxRuntime.jsx(CardContent, __assign({}, props), void 0) }), void 0));
|
|
8776
|
+
return (jsxRuntime.jsx("button", __assign({ className: classNames('c-pointer d-flex w100 br8 ai-stretch', styles$e.button, (_a = props.classNames) === null || _a === void 0 ? void 0 : _a.buttonWrapper), onClick: onClick, type: "button" }, { children: jsxRuntime.jsx(CardContent, __assign({}, props), void 0) }), void 0));
|
|
8776
8777
|
}
|
|
8777
8778
|
return jsxRuntime.jsx(CardContent, __assign({}, props), void 0);
|
|
8778
8779
|
};
|
|
@@ -13664,6 +13665,15 @@ var useComparisonTable = function () {
|
|
|
13664
13665
|
(_b = observerRef.current) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
13665
13666
|
};
|
|
13666
13667
|
}, []);
|
|
13668
|
+
require$$0.useLayoutEffect(function () {
|
|
13669
|
+
var resetHeaderWidth = function () {
|
|
13670
|
+
if (headerRef.current) {
|
|
13671
|
+
setHeaderWidth(headerRef.current.clientWidth);
|
|
13672
|
+
}
|
|
13673
|
+
};
|
|
13674
|
+
window.addEventListener('resize', resetHeaderWidth);
|
|
13675
|
+
return function () { return window.removeEventListener('resize', resetHeaderWidth); };
|
|
13676
|
+
}, []);
|
|
13667
13677
|
var handleTableScroll = function () {
|
|
13668
13678
|
if (!headerRef.current) {
|
|
13669
13679
|
return;
|