@koine/react 1.2.3 → 2.0.0-alpha.2
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/Alert/Alert.d.ts +1 -1
- package/Animations/Reveal.d.ts +1 -1
- package/Animations/Reveal.js +1 -1
- package/Animations/Reveal.mjs +1 -1
- package/Animations/useReveal.d.ts +1 -0
- package/Autocomplete/AutocompleteMui.d.ts +3 -3
- package/Autocomplete/AutocompleteMui.js +7 -7
- package/Autocomplete/AutocompleteMui.mjs +6 -6
- package/Bg/BgColor.d.ts +1 -1
- package/Bg/BgColor.js +1 -1
- package/Bg/BgColor.mjs +1 -1
- package/Bg/BgPhoto.d.ts +1 -1
- package/Bg/BgPhoto.js +1 -1
- package/Bg/BgPhoto.mjs +1 -1
- package/Bg/BgSvg.d.ts +1 -1
- package/Bg/BgSvg.js +1 -1
- package/Bg/BgSvg.mjs +2 -2
- package/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/Breadcrumbs/Breadcrumbs.js +2 -2
- package/Breadcrumbs/Breadcrumbs.mjs +2 -2
- package/Buttons/ButtonComposite.d.ts +1 -1
- package/Buttons/ButtonComposite.js +1 -1
- package/Buttons/ButtonComposite.mjs +1 -1
- package/Buttons/ButtonLink.d.ts +1 -1
- package/Calendar/CalendarDaygridCell.d.ts +1 -1
- package/Calendar/CalendarDaygridCell.js +3 -3
- package/Calendar/CalendarDaygridCell.mjs +3 -3
- package/Calendar/CalendarDaygridNav.d.ts +1 -1
- package/Calendar/CalendarDaygridTable.d.ts +1 -1
- package/Calendar/CalendarDaygridTable.js +2 -11
- package/Calendar/CalendarDaygridTable.mjs +2 -11
- package/Calendar/CalendarLegend.d.ts +1 -1
- package/Calendar/CalendarLegend.js +1 -2
- package/Calendar/CalendarLegend.mjs +1 -2
- package/Calendar/useCalendar.d.ts +1 -0
- package/Carousel/CarouselCss.d.ts +1 -1
- package/Carousel/CarouselCss.js +1 -1
- package/Carousel/CarouselCss.mjs +1 -1
- package/Debug/Debug.d.ts +1 -1
- package/Details/Details.d.ts +11 -1
- package/Details/Details.js +3 -3
- package/Details/Details.mjs +3 -3
- package/Dialog/DialogMui.d.ts +54 -13
- package/Dialog/DialogMui.js +3 -3
- package/Dialog/DialogMui.mjs +2 -2
- package/Dialog/css/bare.d.ts +54 -12
- package/Dialog/m/bare.d.ts +54 -11
- package/Dialog/m/bare.js +2 -2
- package/Dialog/m/bare.mjs +2 -2
- package/Dialog/m/index.d.ts +1 -0
- package/Dialog/sc/bare.d.ts +54 -12
- package/Dialog/sc/framer.d.ts +54 -11
- package/Dialog/sc/framerMaterial.d.ts +54 -11
- package/Dialog/sc/material.d.ts +54 -12
- package/Dialog/tw/bare.d.ts +54 -12
- package/Dialog/tw/elegant.d.ts +54 -12
- package/Dialog/tw/framer.d.ts +54 -11
- package/Dialog/tw/framerMaterial.d.ts +54 -11
- package/Dialog/tw/material.d.ts +54 -12
- package/Editor/Editor--tiptap.d.ts +2 -2
- package/Editor/Editor--tiptap.js +3 -3
- package/Editor/Editor--tiptap.mjs +3 -3
- package/FaviconTags/FaviconTags.d.ts +1 -1
- package/FaviconTags/index.d.ts +1 -1
- package/FaviconTags/index.js +4 -4
- package/FaviconTags/index.mjs +1 -1
- package/Form/Form.d.ts +1 -1
- package/Form/sc/bare.d.ts +7 -7
- package/Forms/Checkbox/Checkbox.d.ts +1 -1
- package/Forms/Feedback/Feedback.d.ts +1 -1
- package/Forms/Feedback/Feedback.js +1 -1
- package/Forms/Feedback/Feedback.mjs +2 -2
- package/Forms/Field/Field.d.ts +1 -1
- package/Forms/Field/Field.js +1 -1
- package/Forms/Field/Field.mjs +1 -1
- package/Forms/Field/FieldControl.d.ts +1 -1
- package/Forms/InputGroup/InputGroup.d.ts +1 -1
- package/Forms/Password/Password.js +1 -1
- package/Forms/Password/Password.mjs +1 -1
- package/Forms/Toggle/Toggle.d.ts +2 -2
- package/Forms/Toggle/Toggle.js +2 -2
- package/Forms/Toggle/Toggle.mjs +3 -3
- package/Forms/Toggle/useToggle.d.ts +1 -1
- package/Forms/antispam.d.ts +4 -4
- package/Forms/styles.d.ts +1 -1
- package/Hamburger/Hamburger.d.ts +1 -1
- package/Hamburger/Hamburger.js +1 -1
- package/Hamburger/Hamburger.mjs +1 -1
- package/Link/LinkBlank.d.ts +2 -2
- package/MenuItem/useMenuItem.d.ts +2 -4
- package/MenuItem/useMenuItem.js +16 -14
- package/MenuItem/useMenuItem.mjs +17 -15
- package/Meta/Meta.d.ts +1 -1
- package/NoJs/NoJs.d.ts +1 -1
- package/Pagination/PaginationNav.d.ts +1 -1
- package/Pagination/PaginationNav.js +5 -5
- package/Pagination/PaginationNav.mjs +6 -6
- package/Pagination/PaginationResults.d.ts +1 -1
- package/Pagination/PaginationResults.js +1 -1
- package/Pagination/PaginationResults.mjs +2 -2
- package/Progress/ProgressCircular.d.ts +1 -1
- package/Progress/ProgressLinear.d.ts +1 -1
- package/Progress/ProgressOverlay.d.ts +1 -1
- package/Progress/ProgressOverlay.js +3 -3
- package/Progress/ProgressOverlay.mjs +4 -4
- package/Rating/Rating.d.ts +2 -2
- package/Rating/Rating.js +1 -1
- package/Rating/Rating.mjs +1 -1
- package/Sidebar/Sidebar.d.ts +1 -1
- package/Sidebar/Sidebar.js +1 -1
- package/Sidebar/Sidebar.mjs +2 -2
- package/Spacing/Spacing.d.ts +1 -1
- package/Sticky/StickyCss.d.ts +1 -1
- package/Sticky/index.d.ts +1 -1
- package/Sticky/index.js +3 -2
- package/Sticky/index.mjs +1 -1
- package/Tabs/TabsMui.d.ts +46 -41
- package/Tabs/TabsMui.js +14 -11
- package/Tabs/TabsMui.mjs +10 -7
- package/Tabs/tw/bare.d.ts +40 -36
- package/Tabs/tw/material.d.ts +52 -54
- package/Typography/ReadMore.d.ts +1 -1
- package/Typography/ReadMore.js +1 -1
- package/Typography/ReadMore.mjs +1 -1
- package/Typography/TextLoop.d.ts +2 -2
- package/Typography/TextLoop.js +3 -3
- package/Typography/TextLoop.mjs +3 -3
- package/Typography/TypeStairs.js +1 -2
- package/Typography/TypeStairs.mjs +1 -2
- package/hooks/index.d.ts +20 -20
- package/hooks/index.js +42 -22
- package/hooks/index.mjs +21 -21
- package/hooks/useAsyncFn.d.ts +4 -4
- package/hooks/useFocus.d.ts +1 -0
- package/m/MotionProvider.d.ts +1 -1
- package/m/MotionProvider.js +1 -2
- package/m/MotionProvider.mjs +1 -2
- package/package.json +14 -18
- package/styles/index.d.ts +7 -7
- package/styles/index.js +39 -8
- package/styles/index.mjs +7 -7
- package/styles/styled.d.ts +1 -1
- package/styles/styled.js +2 -2
- package/styles/styled.mjs +2 -2
- package/styles/theme--vanilla.d.ts +1 -1
- package/styles/theme--vanilla.js +1 -1
- package/styles/theme--vanilla.mjs +1 -2
- package/typings.d.ts +6 -6
- package/hooks/useEffectOnce.d.ts +0 -6
- package/hooks/useEffectOnce.js +0 -13
- package/hooks/useEffectOnce.mjs +0 -9
- package/hooks/useMount.d.ts +0 -5
- package/hooks/useMount.js +0 -14
- package/hooks/useMount.mjs +0 -10
package/hooks/useAsyncFn.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { FunctionReturningPromise, PromiseType } from "./types";
|
|
3
|
-
export type
|
|
3
|
+
export type UseAsyncState<T> = {
|
|
4
4
|
loading: boolean;
|
|
5
5
|
error?: undefined;
|
|
6
6
|
value?: undefined;
|
|
@@ -17,10 +17,10 @@ export type AsyncState<T> = {
|
|
|
17
17
|
error?: undefined;
|
|
18
18
|
value: T;
|
|
19
19
|
};
|
|
20
|
-
type StateFromFunctionReturningPromise<T extends FunctionReturningPromise> =
|
|
21
|
-
export type
|
|
20
|
+
type StateFromFunctionReturningPromise<T extends FunctionReturningPromise> = UseAsyncState<PromiseType<ReturnType<T>>>;
|
|
21
|
+
export type UseAsyncFnReturn<T extends FunctionReturningPromise = FunctionReturningPromise> = [StateFromFunctionReturningPromise<T>, T];
|
|
22
22
|
/**
|
|
23
23
|
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useAsyncFn.ts)
|
|
24
24
|
*/
|
|
25
|
-
export declare function useAsyncFn<T extends FunctionReturningPromise>(fn: T, deps?: React.DependencyList, initialState?: StateFromFunctionReturningPromise<T>):
|
|
25
|
+
export declare function useAsyncFn<T extends FunctionReturningPromise>(fn: T, deps?: React.DependencyList, initialState?: StateFromFunctionReturningPromise<T>): UseAsyncFnReturn<T>;
|
|
26
26
|
export default useAsyncFn;
|
package/hooks/useFocus.d.ts
CHANGED
package/m/MotionProvider.d.ts
CHANGED
|
@@ -34,5 +34,5 @@ export type MotionProviderProps = LazyProps & React.PropsWithChildren<{}>;
|
|
|
34
34
|
* </MotionProvider>
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
export declare const MotionProvider: ({ features, children }: MotionProviderProps) => JSX.Element;
|
|
37
|
+
export declare const MotionProvider: ({ features, children }: MotionProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
38
|
export default MotionProvider;
|
package/m/MotionProvider.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MotionProvider = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
5
|
var framer_motion_1 = require("framer-motion");
|
|
7
6
|
/**
|
|
@@ -38,7 +37,7 @@ var framer_motion_1 = require("framer-motion");
|
|
|
38
37
|
*/
|
|
39
38
|
var MotionProvider = function (_a) {
|
|
40
39
|
var features = _a.features, children = _a.children;
|
|
41
|
-
return (0, jsx_runtime_1.jsx)(framer_motion_1.LazyMotion,
|
|
40
|
+
return (0, jsx_runtime_1.jsx)(framer_motion_1.LazyMotion, { features: features, children: children });
|
|
42
41
|
};
|
|
43
42
|
exports.MotionProvider = MotionProvider;
|
|
44
43
|
exports.default = exports.MotionProvider;
|
package/m/MotionProvider.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
2
|
import { LazyMotion } from "framer-motion";
|
|
4
3
|
/**
|
|
@@ -35,6 +34,6 @@ import { LazyMotion } from "framer-motion";
|
|
|
35
34
|
*/
|
|
36
35
|
export var MotionProvider = function (_a) {
|
|
37
36
|
var features = _a.features, children = _a.children;
|
|
38
|
-
return _jsx(LazyMotion,
|
|
37
|
+
return _jsx(LazyMotion, { features: features, children: children });
|
|
39
38
|
};
|
|
40
39
|
export default MotionProvider;
|
package/package.json
CHANGED
|
@@ -47,31 +47,27 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@kuus/yup": "1.0.0-beta.7",
|
|
50
|
-
"@mui/base": "5.0.0-
|
|
51
|
-
"@mui/utils": "5.
|
|
52
|
-
"@tiptap/react": "2.0.
|
|
53
|
-
"@tiptap/starter-kit": "2.0.
|
|
50
|
+
"@mui/base": "5.0.0-beta.4",
|
|
51
|
+
"@mui/utils": "5.13.1",
|
|
52
|
+
"@tiptap/react": "2.0.3",
|
|
53
|
+
"@tiptap/starter-kit": "2.0.3",
|
|
54
54
|
"clsx": "1.2.1",
|
|
55
|
-
"date-fns": "^2.
|
|
56
|
-
"framer-motion": "^10.
|
|
57
|
-
"next": "^13.2.1",
|
|
55
|
+
"date-fns": "^2.30.0",
|
|
56
|
+
"framer-motion": "^10.12.16",
|
|
58
57
|
"react": "^18.2.0",
|
|
59
|
-
"react-
|
|
60
|
-
"react-
|
|
61
|
-
"react-
|
|
62
|
-
"
|
|
63
|
-
"react-swipeable": "^7.0.0",
|
|
64
|
-
"styled-components": "^5.3.6",
|
|
58
|
+
"react-hook-form": "^7.44.3",
|
|
59
|
+
"react-icons": "^4.9.0",
|
|
60
|
+
"react-swipeable": "^7.0.1",
|
|
61
|
+
"styled-components": "^5.3.11",
|
|
65
62
|
"ts-debounce": "^4.0.0",
|
|
66
|
-
"tslib": "^2.5.
|
|
67
|
-
"type-fest": "^3.
|
|
63
|
+
"tslib": "^2.5.3",
|
|
64
|
+
"type-fest": "^3.11.1"
|
|
68
65
|
},
|
|
69
66
|
"peerDependencies": {
|
|
70
|
-
"@koine/
|
|
71
|
-
"@koine/utils": "1.2.3"
|
|
67
|
+
"@koine/utils": "2.0.0-alpha.2"
|
|
72
68
|
},
|
|
73
69
|
"main": "./index.js",
|
|
74
70
|
"types": "./index.d.ts",
|
|
75
|
-
"version": "
|
|
71
|
+
"version": "2.0.0-alpha.2",
|
|
76
72
|
"module": "./index.mjs"
|
|
77
73
|
}
|
package/styles/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export { BodyMain, BodyRoot } from "./Body";
|
|
2
|
+
export { StylesGlobal, stylesGlobal } from "./Global";
|
|
3
|
+
export { MediaDirection, MediaQuery, MediaQueryFunction, between, down, generateMediaQueries, max, min, only, up, useMedia, } from "./media";
|
|
4
|
+
export { SpacingArgs, SpacingDevices, SpacingDirection, SpacingDirectionAxis, SpacingFactor, SpacingProperty, SpacingSize, spacing, spacingBottom, spacingTop, spacingVertical, } from "./spacing";
|
|
5
|
+
export { colStretch, centered, ellipsis, inset0, invisible, overlay, stateFocus, } from "./styled";
|
|
6
|
+
export { breakpoints, createTheme, useTheme, type Breakpoint, type Breakpoints, type Theme, type ThemeOptions, } from "./theme";
|
|
7
|
+
export { THEME_DEFAULT, THEME_KEY, type ThemeCookie, ThemeVanillaContext, type ThemeVanillaContextType, ThemeVanillaProvider, type ThemeVanillaProviderProps, type ThemeVanillaValue, getInitialThemeFromClient, } from "./theme--vanilla";
|
package/styles/index.js
CHANGED
|
@@ -1,10 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
exports.getInitialThemeFromClient = exports.ThemeVanillaProvider = exports.ThemeVanillaContext = exports.THEME_KEY = exports.THEME_DEFAULT = exports.useTheme = exports.createTheme = exports.breakpoints = exports.stateFocus = exports.overlay = exports.invisible = exports.inset0 = exports.ellipsis = exports.centered = exports.colStretch = exports.spacingVertical = exports.spacingTop = exports.spacingBottom = exports.spacing = exports.useMedia = exports.up = exports.only = exports.min = exports.max = exports.generateMediaQueries = exports.down = exports.between = exports.stylesGlobal = exports.StylesGlobal = exports.BodyRoot = exports.BodyMain = void 0;
|
|
4
|
+
var Body_1 = require("./Body");
|
|
5
|
+
Object.defineProperty(exports, "BodyMain", { enumerable: true, get: function () { return Body_1.BodyMain; } });
|
|
6
|
+
Object.defineProperty(exports, "BodyRoot", { enumerable: true, get: function () { return Body_1.BodyRoot; } });
|
|
7
|
+
var Global_1 = require("./Global");
|
|
8
|
+
Object.defineProperty(exports, "StylesGlobal", { enumerable: true, get: function () { return Global_1.StylesGlobal; } });
|
|
9
|
+
Object.defineProperty(exports, "stylesGlobal", { enumerable: true, get: function () { return Global_1.stylesGlobal; } });
|
|
10
|
+
var media_1 = require("./media");
|
|
11
|
+
Object.defineProperty(exports, "between", { enumerable: true, get: function () { return media_1.between; } });
|
|
12
|
+
Object.defineProperty(exports, "down", { enumerable: true, get: function () { return media_1.down; } });
|
|
13
|
+
Object.defineProperty(exports, "generateMediaQueries", { enumerable: true, get: function () { return media_1.generateMediaQueries; } });
|
|
14
|
+
Object.defineProperty(exports, "max", { enumerable: true, get: function () { return media_1.max; } });
|
|
15
|
+
Object.defineProperty(exports, "min", { enumerable: true, get: function () { return media_1.min; } });
|
|
16
|
+
Object.defineProperty(exports, "only", { enumerable: true, get: function () { return media_1.only; } });
|
|
17
|
+
Object.defineProperty(exports, "up", { enumerable: true, get: function () { return media_1.up; } });
|
|
18
|
+
Object.defineProperty(exports, "useMedia", { enumerable: true, get: function () { return media_1.useMedia; } });
|
|
19
|
+
var spacing_1 = require("./spacing");
|
|
20
|
+
Object.defineProperty(exports, "spacing", { enumerable: true, get: function () { return spacing_1.spacing; } });
|
|
21
|
+
Object.defineProperty(exports, "spacingBottom", { enumerable: true, get: function () { return spacing_1.spacingBottom; } });
|
|
22
|
+
Object.defineProperty(exports, "spacingTop", { enumerable: true, get: function () { return spacing_1.spacingTop; } });
|
|
23
|
+
Object.defineProperty(exports, "spacingVertical", { enumerable: true, get: function () { return spacing_1.spacingVertical; } });
|
|
24
|
+
var styled_1 = require("./styled");
|
|
25
|
+
Object.defineProperty(exports, "colStretch", { enumerable: true, get: function () { return styled_1.colStretch; } });
|
|
26
|
+
Object.defineProperty(exports, "centered", { enumerable: true, get: function () { return styled_1.centered; } });
|
|
27
|
+
Object.defineProperty(exports, "ellipsis", { enumerable: true, get: function () { return styled_1.ellipsis; } });
|
|
28
|
+
Object.defineProperty(exports, "inset0", { enumerable: true, get: function () { return styled_1.inset0; } });
|
|
29
|
+
Object.defineProperty(exports, "invisible", { enumerable: true, get: function () { return styled_1.invisible; } });
|
|
30
|
+
Object.defineProperty(exports, "overlay", { enumerable: true, get: function () { return styled_1.overlay; } });
|
|
31
|
+
Object.defineProperty(exports, "stateFocus", { enumerable: true, get: function () { return styled_1.stateFocus; } });
|
|
32
|
+
var theme_1 = require("./theme");
|
|
33
|
+
Object.defineProperty(exports, "breakpoints", { enumerable: true, get: function () { return theme_1.breakpoints; } });
|
|
34
|
+
Object.defineProperty(exports, "createTheme", { enumerable: true, get: function () { return theme_1.createTheme; } });
|
|
35
|
+
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return theme_1.useTheme; } });
|
|
36
|
+
var theme__vanilla_1 = require("./theme--vanilla");
|
|
37
|
+
Object.defineProperty(exports, "THEME_DEFAULT", { enumerable: true, get: function () { return theme__vanilla_1.THEME_DEFAULT; } });
|
|
38
|
+
Object.defineProperty(exports, "THEME_KEY", { enumerable: true, get: function () { return theme__vanilla_1.THEME_KEY; } });
|
|
39
|
+
Object.defineProperty(exports, "ThemeVanillaContext", { enumerable: true, get: function () { return theme__vanilla_1.ThemeVanillaContext; } });
|
|
40
|
+
Object.defineProperty(exports, "ThemeVanillaProvider", { enumerable: true, get: function () { return theme__vanilla_1.ThemeVanillaProvider; } });
|
|
41
|
+
Object.defineProperty(exports, "getInitialThemeFromClient", { enumerable: true, get: function () { return theme__vanilla_1.getInitialThemeFromClient; } });
|
package/styles/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export { BodyMain, BodyRoot } from "./Body";
|
|
2
|
+
export { StylesGlobal, stylesGlobal } from "./Global";
|
|
3
|
+
export { between, down, generateMediaQueries, max, min, only, up, useMedia, } from "./media";
|
|
4
|
+
export { spacing, spacingBottom, spacingTop, spacingVertical, } from "./spacing";
|
|
5
|
+
export { colStretch, centered, ellipsis, inset0, invisible, overlay, stateFocus, } from "./styled";
|
|
6
|
+
export { breakpoints, createTheme, useTheme, } from "./theme";
|
|
7
|
+
export { THEME_DEFAULT, THEME_KEY, ThemeVanillaContext, ThemeVanillaProvider, getInitialThemeFromClient, } from "./theme--vanilla";
|
package/styles/styled.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const colStretch: (direction: "left" | "right", bg: React.CSSProperties["background"]) => string;
|
|
3
3
|
/** @see https://caniuse.com/?search=inset */
|
|
4
4
|
export declare const inset0 = "top:0;left:0;right:0;bottom:0;";
|
|
5
5
|
export declare const overlay: string;
|
package/styles/styled.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.stateFocus = exports.invisible = exports.ellipsis = exports.centered = exports.overlay = exports.inset0 = exports.colStretch = void 0;
|
|
4
|
-
function
|
|
4
|
+
var colStretch = function (direction, bg) {
|
|
5
5
|
return "\n background: ".concat(bg, ";\n position: relative;\n\n &:before{\n z-index: -1;\n content: '';\n position: absolute;\n right: ").concat(direction === "left" ? "100%" : "-100vw", ";\n left: ").concat(direction === "right" ? "100%" : "-100vw", ";\n top: 0;\n bottom: 0;\n background: ").concat(bg, ";\n }\n ");
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
exports.colStretch = colStretch;
|
|
8
8
|
/** @see https://caniuse.com/?search=inset */
|
|
9
9
|
exports.inset0 = "top:0;left:0;right:0;bottom:0;";
|
package/styles/styled.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export var colStretch = function (direction, bg) {
|
|
2
2
|
return "\n background: ".concat(bg, ";\n position: relative;\n\n &:before{\n z-index: -1;\n content: '';\n position: absolute;\n right: ").concat(direction === "left" ? "100%" : "-100vw", ";\n left: ").concat(direction === "right" ? "100%" : "-100vw", ";\n top: 0;\n bottom: 0;\n background: ").concat(bg, ";\n }\n ");
|
|
3
|
-
}
|
|
3
|
+
};
|
|
4
4
|
/** @see https://caniuse.com/?search=inset */
|
|
5
5
|
export var inset0 = "top:0;left:0;right:0;bottom:0;";
|
|
6
6
|
export var overlay = "position: absolute;".concat(inset0);
|
|
@@ -14,4 +14,4 @@ export declare const ThemeVanillaContext: import("react").Context<ThemeVanillaCo
|
|
|
14
14
|
export type ThemeVanillaProviderProps = React.PropsWithChildren<{
|
|
15
15
|
initialTheme: ThemeVanillaValue;
|
|
16
16
|
}>;
|
|
17
|
-
export declare const ThemeVanillaProvider: ({ initialTheme, children, }: ThemeVanillaProviderProps) => JSX.Element;
|
|
17
|
+
export declare const ThemeVanillaProvider: ({ initialTheme, children, }: ThemeVanillaProviderProps) => import("react/jsx-runtime").JSX.Element;
|
package/styles/theme--vanilla.js
CHANGED
|
@@ -59,6 +59,6 @@ var ThemeVanillaProvider = function (_a) {
|
|
|
59
59
|
(0, useUpdateEffect_1.default)(function () {
|
|
60
60
|
rawSetTheme(theme);
|
|
61
61
|
}, [theme]);
|
|
62
|
-
return ((0, jsx_runtime_1.jsx)(exports.ThemeVanillaContext.Provider,
|
|
62
|
+
return ((0, jsx_runtime_1.jsx)(exports.ThemeVanillaContext.Provider, { value: { theme: theme, setTheme: setTheme }, children: children }));
|
|
63
63
|
};
|
|
64
64
|
exports.ThemeVanillaProvider = ThemeVanillaProvider;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
2
|
import { createContext, useEffect, useState } from "react";
|
|
4
3
|
import isBrowser from "@koine/utils/isBrowser";
|
|
@@ -55,5 +54,5 @@ export var ThemeVanillaProvider = function (_a) {
|
|
|
55
54
|
useUpdateEffect(function () {
|
|
56
55
|
rawSetTheme(theme);
|
|
57
56
|
}, [theme]);
|
|
58
|
-
return (_jsx(ThemeVanillaContext.Provider,
|
|
57
|
+
return (_jsx(ThemeVanillaContext.Provider, { value: { theme: theme, setTheme: setTheme }, children: children }));
|
|
59
58
|
};
|
package/typings.d.ts
CHANGED
|
@@ -56,12 +56,12 @@ declare namespace Polymorphic {
|
|
|
56
56
|
>;
|
|
57
57
|
|
|
58
58
|
type InferProps<TComponent extends ComponentTypes> =
|
|
59
|
-
TComponent extends React.ComponentClass<infer
|
|
60
|
-
?
|
|
61
|
-
: TComponent extends React.FunctionComponent<infer
|
|
62
|
-
?
|
|
63
|
-
: TComponent extends React.ForwardRefExoticComponent<infer
|
|
64
|
-
?
|
|
59
|
+
TComponent extends React.ComponentClass<infer Props>
|
|
60
|
+
? Props
|
|
61
|
+
: TComponent extends React.FunctionComponent<infer Props>
|
|
62
|
+
? Props
|
|
63
|
+
: TComponent extends React.ForwardRefExoticComponent<infer Props>
|
|
64
|
+
? Props
|
|
65
65
|
: TComponent extends keyof JSX.IntrinsicElements
|
|
66
66
|
? React.ComponentPropsWithoutRef<TComponent>
|
|
67
67
|
: never;
|
package/hooks/useEffectOnce.d.ts
DELETED
package/hooks/useEffectOnce.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useEffectOnce = void 0;
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
/**
|
|
6
|
-
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useEffectOnce.ts)
|
|
7
|
-
*/
|
|
8
|
-
var useEffectOnce = function (effect) {
|
|
9
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10
|
-
(0, react_1.useEffect)(effect, []);
|
|
11
|
-
};
|
|
12
|
-
exports.useEffectOnce = useEffectOnce;
|
|
13
|
-
exports.default = exports.useEffectOnce;
|
package/hooks/useEffectOnce.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useEffectOnce.ts)
|
|
4
|
-
*/
|
|
5
|
-
export var useEffectOnce = function (effect) {
|
|
6
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7
|
-
useEffect(effect, []);
|
|
8
|
-
};
|
|
9
|
-
export default useEffectOnce;
|
package/hooks/useMount.d.ts
DELETED
package/hooks/useMount.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useMount = void 0;
|
|
4
|
-
var useEffectOnce_1 = require("./useEffectOnce");
|
|
5
|
-
/**
|
|
6
|
-
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useMount.ts)
|
|
7
|
-
*/
|
|
8
|
-
var useMount = function (fn) {
|
|
9
|
-
(0, useEffectOnce_1.useEffectOnce)(function () {
|
|
10
|
-
fn();
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
exports.useMount = useMount;
|
|
14
|
-
exports.default = exports.useMount;
|
package/hooks/useMount.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useEffectOnce } from "./useEffectOnce";
|
|
2
|
-
/**
|
|
3
|
-
* @borrows [streamich/react-use](https://github.com/streamich/react-use/blob/master/src/useMount.ts)
|
|
4
|
-
*/
|
|
5
|
-
export var useMount = function (fn) {
|
|
6
|
-
useEffectOnce(function () {
|
|
7
|
-
fn();
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
export default useMount;
|