@elliemae/ds-banner 3.0.0-next.63 → 3.0.0-next.66
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/DSBanner.js +49 -44
- package/dist/cjs/DSBanner.js.map +2 -2
- package/dist/cjs/{defaultProps.js → exported-related/DSBannerDatatestid.js} +11 -15
- package/dist/cjs/exported-related/DSBannerDatatestid.js.map +7 -0
- package/dist/cjs/{utils → exported-related}/bannerTypes.js +0 -0
- package/dist/cjs/{utils → exported-related}/bannerTypes.js.map +1 -1
- package/dist/cjs/exported-related/index.js +24 -0
- package/dist/cjs/exported-related/index.js.map +7 -0
- package/dist/cjs/exported-related/theming.js +38 -0
- package/dist/cjs/exported-related/theming.js.map +7 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/react-desc-prop-types.js +77 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/{index.d.js → sharedTypes.js} +3 -3
- package/dist/cjs/sharedTypes.js.map +7 -0
- package/dist/cjs/styles.js +24 -12
- package/dist/cjs/styles.js.map +2 -2
- package/dist/cjs/utils/icons.js.map +2 -2
- package/dist/cjs/utils/styleHelpers.js +6 -5
- package/dist/cjs/utils/styleHelpers.js.map +2 -2
- package/dist/esm/DSBanner.js +49 -44
- package/dist/esm/DSBanner.js.map +2 -2
- package/dist/esm/exported-related/DSBannerDatatestid.js +12 -0
- package/dist/esm/exported-related/DSBannerDatatestid.js.map +7 -0
- package/dist/esm/{utils → exported-related}/bannerTypes.js +0 -0
- package/dist/esm/{utils → exported-related}/bannerTypes.js.map +1 -1
- package/dist/esm/exported-related/index.js +5 -0
- package/dist/esm/exported-related/index.js.map +7 -0
- package/dist/esm/exported-related/theming.js +16 -0
- package/dist/esm/exported-related/theming.js.map +7 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +57 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/sharedTypes.js +2 -0
- package/dist/esm/{index.d.js.map → sharedTypes.js.map} +0 -0
- package/dist/esm/styles.js +25 -13
- package/dist/esm/styles.js.map +2 -2
- package/dist/esm/utils/icons.js.map +2 -2
- package/dist/esm/utils/styleHelpers.js +2 -1
- package/dist/esm/utils/styleHelpers.js.map +2 -2
- package/package.json +2 -1
- package/dist/cjs/defaultProps.js.map +0 -7
- package/dist/cjs/index.d.js.map +0 -7
- package/dist/cjs/propTypes.js +0 -48
- package/dist/cjs/propTypes.js.map +0 -7
- package/dist/esm/defaultProps.js +0 -16
- package/dist/esm/defaultProps.js.map +0 -7
- package/dist/esm/index.d.js +0 -2
- package/dist/esm/propTypes.js +0 -26
- package/dist/esm/propTypes.js.map +0 -7
package/dist/cjs/DSBanner.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
5
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -20,7 +18,18 @@ var __spreadValues = (a, b) => {
|
|
|
20
18
|
}
|
|
21
19
|
return a;
|
|
22
20
|
};
|
|
23
|
-
var
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
24
33
|
var __export = (target, all) => {
|
|
25
34
|
for (var name in all)
|
|
26
35
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -44,36 +53,36 @@ __export(DSBanner_exports, {
|
|
|
44
53
|
module.exports = __toCommonJS(DSBanner_exports);
|
|
45
54
|
var React = __toESM(require("react"));
|
|
46
55
|
var import_react = __toESM(require("react"));
|
|
56
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
47
57
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
48
58
|
var import_react_desc = require("react-desc");
|
|
49
59
|
var import_icons = require("./utils/icons");
|
|
50
|
-
var
|
|
51
|
-
var
|
|
60
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
61
|
+
var import_exported_related = require("./exported-related");
|
|
52
62
|
var import_styles = require("./styles");
|
|
53
|
-
const DSBanner = ({
|
|
54
|
-
|
|
55
|
-
isOpen,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
body,
|
|
59
|
-
actionLink,
|
|
60
|
-
showCloseButton,
|
|
61
|
-
containerProps,
|
|
62
|
-
actionRef
|
|
63
|
-
}) => {
|
|
63
|
+
const DSBanner = (props) => {
|
|
64
|
+
const propsWithDefaults = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
65
|
+
const _a = propsWithDefaults, { type, isOpen, onClose, label, body, actionLink, showCloseButton, containerProps, actionRef } = _a, rest = __objRest(_a, ["type", "isOpen", "onClose", "label", "body", "actionLink", "showCloseButton", "containerProps", "actionRef"]);
|
|
66
|
+
const globalAttrs = (0, import_ds_utilities.useGetGlobalAttributes)(rest);
|
|
67
|
+
const xstyledAttrs = (0, import_ds_utilities.useGetXstyledProps)(rest);
|
|
64
68
|
const innerContainerRef = (0, import_react.useRef)(null);
|
|
65
69
|
const linkRef = (0, import_react.useRef)(null);
|
|
66
70
|
const [current, setCurrent] = (0, import_react.useState)(isOpen);
|
|
67
71
|
const [isAnimating, setIsAnimating] = (0, import_react.useState)(false);
|
|
72
|
+
const [height, setHeight] = (0, import_react.useState)(0);
|
|
68
73
|
const [alertTabIndex, setAlertTabIndex] = (0, import_react.useState)(void 0);
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
(0, import_react.useEffect)(() => {
|
|
75
|
+
if (innerContainerRef.current) {
|
|
76
|
+
setHeight(innerContainerRef.current.offsetHeight);
|
|
77
|
+
}
|
|
78
|
+
}, [isAnimating, isOpen]);
|
|
79
|
+
(0, import_react.useEffect)(() => {
|
|
71
80
|
if (actionRef && actionRef.current) {
|
|
72
81
|
actionRef.current.focusOnWrapper = () => {
|
|
73
82
|
if (innerContainerRef.current) {
|
|
74
83
|
setAlertTabIndex(0);
|
|
75
84
|
setTimeout(() => {
|
|
76
|
-
innerContainerRef.current
|
|
85
|
+
innerContainerRef.current?.focus();
|
|
77
86
|
}, 300);
|
|
78
87
|
}
|
|
79
88
|
};
|
|
@@ -84,12 +93,6 @@ const DSBanner = ({
|
|
|
84
93
|
};
|
|
85
94
|
}
|
|
86
95
|
}, [actionRef]);
|
|
87
|
-
(0, import_react.useLayoutEffect)(() => {
|
|
88
|
-
if (isOpen !== current || isOpen)
|
|
89
|
-
setIsAnimating(true);
|
|
90
|
-
else
|
|
91
|
-
setIsAnimating(false);
|
|
92
|
-
}, [isOpen, current]);
|
|
93
96
|
const handleBlur = (0, import_react.useCallback)(() => {
|
|
94
97
|
setAlertTabIndex(void 0);
|
|
95
98
|
}, []);
|
|
@@ -100,29 +103,34 @@ const DSBanner = ({
|
|
|
100
103
|
linkRef.current.click();
|
|
101
104
|
}
|
|
102
105
|
}, []);
|
|
106
|
+
(0, import_react.useLayoutEffect)(() => {
|
|
107
|
+
if (isOpen !== current || isOpen)
|
|
108
|
+
setIsAnimating(true);
|
|
109
|
+
else
|
|
110
|
+
setIsAnimating(false);
|
|
111
|
+
}, [isOpen, current]);
|
|
103
112
|
if (!isAnimating && !isOpen)
|
|
104
113
|
return null;
|
|
105
|
-
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledBannerContainer,
|
|
114
|
+
return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledBannerContainer, __spreadValues(__spreadValues(__spreadValues({
|
|
106
115
|
type,
|
|
107
116
|
isOpen,
|
|
117
|
+
height,
|
|
108
118
|
isAnimating,
|
|
109
119
|
onAnimationEnd: () => setCurrent(isOpen),
|
|
110
|
-
"data-testid":
|
|
111
|
-
}, containerProps), {
|
|
112
|
-
ownerState
|
|
113
|
-
}), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledInnerContainer, {
|
|
120
|
+
"data-testid": import_exported_related.DSBannerDatatestid.CONTAINER
|
|
121
|
+
}, containerProps), globalAttrs), xstyledAttrs), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledInnerContainer, {
|
|
114
122
|
type,
|
|
115
123
|
isOpen,
|
|
116
124
|
ref: innerContainerRef,
|
|
117
125
|
isAnimating,
|
|
118
|
-
"data-testid":
|
|
126
|
+
"data-testid": import_exported_related.DSBannerDatatestid.INNER_CONTAINER,
|
|
119
127
|
role: "alert",
|
|
120
128
|
tabIndex: alertTabIndex,
|
|
121
129
|
onBlur: handleBlur
|
|
122
130
|
}, /* @__PURE__ */ import_react.default.createElement(import_styles.StyledIconContainer, {
|
|
123
|
-
"data-testid":
|
|
131
|
+
"data-testid": import_exported_related.DSBannerDatatestid.ICON_CONTAINER
|
|
124
132
|
}, import_icons.icons[type]), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledTitle, null, label), /* @__PURE__ */ import_react.default.createElement(import_styles.StyledSubTitle, null, /* @__PURE__ */ import_react.default.createElement("span", null, body), actionLink && /* @__PURE__ */ import_react.default.createElement(import_styles.StyledActionLink, {
|
|
125
|
-
"data-testid":
|
|
133
|
+
"data-testid": import_exported_related.DSBannerDatatestid.ACTION_LINK,
|
|
126
134
|
onClick: actionLink.onClick,
|
|
127
135
|
href: actionLink.href,
|
|
128
136
|
ref: linkRef,
|
|
@@ -130,19 +138,16 @@ const DSBanner = ({
|
|
|
130
138
|
tabIndex: 0,
|
|
131
139
|
isBodyEmpty: body
|
|
132
140
|
}, actionLink.label)), showCloseButton ? /* @__PURE__ */ import_react.default.createElement(import_styles.StyledCloseButton, {
|
|
133
|
-
"data-testid":
|
|
134
|
-
buttonType: "
|
|
141
|
+
"data-testid": import_exported_related.DSBannerDatatestid.CLOSE_BUTTON,
|
|
142
|
+
buttonType: "icon",
|
|
135
143
|
onClick: onClose,
|
|
136
|
-
"aria-label": "Close icon"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}) : /* @__PURE__ */ import_react.default.createElement("span", null)));
|
|
144
|
+
"aria-label": "Close icon"
|
|
145
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ds_icons.CloseX, {
|
|
146
|
+
width: 12,
|
|
147
|
+
height: 12
|
|
148
|
+
})) : /* @__PURE__ */ import_react.default.createElement("span", null)));
|
|
142
149
|
};
|
|
143
|
-
DSBanner.defaultProps = import_defaultProps.defaultProps;
|
|
144
|
-
DSBanner.propTypes = import_propTypes.propTypes;
|
|
145
150
|
const DSBannerWithSchema = (0, import_react_desc.describe)(DSBanner);
|
|
146
|
-
DSBannerWithSchema.propTypes =
|
|
151
|
+
DSBannerWithSchema.propTypes = import_react_desc_prop_types.propTypes;
|
|
147
152
|
var DSBanner_default = DSBanner;
|
|
148
153
|
//# sourceMappingURL=DSBanner.js.map
|
package/dist/cjs/DSBanner.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSBanner.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useLayoutEffect, useRef, useCallback, useState } from 'react';\nimport {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useLayoutEffect, useRef, useCallback, useState, useEffect } from 'react';\nimport { useMemoMergePropsWithDefault, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';\nimport { CloseX } from '@elliemae/ds-icons';\nimport { describe } from 'react-desc';\nimport { icons } from './utils/icons';\nimport { propTypes, defaultProps } from './react-desc-prop-types';\nimport { DSBannerDatatestid } from './exported-related';\nimport {\n StyledActionLink,\n StyledCloseButton,\n StyledInnerContainer,\n StyledBannerContainer,\n StyledIconContainer,\n StyledSubTitle,\n StyledTitle,\n} from './styles';\nimport type { DSBannerT } from './react-desc-prop-types';\n\nconst DSBanner = (props: DSBannerT.Props): JSX.Element | null => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps);\n\n const { type, isOpen, onClose, label, body, actionLink, showCloseButton, containerProps, actionRef, ...rest } =\n propsWithDefaults;\n\n const globalAttrs = useGetGlobalAttributes(rest);\n\n const xstyledAttrs = useGetXstyledProps(rest);\n\n const innerContainerRef = useRef<HTMLDivElement | null>(null);\n const linkRef = useRef<HTMLAnchorElement | null>(null);\n const [current, setCurrent] = useState<boolean>(isOpen);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n const [height, setHeight] = useState<number>(0);\n const [alertTabIndex, setAlertTabIndex] = useState<number | undefined>(undefined);\n\n useEffect(() => {\n if (innerContainerRef.current) {\n setHeight(innerContainerRef.current.offsetHeight);\n }\n }, [isAnimating, isOpen]);\n\n useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusOnWrapper = () => {\n if (innerContainerRef.current) {\n setAlertTabIndex(0);\n setTimeout(() => {\n innerContainerRef.current?.focus();\n }, 300);\n }\n };\n actionRef.current.focusOnLink = () => {\n if (linkRef.current) {\n linkRef.current.focus();\n }\n };\n }\n }, [actionRef]);\n\n const handleBlur = useCallback(() => {\n setAlertTabIndex(undefined);\n }, []);\n\n const handleOnKeyDown = useCallback((e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n if (linkRef.current) linkRef.current.click();\n }\n }, []);\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 height={height}\n isAnimating={isAnimating}\n onAnimationEnd={() => setCurrent(isOpen)}\n data-testid={DSBannerDatatestid.CONTAINER}\n {...containerProps}\n {...globalAttrs}\n {...xstyledAttrs}\n >\n <StyledInnerContainer\n type={type}\n isOpen={isOpen}\n ref={innerContainerRef}\n isAnimating={isAnimating}\n data-testid={DSBannerDatatestid.INNER_CONTAINER}\n role=\"alert\"\n tabIndex={alertTabIndex}\n onBlur={handleBlur}\n >\n <StyledIconContainer data-testid={DSBannerDatatestid.ICON_CONTAINER}>{icons[type]}</StyledIconContainer>\n <StyledTitle>{label}</StyledTitle>\n <StyledSubTitle>\n <span>{body}</span>\n {actionLink && (\n <StyledActionLink\n data-testid={DSBannerDatatestid.ACTION_LINK}\n onClick={actionLink.onClick}\n href={actionLink.href}\n ref={linkRef}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n isBodyEmpty={body}\n >\n {actionLink.label}\n </StyledActionLink>\n )}\n </StyledSubTitle>\n {showCloseButton ? (\n <StyledCloseButton\n data-testid={DSBannerDatatestid.CLOSE_BUTTON}\n buttonType=\"icon\"\n onClick={onClose}\n aria-label=\"Close icon\"\n >\n <CloseX width={12} height={12} />\n </StyledCloseButton>\n ) : (\n <span />\n )}\n </StyledInnerContainer>\n </StyledBannerContainer>\n );\n};\n\nconst DSBannerWithSchema = describe(DSBanner);\nDSBannerWithSchema.propTypes = propTypes;\n\nexport default DSBanner;\nexport { DSBanner, DSBannerWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;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IAAO,OAAO;AAAA,IAAI,QAAQ;AAAA,GAAI,CACjC,IAEA,mDAAC,YAAK,CAEV,CACF;AAEJ;AAEA,MAAM,qBAAqB,gCAAS,QAAQ;AAC5C,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,21 +18,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
23
|
-
|
|
21
|
+
var DSBannerDatatestid_exports = {};
|
|
22
|
+
__export(DSBannerDatatestid_exports, {
|
|
23
|
+
DSBannerDatatestid: () => DSBannerDatatestid
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(DSBannerDatatestid_exports);
|
|
26
26
|
var React = __toESM(require("react"));
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
isOpen: true,
|
|
34
|
-
onClose: () => null,
|
|
35
|
-
showCloseButton: true,
|
|
36
|
-
actionLink: { label: "", onClick: () => null, href: "" }
|
|
27
|
+
const DSBannerDatatestid = {
|
|
28
|
+
CONTAINER: "ds-banner-container",
|
|
29
|
+
INNER_CONTAINER: "ds-banner",
|
|
30
|
+
ICON_CONTAINER: "ds-banner-icon",
|
|
31
|
+
ACTION_LINK: "ds-banner-action-link",
|
|
32
|
+
CLOSE_BUTTON: "ds-banner-close-button"
|
|
37
33
|
};
|
|
38
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=DSBannerDatatestid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/exported-related/DSBannerDatatestid.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const DSBannerDatatestid = {\n CONTAINER: 'ds-banner-container',\n INNER_CONTAINER: 'ds-banner',\n ICON_CONTAINER: 'ds-banner-icon',\n ACTION_LINK: 'ds-banner-action-link',\n CLOSE_BUTTON: 'ds-banner-close-button',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,qBAAqB;AAAA,EAChC,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,cAAc;AAChB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
3
|
+
"sources": ["../../../src/exported-related/bannerTypes.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const BANNER_TYPES = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n DANGER: 'danger',\n} as const;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;",
|
|
6
6
|
"names": []
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from))
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var exported_related_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(exported_related_exports);
|
|
20
|
+
var React = __toESM(require("react"));
|
|
21
|
+
__reExport(exported_related_exports, require("./DSBannerDatatestid"), module.exports);
|
|
22
|
+
__reExport(exported_related_exports, require("./theming"), module.exports);
|
|
23
|
+
__reExport(exported_related_exports, require("./bannerTypes"), module.exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/exported-related/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './DSBannerDatatestid';\nexport * from './theming';\nexport * from './bannerTypes';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAAc,iCAAd;AACA,qCAAc,sBADd;AAEA,qCAAc,0BAFd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var theming_exports = {};
|
|
22
|
+
__export(theming_exports, {
|
|
23
|
+
COMPONENT_NAME: () => COMPONENT_NAME,
|
|
24
|
+
slots: () => slots
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(theming_exports);
|
|
27
|
+
var React = __toESM(require("react"));
|
|
28
|
+
const COMPONENT_NAME = "DS-Banner";
|
|
29
|
+
const slots = {
|
|
30
|
+
CONTAINER: "root",
|
|
31
|
+
INNER_CONTAINER: "inner-container",
|
|
32
|
+
TITLE: "title",
|
|
33
|
+
SUBTITLE: "subtitle",
|
|
34
|
+
ICON_CONTAINER: "icon-container",
|
|
35
|
+
ACTION_LINK: "action-link",
|
|
36
|
+
CLOSE_BUTTON: "close-button"
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=theming.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/exported-related/theming.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const COMPONENT_NAME = 'DS-Banner';\n\nexport const slots = {\n CONTAINER: 'root',\n INNER_CONTAINER: 'inner-container',\n TITLE: 'title',\n SUBTITLE: 'subtitle',\n ICON_CONTAINER: 'icon-container',\n ACTION_LINK: 'action-link',\n CLOSE_BUTTON: 'close-button',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,iBAAiB;AAEvB,MAAM,QAAQ;AAAA,EACnB,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,cAAc;AAChB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -27,5 +27,5 @@ module.exports = __toCommonJS(src_exports);
|
|
|
27
27
|
var React = __toESM(require("react"));
|
|
28
28
|
var import_DSBanner = __toESM(require("./DSBanner"));
|
|
29
29
|
__reExport(src_exports, require("./DSBanner"), module.exports);
|
|
30
|
-
__reExport(src_exports, require("./
|
|
30
|
+
__reExport(src_exports, require("./exported-related"), module.exports);
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.
|
|
4
|
-
"sourcesContent": ["export { default } from './DSBanner';\nexport * from './DSBanner';\nexport * from './
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAAwB;AACxB,wBAAc,uBADd;AAEA,wBAAc
|
|
3
|
+
"sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { default } from './DSBanner';\nexport * from './DSBanner';\nexport * from './exported-related';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAAwB;AACxB,wBAAc,uBADd;AAEA,wBAAc,+BAFd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __export = (target, all) => {
|
|
25
|
+
for (var name in all)
|
|
26
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
27
|
+
};
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
+
}
|
|
34
|
+
return to;
|
|
35
|
+
};
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var react_desc_prop_types_exports = {};
|
|
39
|
+
__export(react_desc_prop_types_exports, {
|
|
40
|
+
defaultProps: () => defaultProps,
|
|
41
|
+
propTypes: () => propTypes
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
44
|
+
var React = __toESM(require("react"));
|
|
45
|
+
var import_exported_related = require("./exported-related");
|
|
46
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
47
|
+
const noop = () => null;
|
|
48
|
+
const defaultProps = {
|
|
49
|
+
containerProps: {},
|
|
50
|
+
label: "",
|
|
51
|
+
body: "",
|
|
52
|
+
type: import_exported_related.BANNER_TYPES.INFO,
|
|
53
|
+
isOpen: true,
|
|
54
|
+
onClose: () => null,
|
|
55
|
+
showCloseButton: true,
|
|
56
|
+
actionLink: { label: "", onClick: noop, href: "" }
|
|
57
|
+
};
|
|
58
|
+
const propTypes = __spreadProps(__spreadValues(__spreadValues({}, import_ds_utilities.globalAttributesPropTypes), import_ds_utilities.xstyledPropTypes), {
|
|
59
|
+
containerProps: import_ds_utilities.PropTypes.object.description("Set of Properties attached to the main container.").defaultValue({}),
|
|
60
|
+
label: import_ds_utilities.PropTypes.string.description("Banner label.").defaultValue(""),
|
|
61
|
+
body: import_ds_utilities.PropTypes.string.description("Banner body content").defaultValue(""),
|
|
62
|
+
type: import_ds_utilities.PropTypes.oneOf(Object.values(import_exported_related.BANNER_TYPES)).description("Banner type.").defaultValue(import_exported_related.BANNER_TYPES.INFO),
|
|
63
|
+
onClose: import_ds_utilities.PropTypes.func.description("Callback when the Banner closes."),
|
|
64
|
+
isOpen: import_ds_utilities.PropTypes.bool.description("Whether the Banner is open or closed.").defaultValue(true),
|
|
65
|
+
showCloseButton: import_ds_utilities.PropTypes.bool.description("Whether to show close button or not.").defaultValue(true),
|
|
66
|
+
actionLink: import_ds_utilities.PropTypes.shape({
|
|
67
|
+
label: import_ds_utilities.PropTypes.string,
|
|
68
|
+
onClick: import_ds_utilities.PropTypes.func,
|
|
69
|
+
href: import_ds_utilities.PropTypes.string
|
|
70
|
+
}).description("Properties for the Action Link.").defaultValue({}),
|
|
71
|
+
actionRef: import_ds_utilities.PropTypes.object.description(`
|
|
72
|
+
Reference to use actions:
|
|
73
|
+
- focusOnLink: function to focus the banner
|
|
74
|
+
- focusOnWrapper: function to focus the link
|
|
75
|
+
`).defaultValue({})
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { BANNER_TYPES } from './exported-related';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\nimport type { DSBannerInternalsT } from './sharedTypes';\n\nconst noop = () => null;\n\nexport declare namespace DSBannerT {\n export interface Props {\n type?: DSBannerInternalsT.BannerTypesT;\n isOpen?: boolean;\n onClose?: () => void | null;\n actionLink?: DSBannerInternalsT.ActionLinkT;\n label?: string;\n body?: string;\n showCloseButton?: boolean;\n containerProps?: Record<string, unknown>;\n actionRef?: any;\n }\n}\n\nexport const defaultProps: DSBannerT.Props = {\n containerProps: {},\n label: '',\n body: '',\n type: BANNER_TYPES.INFO,\n isOpen: true,\n onClose: () => null,\n showCloseButton: true,\n actionLink: { label: '', onClick: noop, href: '' },\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n containerProps: PropTypes.object.description('Set of Properties attached to the main container.').defaultValue({}),\n label: PropTypes.string.description('Banner label.').defaultValue(''),\n body: PropTypes.string.description('Banner body content').defaultValue(''),\n type: PropTypes.oneOf(Object.values(BANNER_TYPES)).description('Banner type.').defaultValue(BANNER_TYPES.INFO),\n onClose: PropTypes.func.description('Callback when the Banner closes.'),\n isOpen: PropTypes.bool.description('Whether the Banner is open or closed.').defaultValue(true),\n showCloseButton: PropTypes.bool.description('Whether to show close button or not.').defaultValue(true),\n actionLink: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n href: PropTypes.string,\n })\n .description('Properties for the Action Link.')\n .defaultValue({}),\n actionRef: PropTypes.object\n .description(\n `\n Reference to use actions:\n - focusOnLink: function to focus the banner\n - focusOnWrapper: function to focus the link\n `,\n )\n .defaultValue({}),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
16
16
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
17
|
-
var
|
|
18
|
-
module.exports = __toCommonJS(
|
|
17
|
+
var sharedTypes_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(sharedTypes_exports);
|
|
19
19
|
var React = __toESM(require("react"));
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=sharedTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/sharedTypes.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { BANNER_TYPES } from './exported-related';\n\nexport declare namespace DSBannerInternalsT {\n export type BannerTypesT = typeof BANNER_TYPES[keyof typeof BANNER_TYPES];\n\n export interface ActionLinkT {\n label: string;\n onClick?: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | null;\n href: string;\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/styles.js
CHANGED
|
@@ -31,16 +31,23 @@ __export(styles_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(styles_exports);
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_ds_system = require("@elliemae/ds-system");
|
|
34
|
-
var import_ds_button =
|
|
34
|
+
var import_ds_button = require("@elliemae/ds-button");
|
|
35
35
|
var import_styleHelpers = require("./utils/styleHelpers");
|
|
36
|
-
|
|
36
|
+
var import_exported_related = require("./exported-related");
|
|
37
|
+
const StyledBannerContainer = (0, import_ds_system.styled)("div", {
|
|
38
|
+
name: import_exported_related.COMPONENT_NAME,
|
|
39
|
+
slot: import_exported_related.slots.CONTAINER
|
|
40
|
+
})`
|
|
37
41
|
overflow: hidden;
|
|
38
42
|
height: ${({ isOpen }) => isOpen ? "auto" : "0px"};
|
|
39
43
|
${({ isAnimating, isOpen, height }) => (0, import_styleHelpers.handleAnimation)(isAnimating, isOpen, height)};
|
|
44
|
+
${import_ds_system.sizing}
|
|
45
|
+
${import_ds_system.space}
|
|
46
|
+
${import_ds_system.layout}
|
|
40
47
|
`;
|
|
41
48
|
const StyledInnerContainer = (0, import_ds_system.styled)("div", {
|
|
42
|
-
name:
|
|
43
|
-
slot:
|
|
49
|
+
name: import_exported_related.COMPONENT_NAME,
|
|
50
|
+
slot: import_exported_related.slots.INNER_CONTAINER
|
|
44
51
|
})`
|
|
45
52
|
padding-right: 6px;
|
|
46
53
|
display: grid;
|
|
@@ -49,6 +56,7 @@ const StyledInnerContainer = (0, import_ds_system.styled)("div", {
|
|
|
49
56
|
width: 100%;
|
|
50
57
|
background-color: ${({ theme }) => theme.colors.neutral["000"]};
|
|
51
58
|
border-bottom: 5px solid ${({ type, theme }) => (0, import_styleHelpers.handleBorderColor)(type, theme)};
|
|
59
|
+
transform: translateY(${({ isOpen }) => isOpen ? "0" : "-100%"});
|
|
52
60
|
${({ isAnimating, isOpen }) => (0, import_styleHelpers.handleAnimation)(isAnimating, isOpen)};
|
|
53
61
|
&:focus {
|
|
54
62
|
position: relative;
|
|
@@ -67,22 +75,22 @@ const StyledInnerContainer = (0, import_ds_system.styled)("div", {
|
|
|
67
75
|
}
|
|
68
76
|
grid-template-columns: auto minmax(auto, auto) minmax(auto, 1fr) auto;
|
|
69
77
|
`;
|
|
70
|
-
const StyledIconContainer = (0, import_ds_system.styled)("div", { name:
|
|
78
|
+
const StyledIconContainer = (0, import_ds_system.styled)("div", { name: import_exported_related.COMPONENT_NAME, slot: import_exported_related.slots.ICON_CONTAINER })`
|
|
71
79
|
margin-right: ${({ theme }) => theme.space.xxs};
|
|
72
80
|
margin-left: ${({ theme }) => theme.space.xs};
|
|
73
81
|
`;
|
|
74
|
-
const StyledTitle = (0, import_ds_system.styled)("div", { name:
|
|
82
|
+
const StyledTitle = (0, import_ds_system.styled)("div", { name: import_exported_related.COMPONENT_NAME, slot: import_exported_related.slots.TITLE })`
|
|
75
83
|
color: ${({ theme }) => theme.colors.neutral[700]};
|
|
76
84
|
font-size: ${({ theme }) => theme.fontSizes.label[400]};
|
|
77
85
|
font-weight: ${({ theme }) => theme.fontWeights.semibold};
|
|
78
86
|
`;
|
|
79
|
-
const StyledSubTitle = (0, import_ds_system.styled)("div", { name:
|
|
87
|
+
const StyledSubTitle = (0, import_ds_system.styled)("div", { name: import_exported_related.COMPONENT_NAME, slot: import_exported_related.slots.SUBTITLE })`
|
|
80
88
|
width: 100%;
|
|
81
89
|
margin-left: ${({ theme }) => theme.space.xs};
|
|
82
90
|
font-size: ${({ theme }) => theme.fontSizes.subTitle[400]};
|
|
83
91
|
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
|
84
92
|
`;
|
|
85
|
-
const StyledActionLink = (0, import_ds_system.styled)("a", { name:
|
|
93
|
+
const StyledActionLink = (0, import_ds_system.styled)("a", { name: import_exported_related.COMPONENT_NAME, slot: import_exported_related.slots.ACTION_LINK })`
|
|
86
94
|
margin-left: ${({ theme, isBodyEmpty }) => isBodyEmpty ? theme.space.xs : 0};
|
|
87
95
|
white-space: nowrap;
|
|
88
96
|
text-decoration: none;
|
|
@@ -90,11 +98,15 @@ const StyledActionLink = (0, import_ds_system.styled)("a", { name: "DS-Banner",
|
|
|
90
98
|
font-size: ${({ theme }) => theme.fontSizes.hyperlink[400]};
|
|
91
99
|
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
|
92
100
|
color: ${({ theme }) => theme.colors.brand[600]};
|
|
101
|
+
border: 2px solid transparent;
|
|
102
|
+
border-radius: 2px;
|
|
103
|
+
padding: 2px 4px;
|
|
104
|
+
&:focus {
|
|
105
|
+
outline: none;
|
|
106
|
+
border: 2px solid ${({ theme }) => theme.colors.brand[700]};
|
|
107
|
+
}
|
|
93
108
|
`;
|
|
94
|
-
const StyledCloseButton = (0, import_ds_system.styled)(import_ds_button.
|
|
109
|
+
const StyledCloseButton = (0, import_ds_system.styled)(import_ds_button.DSButtonV2, { name: import_exported_related.COMPONENT_NAME, slot: import_exported_related.slots.CLOSE_BUTTON })`
|
|
95
110
|
margin-left: ${({ theme }) => theme.space.xxs};
|
|
96
|
-
&:not(focus) {
|
|
97
|
-
border: transparent;
|
|
98
|
-
}
|
|
99
111
|
`;
|
|
100
112
|
//# sourceMappingURL=styles.js.map
|
package/dist/cjs/styles.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { styled, sizing, space, layout } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport { handleAnimation, handleBorderColor } from './utils/styleHelpers';\nimport { COMPONENT_NAME, slots } from './exported-related';\nimport type { DSBannerInternalsT } from './sharedTypes';\n\ninterface StyledBannerContainerT {\n type: DSBannerInternalsT.BannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n height: number;\n}\n\ninterface StyledInnerContainerT {\n type: DSBannerInternalsT.BannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n ref: React.MutableRefObject<HTMLDivElement>;\n}\n\ninterface StyledActionLinkT {\n isBodyEmpty: string;\n ref: React.MutableRefObject<HTMLAnchorElement>;\n}\n\nexport const StyledBannerContainer = styled<StyledBannerContainerT>('div', {\n name: COMPONENT_NAME,\n slot: slots.CONTAINER,\n})`\n overflow: hidden;\n height: ${({ isOpen }) => (isOpen ? 'auto' : '0px')};\n ${({ isAnimating, isOpen, height }) => handleAnimation(isAnimating, isOpen, height)};\n ${sizing}\n ${space}\n ${layout}\n`;\n\nexport const StyledInnerContainer = styled<StyledInnerContainerT>('div', {\n name: COMPONENT_NAME,\n slot: slots.INNER_CONTAINER,\n})`\n padding-right: 6px;\n display: grid;\n align-items: center;\n min-height: 41px;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n border-bottom: 5px solid ${({ type, theme }) => handleBorderColor(type, theme)};\n transform: translateY(${({ isOpen }) => (isOpen ? '0' : '-100%')});\n ${({ isAnimating, isOpen }) => handleAnimation(isAnimating, isOpen)};\n &:focus {\n position: relative;\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n pointer-events: none;\n border-radius: 2px;\n width: calc(100%);\n border: 2px solid #1e79c2;\n height: calc(100% + 4px);\n }\n }\n grid-template-columns: auto minmax(auto, auto) minmax(auto, 1fr) auto;\n`;\n\nexport const StyledIconContainer = styled('div', { name: COMPONENT_NAME, slot: slots.ICON_CONTAINER })`\n margin-right: ${({ theme }) => theme.space.xxs};\n margin-left: ${({ theme }) => theme.space.xs};\n`;\n\nexport const StyledTitle = styled('div', { name: COMPONENT_NAME, slot: slots.TITLE })`\n color: ${({ theme }) => theme.colors.neutral[700]};\n font-size: ${({ theme }) => theme.fontSizes.label[400]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n`;\n\nexport const StyledSubTitle = styled('div', { name: COMPONENT_NAME, slot: slots.SUBTITLE })`\n width: 100%;\n margin-left: ${({ theme }) => theme.space.xs};\n font-size: ${({ theme }) => theme.fontSizes.subTitle[400]};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n`;\n\nexport const StyledActionLink = styled<StyledActionLinkT>('a', { name: COMPONENT_NAME, slot: slots.ACTION_LINK })`\n margin-left: ${({ theme, isBodyEmpty }) => (isBodyEmpty ? theme.space.xs : 0)};\n white-space: nowrap;\n text-decoration: none;\n line-height: 1.1;\n font-size: ${({ theme }) => theme.fontSizes.hyperlink[400]};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: ${({ theme }) => theme.colors.brand[600]};\n border: 2px solid transparent;\n border-radius: 2px;\n padding: 2px 4px;\n &:focus {\n outline: none;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n }\n`;\n\nexport const StyledCloseButton = styled(DSButtonV2, { name: COMPONENT_NAME, slot: slots.CLOSE_BUTTON })`\n margin-left: ${({ theme }) => theme.space.xxs};\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA8C;AAC9C,uBAA2B;AAC3B,0BAAmD;AACnD,8BAAsC;AAsB/B,MAAM,wBAAwB,6BAA+B,OAAO;AAAA,EACzE,MAAM;AAAA,EACN,MAAM,8BAAM;AACd,CAAC;AAAA;AAAA,YAEW,CAAC,EAAE,aAAc,SAAS,SAAS;AAAA,IAC3C,CAAC,EAAE,aAAa,QAAQ,aAAa,yCAAgB,aAAa,QAAQ,MAAM;AAAA,IAChF;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,uBAAuB,6BAA8B,OAAO;AAAA,EACvE,MAAM;AAAA,EACN,MAAM,8BAAM;AACd,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMqB,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA,6BAC7B,CAAC,EAAE,MAAM,YAAY,2CAAkB,MAAM,KAAK;AAAA,0BACrD,CAAC,EAAE,aAAc,SAAS,MAAM;AAAA,IACtD,CAAC,EAAE,aAAa,aAAa,yCAAgB,aAAa,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/icons.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { AlertsDetailFill, InfoFill, SuccessFill, WarningSquare } from '@elliemae/ds-icons';\n\nexport const icons = {\n success: <SuccessFill color={['success', 900]} width=\"20px\" height=\"20px\" />,\n info: <InfoFill color={['brand-primary', 600]} width=\"20px\" height=\"20px\" />,\n danger: <AlertsDetailFill color={['danger', 900]} width=\"20px\" height=\"20px\" />,\n warning: <WarningSquare color={['warning', 900]} width=\"20px\" height=\"20px\" />,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,sBAAuE;AAEhE,MAAM,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { AlertsDetailFill, InfoFill, SuccessFill, WarningSquare } from '@elliemae/ds-icons';\n\nexport const icons: Record<string, JSX.Element> = {\n success: <SuccessFill color={['success', 900]} width=\"20px\" height=\"20px\" />,\n info: <InfoFill color={['brand-primary', 600]} width=\"20px\" height=\"20px\" />,\n danger: <AlertsDetailFill color={['danger', 900]} width=\"20px\" height=\"20px\" />,\n warning: <WarningSquare color={['warning', 900]} width=\"20px\" height=\"20px\" />,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,sBAAuE;AAEhE,MAAM,QAAqC;AAAA,EAChD,SAAS,mDAAC;AAAA,IAAY,OAAO,CAAC,WAAW,GAAG;AAAA,IAAG,OAAM;AAAA,IAAO,QAAO;AAAA,GAAO;AAAA,EAC1E,MAAM,mDAAC;AAAA,IAAS,OAAO,CAAC,iBAAiB,GAAG;AAAA,IAAG,OAAM;AAAA,IAAO,QAAO;AAAA,GAAO;AAAA,EAC1E,QAAQ,mDAAC;AAAA,IAAiB,OAAO,CAAC,UAAU,GAAG;AAAA,IAAG,OAAM;AAAA,IAAO,QAAO;AAAA,GAAO;AAAA,EAC7E,SAAS,mDAAC;AAAA,IAAc,OAAO,CAAC,WAAW,GAAG;AAAA,IAAG,OAAM;AAAA,IAAO,QAAO;AAAA,GAAO;AAC9E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|