@bouko/react 1.6.0 → 1.6.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/dist/components/animate/configs.d.ts +102 -102
- package/dist/components/heading.js +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/layout/heading.d.ts +12 -0
- package/dist/components/layout/heading.js +14 -0
- package/dist/components/layout/separator.js +1 -1
- package/dist/components/list/variants/bullet.js +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/package.json +1 -1
|
@@ -1,136 +1,136 @@
|
|
|
1
1
|
export declare const animations: {
|
|
2
|
-
fadeUp: {
|
|
3
|
-
initial: {
|
|
4
|
-
opacity:
|
|
5
|
-
y:
|
|
6
|
-
};
|
|
7
|
-
animate: {
|
|
8
|
-
opacity:
|
|
9
|
-
y:
|
|
10
|
-
transition: {
|
|
11
|
-
duration:
|
|
2
|
+
readonly fadeUp: {
|
|
3
|
+
readonly initial: {
|
|
4
|
+
readonly opacity: 0;
|
|
5
|
+
readonly y: 30;
|
|
6
|
+
};
|
|
7
|
+
readonly animate: {
|
|
8
|
+
readonly opacity: 1;
|
|
9
|
+
readonly y: 0;
|
|
10
|
+
readonly transition: {
|
|
11
|
+
readonly duration: 0.3;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
-
fadeInAndOut: {
|
|
16
|
-
initial: {
|
|
17
|
-
opacity:
|
|
15
|
+
readonly fadeInAndOut: {
|
|
16
|
+
readonly initial: {
|
|
17
|
+
readonly opacity: 0;
|
|
18
18
|
};
|
|
19
|
-
animate: {
|
|
20
|
-
opacity:
|
|
19
|
+
readonly animate: {
|
|
20
|
+
readonly opacity: 1;
|
|
21
21
|
};
|
|
22
|
-
exit: {
|
|
23
|
-
opacity:
|
|
22
|
+
readonly exit: {
|
|
23
|
+
readonly opacity: 0;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
fadeUpAndOut: {
|
|
27
|
-
initial: {
|
|
28
|
-
opacity:
|
|
29
|
-
y:
|
|
26
|
+
readonly fadeUpAndOut: {
|
|
27
|
+
readonly initial: {
|
|
28
|
+
readonly opacity: 0;
|
|
29
|
+
readonly y: 10;
|
|
30
30
|
};
|
|
31
|
-
animate: {
|
|
32
|
-
opacity:
|
|
33
|
-
y:
|
|
31
|
+
readonly animate: {
|
|
32
|
+
readonly opacity: 1;
|
|
33
|
+
readonly y: 0;
|
|
34
34
|
};
|
|
35
|
-
exit: {
|
|
36
|
-
opacity:
|
|
37
|
-
y:
|
|
35
|
+
readonly exit: {
|
|
36
|
+
readonly opacity: 1;
|
|
37
|
+
readonly y: -10;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
fadeUpAndOutSlow: {
|
|
41
|
-
initial: {
|
|
42
|
-
opacity:
|
|
43
|
-
y:
|
|
44
|
-
};
|
|
45
|
-
animate: {
|
|
46
|
-
opacity:
|
|
47
|
-
y:
|
|
48
|
-
transition: {
|
|
49
|
-
duration:
|
|
50
|
-
ease:
|
|
40
|
+
readonly fadeUpAndOutSlow: {
|
|
41
|
+
readonly initial: {
|
|
42
|
+
readonly opacity: 0;
|
|
43
|
+
readonly y: "-100%";
|
|
44
|
+
};
|
|
45
|
+
readonly animate: {
|
|
46
|
+
readonly opacity: 1;
|
|
47
|
+
readonly y: 0;
|
|
48
|
+
readonly transition: {
|
|
49
|
+
readonly duration: 0.2;
|
|
50
|
+
readonly ease: "easeInOut";
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
exit: {
|
|
54
|
-
opacity:
|
|
55
|
-
y:
|
|
53
|
+
readonly exit: {
|
|
54
|
+
readonly opacity: 0;
|
|
55
|
+
readonly y: "100%";
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
-
fadeLeft: {
|
|
59
|
-
initial: {
|
|
60
|
-
x:
|
|
61
|
-
opacity:
|
|
58
|
+
readonly fadeLeft: {
|
|
59
|
+
readonly initial: {
|
|
60
|
+
readonly x: -50;
|
|
61
|
+
readonly opacity: 0;
|
|
62
62
|
};
|
|
63
|
-
animate: {
|
|
64
|
-
x:
|
|
65
|
-
opacity:
|
|
63
|
+
readonly animate: {
|
|
64
|
+
readonly x: 0;
|
|
65
|
+
readonly opacity: 1;
|
|
66
66
|
};
|
|
67
|
-
exit: {
|
|
68
|
-
x:
|
|
69
|
-
opacity:
|
|
67
|
+
readonly exit: {
|
|
68
|
+
readonly x: 50;
|
|
69
|
+
readonly opacity: 0;
|
|
70
70
|
};
|
|
71
|
-
transition: {
|
|
72
|
-
duration:
|
|
73
|
-
ease:
|
|
71
|
+
readonly transition: {
|
|
72
|
+
readonly duration: 0.4;
|
|
73
|
+
readonly ease: "easeOut";
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
-
growUpAndOut: {
|
|
77
|
-
initial: {
|
|
78
|
-
opacity:
|
|
79
|
-
height:
|
|
76
|
+
readonly growUpAndOut: {
|
|
77
|
+
readonly initial: {
|
|
78
|
+
readonly opacity: 0;
|
|
79
|
+
readonly height: 0;
|
|
80
80
|
};
|
|
81
|
-
animate: {
|
|
82
|
-
opacity:
|
|
83
|
-
height:
|
|
81
|
+
readonly animate: {
|
|
82
|
+
readonly opacity: 1;
|
|
83
|
+
readonly height: "auto";
|
|
84
84
|
};
|
|
85
|
-
exit: {
|
|
86
|
-
opacity:
|
|
87
|
-
height:
|
|
85
|
+
readonly exit: {
|
|
86
|
+
readonly opacity: 0;
|
|
87
|
+
readonly height: 0;
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
|
-
fadeStagger: {
|
|
91
|
-
initial: {
|
|
92
|
-
opacity:
|
|
93
|
-
};
|
|
94
|
-
animate: {
|
|
95
|
-
opacity:
|
|
96
|
-
transition: {
|
|
97
|
-
staggerChildren:
|
|
90
|
+
readonly fadeStagger: {
|
|
91
|
+
readonly initial: {
|
|
92
|
+
readonly opacity: 0;
|
|
93
|
+
};
|
|
94
|
+
readonly animate: {
|
|
95
|
+
readonly opacity: 1;
|
|
96
|
+
readonly transition: {
|
|
97
|
+
readonly staggerChildren: 0.2;
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
|
-
fadeList: {
|
|
102
|
-
hidden: {
|
|
103
|
-
opacity:
|
|
104
|
-
x:
|
|
105
|
-
y:
|
|
106
|
-
};
|
|
107
|
-
visible: {
|
|
108
|
-
opacity:
|
|
109
|
-
x:
|
|
110
|
-
y:
|
|
111
|
-
transition: {
|
|
112
|
-
type:
|
|
113
|
-
stiffness:
|
|
114
|
-
damping:
|
|
101
|
+
readonly fadeList: {
|
|
102
|
+
readonly hidden: {
|
|
103
|
+
readonly opacity: 0;
|
|
104
|
+
readonly x: -10;
|
|
105
|
+
readonly y: 5;
|
|
106
|
+
};
|
|
107
|
+
readonly visible: {
|
|
108
|
+
readonly opacity: 1;
|
|
109
|
+
readonly x: 0;
|
|
110
|
+
readonly y: 0;
|
|
111
|
+
readonly transition: {
|
|
112
|
+
readonly type: "spring";
|
|
113
|
+
readonly stiffness: 350;
|
|
114
|
+
readonly damping: 25;
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
117
|
};
|
|
118
|
-
popUp: {
|
|
119
|
-
initial: {
|
|
120
|
-
opacity:
|
|
121
|
-
scale:
|
|
122
|
-
};
|
|
123
|
-
animate: {
|
|
124
|
-
opacity:
|
|
125
|
-
scale:
|
|
126
|
-
};
|
|
127
|
-
exit: {
|
|
128
|
-
opacity:
|
|
129
|
-
scale:
|
|
130
|
-
};
|
|
131
|
-
transition: {
|
|
132
|
-
duration:
|
|
133
|
-
ease:
|
|
118
|
+
readonly popUp: {
|
|
119
|
+
readonly initial: {
|
|
120
|
+
readonly opacity: 0;
|
|
121
|
+
readonly scale: 0.9;
|
|
122
|
+
};
|
|
123
|
+
readonly animate: {
|
|
124
|
+
readonly opacity: 1;
|
|
125
|
+
readonly scale: 1;
|
|
126
|
+
};
|
|
127
|
+
readonly exit: {
|
|
128
|
+
readonly opacity: 0;
|
|
129
|
+
readonly scale: 0.9;
|
|
130
|
+
};
|
|
131
|
+
readonly transition: {
|
|
132
|
+
readonly duration: 0.2;
|
|
133
|
+
readonly ease: readonly [0.23, 1, 0.32, 1];
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
136
|
};
|
|
@@ -9,6 +9,6 @@ const base = {
|
|
|
9
9
|
container: "gap-2 items-center",
|
|
10
10
|
subcontainer: "flex grow flex-col",
|
|
11
11
|
badge: "mb-2",
|
|
12
|
-
title: "flex items-center gap-2
|
|
13
|
-
subtitle: "font-semibold text-primary-lighter"
|
|
12
|
+
title: "flex items-center gap-2 font-bold",
|
|
13
|
+
subtitle: "text-sm font-semibold text-primary-lighter"
|
|
14
14
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type HeadingProps = {
|
|
3
|
+
styles?: Record<string, string>;
|
|
4
|
+
container?: string;
|
|
5
|
+
badge?: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
align?: "left" | "center";
|
|
9
|
+
subtitle?: ReactNode;
|
|
10
|
+
reverse?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export default function Heading({ styles, container, badge, icon, title, align, subtitle, reverse }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { RowBox, ColumnBox } from "../flex";
|
|
3
|
+
import { cn } from "@bouko/style";
|
|
4
|
+
import Badge from "../badge";
|
|
5
|
+
export default function Heading({ styles = {}, container, badge, icon, title, align = "left", subtitle, reverse }) {
|
|
6
|
+
return (_jsxs(RowBox, { style: cn(base.container, styles.container, container), children: [icon, _jsxs(ColumnBox, { style: cn(base.subcontainer, align === "center" && "items-center", reverse && "flex-col-reverse"), children: [badge && _jsx(Badge, { style: base.badge, children: badge }), _jsx("span", { className: cn(base.title, styles.title), children: title }), subtitle && _jsx("span", { className: cn(base.subtitle, styles.subtitle), children: subtitle })] })] }));
|
|
7
|
+
}
|
|
8
|
+
const base = {
|
|
9
|
+
container: "gap-2 items-center",
|
|
10
|
+
subcontainer: "flex grow flex-col",
|
|
11
|
+
badge: "mb-2",
|
|
12
|
+
title: "flex items-center gap-2 text-lg font-bold",
|
|
13
|
+
subtitle: "font-semibold text-primary-lighter"
|
|
14
|
+
};
|
|
@@ -11,6 +11,6 @@ function Marker() {
|
|
|
11
11
|
return (_jsx("span", { className: "mr-3 text-accent", children: "\u2022" }));
|
|
12
12
|
}
|
|
13
13
|
const styles = {
|
|
14
|
-
base: "flex flex-col gap-1 w-full
|
|
15
|
-
title: "mb-1 text-base
|
|
14
|
+
base: "flex flex-col gap-1 w-full",
|
|
15
|
+
title: "mb-1 text-base"
|
|
16
16
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export { default as Select } from "./components/select";
|
|
|
4
4
|
export { default as MultipleChoice } from "./components/multiple-choice";
|
|
5
5
|
export { default as Attachment } from "./components/attachment";
|
|
6
6
|
export { default as CheckBox } from "./components/checkbox";
|
|
7
|
-
export { default as Heading } from "./components/heading";
|
|
8
7
|
export { default as Badge } from "./components/badge";
|
|
9
8
|
export { default as FadeCarousel } from "./components/fade-carousel";
|
|
10
9
|
export * from "./components";
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,6 @@ export { default as Select } from "./components/select";
|
|
|
4
4
|
export { default as MultipleChoice } from "./components/multiple-choice";
|
|
5
5
|
export { default as Attachment } from "./components/attachment";
|
|
6
6
|
export { default as CheckBox } from "./components/checkbox";
|
|
7
|
-
export { default as Heading } from "./components/heading";
|
|
8
7
|
export { default as Badge } from "./components/badge";
|
|
9
8
|
export { default as FadeCarousel } from "./components/fade-carousel";
|
|
10
9
|
export * from "./components";
|