@elliemae/ds-hooks-on-overflow-change 3.80.0-next.81 → 3.80.0-next.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/typescript-testing/typescript-on-overflow-change.js +8 -4
- package/dist/cjs/typescript-testing/typescript-on-overflow-change.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-on-overflow-change.js +8 -4
- package/dist/esm/typescript-testing/typescript-on-overflow-change.js.map +2 -2
- package/package.json +4 -4
|
@@ -55,19 +55,23 @@ const TestComponent = ({ onOverflowStateChange }) => {
|
|
|
55
55
|
);
|
|
56
56
|
};
|
|
57
57
|
const testExplicitDefinition = {
|
|
58
|
-
onOverflowStateChange: (isOverflowing) =>
|
|
58
|
+
onOverflowStateChange: (isOverflowing) => {
|
|
59
|
+
}
|
|
59
60
|
};
|
|
60
61
|
const testInferredTypeCompatibility = {
|
|
61
|
-
onOverflowStateChange: (isOverflowing) =>
|
|
62
|
+
onOverflowStateChange: (isOverflowing) => {
|
|
63
|
+
}
|
|
62
64
|
};
|
|
63
65
|
const testDefinitionAsConst = {
|
|
64
|
-
onOverflowStateChange: (isOverflowing) =>
|
|
66
|
+
onOverflowStateChange: (isOverflowing) => {
|
|
67
|
+
}
|
|
65
68
|
};
|
|
66
69
|
const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
67
70
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestComponent, { ...testExplicitDefinition }),
|
|
68
71
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestComponent, { ...testInferredTypeCompatibility }),
|
|
69
72
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestComponent, { ...testDefinitionAsConst }),
|
|
70
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestComponent, { onOverflowStateChange: (isOverflowing) =>
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TestComponent, { onOverflowStateChange: (isOverflowing) => {
|
|
74
|
+
} })
|
|
71
75
|
] });
|
|
72
76
|
var typescript_on_overflow_change_default = ExampleUsageComponent;
|
|
73
77
|
//# sourceMappingURL=typescript-on-overflow-change.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/typescript-testing/typescript-on-overflow-change.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport React from 'react';\n// eslint-disable-next-line local-rules/custom-rule\nimport { useOnOverflowChange } from '../DSHooksIsOverflowing';\n\ntype TestComponentProps = {\n onOverflowStateChange: (isOverflowing: boolean) => void;\n};\n\nconst TestComponent: React.FC<TestComponentProps> = ({ onOverflowStateChange }) => {\n const { handleRef } = useOnOverflowChange({ onOverflowStateChange });\n\n return (\n <div\n data-testid=\"container\"\n ref={(node) => {\n if (node) {\n handleRef(node);\n }\n }}\n style={{\n width: '100px',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n }}\n >\n This is long text that should overflow the container.\n </div>\n );\n};\n\nconst testExplicitDefinition: TestComponentProps = {\n onOverflowStateChange: (isOverflowing) => {},\n};\n\nconst testInferredTypeCompatibility = {\n onOverflowStateChange: (isOverflowing: boolean) => {},\n} as TestComponentProps;\n\nconst testDefinitionAsConst = {\n onOverflowStateChange: (isOverflowing: boolean) => {},\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* Works with explicitly casted props */}\n <TestComponent {...testExplicitDefinition} />\n <TestComponent {...testInferredTypeCompatibility} />\n <TestComponent {...testDefinitionAsConst} />\n\n {/* Inline props test */}\n <TestComponent onOverflowStateChange={(isOverflowing) => {}} />\n </>\n);\n\nexport default ExampleUsageComponent;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADanB;AAVJ,kCAAoC;AAMpC,MAAM,gBAA8C,CAAC,EAAE,sBAAsB,MAAM;AACjF,QAAM,EAAE,UAAU,QAAI,iDAAoB,EAAE,sBAAsB,CAAC;AAEnE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,KAAK,CAAC,SAAS;AACb,YAAI,MAAM;AACR,oBAAU,IAAI;AAAA,QAChB;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,UAAU;AAAA,QACV,YAAY;AAAA,MACd;AAAA,MACD;AAAA;AAAA,EAED;AAEJ;AAEA,MAAM,yBAA6C;AAAA,EACjD,uBAAuB,CAAC,kBAAkB;AAAA,EAAC;AAC7C;AAEA,MAAM,gCAAgC;AAAA,EACpC,uBAAuB,CAAC,kBAA2B;AAAA,EAAC;AACtD;AAEA,MAAM,wBAAwB;AAAA,EAC5B,uBAAuB,CAAC,kBAA2B;AAAA,EAAC;AACtD;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,iBAAe,GAAG,wBAAwB;AAAA,EAC3C,4CAAC,iBAAe,GAAG,+BAA+B;AAAA,EAClD,4CAAC,iBAAe,GAAG,uBAAuB;AAAA,EAG1C,4CAAC,iBAAc,uBAAuB,CAAC,kBAAkB;AAAA,EAAC,GAAG;AAAA,GAC/D;AAGF,IAAO,wCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,19 +22,23 @@ const TestComponent = ({ onOverflowStateChange }) => {
|
|
|
22
22
|
);
|
|
23
23
|
};
|
|
24
24
|
const testExplicitDefinition = {
|
|
25
|
-
onOverflowStateChange: (isOverflowing) =>
|
|
25
|
+
onOverflowStateChange: (isOverflowing) => {
|
|
26
|
+
}
|
|
26
27
|
};
|
|
27
28
|
const testInferredTypeCompatibility = {
|
|
28
|
-
onOverflowStateChange: (isOverflowing) =>
|
|
29
|
+
onOverflowStateChange: (isOverflowing) => {
|
|
30
|
+
}
|
|
29
31
|
};
|
|
30
32
|
const testDefinitionAsConst = {
|
|
31
|
-
onOverflowStateChange: (isOverflowing) =>
|
|
33
|
+
onOverflowStateChange: (isOverflowing) => {
|
|
34
|
+
}
|
|
32
35
|
};
|
|
33
36
|
const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
34
37
|
/* @__PURE__ */ jsx(TestComponent, { ...testExplicitDefinition }),
|
|
35
38
|
/* @__PURE__ */ jsx(TestComponent, { ...testInferredTypeCompatibility }),
|
|
36
39
|
/* @__PURE__ */ jsx(TestComponent, { ...testDefinitionAsConst }),
|
|
37
|
-
/* @__PURE__ */ jsx(TestComponent, { onOverflowStateChange: (isOverflowing) =>
|
|
40
|
+
/* @__PURE__ */ jsx(TestComponent, { onOverflowStateChange: (isOverflowing) => {
|
|
41
|
+
} })
|
|
38
42
|
] });
|
|
39
43
|
var typescript_on_overflow_change_default = ExampleUsageComponent;
|
|
40
44
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-on-overflow-change.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport React from 'react';\n// eslint-disable-next-line local-rules/custom-rule\nimport { useOnOverflowChange } from '../DSHooksIsOverflowing';\n\ntype TestComponentProps = {\n onOverflowStateChange: (isOverflowing: boolean) => void;\n};\n\nconst TestComponent: React.FC<TestComponentProps> = ({ onOverflowStateChange }) => {\n const { handleRef } = useOnOverflowChange({ onOverflowStateChange });\n\n return (\n <div\n data-testid=\"container\"\n ref={(node) => {\n if (node) {\n handleRef(node);\n }\n }}\n style={{\n width: '100px',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n }}\n >\n This is long text that should overflow the container.\n </div>\n );\n};\n\nconst testExplicitDefinition: TestComponentProps = {\n onOverflowStateChange: (isOverflowing) => {},\n};\n\nconst testInferredTypeCompatibility = {\n onOverflowStateChange: (isOverflowing: boolean) => {},\n} as TestComponentProps;\n\nconst testDefinitionAsConst = {\n onOverflowStateChange: (isOverflowing: boolean) => {},\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* Works with explicitly casted props */}\n <TestComponent {...testExplicitDefinition} />\n <TestComponent {...testInferredTypeCompatibility} />\n <TestComponent {...testDefinitionAsConst} />\n\n {/* Inline props test */}\n <TestComponent onOverflowStateChange={(isOverflowing) => {}} />\n </>\n);\n\nexport default ExampleUsageComponent;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACanB,SA+BF,UA/BE,KA+BF,YA/BE;AAVJ,SAAS,2BAA2B;AAMpC,MAAM,gBAA8C,CAAC,EAAE,sBAAsB,MAAM;AACjF,QAAM,EAAE,UAAU,IAAI,oBAAoB,EAAE,sBAAsB,CAAC;AAEnE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,KAAK,CAAC,SAAS;AACb,YAAI,MAAM;AACR,oBAAU,IAAI;AAAA,QAChB;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACL,OAAO;AAAA,QACP,UAAU;AAAA,QACV,YAAY;AAAA,MACd;AAAA,MACD;AAAA;AAAA,EAED;AAEJ;AAEA,MAAM,yBAA6C;AAAA,EACjD,uBAAuB,CAAC,kBAAkB;AAAA,EAAC;AAC7C;AAEA,MAAM,gCAAgC;AAAA,EACpC,uBAAuB,CAAC,kBAA2B;AAAA,EAAC;AACtD;AAEA,MAAM,wBAAwB;AAAA,EAC5B,uBAAuB,CAAC,kBAA2B;AAAA,EAAC;AACtD;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,iBAAe,GAAG,wBAAwB;AAAA,EAC3C,oBAAC,iBAAe,GAAG,+BAA+B;AAAA,EAClD,oBAAC,iBAAe,GAAG,uBAAuB;AAAA,EAG1C,oBAAC,iBAAc,uBAAuB,CAAC,kBAAkB;AAAA,EAAC,GAAG;AAAA,GAC/D;AAGF,IAAO,wCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-hooks-on-overflow-change",
|
|
3
|
-
"version": "3.80.0-next.
|
|
3
|
+
"version": "3.80.0-next.83",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Hooks Is Overflowing",
|
|
6
6
|
"files": [
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-props-helpers": "3.80.0-next.
|
|
39
|
+
"@elliemae/ds-props-helpers": "3.80.0-next.83"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@elliemae/ds-monorepo-devops": "3.80.0-next.
|
|
43
|
-
"@elliemae/ds-test-utils": "3.80.0-next.
|
|
42
|
+
"@elliemae/ds-monorepo-devops": "3.80.0-next.83",
|
|
43
|
+
"@elliemae/ds-test-utils": "3.80.0-next.83",
|
|
44
44
|
"@playwright/experimental-ct-react": "1.61.1",
|
|
45
45
|
"jest": "^30.0.0",
|
|
46
46
|
"styled-components": "~5.3.11"
|