@a-type/ui 1.1.10 → 1.1.12
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/forms/index.d.ts +1 -0
- package/dist/cjs/components/forms/index.js +1 -0
- package/dist/cjs/components/forms/index.js.map +1 -1
- package/dist/cjs/components/provider/Provider.d.ts +2 -1
- package/dist/cjs/components/provider/Provider.js +2 -2
- package/dist/cjs/components/provider/Provider.js.map +1 -1
- package/dist/cjs/hooks/useVisualViewportOffset.d.ts +1 -1
- package/dist/cjs/hooks/useVisualViewportOffset.js +4 -2
- package/dist/cjs/hooks/useVisualViewportOffset.js.map +1 -1
- package/dist/esm/components/forms/index.d.ts +1 -0
- package/dist/esm/components/forms/index.js +1 -0
- package/dist/esm/components/forms/index.js.map +1 -1
- package/dist/esm/components/provider/Provider.d.ts +2 -1
- package/dist/esm/components/provider/Provider.js +2 -2
- package/dist/esm/components/provider/Provider.js.map +1 -1
- package/dist/esm/hooks/useVisualViewportOffset.d.ts +1 -1
- package/dist/esm/hooks/useVisualViewportOffset.js +4 -2
- package/dist/esm/hooks/useVisualViewportOffset.js.map +1 -1
- package/package.json +1 -1
- package/src/components/forms/index.tsx +1 -0
- package/src/components/provider/Provider.tsx +3 -1
- package/src/hooks/useVisualViewportOffset.ts +4 -2
|
@@ -21,4 +21,5 @@ __exportStar(require("./TextField.js"), exports);
|
|
|
21
21
|
__exportStar(require("./FormikForm.js"), exports);
|
|
22
22
|
__exportStar(require("./hooks.js"), exports);
|
|
23
23
|
__exportStar(require("./CheckboxField.js"), exports);
|
|
24
|
+
__exportStar(require("./NumberStepperField.jsx"), exports);
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/forms/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,oDAAkC;AAClC,iDAA+B;AAC/B,kDAAgC;AAChC,6CAA2B;AAC3B,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/forms/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,oDAAkC;AAClC,iDAA+B;AAC/B,kDAAgC;AAChC,6CAA2B;AAC3B,qDAAmC;AACnC,2DAAwC"}
|
|
@@ -5,8 +5,9 @@ export interface ProviderProps {
|
|
|
5
5
|
disableParticles?: boolean;
|
|
6
6
|
toastPosition?: ToastPosition;
|
|
7
7
|
toastContainerClassName?: string;
|
|
8
|
+
disableViewportOffset?: boolean;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Provides all the stuff for all global junk.
|
|
11
12
|
*/
|
|
12
|
-
export declare function Provider({ children, disableParticles, toastPosition, toastContainerClassName, }: ProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function Provider({ children, disableParticles, toastPosition, toastContainerClassName, disableViewportOffset }: ProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,8 +11,8 @@ const hooks_js_1 = require("../../hooks.js");
|
|
|
11
11
|
/**
|
|
12
12
|
* Provides all the stuff for all global junk.
|
|
13
13
|
*/
|
|
14
|
-
function Provider({ children, disableParticles, toastPosition = 'top-center', toastContainerClassName, }) {
|
|
15
|
-
(0, hooks_js_1.useVisualViewportOffset)();
|
|
14
|
+
function Provider({ children, disableParticles, toastPosition = 'top-center', toastContainerClassName, disableViewportOffset }) {
|
|
15
|
+
(0, hooks_js_1.useVisualViewportOffset)(disableViewportOffset);
|
|
16
16
|
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 })] }));
|
|
17
17
|
if (disableParticles)
|
|
18
18
|
return ((0, jsx_runtime_1.jsxs)(tooltip_js_1.TooltipProvider, { children: [children, otherStuff] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/components/provider/Provider.tsx"],"names":[],"mappings":";;;;AACA,kDAAgD;AAChD,wCAA6C;AAC7C,qDAAyD;AACzD,8CAAyD;AACzD,6CAAyD;
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../../src/components/provider/Provider.tsx"],"names":[],"mappings":";;;;AACA,kDAAgD;AAChD,wCAA6C;AAC7C,qDAAyD;AACzD,8CAAyD;AACzD,6CAAyD;AAUzD;;GAEG;AACH,SAAgB,QAAQ,CAAC,EACxB,QAAQ,EACR,gBAAgB,EAChB,aAAa,GAAG,YAAY,EAC5B,uBAAuB,EACvB,qBAAqB,EACN;IACf,IAAA,kCAAuB,EAAC,qBAAqB,CAAC,CAAC;IAE/C,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;AAnCD,4BAmCC"}
|
|
@@ -6,8 +6,10 @@ const react_1 = require("react");
|
|
|
6
6
|
/**
|
|
7
7
|
* Applies bottom offset px as a CSS custom property to the document root.
|
|
8
8
|
*/
|
|
9
|
-
function useVisualViewportOffset() {
|
|
9
|
+
function useVisualViewportOffset(disable) {
|
|
10
10
|
(0, react_1.useEffect)(() => {
|
|
11
|
+
if (!disable)
|
|
12
|
+
return;
|
|
11
13
|
const viewport = typeof window === 'undefined' ? undefined : window.visualViewport;
|
|
12
14
|
if (!viewport) {
|
|
13
15
|
return;
|
|
@@ -23,7 +25,7 @@ function useVisualViewportOffset() {
|
|
|
23
25
|
viewport.removeEventListener('resize', update);
|
|
24
26
|
window.removeEventListener('scroll', update);
|
|
25
27
|
};
|
|
26
|
-
}, []);
|
|
28
|
+
}, [disable]);
|
|
27
29
|
}
|
|
28
30
|
exports.useVisualViewportOffset = useVisualViewportOffset;
|
|
29
31
|
//# sourceMappingURL=useVisualViewportOffset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVisualViewportOffset.js","sourceRoot":"","sources":["../../../src/hooks/useVisualViewportOffset.ts"],"names":[],"mappings":";;;AAAA,iCAA4C;AAE5C;;GAEG;AACH,SAAgB,uBAAuB;
|
|
1
|
+
{"version":3,"file":"useVisualViewportOffset.js","sourceRoot":"","sources":["../../../src/hooks/useVisualViewportOffset.ts"],"names":[],"mappings":";;;AAAA,iCAA4C;AAE5C;;GAEG;AACH,SAAgB,uBAAuB,CAAC,OAAiB;IACxD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACd,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,MAAM,QAAQ,GACb,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC;QAEnE,IAAI,CAAC,QAAQ,EAAE;YACd,OAAO;SACP;QAED,MAAM,MAAM,GAAG,GAAG,EAAE;YACnB,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CACzC,0BAA0B,EAC1B,GAAG,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAC3C,CAAC;YACF,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CACzC,mBAAmB,EACnB,GAAG,QAAQ,CAAC,MAAM,IAAI,CACtB,CAAC;QACH,CAAC,CAAC;QAEF,MAAM,EAAE,CAAC;QAET,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7D,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAE5C,OAAO,GAAG,EAAE;YACX,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC/C,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC9C,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AACf,CAAC;AAhCD,0DAgCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/forms/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/forms/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAA"}
|
|
@@ -5,8 +5,9 @@ export interface ProviderProps {
|
|
|
5
5
|
disableParticles?: boolean;
|
|
6
6
|
toastPosition?: ToastPosition;
|
|
7
7
|
toastContainerClassName?: string;
|
|
8
|
+
disableViewportOffset?: boolean;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Provides all the stuff for all global junk.
|
|
11
12
|
*/
|
|
12
|
-
export declare function Provider({ children, disableParticles, toastPosition, toastContainerClassName, }: ProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function Provider({ children, disableParticles, toastPosition, toastContainerClassName, disableViewportOffset }: ProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,8 +8,8 @@ import { useVisualViewportOffset } from '../../hooks.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* Provides all the stuff for all global junk.
|
|
10
10
|
*/
|
|
11
|
-
export function Provider({ children, disableParticles, toastPosition = 'top-center', toastContainerClassName, }) {
|
|
12
|
-
useVisualViewportOffset();
|
|
11
|
+
export function Provider({ children, disableParticles, toastPosition = 'top-center', toastContainerClassName, disableViewportOffset }) {
|
|
12
|
+
useVisualViewportOffset(disableViewportOffset);
|
|
13
13
|
const otherStuff = (_jsxs(_Fragment, { children: [_jsx(IconSpritesheet, {}), _jsx(Toaster, { position: toastPosition, containerClassName: toastContainerClassName })] }));
|
|
14
14
|
if (disableParticles)
|
|
15
15
|
return (_jsxs(TooltipProvider, { children: [children, otherStuff] }));
|
|
@@ -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;AACzD,OAAO,EAAW,eAAe,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;
|
|
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;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAUzD;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,EACxB,QAAQ,EACR,gBAAgB,EAChB,aAAa,GAAG,YAAY,EAC5B,uBAAuB,EACvB,qBAAqB,EACN;IACf,uBAAuB,CAAC,qBAAqB,CAAC,CAAC;IAE/C,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"}
|
|
@@ -3,8 +3,10 @@ import { useEffect } from 'react';
|
|
|
3
3
|
/**
|
|
4
4
|
* Applies bottom offset px as a CSS custom property to the document root.
|
|
5
5
|
*/
|
|
6
|
-
export function useVisualViewportOffset() {
|
|
6
|
+
export function useVisualViewportOffset(disable) {
|
|
7
7
|
useEffect(() => {
|
|
8
|
+
if (!disable)
|
|
9
|
+
return;
|
|
8
10
|
const viewport = typeof window === 'undefined' ? undefined : window.visualViewport;
|
|
9
11
|
if (!viewport) {
|
|
10
12
|
return;
|
|
@@ -20,6 +22,6 @@ export function useVisualViewportOffset() {
|
|
|
20
22
|
viewport.removeEventListener('resize', update);
|
|
21
23
|
window.removeEventListener('scroll', update);
|
|
22
24
|
};
|
|
23
|
-
}, []);
|
|
25
|
+
}, [disable]);
|
|
24
26
|
}
|
|
25
27
|
//# sourceMappingURL=useVisualViewportOffset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVisualViewportOffset.js","sourceRoot":"","sources":["../../../src/hooks/useVisualViewportOffset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,E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|
@@ -10,6 +10,7 @@ export interface ProviderProps {
|
|
|
10
10
|
disableParticles?: boolean;
|
|
11
11
|
toastPosition?: ToastPosition;
|
|
12
12
|
toastContainerClassName?: string;
|
|
13
|
+
disableViewportOffset?: boolean;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -20,8 +21,9 @@ export function Provider({
|
|
|
20
21
|
disableParticles,
|
|
21
22
|
toastPosition = 'top-center',
|
|
22
23
|
toastContainerClassName,
|
|
24
|
+
disableViewportOffset
|
|
23
25
|
}: ProviderProps) {
|
|
24
|
-
useVisualViewportOffset();
|
|
26
|
+
useVisualViewportOffset(disableViewportOffset);
|
|
25
27
|
|
|
26
28
|
const otherStuff = (
|
|
27
29
|
<>
|
|
@@ -3,8 +3,10 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
/**
|
|
4
4
|
* Applies bottom offset px as a CSS custom property to the document root.
|
|
5
5
|
*/
|
|
6
|
-
export function useVisualViewportOffset() {
|
|
6
|
+
export function useVisualViewportOffset(disable?: boolean) {
|
|
7
7
|
useEffect(() => {
|
|
8
|
+
if (!disable) return;
|
|
9
|
+
|
|
8
10
|
const viewport =
|
|
9
11
|
typeof window === 'undefined' ? undefined : window.visualViewport;
|
|
10
12
|
|
|
@@ -32,5 +34,5 @@ export function useVisualViewportOffset() {
|
|
|
32
34
|
viewport.removeEventListener('resize', update);
|
|
33
35
|
window.removeEventListener('scroll', update);
|
|
34
36
|
};
|
|
35
|
-
}, []);
|
|
37
|
+
}, [disable]);
|
|
36
38
|
}
|