@koine/react 2.0.0-beta.4 → 2.0.0-beta.6
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.js +7 -3
- package/Alert/Alert.mjs +7 -3
- package/Alert/Alert.stories.js +4 -1
- package/Alert/Alert.stories.mjs +4 -1
- package/Animations/Reveal.js +5 -3
- package/Animations/Reveal.mjs +5 -3
- package/Animations/Underline.d.ts +1 -1
- package/Autocomplete/AutocompleteMui.js +57 -28
- package/Autocomplete/AutocompleteMui.mjs +57 -28
- package/Autocomplete/components.d.ts +12 -16
- package/Bg/BgColor.d.ts +2 -7
- package/Bg/BgColor.js +15 -10
- package/Bg/BgColor.mjs +15 -10
- package/Bg/BgPhoto.js +8 -6
- package/Bg/BgPhoto.mjs +8 -6
- package/Bg/BgSvg.js +8 -6
- package/Bg/BgSvg.mjs +8 -6
- package/Breadcrumbs/Breadcrumbs.js +30 -17
- package/Breadcrumbs/Breadcrumbs.mjs +30 -17
- package/Buttons/Button.d.ts +1 -1
- package/Buttons/ButtonComposite.js +52 -19
- package/Buttons/ButtonComposite.mjs +52 -19
- package/Buttons/ButtonFab.d.ts +1 -3
- package/Buttons/ButtonLink.js +3 -2
- package/Buttons/ButtonLink.mjs +3 -2
- package/Buttons/IconButton.d.ts +1 -3
- package/Calendar/CalendarDaygridCell.js +75 -52
- package/Calendar/CalendarDaygridCell.mjs +75 -52
- package/Calendar/CalendarDaygridNav.js +31 -17
- package/Calendar/CalendarDaygridNav.mjs +31 -17
- package/Calendar/CalendarDaygridTable.js +40 -15
- package/Calendar/CalendarDaygridTable.mjs +40 -15
- package/Calendar/CalendarLegend.js +20 -7
- package/Calendar/CalendarLegend.mjs +20 -7
- package/Carousel/CarouselCss.d.ts +2 -19
- package/Carousel/CarouselCss.js +10 -8
- package/Carousel/CarouselCss.mjs +10 -8
- package/Debug/Debug.js +4 -1
- package/Debug/Debug.mjs +4 -1
- package/Details/Details.js +27 -19
- package/Details/Details.mjs +27 -19
- package/Details/Details.stories.js +2 -1
- package/Details/Details.stories.mjs +2 -1
- package/Dialog/DialogMui.d.ts +9 -326
- package/Dialog/DialogMui.js +24 -11
- package/Dialog/DialogMui.mjs +24 -11
- package/Dialog/DialogMui.stories.js +2 -1
- package/Dialog/DialogMui.stories.mjs +2 -1
- package/Dialog/css/bare.d.ts +9 -327
- package/Dialog/css/index.stories.js +11 -3
- package/Dialog/css/index.stories.mjs +11 -3
- package/Dialog/m/bare.d.ts +2 -398
- package/Dialog/m/bare.js +114 -69
- package/Dialog/m/bare.mjs +114 -69
- package/Dialog/sc/bare.d.ts +27 -405
- package/Dialog/sc/framer.d.ts +15 -422
- package/Dialog/sc/framerMaterial.d.ts +15 -422
- package/Dialog/sc/index.stories.js +5 -4
- package/Dialog/sc/index.stories.mjs +5 -4
- package/Dialog/sc/material.d.ts +27 -405
- package/Dialog/tw/bare.d.ts +9 -327
- package/Dialog/tw/elegant.d.ts +9 -327
- package/Dialog/tw/framer.d.ts +3 -354
- package/Dialog/tw/framerMaterial.d.ts +3 -354
- package/Dialog/tw/index.stories.js +6 -5
- package/Dialog/tw/index.stories.mjs +6 -5
- package/Dialog/tw/material.d.ts +9 -327
- package/Editor/Editor--tiptap.js +29 -14
- package/Editor/Editor--tiptap.mjs +29 -14
- package/Editor/components.d.ts +3 -5
- package/FaviconTags.js +52 -38
- package/FaviconTags.mjs +52 -38
- package/Form/Form.js +33 -16
- package/Form/Form.mjs +33 -16
- package/Form/sc/bare.d.ts +11 -11
- package/Forms/Checkbox/Checkbox.d.ts +4 -4
- package/Forms/Checkbox/Checkbox.js +15 -1
- package/Forms/Checkbox/Checkbox.mjs +15 -1
- package/Forms/Feedback/Feedback.js +5 -3
- package/Forms/Feedback/Feedback.mjs +5 -3
- package/Forms/Field/Field.d.ts +2 -4
- package/Forms/Field/Field.js +11 -5
- package/Forms/Field/Field.mjs +11 -5
- package/Forms/Field/FieldControl.js +20 -6
- package/Forms/Field/FieldControl.mjs +20 -6
- package/Forms/Field/FieldHint.d.ts +1 -1
- package/Forms/Input/Input.d.ts +5 -5
- package/Forms/Input/Input.js +15 -7
- package/Forms/Input/Input.mjs +15 -7
- package/Forms/InputGroup/InputGroup.d.ts +4 -4
- package/Forms/InputGroup/InputGroup.js +17 -7
- package/Forms/InputGroup/InputGroup.mjs +17 -7
- package/Forms/Label/Label.d.ts +1 -1
- package/Forms/Password/Password.d.ts +1 -1
- package/Forms/Password/Password.js +25 -11
- package/Forms/Password/Password.mjs +25 -11
- package/Forms/Radio/Radio.js +30 -11
- package/Forms/Radio/Radio.mjs +30 -11
- package/Forms/Switch/Switch.d.ts +2 -2
- package/Forms/Switch/Switch.js +13 -1
- package/Forms/Switch/Switch.mjs +13 -1
- package/Forms/Textarea/Textarea.d.ts +1 -1
- package/Forms/Textarea/Textarea.js +15 -7
- package/Forms/Textarea/Textarea.mjs +15 -7
- package/Forms/Textarea/TextareaRich.js +20 -12
- package/Forms/Textarea/TextareaRich.mjs +20 -12
- package/Forms/Toggle/Toggle.d.ts +7 -7
- package/Forms/Toggle/Toggle.js +48 -29
- package/Forms/Toggle/Toggle.mjs +49 -30
- package/Forms/Toggle/useToggle.js +21 -15
- package/Forms/Toggle/useToggle.mjs +21 -15
- package/Forms/styles.d.ts +3 -7
- package/Forms/styles.js +2 -1
- package/Forms/styles.mjs +2 -1
- package/Grid/Grid.d.ts +4 -28
- package/Hamburger/Hamburger.js +24 -17
- package/Hamburger/Hamburger.mjs +25 -18
- package/Hidden/Hidden.d.ts +1 -1
- package/Img/sc/bare.d.ts +1 -1
- package/Link/Link.d.ts +1 -3
- package/Link/LinkBlank.d.ts +2 -5
- package/Link/LinkBlank.js +8 -1
- package/Link/LinkBlank.mjs +8 -1
- package/Menu/Menu.d.ts +1 -1
- package/MenuItem/MenuItem.d.ts +1 -4
- package/Meta/Meta.js +2 -1
- package/Meta/Meta.mjs +2 -1
- package/NoJs/NoJs.js +2 -1
- package/NoJs/NoJs.mjs +2 -1
- package/Pagination/PaginationNav.js +42 -23
- package/Pagination/PaginationNav.mjs +42 -23
- package/Pagination/PaginationResults.js +25 -20
- package/Pagination/PaginationResults.mjs +25 -20
- package/Pill/Pill.d.ts +4 -4
- package/Progress/ProgressCircular.js +14 -12
- package/Progress/ProgressCircular.mjs +14 -12
- package/Progress/ProgressLinear.js +21 -19
- package/Progress/ProgressLinear.mjs +21 -19
- package/Progress/ProgressOverlay.js +20 -14
- package/Progress/ProgressOverlay.mjs +20 -14
- package/Rating/Rating.d.ts +5 -5
- package/Rating/Rating.js +61 -35
- package/Rating/Rating.mjs +61 -35
- package/Select/components.d.ts +1 -1
- package/Select/components.js +5 -3
- package/Select/components.mjs +5 -3
- package/Sidebar/Sidebar.js +17 -8
- package/Sidebar/Sidebar.mjs +17 -8
- package/Spacing/Spacing.js +5 -2
- package/Spacing/Spacing.mjs +5 -2
- package/Sticky/StickyCss.js +2 -1
- package/Sticky/StickyCss.mjs +2 -1
- package/Tabs/TabsMui.d.ts +7 -296
- package/Tabs/TabsMui.js +11 -2
- package/Tabs/TabsMui.mjs +11 -2
- package/Tabs/TabsMui.stories.js +2 -1
- package/Tabs/TabsMui.stories.mjs +2 -1
- package/Tabs/tw/bare.d.ts +7 -296
- package/Tabs/tw/index.stories.js +3 -2
- package/Tabs/tw/index.stories.mjs +3 -2
- package/Tabs/tw/material.d.ts +7 -332
- package/Typography/CopyPasteVisible.d.ts +1 -1
- package/Typography/Native.d.ts +5 -5
- package/Typography/ReadMore.js +33 -18
- package/Typography/ReadMore.mjs +33 -18
- package/Typography/TextLoop.js +43 -35
- package/Typography/TextLoop.mjs +43 -35
- package/Typography/TypeStairs.js +27 -19
- package/Typography/TypeStairs.mjs +27 -19
- package/helpers/classed.stories.js +40 -22
- package/helpers/classed.stories.mjs +40 -22
- package/m/MotionProvider.js +5 -3
- package/m/MotionProvider.mjs +5 -3
- package/package.json +5 -25
- package/styles/Body.d.ts +2 -2
- package/styles/theme--vanilla.js +5 -3
- package/styles/theme--vanilla.mjs +5 -3
package/Typography/TextLoop.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { AnimatePresence, m } from "framer-motion";
|
|
2
3
|
import { useEffect, useRef, useState } from "react";
|
|
3
4
|
export const TextLoopPiece = ({ text = "", style = {}, className = "", direction = "up", inline = true, noOverflow = true, delay = 400 })=>{
|
|
@@ -23,7 +24,7 @@ export const TextLoopPiece = ({ text = "", style = {}, className = "", direction
|
|
|
23
24
|
delay,
|
|
24
25
|
inline
|
|
25
26
|
]);
|
|
26
|
-
return /*#__PURE__*/
|
|
27
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
27
28
|
className: className,
|
|
28
29
|
style: {
|
|
29
30
|
...style,
|
|
@@ -31,40 +32,47 @@ export const TextLoopPiece = ({ text = "", style = {}, className = "", direction
|
|
|
31
32
|
display: inline ? "inline-block" : "block",
|
|
32
33
|
width,
|
|
33
34
|
whiteSpace: inline ? "nowrap" : "normal"
|
|
34
|
-
}
|
|
35
|
-
}, /*#__PURE__*/ React.createElement("span", {
|
|
36
|
-
ref: placeholderRef,
|
|
37
|
-
style: {
|
|
38
|
-
visibility: "hidden"
|
|
39
|
-
}
|
|
40
|
-
}), /*#__PURE__*/ React.createElement("div", {
|
|
41
|
-
style: {
|
|
42
|
-
overflow: noOverflow ? "hidden" : "visible",
|
|
43
|
-
display: "block",
|
|
44
|
-
position: "absolute",
|
|
45
|
-
top: 0,
|
|
46
|
-
left: 0,
|
|
47
|
-
height: "100%",
|
|
48
|
-
width: "100%"
|
|
49
|
-
}
|
|
50
|
-
}, /*#__PURE__*/ React.createElement(AnimatePresence, null, /*#__PURE__*/ React.createElement(m.div, {
|
|
51
|
-
key: content.key,
|
|
52
|
-
style: {
|
|
53
|
-
position: "absolute"
|
|
54
35
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ _jsx("span", {
|
|
38
|
+
ref: placeholderRef,
|
|
39
|
+
style: {
|
|
40
|
+
visibility: "hidden"
|
|
41
|
+
}
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ _jsx("div", {
|
|
44
|
+
style: {
|
|
45
|
+
overflow: noOverflow ? "hidden" : "visible",
|
|
46
|
+
display: "block",
|
|
47
|
+
position: "absolute",
|
|
48
|
+
top: 0,
|
|
49
|
+
left: 0,
|
|
50
|
+
height: "100%",
|
|
51
|
+
width: "100%"
|
|
52
|
+
},
|
|
53
|
+
children: /*#__PURE__*/ _jsx(AnimatePresence, {
|
|
54
|
+
children: /*#__PURE__*/ _jsx(m.div, {
|
|
55
|
+
style: {
|
|
56
|
+
position: "absolute"
|
|
57
|
+
},
|
|
58
|
+
initial: {
|
|
59
|
+
opacity: 0,
|
|
60
|
+
y: direction === "down" ? "-100%" : "100%"
|
|
61
|
+
},
|
|
62
|
+
animate: {
|
|
63
|
+
opacity: 1,
|
|
64
|
+
y: 0
|
|
65
|
+
},
|
|
66
|
+
exit: {
|
|
67
|
+
opacity: 0,
|
|
68
|
+
y: direction === "down" ? "100%" : "-100%"
|
|
69
|
+
},
|
|
70
|
+
children: content.data
|
|
71
|
+
}, content.key)
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
});
|
|
68
76
|
};
|
|
69
77
|
export const TextLoop = ({ texts, interval = 3000, ...props })=>{
|
|
70
78
|
const [index, setIndex] = useState(0);
|
|
@@ -75,7 +83,7 @@ export const TextLoop = ({ texts, interval = 3000, ...props })=>{
|
|
|
75
83
|
}, [
|
|
76
84
|
interval
|
|
77
85
|
]);
|
|
78
|
-
return /*#__PURE__*/
|
|
86
|
+
return /*#__PURE__*/ _jsx(TextLoopPiece, {
|
|
79
87
|
...props,
|
|
80
88
|
text: texts[index % texts.length]
|
|
81
89
|
});
|
package/Typography/TypeStairs.js
CHANGED
|
@@ -8,17 +8,23 @@ Object.defineProperty(exports, "TypeStairs", {
|
|
|
8
8
|
return TypeStairs;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
11
12
|
const _react = require("react");
|
|
12
13
|
const TypeStairs = /*#__PURE__*/ (0, _react.forwardRef)(({ children, limit }, ref)=>{
|
|
13
14
|
// split in rows or just use one row if there is no limit
|
|
14
15
|
const rows = limit ? splitTextIntoRows(children, limit) : [
|
|
15
16
|
children
|
|
16
17
|
];
|
|
17
|
-
return rows.length > 1 ? /*#__PURE__*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
return rows.length > 1 ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
19
|
+
children: rows.map((row, rowIndex)=>{
|
|
20
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("span", {
|
|
21
|
+
children: [
|
|
22
|
+
renderRow(row, rowIndex, ref),
|
|
23
|
+
rowIndex !== rows.length - 1 && /*#__PURE__*/ (0, _jsxruntime.jsx)("br", {})
|
|
24
|
+
]
|
|
25
|
+
}, `row-${rowIndex}`);
|
|
26
|
+
})
|
|
27
|
+
}) : renderRow(rows[0], 0, ref);
|
|
22
28
|
});
|
|
23
29
|
/**
|
|
24
30
|
* every number chars find a space and break, then restart the gradient weight
|
|
@@ -46,18 +52,20 @@ function renderRow(row, rowIndex, ref) {
|
|
|
46
52
|
const letters = row.split("");
|
|
47
53
|
let fontWeightIdx = 1;
|
|
48
54
|
// const fontWeight = Math.min(fontWeightIdx * 100, 800);
|
|
49
|
-
return /*#__PURE__*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
56
|
+
children: letters.map((letter, letterIndex)=>{
|
|
57
|
+
const fontWeight = Math.min(fontWeightIdx * 100, 800);
|
|
58
|
+
// don't waste a fontWeight for a white space
|
|
59
|
+
if (letter !== " ") {
|
|
60
|
+
fontWeightIdx++;
|
|
61
|
+
}
|
|
62
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
63
|
+
style: {
|
|
64
|
+
fontWeight
|
|
65
|
+
},
|
|
66
|
+
ref: ref,
|
|
67
|
+
children: letter
|
|
68
|
+
}, `letter-${rowIndex}-${letterIndex}`);
|
|
69
|
+
})
|
|
70
|
+
});
|
|
63
71
|
}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { forwardRef } from "react";
|
|
2
3
|
export const TypeStairs = /*#__PURE__*/ forwardRef(({ children, limit }, ref)=>{
|
|
3
4
|
// split in rows or just use one row if there is no limit
|
|
4
5
|
const rows = limit ? splitTextIntoRows(children, limit) : [
|
|
5
6
|
children
|
|
6
7
|
];
|
|
7
|
-
return rows.length > 1 ? /*#__PURE__*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
return rows.length > 1 ? /*#__PURE__*/ _jsx(_Fragment, {
|
|
9
|
+
children: rows.map((row, rowIndex)=>{
|
|
10
|
+
return /*#__PURE__*/ _jsxs("span", {
|
|
11
|
+
children: [
|
|
12
|
+
renderRow(row, rowIndex, ref),
|
|
13
|
+
rowIndex !== rows.length - 1 && /*#__PURE__*/ _jsx("br", {})
|
|
14
|
+
]
|
|
15
|
+
}, `row-${rowIndex}`);
|
|
16
|
+
})
|
|
17
|
+
}) : renderRow(rows[0], 0, ref);
|
|
12
18
|
});
|
|
13
19
|
/**
|
|
14
20
|
* every number chars find a space and break, then restart the gradient weight
|
|
@@ -36,18 +42,20 @@ function renderRow(row, rowIndex, ref) {
|
|
|
36
42
|
const letters = row.split("");
|
|
37
43
|
let fontWeightIdx = 1;
|
|
38
44
|
// const fontWeight = Math.min(fontWeightIdx * 100, 800);
|
|
39
|
-
return /*#__PURE__*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
46
|
+
children: letters.map((letter, letterIndex)=>{
|
|
47
|
+
const fontWeight = Math.min(fontWeightIdx * 100, 800);
|
|
48
|
+
// don't waste a fontWeight for a white space
|
|
49
|
+
if (letter !== " ") {
|
|
50
|
+
fontWeightIdx++;
|
|
51
|
+
}
|
|
52
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
53
|
+
style: {
|
|
54
|
+
fontWeight
|
|
55
|
+
},
|
|
56
|
+
ref: ref,
|
|
57
|
+
children: letter
|
|
58
|
+
}, `letter-${rowIndex}-${letterIndex}`);
|
|
59
|
+
})
|
|
60
|
+
});
|
|
53
61
|
}
|
|
@@ -19,6 +19,7 @@ _export(exports, {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
22
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
23
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
23
24
|
const _classed = require("./classed");
|
|
24
25
|
const Classed = (0, _classed.classed)("div")`< class="bg-red-400 ${(p)=>p.test === "0a" ? "py-3" : "px-3"}`;
|
|
@@ -48,7 +49,7 @@ function classedBind(props) {
|
|
|
48
49
|
}, // @ts-expect-error no time now
|
|
49
50
|
props.children);
|
|
50
51
|
}
|
|
51
|
-
const ClassedBind = classedBind.bind(/*#__PURE__*/
|
|
52
|
+
const ClassedBind = classedBind.bind(/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
52
53
|
as: "h2",
|
|
53
54
|
className: "bg-slate-800"
|
|
54
55
|
}));
|
|
@@ -63,12 +64,12 @@ function classedDynamic(ComponentFn) {
|
|
|
63
64
|
});
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
|
-
const ClassedDynamicIgnoringProps = classedDynamic(()=>/*#__PURE__*/
|
|
67
|
+
const ClassedDynamicIgnoringProps = classedDynamic(()=>/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
67
68
|
as: "h2",
|
|
68
69
|
className: "bg-slate-800"
|
|
69
70
|
}));
|
|
70
71
|
const ClassedDynamicUsingProps = classedDynamic((p)=>{
|
|
71
|
-
return /*#__PURE__*/
|
|
72
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
72
73
|
as: "h2",
|
|
73
74
|
className: `bg-slate-800 ${p?.test === "3" ? "py-3" : "px-3"}`
|
|
74
75
|
});
|
|
@@ -98,25 +99,42 @@ const _default = {
|
|
|
98
99
|
title: "Helpers/classed"
|
|
99
100
|
};
|
|
100
101
|
const Template = (args)=>{
|
|
101
|
-
return /*#__PURE__*/
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
102
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
103
|
+
children: [
|
|
104
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(Classed, {
|
|
105
|
+
className: "text-yellow-200",
|
|
106
|
+
test: "0a",
|
|
107
|
+
children: "Classed taller"
|
|
108
|
+
}),
|
|
109
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(Classed, {
|
|
110
|
+
className: "text-yellow-200",
|
|
111
|
+
test: "0b",
|
|
112
|
+
children: "Classed wider"
|
|
113
|
+
}),
|
|
114
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(ClassedOriginal, {
|
|
115
|
+
className: "text-white",
|
|
116
|
+
children: "ClassedOriginal"
|
|
117
|
+
}),
|
|
118
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(ClassedBind, {
|
|
119
|
+
className: "text-white",
|
|
120
|
+
children: "ClassedBind"
|
|
121
|
+
}),
|
|
122
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(ClassedDynamicIgnoringProps, {
|
|
123
|
+
className: "text-gray-300",
|
|
124
|
+
test: "2",
|
|
125
|
+
children: "ClassedDynamicIgnoringProps"
|
|
126
|
+
}),
|
|
127
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(ClassedDynamicUsingProps, {
|
|
128
|
+
className: "text-gray-600",
|
|
129
|
+
test: "3",
|
|
130
|
+
children: "ClassedDynamicUsingProps"
|
|
131
|
+
}),
|
|
132
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(ClassedTaggedStatic, {
|
|
133
|
+
className: "text-gray-600",
|
|
134
|
+
children: "ClassedTaggedStatic"
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
});
|
|
120
138
|
};
|
|
121
139
|
const Playground = Template.bind({});
|
|
122
140
|
Playground.args = {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
2
|
// @ts-nocheck These are just wip experiments, we stick to just `./classed.tsx`
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
4
|
import React, { createElement } from "react";
|
|
4
5
|
import { classed } from "./classed";
|
|
5
6
|
const Classed = classed("div")`< class="bg-red-400 ${(p)=>p.test === "0a" ? "py-3" : "px-3"}`;
|
|
@@ -29,7 +30,7 @@ function classedBind(props) {
|
|
|
29
30
|
}, // @ts-expect-error no time now
|
|
30
31
|
props.children);
|
|
31
32
|
}
|
|
32
|
-
const ClassedBind = classedBind.bind(/*#__PURE__*/
|
|
33
|
+
const ClassedBind = classedBind.bind(/*#__PURE__*/ _jsx("div", {
|
|
33
34
|
as: "h2",
|
|
34
35
|
className: "bg-slate-800"
|
|
35
36
|
}));
|
|
@@ -44,12 +45,12 @@ function classedDynamic(ComponentFn) {
|
|
|
44
45
|
});
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
const ClassedDynamicIgnoringProps = classedDynamic(()=>/*#__PURE__*/
|
|
48
|
+
const ClassedDynamicIgnoringProps = classedDynamic(()=>/*#__PURE__*/ _jsx("div", {
|
|
48
49
|
as: "h2",
|
|
49
50
|
className: "bg-slate-800"
|
|
50
51
|
}));
|
|
51
52
|
const ClassedDynamicUsingProps = classedDynamic((p)=>{
|
|
52
|
-
return /*#__PURE__*/
|
|
53
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
53
54
|
as: "h2",
|
|
54
55
|
className: `bg-slate-800 ${p?.test === "3" ? "py-3" : "px-3"}`
|
|
55
56
|
});
|
|
@@ -79,25 +80,42 @@ export default {
|
|
|
79
80
|
title: "Helpers/classed"
|
|
80
81
|
};
|
|
81
82
|
const Template = (args)=>{
|
|
82
|
-
return /*#__PURE__*/
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
83
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
84
|
+
children: [
|
|
85
|
+
/*#__PURE__*/ _jsx(Classed, {
|
|
86
|
+
className: "text-yellow-200",
|
|
87
|
+
test: "0a",
|
|
88
|
+
children: "Classed taller"
|
|
89
|
+
}),
|
|
90
|
+
/*#__PURE__*/ _jsx(Classed, {
|
|
91
|
+
className: "text-yellow-200",
|
|
92
|
+
test: "0b",
|
|
93
|
+
children: "Classed wider"
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ _jsx(ClassedOriginal, {
|
|
96
|
+
className: "text-white",
|
|
97
|
+
children: "ClassedOriginal"
|
|
98
|
+
}),
|
|
99
|
+
/*#__PURE__*/ _jsx(ClassedBind, {
|
|
100
|
+
className: "text-white",
|
|
101
|
+
children: "ClassedBind"
|
|
102
|
+
}),
|
|
103
|
+
/*#__PURE__*/ _jsx(ClassedDynamicIgnoringProps, {
|
|
104
|
+
className: "text-gray-300",
|
|
105
|
+
test: "2",
|
|
106
|
+
children: "ClassedDynamicIgnoringProps"
|
|
107
|
+
}),
|
|
108
|
+
/*#__PURE__*/ _jsx(ClassedDynamicUsingProps, {
|
|
109
|
+
className: "text-gray-600",
|
|
110
|
+
test: "3",
|
|
111
|
+
children: "ClassedDynamicUsingProps"
|
|
112
|
+
}),
|
|
113
|
+
/*#__PURE__*/ _jsx(ClassedTaggedStatic, {
|
|
114
|
+
className: "text-gray-600",
|
|
115
|
+
children: "ClassedTaggedStatic"
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
});
|
|
101
119
|
};
|
|
102
120
|
export const Playground = Template.bind({});
|
|
103
121
|
Playground.args = {};
|
package/m/MotionProvider.js
CHANGED
|
@@ -16,10 +16,12 @@ _export(exports, {
|
|
|
16
16
|
return _default;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
19
20
|
const _framermotion = require("framer-motion");
|
|
20
21
|
const MotionProvider = ({ features, children })=>{
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
-
features: features
|
|
23
|
-
|
|
22
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_framermotion.LazyMotion, {
|
|
23
|
+
features: features,
|
|
24
|
+
children: children
|
|
25
|
+
});
|
|
24
26
|
};
|
|
25
27
|
const _default = MotionProvider;
|
package/m/MotionProvider.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { LazyMotion } from "framer-motion";
|
|
2
3
|
/**
|
|
3
4
|
* `<LazyMotion />` provider wrapper from `framer-motion`
|
|
@@ -31,8 +32,9 @@ import { LazyMotion } from "framer-motion";
|
|
|
31
32
|
* </MotionProvider>
|
|
32
33
|
* ```
|
|
33
34
|
*/ export const MotionProvider = ({ features, children })=>{
|
|
34
|
-
return /*#__PURE__*/
|
|
35
|
-
features: features
|
|
36
|
-
|
|
35
|
+
return /*#__PURE__*/ _jsx(LazyMotion, {
|
|
36
|
+
features: features,
|
|
37
|
+
children: children
|
|
38
|
+
});
|
|
37
39
|
};
|
|
38
40
|
export default MotionProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koine/react",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@koine/dom": "2.0.0-beta.6",
|
|
6
|
+
"@koine/utils": "2.0.0-beta.6"
|
|
7
|
+
},
|
|
4
8
|
"peerDependenciesMeta": {
|
|
5
9
|
"@hookform/resolvers": {
|
|
6
10
|
"optional": true
|
|
@@ -45,33 +49,9 @@
|
|
|
45
49
|
"optional": true
|
|
46
50
|
}
|
|
47
51
|
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@kuus/yup": "1.0.0-beta.7",
|
|
50
|
-
"@mui/base": "5.0.0-beta.4",
|
|
51
|
-
"@mui/utils": "^5.13.6",
|
|
52
|
-
"@tiptap/react": "2.0.3",
|
|
53
|
-
"@tiptap/starter-kit": "2.0.3",
|
|
54
|
-
"clsx": "^1.2.1",
|
|
55
|
-
"date-fns": "^2.30.0",
|
|
56
|
-
"framer-motion": "^10.12.17",
|
|
57
|
-
"react": "^18.2.0",
|
|
58
|
-
"react-hook-form": "^7.45.0",
|
|
59
|
-
"react-icons": "^4.10.1",
|
|
60
|
-
"react-swipeable": "^7.0.1",
|
|
61
|
-
"styled-components": "^5.3.11",
|
|
62
|
-
"ts-debounce": "^4.0.0",
|
|
63
|
-
"tslib": "^2.5.3",
|
|
64
|
-
"type-fest": "^3.12.0"
|
|
65
|
-
},
|
|
66
52
|
"peerDependencies": {},
|
|
67
53
|
"module": "./index.mjs",
|
|
68
54
|
"main": "./index.js",
|
|
69
|
-
"exports": {
|
|
70
|
-
".": {
|
|
71
|
-
"import": "./index.js",
|
|
72
|
-
"require": "./index.js"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
55
|
"types": "./index.d.ts",
|
|
76
|
-
"version": "2.0.0-beta.
|
|
56
|
+
"version": "2.0.0-beta.6"
|
|
77
57
|
}
|
package/styles/Body.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BodyRoot:
|
|
1
|
+
export declare const BodyRoot: any;
|
|
2
2
|
/**
|
|
3
3
|
* If you have background graphics to overlap you might need to add:
|
|
4
4
|
*
|
|
@@ -7,4 +7,4 @@ export declare const BodyRoot: import("styled-components").StyledComponent<"div"
|
|
|
7
7
|
* position: relative;
|
|
8
8
|
* ```
|
|
9
9
|
*/
|
|
10
|
-
export declare const BodyMain:
|
|
10
|
+
export declare const BodyMain: any;
|
package/styles/theme--vanilla.js
CHANGED
|
@@ -26,6 +26,7 @@ _export(exports, {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
29
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
29
30
|
const _react = require("react");
|
|
30
31
|
const _isBrowser = /*#__PURE__*/ _interop_require_default._(require("@koine/utils/isBrowser"));
|
|
31
32
|
const _useUpdateEffect = /*#__PURE__*/ _interop_require_default._(require("../hooks/useUpdateEffect"));
|
|
@@ -71,10 +72,11 @@ const ThemeVanillaProvider = ({ initialTheme, children })=>{
|
|
|
71
72
|
}, [
|
|
72
73
|
theme
|
|
73
74
|
]);
|
|
74
|
-
return /*#__PURE__*/
|
|
75
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(ThemeVanillaContext.Provider, {
|
|
75
76
|
value: {
|
|
76
77
|
theme,
|
|
77
78
|
setTheme
|
|
78
|
-
}
|
|
79
|
-
|
|
79
|
+
},
|
|
80
|
+
children: children
|
|
81
|
+
});
|
|
80
82
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { createContext, useEffect, useState } from "react";
|
|
2
3
|
import isBrowser from "@koine/utils/isBrowser";
|
|
3
4
|
// import setCookie from "@koine/utils/setCookie";
|
|
@@ -54,10 +55,11 @@ export const ThemeVanillaProvider = ({ initialTheme, children })=>{
|
|
|
54
55
|
}, [
|
|
55
56
|
theme
|
|
56
57
|
]);
|
|
57
|
-
return /*#__PURE__*/
|
|
58
|
+
return /*#__PURE__*/ _jsx(ThemeVanillaContext.Provider, {
|
|
58
59
|
value: {
|
|
59
60
|
theme,
|
|
60
61
|
setTheme
|
|
61
|
-
}
|
|
62
|
-
|
|
62
|
+
},
|
|
63
|
+
children: children
|
|
64
|
+
});
|
|
63
65
|
};
|