@popmenu/common-ui 0.28.1 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/Typography/Typography.d.ts +1 -1
- package/build/components/Typography/TypographyProps.d.ts +6 -5
- package/build/components/Typography/TypographyStyles.d.ts +3 -1
- package/build/index.es.js +49 -75
- package/build/index.es.js.map +1 -1
- package/build/index.js +49 -75
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- package/build/components/Typography/variantMap.d.ts +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypographyProps } from './TypographyProps';
|
|
3
|
-
export declare const Typography: React.ForwardRefExoticComponent<Pick<TypographyProps, "className" | "style" | "classes" | "innerRef" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "
|
|
3
|
+
export declare const Typography: React.ForwardRefExoticComponent<Pick<TypographyProps, "className" | "style" | "classes" | "innerRef" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "noWrap" | "gutterBottom" | "paragraph" | "align" | "display" | "variant" | "variantMapping" | "weight"> & React.RefAttributes<HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement>>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { TypographyProps as MuiTypographyProps } from '@material-ui/core';
|
|
2
|
-
|
|
3
|
-
export declare type CustomTypographyVariants = 'h7';
|
|
2
|
+
import { Variant } from '@material-ui/core/styles/createTypography';
|
|
4
3
|
export declare type ThemeColors = 'primary.light' | 'primary' | 'primary.dark' | 'secondary.light' | 'secondary' | 'secondary.dark' | 'info.light' | 'info' | 'info.dark' | 'success.light' | 'success' | 'success.dark' | 'error.light' | 'error' | 'error.dark' | 'warning.light' | 'warning' | 'warning.dark' | 'white' | 'black' | 'grey.100' | 'grey.200' | 'grey.300' | 'grey.400' | 'grey.500' | 'grey.600' | 'grey.700' | 'grey.800' | 'grey.900' | 'textPrimary' | 'textSecondary';
|
|
5
|
-
export
|
|
6
|
-
variant
|
|
4
|
+
export declare const defaultTypographyProps: {
|
|
5
|
+
variant: Variant;
|
|
6
|
+
};
|
|
7
|
+
export interface TypographyProps extends Omit<MuiTypographyProps, 'color'> {
|
|
7
8
|
color?: ThemeColors;
|
|
8
|
-
weight?: 'regular' | 'semi-bold' | 'bold';
|
|
9
|
+
weight?: 'regular' | 'medium' | 'semi-bold' | 'bold';
|
|
9
10
|
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { TypographyProps } from './TypographyProps';
|
|
2
|
-
export declare const useTypographyStyles: (props: TypographyProps
|
|
2
|
+
export declare const useTypographyStyles: (props: TypographyProps & {
|
|
3
|
+
variant: import("@material-ui/core/styles").TypographyVariant;
|
|
4
|
+
}) => import("@material-ui/styles").ClassNameMap<string>;
|
package/build/index.es.js
CHANGED
|
@@ -89,55 +89,55 @@ function __rest(s, e) {
|
|
|
89
89
|
return t;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
var _path$
|
|
92
|
+
var _path$Q;
|
|
93
93
|
|
|
94
|
-
function _extends$
|
|
94
|
+
function _extends$1n() { _extends$1n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1n.apply(this, arguments); }
|
|
95
95
|
|
|
96
96
|
function SvgMinusCircle(props) {
|
|
97
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
97
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1n({
|
|
98
98
|
viewBox: "0 0 16 16",
|
|
99
99
|
fill: "none",
|
|
100
100
|
strokeLinecap: "round",
|
|
101
101
|
strokeLinejoin: "round",
|
|
102
102
|
width: "1em",
|
|
103
103
|
height: "1em"
|
|
104
|
-
}, props), _path$
|
|
104
|
+
}, props), _path$Q || (_path$Q = /*#__PURE__*/React.createElement("path", {
|
|
105
105
|
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM5.333 8h5.334",
|
|
106
106
|
stroke: "currentColor"
|
|
107
107
|
})));
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
var _path$
|
|
110
|
+
var _path$M;
|
|
111
111
|
|
|
112
|
-
function _extends$
|
|
112
|
+
function _extends$1j() { _extends$1j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1j.apply(this, arguments); }
|
|
113
113
|
|
|
114
114
|
function SvgPlusCircle(props) {
|
|
115
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
115
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1j({
|
|
116
116
|
viewBox: "0 0 16 16",
|
|
117
117
|
fill: "none",
|
|
118
118
|
strokeLinecap: "round",
|
|
119
119
|
strokeLinejoin: "round",
|
|
120
120
|
width: "1em",
|
|
121
121
|
height: "1em"
|
|
122
|
-
}, props), _path$
|
|
122
|
+
}, props), _path$M || (_path$M = /*#__PURE__*/React.createElement("path", {
|
|
123
123
|
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-9.334v5.334M5.333 8h5.334",
|
|
124
124
|
stroke: "currentColor"
|
|
125
125
|
})));
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
var _path$
|
|
128
|
+
var _path$D;
|
|
129
129
|
|
|
130
|
-
function _extends$
|
|
130
|
+
function _extends$16() { _extends$16 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$16.apply(this, arguments); }
|
|
131
131
|
|
|
132
132
|
function SvgUser(props) {
|
|
133
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
133
|
+
return /*#__PURE__*/React.createElement("svg", _extends$16({
|
|
134
134
|
viewBox: "0 0 16 16",
|
|
135
135
|
fill: "none",
|
|
136
136
|
strokeLinecap: "round",
|
|
137
137
|
strokeLinejoin: "round",
|
|
138
138
|
width: "1em",
|
|
139
139
|
height: "1em"
|
|
140
|
-
}, props), _path$
|
|
140
|
+
}, props), _path$D || (_path$D = /*#__PURE__*/React.createElement("path", {
|
|
141
141
|
d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z",
|
|
142
142
|
stroke: "currentColor"
|
|
143
143
|
})));
|
|
@@ -370,48 +370,35 @@ var Checkbox = forwardRef(function (props, ref) {
|
|
|
370
370
|
});
|
|
371
371
|
Checkbox.displayName = 'Checkbox';
|
|
372
372
|
|
|
373
|
+
var defaultTypographyProps = {
|
|
374
|
+
variant: 'body1',
|
|
375
|
+
};
|
|
376
|
+
|
|
373
377
|
var weights = {
|
|
374
378
|
regular: 400,
|
|
379
|
+
medium: 500,
|
|
375
380
|
'semi-bold': 600,
|
|
376
381
|
bold: 700,
|
|
377
382
|
};
|
|
378
|
-
var
|
|
379
|
-
var
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
'info.light',
|
|
397
|
-
'info.dark',
|
|
398
|
-
'success.light',
|
|
399
|
-
'success.dark',
|
|
400
|
-
'error.light',
|
|
401
|
-
'error.dark',
|
|
402
|
-
'warning.light',
|
|
403
|
-
'warning.dark',
|
|
404
|
-
].includes(color)) {
|
|
405
|
-
var _a = color.split('.'), paletteKey = _a[0], variant = _a[1];
|
|
406
|
-
return theme.palette[paletteKey][variant];
|
|
383
|
+
var getCustomColor = function (theme, color) {
|
|
384
|
+
var isCommonColor = color && ['white', 'black'].includes(color);
|
|
385
|
+
var isGreyColor = color && color.match(/^grey\.\d{3}/);
|
|
386
|
+
var isSemanticColor = color && color.match(/(primary|secondary|info|success|error|warning).?(light|dark)?/);
|
|
387
|
+
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
388
|
+
switch (true) {
|
|
389
|
+
case isCommonColor:
|
|
390
|
+
return theme.palette.common[color];
|
|
391
|
+
case Boolean(isGreyColor):
|
|
392
|
+
var scale = color.split('.')[1];
|
|
393
|
+
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
394
|
+
case Boolean(isSemanticColor):
|
|
395
|
+
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
396
|
+
return theme.palette[paletteKey][variant];
|
|
397
|
+
case isTextColor:
|
|
398
|
+
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
399
|
+
default:
|
|
400
|
+
return undefined;
|
|
407
401
|
}
|
|
408
|
-
if (['success', 'info', 'error', 'warning', 'primary', 'secondary'].includes(color)) {
|
|
409
|
-
return theme.palette[color].main;
|
|
410
|
-
}
|
|
411
|
-
if (['textPrimary', 'textSecondary'].includes(color)) {
|
|
412
|
-
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
413
|
-
}
|
|
414
|
-
return undefined;
|
|
415
402
|
};
|
|
416
403
|
var useTypographyStyles = makeStyles$1(function (theme) {
|
|
417
404
|
var _a;
|
|
@@ -426,21 +413,24 @@ var useTypographyStyles = makeStyles$1(function (theme) {
|
|
|
426
413
|
_a.fontFamily = theme.typography.fontFamily,
|
|
427
414
|
_a.fontWeight = function (_a) {
|
|
428
415
|
var variant = _a.variant, weight = _a.weight;
|
|
429
|
-
return (weight ? weights[weight] : theme.typography[variant
|
|
416
|
+
return (weight ? weights[weight] : theme.typography[variant].fontWeight);
|
|
430
417
|
},
|
|
431
418
|
_a.fontSize = function (_a) {
|
|
432
419
|
var variant = _a.variant;
|
|
433
|
-
return theme.typography[variant
|
|
420
|
+
return theme.typography[variant].fontSize;
|
|
434
421
|
},
|
|
435
422
|
_a.lineHeight = function (_a) {
|
|
436
423
|
var variant = _a.variant;
|
|
437
|
-
return theme.typography[variant
|
|
424
|
+
return theme.typography[variant].lineHeight;
|
|
438
425
|
},
|
|
439
426
|
_a.textTransform = function (_a) {
|
|
440
427
|
var variant = _a.variant;
|
|
441
|
-
return theme.typography[variant
|
|
428
|
+
return theme.typography[variant].textTransform;
|
|
429
|
+
},
|
|
430
|
+
_a.color = function (_a) {
|
|
431
|
+
var color = _a.color, variant = _a.variant;
|
|
432
|
+
return (color && getCustomColor(theme, color)) || theme.typography[variant].color;
|
|
442
433
|
},
|
|
443
|
-
_a.color = function (props) { return getColor(theme, props); },
|
|
444
434
|
_a),
|
|
445
435
|
caption: {
|
|
446
436
|
display: 'inline',
|
|
@@ -451,30 +441,14 @@ var useTypographyStyles = makeStyles$1(function (theme) {
|
|
|
451
441
|
});
|
|
452
442
|
});
|
|
453
443
|
|
|
454
|
-
var variantMap = {
|
|
455
|
-
h1: 'h1',
|
|
456
|
-
h2: 'h2',
|
|
457
|
-
h3: 'h3',
|
|
458
|
-
h4: 'h4',
|
|
459
|
-
h5: 'h5',
|
|
460
|
-
h6: 'h6',
|
|
461
|
-
h7: 'h6',
|
|
462
|
-
body1: 'p',
|
|
463
|
-
body2: 'p',
|
|
464
|
-
subtitle1: 'h6',
|
|
465
|
-
subtitle2: 'h6',
|
|
466
|
-
caption: 'span',
|
|
467
|
-
overline: 'span',
|
|
468
|
-
};
|
|
469
|
-
|
|
470
444
|
var Typography = forwardRef(function (props, ref) {
|
|
471
|
-
props.weight;
|
|
472
|
-
var
|
|
473
|
-
var
|
|
474
|
-
|
|
475
|
-
return React__default.createElement(Typography$1, __assign({ component: component, ref: ref, classes: classes }, restProps, { variant: "inherit" }));
|
|
445
|
+
props.weight; props.color; var restProps = __rest(props, ["weight", "color"]);
|
|
446
|
+
var classes = useTypographyStyles(__assign({}, props));
|
|
447
|
+
var variantMapping = { subtitle1: 'p' };
|
|
448
|
+
return React__default.createElement(Typography$1, __assign({ ref: ref, classes: classes, variantMapping: variantMapping }, restProps));
|
|
476
449
|
});
|
|
477
|
-
Typography.displayName = 'Typography';
|
|
450
|
+
Typography.displayName = 'Typography';
|
|
451
|
+
Typography.defaultProps = defaultTypographyProps;
|
|
478
452
|
|
|
479
453
|
var getFadeStop = function (_a, typographyVariant) {
|
|
480
454
|
var typography = _a.typography;
|