@rolder/kit 3.0.0-alpha-13 → 3.0.0-alpha-16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/AnimatedChevron.d.ts +2 -2
- package/dist/ui/AnimatedChevron.js +25 -7
- package/dist/ui/editor/Toolbar.js +22 -4
- package/dist/ui/form/buttons/CancelButton.js +26 -4
- package/dist/ui/form/buttons/SubmitButton.js +29 -4
- package/dist/ui/form/fields/TextPassowrdField.js +26 -4
- package/dist/ui/scrollArea/ScrollArea.d.ts +1 -1
- package/dist/ui/scrollArea/ScrollAreaButton.d.ts +1 -1
- package/dist/ui/scrollArea/ScrollAreaButton.js +28 -7
- package/package.json +9 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interface Props extends
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
interface Props extends SVGProps<SVGSVGElement> {
|
|
3
3
|
expanded?: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare const AnimatedChevron: ({ expanded, style, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
const AnimatedChevron = ({ expanded, style, ...props })=>/*#__PURE__*/ jsxs("svg", {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
width: "24",
|
|
5
|
+
height: "24",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
stroke: "currentColor",
|
|
9
|
+
strokeWidth: "1.5",
|
|
10
|
+
strokeLinecap: "round",
|
|
11
|
+
strokeLinejoin: "round",
|
|
12
|
+
role: "img",
|
|
13
|
+
"aria-label": "Chevron",
|
|
6
14
|
style: {
|
|
7
15
|
transition: 'transform 0.2s ease-in-out',
|
|
8
|
-
transform: expanded ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
16
|
+
transform: expanded ? 'rotate(-180deg)' : 'rotate(0deg)',
|
|
9
17
|
...style
|
|
10
18
|
},
|
|
11
|
-
...props
|
|
19
|
+
...props,
|
|
20
|
+
children: [
|
|
21
|
+
/*#__PURE__*/ jsx("path", {
|
|
22
|
+
stroke: "none",
|
|
23
|
+
d: "M0 0h24v24H0z",
|
|
24
|
+
fill: "none"
|
|
25
|
+
}),
|
|
26
|
+
/*#__PURE__*/ jsx("path", {
|
|
27
|
+
d: "M6 9l6 6l6 -6"
|
|
28
|
+
})
|
|
29
|
+
]
|
|
12
30
|
});
|
|
13
31
|
export { AnimatedChevron };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Loader } from "@mantine/core";
|
|
3
3
|
import { RichTextEditor } from "@mantine/tiptap";
|
|
4
|
-
import { IconCheck } from "@tabler/icons-react";
|
|
5
4
|
import { useEditor } from "./Provider.js";
|
|
6
5
|
const Toolbar = ({ saving, children })=>{
|
|
7
6
|
const { editor, disabledToolbar } = useEditor();
|
|
@@ -125,9 +124,28 @@ const Toolbar = ({ saving, children })=>{
|
|
|
125
124
|
},
|
|
126
125
|
children: saving ? /*#__PURE__*/ jsx(Loader, {
|
|
127
126
|
size: 14
|
|
128
|
-
}) : /*#__PURE__*/
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
}) : /*#__PURE__*/ jsxs("svg", {
|
|
128
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
129
|
+
width: "16",
|
|
130
|
+
height: "16",
|
|
131
|
+
viewBox: "0 0 16 16",
|
|
132
|
+
fill: "none",
|
|
133
|
+
stroke: "currentColor",
|
|
134
|
+
strokeWidth: "1.5",
|
|
135
|
+
strokeLinecap: "round",
|
|
136
|
+
strokeLinejoin: "round",
|
|
137
|
+
role: "img",
|
|
138
|
+
"aria-label": "Saved",
|
|
139
|
+
children: [
|
|
140
|
+
/*#__PURE__*/ jsx("path", {
|
|
141
|
+
stroke: "none",
|
|
142
|
+
d: "M0 0h24v24H0z",
|
|
143
|
+
fill: "none"
|
|
144
|
+
}),
|
|
145
|
+
/*#__PURE__*/ jsx("path", {
|
|
146
|
+
d: "M5 12l5 5l10 -10"
|
|
147
|
+
})
|
|
148
|
+
]
|
|
131
149
|
})
|
|
132
150
|
})
|
|
133
151
|
]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from "@mantine/core";
|
|
3
|
-
import { IconCancel } from "@tabler/icons-react";
|
|
4
3
|
import { useFormContext } from "../context.js";
|
|
5
4
|
const CancelButton = (props)=>{
|
|
6
5
|
const form = useFormContext();
|
|
@@ -10,8 +9,31 @@ const CancelButton = (props)=>{
|
|
|
10
9
|
type: "reset",
|
|
11
10
|
size: "xs",
|
|
12
11
|
variant: "light",
|
|
13
|
-
leftSection: /*#__PURE__*/
|
|
14
|
-
|
|
12
|
+
leftSection: /*#__PURE__*/ jsxs("svg", {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: "16",
|
|
15
|
+
height: "16",
|
|
16
|
+
viewBox: "0 0 16 16",
|
|
17
|
+
fill: "none",
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
strokeWidth: "2",
|
|
20
|
+
strokeLinecap: "round",
|
|
21
|
+
strokeLinejoin: "round",
|
|
22
|
+
role: "img",
|
|
23
|
+
"aria-label": "Cancel",
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ jsx("path", {
|
|
26
|
+
stroke: "none",
|
|
27
|
+
d: "M0 0h24v24H0z",
|
|
28
|
+
fill: "none"
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ jsx("path", {
|
|
31
|
+
d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ jsx("path", {
|
|
34
|
+
d: "M18.364 5.636l-12.728 12.728"
|
|
35
|
+
})
|
|
36
|
+
]
|
|
15
37
|
}),
|
|
16
38
|
disabled: isSubmitting,
|
|
17
39
|
...props,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from "@mantine/core";
|
|
3
|
-
import { IconDeviceFloppy } from "@tabler/icons-react";
|
|
4
3
|
import { useFormContext } from "../context.js";
|
|
5
4
|
const SubmitButton = (props)=>{
|
|
6
5
|
const form = useFormContext();
|
|
@@ -9,8 +8,34 @@ const SubmitButton = (props)=>{
|
|
|
9
8
|
children: (state)=>/*#__PURE__*/ jsx(Button, {
|
|
10
9
|
type: "submit",
|
|
11
10
|
size: "xs",
|
|
12
|
-
leftSection: /*#__PURE__*/
|
|
13
|
-
|
|
11
|
+
leftSection: /*#__PURE__*/ jsxs("svg", {
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
width: "20",
|
|
14
|
+
height: "20",
|
|
15
|
+
viewBox: "0 0 20 20",
|
|
16
|
+
fill: "none",
|
|
17
|
+
stroke: "currentColor",
|
|
18
|
+
strokeWidth: "2",
|
|
19
|
+
strokeLinecap: "round",
|
|
20
|
+
strokeLinejoin: "round",
|
|
21
|
+
role: "img",
|
|
22
|
+
"aria-label": "Submit",
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ jsx("path", {
|
|
25
|
+
stroke: "none",
|
|
26
|
+
d: "M0 0h24v24H0z",
|
|
27
|
+
fill: "none"
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ jsx("path", {
|
|
30
|
+
d: "M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ jsx("path", {
|
|
33
|
+
d: "M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ jsx("path", {
|
|
36
|
+
d: "M14 4l0 4l-6 0l0 -4"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
14
39
|
}),
|
|
15
40
|
loading: state.isSubmitting,
|
|
16
41
|
disabled: !state.isDirty,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ActionIcon, TextInput } from "@mantine/core";
|
|
3
|
-
import { IconRefresh } from "@tabler/icons-react";
|
|
4
3
|
import omgopass from "omgopass";
|
|
5
4
|
import { useFieldContext } from "../context.js";
|
|
6
5
|
const TextPassowrdField = (props)=>{
|
|
@@ -14,8 +13,31 @@ const TextPassowrdField = (props)=>{
|
|
|
14
13
|
minSyllableLength: 2,
|
|
15
14
|
maxSyllableLength: 2
|
|
16
15
|
})),
|
|
17
|
-
children: /*#__PURE__*/
|
|
18
|
-
|
|
16
|
+
children: /*#__PURE__*/ jsxs("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
width: "16",
|
|
19
|
+
height: "16",
|
|
20
|
+
viewBox: "0 0 16 16",
|
|
21
|
+
fill: "none",
|
|
22
|
+
stroke: "currentColor",
|
|
23
|
+
"stroke-width": "2",
|
|
24
|
+
"stroke-linecap": "round",
|
|
25
|
+
"stroke-linejoin": "round",
|
|
26
|
+
role: "img",
|
|
27
|
+
"aria-label": "Refresh",
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ jsx("path", {
|
|
30
|
+
stroke: "none",
|
|
31
|
+
d: "M0 0h24v24H0z",
|
|
32
|
+
fill: "none"
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ jsx("path", {
|
|
35
|
+
d: "M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"
|
|
36
|
+
}),
|
|
37
|
+
/*#__PURE__*/ jsx("path", {
|
|
38
|
+
d: "M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"
|
|
39
|
+
})
|
|
40
|
+
]
|
|
19
41
|
})
|
|
20
42
|
}),
|
|
21
43
|
name: field.name,
|
|
@@ -55,7 +55,7 @@ export declare const ScrollArea: {
|
|
|
55
55
|
displayName: string;
|
|
56
56
|
} & {
|
|
57
57
|
ScrollButton: {
|
|
58
|
-
({ className
|
|
58
|
+
({ className }: import("./types").ScrollButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
59
59
|
displayName: string;
|
|
60
60
|
};
|
|
61
61
|
Provider: import("react").Provider<ScrollAreaContextValue | null>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ScrollButtonProps } from './types';
|
|
2
2
|
export declare const ScrollAreaButton: {
|
|
3
|
-
({ className
|
|
3
|
+
({ className }: ScrollButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -1,15 +1,36 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ActionIcon } from "@mantine/core";
|
|
3
|
-
import { IconChevronDown, IconChevronUp } from "@tabler/icons-react";
|
|
4
3
|
import { useScrollArea } from "./context.js";
|
|
5
|
-
const ScrollAreaButton = ({ className
|
|
4
|
+
const ScrollAreaButton = ({ className })=>{
|
|
6
5
|
const { hasScrollableContent, isAboveCenter, scrollToTop, scrollToBottom } = useScrollArea();
|
|
7
6
|
if (!hasScrollableContent) return null;
|
|
8
7
|
const isScrollingDown = isAboveCenter;
|
|
9
|
-
const icon =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const icon = /*#__PURE__*/ jsxs("svg", {
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
width: "24",
|
|
11
|
+
height: "24",
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
fill: "none",
|
|
14
|
+
stroke: "currentColor",
|
|
15
|
+
strokeWidth: "1.5",
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round",
|
|
18
|
+
role: "img",
|
|
19
|
+
"aria-label": "Chevron",
|
|
20
|
+
style: {
|
|
21
|
+
transition: 'transform 0.2s ease-in-out',
|
|
22
|
+
transform: isScrollingDown ? 'rotate(-180deg)' : 'rotate(0deg)'
|
|
23
|
+
},
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ jsx("path", {
|
|
26
|
+
stroke: "none",
|
|
27
|
+
d: "M0 0h24v24H0z",
|
|
28
|
+
fill: "none"
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ jsx("path", {
|
|
31
|
+
d: "M6 9l6 6l6 -6"
|
|
32
|
+
})
|
|
33
|
+
]
|
|
13
34
|
});
|
|
14
35
|
const handleClick = ()=>{
|
|
15
36
|
if (isScrollingDown) scrollToBottom();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolder/kit",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
"import": "./dist/index.js"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
-
"
|
|
11
|
+
"sideEffects": [
|
|
12
|
+
"*.css"
|
|
13
|
+
],
|
|
12
14
|
"files": [
|
|
13
15
|
"dist"
|
|
14
16
|
],
|
|
@@ -26,7 +28,8 @@
|
|
|
26
28
|
"@types/omgopass": "^3.2.3",
|
|
27
29
|
"@types/react": "^19.2.8",
|
|
28
30
|
"react": "^19.2.3",
|
|
29
|
-
"typescript": "^5.9.3"
|
|
31
|
+
"typescript": "^5.9.3",
|
|
32
|
+
"@tabler/icons": "^3.36.1"
|
|
30
33
|
},
|
|
31
34
|
"peerDependencies": {
|
|
32
35
|
"react": ">=16.9.0",
|
|
@@ -58,13 +61,11 @@
|
|
|
58
61
|
"nanostores": "^1.1.0",
|
|
59
62
|
"surrealdb": "^2.0.0-alpha.16",
|
|
60
63
|
"omgopass": "^3.2.1",
|
|
61
|
-
"ai": "^6.0.31"
|
|
64
|
+
"ai": "^6.0.31",
|
|
65
|
+
"streamdown": "^2.0.1"
|
|
62
66
|
},
|
|
63
67
|
"trustedDependencies": [
|
|
64
68
|
"core-js",
|
|
65
69
|
"esbuild"
|
|
66
|
-
]
|
|
67
|
-
"dependencies": {
|
|
68
|
-
"streamdown": "^2.0.1"
|
|
69
|
-
}
|
|
70
|
+
]
|
|
70
71
|
}
|