@elliemae/ds-transition 3.4.2 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/collapse/DSCollapse.js +12 -6
- package/dist/cjs/collapse/DSCollapse.js.map +1 -1
- package/dist/cjs/collapse/index.js +4 -1
- package/dist/cjs/collapse/index.js.map +1 -1
- package/dist/cjs/collapse/react-desc-prop-types.js +4 -1
- package/dist/cjs/collapse/react-desc-prop-types.js.map +1 -1
- package/dist/cjs/collapse/styled.js +4 -1
- package/dist/cjs/collapse/styled.js.map +1 -1
- package/dist/cjs/collapse/theming.js +4 -1
- package/dist/cjs/collapse/theming.js.map +1 -1
- package/dist/cjs/collapse/useCollapse.js +4 -1
- package/dist/cjs/collapse/useCollapse.js.map +1 -1
- package/dist/cjs/fade/DSFade.js +9 -4
- package/dist/cjs/fade/DSFade.js.map +1 -1
- package/dist/cjs/fade/index.js +4 -1
- package/dist/cjs/fade/index.js.map +1 -1
- package/dist/cjs/fade/react-desc-prop-types.js +4 -1
- package/dist/cjs/fade/react-desc-prop-types.js.map +1 -1
- package/dist/cjs/fade/styled.js +4 -1
- package/dist/cjs/fade/styled.js.map +1 -1
- package/dist/cjs/fade/theming.js +4 -1
- package/dist/cjs/fade/theming.js.map +1 -1
- package/dist/cjs/fade/useFade.js +4 -1
- package/dist/cjs/fade/useFade.js.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/collapse/DSCollapse.js +8 -5
- package/dist/esm/collapse/DSCollapse.js.map +1 -1
- package/dist/esm/collapse/index.js.map +1 -1
- package/dist/esm/collapse/react-desc-prop-types.js.map +1 -1
- package/dist/esm/collapse/styled.js.map +1 -1
- package/dist/esm/collapse/theming.js.map +1 -1
- package/dist/esm/collapse/useCollapse.js.map +1 -1
- package/dist/esm/fade/DSFade.js +5 -3
- package/dist/esm/fade/DSFade.js.map +1 -1
- package/dist/esm/fade/index.js.map +1 -1
- package/dist/esm/fade/react-desc-prop-types.js.map +1 -1
- package/dist/esm/fade/styled.js.map +1 -1
- package/dist/esm/fade/theming.js.map +1 -1
- package/dist/esm/fade/useFade.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSCollapse_exports = {};
|
|
23
26
|
__export(DSCollapse_exports, {
|
|
@@ -26,6 +29,7 @@ __export(DSCollapse_exports, {
|
|
|
26
29
|
});
|
|
27
30
|
module.exports = __toCommonJS(DSCollapse_exports);
|
|
28
31
|
var React = __toESM(require("react"));
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
33
|
var import_react = require("react");
|
|
30
34
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
31
35
|
var import_useCollapse = require("./useCollapse");
|
|
@@ -39,7 +43,7 @@ const DSCollapse = (props) => {
|
|
|
39
43
|
} = (0, import_useCollapse.useCollapse)(props);
|
|
40
44
|
const ref = (0, import_react.useRef)(null);
|
|
41
45
|
const { width: expandedWidth, height: expandedHeight } = (0, import_ds_utilities.useOnElementResize)(ref);
|
|
42
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledCollapse, {
|
|
43
47
|
"data-test-id": "ds-transition-collapse",
|
|
44
48
|
show,
|
|
45
49
|
orientation,
|
|
@@ -47,10 +51,12 @@ const DSCollapse = (props) => {
|
|
|
47
51
|
expandedWidth,
|
|
48
52
|
expandedHeight,
|
|
49
53
|
...globalAttributes,
|
|
50
|
-
...xstyledProps
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
...xstyledProps,
|
|
55
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledChildrenWrapper, {
|
|
56
|
+
ref,
|
|
57
|
+
children
|
|
58
|
+
})
|
|
59
|
+
});
|
|
54
60
|
};
|
|
55
61
|
DSCollapse.propTypes = import_react_desc_prop_types.DSCollapsePropTypes;
|
|
56
62
|
DSCollapse.displayName = "DSCollapse";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/collapse/DSCollapse.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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;\nDSCollapse.displayName = 'DSCollapse';\nexport const DSCollapseWithSchema = describe(DSCollapse);\nDSCollapseWithSchema.propTypes = DSCollapsePropTypes;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAAuB;AACvB,0BAA6C;AAC7C,yBAA4B;AAC5B,mCAAiD;AACjD,oBAAsD;AAE/C,MAAM,aAAqD,CAAC,UAAU;AAC3E,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM,aAAa,eAAe,SAAS;AAAA,IAC/D;AAAA,IACA;AAAA,EACF,QAAI,gCAAY,KAAK;AAErB,QAAM,UAAM,qBAAuB,IAAI;AAEvC,QAAM,EAAE,OAAO,eAAe,QAAQ,eAAe,QAAI,wCAAmB,GAAG;AAE/E,SACE,4CAAC;AAAA,IACC,gBAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACC,GAAG;AAAA,IACH,GAAG;AAAA,IAEJ,sDAAC;AAAA,MAAsB;AAAA,MAAW;AAAA,KAAS;AAAA,GAC7C;AAEJ;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AAClB,MAAM,2BAAuB,8BAAS,UAAU;AACvD,qBAAqB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -14,7 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
return to;
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
|
+
mod
|
|
20
|
+
));
|
|
18
21
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
22
|
var collapse_exports = {};
|
|
20
23
|
module.exports = __toCommonJS(collapse_exports);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/collapse/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSCollapse';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAAc,yBAAd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var react_desc_prop_types_exports = {};
|
|
23
26
|
__export(react_desc_prop_types_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/collapse/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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": "
|
|
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;AAAA,EACjC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var styled_exports = {};
|
|
23
26
|
__export(styled_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/collapse/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { styled, space, sizing, layout } from '@elliemae/ds-system';\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 orientation === 'horizontal' ? 'width' : 'height';\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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA8C;AAE9C,qBAAgD;AAOhD,MAAM,8BAA8B,CAAC,EAAE,YAAY,MACjD,gBAAgB,eAAe,UAAU;AAE3C,MAAM,kBAAkB,CAAC,EAAE,MAAM,eAAe,cAAc,MAA2B;AACvF,MAAI,CAAC;AAAM,WAAO,OAAO,kBAAkB,WAAW,GAAG,oBAAoB;AAC7E,SAAO,gBAAgB,GAAG,oBAAoB;AAChD;AAEA,MAAM,mBAAmB,CAAC,EAAE,MAAM,eAAe,eAAe,MAA2B;AACzF,MAAI,CAAC;AAAM,WAAO,OAAO,kBAAkB,WAAW,GAAG,oBAAoB;AAC7E,SAAO,iBAAiB,GAAG,qBAAqB;AAClD;AAEO,MAAM,qBAAiB,yBAAO,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,4BAAwB,yBAAO,OAAO,EAAE,MAAM,+BAAgB,MAAM,+BAAgB,iBAAiB,CAAC;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var theming_exports = {};
|
|
23
26
|
__export(theming_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/collapse/theming.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,EACT,kBAAkB;AACpB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var useCollapse_exports = {};
|
|
23
26
|
__export(useCollapse_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/collapse/useCollapse.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAKO;AACP,mCAA+D;AAExD,MAAM,cAAc,CAAC,UAA6B;AACvD,QAAM,uBAAmB,kDAA6B,OAAO,yCAAY;AACzE,0DAA+B,kBAAkB,gDAAmB;AACpE,QAAM,uBAAmB,4CAAuB,gBAAgB;AAChE,QAAM,mBAAe,wCAAmB,gBAAgB;AACxD,SAAO,EAAE,kBAAkB,kBAAkB,aAAa;AAC5D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/fade/DSFade.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSFade_exports = {};
|
|
23
26
|
__export(DSFade_exports, {
|
|
@@ -26,6 +29,7 @@ __export(DSFade_exports, {
|
|
|
26
29
|
});
|
|
27
30
|
module.exports = __toCommonJS(DSFade_exports);
|
|
28
31
|
var React = __toESM(require("react"));
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
33
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
30
34
|
var import_useFade = require("./useFade");
|
|
31
35
|
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
@@ -36,12 +40,13 @@ const DSFade = (props) => {
|
|
|
36
40
|
globalAttributes,
|
|
37
41
|
xstyledProps
|
|
38
42
|
} = (0, import_useFade.useFade)(props);
|
|
39
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledFade, {
|
|
40
44
|
"data-test-id": "ds-transition-fade",
|
|
41
45
|
show,
|
|
42
46
|
...globalAttributes,
|
|
43
|
-
...xstyledProps
|
|
44
|
-
|
|
47
|
+
...xstyledProps,
|
|
48
|
+
children
|
|
49
|
+
});
|
|
45
50
|
};
|
|
46
51
|
DSFade.propTypes = import_react_desc_prop_types.DSFadePropTypes;
|
|
47
52
|
DSFade.displayName = "DSFade";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/fade/DSFade.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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;\nDSFade.displayName = 'DSFade';\nexport const DSFadeWithSchema = describe(DSFade);\nDSFadeWithSchema.propTypes = DSFadePropTypes;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,0BAAyB;AACzB,qBAAwB;AACxB,mCAAyC;AACzC,oBAA2B;AAEpB,MAAM,SAA6C,CAAC,UAAU;AACnE,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM,SAAS;AAAA,IACnC;AAAA,IACA;AAAA,EACF,QAAI,wBAAQ,KAAK;AAEjB,SACE,4CAAC;AAAA,IAAW,gBAAa;AAAA,IAAqB;AAAA,IAAa,GAAG;AAAA,IAAmB,GAAG;AAAA,IACjF;AAAA,GACH;AAEJ;AAEA,OAAO,YAAY;AACnB,OAAO,cAAc;AACd,MAAM,uBAAmB,8BAAS,MAAM;AAC/C,iBAAiB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/fade/index.js
CHANGED
|
@@ -14,7 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
return to;
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
|
+
mod
|
|
20
|
+
));
|
|
18
21
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
22
|
var fade_exports = {};
|
|
20
23
|
module.exports = __toCommonJS(fade_exports);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/fade/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSFade';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAc,qBAAd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var react_desc_prop_types_exports = {};
|
|
23
26
|
__export(react_desc_prop_types_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/fade/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAMO;AAWA,MAAM,kBAAkB;AAAA,EAC7B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,8BAAU,KAAK,YAAY,0CAA0C,EAAE;AAC/E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/fade/styled.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var styled_exports = {};
|
|
23
26
|
__export(styled_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/fade/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { styled, space, sizing, layout } from '@elliemae/ds-system';\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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA8C;AAC9C,qBAAwC;AAEjC,MAAM,iBAAa,yBAAO,OAAO,EAAE,MAAM,2BAAY,MAAM,2BAAY,QAAQ,CAAC;AAAA;AAAA,aAI1E,CAAC,EAAE,KAAK,MAAO,OAAO,IAAI;AAAA;AAAA;AAAA,IAGnC;AAAA,IACA;AAAA,IACA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/fade/theming.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var theming_exports = {};
|
|
23
26
|
__export(theming_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/fade/theming.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa;AAEnB,MAAM,cAAc;AAAA,EACzB,SAAS;AACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/fade/useFade.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var useFade_exports = {};
|
|
23
26
|
__export(useFade_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/fade/useFade.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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": "
|
|
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,uBAAmB,4CAAuB,KAAK;AACrD,QAAM,mBAAe,wCAAmB,KAAK;AAC7C,SAAO,EAAE,kBAAkB,OAAO,kBAAkB,aAAa;AACnE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
return to;
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
|
+
mod
|
|
20
|
+
));
|
|
18
21
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
22
|
var src_exports = {};
|
|
20
23
|
module.exports = __toCommonJS(src_exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './fade';\nexport * from './collapse';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,mBAAd;AACA,wBAAc,uBADd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { useRef } from "react";
|
|
3
4
|
import { describe, useOnElementResize } from "@elliemae/ds-utilities";
|
|
4
5
|
import { useCollapse } from "./useCollapse";
|
|
@@ -12,7 +13,7 @@ const DSCollapse = (props) => {
|
|
|
12
13
|
} = useCollapse(props);
|
|
13
14
|
const ref = useRef(null);
|
|
14
15
|
const { width: expandedWidth, height: expandedHeight } = useOnElementResize(ref);
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(StyledCollapse, {
|
|
16
17
|
"data-test-id": "ds-transition-collapse",
|
|
17
18
|
show,
|
|
18
19
|
orientation,
|
|
@@ -20,10 +21,12 @@ const DSCollapse = (props) => {
|
|
|
20
21
|
expandedWidth,
|
|
21
22
|
expandedHeight,
|
|
22
23
|
...globalAttributes,
|
|
23
|
-
...xstyledProps
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
...xstyledProps,
|
|
25
|
+
children: /* @__PURE__ */ jsx(StyledChildrenWrapper, {
|
|
26
|
+
ref,
|
|
27
|
+
children
|
|
28
|
+
})
|
|
29
|
+
});
|
|
27
30
|
};
|
|
28
31
|
DSCollapse.propTypes = DSCollapsePropTypes;
|
|
29
32
|
DSCollapse.displayName = "DSCollapse";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/DSCollapse.tsx"],
|
|
4
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;\nDSCollapse.displayName = 'DSCollapse';\nexport const DSCollapseWithSchema = describe(DSCollapse);\nDSCollapseWithSchema.propTypes = DSCollapsePropTypes;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAS,cAAc;AACvB,SAAS,UAAU,0BAA0B;AAC7C,SAAS,mBAAmB;AAC5B,SAAS,2BAAwC;AACjD,SAAS,gBAAgB,6BAA6B;AAE/C,MAAM,aAAqD,CAAC,UAAU;AAC3E,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM,aAAa,eAAe,SAAS;AAAA,IAC/D;AAAA,IACA;AAAA,EACF,IAAI,YAAY,KAAK;AAErB,QAAM,MAAM,OAAuB,IAAI;AAEvC,QAAM,EAAE,OAAO,eAAe,QAAQ,eAAe,IAAI,mBAAmB,GAAG;AAE/E,SACE,oBAAC;AAAA,IACC,gBAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACC,GAAG;AAAA,IACH,GAAG;AAAA,IAEJ,8BAAC;AAAA,MAAsB;AAAA,MAAW;AAAA,KAAS;AAAA,GAC7C;AAEJ;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AAClB,MAAM,uBAAuB,SAAS,UAAU;AACvD,qBAAqB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/index.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSCollapse';\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/react-desc-prop-types.tsx"],
|
|
4
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;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAaA,MAAM,eAA2C;AAAA,EACtD,aAAa;AAAA,EACb,eAAe;AACjB;AAEO,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/styled.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, space, sizing, layout } from '@elliemae/ds-system';\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 orientation === 'horizontal' ? 'width' : 'height';\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;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,OAAO,QAAQ,cAAc;AAE9C,SAAS,gBAAgB,uBAAuB;AAOhD,MAAM,8BAA8B,CAAC,EAAE,YAAY,MACjD,gBAAgB,eAAe,UAAU;AAE3C,MAAM,kBAAkB,CAAC,EAAE,MAAM,eAAe,cAAc,MAA2B;AACvF,MAAI,CAAC;AAAM,WAAO,OAAO,kBAAkB,WAAW,GAAG,oBAAoB;AAC7E,SAAO,gBAAgB,GAAG,oBAAoB;AAChD;AAEA,MAAM,mBAAmB,CAAC,EAAE,MAAM,eAAe,eAAe,MAA2B;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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/theming.ts"],
|
|
4
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;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,EACT,kBAAkB;AACpB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/useCollapse.ts"],
|
|
4
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;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAsB,qBAAqB,oBAAoB;AAExD,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
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/fade/DSFade.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { describe } from "@elliemae/ds-utilities";
|
|
3
4
|
import { useFade } from "./useFade";
|
|
4
5
|
import { DSFadePropTypes } from "./react-desc-prop-types";
|
|
@@ -9,12 +10,13 @@ const DSFade = (props) => {
|
|
|
9
10
|
globalAttributes,
|
|
10
11
|
xstyledProps
|
|
11
12
|
} = useFade(props);
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsx(StyledFade, {
|
|
13
14
|
"data-test-id": "ds-transition-fade",
|
|
14
15
|
show,
|
|
15
16
|
...globalAttributes,
|
|
16
|
-
...xstyledProps
|
|
17
|
-
|
|
17
|
+
...xstyledProps,
|
|
18
|
+
children
|
|
19
|
+
});
|
|
18
20
|
};
|
|
19
21
|
DSFade.propTypes = DSFadePropTypes;
|
|
20
22
|
DSFade.displayName = "DSFade";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/DSFade.tsx"],
|
|
4
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;\nDSFade.displayName = 'DSFade';\nexport const DSFadeWithSchema = describe(DSFade);\nDSFadeWithSchema.propTypes = DSFadePropTypes;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,uBAAgC;AACzC,SAAS,kBAAkB;AAEpB,MAAM,SAA6C,CAAC,UAAU;AACnE,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM,SAAS;AAAA,IACnC;AAAA,IACA;AAAA,EACF,IAAI,QAAQ,KAAK;AAEjB,SACE,oBAAC;AAAA,IAAW,gBAAa;AAAA,IAAqB;AAAA,IAAa,GAAG;AAAA,IAAmB,GAAG;AAAA,IACjF;AAAA,GACH;AAEJ;AAEA,OAAO,YAAY;AACnB,OAAO,cAAc;AACd,MAAM,mBAAmB,SAAS,MAAM;AAC/C,iBAAiB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/index.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSFade';\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/react-desc-prop-types.tsx"],
|
|
4
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;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAWA,MAAM,kBAAkB;AAAA,EAC7B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,KAAK,YAAY,0CAA0C,EAAE;AAC/E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/styled.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, space, sizing, layout } from '@elliemae/ds-system';\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;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,OAAO,QAAQ,cAAc;AAC9C,SAAS,YAAY,mBAAmB;AAEjC,MAAM,aAAa,OAAO,OAAO,EAAE,MAAM,YAAY,MAAM,YAAY,QAAQ,CAAC;AAAA;AAAA,aAI1E,CAAC,EAAE,KAAK,MAAO,OAAO,IAAI;AAAA;AAAA;AAAA,IAGnC;AAAA,IACA;AAAA,IACA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/theming.ts"],
|
|
4
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;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,aAAa;AAEnB,MAAM,cAAc;AAAA,EACzB,SAAS;AACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/fade/useFade.ts"],
|
|
4
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;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,wBAAwB,oBAAoB,sCAAsC;AAC3F,SAAkB,uBAAuB;AAElC,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
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './fade';\nexport * from './collapse';\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-transition",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Tooltip",
|
|
6
6
|
"files": [
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"indent": 4
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@elliemae/ds-system": "3.4.
|
|
39
|
-
"@elliemae/ds-utilities": "3.4.
|
|
38
|
+
"@elliemae/ds-system": "3.4.3",
|
|
39
|
+
"@elliemae/ds-utilities": "3.4.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"react": "^17.0.2",
|