@auth0/quantum-product 2.5.9 → 2.6.0
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/breadcrumbs/breadcrumbs-item/breadcrumbs-item.js +2 -2
- package/button/button.d.ts +1 -0
- package/button/button.js +2 -2
- package/card/card.d.ts +1 -0
- package/card/card.js +2 -2
- package/chip/chip.d.ts +1 -0
- package/chip/chip.js +2 -2
- package/esm/breadcrumbs/breadcrumbs-item/breadcrumbs-item.js +2 -2
- package/esm/button/button.js +2 -2
- package/esm/card/card.js +2 -2
- package/esm/chip/chip.js +2 -2
- package/esm/icon-button/icon-button.js +2 -2
- package/esm/link/link.js +2 -2
- package/esm/tabs/tab/tab.js +2 -2
- package/icon-button/icon-button.d.ts +1 -0
- package/icon-button/icon-button.js +2 -2
- package/link/link.d.ts +4 -0
- package/link/link.js +2 -2
- package/package.json +1 -1
- package/tabs/tab/tab.d.ts +1 -0
- package/tabs/tab/tab.js +2 -2
|
@@ -95,9 +95,9 @@ var EndIcon = (0, styled_1.styled)('span', {
|
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
exports.BreadcrumbsItem = React.forwardRef(function (props, ref) {
|
|
98
|
-
var label = props.label, startIcon = props.startIcon, endIcon = props.endIcon, className = props.className, isCurrent = props.isCurrent, children = props.children, propClasses = props.classes, rootProps = __rest(props, ["label", "startIcon", "endIcon", "className", "isCurrent", "children", "classes"]);
|
|
98
|
+
var label = props.label, startIcon = props.startIcon, endIcon = props.endIcon, className = props.className, isCurrent = props.isCurrent, children = props.children, propClasses = props.classes, analyticsId = props.analyticsId, rootProps = __rest(props, ["label", "startIcon", "endIcon", "className", "isCurrent", "children", "classes", "analyticsId"]);
|
|
99
99
|
var classes = (0, classes_1.useMergedClasses)(breadcrumbs_item_classes_1.breadcrumbsItemClasses, breadcrumbs_item_classes_1.getBreadcrumbsItemUtilityClass, propClasses);
|
|
100
|
-
return (React.createElement(Root, __assign({ variant: "subtitle2", color: isCurrent ? 'textPrimary' : 'textSecondary', className: (0, clsx_1.default)(classes.root, isCurrent && classes.current, className), "aria-current": isCurrent ? 'page' : undefined, ref: ref }, rootProps),
|
|
100
|
+
return (React.createElement(Root, __assign({ variant: "subtitle2", color: isCurrent ? 'textPrimary' : 'textSecondary', className: (0, clsx_1.default)(classes.root, isCurrent && classes.current, className), "aria-current": isCurrent ? 'page' : undefined, ref: ref, analyticsId: analyticsId }, rootProps),
|
|
101
101
|
!!startIcon && React.createElement(StartIcon, { className: (0, clsx_1.default)(classes.icon, classes.startIcon) }, startIcon),
|
|
102
102
|
React.createElement("span", { className: classes.label }, label || children),
|
|
103
103
|
!!endIcon && React.createElement(EndIcon, { className: (0, clsx_1.default)(classes.icon, classes.endIcon) }, endIcon)));
|
package/button/button.d.ts
CHANGED
package/button/button.js
CHANGED
|
@@ -86,14 +86,14 @@ var LabelSpan = (0, styled_1.styled)('span')(function (_a) {
|
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
exports.Button = React.forwardRef(function (_a, ref) {
|
|
89
|
-
var isLoading = _a.isLoading, label = _a.label, children = _a.children, disabled = _a.disabled, _b = _a.SpinnerProps, SpinnerProps = _b === void 0 ? {} : _b, _c = _a.color, color = _c === void 0 ? 'default' : _c, variant = _a.variant, maxWidth = _a.maxWidth, rootProps = __rest(_a, ["isLoading", "label", "children", "disabled", "SpinnerProps", "color", "variant", "maxWidth"]);
|
|
89
|
+
var isLoading = _a.isLoading, label = _a.label, children = _a.children, disabled = _a.disabled, _b = _a.SpinnerProps, SpinnerProps = _b === void 0 ? {} : _b, _c = _a.color, color = _c === void 0 ? 'default' : _c, variant = _a.variant, maxWidth = _a.maxWidth, analyticsId = _a.analyticsId, rootProps = __rest(_a, ["isLoading", "label", "children", "disabled", "SpinnerProps", "color", "variant", "maxWidth", "analyticsId"]);
|
|
90
90
|
var title = label ||
|
|
91
91
|
(typeof children === 'string'
|
|
92
92
|
? children
|
|
93
93
|
: React.Children.toArray(children)
|
|
94
94
|
.filter(function (child) { return typeof child === 'string'; })
|
|
95
95
|
.join(''));
|
|
96
|
-
return (React.createElement(Root, __assign({}, rootProps, { disabled: disabled || isLoading, ownerState: { isLoading: isLoading }, color: color, variant: variant, ref: ref, title: String(title) }),
|
|
96
|
+
return (React.createElement(Root, __assign({}, rootProps, { disabled: disabled || isLoading, ownerState: { isLoading: isLoading }, color: color, variant: variant, ref: ref, title: String(title) }, (analyticsId && { 'data-analytics-id': analyticsId })),
|
|
97
97
|
React.createElement(LabelSpan, { style: { maxWidth: rootProps.fullWidth ? 'none' : maxWidth || '100%' } }, label || children),
|
|
98
98
|
' ',
|
|
99
99
|
!!isLoading && React.createElement(ButtonSpinner, __assign({}, SpinnerProps))));
|
package/card/card.d.ts
CHANGED
package/card/card.js
CHANGED
|
@@ -121,7 +121,7 @@ var Root = (0, styled_1.styled)(Card_1.default, {
|
|
|
121
121
|
exports.Card = React.forwardRef(function (props, ref) {
|
|
122
122
|
var button = props.button, _a = props.component, component = _a === void 0 ? 'div' : _a, disabled = props.disabled, className = props.className, selected = props.selected, selectableButton = props.selectableButton, _b = props.size, size = _b === void 0 ? 'large' : _b,
|
|
123
123
|
// remove to prevent passing through to the root
|
|
124
|
-
propClasses = props.classes, rootProps = __rest(props, ["button", "component", "disabled", "className", "selected", "selectableButton", "size", "classes"]);
|
|
124
|
+
propClasses = props.classes, analyticsId = props.analyticsId, rootProps = __rest(props, ["button", "component", "disabled", "className", "selected", "selectableButton", "size", "classes", "analyticsId"]);
|
|
125
125
|
return (React.createElement(card_context_1.CardContext.Provider, { value: { size: size } },
|
|
126
126
|
React.createElement(Root, __assign({}, { component: component }, { ownerState: {
|
|
127
127
|
size: size,
|
|
@@ -129,5 +129,5 @@ exports.Card = React.forwardRef(function (props, ref) {
|
|
|
129
129
|
selectableButton: selectableButton,
|
|
130
130
|
button: button,
|
|
131
131
|
selected: selected,
|
|
132
|
-
} }, rootProps, { className: className, role: button ? 'button' : undefined, tabIndex: button && !disabled ? 0 : undefined, "aria-disabled": disabled, ref: ref }))));
|
|
132
|
+
} }, (analyticsId && { 'data-analytics-id': analyticsId }), rootProps, { className: className, role: button ? 'button' : undefined, tabIndex: button && !disabled ? 0 : undefined, "aria-disabled": disabled, ref: ref }))));
|
|
133
133
|
});
|
package/chip/chip.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ import { ChipProps } from '@mui/material/Chip';
|
|
|
3
3
|
export declare const chipComponentName: "QuantumChip";
|
|
4
4
|
export interface IChipProps extends Omit<ChipProps, 'color' | 'variant'> {
|
|
5
5
|
selected?: boolean;
|
|
6
|
+
analyticsId?: string;
|
|
6
7
|
}
|
|
7
8
|
export declare const Chip: React.ForwardRefExoticComponent<Omit<IChipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/chip/chip.js
CHANGED
|
@@ -81,6 +81,6 @@ var Root = (0, styled_1.styled)(Chip_1.default, { name: exports.chipComponentNam
|
|
|
81
81
|
_b))));
|
|
82
82
|
});
|
|
83
83
|
exports.Chip = React.forwardRef(function (props, ref) {
|
|
84
|
-
var selected = props.selected, _a = props.deleteIcon, deleteIcon = _a === void 0 ? React.createElement(icon_1.XIcon, null) : _a, chipProps = __rest(props, ["selected", "deleteIcon"]);
|
|
85
|
-
return (React.createElement(Root, __assign({ ref: ref, deleteIcon: deleteIcon, ownerState: { selected: selected } }, chipProps, { title: props === null || props === void 0 ? void 0 : props.label })));
|
|
84
|
+
var selected = props.selected, _a = props.deleteIcon, deleteIcon = _a === void 0 ? React.createElement(icon_1.XIcon, null) : _a, analyticsId = props.analyticsId, chipProps = __rest(props, ["selected", "deleteIcon", "analyticsId"]);
|
|
85
|
+
return (React.createElement(Root, __assign({ ref: ref, deleteIcon: deleteIcon, ownerState: { selected: selected } }, (analyticsId && { 'data-analytics-id': analyticsId }), chipProps, { title: props === null || props === void 0 ? void 0 : props.label })));
|
|
86
86
|
});
|
|
@@ -66,9 +66,9 @@ var EndIcon = styled('span', {
|
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
export var BreadcrumbsItem = React.forwardRef(function (props, ref) {
|
|
69
|
-
var label = props.label, startIcon = props.startIcon, endIcon = props.endIcon, className = props.className, isCurrent = props.isCurrent, children = props.children, propClasses = props.classes, rootProps = __rest(props, ["label", "startIcon", "endIcon", "className", "isCurrent", "children", "classes"]);
|
|
69
|
+
var label = props.label, startIcon = props.startIcon, endIcon = props.endIcon, className = props.className, isCurrent = props.isCurrent, children = props.children, propClasses = props.classes, analyticsId = props.analyticsId, rootProps = __rest(props, ["label", "startIcon", "endIcon", "className", "isCurrent", "children", "classes", "analyticsId"]);
|
|
70
70
|
var classes = useMergedClasses(breadcrumbsItemClasses, getBreadcrumbsItemUtilityClass, propClasses);
|
|
71
|
-
return (React.createElement(Root, __assign({ variant: "subtitle2", color: isCurrent ? 'textPrimary' : 'textSecondary', className: clsx(classes.root, isCurrent && classes.current, className), "aria-current": isCurrent ? 'page' : undefined, ref: ref }, rootProps),
|
|
71
|
+
return (React.createElement(Root, __assign({ variant: "subtitle2", color: isCurrent ? 'textPrimary' : 'textSecondary', className: clsx(classes.root, isCurrent && classes.current, className), "aria-current": isCurrent ? 'page' : undefined, ref: ref, analyticsId: analyticsId }, rootProps),
|
|
72
72
|
!!startIcon && React.createElement(StartIcon, { className: clsx(classes.icon, classes.startIcon) }, startIcon),
|
|
73
73
|
React.createElement("span", { className: classes.label }, label || children),
|
|
74
74
|
!!endIcon && React.createElement(EndIcon, { className: clsx(classes.icon, classes.endIcon) }, endIcon)));
|
package/esm/button/button.js
CHANGED
|
@@ -60,14 +60,14 @@ var LabelSpan = styled('span')(function (_a) {
|
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
62
|
export var Button = React.forwardRef(function (_a, ref) {
|
|
63
|
-
var isLoading = _a.isLoading, label = _a.label, children = _a.children, disabled = _a.disabled, _b = _a.SpinnerProps, SpinnerProps = _b === void 0 ? {} : _b, _c = _a.color, color = _c === void 0 ? 'default' : _c, variant = _a.variant, maxWidth = _a.maxWidth, rootProps = __rest(_a, ["isLoading", "label", "children", "disabled", "SpinnerProps", "color", "variant", "maxWidth"]);
|
|
63
|
+
var isLoading = _a.isLoading, label = _a.label, children = _a.children, disabled = _a.disabled, _b = _a.SpinnerProps, SpinnerProps = _b === void 0 ? {} : _b, _c = _a.color, color = _c === void 0 ? 'default' : _c, variant = _a.variant, maxWidth = _a.maxWidth, analyticsId = _a.analyticsId, rootProps = __rest(_a, ["isLoading", "label", "children", "disabled", "SpinnerProps", "color", "variant", "maxWidth", "analyticsId"]);
|
|
64
64
|
var title = label ||
|
|
65
65
|
(typeof children === 'string'
|
|
66
66
|
? children
|
|
67
67
|
: React.Children.toArray(children)
|
|
68
68
|
.filter(function (child) { return typeof child === 'string'; })
|
|
69
69
|
.join(''));
|
|
70
|
-
return (React.createElement(Root, __assign({}, rootProps, { disabled: disabled || isLoading, ownerState: { isLoading: isLoading }, color: color, variant: variant, ref: ref, title: String(title) }),
|
|
70
|
+
return (React.createElement(Root, __assign({}, rootProps, { disabled: disabled || isLoading, ownerState: { isLoading: isLoading }, color: color, variant: variant, ref: ref, title: String(title) }, (analyticsId && { 'data-analytics-id': analyticsId })),
|
|
71
71
|
React.createElement(LabelSpan, { style: { maxWidth: rootProps.fullWidth ? 'none' : maxWidth || '100%' } }, label || children),
|
|
72
72
|
' ',
|
|
73
73
|
!!isLoading && React.createElement(ButtonSpinner, __assign({}, SpinnerProps))));
|
package/esm/card/card.js
CHANGED
|
@@ -92,7 +92,7 @@ var Root = styled(MuiCard, {
|
|
|
92
92
|
export var Card = React.forwardRef(function (props, ref) {
|
|
93
93
|
var button = props.button, _a = props.component, component = _a === void 0 ? 'div' : _a, disabled = props.disabled, className = props.className, selected = props.selected, selectableButton = props.selectableButton, _b = props.size, size = _b === void 0 ? 'large' : _b,
|
|
94
94
|
// remove to prevent passing through to the root
|
|
95
|
-
propClasses = props.classes, rootProps = __rest(props, ["button", "component", "disabled", "className", "selected", "selectableButton", "size", "classes"]);
|
|
95
|
+
propClasses = props.classes, analyticsId = props.analyticsId, rootProps = __rest(props, ["button", "component", "disabled", "className", "selected", "selectableButton", "size", "classes", "analyticsId"]);
|
|
96
96
|
return (React.createElement(CardContext.Provider, { value: { size: size } },
|
|
97
97
|
React.createElement(Root, __assign({}, { component: component }, { ownerState: {
|
|
98
98
|
size: size,
|
|
@@ -100,5 +100,5 @@ export var Card = React.forwardRef(function (props, ref) {
|
|
|
100
100
|
selectableButton: selectableButton,
|
|
101
101
|
button: button,
|
|
102
102
|
selected: selected,
|
|
103
|
-
} }, rootProps, { className: className, role: button ? 'button' : undefined, tabIndex: button && !disabled ? 0 : undefined, "aria-disabled": disabled, ref: ref }))));
|
|
103
|
+
} }, (analyticsId && { 'data-analytics-id': analyticsId }), rootProps, { className: className, role: button ? 'button' : undefined, tabIndex: button && !disabled ? 0 : undefined, "aria-disabled": disabled, ref: ref }))));
|
|
104
104
|
});
|
package/esm/chip/chip.js
CHANGED
|
@@ -55,6 +55,6 @@ var Root = styled(MuiChip, { name: chipComponentName, slot: 'Root' })(function (
|
|
|
55
55
|
_b))));
|
|
56
56
|
});
|
|
57
57
|
export var Chip = React.forwardRef(function (props, ref) {
|
|
58
|
-
var selected = props.selected, _a = props.deleteIcon, deleteIcon = _a === void 0 ? React.createElement(XIcon, null) : _a, chipProps = __rest(props, ["selected", "deleteIcon"]);
|
|
59
|
-
return (React.createElement(Root, __assign({ ref: ref, deleteIcon: deleteIcon, ownerState: { selected: selected } }, chipProps, { title: props === null || props === void 0 ? void 0 : props.label })));
|
|
58
|
+
var selected = props.selected, _a = props.deleteIcon, deleteIcon = _a === void 0 ? React.createElement(XIcon, null) : _a, analyticsId = props.analyticsId, chipProps = __rest(props, ["selected", "deleteIcon", "analyticsId"]);
|
|
59
|
+
return (React.createElement(Root, __assign({ ref: ref, deleteIcon: deleteIcon, ownerState: { selected: selected } }, (analyticsId && { 'data-analytics-id': analyticsId }), chipProps, { title: props === null || props === void 0 ? void 0 : props.label })));
|
|
60
60
|
});
|
|
@@ -73,9 +73,9 @@ var DisabledWrapper = styled('span', {
|
|
|
73
73
|
});
|
|
74
74
|
export var IconButton = React.forwardRef(function (props, ref) {
|
|
75
75
|
var iconButtonContext = useIconButtonContext();
|
|
76
|
-
var isLoading = props.isLoading, _a = props.SpinnerProps, SpinnerProps = _a === void 0 ? {} : _a, children = props.children, label = props.label, _b = props.color, color = _b === void 0 ? 'default' : _b, _c = props.variant, variant = _c === void 0 ? 'link' : _c, _d = props.size, size = _d === void 0 ? 'medium' : _d, disabled = props.disabled, edgeProp = props.edge, _e = props.shape, shape = _e === void 0 ? 'default' : _e, tooltipPlacement = props.tooltipPlacement, onTooltipClose = props.onTooltipClose, iconButtonProps = __rest(props, ["isLoading", "SpinnerProps", "children", "label", "color", "variant", "size", "disabled", "edge", "shape", "tooltipPlacement", "onTooltipClose"]);
|
|
76
|
+
var isLoading = props.isLoading, _a = props.SpinnerProps, SpinnerProps = _a === void 0 ? {} : _a, children = props.children, label = props.label, _b = props.color, color = _b === void 0 ? 'default' : _b, _c = props.variant, variant = _c === void 0 ? 'link' : _c, _d = props.size, size = _d === void 0 ? 'medium' : _d, disabled = props.disabled, edgeProp = props.edge, _e = props.shape, shape = _e === void 0 ? 'default' : _e, tooltipPlacement = props.tooltipPlacement, onTooltipClose = props.onTooltipClose, analyticsId = props.analyticsId, iconButtonProps = __rest(props, ["isLoading", "SpinnerProps", "children", "label", "color", "variant", "size", "disabled", "edge", "shape", "tooltipPlacement", "onTooltipClose", "analyticsId"]);
|
|
77
77
|
var edge = edgeProp != null ? edgeProp : iconButtonContext.edge;
|
|
78
78
|
var captizedLable = label ? capitalize(label) : null;
|
|
79
|
-
var button = (React.createElement(StyledIconButton, __assign({ color: color, ref: ref, edge: edge, disabled: disabled || isLoading, size: size, variant: variant, ownerState: { shape: shape, isLoading: isLoading }, "aria-label": captizedLable }, iconButtonProps), isLoading ? React.createElement(ButtonSpinner, __assign({}, SpinnerProps)) : React.createElement(React.Fragment, null, children)));
|
|
79
|
+
var button = (React.createElement(StyledIconButton, __assign({ color: color, ref: ref, edge: edge, disabled: disabled || isLoading, size: size, variant: variant, ownerState: { shape: shape, isLoading: isLoading }, "aria-label": captizedLable }, (analyticsId && { 'data-analytics-id': analyticsId }), iconButtonProps), isLoading ? React.createElement(ButtonSpinner, __assign({}, SpinnerProps)) : React.createElement(React.Fragment, null, children)));
|
|
80
80
|
return (React.createElement(Root, { title: captizedLable, placement: tooltipPlacement, onClose: onTooltipClose }, disabled ? React.createElement(DisabledWrapper, null, button) : button));
|
|
81
81
|
});
|
package/esm/link/link.js
CHANGED
|
@@ -124,14 +124,14 @@ var EndIcon = styled('span', { name: linkComponentName, slot: 'EndIcon' })(funct
|
|
|
124
124
|
export var Link = React.forwardRef(function (props, ref) {
|
|
125
125
|
var className = props.className, children = props.children, startIcon = props.startIcon, endIcon = props.endIcon, _a = props.color, color = _a === void 0 ? 'primary' : _a, _b = props.component, component = _b === void 0 ? 'a' : _b, _c = props.underline, underline = _c === void 0 ? 'none' : _c, _d = props.variant, variant = _d === void 0 ? 'inherit' : _d,
|
|
126
126
|
// remove to avoid forwarding
|
|
127
|
-
propClasses = props.classes, rootProps = __rest(props, ["className", "children", "startIcon", "endIcon", "color", "component", "underline", "variant", "classes"]);
|
|
127
|
+
propClasses = props.classes, analyticsId = props.analyticsId, rootProps = __rest(props, ["className", "children", "startIcon", "endIcon", "color", "component", "underline", "variant", "classes", "analyticsId"]);
|
|
128
128
|
var classes = useMergedClasses(linkClasses, getLinkUtilityClass, propClasses);
|
|
129
129
|
var ownerState = {
|
|
130
130
|
color: color,
|
|
131
131
|
component: component,
|
|
132
132
|
underline: underline,
|
|
133
133
|
};
|
|
134
|
-
return (React.createElement(Root, __assign({ color: color === 'inherit' ? color : undefined, component: component, className: clsx([classes.root, className]), ref: ref, ownerState: ownerState, variant: variant }, rootProps),
|
|
134
|
+
return (React.createElement(Root, __assign({ color: color === 'inherit' ? color : undefined, component: component, className: clsx([classes.root, className]), ref: ref, ownerState: ownerState, variant: variant }, (analyticsId && { 'data-analytics-id': analyticsId }), rootProps),
|
|
135
135
|
!!startIcon && (React.createElement(StartIcon, { className: clsx(classes.icon, classes.startIcon, classes.startIcon) }, startIcon)),
|
|
136
136
|
children,
|
|
137
137
|
!!endIcon && React.createElement(EndIcon, { className: clsx(classes.icon, classes.endIcon) }, endIcon)));
|
package/esm/tabs/tab/tab.js
CHANGED
|
@@ -43,9 +43,9 @@ var LabelContainer = styled('div')(function (_a) {
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
export var Tab = React.forwardRef(function (_a, ref) {
|
|
46
|
-
var value = _a.value, productReleaseStage = _a.productReleaseStage, label = _a.label, _b = _a.sx, sx = _b === void 0 ? {} : _b, tabProps = __rest(_a, ["value", "productReleaseStage", "label", "sx"]);
|
|
46
|
+
var value = _a.value, productReleaseStage = _a.productReleaseStage, label = _a.label, _b = _a.sx, sx = _b === void 0 ? {} : _b, analyticsId = _a.analyticsId, tabProps = __rest(_a, ["value", "productReleaseStage", "label", "sx", "analyticsId"]);
|
|
47
47
|
var _c = useTabsContext(), getTabProps = _c.getTabProps, fullWidth = _c.fullWidth;
|
|
48
48
|
return (React.createElement(MuiTab, __assign({ ref: ref }, getTabProps(value), { value: value, label: React.createElement(StackLayout, { gutter: 0 },
|
|
49
49
|
React.createElement(LabelContainer, { width: sx === null || sx === void 0 ? void 0 : sx.width, maxWidth: sx === null || sx === void 0 ? void 0 : sx.maxWidth, title: label }, label),
|
|
50
|
-
productReleaseStage && React.createElement(AvailabilityLabel, { productReleaseStage: productReleaseStage })) }, tabProps, { fullWidth: fullWidth })));
|
|
50
|
+
productReleaseStage && React.createElement(AvailabilityLabel, { productReleaseStage: productReleaseStage })) }, (analyticsId && { 'data-analytics-id': analyticsId }), tabProps, { fullWidth: fullWidth })));
|
|
51
51
|
});
|
|
@@ -18,6 +18,7 @@ export type IIconButtonTypeMap<ExtraPropsType = {}, DefaultElementType extends R
|
|
|
18
18
|
target?: string;
|
|
19
19
|
isLoading?: boolean;
|
|
20
20
|
SpinnerProps?: Partial<ISpinnerProps>;
|
|
21
|
+
analyticsId?: string;
|
|
21
22
|
}, DefaultElementType>;
|
|
22
23
|
export interface IExtendIconButtonTypeMap<M extends OverridableTypeMap> {
|
|
23
24
|
props: M['props'] & (M['props'] extends {
|
|
@@ -99,9 +99,9 @@ var DisabledWrapper = (0, styled_1.styled)('span', {
|
|
|
99
99
|
});
|
|
100
100
|
exports.IconButton = React.forwardRef(function (props, ref) {
|
|
101
101
|
var iconButtonContext = (0, icon_button_context_1.useIconButtonContext)();
|
|
102
|
-
var isLoading = props.isLoading, _a = props.SpinnerProps, SpinnerProps = _a === void 0 ? {} : _a, children = props.children, label = props.label, _b = props.color, color = _b === void 0 ? 'default' : _b, _c = props.variant, variant = _c === void 0 ? 'link' : _c, _d = props.size, size = _d === void 0 ? 'medium' : _d, disabled = props.disabled, edgeProp = props.edge, _e = props.shape, shape = _e === void 0 ? 'default' : _e, tooltipPlacement = props.tooltipPlacement, onTooltipClose = props.onTooltipClose, iconButtonProps = __rest(props, ["isLoading", "SpinnerProps", "children", "label", "color", "variant", "size", "disabled", "edge", "shape", "tooltipPlacement", "onTooltipClose"]);
|
|
102
|
+
var isLoading = props.isLoading, _a = props.SpinnerProps, SpinnerProps = _a === void 0 ? {} : _a, children = props.children, label = props.label, _b = props.color, color = _b === void 0 ? 'default' : _b, _c = props.variant, variant = _c === void 0 ? 'link' : _c, _d = props.size, size = _d === void 0 ? 'medium' : _d, disabled = props.disabled, edgeProp = props.edge, _e = props.shape, shape = _e === void 0 ? 'default' : _e, tooltipPlacement = props.tooltipPlacement, onTooltipClose = props.onTooltipClose, analyticsId = props.analyticsId, iconButtonProps = __rest(props, ["isLoading", "SpinnerProps", "children", "label", "color", "variant", "size", "disabled", "edge", "shape", "tooltipPlacement", "onTooltipClose", "analyticsId"]);
|
|
103
103
|
var edge = edgeProp != null ? edgeProp : iconButtonContext.edge;
|
|
104
104
|
var captizedLable = label ? (0, material_1.capitalize)(label) : null;
|
|
105
|
-
var button = (React.createElement(StyledIconButton, __assign({ color: color, ref: ref, edge: edge, disabled: disabled || isLoading, size: size, variant: variant, ownerState: { shape: shape, isLoading: isLoading }, "aria-label": captizedLable }, iconButtonProps), isLoading ? React.createElement(ButtonSpinner, __assign({}, SpinnerProps)) : React.createElement(React.Fragment, null, children)));
|
|
105
|
+
var button = (React.createElement(StyledIconButton, __assign({ color: color, ref: ref, edge: edge, disabled: disabled || isLoading, size: size, variant: variant, ownerState: { shape: shape, isLoading: isLoading }, "aria-label": captizedLable }, (analyticsId && { 'data-analytics-id': analyticsId }), iconButtonProps), isLoading ? React.createElement(ButtonSpinner, __assign({}, SpinnerProps)) : React.createElement(React.Fragment, null, children)));
|
|
106
106
|
return (React.createElement(Root, { title: captizedLable, placement: tooltipPlacement, onClose: onTooltipClose }, disabled ? React.createElement(DisabledWrapper, null, button) : button));
|
|
107
107
|
});
|
package/link/link.d.ts
CHANGED
package/link/link.js
CHANGED
|
@@ -153,14 +153,14 @@ var EndIcon = (0, styled_1.styled)('span', { name: link_classes_1.linkComponentN
|
|
|
153
153
|
exports.Link = React.forwardRef(function (props, ref) {
|
|
154
154
|
var className = props.className, children = props.children, startIcon = props.startIcon, endIcon = props.endIcon, _a = props.color, color = _a === void 0 ? 'primary' : _a, _b = props.component, component = _b === void 0 ? 'a' : _b, _c = props.underline, underline = _c === void 0 ? 'none' : _c, _d = props.variant, variant = _d === void 0 ? 'inherit' : _d,
|
|
155
155
|
// remove to avoid forwarding
|
|
156
|
-
propClasses = props.classes, rootProps = __rest(props, ["className", "children", "startIcon", "endIcon", "color", "component", "underline", "variant", "classes"]);
|
|
156
|
+
propClasses = props.classes, analyticsId = props.analyticsId, rootProps = __rest(props, ["className", "children", "startIcon", "endIcon", "color", "component", "underline", "variant", "classes", "analyticsId"]);
|
|
157
157
|
var classes = (0, classes_1.useMergedClasses)(link_classes_1.linkClasses, link_classes_1.getLinkUtilityClass, propClasses);
|
|
158
158
|
var ownerState = {
|
|
159
159
|
color: color,
|
|
160
160
|
component: component,
|
|
161
161
|
underline: underline,
|
|
162
162
|
};
|
|
163
|
-
return (React.createElement(Root, __assign({ color: color === 'inherit' ? color : undefined, component: component, className: (0, clsx_1.default)([classes.root, className]), ref: ref, ownerState: ownerState, variant: variant }, rootProps),
|
|
163
|
+
return (React.createElement(Root, __assign({ color: color === 'inherit' ? color : undefined, component: component, className: (0, clsx_1.default)([classes.root, className]), ref: ref, ownerState: ownerState, variant: variant }, (analyticsId && { 'data-analytics-id': analyticsId }), rootProps),
|
|
164
164
|
!!startIcon && (React.createElement(StartIcon, { className: (0, clsx_1.default)(classes.icon, classes.startIcon, classes.startIcon) }, startIcon)),
|
|
165
165
|
children,
|
|
166
166
|
!!endIcon && React.createElement(EndIcon, { className: (0, clsx_1.default)(classes.icon, classes.endIcon) }, endIcon)));
|
package/package.json
CHANGED
package/tabs/tab/tab.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { OverridableComponent, OverrideProps } from '../../overridable-component
|
|
|
3
3
|
import { TabTypeMap } from '@mui/material/Tab';
|
|
4
4
|
type ITabTypeMap<ExtraPropsType = {}, DefaultElementType extends React.ElementType = TabTypeMap['defaultComponent']> = TabTypeMap<ExtraPropsType & {
|
|
5
5
|
productReleaseStage?: 'beta' | 'earlyAccess' | 'generalAvailability';
|
|
6
|
+
analyticsId?: string;
|
|
6
7
|
}, DefaultElementType>;
|
|
7
8
|
export type ITabProps<D extends React.ElementType = ITabTypeMap['defaultComponent'], P = {}> = OverrideProps<ITabTypeMap<P, D>, D>;
|
|
8
9
|
export declare const Tab: OverridableComponent<ITabTypeMap<{}, "div">>;
|
package/tabs/tab/tab.js
CHANGED
|
@@ -72,9 +72,9 @@ var LabelContainer = (0, styled_1.styled)('div')(function (_a) {
|
|
|
72
72
|
});
|
|
73
73
|
});
|
|
74
74
|
exports.Tab = React.forwardRef(function (_a, ref) {
|
|
75
|
-
var value = _a.value, productReleaseStage = _a.productReleaseStage, label = _a.label, _b = _a.sx, sx = _b === void 0 ? {} : _b, tabProps = __rest(_a, ["value", "productReleaseStage", "label", "sx"]);
|
|
75
|
+
var value = _a.value, productReleaseStage = _a.productReleaseStage, label = _a.label, _b = _a.sx, sx = _b === void 0 ? {} : _b, analyticsId = _a.analyticsId, tabProps = __rest(_a, ["value", "productReleaseStage", "label", "sx", "analyticsId"]);
|
|
76
76
|
var _c = (0, tabs_context_1.useTabsContext)(), getTabProps = _c.getTabProps, fullWidth = _c.fullWidth;
|
|
77
77
|
return (React.createElement(Tab_1.default, __assign({ ref: ref }, getTabProps(value), { value: value, label: React.createElement(stack_layout_1.StackLayout, { gutter: 0 },
|
|
78
78
|
React.createElement(LabelContainer, { width: sx === null || sx === void 0 ? void 0 : sx.width, maxWidth: sx === null || sx === void 0 ? void 0 : sx.maxWidth, title: label }, label),
|
|
79
|
-
productReleaseStage && React.createElement(AvailabilityLabel, { productReleaseStage: productReleaseStage })) }, tabProps, { fullWidth: fullWidth })));
|
|
79
|
+
productReleaseStage && React.createElement(AvailabilityLabel, { productReleaseStage: productReleaseStage })) }, (analyticsId && { 'data-analytics-id': analyticsId }), tabProps, { fullWidth: fullWidth })));
|
|
80
80
|
});
|