@elliemae/ds-dialog 3.31.4 → 3.32.0-rc.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.
@@ -36,12 +36,11 @@ var import_react = require("react");
36
36
  var import_lodash = require("lodash");
37
37
  var import_uid = require("uid");
38
38
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
39
- var import_defaultProps = require("../defaultProps.js");
40
39
  var import_propTypes = require("../propTypes.js");
41
40
  var import_utils = require("../utils.js");
42
41
  const useDialog = (props) => {
43
42
  (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, import_propTypes.propTypes, "DSDialog");
44
- const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_defaultProps.defaultProps);
43
+ const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_propTypes.defaultProps);
45
44
  const { portalRef, isOpen } = propsWithDefault;
46
45
  const actualPortalRef = (0, import_react.useRef)(null);
47
46
  const containerRef = (0, import_react.useRef)(null);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useDialog.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useEffect, useMemo, useState, useCallback, useRef, useLayoutEffect } from 'react';\nimport { debounce } from 'lodash';\nimport { uid } from 'uid';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { defaultProps } from '../defaultProps.js';\nimport { propTypes } from '../propTypes.js';\nimport { getScrollbarWidth, getCurrentRightPadding } from '../utils.js';\nimport type { DSDialogT } from '../propTypes.js';\nimport type { DSDialogInternalsT } from '../sharedTypes.js';\n\nexport const useDialog = (props: DSDialogT.Props): DSDialogInternalsT.DSDialogContext => {\n useValidateTypescriptPropTypes<DSDialogT.Props>(props, propTypes, 'DSDialog');\n const propsWithDefault = useMemoMergePropsWithDefault<DSDialogT.InternalProps>(props, defaultProps);\n const { portalRef, isOpen } = propsWithDefault;\n\n const actualPortalRef = useRef<HTMLElement | null>(null);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n const [portalInfo, setPortalInfo] = useState<DSDialogInternalsT.PortalInfo>({\n paddingRight: '0px',\n scrollbarWidth: '0px',\n });\n\n const portalClassName = useMemo(() => `ds-dialog-${uid(8)}`, []);\n\n useEffect(() => {\n if (portalRef) actualPortalRef.current = portalRef.current;\n else actualPortalRef.current = document.getElementsByTagName('body')['0'];\n }, [portalRef]);\n\n useLayoutEffect(() => {\n if (actualPortalRef.current) {\n if (isOpen) {\n actualPortalRef.current.classList.add(portalClassName);\n } else {\n actualPortalRef.current.classList.remove(portalClassName);\n }\n }\n }, [actualPortalRef, isOpen, portalClassName]);\n\n useEffect(() => {\n if (actualPortalRef.current) {\n setPortalInfo((prev) => ({\n ...prev,\n paddingRight: getCurrentRightPadding(actualPortalRef.current as HTMLElement),\n }));\n }\n }, []);\n\n const calculateScrollbar = useCallback(() => {\n if (actualPortalRef.current && !isOpen) {\n setPortalInfo((prev) => ({\n ...prev,\n scrollbarWidth: getScrollbarWidth(actualPortalRef.current as HTMLElement),\n }));\n }\n }, [isOpen]);\n\n const debouncedCalculateScrollbar = useMemo(() => debounce(calculateScrollbar, 300), [calculateScrollbar]);\n\n useEffect(() => {\n window.addEventListener('resize', debouncedCalculateScrollbar);\n return () => {\n window.removeEventListener('resize', debouncedCalculateScrollbar);\n };\n }, [calculateScrollbar, debouncedCalculateScrollbar]);\n\n useEffect(() => {\n calculateScrollbar();\n }, [calculateScrollbar, isOpen]);\n\n const ctx = useMemo(\n () => ({\n props: propsWithDefault,\n actualPortalRef,\n containerRef,\n portalInfo,\n portalClassName,\n }),\n [portalClassName, portalInfo, propsWithDefault],\n );\n\n return ctx;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADA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AAsB;AAAA,MAC1E,EAAE;AAAA,IACJ;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,QAAM,kCAA8B,sBAAQ,UAAM,wBAAS,oBAAoB,GAAG,GAAG,CAAC,kBAAkB,CAAC;AAEzG,8BAAU,MAAM;AACd,WAAO,iBAAiB,UAAU,2BAA2B;AAC7D,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,2BAA2B;AAAA,IAClE;AAAA,EACF,GAAG,CAAC,oBAAoB,2BAA2B,CAAC;AAEpD,8BAAU,MAAM;AACd,uBAAmB;AAAA,EACrB,GAAG,CAAC,oBAAoB,MAAM,CAAC;AAE/B,QAAM,UAAM;AAAA,IACV,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,iBAAiB,YAAY,gBAAgB;AAAA,EAChD;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["import { useEffect, useMemo, useState, useCallback, useRef, useLayoutEffect } from 'react';\nimport { debounce } from 'lodash';\nimport { uid } from 'uid';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { propTypes, defaultProps } from '../propTypes.js';\nimport { getScrollbarWidth, getCurrentRightPadding } from '../utils.js';\nimport type { DSDialogT } from '../propTypes.js';\nimport type { DSDialogInternalsT } from '../sharedTypes.js';\n\nexport const useDialog = (props: DSDialogT.Props): DSDialogInternalsT.DSDialogContext => {\n useValidateTypescriptPropTypes<DSDialogT.Props>(props, propTypes, 'DSDialog');\n const propsWithDefault = useMemoMergePropsWithDefault<DSDialogT.InternalProps>(props, defaultProps);\n const { portalRef, isOpen } = propsWithDefault;\n\n const actualPortalRef = useRef<HTMLElement | null>(null);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n const [portalInfo, setPortalInfo] = useState<DSDialogInternalsT.PortalInfo>({\n paddingRight: '0px',\n scrollbarWidth: '0px',\n });\n\n const portalClassName = useMemo(() => `ds-dialog-${uid(8)}`, []);\n\n useEffect(() => {\n if (portalRef) actualPortalRef.current = portalRef.current;\n else actualPortalRef.current = document.getElementsByTagName('body')['0'];\n }, [portalRef]);\n\n useLayoutEffect(() => {\n if (actualPortalRef.current) {\n if (isOpen) {\n actualPortalRef.current.classList.add(portalClassName);\n } else {\n actualPortalRef.current.classList.remove(portalClassName);\n }\n }\n }, [actualPortalRef, isOpen, portalClassName]);\n\n useEffect(() => {\n if (actualPortalRef.current) {\n setPortalInfo((prev) => ({\n ...prev,\n paddingRight: getCurrentRightPadding(actualPortalRef.current as HTMLElement),\n }));\n }\n }, []);\n\n const calculateScrollbar = useCallback(() => {\n if (actualPortalRef.current && !isOpen) {\n setPortalInfo((prev) => ({\n ...prev,\n scrollbarWidth: getScrollbarWidth(actualPortalRef.current as HTMLElement),\n }));\n }\n }, [isOpen]);\n\n const debouncedCalculateScrollbar = useMemo(() => debounce(calculateScrollbar, 300), [calculateScrollbar]);\n\n useEffect(() => {\n window.addEventListener('resize', debouncedCalculateScrollbar);\n return () => {\n window.removeEventListener('resize', debouncedCalculateScrollbar);\n };\n }, [calculateScrollbar, debouncedCalculateScrollbar]);\n\n useEffect(() => {\n calculateScrollbar();\n }, [calculateScrollbar, isOpen]);\n\n const ctx = useMemo(\n () => ({\n props: propsWithDefault,\n actualPortalRef,\n containerRef,\n portalInfo,\n portalClassName,\n }),\n [portalClassName, portalInfo, propsWithDefault],\n );\n\n return ctx;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAmF;AACnF,oBAAyB;AACzB,iBAAoB;AACpB,8BAA6E;AAC7E,uBAAwC;AACxC,mBAA0D;AAInD,MAAM,YAAY,CAAC,UAA+D;AACvF,8DAAgD,OAAO,4BAAW,UAAU;AAC5E,QAAM,uBAAmB,sDAAsD,OAAO,6BAAY;AAClG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WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,2BAA2B;AAAA,IAClE;AAAA,EACF,GAAG,CAAC,oBAAoB,2BAA2B,CAAC;AAEpD,8BAAU,MAAM;AACd,uBAAmB;AAAA,EACrB,GAAG,CAAC,oBAAoB,MAAM,CAAC;AAE/B,QAAM,UAAM;AAAA,IACV,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,iBAAiB,YAAY,gBAAgB;AAAA,EAChD;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { describe, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n} from './styles.js';\nimport type { WeakValidationMap } from 'react';\nimport type {} from '@xstyled/system';\nimport type {} from '@xstyled/util';\n\nDSDialogBody.displayName = 'DSDialogBody';\nDSDialogHeader.displayName = 'DSDialogHeader';\nDSDialogFooter.displayName = 'DSDialogFooter';\nDSDialogSeparator.displayName = 'DSDialogSeparator';\nDSDialogTitle.displayName = 'DSDialogTitle';\nDSDialogAddon.displayName = 'DSDialogAddon';\nDSDialogDefaultLayout.displayName = 'DSDialogDefaultLayout';\nDSDialogPrimaryMessage.displayName = 'DSDialogPrimaryMessage';\nDSDialogSecondaryMessage.displayName = 'DSDialogSecondaryMessage';\n\nconst DSDialogBodyWithSchema = describe(DSDialogBody);\nconst DSDialogHeaderWithSchema = describe(DSDialogHeader);\nconst DSDialogFooterWithSchema = describe(DSDialogFooter);\nconst DSDialogSeparatorWithSchema = describe(DSDialogSeparator);\nconst DSDialogTitleWithSchema = describe(DSDialogTitle);\nconst DSDialogAddonWithSchema = describe(DSDialogAddon);\nconst DSDialogDefaultLayoutWithSchema = describe(DSDialogDefaultLayout);\nconst DSDialogPrimaryMessageWithSchema = describe(DSDialogPrimaryMessage);\nconst DSDialogSecondaryMessageWithSchema = describe(DSDialogSecondaryMessage);\n\nDSDialogBodyWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogHeaderWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogFooterWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogSeparatorWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogTitleWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogAddonWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogDefaultLayoutWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogPrimaryMessageWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogSecondaryMessageWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\n\nexport * from './DSDialog.js';\nexport * from './DSDialogDatatestid.js';\nexport { DSDialogSizes } from './utils.js';\nexport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n DSDialogBodyWithSchema,\n DSDialogHeaderWithSchema,\n DSDialogFooterWithSchema,\n DSDialogSeparatorWithSchema,\n DSDialogTitleWithSchema,\n DSDialogAddonWithSchema,\n DSDialogDefaultLayoutWithSchema,\n DSDialogPrimaryMessageWithSchema,\n DSDialogSecondaryMessageWithSchema,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAoD;AACpD,oBAUO;AAmCP,wBAAc,0BA9Cd;AA+CA,wBAAc,oCA/Cd;AAgDA,mBAA8B;AAhC9B,2BAAa,cAAc;AAC3B,6BAAe,cAAc;AAC7B,6BAAe,cAAc;AAC7B,gCAAkB,cAAc;AAChC,4BAAc,cAAc;AAC5B,4BAAc,cAAc;AAC5B,oCAAsB,cAAc;AACpC,qCAAuB,cAAc;AACrC,uCAAyB,cAAc;AAEvC,MAAM,6BAAyB,kCAAS,0BAAY;AACpD,MAAM,+BAA2B,kCAAS,4BAAc;AACxD,MAAM,+BAA2B,kCAAS,4BAAc;AACxD,MAAM,kCAA8B,kCAAS,+BAAiB;AAC9D,MAAM,8BAA0B,kCAAS,2BAAa;AACtD,MAAM,8BAA0B,kCAAS,2BAAa;AACtD,MAAM,sCAAkC,kCAAS,mCAAqB;AACtE,MAAM,uCAAmC,kCAAS,oCAAsB;AACxE,MAAM,yCAAqC,kCAAS,sCAAwB;AAE5E,uBAAuB,YAAY;AACnC,yBAAyB,YAAY;AACrC,yBAAyB,YAAY;AACrC,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;AACpC,wBAAwB,YAAY;AACpC,gCAAgC,YAAY;AAC5C,iCAAiC,YAAY;AAC7C,mCAAmC,YAAY;",
4
+ "sourcesContent": ["import { describe, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n} from './styles.js';\nimport type { WeakValidationMap } from 'react';\nimport type {} from '@xstyled/system';\nimport type {} from '@xstyled/util';\n\nDSDialogBody.displayName = 'DSDialogBody';\nDSDialogHeader.displayName = 'DSDialogHeader';\nDSDialogFooter.displayName = 'DSDialogFooter';\nDSDialogSeparator.displayName = 'DSDialogSeparator';\nDSDialogTitle.displayName = 'DSDialogTitle';\nDSDialogAddon.displayName = 'DSDialogAddon';\nDSDialogDefaultLayout.displayName = 'DSDialogDefaultLayout';\nDSDialogPrimaryMessage.displayName = 'DSDialogPrimaryMessage';\nDSDialogSecondaryMessage.displayName = 'DSDialogSecondaryMessage';\n\nconst DSDialogBodyWithSchema = describe(DSDialogBody as React.FC);\nconst DSDialogHeaderWithSchema = describe(DSDialogHeader as React.FC);\nconst DSDialogFooterWithSchema = describe(DSDialogFooter as React.FC);\nconst DSDialogSeparatorWithSchema = describe(DSDialogSeparator as React.FC);\nconst DSDialogTitleWithSchema = describe(DSDialogTitle as React.FC);\nconst DSDialogAddonWithSchema = describe(DSDialogAddon as React.FC);\nconst DSDialogDefaultLayoutWithSchema = describe(DSDialogDefaultLayout as React.FC);\nconst DSDialogPrimaryMessageWithSchema = describe(DSDialogPrimaryMessage as React.FC);\nconst DSDialogSecondaryMessageWithSchema = describe(DSDialogSecondaryMessage as React.FC);\n\nDSDialogBodyWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogHeaderWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogFooterWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogSeparatorWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogTitleWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogAddonWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogDefaultLayoutWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogPrimaryMessageWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogSecondaryMessageWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\n\nexport * from './DSDialog.js';\nexport * from './DSDialogDatatestid.js';\nexport { DSDialogSizes } from './utils.js';\nexport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n DSDialogBodyWithSchema,\n DSDialogHeaderWithSchema,\n DSDialogFooterWithSchema,\n DSDialogSeparatorWithSchema,\n DSDialogTitleWithSchema,\n DSDialogAddonWithSchema,\n DSDialogDefaultLayoutWithSchema,\n DSDialogPrimaryMessageWithSchema,\n DSDialogSecondaryMessageWithSchema,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAoD;AACpD,oBAUO;AAmCP,wBAAc,0BA9Cd;AA+CA,wBAAc,oCA/Cd;AAgDA,mBAA8B;AAhC9B,2BAAa,cAAc;AAC3B,6BAAe,cAAc;AAC7B,6BAAe,cAAc;AAC7B,gCAAkB,cAAc;AAChC,4BAAc,cAAc;AAC5B,4BAAc,cAAc;AAC5B,oCAAsB,cAAc;AACpC,qCAAuB,cAAc;AACrC,uCAAyB,cAAc;AAEvC,MAAM,6BAAyB,kCAAS,0BAAwB;AAChE,MAAM,+BAA2B,kCAAS,4BAA0B;AACpE,MAAM,+BAA2B,kCAAS,4BAA0B;AACpE,MAAM,kCAA8B,kCAAS,+BAA6B;AAC1E,MAAM,8BAA0B,kCAAS,2BAAyB;AAClE,MAAM,8BAA0B,kCAAS,2BAAyB;AAClE,MAAM,sCAAkC,kCAAS,mCAAiC;AAClF,MAAM,uCAAmC,kCAAS,oCAAkC;AACpF,MAAM,yCAAqC,kCAAS,sCAAoC;AAExF,uBAAuB,YAAY;AACnC,yBAAyB,YAAY;AACrC,yBAAyB,YAAY;AACrC,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;AACpC,wBAAwB,YAAY;AACpC,gCAAgC,YAAY;AAC5C,iCAAiC,YAAY;AAC7C,mCAAmC,YAAY;",
6
6
  "names": []
7
7
  }
@@ -28,12 +28,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var propTypes_exports = {};
30
30
  __export(propTypes_exports, {
31
+ defaultProps: () => defaultProps,
31
32
  propTypes: () => propTypes
32
33
  });
33
34
  module.exports = __toCommonJS(propTypes_exports);
34
35
  var React = __toESM(require("react"));
35
36
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
37
  var import_utils = require("./utils.js");
38
+ const defaultProps = {
39
+ isOpen: false,
40
+ centered: false,
41
+ size: import_utils.DSDialogSizes.DEFAULT,
42
+ width: "",
43
+ removeAutoFocus: false,
44
+ onClickOutside: () => {
45
+ },
46
+ onClose: () => {
47
+ },
48
+ portalRef: null
49
+ };
37
50
  const propTypes = {
38
51
  ...import_ds_props_helpers.globalAttributesPropTypes,
39
52
  isOpen: import_ds_props_helpers.PropTypes.bool.description("Whether the Dialog is open or not.").defaultValue(false),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/propTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSDialogSizes, DSDialogSizesArrayValues } from './utils.js';\n\nexport declare namespace DSDialogT {\n export type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';\n export interface DefaultProps {\n [key: string]: unknown;\n isOpen: boolean;\n centered: boolean;\n size: Sizes;\n removeAutoFocus: boolean;\n onClickOutside: () => void;\n onClose: () => void;\n portalRef: React.MutableRefObject<HTMLElement | null> | null;\n width: string | number;\n }\n\n export interface PropsRequired {\n children: React.ReactNode;\n }\n\n export interface PropsOptional {\n portalRef?: React.MutableRefObject<HTMLElement | null> | null;\n zIndex?: number;\n width?: string;\n }\n\n export interface InternalProps extends DefaultProps, PropsRequired, PropsOptional {}\n\n export interface Props\n extends Partial<DefaultProps>,\n PropsRequired,\n PropsOptional,\n Omit<GlobalAttributesT<HTMLDivElement>, 'size' | 'width' | 'children'> {}\n}\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n isOpen: PropTypes.bool.description('Whether the Dialog is open or not.').defaultValue(false),\n children: PropTypes.node.description('Nested components.').isRequired,\n centered: PropTypes.bool.description('Centers the Dialog.').defaultValue(false),\n removeAutoFocus: PropTypes.bool\n .description(\n 'Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.',\n )\n .defaultValue(false),\n onClickOutside: PropTypes.func\n .description('Callback that should be used to close the modal when the user clicks outside.')\n .defaultValue(() => {}),\n onClose: PropTypes.func.description('Callback triggered with ESC key.').defaultValue(() => {}),\n size: PropTypes.oneOf(DSDialogSizesArrayValues)\n .description(`Dialog's width size.`)\n .defaultValue(DSDialogSizes.DEFAULT),\n width: PropTypes.string.description('Dialog width.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAqD;AACrD,mBAAwD;AAmCjD,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,QAAQ,kCAAU,KAAK,YAAY,oCAAoC,EAAE,aAAa,KAAK;AAAA,EAC3F,UAAU,kCAAU,KAAK,YAAY,oBAAoB,EAAE;AAAA,EAC3D,UAAU,kCAAU,KAAK,YAAY,qBAAqB,EAAE,aAAa,KAAK;AAAA,EAC9E,iBAAiB,kCAAU,KACxB;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,gBAAgB,kCAAU,KACvB,YAAY,+EAA+E,EAC3F,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACxB,SAAS,kCAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EAC7F,MAAM,kCAAU,MAAM,qCAAwB,EAC3C,YAAY,sBAAsB,EAClC,aAAa,2BAAc,OAAO;AAAA,EACrC,OAAO,kCAAU,OAAO,YAAY,eAAe;AACrD;",
4
+ "sourcesContent": ["import type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSDialogSizes, DSDialogSizesArrayValues } from './utils.js';\n\nexport declare namespace DSDialogT {\n export type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';\n export interface DefaultProps {\n isOpen: boolean;\n centered: boolean;\n size: Sizes;\n removeAutoFocus: boolean;\n onClickOutside: () => void;\n onClose: () => void;\n portalRef: React.MutableRefObject<HTMLElement | null> | null;\n width: string | number;\n }\n\n export interface PropsRequired {\n children: TypescriptHelpersT.ReactChildrenComplete;\n }\n\n export interface PropsOptional {\n zIndex?: number;\n }\n\n export interface InternalProps extends DefaultProps, PropsRequired, PropsOptional {}\n\n export interface Props\n extends Partial<DefaultProps>,\n PropsRequired,\n PropsOptional,\n Omit<GlobalAttributesT<HTMLDivElement>, 'size' | 'width' | 'children'> {}\n}\n\nexport const defaultProps: DSDialogT.DefaultProps = {\n isOpen: false,\n centered: false,\n size: DSDialogSizes.DEFAULT,\n width: '',\n removeAutoFocus: false,\n onClickOutside: () => {},\n onClose: () => {},\n portalRef: null,\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n isOpen: PropTypes.bool.description('Whether the Dialog is open or not.').defaultValue(false),\n children: PropTypes.node.description('Nested components.').isRequired,\n centered: PropTypes.bool.description('Centers the Dialog.').defaultValue(false),\n removeAutoFocus: PropTypes.bool\n .description(\n 'Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.',\n )\n .defaultValue(false),\n onClickOutside: PropTypes.func\n .description('Callback that should be used to close the modal when the user clicks outside.')\n .defaultValue(() => {}),\n onClose: PropTypes.func.description('Callback triggered with ESC key.').defaultValue(() => {}),\n size: PropTypes.oneOf(DSDialogSizesArrayValues)\n .description(`Dialog's width size.`)\n .defaultValue(DSDialogSizes.DEFAULT),\n width: PropTypes.string.description('Dialog width.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAqD;AAErD,mBAAwD;AAgCjD,MAAM,eAAuC;AAAA,EAClD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM,2BAAc;AAAA,EACpB,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,WAAW;AACb;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,QAAQ,kCAAU,KAAK,YAAY,oCAAoC,EAAE,aAAa,KAAK;AAAA,EAC3F,UAAU,kCAAU,KAAK,YAAY,oBAAoB,EAAE;AAAA,EAC3D,UAAU,kCAAU,KAAK,YAAY,qBAAqB,EAAE,aAAa,KAAK;AAAA,EAC9E,iBAAiB,kCAAU,KACxB;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,gBAAgB,kCAAU,KACvB,YAAY,+EAA+E,EAC3F,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACxB,SAAS,kCAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EAC7F,MAAM,kCAAU,MAAM,qCAAwB,EAC3C,YAAY,sBAAsB,EAClC,aAAa,2BAAc,OAAO;AAAA,EACrC,OAAO,kCAAU,OAAO,YAAY,eAAe;AACrD;",
6
6
  "names": []
7
7
  }
@@ -121,7 +121,7 @@ const DSDialogSecondaryMessage = import_ds_system.styled.p`
121
121
  margin: 0;
122
122
  color: ${({ theme }) => theme.colors.neutral[500]};
123
123
  `;
124
- const DSDialogDefaultLayout = import_ds_system.styled.div`
124
+ const DSDialogDefaultLayout = (0, import_ds_system.styled)("div")`
125
125
  display: grid;
126
126
  grid-auto-flow: row;
127
127
  justify-items: center;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport { styled, createGlobalStyle, xStyledCommonProps } from '@elliemae/ds-system';\nimport { allSizes } from './utils.js';\nimport type { DSDialogT } from './propTypes.js';\nimport type { DSDialogInternalsT } from './sharedTypes.js';\n\ninterface PortalStylesT {\n portalInfo: DSDialogInternalsT.PortalInfo;\n portalClassName: string;\n}\n\ninterface StyledDialogBackgroundT {\n zIndex?: number;\n}\n\ninterface StyledDialogContainerT {\n size: DSDialogT.Sizes;\n centered: boolean;\n width: number | string;\n}\n\nexport const PortalStyles = createGlobalStyle<PortalStylesT>`\n ${({ portalClassName }) => `.${portalClassName}`} {\n overflow: hidden;\n ${({ portalInfo }) =>\n portalInfo.scrollbarWidth !== '0px'\n ? `padding-right: calc( ${portalInfo.paddingRight} + ${portalInfo.scrollbarWidth} ) !important;`\n : ``}\n }\n`;\n\nexport const StyledDialogBackground = styled.div<StyledDialogBackgroundT>`\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(37, 41, 47, 50%);\n overflow-y: auto;\n z-index: ${({ zIndex, theme }) => zIndex ?? theme.zIndex.dialog};\n`;\n\nexport const StyledDialogContainer = styled.div<StyledDialogContainerT>`\n height: fit-content;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: ${({ centered }) => (centered ? 'auto' : '20vh auto auto auto')};\n width: ${({ size, width }) => (width === '' ? allSizes[size] : width)};\n min-width: 300px;\n box-shadow: 0 10px 20px 0 ${({ theme }) => theme.colors.neutral[500]};\n background: ${({ theme }) => theme.colors.neutral['000']};\n overflow-y: auto;\n &:focus {\n outline: none;\n }\n max-height: 100vh;\n`;\n\nexport const DSDialogTitle = styled.h3`\n font-size: ${({ theme }) => theme.fontSizes.title[700]};\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n line-height: 28px;\n margin: 0;\n`;\n\nexport const DSDialogAddon = styled.div``;\n\nexport const DSDialogHeader = styled('div')`\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n min-height: ${({ theme }) => theme.space.m};\n padding: 10px ${({ theme }) => theme.space.xs};\n & ${DSDialogTitle} + ${DSDialogAddon} {\n align-self: flex-start;\n justify-self: flex-end;\n }\n & ${DSDialogAddon}:only-child {\n justify-self: flex-end;\n }\n ${xStyledCommonProps}\n`;\n\nexport const DSDialogSeparator = styled.hr.attrs(() => ({ 'aria-hidden': true }))`\n margin: 0;\n border-top: 1px solid ${({ theme }) => theme.colors.neutral['080']};\n`;\n\nexport const DSDialogBody = styled('div')`\n padding: ${({ theme }) => theme.space.xs};\n overflow-y: auto;\n ${xStyledCommonProps}\n`;\n\nexport const DSDialogPrimaryMessage = styled.h3`\n margin: 0;\n`;\n\nexport const DSDialogSecondaryMessage = styled.p`\n margin: 0;\n color: ${({ theme }) => theme.colors.neutral[500]};\n`;\n\nexport const DSDialogDefaultLayout = styled.div`\n display: grid;\n grid-auto-flow: row;\n justify-items: center;\n align-items: center;\n grid-gap: ${({ theme }) => theme.space.xxs};\n\n ${DSDialogSecondaryMessage} {\n text-align: center;\n }\n`;\n\nexport const DSDialogFooter = styled('div')`\n display: grid;\n grid-auto-flow: column;\n align-items: center;\n justify-content: flex-end;\n grid-gap: ${({ theme }) => theme.space.xxs};\n min-height: ${({ theme }) => theme.space.m};\n padding: 0 ${({ theme }) => theme.space.xs};\n ${xStyledCommonProps}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAA8D;AAC9D,mBAAyB;AAmBlB,MAAM,eAAe;AAAA,IACxB,CAAC,EAAE,gBAAgB,MAAM,IAAI;AAAA;AAAA,MAE3B,CAAC,EAAE,WAAW,MACd,WAAW,mBAAmB,QAC1B,wBAAwB,WAAW,kBAAkB,WAAW,iCAChE;AAAA;AAAA;AAIH,MAAM,yBAAyB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAShC,CAAC,EAAE,QAAQ,MAAM,MAAM,UAAU,MAAM,OAAO;AAAA;AAGpD,MAAM,wBAAwB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOhC,CAAC,EAAE,SAAS,MAAO,WAAW,SAAS;AAAA,WACxC,CAAC,EAAE,MAAM,MAAM,MAAO,UAAU,KAAK,sBAAS,IAAI,IAAI;AAAA;AAAA,8BAEnC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA,gBACrD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQlD,MAAM,gBAAgB,wBAAO;AAAA,eACrB,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAShD,MAAM,gBAAgB,wBAAO;AAE7B,MAAM,qBAAiB,yBAAO,KAAK;AAAA;AAAA;AAAA;AAAA,gBAI1B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,kBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,MACvC,mBAAmB;AAAA;AAAA;AAAA;AAAA,MAInB;AAAA;AAAA;AAAA,IAGF;AAAA;AAGG,MAAM,oBAAoB,wBAAO,GAAG,MAAM,OAAO,EAAE,eAAe,KAAK,EAAE;AAAA;AAAA,0BAEtD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAG5D,MAAM,mBAAe,yBAAO,KAAK;AAAA,aAC3B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA,IAEpC;AAAA;AAGG,MAAM,yBAAyB,wBAAO;AAAA;AAAA;AAItC,MAAM,2BAA2B,wBAAO;AAAA;AAAA,WAEpC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAG3C,MAAM,wBAAwB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA,cAK9B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA,IAErC;AAAA;AAAA;AAAA;AAKG,MAAM,qBAAiB,yBAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,cAK5B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,gBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,eAC5B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,IACtC;AAAA;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport { styled, createGlobalStyle, xStyledCommonProps } from '@elliemae/ds-system';\nimport type { XstyledProps } from '@elliemae/ds-props-helpers';\nimport { allSizes } from './utils.js';\nimport type { DSDialogT } from './propTypes.js';\nimport type { DSDialogInternalsT } from './sharedTypes.js';\n\ninterface PortalStylesT {\n portalInfo: DSDialogInternalsT.PortalInfo;\n portalClassName: string;\n}\n\ninterface StyledDialogBackgroundT {\n zIndex?: number;\n}\n\ninterface StyledDialogContainerT {\n size: DSDialogT.Sizes;\n centered: boolean;\n width: number | string;\n}\n\nexport const PortalStyles = createGlobalStyle<PortalStylesT>`\n ${({ portalClassName }) => `.${portalClassName}`} {\n overflow: hidden;\n ${({ portalInfo }) =>\n portalInfo.scrollbarWidth !== '0px'\n ? `padding-right: calc( ${portalInfo.paddingRight} + ${portalInfo.scrollbarWidth} ) !important;`\n : ``}\n }\n`;\n\nexport const StyledDialogBackground = styled.div<StyledDialogBackgroundT>`\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(37, 41, 47, 50%);\n overflow-y: auto;\n z-index: ${({ zIndex, theme }) => zIndex ?? theme.zIndex.dialog};\n`;\n\nexport const StyledDialogContainer = styled.div<StyledDialogContainerT>`\n height: fit-content;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: ${({ centered }) => (centered ? 'auto' : '20vh auto auto auto')};\n width: ${({ size, width }) => (width === '' ? allSizes[size] : width)};\n min-width: 300px;\n box-shadow: 0 10px 20px 0 ${({ theme }) => theme.colors.neutral[500]};\n background: ${({ theme }) => theme.colors.neutral['000']};\n overflow-y: auto;\n &:focus {\n outline: none;\n }\n max-height: 100vh;\n`;\n\nexport const DSDialogTitle = styled.h3`\n font-size: ${({ theme }) => theme.fontSizes.title[700]};\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n line-height: 28px;\n margin: 0;\n`;\n\nexport const DSDialogAddon = styled.div``;\n\nexport const DSDialogHeader = styled('div')<React.PropsWithChildren & XstyledProps>`\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n min-height: ${({ theme }) => theme.space.m};\n padding: 10px ${({ theme }) => theme.space.xs};\n & ${DSDialogTitle} + ${DSDialogAddon} {\n align-self: flex-start;\n justify-self: flex-end;\n }\n & ${DSDialogAddon}:only-child {\n justify-self: flex-end;\n }\n ${xStyledCommonProps}\n`;\n\nexport const DSDialogSeparator = styled.hr.attrs(() => ({ 'aria-hidden': true }))`\n margin: 0;\n border-top: 1px solid ${({ theme }) => theme.colors.neutral['080']};\n`;\n\nexport const DSDialogBody = styled('div')`\n padding: ${({ theme }) => theme.space.xs};\n overflow-y: auto;\n ${xStyledCommonProps}\n`;\n\nexport const DSDialogPrimaryMessage = styled.h3`\n margin: 0;\n`;\n\nexport const DSDialogSecondaryMessage = styled.p`\n margin: 0;\n color: ${({ theme }) => theme.colors.neutral[500]};\n`;\n\nexport const DSDialogDefaultLayout = styled('div')<React.PropsWithChildren>`\n display: grid;\n grid-auto-flow: row;\n justify-items: center;\n align-items: center;\n grid-gap: ${({ theme }) => theme.space.xxs};\n\n ${DSDialogSecondaryMessage} {\n text-align: center;\n }\n`;\n\nexport const DSDialogFooter = styled('div')`\n display: grid;\n grid-auto-flow: column;\n align-items: center;\n justify-content: flex-end;\n grid-gap: ${({ theme }) => theme.space.xxs};\n min-height: ${({ theme }) => theme.space.m};\n padding: 0 ${({ theme }) => theme.space.xs};\n ${xStyledCommonProps}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAA8D;AAE9D,mBAAyB;AAmBlB,MAAM,eAAe;AAAA,IACxB,CAAC,EAAE,gBAAgB,MAAM,IAAI;AAAA;AAAA,MAE3B,CAAC,EAAE,WAAW,MACd,WAAW,mBAAmB,QAC1B,wBAAwB,WAAW,kBAAkB,WAAW,iCAChE;AAAA;AAAA;AAIH,MAAM,yBAAyB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,cAKnC,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA,IAErC;AAAA;AAAA;AAAA;AAKG,MAAM,qBAAiB,yBAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,cAK5B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,gBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,eAC5B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,IACtC;AAAA;",
6
6
  "names": []
7
7
  }
@@ -3,8 +3,7 @@ import { useEffect, useMemo, useState, useCallback, useRef, useLayoutEffect } fr
3
3
  import { debounce } from "lodash";
4
4
  import { uid } from "uid";
5
5
  import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
6
- import { defaultProps } from "../defaultProps.js";
7
- import { propTypes } from "../propTypes.js";
6
+ import { propTypes, defaultProps } from "../propTypes.js";
8
7
  import { getScrollbarWidth, getCurrentRightPadding } from "../utils.js";
9
8
  const useDialog = (props) => {
10
9
  useValidateTypescriptPropTypes(props, propTypes, "DSDialog");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useDialog.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useEffect, useMemo, useState, useCallback, useRef, useLayoutEffect } from 'react';\nimport { debounce } from 'lodash';\nimport { uid } from 'uid';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { defaultProps } from '../defaultProps.js';\nimport { propTypes } from '../propTypes.js';\nimport { getScrollbarWidth, getCurrentRightPadding } from '../utils.js';\nimport type { DSDialogT } from '../propTypes.js';\nimport type { DSDialogInternalsT } from '../sharedTypes.js';\n\nexport const useDialog = (props: DSDialogT.Props): DSDialogInternalsT.DSDialogContext => {\n useValidateTypescriptPropTypes<DSDialogT.Props>(props, propTypes, 'DSDialog');\n const propsWithDefault = useMemoMergePropsWithDefault<DSDialogT.InternalProps>(props, defaultProps);\n const { portalRef, isOpen } = propsWithDefault;\n\n const actualPortalRef = useRef<HTMLElement | null>(null);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n const [portalInfo, setPortalInfo] = useState<DSDialogInternalsT.PortalInfo>({\n paddingRight: '0px',\n scrollbarWidth: '0px',\n });\n\n const portalClassName = useMemo(() => `ds-dialog-${uid(8)}`, []);\n\n useEffect(() => {\n if (portalRef) actualPortalRef.current = portalRef.current;\n else actualPortalRef.current = document.getElementsByTagName('body')['0'];\n }, [portalRef]);\n\n useLayoutEffect(() => {\n if (actualPortalRef.current) {\n if (isOpen) {\n actualPortalRef.current.classList.add(portalClassName);\n } else {\n actualPortalRef.current.classList.remove(portalClassName);\n }\n }\n }, [actualPortalRef, isOpen, portalClassName]);\n\n useEffect(() => {\n if (actualPortalRef.current) {\n setPortalInfo((prev) => ({\n ...prev,\n paddingRight: getCurrentRightPadding(actualPortalRef.current as HTMLElement),\n }));\n }\n }, []);\n\n const calculateScrollbar = useCallback(() => {\n if (actualPortalRef.current && !isOpen) {\n setPortalInfo((prev) => ({\n ...prev,\n scrollbarWidth: getScrollbarWidth(actualPortalRef.current as HTMLElement),\n }));\n }\n }, [isOpen]);\n\n const debouncedCalculateScrollbar = useMemo(() => debounce(calculateScrollbar, 300), [calculateScrollbar]);\n\n useEffect(() => {\n window.addEventListener('resize', debouncedCalculateScrollbar);\n return () => {\n window.removeEventListener('resize', debouncedCalculateScrollbar);\n };\n }, [calculateScrollbar, debouncedCalculateScrollbar]);\n\n useEffect(() => {\n calculateScrollbar();\n }, [calculateScrollbar, isOpen]);\n\n const ctx = useMemo(\n () => ({\n props: propsWithDefault,\n actualPortalRef,\n containerRef,\n portalInfo,\n portalClassName,\n }),\n [portalClassName, portalInfo, propsWithDefault],\n );\n\n return ctx;\n};\n"],
5
- "mappings": "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,CAAC,QAAQ;AACtC,oBAAc,CAAC,UAAU;AAAA,QACvB,GAAG;AAAA,QACH,gBAAgB,kBAAkB,gBAAgB,OAAsB;AAAA,MAC1E,EAAE;AAAA,IACJ;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,QAAM,8BAA8B,QAAQ,MAAM,SAAS,oBAAoB,GAAG,GAAG,CAAC,kBAAkB,CAAC;AAEzG,YAAU,MAAM;AACd,WAAO,iBAAiB,UAAU,2BAA2B;AAC7D,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,2BAA2B;AAAA,IAClE;AAAA,EACF,GAAG,CAAC,oBAAoB,2BAA2B,CAAC;AAEpD,YAAU,MAAM;AACd,uBAAmB;AAAA,EACrB,GAAG,CAAC,oBAAoB,MAAM,CAAC;AAE/B,QAAM,MAAM;AAAA,IACV,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,iBAAiB,YAAY,gBAAgB;AAAA,EAChD;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useEffect, useMemo, useState, useCallback, useRef, useLayoutEffect } from 'react';\nimport { debounce } from 'lodash';\nimport { uid } from 'uid';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { propTypes, defaultProps } from '../propTypes.js';\nimport { getScrollbarWidth, getCurrentRightPadding } from '../utils.js';\nimport type { DSDialogT } from '../propTypes.js';\nimport type { DSDialogInternalsT } from '../sharedTypes.js';\n\nexport const useDialog = (props: DSDialogT.Props): DSDialogInternalsT.DSDialogContext => {\n useValidateTypescriptPropTypes<DSDialogT.Props>(props, propTypes, 'DSDialog');\n const propsWithDefault = useMemoMergePropsWithDefault<DSDialogT.InternalProps>(props, defaultProps);\n const { portalRef, isOpen } = propsWithDefault;\n\n const actualPortalRef = useRef<HTMLElement | null>(null);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n const [portalInfo, setPortalInfo] = useState<DSDialogInternalsT.PortalInfo>({\n paddingRight: '0px',\n scrollbarWidth: '0px',\n });\n\n const portalClassName = useMemo(() => `ds-dialog-${uid(8)}`, []);\n\n useEffect(() => {\n if (portalRef) actualPortalRef.current = portalRef.current;\n else actualPortalRef.current = document.getElementsByTagName('body')['0'];\n }, [portalRef]);\n\n useLayoutEffect(() => {\n if (actualPortalRef.current) {\n if (isOpen) {\n actualPortalRef.current.classList.add(portalClassName);\n } else {\n actualPortalRef.current.classList.remove(portalClassName);\n }\n }\n }, [actualPortalRef, isOpen, portalClassName]);\n\n useEffect(() => {\n if (actualPortalRef.current) {\n setPortalInfo((prev) => ({\n ...prev,\n paddingRight: getCurrentRightPadding(actualPortalRef.current as HTMLElement),\n }));\n }\n }, []);\n\n const calculateScrollbar = useCallback(() => {\n if (actualPortalRef.current && !isOpen) {\n setPortalInfo((prev) => ({\n ...prev,\n scrollbarWidth: getScrollbarWidth(actualPortalRef.current as HTMLElement),\n }));\n }\n }, [isOpen]);\n\n const debouncedCalculateScrollbar = useMemo(() => debounce(calculateScrollbar, 300), [calculateScrollbar]);\n\n useEffect(() => {\n window.addEventListener('resize', debouncedCalculateScrollbar);\n return () => {\n window.removeEventListener('resize', debouncedCalculateScrollbar);\n };\n }, [calculateScrollbar, debouncedCalculateScrollbar]);\n\n useEffect(() => {\n calculateScrollbar();\n }, [calculateScrollbar, isOpen]);\n\n const ctx = useMemo(\n () => ({\n props: propsWithDefault,\n actualPortalRef,\n containerRef,\n portalInfo,\n portalClassName,\n }),\n [portalClassName, portalInfo, propsWithDefault],\n );\n\n return ctx;\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW,SAAS,UAAU,aAAa,QAAQ,uBAAuB;AACnF,SAAS,gBAAgB;AACzB,SAAS,WAAW;AACpB,SAAS,8BAA8B,sCAAsC;AAC7E,SAAS,WAAW,oBAAoB;AACxC,SAAS,mBAAmB,8B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BAAoB,GAAG,GAAG,CAAC,kBAAkB,CAAC;AAEzG,YAAU,MAAM;AACd,WAAO,iBAAiB,UAAU,2BAA2B;AAC7D,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,2BAA2B;AAAA,IAClE;AAAA,EACF,GAAG,CAAC,oBAAoB,2BAA2B,CAAC;AAEpD,YAAU,MAAM;AACd,uBAAmB;AAAA,EACrB,GAAG,CAAC,oBAAoB,MAAM,CAAC;AAE/B,QAAM,MAAM;AAAA,IACV,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,iBAAiB,YAAY,gBAAgB;AAAA,EAChD;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n} from './styles.js';\nimport type { WeakValidationMap } from 'react';\nimport type {} from '@xstyled/system';\nimport type {} from '@xstyled/util';\n\nDSDialogBody.displayName = 'DSDialogBody';\nDSDialogHeader.displayName = 'DSDialogHeader';\nDSDialogFooter.displayName = 'DSDialogFooter';\nDSDialogSeparator.displayName = 'DSDialogSeparator';\nDSDialogTitle.displayName = 'DSDialogTitle';\nDSDialogAddon.displayName = 'DSDialogAddon';\nDSDialogDefaultLayout.displayName = 'DSDialogDefaultLayout';\nDSDialogPrimaryMessage.displayName = 'DSDialogPrimaryMessage';\nDSDialogSecondaryMessage.displayName = 'DSDialogSecondaryMessage';\n\nconst DSDialogBodyWithSchema = describe(DSDialogBody);\nconst DSDialogHeaderWithSchema = describe(DSDialogHeader);\nconst DSDialogFooterWithSchema = describe(DSDialogFooter);\nconst DSDialogSeparatorWithSchema = describe(DSDialogSeparator);\nconst DSDialogTitleWithSchema = describe(DSDialogTitle);\nconst DSDialogAddonWithSchema = describe(DSDialogAddon);\nconst DSDialogDefaultLayoutWithSchema = describe(DSDialogDefaultLayout);\nconst DSDialogPrimaryMessageWithSchema = describe(DSDialogPrimaryMessage);\nconst DSDialogSecondaryMessageWithSchema = describe(DSDialogSecondaryMessage);\n\nDSDialogBodyWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogHeaderWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogFooterWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogSeparatorWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogTitleWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogAddonWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogDefaultLayoutWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogPrimaryMessageWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogSecondaryMessageWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\n\nexport * from './DSDialog.js';\nexport * from './DSDialogDatatestid.js';\nexport { DSDialogSizes } from './utils.js';\nexport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n DSDialogBodyWithSchema,\n DSDialogHeaderWithSchema,\n DSDialogFooterWithSchema,\n DSDialogSeparatorWithSchema,\n DSDialogTitleWithSchema,\n DSDialogAddonWithSchema,\n DSDialogDefaultLayoutWithSchema,\n DSDialogPrimaryMessageWithSchema,\n DSDialogSecondaryMessageWithSchema,\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,UAAU,iCAAiC;AACpD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,aAAa,cAAc;AAC3B,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,kBAAkB,cAAc;AAChC,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,sBAAsB,cAAc;AACpC,uBAAuB,cAAc;AACrC,yBAAyB,cAAc;AAEvC,MAAM,yBAAyB,SAAS,YAAY;AACpD,MAAM,2BAA2B,SAAS,cAAc;AACxD,MAAM,2BAA2B,SAAS,cAAc;AACxD,MAAM,8BAA8B,SAAS,iBAAiB;AAC9D,MAAM,0BAA0B,SAAS,aAAa;AACtD,MAAM,0BAA0B,SAAS,aAAa;AACtD,MAAM,kCAAkC,SAAS,qBAAqB;AACtE,MAAM,mCAAmC,SAAS,sBAAsB;AACxE,MAAM,qCAAqC,SAAS,wBAAwB;AAE5E,uBAAuB,YAAY;AACnC,yBAAyB,YAAY;AACrC,yBAAyB,YAAY;AACrC,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;AACpC,wBAAwB,YAAY;AACpC,gCAAgC,YAAY;AAC5C,iCAAiC,YAAY;AAC7C,mCAAmC,YAAY;AAE/C,cAAc;AACd,cAAc;AACd,SAAS,qBAAqB;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n} from './styles.js';\nimport type { WeakValidationMap } from 'react';\nimport type {} from '@xstyled/system';\nimport type {} from '@xstyled/util';\n\nDSDialogBody.displayName = 'DSDialogBody';\nDSDialogHeader.displayName = 'DSDialogHeader';\nDSDialogFooter.displayName = 'DSDialogFooter';\nDSDialogSeparator.displayName = 'DSDialogSeparator';\nDSDialogTitle.displayName = 'DSDialogTitle';\nDSDialogAddon.displayName = 'DSDialogAddon';\nDSDialogDefaultLayout.displayName = 'DSDialogDefaultLayout';\nDSDialogPrimaryMessage.displayName = 'DSDialogPrimaryMessage';\nDSDialogSecondaryMessage.displayName = 'DSDialogSecondaryMessage';\n\nconst DSDialogBodyWithSchema = describe(DSDialogBody as React.FC);\nconst DSDialogHeaderWithSchema = describe(DSDialogHeader as React.FC);\nconst DSDialogFooterWithSchema = describe(DSDialogFooter as React.FC);\nconst DSDialogSeparatorWithSchema = describe(DSDialogSeparator as React.FC);\nconst DSDialogTitleWithSchema = describe(DSDialogTitle as React.FC);\nconst DSDialogAddonWithSchema = describe(DSDialogAddon as React.FC);\nconst DSDialogDefaultLayoutWithSchema = describe(DSDialogDefaultLayout as React.FC);\nconst DSDialogPrimaryMessageWithSchema = describe(DSDialogPrimaryMessage as React.FC);\nconst DSDialogSecondaryMessageWithSchema = describe(DSDialogSecondaryMessage as React.FC);\n\nDSDialogBodyWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogHeaderWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogFooterWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogSeparatorWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogTitleWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogAddonWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogDefaultLayoutWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogPrimaryMessageWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\nDSDialogSecondaryMessageWithSchema.propTypes = globalAttributesPropTypes as WeakValidationMap<unknown>;\n\nexport * from './DSDialog.js';\nexport * from './DSDialogDatatestid.js';\nexport { DSDialogSizes } from './utils.js';\nexport {\n DSDialogBody,\n DSDialogHeader,\n DSDialogFooter,\n DSDialogSeparator,\n DSDialogTitle,\n DSDialogAddon,\n DSDialogDefaultLayout,\n DSDialogPrimaryMessage,\n DSDialogSecondaryMessage,\n DSDialogBodyWithSchema,\n DSDialogHeaderWithSchema,\n DSDialogFooterWithSchema,\n DSDialogSeparatorWithSchema,\n DSDialogTitleWithSchema,\n DSDialogAddonWithSchema,\n DSDialogDefaultLayoutWithSchema,\n DSDialogPrimaryMessageWithSchema,\n DSDialogSecondaryMessageWithSchema,\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,UAAU,iCAAiC;AACpD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,aAAa,cAAc;AAC3B,eAAe,cAAc;AAC7B,eAAe,cAAc;AAC7B,kBAAkB,cAAc;AAChC,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,sBAAsB,cAAc;AACpC,uBAAuB,cAAc;AACrC,yBAAyB,cAAc;AAEvC,MAAM,yBAAyB,SAAS,YAAwB;AAChE,MAAM,2BAA2B,SAAS,cAA0B;AACpE,MAAM,2BAA2B,SAAS,cAA0B;AACpE,MAAM,8BAA8B,SAAS,iBAA6B;AAC1E,MAAM,0BAA0B,SAAS,aAAyB;AAClE,MAAM,0BAA0B,SAAS,aAAyB;AAClE,MAAM,kCAAkC,SAAS,qBAAiC;AAClF,MAAM,mCAAmC,SAAS,sBAAkC;AACpF,MAAM,qCAAqC,SAAS,wBAAoC;AAExF,uBAAuB,YAAY;AACnC,yBAAyB,YAAY;AACrC,yBAAyB,YAAY;AACrC,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;AACpC,wBAAwB,YAAY;AACpC,gCAAgC,YAAY;AAC5C,iCAAiC,YAAY;AAC7C,mCAAmC,YAAY;AAE/C,cAAc;AACd,cAAc;AACd,SAAS,qBAAqB;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,18 @@
1
1
  import * as React from "react";
2
2
  import { globalAttributesPropTypes, PropTypes } from "@elliemae/ds-props-helpers";
3
3
  import { DSDialogSizes, DSDialogSizesArrayValues } from "./utils.js";
4
+ const defaultProps = {
5
+ isOpen: false,
6
+ centered: false,
7
+ size: DSDialogSizes.DEFAULT,
8
+ width: "",
9
+ removeAutoFocus: false,
10
+ onClickOutside: () => {
11
+ },
12
+ onClose: () => {
13
+ },
14
+ portalRef: null
15
+ };
4
16
  const propTypes = {
5
17
  ...globalAttributesPropTypes,
6
18
  isOpen: PropTypes.bool.description("Whether the Dialog is open or not.").defaultValue(false),
@@ -17,6 +29,7 @@ const propTypes = {
17
29
  width: PropTypes.string.description("Dialog width.")
18
30
  };
19
31
  export {
32
+ defaultProps,
20
33
  propTypes
21
34
  };
22
35
  //# sourceMappingURL=propTypes.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/propTypes.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSDialogSizes, DSDialogSizesArrayValues } from './utils.js';\n\nexport declare namespace DSDialogT {\n export type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';\n export interface DefaultProps {\n [key: string]: unknown;\n isOpen: boolean;\n centered: boolean;\n size: Sizes;\n removeAutoFocus: boolean;\n onClickOutside: () => void;\n onClose: () => void;\n portalRef: React.MutableRefObject<HTMLElement | null> | null;\n width: string | number;\n }\n\n export interface PropsRequired {\n children: React.ReactNode;\n }\n\n export interface PropsOptional {\n portalRef?: React.MutableRefObject<HTMLElement | null> | null;\n zIndex?: number;\n width?: string;\n }\n\n export interface InternalProps extends DefaultProps, PropsRequired, PropsOptional {}\n\n export interface Props\n extends Partial<DefaultProps>,\n PropsRequired,\n PropsOptional,\n Omit<GlobalAttributesT<HTMLDivElement>, 'size' | 'width' | 'children'> {}\n}\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n isOpen: PropTypes.bool.description('Whether the Dialog is open or not.').defaultValue(false),\n children: PropTypes.node.description('Nested components.').isRequired,\n centered: PropTypes.bool.description('Centers the Dialog.').defaultValue(false),\n removeAutoFocus: PropTypes.bool\n .description(\n 'Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.',\n )\n .defaultValue(false),\n onClickOutside: PropTypes.func\n .description('Callback that should be used to close the modal when the user clicks outside.')\n .defaultValue(() => {}),\n onClose: PropTypes.func.description('Callback triggered with ESC key.').defaultValue(() => {}),\n size: PropTypes.oneOf(DSDialogSizesArrayValues)\n .description(`Dialog's width size.`)\n .defaultValue(DSDialogSizes.DEFAULT),\n width: PropTypes.string.description('Dialog width.'),\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,2BAA2B,iBAAiB;AACrD,SAAS,eAAe,gCAAgC;AAmCjD,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,QAAQ,UAAU,KAAK,YAAY,oCAAoC,EAAE,aAAa,KAAK;AAAA,EAC3F,UAAU,UAAU,KAAK,YAAY,oBAAoB,EAAE;AAAA,EAC3D,UAAU,UAAU,KAAK,YAAY,qBAAqB,EAAE,aAAa,KAAK;AAAA,EAC9E,iBAAiB,UAAU,KACxB;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,gBAAgB,UAAU,KACvB,YAAY,+EAA+E,EAC3F,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACxB,SAAS,UAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EAC7F,MAAM,UAAU,MAAM,wBAAwB,EAC3C,YAAY,sBAAsB,EAClC,aAAa,cAAc,OAAO;AAAA,EACrC,OAAO,UAAU,OAAO,YAAY,eAAe;AACrD;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSDialogSizes, DSDialogSizesArrayValues } from './utils.js';\n\nexport declare namespace DSDialogT {\n export type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';\n export interface DefaultProps {\n isOpen: boolean;\n centered: boolean;\n size: Sizes;\n removeAutoFocus: boolean;\n onClickOutside: () => void;\n onClose: () => void;\n portalRef: React.MutableRefObject<HTMLElement | null> | null;\n width: string | number;\n }\n\n export interface PropsRequired {\n children: TypescriptHelpersT.ReactChildrenComplete;\n }\n\n export interface PropsOptional {\n zIndex?: number;\n }\n\n export interface InternalProps extends DefaultProps, PropsRequired, PropsOptional {}\n\n export interface Props\n extends Partial<DefaultProps>,\n PropsRequired,\n PropsOptional,\n Omit<GlobalAttributesT<HTMLDivElement>, 'size' | 'width' | 'children'> {}\n}\n\nexport const defaultProps: DSDialogT.DefaultProps = {\n isOpen: false,\n centered: false,\n size: DSDialogSizes.DEFAULT,\n width: '',\n removeAutoFocus: false,\n onClickOutside: () => {},\n onClose: () => {},\n portalRef: null,\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n isOpen: PropTypes.bool.description('Whether the Dialog is open or not.').defaultValue(false),\n children: PropTypes.node.description('Nested components.').isRequired,\n centered: PropTypes.bool.description('Centers the Dialog.').defaultValue(false),\n removeAutoFocus: PropTypes.bool\n .description(\n 'Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.',\n )\n .defaultValue(false),\n onClickOutside: PropTypes.func\n .description('Callback that should be used to close the modal when the user clicks outside.')\n .defaultValue(() => {}),\n onClose: PropTypes.func.description('Callback triggered with ESC key.').defaultValue(() => {}),\n size: PropTypes.oneOf(DSDialogSizesArrayValues)\n .description(`Dialog's width size.`)\n .defaultValue(DSDialogSizes.DEFAULT),\n width: PropTypes.string.description('Dialog width.'),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,2BAA2B,iBAAiB;AAErD,SAAS,eAAe,gCAAgC;AAgCjD,MAAM,eAAuC;AAAA,EAClD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM,cAAc;AAAA,EACpB,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,WAAW;AACb;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,QAAQ,UAAU,KAAK,YAAY,oCAAoC,EAAE,aAAa,KAAK;AAAA,EAC3F,UAAU,UAAU,KAAK,YAAY,oBAAoB,EAAE;AAAA,EAC3D,UAAU,UAAU,KAAK,YAAY,qBAAqB,EAAE,aAAa,KAAK;AAAA,EAC9E,iBAAiB,UAAU,KACxB;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,gBAAgB,UAAU,KACvB,YAAY,+EAA+E,EAC3F,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EACxB,SAAS,UAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,MAAM;AAAA,EAAC,CAAC;AAAA,EAC7F,MAAM,UAAU,MAAM,wBAAwB,EAC3C,YAAY,sBAAsB,EAClC,aAAa,cAAc,OAAO;AAAA,EACrC,OAAO,UAAU,OAAO,YAAY,eAAe;AACrD;",
6
6
  "names": []
7
7
  }
@@ -77,7 +77,7 @@ const DSDialogSecondaryMessage = styled.p`
77
77
  margin: 0;
78
78
  color: ${({ theme }) => theme.colors.neutral[500]};
79
79
  `;
80
- const DSDialogDefaultLayout = styled.div`
80
+ const DSDialogDefaultLayout = styled("div")`
81
81
  display: grid;
82
82
  grid-auto-flow: row;
83
83
  justify-items: center;
@@ -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", "/* eslint-disable max-lines */\nimport { styled, createGlobalStyle, xStyledCommonProps } from '@elliemae/ds-system';\nimport { allSizes } from './utils.js';\nimport type { DSDialogT } from './propTypes.js';\nimport type { DSDialogInternalsT } from './sharedTypes.js';\n\ninterface PortalStylesT {\n portalInfo: DSDialogInternalsT.PortalInfo;\n portalClassName: string;\n}\n\ninterface StyledDialogBackgroundT {\n zIndex?: number;\n}\n\ninterface StyledDialogContainerT {\n size: DSDialogT.Sizes;\n centered: boolean;\n width: number | string;\n}\n\nexport const PortalStyles = createGlobalStyle<PortalStylesT>`\n ${({ portalClassName }) => `.${portalClassName}`} {\n overflow: hidden;\n ${({ portalInfo }) =>\n portalInfo.scrollbarWidth !== '0px'\n ? `padding-right: calc( ${portalInfo.paddingRight} + ${portalInfo.scrollbarWidth} ) !important;`\n : ``}\n }\n`;\n\nexport const StyledDialogBackground = styled.div<StyledDialogBackgroundT>`\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(37, 41, 47, 50%);\n overflow-y: auto;\n z-index: ${({ zIndex, theme }) => zIndex ?? theme.zIndex.dialog};\n`;\n\nexport const StyledDialogContainer = styled.div<StyledDialogContainerT>`\n height: fit-content;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: ${({ centered }) => (centered ? 'auto' : '20vh auto auto auto')};\n width: ${({ size, width }) => (width === '' ? allSizes[size] : width)};\n min-width: 300px;\n box-shadow: 0 10px 20px 0 ${({ theme }) => theme.colors.neutral[500]};\n background: ${({ theme }) => theme.colors.neutral['000']};\n overflow-y: auto;\n &:focus {\n outline: none;\n }\n max-height: 100vh;\n`;\n\nexport const DSDialogTitle = styled.h3`\n font-size: ${({ theme }) => theme.fontSizes.title[700]};\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n line-height: 28px;\n margin: 0;\n`;\n\nexport const DSDialogAddon = styled.div``;\n\nexport const DSDialogHeader = styled('div')`\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n min-height: ${({ theme }) => theme.space.m};\n padding: 10px ${({ theme }) => theme.space.xs};\n & ${DSDialogTitle} + ${DSDialogAddon} {\n align-self: flex-start;\n justify-self: flex-end;\n }\n & ${DSDialogAddon}:only-child {\n justify-self: flex-end;\n }\n ${xStyledCommonProps}\n`;\n\nexport const DSDialogSeparator = styled.hr.attrs(() => ({ 'aria-hidden': true }))`\n margin: 0;\n border-top: 1px solid ${({ theme }) => theme.colors.neutral['080']};\n`;\n\nexport const DSDialogBody = styled('div')`\n padding: ${({ theme }) => theme.space.xs};\n overflow-y: auto;\n ${xStyledCommonProps}\n`;\n\nexport const DSDialogPrimaryMessage = styled.h3`\n margin: 0;\n`;\n\nexport const DSDialogSecondaryMessage = styled.p`\n margin: 0;\n color: ${({ theme }) => theme.colors.neutral[500]};\n`;\n\nexport const DSDialogDefaultLayout = styled.div`\n display: grid;\n grid-auto-flow: row;\n justify-items: center;\n align-items: center;\n grid-gap: ${({ theme }) => theme.space.xxs};\n\n ${DSDialogSecondaryMessage} {\n text-align: center;\n }\n`;\n\nexport const DSDialogFooter = styled('div')`\n display: grid;\n grid-auto-flow: column;\n align-items: center;\n justify-content: flex-end;\n grid-gap: ${({ theme }) => theme.space.xxs};\n min-height: ${({ theme }) => theme.space.m};\n padding: 0 ${({ theme }) => theme.space.xs};\n ${xStyledCommonProps}\n`;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,mBAAmB,0BAA0B;AAC9D,S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eAAe,OAAO,KAAK;AAAA,aAC3B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA,IAEpC;AAAA;AAGG,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAItC,MAAM,2BAA2B,OAAO;AAAA;AAAA,WAEpC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAG3C,MAAM,wBAAwB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,cAK9B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA,IAErC;AAAA;AAAA;AAAA;AAKG,MAAM,iBAAiB,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,cAK5B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,gBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,eAC5B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,IACtC;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { styled, createGlobalStyle, xStyledCommonProps } from '@elliemae/ds-system';\nimport type { XstyledProps } from '@elliemae/ds-props-helpers';\nimport { allSizes } from './utils.js';\nimport type { DSDialogT } from './propTypes.js';\nimport type { DSDialogInternalsT } from './sharedTypes.js';\n\ninterface PortalStylesT {\n portalInfo: DSDialogInternalsT.PortalInfo;\n portalClassName: string;\n}\n\ninterface StyledDialogBackgroundT {\n zIndex?: number;\n}\n\ninterface StyledDialogContainerT {\n size: DSDialogT.Sizes;\n centered: boolean;\n width: number | string;\n}\n\nexport const PortalStyles = createGlobalStyle<PortalStylesT>`\n ${({ portalClassName }) => `.${portalClassName}`} {\n overflow: hidden;\n ${({ portalInfo }) =>\n portalInfo.scrollbarWidth !== '0px'\n ? `padding-right: calc( ${portalInfo.paddingRight} + ${portalInfo.scrollbarWidth} ) !important;`\n : ``}\n }\n`;\n\nexport const StyledDialogBackground = styled.div<StyledDialogBackgroundT>`\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(37, 41, 47, 50%);\n overflow-y: auto;\n z-index: ${({ zIndex, theme }) => zIndex ?? theme.zIndex.dialog};\n`;\n\nexport const StyledDialogContainer = styled.div<StyledDialogContainerT>`\n height: fit-content;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: ${({ centered }) => (centered ? 'auto' : '20vh auto auto auto')};\n width: ${({ size, width }) => (width === '' ? allSizes[size] : width)};\n min-width: 300px;\n box-shadow: 0 10px 20px 0 ${({ theme }) => theme.colors.neutral[500]};\n background: ${({ theme }) => theme.colors.neutral['000']};\n overflow-y: auto;\n &:focus {\n outline: none;\n }\n max-height: 100vh;\n`;\n\nexport const DSDialogTitle = styled.h3`\n font-size: ${({ theme }) => theme.fontSizes.title[700]};\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n line-height: 28px;\n margin: 0;\n`;\n\nexport const DSDialogAddon = styled.div``;\n\nexport const DSDialogHeader = styled('div')<React.PropsWithChildren & XstyledProps>`\n display: grid;\n align-items: center;\n grid-auto-flow: column;\n min-height: ${({ theme }) => theme.space.m};\n padding: 10px ${({ theme }) => theme.space.xs};\n & ${DSDialogTitle} + ${DSDialogAddon} {\n align-self: flex-start;\n justify-self: flex-end;\n }\n & ${DSDialogAddon}:only-child {\n justify-self: flex-end;\n }\n ${xStyledCommonProps}\n`;\n\nexport const DSDialogSeparator = styled.hr.attrs(() => ({ 'aria-hidden': true }))`\n margin: 0;\n border-top: 1px solid ${({ theme }) => theme.colors.neutral['080']};\n`;\n\nexport const DSDialogBody = styled('div')`\n padding: ${({ theme }) => theme.space.xs};\n overflow-y: auto;\n ${xStyledCommonProps}\n`;\n\nexport const DSDialogPrimaryMessage = styled.h3`\n margin: 0;\n`;\n\nexport const DSDialogSecondaryMessage = styled.p`\n margin: 0;\n color: ${({ theme }) => theme.colors.neutral[500]};\n`;\n\nexport const DSDialogDefaultLayout = styled('div')<React.PropsWithChildren>`\n display: grid;\n grid-auto-flow: row;\n justify-items: center;\n align-items: center;\n grid-gap: ${({ theme }) => theme.space.xxs};\n\n ${DSDialogSecondaryMessage} {\n text-align: center;\n }\n`;\n\nexport const DSDialogFooter = styled('div')`\n display: grid;\n grid-auto-flow: column;\n align-items: center;\n justify-content: flex-end;\n grid-gap: ${({ theme }) => theme.space.xxs};\n min-height: ${({ theme }) => theme.space.m};\n padding: 0 ${({ theme }) => theme.space.xs};\n ${xStyledCommonProps}\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,mBAAmB,0BAA0B;AAE9D,SAAS,gBAAgB;AAmBlB,MAAM,eAAe;AAAA,IACxB,CAAC,EAAE,gBAAgB,MAAM,IAAI;AAAA;AAAA,MAE3B,CAAC,EAAE,WAAW,MACd,WAAW,mBAAmB,QAC1B,wBAAwB,WAAW,kBAAkB,WAAW,iCAChE;AAAA;AAAA;AAIH,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAShC,CAAC,EAAE,QAAQ,MAAM,MAAM,UAAU,MAAM,OAAO;AAAA;AAGpD,MAAM,wBAAwB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOhC,CAAC,EAAE,SAAS,MAAO,WAAW,SAAS;AAAA,WACxC,CAAC,EAAE,MAAM,MAAM,MAAO,UAAU,KAAK,SAAS,IAAI,IAAI;AAAA;AAAA,8BAEnC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA,gBACrD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQlD,MAAM,gBAAgB,OAAO;AAAA,eACrB,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAShD,MAAM,gBAAgB,OAAO;AAE7B,MAAM,iBAAiB,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA,gBAI1B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,kBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,MACvC,mBAAmB;AAAA;AAAA;AAAA;AAAA,MAInB;AAAA;AAAA;AAAA,IAGF;AAAA;AAGG,MAAM,oBAAoB,OAAO,GAAG,MAAM,OAAO,EAAE,eAAe,KAAK,EAAE;AAAA;AAAA,0BAEtD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAG5D,MAAM,eAAe,OAAO,KAAK;AAAA,aAC3B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA,IAEpC;AAAA;AAGG,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAItC,MAAM,2BAA2B,OAAO;AAAA;AAAA,WAEpC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAG3C,MAAM,wBAAwB,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,cAKnC,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA,IAErC;AAAA;AAAA;AAAA;AAKG,MAAM,iBAAiB,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,cAK5B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,gBACzB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,eAC5B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,IACtC;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,95 +1,13 @@
1
- /// <reference types="react" />
2
1
  import { DSDialogBody, DSDialogHeader, DSDialogFooter, DSDialogSeparator, DSDialogTitle, DSDialogAddon, DSDialogDefaultLayout, DSDialogPrimaryMessage, DSDialogSecondaryMessage } from './styles.js';
3
- declare const DSDialogBodyWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
4
- [x: string]: any;
5
- [x: number]: any;
6
- [x: symbol]: any;
7
- } & {
8
- theme?: import("@elliemae/ds-system").Theme | undefined;
9
- } & {
10
- as?: string | import("react").ComponentType<any> | undefined;
11
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
12
- }>;
13
- declare const DSDialogHeaderWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
14
- [x: string]: any;
15
- [x: number]: any;
16
- [x: symbol]: any;
17
- } & {
18
- theme?: import("@elliemae/ds-system").Theme | undefined;
19
- } & {
20
- as?: string | import("react").ComponentType<any> | undefined;
21
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
22
- }>;
23
- declare const DSDialogFooterWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
24
- [x: string]: any;
25
- [x: number]: any;
26
- [x: symbol]: any;
27
- } & {
28
- theme?: import("@elliemae/ds-system").Theme | undefined;
29
- } & {
30
- as?: string | import("react").ComponentType<any> | undefined;
31
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
32
- }>;
33
- declare const DSDialogSeparatorWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
34
- [x: string]: any;
35
- [x: number]: any;
36
- [x: symbol]: any;
37
- } & {
38
- theme?: import("@elliemae/ds-system").Theme | undefined;
39
- } & {
40
- as?: string | import("react").ComponentType<any> | undefined;
41
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
42
- }>;
43
- declare const DSDialogTitleWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
44
- [x: string]: any;
45
- [x: number]: any;
46
- [x: symbol]: any;
47
- } & {
48
- theme?: import("@elliemae/ds-system").Theme | undefined;
49
- } & {
50
- as?: string | import("react").ComponentType<any> | undefined;
51
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
52
- }>;
53
- declare const DSDialogAddonWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
54
- [x: string]: any;
55
- [x: number]: any;
56
- [x: symbol]: any;
57
- } & {
58
- theme?: import("@elliemae/ds-system").Theme | undefined;
59
- } & {
60
- as?: string | import("react").ComponentType<any> | undefined;
61
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
62
- }>;
63
- declare const DSDialogDefaultLayoutWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
64
- [x: string]: any;
65
- [x: number]: any;
66
- [x: symbol]: any;
67
- } & {
68
- theme?: import("@elliemae/ds-system").Theme | undefined;
69
- } & {
70
- as?: string | import("react").ComponentType<any> | undefined;
71
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
72
- }>;
73
- declare const DSDialogPrimaryMessageWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
74
- [x: string]: any;
75
- [x: number]: any;
76
- [x: symbol]: any;
77
- } & {
78
- theme?: import("@elliemae/ds-system").Theme | undefined;
79
- } & {
80
- as?: string | import("react").ComponentType<any> | undefined;
81
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
82
- }>;
83
- declare const DSDialogSecondaryMessageWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
84
- [x: string]: any;
85
- [x: number]: any;
86
- [x: symbol]: any;
87
- } & {
88
- theme?: import("@elliemae/ds-system").Theme | undefined;
89
- } & {
90
- as?: string | import("react").ComponentType<any> | undefined;
91
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
92
- }>;
2
+ declare const DSDialogBodyWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{}>;
3
+ declare const DSDialogHeaderWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{}>;
4
+ declare const DSDialogFooterWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{}>;
5
+ declare const DSDialogSeparatorWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{}>;
6
+ declare const DSDialogTitleWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{}>;
7
+ declare const DSDialogAddonWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{}>;
8
+ declare const DSDialogDefaultLayoutWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{}>;
9
+ declare const DSDialogPrimaryMessageWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{}>;
10
+ declare const DSDialogSecondaryMessageWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{}>;
93
11
  export * from './DSDialog.js';
94
12
  export * from './DSDialogDatatestid.js';
95
13
  export { DSDialogSizes } from './utils.js';
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';
3
+ import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
3
4
  export declare namespace DSDialogT {
4
5
  type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';
5
6
  interface DefaultProps {
6
- [key: string]: unknown;
7
7
  isOpen: boolean;
8
8
  centered: boolean;
9
9
  size: Sizes;
@@ -14,18 +14,17 @@ export declare namespace DSDialogT {
14
14
  width: string | number;
15
15
  }
16
16
  interface PropsRequired {
17
- children: React.ReactNode;
17
+ children: TypescriptHelpersT.ReactChildrenComplete;
18
18
  }
19
19
  interface PropsOptional {
20
- portalRef?: React.MutableRefObject<HTMLElement | null> | null;
21
20
  zIndex?: number;
22
- width?: string;
23
21
  }
24
22
  interface InternalProps extends DefaultProps, PropsRequired, PropsOptional {
25
23
  }
26
24
  interface Props extends Partial<DefaultProps>, PropsRequired, PropsOptional, Omit<GlobalAttributesT<HTMLDivElement>, 'size' | 'width' | 'children'> {
27
25
  }
28
26
  }
27
+ export declare const defaultProps: DSDialogT.DefaultProps;
29
28
  export declare const propTypes: {
30
29
  isOpen: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
31
30
  children: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import type { XstyledProps } from '@elliemae/ds-props-helpers';
2
3
  import type { DSDialogT } from './propTypes.js';
3
4
  import type { DSDialogInternalsT } from './sharedTypes.js';
4
5
  interface PortalStylesT {
@@ -19,15 +20,8 @@ export declare const StyledDialogContainer: import("styled-components").StyledCo
19
20
  export declare const DSDialogTitle: import("styled-components").StyledComponent<"h3", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"h3">, never>;
20
21
  export declare const DSDialogAddon: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
21
22
  export declare const DSDialogHeader: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, {
22
- [x: string]: any;
23
- [x: number]: any;
24
- [x: symbol]: any;
25
- } & {
26
- theme?: import("@elliemae/ds-system").Theme | undefined;
27
- } & {
28
- as?: string | import("react").ComponentType<any> | undefined;
29
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
30
- } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
23
+ children?: import("react").ReactNode;
24
+ } & XstyledProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
31
25
  export declare const DSDialogSeparator: import("styled-components").StyledComponent<"hr", import("@elliemae/ds-system").Theme, {
32
26
  'aria-hidden': true;
33
27
  }, string | number | symbol>;
@@ -35,14 +29,7 @@ export declare const DSDialogBody: import("styled-components").StyledComponent<"
35
29
  export declare const DSDialogPrimaryMessage: import("styled-components").StyledComponent<"h3", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"h3">, never>;
36
30
  export declare const DSDialogSecondaryMessage: import("styled-components").StyledComponent<"p", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"p">, never>;
37
31
  export declare const DSDialogDefaultLayout: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, {
38
- [x: string]: any;
39
- [x: number]: any;
40
- [x: symbol]: any;
41
- } & {
42
- theme?: import("@elliemae/ds-system").Theme | undefined;
43
- } & {
44
- as?: string | import("react").ComponentType<any> | undefined;
45
- forwardedAs?: string | import("react").ComponentType<any> | undefined;
32
+ children?: import("react").ReactNode;
46
33
  } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
47
34
  export declare const DSDialogFooter: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").TypographyProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").BackgroundProps & import("@elliemae/ds-system").SpaceProps & import("@xstyled/system").BoxShadowProps<import("@xstyled/system").Theme> & import("@xstyled/system").FlexboxesProps<import("@xstyled/system").Theme> & import("@xstyled/system").LayoutProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").ColorProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
48
35
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-dialog",
3
- "version": "3.31.4",
3
+ "version": "3.32.0-rc.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Dialog",
6
6
  "files": [
@@ -69,16 +69,17 @@
69
69
  "dependencies": {
70
70
  "lodash": "~4.17.21",
71
71
  "uid": "~2.0.1",
72
- "@elliemae/ds-icons": "3.31.4",
73
- "@elliemae/ds-props-helpers": "3.31.4",
74
- "@elliemae/ds-system": "3.31.4",
75
- "@elliemae/ds-utilities": "3.31.4",
76
- "@elliemae/ds-button": "3.31.4"
72
+ "@elliemae/ds-icons": "3.32.0-rc.2",
73
+ "@elliemae/ds-button": "3.32.0-rc.2",
74
+ "@elliemae/ds-props-helpers": "3.32.0-rc.2",
75
+ "@elliemae/ds-system": "3.32.0-rc.2",
76
+ "@elliemae/ds-utilities": "3.32.0-rc.2",
77
+ "@elliemae/ds-typescript-helpers": "3.32.0-rc.2"
77
78
  },
78
79
  "devDependencies": {
79
80
  "@elliemae/pui-cli": "~9.0.0-next.31",
80
81
  "styled-components": "~5.3.9",
81
- "@elliemae/ds-monorepo-devops": "3.31.4"
82
+ "@elliemae/ds-monorepo-devops": "3.32.0-rc.2"
82
83
  },
83
84
  "peerDependencies": {
84
85
  "react": "^17.0.2",
@@ -87,7 +88,7 @@
87
88
  },
88
89
  "publishConfig": {
89
90
  "access": "public",
90
- "typeSafety": false
91
+ "typeSafety": true
91
92
  },
92
93
  "scripts": {
93
94
  "dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
@@ -1,48 +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 defaultProps_exports = {};
30
- __export(defaultProps_exports, {
31
- defaultProps: () => defaultProps
32
- });
33
- module.exports = __toCommonJS(defaultProps_exports);
34
- var React = __toESM(require("react"));
35
- var import_utils = require("./utils.js");
36
- const noop = () => {
37
- };
38
- const defaultProps = {
39
- isOpen: false,
40
- centered: false,
41
- size: import_utils.DSDialogSizes.DEFAULT,
42
- width: "",
43
- removeAutoFocus: false,
44
- onClickOutside: noop,
45
- onClose: noop,
46
- portalRef: null
47
- };
48
- //# sourceMappingURL=defaultProps.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/defaultProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { DSDialogSizes } from './utils.js';\nimport type { DSDialogT } from './propTypes.js';\n\nconst noop = () => {};\n\nexport const defaultProps: DSDialogT.DefaultProps = {\n isOpen: false,\n centered: false,\n size: DSDialogSizes.DEFAULT,\n width: '',\n removeAutoFocus: false,\n onClickOutside: noop,\n onClose: noop,\n portalRef: null,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA8B;AAG9B,MAAM,OAAO,MAAM;AAAC;AAEb,MAAM,eAAuC;AAAA,EAClD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM,2BAAc;AAAA,EACpB,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,WAAW;AACb;",
6
- "names": []
7
- }
@@ -1,18 +0,0 @@
1
- import * as React from "react";
2
- import { DSDialogSizes } from "./utils.js";
3
- const noop = () => {
4
- };
5
- const defaultProps = {
6
- isOpen: false,
7
- centered: false,
8
- size: DSDialogSizes.DEFAULT,
9
- width: "",
10
- removeAutoFocus: false,
11
- onClickOutside: noop,
12
- onClose: noop,
13
- portalRef: null
14
- };
15
- export {
16
- defaultProps
17
- };
18
- //# sourceMappingURL=defaultProps.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/defaultProps.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSDialogSizes } from './utils.js';\nimport type { DSDialogT } from './propTypes.js';\n\nconst noop = () => {};\n\nexport const defaultProps: DSDialogT.DefaultProps = {\n isOpen: false,\n centered: false,\n size: DSDialogSizes.DEFAULT,\n width: '',\n removeAutoFocus: false,\n onClickOutside: noop,\n onClose: noop,\n portalRef: null,\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,qBAAqB;AAG9B,MAAM,OAAO,MAAM;AAAC;AAEb,MAAM,eAAuC;AAAA,EAClD,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM,cAAc;AAAA,EACpB,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,WAAW;AACb;",
6
- "names": []
7
- }
@@ -1,2 +0,0 @@
1
- import type { DSDialogT } from './propTypes.js';
2
- export declare const defaultProps: DSDialogT.DefaultProps;