@elliemae/ds-mobile 3.5.1-next.0 → 3.6.0-next.1
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/dist/cjs/MobileBanner/MobileBanner.js +18 -15
- package/dist/cjs/MobileBanner/MobileBanner.js.map +2 -2
- package/dist/cjs/MobileBanner/{defaultProps.js → config/useMobileBanner.js} +17 -18
- package/dist/cjs/MobileBanner/config/useMobileBanner.js.map +7 -0
- package/dist/cjs/MobileBanner/propTypes.js +28 -11
- package/dist/cjs/MobileBanner/propTypes.js.map +2 -2
- package/dist/cjs/MobileBanner/styles.js.map +2 -2
- package/dist/esm/MobileBanner/MobileBanner.js +18 -15
- package/dist/esm/MobileBanner/MobileBanner.js.map +2 -2
- package/dist/esm/MobileBanner/config/useMobileBanner.js +23 -0
- package/dist/esm/MobileBanner/config/useMobileBanner.js.map +7 -0
- package/dist/esm/MobileBanner/propTypes.js +29 -12
- package/dist/esm/MobileBanner/propTypes.js.map +2 -2
- package/dist/esm/MobileBanner/styles.js.map +2 -2
- package/package.json +16 -16
- package/dist/cjs/MobileBanner/defaultProps.js.map +0 -7
- package/dist/cjs/MobileBanner/index.d.js +0 -24
- package/dist/cjs/MobileBanner/index.d.js.map +0 -7
- package/dist/esm/MobileBanner/defaultProps.js +0 -19
- package/dist/esm/MobileBanner/defaultProps.js.map +0 -7
- package/dist/esm/MobileBanner/index.d.js +0 -2
- package/dist/esm/MobileBanner/index.d.js.map +0 -7
|
@@ -35,21 +35,23 @@ var import_ds_icons = require("@elliemae/ds-icons");
|
|
|
35
35
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
36
36
|
var import_icons = require("./utils/icons");
|
|
37
37
|
var import_propTypes = require("./propTypes");
|
|
38
|
-
var import_defaultProps = require("./defaultProps");
|
|
39
38
|
var import_styles = require("./styles");
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
var import_useMobileBanner = require("./config/useMobileBanner");
|
|
40
|
+
const DSMobileBanner = (props) => {
|
|
41
|
+
const { globalAttributes, xstyledProps, propsWithDefault } = (0, import_useMobileBanner.useDSMobileBanner)(props);
|
|
42
|
+
const {
|
|
43
|
+
type,
|
|
44
|
+
isOpen,
|
|
45
|
+
closeButtonOnClick,
|
|
46
|
+
label,
|
|
47
|
+
body,
|
|
48
|
+
actionLinkLabel,
|
|
49
|
+
actionLinkHref,
|
|
50
|
+
actionLinkOnClick,
|
|
51
|
+
showCloseButton,
|
|
52
|
+
containerProps,
|
|
53
|
+
focusOnOpen
|
|
54
|
+
} = propsWithDefault;
|
|
53
55
|
const innerContainerRef = (0, import_react.useRef)(null);
|
|
54
56
|
const closeRef = (0, import_react.useRef)(null);
|
|
55
57
|
const [current, setCurrent] = (0, import_react.useState)(isOpen);
|
|
@@ -82,6 +84,8 @@ const DSMobileBanner = ({
|
|
|
82
84
|
...containerProps,
|
|
83
85
|
"data-testid": "ds-mobile-banner-container",
|
|
84
86
|
role: "alert",
|
|
87
|
+
...globalAttributes,
|
|
88
|
+
...xstyledProps,
|
|
85
89
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledInnerContainer, {
|
|
86
90
|
type,
|
|
87
91
|
isOpen,
|
|
@@ -131,7 +135,6 @@ const DSMobileBanner = ({
|
|
|
131
135
|
})
|
|
132
136
|
});
|
|
133
137
|
};
|
|
134
|
-
DSMobileBanner.defaultProps = import_defaultProps.defaultProps;
|
|
135
138
|
DSMobileBanner.propTypes = import_propTypes.propTypes;
|
|
136
139
|
DSMobileBanner.displayName = "DSMobileBanner";
|
|
137
140
|
const DSMobileBannerWithSchema = (0, import_ds_utilities.describe)(DSMobileBanner);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/MobileBanner/MobileBanner.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useLayoutEffect, useEffect, useRef, useState } from 'react';\nimport { CloseX } from '@elliemae/ds-icons';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAAoE;AACpE,sBAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { useLayoutEffect, useEffect, useRef, useState } from 'react';\nimport { CloseX } from '@elliemae/ds-icons';\nimport { describe } from '@elliemae/ds-utilities';\nimport { icons } from './utils/icons';\nimport { DSMobileBannerT, propTypes } from './propTypes';\nimport {\n StyledActionLink,\n StyledCloseButton,\n StyledInnerContainer,\n StyledBannerContainer,\n StyledContent,\n StyledIconContainer,\n StyledSubTitle,\n StyledTitle,\n StyledSubTitleText,\n StyledCloseButtonContainer,\n} from './styles';\nimport { useDSMobileBanner } from './config/useMobileBanner';\n\nconst DSMobileBanner = (props: DSMobileBannerT.Props) => {\n const { globalAttributes, xstyledProps, propsWithDefault } = useDSMobileBanner(props);\n const {\n type,\n isOpen,\n closeButtonOnClick,\n label,\n body,\n actionLinkLabel,\n actionLinkHref,\n actionLinkOnClick,\n showCloseButton,\n containerProps,\n focusOnOpen,\n } = propsWithDefault;\n\n const innerContainerRef = useRef<HTMLDivElement | null>(null);\n const closeRef = useRef<HTMLDivElement | null>(null);\n const [current, setCurrent] = useState<boolean>(isOpen);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n const [height, setHeight] = useState<number>(0);\n\n useEffect(() => {\n if (innerContainerRef.current) {\n setHeight(innerContainerRef.current.offsetHeight);\n }\n }, [isAnimating, isOpen]);\n\n useEffect(() => {\n if (focusOnOpen && closeRef.current && isOpen) {\n closeRef.current?.focus?.();\n }\n }, [focusOnOpen, isOpen]);\n\n useLayoutEffect(() => {\n if (isOpen !== current || isOpen) setIsAnimating(true);\n else setIsAnimating(false);\n }, [isOpen, current]);\n\n if (!isAnimating && !isOpen) return null;\n\n return (\n <StyledBannerContainer\n type={type}\n isOpen={isOpen}\n isAnimating={isAnimating}\n onAnimationEnd={() => setCurrent(isOpen)}\n height={height}\n {...containerProps}\n data-testid=\"ds-mobile-banner-container\"\n role=\"alert\"\n {...globalAttributes}\n {...xstyledProps}\n >\n <StyledInnerContainer type={type} isOpen={isOpen} ref={innerContainerRef} isAnimating={isAnimating}>\n <StyledIconContainer data-testid=\"ds-mobile-banner-icon\">{icons[type]}</StyledIconContainer>\n <StyledContent showCloseButton={showCloseButton}>\n <StyledTitle>{label}</StyledTitle>\n <StyledSubTitle>\n <StyledSubTitleText>{body}</StyledSubTitleText>\n {actionLinkLabel && (\n <StyledActionLink href={actionLinkHref} data-testid=\"ds-mobile-banner-link\" onClick={actionLinkOnClick}>\n {actionLinkLabel}\n </StyledActionLink>\n )}\n </StyledSubTitle>\n </StyledContent>\n {showCloseButton && (\n <StyledCloseButtonContainer>\n <StyledCloseButton\n data-testid=\"ds-mobile-banner-close-button\"\n buttonType=\"icon\"\n onClick={closeButtonOnClick}\n aria-label=\"Close Banner\"\n innerRef={closeRef}\n size=\"s\"\n >\n <CloseX width=\"12px\" height=\"12px\" />\n </StyledCloseButton>\n </StyledCloseButtonContainer>\n )}\n </StyledInnerContainer>\n </StyledBannerContainer>\n );\n};\n\nDSMobileBanner.propTypes = propTypes;\nDSMobileBanner.displayName = 'DSMobileBanner';\nconst DSMobileBannerWithSchema = describe(DSMobileBanner);\nDSMobileBannerWithSchema.propTypes = propTypes;\n\nexport { DSMobileBanner, DSMobileBannerWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAAoE;AACpE,sBAAuB;AACvB,0BAAyB;AACzB,mBAAsB;AACtB,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;AAAA,oDAAC;AAAA,UAAoB,eAAY;AAAA,UAAyB,6BAAM;AAAA,SAAM;AAAA,QACtE,6CAAC;AAAA,UAAc;AAAA,UACb;AAAA,wDAAC;AAAA,cAAa;AAAA,aAAM;AAAA,YACpB,6CAAC;AAAA,cACC;AAAA,4DAAC;AAAA,kBAAoB;AAAA,iBAAK;AAAA,gBACzB,mBACC,4CAAC;AAAA,kBAAiB,MAAM;AAAA,kBAAgB,eAAY;AAAA,kBAAwB,SAAS;AAAA,kBAClF;AAAA,iBACH;AAAA;AAAA,aAEJ;AAAA;AAAA,SACF;AAAA,QACC,mBACC,4CAAC;AAAA,UACC,sDAAC;AAAA,YACC,eAAY;AAAA,YACZ,YAAW;AAAA,YACX,SAAS;AAAA,YACT,cAAW;AAAA,YACX,UAAU;AAAA,YACV,MAAK;AAAA,YAEL,sDAAC;AAAA,cAAO,OAAM;AAAA,cAAO,QAAO;AAAA,aAAO;AAAA,WACrC;AAAA,SACF;AAAA;AAAA,KAEJ;AAAA,GACF;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,+BAA2B,8BAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,24 +22,23 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
-
var
|
|
26
|
-
__export(
|
|
27
|
-
|
|
25
|
+
var useMobileBanner_exports = {};
|
|
26
|
+
__export(useMobileBanner_exports, {
|
|
27
|
+
useDSMobileBanner: () => useDSMobileBanner
|
|
28
28
|
});
|
|
29
|
-
module.exports = __toCommonJS(
|
|
29
|
+
module.exports = __toCommonJS(useMobileBanner_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
focusOnOpen: false
|
|
31
|
+
var import_react = __toESM(require("react"));
|
|
32
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
33
|
+
var import_propTypes = require("../propTypes");
|
|
34
|
+
const useDSMobileBanner = (props) => {
|
|
35
|
+
(0, import_ds_utilities.useValidateTypescriptPropTypes)(props, import_propTypes.propTypes);
|
|
36
|
+
const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_propTypes.defaultProps);
|
|
37
|
+
const globalAttributes = (0, import_ds_utilities.useGetGlobalAttributes)(propsWithDefault);
|
|
38
|
+
const xstyledProps = (0, import_ds_utilities.useGetXstyledProps)(propsWithDefault);
|
|
39
|
+
return import_react.default.useMemo(
|
|
40
|
+
() => ({ globalAttributes, xstyledProps, propsWithDefault }),
|
|
41
|
+
[globalAttributes, xstyledProps, propsWithDefault]
|
|
42
|
+
);
|
|
44
43
|
};
|
|
45
|
-
//# sourceMappingURL=
|
|
44
|
+
//# sourceMappingURL=useMobileBanner.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/MobileBanner/config/useMobileBanner.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n GlobalAttributesT,\n XstyledProps,\n} from '@elliemae/ds-utilities';\n\nimport { propTypes, defaultProps, type DSMobileBannerT } from '../propTypes';\n\ninterface UseMobileBannerT {\n propsWithDefault: DSMobileBannerT.InternalProps;\n globalAttributes: GlobalAttributesT;\n xstyledProps: XstyledProps;\n}\n\nexport const useDSMobileBanner = (props: DSMobileBannerT.Props): UseMobileBannerT => {\n useValidateTypescriptPropTypes(props, propTypes);\n const propsWithDefault = useMemoMergePropsWithDefault<MobileBannerPropsT>(props, defaultProps);\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n return React.useMemo(\n () => ({ globalAttributes, xstyledProps, propsWithDefault }),\n [globalAttributes, xstyledProps, propsWithDefault],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,0BAOO;AAEP,uBAA8D;AAQvD,MAAM,oBAAoB,CAAC,UAAmD;AACnF,0DAA+B,OAAO,0BAAS;AAC/C,QAAM,uBAAmB,kDAAiD,OAAO,6BAAY;AAC7F,QAAM,uBAAmB,4CAAuB,gBAAgB;AAEhE,QAAM,mBAAe,wCAAmB,gBAAgB;AACxD,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO,EAAE,kBAAkB,cAAc,iBAAiB;AAAA,IAC1D,CAAC,kBAAkB,cAAc,gBAAgB;AAAA,EACnD;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -24,24 +24,41 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
25
|
var propTypes_exports = {};
|
|
26
26
|
__export(propTypes_exports, {
|
|
27
|
+
defaultProps: () => defaultProps,
|
|
27
28
|
propTypes: () => propTypes
|
|
28
29
|
});
|
|
29
30
|
module.exports = __toCommonJS(propTypes_exports);
|
|
30
31
|
var React = __toESM(require("react"));
|
|
31
32
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
33
|
+
var import_bannerTypes = require("./utils/bannerTypes");
|
|
34
|
+
const defaultProps = {
|
|
35
|
+
type: import_bannerTypes.MOBILE_BANNER_TYPES.SUCCESS,
|
|
36
|
+
isOpen: false,
|
|
37
|
+
closeButtonOnClick: () => null,
|
|
38
|
+
actionLinkLabel: null,
|
|
39
|
+
actionLinkHref: null,
|
|
40
|
+
actionLinkOnClick: () => null,
|
|
41
|
+
label: "",
|
|
42
|
+
body: "",
|
|
43
|
+
showCloseButton: true,
|
|
44
|
+
containerProps: {},
|
|
45
|
+
focusOnOpen: false
|
|
46
|
+
};
|
|
32
47
|
const propTypes = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
...import_ds_utilities.globalAttributesPropTypes,
|
|
49
|
+
...import_ds_utilities.xstyledPropTypes,
|
|
50
|
+
type: import_ds_utilities.PropTypes.oneOf(["info", "success", "warning", "error"]).description("Type of banner").defaultValue(defaultProps.type),
|
|
51
|
+
isOpen: import_ds_utilities.PropTypes.bool.description("Whether the banner is open or not").defaultValue(defaultProps.isOpen),
|
|
52
|
+
closeButtonOnClick: import_ds_utilities.PropTypes.func.description("OnClick function used in the close button").defaultValue(defaultProps.closeButtonOnClick),
|
|
53
|
+
actionLinkLabel: import_ds_utilities.PropTypes.string.description("Label used in the the action link").defaultValue(defaultProps.actionLinkLabel),
|
|
54
|
+
actionLinkHref: import_ds_utilities.PropTypes.string.description("Href used in the the action link").defaultValue(defaultProps.actionLinkLabel),
|
|
55
|
+
actionLinkOnClick: import_ds_utilities.PropTypes.func.description("OnClick function used in the action link").defaultValue(defaultProps.actionLinkOnClick),
|
|
56
|
+
label: import_ds_utilities.PropTypes.string.description("Label text for the banner").defaultValue(defaultProps.lavel),
|
|
57
|
+
body: import_ds_utilities.PropTypes.string.description("Body text for the banner").defaultValue(defaultProps.body),
|
|
58
|
+
showCloseButton: import_ds_utilities.PropTypes.bool.description("Whether the close button should be visible or not").defaultValue(defaultProps.showCloseButton),
|
|
59
|
+
containerProps: import_ds_utilities.PropTypes.shape({}).description("Set of properties attached to the banner container").defaultValue(defaultProps.containerProps),
|
|
43
60
|
focusOnOpen: import_ds_utilities.PropTypes.bool.description(
|
|
44
61
|
"Whether the banner should get focus when its openedWhether the banner should get focus when it's opened"
|
|
45
|
-
)
|
|
62
|
+
).defaultValue(defaultProps.focusOnOpen)
|
|
46
63
|
};
|
|
47
64
|
//# sourceMappingURL=propTypes.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/MobileBanner/propTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const propTypes = {\n type: PropTypes.oneOf(['info', 'success', 'warning', 'error']).description('Type of banner'),\n isOpen: PropTypes.bool.description('Whether the banner is open or not'),\n closeButtonOnClick: PropTypes.func.description('OnClick function used in the close button'),\n actionLinkLabel: PropTypes.string.description('Label used in the the action link'),\n actionLinkHref: PropTypes.string.description('Href used in the the action link'),\n actionLinkOnClick: PropTypes.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\nimport { MOBILE_BANNER_TYPES } from './utils/bannerTypes';\n\ntype MobileBannerTypesT = typeof MOBILE_BANNER_TYPES[keyof typeof MOBILE_BANNER_TYPES];\n\nexport const defaultProps = {\n type: MOBILE_BANNER_TYPES.SUCCESS,\n isOpen: false,\n closeButtonOnClick: () => null,\n actionLinkLabel: null,\n actionLinkHref: null,\n actionLinkOnClick: () => null,\n label: '',\n body: '',\n showCloseButton: true,\n containerProps: {},\n focusOnOpen: false,\n};\n\nexport declare namespace DSMobileBannerT {\n export interface DefaultProps {\n type: MobileBannerTypesT;\n isOpen: boolean;\n closeButtonOnClick: () => void | null;\n actionLinkLabel: string;\n actionLinkHref: string;\n actionLinkOnClick: () => void | null;\n label: string;\n body: string;\n showCloseButton?: boolean;\n containerProps: Record<string, unknown>;\n focusOnOpen?: boolean;\n }\n\n export interface PropsOptional {}\n\n export interface PropsRequired {}\n\n export interface Props extends PropsOptional, PropsRequired, DefaultProps {}\n export interface InternalProps extends PropsOptional, PropsRequired, Required<DefaultProps> {}\n}\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf(['info', 'success', 'warning', 'error']).description('Type of banner').defaultValue(defaultProps.type),\n isOpen: PropTypes.bool.description('Whether the banner is open or not').defaultValue(defaultProps.isOpen),\n closeButtonOnClick: PropTypes.func.description('OnClick function used in the close button').defaultValue(defaultProps.closeButtonOnClick),\n actionLinkLabel: PropTypes.string.description('Label used in the the action link').defaultValue(defaultProps.actionLinkLabel),\n actionLinkHref: PropTypes.string.description('Href used in the the action link').defaultValue(defaultProps.actionLinkLabel),\n actionLinkOnClick: PropTypes.func.description('OnClick function used in the action link').defaultValue(defaultProps.actionLinkOnClick),\n label: PropTypes.string.description('Label text for the banner').defaultValue(defaultProps.lavel),\n body: PropTypes.string.description('Body text for the banner').defaultValue(defaultProps.body),\n showCloseButton: PropTypes.bool.description('Whether the close button should be visible or not').defaultValue(defaultProps.showCloseButton),\n containerProps: PropTypes.shape({}).description('Set of properties attached to the banner container').defaultValue(defaultProps.containerProps),\n focusOnOpen: PropTypes.bool.description(\n \"Whether the banner should get focus when its openedWhether the banner should get focus when it's opened\",\n ).defaultValue(defaultProps.focusOnOpen),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAuE;AACvE,yBAAoC;AAI7B,MAAM,eAAe;AAAA,EAC1B,MAAM,uCAAoB;AAAA,EAC1B,QAAQ;AA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": ["../../../src/MobileBanner/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { toMobile } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,IAAAA,oBAAyB;AACzB,uBAA2B;
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { toMobile } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport { handleAnimation, handleBorderColor } from './utils/styleHelpers';\nimport { MOBILE_BANNER_TYPES } from './utils/bannerTypes';\n\ntype MobileBannerTypesT = typeof MOBILE_BANNER_TYPES[keyof typeof MOBILE_BANNER_TYPES];\n\ninterface StyledBannerContainerT {\n type: MobileBannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n height: number;\n}\n\ninterface StyledInnerContainerT {\n type: MobileBannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n ref: React.MutableRefObject<HTMLDivElement>;\n}\n\ninterface StyledContentT {\n showCloseButton: boolean;\n}\nexport const StyledInnerContainer = styled.div<StyledInnerContainerT>`\n display: flex;\n min-height: 60px;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n border-bottom: 4px solid ${({ type, theme }) => handleBorderColor(type, theme)};\n transform: translateY(${({ isOpen }) => (isOpen ? '0' : '-100%')});\n ${({ isAnimating, isOpen }) => handleAnimation(isAnimating, isOpen)};\n padding: 8px 8px 8px 16px;\n`;\n\nexport const StyledTextContent = styled.div`\n width: 100%;\n`;\n\nexport const StyledTitle = styled.div`\n color: ${({ theme }) => theme.colors.neutral[700]};\n font-size: ${({ theme }) => toMobile(theme.fontSizes.title[700])};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n margin-bottom: ${({ theme }) => theme.space.xxxs};\n @media not all and (min-resolution: 0.001dpcm) {\n @media {\n -webkit-font-smoothing: subpixel-antialiased; // fix safari bold render\n -webkit-text-stroke: 0.4px ${({ theme }) => theme.colors.neutral[700]}; // fix safari bold render\n }\n }\n @media screen and (min--moz-device-pixel-ratio: 0) {\n -webkit-font-smoothing: subpixel-antialiased; // fix safari bold render\n -webkit-text-stroke: 0.4px ${({ theme }) => theme.colors.neutral[700]}; // fix safari bold render\n }\n`;\n\nexport const StyledSubTitle = styled.div`\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n\n font-size: ${({ theme }) => toMobile(theme.fontSizes.title[600])};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n\n & > * {\n margin-top: 4px;\n }\n`;\n\nexport const StyledIconContainer = styled.div`\n margin-right: ${({ theme }) => theme.space.xxs};\n`;\n\nexport const StyledContent = styled.div<StyledContentT>`\n width: 100%;\n display: flex;\n flex-direction: column;\n margin-right: ${({ showCloseButton }) => (!showCloseButton ? '28px' : '0')};\n`;\n\nexport const StyledCloseButtonContainer = styled.div`\n display: flex;\n align-items: flex-start;\n`;\n\nexport const StyledSubTitleText = styled.span`\n margin-right: 16px;\n line-height: 1.1;\n`;\n\nexport const StyledCloseButton = styled(DSButtonV2)`\n position: relative;\n &:focus {\n &:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 2px;\n pointer-events: none;\n }\n }\n`;\n\nexport const StyledActionLink = styled.a`\n text-decoration: none;\n line-height: 1.1;\n font-size: ${({ theme }) => toMobile(theme.fontSizes.title[600])};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: ${({ theme }) => theme.colors.brand[600]};\n`;\n\nexport const StyledBannerContainer = styled.div<StyledBannerContainerT>`\n overflow: hidden;\n height: ${({ isOpen }) => (isOpen ? 'auto' : '0px')};\n ${({ isAnimating, isOpen, height }) => handleAnimation(isAnimating, isOpen, height)};\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,IAAAA,oBAAyB;AACzB,uBAA2B;AAC3B,0BAAmD;AAsB5C,MAAM,uBAAuB,wBAAO;AAAA;AAAA;AAAA;AAAA,sBAIrB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA,6BAC7B,CAAC,EAAE,MAAM,MAAM,UAAM,uCAAkB,MAAM,KAAK;AAAA,0BACrD,CAAC,EAAE,OAAO,MAAO,SAAS,MAAM;AAAA,IACtD,CAAC,EAAE,aAAa,OAAO,UAAM,qCAAgB,aAAa,MAAM;AAAA;AAAA;AAI7D,MAAM,oBAAoB,wBAAO;AAAA;AAAA;AAIjC,MAAM,cAAc,wBAAO;AAAA,WACvB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA,eAChC,CAAC,EAAE,MAAM,UAAM,4BAAS,MAAM,UAAU,MAAM,IAAI;AAAA,iBAChD,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,mBAC/B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA,mCAIX,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,iCAKtC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI9D,MAAM,iBAAiB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA,eAKtB,CAAC,EAAE,MAAM,UAAM,4BAAS,MAAM,UAAU,MAAM,IAAI;AAAA,iBAChD,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAO3C,MAAM,sBAAsB,wBAAO;AAAA,kBACxB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAGtC,MAAM,gBAAgB,wBAAO;AAAA;AAAA;AAAA;AAAA,kBAIlB,CAAC,EAAE,gBAAgB,MAAO,CAAC,kBAAkB,SAAS;AAAA;AAGjE,MAAM,6BAA6B,wBAAO;AAAA;AAAA;AAAA;AAK1C,MAAM,qBAAqB,wBAAO;AAAA;AAAA;AAAA;AAKlC,MAAM,wBAAoB,yBAAO,2BAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAWxB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAOrD,MAAM,mBAAmB,wBAAO;AAAA;AAAA;AAAA,eAGxB,CAAC,EAAE,MAAM,UAAM,4BAAS,MAAM,UAAU,MAAM,IAAI;AAAA,iBAChD,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,WACvC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA;AAGtC,MAAM,wBAAwB,wBAAO;AAAA;AAAA,YAEhC,CAAC,EAAE,OAAO,MAAO,SAAS,SAAS;AAAA,IAC3C,CAAC,EAAE,aAAa,QAAQ,OAAO,UAAM,qCAAgB,aAAa,QAAQ,MAAM;AAAA;",
|
|
6
6
|
"names": ["import_ds_system"]
|
|
7
7
|
}
|
|
@@ -5,7 +5,6 @@ import { CloseX } from "@elliemae/ds-icons";
|
|
|
5
5
|
import { describe } from "@elliemae/ds-utilities";
|
|
6
6
|
import { icons } from "./utils/icons";
|
|
7
7
|
import { propTypes } from "./propTypes";
|
|
8
|
-
import { defaultProps } from "./defaultProps";
|
|
9
8
|
import {
|
|
10
9
|
StyledActionLink,
|
|
11
10
|
StyledCloseButton,
|
|
@@ -18,19 +17,22 @@ import {
|
|
|
18
17
|
StyledSubTitleText,
|
|
19
18
|
StyledCloseButtonContainer
|
|
20
19
|
} from "./styles";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
import { useDSMobileBanner } from "./config/useMobileBanner";
|
|
21
|
+
const DSMobileBanner = (props) => {
|
|
22
|
+
const { globalAttributes, xstyledProps, propsWithDefault } = useDSMobileBanner(props);
|
|
23
|
+
const {
|
|
24
|
+
type,
|
|
25
|
+
isOpen,
|
|
26
|
+
closeButtonOnClick,
|
|
27
|
+
label,
|
|
28
|
+
body,
|
|
29
|
+
actionLinkLabel,
|
|
30
|
+
actionLinkHref,
|
|
31
|
+
actionLinkOnClick,
|
|
32
|
+
showCloseButton,
|
|
33
|
+
containerProps,
|
|
34
|
+
focusOnOpen
|
|
35
|
+
} = propsWithDefault;
|
|
34
36
|
const innerContainerRef = useRef(null);
|
|
35
37
|
const closeRef = useRef(null);
|
|
36
38
|
const [current, setCurrent] = useState(isOpen);
|
|
@@ -63,6 +65,8 @@ const DSMobileBanner = ({
|
|
|
63
65
|
...containerProps,
|
|
64
66
|
"data-testid": "ds-mobile-banner-container",
|
|
65
67
|
role: "alert",
|
|
68
|
+
...globalAttributes,
|
|
69
|
+
...xstyledProps,
|
|
66
70
|
children: /* @__PURE__ */ jsxs(StyledInnerContainer, {
|
|
67
71
|
type,
|
|
68
72
|
isOpen,
|
|
@@ -112,7 +116,6 @@ const DSMobileBanner = ({
|
|
|
112
116
|
})
|
|
113
117
|
});
|
|
114
118
|
};
|
|
115
|
-
DSMobileBanner.defaultProps = defaultProps;
|
|
116
119
|
DSMobileBanner.propTypes = propTypes;
|
|
117
120
|
DSMobileBanner.displayName = "DSMobileBanner";
|
|
118
121
|
const DSMobileBannerWithSchema = describe(DSMobileBanner);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileBanner/MobileBanner.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useLayoutEffect, useEffect, useRef, useState } from 'react';\nimport { CloseX } from '@elliemae/ds-icons';\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAgB,iBAAiB,WAAW,QAAQ,gBAAgB;AACpE,SAAS,cAAc;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useLayoutEffect, useEffect, useRef, useState } from 'react';\nimport { CloseX } from '@elliemae/ds-icons';\nimport { describe } from '@elliemae/ds-utilities';\nimport { icons } from './utils/icons';\nimport { DSMobileBannerT, propTypes } from './propTypes';\nimport {\n StyledActionLink,\n StyledCloseButton,\n StyledInnerContainer,\n StyledBannerContainer,\n StyledContent,\n StyledIconContainer,\n StyledSubTitle,\n StyledTitle,\n StyledSubTitleText,\n StyledCloseButtonContainer,\n} from './styles';\nimport { useDSMobileBanner } from './config/useMobileBanner';\n\nconst DSMobileBanner = (props: DSMobileBannerT.Props) => {\n const { globalAttributes, xstyledProps, propsWithDefault } = useDSMobileBanner(props);\n const {\n type,\n isOpen,\n closeButtonOnClick,\n label,\n body,\n actionLinkLabel,\n actionLinkHref,\n actionLinkOnClick,\n showCloseButton,\n containerProps,\n focusOnOpen,\n } = propsWithDefault;\n\n const innerContainerRef = useRef<HTMLDivElement | null>(null);\n const closeRef = useRef<HTMLDivElement | null>(null);\n const [current, setCurrent] = useState<boolean>(isOpen);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n const [height, setHeight] = useState<number>(0);\n\n useEffect(() => {\n if (innerContainerRef.current) {\n setHeight(innerContainerRef.current.offsetHeight);\n }\n }, [isAnimating, isOpen]);\n\n useEffect(() => {\n if (focusOnOpen && closeRef.current && isOpen) {\n closeRef.current?.focus?.();\n }\n }, [focusOnOpen, isOpen]);\n\n useLayoutEffect(() => {\n if (isOpen !== current || isOpen) setIsAnimating(true);\n else setIsAnimating(false);\n }, [isOpen, current]);\n\n if (!isAnimating && !isOpen) return null;\n\n return (\n <StyledBannerContainer\n type={type}\n isOpen={isOpen}\n isAnimating={isAnimating}\n onAnimationEnd={() => setCurrent(isOpen)}\n height={height}\n {...containerProps}\n data-testid=\"ds-mobile-banner-container\"\n role=\"alert\"\n {...globalAttributes}\n {...xstyledProps}\n >\n <StyledInnerContainer type={type} isOpen={isOpen} ref={innerContainerRef} isAnimating={isAnimating}>\n <StyledIconContainer data-testid=\"ds-mobile-banner-icon\">{icons[type]}</StyledIconContainer>\n <StyledContent showCloseButton={showCloseButton}>\n <StyledTitle>{label}</StyledTitle>\n <StyledSubTitle>\n <StyledSubTitleText>{body}</StyledSubTitleText>\n {actionLinkLabel && (\n <StyledActionLink href={actionLinkHref} data-testid=\"ds-mobile-banner-link\" onClick={actionLinkOnClick}>\n {actionLinkLabel}\n </StyledActionLink>\n )}\n </StyledSubTitle>\n </StyledContent>\n {showCloseButton && (\n <StyledCloseButtonContainer>\n <StyledCloseButton\n data-testid=\"ds-mobile-banner-close-button\"\n buttonType=\"icon\"\n onClick={closeButtonOnClick}\n aria-label=\"Close Banner\"\n innerRef={closeRef}\n size=\"s\"\n >\n <CloseX width=\"12px\" height=\"12px\" />\n </StyledCloseButton>\n </StyledCloseButtonContainer>\n )}\n </StyledInnerContainer>\n </StyledBannerContainer>\n );\n};\n\nDSMobileBanner.propTypes = propTypes;\nDSMobileBanner.displayName = 'DSMobileBanner';\nconst DSMobileBannerWithSchema = describe(DSMobileBanner);\nDSMobileBannerWithSchema.propTypes = propTypes;\n\nexport { DSMobileBanner, DSMobileBannerWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAgB,iBAAiB,WAAW,QAAQ,gBAAgB;AACpE,SAAS,cAAc;AACv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AA,IACJ,eAAY;AAAA,IACZ,MAAK;AAAA,IACJ,GAAG;AAAA,IACH,GAAG;AAAA,IAEJ,+BAAC;AAAA,MAAqB;AAAA,MAAY;AAAA,MAAgB,KAAK;AAAA,MAAmB;AAAA,MACxE;AAAA,4BAAC;AAAA,UAAoB,eAAY;AAAA,UAAyB,gBAAM;AAAA,SAAM;AAAA,QACtE,qBAAC;AAAA,UAAc;AAAA,UACb;AAAA,gCAAC;AAAA,cAAa;AAAA,aAAM;AAAA,YACpB,qBAAC;AAAA,cACC;AAAA,oCAAC;AAAA,kBAAoB;AAAA,iBAAK;AAAA,gBACzB,mBACC,oBAAC;AAAA,kBAAiB,MAAM;AAAA,kBAAgB,eAAY;AAAA,kBAAwB,SAAS;AAAA,kBAClF;AAAA,iBACH;AAAA;AAAA,aAEJ;AAAA;AAAA,SACF;AAAA,QACC,mBACC,oBAAC;AAAA,UACC,8BAAC;AAAA,YACC,eAAY;AAAA,YACZ,YAAW;AAAA,YACX,SAAS;AAAA,YACT,cAAW;AAAA,YACX,UAAU;AAAA,YACV,MAAK;AAAA,YAEL,8BAAC;AAAA,cAAO,OAAM;AAAA,cAAO,QAAO;AAAA,aAAO;AAAA,WACrC;AAAA,SACF;AAAA;AAAA,KAEJ;AAAA,GACF;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,2BAA2B,SAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import {
|
|
4
|
+
useGetGlobalAttributes,
|
|
5
|
+
useGetXstyledProps,
|
|
6
|
+
useMemoMergePropsWithDefault,
|
|
7
|
+
useValidateTypescriptPropTypes
|
|
8
|
+
} from "@elliemae/ds-utilities";
|
|
9
|
+
import { propTypes, defaultProps } from "../propTypes";
|
|
10
|
+
const useDSMobileBanner = (props) => {
|
|
11
|
+
useValidateTypescriptPropTypes(props, propTypes);
|
|
12
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
13
|
+
const globalAttributes = useGetGlobalAttributes(propsWithDefault);
|
|
14
|
+
const xstyledProps = useGetXstyledProps(propsWithDefault);
|
|
15
|
+
return React2.useMemo(
|
|
16
|
+
() => ({ globalAttributes, xstyledProps, propsWithDefault }),
|
|
17
|
+
[globalAttributes, xstyledProps, propsWithDefault]
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
useDSMobileBanner
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=useMobileBanner.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/MobileBanner/config/useMobileBanner.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n GlobalAttributesT,\n XstyledProps,\n} from '@elliemae/ds-utilities';\n\nimport { propTypes, defaultProps, type DSMobileBannerT } from '../propTypes';\n\ninterface UseMobileBannerT {\n propsWithDefault: DSMobileBannerT.InternalProps;\n globalAttributes: GlobalAttributesT;\n xstyledProps: XstyledProps;\n}\n\nexport const useDSMobileBanner = (props: DSMobileBannerT.Props): UseMobileBannerT => {\n useValidateTypescriptPropTypes(props, propTypes);\n const propsWithDefault = useMemoMergePropsWithDefault<MobileBannerPropsT>(props, defaultProps);\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n return React.useMemo(\n () => ({ globalAttributes, xstyledProps, propsWithDefault }),\n [globalAttributes, xstyledProps, propsWithDefault],\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAEP,SAAS,WAAW,oBAA0C;AAQvD,MAAM,oBAAoB,CAAC,UAAmD;AACnF,iCAA+B,OAAO,SAAS;AAC/C,QAAM,mBAAmB,6BAAiD,OAAO,YAAY;AAC7F,QAAM,mBAAmB,uBAAuB,gBAAgB;AAEhE,QAAM,eAAe,mBAAmB,gBAAgB;AACxD,SAAOA,OAAM;AAAA,IACX,OAAO,EAAE,kBAAkB,cAAc,iBAAiB;AAAA,IAC1D,CAAC,kBAAkB,cAAc,gBAAgB;AAAA,EACnD;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -1,21 +1,38 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "@elliemae/ds-utilities";
|
|
2
|
+
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-utilities";
|
|
3
|
+
import { MOBILE_BANNER_TYPES } from "./utils/bannerTypes";
|
|
4
|
+
const defaultProps = {
|
|
5
|
+
type: MOBILE_BANNER_TYPES.SUCCESS,
|
|
6
|
+
isOpen: false,
|
|
7
|
+
closeButtonOnClick: () => null,
|
|
8
|
+
actionLinkLabel: null,
|
|
9
|
+
actionLinkHref: null,
|
|
10
|
+
actionLinkOnClick: () => null,
|
|
11
|
+
label: "",
|
|
12
|
+
body: "",
|
|
13
|
+
showCloseButton: true,
|
|
14
|
+
containerProps: {},
|
|
15
|
+
focusOnOpen: false
|
|
16
|
+
};
|
|
3
17
|
const propTypes = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
...globalAttributesPropTypes,
|
|
19
|
+
...xstyledPropTypes,
|
|
20
|
+
type: PropTypes.oneOf(["info", "success", "warning", "error"]).description("Type of banner").defaultValue(defaultProps.type),
|
|
21
|
+
isOpen: PropTypes.bool.description("Whether the banner is open or not").defaultValue(defaultProps.isOpen),
|
|
22
|
+
closeButtonOnClick: PropTypes.func.description("OnClick function used in the close button").defaultValue(defaultProps.closeButtonOnClick),
|
|
23
|
+
actionLinkLabel: PropTypes.string.description("Label used in the the action link").defaultValue(defaultProps.actionLinkLabel),
|
|
24
|
+
actionLinkHref: PropTypes.string.description("Href used in the the action link").defaultValue(defaultProps.actionLinkLabel),
|
|
25
|
+
actionLinkOnClick: PropTypes.func.description("OnClick function used in the action link").defaultValue(defaultProps.actionLinkOnClick),
|
|
26
|
+
label: PropTypes.string.description("Label text for the banner").defaultValue(defaultProps.lavel),
|
|
27
|
+
body: PropTypes.string.description("Body text for the banner").defaultValue(defaultProps.body),
|
|
28
|
+
showCloseButton: PropTypes.bool.description("Whether the close button should be visible or not").defaultValue(defaultProps.showCloseButton),
|
|
29
|
+
containerProps: PropTypes.shape({}).description("Set of properties attached to the banner container").defaultValue(defaultProps.containerProps),
|
|
14
30
|
focusOnOpen: PropTypes.bool.description(
|
|
15
31
|
"Whether the banner should get focus when its openedWhether the banner should get focus when it's opened"
|
|
16
|
-
)
|
|
32
|
+
).defaultValue(defaultProps.focusOnOpen)
|
|
17
33
|
};
|
|
18
34
|
export {
|
|
35
|
+
defaultProps,
|
|
19
36
|
propTypes
|
|
20
37
|
};
|
|
21
38
|
//# sourceMappingURL=propTypes.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileBanner/propTypes.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const propTypes = {\n type: PropTypes.oneOf(['info', 'success', 'warning', 'error']).description('Type of banner'),\n isOpen: PropTypes.bool.description('Whether the banner is open or not'),\n closeButtonOnClick: PropTypes.func.description('OnClick function used in the close button'),\n actionLinkLabel: PropTypes.string.description('Label used in the the action link'),\n actionLinkHref: PropTypes.string.description('Href used in the the action link'),\n actionLinkOnClick: PropTypes.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\nimport { MOBILE_BANNER_TYPES } from './utils/bannerTypes';\n\ntype MobileBannerTypesT = typeof MOBILE_BANNER_TYPES[keyof typeof MOBILE_BANNER_TYPES];\n\nexport const defaultProps = {\n type: MOBILE_BANNER_TYPES.SUCCESS,\n isOpen: false,\n closeButtonOnClick: () => null,\n actionLinkLabel: null,\n actionLinkHref: null,\n actionLinkOnClick: () => null,\n label: '',\n body: '',\n showCloseButton: true,\n containerProps: {},\n focusOnOpen: false,\n};\n\nexport declare namespace DSMobileBannerT {\n export interface DefaultProps {\n type: MobileBannerTypesT;\n isOpen: boolean;\n closeButtonOnClick: () => void | null;\n actionLinkLabel: string;\n actionLinkHref: string;\n actionLinkOnClick: () => void | null;\n label: string;\n body: string;\n showCloseButton?: boolean;\n containerProps: Record<string, unknown>;\n focusOnOpen?: boolean;\n }\n\n export interface PropsOptional {}\n\n export interface PropsRequired {}\n\n export interface Props extends PropsOptional, PropsRequired, DefaultProps {}\n export interface InternalProps extends PropsOptional, PropsRequired, Required<DefaultProps> {}\n}\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf(['info', 'success', 'warning', 'error']).description('Type of banner').defaultValue(defaultProps.type),\n isOpen: PropTypes.bool.description('Whether the banner is open or not').defaultValue(defaultProps.isOpen),\n closeButtonOnClick: PropTypes.func.description('OnClick function used in the close button').defaultValue(defaultProps.closeButtonOnClick),\n actionLinkLabel: PropTypes.string.description('Label used in the the action link').defaultValue(defaultProps.actionLinkLabel),\n actionLinkHref: PropTypes.string.description('Href used in the the action link').defaultValue(defaultProps.actionLinkLabel),\n actionLinkOnClick: PropTypes.func.description('OnClick function used in the action link').defaultValue(defaultProps.actionLinkOnClick),\n label: PropTypes.string.description('Label text for the banner').defaultValue(defaultProps.lavel),\n body: PropTypes.string.description('Body text for the banner').defaultValue(defaultProps.body),\n showCloseButton: PropTypes.bool.description('Whether the close button should be visible or not').defaultValue(defaultProps.showCloseButton),\n containerProps: PropTypes.shape({}).description('Set of properties attached to the banner container').defaultValue(defaultProps.containerProps),\n focusOnOpen: PropTypes.bool.description(\n \"Whether the banner should get focus when its openedWhether the banner should get focus when it's opened\",\n ).defaultValue(defaultProps.focusOnOpen),\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW,2BAA2B,wBAAwB;AACvE,SAAS,2BAA2B;AAI7B,MAAM,eAAe;AAAA,EAC1B,MAAM,oBAAoB;AAAA,EAC1B,QAAQ;AAAA,EACR,oBAAoB,MAAM;AAAA,EAC1B,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,mBAAmB,MAAM;AAAA,EACzB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,gBAAgB,CAAC;AAAA,EACjB,aAAa;AACf;AAyBO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,MAAM,CAAC,QAAQ,WAAW,WAAW,OAAO,CAAC,EAAE,YAAY,gBAAgB,EAAE,aAAa,aAAa,IAAI;AAAA,EAC3H,QAAQ,UAAU,KAAK,YAAY,mCAAmC,EAAE,aAAa,aAAa,MAAM;AAAA,EACxG,oBAAoB,UAAU,KAAK,YAAY,2CAA2C,EAAE,aAAa,aAAa,kBAAkB;AAAA,EACxI,iBAAiB,UAAU,OAAO,YAAY,mCAAmC,EAAE,aAAa,aAAa,eAAe;AAAA,EAC5H,gBAAgB,UAAU,OAAO,YAAY,kCAAkC,EAAE,aAAa,aAAa,eAAe;AAAA,EAC1H,mBAAmB,UAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,aAAa,iBAAiB;AAAA,EACrI,OAAO,UAAU,OAAO,YAAY,2BAA2B,EAAE,aAAa,aAAa,KAAK;AAAA,EAChG,MAAM,UAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,aAAa,IAAI;AAAA,EAC7F,iBAAiB,UAAU,KAAK,YAAY,mDAAmD,EAAE,aAAa,aAAa,eAAe;AAAA,EAC1I,gBAAgB,UAAU,MAAM,CAAC,CAAC,EAAE,YAAY,oDAAoD,EAAE,aAAa,aAAa,cAAc;AAAA,EAC9I,aAAa,UAAU,KAAK;AAAA,IAC1B;AAAA,EACF,EAAE,aAAa,aAAa,WAAW;AACzC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileBanner/styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { toMobile } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { toMobile } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport { handleAnimation, handleBorderColor } from './utils/styleHelpers';\nimport { MOBILE_BANNER_TYPES } from './utils/bannerTypes';\n\ntype MobileBannerTypesT = typeof MOBILE_BANNER_TYPES[keyof typeof MOBILE_BANNER_TYPES];\n\ninterface StyledBannerContainerT {\n type: MobileBannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n height: number;\n}\n\ninterface StyledInnerContainerT {\n type: MobileBannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n ref: React.MutableRefObject<HTMLDivElement>;\n}\n\ninterface StyledContentT {\n showCloseButton: boolean;\n}\nexport const StyledInnerContainer = styled.div<StyledInnerContainerT>`\n display: flex;\n min-height: 60px;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n border-bottom: 4px solid ${({ type, theme }) => handleBorderColor(type, theme)};\n transform: translateY(${({ isOpen }) => (isOpen ? '0' : '-100%')});\n ${({ isAnimating, isOpen }) => handleAnimation(isAnimating, isOpen)};\n padding: 8px 8px 8px 16px;\n`;\n\nexport const StyledTextContent = styled.div`\n width: 100%;\n`;\n\nexport const StyledTitle = styled.div`\n color: ${({ theme }) => theme.colors.neutral[700]};\n font-size: ${({ theme }) => toMobile(theme.fontSizes.title[700])};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n margin-bottom: ${({ theme }) => theme.space.xxxs};\n @media not all and (min-resolution: 0.001dpcm) {\n @media {\n -webkit-font-smoothing: subpixel-antialiased; // fix safari bold render\n -webkit-text-stroke: 0.4px ${({ theme }) => theme.colors.neutral[700]}; // fix safari bold render\n }\n }\n @media screen and (min--moz-device-pixel-ratio: 0) {\n -webkit-font-smoothing: subpixel-antialiased; // fix safari bold render\n -webkit-text-stroke: 0.4px ${({ theme }) => theme.colors.neutral[700]}; // fix safari bold render\n }\n`;\n\nexport const StyledSubTitle = styled.div`\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n\n font-size: ${({ theme }) => toMobile(theme.fontSizes.title[600])};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n\n & > * {\n margin-top: 4px;\n }\n`;\n\nexport const StyledIconContainer = styled.div`\n margin-right: ${({ theme }) => theme.space.xxs};\n`;\n\nexport const StyledContent = styled.div<StyledContentT>`\n width: 100%;\n display: flex;\n flex-direction: column;\n margin-right: ${({ showCloseButton }) => (!showCloseButton ? '28px' : '0')};\n`;\n\nexport const StyledCloseButtonContainer = styled.div`\n display: flex;\n align-items: flex-start;\n`;\n\nexport const StyledSubTitleText = styled.span`\n margin-right: 16px;\n line-height: 1.1;\n`;\n\nexport const StyledCloseButton = styled(DSButtonV2)`\n position: relative;\n &:focus {\n &:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 2px;\n pointer-events: none;\n }\n }\n`;\n\nexport const StyledActionLink = styled.a`\n text-decoration: none;\n line-height: 1.1;\n font-size: ${({ theme }) => toMobile(theme.fontSizes.title[600])};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: ${({ theme }) => theme.colors.brand[600]};\n`;\n\nexport const StyledBannerContainer = styled.div<StyledBannerContainerT>`\n overflow: hidden;\n height: ${({ isOpen }) => (isOpen ? 'auto' : '0px')};\n ${({ isAnimating, isOpen, height }) => handleAnimation(isAnimating, isOpen, height)};\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB,yBAAyB;AAsB5C,MAAM,uBAAuB,OAAO;AAAA;AAAA;AAAA;AAAA,sBAIrB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA,6BAC7B,CAAC,EAAE,MAAM,MAAM,MAAM,kBAAkB,MAAM,KAAK;AAAA,0BACrD,CAAC,EAAE,OAAO,MAAO,SAAS,MAAM;AAAA,IACtD,CAAC,EAAE,aAAa,OAAO,MAAM,gBAAgB,aAAa,MAAM;AAAA;AAAA;AAI7D,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAIjC,MAAM,cAAc,OAAO;AAAA,WACvB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA,eAChC,CAAC,EAAE,MAAM,MAAM,SAAS,MAAM,UAAU,MAAM,IAAI;AAAA,iBAChD,CAAC,EAAE,MAAM,MA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QAAQ,OAAO,MAAM,gBAAgB,aAAa,QAAQ,MAAM;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-mobile",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - System",
|
|
6
6
|
"files": [
|
|
@@ -435,21 +435,21 @@
|
|
|
435
435
|
"typeSafety": false
|
|
436
436
|
},
|
|
437
437
|
"dependencies": {
|
|
438
|
-
"@elliemae/ds-accordion": "3.
|
|
439
|
-
"@elliemae/ds-backdrop": "3.
|
|
440
|
-
"@elliemae/ds-button": "3.
|
|
441
|
-
"@elliemae/ds-circular-progress-indicator": "3.
|
|
442
|
-
"@elliemae/ds-form": "3.
|
|
443
|
-
"@elliemae/ds-form-checkbox": "3.
|
|
444
|
-
"@elliemae/ds-grid": "3.
|
|
445
|
-
"@elliemae/ds-icon": "3.
|
|
446
|
-
"@elliemae/ds-icons": "3.
|
|
447
|
-
"@elliemae/ds-indeterminate-progress-indicator": "3.
|
|
448
|
-
"@elliemae/ds-shared": "3.
|
|
449
|
-
"@elliemae/ds-system": "3.
|
|
450
|
-
"@elliemae/ds-tabs": "3.
|
|
451
|
-
"@elliemae/ds-truncated-expandable-text": "3.
|
|
452
|
-
"@elliemae/ds-utilities": "3.
|
|
438
|
+
"@elliemae/ds-accordion": "3.6.0-next.1",
|
|
439
|
+
"@elliemae/ds-backdrop": "3.6.0-next.1",
|
|
440
|
+
"@elliemae/ds-button": "3.6.0-next.1",
|
|
441
|
+
"@elliemae/ds-circular-progress-indicator": "3.6.0-next.1",
|
|
442
|
+
"@elliemae/ds-form": "3.6.0-next.1",
|
|
443
|
+
"@elliemae/ds-form-checkbox": "3.6.0-next.1",
|
|
444
|
+
"@elliemae/ds-grid": "3.6.0-next.1",
|
|
445
|
+
"@elliemae/ds-icon": "3.6.0-next.1",
|
|
446
|
+
"@elliemae/ds-icons": "3.6.0-next.1",
|
|
447
|
+
"@elliemae/ds-indeterminate-progress-indicator": "3.6.0-next.1",
|
|
448
|
+
"@elliemae/ds-shared": "3.6.0-next.1",
|
|
449
|
+
"@elliemae/ds-system": "3.6.0-next.1",
|
|
450
|
+
"@elliemae/ds-tabs": "3.6.0-next.1",
|
|
451
|
+
"@elliemae/ds-truncated-expandable-text": "3.6.0-next.1",
|
|
452
|
+
"@elliemae/ds-utilities": "3.6.0-next.1",
|
|
453
453
|
"polished": "~3.6.7",
|
|
454
454
|
"prop-types": "~15.8.1",
|
|
455
455
|
"react-window": "~1.8.7",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/MobileBanner/defaultProps.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { MOBILE_BANNER_TYPES } from './utils/bannerTypes';\n\nexport const defaultProps = {\n type: MOBILE_BANNER_TYPES.SUCCESS,\n isOpen: false,\n closeButtonOnClick: () => null,\n actionLinkLabel: null,\n actionLinkHref: null,\n actionLinkOnClick: () => null,\n label: '',\n body: '',\n showCloseButton: true,\n containerProps: {},\n focusOnOpen: false,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAoC;AAE7B,MAAM,eAAe;AAAA,EAC1B,MAAM,uCAAoB;AAAA,EAC1B,QAAQ;AAAA,EACR,oBAAoB,MAAM;AAAA,EAC1B,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,mBAAmB,MAAM;AAAA,EACzB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,gBAAgB,CAAC;AAAA,EACjB,aAAa;AACf;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18
|
-
mod
|
|
19
|
-
));
|
|
20
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
var index_d_exports = {};
|
|
22
|
-
module.exports = __toCommonJS(index_d_exports);
|
|
23
|
-
var React = __toESM(require("react"));
|
|
24
|
-
//# sourceMappingURL=index.d.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/MobileBanner/index.d.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { MOBILE_BANNER_TYPES } from './utils/bannerTypes';\n\ntype MobileBannerTypesT = typeof MOBILE_BANNER_TYPES[keyof typeof MOBILE_BANNER_TYPES];\n\nexport interface MobileBannerPropsT {\n type: MobileBannerTypesT;\n isOpen: boolean;\n closeButtonOnClick: () => void | null;\n actionLinkLabel: string;\n actionLinkHref: string;\n actionLinkOnClick: () => void | null;\n label: string;\n body: string;\n showCloseButton?: boolean;\n containerProps: Record<string, unknown>;\n focusOnOpen?: boolean;\n}\n\nexport interface StyledBannerContainerT {\n type: MobileBannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n height: number;\n}\n\nexport interface StyledInnerContainerT {\n type: MobileBannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n ref: React.MutableRefObject<HTMLDivElement>;\n}\n\nexport interface StyledContentT {\n showCloseButton: boolean;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { MOBILE_BANNER_TYPES } from "./utils/bannerTypes";
|
|
3
|
-
const defaultProps = {
|
|
4
|
-
type: MOBILE_BANNER_TYPES.SUCCESS,
|
|
5
|
-
isOpen: false,
|
|
6
|
-
closeButtonOnClick: () => null,
|
|
7
|
-
actionLinkLabel: null,
|
|
8
|
-
actionLinkHref: null,
|
|
9
|
-
actionLinkOnClick: () => null,
|
|
10
|
-
label: "",
|
|
11
|
-
body: "",
|
|
12
|
-
showCloseButton: true,
|
|
13
|
-
containerProps: {},
|
|
14
|
-
focusOnOpen: false
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
defaultProps
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=defaultProps.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileBanner/defaultProps.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { MOBILE_BANNER_TYPES } from './utils/bannerTypes';\n\nexport const defaultProps = {\n type: MOBILE_BANNER_TYPES.SUCCESS,\n isOpen: false,\n closeButtonOnClick: () => null,\n actionLinkLabel: null,\n actionLinkHref: null,\n actionLinkOnClick: () => null,\n label: '',\n body: '',\n showCloseButton: true,\n containerProps: {},\n focusOnOpen: false,\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,2BAA2B;AAE7B,MAAM,eAAe;AAAA,EAC1B,MAAM,oBAAoB;AAAA,EAC1B,QAAQ;AAAA,EACR,oBAAoB,MAAM;AAAA,EAC1B,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,mBAAmB,MAAM;AAAA,EACzB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,gBAAgB,CAAC;AAAA,EACjB,aAAa;AACf;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|