@elliemae/ds-dialog 3.0.0-next.1 → 3.0.0-next.5

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 (59) hide show
  1. package/dist/cjs/DSDialog.js +157 -0
  2. package/dist/cjs/DSDialog.js.map +7 -0
  3. package/dist/cjs/DSDialogDatatestid.js +38 -0
  4. package/dist/cjs/DSDialogDatatestid.js.map +7 -0
  5. package/dist/cjs/defaultProps.js +46 -0
  6. package/dist/cjs/defaultProps.js.map +7 -0
  7. package/dist/cjs/index.js +94 -0
  8. package/dist/cjs/index.js.map +7 -0
  9. package/dist/cjs/propTypes.js +64 -0
  10. package/dist/cjs/propTypes.js.map +7 -0
  11. package/dist/cjs/sharedTypes.js +27 -0
  12. package/dist/cjs/sharedTypes.js.map +7 -0
  13. package/dist/cjs/styles.js +153 -0
  14. package/dist/cjs/styles.js.map +7 -0
  15. package/dist/cjs/utils.js +55 -0
  16. package/dist/cjs/utils.js.map +7 -0
  17. package/dist/esm/DSDialog.js +135 -0
  18. package/dist/esm/DSDialog.js.map +7 -0
  19. package/dist/esm/DSDialogDatatestid.js +9 -0
  20. package/dist/esm/DSDialogDatatestid.js.map +7 -0
  21. package/dist/esm/defaultProps.js +17 -0
  22. package/dist/esm/defaultProps.js.map +7 -0
  23. package/dist/esm/index.js +75 -0
  24. package/dist/esm/index.js.map +7 -0
  25. package/dist/esm/propTypes.js +37 -0
  26. package/dist/esm/propTypes.js.map +7 -0
  27. package/dist/esm/sharedTypes.js +2 -0
  28. package/dist/esm/sharedTypes.js.map +7 -0
  29. package/dist/esm/styles.js +124 -0
  30. package/dist/esm/styles.js.map +7 -0
  31. package/dist/esm/utils.js +26 -0
  32. package/dist/esm/utils.js.map +7 -0
  33. package/package.json +45 -35
  34. package/cjs/DSDialog.js +0 -107
  35. package/cjs/DSDialogDatatestid.js +0 -10
  36. package/cjs/DSDialogInternalTypes.d.js +0 -2
  37. package/cjs/DSDialogTypes.js +0 -2
  38. package/cjs/defaultProps.js +0 -18
  39. package/cjs/index.js +0 -24
  40. package/cjs/propTypes.js +0 -18
  41. package/cjs/styles.js +0 -121
  42. package/cjs/utils.js +0 -35
  43. package/esm/DSDialog.js +0 -95
  44. package/esm/DSDialogDatatestid.js +0 -6
  45. package/esm/DSDialogInternalTypes.d.js +0 -1
  46. package/esm/DSDialogTypes.js +0 -1
  47. package/esm/defaultProps.js +0 -14
  48. package/esm/index.js +0 -4
  49. package/esm/propTypes.js +0 -14
  50. package/esm/styles.js +0 -101
  51. package/esm/utils.js +0 -28
  52. package/types/DSDialog.d.ts +0 -30
  53. package/types/DSDialogDatatestid.d.ts +0 -4
  54. package/types/DSDialogTypes.d.ts +0 -10
  55. package/types/defaultProps.d.ts +0 -2
  56. package/types/index.d.ts +0 -4
  57. package/types/propTypes.d.ts +0 -19
  58. package/types/styles.d.ts +0 -14
  59. package/types/utils.d.ts +0 -19
package/esm/DSDialog.js DELETED
@@ -1,95 +0,0 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
- import _jsx from '@babel/runtime/helpers/esm/jsx';
8
- import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
9
- import 'core-js/modules/web.dom-collections.iterator.js';
10
- import ReactDOM from 'react-dom';
11
- import { useState, useRef, useCallback, useEffect } from 'react';
12
- import { describe } from 'react-desc';
13
- import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
14
- import { StyledDialogBackground, FixedBody, StyledDialogContainer } from './styles.js';
15
- import { propTypes } from './propTypes.js';
16
- import { defaultProps } from './defaultProps.js';
17
- import { getSpaceProps } from './utils.js';
18
- import { DSDialogDatatestid } from './DSDialogDatatestid.js';
19
- import { jsx } from 'react/jsx-runtime';
20
-
21
- const _excluded = ["children", "isOpen", "onClickOutside", "centered", "size", "removeAutoFocus", "zIndex"];
22
-
23
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24
-
25
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
26
-
27
- const DSDialog = props => {
28
- var _FixedBody;
29
-
30
- const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
31
- const [isBodyOverflow, setIsBodyOverflow] = useState(false);
32
- useValidateTypescriptPropTypes(propsWithDefault, propTypes);
33
-
34
- const {
35
- children,
36
- isOpen,
37
- onClickOutside,
38
- centered,
39
- size,
40
- removeAutoFocus,
41
- zIndex
42
- } = propsWithDefault,
43
- rest = _objectWithoutProperties(propsWithDefault, _excluded);
44
-
45
- const containerRef = useRef(null);
46
- const handleOutsideClick = useCallback(e => {
47
- if (e.target.dataset.portalbg) onClickOutside();
48
- }, [onClickOutside]);
49
- const handleOnKeyDown = useCallback(e => {
50
- if (e.key === 'Escape') onClickOutside();
51
- }, [onClickOutside]);
52
- useEffect(() => {
53
- const body = document.getElementsByTagName('body')[0];
54
- const {
55
- offsetHeight,
56
- scrollHeight
57
- } = body;
58
- if (!isOpen) return setIsBodyOverflow(false);
59
- return setIsBodyOverflow(offsetHeight < scrollHeight);
60
- }, [isOpen]);
61
- useEffect(() => {
62
- var _containerRef$current;
63
-
64
- if (isOpen && !removeAutoFocus) containerRef === null || containerRef === void 0 ? void 0 : (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.focus();
65
- }, [isOpen, removeAutoFocus]);
66
-
67
- if (isOpen) {
68
- return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/_jsx(StyledDialogBackground, {
69
- onClick: handleOutsideClick,
70
- "data-portalbg": true,
71
- "data-testid": DSDialogDatatestid.BACKGROUND,
72
- zIndex: zIndex
73
- }, void 0, _FixedBody || (_FixedBody = /*#__PURE__*/_jsx(FixedBody, {
74
- isBodyOverflow: isBodyOverflow
75
- })), /*#__PURE__*/jsx(StyledDialogContainer, _objectSpread(_objectSpread({
76
- role: "dialog",
77
- "aria-modal": true,
78
- ref: containerRef,
79
- tabIndex: !removeAutoFocus ? 0 : undefined,
80
- onKeyDown: handleOnKeyDown
81
- }, getSpaceProps(rest)), {}, {
82
- size: size,
83
- centered: centered,
84
- "data-testid": DSDialogDatatestid.CONTAINER,
85
- children: children
86
- }))), document.getElementsByTagName('body')[0]);
87
- }
88
-
89
- return null;
90
- };
91
-
92
- const DSDialogWithSchema = describe(DSDialog);
93
- DSDialogWithSchema.propTypes = propTypes;
94
-
95
- export { DSDialog, DSDialogWithSchema };
@@ -1,6 +0,0 @@
1
- const DSDialogDatatestid = {
2
- CONTAINER: 'ds-dialog-container',
3
- BACKGROUND: 'ds-dialog-background'
4
- };
5
-
6
- export { DSDialogDatatestid };
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1,14 +0,0 @@
1
- import { DSDialogSizes } from './utils.js';
2
-
3
- const noop = () => {};
4
-
5
- const defaultProps = {
6
- isOpen: false,
7
- centered: false,
8
- size: DSDialogSizes.DEFAULT,
9
- removeAutoFocus: false,
10
- onClickOutside: noop,
11
- zIndex: 10
12
- };
13
-
14
- export { defaultProps };
package/esm/index.js DELETED
@@ -1,4 +0,0 @@
1
- export { DSDialog, DSDialogWithSchema } from './DSDialog.js';
2
- export { DSDialogDatatestid } from './DSDialogDatatestid.js';
3
- export { DSDialogSizes } from './utils.js';
4
- export { DSDialogAddon, DSDialogBody, DSDialogDefaultLayout, DSDialogFooter, DSDialogHeader, DSDialogPrimaryMessage, DSDialogSecondaryMessage, DSDialogSeparator, DSDialogTitle } from './styles.js';
package/esm/propTypes.js DELETED
@@ -1,14 +0,0 @@
1
- import { PropTypes } from 'react-desc';
2
- import { DSDialogSizesArrayValues, DSDialogSizes } from './utils.js';
3
-
4
- /* eslint-disable max-len */
5
- const propTypes = {
6
- isOpen: PropTypes.bool.description('Wether the Dialog is open or not.').defaultValue(false),
7
- children: PropTypes.node.description('Nested components.').isRequired,
8
- centered: PropTypes.bool.description('Centers the Dialog.').defaultValue(false),
9
- size: PropTypes.oneOf(DSDialogSizesArrayValues).description("Dialog's width size.").defaultValue(DSDialogSizes.DEFAULT),
10
- removeAutoFocus: PropTypes.bool.description('Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.').defaultValue(false),
11
- onClickOutside: PropTypes.func.description('Callback that should be used to close the modal when the user clicks outside. Cb also triggers when the user press ESC key for accessibility purposes.').defaultValue(() => {})
12
- };
13
-
14
- export { propTypes };
package/esm/styles.js DELETED
@@ -1,101 +0,0 @@
1
- import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
2
- import styled, { createGlobalStyle, space, layout, flexboxes, sizing } from '@xstyled/styled-components';
3
- import { allSizes } from './utils.js';
4
-
5
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
6
- const FixedBody = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n body {\n overflow: hidden;\n \n ", "\n }\n"])), _ref => {
7
- let {
8
- isBodyOverflow
9
- } = _ref;
10
- return isBodyOverflow ? "padding-right: 15px !important;" : "";
11
- });
12
- const StyledDialogBackground = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background: rgba(37, 41, 47, 50%);\n overflow-y: auto;\n z-index: ", ";\n"])), _ref2 => {
13
- let {
14
- zIndex
15
- } = _ref2;
16
- return zIndex;
17
- });
18
- const StyledDialogContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: fit-content;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: ", ";\n width: ", ";\n min-width: 300px;\n box-shadow: 0 10px 20px 0 ", ";\n background: ", ";\n overflow-y: auto;\n ", "\n &:focus {\n outline: none;\n }\n"])), _ref3 => {
19
- let {
20
- centered
21
- } = _ref3;
22
- return centered ? 'auto' : '20vh auto auto auto';
23
- }, _ref4 => {
24
- let {
25
- size
26
- } = _ref4;
27
- return allSizes[size];
28
- }, _ref5 => {
29
- let {
30
- theme
31
- } = _ref5;
32
- return theme.colors.neutral[500];
33
- }, _ref6 => {
34
- let {
35
- theme
36
- } = _ref6;
37
- return theme.colors.neutral['000'];
38
- }, space);
39
- const DSDialogTitle = styled.h3(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: ", ";\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n margin: 0;\n"])), _ref7 => {
40
- let {
41
- theme
42
- } = _ref7;
43
- return theme.fontSizes.title[700];
44
- });
45
- const DSDialogAddon = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral([""])));
46
- const DSDialogHeader = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n min-height: ", ";\n padding: 10px ", ";\n & ", " + ", " {\n align-self: flex-start;\n justify-self: flex-end;\n }\n & ", ":only-child {\n justify-self: flex-end;\n }\n ", "\n"])), _ref8 => {
47
- let {
48
- theme
49
- } = _ref8;
50
- return theme.space.m;
51
- }, _ref9 => {
52
- let {
53
- theme
54
- } = _ref9;
55
- return theme.space.xs;
56
- }, DSDialogTitle, DSDialogAddon, DSDialogAddon, space);
57
- const DSDialogSeparator = styled.hr.attrs(() => ({
58
- 'aria-hidden': true
59
- }))(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin: 0;\n border-top: 1px solid ", ";\n"])), _ref10 => {
60
- let {
61
- theme
62
- } = _ref10;
63
- return theme.colors.neutral['080'];
64
- });
65
- const DSDialogBody = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding: ", ";\n overflow-y: auto;\n ", "\n ", "\n ", "\n ", "\n"])), _ref11 => {
66
- let {
67
- theme
68
- } = _ref11;
69
- return theme.space.xs;
70
- }, layout, space, flexboxes, sizing);
71
- const DSDialogPrimaryMessage = styled.h3(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin: 0;\n"])));
72
- const DSDialogSecondaryMessage = styled.p(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin: 0;\n color: ", ";\n"])), _ref12 => {
73
- let {
74
- theme
75
- } = _ref12;
76
- return theme.colors.neutral[500];
77
- });
78
- const DSDialogDefaultLayout = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: grid;\n grid-auto-flow: row;\n justify-items: center;\n align-items: center;\n grid-gap: ", ";\n\n ", " {\n text-align: center;\n }\n"])), _ref13 => {
79
- let {
80
- theme
81
- } = _ref13;
82
- return theme.space.xxs;
83
- }, DSDialogSecondaryMessage);
84
- const DSDialogFooter = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: grid;\n grid-auto-flow: column;\n align-items: center;\n justify-content: flex-end;\n grid-gap: ", ";\n min-height: ", ";\n padding: 0 ", ";\n ", "\n ", "\n ", "\n"])), _ref14 => {
85
- let {
86
- theme
87
- } = _ref14;
88
- return theme.space.xxs;
89
- }, _ref15 => {
90
- let {
91
- theme
92
- } = _ref15;
93
- return theme.space.m;
94
- }, _ref16 => {
95
- let {
96
- theme
97
- } = _ref16;
98
- return theme.space.xs;
99
- }, space, flexboxes, sizing);
100
-
101
- export { DSDialogAddon, DSDialogBody, DSDialogDefaultLayout, DSDialogFooter, DSDialogHeader, DSDialogPrimaryMessage, DSDialogSecondaryMessage, DSDialogSeparator, DSDialogTitle, FixedBody, StyledDialogBackground, StyledDialogContainer };
package/esm/utils.js DELETED
@@ -1,28 +0,0 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/web.dom-collections.iterator.js';
5
-
6
- const getSpaceProps = props => Object.fromEntries(Object.entries(props).filter(_ref => {
7
- let [key] = _ref;
8
- return /^[pm][xytblr]?$/.exec(key);
9
- }));
10
- const DSDialogSizes = {
11
- DEFAULT: 'default',
12
- SMALL: 'small',
13
- MEDIUM: 'medium',
14
- LARGE: 'large',
15
- XLARGE: 'x-large',
16
- XXLARGE: 'xx-large'
17
- };
18
- const DSDialogSizesArrayValues = Object.values(DSDialogSizes);
19
- const allSizes = {
20
- default: '576px',
21
- small: '320px',
22
- medium: '656px',
23
- large: '848px',
24
- 'x-large': '1042px',
25
- 'xx-large': '1440px'
26
- };
27
-
28
- export { DSDialogSizes, DSDialogSizesArrayValues, allSizes, getSpaceProps };
@@ -1,30 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- import React from 'react';
3
- import type { DSDialogPropsT } from './DSDialogTypes';
4
- declare const DSDialog: {
5
- (props: DSDialogPropsT): React.ReactNode;
6
- propTypes: {
7
- isOpen: {
8
- deprecated: import("react-desc").PropTypesDescValidator;
9
- };
10
- children: import("react-desc").PropTypesDescValue;
11
- centered: {
12
- deprecated: import("react-desc").PropTypesDescValidator;
13
- };
14
- size: {
15
- deprecated: import("react-desc").PropTypesDescValidator;
16
- };
17
- removeAutoFocus: {
18
- deprecated: import("react-desc").PropTypesDescValidator;
19
- };
20
- onClickOutside: {
21
- deprecated: import("react-desc").PropTypesDescValidator;
22
- };
23
- };
24
- };
25
- declare const DSDialogWithSchema: {
26
- (props?: DSDialogPropsT | undefined): JSX.Element;
27
- propTypes: unknown;
28
- toTypescript: () => import("react-desc").TypescriptSchema;
29
- };
30
- export { DSDialog, DSDialogWithSchema };
@@ -1,4 +0,0 @@
1
- export declare const DSDialogDatatestid: {
2
- CONTAINER: string;
3
- BACKGROUND: string;
4
- };
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export declare type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';
3
- export interface DSDialogPropsT {
4
- isOpen?: boolean;
5
- children: React.ReactNode;
6
- onClickOutside?: () => void;
7
- size?: Sizes;
8
- centered?: boolean;
9
- removeAutoFocus?: boolean;
10
- }
@@ -1,2 +0,0 @@
1
- import type { DSDialogDefaultPropsT } from './DSDialogInternalTypes';
2
- export declare const defaultProps: DSDialogDefaultPropsT;
package/types/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './DSDialog';
2
- export * from './DSDialogDatatestid';
3
- export { DSDialogSizes } from './utils';
4
- export { DSDialogBody, DSDialogHeader, DSDialogFooter, DSDialogSeparator, DSDialogTitle, DSDialogAddon, DSDialogDefaultLayout, DSDialogPrimaryMessage, DSDialogSecondaryMessage, } from './styles';
@@ -1,19 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- export declare const propTypes: {
3
- isOpen: {
4
- deprecated: import("react-desc").PropTypesDescValidator;
5
- };
6
- children: import("react-desc").PropTypesDescValue;
7
- centered: {
8
- deprecated: import("react-desc").PropTypesDescValidator;
9
- };
10
- size: {
11
- deprecated: import("react-desc").PropTypesDescValidator;
12
- };
13
- removeAutoFocus: {
14
- deprecated: import("react-desc").PropTypesDescValidator;
15
- };
16
- onClickOutside: {
17
- deprecated: import("react-desc").PropTypesDescValidator;
18
- };
19
- };
package/types/styles.d.ts DELETED
@@ -1,14 +0,0 @@
1
- export declare const FixedBody: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
2
- export declare const StyledDialogBackground: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
3
- export declare const StyledDialogContainer: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, any, never>;
4
- export declare const DSDialogTitle: import("styled-components").StyledComponent<"h3", import("@xstyled/system").Theme, {}, never>;
5
- export declare const DSDialogAddon: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
6
- export declare const DSDialogHeader: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
7
- export declare const DSDialogSeparator: import("styled-components").StyledComponent<"hr", import("@xstyled/system").Theme, {
8
- 'aria-hidden': true;
9
- }, "aria-hidden">;
10
- export declare const DSDialogBody: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
11
- export declare const DSDialogPrimaryMessage: import("styled-components").StyledComponent<"h3", import("@xstyled/system").Theme, {}, never>;
12
- export declare const DSDialogSecondaryMessage: import("styled-components").StyledComponent<"p", import("@xstyled/system").Theme, {}, never>;
13
- export declare const DSDialogDefaultLayout: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
14
- export declare const DSDialogFooter: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
package/types/utils.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import type { GetSpaceArgsT } from './DSDialogInternalTypes';
2
- export declare const getSpaceProps: (props: GetSpaceArgsT) => GetSpaceArgsT;
3
- export declare const DSDialogSizes: {
4
- readonly DEFAULT: "default";
5
- readonly SMALL: "small";
6
- readonly MEDIUM: "medium";
7
- readonly LARGE: "large";
8
- readonly XLARGE: "x-large";
9
- readonly XXLARGE: "xx-large";
10
- };
11
- export declare const DSDialogSizesArrayValues: ("default" | "small" | "medium" | "large" | "x-large" | "xx-large")[];
12
- export declare const allSizes: {
13
- default: string;
14
- small: string;
15
- medium: string;
16
- large: string;
17
- 'x-large': string;
18
- 'xx-large': string;
19
- };