@elliemae/ds-dialog 3.80.0-next.8 → 3.80.0-next.80
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/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +52 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +29 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/types/react-desc-prop-types.d.ts +13 -0
- package/package.json +8 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { getPropsPerSlotPropTypes, globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DIALOG_SLOTS, DSDialogName } from './constants/index.js';\nimport { DSDialogSizes, DSDialogSizesArrayValues } from './utils.js';\n\nexport declare namespace DSDialogT {\n export type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';\n\n export interface DefaultProps {\n isOpen: boolean;\n centered: boolean;\n size: Sizes;\n removeAutoFocus: boolean;\n onClickOutside: () => void;\n onClose: () => void;\n width: string | number;\n }\n\n export interface RequiredProps {\n children: TypescriptHelpersT.ReactChildrenComplete;\n }\n\n export interface OptionalProps
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA+E;AAE/E,uBAA2C;AAC3C,mBAAwD;
|
|
4
|
+
"sourcesContent": ["import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { getPropsPerSlotPropTypes, globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DIALOG_SLOTS, DSDialogName } from './constants/index.js';\nimport { DSDialogSizes, DSDialogSizesArrayValues } from './utils.js';\n\nexport declare namespace DSDialogT {\n export type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';\n\n /* *******************************************************\n * Slot function-form prop arguments \u2014 one entry per slot in DIALOG_SLOTS.\n * Backs the typescript-testing/slot-props.ts exhaustiveness check.\n ******************************************************* */\n export type SlotFunctionArguments = {\n dsDialogBackground: () => object;\n dsDialogContainer: () => object;\n dsDialogTitle: () => object;\n dsDialogAddon: () => object;\n dsDialogHeader: () => object;\n dsDialogSeparator: () => object;\n dsDialogBody: () => object;\n dsDialogPrimaryMessage: () => object;\n dsDialogSecondaryMessage: () => object;\n dsDialogDefaultLayout: () => object;\n dsDialogFooter: () => object;\n };\n\n export interface DefaultProps {\n isOpen: boolean;\n centered: boolean;\n size: Sizes;\n removeAutoFocus: boolean;\n onClickOutside: () => void;\n onClose: () => void;\n width: string | number;\n }\n\n export interface RequiredProps {\n children: TypescriptHelpersT.ReactChildrenComplete;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSDialogName,\n typeof DIALOG_SLOTS\n > {\n zIndex?: number;\n portalRef?: React.MutableRefObject<HTMLElement | null> | null;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n RequiredProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, 'size' | 'width' | 'children'> {}\n\n export interface InternalProps extends DefaultProps, RequiredProps, OptionalProps {}\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};\n\nexport const propTypes = {\n ...getPropsPerSlotPropTypes(DSDialogName, DIALOG_SLOTS),\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;ADCvB,8BAA+E;AAE/E,uBAA2C;AAC3C,mBAAwD;AAuDjD,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;AAClB;AAEO,MAAM,YAAY;AAAA,EACvB,OAAG,kDAAyB,+BAAc,6BAAY;AAAA,EACtD,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
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
const SlotPropsAsObj = {
|
|
26
|
+
dsDialogBackground: { "aria-label": "just a typescript test" },
|
|
27
|
+
dsDialogContainer: { "aria-label": "just a typescript test" },
|
|
28
|
+
dsDialogTitle: { "aria-label": "just a typescript test" },
|
|
29
|
+
dsDialogAddon: { "aria-label": "just a typescript test" },
|
|
30
|
+
dsDialogHeader: { "aria-label": "just a typescript test" },
|
|
31
|
+
dsDialogSeparator: { "aria-label": "just a typescript test" },
|
|
32
|
+
dsDialogBody: { "aria-label": "just a typescript test" },
|
|
33
|
+
dsDialogPrimaryMessage: { "aria-label": "just a typescript test" },
|
|
34
|
+
dsDialogSecondaryMessage: { "aria-label": "just a typescript test" },
|
|
35
|
+
dsDialogDefaultLayout: { "aria-label": "just a typescript test" },
|
|
36
|
+
dsDialogFooter: { "aria-label": "just a typescript test" }
|
|
37
|
+
};
|
|
38
|
+
const SlotPropsAsFunctions = {
|
|
39
|
+
dsDialogBackground: () => ({ "aria-label": "just a typescript test" }),
|
|
40
|
+
dsDialogContainer: () => ({ "aria-label": "just a typescript test" }),
|
|
41
|
+
dsDialogTitle: () => ({ "aria-label": "just a typescript test" }),
|
|
42
|
+
dsDialogAddon: () => ({ "aria-label": "just a typescript test" }),
|
|
43
|
+
dsDialogHeader: () => ({ "aria-label": "just a typescript test" }),
|
|
44
|
+
dsDialogSeparator: () => ({ "aria-label": "just a typescript test" }),
|
|
45
|
+
dsDialogBody: () => ({ "aria-label": "just a typescript test" }),
|
|
46
|
+
dsDialogPrimaryMessage: () => ({ "aria-label": "just a typescript test" }),
|
|
47
|
+
dsDialogSecondaryMessage: () => ({ "aria-label": "just a typescript test" }),
|
|
48
|
+
dsDialogDefaultLayout: () => ({ "aria-label": "just a typescript test" }),
|
|
49
|
+
dsDialogFooter: () => ({ "aria-label": "just a typescript test" })
|
|
50
|
+
};
|
|
51
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
52
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\n\nimport type { DSDialogT } from '../react-desc-prop-types.js';\nimport type { DSDialogName, DIALOG_SLOTS } from '../constants/index.js';\n\nconst SlotPropsAsObj: Partial<DSDialogT.Props> = {\n dsDialogBackground: { 'aria-label': 'just a typescript test' },\n dsDialogContainer: { 'aria-label': 'just a typescript test' },\n dsDialogTitle: { 'aria-label': 'just a typescript test' },\n dsDialogAddon: { 'aria-label': 'just a typescript test' },\n dsDialogHeader: { 'aria-label': 'just a typescript test' },\n dsDialogSeparator: { 'aria-label': 'just a typescript test' },\n dsDialogBody: { 'aria-label': 'just a typescript test' },\n dsDialogPrimaryMessage: { 'aria-label': 'just a typescript test' },\n dsDialogSecondaryMessage: { 'aria-label': 'just a typescript test' },\n dsDialogDefaultLayout: { 'aria-label': 'just a typescript test' },\n dsDialogFooter: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSDialogT.SlotFunctionArguments = {\n dsDialogBackground: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogTitle: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogAddon: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogHeader: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogSeparator: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogBody: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogPrimaryMessage: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogSecondaryMessage: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogDefaultLayout: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogFooter: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments.\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSDialogName, typeof DIALOG_SLOTS>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACOvB,MAAM,iBAA2C;AAAA,EAC/C,oBAAoB,EAAE,cAAc,yBAAyB;AAAA,EAC7D,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,eAAe,EAAE,cAAc,yBAAyB;AAAA,EACxD,eAAe,EAAE,cAAc,yBAAyB;AAAA,EACxD,gBAAgB,EAAE,cAAc,yBAAyB;AAAA,EACzD,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,cAAc,EAAE,cAAc,yBAAyB;AAAA,EACvD,wBAAwB,EAAE,cAAc,yBAAyB;AAAA,EACjE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,uBAAuB,EAAE,cAAc,yBAAyB;AAAA,EAChE,gBAAgB,EAAE,cAAc,yBAAyB;AAC3D;AAEA,MAAM,uBAAwD;AAAA,EAC5D,oBAAoB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACpE,mBAAmB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnE,eAAe,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/D,eAAe,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/D,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAChE,mBAAmB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnE,cAAc,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC9D,wBAAwB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACxE,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,uBAAuB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACvE,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAClE;AAGA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { getPropsPerSlotPropTypes, globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DIALOG_SLOTS, DSDialogName } from './constants/index.js';\nimport { DSDialogSizes, DSDialogSizesArrayValues } from './utils.js';\n\nexport declare namespace DSDialogT {\n export type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';\n\n export interface DefaultProps {\n isOpen: boolean;\n centered: boolean;\n size: Sizes;\n removeAutoFocus: boolean;\n onClickOutside: () => void;\n onClose: () => void;\n width: string | number;\n }\n\n export interface RequiredProps {\n children: TypescriptHelpersT.ReactChildrenComplete;\n }\n\n export interface OptionalProps
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,0BAA0B,2BAA2B,iBAAiB;AAE/E,SAAS,cAAc,oBAAoB;AAC3C,SAAS,eAAe,gCAAgC;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { getPropsPerSlotPropTypes, globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DIALOG_SLOTS, DSDialogName } from './constants/index.js';\nimport { DSDialogSizes, DSDialogSizesArrayValues } from './utils.js';\n\nexport declare namespace DSDialogT {\n export type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';\n\n /* *******************************************************\n * Slot function-form prop arguments \u2014 one entry per slot in DIALOG_SLOTS.\n * Backs the typescript-testing/slot-props.ts exhaustiveness check.\n ******************************************************* */\n export type SlotFunctionArguments = {\n dsDialogBackground: () => object;\n dsDialogContainer: () => object;\n dsDialogTitle: () => object;\n dsDialogAddon: () => object;\n dsDialogHeader: () => object;\n dsDialogSeparator: () => object;\n dsDialogBody: () => object;\n dsDialogPrimaryMessage: () => object;\n dsDialogSecondaryMessage: () => object;\n dsDialogDefaultLayout: () => object;\n dsDialogFooter: () => object;\n };\n\n export interface DefaultProps {\n isOpen: boolean;\n centered: boolean;\n size: Sizes;\n removeAutoFocus: boolean;\n onClickOutside: () => void;\n onClose: () => void;\n width: string | number;\n }\n\n export interface RequiredProps {\n children: TypescriptHelpersT.ReactChildrenComplete;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSDialogName,\n typeof DIALOG_SLOTS\n > {\n zIndex?: number;\n portalRef?: React.MutableRefObject<HTMLElement | null> | null;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n RequiredProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, 'size' | 'width' | 'children'> {}\n\n export interface InternalProps extends DefaultProps, RequiredProps, OptionalProps {}\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};\n\nexport const propTypes = {\n ...getPropsPerSlotPropTypes(DSDialogName, DIALOG_SLOTS),\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;ACCvB,SAAS,0BAA0B,2BAA2B,iBAAiB;AAE/E,SAAS,cAAc,oBAAoB;AAC3C,SAAS,eAAe,gCAAgC;AAuDjD,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;AAClB;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG,yBAAyB,cAAc,YAAY;AAAA,EACtD,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
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const SlotPropsAsObj = {
|
|
3
|
+
dsDialogBackground: { "aria-label": "just a typescript test" },
|
|
4
|
+
dsDialogContainer: { "aria-label": "just a typescript test" },
|
|
5
|
+
dsDialogTitle: { "aria-label": "just a typescript test" },
|
|
6
|
+
dsDialogAddon: { "aria-label": "just a typescript test" },
|
|
7
|
+
dsDialogHeader: { "aria-label": "just a typescript test" },
|
|
8
|
+
dsDialogSeparator: { "aria-label": "just a typescript test" },
|
|
9
|
+
dsDialogBody: { "aria-label": "just a typescript test" },
|
|
10
|
+
dsDialogPrimaryMessage: { "aria-label": "just a typescript test" },
|
|
11
|
+
dsDialogSecondaryMessage: { "aria-label": "just a typescript test" },
|
|
12
|
+
dsDialogDefaultLayout: { "aria-label": "just a typescript test" },
|
|
13
|
+
dsDialogFooter: { "aria-label": "just a typescript test" }
|
|
14
|
+
};
|
|
15
|
+
const SlotPropsAsFunctions = {
|
|
16
|
+
dsDialogBackground: () => ({ "aria-label": "just a typescript test" }),
|
|
17
|
+
dsDialogContainer: () => ({ "aria-label": "just a typescript test" }),
|
|
18
|
+
dsDialogTitle: () => ({ "aria-label": "just a typescript test" }),
|
|
19
|
+
dsDialogAddon: () => ({ "aria-label": "just a typescript test" }),
|
|
20
|
+
dsDialogHeader: () => ({ "aria-label": "just a typescript test" }),
|
|
21
|
+
dsDialogSeparator: () => ({ "aria-label": "just a typescript test" }),
|
|
22
|
+
dsDialogBody: () => ({ "aria-label": "just a typescript test" }),
|
|
23
|
+
dsDialogPrimaryMessage: () => ({ "aria-label": "just a typescript test" }),
|
|
24
|
+
dsDialogSecondaryMessage: () => ({ "aria-label": "just a typescript test" }),
|
|
25
|
+
dsDialogDefaultLayout: () => ({ "aria-label": "just a typescript test" }),
|
|
26
|
+
dsDialogFooter: () => ({ "aria-label": "just a typescript test" })
|
|
27
|
+
};
|
|
28
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
29
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\n\nimport type { DSDialogT } from '../react-desc-prop-types.js';\nimport type { DSDialogName, DIALOG_SLOTS } from '../constants/index.js';\n\nconst SlotPropsAsObj: Partial<DSDialogT.Props> = {\n dsDialogBackground: { 'aria-label': 'just a typescript test' },\n dsDialogContainer: { 'aria-label': 'just a typescript test' },\n dsDialogTitle: { 'aria-label': 'just a typescript test' },\n dsDialogAddon: { 'aria-label': 'just a typescript test' },\n dsDialogHeader: { 'aria-label': 'just a typescript test' },\n dsDialogSeparator: { 'aria-label': 'just a typescript test' },\n dsDialogBody: { 'aria-label': 'just a typescript test' },\n dsDialogPrimaryMessage: { 'aria-label': 'just a typescript test' },\n dsDialogSecondaryMessage: { 'aria-label': 'just a typescript test' },\n dsDialogDefaultLayout: { 'aria-label': 'just a typescript test' },\n dsDialogFooter: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSDialogT.SlotFunctionArguments = {\n dsDialogBackground: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogTitle: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogAddon: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogHeader: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogSeparator: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogBody: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogPrimaryMessage: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogSecondaryMessage: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogDefaultLayout: () => ({ 'aria-label': 'just a typescript test' }),\n dsDialogFooter: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments.\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSDialogName, typeof DIALOG_SLOTS>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACOvB,MAAM,iBAA2C;AAAA,EAC/C,oBAAoB,EAAE,cAAc,yBAAyB;AAAA,EAC7D,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,eAAe,EAAE,cAAc,yBAAyB;AAAA,EACxD,eAAe,EAAE,cAAc,yBAAyB;AAAA,EACxD,gBAAgB,EAAE,cAAc,yBAAyB;AAAA,EACzD,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,cAAc,EAAE,cAAc,yBAAyB;AAAA,EACvD,wBAAwB,EAAE,cAAc,yBAAyB;AAAA,EACjE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,uBAAuB,EAAE,cAAc,yBAAyB;AAAA,EAChE,gBAAgB,EAAE,cAAc,yBAAyB;AAC3D;AAEA,MAAM,uBAAwD;AAAA,EAC5D,oBAAoB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACpE,mBAAmB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnE,eAAe,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/D,eAAe,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC/D,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAChE,mBAAmB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnE,cAAc,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC9D,wBAAwB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACxE,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,uBAAuB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACvE,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAClE;AAGA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -3,6 +3,19 @@ import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
|
3
3
|
import { DIALOG_SLOTS, DSDialogName } from './constants/index.js';
|
|
4
4
|
export declare namespace DSDialogT {
|
|
5
5
|
type Sizes = 'default' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';
|
|
6
|
+
type SlotFunctionArguments = {
|
|
7
|
+
dsDialogBackground: () => object;
|
|
8
|
+
dsDialogContainer: () => object;
|
|
9
|
+
dsDialogTitle: () => object;
|
|
10
|
+
dsDialogAddon: () => object;
|
|
11
|
+
dsDialogHeader: () => object;
|
|
12
|
+
dsDialogSeparator: () => object;
|
|
13
|
+
dsDialogBody: () => object;
|
|
14
|
+
dsDialogPrimaryMessage: () => object;
|
|
15
|
+
dsDialogSecondaryMessage: () => object;
|
|
16
|
+
dsDialogDefaultLayout: () => object;
|
|
17
|
+
dsDialogFooter: () => object;
|
|
18
|
+
};
|
|
6
19
|
interface DefaultProps {
|
|
7
20
|
isOpen: boolean;
|
|
8
21
|
centered: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-dialog",
|
|
3
|
-
"version": "3.80.0-next.
|
|
3
|
+
"version": "3.80.0-next.80",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Dialog",
|
|
6
6
|
"files": [
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@elliemae/ds-props-helpers": "3.80.0-next.80",
|
|
40
|
+
"@elliemae/ds-system": "3.80.0-next.80",
|
|
41
|
+
"@elliemae/ds-typescript-helpers": "3.80.0-next.80",
|
|
39
42
|
"lodash-es": "^4.18.1",
|
|
40
|
-
"uid": "^2.0.2"
|
|
41
|
-
"@elliemae/ds-props-helpers": "3.80.0-next.8",
|
|
42
|
-
"@elliemae/ds-system": "3.80.0-next.8",
|
|
43
|
-
"@elliemae/ds-typescript-helpers": "3.80.0-next.8"
|
|
43
|
+
"uid": "^2.0.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
+
"@elliemae/ds-monorepo-devops": "3.80.0-next.80",
|
|
47
|
+
"@elliemae/ds-test-utils": "3.80.0-next.80",
|
|
46
48
|
"@playwright/experimental-ct-react": "1.61.1",
|
|
47
49
|
"@xstyled/system": "~3.8.1",
|
|
48
50
|
"@xstyled/util": "~3.7.0",
|
|
49
51
|
"jest": "^30.0.0",
|
|
50
|
-
"styled-components": "~5.3.11"
|
|
51
|
-
"@elliemae/ds-monorepo-devops": "3.80.0-next.8",
|
|
52
|
-
"@elliemae/ds-test-utils": "3.80.0-next.8"
|
|
52
|
+
"styled-components": "~5.3.11"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@xstyled/system": "~3.8.1",
|