@a-type/ui 0.8.20 → 0.8.21
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/components/provider/Provider.js +4 -3
- package/dist/cjs/components/provider/Provider.js.map +1 -1
- package/dist/esm/components/provider/Provider.js +4 -3
- package/dist/esm/components/provider/Provider.js.map +1 -1
- package/package.json +1 -1
- package/src/components/provider/Provider.tsx +10 -7
|
@@ -6,14 +6,15 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const particles_js_1 = require("../particles.js");
|
|
7
7
|
const icon_js_1 = require("../icon.js");
|
|
8
8
|
const react_hot_toast_1 = require("react-hot-toast");
|
|
9
|
+
const tooltip_js_1 = require("../tooltip.js");
|
|
9
10
|
/**
|
|
10
11
|
* Provides all the stuff for all global junk.
|
|
11
12
|
*/
|
|
12
|
-
function Provider({ children, disableParticles, toastPosition = '
|
|
13
|
+
function Provider({ children, disableParticles, toastPosition = 'top-center', toastContainerClassName, }) {
|
|
13
14
|
const otherStuff = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(icon_js_1.IconSpritesheet, {}), (0, jsx_runtime_1.jsx)(react_hot_toast_1.Toaster, { position: toastPosition, containerClassName: toastContainerClassName })] }));
|
|
14
15
|
if (disableParticles)
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)(particles_js_1.ParticleLayer, { children: [children, otherStuff] }));
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(tooltip_js_1.TooltipProvider, { children: [children, otherStuff] }));
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(tooltip_js_1.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(particles_js_1.ParticleLayer, { children: [children, otherStuff] }) }));
|
|
17
18
|
}
|
|
18
19
|
exports.Provider = Provider;
|
|
19
20
|
//# sourceMappingURL=Provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/components/provider/Provider.tsx"],"names":[],"mappings":";;;;AACA,kDAAgD;AAChD,wCAA6C;AAC7C,qDAAyD;AASzD;;GAEG;AACH,SAAgB,QAAQ,CAAC,EACxB,QAAQ,EACR,gBAAgB,EAChB,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/components/provider/Provider.tsx"],"names":[],"mappings":";;;;AACA,kDAAgD;AAChD,wCAA6C;AAC7C,qDAAyD;AACzD,8CAAyD;AASzD;;GAEG;AACH,SAAgB,QAAQ,CAAC,EACxB,QAAQ,EACR,gBAAgB,EAChB,aAAa,GAAG,YAAY,EAC5B,uBAAuB,GACR;IACf,MAAM,UAAU,GAAG,CAClB,6DACC,uBAAC,yBAAe,KAAG,EACnB,uBAAC,yBAAO,IACP,QAAQ,EAAE,aAAa,EACvB,kBAAkB,EAAE,uBAAuB,GAC1C,IACA,CACH,CAAC;IAEF,IAAI,gBAAgB;QACnB,OAAO,CACN,wBAAC,4BAAe,eACd,QAAQ,EACR,UAAU,IACM,CAClB,CAAC;IAEH,OAAO,CACN,uBAAC,4BAAe,cACf,wBAAC,4BAAa,eACZ,QAAQ,EACR,UAAU,IACI,GACC,CAClB,CAAC;AACH,CAAC;AAhCD,4BAgCC"}
|
|
@@ -3,13 +3,14 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import { ParticleLayer } from '../particles.js';
|
|
4
4
|
import { IconSpritesheet } from '../icon.js';
|
|
5
5
|
import { Toaster } from 'react-hot-toast';
|
|
6
|
+
import { TooltipProvider } from '../tooltip.js';
|
|
6
7
|
/**
|
|
7
8
|
* Provides all the stuff for all global junk.
|
|
8
9
|
*/
|
|
9
|
-
export function Provider({ children, disableParticles, toastPosition = '
|
|
10
|
+
export function Provider({ children, disableParticles, toastPosition = 'top-center', toastContainerClassName, }) {
|
|
10
11
|
const otherStuff = (_jsxs(_Fragment, { children: [_jsx(IconSpritesheet, {}), _jsx(Toaster, { position: toastPosition, containerClassName: toastContainerClassName })] }));
|
|
11
12
|
if (disableParticles)
|
|
12
|
-
return (_jsxs(
|
|
13
|
-
return (_jsxs(ParticleLayer, { children: [children, otherStuff] }));
|
|
13
|
+
return (_jsxs(TooltipProvider, { children: [children, otherStuff] }));
|
|
14
|
+
return (_jsx(TooltipProvider, { children: _jsxs(ParticleLayer, { children: [children, otherStuff] }) }));
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=Provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/components/provider/Provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAiB,MAAM,iBAAiB,CAAC;AASzD;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,EACxB,QAAQ,EACR,gBAAgB,EAChB,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/components/provider/Provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAiB,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAW,eAAe,EAAE,MAAM,eAAe,CAAC;AASzD;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,EACxB,QAAQ,EACR,gBAAgB,EAChB,aAAa,GAAG,YAAY,EAC5B,uBAAuB,GACR;IACf,MAAM,UAAU,GAAG,CAClB,8BACC,KAAC,eAAe,KAAG,EACnB,KAAC,OAAO,IACP,QAAQ,EAAE,aAAa,EACvB,kBAAkB,EAAE,uBAAuB,GAC1C,IACA,CACH,CAAC;IAEF,IAAI,gBAAgB;QACnB,OAAO,CACN,MAAC,eAAe,eACd,QAAQ,EACR,UAAU,IACM,CAClB,CAAC;IAEH,OAAO,CACN,KAAC,eAAe,cACf,MAAC,aAAa,eACZ,QAAQ,EACR,UAAU,IACI,GACC,CAClB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { ParticleLayer } from '../particles.js';
|
|
3
3
|
import { IconSpritesheet } from '../icon.js';
|
|
4
4
|
import { Toaster, ToastPosition } from 'react-hot-toast';
|
|
5
|
+
import { Tooltip, TooltipProvider } from '../tooltip.js';
|
|
5
6
|
|
|
6
7
|
export interface ProviderProps {
|
|
7
8
|
children?: ReactNode;
|
|
@@ -16,7 +17,7 @@ export interface ProviderProps {
|
|
|
16
17
|
export function Provider({
|
|
17
18
|
children,
|
|
18
19
|
disableParticles,
|
|
19
|
-
toastPosition = '
|
|
20
|
+
toastPosition = 'top-center',
|
|
20
21
|
toastContainerClassName,
|
|
21
22
|
}: ProviderProps) {
|
|
22
23
|
const otherStuff = (
|
|
@@ -31,16 +32,18 @@ export function Provider({
|
|
|
31
32
|
|
|
32
33
|
if (disableParticles)
|
|
33
34
|
return (
|
|
34
|
-
|
|
35
|
+
<TooltipProvider>
|
|
35
36
|
{children}
|
|
36
37
|
{otherStuff}
|
|
37
|
-
|
|
38
|
+
</TooltipProvider>
|
|
38
39
|
);
|
|
39
40
|
|
|
40
41
|
return (
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
<TooltipProvider>
|
|
43
|
+
<ParticleLayer>
|
|
44
|
+
{children}
|
|
45
|
+
{otherStuff}
|
|
46
|
+
</ParticleLayer>
|
|
47
|
+
</TooltipProvider>
|
|
45
48
|
);
|
|
46
49
|
}
|