@xylabs/react-portal 3.1.0-rc.4 → 3.1.0-rc.5

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 (90) hide show
  1. package/dist/browser/components/Portal/Portal.d.ts.map +1 -0
  2. package/dist/browser/components/Portal/PortalProps.d.ts.map +1 -0
  3. package/dist/browser/components/Portal/index.d.ts.map +1 -0
  4. package/dist/browser/components/index.d.ts.map +1 -0
  5. package/dist/{index.d.ts.map → browser/index.d.ts.map} +1 -1
  6. package/dist/node/components/Portal/Portal.d.mts +3 -0
  7. package/dist/node/components/Portal/Portal.d.mts.map +1 -0
  8. package/dist/node/components/Portal/Portal.d.ts +3 -0
  9. package/dist/node/components/Portal/Portal.d.ts.map +1 -0
  10. package/dist/node/components/Portal/Portal.js.map +1 -0
  11. package/dist/node/components/Portal/Portal.mjs.map +1 -0
  12. package/dist/node/components/Portal/PortalProps.d.mts +7 -0
  13. package/dist/node/components/Portal/PortalProps.d.mts.map +1 -0
  14. package/dist/node/components/Portal/PortalProps.d.ts +7 -0
  15. package/dist/node/components/Portal/PortalProps.d.ts.map +1 -0
  16. package/dist/node/components/Portal/PortalProps.js.map +1 -0
  17. package/dist/node/components/Portal/index.d.mts +3 -0
  18. package/dist/node/components/Portal/index.d.mts.map +1 -0
  19. package/dist/node/components/Portal/index.d.ts +3 -0
  20. package/dist/node/components/Portal/index.d.ts.map +1 -0
  21. package/dist/node/components/Portal/index.js.map +1 -0
  22. package/dist/node/components/Portal/index.mjs.map +1 -0
  23. package/dist/node/components/index.d.mts +2 -0
  24. package/dist/node/components/index.d.mts.map +1 -0
  25. package/dist/node/components/index.d.ts +2 -0
  26. package/dist/node/components/index.d.ts.map +1 -0
  27. package/dist/node/components/index.js.map +1 -0
  28. package/dist/node/components/index.mjs.map +1 -0
  29. package/dist/{index.d.mts.map → node/index.d.mts.map} +1 -1
  30. package/dist/node/index.d.ts +2 -0
  31. package/dist/node/index.d.ts.map +1 -0
  32. package/dist/node/index.js.map +1 -0
  33. package/dist/node/index.mjs.map +1 -0
  34. package/package.json +13 -19
  35. package/dist/components/Portal/Portal.d.ts.map +0 -1
  36. package/dist/components/Portal/Portal.js.map +0 -1
  37. package/dist/components/Portal/Portal.mjs.map +0 -1
  38. package/dist/components/Portal/PortalProps.d.ts.map +0 -1
  39. package/dist/components/Portal/PortalProps.js.map +0 -1
  40. package/dist/components/Portal/index.d.ts.map +0 -1
  41. package/dist/components/Portal/index.js.map +0 -1
  42. package/dist/components/Portal/index.mjs.map +0 -1
  43. package/dist/components/index.d.ts.map +0 -1
  44. package/dist/components/index.js.map +0 -1
  45. package/dist/components/index.mjs.map +0 -1
  46. package/dist/esm/types/images.d.js +0 -1
  47. package/dist/esm/types/images.d.js.map +0 -1
  48. package/dist/index.js.map +0 -1
  49. package/dist/index.mjs.map +0 -1
  50. package/dist/types/images.d.js +0 -2
  51. package/dist/types/images.d.js.map +0 -1
  52. package/dist/types/images.d.mjs +0 -1
  53. package/dist/types/images.d.mjs.map +0 -1
  54. /package/dist/{components/Portal/Portal.d.ts → browser/components/Portal/Portal.d.mts} +0 -0
  55. /package/dist/{esm/components/Portal/Portal.d.ts.map → browser/components/Portal/Portal.d.mts.map} +0 -0
  56. /package/dist/{esm → browser}/components/Portal/Portal.d.ts +0 -0
  57. /package/dist/{esm → browser}/components/Portal/Portal.js +0 -0
  58. /package/dist/{esm → browser}/components/Portal/Portal.js.map +0 -0
  59. /package/dist/{components/Portal/PortalProps.d.ts → browser/components/Portal/PortalProps.d.mts} +0 -0
  60. /package/dist/{esm/components/Portal/PortalProps.d.ts.map → browser/components/Portal/PortalProps.d.mts.map} +0 -0
  61. /package/dist/{esm → browser}/components/Portal/PortalProps.d.ts +0 -0
  62. /package/dist/{esm → browser}/components/Portal/PortalProps.js +0 -0
  63. /package/dist/{esm → browser}/components/Portal/PortalProps.js.map +0 -0
  64. /package/dist/{components/Portal/index.d.ts → browser/components/Portal/index.d.mts} +0 -0
  65. /package/dist/{esm/components/Portal/index.d.ts.map → browser/components/Portal/index.d.mts.map} +0 -0
  66. /package/dist/{esm → browser}/components/Portal/index.d.ts +0 -0
  67. /package/dist/{esm → browser}/components/Portal/index.js +0 -0
  68. /package/dist/{esm → browser}/components/Portal/index.js.map +0 -0
  69. /package/dist/{components/index.d.ts → browser/components/index.d.mts} +0 -0
  70. /package/dist/{esm/components/index.d.ts.map → browser/components/index.d.mts.map} +0 -0
  71. /package/dist/{esm → browser}/components/index.d.ts +0 -0
  72. /package/dist/{esm → browser}/components/index.js +0 -0
  73. /package/dist/{esm → browser}/components/index.js.map +0 -0
  74. /package/dist/{index.d.mts → browser/index.d.mts} +0 -0
  75. /package/dist/{esm/index.d.ts.map → browser/index.d.mts.map} +0 -0
  76. /package/dist/{esm → browser}/index.d.ts +0 -0
  77. /package/dist/{esm → browser}/index.js +0 -0
  78. /package/dist/{esm → browser}/index.js.map +0 -0
  79. /package/dist/{components → node/components}/Portal/Portal.js +0 -0
  80. /package/dist/{components → node/components}/Portal/Portal.mjs +0 -0
  81. /package/dist/{components → node/components}/Portal/PortalProps.js +0 -0
  82. /package/dist/{components → node/components}/Portal/PortalProps.mjs +0 -0
  83. /package/dist/{components → node/components}/Portal/PortalProps.mjs.map +0 -0
  84. /package/dist/{components → node/components}/Portal/index.js +0 -0
  85. /package/dist/{components → node/components}/Portal/index.mjs +0 -0
  86. /package/dist/{components → node/components}/index.js +0 -0
  87. /package/dist/{components → node/components}/index.mjs +0 -0
  88. /package/dist/{index.d.ts → node/index.d.mts} +0 -0
  89. /package/dist/{index.js → node/index.js} +0 -0
  90. /package/dist/{index.mjs → node/index.mjs} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiBxC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalProps.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/PortalProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { PortalProps } from './PortalProps';
2
+ export declare const Portal: React.FC<PortalProps>;
3
+ //# sourceMappingURL=Portal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiBxC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { PortalProps } from './PortalProps';
2
+ export declare const Portal: React.FC<PortalProps>;
3
+ //# sourceMappingURL=Portal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiBxC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Portal/Portal.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { PortalProps } from './PortalProps'\n\nexport const Portal: React.FC<PortalProps> = ({ children, className, el = 'div', target = 'body' }: PortalProps) => {\n const [container] = useState(document.createElement(el))\n if (className) {\n container.classList.add(className)\n }\n useEffect(() => {\n const targetElement = document.querySelector(target)\n if (!targetElement) {\n console.warn(`Unable to find target element: ${target}`)\n }\n targetElement?.appendChild(container)\n return () => {\n targetElement?.removeChild(container)\n }\n }, [container, target])\n\n return createPortal(children, container)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AACpC,uBAA6B;AAItB,MAAM,SAAgC,CAAC,EAAE,UAAU,WAAW,KAAK,OAAO,SAAS,OAAO,MAAmB;AAClH,QAAM,CAAC,SAAS,QAAI,uBAAS,SAAS,cAAc,EAAE,CAAC;AACvD,MAAI,WAAW;AACb,cAAU,UAAU,IAAI,SAAS;AAAA,EACnC;AACA,8BAAU,MAAM;AACd,UAAM,gBAAgB,SAAS,cAAc,MAAM;AACnD,QAAI,CAAC,eAAe;AAClB,cAAQ,KAAK,kCAAkC,MAAM,EAAE;AAAA,IACzD;AACA,mBAAe,YAAY,SAAS;AACpC,WAAO,MAAM;AACX,qBAAe,YAAY,SAAS;AAAA,IACtC;AAAA,EACF,GAAG,CAAC,WAAW,MAAM,CAAC;AAEtB,aAAO,+BAAa,UAAU,SAAS;AACzC;","names":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Portal/Portal.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { PortalProps } from './PortalProps'\n\nexport const Portal: React.FC<PortalProps> = ({ children, className, el = 'div', target = 'body' }: PortalProps) => {\n const [container] = useState(document.createElement(el))\n if (className) {\n container.classList.add(className)\n }\n useEffect(() => {\n const targetElement = document.querySelector(target)\n if (!targetElement) {\n console.warn(`Unable to find target element: ${target}`)\n }\n targetElement?.appendChild(container)\n return () => {\n targetElement?.removeChild(container)\n }\n }, [container, target])\n\n return createPortal(children, container)\n}\n"],"mappings":"AAAA,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAItB,MAAM,SAAgC,CAAC,EAAE,UAAU,WAAW,KAAK,OAAO,SAAS,OAAO,MAAmB;AAClH,QAAM,CAAC,SAAS,IAAI,SAAS,SAAS,cAAc,EAAE,CAAC;AACvD,MAAI,WAAW;AACb,cAAU,UAAU,IAAI,SAAS;AAAA,EACnC;AACA,YAAU,MAAM;AACd,UAAM,gBAAgB,SAAS,cAAc,MAAM;AACnD,QAAI,CAAC,eAAe;AAClB,cAAQ,KAAK,kCAAkC,MAAM,EAAE;AAAA,IACzD;AACA,mBAAe,YAAY,SAAS;AACpC,WAAO,MAAM;AACX,qBAAe,YAAY,SAAS;AAAA,IACtC;AAAA,EACF,GAAG,CAAC,WAAW,MAAM,CAAC;AAEtB,SAAO,aAAa,UAAU,SAAS;AACzC;","names":[]}
@@ -0,0 +1,7 @@
1
+ export interface PortalProps {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ el?: string;
5
+ target?: string;
6
+ }
7
+ //# sourceMappingURL=PortalProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalProps.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/PortalProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
@@ -0,0 +1,7 @@
1
+ export interface PortalProps {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ el?: string;
5
+ target?: string;
6
+ }
7
+ //# sourceMappingURL=PortalProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalProps.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/PortalProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Portal/PortalProps.ts"],"sourcesContent":["export interface PortalProps {\n children: React.ReactNode\n className?: string\n el?: string\n target?: string\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,3 @@
1
+ export * from './Portal';
2
+ export * from './PortalProps';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './Portal';
2
+ export * from './PortalProps';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Portal/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Portal/index.ts"],"sourcesContent":["export * from './Portal'\nexport * from './PortalProps'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAc,qBAAd;AACA,2BAAc,0BADd;","names":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Portal/index.ts"],"sourcesContent":["export * from './Portal'\nexport * from './PortalProps'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
@@ -0,0 +1,2 @@
1
+ export * from './Portal';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './Portal';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './Portal'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,qBAAd;","names":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './Portal'\n"],"mappings":"AAAA,cAAc;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './components'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,yBAAd;","names":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './components'\n"],"mappings":"AAAA,cAAc;","names":[]}
package/package.json CHANGED
@@ -15,8 +15,8 @@
15
15
  "description": "Common React library for all XY Labs projects that use React",
16
16
  "devDependencies": {
17
17
  "@types/react-dom": "^18.2.7",
18
- "@xylabs/ts-scripts-yarn3": "^3.0.36",
19
- "@xylabs/tsconfig-react": "^3.0.36",
18
+ "@xylabs/ts-scripts-yarn3": "^3.0.52",
19
+ "@xylabs/tsconfig-react": "^3.0.52",
20
20
  "react": "^18.2.0",
21
21
  "react-dom": "^18.2.0",
22
22
  "typescript": "^5.2.2"
@@ -29,33 +29,28 @@
29
29
  ".": {
30
30
  "node": {
31
31
  "import": {
32
- "types": "./dist/index.d.mts",
33
- "default": "./dist/index.mjs"
32
+ "types": "./dist/node/index.d.mts",
33
+ "default": "./dist/node/index.mjs"
34
34
  },
35
35
  "require": {
36
- "types": "./dist/index.d.ts",
37
- "default": "./dist/index.js"
36
+ "types": "./dist/node/index.d.ts",
37
+ "default": "./dist/node/index.js"
38
38
  }
39
39
  },
40
40
  "browser": {
41
- "import": {
42
- "types": "./dist/esm/index.d.ts",
43
- "default": "./dist/esm/index.js"
44
- },
45
- "require": {
46
- "types": "./dist/index.d.ts",
47
- "default": "./dist/index.js"
48
- }
41
+ "types": "./dist/browser/index.d.ts",
42
+ "default": "./dist/browser/index.js"
49
43
  },
50
- "default": "./dist/index.mjs"
44
+ "default": "./dist/browser/index.js"
51
45
  },
52
46
  "./dist/docs.json": {
53
47
  "default": "./dist/docs.json"
54
48
  },
55
49
  "./package.json": "./package.json"
56
50
  },
57
- "main": "dist/index.js",
58
- "module": "dist/index.mjs",
51
+ "types": "dist/browser/index.d.ts",
52
+ "main": "./dist/node/index.js",
53
+ "module": "./dist/browser/index.js",
59
54
  "homepage": "https://xylabs.com",
60
55
  "keywords": [
61
56
  "utility",
@@ -71,7 +66,6 @@
71
66
  "url": "https://github.com/xylabs/sdk-react.git"
72
67
  },
73
68
  "sideEffects": false,
74
- "types": "dist/index.d.ts",
75
- "version": "3.1.0-rc.4",
69
+ "version": "3.1.0-rc.5",
76
70
  "stableVersion": "3.0.0"
77
71
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiBxC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Portal/Portal.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { PortalProps } from './PortalProps'\n\nexport const Portal: React.FC<PortalProps> = ({ children, className, el = 'div', target = 'body' }: PortalProps) => {\n const [container] = useState(document.createElement(el))\n if (className) {\n container.classList.add(className)\n }\n useEffect(() => {\n const targetElement = document.querySelector(target)\n if (!targetElement) {\n console.warn(`Unable to find target element: ${target}`)\n }\n targetElement?.appendChild(container)\n return () => {\n targetElement?.removeChild(container)\n }\n }, [container, target])\n\n return createPortal(children, container)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AACpC,uBAA6B;AAItB,MAAM,SAAgC,CAAC,EAAE,UAAU,WAAW,KAAK,OAAO,SAAS,OAAO,MAAmB;AAClH,QAAM,CAAC,SAAS,QAAI,uBAAS,SAAS,cAAc,EAAE,CAAC;AACvD,MAAI,WAAW;AACb,cAAU,UAAU,IAAI,SAAS;AAAA,EACnC;AACA,8BAAU,MAAM;AACd,UAAM,gBAAgB,SAAS,cAAc,MAAM;AACnD,QAAI,CAAC,eAAe;AAClB,cAAQ,KAAK,kCAAkC,MAAM,EAAE;AAAA,IACzD;AACA,mBAAe,YAAY,SAAS;AACpC,WAAO,MAAM;AACX,qBAAe,YAAY,SAAS;AAAA,IACtC;AAAA,EACF,GAAG,CAAC,WAAW,MAAM,CAAC;AAEtB,aAAO,+BAAa,UAAU,SAAS;AACzC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Portal/Portal.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { PortalProps } from './PortalProps'\n\nexport const Portal: React.FC<PortalProps> = ({ children, className, el = 'div', target = 'body' }: PortalProps) => {\n const [container] = useState(document.createElement(el))\n if (className) {\n container.classList.add(className)\n }\n useEffect(() => {\n const targetElement = document.querySelector(target)\n if (!targetElement) {\n console.warn(`Unable to find target element: ${target}`)\n }\n targetElement?.appendChild(container)\n return () => {\n targetElement?.removeChild(container)\n }\n }, [container, target])\n\n return createPortal(children, container)\n}\n"],"mappings":"AAAA,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAItB,MAAM,SAAgC,CAAC,EAAE,UAAU,WAAW,KAAK,OAAO,SAAS,OAAO,MAAmB;AAClH,QAAM,CAAC,SAAS,IAAI,SAAS,SAAS,cAAc,EAAE,CAAC;AACvD,MAAI,WAAW;AACb,cAAU,UAAU,IAAI,SAAS;AAAA,EACnC;AACA,YAAU,MAAM;AACd,UAAM,gBAAgB,SAAS,cAAc,MAAM;AACnD,QAAI,CAAC,eAAe;AAClB,cAAQ,KAAK,kCAAkC,MAAM,EAAE;AAAA,IACzD;AACA,mBAAe,YAAY,SAAS;AACpC,WAAO,MAAM;AACX,qBAAe,YAAY,SAAS;AAAA,IACtC;AAAA,EACF,GAAG,CAAC,WAAW,MAAM,CAAC;AAEtB,SAAO,aAAa,UAAU,SAAS;AACzC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PortalProps.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/PortalProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Portal/PortalProps.ts"],"sourcesContent":["export interface PortalProps {\n children: React.ReactNode\n className?: string\n el?: string\n target?: string\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Portal/index.ts"],"sourcesContent":["export * from './Portal'\nexport * from './PortalProps'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAc,qBAAd;AACA,2BAAc,0BADd;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Portal/index.ts"],"sourcesContent":["export * from './Portal'\nexport * from './PortalProps'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './Portal'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,qBAAd;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './Portal'\n"],"mappings":"AAAA,cAAc;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=images.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './components'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,yBAAd;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './components'\n"],"mappings":"AAAA,cAAc;","names":[]}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=images.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=images.d.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes