@popsure/dirty-swan 0.41.19-alpha → 0.42.1

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 CHANGED
@@ -8707,7 +8707,7 @@ var css_248z$g = ".style-module_container__2tJCE {\n background-color: white;\n
8707
8707
  var styles$f = {"container":"style-module_container__2tJCE","chevronRight":"style-module_chevronRight__24wkt"};
8708
8708
  styleInject(css_248z$g);
8709
8709
 
8710
- var CardContent$1 = function (_a) {
8710
+ var CardContent = function (_a) {
8711
8711
  var title = _a.title, description = _a.description;
8712
8712
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", __assign({ className: "p-p--small" }, { children: title }), void 0),
8713
8713
  typeof description === 'string' ? (jsxRuntime.jsx("div", __assign({ className: "tc-primary-500 p-p" }, { children: description }), void 0)) : (description)] }, void 0),
@@ -8716,7 +8716,7 @@ var CardContent$1 = function (_a) {
8716
8716
  var CardButton = function (_a) {
8717
8717
  var title = _a.title, description = _a.description, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onClick = _a.onClick, href = _a.href, className = _a.className;
8718
8718
  var component = href ? 'a' : 'button';
8719
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: require$$0.createElement(component, __assign({ className: "c-pointer ta-left w100 " + styles$f.container + " " + (className !== null && className !== void 0 ? className : '') + "\n ", children: jsxRuntime.jsx(CardContent$1, { title: title, description: description }, void 0), disabled: disabled }, (component === 'a' ? { href: href } : { onClick: onClick }))) }, void 0));
8719
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: require$$0.createElement(component, __assign({ className: "c-pointer ta-left w100 " + styles$f.container + " " + (className !== null && className !== void 0 ? className : '') + "\n ", children: jsxRuntime.jsx(CardContent, { title: title, description: description }, void 0), disabled: disabled }, (component === 'a' ? { href: href } : { onClick: onClick }))) }, void 0));
8720
8720
  };
8721
8721
 
8722
8722
  var headingForCardSize = function (cardSize) {
@@ -8747,36 +8747,39 @@ 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 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}";
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 text-decoration: none;\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
- var CardContent = function (_a) {
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, showActionIcon = _a.showActionIcon;
8754
+ var cardDefaultAs = 'section';
8755
+ var Card = function (_a) {
8756
+ var _b;
8757
+ var as = _a.as, children = _a.children, classNames$1 = _a.classNames, _c = _a.density, density = _c === void 0 ? 'balanced' : _c, description = _a.description, _d = _a.descriptionVariant, descriptionVariant = _d === void 0 ? 'large' : _d, _e = _a.dropShadow, dropShadow = _e === void 0 ? true : _e, icon = _a.icon, label = _a.label, onClick = _a.onClick, actionIcon = _a.actionIcon, title = _a.title, _f = _a.titleVariant, titleVariant = _f === void 0 ? 'large' : _f, showActionIcon = _a.showActionIcon, rest = __rest$1(_a, ["as", "children", "classNames", "density", "description", "descriptionVariant", "dropShadow", "icon", "label", "onClick", "actionIcon", "title", "titleVariant", "showActionIcon"]);
8756
8758
  var hideActionIcon = typeof actionIcon !== 'undefined' && !actionIcon;
8757
- return (jsxRuntime.jsxs("section", __assign({ className: classNames('d-flex fd-column jc-center br8 bg-white w100 ta-left', { 'bs-sm': dropShadow }, {
8758
- compact: 'p16',
8759
- balanced: 'p24',
8760
- spacious: 'p32',
8761
- }[density], classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper) }, { children: [jsxRuntime.jsxs("div", __assign({ className: "d-flex w100" }, { children: [icon && (jsxRuntime.jsx("div", __assign({ className: classNames("d-flex ai-center tc-primary-500", styles$e.icon, styles$e["icon" + density], classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.icon) }, { children: icon }), void 0)),
8762
- jsxRuntime.jsxs("div", __assign({ className: "d-flex jc-between w100" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "d-flex jc-center gap8 fd-column tc-grey-900 w100" }, { children: [label && (jsxRuntime.jsx("h3", __assign({ className: classNames('p-p--small', classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.label) }, { children: label }), void 0)),
8763
- title && (jsxRuntime.jsx("h2", __assign({ className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.title, {
8764
- large: 'p-h3',
8765
- medium: 'p-h4',
8766
- small: 'p-p',
8767
- }[titleVariant]) }, { children: title }), void 0)),
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),
8769
- (showActionIcon || (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),
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));
8771
- };
8772
- var Card = function (props) {
8773
- var _a;
8774
- var as = props.as, onClick = props.onClick;
8775
- var Tag = as || 'button';
8776
- if (onClick || as) {
8777
- return (jsxRuntime.jsx(Tag, __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 }, onClick && { type: "button" }, { children: jsxRuntime.jsx(CardContent, __assign({}, props), void 0) }), void 0));
8778
- }
8779
- return jsxRuntime.jsx(CardContent, __assign({}, props), void 0);
8759
+ var propsWithActionIcon = onClick || (rest === null || rest === void 0 ? void 0 : rest.href) || rest.to;
8760
+ var cardDefaultTag = onClick ? 'button' : cardDefaultAs;
8761
+ var Tag = as || cardDefaultTag;
8762
+ return (jsxRuntime.jsx(Tag, __assign({ className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.buttonWrapper, ' d-flex w100 br8 ai-stretch', (_b = {
8763
+ 'c-pointer': propsWithActionIcon
8764
+ },
8765
+ _b[styles$e.button] = propsWithActionIcon,
8766
+ _b)) }, onClick && {
8767
+ onClick: onClick,
8768
+ type: "button"
8769
+ }, rest, { children: jsxRuntime.jsxs("div", __assign({ className: classNames('d-flex fd-column jc-center br8 bg-white w100 ta-left', { 'bs-sm': dropShadow }, {
8770
+ compact: 'p16',
8771
+ balanced: 'p24',
8772
+ spacious: 'p32',
8773
+ }[density], classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.wrapper) }, { children: [jsxRuntime.jsxs("div", __assign({ className: "d-flex w100" }, { children: [icon && (jsxRuntime.jsx("div", __assign({ className: classNames("d-flex ai-center tc-primary-500", styles$e.icon, styles$e["icon" + density], classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.icon) }, { children: icon }), void 0)),
8774
+ jsxRuntime.jsxs("div", __assign({ className: "d-flex jc-between w100" }, { children: [jsxRuntime.jsxs("div", __assign({ className: "d-flex jc-center gap8 fd-column tc-grey-900 w100" }, { children: [label && (jsxRuntime.jsx("h3", __assign({ className: classNames('p-p--small', classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.label) }, { children: label }), void 0)),
8775
+ title && (jsxRuntime.jsx("h2", __assign({ className: classNames(classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.title, {
8776
+ large: 'p-h3',
8777
+ medium: 'p-h4',
8778
+ small: 'p-p',
8779
+ }[titleVariant]) }, { children: title }), void 0)),
8780
+ 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),
8781
+ (showActionIcon || (propsWithActionIcon && !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),
8782
+ children && jsxRuntime.jsx("div", __assign({ className: classNames$1 === null || classNames$1 === void 0 ? void 0 : classNames$1.children }, { children: children }), void 0)] }), void 0) }), void 0));
8780
8783
  };
8781
8784
 
8782
8785
  var css_248z$e = ".style-module_chip__3LMgV {\n background: var(--ds-primary-100);\n border: 2px solid var(--ds-primary-100);\n border-radius: 8px;\n padding: 4px 8px;\n width: fit-content;\n width: -moz-fit-content;\n display: flex;\n align-items: center;\n animation-name: style-module_appearInAnimation__33Ebn;\n animation-duration: 0.5s;\n animation-fill-mode: both;\n}\n\n.style-module_chip__3LMgV:hover {\n transition: 0.2s ease-in;\n border: 2px solid var(--ds-primary-500);\n}\n\n.style-module_chip-image__2vVqF {\n width: 24px;\n height: 14px;\n}\n\n.style-module_chip-button-container__3gSRY {\n color: #b1b0f5;\n position: relative;\n width: 16px;\n height: 16px;\n background: none;\n border: none;\n padding: 0;\n margin: 0;\n text-align: inherit;\n outline: none;\n box-shadow: none;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n cursor: pointer;\n}\n.style-module_chip-button-container__3gSRY:hover {\n color: #8e8cee;\n}\n\n.style-module_chip-remove-button__3LK7e {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.style-module_chip-remove-button__3LK7e svg {\n vertical-align: top;\n}\n\n@keyframes style-module_appearInAnimation__33Ebn {\n from {\n opacity: 0;\n transform: translateX(16px);\n }\n to {\n opacity: 1;\n }\n}";