@elliemae/ds-transition 3.41.2-rc.0 → 3.42.0-rc.0

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.
Files changed (44) hide show
  1. package/dist/cjs/collapse/DSCollapse.js +1 -1
  2. package/dist/cjs/collapse/DSCollapse.js.map +2 -2
  3. package/dist/cjs/collapse/index.js +9 -2
  4. package/dist/cjs/collapse/index.js.map +2 -2
  5. package/dist/cjs/collapse/react-desc-prop-types.js +2 -0
  6. package/dist/cjs/collapse/react-desc-prop-types.js.map +2 -2
  7. package/dist/cjs/collapse/styled.js.map +2 -2
  8. package/dist/cjs/fade/DSFade.js +1 -1
  9. package/dist/cjs/fade/DSFade.js.map +2 -2
  10. package/dist/cjs/fade/index.js +9 -2
  11. package/dist/cjs/fade/index.js.map +2 -2
  12. package/dist/cjs/fade/react-desc-prop-types.js +5 -1
  13. package/dist/cjs/fade/react-desc-prop-types.js.map +2 -2
  14. package/dist/cjs/typescript-testing/typescript-collapse-valid.js +79 -0
  15. package/dist/cjs/typescript-testing/typescript-collapse-valid.js.map +7 -0
  16. package/dist/cjs/typescript-testing/typescript-fade-valid.js +68 -0
  17. package/dist/cjs/typescript-testing/typescript-fade-valid.js.map +7 -0
  18. package/dist/esm/collapse/DSCollapse.js +2 -2
  19. package/dist/esm/collapse/DSCollapse.js.map +2 -2
  20. package/dist/esm/collapse/index.js +5 -1
  21. package/dist/esm/collapse/index.js.map +2 -2
  22. package/dist/esm/collapse/react-desc-prop-types.js +2 -0
  23. package/dist/esm/collapse/react-desc-prop-types.js.map +2 -2
  24. package/dist/esm/collapse/styled.js.map +2 -2
  25. package/dist/esm/fade/DSFade.js +2 -2
  26. package/dist/esm/fade/DSFade.js.map +2 -2
  27. package/dist/esm/fade/index.js +5 -1
  28. package/dist/esm/fade/index.js.map +2 -2
  29. package/dist/esm/fade/react-desc-prop-types.js +5 -1
  30. package/dist/esm/fade/react-desc-prop-types.js.map +2 -2
  31. package/dist/esm/typescript-testing/typescript-collapse-valid.js +56 -0
  32. package/dist/esm/typescript-testing/typescript-collapse-valid.js.map +7 -0
  33. package/dist/esm/typescript-testing/typescript-fade-valid.js +45 -0
  34. package/dist/esm/typescript-testing/typescript-fade-valid.js.map +7 -0
  35. package/dist/types/collapse/DSCollapse.d.ts +3 -2
  36. package/dist/types/collapse/index.d.ts +2 -1
  37. package/dist/types/collapse/react-desc-prop-types.d.ts +13 -7
  38. package/dist/types/collapse/styled.d.ts +4 -1
  39. package/dist/types/fade/DSFade.d.ts +3 -2
  40. package/dist/types/fade/index.d.ts +2 -1
  41. package/dist/types/fade/react-desc-prop-types.d.ts +12 -5
  42. package/dist/types/typescript-testing/typescript-collapse-valid.d.ts +1 -0
  43. package/dist/types/typescript-testing/typescript-fade-valid.d.ts +1 -0
  44. package/package.json +5 -5
@@ -79,5 +79,5 @@ const DSCollapse = (props) => {
79
79
  };
80
80
  DSCollapse.displayName = "DSCollapse";
81
81
  const DSCollapseWithSchema = (0, import_ds_props_helpers.describe)(DSCollapse);
82
- DSCollapseWithSchema.propTypes = import_react_desc_prop_types.DSCollapsePropTypes;
82
+ DSCollapseWithSchema.propTypes = import_react_desc_prop_types.DSCollapsePropTypesSchema;
83
83
  //# sourceMappingURL=DSCollapse.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/collapse/DSCollapse.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useRef } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useCollapse } from './useCollapse.js';\nimport type { DSCollapseT } from './react-desc-prop-types.js';\nimport { DSCollapsePropTypes } from './react-desc-prop-types.js';\nimport { StyledCollapse, StyledChildrenWrapper } from './styled.js';\nimport { useOnElementResize } from './useOnElementResize.js';\n\nexport const DSCollapse: React.ComponentType<DSCollapseT.Props> = (props) => {\n const {\n propsWithDefault,\n propsWithDefault: { show, orientation, collapsedSize, children },\n globalAttributes,\n xstyledProps,\n } = useCollapse(props);\n\n const getOwnerProps = React.useCallback(() => propsWithDefault, [propsWithDefault]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledChildrenWrapper\n innerRef={ref}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n orientation={orientation}\n >\n {children}\n </StyledChildrenWrapper>\n </StyledCollapse>\n );\n};\n\nDSCollapse.displayName = 'DSCollapse';\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;ADoCjB;AApCN,mBAA8B;AAC9B,8BAAyB;AACzB,yBAA4B;AAE5B,mCAAoC;AACpC,oBAAsD;AACtD,gCAAmC;AAE5B,MAAM,aAAqD,CAAC,UAAU;AAC3E,QAAM;AAAA,IACJ;AAAA,IACA,kBAAkB,EAAE,MAAM,aAAa,eAAe,SAAS;AAAA,IAC/D;AAAA,IACA;AAAA,EACF,QAAI,gCAAY,KAAK;AAErB,QAAM,gBAAgB,aAAAA,QAAM,YAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAClF,QAAM,yBAAyB,aAAAA,QAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,QAAM,UAAM,qBAAuB,IAAI;AAEvC,QAAM,EAAE,OAAO,eAAe,QAAQ,eAAe,QAAI,8CAAmB,GAAG;AAE/E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA,UAEC;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;AAEA,WAAW,cAAc;AAClB,MAAM,2BAAuB,kCAAS,UAAU;AACvD,qBAAqB,YAAY;",
4
+ "sourcesContent": ["import React, { useRef } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useCollapse } from './useCollapse.js';\nimport type { DSCollapseT } from './react-desc-prop-types.js';\nimport { DSCollapsePropTypesSchema } from './react-desc-prop-types.js';\nimport { StyledCollapse, StyledChildrenWrapper } from './styled.js';\nimport { useOnElementResize } from './useOnElementResize.js';\n\nconst DSCollapse: React.ComponentType<DSCollapseT.Props> = (props) => {\n const {\n propsWithDefault,\n propsWithDefault: { show, orientation, collapsedSize, children },\n globalAttributes,\n xstyledProps,\n } = useCollapse(props);\n\n const getOwnerProps = React.useCallback(() => propsWithDefault, [propsWithDefault]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledChildrenWrapper\n innerRef={ref}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n orientation={orientation}\n >\n {children}\n </StyledChildrenWrapper>\n </StyledCollapse>\n );\n};\n\nDSCollapse.displayName = 'DSCollapse';\nconst DSCollapseWithSchema = describe(DSCollapse);\nDSCollapseWithSchema.propTypes = DSCollapsePropTypesSchema;\n\nexport { DSCollapse, DSCollapseWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoCjB;AApCN,mBAA8B;AAC9B,8BAAyB;AACzB,yBAA4B;AAE5B,mCAA0C;AAC1C,oBAAsD;AACtD,gCAAmC;AAEnC,MAAM,aAAqD,CAAC,UAAU;AACpE,QAAM;AAAA,IACJ;AAAA,IACA,kBAAkB,EAAE,MAAM,aAAa,eAAe,SAAS;AAAA,IAC/D;AAAA,IACA;AAAA,EACF,QAAI,gCAAY,KAAK;AAErB,QAAM,gBAAgB,aAAAA,QAAM,YAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAClF,QAAM,yBAAyB,aAAAA,QAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,QAAM,UAAM,qBAAuB,IAAI;AAEvC,QAAM,EAAE,OAAO,eAAe,QAAQ,eAAe,QAAI,8CAAmB,GAAG;AAE/E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA,UAEC;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;AAEA,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU;AAChD,qBAAqB,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
8
12
  var __copyProps = (to, from, except, desc) => {
9
13
  if (from && typeof from === "object" || typeof from === "function") {
10
14
  for (let key of __getOwnPropNames(from))
@@ -13,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
13
17
  }
14
18
  return to;
15
19
  };
16
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
21
  // If the importer is in node compatibility mode or this is not an ESM
19
22
  // file that has been converted to a CommonJS file using a Babel-
@@ -24,7 +27,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
27
  ));
25
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
29
  var collapse_exports = {};
30
+ __export(collapse_exports, {
31
+ DSCollapse: () => import_DSCollapse.DSCollapse,
32
+ DSCollapseWithSchema: () => import_DSCollapse.DSCollapseWithSchema
33
+ });
27
34
  module.exports = __toCommonJS(collapse_exports);
28
35
  var React = __toESM(require("react"));
29
- __reExport(collapse_exports, require("./DSCollapse.js"), module.exports);
36
+ var import_DSCollapse = require("./DSCollapse.js");
30
37
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/collapse/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './DSCollapse.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAAc,4BAAd;",
4
+ "sourcesContent": ["export { DSCollapse, DSCollapseWithSchema } from './DSCollapse.js';\nexport type { DSCollapseT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAiD;",
6
6
  "names": []
7
7
  }
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  var react_desc_prop_types_exports = {};
30
30
  __export(react_desc_prop_types_exports, {
31
31
  DSCollapsePropTypes: () => DSCollapsePropTypes,
32
+ DSCollapsePropTypesSchema: () => DSCollapsePropTypesSchema,
32
33
  defaultProps: () => defaultProps
33
34
  });
34
35
  module.exports = __toCommonJS(react_desc_prop_types_exports);
@@ -45,4 +46,5 @@ const DSCollapsePropTypes = {
45
46
  orientation: import_ds_props_helpers.PropTypes.oneOf(["horizontal", "vertical"]).description("Whether this element should slide from left to right or from top to bottom").defaultValue("horizontal"),
46
47
  collapsedSize: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.string]).description("Size when collapsed").defaultValue(0)
47
48
  };
49
+ const DSCollapsePropTypesSchema = DSCollapsePropTypes;
48
50
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/collapse/react-desc-prop-types.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { 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;ADCvB,8BAAuE;AAahE,MAAM,eAA2C;AAAA,EACtD,aAAa;AAAA,EACb,eAAe;AACjB;AAEO,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,kCAAU,KAAK,YAAY,0CAA0C,EAAE;AAAA,EAC7E,aAAa,kCAAU,MAAM,CAAC,cAAc,UAAU,CAAC,EACpD,YAAY,4EAA4E,EACxF,aAAa,YAAY;AAAA,EAC5B,eAAe,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EACpE,YAAY,qBAAqB,EACjC,aAAa,CAAC;AACnB;",
4
+ "sourcesContent": ["import type { GlobalAttributesT, XstyledProps, ValidationMap, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSCollapseT {\n interface RequiredProps {\n show: boolean;\n }\n\n export interface DefaultProps {\n orientation: 'horizontal' | 'vertical';\n collapsedSize: number | string;\n }\n\n export interface OptionalProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: Partial<DSCollapseT.Props> = {\n orientation: 'horizontal',\n collapsedSize: '0px',\n};\n\nexport const DSCollapsePropTypes: DSPropTypesSchema<DSCollapseT.Props> = {\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};\n\nexport const DSCollapsePropTypesSchema = DSCollapsePropTypes as unknown as ValidationMap<DSCollapseT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAuE;AA6BhE,MAAM,eAA2C;AAAA,EACtD,aAAa;AAAA,EACb,eAAe;AACjB;AAEO,MAAM,sBAA4D;AAAA,EACvE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,kCAAU,KAAK,YAAY,0CAA0C,EAAE;AAAA,EAC7E,aAAa,kCAAU,MAAM,CAAC,cAAc,UAAU,CAAC,EACpD,YAAY,4EAA4E,EACxF,aAAa,YAAY;AAAA,EAC5B,eAAe,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EACpE,YAAY,qBAAqB,EACjC,aAAa,CAAC;AACnB;AAEO,MAAM,4BAA4B;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/collapse/styled.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport type { DSCollapseT } from './react-desc-prop-types.js';\nimport { DSCollapseName, DSCollapseSlots } from './theming.js';\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 ${xStyledCommonProps}\n`;\n\nexport const StyledChildrenWrapper = styled('div', {\n name: DSCollapseName,\n slot: DSCollapseSlots.CHILDREN_WRAPPER,\n})<StyledCollapseProps>`\n width: fit-content;\n height: fit-content;\n ${(props) => {\n if (props.orientation === 'vertical') return `width: 100%;`;\n return `width: fit-content;`;\n }}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA2C;AAE3C,qBAAgD;AAOhD,MAAM,8BAA8B,CAAC,EAAE,YAAY,MACjD,gBAAgB,eAAe,UAAU;AAE3C,MAAM,kBAAkB,CAAC,EAAE,MAAM,eAAe,cAAc,MAA2B;AACvF,MAAI,CAAC,KAAM,QAAO,OAAO,kBAAkB,WAAW,GAAG,aAAa,OAAO;AAC7E,SAAO,gBAAgB,GAAG,aAAa,OAAO;AAChD;AAEA,MAAM,mBAAmB,CAAC,EAAE,MAAM,eAAe,eAAe,MAA2B;AACzF,MAAI,CAAC,KAAM,QAAO,OAAO,kBAAkB,WAAW,GAAG,aAAa,OAAO;AAC7E,SAAO,iBAAiB,GAAG,cAAc,OAAO;AAClD;AAEO,MAAM,qBAAiB,yBAAO,OAAO;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,+BAAgB;AACxB,CAAC;AAAA,gBACe,2BAA2B;AAAA,IACvC,CAAC,UAAU;AACX,MAAI,MAAM,gBAAgB,aAAc,QAAO,UAAU,gBAAgB,KAAK,CAAC;AAC/E,SAAO,WAAW,iBAAiB,KAAK,CAAC;AAC3C,CAAC;AAAA;AAAA,IAEC,mCAAkB;AAAA;AAGf,MAAM,4BAAwB,yBAAO,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,+BAAgB;AACxB,CAAC;AAAA;AAAA;AAAA,IAGG,CAAC,UAAU;AACX,MAAI,MAAM,gBAAgB,WAAY,QAAO;AAC7C,SAAO;AACT,CAAC;AAAA;",
4
+ "sourcesContent": ["import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport type { DSCollapseT } from './react-desc-prop-types.js';\nimport { DSCollapseName, DSCollapseSlots } from './theming.js';\n\ninterface StyledCollapseProps extends DSCollapseT.Props {\n expandedWidth: number;\n expandedHeight: number;\n}\n\ninterface StyledChildrenCollapseProps {\n orientation?: 'horizontal' | 'vertical';\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 ${xStyledCommonProps}\n`;\n\nexport const StyledChildrenWrapper = styled('div', {\n name: DSCollapseName,\n slot: DSCollapseSlots.CHILDREN_WRAPPER,\n})<StyledChildrenCollapseProps>`\n width: fit-content;\n height: fit-content;\n ${(props) => {\n if (props.orientation === 'vertical') return `width: 100%;`;\n return `width: fit-content;`;\n }}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA2C;AAE3C,qBAAgD;AAWhD,MAAM,8BAA8B,CAAC,EAAE,YAAY,MACjD,gBAAgB,eAAe,UAAU;AAE3C,MAAM,kBAAkB,CAAC,EAAE,MAAM,eAAe,cAAc,MAA2B;AACvF,MAAI,CAAC,KAAM,QAAO,OAAO,kBAAkB,WAAW,GAAG,aAAa,OAAO;AAC7E,SAAO,gBAAgB,GAAG,aAAa,OAAO;AAChD;AAEA,MAAM,mBAAmB,CAAC,EAAE,MAAM,eAAe,eAAe,MAA2B;AACzF,MAAI,CAAC,KAAM,QAAO,OAAO,kBAAkB,WAAW,GAAG,aAAa,OAAO;AAC7E,SAAO,iBAAiB,GAAG,cAAc,OAAO;AAClD;AAEO,MAAM,qBAAiB,yBAAO,OAAO;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,+BAAgB;AACxB,CAAC;AAAA,gBACe,2BAA2B;AAAA,IACvC,CAAC,UAAU;AACX,MAAI,MAAM,gBAAgB,aAAc,QAAO,UAAU,gBAAgB,KAAK,CAAC;AAC/E,SAAO,WAAW,iBAAiB,KAAK,CAAC;AAC3C,CAAC;AAAA;AAAA,IAEC,mCAAkB;AAAA;AAGf,MAAM,4BAAwB,yBAAO,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,+BAAgB;AACxB,CAAC;AAAA;AAAA;AAAA,IAGG,CAAC,UAAU;AACX,MAAI,MAAM,gBAAgB,WAAY,QAAO;AAC7C,SAAO;AACT,CAAC;AAAA;",
6
6
  "names": []
7
7
  }
@@ -48,5 +48,5 @@ const DSFade = (props) => {
48
48
  };
49
49
  DSFade.displayName = "DSFade";
50
50
  const DSFadeWithSchema = (0, import_ds_props_helpers.describe)(DSFade);
51
- DSFadeWithSchema.propTypes = import_react_desc_prop_types.DSFadePropTypes;
51
+ DSFadeWithSchema.propTypes = import_react_desc_prop_types.DSFadePropTypesSchema;
52
52
  //# sourceMappingURL=DSFade.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/fade/DSFade.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { describe } from '@elliemae/ds-props-helpers';\nimport { useFade } from './useFade.js';\nimport type { DSFadeT } from './react-desc-prop-types.js';\nimport { DSFadePropTypes } from './react-desc-prop-types.js';\nimport { StyledFade } from './styled.js';\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.displayName = 'DSFade';\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;ADcnB;AAdJ,8BAAyB;AACzB,qBAAwB;AAExB,mCAAgC;AAChC,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,4BAAW,gBAAa,sBAAqB,MAAa,GAAG,kBAAmB,GAAG,cACjF,UACH;AAEJ;AAEA,OAAO,cAAc;AACd,MAAM,uBAAmB,kCAAS,MAAM;AAC/C,iBAAiB,YAAY;",
4
+ "sourcesContent": ["import { describe } from '@elliemae/ds-props-helpers';\nimport { useFade } from './useFade.js';\nimport type { DSFadeT } from './react-desc-prop-types.js';\nimport { DSFadePropTypesSchema } from './react-desc-prop-types.js';\nimport { StyledFade } from './styled.js';\n\nconst 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.displayName = 'DSFade';\nconst DSFadeWithSchema = describe(DSFade);\nDSFadeWithSchema.propTypes = DSFadePropTypesSchema;\n\nexport { DSFade, DSFadeWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcnB;AAdJ,8BAAyB;AACzB,qBAAwB;AAExB,mCAAsC;AACtC,oBAA2B;AAE3B,MAAM,SAA6C,CAAC,UAAU;AAC5D,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM,SAAS;AAAA,IACnC;AAAA,IACA;AAAA,EACF,QAAI,wBAAQ,KAAK;AAEjB,SACE,4CAAC,4BAAW,gBAAa,sBAAqB,MAAa,GAAG,kBAAmB,GAAG,cACjF,UACH;AAEJ;AAEA,OAAO,cAAc;AACrB,MAAM,uBAAmB,kCAAS,MAAM;AACxC,iBAAiB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
8
12
  var __copyProps = (to, from, except, desc) => {
9
13
  if (from && typeof from === "object" || typeof from === "function") {
10
14
  for (let key of __getOwnPropNames(from))
@@ -13,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
13
17
  }
14
18
  return to;
15
19
  };
16
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
21
  // If the importer is in node compatibility mode or this is not an ESM
19
22
  // file that has been converted to a CommonJS file using a Babel-
@@ -24,7 +27,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
27
  ));
25
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
29
  var fade_exports = {};
30
+ __export(fade_exports, {
31
+ DSFade: () => import_DSFade.DSFade,
32
+ DSFadeWithSchema: () => import_DSFade.DSFadeWithSchema
33
+ });
27
34
  module.exports = __toCommonJS(fade_exports);
28
35
  var React = __toESM(require("react"));
29
- __reExport(fade_exports, require("./DSFade.js"), module.exports);
36
+ var import_DSFade = require("./DSFade.js");
30
37
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/fade/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './DSFade.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAc,wBAAd;",
4
+ "sourcesContent": ["export { DSFade, DSFadeWithSchema } from './DSFade.js';\nexport type { DSFadeT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAyC;",
6
6
  "names": []
7
7
  }
@@ -28,14 +28,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var react_desc_prop_types_exports = {};
30
30
  __export(react_desc_prop_types_exports, {
31
- DSFadePropTypes: () => DSFadePropTypes
31
+ DSFadePropTypes: () => DSFadePropTypes,
32
+ DSFadePropTypesSchema: () => DSFadePropTypesSchema,
33
+ defaultProps: () => defaultProps
32
34
  });
33
35
  module.exports = __toCommonJS(react_desc_prop_types_exports);
34
36
  var React = __toESM(require("react"));
35
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
+ const defaultProps = {};
36
39
  const DSFadePropTypes = {
37
40
  ...import_ds_props_helpers.globalAttributesPropTypes,
38
41
  ...import_ds_props_helpers.xstyledPropTypes,
39
42
  show: import_ds_props_helpers.PropTypes.bool.description("Whether to show the inner element or not").isRequired
40
43
  };
44
+ const DSFadePropTypesSchema = DSFadePropTypes;
41
45
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/fade/react-desc-prop-types.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { 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;ADCvB,8BAAuE;AAWhE,MAAM,kBAAkB;AAAA,EAC7B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,kCAAU,KAAK,YAAY,0CAA0C,EAAE;AAC/E;",
4
+ "sourcesContent": ["import type { GlobalAttributesT, XstyledProps, ValidationMap, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSFadeT {\n interface RequiredProps {\n show: boolean;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSFadeT.DefaultProps = {};\n\nexport const DSFadePropTypes: DSPropTypesSchema<DSFadeT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n show: PropTypes.bool.description('Whether to show the inner element or not').isRequired,\n};\n\nexport const DSFadePropTypesSchema = DSFadePropTypes as unknown as ValidationMap<DSFadeT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAuE;AA0BhE,MAAM,eAAqC,CAAC;AAE5C,MAAM,kBAAoD;AAAA,EAC/D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,kCAAU,KAAK,YAAY,0CAA0C,EAAE;AAC/E;AAEO,MAAM,wBAAwB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var React = __toESM(require("react"));
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import__ = require("../index.js");
27
+ const testRequiredProps = {
28
+ show: true
29
+ };
30
+ const testOptionalProps = {};
31
+ const testPartialDefaults = {
32
+ orientation: "vertical"
33
+ };
34
+ const testProps = {
35
+ ...testRequiredProps,
36
+ ...testOptionalProps,
37
+ ...testPartialDefaults
38
+ };
39
+ const testPropsAsSyntax = {
40
+ ...testRequiredProps,
41
+ ...testOptionalProps,
42
+ ...testPartialDefaults
43
+ };
44
+ const testCompleteDefaults = {
45
+ collapsedSize: 0,
46
+ orientation: "horizontal"
47
+ };
48
+ const testInternalProps = {
49
+ ...testRequiredProps,
50
+ ...testOptionalProps,
51
+ ...testCompleteDefaults
52
+ };
53
+ const testInternalPropsAsSyntax = {
54
+ ...testRequiredProps,
55
+ ...testOptionalProps,
56
+ ...testCompleteDefaults
57
+ };
58
+ const testExplicitDefinition = {
59
+ show: true,
60
+ collapsedSize: 0,
61
+ orientation: "horizontal"
62
+ };
63
+ const testInferedTypeCompatibility = {
64
+ show: true,
65
+ collapsedSize: 0,
66
+ orientation: "horizontal"
67
+ };
68
+ const testDefinitionAsConst = {
69
+ show: true,
70
+ collapsedSize: 0,
71
+ orientation: "horizontal"
72
+ };
73
+ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCollapse, { ...testExplicitDefinition }),
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCollapse, { ...testInferedTypeCompatibility }),
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCollapse, { ...testDefinitionAsConst }),
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCollapse, { show: true, collapsedSize: 0, orientation: "vertical" })
78
+ ] });
79
+ //# sourceMappingURL=typescript-collapse-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-collapse-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSCollapse } from '../index.js';\nimport type { DSCollapseT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSCollapseT.Props;\ntype ComponentPropsInternals = DSCollapseT.InternalProps;\ntype ComponentPropsDefaultProps = DSCollapseT.DefaultProps;\ntype ComponentPropsOptionalProps = DSCollapseT.OptionalProps;\ntype ComponentPropsRequiredProps = DSCollapseT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n show: true,\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n orientation: 'vertical',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n collapsedSize: 0,\n orientation: 'horizontal',\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n show: true,\n collapsedSize: 0,\n orientation: 'horizontal',\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n show: true,\n collapsedSize: 0,\n orientation: 'horizontal',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n show: true,\n collapsedSize: 0,\n orientation: 'horizontal',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSCollapse {...testExplicitDefinition} />\n <DSCollapse {...testInferedTypeCompatibility} />\n <DSCollapse {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSCollapse show collapsedSize={0} orientation=\"vertical\" />\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC0ErB;AAzEF,eAA2B;AAU3B,MAAM,oBAAiD;AAAA,EACrD,MAAM;AACR;AAEA,MAAM,oBAAiD,CAAC;AAIxD,MAAM,sBAA2D;AAAA,EAC/D,aAAa;AACf;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,eAAe;AAAA,EACf,aAAa;AACf;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,MAAM;AAAA,EACN,eAAe;AAAA,EACf,aAAa;AACf;AAGA,MAAM,+BAA+B;AAAA,EACnC,MAAM;AAAA,EACN,eAAe;AAAA,EACf,aAAa;AACf;AAEA,MAAM,wBAAwB;AAAA,EAC5B,MAAM;AAAA,EACN,eAAe;AAAA,EACf,aAAa;AACf;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,uBAAY,GAAG,wBAAwB;AAAA,EACxC,4CAAC,uBAAY,GAAG,8BAA8B;AAAA,EAC9C,4CAAC,uBAAY,GAAG,uBAAuB;AAAA,EAEvC,4CAAC,uBAAW,MAAI,MAAC,eAAe,GAAG,aAAY,YAAW;AAAA,GAC5D;",
6
+ "names": []
7
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var React = __toESM(require("react"));
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import__ = require("../index.js");
27
+ const testRequiredProps = {
28
+ show: true
29
+ };
30
+ const testOptionalProps = {};
31
+ const testPartialDefaults = {};
32
+ const testProps = {
33
+ ...testRequiredProps,
34
+ ...testOptionalProps,
35
+ ...testPartialDefaults
36
+ };
37
+ const testPropsAsSyntax = {
38
+ ...testRequiredProps,
39
+ ...testOptionalProps,
40
+ ...testPartialDefaults
41
+ };
42
+ const testCompleteDefaults = {};
43
+ const testInternalProps = {
44
+ ...testRequiredProps,
45
+ ...testOptionalProps,
46
+ ...testCompleteDefaults
47
+ };
48
+ const testInternalPropsAsSyntax = {
49
+ ...testRequiredProps,
50
+ ...testOptionalProps,
51
+ ...testCompleteDefaults
52
+ };
53
+ const testExplicitDefinition = {
54
+ show: true
55
+ };
56
+ const testInferedTypeCompatibility = {
57
+ show: true
58
+ };
59
+ const testDefinitionAsConst = {
60
+ show: true
61
+ };
62
+ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFade, { ...testExplicitDefinition }),
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFade, { ...testInferedTypeCompatibility }),
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFade, { ...testDefinitionAsConst }),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFade, { show: true })
67
+ ] });
68
+ //# sourceMappingURL=typescript-fade-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-fade-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSFade } from '../index.js';\nimport type { DSFadeT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSFadeT.Props;\ntype ComponentPropsInternals = DSFadeT.InternalProps;\ntype ComponentPropsDefaultProps = DSFadeT.DefaultProps;\ntype ComponentPropsOptionalProps = DSFadeT.OptionalProps;\ntype ComponentPropsRequiredProps = DSFadeT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n show: true,\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n show: true,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n show: true,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n show: true,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSFade {...testExplicitDefinition} />\n <DSFade {...testInferedTypeCompatibility} />\n <DSFade {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSFade show />\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC+DrB;AA9DF,eAAuB;AAUvB,MAAM,oBAAiD;AAAA,EACrD,MAAM;AACR;AAEA,MAAM,oBAAiD,CAAC;AAIxD,MAAM,sBAA2D,CAAC;AAElE,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D,CAAC;AAEpE,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,MAAM;AACR;AAGA,MAAM,+BAA+B;AAAA,EACnC,MAAM;AACR;AAEA,MAAM,wBAAwB;AAAA,EAC5B,MAAM;AACR;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,mBAAQ,GAAG,wBAAwB;AAAA,EACpC,4CAAC,mBAAQ,GAAG,8BAA8B;AAAA,EAC1C,4CAAC,mBAAQ,GAAG,uBAAuB;AAAA,EAEnC,4CAAC,mBAAO,MAAI,MAAC;AAAA,GACf;",
6
+ "names": []
7
+ }
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
3
3
  import React2, { useRef } from "react";
4
4
  import { describe } from "@elliemae/ds-props-helpers";
5
5
  import { useCollapse } from "./useCollapse.js";
6
- import { DSCollapsePropTypes } from "./react-desc-prop-types.js";
6
+ import { DSCollapsePropTypesSchema } from "./react-desc-prop-types.js";
7
7
  import { StyledCollapse, StyledChildrenWrapper } from "./styled.js";
8
8
  import { useOnElementResize } from "./useOnElementResize.js";
9
9
  const DSCollapse = (props) => {
@@ -45,7 +45,7 @@ const DSCollapse = (props) => {
45
45
  };
46
46
  DSCollapse.displayName = "DSCollapse";
47
47
  const DSCollapseWithSchema = describe(DSCollapse);
48
- DSCollapseWithSchema.propTypes = DSCollapsePropTypes;
48
+ DSCollapseWithSchema.propTypes = DSCollapsePropTypesSchema;
49
49
  export {
50
50
  DSCollapse,
51
51
  DSCollapseWithSchema
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/DSCollapse.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useCollapse } from './useCollapse.js';\nimport type { DSCollapseT } from './react-desc-prop-types.js';\nimport { DSCollapsePropTypes } from './react-desc-prop-types.js';\nimport { StyledCollapse, StyledChildrenWrapper } from './styled.js';\nimport { useOnElementResize } from './useOnElementResize.js';\n\nexport const DSCollapse: React.ComponentType<DSCollapseT.Props> = (props) => {\n const {\n propsWithDefault,\n propsWithDefault: { show, orientation, collapsedSize, children },\n globalAttributes,\n xstyledProps,\n } = useCollapse(props);\n\n const getOwnerProps = React.useCallback(() => propsWithDefault, [propsWithDefault]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledChildrenWrapper\n innerRef={ref}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n orientation={orientation}\n >\n {children}\n </StyledChildrenWrapper>\n </StyledCollapse>\n );\n};\n\nDSCollapse.displayName = 'DSCollapse';\nexport const DSCollapseWithSchema = describe(DSCollapse);\nDSCollapseWithSchema.propTypes = DSCollapsePropTypes;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACoCjB;AApCN,OAAOA,UAAS,cAAc;AAC9B,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAE5B,SAAS,2BAA2B;AACpC,SAAS,gBAAgB,6BAA6B;AACtD,SAAS,0BAA0B;AAE5B,MAAM,aAAqD,CAAC,UAAU;AAC3E,QAAM;AAAA,IACJ;AAAA,IACA,kBAAkB,EAAE,MAAM,aAAa,eAAe,SAAS;AAAA,IAC/D;AAAA,IACA;AAAA,EACF,IAAI,YAAY,KAAK;AAErB,QAAM,gBAAgBA,OAAM,YAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAClF,QAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,QAAM,MAAM,OAAuB,IAAI;AAEvC,QAAM,EAAE,OAAO,eAAe,QAAQ,eAAe,IAAI,mBAAmB,GAAG;AAE/E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA,UAEC;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;AAEA,WAAW,cAAc;AAClB,MAAM,uBAAuB,SAAS,UAAU;AACvD,qBAAqB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useCollapse } from './useCollapse.js';\nimport type { DSCollapseT } from './react-desc-prop-types.js';\nimport { DSCollapsePropTypesSchema } from './react-desc-prop-types.js';\nimport { StyledCollapse, StyledChildrenWrapper } from './styled.js';\nimport { useOnElementResize } from './useOnElementResize.js';\n\nconst DSCollapse: React.ComponentType<DSCollapseT.Props> = (props) => {\n const {\n propsWithDefault,\n propsWithDefault: { show, orientation, collapsedSize, children },\n globalAttributes,\n xstyledProps,\n } = useCollapse(props);\n\n const getOwnerProps = React.useCallback(() => propsWithDefault, [propsWithDefault]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledChildrenWrapper\n innerRef={ref}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n orientation={orientation}\n >\n {children}\n </StyledChildrenWrapper>\n </StyledCollapse>\n );\n};\n\nDSCollapse.displayName = 'DSCollapse';\nconst DSCollapseWithSchema = describe(DSCollapse);\nDSCollapseWithSchema.propTypes = DSCollapsePropTypesSchema;\n\nexport { DSCollapse, DSCollapseWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACoCjB;AApCN,OAAOA,UAAS,cAAc;AAC9B,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAE5B,SAAS,iCAAiC;AAC1C,SAAS,gBAAgB,6BAA6B;AACtD,SAAS,0BAA0B;AAEnC,MAAM,aAAqD,CAAC,UAAU;AACpE,QAAM;AAAA,IACJ;AAAA,IACA,kBAAkB,EAAE,MAAM,aAAa,eAAe,SAAS;AAAA,IAC/D;AAAA,IACA;AAAA,EACF,IAAI,YAAY,KAAK;AAErB,QAAM,gBAAgBA,OAAM,YAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAClF,QAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,QAAM,MAAM,OAAuB,IAAI;AAEvC,QAAM,EAAE,OAAO,eAAe,QAAQ,eAAe,IAAI,mBAAmB,GAAG;AAE/E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA,UAEC;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;AAEA,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAChD,qBAAqB,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,3 +1,7 @@
1
1
  import * as React from "react";
2
- export * from "./DSCollapse.js";
2
+ import { DSCollapse, DSCollapseWithSchema } from "./DSCollapse.js";
3
+ export {
4
+ DSCollapse,
5
+ DSCollapseWithSchema
6
+ };
3
7
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSCollapse, DSCollapseWithSchema } from './DSCollapse.js';\nexport type { DSCollapseT } from './react-desc-prop-types.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,4BAA4B;",
6
6
  "names": []
7
7
  }
@@ -11,8 +11,10 @@ const DSCollapsePropTypes = {
11
11
  orientation: PropTypes.oneOf(["horizontal", "vertical"]).description("Whether this element should slide from left to right or from top to bottom").defaultValue("horizontal"),
12
12
  collapsedSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description("Size when collapsed").defaultValue(0)
13
13
  };
14
+ const DSCollapsePropTypesSchema = DSCollapsePropTypes;
14
15
  export {
15
16
  DSCollapsePropTypes,
17
+ DSCollapsePropTypesSchema,
16
18
  defaultProps
17
19
  };
18
20
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { 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,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AAahE,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;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GlobalAttributesT, XstyledProps, ValidationMap, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSCollapseT {\n interface RequiredProps {\n show: boolean;\n }\n\n export interface DefaultProps {\n orientation: 'horizontal' | 'vertical';\n collapsedSize: number | string;\n }\n\n export interface OptionalProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: Partial<DSCollapseT.Props> = {\n orientation: 'horizontal',\n collapsedSize: '0px',\n};\n\nexport const DSCollapsePropTypes: DSPropTypesSchema<DSCollapseT.Props> = {\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};\n\nexport const DSCollapsePropTypesSchema = DSCollapsePropTypes as unknown as ValidationMap<DSCollapseT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AA6BhE,MAAM,eAA2C;AAAA,EACtD,aAAa;AAAA,EACb,eAAe;AACjB;AAEO,MAAM,sBAA4D;AAAA,EACvE,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;AAEO,MAAM,4BAA4B;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/collapse/styled.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport type { DSCollapseT } from './react-desc-prop-types.js';\nimport { DSCollapseName, DSCollapseSlots } from './theming.js';\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 ${xStyledCommonProps}\n`;\n\nexport const StyledChildrenWrapper = styled('div', {\n name: DSCollapseName,\n slot: DSCollapseSlots.CHILDREN_WRAPPER,\n})<StyledCollapseProps>`\n width: fit-content;\n height: fit-content;\n ${(props) => {\n if (props.orientation === 'vertical') return `width: 100%;`;\n return `width: fit-content;`;\n }}\n`;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,0BAA0B;AAE3C,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,KAAM,QAAO,OAAO,kBAAkB,WAAW,GAAG,aAAa,OAAO;AAC7E,SAAO,gBAAgB,GAAG,aAAa,OAAO;AAChD;AAEA,MAAM,mBAAmB,CAAC,EAAE,MAAM,eAAe,eAAe,MAA2B;AACzF,MAAI,CAAC,KAAM,QAAO,OAAO,kBAAkB,WAAW,GAAG,aAAa,OAAO;AAC7E,SAAO,iBAAiB,GAAG,cAAc,OAAO;AAClD;AAEO,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,gBAAgB;AACxB,CAAC;AAAA,gBACe,2BAA2B;AAAA,IACvC,CAAC,UAAU;AACX,MAAI,MAAM,gBAAgB,aAAc,QAAO,UAAU,gBAAgB,KAAK,CAAC;AAC/E,SAAO,WAAW,iBAAiB,KAAK,CAAC;AAC3C,CAAC;AAAA;AAAA,IAEC,kBAAkB;AAAA;AAGf,MAAM,wBAAwB,OAAO,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,gBAAgB;AACxB,CAAC;AAAA;AAAA;AAAA,IAGG,CAAC,UAAU;AACX,MAAI,MAAM,gBAAgB,WAAY,QAAO;AAC7C,SAAO;AACT,CAAC;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport type { DSCollapseT } from './react-desc-prop-types.js';\nimport { DSCollapseName, DSCollapseSlots } from './theming.js';\n\ninterface StyledCollapseProps extends DSCollapseT.Props {\n expandedWidth: number;\n expandedHeight: number;\n}\n\ninterface StyledChildrenCollapseProps {\n orientation?: 'horizontal' | 'vertical';\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 ${xStyledCommonProps}\n`;\n\nexport const StyledChildrenWrapper = styled('div', {\n name: DSCollapseName,\n slot: DSCollapseSlots.CHILDREN_WRAPPER,\n})<StyledChildrenCollapseProps>`\n width: fit-content;\n height: fit-content;\n ${(props) => {\n if (props.orientation === 'vertical') return `width: 100%;`;\n return `width: fit-content;`;\n }}\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,0BAA0B;AAE3C,SAAS,gBAAgB,uBAAuB;AAWhD,MAAM,8BAA8B,CAAC,EAAE,YAAY,MACjD,gBAAgB,eAAe,UAAU;AAE3C,MAAM,kBAAkB,CAAC,EAAE,MAAM,eAAe,cAAc,MAA2B;AACvF,MAAI,CAAC,KAAM,QAAO,OAAO,kBAAkB,WAAW,GAAG,aAAa,OAAO;AAC7E,SAAO,gBAAgB,GAAG,aAAa,OAAO;AAChD;AAEA,MAAM,mBAAmB,CAAC,EAAE,MAAM,eAAe,eAAe,MAA2B;AACzF,MAAI,CAAC,KAAM,QAAO,OAAO,kBAAkB,WAAW,GAAG,aAAa,OAAO;AAC7E,SAAO,iBAAiB,GAAG,cAAc,OAAO;AAClD;AAEO,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM,gBAAgB;AACxB,CAAC;AAAA,gBACe,2BAA2B;AAAA,IACvC,CAAC,UAAU;AACX,MAAI,MAAM,gBAAgB,aAAc,QAAO,UAAU,gBAAgB,KAAK,CAAC;AAC/E,SAAO,WAAW,iBAAiB,KAAK,CAAC;AAC3C,CAAC;AAAA;AAAA,IAEC,kBAAkB;AAAA;AAGf,MAAM,wBAAwB,OAAO,OAAO;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,gBAAgB;AACxB,CAAC;AAAA;AAAA;AAAA,IAGG,CAAC,UAAU;AACX,MAAI,MAAM,gBAAgB,WAAY,QAAO;AAC7C,SAAO;AACT,CAAC;AAAA;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { describe } from "@elliemae/ds-props-helpers";
4
4
  import { useFade } from "./useFade.js";
5
- import { DSFadePropTypes } from "./react-desc-prop-types.js";
5
+ import { DSFadePropTypesSchema } from "./react-desc-prop-types.js";
6
6
  import { StyledFade } from "./styled.js";
7
7
  const DSFade = (props) => {
8
8
  const {
@@ -14,7 +14,7 @@ const DSFade = (props) => {
14
14
  };
15
15
  DSFade.displayName = "DSFade";
16
16
  const DSFadeWithSchema = describe(DSFade);
17
- DSFadeWithSchema.propTypes = DSFadePropTypes;
17
+ DSFadeWithSchema.propTypes = DSFadePropTypesSchema;
18
18
  export {
19
19
  DSFade,
20
20
  DSFadeWithSchema
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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-props-helpers';\nimport { useFade } from './useFade.js';\nimport type { DSFadeT } from './react-desc-prop-types.js';\nimport { DSFadePropTypes } from './react-desc-prop-types.js';\nimport { StyledFade } from './styled.js';\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.displayName = 'DSFade';\nexport const DSFadeWithSchema = describe(DSFade);\nDSFadeWithSchema.propTypes = DSFadePropTypes;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACcnB;AAdJ,SAAS,gBAAgB;AACzB,SAAS,eAAe;AAExB,SAAS,uBAAuB;AAChC,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,cAAW,gBAAa,sBAAqB,MAAa,GAAG,kBAAmB,GAAG,cACjF,UACH;AAEJ;AAEA,OAAO,cAAc;AACd,MAAM,mBAAmB,SAAS,MAAM;AAC/C,iBAAiB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe } from '@elliemae/ds-props-helpers';\nimport { useFade } from './useFade.js';\nimport type { DSFadeT } from './react-desc-prop-types.js';\nimport { DSFadePropTypesSchema } from './react-desc-prop-types.js';\nimport { StyledFade } from './styled.js';\n\nconst 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.displayName = 'DSFade';\nconst DSFadeWithSchema = describe(DSFade);\nDSFadeWithSchema.propTypes = DSFadePropTypesSchema;\n\nexport { DSFade, DSFadeWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACcnB;AAdJ,SAAS,gBAAgB;AACzB,SAAS,eAAe;AAExB,SAAS,6BAA6B;AACtC,SAAS,kBAAkB;AAE3B,MAAM,SAA6C,CAAC,UAAU;AAC5D,QAAM;AAAA,IACJ,kBAAkB,EAAE,MAAM,SAAS;AAAA,IACnC;AAAA,IACA;AAAA,EACF,IAAI,QAAQ,KAAK;AAEjB,SACE,oBAAC,cAAW,gBAAa,sBAAqB,MAAa,GAAG,kBAAmB,GAAG,cACjF,UACH;AAEJ;AAEA,OAAO,cAAc;AACrB,MAAM,mBAAmB,SAAS,MAAM;AACxC,iBAAiB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,7 @@
1
1
  import * as React from "react";
2
- export * from "./DSFade.js";
2
+ import { DSFade, DSFadeWithSchema } from "./DSFade.js";
3
+ export {
4
+ DSFade,
5
+ DSFadeWithSchema
6
+ };
3
7
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSFade, DSFadeWithSchema } from './DSFade.js';\nexport type { DSFadeT } from './react-desc-prop-types.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,wBAAwB;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,15 @@
1
1
  import * as React from "react";
2
2
  import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-props-helpers";
3
+ const defaultProps = {};
3
4
  const DSFadePropTypes = {
4
5
  ...globalAttributesPropTypes,
5
6
  ...xstyledPropTypes,
6
7
  show: PropTypes.bool.description("Whether to show the inner element or not").isRequired
7
8
  };
9
+ const DSFadePropTypesSchema = DSFadePropTypes;
8
10
  export {
9
- DSFadePropTypes
11
+ DSFadePropTypes,
12
+ DSFadePropTypesSchema,
13
+ defaultProps
10
14
  };
11
15
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { 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,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AAWhE,MAAM,kBAAkB;AAAA,EAC7B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,KAAK,YAAY,0CAA0C,EAAE;AAC/E;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GlobalAttributesT, XstyledProps, ValidationMap, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSFadeT {\n interface RequiredProps {\n show: boolean;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSFadeT.DefaultProps = {};\n\nexport const DSFadePropTypes: DSPropTypesSchema<DSFadeT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n show: PropTypes.bool.description('Whether to show the inner element or not').isRequired,\n};\n\nexport const DSFadePropTypesSchema = DSFadePropTypes as unknown as ValidationMap<DSFadeT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AA0BhE,MAAM,eAAqC,CAAC;AAE5C,MAAM,kBAAoD;AAAA,EAC/D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,KAAK,YAAY,0CAA0C,EAAE;AAC/E;AAEO,MAAM,wBAAwB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,56 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { DSCollapse } from "../index.js";
4
+ const testRequiredProps = {
5
+ show: true
6
+ };
7
+ const testOptionalProps = {};
8
+ const testPartialDefaults = {
9
+ orientation: "vertical"
10
+ };
11
+ const testProps = {
12
+ ...testRequiredProps,
13
+ ...testOptionalProps,
14
+ ...testPartialDefaults
15
+ };
16
+ const testPropsAsSyntax = {
17
+ ...testRequiredProps,
18
+ ...testOptionalProps,
19
+ ...testPartialDefaults
20
+ };
21
+ const testCompleteDefaults = {
22
+ collapsedSize: 0,
23
+ orientation: "horizontal"
24
+ };
25
+ const testInternalProps = {
26
+ ...testRequiredProps,
27
+ ...testOptionalProps,
28
+ ...testCompleteDefaults
29
+ };
30
+ const testInternalPropsAsSyntax = {
31
+ ...testRequiredProps,
32
+ ...testOptionalProps,
33
+ ...testCompleteDefaults
34
+ };
35
+ const testExplicitDefinition = {
36
+ show: true,
37
+ collapsedSize: 0,
38
+ orientation: "horizontal"
39
+ };
40
+ const testInferedTypeCompatibility = {
41
+ show: true,
42
+ collapsedSize: 0,
43
+ orientation: "horizontal"
44
+ };
45
+ const testDefinitionAsConst = {
46
+ show: true,
47
+ collapsedSize: 0,
48
+ orientation: "horizontal"
49
+ };
50
+ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
51
+ /* @__PURE__ */ jsx(DSCollapse, { ...testExplicitDefinition }),
52
+ /* @__PURE__ */ jsx(DSCollapse, { ...testInferedTypeCompatibility }),
53
+ /* @__PURE__ */ jsx(DSCollapse, { ...testDefinitionAsConst }),
54
+ /* @__PURE__ */ jsx(DSCollapse, { show: true, collapsedSize: 0, orientation: "vertical" })
55
+ ] });
56
+ //# sourceMappingURL=typescript-collapse-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-collapse-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSCollapse } from '../index.js';\nimport type { DSCollapseT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSCollapseT.Props;\ntype ComponentPropsInternals = DSCollapseT.InternalProps;\ntype ComponentPropsDefaultProps = DSCollapseT.DefaultProps;\ntype ComponentPropsOptionalProps = DSCollapseT.OptionalProps;\ntype ComponentPropsRequiredProps = DSCollapseT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n show: true,\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n orientation: 'vertical',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n collapsedSize: 0,\n orientation: 'horizontal',\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n show: true,\n collapsedSize: 0,\n orientation: 'horizontal',\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n show: true,\n collapsedSize: 0,\n orientation: 'horizontal',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n show: true,\n collapsedSize: 0,\n orientation: 'horizontal',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSCollapse {...testExplicitDefinition} />\n <DSCollapse {...testInferedTypeCompatibility} />\n <DSCollapse {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSCollapse show collapsedSize={0} orientation=\"vertical\" />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC0ErB,mBAEE,KAFF;AAzEF,SAAS,kBAAkB;AAU3B,MAAM,oBAAiD;AAAA,EACrD,MAAM;AACR;AAEA,MAAM,oBAAiD,CAAC;AAIxD,MAAM,sBAA2D;AAAA,EAC/D,aAAa;AACf;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,eAAe;AAAA,EACf,aAAa;AACf;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,MAAM;AAAA,EACN,eAAe;AAAA,EACf,aAAa;AACf;AAGA,MAAM,+BAA+B;AAAA,EACnC,MAAM;AAAA,EACN,eAAe;AAAA,EACf,aAAa;AACf;AAEA,MAAM,wBAAwB;AAAA,EAC5B,MAAM;AAAA,EACN,eAAe;AAAA,EACf,aAAa;AACf;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,cAAY,GAAG,wBAAwB;AAAA,EACxC,oBAAC,cAAY,GAAG,8BAA8B;AAAA,EAC9C,oBAAC,cAAY,GAAG,uBAAuB;AAAA,EAEvC,oBAAC,cAAW,MAAI,MAAC,eAAe,GAAG,aAAY,YAAW;AAAA,GAC5D;",
6
+ "names": []
7
+ }
@@ -0,0 +1,45 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { DSFade } from "../index.js";
4
+ const testRequiredProps = {
5
+ show: true
6
+ };
7
+ const testOptionalProps = {};
8
+ const testPartialDefaults = {};
9
+ const testProps = {
10
+ ...testRequiredProps,
11
+ ...testOptionalProps,
12
+ ...testPartialDefaults
13
+ };
14
+ const testPropsAsSyntax = {
15
+ ...testRequiredProps,
16
+ ...testOptionalProps,
17
+ ...testPartialDefaults
18
+ };
19
+ const testCompleteDefaults = {};
20
+ const testInternalProps = {
21
+ ...testRequiredProps,
22
+ ...testOptionalProps,
23
+ ...testCompleteDefaults
24
+ };
25
+ const testInternalPropsAsSyntax = {
26
+ ...testRequiredProps,
27
+ ...testOptionalProps,
28
+ ...testCompleteDefaults
29
+ };
30
+ const testExplicitDefinition = {
31
+ show: true
32
+ };
33
+ const testInferedTypeCompatibility = {
34
+ show: true
35
+ };
36
+ const testDefinitionAsConst = {
37
+ show: true
38
+ };
39
+ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
40
+ /* @__PURE__ */ jsx(DSFade, { ...testExplicitDefinition }),
41
+ /* @__PURE__ */ jsx(DSFade, { ...testInferedTypeCompatibility }),
42
+ /* @__PURE__ */ jsx(DSFade, { ...testDefinitionAsConst }),
43
+ /* @__PURE__ */ jsx(DSFade, { show: true })
44
+ ] });
45
+ //# sourceMappingURL=typescript-fade-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-fade-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSFade } from '../index.js';\nimport type { DSFadeT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSFadeT.Props;\ntype ComponentPropsInternals = DSFadeT.InternalProps;\ntype ComponentPropsDefaultProps = DSFadeT.DefaultProps;\ntype ComponentPropsOptionalProps = DSFadeT.OptionalProps;\ntype ComponentPropsRequiredProps = DSFadeT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n show: true,\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n show: true,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n show: true,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n show: true,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSFade {...testExplicitDefinition} />\n <DSFade {...testInferedTypeCompatibility} />\n <DSFade {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSFade show />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC+DrB,mBAEE,KAFF;AA9DF,SAAS,cAAc;AAUvB,MAAM,oBAAiD;AAAA,EACrD,MAAM;AACR;AAEA,MAAM,oBAAiD,CAAC;AAIxD,MAAM,sBAA2D,CAAC;AAElE,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D,CAAC;AAEpE,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,MAAM;AACR;AAGA,MAAM,+BAA+B;AAAA,EACnC,MAAM;AACR;AAEA,MAAM,wBAAwB;AAAA,EAC5B,MAAM;AACR;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,UAAQ,GAAG,wBAAwB;AAAA,EACpC,oBAAC,UAAQ,GAAG,8BAA8B;AAAA,EAC1C,oBAAC,UAAQ,GAAG,uBAAuB;AAAA,EAEnC,oBAAC,UAAO,MAAI,MAAC;AAAA,GACf;",
6
+ "names": []
7
+ }
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { DSCollapseT } from './react-desc-prop-types.js';
3
- export declare const DSCollapse: React.ComponentType<DSCollapseT.Props>;
4
- export declare const DSCollapseWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSCollapseT.Props>;
3
+ declare const DSCollapse: React.ComponentType<DSCollapseT.Props>;
4
+ declare const DSCollapseWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSCollapseT.Props>;
5
+ export { DSCollapse, DSCollapseWithSchema };
@@ -1 +1,2 @@
1
- export * from './DSCollapse.js';
1
+ export { DSCollapse, DSCollapseWithSchema } from './DSCollapse.js';
2
+ export type { DSCollapseT } from './react-desc-prop-types.js';
@@ -1,13 +1,19 @@
1
- import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
2
- import type { WeakValidationMap } from 'react';
1
+ import type { GlobalAttributesT, XstyledProps, ValidationMap, DSPropTypesSchema } from '@elliemae/ds-props-helpers';
3
2
  export declare namespace DSCollapseT {
4
- interface IProps {
3
+ interface RequiredProps {
5
4
  show: boolean;
6
- orientation?: 'horizontal' | 'vertical';
7
- collapsedSize?: number | string;
8
5
  }
9
- interface Props extends IProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof IProps>, XstyledProps {
6
+ interface DefaultProps {
7
+ orientation: 'horizontal' | 'vertical';
8
+ collapsedSize: number | string;
9
+ }
10
+ interface OptionalProps {
11
+ }
12
+ interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>, XstyledProps, RequiredProps {
13
+ }
14
+ interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>, XstyledProps, RequiredProps {
10
15
  }
11
16
  }
12
17
  export declare const defaultProps: Partial<DSCollapseT.Props>;
13
- export declare const DSCollapsePropTypes: WeakValidationMap<unknown>;
18
+ export declare const DSCollapsePropTypes: DSPropTypesSchema<DSCollapseT.Props>;
19
+ export declare const DSCollapsePropTypesSchema: ValidationMap<DSCollapseT.Props>;
@@ -3,6 +3,9 @@ interface StyledCollapseProps extends DSCollapseT.Props {
3
3
  expandedWidth: number;
4
4
  expandedHeight: number;
5
5
  }
6
+ interface StyledChildrenCollapseProps {
7
+ orientation?: 'horizontal' | 'vertical';
8
+ }
6
9
  export declare const StyledCollapse: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledCollapseProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
7
- export declare const StyledChildrenWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledCollapseProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
10
+ export declare const StyledChildrenWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledChildrenCollapseProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
8
11
  export {};
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import type { DSFadeT } from './react-desc-prop-types.js';
3
- export declare const DSFade: React.ComponentType<DSFadeT.Props>;
4
- export declare const DSFadeWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSFadeT.Props>;
3
+ declare const DSFade: React.ComponentType<DSFadeT.Props>;
4
+ declare const DSFadeWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSFadeT.Props>;
5
+ export { DSFade, DSFadeWithSchema };
@@ -1 +1,2 @@
1
- export * from './DSFade.js';
1
+ export { DSFade, DSFadeWithSchema } from './DSFade.js';
2
+ export type { DSFadeT } from './react-desc-prop-types.js';
@@ -1,10 +1,17 @@
1
- import type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
2
- import type { WeakValidationMap } from 'react';
1
+ import type { GlobalAttributesT, XstyledProps, ValidationMap, DSPropTypesSchema } from '@elliemae/ds-props-helpers';
3
2
  export declare namespace DSFadeT {
4
- interface IProps {
3
+ interface RequiredProps {
5
4
  show: boolean;
6
5
  }
7
- interface Props extends IProps, Omit<GlobalAttributesT<HTMLInputElement>, keyof IProps>, XstyledProps {
6
+ interface DefaultProps {
7
+ }
8
+ interface OptionalProps {
9
+ }
10
+ interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>, XstyledProps, RequiredProps {
11
+ }
12
+ interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLDivElement>, keyof RequiredProps>, XstyledProps, RequiredProps {
8
13
  }
9
14
  }
10
- export declare const DSFadePropTypes: WeakValidationMap<unknown>;
15
+ export declare const defaultProps: DSFadeT.DefaultProps;
16
+ export declare const DSFadePropTypes: DSPropTypesSchema<DSFadeT.Props>;
17
+ export declare const DSFadePropTypesSchema: ValidationMap<DSFadeT.Props>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-transition",
3
- "version": "3.41.2-rc.0",
3
+ "version": "3.42.0-rc.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Tooltip",
6
6
  "files": [
@@ -36,14 +36,14 @@
36
36
  "indent": 4
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-props-helpers": "3.41.2-rc.0",
40
- "@elliemae/ds-system": "3.41.2-rc.0"
39
+ "@elliemae/ds-props-helpers": "3.42.0-rc.0",
40
+ "@elliemae/ds-system": "3.42.0-rc.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@elliemae/pui-cli": "9.0.0-next.50",
44
44
  "react": "^17.0.2",
45
45
  "react-dom": "^17.0.2",
46
- "@elliemae/ds-monorepo-devops": "3.41.2-rc.0"
46
+ "@elliemae/ds-monorepo-devops": "3.42.0-rc.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": "^17.0.2",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "publishConfig": {
54
54
  "access": "public",
55
- "typeSafety": false
55
+ "typeSafety": true
56
56
  },
57
57
  "scripts": {
58
58
  "dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",