@elliemae/ds-banner 3.48.2-rc.0 → 3.49.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/cjs/DSBanner.js +13 -8
  2. package/dist/cjs/DSBanner.js.map +2 -2
  3. package/dist/cjs/exported-related/index.js +34 -4
  4. package/dist/cjs/exported-related/index.js.map +2 -2
  5. package/dist/cjs/styles.js +3 -3
  6. package/dist/cjs/styles.js.map +2 -2
  7. package/dist/esm/DSBanner.js +18 -12
  8. package/dist/esm/DSBanner.js.map +2 -2
  9. package/dist/esm/exported-related/index.js +30 -3
  10. package/dist/esm/exported-related/index.js.map +2 -2
  11. package/dist/esm/styles.js +3 -3
  12. package/dist/esm/styles.js.map +2 -2
  13. package/dist/types/exported-related/index.d.ts +27 -3
  14. package/dist/types/styles.d.ts +1 -1
  15. package/dist/types/utils/icons.d.ts +1 -0
  16. package/package.json +8 -8
  17. package/dist/cjs/exported-related/DSBannerDatatestid.js +0 -43
  18. package/dist/cjs/exported-related/DSBannerDatatestid.js.map +0 -7
  19. package/dist/cjs/exported-related/bannerTypes.js +0 -41
  20. package/dist/cjs/exported-related/bannerTypes.js.map +0 -7
  21. package/dist/cjs/exported-related/theming.js +0 -47
  22. package/dist/cjs/exported-related/theming.js.map +0 -7
  23. package/dist/esm/exported-related/DSBannerDatatestid.js +0 -13
  24. package/dist/esm/exported-related/DSBannerDatatestid.js.map +0 -7
  25. package/dist/esm/exported-related/bannerTypes.js +0 -11
  26. package/dist/esm/exported-related/bannerTypes.js.map +0 -7
  27. package/dist/esm/exported-related/theming.js +0 -17
  28. package/dist/esm/exported-related/theming.js.map +0 -7
  29. package/dist/types/exported-related/DSBannerDatatestid.d.ts +0 -8
  30. package/dist/types/exported-related/bannerTypes.d.ts +0 -6
  31. package/dist/types/exported-related/theming.d.ts +0 -11
@@ -35,13 +35,13 @@ __export(DSBanner_exports, {
35
35
  module.exports = __toCommonJS(DSBanner_exports);
36
36
  var React = __toESM(require("react"));
37
37
  var import_jsx_runtime = require("react/jsx-runtime");
38
- var import_react = __toESM(require("react"));
39
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
38
  var import_ds_icons = require("@elliemae/ds-icons");
41
- var import_icons = require("./utils/icons.js");
42
- var import_react_desc_prop_types = require("./react-desc-prop-types.js");
39
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
+ var import_react = __toESM(require("react"));
43
41
  var import_exported_related = require("./exported-related/index.js");
42
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
44
43
  var import_styles = require("./styles.js");
44
+ var import_icons = require("./utils/icons.js");
45
45
  const DSBanner = (props) => {
46
46
  const propsWithDefaults = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
47
47
  const {
@@ -59,6 +59,7 @@ const DSBanner = (props) => {
59
59
  ...rest
60
60
  } = propsWithDefaults;
61
61
  const { height: globalHeight, ...globalAttrs } = (0, import_ds_props_helpers.useGetGlobalAttributes)(rest);
62
+ const ownerPropsConfig = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefaults, { ...props });
62
63
  const xstyledAttrs = (0, import_ds_props_helpers.useGetXstyledProps)(rest);
63
64
  const innerContainerRef = (0, import_react.useRef)(null);
64
65
  const linkRef = (0, import_react.useRef)(null);
@@ -134,6 +135,7 @@ const DSBanner = (props) => {
134
135
  ...containerProps,
135
136
  ...globalAttrs,
136
137
  ...xstyledAttrs,
138
+ ...ownerPropsConfig,
137
139
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
138
140
  import_styles.StyledInnerContainer,
139
141
  {
@@ -146,10 +148,11 @@ const DSBanner = (props) => {
146
148
  role: "alert",
147
149
  tabIndex: alertTabIndex,
148
150
  onBlur: handleBlur,
151
+ ...ownerPropsConfig,
149
152
  children: !CustomBody ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
150
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledIconContainer, { "data-testid": import_exported_related.DSBannerDatatestid.ICON_CONTAINER, children: import_icons.icons[type] }),
151
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledTitle, { children: label }),
152
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledSubTitle, { children: [
153
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledIconContainer, { "data-testid": import_exported_related.DSBannerDatatestid.ICON_CONTAINER, ...ownerPropsConfig, children: import_icons.icons[type] }),
154
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledTitle, { ...ownerPropsConfig, children: label }),
155
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledSubTitle, { ...ownerPropsConfig, children: [
153
156
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: body }),
154
157
  actionLink && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
155
158
  import_styles.StyledActionLink,
@@ -160,8 +163,9 @@ const DSBanner = (props) => {
160
163
  innerRef: linkRef,
161
164
  onKeyDown: handleOnKeyDown,
162
165
  tabIndex: 0,
163
- isBodyEmpty: !Boolean(body),
166
+ isBodyEmpty: !body,
164
167
  title: actionLink.label,
168
+ ...ownerPropsConfig,
165
169
  children: actionLink.label
166
170
  }
167
171
  )
@@ -174,6 +178,7 @@ const DSBanner = (props) => {
174
178
  innerRef: closeBtnRef,
175
179
  onClick: onClose,
176
180
  "aria-label": "Close icon",
181
+ ...ownerPropsConfig,
177
182
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.CloseX, { width: 12, height: 12 })
178
183
  }
179
184
  ) : null
@@ -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, useEffect } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { CloseX } from '@elliemae/ds-icons';\nimport { icons } from './utils/icons.js';\nimport { propTypes, defaultProps } from './react-desc-prop-types.js';\nimport { DSBannerDatatestid, DSBannerName } from './exported-related/index.js';\nimport {\n StyledActionLink,\n StyledCloseButton,\n StyledInnerContainer,\n StyledBannerContainer,\n StyledIconContainer,\n StyledSubTitle,\n StyledTitle,\n} from './styles.js';\nimport type { DSBannerT } from './react-desc-prop-types.js';\n\nconst DSBanner: React.ComponentType<DSBannerT.Props> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSBannerT.InternalProps>(props, defaultProps);\n\n const {\n type,\n isOpen,\n onClose,\n label,\n body,\n closeBtnRef,\n CustomBody,\n actionLink,\n showCloseButton,\n containerProps,\n actionRef,\n ...rest\n } = propsWithDefaults;\n // eslint-disable-next-line no-unused-vars\n const { height: globalHeight, ...globalAttrs } = useGetGlobalAttributes(rest);\n\n const xstyledAttrs = useGetXstyledProps(rest);\n\n const innerContainerRef = useRef<HTMLDivElement>(null);\n const linkRef = useRef<HTMLAnchorElement>(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<TypescriptHelpersT.WCAGTabIndex | 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 const handleOnKeyDownToClose = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n onClose();\n }\n },\n [onClose],\n );\n\n useLayoutEffect(() => {\n if (isOpen !== current || isOpen) setIsAnimating(true);\n else setIsAnimating(false);\n }, [isOpen, current]);\n\n const innerCols = React.useMemo(() => {\n if (!CustomBody) {\n const finalCols = ['auto', 'fit-content(50%)', '1fr'];\n if (showCloseButton) finalCols.push('auto');\n return finalCols;\n }\n return ['1fr', 'auto'];\n }, [CustomBody, showCloseButton]);\n\n if (!isAnimating && !isOpen) return null;\n\n return (\n <StyledBannerContainer\n isOpen={isOpen}\n height={height}\n onKeyDown={handleOnKeyDownToClose}\n isAnimating={isAnimating}\n onAnimationEnd={() => {\n setCurrent(isOpen);\n setIsAnimating(false);\n }}\n data-testid={DSBannerDatatestid.CONTAINER}\n {...containerProps}\n {...globalAttrs}\n {...xstyledAttrs}\n >\n <StyledInnerContainer\n cols={innerCols}\n type={type}\n isOpen={isOpen}\n innerRef={innerContainerRef}\n isAnimating={isAnimating}\n data-testid={DSBannerDatatestid.INNER_CONTAINER}\n role=\"alert\"\n tabIndex={alertTabIndex}\n onBlur={handleBlur}\n >\n {!CustomBody ? (\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 innerRef={linkRef}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n isBodyEmpty={!Boolean(body)}\n title={actionLink.label}\n >\n {actionLink.label}\n </StyledActionLink>\n )}\n </StyledSubTitle>\n {showCloseButton ? (\n <StyledCloseButton\n data-testid={DSBannerDatatestid.CLOSE_BUTTON}\n buttonType=\"icon\"\n innerRef={closeBtnRef}\n onClick={onClose}\n aria-label=\"Close icon\"\n >\n <CloseX width={12} height={12} />\n </StyledCloseButton>\n ) : null}\n </>\n ) : (\n <CustomBody />\n )}\n </StyledInnerContainer>\n </StyledBannerContainer>\n );\n};\n\nDSBanner.displayName = DSBannerName;\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6Ib;AA5IV,mBAAiF;AAEjF,8BAKO;AACP,sBAAuB;AACvB,mBAAsB;AACtB,mCAAwC;AACxC,8BAAiD;AACjD,oBAQO;AAGP,MAAM,WAAiD,CAAC,UAAU;AAChE,QAAM,wBAAoB,sDAAsD,OAAO,yCAAY;AAEnG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,EAAE,QAAQ,cAAc,GAAG,YAAY,QAAI,gDAAuB,IAAI;AAE5E,QAAM,mBAAe,4CAAmB,IAAI;AAE5C,QAAM,wBAAoB,qBAAuB,IAAI;AACrD,QAAM,cAAU,qBAA0B,IAAI;AAC9C,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAkB,MAAM;AACtD,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAkB,KAAK;AAC7D,QAAM,CAAC,QAAQ,SAAS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W;AAAA,gBAEX,sDAAC,0BAAO,OAAO,IAAI,QAAQ,IAAI;AAAA;AAAA,YACjC,IACE;AAAA,aACN,IAEA,4CAAC,cAAW;AAAA;AAAA,MAEhB;AAAA;AAAA,EACF;AAEJ;AAEA,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport { CloseX } from '@elliemae/ds-icons';\nimport {\n describe,\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { DSBannerDatatestid, DSBannerName } from './exported-related/index.js';\nimport type { DSBannerT } from './react-desc-prop-types.js';\nimport { defaultProps, propTypes } from './react-desc-prop-types.js';\nimport {\n StyledActionLink,\n StyledBannerContainer,\n StyledCloseButton,\n StyledIconContainer,\n StyledInnerContainer,\n StyledSubTitle,\n StyledTitle,\n} from './styles.js';\nimport { icons } from './utils/icons.js';\n\nconst DSBanner: React.ComponentType<DSBannerT.Props> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSBannerT.InternalProps>(props, defaultProps);\n\n const {\n type,\n isOpen,\n onClose,\n label,\n body,\n closeBtnRef,\n CustomBody,\n actionLink,\n showCloseButton,\n containerProps,\n actionRef,\n ...rest\n } = propsWithDefaults;\n // eslint-disable-next-line no-unused-vars\n const { height: globalHeight, ...globalAttrs } = useGetGlobalAttributes(rest);\n const ownerPropsConfig = useOwnerProps(propsWithDefaults, { ...props });\n\n const xstyledAttrs = useGetXstyledProps(rest);\n\n const innerContainerRef = useRef<HTMLDivElement>(null);\n const linkRef = useRef<HTMLAnchorElement>(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<TypescriptHelpersT.WCAGTabIndex | 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 const handleOnKeyDownToClose = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n onClose();\n }\n },\n [onClose],\n );\n\n useLayoutEffect(() => {\n if (isOpen !== current || isOpen) setIsAnimating(true);\n else setIsAnimating(false);\n }, [isOpen, current]);\n\n const innerCols = React.useMemo(() => {\n if (!CustomBody) {\n const finalCols = ['auto', 'fit-content(50%)', '1fr'];\n if (showCloseButton) finalCols.push('auto');\n return finalCols;\n }\n return ['1fr', 'auto'];\n }, [CustomBody, showCloseButton]);\n\n if (!isAnimating && !isOpen) return null;\n\n return (\n <StyledBannerContainer\n isOpen={isOpen}\n height={height}\n onKeyDown={handleOnKeyDownToClose}\n isAnimating={isAnimating}\n onAnimationEnd={() => {\n setCurrent(isOpen);\n setIsAnimating(false);\n }}\n data-testid={DSBannerDatatestid.CONTAINER}\n {...containerProps}\n {...globalAttrs}\n {...xstyledAttrs}\n {...ownerPropsConfig}\n >\n <StyledInnerContainer\n cols={innerCols}\n type={type}\n isOpen={isOpen}\n innerRef={innerContainerRef}\n isAnimating={isAnimating}\n data-testid={DSBannerDatatestid.INNER_CONTAINER}\n role=\"alert\"\n tabIndex={alertTabIndex}\n onBlur={handleBlur}\n {...ownerPropsConfig}\n >\n {!CustomBody ? (\n <>\n <StyledIconContainer data-testid={DSBannerDatatestid.ICON_CONTAINER} {...ownerPropsConfig}>\n {icons[type]}\n </StyledIconContainer>\n <StyledTitle {...ownerPropsConfig}>{label}</StyledTitle>\n <StyledSubTitle {...ownerPropsConfig}>\n <span>{body}</span>\n {actionLink && (\n <StyledActionLink\n data-testid={DSBannerDatatestid.ACTION_LINK}\n onClick={actionLink.onClick}\n href={actionLink.href}\n innerRef={linkRef}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n isBodyEmpty={!body}\n title={actionLink.label}\n {...ownerPropsConfig}\n >\n {actionLink.label}\n </StyledActionLink>\n )}\n </StyledSubTitle>\n {showCloseButton ? (\n <StyledCloseButton\n data-testid={DSBannerDatatestid.CLOSE_BUTTON}\n buttonType=\"icon\"\n innerRef={closeBtnRef}\n onClick={onClose}\n aria-label=\"Close icon\"\n {...ownerPropsConfig}\n >\n <CloseX width={12} height={12} />\n </StyledCloseButton>\n ) : null}\n </>\n ) : (\n <CustomBody />\n )}\n </StyledInnerContainer>\n </StyledBannerContainer>\n );\n};\n\nDSBanner.displayName = DSBannerName;\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiJb;AAhJV,sBAAuB;AACvB,8BAMO;AAEP,mBAAiF;AACjF,8BAAiD;AAEjD,mCAAwC;AACxC,oBAQO;AACP,mBAAsB;AAEtB,MAAM,WAAiD,CAAC,UAAU;AAChE,QAAM,wBAAoB,sDAAsD,OAAO,yCAAY;A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AAA,wDAAC,qCAAoB,eAAa,2CAAmB,gBAAiB,GAAG,kBACtE,6BAAM,IAAI,GACb;AAAA,YACA,4CAAC,6BAAa,GAAG,kBAAmB,iBAAM;AAAA,YAC1C,6CAAC,gCAAgB,GAAG,kBAClB;AAAA,0DAAC,UAAM,gBAAK;AAAA,cACX,cACC;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAa,2CAAmB;AAAA,kBAChC,SAAS,WAAW;AAAA,kBACpB,MAAM,WAAW;AAAA,kBACjB,UAAU;AAAA,kBACV,WAAW;AAAA,kBACX,UAAU;AAAA,kBACV,aAAa,CAAC;AAAA,kBACd,OAAO,WAAW;AAAA,kBACjB,GAAG;AAAA,kBAEH,qBAAW;AAAA;AAAA,cACd;AAAA,eAEJ;AAAA,YACC,kBACC;AAAA,cAAC;AAAA;AAAA,gBACC,eAAa,2CAAmB;AAAA,gBAChC,YAAW;AAAA,gBACX,UAAU;AAAA,gBACV,SAAS;AAAA,gBACT,cAAW;AAAA,gBACV,GAAG;AAAA,gBAEJ,sDAAC,0BAAO,OAAO,IAAI,QAAQ,IAAI;AAAA;AAAA,YACjC,IACE;AAAA,aACN,IAEA,4CAAC,cAAW;AAAA;AAAA,MAEhB;AAAA;AAAA,EACF;AAEJ;AAEA,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
8
12
  var __copyProps = (to, from, except, desc) => {
9
13
  if (from && typeof from === "object" || typeof from === "function") {
10
14
  for (let key of __getOwnPropNames(from))
@@ -13,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
13
17
  }
14
18
  return to;
15
19
  };
16
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
21
  // If the importer is in node compatibility mode or this is not an ESM
19
22
  // file that has been converted to a CommonJS file using a Babel-
@@ -24,9 +27,36 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
27
  ));
25
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
29
  var exported_related_exports = {};
30
+ __export(exported_related_exports, {
31
+ BANNER_TYPES: () => BANNER_TYPES,
32
+ DSBannerDatatestid: () => DSBannerDatatestid,
33
+ DSBannerName: () => DSBannerName,
34
+ DSBannerSlots: () => DSBannerSlots
35
+ });
27
36
  module.exports = __toCommonJS(exported_related_exports);
28
37
  var React = __toESM(require("react"));
29
- __reExport(exported_related_exports, require("./DSBannerDatatestid.js"), module.exports);
30
- __reExport(exported_related_exports, require("./theming.js"), module.exports);
31
- __reExport(exported_related_exports, require("./bannerTypes.js"), module.exports);
38
+ var import_ds_system = require("@elliemae/ds-system");
39
+ const DSBannerName = "DSBanner";
40
+ const BANNER_TYPES = {
41
+ INFO: "info",
42
+ SUCCESS: "success",
43
+ WARNING: "warning",
44
+ DANGER: "danger"
45
+ };
46
+ const DSBannerSlots = {
47
+ CONTAINER: "container",
48
+ INNER_CONTAINER: "inner-container",
49
+ CUSTOM_CONTAINER: "custom-container",
50
+ TITLE: "title",
51
+ SUBTITLE: "subtitle",
52
+ ICON_CONTAINER: "icon-container",
53
+ ACTION_LINK: "action-link",
54
+ CLOSE_BUTTON: "close-button"
55
+ };
56
+ const DSBannerDatatestid = {
57
+ ...(0, import_ds_system.slotObjectToDataTestIds)(DSBannerName, DSBannerSlots),
58
+ // handling the rest of the data-testids that are not compatible with the slotObjectToDataTestIds function manually to avoid breaking changes
59
+ INNER_CONTAINER: "ds-banner",
60
+ ICON_CONTAINER: "ds-banner-icon"
61
+ };
32
62
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/exported-related/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './DSBannerDatatestid.js';\nexport * from './theming.js';\nexport * from './bannerTypes.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAAc,oCAAd;AACA,qCAAc,yBADd;AAEA,qCAAc,6BAFd;",
4
+ "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSBannerName = 'DSBanner';\nexport const BANNER_TYPES = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n DANGER: 'danger',\n} as const;\n\n// previously this was the exported data-testid object\n// the one marked as // ok are the one that works with the slots convention and works with the slotObjectToDataTestIds function\n// the rest are not compatible and needs manual handling\n// export const DSBannerDatatestid = {\n// CONTAINER: 'ds-banner-container', // ok\n// CUSTOM_CONTAINER: 'ds-banner-custom-container', // ok\n// ACTION_LINK: 'ds-banner-action-link', // ok\n// CLOSE_BUTTON: 'ds-banner-close-button', // ok\n// // From here down are not compatible with the slotObjectToDataTestIds function.\n// INNER_CONTAINER: 'ds-banner',\n// ICON_CONTAINER: 'ds-banner-icon',\n// // from here they were not present but they had an asigned Slot.\n// // TITLE\n// // SUBTITLE\n// };\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\n\nexport const DSBannerSlots = {\n CONTAINER: 'container',\n INNER_CONTAINER: 'inner-container',\n CUSTOM_CONTAINER: 'custom-container',\n TITLE: 'title',\n SUBTITLE: 'subtitle',\n ICON_CONTAINER: 'icon-container',\n ACTION_LINK: 'action-link',\n CLOSE_BUTTON: 'close-button',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const DSBannerDatatestid = {\n ...(slotObjectToDataTestIds(DSBannerName, DSBannerSlots) as Record<keyof typeof DSBannerSlots, string>),\n // handling the rest of the data-testids that are not compatible with the slotObjectToDataTestIds function manually to avoid breaking changes\n INNER_CONTAINER: 'ds-banner',\n ICON_CONTAINER: 'ds-banner-icon',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,eAAe;AACrB,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAoBO,MAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,cAAc;AAChB;AAGO,MAAM,qBAAqB;AAAA,EAChC,OAAI,0CAAwB,cAAc,aAAa;AAAA;AAAA,EAEvD,iBAAiB;AAAA,EACjB,gBAAgB;AAClB;",
6
6
  "names": []
7
7
  }
@@ -38,11 +38,11 @@ __export(styles_exports, {
38
38
  });
39
39
  module.exports = __toCommonJS(styles_exports);
40
40
  var React = __toESM(require("react"));
41
- var import_ds_system = require("@elliemae/ds-system");
42
41
  var import_ds_button_v2 = require("@elliemae/ds-button-v2");
43
- var import_styleHelpers = require("./utils/styleHelpers.js");
44
- var import_exported_related = require("./exported-related/index.js");
45
42
  var import_ds_grid = require("@elliemae/ds-grid");
43
+ var import_ds_system = require("@elliemae/ds-system");
44
+ var import_exported_related = require("./exported-related/index.js");
45
+ var import_styleHelpers = require("./utils/styleHelpers.js");
46
46
  const StyledBannerContainer = (0, import_ds_system.styled)("div", {
47
47
  name: import_exported_related.DSBannerName,
48
48
  slot: import_exported_related.DSBannerSlots.CONTAINER
@@ -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, xStyledCommonProps } from '@elliemae/ds-system';\nimport type { SizingProps, LayoutProps, SpaceProps, ColorProps } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { handleAnimation, handleBorderColor } from './utils/styleHelpers.js';\nimport { DSBannerName, DSBannerSlots } from './exported-related/index.js';\nimport type { DSBannerT } from './react-desc-prop-types.js';\nimport { Grid } from '@elliemae/ds-grid';\nimport type {} from '@xstyled/util';\nimport type {} from '@xstyled/system';\n\ninterface StyledBannerContainerT extends SizingProps, LayoutProps, SpaceProps, ColorProps {\n isOpen: boolean;\n isAnimating: boolean;\n height: number;\n}\n\ninterface StyledInnerContainerT {\n type: DSBannerT.BannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n}\n\ninterface StyledActionLinkT {\n isBodyEmpty: boolean;\n}\n\nexport const StyledBannerContainer = styled('div', {\n name: DSBannerName,\n slot: DSBannerSlots.CONTAINER,\n})<StyledBannerContainerT>`\n overflow: ${({ isAnimating }) => (!isAnimating ? 'visible' : 'hidden')};\n height: ${({ isAnimating, height }) => (!isAnimating ? 'auto' : `${height}px`)};\n ${({ isAnimating, isOpen }) => handleAnimation(isAnimating, isOpen)};\n ${xStyledCommonProps}\n`;\n\nexport const StyledInnerContainer = styled(Grid, {\n name: DSBannerName,\n slot: DSBannerSlots.INNER_CONTAINER,\n})<StyledInnerContainerT>`\n padding-right: 4px;\n min-height: 41px;\n width: 100%;\n background-color: 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`;\n\nexport const StyledIconContainer = styled('div', {\n name: DSBannerName,\n slot: DSBannerSlots.ICON_CONTAINER,\n})`\n padding-top: 8px;\n margin-right: ${({ theme }) => theme.space.xxs};\n margin-left: ${({ theme }) => theme.space.xs};\n min-width: 0px;\n`;\n\nexport const StyledTitle = styled('div', { name: DSBannerName, slot: DSBannerSlots.TITLE })`\n color: neutral-700;\n font-size: ${({ theme }) => theme.fontSizes.label[400]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n padding-top: 9px;\n padding-bottom: 9px;\n font-size: 14px;\n overflow-wrap: break-word;\n white-space: pre-wrap;\n min-width: 0px;\n`;\n\nexport const StyledSubTitle = styled('div', { name: DSBannerName, slot: DSBannerSlots.SUBTITLE })`\n margin-left: ${({ theme }) => theme.space.xs};\n font-size: ${({ theme }) => theme.fontSizes.subTitle[400]};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n padding-top: 9px;\n padding-bottom: 6px;\n font-size: 14px;\n overflow-wrap: break-word;\n white-space: pre-wrap;\n min-width: 0px;\n`;\n\nexport const StyledActionLink = styled('a', { name: DSBannerName, slot: DSBannerSlots.ACTION_LINK })<StyledActionLinkT>`\n margin-left: ${({ theme, isBodyEmpty }) => (!isBodyEmpty ? theme.space.xs : 0)};\n text-decoration: none;\n font-size: 14px;\n line-height: 14px;\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: brand-600;\n min-width: 0px;\n position: relative;\n &:focus {\n &:after {\n position: absolute;\n content: '';\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid brand-700;\n pointer-events: none;\n }\n }\n`;\nexport const StyledCloseButton = styled(DSButtonV2, {\n name: DSBannerName,\n slot: DSBannerSlots.CLOSE_BUTTON,\n})`\n margin-left: ${({ theme }) => theme.space.xxs};\n margin-top: 4px;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;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AQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASnD,MAAM,qBAAiB,yBAAO,OAAO,EAAE,MAAM,sCAAc,MAAM,sCAAc,SAAS,CAAC;AAAA,iBAC/E,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,EAAE;AAAA,eAC/B,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,SAAS,GAAG,CAAC;AAAA,iBAC1C,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASlD,MAAM,uBAAmB,yBAAO,KAAK,EAAE,MAAM,sCAAc,MAAM,sCAAc,YAAY,CAAC;AAAA,iBAClF,CAAC,EAAE,OAAO,YAAY,MAAO,CAAC,cAAc,MAAM,MAAM,KAAK,CAAE;AAAA;AAAA;AAAA;AAAA,iBAI/D,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBlD,MAAM,wBAAoB,yBAAO,gCAAY;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,sCAAc;AACtB,CAAC;AAAA,iBACgB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,GAAG;AAAA;AAAA;",
4
+ "sourcesContent": ["import { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport type { ColorProps, LayoutProps, SizingProps, SpaceProps } from '@elliemae/ds-system';\nimport { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport type {} from '@xstyled/system';\nimport type {} from '@xstyled/util';\nimport { DSBannerName, DSBannerSlots } from './exported-related/index.js';\nimport type { DSBannerT } from './react-desc-prop-types.js';\nimport { handleAnimation, handleBorderColor } from './utils/styleHelpers.js';\n\ninterface StyledBannerContainerT extends SizingProps, LayoutProps, SpaceProps, ColorProps {\n isOpen: boolean;\n isAnimating: boolean;\n height: number;\n}\n\ninterface StyledInnerContainerT {\n type: DSBannerT.BannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n}\n\ninterface StyledActionLinkT {\n isBodyEmpty: boolean;\n}\n\nexport const StyledBannerContainer = styled('div', {\n name: DSBannerName,\n slot: DSBannerSlots.CONTAINER,\n})<StyledBannerContainerT>`\n overflow: ${({ isAnimating }) => (!isAnimating ? 'visible' : 'hidden')};\n height: ${({ isAnimating, height }) => (!isAnimating ? 'auto' : `${height}px`)};\n ${({ isAnimating, isOpen }) => handleAnimation(isAnimating, isOpen)};\n ${xStyledCommonProps}\n`;\n\nexport const StyledInnerContainer = styled(Grid, {\n name: DSBannerName,\n slot: DSBannerSlots.INNER_CONTAINER,\n})<StyledInnerContainerT>`\n padding-right: 4px;\n min-height: 41px;\n width: 100%;\n background-color: 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`;\n\nexport const StyledIconContainer = styled('div', {\n name: DSBannerName,\n slot: DSBannerSlots.ICON_CONTAINER,\n})`\n padding-top: 8px;\n margin-right: ${({ theme }) => theme.space.xxs};\n margin-left: ${({ theme }) => theme.space.xs};\n min-width: 0px;\n`;\n\nexport const StyledTitle = styled('div', { name: DSBannerName, slot: DSBannerSlots.TITLE })`\n color: neutral-700;\n font-size: ${({ theme }) => theme.fontSizes.label[400]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n padding-top: 9px;\n padding-bottom: 9px;\n font-size: 14px;\n overflow-wrap: break-word;\n white-space: pre-wrap;\n min-width: 0px;\n`;\n\nexport const StyledSubTitle = styled('div', { name: DSBannerName, slot: DSBannerSlots.SUBTITLE })`\n margin-left: ${({ theme }) => theme.space.xs};\n font-size: ${({ theme }) => theme.fontSizes.subTitle[400]};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n padding-top: 9px;\n padding-bottom: 6px;\n font-size: 14px;\n overflow-wrap: break-word;\n white-space: pre-wrap;\n min-width: 0px;\n`;\n\nexport const StyledActionLink = styled('a', { name: DSBannerName, slot: DSBannerSlots.ACTION_LINK })<StyledActionLinkT>`\n margin-left: ${({ theme, isBodyEmpty }) => (!isBodyEmpty ? theme.space.xs : 0)};\n text-decoration: none;\n font-size: 14px;\n line-height: 14px;\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: brand-600;\n min-width: 0px;\n position: relative;\n &:focus {\n &:after {\n position: absolute;\n content: '';\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid brand-700;\n pointer-events: none;\n }\n }\n`;\nexport const StyledCloseButton = styled(DSButtonV2, {\n name: DSBannerName,\n slot: DSBannerSlots.CLOSE_BUTTON,\n})`\n margin-left: ${({ theme }) => theme.space.xxs};\n margin-top: 4px;\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,0BAA2B;AAC3B,qBAAqB;AAErB,uBAA2C;AAG3C,8BAA4C;AAE5C,0BAAmD;AAkB5C,MAAM,4BAAwB,yBAAO,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,sCAAc;AACtB,CAAC;AAAA,cACa,CAAC,EAAE,YAAY,MAAO,CAAC,cAAc,YAAY,QAAS;AAAA,YAC5D,CAAC,EAAE,aAAa,OAAO,MAAO,CAAC,cAAc,SAAS,GAAG,MAAM,IAAK;AAAA,IAC5E,CAAC,EAAE,aAAa,OAAO,UAAM,qCAAgB,aAAa,MAAM,CAAC;AAAA,IACjE,mCAAkB;AAAA;AAGf,MAAM,2BAAuB,yBAAO,qBAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,sCAAc;AACtB,CAAC;AAAA;AA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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBlD,MAAM,wBAAoB,yBAAO,gCAAY;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,sCAAc;AACtB,CAAC;AAAA,iBACgB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,GAAG;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,25 +1,26 @@
1
1
  import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import React2, { useLayoutEffect, useRef, useCallback, useState, useEffect } from "react";
3
+ import { CloseX } from "@elliemae/ds-icons";
4
4
  import {
5
5
  describe,
6
- useMemoMergePropsWithDefault,
7
6
  useGetGlobalAttributes,
8
- useGetXstyledProps
7
+ useGetXstyledProps,
8
+ useMemoMergePropsWithDefault,
9
+ useOwnerProps
9
10
  } from "@elliemae/ds-props-helpers";
10
- import { CloseX } from "@elliemae/ds-icons";
11
- import { icons } from "./utils/icons.js";
12
- import { propTypes, defaultProps } from "./react-desc-prop-types.js";
11
+ import React2, { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
13
12
  import { DSBannerDatatestid, DSBannerName } from "./exported-related/index.js";
13
+ import { defaultProps, propTypes } from "./react-desc-prop-types.js";
14
14
  import {
15
15
  StyledActionLink,
16
- StyledCloseButton,
17
- StyledInnerContainer,
18
16
  StyledBannerContainer,
17
+ StyledCloseButton,
19
18
  StyledIconContainer,
19
+ StyledInnerContainer,
20
20
  StyledSubTitle,
21
21
  StyledTitle
22
22
  } from "./styles.js";
23
+ import { icons } from "./utils/icons.js";
23
24
  const DSBanner = (props) => {
24
25
  const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps);
25
26
  const {
@@ -37,6 +38,7 @@ const DSBanner = (props) => {
37
38
  ...rest
38
39
  } = propsWithDefaults;
39
40
  const { height: globalHeight, ...globalAttrs } = useGetGlobalAttributes(rest);
41
+ const ownerPropsConfig = useOwnerProps(propsWithDefaults, { ...props });
40
42
  const xstyledAttrs = useGetXstyledProps(rest);
41
43
  const innerContainerRef = useRef(null);
42
44
  const linkRef = useRef(null);
@@ -112,6 +114,7 @@ const DSBanner = (props) => {
112
114
  ...containerProps,
113
115
  ...globalAttrs,
114
116
  ...xstyledAttrs,
117
+ ...ownerPropsConfig,
115
118
  children: /* @__PURE__ */ jsx(
116
119
  StyledInnerContainer,
117
120
  {
@@ -124,10 +127,11 @@ const DSBanner = (props) => {
124
127
  role: "alert",
125
128
  tabIndex: alertTabIndex,
126
129
  onBlur: handleBlur,
130
+ ...ownerPropsConfig,
127
131
  children: !CustomBody ? /* @__PURE__ */ jsxs(Fragment, { children: [
128
- /* @__PURE__ */ jsx(StyledIconContainer, { "data-testid": DSBannerDatatestid.ICON_CONTAINER, children: icons[type] }),
129
- /* @__PURE__ */ jsx(StyledTitle, { children: label }),
130
- /* @__PURE__ */ jsxs(StyledSubTitle, { children: [
132
+ /* @__PURE__ */ jsx(StyledIconContainer, { "data-testid": DSBannerDatatestid.ICON_CONTAINER, ...ownerPropsConfig, children: icons[type] }),
133
+ /* @__PURE__ */ jsx(StyledTitle, { ...ownerPropsConfig, children: label }),
134
+ /* @__PURE__ */ jsxs(StyledSubTitle, { ...ownerPropsConfig, children: [
131
135
  /* @__PURE__ */ jsx("span", { children: body }),
132
136
  actionLink && /* @__PURE__ */ jsx(
133
137
  StyledActionLink,
@@ -138,8 +142,9 @@ const DSBanner = (props) => {
138
142
  innerRef: linkRef,
139
143
  onKeyDown: handleOnKeyDown,
140
144
  tabIndex: 0,
141
- isBodyEmpty: !Boolean(body),
145
+ isBodyEmpty: !body,
142
146
  title: actionLink.label,
147
+ ...ownerPropsConfig,
143
148
  children: actionLink.label
144
149
  }
145
150
  )
@@ -152,6 +157,7 @@ const DSBanner = (props) => {
152
157
  innerRef: closeBtnRef,
153
158
  onClick: onClose,
154
159
  "aria-label": "Close icon",
160
+ ...ownerPropsConfig,
155
161
  children: /* @__PURE__ */ jsx(CloseX, { width: 12, height: 12 })
156
162
  }
157
163
  ) : null
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSBanner.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useLayoutEffect, useRef, useCallback, useState, useEffect } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { CloseX } from '@elliemae/ds-icons';\nimport { icons } from './utils/icons.js';\nimport { propTypes, defaultProps } from './react-desc-prop-types.js';\nimport { DSBannerDatatestid, DSBannerName } from './exported-related/index.js';\nimport {\n StyledActionLink,\n StyledCloseButton,\n StyledInnerContainer,\n StyledBannerContainer,\n StyledIconContainer,\n StyledSubTitle,\n StyledTitle,\n} from './styles.js';\nimport type { DSBannerT } from './react-desc-prop-types.js';\n\nconst DSBanner: React.ComponentType<DSBannerT.Props> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSBannerT.InternalProps>(props, defaultProps);\n\n const {\n type,\n isOpen,\n onClose,\n label,\n body,\n closeBtnRef,\n CustomBody,\n actionLink,\n showCloseButton,\n containerProps,\n actionRef,\n ...rest\n } = propsWithDefaults;\n // eslint-disable-next-line no-unused-vars\n const { height: globalHeight, ...globalAttrs } = useGetGlobalAttributes(rest);\n\n const xstyledAttrs = useGetXstyledProps(rest);\n\n const innerContainerRef = useRef<HTMLDivElement>(null);\n const linkRef = useRef<HTMLAnchorElement>(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<TypescriptHelpersT.WCAGTabIndex | 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 const handleOnKeyDownToClose = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n onClose();\n }\n },\n [onClose],\n );\n\n useLayoutEffect(() => {\n if (isOpen !== current || isOpen) setIsAnimating(true);\n else setIsAnimating(false);\n }, [isOpen, current]);\n\n const innerCols = React.useMemo(() => {\n if (!CustomBody) {\n const finalCols = ['auto', 'fit-content(50%)', '1fr'];\n if (showCloseButton) finalCols.push('auto');\n return finalCols;\n }\n return ['1fr', 'auto'];\n }, [CustomBody, showCloseButton]);\n\n if (!isAnimating && !isOpen) return null;\n\n return (\n <StyledBannerContainer\n isOpen={isOpen}\n height={height}\n onKeyDown={handleOnKeyDownToClose}\n isAnimating={isAnimating}\n onAnimationEnd={() => {\n setCurrent(isOpen);\n setIsAnimating(false);\n }}\n data-testid={DSBannerDatatestid.CONTAINER}\n {...containerProps}\n {...globalAttrs}\n {...xstyledAttrs}\n >\n <StyledInnerContainer\n cols={innerCols}\n type={type}\n isOpen={isOpen}\n innerRef={innerContainerRef}\n isAnimating={isAnimating}\n data-testid={DSBannerDatatestid.INNER_CONTAINER}\n role=\"alert\"\n tabIndex={alertTabIndex}\n onBlur={handleBlur}\n >\n {!CustomBody ? (\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 innerRef={linkRef}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n isBodyEmpty={!Boolean(body)}\n title={actionLink.label}\n >\n {actionLink.label}\n </StyledActionLink>\n )}\n </StyledSubTitle>\n {showCloseButton ? (\n <StyledCloseButton\n data-testid={DSBannerDatatestid.CLOSE_BUTTON}\n buttonType=\"icon\"\n innerRef={closeBtnRef}\n onClick={onClose}\n aria-label=\"Close icon\"\n >\n <CloseX width={12} height={12} />\n </StyledCloseButton>\n ) : null}\n </>\n ) : (\n <CustomBody />\n )}\n </StyledInnerContainer>\n </StyledBannerContainer>\n );\n};\n\nDSBanner.displayName = DSBannerName;\nconst DSBannerWithSchema = describe(DSBanner);\nDSBannerWithSchema.propTypes = propTypes;\n\nexport default DSBanner;\nexport { DSBanner, DSBannerWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC6Ib,mBACE,KAEA,YAHF;AA5IV,OAAOA,UAAS,iBAAiB,QAAQ,aAAa,UAAU,iBAAiB;AAEjF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,WAAW,oBAAoB;AACxC,SAAS,oBAAoB,oBAAoB;AACjD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,MAAM,WAAiD,CAAC,UAAU;AAChE,QAAM,oBAAoB,6BAAsD,OAAO,YAAY;AAEnG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;A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AChC,SAAS,WAAW;AAAA,kBACpB,MAAM,WAAW;AAAA,kBACjB,UAAU;AAAA,kBACV,WAAW;AAAA,kBACX,UAAU;AAAA,kBACV,aAAa,CAAC,QAAQ,IAAI;AAAA,kBAC1B,OAAO,WAAW;AAAA,kBAEjB,qBAAW;AAAA;AAAA,cACd;AAAA,eAEJ;AAAA,YACC,kBACC;AAAA,cAAC;AAAA;AAAA,gBACC,eAAa,mBAAmB;AAAA,gBAChC,YAAW;AAAA,gBACX,UAAU;AAAA,gBACV,SAAS;AAAA,gBACT,cAAW;AAAA,gBAEX,8BAAC,UAAO,OAAO,IAAI,QAAQ,IAAI;AAAA;AAAA,YACjC,IACE;AAAA,aACN,IAEA,oBAAC,cAAW;AAAA;AAAA,MAEhB;AAAA;AAAA,EACF;AAEJ;AAEA,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { CloseX } from '@elliemae/ds-icons';\nimport {\n describe,\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { DSBannerDatatestid, DSBannerName } from './exported-related/index.js';\nimport type { DSBannerT } from './react-desc-prop-types.js';\nimport { defaultProps, propTypes } from './react-desc-prop-types.js';\nimport {\n StyledActionLink,\n StyledBannerContainer,\n StyledCloseButton,\n StyledIconContainer,\n StyledInnerContainer,\n StyledSubTitle,\n StyledTitle,\n} from './styles.js';\nimport { icons } from './utils/icons.js';\n\nconst DSBanner: React.ComponentType<DSBannerT.Props> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSBannerT.InternalProps>(props, defaultProps);\n\n const {\n type,\n isOpen,\n onClose,\n label,\n body,\n closeBtnRef,\n CustomBody,\n actionLink,\n showCloseButton,\n containerProps,\n actionRef,\n ...rest\n } = propsWithDefaults;\n // eslint-disable-next-line no-unused-vars\n const { height: globalHeight, ...globalAttrs } = useGetGlobalAttributes(rest);\n const ownerPropsConfig = useOwnerProps(propsWithDefaults, { ...props });\n\n const xstyledAttrs = useGetXstyledProps(rest);\n\n const innerContainerRef = useRef<HTMLDivElement>(null);\n const linkRef = useRef<HTMLAnchorElement>(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<TypescriptHelpersT.WCAGTabIndex | 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 const handleOnKeyDownToClose = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n onClose();\n }\n },\n [onClose],\n );\n\n useLayoutEffect(() => {\n if (isOpen !== current || isOpen) setIsAnimating(true);\n else setIsAnimating(false);\n }, [isOpen, current]);\n\n const innerCols = React.useMemo(() => {\n if (!CustomBody) {\n const finalCols = ['auto', 'fit-content(50%)', '1fr'];\n if (showCloseButton) finalCols.push('auto');\n return finalCols;\n }\n return ['1fr', 'auto'];\n }, [CustomBody, showCloseButton]);\n\n if (!isAnimating && !isOpen) return null;\n\n return (\n <StyledBannerContainer\n isOpen={isOpen}\n height={height}\n onKeyDown={handleOnKeyDownToClose}\n isAnimating={isAnimating}\n onAnimationEnd={() => {\n setCurrent(isOpen);\n setIsAnimating(false);\n }}\n data-testid={DSBannerDatatestid.CONTAINER}\n {...containerProps}\n {...globalAttrs}\n {...xstyledAttrs}\n {...ownerPropsConfig}\n >\n <StyledInnerContainer\n cols={innerCols}\n type={type}\n isOpen={isOpen}\n innerRef={innerContainerRef}\n isAnimating={isAnimating}\n data-testid={DSBannerDatatestid.INNER_CONTAINER}\n role=\"alert\"\n tabIndex={alertTabIndex}\n onBlur={handleBlur}\n {...ownerPropsConfig}\n >\n {!CustomBody ? (\n <>\n <StyledIconContainer data-testid={DSBannerDatatestid.ICON_CONTAINER} {...ownerPropsConfig}>\n {icons[type]}\n </StyledIconContainer>\n <StyledTitle {...ownerPropsConfig}>{label}</StyledTitle>\n <StyledSubTitle {...ownerPropsConfig}>\n <span>{body}</span>\n {actionLink && (\n <StyledActionLink\n data-testid={DSBannerDatatestid.ACTION_LINK}\n onClick={actionLink.onClick}\n href={actionLink.href}\n innerRef={linkRef}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n isBodyEmpty={!body}\n title={actionLink.label}\n {...ownerPropsConfig}\n >\n {actionLink.label}\n </StyledActionLink>\n )}\n </StyledSubTitle>\n {showCloseButton ? (\n <StyledCloseButton\n data-testid={DSBannerDatatestid.CLOSE_BUTTON}\n buttonType=\"icon\"\n innerRef={closeBtnRef}\n onClick={onClose}\n aria-label=\"Close icon\"\n {...ownerPropsConfig}\n >\n <CloseX width={12} height={12} />\n </StyledCloseButton>\n ) : null}\n </>\n ) : (\n <CustomBody />\n )}\n </StyledInnerContainer>\n </StyledBannerContainer>\n );\n};\n\nDSBanner.displayName = DSBannerName;\nconst DSBannerWithSchema = describe(DSBanner);\nDSBannerWithSchema.prop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AA;AAAA,EACF;AAEJ;AAEA,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,5 +1,32 @@
1
1
  import * as React from "react";
2
- export * from "./DSBannerDatatestid.js";
3
- export * from "./theming.js";
4
- export * from "./bannerTypes.js";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ const DSBannerName = "DSBanner";
4
+ const BANNER_TYPES = {
5
+ INFO: "info",
6
+ SUCCESS: "success",
7
+ WARNING: "warning",
8
+ DANGER: "danger"
9
+ };
10
+ const DSBannerSlots = {
11
+ CONTAINER: "container",
12
+ INNER_CONTAINER: "inner-container",
13
+ CUSTOM_CONTAINER: "custom-container",
14
+ TITLE: "title",
15
+ SUBTITLE: "subtitle",
16
+ ICON_CONTAINER: "icon-container",
17
+ ACTION_LINK: "action-link",
18
+ CLOSE_BUTTON: "close-button"
19
+ };
20
+ const DSBannerDatatestid = {
21
+ ...slotObjectToDataTestIds(DSBannerName, DSBannerSlots),
22
+ // handling the rest of the data-testids that are not compatible with the slotObjectToDataTestIds function manually to avoid breaking changes
23
+ INNER_CONTAINER: "ds-banner",
24
+ ICON_CONTAINER: "ds-banner-icon"
25
+ };
26
+ export {
27
+ BANNER_TYPES,
28
+ DSBannerDatatestid,
29
+ DSBannerName,
30
+ DSBannerSlots
31
+ };
5
32
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSBannerDatatestid.js';\nexport * from './theming.js';\nexport * from './bannerTypes.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSBannerName = 'DSBanner';\nexport const BANNER_TYPES = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n DANGER: 'danger',\n} as const;\n\n// previously this was the exported data-testid object\n// the one marked as // ok are the one that works with the slots convention and works with the slotObjectToDataTestIds function\n// the rest are not compatible and needs manual handling\n// export const DSBannerDatatestid = {\n// CONTAINER: 'ds-banner-container', // ok\n// CUSTOM_CONTAINER: 'ds-banner-custom-container', // ok\n// ACTION_LINK: 'ds-banner-action-link', // ok\n// CLOSE_BUTTON: 'ds-banner-close-button', // ok\n// // From here down are not compatible with the slotObjectToDataTestIds function.\n// INNER_CONTAINER: 'ds-banner',\n// ICON_CONTAINER: 'ds-banner-icon',\n// // from here they were not present but they had an asigned Slot.\n// // TITLE\n// // SUBTITLE\n// };\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\n\nexport const DSBannerSlots = {\n CONTAINER: 'container',\n INNER_CONTAINER: 'inner-container',\n CUSTOM_CONTAINER: 'custom-container',\n TITLE: 'title',\n SUBTITLE: 'subtitle',\n ICON_CONTAINER: 'icon-container',\n ACTION_LINK: 'action-link',\n CLOSE_BUTTON: 'close-button',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const DSBannerDatatestid = {\n ...(slotObjectToDataTestIds(DSBannerName, DSBannerSlots) as Record<keyof typeof DSBannerSlots, string>),\n // handling the rest of the data-testids that are not compatible with the slotObjectToDataTestIds function manually to avoid breaking changes\n INNER_CONTAINER: 'ds-banner',\n ICON_CONTAINER: 'ds-banner-icon',\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,eAAe;AACrB,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAoBO,MAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,cAAc;AAChB;AAGO,MAAM,qBAAqB;AAAA,EAChC,GAAI,wBAAwB,cAAc,aAAa;AAAA;AAAA,EAEvD,iBAAiB;AAAA,EACjB,gBAAgB;AAClB;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,9 @@
1
1
  import * as React from "react";
2
- import { styled, xStyledCommonProps } from "@elliemae/ds-system";
3
2
  import { DSButtonV2 } from "@elliemae/ds-button-v2";
4
- import { handleAnimation, handleBorderColor } from "./utils/styleHelpers.js";
5
- import { DSBannerName, DSBannerSlots } from "./exported-related/index.js";
6
3
  import { Grid } from "@elliemae/ds-grid";
4
+ import { styled, xStyledCommonProps } from "@elliemae/ds-system";
5
+ import { DSBannerName, DSBannerSlots } from "./exported-related/index.js";
6
+ import { handleAnimation, handleBorderColor } from "./utils/styleHelpers.js";
7
7
  const StyledBannerContainer = styled("div", {
8
8
  name: DSBannerName,
9
9
  slot: DSBannerSlots.CONTAINER
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport type { SizingProps, LayoutProps, SpaceProps, ColorProps } from '@elliemae/ds-system';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { handleAnimation, handleBorderColor } from './utils/styleHelpers.js';\nimport { DSBannerName, DSBannerSlots } from './exported-related/index.js';\nimport type { DSBannerT } from './react-desc-prop-types.js';\nimport { Grid } from '@elliemae/ds-grid';\nimport type {} from '@xstyled/util';\nimport type {} from '@xstyled/system';\n\ninterface StyledBannerContainerT extends SizingProps, LayoutProps, SpaceProps, ColorProps {\n isOpen: boolean;\n isAnimating: boolean;\n height: number;\n}\n\ninterface StyledInnerContainerT {\n type: DSBannerT.BannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n}\n\ninterface StyledActionLinkT {\n isBodyEmpty: boolean;\n}\n\nexport const StyledBannerContainer = styled('div', {\n name: DSBannerName,\n slot: DSBannerSlots.CONTAINER,\n})<StyledBannerContainerT>`\n overflow: ${({ isAnimating }) => (!isAnimating ? 'visible' : 'hidden')};\n height: ${({ isAnimating, height }) => (!isAnimating ? 'auto' : `${height}px`)};\n ${({ isAnimating, isOpen }) => handleAnimation(isAnimating, isOpen)};\n ${xStyledCommonProps}\n`;\n\nexport const StyledInnerContainer = styled(Grid, {\n name: DSBannerName,\n slot: DSBannerSlots.INNER_CONTAINER,\n})<StyledInnerContainerT>`\n padding-right: 4px;\n min-height: 41px;\n width: 100%;\n background-color: 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`;\n\nexport const StyledIconContainer = styled('div', {\n name: DSBannerName,\n slot: DSBannerSlots.ICON_CONTAINER,\n})`\n padding-top: 8px;\n margin-right: ${({ theme }) => theme.space.xxs};\n margin-left: ${({ theme }) => theme.space.xs};\n min-width: 0px;\n`;\n\nexport const StyledTitle = styled('div', { name: DSBannerName, slot: DSBannerSlots.TITLE })`\n color: neutral-700;\n font-size: ${({ theme }) => theme.fontSizes.label[400]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n padding-top: 9px;\n padding-bottom: 9px;\n font-size: 14px;\n overflow-wrap: break-word;\n white-space: pre-wrap;\n min-width: 0px;\n`;\n\nexport const StyledSubTitle = styled('div', { name: DSBannerName, slot: DSBannerSlots.SUBTITLE })`\n margin-left: ${({ theme }) => theme.space.xs};\n font-size: ${({ theme }) => theme.fontSizes.subTitle[400]};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n padding-top: 9px;\n padding-bottom: 6px;\n font-size: 14px;\n overflow-wrap: break-word;\n white-space: pre-wrap;\n min-width: 0px;\n`;\n\nexport const StyledActionLink = styled('a', { name: DSBannerName, slot: DSBannerSlots.ACTION_LINK })<StyledActionLinkT>`\n margin-left: ${({ theme, isBodyEmpty }) => (!isBodyEmpty ? theme.space.xs : 0)};\n text-decoration: none;\n font-size: 14px;\n line-height: 14px;\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: brand-600;\n min-width: 0px;\n position: relative;\n &:focus {\n &:after {\n position: absolute;\n content: '';\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid brand-700;\n pointer-events: none;\n }\n }\n`;\nexport const StyledCloseButton = styled(DSButtonV2, {\n name: DSBannerName,\n slot: DSBannerSlots.CLOSE_BUTTON,\n})`\n margin-left: ${({ theme }) => theme.space.xxs};\n margin-top: 4px;\n`;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,0BAA0B;AAE3C,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB,yBAAyB;AACnD,SAAS,cAAc,qBAAqB;AAE5C,SAAS,YAAY;AAoBd,MAAM,wBAAwB,OAAO,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,cAAc;AACtB,CAAC;AAAA,cACa,CAAC,EAAE,YAAY,MAAO,CAAC,cAAc,YAAY,QAAS;AAAA,YAC5D,CAAC,EAAE,aAAa,OAAO,MAAO,CAAC,cAAc,SAAS,GAAG,MAAM,IAAK;AAAA,IAC5E,CAAC,EAAE,aAAa,OAAO,MAAM,gBAAgB,aAAa,MAAM,CAAC;AAAA,IACjE,kBAAkB;AAAA;AAGf,MAAM,uBAAuB,OAAO,MAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,cAAc;AACtB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,6BAK4B,CAAC,EAAE,MAAM,MAAM,MAAM,kBAAkB,MAAM,K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AA;AAkBlD,MAAM,oBAAoB,OAAO,YAAY;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,cAAc;AACtB,CAAC;AAAA,iBACgB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,GAAG;AAAA;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport type { ColorProps, LayoutProps, SizingProps, SpaceProps } from '@elliemae/ds-system';\nimport { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport type {} from '@xstyled/system';\nimport type {} from '@xstyled/util';\nimport { DSBannerName, DSBannerSlots } from './exported-related/index.js';\nimport type { DSBannerT } from './react-desc-prop-types.js';\nimport { handleAnimation, handleBorderColor } from './utils/styleHelpers.js';\n\ninterface StyledBannerContainerT extends SizingProps, LayoutProps, SpaceProps, ColorProps {\n isOpen: boolean;\n isAnimating: boolean;\n height: number;\n}\n\ninterface StyledInnerContainerT {\n type: DSBannerT.BannerTypesT;\n isOpen: boolean;\n isAnimating: boolean;\n}\n\ninterface StyledActionLinkT {\n isBodyEmpty: boolean;\n}\n\nexport const StyledBannerContainer = styled('div', {\n name: DSBannerName,\n slot: DSBannerSlots.CONTAINER,\n})<StyledBannerContainerT>`\n overflow: ${({ isAnimating }) => (!isAnimating ? 'visible' : 'hidden')};\n height: ${({ isAnimating, height }) => (!isAnimating ? 'auto' : `${height}px`)};\n ${({ isAnimating, isOpen }) => handleAnimation(isAnimating, isOpen)};\n ${xStyledCommonProps}\n`;\n\nexport const StyledInnerContainer = styled(Grid, {\n name: DSBannerName,\n slot: DSBannerSlots.INNER_CONTAINER,\n})<StyledInnerContainerT>`\n padding-right: 4px;\n min-height: 41px;\n width: 100%;\n background-color: 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`;\n\nexport const StyledIconContainer = styled('div', {\n name: DSBannerName,\n slot: DSBannerSlots.ICON_CONTAINER,\n})`\n padding-top: 8px;\n margin-right: ${({ theme }) => theme.space.xxs};\n margin-left: ${({ theme }) => theme.space.xs};\n min-width: 0px;\n`;\n\nexport const StyledTitle = styled('div', { name: DSBannerName, slot: DSBannerSlots.TITLE })`\n color: neutral-700;\n font-size: ${({ theme }) => theme.fontSizes.label[400]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n padding-top: 9px;\n padding-bottom: 9px;\n font-size: 14px;\n overflow-wrap: break-word;\n white-space: pre-wrap;\n min-width: 0px;\n`;\n\nexport const StyledSubTitle = styled('div', { name: DSBannerName, slot: DSBannerSlots.SUBTITLE })`\n margin-left: ${({ theme }) => theme.space.xs};\n font-size: ${({ theme }) => theme.fontSizes.subTitle[400]};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n padding-top: 9px;\n padding-bottom: 6px;\n font-size: 14px;\n overflow-wrap: break-word;\n white-space: pre-wrap;\n min-width: 0px;\n`;\n\nexport const StyledActionLink = styled('a', { name: DSBannerName, slot: DSBannerSlots.ACTION_LINK })<StyledActionLinkT>`\n margin-left: ${({ theme, isBodyEmpty }) => (!isBodyEmpty ? theme.space.xs : 0)};\n text-decoration: none;\n font-size: 14px;\n line-height: 14px;\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: brand-600;\n min-width: 0px;\n position: relative;\n &:focus {\n &:after {\n position: absolute;\n content: '';\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid brand-700;\n pointer-events: none;\n }\n }\n`;\nexport const StyledCloseButton = styled(DSButtonV2, {\n name: DSBannerName,\n slot: DSBannerSlots.CLOSE_BUTTON,\n})`\n margin-left: ${({ theme }) => theme.space.xxs};\n margin-top: 4px;\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AAErB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MAAM,cAAc,SAAS,CAAC;AAAA,iBAC/E,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,EAAE;AAAA,eAC/B,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,SAAS,GAAG,CAAC;AAAA,iBAC1C,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASlD,MAAM,mBAAmB,OAAO,KAAK,EAAE,MAAM,cAAc,MAAM,cAAc,YAAY,CAAC;AAAA,iBAClF,CAAC,EAAE,OAAO,YAAY,MAAO,CAAC,cAAc,MAAM,MAAM,KAAK,CAAE;AAAA;AAAA;AAAA;AAAA,iBAI/D,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBlD,MAAM,oBAAoB,OAAO,YAAY;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,cAAc;AACtB,CAAC;AAAA,iBACgB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,GAAG;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,27 @@
1
- export * from './DSBannerDatatestid.js';
2
- export * from './theming.js';
3
- export * from './bannerTypes.js';
1
+ export declare const DSBannerName = "DSBanner";
2
+ export declare const BANNER_TYPES: {
3
+ readonly INFO: "info";
4
+ readonly SUCCESS: "success";
5
+ readonly WARNING: "warning";
6
+ readonly DANGER: "danger";
7
+ };
8
+ export declare const DSBannerSlots: {
9
+ readonly CONTAINER: "container";
10
+ readonly INNER_CONTAINER: "inner-container";
11
+ readonly CUSTOM_CONTAINER: "custom-container";
12
+ readonly TITLE: "title";
13
+ readonly SUBTITLE: "subtitle";
14
+ readonly ICON_CONTAINER: "icon-container";
15
+ readonly ACTION_LINK: "action-link";
16
+ readonly CLOSE_BUTTON: "close-button";
17
+ };
18
+ export declare const DSBannerDatatestid: {
19
+ INNER_CONTAINER: string;
20
+ ICON_CONTAINER: string;
21
+ CONTAINER: string;
22
+ CUSTOM_CONTAINER: string;
23
+ TITLE: string;
24
+ SUBTITLE: string;
25
+ ACTION_LINK: string;
26
+ CLOSE_BUTTON: string;
27
+ };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { SizingProps, LayoutProps, SpaceProps, ColorProps } from '@elliemae/ds-system';
2
+ import type { ColorProps, LayoutProps, SizingProps, SpaceProps } from '@elliemae/ds-system';
3
3
  import type { DSBannerT } from './react-desc-prop-types.js';
4
4
  interface StyledBannerContainerT extends SizingProps, LayoutProps, SpaceProps, ColorProps {
5
5
  isOpen: boolean;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const icons: Record<string, JSX.Element>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-banner",
3
- "version": "3.48.2-rc.0",
3
+ "version": "3.49.0-beta.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Banner",
6
6
  "files": [
@@ -66,17 +66,17 @@
66
66
  "dependencies": {
67
67
  "@xstyled/system": "~3.7.3",
68
68
  "@xstyled/util": "3.7.0",
69
- "@elliemae/ds-button-v2": "3.48.2-rc.0",
70
- "@elliemae/ds-grid": "3.48.2-rc.0",
71
- "@elliemae/ds-props-helpers": "3.48.2-rc.0",
72
- "@elliemae/ds-icons": "3.48.2-rc.0",
73
- "@elliemae/ds-system": "3.48.2-rc.0",
74
- "@elliemae/ds-typescript-helpers": "3.48.2-rc.0"
69
+ "@elliemae/ds-button-v2": "3.49.0-beta.2",
70
+ "@elliemae/ds-grid": "3.49.0-beta.2",
71
+ "@elliemae/ds-props-helpers": "3.49.0-beta.2",
72
+ "@elliemae/ds-icons": "3.49.0-beta.2",
73
+ "@elliemae/ds-system": "3.49.0-beta.2",
74
+ "@elliemae/ds-typescript-helpers": "3.49.0-beta.2"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@elliemae/pui-cli": "9.0.0-next.50",
78
78
  "styled-components": "~5.3.9",
79
- "@elliemae/ds-monorepo-devops": "3.48.2-rc.0"
79
+ "@elliemae/ds-monorepo-devops": "3.49.0-beta.2"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "lodash": "^4.17.21",
@@ -1,43 +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 __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var DSBannerDatatestid_exports = {};
30
- __export(DSBannerDatatestid_exports, {
31
- DSBannerDatatestid: () => DSBannerDatatestid
32
- });
33
- module.exports = __toCommonJS(DSBannerDatatestid_exports);
34
- var React = __toESM(require("react"));
35
- const DSBannerDatatestid = {
36
- CONTAINER: "ds-banner-container",
37
- CUSTOM_CONTAINER: "ds-banner-custom-container",
38
- INNER_CONTAINER: "ds-banner",
39
- ICON_CONTAINER: "ds-banner-icon",
40
- ACTION_LINK: "ds-banner-action-link",
41
- CLOSE_BUTTON: "ds-banner-close-button"
42
- };
43
- //# sourceMappingURL=DSBannerDatatestid.js.map
@@ -1,7 +0,0 @@
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 CUSTOM_CONTAINER: 'ds-banner-custom-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,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,cAAc;AAChB;",
6
- "names": []
7
- }
@@ -1,41 +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 __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var bannerTypes_exports = {};
30
- __export(bannerTypes_exports, {
31
- BANNER_TYPES: () => BANNER_TYPES
32
- });
33
- module.exports = __toCommonJS(bannerTypes_exports);
34
- var React = __toESM(require("react"));
35
- const BANNER_TYPES = {
36
- INFO: "info",
37
- SUCCESS: "success",
38
- WARNING: "warning",
39
- DANGER: "danger"
40
- };
41
- //# sourceMappingURL=bannerTypes.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/exported-related/bannerTypes.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
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
- "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
- "names": []
7
- }
@@ -1,47 +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 __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var theming_exports = {};
30
- __export(theming_exports, {
31
- DSBannerName: () => DSBannerName,
32
- DSBannerSlots: () => DSBannerSlots
33
- });
34
- module.exports = __toCommonJS(theming_exports);
35
- var React = __toESM(require("react"));
36
- const DSBannerName = "DSBanner";
37
- const DSBannerSlots = {
38
- CONTAINER: "root",
39
- INNER_CONTAINER: "inner-container",
40
- CUSTOM_CONTAINER: "custom-container",
41
- TITLE: "title",
42
- SUBTITLE: "subtitle",
43
- ICON_CONTAINER: "icon-container",
44
- ACTION_LINK: "action-link",
45
- CLOSE_BUTTON: "close-button"
46
- };
47
- //# sourceMappingURL=theming.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/exported-related/theming.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const DSBannerName = 'DSBanner';\n\nexport const DSBannerSlots = {\n CONTAINER: 'root',\n INNER_CONTAINER: 'inner-container',\n CUSTOM_CONTAINER: 'custom-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,eAAe;AAErB,MAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,cAAc;AAChB;",
6
- "names": []
7
- }
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- const DSBannerDatatestid = {
3
- CONTAINER: "ds-banner-container",
4
- CUSTOM_CONTAINER: "ds-banner-custom-container",
5
- INNER_CONTAINER: "ds-banner",
6
- ICON_CONTAINER: "ds-banner-icon",
7
- ACTION_LINK: "ds-banner-action-link",
8
- CLOSE_BUTTON: "ds-banner-close-button"
9
- };
10
- export {
11
- DSBannerDatatestid
12
- };
13
- //# sourceMappingURL=DSBannerDatatestid.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/DSBannerDatatestid.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSBannerDatatestid = {\n CONTAINER: 'ds-banner-container',\n CUSTOM_CONTAINER: 'ds-banner-custom-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"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,qBAAqB;AAAA,EAChC,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,cAAc;AAChB;",
6
- "names": []
7
- }
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
- const BANNER_TYPES = {
3
- INFO: "info",
4
- SUCCESS: "success",
5
- WARNING: "warning",
6
- DANGER: "danger"
7
- };
8
- export {
9
- BANNER_TYPES
10
- };
11
- //# sourceMappingURL=bannerTypes.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/bannerTypes.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const BANNER_TYPES = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n DANGER: 'danger',\n} as const;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;",
6
- "names": []
7
- }
@@ -1,17 +0,0 @@
1
- import * as React from "react";
2
- const DSBannerName = "DSBanner";
3
- const DSBannerSlots = {
4
- CONTAINER: "root",
5
- INNER_CONTAINER: "inner-container",
6
- CUSTOM_CONTAINER: "custom-container",
7
- TITLE: "title",
8
- SUBTITLE: "subtitle",
9
- ICON_CONTAINER: "icon-container",
10
- ACTION_LINK: "action-link",
11
- CLOSE_BUTTON: "close-button"
12
- };
13
- export {
14
- DSBannerName,
15
- DSBannerSlots
16
- };
17
- //# sourceMappingURL=theming.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/theming.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSBannerName = 'DSBanner';\n\nexport const DSBannerSlots = {\n CONTAINER: 'root',\n INNER_CONTAINER: 'inner-container',\n CUSTOM_CONTAINER: 'custom-container',\n TITLE: 'title',\n SUBTITLE: 'subtitle',\n ICON_CONTAINER: 'icon-container',\n ACTION_LINK: 'action-link',\n CLOSE_BUTTON: 'close-button',\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,eAAe;AAErB,MAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,cAAc;AAChB;",
6
- "names": []
7
- }
@@ -1,8 +0,0 @@
1
- export declare const DSBannerDatatestid: {
2
- CONTAINER: string;
3
- CUSTOM_CONTAINER: string;
4
- INNER_CONTAINER: string;
5
- ICON_CONTAINER: string;
6
- ACTION_LINK: string;
7
- CLOSE_BUTTON: string;
8
- };
@@ -1,6 +0,0 @@
1
- export declare const BANNER_TYPES: {
2
- readonly INFO: "info";
3
- readonly SUCCESS: "success";
4
- readonly WARNING: "warning";
5
- readonly DANGER: "danger";
6
- };
@@ -1,11 +0,0 @@
1
- export declare const DSBannerName = "DSBanner";
2
- export declare const DSBannerSlots: {
3
- CONTAINER: string;
4
- INNER_CONTAINER: string;
5
- CUSTOM_CONTAINER: string;
6
- TITLE: string;
7
- SUBTITLE: string;
8
- ICON_CONTAINER: string;
9
- ACTION_LINK: string;
10
- CLOSE_BUTTON: string;
11
- };