@auth0/quantum-product 2.5.2 → 2.5.4
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.
|
@@ -9,6 +9,8 @@ export type IDescriptionBlockProps = IStyledComponentProps<{
|
|
|
9
9
|
props: IDescriptionBlockRootOwnerState & {
|
|
10
10
|
description: React.ReactNode;
|
|
11
11
|
code?: boolean;
|
|
12
|
+
copyLabel?: string;
|
|
13
|
+
copiedLabel?: string;
|
|
12
14
|
component?: any;
|
|
13
15
|
labelTypographyProps?: ITextProps;
|
|
14
16
|
descriptionTypographyProps?: ITextProps;
|
|
@@ -19,9 +21,11 @@ export type IDescriptionBlockProps = IStyledComponentProps<{
|
|
|
19
21
|
export declare const DescriptionBlock: React.ForwardRefExoticComponent<IDescriptionBlockRootOwnerState & {
|
|
20
22
|
description: React.ReactNode;
|
|
21
23
|
code?: boolean | undefined;
|
|
24
|
+
copyLabel?: string | undefined;
|
|
25
|
+
copiedLabel?: string | undefined;
|
|
22
26
|
component?: any;
|
|
23
27
|
labelTypographyProps?: ITextProps<"span"> | undefined;
|
|
24
28
|
descriptionTypographyProps?: ITextProps<"span"> | undefined;
|
|
25
29
|
onCopy?(event: React.MouseEvent<HTMLButtonElement>): void;
|
|
26
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "code" | "ref" | "onCopy" | "component" | "description" | "descriptionTypographyProps" | keyof IDescriptionBlockRootOwnerState | "labelTypographyProps"> & import("../styled").IStyledCommonProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "code" | "ref" | "onCopy" | "component" | "description" | "descriptionTypographyProps" | "copiedLabel" | keyof IDescriptionBlockRootOwnerState | "copyLabel" | "labelTypographyProps"> & import("../styled").IStyledCommonProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
31
|
export {};
|
|
@@ -85,7 +85,7 @@ var CopyAction = (0, styled_1.styled)(copy_button_1.CopyButton, {
|
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
exports.DescriptionBlock = React.forwardRef(function (props, ref) {
|
|
88
|
-
var label = props.label, description = props.description, code = props.code, onCopy = props.onCopy, _a = props.layout, layout = _a === void 0 ? 'default' : _a, _b = props.labelTypographyProps, labelTypographyProps = _b === void 0 ? {} : _b, _c = props.descriptionTypographyProps, descriptionTypographyProps = _c === void 0 ? {} : _c, rootProps = __rest(props, ["label", "description", "code", "onCopy", "layout", "labelTypographyProps", "descriptionTypographyProps"]);
|
|
88
|
+
var label = props.label, description = props.description, code = props.code, onCopy = props.onCopy, copyLabel = props.copyLabel, copiedLabel = props.copiedLabel, _a = props.layout, layout = _a === void 0 ? 'default' : _a, _b = props.labelTypographyProps, labelTypographyProps = _b === void 0 ? {} : _b, _c = props.descriptionTypographyProps, descriptionTypographyProps = _c === void 0 ? {} : _c, rootProps = __rest(props, ["label", "description", "code", "onCopy", "copyLabel", "copiedLabel", "layout", "labelTypographyProps", "descriptionTypographyProps"]);
|
|
89
89
|
var inlinelayout = layout === 'inline';
|
|
90
90
|
return (React.createElement(Root, __assign({ ref: ref, ownerState: { layout: layout, label: label } }, rootProps),
|
|
91
91
|
!!label && (React.createElement(text_1.Text, __assign({ component: "span", variant: "body2", color: "textSecondary" }, labelTypographyProps),
|
|
@@ -93,5 +93,5 @@ exports.DescriptionBlock = React.forwardRef(function (props, ref) {
|
|
|
93
93
|
!!label && inlinelayout && ':')),
|
|
94
94
|
React.createElement(Content, null,
|
|
95
95
|
code ? (React.createElement(code_1.Code, __assign({ title: typeof description === 'string' ? description : undefined, sx: { maxWidth: 300 }, variant: "code2", noWrap: true }, descriptionTypographyProps), description)) : (React.createElement(text_1.Text, __assign({ component: "span", variant: "body2" }, descriptionTypographyProps), description)),
|
|
96
|
-
!!onCopy && React.createElement(CopyAction, { label:
|
|
96
|
+
!!onCopy && React.createElement(CopyAction, { label: copyLabel || 'copy', copiedLabel: copiedLabel, size: "small", onClick: onCopy }))));
|
|
97
97
|
});
|
|
@@ -59,7 +59,7 @@ var CopyAction = styled(CopyButton, {
|
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
export var DescriptionBlock = React.forwardRef(function (props, ref) {
|
|
62
|
-
var label = props.label, description = props.description, code = props.code, onCopy = props.onCopy, _a = props.layout, layout = _a === void 0 ? 'default' : _a, _b = props.labelTypographyProps, labelTypographyProps = _b === void 0 ? {} : _b, _c = props.descriptionTypographyProps, descriptionTypographyProps = _c === void 0 ? {} : _c, rootProps = __rest(props, ["label", "description", "code", "onCopy", "layout", "labelTypographyProps", "descriptionTypographyProps"]);
|
|
62
|
+
var label = props.label, description = props.description, code = props.code, onCopy = props.onCopy, copyLabel = props.copyLabel, copiedLabel = props.copiedLabel, _a = props.layout, layout = _a === void 0 ? 'default' : _a, _b = props.labelTypographyProps, labelTypographyProps = _b === void 0 ? {} : _b, _c = props.descriptionTypographyProps, descriptionTypographyProps = _c === void 0 ? {} : _c, rootProps = __rest(props, ["label", "description", "code", "onCopy", "copyLabel", "copiedLabel", "layout", "labelTypographyProps", "descriptionTypographyProps"]);
|
|
63
63
|
var inlinelayout = layout === 'inline';
|
|
64
64
|
return (React.createElement(Root, __assign({ ref: ref, ownerState: { layout: layout, label: label } }, rootProps),
|
|
65
65
|
!!label && (React.createElement(Text, __assign({ component: "span", variant: "body2", color: "textSecondary" }, labelTypographyProps),
|
|
@@ -67,5 +67,5 @@ export var DescriptionBlock = React.forwardRef(function (props, ref) {
|
|
|
67
67
|
!!label && inlinelayout && ':')),
|
|
68
68
|
React.createElement(Content, null,
|
|
69
69
|
code ? (React.createElement(Code, __assign({ title: typeof description === 'string' ? description : undefined, sx: { maxWidth: 300 }, variant: "code2", noWrap: true }, descriptionTypographyProps), description)) : (React.createElement(Text, __assign({ component: "span", variant: "body2" }, descriptionTypographyProps), description)),
|
|
70
|
-
!!onCopy && React.createElement(CopyAction, { label:
|
|
70
|
+
!!onCopy && React.createElement(CopyAction, { label: copyLabel || 'copy', copiedLabel: copiedLabel, size: "small", onClick: onCopy }))));
|
|
71
71
|
});
|