@liujip0/components 0.0.2 → 0.2.0
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/README.md +35 -0
- package/dist/Input.module-C7oR_KDs.js +13 -0
- package/dist/assets/Backdrop.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Counter.css +1 -0
- package/dist/assets/Dialog.css +1 -0
- package/dist/assets/Divider.css +1 -0
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -0
- package/dist/assets/Radio.css +1 -0
- package/dist/assets/RadioGroup.css +1 -0
- package/dist/assets/Select.css +1 -0
- package/dist/assets/Snackbar.css +1 -0
- package/dist/assets/Tab.css +1 -0
- package/dist/assets/TabBar.css +1 -0
- package/dist/assets/Table.css +1 -0
- package/dist/assets/Tabs.css +1 -0
- package/dist/assets/ToggleButton.css +1 -1
- package/dist/assets/ToggleButtonGroup.css +1 -1
- package/dist/assets/Tooltip.css +1 -0
- package/dist/assets/main.css +1 -0
- package/dist/components/Backdrop/Backdrop.d.ts +6 -0
- package/dist/components/Backdrop/Backdrop.js +18 -0
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/IconButton/IconButton.js +7 -7
- package/dist/components/Button/ToggleButton/ToggleButton.js +16 -16
- package/dist/components/Button/ToggleButton/ToggleButtonGroup.js +15 -15
- package/dist/components/Dialog/Dialog.d.ts +19 -0
- package/dist/components/Dialog/Dialog.js +44 -0
- package/dist/components/Divider/Divider.d.ts +5 -0
- package/dist/components/Divider/Divider.js +17 -0
- package/dist/components/Input/Checkbox/Checkbox.d.ts +9 -0
- package/dist/components/Input/Checkbox/Checkbox.js +51 -0
- package/dist/components/Input/Counter/Counter.d.ts +11 -0
- package/dist/components/Input/Counter/Counter.js +57 -0
- package/dist/components/Input/Input.d.ts +17 -0
- package/dist/components/Input/Input.js +63 -0
- package/dist/components/Input/Radio/Radio.d.ts +10 -0
- package/dist/components/Input/Radio/Radio.js +53 -0
- package/dist/components/Input/Radio/RadioGroup.d.ts +13 -0
- package/dist/components/Input/Radio/RadioGroup.js +41 -0
- package/dist/components/Input/Select/Select.d.ts +14 -0
- package/dist/components/Input/Select/Select.js +63 -0
- package/dist/components/Input/TextArea.d.ts +15 -0
- package/dist/components/Input/TextArea.js +56 -0
- package/dist/components/Snackbar/Snackbar.d.ts +9 -0
- package/dist/components/Snackbar/Snackbar.js +28 -0
- package/dist/components/Table/Table.d.ts +18 -0
- package/dist/components/Table/Table.js +25 -0
- package/dist/components/Tabs/Tab.d.ts +9 -0
- package/dist/components/Tabs/Tab.js +25 -0
- package/dist/components/Tabs/TabBar.d.ts +8 -0
- package/dist/components/Tabs/TabBar.js +17 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -0
- package/dist/components/Tabs/Tabs.js +34 -0
- package/dist/components/Tooltip/Tooltip.d.ts +7 -0
- package/dist/components/Tooltip/Tooltip.js +42 -0
- package/dist/main.d.ts +15 -0
- package/dist/main.js +45 -9
- package/package.json +5 -3
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsxs as a, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { IconButton as d } from "../../Button/IconButton/IconButton.js";
|
|
3
|
+
import '../../../assets/Radio.css';const m = "_container_12u6r_1", u = "_label_12u6r_7", i = {
|
|
4
|
+
container: m,
|
|
5
|
+
label: u
|
|
6
|
+
};
|
|
7
|
+
function b({
|
|
8
|
+
selected: r,
|
|
9
|
+
onChange: e,
|
|
10
|
+
name: o,
|
|
11
|
+
id: t,
|
|
12
|
+
label: c,
|
|
13
|
+
className: l
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ a("div", { className: i.container, children: [
|
|
16
|
+
/* @__PURE__ */ a(
|
|
17
|
+
d,
|
|
18
|
+
{
|
|
19
|
+
className: l,
|
|
20
|
+
onClick: () => {
|
|
21
|
+
e && e(!r);
|
|
22
|
+
},
|
|
23
|
+
children: [
|
|
24
|
+
r ? /* @__PURE__ */ n("span", { className: "material-symbols-outlined", children: "radio_button_checked" }) : /* @__PURE__ */ n("span", { className: "material-symbols-outlined", children: "radio_button_unchecked" }),
|
|
25
|
+
/* @__PURE__ */ n(
|
|
26
|
+
"input",
|
|
27
|
+
{
|
|
28
|
+
type: "radio",
|
|
29
|
+
name: o,
|
|
30
|
+
id: t,
|
|
31
|
+
checked: r,
|
|
32
|
+
onChange: (s) => {
|
|
33
|
+
e && e(s.currentTarget.checked);
|
|
34
|
+
},
|
|
35
|
+
hidden: !0
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
c && /* @__PURE__ */ n(
|
|
42
|
+
"label",
|
|
43
|
+
{
|
|
44
|
+
htmlFor: t,
|
|
45
|
+
className: i.label,
|
|
46
|
+
children: c
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
b as Radio
|
|
53
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type RadioGroupProps = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
name: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
error?: boolean;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
value: string;
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare function RadioGroup({ children, name, label, error, helperText, className, value, onChange, }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs as h, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import '../../../assets/RadioGroup.css';const x = "_container_1ygqk_1", d = "_outline_1ygqk_6", T = "_label_1ygqk_12", y = "_helperText_1ygqk_17", E = "_helperTextError_1ygqk_24", r = {
|
|
4
|
+
container: x,
|
|
5
|
+
outline: d,
|
|
6
|
+
label: T,
|
|
7
|
+
helperText: y,
|
|
8
|
+
helperTextError: E
|
|
9
|
+
};
|
|
10
|
+
function k({
|
|
11
|
+
children: a,
|
|
12
|
+
name: i,
|
|
13
|
+
label: n,
|
|
14
|
+
error: c,
|
|
15
|
+
helperText: o,
|
|
16
|
+
className: p,
|
|
17
|
+
value: _,
|
|
18
|
+
onChange: s
|
|
19
|
+
}) {
|
|
20
|
+
const m = l.Children.map(a, (e) => l.isValidElement(e) ? l.cloneElement(e, {
|
|
21
|
+
name: i,
|
|
22
|
+
selected: _ === e.props.value,
|
|
23
|
+
onChange: (u) => {
|
|
24
|
+
s(u ? e.props.value : "");
|
|
25
|
+
}
|
|
26
|
+
}) : e);
|
|
27
|
+
return /* @__PURE__ */ h("div", { className: r.container + " " + (p || ""), children: [
|
|
28
|
+
n && /* @__PURE__ */ t("p", { className: r.label, children: n }),
|
|
29
|
+
/* @__PURE__ */ t("div", { className: r.outline, children: m }),
|
|
30
|
+
o && /* @__PURE__ */ t(
|
|
31
|
+
"p",
|
|
32
|
+
{
|
|
33
|
+
className: r.helperText + " " + (c ? r.helperTextError : ""),
|
|
34
|
+
children: o
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
k as RadioGroup
|
|
41
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type SelectProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
value: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
helperText?: string;
|
|
11
|
+
error?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function Select({ id, value, children, className, label, onChange, disabled, helperText, error, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as p, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import '../../../assets/Select.css';const u = "_container_14cji_1", j = "_outline_14cji_6", x = "_errorOutline_14cji_18", m = "_select_14cji_22", b = "_selectDisabled_14cji_39", d = "_helperText_14cji_51", T = "_helperTextError_14cji_58", N = "_label_14cji_62", e = {
|
|
4
|
+
container: u,
|
|
5
|
+
outline: j,
|
|
6
|
+
errorOutline: x,
|
|
7
|
+
select: m,
|
|
8
|
+
selectDisabled: b,
|
|
9
|
+
helperText: d,
|
|
10
|
+
helperTextError: T,
|
|
11
|
+
label: N
|
|
12
|
+
};
|
|
13
|
+
function O({
|
|
14
|
+
id: t,
|
|
15
|
+
value: o,
|
|
16
|
+
children: _,
|
|
17
|
+
className: a,
|
|
18
|
+
label: r,
|
|
19
|
+
onChange: c,
|
|
20
|
+
disabled: s,
|
|
21
|
+
helperText: i,
|
|
22
|
+
error: n
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ p("div", { className: e.container + " " + (a || ""), children: [
|
|
25
|
+
r && /* @__PURE__ */ l(
|
|
26
|
+
"label",
|
|
27
|
+
{
|
|
28
|
+
htmlFor: t,
|
|
29
|
+
className: e.label,
|
|
30
|
+
children: r
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ l(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: e.outline + " " + (n ? e.errorOutline : ""),
|
|
37
|
+
children: /* @__PURE__ */ l(
|
|
38
|
+
"select",
|
|
39
|
+
{
|
|
40
|
+
id: t,
|
|
41
|
+
className: e.select + " " + (s ? e.selectDisabled : ""),
|
|
42
|
+
value: o,
|
|
43
|
+
onChange: (h) => {
|
|
44
|
+
c && c(h.target.value);
|
|
45
|
+
},
|
|
46
|
+
disabled: s,
|
|
47
|
+
children: _
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
i && /* @__PURE__ */ l(
|
|
53
|
+
"p",
|
|
54
|
+
{
|
|
55
|
+
className: e.helperText + " " + (n ? e.helperTextError : ""),
|
|
56
|
+
children: i
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
O as Select
|
|
63
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type TextAreaProps = {
|
|
2
|
+
value: string | number;
|
|
3
|
+
onChange?: (event: string) => void;
|
|
4
|
+
id: string;
|
|
5
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
error?: boolean;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
outlineClassName?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function TextArea({ value, onChange, id, onKeyDown, placeholder, label, error, helperText, disabled, className, outlineClassName, }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsxs as x, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { s as e } from "../../Input.module-C7oR_KDs.js";
|
|
3
|
+
function f({
|
|
4
|
+
value: c,
|
|
5
|
+
onChange: a,
|
|
6
|
+
id: t,
|
|
7
|
+
onKeyDown: m,
|
|
8
|
+
placeholder: o,
|
|
9
|
+
label: l,
|
|
10
|
+
error: s,
|
|
11
|
+
helperText: i,
|
|
12
|
+
disabled: n,
|
|
13
|
+
className: u,
|
|
14
|
+
outlineClassName: p
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ x("div", { className: e.container + " " + (u || ""), children: [
|
|
17
|
+
l && /* @__PURE__ */ r(
|
|
18
|
+
"label",
|
|
19
|
+
{
|
|
20
|
+
htmlFor: t,
|
|
21
|
+
className: e.label,
|
|
22
|
+
children: l
|
|
23
|
+
}
|
|
24
|
+
),
|
|
25
|
+
/* @__PURE__ */ r(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: e.outline + " " + (s ? e.errorOutline : "") + " " + (p || ""),
|
|
29
|
+
children: /* @__PURE__ */ r(
|
|
30
|
+
"textarea",
|
|
31
|
+
{
|
|
32
|
+
className: e.input + " " + (n ? e.inputDisabled : ""),
|
|
33
|
+
value: c,
|
|
34
|
+
onChange: (h) => {
|
|
35
|
+
a && a(h.currentTarget.value);
|
|
36
|
+
},
|
|
37
|
+
id: t,
|
|
38
|
+
onKeyDown: m,
|
|
39
|
+
placeholder: o,
|
|
40
|
+
disabled: n
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
i && /* @__PURE__ */ r(
|
|
46
|
+
"p",
|
|
47
|
+
{
|
|
48
|
+
className: e.helperText + " " + (s ? e.helperTextError : ""),
|
|
49
|
+
children: i
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
f as TextArea
|
|
56
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type SnackbarProps = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
autoHideDuration?: number;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
message?: string;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare function Snackbar({ open, autoHideDuration, onClose, message, action, }: SnackbarProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsxs as i, jsx as c, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as f } from "react";
|
|
3
|
+
import '../../assets/Snackbar.css';const _ = "_snackbar_tl00m_1", b = "_message_tl00m_18", a = {
|
|
4
|
+
snackbar: _,
|
|
5
|
+
message: b
|
|
6
|
+
};
|
|
7
|
+
function d({
|
|
8
|
+
open: s,
|
|
9
|
+
autoHideDuration: e,
|
|
10
|
+
onClose: r,
|
|
11
|
+
message: m,
|
|
12
|
+
action: t
|
|
13
|
+
}) {
|
|
14
|
+
return f(() => {
|
|
15
|
+
if (s && e && r) {
|
|
16
|
+
const n = setTimeout(() => {
|
|
17
|
+
r();
|
|
18
|
+
}, e);
|
|
19
|
+
return () => clearTimeout(n);
|
|
20
|
+
}
|
|
21
|
+
}, [s, e, r]), s ? /* @__PURE__ */ i("div", { className: a.snackbar, children: [
|
|
22
|
+
/* @__PURE__ */ c("p", { className: a.message, children: m }),
|
|
23
|
+
/* @__PURE__ */ c("div", { children: t })
|
|
24
|
+
] }) : /* @__PURE__ */ c(l, {});
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
d as Snackbar
|
|
28
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type TableProps = {
|
|
2
|
+
children?: React.ReactNode;
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function Table({ children, className }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
type TableHeadProps = {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare function TableHead({ children }: TableHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
type ThProps = {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare function Th({ children }: ThProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
type TdProps = {
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
};
|
|
17
|
+
export declare function Td({ children }: TdProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/Table.css';const l = "_table_10gvy_1", s = "_tableHead_10gvy_8", c = "_th_10gvy_21", d = "_td_10gvy_33", a = {
|
|
3
|
+
table: l,
|
|
4
|
+
tableHead: s,
|
|
5
|
+
th: c,
|
|
6
|
+
td: d
|
|
7
|
+
};
|
|
8
|
+
function _({ children: t, className: n }) {
|
|
9
|
+
return /* @__PURE__ */ e("table", { className: a.table + " " + (n || ""), children: t });
|
|
10
|
+
}
|
|
11
|
+
function b({ children: t }) {
|
|
12
|
+
return /* @__PURE__ */ e("thead", { className: a.tableHead, children: t });
|
|
13
|
+
}
|
|
14
|
+
function r({ children: t }) {
|
|
15
|
+
return /* @__PURE__ */ e("th", { className: a.th, children: t });
|
|
16
|
+
}
|
|
17
|
+
function u({ children: t }) {
|
|
18
|
+
return /* @__PURE__ */ e("td", { className: a.td, children: t });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
_ as Table,
|
|
22
|
+
b as TableHead,
|
|
23
|
+
u as Td,
|
|
24
|
+
r as Th
|
|
25
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type TabProps = {
|
|
2
|
+
value: string;
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
export declare function Tab({ children, selected, onClick, className, style, }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/Tab.css';const i = "_tab_1m0oo_1", n = "_activeTab_1m0oo_15", t = {
|
|
3
|
+
tab: i,
|
|
4
|
+
activeTab: n
|
|
5
|
+
};
|
|
6
|
+
function m({
|
|
7
|
+
children: a,
|
|
8
|
+
selected: o,
|
|
9
|
+
onClick: b,
|
|
10
|
+
className: c,
|
|
11
|
+
style: e
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ s(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: t.tab + " " + (c || "") + " " + (o ? t.activeTab : ""),
|
|
17
|
+
onClick: b,
|
|
18
|
+
style: e,
|
|
19
|
+
children: a
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
m as Tab
|
|
25
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type TabBarProps = {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare function TabBar({ value, onChange, children }: TabBarProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import r from "react";
|
|
3
|
+
import '../../assets/TabBar.css';const l = "_tabBar_1oym3_1", m = {
|
|
4
|
+
tabBar: l
|
|
5
|
+
};
|
|
6
|
+
function c({ value: t, onChange: a, children: n }) {
|
|
7
|
+
const o = r.Children.map(n, (e) => r.isValidElement(e) ? r.cloneElement(e, {
|
|
8
|
+
selected: t === e.props.value,
|
|
9
|
+
onClick: () => {
|
|
10
|
+
a(e.props.value);
|
|
11
|
+
}
|
|
12
|
+
}) : e);
|
|
13
|
+
return /* @__PURE__ */ s("div", { className: m.tabBar, children: o });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
c as TabBar
|
|
17
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as i } from "react";
|
|
3
|
+
import { Tab as s } from "./Tab.js";
|
|
4
|
+
import { TabBar as m } from "./TabBar.js";
|
|
5
|
+
import '../../assets/Tabs.css';const l = "_container_1q694_1", u = "_contentContainer_1q694_6", o = {
|
|
6
|
+
container: l,
|
|
7
|
+
contentContainer: u
|
|
8
|
+
};
|
|
9
|
+
function f({ tabs: e }) {
|
|
10
|
+
const [r, c] = i(Object.keys(e)[0]);
|
|
11
|
+
return /* @__PURE__ */ a("div", { className: o.container, children: [
|
|
12
|
+
/* @__PURE__ */ t(
|
|
13
|
+
m,
|
|
14
|
+
{
|
|
15
|
+
value: r,
|
|
16
|
+
onChange: (n) => {
|
|
17
|
+
c(n);
|
|
18
|
+
},
|
|
19
|
+
children: Object.keys(e).map((n) => /* @__PURE__ */ t(
|
|
20
|
+
s,
|
|
21
|
+
{
|
|
22
|
+
value: n,
|
|
23
|
+
children: n
|
|
24
|
+
},
|
|
25
|
+
n
|
|
26
|
+
))
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ t("div", { className: o.contentContainer, children: e[r] })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
f as Tabs
|
|
34
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsxs as _, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import i from "react";
|
|
3
|
+
import '../../assets/Tooltip.css';const m = "_container_147qb_1", f = "_tooltipContainer_147qb_7", b = "_tooltip_147qb_7", t = {
|
|
4
|
+
container: m,
|
|
5
|
+
tooltipContainer: f,
|
|
6
|
+
tooltip: b
|
|
7
|
+
};
|
|
8
|
+
function C({ content: s, children: l }) {
|
|
9
|
+
const [r, o] = i.useState(!1), [a, c] = i.useState(
|
|
10
|
+
{}
|
|
11
|
+
), p = (d) => {
|
|
12
|
+
const e = d.currentTarget.getBoundingClientRect();
|
|
13
|
+
c({
|
|
14
|
+
top: e.bottom,
|
|
15
|
+
left: e.left
|
|
16
|
+
}), o(!0);
|
|
17
|
+
}, u = () => {
|
|
18
|
+
o(!1);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ _(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: t.container,
|
|
24
|
+
onMouseEnter: p,
|
|
25
|
+
onMouseLeave: u,
|
|
26
|
+
children: [
|
|
27
|
+
l,
|
|
28
|
+
r && /* @__PURE__ */ n(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: t.tooltipContainer,
|
|
32
|
+
style: a,
|
|
33
|
+
children: /* @__PURE__ */ n("div", { className: t.tooltip, children: s })
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
C as Tooltip
|
|
42
|
+
};
|
package/dist/main.d.ts
CHANGED
|
@@ -2,3 +2,18 @@ export { Button } from './components/Button/Button.tsx';
|
|
|
2
2
|
export { IconButton } from './components/Button/IconButton/IconButton.tsx';
|
|
3
3
|
export { ToggleButton } from './components/Button/ToggleButton/ToggleButton.tsx';
|
|
4
4
|
export { ToggleButtonGroup } from './components/Button/ToggleButton/ToggleButtonGroup.tsx';
|
|
5
|
+
export { Dialog, DialogActions, DialogContent, DialogTitle, } from './components/Dialog/Dialog.tsx';
|
|
6
|
+
export { Divider } from './components/Divider/Divider.tsx';
|
|
7
|
+
export { Input } from './components/Input/Input.tsx';
|
|
8
|
+
export { TextArea } from './components/Input/TextArea.tsx';
|
|
9
|
+
export { Checkbox } from './components/Input/Checkbox/Checkbox.tsx';
|
|
10
|
+
export { Counter } from './components/Input/Counter/Counter.tsx';
|
|
11
|
+
export { Radio } from './components/Input/Radio/Radio.tsx';
|
|
12
|
+
export { RadioGroup } from './components/Input/Radio/RadioGroup.tsx';
|
|
13
|
+
export { Select } from './components/Input/Select/Select.tsx';
|
|
14
|
+
export { Snackbar } from './components/Snackbar/Snackbar.tsx';
|
|
15
|
+
export { Table, TableHead, Td, Th } from './components/Table/Table.tsx';
|
|
16
|
+
export { Tab } from './components/Tabs/Tab.tsx';
|
|
17
|
+
export { TabBar } from './components/Tabs/TabBar.tsx';
|
|
18
|
+
export { Tabs } from './components/Tabs/Tabs.tsx';
|
|
19
|
+
export { Tooltip } from './components/Tooltip/Tooltip.tsx';
|
package/dist/main.js
CHANGED
|
@@ -1,10 +1,46 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { IconButton as
|
|
3
|
-
import { ToggleButton as
|
|
4
|
-
import { ToggleButtonGroup as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { Button as t } from "./components/Button/Button.js";
|
|
2
|
+
import { IconButton as p } from "./components/Button/IconButton/IconButton.js";
|
|
3
|
+
import { ToggleButton as f } from "./components/Button/ToggleButton/ToggleButton.js";
|
|
4
|
+
import { ToggleButtonGroup as a } from "./components/Button/ToggleButton/ToggleButtonGroup.js";
|
|
5
|
+
import { Dialog as i, DialogActions as l, DialogContent as n, DialogTitle as g } from "./components/Dialog/Dialog.js";
|
|
6
|
+
import { Divider as b } from "./components/Divider/Divider.js";
|
|
7
|
+
import { Input as d } from "./components/Input/Input.js";
|
|
8
|
+
import { TextArea as D } from "./components/Input/TextArea.js";
|
|
9
|
+
import { Checkbox as h } from "./components/Input/Checkbox/Checkbox.js";
|
|
10
|
+
import { Counter as s } from "./components/Input/Counter/Counter.js";
|
|
11
|
+
import { Radio as G } from "./components/Input/Radio/Radio.js";
|
|
12
|
+
import { RadioGroup as R } from "./components/Input/Radio/RadioGroup.js";
|
|
13
|
+
import { Select as v } from "./components/Input/Select/Select.js";
|
|
14
|
+
import { Snackbar as j } from "./components/Snackbar/Snackbar.js";
|
|
15
|
+
import { Table as w, TableHead as y, Td as z, Th as E } from "./components/Table/Table.js";
|
|
16
|
+
import { Tab as J } from "./components/Tabs/Tab.js";
|
|
17
|
+
import { TabBar as L } from "./components/Tabs/TabBar.js";
|
|
18
|
+
import { Tabs as N } from "./components/Tabs/Tabs.js";
|
|
19
|
+
import { Tooltip as P } from "./components/Tooltip/Tooltip.js";
|
|
20
|
+
import './assets/main.css';export {
|
|
21
|
+
t as Button,
|
|
22
|
+
h as Checkbox,
|
|
23
|
+
s as Counter,
|
|
24
|
+
i as Dialog,
|
|
25
|
+
l as DialogActions,
|
|
26
|
+
n as DialogContent,
|
|
27
|
+
g as DialogTitle,
|
|
28
|
+
b as Divider,
|
|
29
|
+
p as IconButton,
|
|
30
|
+
d as Input,
|
|
31
|
+
G as Radio,
|
|
32
|
+
R as RadioGroup,
|
|
33
|
+
v as Select,
|
|
34
|
+
j as Snackbar,
|
|
35
|
+
J as Tab,
|
|
36
|
+
L as TabBar,
|
|
37
|
+
w as Table,
|
|
38
|
+
y as TableHead,
|
|
39
|
+
N as Tabs,
|
|
40
|
+
z as Td,
|
|
41
|
+
D as TextArea,
|
|
42
|
+
E as Th,
|
|
43
|
+
f as ToggleButton,
|
|
44
|
+
a as ToggleButtonGroup,
|
|
45
|
+
P as Tooltip
|
|
10
46
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liujip0/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"types": "dist/main.d.ts",
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"peerDependencies": {
|
|
12
|
+
"@material-symbols/font-400": "^0.33.0",
|
|
12
13
|
"react": "^19.1.0",
|
|
13
14
|
"react-dom": "^19.1.0"
|
|
14
15
|
},
|
|
15
16
|
"devDependencies": {
|
|
16
|
-
"react": "^19.1.0",
|
|
17
|
-
"react-dom": "^19.1.0",
|
|
18
17
|
"@eslint/js": "^9.30.1",
|
|
18
|
+
"@material-symbols/font-400": "^0.33.0",
|
|
19
19
|
"@types/node": "^24.1.0",
|
|
20
20
|
"@types/react": "^19.1.8",
|
|
21
21
|
"@types/react-dom": "^19.1.6",
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
"glob": "^11.0.3",
|
|
27
27
|
"globals": "^16.3.0",
|
|
28
28
|
"prettier": "^3.6.2",
|
|
29
|
+
"react": "^19.1.0",
|
|
30
|
+
"react-dom": "^19.1.0",
|
|
29
31
|
"typescript": "~5.8.3",
|
|
30
32
|
"typescript-eslint": "^8.35.1",
|
|
31
33
|
"vite": "^7.0.4",
|