@elliemae/ds-transition 3.0.0-next.49
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/collapse/DSCollapse.js +69 -0
- package/dist/cjs/collapse/DSCollapse.js.map +7 -0
- package/dist/cjs/collapse/index.js +22 -0
- package/dist/cjs/collapse/index.js.map +7 -0
- package/dist/cjs/collapse/react-desc-prop-types.js +55 -0
- package/dist/cjs/collapse/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/collapse/styled.js +63 -0
- package/dist/cjs/collapse/styled.js.map +7 -0
- package/dist/cjs/collapse/theming.js +33 -0
- package/dist/cjs/collapse/theming.js.map +7 -0
- package/dist/cjs/collapse/useCollapse.js +36 -0
- package/dist/cjs/collapse/useCollapse.js.map +7 -0
- package/dist/cjs/fade/DSFade.js +60 -0
- package/dist/cjs/fade/DSFade.js.map +7 -0
- package/dist/cjs/fade/index.js +22 -0
- package/dist/cjs/fade/index.js.map +7 -0
- package/dist/cjs/fade/react-desc-prop-types.js +48 -0
- package/dist/cjs/fade/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/fade/styled.js +39 -0
- package/dist/cjs/fade/styled.js.map +7 -0
- package/dist/cjs/fade/theming.js +32 -0
- package/dist/cjs/fade/theming.js.map +7 -0
- package/dist/cjs/fade/useFade.js +35 -0
- package/dist/cjs/fade/useFade.js.map +7 -0
- package/dist/cjs/index.js +23 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/esm/collapse/DSCollapse.js +49 -0
- package/dist/esm/collapse/DSCollapse.js.map +7 -0
- package/dist/esm/collapse/index.js +3 -0
- package/dist/esm/collapse/index.js.map +7 -0
- package/dist/esm/collapse/react-desc-prop-types.js +39 -0
- package/dist/esm/collapse/react-desc-prop-types.js.map +7 -0
- package/dist/esm/collapse/styled.js +41 -0
- package/dist/esm/collapse/styled.js.map +7 -0
- package/dist/esm/collapse/theming.js +11 -0
- package/dist/esm/collapse/theming.js.map +7 -0
- package/dist/esm/collapse/useCollapse.js +19 -0
- package/dist/esm/collapse/useCollapse.js.map +7 -0
- package/dist/esm/fade/DSFade.js +40 -0
- package/dist/esm/fade/DSFade.js.map +7 -0
- package/dist/esm/fade/index.js +3 -0
- package/dist/esm/fade/index.js.map +7 -0
- package/dist/esm/fade/react-desc-prop-types.js +32 -0
- package/dist/esm/fade/react-desc-prop-types.js.map +7 -0
- package/dist/esm/fade/styled.js +17 -0
- package/dist/esm/fade/styled.js.map +7 -0
- package/dist/esm/fade/theming.js +10 -0
- package/dist/esm/fade/theming.js.map +7 -0
- package/dist/esm/fade/useFade.js +13 -0
- package/dist/esm/fade/useFade.js.map +7 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +7 -0
- package/package.json +65 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __export = (target, all) => {
|
|
22
|
+
for (var name in all)
|
|
23
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
24
|
+
};
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (let key of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
30
|
+
}
|
|
31
|
+
return to;
|
|
32
|
+
};
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
+
var DSCollapse_exports = {};
|
|
36
|
+
__export(DSCollapse_exports, {
|
|
37
|
+
DSCollapse: () => DSCollapse,
|
|
38
|
+
DSCollapseWithSchema: () => DSCollapseWithSchema
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(DSCollapse_exports);
|
|
41
|
+
var React = __toESM(require("react"));
|
|
42
|
+
var import_react = require("react");
|
|
43
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
44
|
+
var import_useCollapse = require("./useCollapse");
|
|
45
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
46
|
+
var import_styled = require("./styled");
|
|
47
|
+
const DSCollapse = (props) => {
|
|
48
|
+
const {
|
|
49
|
+
propsWithDefault: { show, orientation, collapsedSize, children },
|
|
50
|
+
globalAttributes,
|
|
51
|
+
xstyledProps
|
|
52
|
+
} = (0, import_useCollapse.useCollapse)(props);
|
|
53
|
+
const ref = (0, import_react.useRef)(null);
|
|
54
|
+
const { width: expandedWidth, height: expandedHeight } = (0, import_ds_utilities.useOnElementResize)(ref);
|
|
55
|
+
return /* @__PURE__ */ React.createElement(import_styled.StyledCollapse, __spreadValues(__spreadValues({
|
|
56
|
+
"data-test-id": "ds-transition-collapse",
|
|
57
|
+
show,
|
|
58
|
+
orientation,
|
|
59
|
+
collapsedSize,
|
|
60
|
+
expandedWidth,
|
|
61
|
+
expandedHeight
|
|
62
|
+
}, globalAttributes), xstyledProps), /* @__PURE__ */ React.createElement(import_styled.StyledChildrenWrapper, {
|
|
63
|
+
ref
|
|
64
|
+
}, children));
|
|
65
|
+
};
|
|
66
|
+
DSCollapse.propTypes = import_react_desc_prop_types.DSCollapsePropTypes;
|
|
67
|
+
const DSCollapseWithSchema = (0, import_ds_utilities.describe)(DSCollapse);
|
|
68
|
+
DSCollapseWithSchema.propTypes = import_react_desc_prop_types.DSCollapsePropTypes;
|
|
69
|
+
//# sourceMappingURL=DSCollapse.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/collapse/DSCollapse.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useRef } from 'react';\nimport { describe, useOnElementResize } from '@elliemae/ds-utilities';\nimport { useCollapse } from './useCollapse';\nimport { DSCollapsePropTypes, DSCollapseT } from './react-desc-prop-types';\nimport { StyledCollapse, StyledChildrenWrapper } from './styled';\n\nexport const DSCollapse: React.ComponentType<DSCollapseT.Props> = (props) => {\n const {\n propsWithDefault: { show, orientation, collapsedSize, children },\n globalAttributes,\n xstyledProps,\n } = useCollapse(props);\n\n const ref = useRef<HTMLDivElement>(null);\n\n const { width: expandedWidth, height: expandedHeight } = useOnElementResize(ref);\n\n return (\n <StyledCollapse\n data-test-id=\"ds-transition-collapse\"\n show={show}\n orientation={orientation}\n collapsedSize={collapsedSize}\n expandedWidth={expandedWidth}\n expandedHeight={expandedHeight}\n {...globalAttributes}\n {...xstyledProps}\n >\n <StyledChildrenWrapper ref={ref}>{children}</StyledChildrenWrapper>\n </StyledCollapse>\n );\n};\n\nDSCollapse.propTypes = DSCollapsePropTypes;\n\nexport const DSCollapseWithSchema = describe(DSCollapse);\nDSCollapseWithSchema.propTypes = DSCollapsePropTypes;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAuB;AACvB,0BAA6C;AAC7C,yBAA4B;AAC5B,mCAAiD;AACjD,oBAAsD;AAE/C,MAAM,aAAqD,CAAC,UAAU;AAC3E,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM,aAAa,eAAe;AAAA,IACtD;AAAA,IACA;AAAA,MACE,oCAAY,KAAK;AAErB,QAAM,MAAM,yBAAuB,IAAI;AAEvC,QAAM,EAAE,OAAO,eAAe,QAAQ,mBAAmB,4CAAmB,GAAG;AAE/E,SACE,oCAAC;AAAA,IACC,gBAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KACI,mBACA,eAEJ,oCAAC;AAAA,IAAsB;AAAA,KAAW,QAAS,CAC7C;AAEJ;AAEA,WAAW,YAAY;AAEhB,MAAM,uBAAuB,kCAAS,UAAU;AACvD,qBAAqB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from))
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var collapse_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(collapse_exports);
|
|
20
|
+
var React = __toESM(require("react"));
|
|
21
|
+
__reExport(collapse_exports, require("./DSCollapse"), module.exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/collapse/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './DSCollapse';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAAc,yBAAd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __export = (target, all) => {
|
|
25
|
+
for (var name in all)
|
|
26
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
27
|
+
};
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
+
}
|
|
34
|
+
return to;
|
|
35
|
+
};
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var react_desc_prop_types_exports = {};
|
|
39
|
+
__export(react_desc_prop_types_exports, {
|
|
40
|
+
DSCollapsePropTypes: () => DSCollapsePropTypes,
|
|
41
|
+
defaultProps: () => defaultProps
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
44
|
+
var React = __toESM(require("react"));
|
|
45
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
46
|
+
const defaultProps = {
|
|
47
|
+
orientation: "horizontal",
|
|
48
|
+
collapsedSize: "0px"
|
|
49
|
+
};
|
|
50
|
+
const DSCollapsePropTypes = __spreadProps(__spreadValues(__spreadValues({}, import_ds_utilities.globalAttributesPropTypes), import_ds_utilities.xstyledPropTypes), {
|
|
51
|
+
show: import_ds_utilities.PropTypes.bool.description("Whether to show the inner element or not").isRequired,
|
|
52
|
+
orientation: import_ds_utilities.PropTypes.oneOf(["horizontal", "vertical"]).description("Whether this element should slide from left to right or from top to bottom").defaultValue("horizontal"),
|
|
53
|
+
collapsedSize: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.number, import_ds_utilities.PropTypes.string]).description("Size when collapsed").defaultValue(0)
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/collapse/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import {\n PropTypes,\n GlobalAttributesT,\n XstyledProps,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-utilities';\nimport { WeakValidationMap } from 'react';\n\nexport declare namespace DSCollapseT {\n interface IProps {\n show: boolean;\n orientation: 'horizontal' | 'vertical';\n collapsedSize: number | string;\n }\n\n export interface Props extends IProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof IProps>, XstyledProps {}\n}\n\nexport const defaultProps: Partial<DSCollapseT.Props> = {\n orientation: 'horizontal',\n collapsedSize: '0px',\n};\n\nexport const DSCollapsePropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n show: PropTypes.bool.description('Whether to show the inner element or not').isRequired,\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n .description('Whether this element should slide from left to right or from top to bottom')\n .defaultValue('horizontal'),\n collapsedSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Size when collapsed')\n .defaultValue(0),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAMO;AAaA,MAAM,eAA2C;AAAA,EACtD,aAAa;AAAA,EACb,eAAe;AACjB;AAEO,MAAM,sBAAsB,gDAC9B,gDACA,uCAF8B;AAAA,EAGjC,MAAM,8BAAU,KAAK,YAAY,0CAA0C,EAAE;AAAA,EAC7E,aAAa,8BAAU,MAAM,CAAC,cAAc,UAAU,CAAC,EACpD,YAAY,4EAA4E,EACxF,aAAa,YAAY;AAAA,EAC5B,eAAe,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EACpE,YAAY,qBAAqB,EACjC,aAAa,CAAC;AACnB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var styled_exports = {};
|
|
22
|
+
__export(styled_exports, {
|
|
23
|
+
StyledChildrenWrapper: () => StyledChildrenWrapper,
|
|
24
|
+
StyledCollapse: () => StyledCollapse
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(styled_exports);
|
|
27
|
+
var React = __toESM(require("react"));
|
|
28
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
29
|
+
var import_styled_components = require("@xstyled/styled-components");
|
|
30
|
+
var import_theming = require("./theming");
|
|
31
|
+
const getCorrectPropertyToAnimate = ({ orientation }) => {
|
|
32
|
+
return orientation === "horizontal" ? "width" : "height";
|
|
33
|
+
};
|
|
34
|
+
const getCorrectWidth = ({ show, collapsedSize, expandedWidth }) => {
|
|
35
|
+
if (!show)
|
|
36
|
+
return typeof collapsedSize === "number" ? `${collapsedSize}px` : collapsedSize;
|
|
37
|
+
return expandedWidth ? `${expandedWidth}px` : "fit-content";
|
|
38
|
+
};
|
|
39
|
+
const getCorrectHeight = ({ show, collapsedSize, expandedHeight }) => {
|
|
40
|
+
if (!show)
|
|
41
|
+
return typeof collapsedSize === "number" ? `${collapsedSize}px` : collapsedSize;
|
|
42
|
+
return expandedHeight ? `${expandedHeight}px` : "fit-content";
|
|
43
|
+
};
|
|
44
|
+
const StyledCollapse = (0, import_ds_system.styled)("div", {
|
|
45
|
+
name: import_theming.DSCollapseName,
|
|
46
|
+
slot: import_theming.DSCollapseSlots.WRAPPER
|
|
47
|
+
})`
|
|
48
|
+
transition: ${getCorrectPropertyToAnimate} 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
49
|
+
${(props) => {
|
|
50
|
+
if (props.orientation === "horizontal")
|
|
51
|
+
return `width: ${getCorrectWidth(props)};`;
|
|
52
|
+
return `height: ${getCorrectHeight(props)};`;
|
|
53
|
+
}}
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
${import_styled_components.space}
|
|
56
|
+
${import_styled_components.sizing}
|
|
57
|
+
${import_styled_components.layout}
|
|
58
|
+
`;
|
|
59
|
+
const StyledChildrenWrapper = (0, import_ds_system.styled)("div", { name: import_theming.DSCollapseName, slot: import_theming.DSCollapseSlots.CHILDREN_WRAPPER })`
|
|
60
|
+
width: fit-content;
|
|
61
|
+
height: fit-content;
|
|
62
|
+
`;
|
|
63
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/collapse/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { space, sizing, layout } from '@xstyled/styled-components';\nimport { DSCollapseT } from './react-desc-prop-types';\nimport { DSCollapseName, DSCollapseSlots } from './theming';\n\ninterface StyledCollapseProps extends DSCollapseT.Props {\n expandedWidth: number;\n expandedHeight: number;\n}\n\nconst getCorrectPropertyToAnimate = ({ orientation }: StyledCollapseProps) => {\n return orientation === 'horizontal' ? 'width' : 'height';\n};\n\nconst getCorrectWidth = ({ show, collapsedSize, expandedWidth }: StyledCollapseProps) => {\n if (!show) return typeof collapsedSize === 'number' ? `${collapsedSize}px` : collapsedSize;\n return expandedWidth ? `${expandedWidth}px` : 'fit-content';\n};\n\nconst getCorrectHeight = ({ show, collapsedSize, expandedHeight }: StyledCollapseProps) => {\n if (!show) return typeof collapsedSize === 'number' ? `${collapsedSize}px` : collapsedSize;\n return expandedHeight ? `${expandedHeight}px` : 'fit-content';\n};\n\nexport const StyledCollapse = styled('div', {\n name: DSCollapseName,\n slot: DSCollapseSlots.WRAPPER,\n})<StyledCollapseProps>`\n transition: ${getCorrectPropertyToAnimate} 300ms cubic-bezier(0.4, 0, 0.2, 1);\n ${(props) => {\n if (props.orientation === 'horizontal') return `width: ${getCorrectWidth(props)};`;\n return `height: ${getCorrectHeight(props)};`;\n }}\n overflow: hidden;\n ${space}\n ${sizing}\n ${layout}\n`;\n\nexport const StyledChildrenWrapper = styled('div', { name: DSCollapseName, slot: DSCollapseSlots.CHILDREN_WRAPPER })`\n width: fit-content;\n height: fit-content;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,+BAAsC;AAEtC,qBAAgD;AAOhD,MAAM,8BAA8B,CAAC,EAAE,kBAAuC;AAC5E,SAAO,gBAAgB,eAAe,UAAU;AAClD;AAEA,MAAM,kBAAkB,CAAC,EAAE,MAAM,eAAe,oBAAyC;AACvF,MAAI,CAAC;AAAM,WAAO,OAAO,kBAAkB,WAAW,GAAG,oBAAoB;AAC7E,SAAO,gBAAgB,GAAG,oBAAoB;AAChD;AAEA,MAAM,mBAAmB,CAAC,EAAE,MAAM,eAAe,qBAA0C;AACzF,MAAI,CAAC;AAAM,WAAO,OAAO,kBAAkB,WAAW,GAAG,oBAAoB;AAC7E,SAAO,iBAAiB,GAAG,qBAAqB;AAClD;AAEO,MAAM,iBAAiB,6BAAO,OAAO;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,+BAAgB;AACxB,CAAC;AAAA,gBACe;AAAA,IACZ,CAAC,UAAU;AACX,MAAI,MAAM,gBAAgB;AAAc,WAAO,UAAU,gBAAgB,KAAK;AAC9E,SAAO,WAAW,iBAAiB,KAAK;AAC1C;AAAA;AAAA,IAEE;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,wBAAwB,6BAAO,OAAO,EAAE,MAAM,+BAAgB,MAAM,+BAAgB,iBAAiB,CAAC;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var theming_exports = {};
|
|
22
|
+
__export(theming_exports, {
|
|
23
|
+
DSCollapseName: () => DSCollapseName,
|
|
24
|
+
DSCollapseSlots: () => DSCollapseSlots
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(theming_exports);
|
|
27
|
+
var React = __toESM(require("react"));
|
|
28
|
+
const DSCollapseName = "DS-Collapse";
|
|
29
|
+
const DSCollapseSlots = {
|
|
30
|
+
WRAPPER: "root",
|
|
31
|
+
CHILDREN_WRAPPER: "children-wrapper"
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=theming.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/collapse/theming.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const DSCollapseName = 'DS-Collapse';\n\nexport const DSCollapseSlots = {\n WRAPPER: 'root',\n CHILDREN_WRAPPER: 'children-wrapper',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,EACT,kBAAkB;AACpB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var useCollapse_exports = {};
|
|
22
|
+
__export(useCollapse_exports, {
|
|
23
|
+
useCollapse: () => useCollapse
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(useCollapse_exports);
|
|
26
|
+
var React = __toESM(require("react"));
|
|
27
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
28
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
29
|
+
const useCollapse = (props) => {
|
|
30
|
+
const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
31
|
+
(0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.DSCollapsePropTypes);
|
|
32
|
+
const globalAttributes = (0, import_ds_utilities.useGetGlobalAttributes)(propsWithDefault);
|
|
33
|
+
const xstyledProps = (0, import_ds_utilities.useGetXstyledProps)(propsWithDefault);
|
|
34
|
+
return { propsWithDefault, globalAttributes, xstyledProps };
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=useCollapse.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/collapse/useCollapse.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n} from '@elliemae/ds-utilities';\nimport { DSCollapseT, DSCollapsePropTypes, defaultProps } from './react-desc-prop-types';\n\nexport const useCollapse = (props: DSCollapseT.Props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, DSCollapsePropTypes);\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n return { propsWithDefault, globalAttributes, xstyledProps };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAKO;AACP,mCAA+D;AAExD,MAAM,cAAc,CAAC,UAA6B;AACvD,QAAM,mBAAmB,sDAA6B,OAAO,yCAAY;AACzE,0DAA+B,kBAAkB,gDAAmB;AACpE,QAAM,mBAAmB,gDAAuB,gBAAgB;AAChE,QAAM,eAAe,4CAAmB,gBAAgB;AACxD,SAAO,EAAE,kBAAkB,kBAAkB,aAAa;AAC5D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __export = (target, all) => {
|
|
22
|
+
for (var name in all)
|
|
23
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
24
|
+
};
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (let key of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
30
|
+
}
|
|
31
|
+
return to;
|
|
32
|
+
};
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
+
var DSFade_exports = {};
|
|
36
|
+
__export(DSFade_exports, {
|
|
37
|
+
DSFade: () => DSFade,
|
|
38
|
+
DSFadeWithSchema: () => DSFadeWithSchema
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(DSFade_exports);
|
|
41
|
+
var React = __toESM(require("react"));
|
|
42
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
43
|
+
var import_useFade = require("./useFade");
|
|
44
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
45
|
+
var import_styled = require("./styled");
|
|
46
|
+
const DSFade = (props) => {
|
|
47
|
+
const {
|
|
48
|
+
propsWithDefault: { show, children },
|
|
49
|
+
globalAttributes,
|
|
50
|
+
xstyledProps
|
|
51
|
+
} = (0, import_useFade.useFade)(props);
|
|
52
|
+
return /* @__PURE__ */ React.createElement(import_styled.StyledFade, __spreadValues(__spreadValues({
|
|
53
|
+
"data-test-id": "ds-transition-fade",
|
|
54
|
+
show
|
|
55
|
+
}, globalAttributes), xstyledProps), children);
|
|
56
|
+
};
|
|
57
|
+
DSFade.propTypes = import_react_desc_prop_types.DSFadePropTypes;
|
|
58
|
+
const DSFadeWithSchema = (0, import_ds_utilities.describe)(DSFade);
|
|
59
|
+
DSFadeWithSchema.propTypes = import_react_desc_prop_types.DSFadePropTypes;
|
|
60
|
+
//# sourceMappingURL=DSFade.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fade/DSFade.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { describe } from '@elliemae/ds-utilities';\nimport { useFade } from './useFade';\nimport { DSFadePropTypes, DSFadeT } from './react-desc-prop-types';\nimport { StyledFade } from './styled';\n\nexport const DSFade: React.ComponentType<DSFadeT.Props> = (props) => {\n const {\n propsWithDefault: { show, children },\n globalAttributes,\n xstyledProps,\n } = useFade(props);\n\n return (\n <StyledFade data-test-id=\"ds-transition-fade\" show={show} {...globalAttributes} {...xstyledProps}>\n {children}\n </StyledFade>\n );\n};\n\nDSFade.propTypes = DSFadePropTypes;\n\nexport const DSFadeWithSchema = describe(DSFade);\nDSFadeWithSchema.propTypes = DSFadePropTypes;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyB;AACzB,qBAAwB;AACxB,mCAAyC;AACzC,oBAA2B;AAEpB,MAAM,SAA6C,CAAC,UAAU;AACnE,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM;AAAA,IAC1B;AAAA,IACA;AAAA,MACE,4BAAQ,KAAK;AAEjB,SACE,oCAAC;AAAA,IAAW,gBAAa;AAAA,IAAqB;AAAA,KAAgB,mBAAsB,eACjF,QACH;AAEJ;AAEA,OAAO,YAAY;AAEZ,MAAM,mBAAmB,kCAAS,MAAM;AAC/C,iBAAiB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from))
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var fade_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(fade_exports);
|
|
20
|
+
var React = __toESM(require("react"));
|
|
21
|
+
__reExport(fade_exports, require("./DSFade"), module.exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fade/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './DSFade';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAc,qBAAd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __export = (target, all) => {
|
|
25
|
+
for (var name in all)
|
|
26
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
27
|
+
};
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
+
}
|
|
34
|
+
return to;
|
|
35
|
+
};
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var react_desc_prop_types_exports = {};
|
|
39
|
+
__export(react_desc_prop_types_exports, {
|
|
40
|
+
DSFadePropTypes: () => DSFadePropTypes
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
43
|
+
var React = __toESM(require("react"));
|
|
44
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
45
|
+
const DSFadePropTypes = __spreadProps(__spreadValues(__spreadValues({}, import_ds_utilities.globalAttributesPropTypes), import_ds_utilities.xstyledPropTypes), {
|
|
46
|
+
show: import_ds_utilities.PropTypes.bool.description("Whether to show the inner element or not").isRequired
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fade/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import {\n PropTypes,\n GlobalAttributesT,\n XstyledProps,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-utilities';\nimport { WeakValidationMap } from 'react';\n\nexport declare namespace DSFadeT {\n interface IProps {\n show: boolean;\n }\n\n export interface Props extends IProps, Omit<GlobalAttributesT<HTMLInputElement>, keyof IProps>, XstyledProps {}\n}\n\nexport const DSFadePropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n show: PropTypes.bool.description('Whether to show the inner element or not').isRequired,\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAMO;AAWA,MAAM,kBAAkB,gDAC1B,gDACA,uCAF0B;AAAA,EAG7B,MAAM,8BAAU,KAAK,YAAY,0CAA0C,EAAE;AAC/E;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var styled_exports = {};
|
|
22
|
+
__export(styled_exports, {
|
|
23
|
+
StyledFade: () => StyledFade
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(styled_exports);
|
|
26
|
+
var React = __toESM(require("react"));
|
|
27
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
28
|
+
var import_styled_components = require("@xstyled/styled-components");
|
|
29
|
+
var import_theming = require("./theming");
|
|
30
|
+
const StyledFade = (0, import_ds_system.styled)("div", { name: import_theming.DSFadeName, slot: import_theming.DSFadeSlots.WRAPPER })`
|
|
31
|
+
transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
32
|
+
opacity: ${({ show }) => show ? 1 : 0};
|
|
33
|
+
width: fit-content;
|
|
34
|
+
height: fit-content;
|
|
35
|
+
${import_styled_components.space}
|
|
36
|
+
${import_styled_components.sizing}
|
|
37
|
+
${import_styled_components.layout}
|
|
38
|
+
`;
|
|
39
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fade/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { space, sizing, layout } from '@xstyled/styled-components';\nimport { DSFadeName, DSFadeSlots } from './theming';\n\nexport const StyledFade = styled('div', { name: DSFadeName, slot: DSFadeSlots.WRAPPER })<{\n show: boolean;\n}>`\n transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);\n opacity: ${({ show }) => (show ? 1 : 0)};\n width: fit-content;\n height: fit-content;\n ${space}\n ${sizing}\n ${layout}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,+BAAsC;AACtC,qBAAwC;AAEjC,MAAM,aAAa,6BAAO,OAAO,EAAE,MAAM,2BAAY,MAAM,2BAAY,QAAQ,CAAC;AAAA;AAAA,aAI1E,CAAC,EAAE,WAAY,OAAO,IAAI;AAAA;AAAA;AAAA,IAGnC;AAAA,IACA;AAAA,IACA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var theming_exports = {};
|
|
22
|
+
__export(theming_exports, {
|
|
23
|
+
DSFadeName: () => DSFadeName,
|
|
24
|
+
DSFadeSlots: () => DSFadeSlots
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(theming_exports);
|
|
27
|
+
var React = __toESM(require("react"));
|
|
28
|
+
const DSFadeName = "DS-Fade";
|
|
29
|
+
const DSFadeSlots = {
|
|
30
|
+
WRAPPER: "root"
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=theming.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fade/theming.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const DSFadeName = 'DS-Fade';\n\nexport const DSFadeSlots = {\n WRAPPER: 'root',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa;AAEnB,MAAM,cAAc;AAAA,EACzB,SAAS;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var useFade_exports = {};
|
|
22
|
+
__export(useFade_exports, {
|
|
23
|
+
useFade: () => useFade
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(useFade_exports);
|
|
26
|
+
var React = __toESM(require("react"));
|
|
27
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
28
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
29
|
+
const useFade = (props) => {
|
|
30
|
+
(0, import_ds_utilities.useValidateTypescriptPropTypes)(props, import_react_desc_prop_types.DSFadePropTypes);
|
|
31
|
+
const globalAttributes = (0, import_ds_utilities.useGetGlobalAttributes)(props);
|
|
32
|
+
const xstyledProps = (0, import_ds_utilities.useGetXstyledProps)(props);
|
|
33
|
+
return { propsWithDefault: props, globalAttributes, xstyledProps };
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=useFade.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fade/useFade.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useGetGlobalAttributes, useGetXstyledProps, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { DSFadeT, DSFadePropTypes } from './react-desc-prop-types';\n\nexport const useFade = (props: DSFadeT.Props) => {\n useValidateTypescriptPropTypes(props, DSFadePropTypes);\n const globalAttributes = useGetGlobalAttributes(props);\n const xstyledProps = useGetXstyledProps(props);\n return { propsWithDefault: props, globalAttributes, xstyledProps };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA2F;AAC3F,mCAAyC;AAElC,MAAM,UAAU,CAAC,UAAyB;AAC/C,0DAA+B,OAAO,4CAAe;AACrD,QAAM,mBAAmB,gDAAuB,KAAK;AACrD,QAAM,eAAe,4CAAmB,KAAK;AAC7C,SAAO,EAAE,kBAAkB,OAAO,kBAAkB,aAAa;AACnE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from))
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var src_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(src_exports);
|
|
20
|
+
var React = __toESM(require("react"));
|
|
21
|
+
__reExport(src_exports, require("./fade"), module.exports);
|
|
22
|
+
__reExport(src_exports, require("./collapse"), module.exports);
|
|
23
|
+
//# 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": ["export * from './fade';\nexport * from './collapse';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,mBAAd;AACA,wBAAc,uBADd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import { useRef } from "react";
|
|
19
|
+
import { describe, useOnElementResize } from "@elliemae/ds-utilities";
|
|
20
|
+
import { useCollapse } from "./useCollapse";
|
|
21
|
+
import { DSCollapsePropTypes } from "./react-desc-prop-types";
|
|
22
|
+
import { StyledCollapse, StyledChildrenWrapper } from "./styled";
|
|
23
|
+
const DSCollapse = (props) => {
|
|
24
|
+
const {
|
|
25
|
+
propsWithDefault: { show, orientation, collapsedSize, children },
|
|
26
|
+
globalAttributes,
|
|
27
|
+
xstyledProps
|
|
28
|
+
} = useCollapse(props);
|
|
29
|
+
const ref = useRef(null);
|
|
30
|
+
const { width: expandedWidth, height: expandedHeight } = useOnElementResize(ref);
|
|
31
|
+
return /* @__PURE__ */ React.createElement(StyledCollapse, __spreadValues(__spreadValues({
|
|
32
|
+
"data-test-id": "ds-transition-collapse",
|
|
33
|
+
show,
|
|
34
|
+
orientation,
|
|
35
|
+
collapsedSize,
|
|
36
|
+
expandedWidth,
|
|
37
|
+
expandedHeight
|
|
38
|
+
}, globalAttributes), xstyledProps), /* @__PURE__ */ React.createElement(StyledChildrenWrapper, {
|
|
39
|
+
ref
|
|
40
|
+
}, children));
|
|
41
|
+
};
|
|
42
|
+
DSCollapse.propTypes = DSCollapsePropTypes;
|
|
43
|
+
const DSCollapseWithSchema = describe(DSCollapse);
|
|
44
|
+
DSCollapseWithSchema.propTypes = DSCollapsePropTypes;
|
|
45
|
+
export {
|
|
46
|
+
DSCollapse,
|
|
47
|
+
DSCollapseWithSchema
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=DSCollapse.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/DSCollapse.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useRef } from 'react';\nimport { describe, useOnElementResize } from '@elliemae/ds-utilities';\nimport { useCollapse } from './useCollapse';\nimport { DSCollapsePropTypes, DSCollapseT } from './react-desc-prop-types';\nimport { StyledCollapse, StyledChildrenWrapper } from './styled';\n\nexport const DSCollapse: React.ComponentType<DSCollapseT.Props> = (props) => {\n const {\n propsWithDefault: { show, orientation, collapsedSize, children },\n globalAttributes,\n xstyledProps,\n } = useCollapse(props);\n\n const ref = useRef<HTMLDivElement>(null);\n\n const { width: expandedWidth, height: expandedHeight } = useOnElementResize(ref);\n\n return (\n <StyledCollapse\n data-test-id=\"ds-transition-collapse\"\n show={show}\n orientation={orientation}\n collapsedSize={collapsedSize}\n expandedWidth={expandedWidth}\n expandedHeight={expandedHeight}\n {...globalAttributes}\n {...xstyledProps}\n >\n <StyledChildrenWrapper ref={ref}>{children}</StyledChildrenWrapper>\n </StyledCollapse>\n );\n};\n\nDSCollapse.propTypes = DSCollapsePropTypes;\n\nexport const DSCollapseWithSchema = describe(DSCollapse);\nDSCollapseWithSchema.propTypes = DSCollapsePropTypes;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AAEO,MAAM,aAAqD,CAAC,UAAU;AAC3E,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM,aAAa,eAAe;AAAA,IACtD;AAAA,IACA;AAAA,MACE,YAAY,KAAK;AAErB,QAAM,MAAM,OAAuB,IAAI;AAEvC,QAAM,EAAE,OAAO,eAAe,QAAQ,mBAAmB,mBAAmB,GAAG;AAE/E,SACE,oCAAC;AAAA,IACC,gBAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KACI,mBACA,eAEJ,oCAAC;AAAA,IAAsB;AAAA,KAAW,QAAS,CAC7C;AAEJ;AAEA,WAAW,YAAY;AAEhB,MAAM,uBAAuB,SAAS,UAAU;AACvD,qBAAqB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSCollapse';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import {
|
|
22
|
+
PropTypes,
|
|
23
|
+
globalAttributesPropTypes,
|
|
24
|
+
xstyledPropTypes
|
|
25
|
+
} from "@elliemae/ds-utilities";
|
|
26
|
+
const defaultProps = {
|
|
27
|
+
orientation: "horizontal",
|
|
28
|
+
collapsedSize: "0px"
|
|
29
|
+
};
|
|
30
|
+
const DSCollapsePropTypes = __spreadProps(__spreadValues(__spreadValues({}, globalAttributesPropTypes), xstyledPropTypes), {
|
|
31
|
+
show: PropTypes.bool.description("Whether to show the inner element or not").isRequired,
|
|
32
|
+
orientation: PropTypes.oneOf(["horizontal", "vertical"]).description("Whether this element should slide from left to right or from top to bottom").defaultValue("horizontal"),
|
|
33
|
+
collapsedSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description("Size when collapsed").defaultValue(0)
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
DSCollapsePropTypes,
|
|
37
|
+
defaultProps
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/react-desc-prop-types.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n PropTypes,\n GlobalAttributesT,\n XstyledProps,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-utilities';\nimport { WeakValidationMap } from 'react';\n\nexport declare namespace DSCollapseT {\n interface IProps {\n show: boolean;\n orientation: 'horizontal' | 'vertical';\n collapsedSize: number | string;\n }\n\n export interface Props extends IProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof IProps>, XstyledProps {}\n}\n\nexport const defaultProps: Partial<DSCollapseT.Props> = {\n orientation: 'horizontal',\n collapsedSize: '0px',\n};\n\nexport const DSCollapsePropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n show: PropTypes.bool.description('Whether to show the inner element or not').isRequired,\n orientation: PropTypes.oneOf(['horizontal', 'vertical'])\n .description('Whether this element should slide from left to right or from top to bottom')\n .defaultValue('horizontal'),\n collapsedSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Size when collapsed')\n .defaultValue(0),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AAAA;AAAA;AAAA;AAAA;AAmBO,MAAM,eAA2C;AAAA,EACtD,aAAa;AAAA,EACb,eAAe;AACjB;AAEO,MAAM,sBAAsB,gDAC9B,4BACA,mBAF8B;AAAA,EAGjC,MAAM,UAAU,KAAK,YAAY,0CAA0C,EAAE;AAAA,EAC7E,aAAa,UAAU,MAAM,CAAC,cAAc,UAAU,CAAC,EACpD,YAAY,4EAA4E,EACxF,aAAa,YAAY;AAAA,EAC5B,eAAe,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EACpE,YAAY,qBAAqB,EACjC,aAAa,CAAC;AACnB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { styled } from "@elliemae/ds-system";
|
|
3
|
+
import { space, sizing, layout } from "@xstyled/styled-components";
|
|
4
|
+
import { DSCollapseName, DSCollapseSlots } from "./theming";
|
|
5
|
+
const getCorrectPropertyToAnimate = ({ orientation }) => {
|
|
6
|
+
return orientation === "horizontal" ? "width" : "height";
|
|
7
|
+
};
|
|
8
|
+
const getCorrectWidth = ({ show, collapsedSize, expandedWidth }) => {
|
|
9
|
+
if (!show)
|
|
10
|
+
return typeof collapsedSize === "number" ? `${collapsedSize}px` : collapsedSize;
|
|
11
|
+
return expandedWidth ? `${expandedWidth}px` : "fit-content";
|
|
12
|
+
};
|
|
13
|
+
const getCorrectHeight = ({ show, collapsedSize, expandedHeight }) => {
|
|
14
|
+
if (!show)
|
|
15
|
+
return typeof collapsedSize === "number" ? `${collapsedSize}px` : collapsedSize;
|
|
16
|
+
return expandedHeight ? `${expandedHeight}px` : "fit-content";
|
|
17
|
+
};
|
|
18
|
+
const StyledCollapse = styled("div", {
|
|
19
|
+
name: DSCollapseName,
|
|
20
|
+
slot: DSCollapseSlots.WRAPPER
|
|
21
|
+
})`
|
|
22
|
+
transition: ${getCorrectPropertyToAnimate} 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
23
|
+
${(props) => {
|
|
24
|
+
if (props.orientation === "horizontal")
|
|
25
|
+
return `width: ${getCorrectWidth(props)};`;
|
|
26
|
+
return `height: ${getCorrectHeight(props)};`;
|
|
27
|
+
}}
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
${space}
|
|
30
|
+
${sizing}
|
|
31
|
+
${layout}
|
|
32
|
+
`;
|
|
33
|
+
const StyledChildrenWrapper = styled("div", { name: DSCollapseName, slot: DSCollapseSlots.CHILDREN_WRAPPER })`
|
|
34
|
+
width: fit-content;
|
|
35
|
+
height: fit-content;
|
|
36
|
+
`;
|
|
37
|
+
export {
|
|
38
|
+
StyledChildrenWrapper,
|
|
39
|
+
StyledCollapse
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/styled.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { space, sizing, layout } from '@xstyled/styled-components';\nimport { DSCollapseT } from './react-desc-prop-types';\nimport { DSCollapseName, DSCollapseSlots } from './theming';\n\ninterface StyledCollapseProps extends DSCollapseT.Props {\n expandedWidth: number;\n expandedHeight: number;\n}\n\nconst getCorrectPropertyToAnimate = ({ orientation }: StyledCollapseProps) => {\n return orientation === 'horizontal' ? 'width' : 'height';\n};\n\nconst getCorrectWidth = ({ show, collapsedSize, expandedWidth }: StyledCollapseProps) => {\n if (!show) return typeof collapsedSize === 'number' ? `${collapsedSize}px` : collapsedSize;\n return expandedWidth ? `${expandedWidth}px` : 'fit-content';\n};\n\nconst getCorrectHeight = ({ show, collapsedSize, expandedHeight }: StyledCollapseProps) => {\n if (!show) return typeof collapsedSize === 'number' ? `${collapsedSize}px` : collapsedSize;\n return expandedHeight ? `${expandedHeight}px` : 'fit-content';\n};\n\nexport const StyledCollapse = styled('div', {\n name: DSCollapseName,\n slot: DSCollapseSlots.WRAPPER,\n})<StyledCollapseProps>`\n transition: ${getCorrectPropertyToAnimate} 300ms cubic-bezier(0.4, 0, 0.2, 1);\n ${(props) => {\n if (props.orientation === 'horizontal') return `width: ${getCorrectWidth(props)};`;\n return `height: ${getCorrectHeight(props)};`;\n }}\n overflow: hidden;\n ${space}\n ${sizing}\n ${layout}\n`;\n\nexport const StyledChildrenWrapper = styled('div', { name: DSCollapseName, slot: DSCollapseSlots.CHILDREN_WRAPPER })`\n width: fit-content;\n height: fit-content;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA;AAOA,MAAM,8BAA8B,CAAC,EAAE,kBAAuC;AAC5E,SAAO,gBAAgB,eAAe,UAAU;AAClD;AAEA,MAAM,kBAAkB,CAAC,EAAE,MAAM,eAAe,oBAAyC;AACvF,MAAI,CAAC;AAAM,WAAO,OAAO,kBAAkB,WAAW,GAAG,oBAAoB;AAC7E,SAAO,gBAAgB,GAAG,oBAAoB;AAChD;AAEA,MAAM,mBAAmB,CAAC,EAAE,MAAM,eAAe,qBAA0C;AACzF,MAAI,CAAC;AAAM,WAAO,OAAO,kBAAkB,WAAW,GAAG,oBAAoB;AAC7E,SAAO,iBAAiB,GAAG,qBAAqB;AAClD;AAEO,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,gBAAgB;AACxB,CAAC;AAAA,gBACe;AAAA,IACZ,CAAC,UAAU;AACX,MAAI,MAAM,gBAAgB;AAAc,WAAO,UAAU,gBAAgB,KAAK;AAC9E,SAAO,WAAW,iBAAiB,KAAK;AAC1C;AAAA;AAAA,IAEE;AAAA,IACA;AAAA,IACA;AAAA;AAGG,MAAM,wBAAwB,OAAO,OAAO,EAAE,MAAM,gBAAgB,MAAM,gBAAgB,iBAAiB,CAAC;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/theming.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSCollapseName = 'DS-Collapse';\n\nexport const DSCollapseSlots = {\n WRAPPER: 'root',\n CHILDREN_WRAPPER: 'children-wrapper',\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAO,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,EACT,kBAAkB;AACpB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
useGetGlobalAttributes,
|
|
4
|
+
useGetXstyledProps,
|
|
5
|
+
useValidateTypescriptPropTypes,
|
|
6
|
+
useMemoMergePropsWithDefault
|
|
7
|
+
} from "@elliemae/ds-utilities";
|
|
8
|
+
import { DSCollapsePropTypes, defaultProps } from "./react-desc-prop-types";
|
|
9
|
+
const useCollapse = (props) => {
|
|
10
|
+
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
11
|
+
useValidateTypescriptPropTypes(propsWithDefault, DSCollapsePropTypes);
|
|
12
|
+
const globalAttributes = useGetGlobalAttributes(propsWithDefault);
|
|
13
|
+
const xstyledProps = useGetXstyledProps(propsWithDefault);
|
|
14
|
+
return { propsWithDefault, globalAttributes, xstyledProps };
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
useCollapse
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useCollapse.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/useCollapse.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n} from '@elliemae/ds-utilities';\nimport { DSCollapseT, DSCollapsePropTypes, defaultProps } from './react-desc-prop-types';\n\nexport const useCollapse = (props: DSCollapseT.Props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, DSCollapsePropTypes);\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n return { propsWithDefault, globalAttributes, xstyledProps };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AAEO,MAAM,cAAc,CAAC,UAA6B;AACvD,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,mBAAmB;AACpE,QAAM,mBAAmB,uBAAuB,gBAAgB;AAChE,QAAM,eAAe,mBAAmB,gBAAgB;AACxD,SAAO,EAAE,kBAAkB,kBAAkB,aAAa;AAC5D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import { describe } from "@elliemae/ds-utilities";
|
|
19
|
+
import { useFade } from "./useFade";
|
|
20
|
+
import { DSFadePropTypes } from "./react-desc-prop-types";
|
|
21
|
+
import { StyledFade } from "./styled";
|
|
22
|
+
const DSFade = (props) => {
|
|
23
|
+
const {
|
|
24
|
+
propsWithDefault: { show, children },
|
|
25
|
+
globalAttributes,
|
|
26
|
+
xstyledProps
|
|
27
|
+
} = useFade(props);
|
|
28
|
+
return /* @__PURE__ */ React.createElement(StyledFade, __spreadValues(__spreadValues({
|
|
29
|
+
"data-test-id": "ds-transition-fade",
|
|
30
|
+
show
|
|
31
|
+
}, globalAttributes), xstyledProps), children);
|
|
32
|
+
};
|
|
33
|
+
DSFade.propTypes = DSFadePropTypes;
|
|
34
|
+
const DSFadeWithSchema = describe(DSFade);
|
|
35
|
+
DSFadeWithSchema.propTypes = DSFadePropTypes;
|
|
36
|
+
export {
|
|
37
|
+
DSFade,
|
|
38
|
+
DSFadeWithSchema
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=DSFade.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/DSFade.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe } from '@elliemae/ds-utilities';\nimport { useFade } from './useFade';\nimport { DSFadePropTypes, DSFadeT } from './react-desc-prop-types';\nimport { StyledFade } from './styled';\n\nexport const DSFade: React.ComponentType<DSFadeT.Props> = (props) => {\n const {\n propsWithDefault: { show, children },\n globalAttributes,\n xstyledProps,\n } = useFade(props);\n\n return (\n <StyledFade data-test-id=\"ds-transition-fade\" show={show} {...globalAttributes} {...xstyledProps}>\n {children}\n </StyledFade>\n );\n};\n\nDSFade.propTypes = DSFadePropTypes;\n\nexport const DSFadeWithSchema = describe(DSFade);\nDSFadeWithSchema.propTypes = DSFadePropTypes;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AAEO,MAAM,SAA6C,CAAC,UAAU;AACnE,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM;AAAA,IAC1B;AAAA,IACA;AAAA,MACE,QAAQ,KAAK;AAEjB,SACE,oCAAC;AAAA,IAAW,gBAAa;AAAA,IAAqB;AAAA,KAAgB,mBAAsB,eACjF,QACH;AAEJ;AAEA,OAAO,YAAY;AAEZ,MAAM,mBAAmB,SAAS,MAAM;AAC/C,iBAAiB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSFade';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import {
|
|
22
|
+
PropTypes,
|
|
23
|
+
globalAttributesPropTypes,
|
|
24
|
+
xstyledPropTypes
|
|
25
|
+
} from "@elliemae/ds-utilities";
|
|
26
|
+
const DSFadePropTypes = __spreadProps(__spreadValues(__spreadValues({}, globalAttributesPropTypes), xstyledPropTypes), {
|
|
27
|
+
show: PropTypes.bool.description("Whether to show the inner element or not").isRequired
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
DSFadePropTypes
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/react-desc-prop-types.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n PropTypes,\n GlobalAttributesT,\n XstyledProps,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-utilities';\nimport { WeakValidationMap } from 'react';\n\nexport declare namespace DSFadeT {\n interface IProps {\n show: boolean;\n }\n\n export interface Props extends IProps, Omit<GlobalAttributesT<HTMLInputElement>, keyof IProps>, XstyledProps {}\n}\n\nexport const DSFadePropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n show: PropTypes.bool.description('Whether to show the inner element or not').isRequired,\n} as WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AAAA;AAAA;AAAA;AAAA;AAiBO,MAAM,kBAAkB,gDAC1B,4BACA,mBAF0B;AAAA,EAG7B,MAAM,UAAU,KAAK,YAAY,0CAA0C,EAAE;AAC/E;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { styled } from "@elliemae/ds-system";
|
|
3
|
+
import { space, sizing, layout } from "@xstyled/styled-components";
|
|
4
|
+
import { DSFadeName, DSFadeSlots } from "./theming";
|
|
5
|
+
const StyledFade = styled("div", { name: DSFadeName, slot: DSFadeSlots.WRAPPER })`
|
|
6
|
+
transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
7
|
+
opacity: ${({ show }) => show ? 1 : 0};
|
|
8
|
+
width: fit-content;
|
|
9
|
+
height: fit-content;
|
|
10
|
+
${space}
|
|
11
|
+
${sizing}
|
|
12
|
+
${layout}
|
|
13
|
+
`;
|
|
14
|
+
export {
|
|
15
|
+
StyledFade
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/styled.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { space, sizing, layout } from '@xstyled/styled-components';\nimport { DSFadeName, DSFadeSlots } from './theming';\n\nexport const StyledFade = styled('div', { name: DSFadeName, slot: DSFadeSlots.WRAPPER })<{\n show: boolean;\n}>`\n transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);\n opacity: ${({ show }) => (show ? 1 : 0)};\n width: fit-content;\n height: fit-content;\n ${space}\n ${sizing}\n ${layout}\n`;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AAEO,MAAM,aAAa,OAAO,OAAO,EAAE,MAAM,YAAY,MAAM,YAAY,QAAQ,CAAC;AAAA;AAAA,aAI1E,CAAC,EAAE,WAAY,OAAO,IAAI;AAAA;AAAA;AAAA,IAGnC;AAAA,IACA;AAAA,IACA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/theming.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSFadeName = 'DS-Fade';\n\nexport const DSFadeSlots = {\n WRAPPER: 'root',\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAO,MAAM,aAAa;AAEnB,MAAM,cAAc;AAAA,EACzB,SAAS;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useGetGlobalAttributes, useGetXstyledProps, useValidateTypescriptPropTypes } from "@elliemae/ds-utilities";
|
|
3
|
+
import { DSFadePropTypes } from "./react-desc-prop-types";
|
|
4
|
+
const useFade = (props) => {
|
|
5
|
+
useValidateTypescriptPropTypes(props, DSFadePropTypes);
|
|
6
|
+
const globalAttributes = useGetGlobalAttributes(props);
|
|
7
|
+
const xstyledProps = useGetXstyledProps(props);
|
|
8
|
+
return { propsWithDefault: props, globalAttributes, xstyledProps };
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
useFade
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useFade.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/useFade.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useGetGlobalAttributes, useGetXstyledProps, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { DSFadeT, DSFadePropTypes } from './react-desc-prop-types';\n\nexport const useFade = (props: DSFadeT.Props) => {\n useValidateTypescriptPropTypes(props, DSFadePropTypes);\n const globalAttributes = useGetGlobalAttributes(props);\n const xstyledProps = useGetXstyledProps(props);\n return { propsWithDefault: props, globalAttributes, xstyledProps };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEO,MAAM,UAAU,CAAC,UAAyB;AAC/C,iCAA+B,OAAO,eAAe;AACrD,QAAM,mBAAmB,uBAAuB,KAAK;AACrD,QAAM,eAAe,mBAAmB,KAAK;AAC7C,SAAO,EAAE,kBAAkB,OAAO,kBAAkB,aAAa;AACnE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -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", "export * from './fade';\nexport * from './collapse';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elliemae/ds-transition",
|
|
3
|
+
"version": "3.0.0-next.49",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "ICE MT - Dimsum - Tooltip",
|
|
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
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": [
|
|
19
|
+
"*.css",
|
|
20
|
+
"*.scss"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"pnpm": ">=6",
|
|
28
|
+
"node": ">=16"
|
|
29
|
+
},
|
|
30
|
+
"author": "ICE MT",
|
|
31
|
+
"jestSonar": {
|
|
32
|
+
"sonar56x": true,
|
|
33
|
+
"reportPath": "reports",
|
|
34
|
+
"reportFile": "tests.xml",
|
|
35
|
+
"indent": 4
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@elliemae/ds-system": "3.0.0-next.35",
|
|
39
|
+
"@elliemae/ds-utilities": "3.0.0-next.35",
|
|
40
|
+
"@xstyled/styled-components": "~3.1.2"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@testing-library/jest-dom": "~5.16.2",
|
|
44
|
+
"@testing-library/react": "~12.1.2",
|
|
45
|
+
"@testing-library/user-event": "~13.5.0",
|
|
46
|
+
"react": "^17.0.2",
|
|
47
|
+
"react-dom": "^17.0.2"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"react": "^17.0.2",
|
|
51
|
+
"react-dom": "^17.0.2",
|
|
52
|
+
"styled-components": "^5.3.3"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public",
|
|
56
|
+
"typeSafety": false
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
60
|
+
"test": "node ../../scripts/testing/test.mjs",
|
|
61
|
+
"lint": "node ../../scripts/lint.mjs",
|
|
62
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
63
|
+
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
64
|
+
}
|
|
65
|
+
}
|