@elliemae/ds-page-header-v2 3.34.0-next.1 → 3.34.0-next.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.
Files changed (93) hide show
  1. package/dist/cjs/PageHeader.js +6 -6
  2. package/dist/cjs/PageHeader.js.map +2 -2
  3. package/dist/cjs/components/{PageHeaderEditableTitle.js → page-header-editable-title/PageHeaderEditableTitle.js} +8 -16
  4. package/dist/cjs/components/page-header-editable-title/PageHeaderEditableTitle.js.map +7 -0
  5. package/dist/cjs/components/page-header-editable-title/index.js +37 -0
  6. package/dist/cjs/components/page-header-editable-title/index.js.map +7 -0
  7. package/dist/cjs/components/page-header-editable-title/react-desc-prop-types.js +45 -0
  8. package/dist/cjs/components/page-header-editable-title/react-desc-prop-types.js.map +7 -0
  9. package/dist/cjs/components/{PageHeaderSummary.js → page-header-summary/PageHeaderSummary.js} +6 -11
  10. package/dist/cjs/components/page-header-summary/PageHeaderSummary.js.map +7 -0
  11. package/dist/cjs/components/page-header-summary/index.js +37 -0
  12. package/dist/cjs/components/page-header-summary/index.js.map +7 -0
  13. package/dist/cjs/components/page-header-summary/react-desc-prop-types.js +42 -0
  14. package/dist/cjs/components/page-header-summary/react-desc-prop-types.js.map +7 -0
  15. package/dist/cjs/components/{PageHeaderTitle.js → page-header-title/PageHeaderTitle.js} +6 -9
  16. package/dist/cjs/components/page-header-title/PageHeaderTitle.js.map +7 -0
  17. package/dist/cjs/components/page-header-title/index.js +37 -0
  18. package/dist/cjs/components/page-header-title/index.js.map +7 -0
  19. package/dist/cjs/components/page-header-title/react-desc-prop-types.js +47 -0
  20. package/dist/cjs/components/page-header-title/react-desc-prop-types.js.map +7 -0
  21. package/dist/cjs/config/usePageHeader.js.map +2 -2
  22. package/dist/cjs/index.js +6 -6
  23. package/dist/cjs/index.js.map +2 -2
  24. package/dist/cjs/react-desc-prop-types.js +5 -5
  25. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  26. package/dist/cjs/typescript-testing/typescript-page-header-editable-title-valid.js +76 -0
  27. package/dist/cjs/typescript-testing/typescript-page-header-editable-title-valid.js.map +7 -0
  28. package/dist/cjs/typescript-testing/typescript-page-header-summary-valid.js +72 -0
  29. package/dist/cjs/typescript-testing/typescript-page-header-summary-valid.js.map +7 -0
  30. package/dist/cjs/typescript-testing/typescript-page-header-title-valid.js +74 -0
  31. package/dist/cjs/typescript-testing/typescript-page-header-title-valid.js.map +7 -0
  32. package/dist/cjs/typescript-testing/typescript-page-header-v2-valid.js +148 -0
  33. package/dist/cjs/typescript-testing/typescript-page-header-v2-valid.js.map +7 -0
  34. package/dist/esm/PageHeader.js +3 -3
  35. package/dist/esm/PageHeader.js.map +1 -1
  36. package/dist/esm/components/{PageHeaderEditableTitle.js → page-header-editable-title/PageHeaderEditableTitle.js} +8 -16
  37. package/dist/esm/components/page-header-editable-title/PageHeaderEditableTitle.js.map +7 -0
  38. package/dist/esm/components/page-header-editable-title/index.js +7 -0
  39. package/dist/esm/components/page-header-editable-title/index.js.map +7 -0
  40. package/dist/esm/components/page-header-editable-title/react-desc-prop-types.js +15 -0
  41. package/dist/esm/components/page-header-editable-title/react-desc-prop-types.js.map +7 -0
  42. package/dist/esm/components/{PageHeaderSummary.js → page-header-summary/PageHeaderSummary.js} +7 -12
  43. package/dist/esm/components/page-header-summary/PageHeaderSummary.js.map +7 -0
  44. package/dist/esm/components/page-header-summary/index.js +7 -0
  45. package/dist/esm/components/page-header-summary/index.js.map +7 -0
  46. package/dist/esm/components/page-header-summary/react-desc-prop-types.js +12 -0
  47. package/dist/esm/components/page-header-summary/react-desc-prop-types.js.map +7 -0
  48. package/dist/esm/components/{PageHeaderTitle.js → page-header-title/PageHeaderTitle.js} +7 -10
  49. package/dist/esm/components/page-header-title/PageHeaderTitle.js.map +7 -0
  50. package/dist/esm/components/page-header-title/index.js +7 -0
  51. package/dist/esm/components/page-header-title/index.js.map +7 -0
  52. package/dist/esm/components/page-header-title/react-desc-prop-types.js +17 -0
  53. package/dist/esm/components/page-header-title/react-desc-prop-types.js.map +7 -0
  54. package/dist/esm/config/usePageHeader.js.map +2 -2
  55. package/dist/esm/index.js +5 -3
  56. package/dist/esm/index.js.map +2 -2
  57. package/dist/esm/react-desc-prop-types.js +5 -5
  58. package/dist/esm/react-desc-prop-types.js.map +2 -2
  59. package/dist/esm/typescript-testing/typescript-page-header-editable-title-valid.js +53 -0
  60. package/dist/esm/typescript-testing/typescript-page-header-editable-title-valid.js.map +7 -0
  61. package/dist/esm/typescript-testing/typescript-page-header-summary-valid.js +49 -0
  62. package/dist/esm/typescript-testing/typescript-page-header-summary-valid.js.map +7 -0
  63. package/dist/esm/typescript-testing/typescript-page-header-title-valid.js +51 -0
  64. package/dist/esm/typescript-testing/typescript-page-header-title-valid.js.map +7 -0
  65. package/dist/esm/typescript-testing/typescript-page-header-v2-valid.js +125 -0
  66. package/dist/esm/typescript-testing/typescript-page-header-v2-valid.js.map +7 -0
  67. package/dist/types/PageHeader.d.ts +3 -3
  68. package/dist/types/components/page-header-editable-title/PageHeaderEditableTitle.d.ts +10 -0
  69. package/dist/types/components/page-header-editable-title/index.d.ts +2 -0
  70. package/dist/types/components/page-header-editable-title/react-desc-prop-types.d.ts +395 -0
  71. package/dist/types/components/page-header-summary/PageHeaderSummary.d.ts +9 -0
  72. package/dist/types/components/page-header-summary/index.d.ts +2 -0
  73. package/dist/types/components/page-header-summary/react-desc-prop-types.d.ts +20 -0
  74. package/dist/types/components/page-header-title/PageHeaderTitle.d.ts +10 -0
  75. package/dist/types/components/page-header-title/index.d.ts +2 -0
  76. package/dist/types/components/page-header-title/react-desc-prop-types.d.ts +21 -0
  77. package/dist/types/config/usePageHeader.d.ts +524 -166
  78. package/dist/types/index.d.ts +4 -3
  79. package/dist/types/react-desc-prop-types.d.ts +7 -2
  80. package/dist/types/typescript-testing/typescript-page-header-editable-title-valid.d.ts +1 -0
  81. package/dist/types/typescript-testing/typescript-page-header-summary-valid.d.ts +1 -0
  82. package/dist/types/typescript-testing/typescript-page-header-title-valid.d.ts +1 -0
  83. package/dist/types/typescript-testing/typescript-page-header-v2-valid.d.ts +1 -0
  84. package/package.json +15 -15
  85. package/dist/cjs/components/PageHeaderEditableTitle.js.map +0 -7
  86. package/dist/cjs/components/PageHeaderSummary.js.map +0 -7
  87. package/dist/cjs/components/PageHeaderTitle.js.map +0 -7
  88. package/dist/esm/components/PageHeaderEditableTitle.js.map +0 -7
  89. package/dist/esm/components/PageHeaderSummary.js.map +0 -7
  90. package/dist/esm/components/PageHeaderTitle.js.map +0 -7
  91. package/dist/types/components/PageHeaderEditableTitle.d.ts +0 -15
  92. package/dist/types/components/PageHeaderSummary.d.ts +0 -14
  93. package/dist/types/components/PageHeaderTitle.d.ts +0 -16
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { PropTypes, globalAttributesPropTypes } from "@elliemae/ds-props-helpers";
3
+ const PageHeaderEditableTitlePropTypes = {
4
+ ...globalAttributesPropTypes,
5
+ /** The title text */
6
+ children: PropTypes.string.description("The title text"),
7
+ /** Whether the title is editing or not */
8
+ editing: PropTypes.bool.description("Whether the title is editing or not"),
9
+ /** Show error marker */
10
+ showMarker: PropTypes.bool.description("Show error marker")
11
+ };
12
+ export {
13
+ PageHeaderEditableTitlePropTypes
14
+ };
15
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/page-header-editable-title/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { type GlobalAttributesT, PropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace PageHeaderEditableTitleT {\n export interface DefaultProps {}\n\n export interface OptionalProps {\n children?: string;\n editing?: boolean;\n showMarker?: boolean;\n [key: string]: unknown;\n }\n\n export interface RequiredProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof OptionalProps>,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof OptionalProps>,\n RequiredProps {}\n}\n\nexport const PageHeaderEditableTitlePropTypes = {\n ...globalAttributesPropTypes,\n /** The title text */\n children: PropTypes.string.description('The title text'),\n /** Whether the title is editing or not */\n editing: PropTypes.bool.description('Whether the title is editing or not'),\n /** Show error marker */\n showMarker: PropTypes.bool.description('Show error marker'),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAiC,WAAW,iCAAiC;AA2BtE,MAAM,mCAAmC;AAAA,EAC9C,GAAG;AAAA;AAAA,EAEH,UAAU,UAAU,OAAO,YAAY,gBAAgB;AAAA;AAAA,EAEvD,SAAS,UAAU,KAAK,YAAY,qCAAqC;AAAA;AAAA,EAEzE,YAAY,UAAU,KAAK,YAAY,mBAAmB;AAC5D;",
6
+ "names": []
7
+ }
@@ -1,8 +1,9 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { PropTypes, describe } from "@elliemae/ds-props-helpers";
3
+ import { describe } from "@elliemae/ds-props-helpers";
4
4
  import { styled } from "@elliemae/ds-system";
5
- import { DSPageHeaderName, DSPageHeaderSlots, DSPageHeaderDataTestIds } from "../exported-related/index.js";
5
+ import { DSPageHeaderName, DSPageHeaderSlots, DSPageHeaderDataTestIds } from "../../exported-related/index.js";
6
+ import { PageHeaderSummaryPropTypes } from "./react-desc-prop-types.js";
6
7
  const PageHeaderSummaryWrapper = styled("div", {
7
8
  name: DSPageHeaderName,
8
9
  slot: DSPageHeaderSlots.SUMMARY
@@ -34,24 +35,18 @@ const PageHeaderSummaryWrapper = styled("div", {
34
35
  width: ${({ theme }) => theme.space.l};
35
36
  }
36
37
  `;
37
- const PageHeaderSummary = (props2) => {
38
- const { value = null, label = "", ...rest } = props2;
38
+ const PageHeaderSummary = (props) => {
39
+ const { value = null, label = "", ...rest } = props;
39
40
  return /* @__PURE__ */ jsxs(PageHeaderSummaryWrapper, { "data-testid": DSPageHeaderDataTestIds.SUMMARY, ...rest, children: [
40
41
  (value === 0 || value) && /* @__PURE__ */ jsx("div", { className: "ph-summary-value", children: value }),
41
42
  label && /* @__PURE__ */ jsx("div", { className: "ph-summary-label", children: label }),
42
43
  (value === 0 || value || label) && /* @__PURE__ */ jsx("div", { className: "ph-summary-space" })
43
44
  ] });
44
45
  };
45
- const props = {
46
- /** value for page header summary */
47
- value: PropTypes.number.description("value for page header summary"),
48
- /** label attached to value */
49
- label: PropTypes.string.description("label attached to value")
50
- };
51
- PageHeaderSummary.propTypes = props;
46
+ PageHeaderSummary.propTypes = PageHeaderSummaryPropTypes;
52
47
  PageHeaderSummary.displayName = "PageHeaderSummary";
53
48
  const DSPageHeaderSummaryWithSchema = describe(PageHeaderSummary);
54
- DSPageHeaderSummaryWithSchema.propTypes = props;
49
+ DSPageHeaderSummaryWithSchema.propTypes = PageHeaderSummaryPropTypes;
55
50
  export {
56
51
  DSPageHeaderSummaryWithSchema,
57
52
  PageHeaderSummary
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/page-header-summary/PageHeaderSummary.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { DSPageHeaderName, DSPageHeaderSlots, DSPageHeaderDataTestIds } from '../../exported-related/index.js';\nimport { PageHeaderSummaryPropTypes, type PageHeaderSummaryT } from './react-desc-prop-types.js';\n\nconst PageHeaderSummaryWrapper = styled('div', {\n name: DSPageHeaderName,\n slot: DSPageHeaderSlots.SUMMARY,\n})`\n display: flex;\n flex-direction: row;\n align-items: center;\n\n margin-left: ${({ theme }) => theme.space.xxxs};\n font-size: ${({ theme }) => theme.fontSizes.title[700]};\n line-height: ${({ theme }) => theme.lineHeights.m};\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n &:before {\n display: block;\n content: '';\n height: 23px;\n background: ${({ theme }) => theme.colors.neutral[600]};\n width: 1px;\n margin-right: ${({ theme }) => theme.space.xxs};\n }\n .ph-summary-value {\n color: ${({ theme }) => theme.colors.neutral[700]};\n padding-right: ${({ theme }) => theme.space.xxs};\n }\n .ph-summary-label {\n color: ${({ theme }) => theme.colors.neutral[600]};\n }\n .ph-summary-space {\n width: ${({ theme }) => theme.space.l};\n }\n`;\n\nconst PageHeaderSummary = (props: PageHeaderSummaryT.Props) => {\n const { value = null, label = '', ...rest } = props;\n return (\n <PageHeaderSummaryWrapper data-testid={DSPageHeaderDataTestIds.SUMMARY} {...rest}>\n {(value === 0 || value) && <div className=\"ph-summary-value\">{value}</div>}\n {label && <div className=\"ph-summary-label\">{label}</div>}\n {(value === 0 || value || label) && <div className=\"ph-summary-space\" />}\n </PageHeaderSummaryWrapper>\n );\n};\n\nPageHeaderSummary.propTypes = PageHeaderSummaryPropTypes as ValidationMap<unknown>;\nPageHeaderSummary.displayName = 'PageHeaderSummary';\nconst DSPageHeaderSummaryWithSchema = describe(PageHeaderSummary);\n\nDSPageHeaderSummaryWithSchema.propTypes = PageHeaderSummaryPropTypes as ValidationMap<unknown>;\n\nexport { PageHeaderSummary, DSPageHeaderSummaryWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACyCnB,SAC6B,KAD7B;AAxCJ,SAAS,gBAAoC;AAC7C,SAAS,cAAc;AACvB,SAAS,kBAAkB,mBAAmB,+BAA+B;AAC7E,SAAS,kCAA2D;AAEpE,MAAM,2BAA2B,OAAO,OAAO;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKgB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,eAC7B,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM,GAAG;AAAA,iBACtC,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA,iBACjC,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKhC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA,oBAErC,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA,aAGlC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA,qBAC/B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA,aAGnC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAAA,aAGvC,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAIxC,MAAM,oBAAoB,CAAC,UAAoC;AAC7D,QAAM,EAAE,QAAQ,MAAM,QAAQ,IAAI,GAAG,KAAK,IAAI;AAC9C,SACE,qBAAC,4BAAyB,eAAa,wBAAwB,SAAU,GAAG,MACxE;AAAA,eAAU,KAAK,UAAU,oBAAC,SAAI,WAAU,oBAAoB,iBAAM;AAAA,IACnE,SAAS,oBAAC,SAAI,WAAU,oBAAoB,iBAAM;AAAA,KACjD,UAAU,KAAK,SAAS,UAAU,oBAAC,SAAI,WAAU,oBAAmB;AAAA,KACxE;AAEJ;AAEA,kBAAkB,YAAY;AAC9B,kBAAkB,cAAc;AAChC,MAAM,gCAAgC,SAAS,iBAAiB;AAEhE,8BAA8B,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { PageHeaderSummary, DSPageHeaderSummaryWithSchema } from "./PageHeaderSummary.js";
3
+ export {
4
+ DSPageHeaderSummaryWithSchema,
5
+ PageHeaderSummary
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/page-header-summary/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { PageHeaderSummary, DSPageHeaderSummaryWithSchema } from './PageHeaderSummary.js';\nexport type { PageHeaderSummaryT } from './react-desc-prop-types.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,mBAAmB,qCAAqC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { PropTypes } from "@elliemae/ds-props-helpers";
3
+ const PageHeaderSummaryPropTypes = {
4
+ /** value for page header summary */
5
+ value: PropTypes.number.description("value for page header summary"),
6
+ /** label attached to value */
7
+ label: PropTypes.string.description("label attached to value")
8
+ };
9
+ export {
10
+ PageHeaderSummaryPropTypes
11
+ };
12
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/page-header-summary/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace PageHeaderSummaryT {\n export interface DefaultProps {}\n\n export interface OptionalProps {\n value?: number;\n label?: string;\n }\n\n export interface RequiredProps {}\n\n export interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {}\n}\n\nexport const PageHeaderSummaryPropTypes = {\n /** value for page header summary */\n value: PropTypes.number.description('value for page header summary'),\n /** label attached to value */\n label: PropTypes.string.description('label attached to value'),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAiBnB,MAAM,6BAA6B;AAAA;AAAA,EAExC,OAAO,UAAU,OAAO,YAAY,+BAA+B;AAAA;AAAA,EAEnE,OAAO,UAAU,OAAO,YAAY,yBAAyB;AAC/D;",
6
+ "names": []
7
+ }
@@ -1,10 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { styled } from "@elliemae/ds-system";
4
- import { PropTypes, describe } from "@elliemae/ds-props-helpers";
4
+ import { describe } from "@elliemae/ds-props-helpers";
5
5
  import { DSTruncatedTooltipText, TooltipTextProvider } from "@elliemae/ds-truncated-tooltip-text";
6
6
  import { RequiredMark } from "@elliemae/ds-form";
7
- import { DSPageHeaderName, DSPageHeaderSlots, DSPageHeaderDataTestIds } from "../exported-related/index.js";
7
+ import { DSPageHeaderName, DSPageHeaderSlots, DSPageHeaderDataTestIds } from "../../exported-related/index.js";
8
+ import { PageHeaderTitlePropTypes } from "./react-desc-prop-types.js";
9
+ import { defaultProps } from "./react-desc-prop-types.js";
8
10
  const PageHeaderTitleWrapper = styled("div", {
9
11
  name: DSPageHeaderName,
10
12
  slot: DSPageHeaderSlots.HEADER_TITLE
@@ -26,16 +28,11 @@ const PageHeaderTitle = ({ children = "", showMarker = false, ...rest }) => /* @
26
28
  /* @__PURE__ */ jsx(TooltipTextProvider, { children: /* @__PURE__ */ jsx(DSTruncatedTooltipText, { value: children }) }),
27
29
  showMarker && /* @__PURE__ */ jsx(RequiredMark, { required: true })
28
30
  ] });
29
- const props = {
30
- /** page header title string */
31
- children: PropTypes.string.description("Page header title string"),
32
- /** show required mark */
33
- showMarker: PropTypes.bool.description("show required mark")
34
- };
35
- PageHeaderTitle.propTypes = props;
31
+ PageHeaderTitle.propTypes = PageHeaderTitlePropTypes;
32
+ PageHeaderTitle.defaultProps = defaultProps;
36
33
  PageHeaderTitle.displayName = "PageHeaderTitle";
37
34
  const DSPageHeaderTitleWithSchema = describe(PageHeaderTitle);
38
- DSPageHeaderTitleWithSchema.propTypes = props;
35
+ DSPageHeaderTitleWithSchema.propTypes = PageHeaderTitlePropTypes;
39
36
  export {
40
37
  DSPageHeaderTitleWithSchema,
41
38
  PageHeaderTitle
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/page-header-title/PageHeaderTitle.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { describe, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { DSTruncatedTooltipText, TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { RequiredMark } from '@elliemae/ds-form';\nimport { DSPageHeaderName, DSPageHeaderSlots, DSPageHeaderDataTestIds } from '../../exported-related/index.js';\nimport { PageHeaderTitlePropTypes, type PageHeaderTitleT } from './react-desc-prop-types.js';\nimport { defaultProps } from './react-desc-prop-types.js';\n\nconst PageHeaderTitleWrapper = styled('div', {\n name: DSPageHeaderName,\n slot: DSPageHeaderSlots.HEADER_TITLE,\n})`\n display: grid;\n font-size: ${({ theme }) => theme.fontSizes.title[800]};\n color: ${({ theme }) => theme.colors.neutral['700']};\n line-height: normal;\n font-weight: 400;\n margin-right: 0.61538rem;\n\n & .em-ds-form-required-mark {\n position: absolute;\n top: 0;\n right: 0;\n }\n`;\n\nconst PageHeaderTitle = ({ children = '', showMarker = false, ...rest }: PageHeaderTitleT.Props) => (\n <PageHeaderTitleWrapper {...rest} data-testid={DSPageHeaderDataTestIds.HEADER_TITLE}>\n <TooltipTextProvider>\n <DSTruncatedTooltipText value={children} />\n </TooltipTextProvider>\n {showMarker && <RequiredMark required />}\n </PageHeaderTitleWrapper>\n);\n\nPageHeaderTitle.propTypes = PageHeaderTitlePropTypes as ValidationMap<unknown>;\nPageHeaderTitle.defaultProps = defaultProps;\nPageHeaderTitle.displayName = 'PageHeaderTitle';\nconst DSPageHeaderTitleWithSchema = describe(PageHeaderTitle);\n\nDSPageHeaderTitleWithSchema.propTypes = PageHeaderTitlePropTypes as ValidationMap<unknown>;\n\nexport { PageHeaderTitle, DSPageHeaderTitleWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC4BrB,SAEI,KAFJ;AA3BF,SAAS,cAAc;AACvB,SAAS,gBAAoC;AAC7C,SAAS,wBAAwB,2BAA2B;AAC5D,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB,mBAAmB,+BAA+B;AAC7E,SAAS,gCAAuD;AAChE,SAAS,oBAAoB;AAE7B,MAAM,yBAAyB,OAAO,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,MAAM,kBAAkB;AAC1B,CAAC;AAAA;AAAA,eAEc,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM,GAAG;AAAA,WAC5C,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYpD,MAAM,kBAAkB,CAAC,EAAE,WAAW,IAAI,aAAa,OAAO,GAAG,KAAK,MACpE,qBAAC,0BAAwB,GAAG,MAAM,eAAa,wBAAwB,cACrE;AAAA,sBAAC,uBACC,8BAAC,0BAAuB,OAAO,UAAU,GAC3C;AAAA,EACC,cAAc,oBAAC,gBAAa,UAAQ,MAAC;AAAA,GACxC;AAGF,gBAAgB,YAAY;AAC5B,gBAAgB,eAAe;AAC/B,gBAAgB,cAAc;AAC9B,MAAM,8BAA8B,SAAS,eAAe;AAE5D,4BAA4B,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { PageHeaderTitle, DSPageHeaderTitleWithSchema } from "./PageHeaderTitle.js";
3
+ export {
4
+ DSPageHeaderTitleWithSchema,
5
+ PageHeaderTitle
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/page-header-title/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { PageHeaderTitle, DSPageHeaderTitleWithSchema } from './PageHeaderTitle.js';\nexport type { PageHeaderTitleT } from './react-desc-prop-types.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB,mCAAmC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import { PropTypes } from "@elliemae/ds-props-helpers";
3
+ const defaultProps = {
4
+ children: "",
5
+ showMarker: false
6
+ };
7
+ const PageHeaderTitlePropTypes = {
8
+ /** page header title string */
9
+ children: PropTypes.string.description("Page header title string"),
10
+ /** show required mark */
11
+ showMarker: PropTypes.bool.description("show required mark")
12
+ };
13
+ export {
14
+ PageHeaderTitlePropTypes,
15
+ defaultProps
16
+ };
17
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/page-header-title/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace PageHeaderTitleT {\n export interface DefaultProps {\n children: string;\n showMarker: boolean;\n }\n\n export interface OptionalProps {}\n\n export interface RequiredProps {}\n\n export interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {}\n}\n\nexport const defaultProps: PageHeaderTitleT.DefaultProps = {\n children: '',\n showMarker: false,\n};\n\nexport const PageHeaderTitlePropTypes = {\n /** page header title string */\n children: PropTypes.string.description('Page header title string'),\n /** show required mark */\n showMarker: PropTypes.bool.description('show required mark'),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAiBnB,MAAM,eAA8C;AAAA,EACzD,UAAU;AAAA,EACV,YAAY;AACd;AAEO,MAAM,2BAA2B;AAAA;AAAA,EAEtC,UAAU,UAAU,OAAO,YAAY,0BAA0B;AAAA;AAAA,EAEjE,YAAY,UAAU,KAAK,YAAY,oBAAoB;AAC7D;",
6
+ "names": []
7
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/usePageHeader.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport { useMemo } from 'react';\nimport {\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\n\nimport type { DSPageHeaderT } from '../react-desc-prop-types.js';\nimport { PageHeaderPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport {\n DSPageHeaderName,\n BackArrowSkeleton,\n BreadcrumbSkeleton,\n MenuSkeleton,\n PageTitleSkeleton,\n SummarySkeleton,\n ToolbarSkeleton,\n} from '../exported-related/index.js';\nexport const usePageHeader = (props: DSPageHeaderT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, PageHeaderPropTypes, DSPageHeaderName);\n\n const {\n menu,\n Menu,\n pageTitle,\n PageTitle,\n toolbar,\n Toolbar,\n summary,\n Summary,\n backarrow,\n Backarrow,\n breadcrumbs,\n Breadcrumbs,\n isSkeleton,\n ...rest\n } = props;\n\n const globalAttributes = useGetGlobalAttributes(propsWithDefaults);\n const xStyledProps = useGetXstyledProps(propsWithDefaults);\n\n const currentBackArrow = useMemo(() => {\n if (isSkeleton && (Backarrow || backarrow)) return <BackArrowSkeleton />;\n if (Backarrow) return <Backarrow />;\n if (backarrow) return backarrow;\n return undefined;\n }, [Backarrow, backarrow, isSkeleton]);\n\n const currentMenu = useMemo(() => {\n if (isSkeleton && (Menu || menu)) return <MenuSkeleton />;\n if (Menu) return <Menu />;\n if (menu) return menu;\n return undefined;\n }, [Menu, menu, isSkeleton]);\n\n const currentBreadcrumbs = useMemo(() => {\n if (isSkeleton && (Breadcrumbs || breadcrumbs)) return <BreadcrumbSkeleton />;\n if (Breadcrumbs) return <Breadcrumbs />;\n if (breadcrumbs) return breadcrumbs;\n return undefined;\n }, [Breadcrumbs, breadcrumbs, isSkeleton]);\n\n const currentSummary = useMemo(() => {\n if (isSkeleton && (Summary || summary)) return <SummarySkeleton />;\n if (Summary) return <Summary />;\n if (summary) return summary;\n return undefined;\n }, [Summary, summary, isSkeleton]);\n\n const currentToolbar = useMemo(() => {\n if (isSkeleton && (Toolbar || toolbar)) return <ToolbarSkeleton />;\n if (Toolbar) return <Toolbar />;\n if (toolbar) return toolbar;\n return undefined;\n }, [Toolbar, toolbar, isSkeleton]);\n\n const currentPageTitle = useMemo(() => {\n if (isSkeleton && (PageTitle || pageTitle)) return <PageTitleSkeleton />;\n if (PageTitle) return <PageTitle />;\n if (pageTitle) return pageTitle;\n return undefined;\n }, [PageTitle, pageTitle, isSkeleton]);\n\n return useMemo(\n () => ({\n propsWithDefaults,\n globalAttributes,\n xStyledProps,\n currentBackArrow,\n currentMenu,\n currentBreadcrumbs,\n currentSummary,\n currentToolbar,\n currentPageTitle,\n ...rest,\n }),\n [\n propsWithDefaults,\n currentBackArrow,\n currentBreadcrumbs,\n currentMenu,\n currentPageTitle,\n currentSummary,\n currentToolbar,\n globalAttributes,\n rest,\n xStyledProps,\n ],\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC6CgC;AA5CvD,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,qBAAqB,oBAAoB;AAClD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACA,MAAM,gBAAgB,CAAC,UAA+B;AAC3D,QAAM,oBAAoB,6BAA6B,OAAO,YAAY;AAC1E,iCAA+B,mBAAmB,qBAAqB,gBAAgB;AAEvF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,mBAAmB,uBAAuB,iBAAiB;AACjE,QAAM,eAAe,mBAAmB,iBAAiB;AAEzD,QAAM,mBAAmB,QAAQ,MAAM;AACrC,QAAI,eAAe,aAAa;AAAY,aAAO,oBAAC,qBAAkB;AACtE,QAAI;AAAW,aAAO,oBAAC,aAAU;AACjC,QAAI;AAAW,aAAO;AACtB,WAAO;AAAA,EACT,GAAG,CAAC,WAAW,WAAW,UAAU,CAAC;AAErC,QAAM,cAAc,QAAQ,MAAM;AAChC,QAAI,eAAe,QAAQ;AAAO,aAAO,oBAAC,gBAAa;AACvD,QAAI;AAAM,aAAO,oBAAC,QAAK;AACvB,QAAI;AAAM,aAAO;AACjB,WAAO;AAAA,EACT,GAAG,CAAC,MAAM,MAAM,UAAU,CAAC;AAE3B,QAAM,qBAAqB,QAAQ,MAAM;AACvC,QAAI,eAAe,eAAe;AAAc,aAAO,oBAAC,sBAAmB;AAC3E,QAAI;AAAa,aAAO,oBAAC,eAAY;AACrC,QAAI;AAAa,aAAO;AACxB,WAAO;AAAA,EACT,GAAG,CAAC,aAAa,aAAa,UAAU,CAAC;AAEzC,QAAM,iBAAiB,QAAQ,MAAM;AACnC,QAAI,eAAe,WAAW;AAAU,aAAO,oBAAC,mBAAgB;AAChE,QAAI;AAAS,aAAO,oBAAC,WAAQ;AAC7B,QAAI;AAAS,aAAO;AACpB,WAAO;AAAA,EACT,GAAG,CAAC,SAAS,SAAS,UAAU,CAAC;AAEjC,QAAM,iBAAiB,QAAQ,MAAM;AACnC,QAAI,eAAe,WAAW;AAAU,aAAO,oBAAC,mBAAgB;AAChE,QAAI;AAAS,aAAO,oBAAC,WAAQ;AAC7B,QAAI;AAAS,aAAO;AACpB,WAAO;AAAA,EACT,GAAG,CAAC,SAAS,SAAS,UAAU,CAAC;AAEjC,QAAM,mBAAmB,QAAQ,MAAM;AACrC,QAAI,eAAe,aAAa;AAAY,aAAO,oBAAC,qBAAkB;AACtE,QAAI;AAAW,aAAO,oBAAC,aAAU;AACjC,QAAI;AAAW,aAAO;AACtB,WAAO;AAAA,EACT,GAAG,CAAC,WAAW,WAAW,UAAU,CAAC;AAErC,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport { useMemo } from 'react';\nimport {\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\n\nimport type { DSPageHeaderT } from '../react-desc-prop-types.js';\nimport { PageHeaderPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport {\n DSPageHeaderName,\n BackArrowSkeleton,\n BreadcrumbSkeleton,\n MenuSkeleton,\n PageTitleSkeleton,\n SummarySkeleton,\n ToolbarSkeleton,\n} from '../exported-related/index.js';\nexport const usePageHeader = (props: DSPageHeaderT.Props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSPageHeaderT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, PageHeaderPropTypes, DSPageHeaderName);\n\n const {\n menu,\n Menu,\n pageTitle,\n PageTitle,\n toolbar,\n Toolbar,\n summary,\n Summary,\n backarrow,\n Backarrow,\n breadcrumbs,\n Breadcrumbs,\n isSkeleton,\n ...rest\n } = props;\n\n const globalAttributes = useGetGlobalAttributes<DSPageHeaderT.InternalProps, HTMLDivElement>(propsWithDefaults);\n const xStyledProps = useGetXstyledProps(propsWithDefaults);\n\n const currentBackArrow = useMemo(() => {\n if (isSkeleton && (Backarrow || backarrow)) return <BackArrowSkeleton />;\n if (Backarrow) return <Backarrow />;\n if (backarrow) return backarrow;\n return undefined;\n }, [Backarrow, backarrow, isSkeleton]);\n\n const currentMenu = useMemo(() => {\n if (isSkeleton && (Menu || menu)) return <MenuSkeleton />;\n if (Menu) return <Menu />;\n if (menu) return menu;\n return undefined;\n }, [Menu, menu, isSkeleton]);\n\n const currentBreadcrumbs = useMemo(() => {\n if (isSkeleton && (Breadcrumbs || breadcrumbs)) return <BreadcrumbSkeleton />;\n if (Breadcrumbs) return <Breadcrumbs />;\n if (breadcrumbs) return breadcrumbs;\n return undefined;\n }, [Breadcrumbs, breadcrumbs, isSkeleton]);\n\n const currentSummary = useMemo(() => {\n if (isSkeleton && (Summary || summary)) return <SummarySkeleton />;\n if (Summary) return <Summary />;\n if (summary) return summary;\n return undefined;\n }, [Summary, summary, isSkeleton]);\n\n const currentToolbar = useMemo(() => {\n if (isSkeleton && (Toolbar || toolbar)) return <ToolbarSkeleton />;\n if (Toolbar) return <Toolbar />;\n if (toolbar) return toolbar;\n return undefined;\n }, [Toolbar, toolbar, isSkeleton]);\n\n const currentPageTitle = useMemo(() => {\n if (isSkeleton && (PageTitle || pageTitle)) return <PageTitleSkeleton />;\n if (PageTitle) return <PageTitle />;\n if (pageTitle) return pageTitle;\n return undefined;\n }, [PageTitle, pageTitle, isSkeleton]);\n\n return useMemo(\n () => ({\n propsWithDefaults,\n globalAttributes,\n xStyledProps,\n currentBackArrow,\n currentMenu,\n currentBreadcrumbs,\n currentSummary,\n currentToolbar,\n currentPageTitle,\n ...rest,\n }),\n [\n propsWithDefaults,\n currentBackArrow,\n currentBreadcrumbs,\n currentMenu,\n currentPageTitle,\n currentSummary,\n currentToolbar,\n globalAttributes,\n rest,\n xStyledProps,\n ],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC6CgC;AA5CvD,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,qBAAqB,oBAAoB;AAClD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACA,MAAM,gBAAgB,CAAC,UAA+B;AAC3D,QAAM,oBAAoB,6BAA0D,OAAO,YAAY;AACvG,iCAA+B,mBAAmB,qBAAqB,gBAAgB;AAEvF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,mBAAmB,uBAAoE,iBAAiB;AAC9G,QAAM,eAAe,mBAAmB,iBAAiB;AAEzD,QAAM,mBAAmB,QAAQ,MAAM;AACrC,QAAI,eAAe,aAAa;AAAY,aAAO,oBAAC,qBAAkB;AACtE,QAAI;AAAW,aAAO,oBAAC,aAAU;AACjC,QAAI;AAAW,aAAO;AACtB,WAAO;AAAA,EACT,GAAG,CAAC,WAAW,WAAW,UAAU,CAAC;AAErC,QAAM,cAAc,QAAQ,MAAM;AAChC,QAAI,eAAe,QAAQ;AAAO,aAAO,oBAAC,gBAAa;AACvD,QAAI;AAAM,aAAO,oBAAC,QAAK;AACvB,QAAI;AAAM,aAAO;AACjB,WAAO;AAAA,EACT,GAAG,CAAC,MAAM,MAAM,UAAU,CAAC;AAE3B,QAAM,qBAAqB,QAAQ,MAAM;AACvC,QAAI,eAAe,eAAe;AAAc,aAAO,oBAAC,sBAAmB;AAC3E,QAAI;AAAa,aAAO,oBAAC,eAAY;AACrC,QAAI;AAAa,aAAO;AACxB,WAAO;AAAA,EACT,GAAG,CAAC,aAAa,aAAa,UAAU,CAAC;AAEzC,QAAM,iBAAiB,QAAQ,MAAM;AACnC,QAAI,eAAe,WAAW;AAAU,aAAO,oBAAC,mBAAgB;AAChE,QAAI;AAAS,aAAO,oBAAC,WAAQ;AAC7B,QAAI;AAAS,aAAO;AACpB,WAAO;AAAA,EACT,GAAG,CAAC,SAAS,SAAS,UAAU,CAAC;AAEjC,QAAM,iBAAiB,QAAQ,MAAM;AACnC,QAAI,eAAe,WAAW;AAAU,aAAO,oBAAC,mBAAgB;AAChE,QAAI;AAAS,aAAO,oBAAC,WAAQ;AAC7B,QAAI;AAAS,aAAO;AACpB,WAAO;AAAA,EACT,GAAG,CAAC,SAAS,SAAS,UAAU,CAAC;AAEjC,QAAM,mBAAmB,QAAQ,MAAM;AACrC,QAAI,eAAe,aAAa;AAAY,aAAO,oBAAC,qBAAkB;AACtE,QAAI;AAAW,aAAO,oBAAC,aAAU;AACjC,QAAI;AAAW,aAAO;AACtB,WAAO;AAAA,EACT,GAAG,CAAC,WAAW,WAAW,UAAU,CAAC;AAErC,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -8,9 +8,11 @@ import {
8
8
  PageHeaderSummary,
9
9
  PageHeaderTitle
10
10
  } from "./PageHeader.js";
11
- import { DSPageHeaderSummaryWithSchema } from "./components/PageHeaderSummary.js";
12
- import { DSPageHeaderTitleWithSchema } from "./components/PageHeaderTitle.js";
13
- import { DSPageHeaderEditableTitleWithSchema } from "./components/PageHeaderEditableTitle.js";
11
+ import { DSPageHeaderSummaryWithSchema } from "./components/page-header-summary/index.js";
12
+ import { DSPageHeaderTitleWithSchema } from "./components/page-header-title/index.js";
13
+ import {
14
+ DSPageHeaderEditableTitleWithSchema
15
+ } from "./components/page-header-editable-title/index.js";
14
16
  export * from "./exported-related/index.js";
15
17
  export {
16
18
  DSPageHeaderEditableTitleWithSchema,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n DSPageHeaderV2,\n DSPageHeaderWithSchema,\n PageHeaderCustomRenderer,\n PageHeaderEditableTitle,\n PageHeaderMenu,\n PageHeaderSummary,\n PageHeaderTitle,\n} from './PageHeader.js';\nexport { DSPageHeaderSummaryWithSchema } from './components/PageHeaderSummary.js';\nexport { DSPageHeaderTitleWithSchema } from './components/PageHeaderTitle.js';\nexport { DSPageHeaderEditableTitleWithSchema } from './components/PageHeaderEditableTitle.js';\nexport * from './exported-related/index.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,qCAAqC;AAC9C,SAAS,mCAAmC;AAC5C,SAAS,2CAA2C;AACpD,cAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n DSPageHeaderV2,\n DSPageHeaderWithSchema,\n PageHeaderCustomRenderer,\n PageHeaderEditableTitle,\n PageHeaderMenu,\n PageHeaderSummary,\n PageHeaderTitle,\n} from './PageHeader.js';\nexport type { DSPageHeaderT } from './react-desc-prop-types.js';\nexport { DSPageHeaderSummaryWithSchema, type PageHeaderSummaryT } from './components/page-header-summary/index.js';\nexport { DSPageHeaderTitleWithSchema, type PageHeaderTitleT } from './components/page-header-title/index.js';\nexport {\n DSPageHeaderEditableTitleWithSchema,\n type PageHeaderEditableTitleT,\n} from './components/page-header-editable-title/index.js';\nexport * from './exported-related/index.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,qCAA8D;AACvE,SAAS,mCAA0D;AACnE;AAAA,EACE;AAAA,OAEK;AACP,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,10 @@
1
1
  import * as React from "react";
2
2
  import { globalAttributesPropTypes, PropTypes } from "@elliemae/ds-props-helpers";
3
+ const defaultProps = {
4
+ containerProps: {},
5
+ withBottomSeparator: true,
6
+ isSkeleton: false
7
+ };
3
8
  const PageHeaderPropTypes = {
4
9
  ...globalAttributesPropTypes,
5
10
  /** props injected to wrapper of page header */
@@ -26,11 +31,6 @@ const PageHeaderPropTypes = {
26
31
  withBottomSeparator: PropTypes.bool.description("Border bottom below the page header"),
27
32
  isSkeleton: PropTypes.bool.description("Loading state of the page header").defaultValue(false)
28
33
  };
29
- const defaultProps = {
30
- containerProps: {},
31
- withBottomSeparator: true,
32
- isSkeleton: false
33
- };
34
34
  export {
35
35
  PageHeaderPropTypes,
36
36
  defaultProps
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSPageHeaderT {\n export interface DefaultProps {\n withBottomSeparator: boolean;\n containerProps: object;\n isSkeleton: boolean;\n }\n\n export interface OptionalProps {\n breadcrumbs?: JSX.Element;\n pageTitle?: JSX.Element;\n backarrow?: JSX.Element;\n summary?: JSX.Element;\n toolbar?: JSX.Element;\n menu?: JSX.Element;\n Breadcrumbs?: () => JSX.Element;\n PageTitle?: () => JSX.Element;\n Backarrow?: () => JSX.Element;\n Summary?: () => JSX.Element;\n Toolbar?: () => JSX.Element;\n Menu?: () => JSX.Element;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n}\n\nexport const PageHeaderPropTypes = {\n ...globalAttributesPropTypes,\n /** props injected to wrapper of page header */\n containerProps: PropTypes.shape({}).description('props injected to wrapper of page header'),\n /** breadcrumbs component */\n breadcrumbs: PropTypes.node\n .description('breadcrumbs component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Breadcrumbs: PropTypes.func.description('breadcrumbs component'),\n /** PageHeaderTitle component */\n pageTitle: PropTypes.node\n .description('PageHeaderTitle component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n PageTitle: PropTypes.func.description('PageHeaderTitle component'),\n /** back arrow component */\n backarrow: PropTypes.node\n .description('back arrow component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Backarrow: PropTypes.func.description('back arrow component'),\n\n /** PageHeaderSummary component */\n summary: PropTypes.node\n .description('PageHeaderSummary component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Summary: PropTypes.func.description('PageHeaderSummary component'),\n /** toolbar component */\n toolbar: PropTypes.node\n .description('toolbar component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Toolbar: PropTypes.func.description('toolbar component'),\n\n /** PageHeaderMenu component */\n menu: PropTypes.node\n .description('PageHeaderMenu component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Menu: PropTypes.func.description('PageHeaderMenu component'),\n /** Border bottom below the page header */\n withBottomSeparator: PropTypes.bool.description('Border bottom below the page header'),\n isSkeleton: PropTypes.bool.description('Loading state of the page header').defaultValue(false),\n};\n\nexport const defaultProps: DSPageHeaderT.DefaultProps = {\n containerProps: {},\n withBottomSeparator: true,\n isSkeleton: false,\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,2BAA2B,iBAAiB;AA2B9C,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA;AAAA,EAEH,gBAAgB,UAAU,MAAM,CAAC,CAAC,EAAE,YAAY,0CAA0C;AAAA;AAAA,EAE1F,aAAa,UAAU,KACpB,YAAY,uBAAuB,EACnC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,aAAa,UAAU,KAAK,YAAY,uBAAuB;AAAA;AAAA,EAE/D,WAAW,UAAU,KAClB,YAAY,2BAA2B,EACvC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,WAAW,UAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA,EAEjE,WAAW,UAAU,KAClB,YAAY,sBAAsB,EAClC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,WAAW,UAAU,KAAK,YAAY,sBAAsB;AAAA;AAAA,EAG5D,SAAS,UAAU,KAChB,YAAY,6BAA6B,EACzC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,SAAS,UAAU,KAAK,YAAY,6BAA6B;AAAA;AAAA,EAEjE,SAAS,UAAU,KAChB,YAAY,mBAAmB,EAC/B,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,SAAS,UAAU,KAAK,YAAY,mBAAmB;AAAA;AAAA,EAGvD,MAAM,UAAU,KACb,YAAY,0BAA0B,EACtC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,MAAM,UAAU,KAAK,YAAY,0BAA0B;AAAA;AAAA,EAE3D,qBAAqB,UAAU,KAAK,YAAY,qCAAqC;AAAA,EACrF,YAAY,UAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAC/F;AAEO,MAAM,eAA2C;AAAA,EACtD,gBAAgB,CAAC;AAAA,EACjB,qBAAqB;AAAA,EACrB,YAAY;AACd;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { globalAttributesPropTypes, type GlobalAttributesT, PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSPageHeaderT {\n export interface DefaultProps {\n withBottomSeparator: boolean;\n containerProps: object;\n isSkeleton: boolean;\n }\n\n export interface OptionalProps {\n breadcrumbs?: JSX.Element;\n pageTitle?: JSX.Element;\n backarrow?: JSX.Element;\n summary?: JSX.Element;\n toolbar?: JSX.Element;\n menu?: JSX.Element;\n Breadcrumbs?: () => JSX.Element;\n PageTitle?: () => JSX.Element;\n Backarrow?: () => JSX.Element;\n Summary?: () => JSX.Element;\n Toolbar?: () => JSX.Element;\n Menu?: () => JSX.Element;\n }\n\n export interface RequiredProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n RequiredProps {}\n}\n\nexport const defaultProps: DSPageHeaderT.DefaultProps = {\n containerProps: {},\n withBottomSeparator: true,\n isSkeleton: false,\n};\n\nexport const PageHeaderPropTypes = {\n ...globalAttributesPropTypes,\n /** props injected to wrapper of page header */\n containerProps: PropTypes.shape({}).description('props injected to wrapper of page header'),\n /** breadcrumbs component */\n breadcrumbs: PropTypes.node\n .description('breadcrumbs component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Breadcrumbs: PropTypes.func.description('breadcrumbs component'),\n /** PageHeaderTitle component */\n pageTitle: PropTypes.node\n .description('PageHeaderTitle component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n PageTitle: PropTypes.func.description('PageHeaderTitle component'),\n /** back arrow component */\n backarrow: PropTypes.node\n .description('back arrow component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Backarrow: PropTypes.func.description('back arrow component'),\n\n /** PageHeaderSummary component */\n summary: PropTypes.node\n .description('PageHeaderSummary component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Summary: PropTypes.func.description('PageHeaderSummary component'),\n /** toolbar component */\n toolbar: PropTypes.node\n .description('toolbar component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Toolbar: PropTypes.func.description('toolbar component'),\n\n /** PageHeaderMenu component */\n menu: PropTypes.node\n .description('PageHeaderMenu component')\n .deprecated({ version: 'Prop will be removed on 05/01/2022' }),\n Menu: PropTypes.func.description('PageHeaderMenu component'),\n /** Border bottom below the page header */\n withBottomSeparator: PropTypes.bool.description('Border bottom below the page header'),\n isSkeleton: PropTypes.bool.description('Loading state of the page header').defaultValue(false),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,2BAAmD,iBAAiB;AAuCtE,MAAM,eAA2C;AAAA,EACtD,gBAAgB,CAAC;AAAA,EACjB,qBAAqB;AAAA,EACrB,YAAY;AACd;AAEO,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA;AAAA,EAEH,gBAAgB,UAAU,MAAM,CAAC,CAAC,EAAE,YAAY,0CAA0C;AAAA;AAAA,EAE1F,aAAa,UAAU,KACpB,YAAY,uBAAuB,EACnC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,aAAa,UAAU,KAAK,YAAY,uBAAuB;AAAA;AAAA,EAE/D,WAAW,UAAU,KAClB,YAAY,2BAA2B,EACvC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,WAAW,UAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA,EAEjE,WAAW,UAAU,KAClB,YAAY,sBAAsB,EAClC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,WAAW,UAAU,KAAK,YAAY,sBAAsB;AAAA;AAAA,EAG5D,SAAS,UAAU,KAChB,YAAY,6BAA6B,EACzC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,SAAS,UAAU,KAAK,YAAY,6BAA6B;AAAA;AAAA,EAEjE,SAAS,UAAU,KAChB,YAAY,mBAAmB,EAC/B,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,SAAS,UAAU,KAAK,YAAY,mBAAmB;AAAA;AAAA,EAGvD,MAAM,UAAU,KACb,YAAY,0BAA0B,EACtC,WAAW,EAAE,SAAS,qCAAqC,CAAC;AAAA,EAC/D,MAAM,UAAU,KAAK,YAAY,0BAA0B;AAAA;AAAA,EAE3D,qBAAqB,UAAU,KAAK,YAAY,qCAAqC;AAAA,EACrF,YAAY,UAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAC/F;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,53 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { PageHeaderEditableTitle } from "../index.js";
4
+ const testRequiredProps = {};
5
+ const testOptionalProps = {
6
+ children: "",
7
+ editing: false,
8
+ showMarker: false
9
+ };
10
+ const testPartialDefaults = {};
11
+ const testProps = {
12
+ ...testRequiredProps,
13
+ ...testOptionalProps,
14
+ ...testPartialDefaults
15
+ };
16
+ const testPropsAsSyntax = {
17
+ ...testRequiredProps,
18
+ ...testOptionalProps,
19
+ ...testPartialDefaults
20
+ };
21
+ const testCompleteDefaults = {};
22
+ const testInternalProps = {
23
+ ...testRequiredProps,
24
+ ...testOptionalProps,
25
+ ...testCompleteDefaults
26
+ };
27
+ const testInternalPropsAsSyntax = {
28
+ ...testRequiredProps,
29
+ ...testOptionalProps,
30
+ ...testCompleteDefaults
31
+ };
32
+ const testExplicitDefinition = {
33
+ children: "",
34
+ editing: false,
35
+ showMarker: false
36
+ };
37
+ const testInferedTypeCompatibility = {
38
+ children: "",
39
+ editing: false,
40
+ showMarker: false
41
+ };
42
+ const testDefinitionAsConst = {
43
+ children: "",
44
+ editing: false,
45
+ showMarker: false
46
+ };
47
+ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
48
+ /* @__PURE__ */ jsx(PageHeaderEditableTitle, { ...testExplicitDefinition }),
49
+ /* @__PURE__ */ jsx(PageHeaderEditableTitle, { ...testInferedTypeCompatibility }),
50
+ /* @__PURE__ */ jsx(PageHeaderEditableTitle, { ...testDefinitionAsConst }),
51
+ /* @__PURE__ */ jsx(PageHeaderEditableTitle, { children: "", editing: false, showMarker: false })
52
+ ] });
53
+ //# sourceMappingURL=typescript-page-header-editable-title-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-page-header-editable-title-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { PageHeaderEditableTitle } from '../index.js';\nimport type { PageHeaderEditableTitleT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = PageHeaderEditableTitleT.Props;\ntype ComponentPropsInternals = PageHeaderEditableTitleT.InternalProps;\ntype ComponentPropsDefaultProps = PageHeaderEditableTitleT.DefaultProps;\ntype ComponentPropsOptionalProps = PageHeaderEditableTitleT.OptionalProps;\ntype ComponentPropsRequiredProps = PageHeaderEditableTitleT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n children: '',\n editing: false,\n showMarker: false,\n};\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 children: '',\n editing: false,\n showMarker: false,\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 children: '',\n editing: false,\n showMarker: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n children: '',\n editing: false,\n showMarker: false,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <PageHeaderEditableTitle {...testExplicitDefinition} />\n <PageHeaderEditableTitle {...testInferedTypeCompatibility} />\n <PageHeaderEditableTitle {...testDefinitionAsConst} />\n {/* works with inline values */}\n <PageHeaderEditableTitle children=\"\" editing={false} showMarker={false} />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACuErB,mBAEE,KAFF;AAtEF,SAAS,+BAA+B;AAUxC,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD;AAAA,EACrD,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AACd;AAIA,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,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AACd;AAGA,MAAM,+BAA+B;AAAA,EACnC,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AACd;AAEA,MAAM,wBAAwB;AAAA,EAC5B,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AACd;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,2BAAyB,GAAG,wBAAwB;AAAA,EACrD,oBAAC,2BAAyB,GAAG,8BAA8B;AAAA,EAC3D,oBAAC,2BAAyB,GAAG,uBAAuB;AAAA,EAEpD,oBAAC,2BAAwB,UAAS,IAAG,SAAS,OAAO,YAAY,OAAO;AAAA,GAC1E;",
6
+ "names": []
7
+ }
@@ -0,0 +1,49 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { PageHeaderSummary } from "../index.js";
4
+ const testRequiredProps = {};
5
+ const testOptionalProps = {
6
+ value: 2,
7
+ label: ""
8
+ };
9
+ const testPartialDefaults = {};
10
+ const testProps = {
11
+ ...testRequiredProps,
12
+ ...testOptionalProps,
13
+ ...testPartialDefaults
14
+ };
15
+ const testPropsAsSyntax = {
16
+ ...testRequiredProps,
17
+ ...testOptionalProps,
18
+ ...testPartialDefaults
19
+ };
20
+ const testCompleteDefaults = {};
21
+ const testInternalProps = {
22
+ ...testRequiredProps,
23
+ ...testOptionalProps,
24
+ ...testCompleteDefaults
25
+ };
26
+ const testInternalPropsAsSyntax = {
27
+ ...testRequiredProps,
28
+ ...testOptionalProps,
29
+ ...testCompleteDefaults
30
+ };
31
+ const testExplicitDefinition = {
32
+ value: 2,
33
+ label: ""
34
+ };
35
+ const testInferedTypeCompatibility = {
36
+ value: 2,
37
+ label: ""
38
+ };
39
+ const testDefinitionAsConst = {
40
+ value: 2,
41
+ label: ""
42
+ };
43
+ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
44
+ /* @__PURE__ */ jsx(PageHeaderSummary, { ...testExplicitDefinition }),
45
+ /* @__PURE__ */ jsx(PageHeaderSummary, { ...testInferedTypeCompatibility }),
46
+ /* @__PURE__ */ jsx(PageHeaderSummary, { ...testDefinitionAsConst }),
47
+ /* @__PURE__ */ jsx(PageHeaderSummary, { value: 1, label: "" })
48
+ ] });
49
+ //# sourceMappingURL=typescript-page-header-summary-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-page-header-summary-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { PageHeaderSummary } from '../index.js';\nimport type { PageHeaderSummaryT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = PageHeaderSummaryT.Props;\ntype ComponentPropsInternals = PageHeaderSummaryT.InternalProps;\ntype ComponentPropsDefaultProps = PageHeaderSummaryT.DefaultProps;\ntype ComponentPropsOptionalProps = PageHeaderSummaryT.OptionalProps;\ntype ComponentPropsRequiredProps = PageHeaderSummaryT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n value: 2,\n label: '',\n};\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 value: 2,\n label: '',\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 value: 2,\n label: '',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n value: 2,\n label: '',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <PageHeaderSummary {...testExplicitDefinition} />\n <PageHeaderSummary {...testInferedTypeCompatibility} />\n <PageHeaderSummary {...testDefinitionAsConst} />\n {/* works with inline values */}\n <PageHeaderSummary value={1} label=\"\" />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACmErB,mBAEE,KAFF;AAlEF,SAAS,yBAAyB;AAUlC,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD;AAAA,EACrD,OAAO;AAAA,EACP,OAAO;AACT;AAIA,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,OAAO;AAAA,EACP,OAAO;AACT;AAGA,MAAM,+BAA+B;AAAA,EACnC,OAAO;AAAA,EACP,OAAO;AACT;AAEA,MAAM,wBAAwB;AAAA,EAC5B,OAAO;AAAA,EACP,OAAO;AACT;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,qBAAmB,GAAG,wBAAwB;AAAA,EAC/C,oBAAC,qBAAmB,GAAG,8BAA8B;AAAA,EACrD,oBAAC,qBAAmB,GAAG,uBAAuB;AAAA,EAE9C,oBAAC,qBAAkB,OAAO,GAAG,OAAM,IAAG;AAAA,GACxC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,51 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { PageHeaderTitle } from "../index.js";
4
+ const testRequiredProps = {};
5
+ const testOptionalProps = {};
6
+ const testPartialDefaults = {
7
+ children: ""
8
+ };
9
+ const testProps = {
10
+ ...testRequiredProps,
11
+ ...testOptionalProps,
12
+ ...testPartialDefaults
13
+ };
14
+ const testPropsAsSyntax = {
15
+ ...testRequiredProps,
16
+ ...testOptionalProps,
17
+ ...testPartialDefaults
18
+ };
19
+ const testCompleteDefaults = {
20
+ children: "",
21
+ showMarker: true
22
+ };
23
+ const testInternalProps = {
24
+ ...testRequiredProps,
25
+ ...testOptionalProps,
26
+ ...testCompleteDefaults
27
+ };
28
+ const testInternalPropsAsSyntax = {
29
+ ...testRequiredProps,
30
+ ...testOptionalProps,
31
+ ...testCompleteDefaults
32
+ };
33
+ const testExplicitDefinition = {
34
+ children: "",
35
+ showMarker: true
36
+ };
37
+ const testInferedTypeCompatibility = {
38
+ children: "",
39
+ showMarker: true
40
+ };
41
+ const testDefinitionAsConst = {
42
+ children: "",
43
+ showMarker: true
44
+ };
45
+ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
46
+ /* @__PURE__ */ jsx(PageHeaderTitle, { ...testExplicitDefinition }),
47
+ /* @__PURE__ */ jsx(PageHeaderTitle, { ...testInferedTypeCompatibility }),
48
+ /* @__PURE__ */ jsx(PageHeaderTitle, { ...testDefinitionAsConst }),
49
+ /* @__PURE__ */ jsx(PageHeaderTitle, { children: "", showMarker: true })
50
+ ] });
51
+ //# sourceMappingURL=typescript-page-header-title-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-page-header-title-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { PageHeaderTitle } from '../index.js';\nimport type { PageHeaderTitleT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = PageHeaderTitleT.Props;\ntype ComponentPropsInternals = PageHeaderTitleT.InternalProps;\ntype ComponentPropsDefaultProps = PageHeaderTitleT.DefaultProps;\ntype ComponentPropsOptionalProps = PageHeaderTitleT.OptionalProps;\ntype ComponentPropsRequiredProps = PageHeaderTitleT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\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 children: '',\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 children: '',\n showMarker: true,\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 children: '',\n showMarker: 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 children: '',\n showMarker: true,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n children: '',\n showMarker: true,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <PageHeaderTitle {...testExplicitDefinition} />\n <PageHeaderTitle {...testInferedTypeCompatibility} />\n <PageHeaderTitle {...testDefinitionAsConst} />\n {/* works with inline values */}\n <PageHeaderTitle children=\"\" showMarker={true} />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACqErB,mBAEE,KAFF;AApEF,SAAS,uBAAuB;AAUhC,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD,CAAC;AAIxD,MAAM,sBAA2D;AAAA,EAC/D,UAAU;AACZ;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,UAAU;AAAA,EACV,YAAY;AACd;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,UAAU;AAAA,EACV,YAAY;AACd;AAGA,MAAM,+BAA+B;AAAA,EACnC,UAAU;AAAA,EACV,YAAY;AACd;AAEA,MAAM,wBAAwB;AAAA,EAC5B,UAAU;AAAA,EACV,YAAY;AACd;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,mBAAiB,GAAG,wBAAwB;AAAA,EAC7C,oBAAC,mBAAiB,GAAG,8BAA8B;AAAA,EACnD,oBAAC,mBAAiB,GAAG,uBAAuB;AAAA,EAE5C,oBAAC,mBAAgB,UAAS,IAAG,YAAY,MAAM;AAAA,GACjD;",
6
+ "names": []
7
+ }