@elliemae/ds-banner 3.52.0-rc.9 → 3.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,7 @@ const DSBanner = (props) => {
63
63
  const xstyledAttrs = (0, import_ds_props_helpers.useGetXstyledProps)(rest);
64
64
  const innerContainerRef = (0, import_react.useRef)(null);
65
65
  const linkRef = (0, import_react.useRef)(null);
66
- const [current, setCurrent] = (0, import_react.useState)(isOpen);
66
+ let { current } = (0, import_react.useRef)(false);
67
67
  const [isAnimating, setIsAnimating] = (0, import_react.useState)(false);
68
68
  const [height, setHeight] = (0, import_react.useState)(0);
69
69
  const [alertTabIndex, setAlertTabIndex] = (0, import_react.useState)(void 0);
@@ -128,7 +128,7 @@ const DSBanner = (props) => {
128
128
  onKeyDown: handleOnKeyDownToClose,
129
129
  isAnimating,
130
130
  onAnimationEnd: () => {
131
- setCurrent(isOpen);
131
+ current = isOpen;
132
132
  setIsAnimating(false);
133
133
  },
134
134
  "data-testid": import_exported_related.DSBannerDatatestid.CONTAINER,
@@ -140,7 +140,8 @@ const DSBanner = (props) => {
140
140
  import_styles.StyledInnerContainer,
141
141
  {
142
142
  cols: innerCols,
143
- type,
143
+ $type: type,
144
+ "data-type": type,
144
145
  isOpen,
145
146
  innerRef: innerContainerRef,
146
147
  isAnimating,
@@ -190,6 +191,6 @@ const DSBanner = (props) => {
190
191
  };
191
192
  DSBanner.displayName = import_exported_related.DSBannerName;
192
193
  const DSBannerWithSchema = (0, import_ds_props_helpers.describe)(DSBanner);
193
- DSBannerWithSchema.propTypes = import_react_desc_prop_types.propTypes;
194
+ DSBannerWithSchema.propTypes = import_react_desc_prop_types.DSBannerPropTypesSchema;
194
195
  var DSBanner_default = DSBanner;
195
196
  //# sourceMappingURL=DSBanner.js.map
@@ -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 { 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;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;AAC5E,QAAM,uBAA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B;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;",
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, DSBannerPropTypesSchema } 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 let { current } = useRef<boolean>(false);\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 current = 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 data-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 = DSBannerPropTypesSchema;\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;ADkJb;AAjJV,sBAAuB;AACvB,8BAMO;AAEP,mBAAiF;AACjF,8BAAiD;AAEjD,mCAAsD;AACtD,oBAQO;AACP,mBAAsB;AAEtB,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;AAC5E,QAAM,uBAAmB,uCAAc,mBAAmB,EAAE,GAAG,MAAM,CAAC;AAEtE,QAAM,mBAAe,4CAAmB,IAAI;AAE5C,QAAM,wBAAoB,qBAAuB,IAAI;AACrD,QAAM,cAAU,qBAA0B,IAAI;AAC9C,MAAI,EAAE,QAAQ,QAAI,qBAAgB,KAAK;AACvC,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAkB,KAAK;AAC7D,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAiB,CAAC;AAC9C,QAAM,CAAC,eAAe,gBAAgB,QAAI,uBAAsD,MAAS;AAEzG,8BAAU,MAAM;AACd,QAAI,kBAAkB,SAAS;AAC7B,gBAAU,kBAAkB,QAAQ,YAAY;AAAA,IAClD;AAAA,EACF,GAAG,CAAC,aAAa,MAAM,CAAC;AAExB,8BAAU,MAAM;AACd,QAAI,aAAa,UAAU,SAAS;AAClC,gBAAU,QAAQ,iBAAiB,MAAM;AACvC,YAAI,kBAAk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AAQ;AAC5C,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
6
6
  "names": ["React"]
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -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,8 +27,16 @@ 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 index_exports = {};
30
+ __export(index_exports, {
31
+ BANNER_TYPES: () => import_exported_related.BANNER_TYPES,
32
+ DSBanner: () => import_DSBanner.DSBanner,
33
+ DSBannerDatatestid: () => import_exported_related.DSBannerDatatestid,
34
+ DSBannerName: () => import_exported_related.DSBannerName,
35
+ DSBannerSlots: () => import_exported_related.DSBannerSlots,
36
+ DSBannerWithSchema: () => import_DSBanner.DSBannerWithSchema
37
+ });
27
38
  module.exports = __toCommonJS(index_exports);
28
39
  var React = __toESM(require("react"));
29
- __reExport(index_exports, require("./DSBanner.js"), module.exports);
30
- __reExport(index_exports, require("./exported-related/index.js"), module.exports);
40
+ var import_DSBanner = require("./DSBanner.js");
41
+ var import_exported_related = require("./exported-related/index.js");
31
42
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["// eslint-disable-next-line no-restricted-exports\nexport * from './DSBanner.js';\nexport * from './exported-related/index.js';\nexport type { DSBannerT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAc,0BADd;AAEA,0BAAc,wCAFd;",
4
+ "sourcesContent": ["// eslint-disable-next-line no-restricted-exports\nexport { DSBanner, DSBannerWithSchema } from './DSBanner.js';\nexport { DSBannerName, BANNER_TYPES, DSBannerSlots, DSBannerDatatestid } from './exported-related/index.js';\nexport type { DSBannerT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,sBAA6C;AAC7C,8BAA8E;",
6
6
  "names": []
7
7
  }
@@ -28,8 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var react_desc_prop_types_exports = {};
30
30
  __export(react_desc_prop_types_exports, {
31
- defaultProps: () => defaultProps,
32
- propTypes: () => propTypes
31
+ DSBannerPropTypes: () => DSBannerPropTypes,
32
+ DSBannerPropTypesSchema: () => DSBannerPropTypesSchema,
33
+ defaultProps: () => defaultProps
33
34
  });
34
35
  module.exports = __toCommonJS(react_desc_prop_types_exports);
35
36
  var React = __toESM(require("react"));
@@ -44,7 +45,7 @@ const defaultProps = {
44
45
  onClose: () => null,
45
46
  showCloseButton: true
46
47
  };
47
- const propTypes = {
48
+ const DSBannerPropTypes = {
48
49
  ...import_ds_props_helpers.globalAttributesPropTypes,
49
50
  ...import_ds_props_helpers.xstyledPropTypes,
50
51
  containerProps: import_ds_props_helpers.PropTypes.object.description("Set of Properties attached to the main container.").defaultValue({}),
@@ -69,4 +70,5 @@ const propTypes = {
69
70
  `
70
71
  ).defaultValue({})
71
72
  };
73
+ const DSBannerPropTypesSchema = DSBannerPropTypes;
72
74
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type { MutableRefObject, RefCallback, WeakValidationMap } from 'react';\nimport type { XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { BANNER_TYPES } from './exported-related/index.js';\n\nexport declare namespace DSBannerT {\n export interface ActionRef {\n focusOnWrapper?: () => void;\n focusOnLink?: () => void;\n }\n\n export interface ActionLinkT {\n label: string;\n onClick?: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | null;\n href?: string;\n }\n\n export type BannerTypesT = (typeof BANNER_TYPES)[keyof typeof BANNER_TYPES];\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n containerProps: Record<string, unknown>;\n label: string;\n body: string;\n type: BannerTypesT;\n isOpen: boolean;\n onClose: () => void | null;\n showCloseButton: boolean;\n }\n\n export interface OptionalProps {\n actionLink?: ActionLinkT;\n CustomBody?: React.ComponentType<Record<string, unknown>>;\n closeBtnRef?: React.MutableRefObject<HTMLButtonElement | null> | RefCallback<HTMLButtonElement>;\n actionRef?: MutableRefObject<ActionRef>;\n }\n export interface Props extends Partial<DefaultProps>, OptionalProps, XstyledProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, XstyledProps, RequiredProps {}\n}\n\nexport const defaultProps: DSBannerT.DefaultProps = {\n containerProps: {},\n label: '',\n body: '',\n type: BANNER_TYPES.INFO,\n isOpen: true,\n onClose: () => null,\n showCloseButton: true,\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 CustomBody: PropTypes.func.description('Banner custom 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 closeBtnRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\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} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAuE;AACvE,8BAA6B;AAuCtB,MAAM,eAAuC;AAAA,EAClD,gBAAgB,CAAC;AAAA,EACjB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM,qCAAa;AAAA,EACnB,QAAQ;AAAA,EACR,SAAS,MAAM;AAAA,EACf,iBAAiB;AACnB;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,gBAAgB,kCAAU,OAAO,YAAY,mDAAmD,EAAE,aAAa,CAAC,CAAC;AAAA,EACjH,OAAO,kCAAU,OAAO,YAAY,eAAe,EAAE,aAAa,EAAE;AAAA,EACpE,MAAM,kCAAU,OAAO,YAAY,qBAAqB,EAAE,aAAa,EAAE;AAAA,EACzE,YAAY,kCAAU,KAAK,YAAY,uBAAuB,EAAE,aAAa,EAAE;AAAA,EAC/E,MAAM,kCAAU,MAAM,OAAO,OAAO,oCAAY,CAAC,EAAE,YAAY,cAAc,EAAE,aAAa,qCAAa,IAAI;AAAA,EAC7G,SAAS,kCAAU,KAAK,YAAY,kCAAkC;AAAA,EACtE,QAAQ,kCAAU,KAAK,YAAY,uCAAuC,EAAE,aAAa,IAAI;AAAA,EAC7F,iBAAiB,kCAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,IAAI;AAAA,EACrG,aAAa,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EACjH,YAAY,kCAAU,MAAM;AAAA,IAC1B,OAAO,kCAAU;AAAA,IACjB,SAAS,kCAAU;AAAA,IACnB,MAAM,kCAAU;AAAA,EAClB,CAAC,EACE,YAAY,iCAAiC,EAC7C,aAAa,CAAC,CAAC;AAAA,EAClB,WAAW,kCAAU,OAClB;AAAA,IACC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,aAAa,CAAC,CAAC;AACpB;",
4
+ "sourcesContent": ["import type { MutableRefObject, RefCallback } from 'react';\nimport type { XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { BANNER_TYPES } from './exported-related/index.js';\n\nexport declare namespace DSBannerT {\n export interface ActionRef {\n focusOnWrapper?: () => void;\n focusOnLink?: () => void;\n }\n\n export interface ActionLinkT {\n label: string;\n onClick?: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | null;\n href?: string;\n }\n\n export type BannerTypesT = (typeof BANNER_TYPES)[keyof typeof BANNER_TYPES];\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n containerProps: Record<string, unknown>;\n label: string;\n body: string;\n type: BannerTypesT;\n isOpen: boolean;\n onClose: () => void | null;\n showCloseButton: boolean;\n }\n\n export interface OptionalProps {\n actionLink?: ActionLinkT;\n CustomBody?: React.ComponentType<Record<string, unknown>>;\n closeBtnRef?: React.MutableRefObject<HTMLButtonElement | null> | RefCallback<HTMLButtonElement>;\n actionRef?: MutableRefObject<ActionRef>;\n }\n export interface Props extends Partial<DefaultProps>, OptionalProps, XstyledProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, XstyledProps, RequiredProps {}\n}\n\nexport const defaultProps: DSBannerT.DefaultProps = {\n containerProps: {},\n label: '',\n body: '',\n type: BANNER_TYPES.INFO,\n isOpen: true,\n onClose: () => null,\n showCloseButton: true,\n};\n\nexport const DSBannerPropTypes: DSPropTypesSchema<DSBannerT.Props> = {\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 CustomBody: PropTypes.func.description('Banner custom 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 closeBtnRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\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\nexport const DSBannerPropTypesSchema = DSBannerPropTypes as unknown as ValidationMap<DSBannerT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAuE;AACvE,8BAA6B;AAuCtB,MAAM,eAAuC;AAAA,EAClD,gBAAgB,CAAC;AAAA,EACjB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM,qCAAa;AAAA,EACnB,QAAQ;AAAA,EACR,SAAS,MAAM;AAAA,EACf,iBAAiB;AACnB;AAEO,MAAM,oBAAwD;AAAA,EACnE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,gBAAgB,kCAAU,OAAO,YAAY,mDAAmD,EAAE,aAAa,CAAC,CAAC;AAAA,EACjH,OAAO,kCAAU,OAAO,YAAY,eAAe,EAAE,aAAa,EAAE;AAAA,EACpE,MAAM,kCAAU,OAAO,YAAY,qBAAqB,EAAE,aAAa,EAAE;AAAA,EACzE,YAAY,kCAAU,KAAK,YAAY,uBAAuB,EAAE,aAAa,EAAE;AAAA,EAC/E,MAAM,kCAAU,MAAM,OAAO,OAAO,oCAAY,CAAC,EAAE,YAAY,cAAc,EAAE,aAAa,qCAAa,IAAI;AAAA,EAC7G,SAAS,kCAAU,KAAK,YAAY,kCAAkC;AAAA,EACtE,QAAQ,kCAAU,KAAK,YAAY,uCAAuC,EAAE,aAAa,IAAI;AAAA,EAC7F,iBAAiB,kCAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,IAAI;AAAA,EACrG,aAAa,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EACjH,YAAY,kCAAU,MAAM;AAAA,IAC1B,OAAO,kCAAU;AAAA,IACjB,SAAS,kCAAU;AAAA,IACnB,MAAM,kCAAU;AAAA,EAClB,CAAC,EACE,YAAY,iCAAiC,EAC7C,aAAa,CAAC,CAAC;AAAA,EAClB,WAAW,kCAAU,OAClB;AAAA,IACC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,aAAa,CAAC,CAAC;AACpB;AAEO,MAAM,0BAA0B;",
6
6
  "names": []
7
7
  }
@@ -60,8 +60,9 @@ const StyledInnerContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, {
60
60
  min-height: 41px;
61
61
  width: 100%;
62
62
  background-color: neutral-000;
63
- border-bottom: 5px solid ${({ type, theme }) => (0, import_styleHelpers.handleBorderColor)(type, theme)};
63
+ border-bottom: 5px solid ${({ $type, theme }) => (0, import_styleHelpers.handleBorderColor)($type, theme)};
64
64
  transform: translateY(${({ isOpen }) => isOpen ? "0" : "-100%"});
65
+ transition: transform 0.5s ease-in-out;
65
66
  ${({ isAnimating, isOpen }) => (0, import_styleHelpers.handleAnimation)(isAnimating, isOpen)};
66
67
  `;
67
68
  const StyledIconContainer = (0, import_ds_system.styled)("div", {
@@ -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 { 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;AAAA;AAAA;AAAA;AAAA,6BAK4B,CAAC,EAAE,MAAM,MAAM,U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A;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 transition: transform 0.5s ease-in-out;\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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AAE,MAAM,MAAM,MAAM,YAAY,QAAQ;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;",
6
6
  "names": []
7
7
  }
@@ -10,7 +10,7 @@ import {
10
10
  } from "@elliemae/ds-props-helpers";
11
11
  import React2, { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
12
12
  import { DSBannerDatatestid, DSBannerName } from "./exported-related/index.js";
13
- import { defaultProps, propTypes } from "./react-desc-prop-types.js";
13
+ import { defaultProps, DSBannerPropTypesSchema } from "./react-desc-prop-types.js";
14
14
  import {
15
15
  StyledActionLink,
16
16
  StyledBannerContainer,
@@ -42,7 +42,7 @@ const DSBanner = (props) => {
42
42
  const xstyledAttrs = useGetXstyledProps(rest);
43
43
  const innerContainerRef = useRef(null);
44
44
  const linkRef = useRef(null);
45
- const [current, setCurrent] = useState(isOpen);
45
+ let { current } = useRef(false);
46
46
  const [isAnimating, setIsAnimating] = useState(false);
47
47
  const [height, setHeight] = useState(0);
48
48
  const [alertTabIndex, setAlertTabIndex] = useState(void 0);
@@ -107,7 +107,7 @@ const DSBanner = (props) => {
107
107
  onKeyDown: handleOnKeyDownToClose,
108
108
  isAnimating,
109
109
  onAnimationEnd: () => {
110
- setCurrent(isOpen);
110
+ current = isOpen;
111
111
  setIsAnimating(false);
112
112
  },
113
113
  "data-testid": DSBannerDatatestid.CONTAINER,
@@ -119,7 +119,8 @@ const DSBanner = (props) => {
119
119
  StyledInnerContainer,
120
120
  {
121
121
  cols: innerCols,
122
- type,
122
+ $type: type,
123
+ "data-type": type,
123
124
  isOpen,
124
125
  innerRef: innerContainerRef,
125
126
  isAnimating,
@@ -169,7 +170,7 @@ const DSBanner = (props) => {
169
170
  };
170
171
  DSBanner.displayName = DSBannerName;
171
172
  const DSBannerWithSchema = describe(DSBanner);
172
- DSBannerWithSchema.propTypes = propTypes;
173
+ DSBannerWithSchema.propTypes = DSBannerPropTypesSchema;
173
174
  var DSBanner_default = DSBanner;
174
175
  export {
175
176
  DSBanner,
@@ -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 { 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"],
5
- "mappings": "AAAA,YAAY,WAAW;ACiJb,mBACE,KAIA,YALF;AAhJV,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,OAAOA,UAAS,aAAa,WAAW,iBAAiB,QAAQ,gBAAgB;AACjF,SAAS,oBAAoB,oBAAoB;AAEjD,SAAS,cAAc,iBAAiB;AACxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,aAAa;AAEtB,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;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,EAAE,QAAQ,cAAc,GAAG,YAAY,IAAI,uBAAuB,IAAI;AAC5E,QAAM,mBAAmB,cAAc,mBAAmB,EAAE,GAAG,MAAM,CAAC;AAEtE,QAAM,eAAe,mBAAmB,IAAI;AAE5C,QAAM,oBAAoB,OAAuB,IAAI;AACrD,QAAM,UAAU,OAA0B,IAAI;AAC9C,QAAM,CAAC,SAAS,UAAU,IAAI,SA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AA,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,gBACV,GAAG;AAAA,gBAEJ,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, DSBannerPropTypesSchema } 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 let { current } = useRef<boolean>(false);\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 current = 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 data-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 = DSBannerPropTypesSchema;\n\nexport default DSBanner;\nexport { DSBanner, DSBannerWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACkJb,mBACE,KAIA,YALF;AAjJV,SAAS,cAAc;AACvB;AAAA,EACE;AAAA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
package/dist/esm/index.js CHANGED
@@ -1,4 +1,12 @@
1
1
  import * as React from "react";
2
- export * from "./DSBanner.js";
3
- export * from "./exported-related/index.js";
2
+ import { DSBanner, DSBannerWithSchema } from "./DSBanner.js";
3
+ import { DSBannerName, BANNER_TYPES, DSBannerSlots, DSBannerDatatestid } from "./exported-related/index.js";
4
+ export {
5
+ BANNER_TYPES,
6
+ DSBanner,
7
+ DSBannerDatatestid,
8
+ DSBannerName,
9
+ DSBannerSlots,
10
+ DSBannerWithSchema
11
+ };
4
12
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// eslint-disable-next-line no-restricted-exports\nexport * from './DSBanner.js';\nexport * from './exported-related/index.js';\nexport type { DSBannerT } from './react-desc-prop-types.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// eslint-disable-next-line no-restricted-exports\nexport { DSBanner, DSBannerWithSchema } from './DSBanner.js';\nexport { DSBannerName, BANNER_TYPES, DSBannerSlots, DSBannerDatatestid } from './exported-related/index.js';\nexport type { DSBannerT } from './react-desc-prop-types.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,UAAU,0BAA0B;AAC7C,SAAS,cAAc,cAAc,eAAe,0BAA0B;",
6
6
  "names": []
7
7
  }
@@ -10,7 +10,7 @@ const defaultProps = {
10
10
  onClose: () => null,
11
11
  showCloseButton: true
12
12
  };
13
- const propTypes = {
13
+ const DSBannerPropTypes = {
14
14
  ...globalAttributesPropTypes,
15
15
  ...xstyledPropTypes,
16
16
  containerProps: PropTypes.object.description("Set of Properties attached to the main container.").defaultValue({}),
@@ -35,8 +35,10 @@ const propTypes = {
35
35
  `
36
36
  ).defaultValue({})
37
37
  };
38
+ const DSBannerPropTypesSchema = DSBannerPropTypes;
38
39
  export {
39
- defaultProps,
40
- propTypes
40
+ DSBannerPropTypes,
41
+ DSBannerPropTypesSchema,
42
+ defaultProps
41
43
  };
42
44
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { MutableRefObject, RefCallback, WeakValidationMap } from 'react';\nimport type { XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { BANNER_TYPES } from './exported-related/index.js';\n\nexport declare namespace DSBannerT {\n export interface ActionRef {\n focusOnWrapper?: () => void;\n focusOnLink?: () => void;\n }\n\n export interface ActionLinkT {\n label: string;\n onClick?: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | null;\n href?: string;\n }\n\n export type BannerTypesT = (typeof BANNER_TYPES)[keyof typeof BANNER_TYPES];\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n containerProps: Record<string, unknown>;\n label: string;\n body: string;\n type: BannerTypesT;\n isOpen: boolean;\n onClose: () => void | null;\n showCloseButton: boolean;\n }\n\n export interface OptionalProps {\n actionLink?: ActionLinkT;\n CustomBody?: React.ComponentType<Record<string, unknown>>;\n closeBtnRef?: React.MutableRefObject<HTMLButtonElement | null> | RefCallback<HTMLButtonElement>;\n actionRef?: MutableRefObject<ActionRef>;\n }\n export interface Props extends Partial<DefaultProps>, OptionalProps, XstyledProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, XstyledProps, RequiredProps {}\n}\n\nexport const defaultProps: DSBannerT.DefaultProps = {\n containerProps: {},\n label: '',\n body: '',\n type: BANNER_TYPES.INFO,\n isOpen: true,\n onClose: () => null,\n showCloseButton: true,\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 CustomBody: PropTypes.func.description('Banner custom 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 closeBtnRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\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} as WeakValidationMap<unknown>;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,2BAA2B,wBAAwB;AACvE,SAAS,oBAAoB;AAuCtB,MAAM,eAAuC;AAAA,EAClD,gBAAgB,CAAC;AAAA,EACjB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM,aAAa;AAAA,EACnB,QAAQ;AAAA,EACR,SAAS,MAAM;AAAA,EACf,iBAAiB;AACnB;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,gBAAgB,UAAU,OAAO,YAAY,mDAAmD,EAAE,aAAa,CAAC,CAAC;AAAA,EACjH,OAAO,UAAU,OAAO,YAAY,eAAe,EAAE,aAAa,EAAE;AAAA,EACpE,MAAM,UAAU,OAAO,YAAY,qBAAqB,EAAE,aAAa,EAAE;AAAA,EACzE,YAAY,UAAU,KAAK,YAAY,uBAAuB,EAAE,aAAa,EAAE;AAAA,EAC/E,MAAM,UAAU,MAAM,OAAO,OAAO,YAAY,CAAC,EAAE,YAAY,cAAc,EAAE,aAAa,aAAa,IAAI;AAAA,EAC7G,SAAS,UAAU,KAAK,YAAY,kCAAkC;AAAA,EACtE,QAAQ,UAAU,KAAK,YAAY,uCAAuC,EAAE,aAAa,IAAI;AAAA,EAC7F,iBAAiB,UAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,IAAI;AAAA,EACrG,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EACjH,YAAY,UAAU,MAAM;AAAA,IAC1B,OAAO,UAAU;AAAA,IACjB,SAAS,UAAU;AAAA,IACnB,MAAM,UAAU;AAAA,EAClB,CAAC,EACE,YAAY,iCAAiC,EAC7C,aAAa,CAAC,CAAC;AAAA,EAClB,WAAW,UAAU,OAClB;AAAA,IACC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,aAAa,CAAC,CAAC;AACpB;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { MutableRefObject, RefCallback } from 'react';\nimport type { XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { BANNER_TYPES } from './exported-related/index.js';\n\nexport declare namespace DSBannerT {\n export interface ActionRef {\n focusOnWrapper?: () => void;\n focusOnLink?: () => void;\n }\n\n export interface ActionLinkT {\n label: string;\n onClick?: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void | null;\n href?: string;\n }\n\n export type BannerTypesT = (typeof BANNER_TYPES)[keyof typeof BANNER_TYPES];\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n containerProps: Record<string, unknown>;\n label: string;\n body: string;\n type: BannerTypesT;\n isOpen: boolean;\n onClose: () => void | null;\n showCloseButton: boolean;\n }\n\n export interface OptionalProps {\n actionLink?: ActionLinkT;\n CustomBody?: React.ComponentType<Record<string, unknown>>;\n closeBtnRef?: React.MutableRefObject<HTMLButtonElement | null> | RefCallback<HTMLButtonElement>;\n actionRef?: MutableRefObject<ActionRef>;\n }\n export interface Props extends Partial<DefaultProps>, OptionalProps, XstyledProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, XstyledProps, RequiredProps {}\n}\n\nexport const defaultProps: DSBannerT.DefaultProps = {\n containerProps: {},\n label: '',\n body: '',\n type: BANNER_TYPES.INFO,\n isOpen: true,\n onClose: () => null,\n showCloseButton: true,\n};\n\nexport const DSBannerPropTypes: DSPropTypesSchema<DSBannerT.Props> = {\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 CustomBody: PropTypes.func.description('Banner custom 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 closeBtnRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\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\nexport const DSBannerPropTypesSchema = DSBannerPropTypes as unknown as ValidationMap<DSBannerT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,2BAA2B,wBAAwB;AACvE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px;
22
22
  width: 100%;
23
23
  background-color: neutral-000;
24
- border-bottom: 5px solid ${({ type, theme }) => handleBorderColor(type, theme)};
24
+ border-bottom: 5px solid ${({ $type, theme }) => handleBorderColor($type, theme)};
25
25
  transform: translateY(${({ isOpen }) => isOpen ? "0" : "-100%"});
26
+ transition: transform 0.5s ease-in-out;
26
27
  ${({ isAnimating, isOpen }) => handleAnimation(isAnimating, isOpen)};
27
28
  `;
28
29
  const StyledIconContainer = styled("div", {
@@ -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 { 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,SAAS,QAAQ,0BAA0B;AAG3C,SAAS,cAAc,qBAAqB;AAE5C,SAAS,iBAAiB,yBAAyB;AAkB5C,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,KAAK,CAAC;AAAA,0BACtD,CAAC,EAAE,OAAO,MAAO,SAAS,MAAM,OAAQ;AAAA,IAC9D,CAAC,EAAE,aAAa,OAAO,MAAM,gBAAgB,aAAa,MAAM,CAAC;AAAA;AAG9D,MAAM,sBAAsB,OAAO,OAAO;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,cAAc;AACtB,CAAC;AAAA;AAAA,kBAEiB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,GAAG;AAAA,iBAC/B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,EAAE;AAAA;AAAA;AAIvC,MAAM,cAAc,OAAO,OAAO,EAAE,MAAM,cAAc,MAAM,cAAc,MAAM,CAAC;AAAA;AAAA,eAE3E,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM,GAAG,CAAC;AAAA,iBACvC,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASnD,MAAM,iBAAiB,OAAO,OAAO,EAAE,MAAM,cAAc,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;",
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 transition: transform 0.5s ease-in-out;\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,SAAS,QAAQ,0BAA0B;AAG3C,SAAS,cAAc,qBAAqB;AAE5C,SAAS,iBAAiB,yBAAyB;AAkB5C,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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AAE;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,3 @@
1
- export * from './DSBanner.js';
2
- export * from './exported-related/index.js';
1
+ export { DSBanner, DSBannerWithSchema } from './DSBanner.js';
2
+ export { DSBannerName, BANNER_TYPES, DSBannerSlots, DSBannerDatatestid } from './exported-related/index.js';
3
3
  export type { DSBannerT } from './react-desc-prop-types.js';
@@ -1,5 +1,6 @@
1
- import type { MutableRefObject, RefCallback, WeakValidationMap } from 'react';
2
- import type { XstyledProps } from '@elliemae/ds-props-helpers';
1
+ /// <reference types="prop-types" />
2
+ import type { MutableRefObject, RefCallback } from 'react';
3
+ import type { XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';
3
4
  import { BANNER_TYPES } from './exported-related/index.js';
4
5
  export declare namespace DSBannerT {
5
6
  interface ActionRef {
@@ -35,4 +36,5 @@ export declare namespace DSBannerT {
35
36
  }
36
37
  }
37
38
  export declare const defaultProps: DSBannerT.DefaultProps;
38
- export declare const propTypes: WeakValidationMap<unknown>;
39
+ export declare const DSBannerPropTypes: DSPropTypesSchema<DSBannerT.Props>;
40
+ export declare const DSBannerPropTypesSchema: ValidationMap<DSBannerT.Props>;
@@ -7,7 +7,7 @@ interface StyledBannerContainerT extends SizingProps, LayoutProps, SpaceProps, C
7
7
  height: number;
8
8
  }
9
9
  interface StyledInnerContainerT {
10
- type: DSBannerT.BannerTypesT;
10
+ $type: DSBannerT.BannerTypesT;
11
11
  isOpen: boolean;
12
12
  isAnimating: boolean;
13
13
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-banner",
3
- "version": "3.52.0-rc.9",
3
+ "version": "3.52.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Banner",
6
6
  "files": [
@@ -38,21 +38,21 @@
38
38
  "dependencies": {
39
39
  "@xstyled/system": "~3.7.3",
40
40
  "@xstyled/util": "~3.7.0",
41
- "@elliemae/ds-grid": "3.52.0-rc.9",
42
- "@elliemae/ds-props-helpers": "3.52.0-rc.9",
43
- "@elliemae/ds-button-v2": "3.52.0-rc.9",
44
- "@elliemae/ds-icons": "3.52.0-rc.9",
45
- "@elliemae/ds-typescript-helpers": "3.52.0-rc.9",
46
- "@elliemae/ds-system": "3.52.0-rc.9"
41
+ "@elliemae/ds-button-v2": "3.52.0",
42
+ "@elliemae/ds-icons": "3.52.0",
43
+ "@elliemae/ds-grid": "3.52.0",
44
+ "@elliemae/ds-system": "3.52.0",
45
+ "@elliemae/ds-props-helpers": "3.52.0",
46
+ "@elliemae/ds-typescript-helpers": "3.52.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@elliemae/pui-cli": "9.0.0-next.55",
49
+ "@elliemae/pui-cli": "9.0.0-next.63",
50
50
  "jest": "~29.7.0",
51
51
  "styled-components": "~5.3.9",
52
- "@elliemae/ds-monorepo-devops": "3.52.0-rc.9"
52
+ "@elliemae/ds-monorepo-devops": "3.52.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "lodash": "^4.17.21",
55
+ "lodash-es": "^4.17.21",
56
56
  "react": "^18.3.1",
57
57
  "react-dom": "^18.3.1",
58
58
  "styled-components": "~5.3.9"