@koine/react 2.0.0-alpha.1 → 2.0.0-alpha.3
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/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/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;
|