@czi-sds/components 22.3.1 → 22.3.2
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/index.cjs.d.ts +3 -2
- package/dist/index.cjs.js +7 -3
- package/dist/index.esm.d.ts +3 -2
- package/dist/index.esm.js +7 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.cjs.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ import { LinkProps as LinkProps$1 } from "@mui/material";
|
|
|
33
33
|
import { TabProps as RawTabProps } from "@mui/material";
|
|
34
34
|
import { TabsProps as RawTabsProps } from "@mui/material";
|
|
35
35
|
import React from "react";
|
|
36
|
-
import { CSSProperties, ReactElement, ReactNode, SyntheticEvent, ComponentType, ElementType } from "react";
|
|
36
|
+
import { CSSProperties, ReactElement, ReactNode, SyntheticEvent, HTMLAttributeAnchorTarget, ComponentType, ElementType } from "react";
|
|
37
37
|
import { Theme, ThemeOptions, TypographyStyle, Breakpoints, PaletteOptions } from "@mui/material/styles";
|
|
38
38
|
import { SerializedStyles } from "@emotion/react";
|
|
39
39
|
import { AlertProps } from "@mui/lab";
|
|
@@ -780,6 +780,7 @@ type ButtonSize = "small" | "medium" | "large";
|
|
|
780
780
|
interface BaseButtonProps extends RawButtonProps {
|
|
781
781
|
children?: React.ReactNode;
|
|
782
782
|
isAllCaps?: boolean;
|
|
783
|
+
target?: HTMLAttributeAnchorTarget;
|
|
783
784
|
}
|
|
784
785
|
interface SdsIconButtonProps extends BaseButtonProps {
|
|
785
786
|
sdsStyle: "icon";
|
|
@@ -1140,7 +1141,7 @@ interface BaseContentCardProps extends CardProps {
|
|
|
1140
1141
|
decorativeBorder?: boolean;
|
|
1141
1142
|
children?: React.ReactNode;
|
|
1142
1143
|
clickableCard?: boolean;
|
|
1143
|
-
clickableCardProps?:
|
|
1144
|
+
clickableCardProps?: Partial<SdsMinimalButtonProps>;
|
|
1144
1145
|
buttonsPosition?: "left" | "right";
|
|
1145
1146
|
classes?: {
|
|
1146
1147
|
cardPaper?: string;
|
package/dist/index.cjs.js
CHANGED
|
@@ -6939,7 +6939,7 @@ var StyledCardActionArea = styled__default.default(Button, {
|
|
|
6939
6939
|
: visualElementType === "image"
|
|
6940
6940
|
? "column"
|
|
6941
6941
|
: "row";
|
|
6942
|
-
return "\n display: flex;\n flex-direction: ".concat(flexDirection, ";\n align-items: unset;\n height: 100%;\n padding: 0;\n margin: 0;\n overflow:
|
|
6942
|
+
return "\n display: flex;\n flex-direction: ".concat(flexDirection, ";\n align-items: unset;\n height: 100%;\n padding: 0;\n margin: 0;\n overflow: auto;\n text-align: unset;\n\n background-color: ").concat((_a = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _a === void 0 ? void 0 : _a.backgroundPrimary, ";\n\n &:hover,\n &:active {\n background-color: ").concat((_b = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _b === void 0 ? void 0 : _b.surface, ";\n box-shadow: ").concat(shadows === null || shadows === void 0 ? void 0 : shadows.l, " !important;\n }\n ");
|
|
6943
6943
|
});
|
|
6944
6944
|
var StyledIconMediaWrapper = styled__default.default("div", {
|
|
6945
6945
|
shouldForwardProp: function (prop) { return !doNotForwardProps$o.includes(prop); },
|
|
@@ -6954,7 +6954,7 @@ var StyledCardContent = styled__default.default("div", {
|
|
|
6954
6954
|
})(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
6955
6955
|
var _a = props.boundingBox, boundingBox = _a === void 0 ? true : _a;
|
|
6956
6956
|
var spaces = getSpaces(props);
|
|
6957
|
-
return react.css(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n min-width: 100px;\n width: 100%;\n\n ", "\n "], ["\n display: flex;\n flex-direction: column;\n min-width: 100px;\n width: 100%;\n\n ", "\n "])), boundingBox && react.css(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n padding: ", "px;\n "], ["\n padding: ", "px;\n "])), spaces === null || spaces === void 0 ? void 0 : spaces.xl));
|
|
6957
|
+
return react.css(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n min-width: 100px;\n width: 100%;\n height: 100%;\n\n ", "\n "], ["\n display: flex;\n flex-direction: column;\n min-width: 100px;\n width: 100%;\n height: 100%;\n\n ", "\n "])), boundingBox && react.css(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n padding: ", "px;\n "], ["\n padding: ", "px;\n "])), spaces === null || spaces === void 0 ? void 0 : spaces.xl));
|
|
6958
6958
|
});
|
|
6959
6959
|
var StyledContentCardBody = styled__default.default(material.CardContent, {
|
|
6960
6960
|
shouldForwardProp: function (prop) { return !doNotForwardProps$o.includes(prop); },
|
|
@@ -7211,7 +7211,11 @@ var ContentCard = React__namespace.default.forwardRef(function (props, ref) {
|
|
|
7211
7211
|
} }), jsxRuntime.jsx(StyledCardContentAligner, { children: enhanceChildrenWithCardActionsProps(children, clickableCard, buttonsPosition, {
|
|
7212
7212
|
cardActions: cardActions,
|
|
7213
7213
|
}) })] })] }));
|
|
7214
|
-
return (jsxRuntime.jsx(StyledCard, __assign({ ref: mergeRefs([ref, cardRef]) }, props, { sdsType: dynamicSdsType, boundingBox: boundingBox, className: cardPaper, children: clickableCard ? (jsxRuntime.jsx(StyledCardActionArea, __assign({
|
|
7214
|
+
return (jsxRuntime.jsx(StyledCard, __assign({ ref: mergeRefs([ref, cardRef]) }, props, { sdsType: dynamicSdsType, boundingBox: boundingBox, className: cardPaper, children: clickableCard ? (jsxRuntime.jsx(StyledCardActionArea, __assign({}, clickableCardProps, {
|
|
7215
|
+
// (masoudmanson): The following props are for internal use only and should not be user editable.
|
|
7216
|
+
// To prevent users from overriding them, we use the spread operator to pass user provided props
|
|
7217
|
+
// to the StyledCardActionArea component on top while hardcoding the rest after it.
|
|
7218
|
+
sdsStyle: "minimal", cardSdsType: dynamicSdsType, visualElementType: visualElementType, imagePosition: imagePosition, className: clickableCardButton, children: cardInnerContent }))) : (cardInnerContent) })));
|
|
7215
7219
|
});
|
|
7216
7220
|
|
|
7217
7221
|
var DialogContext = React.createContext({ sdsSize: "m" });
|
package/dist/index.esm.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ import { LinkProps as LinkProps$1 } from "@mui/material";
|
|
|
33
33
|
import { TabProps as RawTabProps } from "@mui/material";
|
|
34
34
|
import { TabsProps as RawTabsProps } from "@mui/material";
|
|
35
35
|
import React from "react";
|
|
36
|
-
import { CSSProperties, ReactElement, ReactNode, SyntheticEvent, ComponentType, ElementType } from "react";
|
|
36
|
+
import { CSSProperties, ReactElement, ReactNode, SyntheticEvent, HTMLAttributeAnchorTarget, ComponentType, ElementType } from "react";
|
|
37
37
|
import { Theme, ThemeOptions, TypographyStyle, Breakpoints, PaletteOptions } from "@mui/material/styles";
|
|
38
38
|
import { SerializedStyles } from "@emotion/react";
|
|
39
39
|
import { AlertProps } from "@mui/lab";
|
|
@@ -780,6 +780,7 @@ type ButtonSize = "small" | "medium" | "large";
|
|
|
780
780
|
interface BaseButtonProps extends RawButtonProps {
|
|
781
781
|
children?: React.ReactNode;
|
|
782
782
|
isAllCaps?: boolean;
|
|
783
|
+
target?: HTMLAttributeAnchorTarget;
|
|
783
784
|
}
|
|
784
785
|
interface SdsIconButtonProps extends BaseButtonProps {
|
|
785
786
|
sdsStyle: "icon";
|
|
@@ -1140,7 +1141,7 @@ interface BaseContentCardProps extends CardProps {
|
|
|
1140
1141
|
decorativeBorder?: boolean;
|
|
1141
1142
|
children?: React.ReactNode;
|
|
1142
1143
|
clickableCard?: boolean;
|
|
1143
|
-
clickableCardProps?:
|
|
1144
|
+
clickableCardProps?: Partial<SdsMinimalButtonProps>;
|
|
1144
1145
|
buttonsPosition?: "left" | "right";
|
|
1145
1146
|
classes?: {
|
|
1146
1147
|
cardPaper?: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -6916,7 +6916,7 @@ var StyledCardActionArea = styled$2(Button, {
|
|
|
6916
6916
|
: visualElementType === "image"
|
|
6917
6917
|
? "column"
|
|
6918
6918
|
: "row";
|
|
6919
|
-
return "\n display: flex;\n flex-direction: ".concat(flexDirection, ";\n align-items: unset;\n height: 100%;\n padding: 0;\n margin: 0;\n overflow:
|
|
6919
|
+
return "\n display: flex;\n flex-direction: ".concat(flexDirection, ";\n align-items: unset;\n height: 100%;\n padding: 0;\n margin: 0;\n overflow: auto;\n text-align: unset;\n\n background-color: ").concat((_a = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _a === void 0 ? void 0 : _a.backgroundPrimary, ";\n\n &:hover,\n &:active {\n background-color: ").concat((_b = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _b === void 0 ? void 0 : _b.surface, ";\n box-shadow: ").concat(shadows === null || shadows === void 0 ? void 0 : shadows.l, " !important;\n }\n ");
|
|
6920
6920
|
});
|
|
6921
6921
|
var StyledIconMediaWrapper = styled$2("div", {
|
|
6922
6922
|
shouldForwardProp: function (prop) { return !doNotForwardProps$o.includes(prop); },
|
|
@@ -6931,7 +6931,7 @@ var StyledCardContent = styled$2("div", {
|
|
|
6931
6931
|
})(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
6932
6932
|
var _a = props.boundingBox, boundingBox = _a === void 0 ? true : _a;
|
|
6933
6933
|
var spaces = getSpaces(props);
|
|
6934
|
-
return css(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n min-width: 100px;\n width: 100%;\n\n ", "\n "], ["\n display: flex;\n flex-direction: column;\n min-width: 100px;\n width: 100%;\n\n ", "\n "])), boundingBox && css(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n padding: ", "px;\n "], ["\n padding: ", "px;\n "])), spaces === null || spaces === void 0 ? void 0 : spaces.xl));
|
|
6934
|
+
return css(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n min-width: 100px;\n width: 100%;\n height: 100%;\n\n ", "\n "], ["\n display: flex;\n flex-direction: column;\n min-width: 100px;\n width: 100%;\n height: 100%;\n\n ", "\n "])), boundingBox && css(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n padding: ", "px;\n "], ["\n padding: ", "px;\n "])), spaces === null || spaces === void 0 ? void 0 : spaces.xl));
|
|
6935
6935
|
});
|
|
6936
6936
|
var StyledContentCardBody = styled$2(CardContent, {
|
|
6937
6937
|
shouldForwardProp: function (prop) { return !doNotForwardProps$o.includes(prop); },
|
|
@@ -7188,7 +7188,11 @@ var ContentCard = React__default.forwardRef(function (props, ref) {
|
|
|
7188
7188
|
} }), jsx(StyledCardContentAligner, { children: enhanceChildrenWithCardActionsProps(children, clickableCard, buttonsPosition, {
|
|
7189
7189
|
cardActions: cardActions,
|
|
7190
7190
|
}) })] })] }));
|
|
7191
|
-
return (jsx(StyledCard, __assign({ ref: mergeRefs([ref, cardRef]) }, props, { sdsType: dynamicSdsType, boundingBox: boundingBox, className: cardPaper, children: clickableCard ? (jsx(StyledCardActionArea, __assign({
|
|
7191
|
+
return (jsx(StyledCard, __assign({ ref: mergeRefs([ref, cardRef]) }, props, { sdsType: dynamicSdsType, boundingBox: boundingBox, className: cardPaper, children: clickableCard ? (jsx(StyledCardActionArea, __assign({}, clickableCardProps, {
|
|
7192
|
+
// (masoudmanson): The following props are for internal use only and should not be user editable.
|
|
7193
|
+
// To prevent users from overriding them, we use the spread operator to pass user provided props
|
|
7194
|
+
// to the StyledCardActionArea component on top while hardcoding the rest after it.
|
|
7195
|
+
sdsStyle: "minimal", cardSdsType: dynamicSdsType, visualElementType: visualElementType, imagePosition: imagePosition, className: clickableCardButton, children: cardInnerContent }))) : (cardInnerContent) })));
|
|
7192
7196
|
});
|
|
7193
7197
|
|
|
7194
7198
|
var DialogContext = createContext({ sdsSize: "m" });
|