@auth0/quantum-product 2.4.8 → 2.4.10
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/accordion/accordion-details.js +1 -1
- package/alert/alert.js +1 -1
- package/avatar-block/avatar-block.d.ts +3 -1
- package/avatar-block/avatar-block.js +3 -2
- package/button/button.d.ts +1 -0
- package/button/button.js +20 -4
- package/card/card-header/card-header.d.ts +17 -1
- package/card/card-header/card-header.js +24 -10
- package/chip/chip.js +1 -1
- package/code/code.js +4 -3
- package/color-text-field/color-text-field.js +24 -90
- package/copy-button/copy-button.d.ts +9 -10
- package/copy-button/copy-button.js +3 -3
- package/dialog/dialog-title/dialog-title.d.ts +1 -0
- package/dialog/dialog-title/dialog-title.js +2 -2
- package/dialog/dialog.d.ts +2 -0
- package/dialog/dialog.js +2 -2
- package/esm/accordion/accordion-details.js +1 -1
- package/esm/alert/alert.js +1 -1
- package/esm/avatar-block/avatar-block.js +3 -2
- package/esm/button/button.js +20 -4
- package/esm/card/card-header/card-header.js +24 -10
- package/esm/chip/chip.js +1 -1
- package/esm/code/code.js +4 -3
- package/esm/color-text-field/color-text-field.js +24 -90
- package/esm/copy-button/copy-button.js +3 -3
- package/esm/dialog/dialog-title/dialog-title.js +2 -2
- package/esm/dialog/dialog.js +2 -2
- package/esm/label/label.js +11 -7
- package/esm/page/page-header/page-header.js +1 -1
- package/esm/pagination/pager/pager.js +3 -3
- package/esm/pagination/pagination.js +2 -2
- package/esm/panel/panel/panel.js +2 -2
- package/esm/panel/panel-header/panel-header.js +14 -3
- package/esm/selectable-card/selectable-card.js +5 -2
- package/esm/text/text.js +2 -2
- package/esm/title-block/title-block.js +2 -2
- package/expansion-panel/expansion-panel-header.d.ts +2 -1
- package/label/label.d.ts +1 -0
- package/label/label.js +11 -7
- package/package.json +1 -1
- package/page/page-header/page-header.js +1 -1
- package/pagination/pager/pager.d.ts +2 -0
- package/pagination/pager/pager.js +3 -3
- package/pagination/pagination.d.ts +5 -1
- package/pagination/pagination.js +2 -2
- package/panel/panel/panel.d.ts +5 -1
- package/panel/panel/panel.js +2 -2
- package/panel/panel-header/panel-header.d.ts +3 -1
- package/panel/panel-header/panel-header.js +14 -3
- package/selectable-card/selectable-card.d.ts +8 -0
- package/selectable-card/selectable-card.js +5 -2
- package/text/text.js +2 -2
- package/title-block/title-block.js +2 -2
package/panel/panel/panel.js
CHANGED
|
@@ -110,7 +110,7 @@ var CloseButton = (0, styled_1.styled)(icon_button_1.IconButton, {
|
|
|
110
110
|
right: 24,
|
|
111
111
|
});
|
|
112
112
|
exports.Panel = React.forwardRef(function (props, ref) {
|
|
113
|
-
var title = props.title, isOpen = props.isOpen, _a = props.placement, placement = _a === void 0 ? 'end' : _a, _b = props.variant, variant = _b === void 0 ? 'permanent' : _b, _c = props.size, size = _c === void 0 ? 'medium' : _c, onClose = props.onClose, className = props.className, propClasses = props.classes, isFixed = props.isFixed, propOffsetTop = props.offsetTop, children = props.children, _d = props.closeIconButtonProps, closeIconButtonProps = _d === void 0 ? {} : _d, _e = props.PanelHeaderProps, PanelHeaderProps = _e === void 0 ? {} : _e, rootProps = __rest(props, ["title", "isOpen", "placement", "variant", "size", "onClose", "className", "classes", "isFixed", "offsetTop", "children", "closeIconButtonProps", "PanelHeaderProps"]);
|
|
113
|
+
var title = props.title, isOpen = props.isOpen, _a = props.placement, placement = _a === void 0 ? 'end' : _a, _b = props.variant, variant = _b === void 0 ? 'permanent' : _b, _c = props.size, size = _c === void 0 ? 'medium' : _c, onClose = props.onClose, closeButtonLabel = props.closeButtonLabel, className = props.className, propClasses = props.classes, isFixed = props.isFixed, propOffsetTop = props.offsetTop, children = props.children, _d = props.closeIconButtonProps, closeIconButtonProps = _d === void 0 ? {} : _d, _e = props.PanelHeaderProps, PanelHeaderProps = _e === void 0 ? {} : _e, rootProps = __rest(props, ["title", "isOpen", "placement", "variant", "size", "onClose", "closeButtonLabel", "className", "classes", "isFixed", "offsetTop", "children", "closeIconButtonProps", "PanelHeaderProps"]);
|
|
114
114
|
var classes = (0, classes_1.useMergedClasses)(panel_classes_1.panelClasses, panel_classes_1.getPanelUtilityClass, propClasses);
|
|
115
115
|
var offsetTop = propOffsetTop != null ? propOffsetTop : isFixed ? 'appbar' : 0;
|
|
116
116
|
var ownerState = {
|
|
@@ -125,7 +125,7 @@ exports.Panel = React.forwardRef(function (props, ref) {
|
|
|
125
125
|
return (React.createElement(Root, __assign({ ref: ref, ownerState: ownerState, className: (0, utils_1.clsx)(classes.root, classes["size".concat((0, utils_1.capitalize)(size))], classes["variant".concat((0, utils_1.capitalize)(variant))], classes["placement".concat((0, utils_1.capitalize)(placement))], isFixed && classes.fixed, isOpen && classes.open, className) }, rootProps),
|
|
126
126
|
React.createElement(panel_context_1.PanelContext.Provider, { value: __assign(__assign({}, ownerState), { isCloseButtonVisible: showCloseButton }) },
|
|
127
127
|
React.createElement(Content, { className: classes.content, ownerState: ownerState },
|
|
128
|
-
showCloseButton && (React.createElement(CloseButton, __assign({ label:
|
|
128
|
+
showCloseButton && (React.createElement(CloseButton, __assign({ label: closeButtonLabel || 'close', className: classes.closeButton, onClick: function (e) { return onClose(e, 'closeButtonClick'); }, variant: "outlined", size: "small", shape: "circular" }, closeIconButtonProps),
|
|
129
129
|
React.createElement(icon_1.XIcon, null))),
|
|
130
130
|
!!title && React.createElement(panel_header_1.PanelHeader, __assign({ title: title }, PanelHeaderProps)),
|
|
131
131
|
children))));
|
|
@@ -10,6 +10,7 @@ export type IPanelHeaderProps = IStyledComponentProps<{
|
|
|
10
10
|
titleTextProps?: Partial<ITextProps>;
|
|
11
11
|
endAdornment?: React.ReactNode;
|
|
12
12
|
classes?: Partial<PanelHeaderClasses>;
|
|
13
|
+
titleNoWrap?: boolean;
|
|
13
14
|
};
|
|
14
15
|
defaultComponent: 'div';
|
|
15
16
|
}>;
|
|
@@ -19,4 +20,5 @@ export declare const PanelHeader: React.ForwardRefExoticComponent<{
|
|
|
19
20
|
titleTextProps?: Partial<ITextProps<"span">> | undefined;
|
|
20
21
|
endAdornment?: React.ReactNode;
|
|
21
22
|
classes?: Partial<Record<"title" | "content" | "root" | "endAdornment", string>> | undefined;
|
|
22
|
-
|
|
23
|
+
titleNoWrap?: boolean | undefined;
|
|
24
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "ref" | "classes" | "endAdornment" | "titleComponent" | "titleTextProps" | "titleNoWrap"> & import("../../styled").IStyledCommonProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -77,11 +77,22 @@ var EndAdornment = (0, styled_1.styled)('div')(function (_a) {
|
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
79
|
exports.PanelHeader = React.forwardRef(function (props, ref) {
|
|
80
|
-
var title = props.title, className = props.className, propClasses = props.classes, endAdornment = props.endAdornment, titleTextProps = props.titleTextProps, titleComponent = props.titleComponent, rootProps = __rest(props, ["title", "className", "classes", "endAdornment", "titleTextProps", "titleComponent"]);
|
|
80
|
+
var title = props.title, className = props.className, propClasses = props.classes, endAdornment = props.endAdornment, titleTextProps = props.titleTextProps, titleComponent = props.titleComponent, titleNoWrap = props.titleNoWrap, rootProps = __rest(props, ["title", "className", "classes", "endAdornment", "titleTextProps", "titleComponent", "titleNoWrap"]);
|
|
81
81
|
var classes = (0, classes_1.useMergedClasses)(panel_header_classes_1.panelHeaderClasses, panel_header_classes_1.getPanelHeaderUtilityClass, propClasses);
|
|
82
82
|
var panelContext = (0, panel_context_1.usePanelContext)();
|
|
83
|
+
var textStyles = titleNoWrap
|
|
84
|
+
? {
|
|
85
|
+
whiteSpace: 'nowrap',
|
|
86
|
+
overflow: 'hidden',
|
|
87
|
+
textOverflow: 'ellipsis',
|
|
88
|
+
}
|
|
89
|
+
: {
|
|
90
|
+
whiteSpace: 'normal',
|
|
91
|
+
overflow: 'visible',
|
|
92
|
+
textOverflow: 'clip', // Don't apply ellipsis
|
|
93
|
+
};
|
|
83
94
|
return (React.createElement(Root, __assign({ className: (0, utils_1.clsx)(classes.root, className), ownerState: { isCloseButtonVisible: panelContext.isCloseButtonVisible }, ref: ref }, rootProps),
|
|
84
|
-
React.createElement(Content, { className: classes.content },
|
|
85
|
-
React.createElement(text_1.Text, __assign({ className: classes.title, component: titleComponent, variant: "h5" }, titleTextProps), title)),
|
|
95
|
+
React.createElement(Content, { className: classes.content, sx: textStyles },
|
|
96
|
+
React.createElement(text_1.Text, __assign({ className: classes.title, component: titleComponent, variant: "h5" }, titleTextProps, { title: titleNoWrap ? title : '', sx: textStyles }), title)),
|
|
86
97
|
!!endAdornment && React.createElement(EndAdornment, { className: classes.endAdornment }, endAdornment)));
|
|
87
98
|
});
|
|
@@ -49,6 +49,14 @@ export interface ISelectableCardProps extends Omit<ICardProps, SelectableControl
|
|
|
49
49
|
* value. Mainly used for radio control type
|
|
50
50
|
*/
|
|
51
51
|
value?: string;
|
|
52
|
+
/**
|
|
53
|
+
* If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
|
|
54
|
+
*
|
|
55
|
+
* Note that text overflow can only happen with block or inline-block level elements
|
|
56
|
+
* (the element needs to have a width in order to overflow).
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
noWrap?: boolean;
|
|
52
60
|
}
|
|
53
61
|
export declare const SelectableCard: React.ForwardRefExoticComponent<ISelectableCardProps & React.RefAttributes<HTMLLabelElement>>;
|
|
54
62
|
export {};
|
|
@@ -78,9 +78,12 @@ var ControlRadio = createControl(radio_1.Radio, 'ControlRadio');
|
|
|
78
78
|
var ControlCheckbox = createControl(checkbox_1.Checkbox, 'ControlCheckbox');
|
|
79
79
|
var Content = (0, styled_1.styled)('div', { name: selectable_card_classes_1.selectableCardComponentName, slot: 'Content' })({
|
|
80
80
|
flex: 1,
|
|
81
|
+
whiteSpace: 'nowrap',
|
|
82
|
+
overflow: 'hidden',
|
|
83
|
+
textOverflow: 'ellipsis',
|
|
81
84
|
});
|
|
82
85
|
exports.SelectableCard = React.forwardRef(function (props, ref) {
|
|
83
|
-
var avatar = props.avatar, label = props.label, propTitle = props.title, propDescription = props.description, helperText = props.helperText, value = props.value, disabled = props.disabled, name = props.name, onChange = props.onChange, checkedProp = props.checked, RadioProps = props.RadioProps, CheckboxProps = props.CheckboxProps, _a = props.controlPlacement, controlPlacement = _a === void 0 ? 'start' : _a, _b = props.size, size = _b === void 0 ? 'medium' : _b, type = props.type, _c = props.hideControl, hideControl = _c === void 0 ? false : _c, children = props.children, className = props.className, propClasses = props.classes, rootProps = __rest(props, ["avatar", "label", "title", "description", "helperText", "value", "disabled", "name", "onChange", "checked", "RadioProps", "CheckboxProps", "controlPlacement", "size", "type", "hideControl", "children", "className", "classes"]);
|
|
86
|
+
var avatar = props.avatar, label = props.label, propTitle = props.title, propDescription = props.description, helperText = props.helperText, value = props.value, disabled = props.disabled, name = props.name, onChange = props.onChange, checkedProp = props.checked, RadioProps = props.RadioProps, CheckboxProps = props.CheckboxProps, _a = props.controlPlacement, controlPlacement = _a === void 0 ? 'start' : _a, _b = props.size, size = _b === void 0 ? 'medium' : _b, type = props.type, _c = props.hideControl, hideControl = _c === void 0 ? false : _c, children = props.children, className = props.className, _d = props.noWrap, noWrap = _d === void 0 ? false : _d, propClasses = props.classes, rootProps = __rest(props, ["avatar", "label", "title", "description", "helperText", "value", "disabled", "name", "onChange", "checked", "RadioProps", "CheckboxProps", "controlPlacement", "size", "type", "hideControl", "children", "className", "noWrap", "classes"]);
|
|
84
87
|
var inputRef = React.createRef();
|
|
85
88
|
var radioGroup = (0, radio_1.useRadioGroup)();
|
|
86
89
|
var classes = (0, classes_1.useMergedClasses)(selectable_card_classes_1.selectableCardClasses, selectable_card_classes_1.getSelectableCardUtilityClass, propClasses);
|
|
@@ -90,7 +93,7 @@ exports.SelectableCard = React.forwardRef(function (props, ref) {
|
|
|
90
93
|
if (radioGroup && checked == null) {
|
|
91
94
|
checked = radioGroup.value === value;
|
|
92
95
|
}
|
|
93
|
-
var content = children || React.createElement(card_1.CardHeader, { avatar: avatar, title: title, subheader: description });
|
|
96
|
+
var content = children || React.createElement(card_1.CardHeader, { avatar: avatar, title: title, subheader: description, noWrap: noWrap });
|
|
94
97
|
var Control = type === 'radio' ? ControlRadio : ControlCheckbox;
|
|
95
98
|
var control = (React.createElement(Control, __assign({ value: value, inputRef: inputRef, onChange: onChange, disabled: disabled, className: type === 'radio' ? classes.controlRadio : classes.controlCheckbox, ownerState: { hidden: hideControl }, checked: checked }, (type === 'radio' ? RadioProps : CheckboxProps))));
|
|
96
99
|
return (React.createElement(Root, __assign({}, { ref: ref }, { size: size, selected: checked, disabled: disabled, button: true, className: (0, clsx_1.default)(classes.root, className), component: "label" }, rootProps),
|
package/text/text.js
CHANGED
|
@@ -115,8 +115,8 @@ var getComponentForVariant = function (_a) {
|
|
|
115
115
|
return exports.textVariantMapping[variant];
|
|
116
116
|
};
|
|
117
117
|
exports.Text = React.forwardRef(function (props, ref) {
|
|
118
|
-
var variant = props.variant, propClasses = props.classes, propComponent = props.component, className = props.className, rootProps = __rest(props, ["variant", "classes", "component", "className"]);
|
|
118
|
+
var variant = props.variant, propClasses = props.classes, propComponent = props.component, className = props.className, sx = props.sx, rootProps = __rest(props, ["variant", "classes", "component", "className", "sx"]);
|
|
119
119
|
var classes = useUtilityClasses(variant, propClasses);
|
|
120
120
|
var component = propComponent || getComponentForVariant({ variant: variant });
|
|
121
|
-
return (React.createElement(Root, __assign({ ref: ref, variant: variant, className: (0, clsx_1.default)([classes.root, className]) }, { component: component }, rootProps)));
|
|
121
|
+
return (React.createElement(Root, __assign({ ref: ref, variant: variant, className: (0, clsx_1.default)([classes.root, className]) }, { component: component }, { sx: sx }, rootProps)));
|
|
122
122
|
});
|
|
@@ -57,6 +57,6 @@ var title_block_classes_1 = require("./title-block-classes");
|
|
|
57
57
|
exports.TitleBlock = React.forwardRef(function (_a, ref) {
|
|
58
58
|
var title = _a.title, _b = _a.titleTypographyProps, titleTypographyProps = _b === void 0 ? {} : _b, description = _a.description, _c = _a.descriptionTypographyProps, descriptionTypographyProps = _c === void 0 ? {} : _c, className = _a.className, rootProps = __rest(_a, ["title", "titleTypographyProps", "description", "descriptionTypographyProps", "className"]);
|
|
59
59
|
return (React.createElement(row_layout_1.RowLayout, __assign({ gutter: 0, className: (0, clsx_1.default)(title_block_classes_1.titleBlockClasses.root, className) }, rootProps, { ref: ref }),
|
|
60
|
-
React.createElement(text_1.Text, __assign({ className: title_block_classes_1.titleBlockClasses.title, variant: "subtitle2", color: "inherit" }, titleTypographyProps, { title: title }), title),
|
|
61
|
-
!!description && (React.createElement(text_1.Text, __assign({ variant: "body2", color: "textSecondary", className: title_block_classes_1.titleBlockClasses.description }, descriptionTypographyProps, { title: description }), description))));
|
|
60
|
+
React.createElement(text_1.Text, __assign({ className: title_block_classes_1.titleBlockClasses.title, variant: "subtitle2", color: "inherit" }, titleTypographyProps, { title: (titleTypographyProps === null || titleTypographyProps === void 0 ? void 0 : titleTypographyProps.noWrap) && typeof title === 'string' ? title : '' }), title),
|
|
61
|
+
!!description && (React.createElement(text_1.Text, __assign({ variant: "body2", color: "textSecondary", className: title_block_classes_1.titleBlockClasses.description }, descriptionTypographyProps, { title: (descriptionTypographyProps === null || descriptionTypographyProps === void 0 ? void 0 : descriptionTypographyProps.noWrap) && typeof title === 'string' ? description : '' }), description))));
|
|
62
62
|
});
|