@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.
Files changed (54) hide show
  1. package/accordion/accordion-details.js +1 -1
  2. package/alert/alert.js +1 -1
  3. package/avatar-block/avatar-block.d.ts +3 -1
  4. package/avatar-block/avatar-block.js +3 -2
  5. package/button/button.d.ts +1 -0
  6. package/button/button.js +20 -4
  7. package/card/card-header/card-header.d.ts +17 -1
  8. package/card/card-header/card-header.js +24 -10
  9. package/chip/chip.js +1 -1
  10. package/code/code.js +4 -3
  11. package/color-text-field/color-text-field.js +24 -90
  12. package/copy-button/copy-button.d.ts +9 -10
  13. package/copy-button/copy-button.js +3 -3
  14. package/dialog/dialog-title/dialog-title.d.ts +1 -0
  15. package/dialog/dialog-title/dialog-title.js +2 -2
  16. package/dialog/dialog.d.ts +2 -0
  17. package/dialog/dialog.js +2 -2
  18. package/esm/accordion/accordion-details.js +1 -1
  19. package/esm/alert/alert.js +1 -1
  20. package/esm/avatar-block/avatar-block.js +3 -2
  21. package/esm/button/button.js +20 -4
  22. package/esm/card/card-header/card-header.js +24 -10
  23. package/esm/chip/chip.js +1 -1
  24. package/esm/code/code.js +4 -3
  25. package/esm/color-text-field/color-text-field.js +24 -90
  26. package/esm/copy-button/copy-button.js +3 -3
  27. package/esm/dialog/dialog-title/dialog-title.js +2 -2
  28. package/esm/dialog/dialog.js +2 -2
  29. package/esm/label/label.js +11 -7
  30. package/esm/page/page-header/page-header.js +1 -1
  31. package/esm/pagination/pager/pager.js +3 -3
  32. package/esm/pagination/pagination.js +2 -2
  33. package/esm/panel/panel/panel.js +2 -2
  34. package/esm/panel/panel-header/panel-header.js +14 -3
  35. package/esm/selectable-card/selectable-card.js +5 -2
  36. package/esm/text/text.js +2 -2
  37. package/esm/title-block/title-block.js +2 -2
  38. package/expansion-panel/expansion-panel-header.d.ts +2 -1
  39. package/label/label.d.ts +1 -0
  40. package/label/label.js +11 -7
  41. package/package.json +1 -1
  42. package/page/page-header/page-header.js +1 -1
  43. package/pagination/pager/pager.d.ts +2 -0
  44. package/pagination/pager/pager.js +3 -3
  45. package/pagination/pagination.d.ts +5 -1
  46. package/pagination/pagination.js +2 -2
  47. package/panel/panel/panel.d.ts +5 -1
  48. package/panel/panel/panel.js +2 -2
  49. package/panel/panel-header/panel-header.d.ts +3 -1
  50. package/panel/panel-header/panel-header.js +14 -3
  51. package/selectable-card/selectable-card.d.ts +8 -0
  52. package/selectable-card/selectable-card.js +5 -2
  53. package/text/text.js +2 -2
  54. package/title-block/title-block.js +2 -2
@@ -17,6 +17,6 @@ exports.AccordionDetails = (0, styled_1.styled)(AccordionDetails_1.default, {
17
17
  gridTemplateColumns: '40% repeat(4, 15%)',
18
18
  padding: "0px ".concat(theme.spacing(2)),
19
19
  borderBottom: "1px solid ".concat(theme.tokens.color_border_default),
20
- height: theme.typography.pxToRem(72),
20
+ minHeight: theme.typography.pxToRem(72),
21
21
  };
22
22
  });
package/alert/alert.js CHANGED
@@ -218,6 +218,6 @@ exports.Alert = React.forwardRef(function (props, ref) {
218
218
  !!title && React.createElement(AlertTitle, { className: classes.title }, title),
219
219
  React.createElement(AlertMessage, { className: classes.message }, message || children)),
220
220
  hasAction && (React.createElement(AlertAction, { className: classes.action }, action ||
221
- (showCloseButton && (React.createElement(icon_button_1.IconButton, { label: "close button", color: "inherit", size: "small", variant: "link", "aria-label": closeText, onClick: onClose },
221
+ (showCloseButton && (React.createElement(icon_button_1.IconButton, { label: closeText, color: "inherit", size: "small", variant: "link", "aria-label": closeText, onClick: onClose },
222
222
  React.createElement(icon_1.XIcon, null))))))));
223
223
  });
@@ -10,6 +10,7 @@ export type IAvatarBlockProps = IStyledComponentProps<{
10
10
  TitleBlockProps?: Partial<ITitleBlockProps>;
11
11
  classes?: Partial<AvatarBlockClasses>;
12
12
  endAdornment?: React.ReactNode;
13
+ noWrap?: boolean;
13
14
  };
14
15
  defaultComponent: 'div';
15
16
  }>;
@@ -19,4 +20,5 @@ export declare const AvatarBlock: React.ForwardRefExoticComponent<Pick<ITitleBlo
19
20
  TitleBlockProps?: Partial<ITitleBlockProps> | undefined;
20
21
  classes?: Partial<Record<"root" | "avatar" | "endAdornment" | "titleBlock", string>> | undefined;
21
22
  endAdornment?: React.ReactNode;
22
- } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "ref" | "size" | "classes" | "avatar" | "titleTypographyProps" | "endAdornment" | "description" | "descriptionTypographyProps" | "TitleBlockProps"> & import("../styled").IStyledCommonProps & React.RefAttributes<HTMLDivElement>>;
23
+ noWrap?: boolean | undefined;
24
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "ref" | "size" | "classes" | "avatar" | "titleTypographyProps" | "noWrap" | "endAdornment" | "description" | "descriptionTypographyProps" | "TitleBlockProps"> & import("../styled").IStyledCommonProps & React.RefAttributes<HTMLDivElement>>;
@@ -85,11 +85,12 @@ var titleVariantMap = {
85
85
  large: 'subtitle1',
86
86
  };
87
87
  exports.AvatarBlock = React.forwardRef(function (props, ref) {
88
- var avatar = props.avatar, title = props.title, description = props.description, titleTypographyProps = props.titleTypographyProps, descriptionTypographyProps = props.descriptionTypographyProps, _a = props.TitleBlockProps, TitleBlockProps = _a === void 0 ? {} : _a, className = props.className, _b = props.size, size = _b === void 0 ? 'medium' : _b, endAdornment = props.endAdornment, rootProps = __rest(props, ["avatar", "title", "description", "titleTypographyProps", "descriptionTypographyProps", "TitleBlockProps", "className", "size", "endAdornment"]);
88
+ var avatar = props.avatar, title = props.title, description = props.description, titleTypographyProps = props.titleTypographyProps, descriptionTypographyProps = props.descriptionTypographyProps, _a = props.TitleBlockProps, TitleBlockProps = _a === void 0 ? {} : _a, className = props.className, _b = props.size, size = _b === void 0 ? 'medium' : _b, endAdornment = props.endAdornment, _c = props.noWrap, noWrap = _c === void 0 ? false : _c, // Default to false
89
+ rootProps = __rest(props, ["avatar", "title", "description", "titleTypographyProps", "descriptionTypographyProps", "TitleBlockProps", "className", "size", "endAdornment", "noWrap"]);
89
90
  var classes = (0, classes_1.useMergedClasses)(avatar_block_classes_1.avatarBlockClasses, avatar_block_classes_1.getAvatarBlockUtilityClass, props.classes);
90
91
  var titleVariant = titleVariantMap[size];
91
92
  return (React.createElement(Root, __assign({ ownerState: { description: description, size: size }, ref: ref, className: (0, clsx_1.default)(classes.root, className) }, rootProps),
92
93
  avatar && React.createElement(Avatar, { className: classes.avatar }, avatar),
93
- React.createElement(title_block_1.TitleBlock, __assign({ className: classes.titleBlock, title: title, description: description, titleTypographyProps: __assign({ noWrap: true, component: 'p', variant: titleVariant }, titleTypographyProps), descriptionTypographyProps: descriptionTypographyProps, gutter: size === 'large' ? 0.5 : 0 }, TitleBlockProps, { sx: __assign({ flex: 1 }, TitleBlockProps.sx) })),
94
+ React.createElement(title_block_1.TitleBlock, __assign({ className: classes.titleBlock, title: title, description: description, titleTypographyProps: __assign({ component: 'p', variant: titleVariant, noWrap: noWrap, title: noWrap && typeof title === 'string' ? title : '' }, titleTypographyProps), descriptionTypographyProps: __assign({ noWrap: noWrap, title: noWrap && typeof description === 'string' ? description : '' }, descriptionTypographyProps), gutter: size === 'large' ? 0.5 : 0 }, TitleBlockProps, { sx: __assign({ flex: 1 }, TitleBlockProps.sx) })),
94
95
  !!endAdornment && React.createElement(EndAdornment, { className: classes.endAdornment }, endAdornment)));
95
96
  });
@@ -13,6 +13,7 @@ export interface IButtonTypeMap<P = {}, D extends React.ElementType = 'button'>
13
13
  /** Alternative to using `props.children`. This is a convenience prop for other components using an `action` prop */
14
14
  label?: React.ReactNode;
15
15
  SpinnerProps?: Partial<ISpinnerProps>;
16
+ maxWidth?: string;
16
17
  };
17
18
  defaultComponent: D;
18
19
  }
package/button/button.js CHANGED
@@ -75,10 +75,26 @@ var ButtonSpinner = (0, styled_1.styled)(spinner_1.Spinner, {
75
75
  })({
76
76
  position: 'absolute',
77
77
  });
78
+ var LabelSpan = (0, styled_1.styled)('span')(function (_a) {
79
+ var maxWidth = _a.maxWidth;
80
+ return ({
81
+ display: 'inline-block',
82
+ overflow: 'hidden',
83
+ textOverflow: 'ellipsis',
84
+ whiteSpace: 'nowrap',
85
+ maxWidth: maxWidth || '100%', // Adjust as needed for non-fullWidth buttons
86
+ });
87
+ });
78
88
  exports.Button = React.forwardRef(function (_a, ref) {
79
- 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, rootProps = __rest(_a, ["isLoading", "label", "children", "disabled", "SpinnerProps", "color", "variant"]);
80
- return (React.createElement(Root, __assign({}, rootProps, { disabled: disabled || isLoading, ownerState: { isLoading: isLoading }, color: color, variant: variant, ref: ref }),
81
- label || children,
82
- " ",
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"]);
90
+ var title = label ||
91
+ (typeof children === 'string'
92
+ ? children
93
+ : React.Children.toArray(children)
94
+ .filter(function (child) { return typeof child === 'string'; })
95
+ .join(''));
96
+ return (React.createElement(Root, __assign({}, rootProps, { disabled: disabled || isLoading, ownerState: { isLoading: isLoading }, color: color, variant: variant, ref: ref, title: String(title) }),
97
+ React.createElement(LabelSpan, { style: { maxWidth: rootProps.fullWidth ? 'none' : maxWidth || '100%' } }, label || children),
98
+ ' ',
83
99
  !!isLoading && React.createElement(ButtonSpinner, __assign({}, SpinnerProps))));
84
100
  });
@@ -43,6 +43,14 @@ export type ICardHeaderProps = IStyledComponentProps<{
43
43
  * (as long as disableTypography is not `true`).
44
44
  */
45
45
  titleTypographyProps?: ITextProps<any>;
46
+ /**
47
+ * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
48
+ *
49
+ * Note that text overflow can only happen with block or inline-block level elements
50
+ * (the element needs to have a width in order to overflow).
51
+ * @default false
52
+ */
53
+ noWrap?: boolean;
46
54
  };
47
55
  defaultComponent: 'div';
48
56
  }>;
@@ -85,4 +93,12 @@ export declare const CardHeader: React.ForwardRefExoticComponent<Partial<ICardCo
85
93
  * (as long as disableTypography is not `true`).
86
94
  */
87
95
  titleTypographyProps?: ITextProps<any> | undefined;
88
- } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "ref" | "action" | "size" | "classes" | "avatar" | "disableTypography" | "subheader" | "subheaderTypographyProps" | "titleTypographyProps"> & import("../../styled").IStyledCommonProps & React.RefAttributes<HTMLDivElement>>;
96
+ /**
97
+ * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
98
+ *
99
+ * Note that text overflow can only happen with block or inline-block level elements
100
+ * (the element needs to have a width in order to overflow).
101
+ * @default false
102
+ */
103
+ noWrap?: boolean | undefined;
104
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "ref" | "action" | "size" | "classes" | "avatar" | "disableTypography" | "subheader" | "subheaderTypographyProps" | "titleTypographyProps" | "noWrap"> & import("../../styled").IStyledCommonProps & React.RefAttributes<HTMLDivElement>>;
@@ -83,21 +83,35 @@ var titleVariantMap = {
83
83
  };
84
84
  exports.CardHeader = React.forwardRef(function (props, ref) {
85
85
  var sizeContext = (0, card_context_1.useCardContext)().size;
86
- var sizeProp = props.size, _a = props.titleTypographyProps, titleTypographyProps = _a === void 0 ? {} : _a, _b = props.subheaderTypographyProps, subheaderTypographyProps = _b === void 0 ? {} : _b, title = props.title, subheader = props.subheader, propClasses = props.classes, cardProps = __rest(props, ["size", "titleTypographyProps", "subheaderTypographyProps", "title", "subheader", "classes"]);
86
+ var sizeProp = props.size, _a = props.titleTypographyProps, titleTypographyProps = _a === void 0 ? {} : _a, _b = props.subheaderTypographyProps, subheaderTypographyProps = _b === void 0 ? {} : _b, title = props.title, subheader = props.subheader, _c = props.noWrap, noWrap = _c === void 0 ? false : _c, propClasses = props.classes, cardProps = __rest(props, ["size", "titleTypographyProps", "subheaderTypographyProps", "title", "subheader", "noWrap", "classes"]);
87
87
  var classes = (0, classes_1.useMergedClasses)(card_header_classes_1.cardHeaderClasses, card_header_classes_1.getCardHeaderUtilityClass, propClasses);
88
88
  var size = sizeProp || sizeContext || card_context_1.defaultCardSize;
89
89
  var titleVariant = titleVariantMap[size];
90
+ var titleStyles = noWrap
91
+ ? {
92
+ whiteSpace: 'nowrap',
93
+ overflow: 'hidden',
94
+ textOverflow: 'ellipsis',
95
+ }
96
+ : {
97
+ whiteSpace: 'normal',
98
+ overflow: 'visible',
99
+ textOverflow: 'clip', // Don't apply ellipsis
100
+ }; // No additional styles when noWrap is false
101
+ var subheaderStyles = noWrap
102
+ ? {
103
+ whiteSpace: 'nowrap',
104
+ overflow: 'hidden',
105
+ textOverflow: 'ellipsis',
106
+ }
107
+ : {
108
+ whiteSpace: 'normal',
109
+ overflow: 'visible',
110
+ textOverflow: 'clip', // Don't apply ellipsis
111
+ };
90
112
  return (React.createElement(Root, __assign({ ref: ref, ownerState: { size: size }, classes: {
91
113
  action: classes.action,
92
114
  avatar: classes.avatar,
93
115
  content: classes.content,
94
- }, title: React.createElement(Title, __assign({ variant: titleVariant, color: "textPrimary" }, { component: 'p' }, { role: "heading", display: "block" }, titleTypographyProps, { className: (0, clsx_1.default)(classes.title, titleTypographyProps.className), ownerState: { size: size }, noWrap: true, sx: {
95
- whiteSpace: 'nowrap',
96
- overflow: 'hidden',
97
- textOverflow: 'ellipsis',
98
- }, title: title }), title), subheader: subheader ? (React.createElement(text_1.Text, __assign({ variant: "body2", color: "textSecondary", component: "p", noWrap: true, sx: {
99
- whiteSpace: 'nowrap',
100
- overflow: 'hidden',
101
- textOverflow: 'ellipsis',
102
- }, title: subheader }, subheaderTypographyProps, { className: (0, clsx_1.default)(classes.subheader, subheaderTypographyProps.className) }), subheader)) : null }, cardProps, { disableTypography: true })));
116
+ }, title: React.createElement(Title, __assign({ variant: titleVariant, color: "textPrimary" }, { component: 'p' }, { role: "heading", display: "block" }, titleTypographyProps, { className: (0, clsx_1.default)(classes.title, titleTypographyProps.className), ownerState: { size: size }, noWrap: noWrap, sx: titleStyles, title: noWrap ? title : '' }), title), subheader: subheader ? (React.createElement(text_1.Text, __assign({ variant: "body2", color: "textSecondary", component: "p", noWrap: noWrap, sx: subheaderStyles, title: noWrap ? subheader : '' }, subheaderTypographyProps, { className: (0, clsx_1.default)(classes.subheader, subheaderTypographyProps.className) }), subheader)) : null }, cardProps, { disableTypography: true })));
103
117
  });
package/chip/chip.js CHANGED
@@ -82,5 +82,5 @@ var Root = (0, styled_1.styled)(Chip_1.default, { name: exports.chipComponentNam
82
82
  });
83
83
  exports.Chip = React.forwardRef(function (props, ref) {
84
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));
85
+ return (React.createElement(Root, __assign({ ref: ref, deleteIcon: deleteIcon, ownerState: { selected: selected } }, chipProps, { title: props === null || props === void 0 ? void 0 : props.label })));
86
86
  });
package/code/code.js CHANGED
@@ -51,16 +51,17 @@ var styled_1 = require("../styled");
51
51
  var text_1 = require("../text");
52
52
  exports.CodeComponentName = 'QuantumCode';
53
53
  var Root = (0, styled_1.styled)(text_1.Text, { name: exports.CodeComponentName, slot: 'Root' })(function (_a) {
54
- var theme = _a.theme;
54
+ var theme = _a.theme, noWrap = _a.noWrap;
55
55
  return ({
56
56
  display: 'inline',
57
57
  padding: theme.spacing(0.25, 0.75),
58
58
  color: theme.tokens.color_fg_default,
59
59
  backgroundColor: theme.tokens.color_bg_layer_alternate_bold,
60
60
  borderRadius: theme.shape.borderRadius,
61
+ whiteSpace: noWrap ? 'nowrap' : 'pre-wrap', // Conditionally apply white-space
61
62
  });
62
63
  });
63
64
  exports.Code = React.forwardRef(function (props, ref) {
64
- var children = props.children, _a = props.variant, variant = _a === void 0 ? 'code2' : _a, textProps = __rest(props, ["children", "variant"]);
65
- return (React.createElement(Root, __assign({ ref: ref }, { component: 'span' }, { color: "textSecondary", variant: variant }, textProps), children));
65
+ var children = props.children, _a = props.variant, variant = _a === void 0 ? 'code2' : _a, _b = props.noWrap, noWrap = _b === void 0 ? true : _b, textProps = __rest(props, ["children", "variant", "noWrap"]);
66
+ return (React.createElement(Root, __assign({ ref: ref }, { component: 'span' }, { color: "textSecondary", variant: variant, noWrap: noWrap }, textProps), children));
66
67
  });
@@ -67,30 +67,7 @@ var input_1 = require("../input");
67
67
  var styled_1 = require("../styled");
68
68
  var text_field_1 = require("../text-field");
69
69
  var colorTextFieldComponentName = 'QuantumColorTextField';
70
- var Root = (0, styled_1.styled)(text_field_1.TextField, { name: colorTextFieldComponentName, slot: 'Root' })(function (_a) {
71
- var size = _a.size;
72
- return ({
73
- 'input::placeholder': {
74
- textTransform: 'uppercase',
75
- },
76
- '& > div:first-of-type': {
77
- paddingLeft: size === 'small' ? '9px' : '12px',
78
- },
79
- '& input[type="color"]': {
80
- cursor: 'pointer',
81
- width: size === 'small' ? '16px' : '20px',
82
- height: size === 'small' ? '16px' : '20px',
83
- '&::-webkit-color-swatch, &::-webkit-color-swatch-wrapper': {
84
- borderRadius: '2px',
85
- padding: 0,
86
- },
87
- '&::-moz-color-swatch': {
88
- borderRadius: '2px',
89
- padding: 0,
90
- },
91
- },
92
- });
93
- });
70
+ var Root = (0, styled_1.styled)(text_field_1.TextField, { name: colorTextFieldComponentName, slot: 'Root' })({});
94
71
  var ColorPicker = (0, styled_1.styled)('input', { name: colorTextFieldComponentName, slot: 'ColorPicker' })(function (_a) {
95
72
  var theme = _a.theme;
96
73
  return ({
@@ -104,82 +81,39 @@ var ColorPicker = (0, styled_1.styled)('input', { name: colorTextFieldComponentN
104
81
  '&:focus': __assign({ outline: 'none' }, theme.mixins.focusRing()),
105
82
  });
106
83
  });
107
- // Normalizes HEX color values to valid 7char HEX color values
108
84
  var normalizeHex = function (hex) {
109
- if (hex.startsWith('#')) {
110
- hex = hex.slice(1);
85
+ if (hex.length === 4 && /^#[0-9A-F]{3}$/i.test(hex)) {
86
+ return "#".concat(hex[1]).concat(hex[1]).concat(hex[2]).concat(hex[2]).concat(hex[3]).concat(hex[3]);
111
87
  }
112
- var upperHex = hex.toUpperCase();
113
- switch (upperHex.length) {
114
- case 0:
115
- return '';
116
- case 1:
117
- return "#".concat(upperHex.repeat(6));
118
- case 2:
119
- return "#".concat(upperHex.repeat(3));
120
- case 3:
121
- case 4:
122
- case 5:
123
- return "#".concat(upperHex[0].repeat(2)).concat(upperHex[1].repeat(2)).concat(upperHex[2].repeat(2));
124
- default:
125
- return "#".concat(upperHex.padEnd(6, upperHex).slice(0, 6));
126
- }
127
- };
128
- var validateHex = function (hex) {
129
- var hexRegex = /^(#?[0-9a-fA-F]{1,6})$/;
130
- return hexRegex.test(hex);
88
+ return hex;
131
89
  };
132
90
  exports.ColorTextField = React.forwardRef(function (props, ref) {
133
91
  var inputAdornmentProps = props.inputAdornmentProps, value = props.value, defaultValue = props.defaultValue, placeholder = props.placeholder, rootProps = __rest(props, ["inputAdornmentProps", "value", "defaultValue", "placeholder"]);
134
- var getInitialColor = function () { return value || placeholder || defaultValue || ''; };
135
- var normalizedInitialColor = normalizeHex(getInitialColor());
136
- var _a = __read(React.useState(value || defaultValue), 2), inputColor = _a[0], setInputColor = _a[1];
137
- var _b = __read(React.useState(null), 2), error = _b[0], setError = _b[1];
138
- //Derived state from inputColor (textfield value)
139
- var colorPicker = React.useMemo(function () {
140
- if (inputColor) {
141
- return normalizeHex(inputColor);
92
+ var _a = __read(React.useState(normalizeHex(value || placeholder || defaultValue || '#000000')), 2), color = _a[0], setColor = _a[1];
93
+ var handleColorChange = function (event) {
94
+ var value = event.target.value;
95
+ if (value.length === 4 && /^#[0-9A-F]{3}$/i.test(value)) {
96
+ var normalizedValue = normalizeHex(value);
97
+ if (props.onChange) {
98
+ props.onChange(__assign(__assign({}, event), { target: __assign(__assign({}, event.target), { value: normalizedValue }) }));
99
+ }
142
100
  }
143
- return normalizeHex(getInitialColor());
144
- }, [inputColor, value, placeholder, defaultValue]);
145
- var handleTextfieldChange = function (event) {
146
- var newValue = event.target.value;
147
- setInputColor(newValue);
148
- };
149
- var handleTextfieldBlur = function (event) {
150
- var _a, _b;
151
- if (!validateHex(event.target.value)) {
152
- setError('Color is invalid');
153
- return;
154
- }
155
- setError(null);
156
- var newValue = normalizeHex(event.target.value);
157
- setInputColor(newValue);
158
- var updatedEvent = __assign(__assign({}, event), { target: __assign(__assign({}, event.target), { value: newValue || normalizedInitialColor }) });
159
- (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, updatedEvent);
160
- (_b = props.onBlur) === null || _b === void 0 ? void 0 : _b.call(props, updatedEvent);
161
- };
162
- var handleColorPickerChange = function (event) {
163
- var _a, _b;
164
- if (!validateHex(event.target.value)) {
165
- setError('Color is invalid');
166
- return;
101
+ else {
102
+ if (props.onChange) {
103
+ props.onChange(event);
104
+ }
167
105
  }
168
- setError(null);
169
- var newValue = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.toUpperCase();
170
- setInputColor(newValue);
171
- (_b = props.onChange) === null || _b === void 0 ? void 0 : _b.call(props, __assign(__assign({}, event), { target: __assign(__assign({}, event.target), { value: newValue }) }));
172
106
  };
173
- // Rerender to avoid memoized value on defaultValue change
174
107
  React.useEffect(function () {
175
- setInputColor(defaultValue);
176
- }, [defaultValue]);
177
- return (React.createElement(Root, __assign({ ref: ref, error: error }, rootProps, { InputProps: {
108
+ var newColor = value || placeholder || defaultValue || '#000000';
109
+ if (newColor) {
110
+ setColor(normalizeHex(newColor));
111
+ }
112
+ }, [value, defaultValue, placeholder]);
113
+ return (React.createElement(Root, __assign({ ref: ref }, rootProps, { InputProps: {
178
114
  startAdornment: (React.createElement(input_1.InputAdornment, __assign({ position: "start" }, inputAdornmentProps),
179
- React.createElement(ColorPicker, { id: props.id ? "".concat(props.id, "-color-input") : undefined, name: props.name, type: "color", disabled: props.disabled, readOnly: props.readOnly, value: colorPicker, onChange: handleColorPickerChange }))),
180
- value: inputColor,
115
+ React.createElement(ColorPicker, { id: props.id ? "".concat(props.id, "-color-input") : undefined, name: props.name, type: "color", disabled: props.disabled, readOnly: props.readOnly, value: color, onChange: handleColorChange }))),
116
+ value: value,
181
117
  placeholder: placeholder,
182
- onBlur: handleTextfieldBlur,
183
- onChange: handleTextfieldChange,
184
118
  } })));
185
119
  });
@@ -1,12 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { IIconButtonProps } from '../icon-button';
3
- export type ICopyButtonProps = IIconButtonProps;
4
- export declare const CopyButton: React.ForwardRefExoticComponent<{
5
- variant?: "link" | "outlined" | "contained" | undefined;
6
- shape?: "default" | "circular" | undefined;
7
- tooltipPlacement?: "left" | "right" | "bottom" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | undefined;
8
- onTooltipClose?: ((event: Event | React.SyntheticEvent<Element, Event>) => void) | undefined;
9
- href?: string | undefined;
10
- label: string;
11
- target?: string | undefined;
12
- } & import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "label" | "ref" | "action" | "variant" | "tabIndex" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | keyof import("@mui/material").IconButtonOwnProps | "target" | "shape" | "tooltipPlacement" | "onTooltipClose"> & React.RefAttributes<HTMLButtonElement>>;
3
+ export interface ICopyButtonProps extends IIconButtonProps {
4
+ /**
5
+ * Custom label to display on the button after content is copied to the clipboard.
6
+ *
7
+ * @default 'Copied!'
8
+ */
9
+ copiedLabel?: string;
10
+ }
11
+ export declare const CopyButton: React.ForwardRefExoticComponent<ICopyButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -66,8 +66,8 @@ var React = __importStar(require("react"));
66
66
  var icon_1 = require("../icon");
67
67
  var icon_button_1 = require("../icon-button");
68
68
  exports.CopyButton = React.forwardRef(function (_a, ref) {
69
- var onClick = _a.onClick, label = _a.label, rootProps = __rest(_a, ["onClick", "label"]);
70
- var _b = __read(React.useState(false), 2), pressed = _b[0], setPressed = _b[1];
69
+ var onClick = _a.onClick, label = _a.label, _b = _a.copiedLabel, copiedLabel = _b === void 0 ? 'Copied!' : _b, rootProps = __rest(_a, ["onClick", "label", "copiedLabel"]);
70
+ var _c = __read(React.useState(false), 2), pressed = _c[0], setPressed = _c[1];
71
71
  React.useEffect(function () {
72
72
  if (!pressed) {
73
73
  return undefined;
@@ -85,7 +85,7 @@ exports.CopyButton = React.forwardRef(function (_a, ref) {
85
85
  };
86
86
  var handleClose = function () { return setPressed(false); };
87
87
  // use title as the key to force a mount/unmount of the tooltip. This drives the feedback transition.
88
- var title = pressed ? 'Copied!' : label;
88
+ var title = pressed ? copiedLabel : label;
89
89
  return (React.createElement(icon_button_1.IconButton, __assign({}, rootProps, { key: title, label: title, onTooltipClose: handleClose, ref: ref, tooltipPlacement: "top", onClick: handleClick }),
90
90
  React.createElement(icon_1.CopyIcon, null)));
91
91
  });
@@ -4,6 +4,7 @@ import { DialogTitleClasses } from './dialog-title-classes';
4
4
  export interface IDialogTitleProps extends Omit<DialogTitleProps, 'classes'> {
5
5
  disableTypography?: boolean;
6
6
  onClose?(event: {}, reason: 'closeClick'): void;
7
+ closeButtonLabel?: string;
7
8
  classes?: Partial<DialogTitleClasses>;
8
9
  }
9
10
  export declare const DialogTitle: React.ForwardRefExoticComponent<Omit<IDialogTitleProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -68,10 +68,10 @@ var Root = (0, styled_1.styled)(DialogTitle_1.default, {
68
68
  justifyContent: 'space-between',
69
69
  });
70
70
  exports.DialogTitle = React.forwardRef(function (props, ref) {
71
- var children = props.children, onClose = props.onClose, _a = props.disableTypography, disableTypography = _a === void 0 ? false : _a, id = props.id, className = props.className, propClasses = props.classes, dialogTitleProps = __rest(props, ["children", "onClose", "disableTypography", "id", "className", "classes"]);
71
+ var children = props.children, onClose = props.onClose, closeButtonLabel = props.closeButtonLabel, _a = props.disableTypography, disableTypography = _a === void 0 ? false : _a, id = props.id, className = props.className, propClasses = props.classes, dialogTitleProps = __rest(props, ["children", "onClose", "closeButtonLabel", "disableTypography", "id", "className", "classes"]);
72
72
  var classes = (0, classes_1.useMergedClasses)(dialog_title_classes_1.dialogTitleClasses, dialog_title_classes_1.getDialogTitleUtilityClass, propClasses);
73
73
  return (React.createElement(Root, __assign({}, dialogTitleProps, { className: (0, clsx_1.default)(classes.root, className), ref: ref }),
74
74
  disableTypography ? (children) : (React.createElement(text_1.Text, { id: id, className: classes.title, variant: "h5", color: "textPrimary" }, children)),
75
- !!onClose && (React.createElement(icon_button_1.IconButton, { shape: "circular", variant: "contained", "aria-label": "Close", size: "small", className: classes.closeButton, onClick: function (event) { return onClose(event, 'closeClick'); }, label: "Close" },
75
+ !!onClose && (React.createElement(icon_button_1.IconButton, { shape: "circular", variant: "contained", "aria-label": "Close", size: "small", className: classes.closeButton, onClick: function (event) { return onClose(event, 'closeClick'); }, label: closeButtonLabel || 'Close' },
76
76
  React.createElement(icon_1.XIcon, null)))));
77
77
  });
@@ -10,6 +10,8 @@ export interface IDialogProps extends Omit<DialogProps, 'title' | 'onClose'> {
10
10
  disableContentWrap?: boolean;
11
11
  /** callback for when the dialog is closed. The reason is given as the second argument */
12
12
  onClose?(event: {}, reason: 'backdropClick' | 'escapeKeyDown' | 'closeClick'): void;
13
+ /** convenience prop for rendering the label for close button with a DialogTitle component */
14
+ closeButtonLabel?: string;
13
15
  }
14
16
  export declare const dialogComponentName = "QuantumDialog";
15
17
  export declare const Dialog: React.ForwardRefExoticComponent<Omit<IDialogProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
package/dialog/dialog.js CHANGED
@@ -71,7 +71,7 @@ var Root = (0, styled_1.styled)(Dialog_1.default, {
71
71
  _b);
72
72
  });
73
73
  exports.Dialog = React.forwardRef(function (props, ref) {
74
- var title = props.title, actions = props.actions, children = props.children, onClose = props.onClose, idProp = props.id, disableBackdropClick = props.disableBackdropClick, _a = props.disableContentWrap, disableContentWrap = _a === void 0 ? false : _a, dialogProps = __rest(props, ["title", "actions", "children", "onClose", "id", "disableBackdropClick", "disableContentWrap"]);
74
+ var title = props.title, actions = props.actions, children = props.children, onClose = props.onClose, closeButtonLabel = props.closeButtonLabel, idProp = props.id, disableBackdropClick = props.disableBackdropClick, _a = props.disableContentWrap, disableContentWrap = _a === void 0 ? false : _a, dialogProps = __rest(props, ["title", "actions", "children", "onClose", "closeButtonLabel", "id", "disableBackdropClick", "disableContentWrap"]);
75
75
  var id = (0, use_id_1.useId)(props.id);
76
76
  var titleId = !!title && !!id ? "".concat(id, "-title") : undefined;
77
77
  var handleClose = function (event, reason) {
@@ -83,7 +83,7 @@ exports.Dialog = React.forwardRef(function (props, ref) {
83
83
  }
84
84
  };
85
85
  return (React.createElement(Root, __assign({ PaperProps: { elevation: 4 } }, dialogProps, { id: id, ref: ref, onClose: onClose ? handleClose : undefined, "aria-labelledby": titleId }),
86
- !!title && (React.createElement(dialog_title_1.DialogTitle, { id: titleId, onClose: onClose }, title)),
86
+ !!title && (React.createElement(dialog_title_1.DialogTitle, { id: titleId, onClose: onClose, closeButtonLabel: closeButtonLabel }, title)),
87
87
  disableContentWrap ? children : React.createElement(dialog_content_1.DialogContent, null, children),
88
88
  !!actions && React.createElement(dialog_actions_1.DialogActions, null, actions)));
89
89
  });
@@ -11,6 +11,6 @@ export var AccordionDetails = styled(MuiAccordionDetails, {
11
11
  gridTemplateColumns: '40% repeat(4, 15%)',
12
12
  padding: "0px ".concat(theme.spacing(2)),
13
13
  borderBottom: "1px solid ".concat(theme.tokens.color_border_default),
14
- height: theme.typography.pxToRem(72),
14
+ minHeight: theme.typography.pxToRem(72),
15
15
  };
16
16
  });
@@ -189,6 +189,6 @@ export var Alert = React.forwardRef(function (props, ref) {
189
189
  !!title && React.createElement(AlertTitle, { className: classes.title }, title),
190
190
  React.createElement(AlertMessage, { className: classes.message }, message || children)),
191
191
  hasAction && (React.createElement(AlertAction, { className: classes.action }, action ||
192
- (showCloseButton && (React.createElement(IconButton, { label: "close button", color: "inherit", size: "small", variant: "link", "aria-label": closeText, onClick: onClose },
192
+ (showCloseButton && (React.createElement(IconButton, { label: closeText, color: "inherit", size: "small", variant: "link", "aria-label": closeText, onClick: onClose },
193
193
  React.createElement(XIcon, null))))))));
194
194
  });
@@ -56,11 +56,12 @@ var titleVariantMap = {
56
56
  large: 'subtitle1',
57
57
  };
58
58
  export var AvatarBlock = React.forwardRef(function (props, ref) {
59
- var avatar = props.avatar, title = props.title, description = props.description, titleTypographyProps = props.titleTypographyProps, descriptionTypographyProps = props.descriptionTypographyProps, _a = props.TitleBlockProps, TitleBlockProps = _a === void 0 ? {} : _a, className = props.className, _b = props.size, size = _b === void 0 ? 'medium' : _b, endAdornment = props.endAdornment, rootProps = __rest(props, ["avatar", "title", "description", "titleTypographyProps", "descriptionTypographyProps", "TitleBlockProps", "className", "size", "endAdornment"]);
59
+ var avatar = props.avatar, title = props.title, description = props.description, titleTypographyProps = props.titleTypographyProps, descriptionTypographyProps = props.descriptionTypographyProps, _a = props.TitleBlockProps, TitleBlockProps = _a === void 0 ? {} : _a, className = props.className, _b = props.size, size = _b === void 0 ? 'medium' : _b, endAdornment = props.endAdornment, _c = props.noWrap, noWrap = _c === void 0 ? false : _c, // Default to false
60
+ rootProps = __rest(props, ["avatar", "title", "description", "titleTypographyProps", "descriptionTypographyProps", "TitleBlockProps", "className", "size", "endAdornment", "noWrap"]);
60
61
  var classes = useMergedClasses(avatarBlockClasses, getAvatarBlockUtilityClass, props.classes);
61
62
  var titleVariant = titleVariantMap[size];
62
63
  return (React.createElement(Root, __assign({ ownerState: { description: description, size: size }, ref: ref, className: clsx(classes.root, className) }, rootProps),
63
64
  avatar && React.createElement(Avatar, { className: classes.avatar }, avatar),
64
- React.createElement(TitleBlock, __assign({ className: classes.titleBlock, title: title, description: description, titleTypographyProps: __assign({ noWrap: true, component: 'p', variant: titleVariant }, titleTypographyProps), descriptionTypographyProps: descriptionTypographyProps, gutter: size === 'large' ? 0.5 : 0 }, TitleBlockProps, { sx: __assign({ flex: 1 }, TitleBlockProps.sx) })),
65
+ React.createElement(TitleBlock, __assign({ className: classes.titleBlock, title: title, description: description, titleTypographyProps: __assign({ component: 'p', variant: titleVariant, noWrap: noWrap, title: noWrap && typeof title === 'string' ? title : '' }, titleTypographyProps), descriptionTypographyProps: __assign({ noWrap: noWrap, title: noWrap && typeof description === 'string' ? description : '' }, descriptionTypographyProps), gutter: size === 'large' ? 0.5 : 0 }, TitleBlockProps, { sx: __assign({ flex: 1 }, TitleBlockProps.sx) })),
65
66
  !!endAdornment && React.createElement(EndAdornment, { className: classes.endAdornment }, endAdornment)));
66
67
  });
@@ -49,10 +49,26 @@ var ButtonSpinner = styled(Spinner, {
49
49
  })({
50
50
  position: 'absolute',
51
51
  });
52
+ var LabelSpan = styled('span')(function (_a) {
53
+ var maxWidth = _a.maxWidth;
54
+ return ({
55
+ display: 'inline-block',
56
+ overflow: 'hidden',
57
+ textOverflow: 'ellipsis',
58
+ whiteSpace: 'nowrap',
59
+ maxWidth: maxWidth || '100%', // Adjust as needed for non-fullWidth buttons
60
+ });
61
+ });
52
62
  export var Button = React.forwardRef(function (_a, ref) {
53
- 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, rootProps = __rest(_a, ["isLoading", "label", "children", "disabled", "SpinnerProps", "color", "variant"]);
54
- return (React.createElement(Root, __assign({}, rootProps, { disabled: disabled || isLoading, ownerState: { isLoading: isLoading }, color: color, variant: variant, ref: ref }),
55
- label || children,
56
- " ",
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"]);
64
+ var title = label ||
65
+ (typeof children === 'string'
66
+ ? children
67
+ : React.Children.toArray(children)
68
+ .filter(function (child) { return typeof child === 'string'; })
69
+ .join(''));
70
+ return (React.createElement(Root, __assign({}, rootProps, { disabled: disabled || isLoading, ownerState: { isLoading: isLoading }, color: color, variant: variant, ref: ref, title: String(title) }),
71
+ React.createElement(LabelSpan, { style: { maxWidth: rootProps.fullWidth ? 'none' : maxWidth || '100%' } }, label || children),
72
+ ' ',
57
73
  !!isLoading && React.createElement(ButtonSpinner, __assign({}, SpinnerProps))));
58
74
  });
@@ -54,21 +54,35 @@ var titleVariantMap = {
54
54
  };
55
55
  export var CardHeader = React.forwardRef(function (props, ref) {
56
56
  var sizeContext = useCardContext().size;
57
- var sizeProp = props.size, _a = props.titleTypographyProps, titleTypographyProps = _a === void 0 ? {} : _a, _b = props.subheaderTypographyProps, subheaderTypographyProps = _b === void 0 ? {} : _b, title = props.title, subheader = props.subheader, propClasses = props.classes, cardProps = __rest(props, ["size", "titleTypographyProps", "subheaderTypographyProps", "title", "subheader", "classes"]);
57
+ var sizeProp = props.size, _a = props.titleTypographyProps, titleTypographyProps = _a === void 0 ? {} : _a, _b = props.subheaderTypographyProps, subheaderTypographyProps = _b === void 0 ? {} : _b, title = props.title, subheader = props.subheader, _c = props.noWrap, noWrap = _c === void 0 ? false : _c, propClasses = props.classes, cardProps = __rest(props, ["size", "titleTypographyProps", "subheaderTypographyProps", "title", "subheader", "noWrap", "classes"]);
58
58
  var classes = useMergedClasses(cardHeaderClasses, getCardHeaderUtilityClass, propClasses);
59
59
  var size = sizeProp || sizeContext || defaultCardSize;
60
60
  var titleVariant = titleVariantMap[size];
61
+ var titleStyles = noWrap
62
+ ? {
63
+ whiteSpace: 'nowrap',
64
+ overflow: 'hidden',
65
+ textOverflow: 'ellipsis',
66
+ }
67
+ : {
68
+ whiteSpace: 'normal',
69
+ overflow: 'visible',
70
+ textOverflow: 'clip', // Don't apply ellipsis
71
+ }; // No additional styles when noWrap is false
72
+ var subheaderStyles = noWrap
73
+ ? {
74
+ whiteSpace: 'nowrap',
75
+ overflow: 'hidden',
76
+ textOverflow: 'ellipsis',
77
+ }
78
+ : {
79
+ whiteSpace: 'normal',
80
+ overflow: 'visible',
81
+ textOverflow: 'clip', // Don't apply ellipsis
82
+ };
61
83
  return (React.createElement(Root, __assign({ ref: ref, ownerState: { size: size }, classes: {
62
84
  action: classes.action,
63
85
  avatar: classes.avatar,
64
86
  content: classes.content,
65
- }, title: React.createElement(Title, __assign({ variant: titleVariant, color: "textPrimary" }, { component: 'p' }, { role: "heading", display: "block" }, titleTypographyProps, { className: clsx(classes.title, titleTypographyProps.className), ownerState: { size: size }, noWrap: true, sx: {
66
- whiteSpace: 'nowrap',
67
- overflow: 'hidden',
68
- textOverflow: 'ellipsis',
69
- }, title: title }), title), subheader: subheader ? (React.createElement(Text, __assign({ variant: "body2", color: "textSecondary", component: "p", noWrap: true, sx: {
70
- whiteSpace: 'nowrap',
71
- overflow: 'hidden',
72
- textOverflow: 'ellipsis',
73
- }, title: subheader }, subheaderTypographyProps, { className: clsx(classes.subheader, subheaderTypographyProps.className) }), subheader)) : null }, cardProps, { disableTypography: true })));
87
+ }, title: React.createElement(Title, __assign({ variant: titleVariant, color: "textPrimary" }, { component: 'p' }, { role: "heading", display: "block" }, titleTypographyProps, { className: clsx(classes.title, titleTypographyProps.className), ownerState: { size: size }, noWrap: noWrap, sx: titleStyles, title: noWrap ? title : '' }), title), subheader: subheader ? (React.createElement(Text, __assign({ variant: "body2", color: "textSecondary", component: "p", noWrap: noWrap, sx: subheaderStyles, title: noWrap ? subheader : '' }, subheaderTypographyProps, { className: clsx(classes.subheader, subheaderTypographyProps.className) }), subheader)) : null }, cardProps, { disableTypography: true })));
74
88
  });
package/esm/chip/chip.js CHANGED
@@ -56,5 +56,5 @@ var Root = styled(MuiChip, { name: chipComponentName, slot: 'Root' })(function (
56
56
  });
57
57
  export var Chip = React.forwardRef(function (props, ref) {
58
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));
59
+ return (React.createElement(Root, __assign({ ref: ref, deleteIcon: deleteIcon, ownerState: { selected: selected } }, chipProps, { title: props === null || props === void 0 ? void 0 : props.label })));
60
60
  });
package/esm/code/code.js CHANGED
@@ -25,16 +25,17 @@ import { styled } from '../styled';
25
25
  import { Text } from '../text';
26
26
  export var CodeComponentName = 'QuantumCode';
27
27
  var Root = styled(Text, { name: CodeComponentName, slot: 'Root' })(function (_a) {
28
- var theme = _a.theme;
28
+ var theme = _a.theme, noWrap = _a.noWrap;
29
29
  return ({
30
30
  display: 'inline',
31
31
  padding: theme.spacing(0.25, 0.75),
32
32
  color: theme.tokens.color_fg_default,
33
33
  backgroundColor: theme.tokens.color_bg_layer_alternate_bold,
34
34
  borderRadius: theme.shape.borderRadius,
35
+ whiteSpace: noWrap ? 'nowrap' : 'pre-wrap', // Conditionally apply white-space
35
36
  });
36
37
  });
37
38
  export var Code = React.forwardRef(function (props, ref) {
38
- var children = props.children, _a = props.variant, variant = _a === void 0 ? 'code2' : _a, textProps = __rest(props, ["children", "variant"]);
39
- return (React.createElement(Root, __assign({ ref: ref }, { component: 'span' }, { color: "textSecondary", variant: variant }, textProps), children));
39
+ var children = props.children, _a = props.variant, variant = _a === void 0 ? 'code2' : _a, _b = props.noWrap, noWrap = _b === void 0 ? true : _b, textProps = __rest(props, ["children", "variant", "noWrap"]);
40
+ return (React.createElement(Root, __assign({ ref: ref }, { component: 'span' }, { color: "textSecondary", variant: variant, noWrap: noWrap }, textProps), children));
40
41
  });