@auth0/quantum-product 2.4.2 → 2.4.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.
package/alert/alert.js CHANGED
@@ -57,13 +57,6 @@ var classes_1 = require("../styles/classes");
57
57
  var styled_1 = require("../styled");
58
58
  var clsx_1 = __importDefault(require("../utils/clsx"));
59
59
  var alert_classes_1 = require("./alert-classes");
60
- var severityBorderShade = {
61
- default: 'color_bg_state_neutral',
62
- danger: 'color_bg_state_danger',
63
- warning: 'color_bg_state_caution',
64
- info: 'color_bg_state_info',
65
- success: 'color_bg_state_success',
66
- };
67
60
  var severityIconShade = {
68
61
  default: 'color_fg_state_neutral',
69
62
  danger: 'color_fg_state_danger',
@@ -91,11 +84,12 @@ var AlertRoot = (0, styled_1.styled)('div', {
91
84
  })(function (_a) {
92
85
  var _b, _c;
93
86
  var theme = _a.theme, ownerState = _a.ownerState;
94
- return __assign(__assign({ display: 'flex', alignItems: 'flex-start', borderRadius: theme.shape.borderRadius, padding: theme.spacing(1.25, 2), boxShadow: ownerState.elevation ? theme.shadows[ownerState.elevation] : 'none', borderLeft: "".concat(theme.typography.pxToRem(8), " solid ").concat(theme.tokens[severityBorderShade[ownerState.severity]]) }, (ownerState.variant === 'outlined' && (_b = {
87
+ return __assign(__assign({ display: 'flex', alignItems: 'flex-start', borderRadius: 8, padding: theme.spacing(1.25, 2), boxShadow: ownerState.elevation ? theme.shadows[ownerState.elevation] : 'none' }, (ownerState.variant === 'outlined' && (_b = {
95
88
  backgroundColor: theme.tokens.color_bg_layer,
96
89
  borderTop: "1px solid ".concat(theme.tokens.color_border_bold),
97
90
  borderRight: "1px solid ".concat(theme.tokens.color_border_bold),
98
- borderBottom: "1px solid ".concat(theme.tokens.color_border_bold)
91
+ borderBottom: "1px solid ".concat(theme.tokens.color_border_bold),
92
+ borderLeft: "1px solid ".concat(theme.tokens.color_border_bold)
99
93
  },
100
94
  _b["& .".concat(alert_classes_1.alertClasses.icon)] = {
101
95
  color: theme.tokens[severityIconShade[ownerState.severity]],
@@ -178,13 +172,6 @@ var AlertAction = (0, styled_1.styled)('div', {
178
172
  },
179
173
  _b);
180
174
  });
181
- var defaultIconMapping = {
182
- warning: React.createElement(icon_1.AlertTriangleIcon, null),
183
- danger: React.createElement(icon_1.AlertDiamondIcon, null),
184
- success: React.createElement(icon_1.CheckCircleIcon, null),
185
- info: React.createElement(icon_1.InfoIcon, null),
186
- default: React.createElement(icon_1.FileTextIcon, null),
187
- };
188
175
  var useUtilityClasses = function (_a) {
189
176
  var classes = _a.classes;
190
177
  var slots = {
@@ -200,6 +187,21 @@ var useUtilityClasses = function (_a) {
200
187
  exports.Alert = React.forwardRef(function (props, ref) {
201
188
  // const props = useThemeProps({ props: inProps, name: alertComponentName });
202
189
  var classes = useUtilityClasses(props);
190
+ var defaultIconMapping = props.variant === 'outlined'
191
+ ? {
192
+ warning: React.createElement(icon_1.AlertTriangleFilledIcon, null),
193
+ danger: React.createElement(icon_1.AlertDiamondFilledIcon, null),
194
+ success: React.createElement(icon_1.CheckCircleFilledIcon, null),
195
+ info: React.createElement(icon_1.InfoFilledIcon, null),
196
+ default: React.createElement(icon_1.FileTextIcon, null),
197
+ }
198
+ : {
199
+ warning: React.createElement(icon_1.AlertTriangleIcon, null),
200
+ danger: React.createElement(icon_1.AlertDiamondIcon, null),
201
+ success: React.createElement(icon_1.CheckCircleIcon, null),
202
+ info: React.createElement(icon_1.InfoIcon, null),
203
+ default: React.createElement(icon_1.FileTextIcon, null),
204
+ };
203
205
  var action = props.action, children = props.children, className = props.className, _a = props.closeText, closeText = _a === void 0 ? 'Dismiss' : _a, iconProp = props.icon, _b = props.iconMapping, iconMapping = _b === void 0 ? defaultIconMapping : _b, message = props.message, onCloseProp = props.onClose, onDismiss = props.onDismiss, _c = props.role, role = _c === void 0 ? 'alert' : _c, _d = props.severity, severity = _d === void 0 ? 'default' : _d, title = props.title, _e = props.variant, variant = _e === void 0 ? 'standard' : _e, elevation = props.elevation, dismissible = props.dismissible, rootProps = __rest(props, ["action", "children", "className", "closeText", "icon", "iconMapping", "message", "onClose", "onDismiss", "role", "severity", "title", "variant", "elevation", "dismissible"]);
204
206
  var ownerState = {
205
207
  severity: severity,
@@ -21,20 +21,13 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import * as React from 'react';
24
- import { AlertDiamondIcon, AlertTriangleIcon, CheckCircleIcon, FileTextIcon, InfoIcon, XIcon } from '../icon';
24
+ import { AlertDiamondIcon, AlertDiamondFilledIcon, AlertTriangleIcon, AlertTriangleFilledIcon, CheckCircleIcon, CheckCircleFilledIcon, FileTextIcon, InfoIcon, InfoFilledIcon, XIcon, } from '../icon';
25
25
  import { IconButton, iconButtonClasses } from '../icon-button';
26
26
  import { buttonClasses } from '../button';
27
27
  import { composeClasses } from '../styles/classes';
28
28
  import { styled } from '../styled';
29
29
  import clsx from '../utils/clsx';
30
30
  import { alertClasses, alertComponentName, getAlertUtilityClass } from './alert-classes';
31
- var severityBorderShade = {
32
- default: 'color_bg_state_neutral',
33
- danger: 'color_bg_state_danger',
34
- warning: 'color_bg_state_caution',
35
- info: 'color_bg_state_info',
36
- success: 'color_bg_state_success',
37
- };
38
31
  var severityIconShade = {
39
32
  default: 'color_fg_state_neutral',
40
33
  danger: 'color_fg_state_danger',
@@ -62,11 +55,12 @@ var AlertRoot = styled('div', {
62
55
  })(function (_a) {
63
56
  var _b, _c;
64
57
  var theme = _a.theme, ownerState = _a.ownerState;
65
- return __assign(__assign({ display: 'flex', alignItems: 'flex-start', borderRadius: theme.shape.borderRadius, padding: theme.spacing(1.25, 2), boxShadow: ownerState.elevation ? theme.shadows[ownerState.elevation] : 'none', borderLeft: "".concat(theme.typography.pxToRem(8), " solid ").concat(theme.tokens[severityBorderShade[ownerState.severity]]) }, (ownerState.variant === 'outlined' && (_b = {
58
+ return __assign(__assign({ display: 'flex', alignItems: 'flex-start', borderRadius: 8, padding: theme.spacing(1.25, 2), boxShadow: ownerState.elevation ? theme.shadows[ownerState.elevation] : 'none' }, (ownerState.variant === 'outlined' && (_b = {
66
59
  backgroundColor: theme.tokens.color_bg_layer,
67
60
  borderTop: "1px solid ".concat(theme.tokens.color_border_bold),
68
61
  borderRight: "1px solid ".concat(theme.tokens.color_border_bold),
69
- borderBottom: "1px solid ".concat(theme.tokens.color_border_bold)
62
+ borderBottom: "1px solid ".concat(theme.tokens.color_border_bold),
63
+ borderLeft: "1px solid ".concat(theme.tokens.color_border_bold)
70
64
  },
71
65
  _b["& .".concat(alertClasses.icon)] = {
72
66
  color: theme.tokens[severityIconShade[ownerState.severity]],
@@ -149,13 +143,6 @@ var AlertAction = styled('div', {
149
143
  },
150
144
  _b);
151
145
  });
152
- var defaultIconMapping = {
153
- warning: React.createElement(AlertTriangleIcon, null),
154
- danger: React.createElement(AlertDiamondIcon, null),
155
- success: React.createElement(CheckCircleIcon, null),
156
- info: React.createElement(InfoIcon, null),
157
- default: React.createElement(FileTextIcon, null),
158
- };
159
146
  var useUtilityClasses = function (_a) {
160
147
  var classes = _a.classes;
161
148
  var slots = {
@@ -171,6 +158,21 @@ var useUtilityClasses = function (_a) {
171
158
  export var Alert = React.forwardRef(function (props, ref) {
172
159
  // const props = useThemeProps({ props: inProps, name: alertComponentName });
173
160
  var classes = useUtilityClasses(props);
161
+ var defaultIconMapping = props.variant === 'outlined'
162
+ ? {
163
+ warning: React.createElement(AlertTriangleFilledIcon, null),
164
+ danger: React.createElement(AlertDiamondFilledIcon, null),
165
+ success: React.createElement(CheckCircleFilledIcon, null),
166
+ info: React.createElement(InfoFilledIcon, null),
167
+ default: React.createElement(FileTextIcon, null),
168
+ }
169
+ : {
170
+ warning: React.createElement(AlertTriangleIcon, null),
171
+ danger: React.createElement(AlertDiamondIcon, null),
172
+ success: React.createElement(CheckCircleIcon, null),
173
+ info: React.createElement(InfoIcon, null),
174
+ default: React.createElement(FileTextIcon, null),
175
+ };
174
176
  var action = props.action, children = props.children, className = props.className, _a = props.closeText, closeText = _a === void 0 ? 'Dismiss' : _a, iconProp = props.icon, _b = props.iconMapping, iconMapping = _b === void 0 ? defaultIconMapping : _b, message = props.message, onCloseProp = props.onClose, onDismiss = props.onDismiss, _c = props.role, role = _c === void 0 ? 'alert' : _c, _d = props.severity, severity = _d === void 0 ? 'default' : _d, title = props.title, _e = props.variant, variant = _e === void 0 ? 'standard' : _e, elevation = props.elevation, dismissible = props.dismissible, rootProps = __rest(props, ["action", "children", "className", "closeText", "icon", "iconMapping", "message", "onClose", "onDismiss", "role", "severity", "title", "variant", "elevation", "dismissible"]);
175
177
  var ownerState = {
176
178
  severity: severity,
@@ -4,6 +4,7 @@ To update this output make changes to `scripts/svgr/illustration-index-template.
4
4
  */
5
5
  export { IllustrationExperiencedUser } from './experienced-user';
6
6
  export { IllustrationNewAuth0UserA } from './new-auth0-user-a';
7
+ export { IllustrationNoContent } from './no-content';
7
8
  export { IllustrationNotifications } from './notifications';
8
9
  export { IllustrationRoles } from './roles';
9
10
  export { IllustrationSingleSignOn } from './single-sign-on';
@@ -0,0 +1,80 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ /*
24
+ This file is generated with the "illustrations" script.
25
+ To update this output make changes to `scripts/svgr/illustration-icon-template.js
26
+ */
27
+ import * as React from 'react';
28
+ import { illustrationComponentName } from '../common';
29
+ import { styled } from '../../styled';
30
+ export var IllustrationNoContent = styled(function (_a) {
31
+ var props = __rest(_a, []);
32
+ return (React.createElement("svg", __assign({ width: "1em", height: "1em", viewBox: "0 0 250 250", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
33
+ React.createElement("g", { clipPath: "url(#no-content_svg__clip0_3554_6896)", stroke: "#000", strokeWidth: 0.4 },
34
+ React.createElement("path", { d: "M232.75 216.1l-33.4-33.4H50.65l-33.4 33.4h215.5z", fill: "#BDC4CF", strokeMiterlimit: 10 }),
35
+ React.createElement("path", { d: "M50.65 182.7v33.4M199.25 182.7v33.4", strokeMiterlimit: 10 }),
36
+ React.createElement("path", { d: "M182.45 197.3H67.25V42.9h77l38.2 38.2v116.2z", fill: "url(#no-content_svg__paint0_linear_3554_6896)", strokeMiterlimit: 10 }),
37
+ React.createElement("path", { d: "M182.45 194.3H67.25V39.9h77l38.2 38.2v116.2z", fill: "url(#no-content_svg__paint1_linear_3554_6896)", strokeMiterlimit: 10 }),
38
+ React.createElement("path", { d: "M182.45 191.3H67.25V36.9h77l38.2 38.2v116.2z", fill: "url(#no-content_svg__paint2_linear_3554_6896)", strokeMiterlimit: 10 }),
39
+ React.createElement("path", { d: "M182.45 188.3H67.25V33.9h77l38.2 38.2v116.2z", fill: "url(#no-content_svg__paint3_linear_3554_6896)", strokeMiterlimit: 10 }),
40
+ React.createElement("path", { d: "M182.45 72.1h-38.2V33.9l38.2 38.2z", fill: "url(#no-content_svg__paint4_linear_3554_6896)", strokeLinejoin: "bevel" }),
41
+ React.createElement("path", { d: "M108.05 44.6h-29v28.99h29V44.6z", fill: "url(#no-content_svg__paint5_linear_3554_6896)", strokeLinejoin: "round" }),
42
+ React.createElement("path", { d: "M104.25 50.5l-2.4-2.3-8.5 8.5-8.5-8.5-2.3 2.3 8.5 8.5-8.5 8.5 2.3 2.4 8.5-8.5 8.5 8.5 2.4-2.4-8.5-8.5 8.5-8.5z", fill: "url(#no-content_svg__paint6_linear_3554_6896)", strokeMiterlimit: 10 }),
43
+ React.createElement("path", { d: "M170.65 82.4h-91.6v94.2h91.6V82.4z", fill: "url(#no-content_svg__paint7_linear_3554_6896)", strokeLinejoin: "round" }),
44
+ React.createElement("path", { d: "M85.65 88.9l78.5 81.2M164.15 88.9l-78.5 81.2", strokeMiterlimit: 10 }),
45
+ React.createElement("path", { d: "M79.05 102.3h-22.4a24.602 24.602 0 01-23.032-24.55A24.6 24.6 0 0156.65 53.2h10.7v11.6h-10.7a13 13 0 000 25.9h22.4v11.6z", fill: "url(#no-content_svg__paint8_linear_3554_6896)", strokeMiterlimit: 10 }),
46
+ React.createElement("path", { d: "M79.05 87.3h-8.2v18.42h8.2V87.3z", fill: "#000", strokeMiterlimit: 10 }),
47
+ React.createElement("path", { d: "M70.75 88.9h-8.2v15.28h8.2V88.9z", fill: "#BDC4CF", strokeMiterlimit: 10 })),
48
+ React.createElement("defs", null,
49
+ React.createElement("linearGradient", { id: "no-content_svg__paint0_linear_3554_6896", x1: 67.28, y1: 120.11, x2: 182.46, y2: 120.11, gradientUnits: "userSpaceOnUse" },
50
+ React.createElement("stop", { stopColor: "#E8EBED" }),
51
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
52
+ React.createElement("linearGradient", { id: "no-content_svg__paint1_linear_3554_6896", x1: 5888.31, y1: 12915.3, x2: 19157, y2: 12915.3, gradientUnits: "userSpaceOnUse" },
53
+ React.createElement("stop", { stopColor: "#E8EBED" }),
54
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
55
+ React.createElement("linearGradient", { id: "no-content_svg__paint2_linear_3554_6896", x1: 5888.31, y1: 12453.7, x2: 19157, y2: 12453.7, gradientUnits: "userSpaceOnUse" },
56
+ React.createElement("stop", { stopColor: "#E8EBED" }),
57
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
58
+ React.createElement("linearGradient", { id: "no-content_svg__paint3_linear_3554_6896", x1: 5888.31, y1: 11982.9, x2: 19157, y2: 11982.9, gradientUnits: "userSpaceOnUse" },
59
+ React.createElement("stop", { stopColor: "#E8EBED" }),
60
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
61
+ React.createElement("linearGradient", { id: "no-content_svg__paint4_linear_3554_6896", x1: 5015.9, y1: 770.778, x2: 6474.37, y2: 770.778, gradientUnits: "userSpaceOnUse" },
62
+ React.createElement("stop", { stopColor: "#E8EBED" }),
63
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
64
+ React.createElement("linearGradient", { id: "no-content_svg__paint5_linear_3554_6896", x1: 79.054, y1: 59.094, x2: 108.054, y2: 59.094, gradientUnits: "userSpaceOnUse" },
65
+ React.createElement("stop", { stopColor: "#635DFF" }),
66
+ React.createElement("stop", { offset: 1, stopColor: "#3885FF" })),
67
+ React.createElement("linearGradient", { id: "no-content_svg__paint6_linear_3554_6896", x1: 1509.32, y1: 597.644, x2: 1980.87, y2: 597.644, gradientUnits: "userSpaceOnUse" },
68
+ React.createElement("stop", { stopColor: "#E8EBED" }),
69
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
70
+ React.createElement("linearGradient", { id: "no-content_svg__paint7_linear_3554_6896", x1: 79.046, y1: 129.498, x2: 170.645, y2: 129.498, gradientUnits: "userSpaceOnUse" },
71
+ React.createElement("stop", { stopColor: "#FF4F40" }),
72
+ React.createElement("stop", { offset: 1, stopColor: "#F4D" })),
73
+ React.createElement("linearGradient", { id: "no-content_svg__paint8_linear_3554_6896", x1: 26.877, y1: 55.072, x2: 59.794, y2: 115.027, gradientUnits: "userSpaceOnUse" },
74
+ React.createElement("stop", { stopColor: "#3EC6EB" }),
75
+ React.createElement("stop", { offset: 0.999, stopColor: "#1BC99F" })),
76
+ React.createElement("clipPath", { id: "no-content_svg__clip0_3554_6896" },
77
+ React.createElement("path", { fill: "#fff", transform: "translate(16.75 33.7)", d: "M0 0h216.5v182.6H0z" })))));
78
+ }, {
79
+ name: illustrationComponentName,
80
+ })({});
@@ -27,8 +27,8 @@ import { styled } from '../styled';
27
27
  import { useMergedClasses } from '../styles/classes';
28
28
  import { Text } from '../text';
29
29
  import clsx from '../utils/clsx';
30
- import { paginationComponentName, paginationClasses, getPaginationUtilityClass, } from './pagination-classes';
31
30
  import { Pager } from './pager';
31
+ import { getPaginationUtilityClass, paginationClasses, paginationComponentName, } from './pagination-classes';
32
32
  var Root = styled('fieldset', { name: paginationComponentName, slot: 'Root' })(function (_a) {
33
33
  var ownerState = _a.ownerState;
34
34
  return (__assign({ justifyContent: 'space-between', display: 'flex', alignItems: 'center', margin: 0, padding: 0, border: 'none' }, (ownerState.disabled && {
@@ -61,7 +61,7 @@ var changePageIfAppropriate = function (_a) {
61
61
  }
62
62
  };
63
63
  export var Pagination = React.forwardRef(function (props, ref) {
64
- var children = props.children, className = props.className, page = props.page, perPage = props.perPage, items = props.items, onPageChanged = props.onPageChanged, disabled = props.disabled, propClasses = props.classes, _a = props.PagerProps, PagerProps = _a === void 0 ? {} : _a, rootProps = __rest(props, ["children", "className", "page", "perPage", "items", "onPageChanged", "disabled", "classes", "PagerProps"]);
64
+ var children = props.children, className = props.className, page = props.page, perPage = props.perPage, items = props.items, _a = props.showPageSelection, showPageSelection = _a === void 0 ? false : _a, onPageChanged = props.onPageChanged, disabled = props.disabled, propClasses = props.classes, _b = props.PagerProps, PagerProps = _b === void 0 ? {} : _b, rootProps = __rest(props, ["children", "className", "page", "perPage", "items", "showPageSelection", "onPageChanged", "disabled", "classes", "PagerProps"]);
65
65
  var classes = useMergedClasses(paginationClasses, getPaginationUtilityClass, propClasses);
66
66
  var pages = pagesFromItems(items, perPage);
67
67
  var pageOptions = React.useMemo(function () {
@@ -96,5 +96,15 @@ export var Pagination = React.forwardRef(function (props, ref) {
96
96
  React.createElement(Text, { className: classes.pageLabelText, variant: "body2" },
97
97
  "of ",
98
98
  pages))),
99
- React.createElement(Pager, __assign({ page: page, className: classes.pager, onPageChange: function (nextPage) { return changePageIfAppropriate({ nextPage: nextPage, total: items, perPage: perPage, onPageChanged: onPageChanged }); }, totalPages: pages, disabled: disabled }, PagerProps))))));
99
+ React.createElement(StackLayout, null,
100
+ showPageSelection && (React.createElement(StackLayoutItem, null,
101
+ React.createElement(Text, null,
102
+ "Showing ",
103
+ page * perPage - perPage + 1,
104
+ " to ",
105
+ page * perPage,
106
+ " of ",
107
+ items))),
108
+ React.createElement(StackLayoutItem, null,
109
+ React.createElement(Pager, __assign({ page: page, className: classes.pager, onPageChange: function (nextPage) { return changePageIfAppropriate({ nextPage: nextPage, total: items, perPage: perPage, onPageChanged: onPageChanged }); }, totalPages: pages, disabled: disabled }, PagerProps))))))));
100
110
  });
@@ -49,6 +49,16 @@ var Dot = styled('span', { name: statusDotComponentName, slot: 'Dot' })(function
49
49
  },
50
50
  }[color]));
51
51
  });
52
+ var Label = styled('span')(function (_a) {
53
+ var width = _a.width, maxWidth = _a.maxWidth;
54
+ return ({
55
+ overflow: 'hidden',
56
+ whiteSpace: 'nowrap',
57
+ textOverflow: 'ellipsis',
58
+ width: width,
59
+ maxWidth: maxWidth,
60
+ });
61
+ });
52
62
  var DetailsIcon = styled('div', { name: statusDotComponentName, slot: 'DetailsIcon' })(function (_a) {
53
63
  var theme = _a.theme;
54
64
  return ({
@@ -58,14 +68,16 @@ var DetailsIcon = styled('div', { name: statusDotComponentName, slot: 'DetailsIc
58
68
  });
59
69
  export var StatusDot = React.forwardRef(function (props, ref) {
60
70
  var _a = props.color, color = _a === void 0 ? 'default' : _a, textColor = props.textColor, _b = props.textVariant, textVariant = _b === void 0 ? 'body2' : _b, className = props.className, children = props.children, label = props.label, details = props.details, // remove to prevent passing through to the root
61
- propClasses = props.classes, rootProps = __rest(props, ["color", "textColor", "textVariant", "className", "children", "label", "details", "classes"]);
71
+ propClasses = props.classes, _c = props.sx, sx = _c === void 0 ? {} : _c, rootProps = __rest(props, ["color", "textColor", "textVariant", "className", "children", "label", "details", "classes", "sx"]);
72
+ var _d = sx, width = _d.width, maxWidth = _d.maxWidth;
62
73
  var classes = useMergedClasses(statusDotClasses, getStatusDotUtilityClass, propClasses);
63
74
  var ownerState = {
64
75
  color: color,
65
76
  };
66
77
  return (React.createElement(Root, __assign({ ref: ref, component: "span", variant: textVariant, color: textColor, className: clsx(classes.root, className) }, rootProps),
67
78
  React.createElement(Dot, { role: "img", ownerState: ownerState, className: classes.dot }),
68
- label,
79
+ !!label && (React.createElement(Tooltip, { title: label },
80
+ React.createElement(Label, { width: width, maxWidth: maxWidth }, label))),
69
81
  !!details && (React.createElement(Tooltip, { title: details },
70
82
  React.createElement(DetailsIcon, null,
71
83
  React.createElement(HelpCircleIcon, { size: "1em" }))))));
@@ -1,5 +1,6 @@
1
1
  export { IllustrationExperiencedUser } from './experienced-user';
2
2
  export { IllustrationNewAuth0UserA } from './new-auth0-user-a';
3
+ export { IllustrationNoContent } from './no-content';
3
4
  export { IllustrationNotifications } from './notifications';
4
5
  export { IllustrationRoles } from './roles';
5
6
  export { IllustrationSingleSignOn } from './single-sign-on';
@@ -4,11 +4,13 @@ This file is generated. Any changes made to this file will be lost.
4
4
  To update this output make changes to `scripts/svgr/illustration-index-template.js`
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.IllustrationUsers = exports.IllustrationStreamsLogs = exports.IllustrationSingleSignOn = exports.IllustrationRoles = exports.IllustrationNotifications = exports.IllustrationNewAuth0UserA = exports.IllustrationExperiencedUser = void 0;
7
+ exports.IllustrationUsers = exports.IllustrationStreamsLogs = exports.IllustrationSingleSignOn = exports.IllustrationRoles = exports.IllustrationNotifications = exports.IllustrationNoContent = exports.IllustrationNewAuth0UserA = exports.IllustrationExperiencedUser = void 0;
8
8
  var experienced_user_1 = require("./experienced-user");
9
9
  Object.defineProperty(exports, "IllustrationExperiencedUser", { enumerable: true, get: function () { return experienced_user_1.IllustrationExperiencedUser; } });
10
10
  var new_auth0_user_a_1 = require("./new-auth0-user-a");
11
11
  Object.defineProperty(exports, "IllustrationNewAuth0UserA", { enumerable: true, get: function () { return new_auth0_user_a_1.IllustrationNewAuth0UserA; } });
12
+ var no_content_1 = require("./no-content");
13
+ Object.defineProperty(exports, "IllustrationNoContent", { enumerable: true, get: function () { return no_content_1.IllustrationNoContent; } });
12
14
  var notifications_1 = require("./notifications");
13
15
  Object.defineProperty(exports, "IllustrationNotifications", { enumerable: true, get: function () { return notifications_1.IllustrationNotifications; } });
14
16
  var roles_1 = require("./roles");
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { IIllustrationProps } from '../common';
3
+ export declare const IllustrationNoContent: import("styled-components").StyledComponent<({ ...props }: IIllustrationProps) => React.JSX.Element, import("../..").ITheme, import("@mui/system").MUIStyledCommonProps<import("../..").ITheme>, never>;
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ var __rest = (this && this.__rest) || function (s, e) {
37
+ var t = {};
38
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
39
+ t[p] = s[p];
40
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
41
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
42
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
43
+ t[p[i]] = s[p[i]];
44
+ }
45
+ return t;
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.IllustrationNoContent = void 0;
49
+ /*
50
+ This file is generated with the "illustrations" script.
51
+ To update this output make changes to `scripts/svgr/illustration-icon-template.js
52
+ */
53
+ var React = __importStar(require("react"));
54
+ var common_1 = require("../common");
55
+ var styled_1 = require("../../styled");
56
+ exports.IllustrationNoContent = (0, styled_1.styled)(function (_a) {
57
+ var props = __rest(_a, []);
58
+ return (React.createElement("svg", __assign({ width: "1em", height: "1em", viewBox: "0 0 250 250", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
59
+ React.createElement("g", { clipPath: "url(#no-content_svg__clip0_3554_6896)", stroke: "#000", strokeWidth: 0.4 },
60
+ React.createElement("path", { d: "M232.75 216.1l-33.4-33.4H50.65l-33.4 33.4h215.5z", fill: "#BDC4CF", strokeMiterlimit: 10 }),
61
+ React.createElement("path", { d: "M50.65 182.7v33.4M199.25 182.7v33.4", strokeMiterlimit: 10 }),
62
+ React.createElement("path", { d: "M182.45 197.3H67.25V42.9h77l38.2 38.2v116.2z", fill: "url(#no-content_svg__paint0_linear_3554_6896)", strokeMiterlimit: 10 }),
63
+ React.createElement("path", { d: "M182.45 194.3H67.25V39.9h77l38.2 38.2v116.2z", fill: "url(#no-content_svg__paint1_linear_3554_6896)", strokeMiterlimit: 10 }),
64
+ React.createElement("path", { d: "M182.45 191.3H67.25V36.9h77l38.2 38.2v116.2z", fill: "url(#no-content_svg__paint2_linear_3554_6896)", strokeMiterlimit: 10 }),
65
+ React.createElement("path", { d: "M182.45 188.3H67.25V33.9h77l38.2 38.2v116.2z", fill: "url(#no-content_svg__paint3_linear_3554_6896)", strokeMiterlimit: 10 }),
66
+ React.createElement("path", { d: "M182.45 72.1h-38.2V33.9l38.2 38.2z", fill: "url(#no-content_svg__paint4_linear_3554_6896)", strokeLinejoin: "bevel" }),
67
+ React.createElement("path", { d: "M108.05 44.6h-29v28.99h29V44.6z", fill: "url(#no-content_svg__paint5_linear_3554_6896)", strokeLinejoin: "round" }),
68
+ React.createElement("path", { d: "M104.25 50.5l-2.4-2.3-8.5 8.5-8.5-8.5-2.3 2.3 8.5 8.5-8.5 8.5 2.3 2.4 8.5-8.5 8.5 8.5 2.4-2.4-8.5-8.5 8.5-8.5z", fill: "url(#no-content_svg__paint6_linear_3554_6896)", strokeMiterlimit: 10 }),
69
+ React.createElement("path", { d: "M170.65 82.4h-91.6v94.2h91.6V82.4z", fill: "url(#no-content_svg__paint7_linear_3554_6896)", strokeLinejoin: "round" }),
70
+ React.createElement("path", { d: "M85.65 88.9l78.5 81.2M164.15 88.9l-78.5 81.2", strokeMiterlimit: 10 }),
71
+ React.createElement("path", { d: "M79.05 102.3h-22.4a24.602 24.602 0 01-23.032-24.55A24.6 24.6 0 0156.65 53.2h10.7v11.6h-10.7a13 13 0 000 25.9h22.4v11.6z", fill: "url(#no-content_svg__paint8_linear_3554_6896)", strokeMiterlimit: 10 }),
72
+ React.createElement("path", { d: "M79.05 87.3h-8.2v18.42h8.2V87.3z", fill: "#000", strokeMiterlimit: 10 }),
73
+ React.createElement("path", { d: "M70.75 88.9h-8.2v15.28h8.2V88.9z", fill: "#BDC4CF", strokeMiterlimit: 10 })),
74
+ React.createElement("defs", null,
75
+ React.createElement("linearGradient", { id: "no-content_svg__paint0_linear_3554_6896", x1: 67.28, y1: 120.11, x2: 182.46, y2: 120.11, gradientUnits: "userSpaceOnUse" },
76
+ React.createElement("stop", { stopColor: "#E8EBED" }),
77
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
78
+ React.createElement("linearGradient", { id: "no-content_svg__paint1_linear_3554_6896", x1: 5888.31, y1: 12915.3, x2: 19157, y2: 12915.3, gradientUnits: "userSpaceOnUse" },
79
+ React.createElement("stop", { stopColor: "#E8EBED" }),
80
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
81
+ React.createElement("linearGradient", { id: "no-content_svg__paint2_linear_3554_6896", x1: 5888.31, y1: 12453.7, x2: 19157, y2: 12453.7, gradientUnits: "userSpaceOnUse" },
82
+ React.createElement("stop", { stopColor: "#E8EBED" }),
83
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
84
+ React.createElement("linearGradient", { id: "no-content_svg__paint3_linear_3554_6896", x1: 5888.31, y1: 11982.9, x2: 19157, y2: 11982.9, gradientUnits: "userSpaceOnUse" },
85
+ React.createElement("stop", { stopColor: "#E8EBED" }),
86
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
87
+ React.createElement("linearGradient", { id: "no-content_svg__paint4_linear_3554_6896", x1: 5015.9, y1: 770.778, x2: 6474.37, y2: 770.778, gradientUnits: "userSpaceOnUse" },
88
+ React.createElement("stop", { stopColor: "#E8EBED" }),
89
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
90
+ React.createElement("linearGradient", { id: "no-content_svg__paint5_linear_3554_6896", x1: 79.054, y1: 59.094, x2: 108.054, y2: 59.094, gradientUnits: "userSpaceOnUse" },
91
+ React.createElement("stop", { stopColor: "#635DFF" }),
92
+ React.createElement("stop", { offset: 1, stopColor: "#3885FF" })),
93
+ React.createElement("linearGradient", { id: "no-content_svg__paint6_linear_3554_6896", x1: 1509.32, y1: 597.644, x2: 1980.87, y2: 597.644, gradientUnits: "userSpaceOnUse" },
94
+ React.createElement("stop", { stopColor: "#E8EBED" }),
95
+ React.createElement("stop", { offset: 1, stopColor: "#fff" })),
96
+ React.createElement("linearGradient", { id: "no-content_svg__paint7_linear_3554_6896", x1: 79.046, y1: 129.498, x2: 170.645, y2: 129.498, gradientUnits: "userSpaceOnUse" },
97
+ React.createElement("stop", { stopColor: "#FF4F40" }),
98
+ React.createElement("stop", { offset: 1, stopColor: "#F4D" })),
99
+ React.createElement("linearGradient", { id: "no-content_svg__paint8_linear_3554_6896", x1: 26.877, y1: 55.072, x2: 59.794, y2: 115.027, gradientUnits: "userSpaceOnUse" },
100
+ React.createElement("stop", { stopColor: "#3EC6EB" }),
101
+ React.createElement("stop", { offset: 0.999, stopColor: "#1BC99F" })),
102
+ React.createElement("clipPath", { id: "no-content_svg__clip0_3554_6896" },
103
+ React.createElement("path", { fill: "#fff", transform: "translate(16.75 33.7)", d: "M0 0h216.5v182.6H0z" })))));
104
+ }, {
105
+ name: common_1.illustrationComponentName,
106
+ })({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auth0/quantum-product",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "sideEffects": false,
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { IStyledComponentProps } from '../styled';
3
- import { PaginationClasses } from './pagination-classes';
4
3
  import { IPagerProps } from './pager';
4
+ import { PaginationClasses } from './pagination-classes';
5
5
  export type IPaginationProps = IStyledComponentProps<{
6
6
  props: {
7
7
  items: number;
8
+ showPageSelection?: boolean;
8
9
  page: number;
9
10
  perPage: number;
10
11
  disabled?: boolean;
@@ -16,10 +17,11 @@ export type IPaginationProps = IStyledComponentProps<{
16
17
  }>;
17
18
  export declare const Pagination: React.ForwardRefExoticComponent<{
18
19
  items: number;
20
+ showPageSelection?: boolean | undefined;
19
21
  page: number;
20
22
  perPage: number;
21
23
  disabled?: boolean | undefined;
22
24
  onPageChanged(page: number): void;
23
25
  PagerProps?: Partial<IPagerProps> | undefined;
24
26
  classes?: Partial<Record<"root" | "pageSelect" | "pageLabelText" | "pager", string>> | undefined;
25
- } & Omit<React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref" | "disabled" | "page" | "classes" | "items" | "perPage" | "onPageChanged" | "PagerProps"> & import("../styled").IStyledCommonProps & React.RefAttributes<HTMLFieldSetElement>>;
27
+ } & Omit<React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref" | "disabled" | "page" | "classes" | "items" | "showPageSelection" | "perPage" | "onPageChanged" | "PagerProps"> & import("../styled").IStyledCommonProps & React.RefAttributes<HTMLFieldSetElement>>;
@@ -56,8 +56,8 @@ var styled_1 = require("../styled");
56
56
  var classes_1 = require("../styles/classes");
57
57
  var text_1 = require("../text");
58
58
  var clsx_1 = __importDefault(require("../utils/clsx"));
59
- var pagination_classes_1 = require("./pagination-classes");
60
59
  var pager_1 = require("./pager");
60
+ var pagination_classes_1 = require("./pagination-classes");
61
61
  var Root = (0, styled_1.styled)('fieldset', { name: pagination_classes_1.paginationComponentName, slot: 'Root' })(function (_a) {
62
62
  var ownerState = _a.ownerState;
63
63
  return (__assign({ justifyContent: 'space-between', display: 'flex', alignItems: 'center', margin: 0, padding: 0, border: 'none' }, (ownerState.disabled && {
@@ -90,7 +90,7 @@ var changePageIfAppropriate = function (_a) {
90
90
  }
91
91
  };
92
92
  exports.Pagination = React.forwardRef(function (props, ref) {
93
- var children = props.children, className = props.className, page = props.page, perPage = props.perPage, items = props.items, onPageChanged = props.onPageChanged, disabled = props.disabled, propClasses = props.classes, _a = props.PagerProps, PagerProps = _a === void 0 ? {} : _a, rootProps = __rest(props, ["children", "className", "page", "perPage", "items", "onPageChanged", "disabled", "classes", "PagerProps"]);
93
+ var children = props.children, className = props.className, page = props.page, perPage = props.perPage, items = props.items, _a = props.showPageSelection, showPageSelection = _a === void 0 ? false : _a, onPageChanged = props.onPageChanged, disabled = props.disabled, propClasses = props.classes, _b = props.PagerProps, PagerProps = _b === void 0 ? {} : _b, rootProps = __rest(props, ["children", "className", "page", "perPage", "items", "showPageSelection", "onPageChanged", "disabled", "classes", "PagerProps"]);
94
94
  var classes = (0, classes_1.useMergedClasses)(pagination_classes_1.paginationClasses, pagination_classes_1.getPaginationUtilityClass, propClasses);
95
95
  var pages = pagesFromItems(items, perPage);
96
96
  var pageOptions = React.useMemo(function () {
@@ -125,5 +125,15 @@ exports.Pagination = React.forwardRef(function (props, ref) {
125
125
  React.createElement(text_1.Text, { className: classes.pageLabelText, variant: "body2" },
126
126
  "of ",
127
127
  pages))),
128
- React.createElement(pager_1.Pager, __assign({ page: page, className: classes.pager, onPageChange: function (nextPage) { return changePageIfAppropriate({ nextPage: nextPage, total: items, perPage: perPage, onPageChanged: onPageChanged }); }, totalPages: pages, disabled: disabled }, PagerProps))))));
128
+ React.createElement(stack_layout_1.StackLayout, null,
129
+ showPageSelection && (React.createElement(stack_layout_1.StackLayoutItem, null,
130
+ React.createElement(text_1.Text, null,
131
+ "Showing ",
132
+ page * perPage - perPage + 1,
133
+ " to ",
134
+ page * perPage,
135
+ " of ",
136
+ items))),
137
+ React.createElement(stack_layout_1.StackLayoutItem, null,
138
+ React.createElement(pager_1.Pager, __assign({ page: page, className: classes.pager, onPageChange: function (nextPage) { return changePageIfAppropriate({ nextPage: nextPage, total: items, perPage: perPage, onPageChanged: onPageChanged }); }, totalPages: pages, disabled: disabled }, PagerProps))))))));
129
139
  });
@@ -78,6 +78,16 @@ var Dot = (0, styled_1.styled)('span', { name: status_dot_classes_1.statusDotCom
78
78
  },
79
79
  }[color]));
80
80
  });
81
+ var Label = (0, styled_1.styled)('span')(function (_a) {
82
+ var width = _a.width, maxWidth = _a.maxWidth;
83
+ return ({
84
+ overflow: 'hidden',
85
+ whiteSpace: 'nowrap',
86
+ textOverflow: 'ellipsis',
87
+ width: width,
88
+ maxWidth: maxWidth,
89
+ });
90
+ });
81
91
  var DetailsIcon = (0, styled_1.styled)('div', { name: status_dot_classes_1.statusDotComponentName, slot: 'DetailsIcon' })(function (_a) {
82
92
  var theme = _a.theme;
83
93
  return ({
@@ -87,14 +97,16 @@ var DetailsIcon = (0, styled_1.styled)('div', { name: status_dot_classes_1.statu
87
97
  });
88
98
  exports.StatusDot = React.forwardRef(function (props, ref) {
89
99
  var _a = props.color, color = _a === void 0 ? 'default' : _a, textColor = props.textColor, _b = props.textVariant, textVariant = _b === void 0 ? 'body2' : _b, className = props.className, children = props.children, label = props.label, details = props.details, // remove to prevent passing through to the root
90
- propClasses = props.classes, rootProps = __rest(props, ["color", "textColor", "textVariant", "className", "children", "label", "details", "classes"]);
100
+ propClasses = props.classes, _c = props.sx, sx = _c === void 0 ? {} : _c, rootProps = __rest(props, ["color", "textColor", "textVariant", "className", "children", "label", "details", "classes", "sx"]);
101
+ var _d = sx, width = _d.width, maxWidth = _d.maxWidth;
91
102
  var classes = (0, classes_1.useMergedClasses)(status_dot_classes_1.statusDotClasses, status_dot_classes_1.getStatusDotUtilityClass, propClasses);
92
103
  var ownerState = {
93
104
  color: color,
94
105
  };
95
106
  return (React.createElement(Root, __assign({ ref: ref, component: "span", variant: textVariant, color: textColor, className: (0, clsx_1.default)(classes.root, className) }, rootProps),
96
107
  React.createElement(Dot, { role: "img", ownerState: ownerState, className: classes.dot }),
97
- label,
108
+ !!label && (React.createElement(tooltip_1.Tooltip, { title: label },
109
+ React.createElement(Label, { width: width, maxWidth: maxWidth }, label))),
98
110
  !!details && (React.createElement(tooltip_1.Tooltip, { title: details },
99
111
  React.createElement(DetailsIcon, null,
100
112
  React.createElement(icon_1.HelpCircleIcon, { size: "1em" }))))));