@koine/react 2.0.0-beta.5 → 2.0.0-beta.7
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/FaviconTags.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
/**
|
|
2
3
|
* Favicon tags.
|
|
3
4
|
*
|
|
@@ -8,43 +9,56 @@
|
|
|
8
9
|
*
|
|
9
10
|
* @see https://realfavicongenerator.net/
|
|
10
11
|
*/ export const FaviconTags = ({ name, color, safariTabColor, tileColor, themeColor })=>{
|
|
11
|
-
return /*#__PURE__*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
12
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ _jsx("link", {
|
|
15
|
+
rel: "shortcut icon",
|
|
16
|
+
href: "/favicon.ico",
|
|
17
|
+
type: "image/x-icon"
|
|
18
|
+
}),
|
|
19
|
+
/*#__PURE__*/ _jsx("link", {
|
|
20
|
+
rel: "apple-touch-icon",
|
|
21
|
+
sizes: "180x180",
|
|
22
|
+
href: "/apple-touch-icon.png"
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ _jsx("link", {
|
|
25
|
+
rel: "icon",
|
|
26
|
+
type: "image/png",
|
|
27
|
+
sizes: "32x32",
|
|
28
|
+
href: "/favicon-32x32.png"
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ _jsx("link", {
|
|
31
|
+
rel: "icon",
|
|
32
|
+
type: "image/png",
|
|
33
|
+
sizes: "16x16",
|
|
34
|
+
href: "/favicon-16x16.png"
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ _jsx("link", {
|
|
37
|
+
rel: "manifest",
|
|
38
|
+
href: "/site.webmanifest"
|
|
39
|
+
}),
|
|
40
|
+
/*#__PURE__*/ _jsx("link", {
|
|
41
|
+
rel: "mask-icon",
|
|
42
|
+
href: "/safari-pinned-tab.svg",
|
|
43
|
+
color: safariTabColor || color
|
|
44
|
+
}),
|
|
45
|
+
/*#__PURE__*/ _jsx("meta", {
|
|
46
|
+
name: "apple-mobile-web-app-title",
|
|
47
|
+
content: name
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx("meta", {
|
|
50
|
+
name: "application-name",
|
|
51
|
+
content: name
|
|
52
|
+
}),
|
|
53
|
+
/*#__PURE__*/ _jsx("meta", {
|
|
54
|
+
name: "msapplication-TileColor",
|
|
55
|
+
content: tileColor || color
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ _jsx("meta", {
|
|
58
|
+
name: "theme-color",
|
|
59
|
+
content: themeColor || color
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
});
|
|
49
63
|
};
|
|
50
64
|
export default FaviconTags;
|
package/Form/Form.js
CHANGED
|
@@ -34,6 +34,7 @@ _export(exports, {
|
|
|
34
34
|
return KoineForm;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
37
38
|
const _react = require("react");
|
|
38
39
|
const _helpers = require("../helpers");
|
|
39
40
|
const Root = "form";
|
|
@@ -84,24 +85,40 @@ const Form = ({ Root: _Root, Overlay: _Overlay, Progress: _Progress, Collapsable
|
|
|
84
85
|
let formExpanded = true;
|
|
85
86
|
if (collapseOnFail && fail) formExpanded = false;
|
|
86
87
|
if (collapseOnOk && ok) formExpanded = false;
|
|
87
|
-
return /*#__PURE__*/
|
|
88
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(Root, {
|
|
88
89
|
method: "post",
|
|
89
90
|
noValidate: true,
|
|
90
|
-
...props
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
91
|
+
...props,
|
|
92
|
+
children: [
|
|
93
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(Collapsable, {
|
|
94
|
+
...commonProps,
|
|
95
|
+
$open: formExpanded,
|
|
96
|
+
recalc: loading,
|
|
97
|
+
body: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
98
|
+
children: [
|
|
99
|
+
children,
|
|
100
|
+
loading && /*#__PURE__*/ (0, _jsxruntime.jsx)(Overlay, {
|
|
101
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(Progress, {})
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
})
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(Collapsable, {
|
|
107
|
+
...commonProps,
|
|
108
|
+
$open: open === "ok" && !loading,
|
|
109
|
+
body: /*#__PURE__*/ (0, _jsxruntime.jsx)(Ok, {
|
|
110
|
+
...okProps
|
|
111
|
+
})
|
|
112
|
+
}),
|
|
113
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(Collapsable, {
|
|
114
|
+
...commonProps,
|
|
115
|
+
$open: open === "fail" && !loading,
|
|
116
|
+
body: /*#__PURE__*/ (0, _jsxruntime.jsx)(Fail, {
|
|
117
|
+
...failProps
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
});
|
|
105
122
|
};
|
|
106
123
|
const KoineForm = (0, _helpers.extendComponent)(Form, {
|
|
107
124
|
Root,
|
package/Form/Form.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { useEffect, useState } from "react";
|
|
2
3
|
// import type { MotionProps } from "framer-motion";
|
|
3
4
|
import { extendComponent } from "../helpers";
|
|
@@ -49,24 +50,40 @@ export const Form = ({ Root: _Root, Overlay: _Overlay, Progress: _Progress, Coll
|
|
|
49
50
|
let formExpanded = true;
|
|
50
51
|
if (collapseOnFail && fail) formExpanded = false;
|
|
51
52
|
if (collapseOnOk && ok) formExpanded = false;
|
|
52
|
-
return /*#__PURE__*/
|
|
53
|
+
return /*#__PURE__*/ _jsxs(Root, {
|
|
53
54
|
method: "post",
|
|
54
55
|
noValidate: true,
|
|
55
|
-
...props
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
56
|
+
...props,
|
|
57
|
+
children: [
|
|
58
|
+
/*#__PURE__*/ _jsx(Collapsable, {
|
|
59
|
+
...commonProps,
|
|
60
|
+
$open: formExpanded,
|
|
61
|
+
recalc: loading,
|
|
62
|
+
body: /*#__PURE__*/ _jsxs(_Fragment, {
|
|
63
|
+
children: [
|
|
64
|
+
children,
|
|
65
|
+
loading && /*#__PURE__*/ _jsx(Overlay, {
|
|
66
|
+
children: /*#__PURE__*/ _jsx(Progress, {})
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
})
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ _jsx(Collapsable, {
|
|
72
|
+
...commonProps,
|
|
73
|
+
$open: open === "ok" && !loading,
|
|
74
|
+
body: /*#__PURE__*/ _jsx(Ok, {
|
|
75
|
+
...okProps
|
|
76
|
+
})
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ _jsx(Collapsable, {
|
|
79
|
+
...commonProps,
|
|
80
|
+
$open: open === "fail" && !loading,
|
|
81
|
+
body: /*#__PURE__*/ _jsx(Fail, {
|
|
82
|
+
...failProps
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
});
|
|
70
87
|
};
|
|
71
88
|
export const KoineForm = extendComponent(Form, {
|
|
72
89
|
Root,
|
package/Form/sc/bare.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type { KoineFormProps } from "../Form";
|
|
3
|
-
export declare const Root:
|
|
4
|
-
export declare const Overlay:
|
|
5
|
-
export declare const Feedback:
|
|
3
|
+
export declare const Root: any;
|
|
4
|
+
export declare const Overlay: any;
|
|
5
|
+
export declare const Feedback: any;
|
|
6
6
|
export declare const KoineForm: ((props: {
|
|
7
7
|
action: string;
|
|
8
8
|
ok?: boolean | undefined;
|
|
@@ -30,8 +30,8 @@ export declare const KoineForm: ((props: {
|
|
|
30
30
|
children?: import("react").ReactNode;
|
|
31
31
|
}>>;
|
|
32
32
|
}) => import("react").FunctionComponentElement<any>) & {
|
|
33
|
-
Root:
|
|
34
|
-
Overlay:
|
|
33
|
+
Root: any;
|
|
34
|
+
Overlay: any;
|
|
35
35
|
Progress: ({ size, thickness, color, ...props }: {
|
|
36
36
|
[x: string]: any;
|
|
37
37
|
size?: string | undefined;
|
|
@@ -39,12 +39,12 @@ export declare const KoineForm: ((props: {
|
|
|
39
39
|
color?: string | undefined;
|
|
40
40
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
Collapsable: null;
|
|
42
|
-
Ok:
|
|
43
|
-
Fail:
|
|
42
|
+
Ok: any;
|
|
43
|
+
Fail: any;
|
|
44
44
|
} & {
|
|
45
45
|
defaultProps: {
|
|
46
|
-
Root:
|
|
47
|
-
Overlay:
|
|
46
|
+
Root: any;
|
|
47
|
+
Overlay: any;
|
|
48
48
|
Progress: ({ size, thickness, color, ...props }: {
|
|
49
49
|
[x: string]: any;
|
|
50
50
|
size?: string | undefined;
|
|
@@ -52,7 +52,7 @@ export declare const KoineForm: ((props: {
|
|
|
52
52
|
color?: string | undefined;
|
|
53
53
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
54
54
|
Collapsable: null;
|
|
55
|
-
Ok:
|
|
56
|
-
Fail:
|
|
55
|
+
Ok: any;
|
|
56
|
+
Fail: any;
|
|
57
57
|
};
|
|
58
58
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { UseToggleProps } from "../Toggle/useToggle";
|
|
3
|
-
export declare const CheckboxRoot:
|
|
4
|
-
export declare const CheckboxToggle:
|
|
5
|
-
export declare const CheckboxIndicator:
|
|
6
|
-
export declare const CheckboxLabel:
|
|
3
|
+
export declare const CheckboxRoot: any;
|
|
4
|
+
export declare const CheckboxToggle: any;
|
|
5
|
+
export declare const CheckboxIndicator: any;
|
|
6
|
+
export declare const CheckboxLabel: any;
|
|
7
7
|
export type CheckboxProps = UseToggleProps;
|
|
8
8
|
/**
|
|
9
9
|
* All logic and invisible Inputs come from the `useToggle` hook
|
|
@@ -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 _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
31
32
|
const _Toggle = require("../Toggle");
|
|
@@ -44,5 +45,18 @@ const CheckboxLabel = (0, _styledcomponents.default)(_Toggle.ToggleLabel)`
|
|
|
44
45
|
`;
|
|
45
46
|
const Checkbox = /*#__PURE__*/ (0, _react.forwardRef)(function Checkbox(props, ref) {
|
|
46
47
|
const { rootProps, Inputs, label } = (0, _useToggle.useToggle)(props, ref);
|
|
47
|
-
return /*#__PURE__*/
|
|
48
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(CheckboxRoot, {
|
|
49
|
+
...rootProps,
|
|
50
|
+
children: [
|
|
51
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(CheckboxToggle, {
|
|
52
|
+
children: [
|
|
53
|
+
Inputs,
|
|
54
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(CheckboxIndicator, {})
|
|
55
|
+
]
|
|
56
|
+
}),
|
|
57
|
+
label && /*#__PURE__*/ (0, _jsxruntime.jsx)(CheckboxLabel, {
|
|
58
|
+
children: label
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
});
|
|
48
62
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { forwardRef } from "react";
|
|
2
3
|
import styled from "styled-components";
|
|
3
4
|
import { Toggle, ToggleIndicatorSquared, ToggleLabel } from "../Toggle";
|
|
@@ -18,5 +19,18 @@ export const CheckboxLabel = styled(ToggleLabel)`
|
|
|
18
19
|
* All logic and invisible Inputs come from the `useToggle` hook
|
|
19
20
|
*/ export const Checkbox = /*#__PURE__*/ forwardRef(function Checkbox(props, ref) {
|
|
20
21
|
const { rootProps, Inputs, label } = useToggle(props, ref);
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
+
return /*#__PURE__*/ _jsxs(CheckboxRoot, {
|
|
23
|
+
...rootProps,
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ _jsxs(CheckboxToggle, {
|
|
26
|
+
children: [
|
|
27
|
+
Inputs,
|
|
28
|
+
/*#__PURE__*/ _jsx(CheckboxIndicator, {})
|
|
29
|
+
]
|
|
30
|
+
}),
|
|
31
|
+
label && /*#__PURE__*/ _jsx(CheckboxLabel, {
|
|
32
|
+
children: label
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
22
36
|
});
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "Feedback", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
13
|
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
13
14
|
const Root = _styledcomponents.default.div`
|
|
14
15
|
margin-top: 0.2em;
|
|
@@ -16,8 +17,9 @@ const Root = _styledcomponents.default.div`
|
|
|
16
17
|
${(p)=>p.$danger ? `color: var(--danger);` : ""}
|
|
17
18
|
`;
|
|
18
19
|
const Feedback = ({ $danger, children })=>{
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(Root, {
|
|
20
21
|
role: "alert",
|
|
21
|
-
$danger: $danger
|
|
22
|
-
|
|
22
|
+
$danger: $danger,
|
|
23
|
+
children: children
|
|
24
|
+
});
|
|
23
25
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import styled from "styled-components";
|
|
2
3
|
const Root = styled.div`
|
|
3
4
|
margin-top: 0.2em;
|
|
@@ -5,8 +6,9 @@ const Root = styled.div`
|
|
|
5
6
|
${(p)=>p.$danger ? `color: var(--danger);` : ""}
|
|
6
7
|
`;
|
|
7
8
|
export const Feedback = ({ $danger, children })=>{
|
|
8
|
-
return /*#__PURE__*/
|
|
9
|
+
return /*#__PURE__*/ _jsx(Root, {
|
|
9
10
|
role: "alert",
|
|
10
|
-
$danger: $danger
|
|
11
|
-
|
|
11
|
+
$danger: $danger,
|
|
12
|
+
children: children
|
|
13
|
+
});
|
|
12
14
|
};
|
package/Forms/Field/Field.d.ts
CHANGED
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
import type { FieldError as RHF_FieldError, FieldErrors as RHF_FieldErrors } from "react-hook-form";
|
|
3
3
|
import type { Translate } from "../../types";
|
|
4
4
|
export declare const field: import("styled-components").FlattenSimpleInterpolation;
|
|
5
|
-
export declare const FieldBase:
|
|
6
|
-
export declare const FieldRoot:
|
|
7
|
-
$danger: boolean;
|
|
8
|
-
}, never>;
|
|
5
|
+
export declare const FieldBase: any;
|
|
6
|
+
export declare const FieldRoot: any;
|
|
9
7
|
/**
|
|
10
8
|
* Yup's errors produce by these validations:
|
|
11
9
|
*
|
package/Forms/Field/Field.js
CHANGED
|
@@ -23,6 +23,7 @@ _export(exports, {
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
26
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
26
27
|
const _styledcomponents = /*#__PURE__*/ _interop_require_wildcard._(require("styled-components"));
|
|
27
28
|
const _Feedback = require("../Feedback");
|
|
28
29
|
const field = (0, _styledcomponents.css)`
|
|
@@ -60,10 +61,15 @@ const Field = ({ name, t, error, errors, children, ...props })=>{
|
|
|
60
61
|
// useEffect(() => {
|
|
61
62
|
// i18n.addResourceBundle(locale, "core.Forms", null);
|
|
62
63
|
// }, []);
|
|
63
|
-
return /*#__PURE__*/
|
|
64
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(FieldRoot, {
|
|
64
65
|
$danger: !!err,
|
|
65
|
-
...props
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
...props,
|
|
67
|
+
children: [
|
|
68
|
+
children,
|
|
69
|
+
msg && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Feedback.Feedback, {
|
|
70
|
+
$danger: true,
|
|
71
|
+
children: msg
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
});
|
|
69
75
|
};
|
package/Forms/Field/Field.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import styled, { css } from "styled-components";
|
|
2
3
|
import { Feedback } from "../Feedback";
|
|
3
4
|
export const field = css`
|
|
@@ -35,10 +36,15 @@ export const Field = ({ name, t, error, errors, children, ...props })=>{
|
|
|
35
36
|
// useEffect(() => {
|
|
36
37
|
// i18n.addResourceBundle(locale, "core.Forms", null);
|
|
37
38
|
// }, []);
|
|
38
|
-
return /*#__PURE__*/
|
|
39
|
+
return /*#__PURE__*/ _jsxs(FieldRoot, {
|
|
39
40
|
$danger: !!err,
|
|
40
|
-
...props
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
...props,
|
|
42
|
+
children: [
|
|
43
|
+
children,
|
|
44
|
+
msg && /*#__PURE__*/ _jsx(Feedback, {
|
|
45
|
+
$danger: true,
|
|
46
|
+
children: msg
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
});
|
|
44
50
|
};
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "FieldControl", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
13
|
const _react = require("react");
|
|
13
14
|
const _reacthookform = require("react-hook-form");
|
|
14
15
|
const _decode = /*#__PURE__*/ _interop_require_default._(require("@koine/utils/decode"));
|
|
@@ -46,10 +47,23 @@ const FieldControl = ({ control, register, setValue, name: maybeEncodedName, lab
|
|
|
46
47
|
maybeEncodedName,
|
|
47
48
|
placeholder
|
|
48
49
|
]);
|
|
49
|
-
return /*#__PURE__*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
51
|
+
children: [
|
|
52
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Field.Field, {
|
|
53
|
+
name: maybeEncodedName,
|
|
54
|
+
t: t,
|
|
55
|
+
error: error,
|
|
56
|
+
...props,
|
|
57
|
+
children: [
|
|
58
|
+
FormFieldContent,
|
|
59
|
+
hint && /*#__PURE__*/ (0, _jsxruntime.jsx)(_FieldHint.FieldHint, {
|
|
60
|
+
children: hint
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}),
|
|
64
|
+
encode && register && /*#__PURE__*/ (0, _jsxruntime.jsx)(_styles.InputHoneypot, {
|
|
65
|
+
...register(name)
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
});
|
|
55
69
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { useMemo } from "react";
|
|
2
3
|
import { useFormState } from "react-hook-form";
|
|
3
4
|
import decode from "@koine/utils/decode";
|
|
@@ -44,10 +45,23 @@ import { FieldHint } from "./FieldHint";
|
|
|
44
45
|
maybeEncodedName,
|
|
45
46
|
placeholder
|
|
46
47
|
]);
|
|
47
|
-
return /*#__PURE__*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ _jsxs(Field, {
|
|
51
|
+
name: maybeEncodedName,
|
|
52
|
+
t: t,
|
|
53
|
+
error: error,
|
|
54
|
+
...props,
|
|
55
|
+
children: [
|
|
56
|
+
FormFieldContent,
|
|
57
|
+
hint && /*#__PURE__*/ _jsx(FieldHint, {
|
|
58
|
+
children: hint
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
}),
|
|
62
|
+
encode && register && /*#__PURE__*/ _jsx(InputHoneypot, {
|
|
63
|
+
...register(name)
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
});
|
|
53
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const FieldHint:
|
|
1
|
+
export declare const FieldHint: any;
|
package/Forms/Input/Input.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { FormControl } from "../helpers";
|
|
3
|
-
export declare const InputWrap:
|
|
4
|
-
export declare const InputMain:
|
|
5
|
-
export declare const InputPre:
|
|
6
|
-
export declare const InputPost:
|
|
7
|
-
export declare const InputNative:
|
|
3
|
+
export declare const InputWrap: any;
|
|
4
|
+
export declare const InputMain: any;
|
|
5
|
+
export declare const InputPre: any;
|
|
6
|
+
export declare const InputPost: any;
|
|
7
|
+
export declare const InputNative: any;
|
|
8
8
|
export type InputProps = FormControl;
|
|
9
9
|
export declare const Input: import("react").ForwardRefExoticComponent<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
package/Forms/Input/Input.js
CHANGED
|
@@ -29,6 +29,7 @@ _export(exports, {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
32
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
32
33
|
const _react = require("react");
|
|
33
34
|
const _styledcomponents = /*#__PURE__*/ _interop_require_default._(require("styled-components"));
|
|
34
35
|
const _Label = require("../Label/Label");
|
|
@@ -49,11 +50,18 @@ const InputNative = _styledcomponents.default.input`
|
|
|
49
50
|
`;
|
|
50
51
|
const Input = /*#__PURE__*/ (0, _react.forwardRef)(function Input({ register, name, label, ...props }, ref) {
|
|
51
52
|
// console.log("Input: render");
|
|
52
|
-
return /*#__PURE__*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
54
|
+
children: [
|
|
55
|
+
label && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.Label, {
|
|
56
|
+
children: label
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(InputNative, {
|
|
59
|
+
...register ? register(name) : {
|
|
60
|
+
name,
|
|
61
|
+
ref
|
|
62
|
+
},
|
|
63
|
+
...props
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
});
|
|
59
67
|
});
|
package/Forms/Input/Input.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { forwardRef } from "react";
|
|
2
3
|
import styled from "styled-components";
|
|
3
4
|
import { Label } from "../Label/Label";
|
|
@@ -18,11 +19,18 @@ export const InputNative = styled.input`
|
|
|
18
19
|
`;
|
|
19
20
|
export const Input = /*#__PURE__*/ forwardRef(function Input({ register, name, label, ...props }, ref) {
|
|
20
21
|
// console.log("Input: render");
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
23
|
+
children: [
|
|
24
|
+
label && /*#__PURE__*/ _jsx(Label, {
|
|
25
|
+
children: label
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ _jsx(InputNative, {
|
|
28
|
+
...register ? register(name) : {
|
|
29
|
+
name,
|
|
30
|
+
ref
|
|
31
|
+
},
|
|
32
|
+
...props
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
28
36
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { KoineButton, KoineButtonProps } from "../../Buttons";
|
|
3
|
-
export declare const InputGroupRoot:
|
|
4
|
-
export declare const InputGroupMain:
|
|
5
|
-
export declare const InputGroupButtonPre:
|
|
6
|
-
export declare const InputGroupButtonPost:
|
|
3
|
+
export declare const InputGroupRoot: any;
|
|
4
|
+
export declare const InputGroupMain: any;
|
|
5
|
+
export declare const InputGroupButtonPre: any;
|
|
6
|
+
export declare const InputGroupButtonPost: any;
|
|
7
7
|
export type InputGroupProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
8
8
|
pre?: boolean;
|
|
9
9
|
post?: boolean;
|