@auth0/quantum-product 1.8.0 → 1.9.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.
Files changed (133) hide show
  1. package/alert/alert.js +1 -1
  2. package/esm/alert/alert.js +2 -2
  3. package/esm/field-set/field-set-classes.js +1 -0
  4. package/esm/field-set/field-set.js +12 -2
  5. package/esm/foundations/token-tables.js +3 -3
  6. package/esm/icon/index.js +381 -34
  7. package/esm/label/label.js +35 -1
  8. package/esm/page/page-header/page-header-classes.js +1 -0
  9. package/esm/page/page-header/page-header.js +11 -2
  10. package/esm/panel/panel-header/panel-header.js +4 -1
  11. package/esm/sidebar/sidebar-link/sidebar-link.js +16 -23
  12. package/esm/tabs/tab/tab.js +13 -2
  13. package/field-set/field-set-classes.d.ts +1 -1
  14. package/field-set/field-set-classes.js +1 -0
  15. package/field-set/field-set.d.ts +5 -4
  16. package/field-set/field-set.js +12 -2
  17. package/foundations/token-tables.js +2 -2
  18. package/icon/index.d.ts +366 -34
  19. package/icon/index.js +400 -68
  20. package/label/label.d.ts +11 -2
  21. package/label/label.js +58 -1
  22. package/package.json +3 -3
  23. package/page/page-header/page-header-classes.d.ts +1 -1
  24. package/page/page-header/page-header-classes.js +1 -0
  25. package/page/page-header/page-header.d.ts +3 -1
  26. package/page/page-header/page-header.js +11 -2
  27. package/panel/panel-header/panel-header.js +4 -1
  28. package/sidebar/sidebar-link/sidebar-link.d.ts +5 -2
  29. package/sidebar/sidebar-link/sidebar-link.js +16 -23
  30. package/tabs/tab/tab.d.ts +6 -2
  31. package/tabs/tab/tab.js +13 -2
  32. package/esm/icon/apis.js +0 -34
  33. package/esm/icon/application-plus.js +0 -30
  34. package/esm/icon/arrows-h.js +0 -31
  35. package/esm/icon/border-pill.js +0 -29
  36. package/esm/icon/border-rounded.js +0 -29
  37. package/esm/icon/border-sharp.js +0 -29
  38. package/esm/icon/bot.js +0 -33
  39. package/esm/icon/browsers.js +0 -32
  40. package/esm/icon/bug.js +0 -38
  41. package/esm/icon/building.js +0 -30
  42. package/esm/icon/cash.js +0 -29
  43. package/esm/icon/clipboard-check.js +0 -31
  44. package/esm/icon/enterprise.js +0 -29
  45. package/esm/icon/feather-icons.js +0 -294
  46. package/esm/icon/folder-cancel.js +0 -30
  47. package/esm/icon/font.js +0 -29
  48. package/esm/icon/help.js +0 -29
  49. package/esm/icon/hooks.js +0 -34
  50. package/esm/icon/hosted-pages.js +0 -33
  51. package/esm/icon/id-tag.js +0 -34
  52. package/esm/icon/integration.js +0 -33
  53. package/esm/icon/layout-bottom.js +0 -29
  54. package/esm/icon/layout-center.js +0 -29
  55. package/esm/icon/layout-left.js +0 -29
  56. package/esm/icon/layout-right.js +0 -29
  57. package/esm/icon/layout-top.js +0 -29
  58. package/esm/icon/megaphone.js +0 -30
  59. package/esm/icon/page-background.js +0 -30
  60. package/esm/icon/paint-brush.js +0 -29
  61. package/esm/icon/paint.js +0 -29
  62. package/esm/icon/recovery-code.js +0 -30
  63. package/esm/icon/web-authn.js +0 -29
  64. package/esm/icon/webauthn-platform.js +0 -29
  65. package/esm/icon/widget.js +0 -29
  66. package/icon/apis.d.ts +0 -2
  67. package/icon/apis.js +0 -61
  68. package/icon/application-plus.d.ts +0 -2
  69. package/icon/application-plus.js +0 -57
  70. package/icon/arrows-h.d.ts +0 -2
  71. package/icon/arrows-h.js +0 -58
  72. package/icon/border-pill.d.ts +0 -2
  73. package/icon/border-pill.js +0 -56
  74. package/icon/border-rounded.d.ts +0 -2
  75. package/icon/border-rounded.js +0 -56
  76. package/icon/border-sharp.d.ts +0 -2
  77. package/icon/border-sharp.js +0 -56
  78. package/icon/bot.d.ts +0 -2
  79. package/icon/bot.js +0 -60
  80. package/icon/browsers.d.ts +0 -2
  81. package/icon/browsers.js +0 -59
  82. package/icon/bug.d.ts +0 -2
  83. package/icon/bug.js +0 -65
  84. package/icon/building.d.ts +0 -2
  85. package/icon/building.js +0 -57
  86. package/icon/cash.d.ts +0 -2
  87. package/icon/cash.js +0 -56
  88. package/icon/clipboard-check.d.ts +0 -2
  89. package/icon/clipboard-check.js +0 -58
  90. package/icon/enterprise.d.ts +0 -2
  91. package/icon/enterprise.js +0 -56
  92. package/icon/feather-icons.d.ts +0 -284
  93. package/icon/feather-icons.js +0 -302
  94. package/icon/folder-cancel.d.ts +0 -2
  95. package/icon/folder-cancel.js +0 -57
  96. package/icon/font.d.ts +0 -2
  97. package/icon/font.js +0 -56
  98. package/icon/help.d.ts +0 -2
  99. package/icon/help.js +0 -56
  100. package/icon/hooks.d.ts +0 -2
  101. package/icon/hooks.js +0 -61
  102. package/icon/hosted-pages.d.ts +0 -2
  103. package/icon/hosted-pages.js +0 -60
  104. package/icon/id-tag.d.ts +0 -2
  105. package/icon/id-tag.js +0 -61
  106. package/icon/integration.d.ts +0 -2
  107. package/icon/integration.js +0 -60
  108. package/icon/layout-bottom.d.ts +0 -2
  109. package/icon/layout-bottom.js +0 -56
  110. package/icon/layout-center.d.ts +0 -2
  111. package/icon/layout-center.js +0 -56
  112. package/icon/layout-left.d.ts +0 -2
  113. package/icon/layout-left.js +0 -56
  114. package/icon/layout-right.d.ts +0 -2
  115. package/icon/layout-right.js +0 -56
  116. package/icon/layout-top.d.ts +0 -2
  117. package/icon/layout-top.js +0 -56
  118. package/icon/megaphone.d.ts +0 -2
  119. package/icon/megaphone.js +0 -57
  120. package/icon/page-background.d.ts +0 -2
  121. package/icon/page-background.js +0 -57
  122. package/icon/paint-brush.d.ts +0 -2
  123. package/icon/paint-brush.js +0 -56
  124. package/icon/paint.d.ts +0 -2
  125. package/icon/paint.js +0 -56
  126. package/icon/recovery-code.d.ts +0 -2
  127. package/icon/recovery-code.js +0 -57
  128. package/icon/web-authn.d.ts +0 -2
  129. package/icon/web-authn.js +0 -56
  130. package/icon/webauthn-platform.d.ts +0 -2
  131. package/icon/webauthn-platform.js +0 -56
  132. package/icon/widget.d.ts +0 -2
  133. package/icon/widget.js +0 -56
@@ -102,33 +102,26 @@ var Decoration = styled('span', { name: sidebarLinkComponentName, slot: 'Decorat
102
102
  marginLeft: theme.spacing(1),
103
103
  });
104
104
  });
105
- var getFeatureAvailabilityLabelProps = function (featureAvailability) {
106
- var labelProps = {
107
- color: 'primary',
108
- variant: 'default',
109
- };
110
- switch (featureAvailability) {
111
- case 'beta':
112
- labelProps.children = 'Beta';
113
- break;
114
- // First Availability has been replaced by Early Access
115
- case 'first':
116
- case 'early':
117
- labelProps.children = 'Early';
118
- break;
119
- case 'new':
120
- labelProps.variant = 'filled';
121
- labelProps.children = 'New';
122
- break;
123
- }
124
- return labelProps;
125
- };
126
105
  export var SidebarLink = React.forwardRef(function (props, ref) {
127
- var title = props.title, startIcon = props.startIcon, endIcon = props.endIcon, featureAvailability = props.featureAvailability, className = props.className, decoration = props.decoration, titleId = props.titleId, _a = props.isActive, isActive = _a === void 0 ? false : _a, _b = props.variant, variant = _b === void 0 ? 'primary' : _b, _c = props.component, LinkComponent = _c === void 0 ? 'a' : _c, propClasses = props.classes, children = props.children, sx = props.sx, propOnClick = props.onClick, _d = props.shouldCollapseSidebarOnClick, shouldCollapseSidebarOnClick = _d === void 0 ? true : _d, linkProps = __rest(props, ["title", "startIcon", "endIcon", "featureAvailability", "className", "decoration", "titleId", "isActive", "variant", "component", "classes", "children", "sx", "onClick", "shouldCollapseSidebarOnClick"]);
106
+ var title = props.title, startIcon = props.startIcon, endIcon = props.endIcon, featureAvailability = props.featureAvailability, productReleaseStage = props.productReleaseStage, className = props.className, decoration = props.decoration, titleId = props.titleId, _a = props.isActive, isActive = _a === void 0 ? false : _a, _b = props.variant, variant = _b === void 0 ? 'primary' : _b, _c = props.component, LinkComponent = _c === void 0 ? 'a' : _c, propClasses = props.classes, children = props.children, sx = props.sx, propOnClick = props.onClick, _d = props.shouldCollapseSidebarOnClick, shouldCollapseSidebarOnClick = _d === void 0 ? true : _d, linkProps = __rest(props, ["title", "startIcon", "endIcon", "featureAvailability", "productReleaseStage", "className", "decoration", "titleId", "isActive", "variant", "component", "classes", "children", "sx", "onClick", "shouldCollapseSidebarOnClick"]);
128
107
  var theme = useTheme();
129
108
  var isLargeScreen = useMediaQuery(theme.breakpoints.up('lg'));
130
109
  var sidebarCtx = useSidebarContext();
131
110
  var classes = useMergedClasses(sidebarLinkClasses, getSidebarLinkUtilityClass, propClasses);
111
+ var mapReleaseStageProps = function (prop) {
112
+ switch (prop) {
113
+ case 'early':
114
+ case 'first':
115
+ return 'earlyAccess';
116
+ case 'new':
117
+ return 'generalAvailability';
118
+ case 'default':
119
+ return '';
120
+ default:
121
+ return prop;
122
+ }
123
+ };
124
+ var releaseProp = featureAvailability ? mapReleaseStageProps(featureAvailability) : productReleaseStage;
132
125
  var handleClick = function (event) {
133
126
  if (propOnClick) {
134
127
  propOnClick(event);
@@ -141,7 +134,7 @@ export var SidebarLink = React.forwardRef(function (props, ref) {
141
134
  React.createElement(Link, __assign({ ref: ref, as: LinkComponent, title: typeof title === 'string' ? title : undefined, ownerState: { isActive: isActive, variant: variant }, className: classes.link, "aria-current": isActive ? 'page' : undefined, onClick: handleClick }, linkProps),
142
135
  React.createElement(StartIcon, { className: clsx(classes.icon, classes.startIcon) }, startIcon),
143
136
  React.createElement(Title, { id: titleId, className: sidebarLinkClasses.title }, title),
144
- !!featureAvailability && (React.createElement(AvailabilityLabel, __assign({ className: classes.availabilityLabel }, getFeatureAvailabilityLabelProps(featureAvailability)))),
137
+ !!releaseProp && React.createElement(AvailabilityLabel, { className: classes.availabilityLabel, productReleaseStage: releaseProp }),
145
138
  !!decoration && React.createElement(Decoration, { className: classes.decoration }, decoration),
146
139
  !!endIcon && React.createElement(EndIcon, { className: clsx(classes.icon, classes.endIcon) }, endIcon)),
147
140
  children));
@@ -22,9 +22,20 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import * as React from 'react';
24
24
  import MuiTab from '@mui/material/Tab';
25
+ import { Label } from '../../label';
26
+ import { StackLayout } from '../../stack-layout';
27
+ import { styled } from '../../styled';
25
28
  import { useTabsContext } from '../tabs-context';
29
+ var AvailabilityLabel = styled(Label)(function (_a) {
30
+ var theme = _a.theme;
31
+ return ({
32
+ marginLeft: theme.spacing(1),
33
+ });
34
+ });
26
35
  export var Tab = React.forwardRef(function (_a, ref) {
27
- var value = _a.value, tabProps = __rest(_a, ["value"]);
36
+ var value = _a.value, productReleaseStage = _a.productReleaseStage, label = _a.label, tabProps = __rest(_a, ["value", "productReleaseStage", "label"]);
28
37
  var _b = useTabsContext(), getTabProps = _b.getTabProps, fullWidth = _b.fullWidth;
29
- return React.createElement(MuiTab, __assign({ ref: ref }, getTabProps(value), { value: value }, tabProps, { fullWidth: fullWidth }));
38
+ return (React.createElement(MuiTab, __assign({ ref: ref }, getTabProps(value), { value: value, label: React.createElement(StackLayout, { gutter: 0 },
39
+ label,
40
+ productReleaseStage && React.createElement(AvailabilityLabel, { productReleaseStage: productReleaseStage })) }, tabProps, { fullWidth: fullWidth })));
30
41
  });
@@ -1,5 +1,5 @@
1
1
  export declare const fieldSetComponentName: "QuantumFieldSet";
2
2
  export declare function getFieldSetUtilityClass(slot: string): string;
3
- export declare const fieldSetClasses: Record<"root" | "labelContent" | "labelText" | "descriptionText" | "contentWrapper", string>;
3
+ export declare const fieldSetClasses: Record<"root" | "availabilityLabel" | "labelContent" | "labelText" | "descriptionText" | "contentWrapper", string>;
4
4
  export declare type FieldSetClasses = typeof fieldSetClasses;
5
5
  export declare type FieldSetClassKey = keyof FieldSetClasses;
@@ -12,5 +12,6 @@ exports.fieldSetClasses = (0, classes_1.generateUtilityClasses)(exports.fieldSet
12
12
  'labelContent',
13
13
  'labelText',
14
14
  'descriptionText',
15
+ 'availabilityLabel',
15
16
  'contentWrapper',
16
17
  ]);
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { IFormLayoutProps } from '../form';
3
+ import { ILabelProps } from '../label';
3
4
  import { IStyledComponentProps } from '../styled';
4
5
  import { FieldSetClasses } from './field-set-classes';
5
6
  export declare type IFieldSetOwnerState = Pick<IFieldSetProps, 'layout'>;
6
7
  export declare type IFieldSetProps = IStyledComponentProps<{
7
- props: Pick<IFormLayoutProps, 'layout'> & {
8
+ props: Pick<IFormLayoutProps, 'layout'> & Pick<ILabelProps, 'productReleaseStage'> & {
8
9
  label?: React.ReactNode;
9
10
  description?: React.ReactNode;
10
11
  /** specifies the spacing between the fields */
@@ -16,7 +17,7 @@ export declare type IFieldSetProps = IStyledComponentProps<{
16
17
  };
17
18
  defaultComponent: 'fieldset';
18
19
  }>;
19
- export declare const FieldSet: React.ForwardRefExoticComponent<Pick<IFormLayoutProps, "layout"> & {
20
+ export declare const FieldSet: React.ForwardRefExoticComponent<Pick<IFormLayoutProps, "layout"> & Pick<ILabelProps, "productReleaseStage"> & {
20
21
  label?: React.ReactNode;
21
22
  description?: React.ReactNode;
22
23
  /** specifies the spacing between the fields */
@@ -24,5 +25,5 @@ export declare const FieldSet: React.ForwardRefExoticComponent<Pick<IFormLayoutP
24
25
  /**
25
26
  * Override or extend the styles applied to the component.
26
27
  */
27
- classes?: Partial<Record<"root" | "labelContent" | "labelText" | "descriptionText" | "contentWrapper", string>> | undefined;
28
- } & Omit<React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "label" | "ref" | "layout" | "margin" | "classes" | "description"> & import("../styled").IStyledCommonProps & React.RefAttributes<HTMLFieldSetElement>>;
28
+ classes?: Partial<Record<"root" | "availabilityLabel" | "labelContent" | "labelText" | "descriptionText" | "contentWrapper", string>> | undefined;
29
+ } & Omit<React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "label" | "ref" | "layout" | "margin" | "classes" | "productReleaseStage" | "description"> & import("../styled").IStyledCommonProps & React.RefAttributes<HTMLFieldSetElement>>;
@@ -51,7 +51,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
51
51
  exports.FieldSet = void 0;
52
52
  var React = __importStar(require("react"));
53
53
  var form_1 = require("../form");
54
+ var label_1 = require("../label");
54
55
  var row_layout_1 = require("../row-layout");
56
+ var stack_layout_1 = require("../stack-layout");
55
57
  var styled_1 = require("../styled");
56
58
  var field_set_classes_1 = require("./field-set-classes");
57
59
  var text_1 = require("../text");
@@ -82,8 +84,14 @@ var LabelContent = (0, styled_1.styled)(row_layout_1.RowLayout, {
82
84
  display: 'none',
83
85
  },
84
86
  });
87
+ var AvailabilityLabel = (0, styled_1.styled)(label_1.Label, { name: field_set_classes_1.fieldSetComponentName, slot: 'AvailabilityLabel' })(function (_a) {
88
+ var theme = _a.theme;
89
+ return ({
90
+ marginLeft: theme.spacing(1),
91
+ });
92
+ });
85
93
  exports.FieldSet = React.forwardRef(function (props, ref) {
86
- var label = props.label, propLayout = props.layout, description = props.description, children = props.children, _a = props.margin, margin = _a === void 0 ? 'default' : _a, className = props.className, rootProps = __rest(props, ["label", "layout", "description", "children", "margin", "className"]);
94
+ var label = props.label, propLayout = props.layout, description = props.description, children = props.children, _a = props.margin, margin = _a === void 0 ? 'default' : _a, className = props.className, productReleaseStage = props.productReleaseStage, rootProps = __rest(props, ["label", "layout", "description", "children", "margin", "className", "productReleaseStage"]);
87
95
  var layoutContext = (0, form_1.useFormLayoutContext)().layout;
88
96
  var classes = (0, classes_1.useMergedClasses)(field_set_classes_1.fieldSetClasses, field_set_classes_1.getFieldSetUtilityClass, props.classes);
89
97
  var layout = propLayout || layoutContext;
@@ -92,7 +100,9 @@ exports.FieldSet = React.forwardRef(function (props, ref) {
92
100
  };
93
101
  return (React.createElement(Root, __assign({ ref: ref, ownerState: ownerState, className: (0, clsx_1.default)(classes.root, className) }, rootProps),
94
102
  React.createElement(LabelContent, { gutter: 0.5, className: classes.labelContent },
95
- !!label && (React.createElement(text_1.Text, { variant: "subtitle1", color: "textPrimary", component: "legend", className: classes.labelText }, label)),
103
+ React.createElement(stack_layout_1.StackLayout, { gutter: 0 },
104
+ !!label && (React.createElement(text_1.Text, { variant: "subtitle1", color: "textPrimary", component: "legend", className: classes.labelText }, label)),
105
+ !!label && !!productReleaseStage && (React.createElement(AvailabilityLabel, { className: classes.availabilityLabel, productReleaseStage: productReleaseStage, productReleaseStageAbbr: false }))),
96
106
  !!description && (React.createElement(text_1.Text, { variant: "body2", color: "textSecondary", className: classes.descriptionText }, description))),
97
107
  React.createElement(row_layout_1.RowLayout, { gutter: margin === 'dense' ? 2 : 3, className: classes.contentWrapper }, children)));
98
108
  });
@@ -115,7 +115,7 @@ var TypographyTokens = function (_a) {
115
115
  title: 'Value',
116
116
  render: function (_a) {
117
117
  var item = _a.item;
118
- return (React.createElement("pre", { style: { width: '350px', whiteSpace: 'pre-wrap' } }, JSON.stringify(item.value, null, 2)));
118
+ return (React.createElement(quantum_product_1.Box, { component: "pre", sx: { typography: 'code2', width: 350, whiteSpace: 'pre-wrap' } }, JSON.stringify(item.value, null, 2)));
119
119
  },
120
120
  },
121
121
  { field: 'cssVariable', title: 'CSS Token', render: function (_a) {
@@ -144,7 +144,7 @@ var TypographyGlobalTokens = function (_a) {
144
144
  title: 'Value',
145
145
  render: function (_a) {
146
146
  var item = _a.item;
147
- return (React.createElement("pre", { style: { width: '350px', whiteSpace: 'pre-wrap' } }, JSON.stringify(item.value, null, 2)));
147
+ return (React.createElement(quantum_product_1.Box, { component: "pre", sx: { typography: 'code2', width: 350, whiteSpace: 'pre-wrap' } }, JSON.stringify(item.value, null, 2)));
148
148
  },
149
149
  },
150
150
  { field: 'cssVariable', title: 'CSS Token', render: function (_a) {