@elliemae/ds-toast 3.53.0-alpha.1 → 3.53.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/config/useToast.js +4 -6
- package/dist/cjs/config/useToast.js.map +2 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/parts/DSToastContent.js +2 -2
- package/dist/cjs/parts/DSToastContent.js.map +2 -2
- package/dist/cjs/typescript-testing/typescript-toast-valid.js.map +2 -2
- package/dist/esm/config/useToast.js +4 -6
- package/dist/esm/config/useToast.js.map +2 -2
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/parts/DSToastContent.js +2 -2
- package/dist/esm/parts/DSToastContent.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-toast-valid.js.map +2 -2
- package/dist/types/DSToastDefinitions.d.ts +16 -3
- package/dist/types/config/useToast.d.ts +181 -182
- package/dist/types/parts/CloseButton.d.ts +1 -1
- package/dist/types/parts/DSToastActionLink.d.ts +1 -2
- package/dist/types/parts/DSToastContent.d.ts +1 -1
- package/dist/types/parts/styled.d.ts +1 -2
- package/dist/types/react-desc-prop-types.d.ts +2 -1
- package/dist/types/toast.d.ts +3 -3
- package/package.json +9 -8
|
@@ -35,8 +35,8 @@ var React = __toESM(require("react"));
|
|
|
35
35
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_react = require("react");
|
|
37
37
|
var import_lodash_es = require("lodash-es");
|
|
38
|
-
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
39
38
|
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
+
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
40
40
|
const useToast = (props) => {
|
|
41
41
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(
|
|
42
42
|
props,
|
|
@@ -54,7 +54,7 @@ const useToast = (props) => {
|
|
|
54
54
|
const container = toastifyWrapperRef.current;
|
|
55
55
|
const closeButton = document.querySelector(".toast-close-button");
|
|
56
56
|
const actions = [...document.querySelectorAll('.toast-action-text[role="button"]')];
|
|
57
|
-
const activeElement = document
|
|
57
|
+
const { activeElement } = document;
|
|
58
58
|
if (closeButton === activeElement) {
|
|
59
59
|
if (actions.length === 0) return;
|
|
60
60
|
if (event.shiftKey) actions[actions.length - 1].focus();
|
|
@@ -70,10 +70,8 @@ const useToast = (props) => {
|
|
|
70
70
|
if (event.shiftKey) {
|
|
71
71
|
if (index === 0) closeButton.focus();
|
|
72
72
|
else actions[index - 1].focus();
|
|
73
|
-
} else
|
|
74
|
-
|
|
75
|
-
else actions[index + 1].focus();
|
|
76
|
-
}
|
|
73
|
+
} else if (index === actions.length - 1) closeButton.focus();
|
|
74
|
+
else actions[index + 1].focus();
|
|
77
75
|
} else if (event.key === "Escape") {
|
|
78
76
|
const closeButton = toastCloseButtonRef.current;
|
|
79
77
|
if (closeButton) closeButton.click();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useToast.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable complexity */\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { useRef } from 'react';\nimport { omit } from 'lodash-es';\nimport type { DSToastT } from '../react-desc-prop-types.js';\nimport { defaultProps } from '../react-desc-prop-types.js';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAyF;AACzF,mBAAuB;AACvB,uBAAqB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { useRef } from 'react';\nimport { omit } from 'lodash-es';\nimport { mergeRefs } from '@elliemae/ds-system';\nimport type { DSToastT } from '../react-desc-prop-types.js';\nimport { defaultProps } from '../react-desc-prop-types.js';\n\nexport const useToast = (props: DSToastT.Props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSToastT.InternalProps>(\n props,\n defaultProps as Partial<DSToastT.InternalProps>,\n );\n\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n\n const xstyledAttributes = useGetXstyledProps(omit(propsWithDefault, 'position'));\n\n const toastifyWrapperRef = useRef<HTMLDivElement | null>(null);\n\n const toastCloseButtonRef = useRef<HTMLButtonElement | null>(null);\n\n const closeButtonRef = mergeRefs(toastCloseButtonRef, propsWithDefault.closeButtonRef);\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Tab') {\n event.preventDefault();\n event.stopPropagation();\n\n const container = toastifyWrapperRef.current;\n const closeButton = document.querySelector('.toast-close-button') as HTMLButtonElement;\n const actions = [...document.querySelectorAll('.toast-action-text[role=\"button\"]')] as HTMLDivElement[];\n\n const { activeElement } = document;\n\n // If the close button is focused\n // 1) No actions => we keep the focus on the close button\n // 2) Shift + Tab => we focus the last action\n // 3) Tab => we focus the first action\n if (closeButton === activeElement) {\n if (actions.length === 0) return; // We keep the focus on the close button\n if (event.shiftKey) actions[actions.length - 1].focus();\n else actions[0].focus();\n return;\n }\n\n // If the container is focused\n // No actions => we focus the close button\n // 2) Shift + Tab => we focus the last action\n // 3) Tab => we focus the close button\n if (container === activeElement) {\n if (actions.length === 0 || !event.shiftKey) closeButton.focus();\n else actions[actions.length - 1].focus();\n return;\n }\n\n const index = actions.indexOf(activeElement as HTMLDivElement);\n\n // If an action is focused\n // 1) Shift + Tab => we focus the previous action (closeButton if it's the first one)\n // 2) Tab => we focus the next action (closeButton if it's the last one)\n if (event.shiftKey) {\n if (index === 0) closeButton.focus();\n else actions[index - 1].focus();\n } else if (index === actions.length - 1) closeButton.focus();\n else actions[index + 1].focus();\n } else if (event.key === 'Escape') {\n const closeButton = toastCloseButtonRef.current;\n if (closeButton) closeButton.click();\n }\n };\n\n return {\n propsWithDefault,\n toastifyWrapperRef,\n onKeyDown,\n globalAttributes,\n xstyledAttributes,\n closeButtonRef,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAyF;AACzF,mBAAuB;AACvB,uBAAqB;AACrB,uBAA0B;AAE1B,mCAA6B;AAEtB,MAAM,WAAW,CAAC,UAA0B;AACjD,QAAM,uBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AAEA,QAAM,uBAAmB,gDAAuB,gBAAgB;AAEhE,QAAM,wBAAoB,gDAAmB,uBAAK,kBAAkB,UAAU,CAAC;AAE/E,QAAM,yBAAqB,qBAA8B,IAAI;AAE7D,QAAM,0BAAsB,qBAAiC,IAAI;AAEjE,QAAM,qBAAiB,4BAAU,qBAAqB,iBAAiB,cAAc;AAErF,QAAM,YAAY,CAAC,UAA+C;AAChE,QAAI,MAAM,QAAQ,OAAO;AACvB,YAAM,eAAe;AACrB,YAAM,gBAAgB;AAEtB,YAAM,YAAY,mBAAmB;AACrC,YAAM,cAAc,SAAS,cAAc,qBAAqB;AAChE,YAAM,UAAU,CAAC,GAAG,SAAS,iBAAiB,mCAAmC,CAAC;AAElF,YAAM,EAAE,cAAc,IAAI;AAM1B,UAAI,gBAAgB,eAAe;AACjC,YAAI,QAAQ,WAAW,EAAG;AAC1B,YAAI,MAAM,SAAU,SAAQ,QAAQ,SAAS,CAAC,EAAE,MAAM;AAAA,YACjD,SAAQ,CAAC,EAAE,MAAM;AACtB;AAAA,MACF;AAMA,UAAI,cAAc,eAAe;AAC/B,YAAI,QAAQ,WAAW,KAAK,CAAC,MAAM,SAAU,aAAY,MAAM;AAAA,YAC1D,SAAQ,QAAQ,SAAS,CAAC,EAAE,MAAM;AACvC;AAAA,MACF;AAEA,YAAM,QAAQ,QAAQ,QAAQ,aAA+B;AAK7D,UAAI,MAAM,UAAU;AAClB,YAAI,UAAU,EAAG,aAAY,MAAM;AAAA,YAC9B,SAAQ,QAAQ,CAAC,EAAE,MAAM;AAAA,MAChC,WAAW,UAAU,QAAQ,SAAS,EAAG,aAAY,MAAM;AAAA,UACtD,SAAQ,QAAQ,CAAC,EAAE,MAAM;AAAA,IAChC,WAAW,MAAM,QAAQ,UAAU;AACjC,YAAM,cAAc,oBAAoB;AACxC,UAAI,YAAa,aAAY,MAAM;AAAA,IACrC;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
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;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type {} from '@xstyled/system';\nexport { DSToast, DSToastWithSchema } from './parts/DSToast.js';\nexport { toast } from './toast.js';\nexport { ToastType, toastTypes, ToastPosition, toastsPositions } from './constants.js';\nexport { DSToastAction, DSToastActionWithSchema } from './parts/DSToastAction.js';\nexport { DSToastActionLink, DSToastActionLinkWithSchema } from './parts/DSToastActionLink.js';\nexport { DSToastContent, DSToastContentWithSchema } from './parts/DSToastContent.js';\nexport {\n DSToastName,\n DSToastActionName,\n DSToastActionLinkName,\n DSToastSlots,\n DSToastActionSlots,\n DSToastActionLinkSlots,\n DSToastDataTestIds,\n DSToastActionDataTestIds,\n DSToastActionLinkDataTestIds,\n} from './DSToastDefinitions.js';\nexport type { DSToastT } 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAA2C;AAC3C,mBAAsB;AACtB,uBAAsE;AACtE,2BAAuD;AACvD,+BAA+D;AAC/D,4BAAyD;AACzD,gCAUO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -36,8 +36,8 @@ __export(DSToastContent_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(DSToastContent_exports);
|
|
37
37
|
var React = __toESM(require("react"));
|
|
38
38
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
-
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
40
39
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
40
|
+
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
41
41
|
var import_styled = require("./styled.js");
|
|
42
42
|
var import_constants = require("../constants.js");
|
|
43
43
|
var import_DSToastDefinitions = require("../DSToastDefinitions.js");
|
|
@@ -55,7 +55,7 @@ const DSToastContent = ({
|
|
|
55
55
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledIconContainer, { className: "em-ds-toast-content__icon-container", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconMessage, { size: "m", className: "em-ds-toast-content__icon-message", color: iconColor }) }),
|
|
56
56
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledMessageContent, { className: "em-ds-toast-content__message-content", children: [
|
|
57
57
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledMessageHeader, { className: "em-ds-toast-content__message-header", children: messageTitle }),
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledMessageText, { className: "em-ds-toast-content__message-text", children: messageComponent
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledMessageText, { className: "em-ds-toast-content__message-text", children: messageComponent || messageText })
|
|
59
59
|
] })
|
|
60
60
|
] });
|
|
61
61
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/DSToastContent.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport { DSToastContentPropTypes, type DSToastT } from '../react-desc-prop-types.js';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqCf;AAnCR,mCAAuD;AACvD,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSToastContentPropTypes, type DSToastT } from '../react-desc-prop-types.js';\nimport {\n StyledContainer,\n StyledIconContainer,\n StyledMessageContent,\n StyledMessageHeader,\n StyledMessageText,\n} from './styled.js';\nimport { ToastType, TYPE_TO_ICON, TYPE_TO_ICON_COLOR } from '../constants.js';\nimport { DSToastContentName } from '../DSToastDefinitions.js';\n\nexport const getIconByToastType = (type: DSToastT.ToastTypes) => TYPE_TO_ICON[type];\nexport const getIconColorByToastType = (type: DSToastT.ToastTypes): SvgIconT.ColorType =>\n TYPE_TO_ICON_COLOR[type] as SvgIconT.ColorType;\n\nexport interface DSToastContentProps {\n type?: DSToastT.ToastTypes;\n messageTitle?: string;\n messageText?: string;\n messageComponent?: React.ReactNode;\n}\n\nconst DSToastContent: React.ComponentType<DSToastContentProps> = ({\n type = ToastType.DEFAULT,\n messageTitle = '',\n messageText = '',\n messageComponent,\n}) => {\n const IconMessage = getIconByToastType(type);\n const iconColor = getIconColorByToastType(type);\n\n return (\n <StyledContainer data-testid=\"ds-toast-render\" className=\"em-ds-toast-content\">\n <StyledIconContainer className=\"em-ds-toast-content__icon-container\">\n <IconMessage size=\"m\" className=\"em-ds-toast-content__icon-message\" color={iconColor} />\n </StyledIconContainer>\n <StyledMessageContent className=\"em-ds-toast-content__message-content\">\n <StyledMessageHeader className=\"em-ds-toast-content__message-header\">{messageTitle}</StyledMessageHeader>\n <StyledMessageText className=\"em-ds-toast-content__message-text\">\n {messageComponent || messageText}\n </StyledMessageText>\n </StyledMessageContent>\n </StyledContainer>\n );\n};\n\nDSToastContent.displayName = DSToastContentName;\nconst DSToastContentWithSchema = describe(DSToastContent);\nDSToastContentWithSchema.propTypes = DSToastContentPropTypes;\n\nexport { DSToastContent, DSToastContentWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqCf;AAnCR,8BAAyB;AACzB,mCAAuD;AACvD,oBAMO;AACP,uBAA4D;AAC5D,gCAAmC;AAE5B,MAAM,qBAAqB,CAAC,SAA8B,8BAAa,IAAI;AAC3E,MAAM,0BAA0B,CAAC,SACtC,oCAAmB,IAAI;AASzB,MAAM,iBAA2D,CAAC;AAAA,EAChE,OAAO,2BAAU;AAAA,EACjB,eAAe;AAAA,EACf,cAAc;AAAA,EACd;AACF,MAAM;AACJ,QAAM,cAAc,mBAAmB,IAAI;AAC3C,QAAM,YAAY,wBAAwB,IAAI;AAE9C,SACE,6CAAC,iCAAgB,eAAY,mBAAkB,WAAU,uBACvD;AAAA,gDAAC,qCAAoB,WAAU,uCAC7B,sDAAC,eAAY,MAAK,KAAI,WAAU,qCAAoC,OAAO,WAAW,GACxF;AAAA,IACA,6CAAC,sCAAqB,WAAU,wCAC9B;AAAA,kDAAC,qCAAoB,WAAU,uCAAuC,wBAAa;AAAA,MACnF,4CAAC,mCAAkB,WAAU,qCAC1B,8BAAoB,aACvB;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,eAAe,cAAc;AAC7B,MAAM,+BAA2B,kCAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
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/typescript-testing/typescript-toast-valid.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { DSToast } from '../index.js';\nimport type { DSToastT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSToastT.Props;\ntype ComponentPropsInternals = DSToastT.InternalProps;\ntype ComponentPropsDefaultProps = DSToastT.DefaultProps;\ntype ComponentPropsOptionalProps = DSToastT.OptionalProps;\ntype ComponentPropsRequiredProps = DSToastT.RequiredProps;\n\nconst closeButtonRef = createRef<HTMLButtonElement>();\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n containerId: '',\n closeButtonRef
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC6FrB;AA5FF,mBAA0B;AAC1B,eAAwB;AAUxB,MAAM,qBAAiB,wBAA6B;AAEpD,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD;AAAA,EACrD,aAAa;AAAA,EACb;AACF;AAIA,MAAM,sBAA2D;AAAA,EAC/D,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,iBAAiB;AACnB;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAGA,MAAM,+BAA+B;AAAA,EACnC,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,wBAAwB;AAAA,EAC5B,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,oBAAS,GAAG,wBAAwB;AAAA,EACrC,4CAAC,oBAAS,GAAG,8BAA8B;AAAA,EAC3C,4CAAC,oBAAS,GAAG,uBAAuB;AAAA,EAEpC;AAAA,IAAC;AAAA;AAAA,MACC,gBAAgB,EAAE,eAAe,aAAa;AAAA,MAC9C,UAAS;AAAA,MACT,WAAW;AAAA,MACX,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { DSToast } from '../index.js';\nimport type { DSToastT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSToastT.Props;\ntype ComponentPropsInternals = DSToastT.InternalProps;\ntype ComponentPropsDefaultProps = DSToastT.DefaultProps;\ntype ComponentPropsOptionalProps = DSToastT.OptionalProps;\ntype ComponentPropsRequiredProps = DSToastT.RequiredProps;\n\nconst closeButtonRef = createRef<HTMLButtonElement>();\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n containerId: '',\n closeButtonRef,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n containerProps: { 'data-testid': 'ds-toast-1' },\n position: 'top-center',\n showProgressBar: false,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n containerProps: { 'data-testid': 'ds-toast-1' },\n position: 'top-center',\n autoClose: 2000,\n showProgressBar: true,\n closeOnClick: true,\n enableMultiContainer: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n containerProps: { 'data-testid': 'ds-toast-1' },\n position: 'top-left',\n autoClose: 5000,\n showProgressBar: true,\n closeOnClick: false,\n enableMultiContainer: false,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n containerProps: { 'data-testid': 'ds-toast-1' },\n position: 'top-left',\n autoClose: 5000,\n showProgressBar: true,\n closeOnClick: false,\n enableMultiContainer: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n containerProps: { 'data-testid': 'ds-toast-1' },\n position: 'top-left',\n autoClose: 5000,\n showProgressBar: true,\n closeOnClick: false,\n enableMultiContainer: false,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSToast {...testExplicitDefinition} />\n <DSToast {...testInferedTypeCompatibility} />\n <DSToast {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSToast\n containerProps={{ 'data-testid': 'ds-toast-1' }}\n position=\"top-left\"\n autoClose={5000}\n showProgressBar\n closeOnClick={false}\n enableMultiContainer={false}\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC6FrB;AA5FF,mBAA0B;AAC1B,eAAwB;AAUxB,MAAM,qBAAiB,wBAA6B;AAEpD,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD;AAAA,EACrD,aAAa;AAAA,EACb;AACF;AAIA,MAAM,sBAA2D;AAAA,EAC/D,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,iBAAiB;AACnB;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAGA,MAAM,+BAA+B;AAAA,EACnC,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,wBAAwB;AAAA,EAC5B,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,oBAAS,GAAG,wBAAwB;AAAA,EACrC,4CAAC,oBAAS,GAAG,8BAA8B;AAAA,EAC3C,4CAAC,oBAAS,GAAG,uBAAuB;AAAA,EAEpC;AAAA,IAAC;AAAA;AAAA,MACC,gBAAgB,EAAE,eAAe,aAAa;AAAA,MAC9C,UAAS;AAAA,MACT,WAAW;AAAA,MACX,iBAAe;AAAA,MACf,cAAc;AAAA,MACd,sBAAsB;AAAA;AAAA,EACxB;AAAA,GACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,8 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
|
|
3
3
|
import { useRef } from "react";
|
|
4
4
|
import { omit } from "lodash-es";
|
|
5
|
-
import { defaultProps } from "../react-desc-prop-types.js";
|
|
6
5
|
import { mergeRefs } from "@elliemae/ds-system";
|
|
6
|
+
import { defaultProps } from "../react-desc-prop-types.js";
|
|
7
7
|
const useToast = (props) => {
|
|
8
8
|
const propsWithDefault = useMemoMergePropsWithDefault(
|
|
9
9
|
props,
|
|
@@ -21,7 +21,7 @@ const useToast = (props) => {
|
|
|
21
21
|
const container = toastifyWrapperRef.current;
|
|
22
22
|
const closeButton = document.querySelector(".toast-close-button");
|
|
23
23
|
const actions = [...document.querySelectorAll('.toast-action-text[role="button"]')];
|
|
24
|
-
const activeElement = document
|
|
24
|
+
const { activeElement } = document;
|
|
25
25
|
if (closeButton === activeElement) {
|
|
26
26
|
if (actions.length === 0) return;
|
|
27
27
|
if (event.shiftKey) actions[actions.length - 1].focus();
|
|
@@ -37,10 +37,8 @@ const useToast = (props) => {
|
|
|
37
37
|
if (event.shiftKey) {
|
|
38
38
|
if (index === 0) closeButton.focus();
|
|
39
39
|
else actions[index - 1].focus();
|
|
40
|
-
} else
|
|
41
|
-
|
|
42
|
-
else actions[index + 1].focus();
|
|
43
|
-
}
|
|
40
|
+
} else if (index === actions.length - 1) closeButton.focus();
|
|
41
|
+
else actions[index + 1].focus();
|
|
44
42
|
} else if (event.key === "Escape") {
|
|
45
43
|
const closeButton = toastCloseButtonRef.current;
|
|
46
44
|
if (closeButton) closeButton.click();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useToast.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { useRef } from 'react';\nimport { omit } from 'lodash-es';\nimport type { DSToastT } from '../react-desc-prop-types.js';\nimport { defaultProps } from '../react-desc-prop-types.js';\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,cAAc;AACvB,SAAS,YAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { useRef } from 'react';\nimport { omit } from 'lodash-es';\nimport { mergeRefs } from '@elliemae/ds-system';\nimport type { DSToastT } from '../react-desc-prop-types.js';\nimport { defaultProps } from '../react-desc-prop-types.js';\n\nexport const useToast = (props: DSToastT.Props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSToastT.InternalProps>(\n props,\n defaultProps as Partial<DSToastT.InternalProps>,\n );\n\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n\n const xstyledAttributes = useGetXstyledProps(omit(propsWithDefault, 'position'));\n\n const toastifyWrapperRef = useRef<HTMLDivElement | null>(null);\n\n const toastCloseButtonRef = useRef<HTMLButtonElement | null>(null);\n\n const closeButtonRef = mergeRefs(toastCloseButtonRef, propsWithDefault.closeButtonRef);\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Tab') {\n event.preventDefault();\n event.stopPropagation();\n\n const container = toastifyWrapperRef.current;\n const closeButton = document.querySelector('.toast-close-button') as HTMLButtonElement;\n const actions = [...document.querySelectorAll('.toast-action-text[role=\"button\"]')] as HTMLDivElement[];\n\n const { activeElement } = document;\n\n // If the close button is focused\n // 1) No actions => we keep the focus on the close button\n // 2) Shift + Tab => we focus the last action\n // 3) Tab => we focus the first action\n if (closeButton === activeElement) {\n if (actions.length === 0) return; // We keep the focus on the close button\n if (event.shiftKey) actions[actions.length - 1].focus();\n else actions[0].focus();\n return;\n }\n\n // If the container is focused\n // No actions => we focus the close button\n // 2) Shift + Tab => we focus the last action\n // 3) Tab => we focus the close button\n if (container === activeElement) {\n if (actions.length === 0 || !event.shiftKey) closeButton.focus();\n else actions[actions.length - 1].focus();\n return;\n }\n\n const index = actions.indexOf(activeElement as HTMLDivElement);\n\n // If an action is focused\n // 1) Shift + Tab => we focus the previous action (closeButton if it's the first one)\n // 2) Tab => we focus the next action (closeButton if it's the last one)\n if (event.shiftKey) {\n if (index === 0) closeButton.focus();\n else actions[index - 1].focus();\n } else if (index === actions.length - 1) closeButton.focus();\n else actions[index + 1].focus();\n } else if (event.key === 'Escape') {\n const closeButton = toastCloseButtonRef.current;\n if (closeButton) closeButton.click();\n }\n };\n\n return {\n propsWithDefault,\n toastifyWrapperRef,\n onKeyDown,\n globalAttributes,\n xstyledAttributes,\n closeButtonRef,\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAE1B,SAAS,oBAAoB;AAEtB,MAAM,WAAW,CAAC,UAA0B;AACjD,QAAM,mBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AAEA,QAAM,mBAAmB,uBAAuB,gBAAgB;AAEhE,QAAM,oBAAoB,mBAAmB,KAAK,kBAAkB,UAAU,CAAC;AAE/E,QAAM,qBAAqB,OAA8B,IAAI;AAE7D,QAAM,sBAAsB,OAAiC,IAAI;AAEjE,QAAM,iBAAiB,UAAU,qBAAqB,iBAAiB,cAAc;AAErF,QAAM,YAAY,CAAC,UAA+C;AAChE,QAAI,MAAM,QAAQ,OAAO;AACvB,YAAM,eAAe;AACrB,YAAM,gBAAgB;AAEtB,YAAM,YAAY,mBAAmB;AACrC,YAAM,cAAc,SAAS,cAAc,qBAAqB;AAChE,YAAM,UAAU,CAAC,GAAG,SAAS,iBAAiB,mCAAmC,CAAC;AAElF,YAAM,EAAE,cAAc,IAAI;AAM1B,UAAI,gBAAgB,eAAe;AACjC,YAAI,QAAQ,WAAW,EAAG;AAC1B,YAAI,MAAM,SAAU,SAAQ,QAAQ,SAAS,CAAC,EAAE,MAAM;AAAA,YACjD,SAAQ,CAAC,EAAE,MAAM;AACtB;AAAA,MACF;AAMA,UAAI,cAAc,eAAe;AAC/B,YAAI,QAAQ,WAAW,KAAK,CAAC,MAAM,SAAU,aAAY,MAAM;AAAA,YAC1D,SAAQ,QAAQ,SAAS,CAAC,EAAE,MAAM;AACvC;AAAA,MACF;AAEA,YAAM,QAAQ,QAAQ,QAAQ,aAA+B;AAK7D,UAAI,MAAM,UAAU;AAClB,YAAI,UAAU,EAAG,aAAY,MAAM;AAAA,YAC9B,SAAQ,QAAQ,CAAC,EAAE,MAAM;AAAA,MAChC,WAAW,UAAU,QAAQ,SAAS,EAAG,aAAY,MAAM;AAAA,UACtD,SAAQ,QAAQ,CAAC,EAAE,MAAM;AAAA,IAChC,WAAW,MAAM,QAAQ,UAAU;AACjC,YAAM,cAAc,oBAAoB;AACxC,UAAI,YAAa,aAAY,MAAM;AAAA,IACrC;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -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", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@xstyled/system';\nexport { DSToast, DSToastWithSchema } from './parts/DSToast.js';\nexport { toast } from './toast.js';\nexport { ToastType, toastTypes, ToastPosition, toastsPositions } from './constants.js';\nexport { DSToastAction, DSToastActionWithSchema } from './parts/DSToastAction.js';\nexport { DSToastActionLink, DSToastActionLinkWithSchema } from './parts/DSToastActionLink.js';\nexport { DSToastContent, DSToastContentWithSchema } from './parts/DSToastContent.js';\nexport {\n DSToastName,\n DSToastActionName,\n DSToastActionLinkName,\n DSToastSlots,\n DSToastActionSlots,\n DSToastActionLinkSlots,\n DSToastDataTestIds,\n DSToastActionDataTestIds,\n DSToastActionLinkDataTestIds,\n} from './DSToastDefinitions.js';\nexport type { DSToastT } from './react-desc-prop-types.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,SAAS,yBAAyB;AAC3C,SAAS,aAAa;AACtB,SAAS,WAAW,YAAY,eAAe,uBAAuB;AACtE,SAAS,eAAe,+BAA+B;AACvD,SAAS,mBAAmB,mCAAmC;AAC/D,SAAS,gBAAgB,gCAAgC;AACzD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { DSToastContentPropTypes } from "../react-desc-prop-types.js";
|
|
4
3
|
import { describe } from "@elliemae/ds-props-helpers";
|
|
4
|
+
import { DSToastContentPropTypes } from "../react-desc-prop-types.js";
|
|
5
5
|
import {
|
|
6
6
|
StyledContainer,
|
|
7
7
|
StyledIconContainer,
|
|
@@ -25,7 +25,7 @@ const DSToastContent = ({
|
|
|
25
25
|
/* @__PURE__ */ jsx(StyledIconContainer, { className: "em-ds-toast-content__icon-container", children: /* @__PURE__ */ jsx(IconMessage, { size: "m", className: "em-ds-toast-content__icon-message", color: iconColor }) }),
|
|
26
26
|
/* @__PURE__ */ jsxs(StyledMessageContent, { className: "em-ds-toast-content__message-content", children: [
|
|
27
27
|
/* @__PURE__ */ jsx(StyledMessageHeader, { className: "em-ds-toast-content__message-header", children: messageTitle }),
|
|
28
|
-
/* @__PURE__ */ jsx(StyledMessageText, { className: "em-ds-toast-content__message-text", children: messageComponent
|
|
28
|
+
/* @__PURE__ */ jsx(StyledMessageText, { className: "em-ds-toast-content__message-text", children: messageComponent || messageText })
|
|
29
29
|
] })
|
|
30
30
|
] });
|
|
31
31
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/DSToastContent.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport { DSToastContentPropTypes, type DSToastT } from '../react-desc-prop-types.js';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACqCf,cAEF,YAFE;AAnCR,SAAS,+BAA8C;AACvD
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSToastContentPropTypes, type DSToastT } from '../react-desc-prop-types.js';\nimport {\n StyledContainer,\n StyledIconContainer,\n StyledMessageContent,\n StyledMessageHeader,\n StyledMessageText,\n} from './styled.js';\nimport { ToastType, TYPE_TO_ICON, TYPE_TO_ICON_COLOR } from '../constants.js';\nimport { DSToastContentName } from '../DSToastDefinitions.js';\n\nexport const getIconByToastType = (type: DSToastT.ToastTypes) => TYPE_TO_ICON[type];\nexport const getIconColorByToastType = (type: DSToastT.ToastTypes): SvgIconT.ColorType =>\n TYPE_TO_ICON_COLOR[type] as SvgIconT.ColorType;\n\nexport interface DSToastContentProps {\n type?: DSToastT.ToastTypes;\n messageTitle?: string;\n messageText?: string;\n messageComponent?: React.ReactNode;\n}\n\nconst DSToastContent: React.ComponentType<DSToastContentProps> = ({\n type = ToastType.DEFAULT,\n messageTitle = '',\n messageText = '',\n messageComponent,\n}) => {\n const IconMessage = getIconByToastType(type);\n const iconColor = getIconColorByToastType(type);\n\n return (\n <StyledContainer data-testid=\"ds-toast-render\" className=\"em-ds-toast-content\">\n <StyledIconContainer className=\"em-ds-toast-content__icon-container\">\n <IconMessage size=\"m\" className=\"em-ds-toast-content__icon-message\" color={iconColor} />\n </StyledIconContainer>\n <StyledMessageContent className=\"em-ds-toast-content__message-content\">\n <StyledMessageHeader className=\"em-ds-toast-content__message-header\">{messageTitle}</StyledMessageHeader>\n <StyledMessageText className=\"em-ds-toast-content__message-text\">\n {messageComponent || messageText}\n </StyledMessageText>\n </StyledMessageContent>\n </StyledContainer>\n );\n};\n\nDSToastContent.displayName = DSToastContentName;\nconst DSToastContentWithSchema = describe(DSToastContent);\nDSToastContentWithSchema.propTypes = DSToastContentPropTypes;\n\nexport { DSToastContent, DSToastContentWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACqCf,cAEF,YAFE;AAnCR,SAAS,gBAAgB;AACzB,SAAS,+BAA8C;AACvD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW,cAAc,0BAA0B;AAC5D,SAAS,0BAA0B;AAE5B,MAAM,qBAAqB,CAAC,SAA8B,aAAa,IAAI;AAC3E,MAAM,0BAA0B,CAAC,SACtC,mBAAmB,IAAI;AASzB,MAAM,iBAA2D,CAAC;AAAA,EAChE,OAAO,UAAU;AAAA,EACjB,eAAe;AAAA,EACf,cAAc;AAAA,EACd;AACF,MAAM;AACJ,QAAM,cAAc,mBAAmB,IAAI;AAC3C,QAAM,YAAY,wBAAwB,IAAI;AAE9C,SACE,qBAAC,mBAAgB,eAAY,mBAAkB,WAAU,uBACvD;AAAA,wBAAC,uBAAoB,WAAU,uCAC7B,8BAAC,eAAY,MAAK,KAAI,WAAU,qCAAoC,OAAO,WAAW,GACxF;AAAA,IACA,qBAAC,wBAAqB,WAAU,wCAC9B;AAAA,0BAAC,uBAAoB,WAAU,uCAAuC,wBAAa;AAAA,MACnF,oBAAC,qBAAkB,WAAU,qCAC1B,8BAAoB,aACvB;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,eAAe,cAAc;AAC7B,MAAM,2BAA2B,SAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
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/typescript-testing/typescript-toast-valid.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { DSToast } from '../index.js';\nimport type { DSToastT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSToastT.Props;\ntype ComponentPropsInternals = DSToastT.InternalProps;\ntype ComponentPropsDefaultProps = DSToastT.DefaultProps;\ntype ComponentPropsOptionalProps = DSToastT.OptionalProps;\ntype ComponentPropsRequiredProps = DSToastT.RequiredProps;\n\nconst closeButtonRef = createRef<HTMLButtonElement>();\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n containerId: '',\n closeButtonRef
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC6FrB,mBAEE,KAFF;AA5FF,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AAUxB,MAAM,iBAAiB,UAA6B;AAEpD,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD;AAAA,EACrD,aAAa;AAAA,EACb;AACF;AAIA,MAAM,sBAA2D;AAAA,EAC/D,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,iBAAiB;AACnB;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAGA,MAAM,+BAA+B;AAAA,EACnC,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,wBAAwB;AAAA,EAC5B,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,WAAS,GAAG,wBAAwB;AAAA,EACrC,oBAAC,WAAS,GAAG,8BAA8B;AAAA,EAC3C,oBAAC,WAAS,GAAG,uBAAuB;AAAA,EAEpC;AAAA,IAAC;AAAA;AAAA,MACC,gBAAgB,EAAE,eAAe,aAAa;AAAA,MAC9C,UAAS;AAAA,MACT,WAAW;AAAA,MACX,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { DSToast } from '../index.js';\nimport type { DSToastT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSToastT.Props;\ntype ComponentPropsInternals = DSToastT.InternalProps;\ntype ComponentPropsDefaultProps = DSToastT.DefaultProps;\ntype ComponentPropsOptionalProps = DSToastT.OptionalProps;\ntype ComponentPropsRequiredProps = DSToastT.RequiredProps;\n\nconst closeButtonRef = createRef<HTMLButtonElement>();\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n containerId: '',\n closeButtonRef,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n containerProps: { 'data-testid': 'ds-toast-1' },\n position: 'top-center',\n showProgressBar: false,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n containerProps: { 'data-testid': 'ds-toast-1' },\n position: 'top-center',\n autoClose: 2000,\n showProgressBar: true,\n closeOnClick: true,\n enableMultiContainer: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n containerProps: { 'data-testid': 'ds-toast-1' },\n position: 'top-left',\n autoClose: 5000,\n showProgressBar: true,\n closeOnClick: false,\n enableMultiContainer: false,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n containerProps: { 'data-testid': 'ds-toast-1' },\n position: 'top-left',\n autoClose: 5000,\n showProgressBar: true,\n closeOnClick: false,\n enableMultiContainer: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n containerProps: { 'data-testid': 'ds-toast-1' },\n position: 'top-left',\n autoClose: 5000,\n showProgressBar: true,\n closeOnClick: false,\n enableMultiContainer: false,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSToast {...testExplicitDefinition} />\n <DSToast {...testInferedTypeCompatibility} />\n <DSToast {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSToast\n containerProps={{ 'data-testid': 'ds-toast-1' }}\n position=\"top-left\"\n autoClose={5000}\n showProgressBar\n closeOnClick={false}\n enableMultiContainer={false}\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC6FrB,mBAEE,KAFF;AA5FF,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AAUxB,MAAM,iBAAiB,UAA6B;AAEpD,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD;AAAA,EACrD,aAAa;AAAA,EACb;AACF;AAIA,MAAM,sBAA2D;AAAA,EAC/D,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,iBAAiB;AACnB;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAGA,MAAM,+BAA+B;AAAA,EACnC,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,wBAAwB;AAAA,EAC5B,gBAAgB,EAAE,eAAe,aAAa;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AACxB;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,WAAS,GAAG,wBAAwB;AAAA,EACrC,oBAAC,WAAS,GAAG,8BAA8B;AAAA,EAC3C,oBAAC,WAAS,GAAG,uBAAuB;AAAA,EAEpC;AAAA,IAAC;AAAA;AAAA,MACC,gBAAgB,EAAE,eAAe,aAAa;AAAA,MAC9C,UAAS;AAAA,MACT,WAAW;AAAA,MACX,iBAAe;AAAA,MACf,cAAc;AAAA,MACd,sBAAsB;AAAA;AAAA,EACxB;AAAA,GACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -23,7 +23,20 @@ export declare const DSToastContentSlots: {
|
|
|
23
23
|
};
|
|
24
24
|
export declare const DSToastDataTestIds: {
|
|
25
25
|
CONTAINER: string;
|
|
26
|
+
ROOT: `ds-toast-${string}`;
|
|
27
|
+
TOAST_CONTAINER: `ds-toast-${string}`;
|
|
28
|
+
CLOSE_BUTTON: `ds-toast-${string}`;
|
|
29
|
+
ICON_CONTAINER: `ds-toast-${string}`;
|
|
30
|
+
MESSAGE_CONTENT: `ds-toast-${string}`;
|
|
31
|
+
MESSAGE_HEADER: `ds-toast-${string}`;
|
|
32
|
+
MESSAGE_TEXT: `ds-toast-${string}`;
|
|
33
|
+
};
|
|
34
|
+
export declare const DSToastActionDataTestIds: {
|
|
35
|
+
ROOT: `ds-toastaction-${string}`;
|
|
36
|
+
};
|
|
37
|
+
export declare const DSToastActionLinkDataTestIds: {
|
|
38
|
+
ROOT: `ds-toastactionlink-${string}`;
|
|
39
|
+
};
|
|
40
|
+
export declare const DSToastContentDataTestIds: {
|
|
41
|
+
ROOT: `ds-toastcontent-${string}`;
|
|
26
42
|
};
|
|
27
|
-
export declare const DSToastActionDataTestIds: Record<string, string>;
|
|
28
|
-
export declare const DSToastActionLinkDataTestIds: Record<string, string>;
|
|
29
|
-
export declare const DSToastContentDataTestIds: Record<string, string>;
|
|
@@ -1,66 +1,65 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DSToastT } from '../react-desc-prop-types.js';
|
|
3
2
|
export declare const useToast: (props: DSToastT.Props) => {
|
|
4
3
|
propsWithDefault: DSToastT.InternalProps;
|
|
5
4
|
toastifyWrapperRef: import("react").MutableRefObject<HTMLDivElement | null>;
|
|
6
5
|
onKeyDown: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
7
6
|
globalAttributes: Partial<Pick<object, "default" | "form" | "list" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<{
|
|
8
|
-
default?: boolean | undefined;
|
|
9
|
-
form?: string | undefined;
|
|
10
|
-
list?: string | undefined;
|
|
11
|
-
"aria-activedescendant"?: string | undefined;
|
|
7
|
+
default?: boolean | undefined | undefined;
|
|
8
|
+
form?: string | undefined | undefined;
|
|
9
|
+
list?: string | undefined | undefined;
|
|
10
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
12
11
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
13
|
-
"aria-autocomplete"?: "none" | "
|
|
14
|
-
"aria-braillelabel"?: string | undefined;
|
|
15
|
-
"aria-brailleroledescription"?: string | undefined;
|
|
12
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
13
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
14
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
16
15
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
17
|
-
"aria-checked"?: boolean | "
|
|
18
|
-
"aria-colcount"?: number | undefined;
|
|
19
|
-
"aria-colindex"?: number | undefined;
|
|
20
|
-
"aria-colindextext"?: string | undefined;
|
|
21
|
-
"aria-colspan"?: number | undefined;
|
|
22
|
-
"aria-controls"?: string | undefined;
|
|
23
|
-
"aria-current"?: boolean | "
|
|
24
|
-
"aria-describedby"?: string | undefined;
|
|
25
|
-
"aria-description"?: string | undefined;
|
|
26
|
-
"aria-details"?: string | undefined;
|
|
16
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
17
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
18
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
19
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
20
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
21
|
+
"aria-controls"?: string | undefined | undefined;
|
|
22
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
23
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
24
|
+
"aria-description"?: string | undefined | undefined;
|
|
25
|
+
"aria-details"?: string | undefined | undefined;
|
|
27
26
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
28
|
-
"aria-dropeffect"?: "none" | "
|
|
29
|
-
"aria-errormessage"?: string | undefined;
|
|
27
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
28
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
30
29
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
31
|
-
"aria-flowto"?: string | undefined;
|
|
30
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
32
31
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
33
|
-
"aria-haspopup"?: boolean | "
|
|
32
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
34
33
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
35
|
-
"aria-invalid"?: boolean | "
|
|
36
|
-
"aria-keyshortcuts"?: string | undefined;
|
|
37
|
-
"aria-label"?: string | undefined;
|
|
38
|
-
"aria-labelledby"?: string | undefined;
|
|
39
|
-
"aria-level"?: number | undefined;
|
|
40
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
34
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
35
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
36
|
+
"aria-label"?: string | undefined | undefined;
|
|
37
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
38
|
+
"aria-level"?: number | undefined | undefined;
|
|
39
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
41
40
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
42
41
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
43
42
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
44
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
45
|
-
"aria-owns"?: string | undefined;
|
|
46
|
-
"aria-placeholder"?: string | undefined;
|
|
47
|
-
"aria-posinset"?: number | undefined;
|
|
48
|
-
"aria-pressed"?: boolean | "
|
|
43
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
44
|
+
"aria-owns"?: string | undefined | undefined;
|
|
45
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
46
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
47
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
49
48
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
50
|
-
"aria-relevant"?: "
|
|
49
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
51
50
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
52
|
-
"aria-roledescription"?: string | undefined;
|
|
53
|
-
"aria-rowcount"?: number | undefined;
|
|
54
|
-
"aria-rowindex"?: number | undefined;
|
|
55
|
-
"aria-rowindextext"?: string | undefined;
|
|
56
|
-
"aria-rowspan"?: number | undefined;
|
|
51
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
52
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
53
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
54
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
55
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
57
56
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
58
|
-
"aria-setsize"?: number | undefined;
|
|
59
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
60
|
-
"aria-valuemax"?: number | undefined;
|
|
61
|
-
"aria-valuemin"?: number | undefined;
|
|
62
|
-
"aria-valuenow"?: number | undefined;
|
|
63
|
-
"aria-valuetext"?: string | undefined;
|
|
57
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
58
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
59
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
60
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
61
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
62
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
64
63
|
children?: import("react").ReactNode;
|
|
65
64
|
onCopy?: import("react").ClipboardEventHandler<Element> | undefined;
|
|
66
65
|
onCopyCapture?: import("react").ClipboardEventHandler<Element> | undefined;
|
|
@@ -80,7 +79,7 @@ export declare const useToast: (props: DSToastT.Props) => {
|
|
|
80
79
|
onBlurCapture?: import("react").FocusEventHandler<Element> | undefined;
|
|
81
80
|
onChange?: import("react").FormEventHandler<Element> | undefined;
|
|
82
81
|
onChangeCapture?: import("react").FormEventHandler<Element> | undefined;
|
|
83
|
-
onBeforeInput?: import("react").
|
|
82
|
+
onBeforeInput?: import("react").InputEventHandler<Element> | undefined;
|
|
84
83
|
onBeforeInputCapture?: import("react").FormEventHandler<Element> | undefined;
|
|
85
84
|
onInput?: import("react").FormEventHandler<Element> | undefined;
|
|
86
85
|
onInputCapture?: import("react").FormEventHandler<Element> | undefined;
|
|
@@ -220,155 +219,155 @@ export declare const useToast: (props: DSToastT.Props) => {
|
|
|
220
219
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<Element> | undefined;
|
|
221
220
|
onTransitionEnd?: import("react").TransitionEventHandler<Element> | undefined;
|
|
222
221
|
onTransitionEndCapture?: import("react").TransitionEventHandler<Element> | undefined;
|
|
223
|
-
defaultChecked?: boolean | undefined;
|
|
222
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
224
223
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
225
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
226
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
227
|
-
accessKey?: string | undefined;
|
|
228
|
-
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | (string & {}) | undefined;
|
|
229
|
-
autoFocus?: boolean | undefined;
|
|
230
|
-
className?: string | undefined;
|
|
224
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
225
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
226
|
+
accessKey?: string | undefined | undefined;
|
|
227
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
228
|
+
autoFocus?: boolean | undefined | undefined;
|
|
229
|
+
className?: string | undefined | undefined;
|
|
231
230
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
232
|
-
contextMenu?: string | undefined;
|
|
233
|
-
dir?: string | undefined;
|
|
231
|
+
contextMenu?: string | undefined | undefined;
|
|
232
|
+
dir?: string | undefined | undefined;
|
|
234
233
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
235
|
-
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
236
|
-
hidden?: boolean | undefined;
|
|
237
|
-
id?: string | undefined;
|
|
238
|
-
lang?: string | undefined;
|
|
239
|
-
nonce?: string | undefined;
|
|
240
|
-
slot?: string | undefined;
|
|
234
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
235
|
+
hidden?: boolean | undefined | undefined;
|
|
236
|
+
id?: string | undefined | undefined;
|
|
237
|
+
lang?: string | undefined | undefined;
|
|
238
|
+
nonce?: string | undefined | undefined;
|
|
239
|
+
slot?: string | undefined | undefined;
|
|
241
240
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
242
241
|
style?: import("react").CSSProperties | undefined;
|
|
243
242
|
tabIndex?: 0 | -1 | undefined;
|
|
244
|
-
title?: string | undefined;
|
|
245
|
-
translate?: "yes" | "no" | undefined;
|
|
246
|
-
radioGroup?: string | undefined;
|
|
243
|
+
title?: string | undefined | undefined;
|
|
244
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
245
|
+
radioGroup?: string | undefined | undefined;
|
|
247
246
|
role?: import("react").AriaRole | undefined;
|
|
248
|
-
about?: string | undefined;
|
|
249
|
-
content?: string | undefined;
|
|
250
|
-
datatype?: string | undefined;
|
|
247
|
+
about?: string | undefined | undefined;
|
|
248
|
+
content?: string | undefined | undefined;
|
|
249
|
+
datatype?: string | undefined | undefined;
|
|
251
250
|
inlist?: any;
|
|
252
|
-
prefix?: string | undefined;
|
|
253
|
-
property?: string | undefined;
|
|
254
|
-
rel?: string | undefined;
|
|
255
|
-
resource?: string | undefined;
|
|
256
|
-
rev?: string | undefined;
|
|
257
|
-
typeof?: string | undefined;
|
|
258
|
-
vocab?: string | undefined;
|
|
259
|
-
autoCorrect?: string | undefined;
|
|
260
|
-
autoSave?: string | undefined;
|
|
261
|
-
color?: string | undefined;
|
|
262
|
-
itemProp?: string | undefined;
|
|
263
|
-
itemScope?: boolean | undefined;
|
|
264
|
-
itemType?: string | undefined;
|
|
265
|
-
itemID?: string | undefined;
|
|
266
|
-
itemRef?: string | undefined;
|
|
267
|
-
results?: number | undefined;
|
|
268
|
-
security?: string | undefined;
|
|
269
|
-
unselectable?: "
|
|
270
|
-
inputMode?: "none" | "
|
|
271
|
-
is?: string | undefined;
|
|
272
|
-
exportparts?: string | undefined;
|
|
273
|
-
part?: string | undefined;
|
|
274
|
-
accept?: string | undefined;
|
|
275
|
-
acceptCharset?: string | undefined;
|
|
251
|
+
prefix?: string | undefined | undefined;
|
|
252
|
+
property?: string | undefined | undefined;
|
|
253
|
+
rel?: string | undefined | undefined;
|
|
254
|
+
resource?: string | undefined | undefined;
|
|
255
|
+
rev?: string | undefined | undefined;
|
|
256
|
+
typeof?: string | undefined | undefined;
|
|
257
|
+
vocab?: string | undefined | undefined;
|
|
258
|
+
autoCorrect?: string | undefined | undefined;
|
|
259
|
+
autoSave?: string | undefined | undefined;
|
|
260
|
+
color?: string | undefined | undefined;
|
|
261
|
+
itemProp?: string | undefined | undefined;
|
|
262
|
+
itemScope?: boolean | undefined | undefined;
|
|
263
|
+
itemType?: string | undefined | undefined;
|
|
264
|
+
itemID?: string | undefined | undefined;
|
|
265
|
+
itemRef?: string | undefined | undefined;
|
|
266
|
+
results?: number | undefined | undefined;
|
|
267
|
+
security?: string | undefined | undefined;
|
|
268
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
269
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
270
|
+
is?: string | undefined | undefined;
|
|
271
|
+
exportparts?: string | undefined | undefined;
|
|
272
|
+
part?: string | undefined | undefined;
|
|
273
|
+
accept?: string | undefined | undefined;
|
|
274
|
+
acceptCharset?: string | undefined | undefined;
|
|
276
275
|
action?: string | undefined;
|
|
277
|
-
allowFullScreen?: boolean | undefined;
|
|
278
|
-
allowTransparency?: boolean | undefined;
|
|
279
|
-
alt?: string | undefined;
|
|
280
|
-
async?: boolean | undefined;
|
|
281
|
-
autoComplete?: string | undefined;
|
|
282
|
-
autoPlay?: boolean | undefined;
|
|
283
|
-
capture?: boolean | "user" | "environment" | undefined;
|
|
284
|
-
cellPadding?: string |
|
|
285
|
-
cellSpacing?: string |
|
|
286
|
-
charSet?: string | undefined;
|
|
287
|
-
challenge?: string | undefined;
|
|
288
|
-
checked?: boolean | undefined;
|
|
289
|
-
cite?: string | undefined;
|
|
290
|
-
classID?: string | undefined;
|
|
291
|
-
cols?: number | undefined;
|
|
292
|
-
colSpan?: number | undefined;
|
|
293
|
-
controls?: boolean | undefined;
|
|
294
|
-
coords?: string | undefined;
|
|
276
|
+
allowFullScreen?: boolean | undefined | undefined;
|
|
277
|
+
allowTransparency?: boolean | undefined | undefined;
|
|
278
|
+
alt?: string | undefined | undefined;
|
|
279
|
+
async?: boolean | undefined | undefined;
|
|
280
|
+
autoComplete?: string | undefined | undefined;
|
|
281
|
+
autoPlay?: boolean | undefined | undefined;
|
|
282
|
+
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
283
|
+
cellPadding?: number | string | undefined | undefined;
|
|
284
|
+
cellSpacing?: number | string | undefined | undefined;
|
|
285
|
+
charSet?: string | undefined | undefined;
|
|
286
|
+
challenge?: string | undefined | undefined;
|
|
287
|
+
checked?: boolean | undefined | undefined;
|
|
288
|
+
cite?: string | undefined | undefined;
|
|
289
|
+
classID?: string | undefined | undefined;
|
|
290
|
+
cols?: number | undefined | undefined;
|
|
291
|
+
colSpan?: number | undefined | undefined;
|
|
292
|
+
controls?: boolean | undefined | undefined;
|
|
293
|
+
coords?: string | undefined | undefined;
|
|
295
294
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
296
|
-
data?: string | undefined;
|
|
297
|
-
dateTime?: string | undefined;
|
|
298
|
-
defer?: boolean | undefined;
|
|
299
|
-
disabled?: boolean | undefined;
|
|
295
|
+
data?: string | undefined | undefined;
|
|
296
|
+
dateTime?: string | undefined | undefined;
|
|
297
|
+
defer?: boolean | undefined | undefined;
|
|
298
|
+
disabled?: boolean | undefined | undefined;
|
|
300
299
|
download?: any;
|
|
301
|
-
encType?: string | undefined;
|
|
300
|
+
encType?: string | undefined | undefined;
|
|
302
301
|
formAction?: string | undefined;
|
|
303
|
-
formEncType?: string | undefined;
|
|
304
|
-
formMethod?: string | undefined;
|
|
305
|
-
formNoValidate?: boolean | undefined;
|
|
306
|
-
formTarget?: string | undefined;
|
|
307
|
-
frameBorder?: string |
|
|
308
|
-
headers?: string | undefined;
|
|
309
|
-
height?: string |
|
|
310
|
-
high?: number | undefined;
|
|
311
|
-
href?: string | undefined;
|
|
312
|
-
hrefLang?: string | undefined;
|
|
313
|
-
htmlFor?: string | undefined;
|
|
314
|
-
httpEquiv?: string | undefined;
|
|
315
|
-
integrity?: string | undefined;
|
|
316
|
-
keyParams?: string | undefined;
|
|
317
|
-
keyType?: string | undefined;
|
|
318
|
-
kind?: string | undefined;
|
|
319
|
-
label?: string | undefined;
|
|
320
|
-
loop?: boolean | undefined;
|
|
321
|
-
low?: number | undefined;
|
|
322
|
-
manifest?: string | undefined;
|
|
323
|
-
marginHeight?: number | undefined;
|
|
324
|
-
marginWidth?: number | undefined;
|
|
325
|
-
max?: string |
|
|
326
|
-
maxLength?: number | undefined;
|
|
327
|
-
media?: string | undefined;
|
|
328
|
-
mediaGroup?: string | undefined;
|
|
329
|
-
method?: string | undefined;
|
|
330
|
-
min?: string |
|
|
331
|
-
minLength?: number | undefined;
|
|
332
|
-
multiple?: boolean | undefined;
|
|
333
|
-
muted?: boolean | undefined;
|
|
334
|
-
name?: string | undefined;
|
|
335
|
-
noValidate?: boolean | undefined;
|
|
336
|
-
open?: boolean | undefined;
|
|
337
|
-
optimum?: number | undefined;
|
|
338
|
-
pattern?: string | undefined;
|
|
339
|
-
placeholder?: string | undefined;
|
|
340
|
-
playsInline?: boolean | undefined;
|
|
341
|
-
poster?: string | undefined;
|
|
342
|
-
preload?: string | undefined;
|
|
343
|
-
readOnly?: boolean | undefined;
|
|
344
|
-
required?: boolean | undefined;
|
|
345
|
-
reversed?: boolean | undefined;
|
|
346
|
-
rows?: number | undefined;
|
|
347
|
-
rowSpan?: number | undefined;
|
|
348
|
-
sandbox?: string | undefined;
|
|
349
|
-
scope?: string | undefined;
|
|
350
|
-
scoped?: boolean | undefined;
|
|
351
|
-
scrolling?: string | undefined;
|
|
352
|
-
seamless?: boolean | undefined;
|
|
353
|
-
selected?: boolean | undefined;
|
|
354
|
-
shape?: string | undefined;
|
|
355
|
-
size?: number | undefined;
|
|
356
|
-
sizes?: string | undefined;
|
|
357
|
-
span?: number | undefined;
|
|
358
|
-
src?: string | undefined;
|
|
359
|
-
srcDoc?: string | undefined;
|
|
360
|
-
srcLang?: string | undefined;
|
|
361
|
-
srcSet?: string | undefined;
|
|
362
|
-
start?: number | undefined;
|
|
363
|
-
step?: string |
|
|
364
|
-
summary?: string | undefined;
|
|
365
|
-
target?: string | undefined;
|
|
366
|
-
type?: string | undefined;
|
|
367
|
-
useMap?: string | undefined;
|
|
302
|
+
formEncType?: string | undefined | undefined;
|
|
303
|
+
formMethod?: string | undefined | undefined;
|
|
304
|
+
formNoValidate?: boolean | undefined | undefined;
|
|
305
|
+
formTarget?: string | undefined | undefined;
|
|
306
|
+
frameBorder?: number | string | undefined | undefined;
|
|
307
|
+
headers?: string | undefined | undefined;
|
|
308
|
+
height?: number | string | undefined | undefined;
|
|
309
|
+
high?: number | undefined | undefined;
|
|
310
|
+
href?: string | undefined | undefined;
|
|
311
|
+
hrefLang?: string | undefined | undefined;
|
|
312
|
+
htmlFor?: string | undefined | undefined;
|
|
313
|
+
httpEquiv?: string | undefined | undefined;
|
|
314
|
+
integrity?: string | undefined | undefined;
|
|
315
|
+
keyParams?: string | undefined | undefined;
|
|
316
|
+
keyType?: string | undefined | undefined;
|
|
317
|
+
kind?: string | undefined | undefined;
|
|
318
|
+
label?: string | undefined | undefined;
|
|
319
|
+
loop?: boolean | undefined | undefined;
|
|
320
|
+
low?: number | undefined | undefined;
|
|
321
|
+
manifest?: string | undefined | undefined;
|
|
322
|
+
marginHeight?: number | undefined | undefined;
|
|
323
|
+
marginWidth?: number | undefined | undefined;
|
|
324
|
+
max?: number | string | undefined | undefined;
|
|
325
|
+
maxLength?: number | undefined | undefined;
|
|
326
|
+
media?: string | undefined | undefined;
|
|
327
|
+
mediaGroup?: string | undefined | undefined;
|
|
328
|
+
method?: string | undefined | undefined;
|
|
329
|
+
min?: number | string | undefined | undefined;
|
|
330
|
+
minLength?: number | undefined | undefined;
|
|
331
|
+
multiple?: boolean | undefined | undefined;
|
|
332
|
+
muted?: boolean | undefined | undefined;
|
|
333
|
+
name?: string | undefined | undefined;
|
|
334
|
+
noValidate?: boolean | undefined | undefined;
|
|
335
|
+
open?: boolean | undefined | undefined;
|
|
336
|
+
optimum?: number | undefined | undefined;
|
|
337
|
+
pattern?: string | undefined | undefined;
|
|
338
|
+
placeholder?: string | undefined | undefined;
|
|
339
|
+
playsInline?: boolean | undefined | undefined;
|
|
340
|
+
poster?: string | undefined | undefined;
|
|
341
|
+
preload?: string | undefined | undefined;
|
|
342
|
+
readOnly?: boolean | undefined | undefined;
|
|
343
|
+
required?: boolean | undefined | undefined;
|
|
344
|
+
reversed?: boolean | undefined | undefined;
|
|
345
|
+
rows?: number | undefined | undefined;
|
|
346
|
+
rowSpan?: number | undefined | undefined;
|
|
347
|
+
sandbox?: string | undefined | undefined;
|
|
348
|
+
scope?: string | undefined | undefined;
|
|
349
|
+
scoped?: boolean | undefined | undefined;
|
|
350
|
+
scrolling?: string | undefined | undefined;
|
|
351
|
+
seamless?: boolean | undefined | undefined;
|
|
352
|
+
selected?: boolean | undefined | undefined;
|
|
353
|
+
shape?: string | undefined | undefined;
|
|
354
|
+
size?: number | undefined | undefined;
|
|
355
|
+
sizes?: string | undefined | undefined;
|
|
356
|
+
span?: number | undefined | undefined;
|
|
357
|
+
src?: string | undefined | undefined;
|
|
358
|
+
srcDoc?: string | undefined | undefined;
|
|
359
|
+
srcLang?: string | undefined | undefined;
|
|
360
|
+
srcSet?: string | undefined | undefined;
|
|
361
|
+
start?: number | undefined | undefined;
|
|
362
|
+
step?: number | string | undefined | undefined;
|
|
363
|
+
summary?: string | undefined | undefined;
|
|
364
|
+
target?: string | undefined | undefined;
|
|
365
|
+
type?: string | undefined | undefined;
|
|
366
|
+
useMap?: string | undefined | undefined;
|
|
368
367
|
value?: string | number | readonly string[] | undefined;
|
|
369
|
-
width?: string |
|
|
370
|
-
wmode?: string | undefined;
|
|
371
|
-
wrap?: string | undefined;
|
|
368
|
+
width?: number | string | undefined | undefined;
|
|
369
|
+
wmode?: string | undefined | undefined;
|
|
370
|
+
wrap?: string | undefined | undefined;
|
|
372
371
|
}, never>>;
|
|
373
372
|
xstyledAttributes: import("@elliemae/ds-props-helpers").XstyledProps;
|
|
374
373
|
closeButtonRef: (node: HTMLButtonElement | null) => void;
|
|
@@ -3,6 +3,6 @@ interface CloseButtonProps {
|
|
|
3
3
|
closeToast: () => void;
|
|
4
4
|
}
|
|
5
5
|
export declare const CloseButton: ({ closeButtonRef }: {
|
|
6
|
-
closeButtonRef: DSToastT.Props[
|
|
6
|
+
closeButtonRef: DSToastT.Props["closeButtonRef"];
|
|
7
7
|
}) => ({ closeToast }: CloseButtonProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const DSToastActionLink: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, {
|
|
3
|
-
children?: import("react").ReactNode;
|
|
2
|
+
children?: import("react").ReactNode | undefined;
|
|
4
3
|
} & import("@elliemae/ds-props-helpers").XstyledProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
|
|
5
4
|
export declare const DSToastActionLinkWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SvgIconT } from '@elliemae/ds-icons';
|
|
3
3
|
import { type DSToastT } from '../react-desc-prop-types.js';
|
|
4
|
-
export declare const getIconByToastType: (type: DSToastT.ToastTypes) => ((props: SvgIconT.Props) => import("react/jsx-runtime.js").JSX.Element) | ((props: SvgIconT.Props) => import("react/jsx-runtime.js").JSX.Element) | ((rest: SvgIconT.Props) => import("react/jsx-runtime.js").JSX.Element) | ((props: SvgIconT.Props) => import("react/jsx-runtime.js").JSX.Element) | (() => null);
|
|
4
|
+
export declare const getIconByToastType: (type: DSToastT.ToastTypes) => ((props: SvgIconT.Props) => import("react/jsx-runtime.js").JSX.Element) | ((props: SvgIconT.Props) => import("react/jsx-runtime.js").JSX.Element) | ((rest: import("@elliemae/ds-icons").SvgIconT.Props) => import("react/jsx-runtime.js").JSX.Element) | ((props: SvgIconT.Props) => import("react/jsx-runtime.js").JSX.Element) | (() => null);
|
|
5
5
|
export declare const getIconColorByToastType: (type: DSToastT.ToastTypes) => SvgIconT.ColorType;
|
|
6
6
|
export interface DSToastContentProps {
|
|
7
7
|
type?: DSToastT.ToastTypes;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { XstyledProps } from '@elliemae/ds-props-helpers';
|
|
3
2
|
export declare const StyledToastContainer: import("styled-components").StyledComponent<import("react").FC<import("react-toastify").ToastContainerProps>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").FC<import("react-toastify").ToastContainerProps>>, never>;
|
|
4
3
|
export declare const StyledLink: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, {
|
|
5
|
-
children?: import("react").ReactNode;
|
|
4
|
+
children?: import("react").ReactNode | undefined;
|
|
6
5
|
} & XstyledProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
|
|
7
6
|
export declare const StyledContainer: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
8
7
|
export declare const StyledIconContainer: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
3
3
|
import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
|
|
4
|
+
import type { WeakValidationMap } from 'react';
|
|
4
5
|
import { toastsPositions, toastTypes } from './constants.js';
|
|
5
6
|
import { DSToastName, DSToastSlots } from './DSToastDefinitions.js';
|
|
6
7
|
export declare namespace DSToastT {
|
|
@@ -38,7 +39,7 @@ export declare namespace DSToastT {
|
|
|
38
39
|
}
|
|
39
40
|
export declare const defaultProps: DSToastT.DefaultProps;
|
|
40
41
|
export declare const actionDefaultProps: DSToastT.ActionDefaultProps;
|
|
41
|
-
export declare const DSToastPropTypes:
|
|
42
|
+
export declare const DSToastPropTypes: WeakValidationMap<unknown>;
|
|
42
43
|
export declare const DSToastActionLinkPropTypes: React.WeakValidationMap<unknown>;
|
|
43
44
|
export declare const DSToastActionPropsTypes: React.WeakValidationMap<unknown>;
|
|
44
45
|
export declare const DSToastContentPropTypes: React.WeakValidationMap<unknown>;
|
package/dist/types/toast.d.ts
CHANGED
|
@@ -10,11 +10,11 @@ declare const toast: (({ type, messageTitle, messageText, messageComponent, ...r
|
|
|
10
10
|
dark(content: import("react-toastify").ToastContent, options?: ToastOptions | undefined): React.ReactText;
|
|
11
11
|
warn: (content: import("react-toastify").ToastContent, options?: ToastOptions | undefined) => React.ReactText;
|
|
12
12
|
dismiss(id?: string | number | undefined): false | void;
|
|
13
|
-
clearWaitingQueue(params?: import("react-toastify").ClearWaitingQueueParams
|
|
14
|
-
update(toastId: import("react-toastify").Id, options?: import("react-toastify").UpdateOptions
|
|
13
|
+
clearWaitingQueue(params?: import("react-toastify").ClearWaitingQueueParams): false | void;
|
|
14
|
+
update(toastId: import("react-toastify").Id, options?: import("react-toastify").UpdateOptions): void;
|
|
15
15
|
done(id: import("react-toastify").Id): void;
|
|
16
16
|
onChange(callback: import("react-toastify/dist/core/eventManager.js").OnChangeCallback): () => void;
|
|
17
|
-
configure(config?: import("react-toastify").ToastContainerProps
|
|
17
|
+
configure(config?: import("react-toastify").ToastContainerProps): void;
|
|
18
18
|
POSITION: {
|
|
19
19
|
TOP_LEFT: import("react-toastify").ToastPosition;
|
|
20
20
|
TOP_RIGHT: import("react-toastify").ToastPosition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-toast",
|
|
3
|
-
"version": "3.53.0-alpha.
|
|
3
|
+
"version": "3.53.0-alpha.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Toast",
|
|
6
6
|
"files": [
|
|
@@ -39,17 +39,18 @@
|
|
|
39
39
|
"@xstyled/system": "~3.7.3",
|
|
40
40
|
"@xstyled/util": "~3.7.0",
|
|
41
41
|
"react-toastify": "~6.2.0",
|
|
42
|
-
"@elliemae/ds-button-v2": "3.53.0-alpha.
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-
|
|
45
|
-
"@elliemae/ds-system": "3.53.0-alpha.
|
|
46
|
-
"@elliemae/ds-typescript-helpers": "3.53.0-alpha.
|
|
42
|
+
"@elliemae/ds-button-v2": "3.53.0-alpha.3",
|
|
43
|
+
"@elliemae/ds-icons": "3.53.0-alpha.3",
|
|
44
|
+
"@elliemae/ds-props-helpers": "3.53.0-alpha.3",
|
|
45
|
+
"@elliemae/ds-system": "3.53.0-alpha.3",
|
|
46
|
+
"@elliemae/ds-typescript-helpers": "3.53.0-alpha.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
49
|
+
"@elliemae/pui-cli": "9.0.0-next.65",
|
|
50
50
|
"jest": "~29.7.0",
|
|
51
51
|
"styled-components": "~5.3.9",
|
|
52
|
-
"@elliemae/ds-
|
|
52
|
+
"@elliemae/ds-test-utils": "3.53.0-alpha.3",
|
|
53
|
+
"@elliemae/ds-monorepo-devops": "3.53.0-alpha.3"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"lodash-es": "^4.17.21",
|