@elliemae/ds-layout-provider 3.46.0-rc.10
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/DSLayoutProvider.js +77 -0
- package/dist/cjs/DSLayoutProvider.js.map +7 -0
- package/dist/cjs/config/useLayoutProvider.js +60 -0
- package/dist/cjs/config/useLayoutProvider.js.map +7 -0
- package/dist/cjs/config/useValidateProps.js +40 -0
- package/dist/cjs/config/useValidateProps.js.map +7 -0
- package/dist/cjs/constants/index.js +55 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/globals.d.js +25 -0
- package/dist/cjs/globals.d.js.map +7 -0
- package/dist/cjs/index.js +40 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/react-desc-prop-types.js +49 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/esm/DSLayoutProvider.js +47 -0
- package/dist/esm/DSLayoutProvider.js.map +7 -0
- package/dist/esm/config/useLayoutProvider.js +30 -0
- package/dist/esm/config/useLayoutProvider.js.map +7 -0
- package/dist/esm/config/useValidateProps.js +10 -0
- package/dist/esm/config/useValidateProps.js.map +7 -0
- package/dist/esm/constants/index.js +25 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/globals.d.js +2 -0
- package/dist/esm/globals.d.js.map +7 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/react-desc-prop-types.js +24 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/types/DSLayoutProvider.d.ts +5 -0
- package/dist/types/config/useLayoutProvider.d.ts +12 -0
- package/dist/types/config/useValidateProps.d.ts +3 -0
- package/dist/types/constants/index.d.ts +15 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/react-desc-prop-types.d.ts +26 -0
- package/package.json +72 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSLayoutProvider_exports = {};
|
|
30
|
+
__export(DSLayoutProvider_exports, {
|
|
31
|
+
DSLayoutProvider: () => DSLayoutProvider,
|
|
32
|
+
DSLayoutProviderWithSchema: () => DSLayoutProviderWithSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DSLayoutProvider_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
+
var import_styled_components = require("styled-components");
|
|
40
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
41
|
+
var import_useLayoutProvider = require("./config/useLayoutProvider.js");
|
|
42
|
+
var import_constants = require("./constants/index.js");
|
|
43
|
+
const StyledWrapper = (0, import_ds_system.styled)("div", { name: import_constants.DSLayoutProviderName, slot: import_constants.LAYOUT_PROVIDER_SLOTS.ROOT })`
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
min-height: 0;
|
|
48
|
+
`;
|
|
49
|
+
const DSLayoutProvider = (props) => {
|
|
50
|
+
const { propsWithDefault, xstyledProps, instanceUid } = (0, import_useLayoutProvider.useLayoutProvider)(props);
|
|
51
|
+
const theme = (0, import_styled_components.useTheme)();
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
+
import_styled_components.ThemeProvider,
|
|
54
|
+
{
|
|
55
|
+
theme: {
|
|
56
|
+
...theme,
|
|
57
|
+
layoutMode: propsWithDefault.layoutMode
|
|
58
|
+
},
|
|
59
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
+
StyledWrapper,
|
|
61
|
+
{
|
|
62
|
+
"data-layout-provider": instanceUid,
|
|
63
|
+
"data-layout-type": propsWithDefault.layoutMode,
|
|
64
|
+
className: propsWithDefault.className,
|
|
65
|
+
getOwnerProps: () => propsWithDefault,
|
|
66
|
+
getOwnerPropsArguments: () => ({}),
|
|
67
|
+
...xstyledProps,
|
|
68
|
+
children: propsWithDefault.children
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
DSLayoutProvider.displayName = import_constants.DSLayoutProviderName;
|
|
75
|
+
const DSLayoutProviderWithSchema = (0, import_ds_props_helpers.describe)(DSLayoutProvider);
|
|
76
|
+
DSLayoutProviderWithSchema.propTypes = import_react_desc_prop_types.DSLayoutProviderPropTypesSchema;
|
|
77
|
+
//# sourceMappingURL=DSLayoutProvider.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSLayoutProvider.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { ThemeProvider, useTheme } from 'styled-components';\nimport { type DSLayoutProviderT, DSLayoutProviderPropTypesSchema } from './react-desc-prop-types.js';\nimport { useLayoutProvider } from './config/useLayoutProvider.js';\nimport { LAYOUT_PROVIDER_SLOTS, DSLayoutProviderName } from './constants/index.js';\n\nconst StyledWrapper = styled('div', { name: DSLayoutProviderName, slot: LAYOUT_PROVIDER_SLOTS.ROOT })`\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n`;\n\nconst DSLayoutProvider: React.ComponentType<DSLayoutProviderT.Props> = (props) => {\n const { propsWithDefault, xstyledProps, instanceUid } = useLayoutProvider(props);\n const theme = useTheme();\n return (\n <ThemeProvider\n theme={{\n ...theme,\n layoutMode: propsWithDefault.layoutMode,\n }}\n >\n <StyledWrapper\n data-layout-provider={instanceUid}\n data-layout-type={propsWithDefault.layoutMode}\n className={propsWithDefault.className}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n {...xstyledProps}\n >\n {propsWithDefault.children}\n </StyledWrapper>\n </ThemeProvider>\n );\n};\n\nDSLayoutProvider.displayName = DSLayoutProviderName;\nconst DSLayoutProviderWithSchema = describe(DSLayoutProvider);\nDSLayoutProviderWithSchema.propTypes = DSLayoutProviderPropTypesSchema;\n\nexport { DSLayoutProvider, DSLayoutProviderWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBjB;AAxBN,8BAAyB;AACzB,uBAAuB;AACvB,+BAAwC;AACxC,mCAAwE;AACxE,+BAAkC;AAClC,uBAA4D;AAE5D,MAAM,oBAAgB,yBAAO,OAAO,EAAE,MAAM,uCAAsB,MAAM,uCAAsB,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOpG,MAAM,mBAAiE,CAAC,UAAU;AAChF,QAAM,EAAE,kBAAkB,cAAc,YAAY,QAAI,4CAAkB,KAAK;AAC/E,QAAM,YAAQ,mCAAS;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,GAAG;AAAA,QACH,YAAY,iBAAiB;AAAA,MAC/B;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,wBAAsB;AAAA,UACtB,oBAAkB,iBAAiB;AAAA,UACnC,WAAW,iBAAiB;AAAA,UAC5B,eAAe,MAAM;AAAA,UACrB,wBAAwB,OAAO,CAAC;AAAA,UAC/B,GAAG;AAAA,UAEH,2BAAiB;AAAA;AAAA,MACpB;AAAA;AAAA,EACF;AAEJ;AAEA,iBAAiB,cAAc;AAC/B,MAAM,iCAA6B,kCAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useLayoutProvider_exports = {};
|
|
30
|
+
__export(useLayoutProvider_exports, {
|
|
31
|
+
useLayoutProvider: () => useLayoutProvider
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useLayoutProvider_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
|
+
var import_uid = require("uid");
|
|
38
|
+
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
39
|
+
var import_useValidateProps = require("./useValidateProps.js");
|
|
40
|
+
const useLayoutProvider = (propsFromUser) => {
|
|
41
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
|
|
42
|
+
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSLayoutProviderPropTypes);
|
|
43
|
+
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
|
|
44
|
+
const instanceUid = import_react.default.useMemo(() => `ds-layout-provider-${(0, import_uid.uid)(5)}`, []);
|
|
45
|
+
return import_react.default.useMemo(
|
|
46
|
+
() => ({
|
|
47
|
+
propsWithDefault,
|
|
48
|
+
xstyledProps,
|
|
49
|
+
instanceUid
|
|
50
|
+
// ...eventHandlers,
|
|
51
|
+
}),
|
|
52
|
+
[
|
|
53
|
+
propsWithDefault,
|
|
54
|
+
xstyledProps,
|
|
55
|
+
instanceUid
|
|
56
|
+
// eventHandlers,
|
|
57
|
+
]
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=useLayoutProvider.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/useLayoutProvider.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSLayoutProviderT, DSLayoutProviderPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface LayoutProviderCTX {\n propsWithDefault: DSLayoutProviderT.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useLayoutProvider = (propsFromUser: DSLayoutProviderT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSLayoutProviderT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSLayoutProviderPropTypes);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const instanceUid = React.useMemo(() => `ds-layout-provider-${uid(5)}`, []);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAiE;AACjE,iBAAoB;AACpB,mCAAgF;AAChF,8BAAiC;AAQ1B,MAAM,oBAAoB,CAAC,kBAA2C;AAI3E,QAAM,uBAAmB,sDAA8D,eAAe,yCAAY;AAClH,gDAAiB,kBAAkB,sDAAyB;AAI5D,QAAM,mBAAe,4CAAmB,gBAAgB;AAKxD,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,0BAAsB,gBAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAM1E,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useValidateProps_exports = {};
|
|
30
|
+
__export(useValidateProps_exports, {
|
|
31
|
+
useValidateProps: () => useValidateProps
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useValidateProps_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
|
+
var import_constants = require("../constants/index.js");
|
|
37
|
+
const useValidateProps = (props, propTypes) => {
|
|
38
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSLayoutProviderName);
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/useValidateProps.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSLayoutProviderT } from '../react-desc-prop-types.js';\nimport { DSLayoutProviderName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSLayoutProviderT.InternalProps, propTypes: ValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSLayoutProviderName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,uBAAqC;AAE9B,MAAM,mBAAmB,CAAC,OAAwC,cAA4C;AAEnH,8DAA+B,OAAO,WAAW,qCAAoB;AACvE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
DSLayoutProviderName: () => DSLayoutProviderName,
|
|
32
|
+
EXAMPLE_CONSTANTS: () => EXAMPLE_CONSTANTS,
|
|
33
|
+
LAYOUT_PROVIDER_DATA_TESTID: () => LAYOUT_PROVIDER_DATA_TESTID,
|
|
34
|
+
LAYOUT_PROVIDER_SLOTS: () => LAYOUT_PROVIDER_SLOTS,
|
|
35
|
+
LAYOUT_PROVIDER_TYPES: () => LAYOUT_PROVIDER_TYPES
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(constants_exports);
|
|
38
|
+
var React = __toESM(require("react"));
|
|
39
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
40
|
+
const DSLayoutProviderName = "DSLayoutProvider";
|
|
41
|
+
const EXAMPLE_CONSTANTS = {
|
|
42
|
+
HELLO: "WORLD",
|
|
43
|
+
FOO: "BAR"
|
|
44
|
+
};
|
|
45
|
+
const LAYOUT_PROVIDER_SLOTS = {
|
|
46
|
+
ROOT: "root"
|
|
47
|
+
};
|
|
48
|
+
const LAYOUT_PROVIDER_DATA_TESTID = (0, import_ds_system.slotObjectToDataTestIds)(DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS);
|
|
49
|
+
const LAYOUT_PROVIDER_TYPES = {
|
|
50
|
+
L: "l",
|
|
51
|
+
M: "m",
|
|
52
|
+
S: "s",
|
|
53
|
+
XS: "xs"
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSLayoutProviderName = 'DSLayoutProvider';\n\nexport const EXAMPLE_CONSTANTS = {\n HELLO: 'WORLD',\n FOO: 'BAR',\n} as const;\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const LAYOUT_PROVIDER_SLOTS = {\n ROOT: 'root',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const LAYOUT_PROVIDER_DATA_TESTID = slotObjectToDataTestIds(DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS);\n\nexport const LAYOUT_PROVIDER_TYPES = {\n L: 'l',\n M: 'm',\n S: 's',\n XS: 'xs',\n} as const;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,uBAAuB;AAE7B,MAAM,oBAAoB;AAAA,EAC/B,OAAO;AAAA,EACP,KAAK;AACP;AAGO,MAAM,wBAAwB;AAAA,EACnC,MAAM;AACR;AAGO,MAAM,kCAA8B,0CAAwB,sBAAsB,qBAAqB;AAEvG,MAAM,wBAAwB;AAAA,EACnC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AACN;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
//# sourceMappingURL=globals.d.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var src_exports = {};
|
|
30
|
+
__export(src_exports, {
|
|
31
|
+
DSLayoutProvider: () => import_DSLayoutProvider.DSLayoutProvider,
|
|
32
|
+
DSLayoutProviderWithSchema: () => import_DSLayoutProvider.DSLayoutProviderWithSchema,
|
|
33
|
+
LAYOUT_PROVIDER_DATA_TESTID: () => import_constants.LAYOUT_PROVIDER_DATA_TESTID,
|
|
34
|
+
LAYOUT_PROVIDER_SLOTS: () => import_constants.LAYOUT_PROVIDER_SLOTS
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(src_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_DSLayoutProvider = require("./DSLayoutProvider.js");
|
|
39
|
+
var import_constants = require("./constants/index.js");
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { DSLayoutProvider, DSLayoutProviderWithSchema } from './DSLayoutProvider.js';\nexport { type DSLayoutProviderT } from './react-desc-prop-types.js';\nexport { LAYOUT_PROVIDER_SLOTS, LAYOUT_PROVIDER_DATA_TESTID } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAA6D;AAE7D,uBAAmE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var react_desc_prop_types_exports = {};
|
|
30
|
+
__export(react_desc_prop_types_exports, {
|
|
31
|
+
DSLayoutProviderPropTypes: () => DSLayoutProviderPropTypes,
|
|
32
|
+
DSLayoutProviderPropTypesSchema: () => DSLayoutProviderPropTypesSchema,
|
|
33
|
+
defaultProps: () => defaultProps
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_constants = require("./constants/index.js");
|
|
39
|
+
const defaultProps = {
|
|
40
|
+
layoutMode: import_constants.LAYOUT_PROVIDER_TYPES.L
|
|
41
|
+
};
|
|
42
|
+
const DSLayoutProviderPropTypes = {
|
|
43
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSLayoutProviderName, import_constants.LAYOUT_PROVIDER_SLOTS),
|
|
44
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
45
|
+
...import_ds_props_helpers.xstyledPropTypes,
|
|
46
|
+
layoutMode: import_ds_props_helpers.PropTypes.string.description("define the layout of the component l m s xs ")
|
|
47
|
+
};
|
|
48
|
+
const DSLayoutProviderPropTypesSchema = DSLayoutProviderPropTypes;
|
|
49
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DefaultTheme as XstyledDefaultTheme } from 'styled-components';\nimport { LAYOUT_PROVIDER_TYPES, DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS } from './constants/index.js';\n\nexport declare namespace DSLayoutProviderT {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n export type LAYOUT_MODES = (typeof LAYOUT_PROVIDER_TYPES)[keyof typeof LAYOUT_PROVIDER_TYPES];\n\n export type ExtendedTheme = XstyledDefaultTheme & {\n layouModes: LAYOUT_MODES;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n layoutMode: LAYOUT_MODES;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSLayoutProviderName, typeof LAYOUT_PROVIDER_SLOTS> {\n className?: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export type ExampleState = '0' | '1';\n}\n\nexport const defaultProps: DSLayoutProviderT.DefaultProps = {\n layoutMode: LAYOUT_PROVIDER_TYPES.L,\n};\n\nexport const DSLayoutProviderPropTypes: DSPropTypesSchema<DSLayoutProviderT.Props> = {\n ...getPropsPerSlotPropTypes(DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n layoutMode: PropTypes.string.description('define the layout of the component l m s xs '),\n};\n\nexport const DSLayoutProviderPropTypesSchema =\n DSLayoutProviderPropTypes as unknown as ValidationMap<DSLayoutProviderT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;AAGP,uBAAmF;AAsC5E,MAAM,eAA+C;AAAA,EAC1D,YAAY,uCAAsB;AACpC;AAEO,MAAM,4BAAwE;AAAA,EACnF,OAAG,kDAAyB,uCAAsB,sCAAqB;AAAA,EACvE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,YAAY,kCAAU,OAAO,YAAY,8CAA8C;AACzF;AAEO,MAAM,kCACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
4
|
+
import { styled } from "@elliemae/ds-system";
|
|
5
|
+
import { ThemeProvider, useTheme } from "styled-components";
|
|
6
|
+
import { DSLayoutProviderPropTypesSchema } from "./react-desc-prop-types.js";
|
|
7
|
+
import { useLayoutProvider } from "./config/useLayoutProvider.js";
|
|
8
|
+
import { LAYOUT_PROVIDER_SLOTS, DSLayoutProviderName } from "./constants/index.js";
|
|
9
|
+
const StyledWrapper = styled("div", { name: DSLayoutProviderName, slot: LAYOUT_PROVIDER_SLOTS.ROOT })`
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
min-width: 0;
|
|
13
|
+
min-height: 0;
|
|
14
|
+
`;
|
|
15
|
+
const DSLayoutProvider = (props) => {
|
|
16
|
+
const { propsWithDefault, xstyledProps, instanceUid } = useLayoutProvider(props);
|
|
17
|
+
const theme = useTheme();
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
ThemeProvider,
|
|
20
|
+
{
|
|
21
|
+
theme: {
|
|
22
|
+
...theme,
|
|
23
|
+
layoutMode: propsWithDefault.layoutMode
|
|
24
|
+
},
|
|
25
|
+
children: /* @__PURE__ */ jsx(
|
|
26
|
+
StyledWrapper,
|
|
27
|
+
{
|
|
28
|
+
"data-layout-provider": instanceUid,
|
|
29
|
+
"data-layout-type": propsWithDefault.layoutMode,
|
|
30
|
+
className: propsWithDefault.className,
|
|
31
|
+
getOwnerProps: () => propsWithDefault,
|
|
32
|
+
getOwnerPropsArguments: () => ({}),
|
|
33
|
+
...xstyledProps,
|
|
34
|
+
children: propsWithDefault.children
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
DSLayoutProvider.displayName = DSLayoutProviderName;
|
|
41
|
+
const DSLayoutProviderWithSchema = describe(DSLayoutProvider);
|
|
42
|
+
DSLayoutProviderWithSchema.propTypes = DSLayoutProviderPropTypesSchema;
|
|
43
|
+
export {
|
|
44
|
+
DSLayoutProvider,
|
|
45
|
+
DSLayoutProviderWithSchema
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=DSLayoutProvider.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSLayoutProvider.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { ThemeProvider, useTheme } from 'styled-components';\nimport { type DSLayoutProviderT, DSLayoutProviderPropTypesSchema } from './react-desc-prop-types.js';\nimport { useLayoutProvider } from './config/useLayoutProvider.js';\nimport { LAYOUT_PROVIDER_SLOTS, DSLayoutProviderName } from './constants/index.js';\n\nconst StyledWrapper = styled('div', { name: DSLayoutProviderName, slot: LAYOUT_PROVIDER_SLOTS.ROOT })`\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n`;\n\nconst DSLayoutProvider: React.ComponentType<DSLayoutProviderT.Props> = (props) => {\n const { propsWithDefault, xstyledProps, instanceUid } = useLayoutProvider(props);\n const theme = useTheme();\n return (\n <ThemeProvider\n theme={{\n ...theme,\n layoutMode: propsWithDefault.layoutMode,\n }}\n >\n <StyledWrapper\n data-layout-provider={instanceUid}\n data-layout-type={propsWithDefault.layoutMode}\n className={propsWithDefault.className}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n {...xstyledProps}\n >\n {propsWithDefault.children}\n </StyledWrapper>\n </ThemeProvider>\n );\n};\n\nDSLayoutProvider.displayName = DSLayoutProviderName;\nconst DSLayoutProviderWithSchema = describe(DSLayoutProvider);\nDSLayoutProviderWithSchema.propTypes = DSLayoutProviderPropTypesSchema;\n\nexport { DSLayoutProvider, DSLayoutProviderWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyBjB;AAxBN,SAAS,gBAAgB;AACzB,SAAS,cAAc;AACvB,SAAS,eAAe,gBAAgB;AACxC,SAAiC,uCAAuC;AACxE,SAAS,yBAAyB;AAClC,SAAS,uBAAuB,4BAA4B;AAE5D,MAAM,gBAAgB,OAAO,OAAO,EAAE,MAAM,sBAAsB,MAAM,sBAAsB,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOpG,MAAM,mBAAiE,CAAC,UAAU;AAChF,QAAM,EAAE,kBAAkB,cAAc,YAAY,IAAI,kBAAkB,KAAK;AAC/E,QAAM,QAAQ,SAAS;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,GAAG;AAAA,QACH,YAAY,iBAAiB;AAAA,MAC/B;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,wBAAsB;AAAA,UACtB,oBAAkB,iBAAiB;AAAA,UACnC,WAAW,iBAAiB;AAAA,UAC5B,eAAe,MAAM;AAAA,UACrB,wBAAwB,OAAO,CAAC;AAAA,UAC/B,GAAG;AAAA,UAEH,2BAAiB;AAAA;AAAA,MACpB;AAAA;AAAA,EACF;AAEJ;AAEA,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { useGetXstyledProps, useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
|
|
4
|
+
import { uid } from "uid";
|
|
5
|
+
import { DSLayoutProviderPropTypes, defaultProps } from "../react-desc-prop-types.js";
|
|
6
|
+
import { useValidateProps } from "./useValidateProps.js";
|
|
7
|
+
const useLayoutProvider = (propsFromUser) => {
|
|
8
|
+
const propsWithDefault = useMemoMergePropsWithDefault(propsFromUser, defaultProps);
|
|
9
|
+
useValidateProps(propsWithDefault, DSLayoutProviderPropTypes);
|
|
10
|
+
const xstyledProps = useGetXstyledProps(propsWithDefault);
|
|
11
|
+
const instanceUid = React2.useMemo(() => `ds-layout-provider-${uid(5)}`, []);
|
|
12
|
+
return React2.useMemo(
|
|
13
|
+
() => ({
|
|
14
|
+
propsWithDefault,
|
|
15
|
+
xstyledProps,
|
|
16
|
+
instanceUid
|
|
17
|
+
// ...eventHandlers,
|
|
18
|
+
}),
|
|
19
|
+
[
|
|
20
|
+
propsWithDefault,
|
|
21
|
+
xstyledProps,
|
|
22
|
+
instanceUid
|
|
23
|
+
// eventHandlers,
|
|
24
|
+
]
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
useLayoutProvider
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=useLayoutProvider.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useLayoutProvider.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSLayoutProviderT, DSLayoutProviderPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface LayoutProviderCTX {\n propsWithDefault: DSLayoutProviderT.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useLayoutProvider = (propsFromUser: DSLayoutProviderT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSLayoutProviderT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSLayoutProviderPropTypes);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const instanceUid = React.useMemo(() => `ds-layout-provider-${uid(5)}`, []);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,oBAAoB,oCAAoC;AACjE,SAAS,WAAW;AACpB,SAAiC,2BAA2B,oBAAoB;AAChF,SAAS,wBAAwB;AAQ1B,MAAM,oBAAoB,CAAC,kBAA2C;AAI3E,QAAM,mBAAmB,6BAA8D,eAAe,YAAY;AAClH,mBAAiB,kBAAkB,yBAAyB;AAI5D,QAAM,eAAe,mBAAmB,gBAAgB;AAKxD,QAAM,cAAcA,OAAM,QAAQ,MAAM,sBAAsB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAM1E,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
|
+
import { DSLayoutProviderName } from "../constants/index.js";
|
|
4
|
+
const useValidateProps = (props, propTypes) => {
|
|
5
|
+
useValidateTypescriptPropTypes(props, propTypes, DSLayoutProviderName);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
useValidateProps
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSLayoutProviderT } from '../react-desc-prop-types.js';\nimport { DSLayoutProviderName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSLayoutProviderT.InternalProps, propTypes: ValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSLayoutProviderName);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,4BAA4B;AAE9B,MAAM,mBAAmB,CAAC,OAAwC,cAA4C;AAEnH,iCAA+B,OAAO,WAAW,oBAAoB;AACvE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { slotObjectToDataTestIds } from "@elliemae/ds-system";
|
|
3
|
+
const DSLayoutProviderName = "DSLayoutProvider";
|
|
4
|
+
const EXAMPLE_CONSTANTS = {
|
|
5
|
+
HELLO: "WORLD",
|
|
6
|
+
FOO: "BAR"
|
|
7
|
+
};
|
|
8
|
+
const LAYOUT_PROVIDER_SLOTS = {
|
|
9
|
+
ROOT: "root"
|
|
10
|
+
};
|
|
11
|
+
const LAYOUT_PROVIDER_DATA_TESTID = slotObjectToDataTestIds(DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS);
|
|
12
|
+
const LAYOUT_PROVIDER_TYPES = {
|
|
13
|
+
L: "l",
|
|
14
|
+
M: "m",
|
|
15
|
+
S: "s",
|
|
16
|
+
XS: "xs"
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
DSLayoutProviderName,
|
|
20
|
+
EXAMPLE_CONSTANTS,
|
|
21
|
+
LAYOUT_PROVIDER_DATA_TESTID,
|
|
22
|
+
LAYOUT_PROVIDER_SLOTS,
|
|
23
|
+
LAYOUT_PROVIDER_TYPES
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSLayoutProviderName = 'DSLayoutProvider';\n\nexport const EXAMPLE_CONSTANTS = {\n HELLO: 'WORLD',\n FOO: 'BAR',\n} as const;\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const LAYOUT_PROVIDER_SLOTS = {\n ROOT: 'root',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const LAYOUT_PROVIDER_DATA_TESTID = slotObjectToDataTestIds(DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS);\n\nexport const LAYOUT_PROVIDER_TYPES = {\n L: 'l',\n M: 'm',\n S: 's',\n XS: 'xs',\n} as const;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,uBAAuB;AAE7B,MAAM,oBAAoB;AAAA,EAC/B,OAAO;AAAA,EACP,KAAK;AACP;AAGO,MAAM,wBAAwB;AAAA,EACnC,MAAM;AACR;AAGO,MAAM,8BAA8B,wBAAwB,sBAAsB,qBAAqB;AAEvG,MAAM,wBAAwB;AAAA,EACnC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AACN;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DSLayoutProvider, DSLayoutProviderWithSchema } from "./DSLayoutProvider.js";
|
|
3
|
+
import { LAYOUT_PROVIDER_SLOTS, LAYOUT_PROVIDER_DATA_TESTID } from "./constants/index.js";
|
|
4
|
+
export {
|
|
5
|
+
DSLayoutProvider,
|
|
6
|
+
DSLayoutProviderWithSchema,
|
|
7
|
+
LAYOUT_PROVIDER_DATA_TESTID,
|
|
8
|
+
LAYOUT_PROVIDER_SLOTS
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { DSLayoutProvider, DSLayoutProviderWithSchema } from './DSLayoutProvider.js';\nexport { type DSLayoutProviderT } from './react-desc-prop-types.js';\nexport { LAYOUT_PROVIDER_SLOTS, LAYOUT_PROVIDER_DATA_TESTID } from './constants/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,kBAAkB,kCAAkC;AAE7D,SAAS,uBAAuB,mCAAmC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
PropTypes,
|
|
4
|
+
getPropsPerSlotPropTypes,
|
|
5
|
+
globalAttributesPropTypes,
|
|
6
|
+
xstyledPropTypes
|
|
7
|
+
} from "@elliemae/ds-props-helpers";
|
|
8
|
+
import { LAYOUT_PROVIDER_TYPES, DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS } from "./constants/index.js";
|
|
9
|
+
const defaultProps = {
|
|
10
|
+
layoutMode: LAYOUT_PROVIDER_TYPES.L
|
|
11
|
+
};
|
|
12
|
+
const DSLayoutProviderPropTypes = {
|
|
13
|
+
...getPropsPerSlotPropTypes(DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS),
|
|
14
|
+
...globalAttributesPropTypes,
|
|
15
|
+
...xstyledPropTypes,
|
|
16
|
+
layoutMode: PropTypes.string.description("define the layout of the component l m s xs ")
|
|
17
|
+
};
|
|
18
|
+
const DSLayoutProviderPropTypesSchema = DSLayoutProviderPropTypes;
|
|
19
|
+
export {
|
|
20
|
+
DSLayoutProviderPropTypes,
|
|
21
|
+
DSLayoutProviderPropTypesSchema,
|
|
22
|
+
defaultProps
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DefaultTheme as XstyledDefaultTheme } from 'styled-components';\nimport { LAYOUT_PROVIDER_TYPES, DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS } from './constants/index.js';\n\nexport declare namespace DSLayoutProviderT {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n export type LAYOUT_MODES = (typeof LAYOUT_PROVIDER_TYPES)[keyof typeof LAYOUT_PROVIDER_TYPES];\n\n export type ExtendedTheme = XstyledDefaultTheme & {\n layouModes: LAYOUT_MODES;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n layoutMode: LAYOUT_MODES;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSLayoutProviderName, typeof LAYOUT_PROVIDER_SLOTS> {\n className?: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export type ExampleState = '0' | '1';\n}\n\nexport const defaultProps: DSLayoutProviderT.DefaultProps = {\n layoutMode: LAYOUT_PROVIDER_TYPES.L,\n};\n\nexport const DSLayoutProviderPropTypes: DSPropTypesSchema<DSLayoutProviderT.Props> = {\n ...getPropsPerSlotPropTypes(DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n layoutMode: PropTypes.string.description('define the layout of the component l m s xs '),\n};\n\nexport const DSLayoutProviderPropTypesSchema =\n DSLayoutProviderPropTypes as unknown as ValidationMap<DSLayoutProviderT.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,uBAAuB,sBAAsB,6BAA6B;AAsC5E,MAAM,eAA+C;AAAA,EAC1D,YAAY,sBAAsB;AACpC;AAEO,MAAM,4BAAwE;AAAA,EACnF,GAAG,yBAAyB,sBAAsB,qBAAqB;AAAA,EACvE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,YAAY,UAAU,OAAO,YAAY,8CAA8C;AACzF;AAEO,MAAM,kCACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DSLayoutProviderT } from './react-desc-prop-types.js';
|
|
3
|
+
declare const DSLayoutProvider: React.ComponentType<DSLayoutProviderT.Props>;
|
|
4
|
+
declare const DSLayoutProviderWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSLayoutProviderT.Props>;
|
|
5
|
+
export { DSLayoutProvider, DSLayoutProviderWithSchema };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useGetXstyledProps } from '@elliemae/ds-props-helpers';
|
|
2
|
+
import { type DSLayoutProviderT } from '../react-desc-prop-types.js';
|
|
3
|
+
export interface LayoutProviderCTX {
|
|
4
|
+
propsWithDefault: DSLayoutProviderT.InternalProps;
|
|
5
|
+
xstyledProps: ReturnType<typeof useGetXstyledProps>;
|
|
6
|
+
instanceUid: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const useLayoutProvider: (propsFromUser: DSLayoutProviderT.Props) => {
|
|
9
|
+
propsWithDefault: DSLayoutProviderT.InternalProps;
|
|
10
|
+
xstyledProps: import("@elliemae/ds-props-helpers").XstyledProps;
|
|
11
|
+
instanceUid: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const DSLayoutProviderName = "DSLayoutProvider";
|
|
2
|
+
export declare const EXAMPLE_CONSTANTS: {
|
|
3
|
+
readonly HELLO: "WORLD";
|
|
4
|
+
readonly FOO: "BAR";
|
|
5
|
+
};
|
|
6
|
+
export declare const LAYOUT_PROVIDER_SLOTS: {
|
|
7
|
+
readonly ROOT: "root";
|
|
8
|
+
};
|
|
9
|
+
export declare const LAYOUT_PROVIDER_DATA_TESTID: Record<string, string>;
|
|
10
|
+
export declare const LAYOUT_PROVIDER_TYPES: {
|
|
11
|
+
readonly L: "l";
|
|
12
|
+
readonly M: "m";
|
|
13
|
+
readonly S: "s";
|
|
14
|
+
readonly XS: "xs";
|
|
15
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';
|
|
2
|
+
import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
3
|
+
import type { DefaultTheme as XstyledDefaultTheme } from 'styled-components';
|
|
4
|
+
import { LAYOUT_PROVIDER_TYPES, DSLayoutProviderName, LAYOUT_PROVIDER_SLOTS } from './constants/index.js';
|
|
5
|
+
export declare namespace DSLayoutProviderT {
|
|
6
|
+
type LAYOUT_MODES = (typeof LAYOUT_PROVIDER_TYPES)[keyof typeof LAYOUT_PROVIDER_TYPES];
|
|
7
|
+
type ExtendedTheme = XstyledDefaultTheme & {
|
|
8
|
+
layouModes: LAYOUT_MODES;
|
|
9
|
+
};
|
|
10
|
+
interface RequiredProps {
|
|
11
|
+
}
|
|
12
|
+
interface DefaultProps {
|
|
13
|
+
layoutMode: LAYOUT_MODES;
|
|
14
|
+
}
|
|
15
|
+
interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSLayoutProviderName, typeof LAYOUT_PROVIDER_SLOTS> {
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>, XstyledProps, RequiredProps {
|
|
19
|
+
}
|
|
20
|
+
interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>, XstyledProps, RequiredProps {
|
|
21
|
+
}
|
|
22
|
+
type ExampleState = '0' | '1';
|
|
23
|
+
}
|
|
24
|
+
export declare const defaultProps: DSLayoutProviderT.DefaultProps;
|
|
25
|
+
export declare const DSLayoutProviderPropTypes: DSPropTypesSchema<DSLayoutProviderT.Props>;
|
|
26
|
+
export declare const DSLayoutProviderPropTypesSchema: ValidationMap<DSLayoutProviderT.Props>;
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elliemae/ds-layout-provider",
|
|
3
|
+
"version": "3.46.0-rc.10",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "ICE MT - Dimsum - Layout Provider",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/esm/index.js",
|
|
10
|
+
"main": "./dist/cjs/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
15
|
+
"import": "./dist/esm/index.js",
|
|
16
|
+
"require": "./dist/cjs/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"*.css",
|
|
21
|
+
"*.scss"
|
|
22
|
+
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"pnpm": ">=6",
|
|
29
|
+
"node": ">=16"
|
|
30
|
+
},
|
|
31
|
+
"author": "ICE MT",
|
|
32
|
+
"jestSonar": {
|
|
33
|
+
"sonar56x": true,
|
|
34
|
+
"reportPath": "reports",
|
|
35
|
+
"reportFile": "tests.xml",
|
|
36
|
+
"indent": 4
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@xstyled/styled-components": "~3.6.0",
|
|
40
|
+
"@elliemae/ds-grid": "3.46.0-rc.10",
|
|
41
|
+
"@elliemae/ds-hooks-on-blur-out": "3.46.0-rc.10",
|
|
42
|
+
"@elliemae/ds-props-helpers": "3.46.0-rc.10",
|
|
43
|
+
"@elliemae/ds-system": "3.46.0-rc.10"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@elliemae/pui-cli": "9.0.0-next.50",
|
|
47
|
+
"styled-components": "~5.3.9",
|
|
48
|
+
"@elliemae/ds-typescript-helpers": "3.46.0-rc.10",
|
|
49
|
+
"@elliemae/ds-monorepo-devops": "3.46.0-rc.10"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@testing-library/jest-dom": "~5.16.4",
|
|
53
|
+
"@testing-library/react": "~12.1.3",
|
|
54
|
+
"@testing-library/user-event": "~13.5.0",
|
|
55
|
+
"react": "^17.0.2",
|
|
56
|
+
"react-dom": "^17.0.2",
|
|
57
|
+
"styled-components": "~5.3.9"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public",
|
|
61
|
+
"typeSafety": true
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
65
|
+
"test": "pui-cli test --passWithNoTests --coverage=\"false\"",
|
|
66
|
+
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
67
|
+
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
68
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
69
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
70
|
+
"checkDeps": "npx -yes ../../util/ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
71
|
+
}
|
|
72
|
+
}
|