@liujip0/components 0.2.2 → 0.2.4
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/Backdrop/Backdrop.d.ts +2 -1
- package/dist/components/Backdrop/Backdrop.js +7 -7
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Button/Button.js +4 -4
- package/dist/components/Button/IconButton/IconButton.d.ts +3 -2
- package/dist/components/Button/IconButton/IconButton.js +15 -9
- package/dist/components/Button/ToggleButton/ToggleButton.d.ts +10 -10
- package/dist/components/Button/ToggleButton/ToggleButton.js +28 -22
- package/dist/components/Button/ToggleButton/ToggleButtonGroup.d.ts +2 -2
- package/dist/components/Button/ToggleButton/ToggleButtonGroup.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +9 -4
- package/dist/components/Dialog/Dialog.js +32 -26
- package/dist/components/Divider/Divider.d.ts +2 -1
- package/dist/components/Divider/Divider.js +9 -9
- package/dist/components/Input/Checkbox/Checkbox.d.ts +5 -3
- package/dist/components/Input/Checkbox/Checkbox.js +23 -19
- package/dist/components/Input/Counter/Counter.d.ts +8 -4
- package/dist/components/Input/Counter/Counter.js +36 -30
- package/dist/components/Input/Input.d.ts +7 -8
- package/dist/components/Input/Input.js +17 -17
- package/dist/components/Input/Password.d.ts +2 -0
- package/dist/components/Input/Password.js +28 -0
- package/dist/components/Input/Radio/Radio.d.ts +10 -5
- package/dist/components/Input/Radio/Radio.js +34 -29
- package/dist/components/Input/Radio/RadioGroup.d.ts +5 -5
- package/dist/components/Input/Radio/RadioGroup.js +17 -17
- package/dist/components/Input/Select/Select.d.ts +9 -5
- package/dist/components/Input/Select/Select.js +38 -32
- package/dist/components/Input/TextArea.d.ts +5 -5
- package/dist/components/Input/TextArea.js +16 -16
- package/dist/components/Snackbar/Snackbar.d.ts +5 -2
- package/dist/components/Snackbar/Snackbar.js +23 -20
- package/dist/components/Table/Table.d.ts +6 -3
- package/dist/components/Table/Table.js +10 -10
- package/dist/components/Tabs/Tab.d.ts +3 -4
- package/dist/components/Tabs/Tab.js +8 -8
- package/dist/components/Tabs/TabBar.d.ts +2 -1
- package/dist/components/Tabs/TabBar.js +7 -7
- package/dist/main.js +43 -42
- package/dist/utils/omit.d.ts +1 -0
- package/dist/utils/omit.js +11 -0
- package/package.json +11 -11
|
@@ -4,19 +4,19 @@ import '../../assets/Tab.css';const i = "_tab_1m0oo_1", n = "_activeTab_1m0oo_15
|
|
|
4
4
|
activeTab: n
|
|
5
5
|
};
|
|
6
6
|
function m({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
selected: a,
|
|
8
|
+
onClick: o,
|
|
9
|
+
children: b,
|
|
10
10
|
className: c,
|
|
11
|
-
|
|
11
|
+
...e
|
|
12
12
|
}) {
|
|
13
13
|
return /* @__PURE__ */ s(
|
|
14
14
|
"div",
|
|
15
15
|
{
|
|
16
|
-
className: t.tab + " " + (c || "") + " " + (
|
|
17
|
-
onClick:
|
|
18
|
-
|
|
19
|
-
children:
|
|
16
|
+
className: t.tab + " " + (c || "") + " " + (a ? t.activeTab : ""),
|
|
17
|
+
onClick: o,
|
|
18
|
+
...e,
|
|
19
|
+
children: b
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
}
|
|
@@ -3,6 +3,7 @@ type TabBarProps = {
|
|
|
3
3
|
value: string;
|
|
4
4
|
onChange: (value: string) => void;
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
6
7
|
};
|
|
7
|
-
export declare function TabBar({ value, onChange, children }: TabBarProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function TabBar({ value, onChange, children, className }: TabBarProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import r from "react";
|
|
3
|
-
import '../../assets/TabBar.css';const
|
|
4
|
-
tabBar:
|
|
3
|
+
import '../../assets/TabBar.css';const m = "_tabBar_1oym3_1", p = {
|
|
4
|
+
tabBar: m
|
|
5
5
|
};
|
|
6
|
-
function
|
|
7
|
-
const
|
|
6
|
+
function u({ value: t, onChange: a, children: n, className: o }) {
|
|
7
|
+
const s = r.Children.map(n, (e) => r.isValidElement(e) ? r.cloneElement(e, {
|
|
8
8
|
selected: t === e.props.value,
|
|
9
9
|
onClick: () => {
|
|
10
10
|
a(e.props.value);
|
|
11
11
|
}
|
|
12
12
|
}) : e);
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ l("div", { className: p.tabBar + " " + (o || ""), children: s });
|
|
14
14
|
}
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
u as TabBar
|
|
17
17
|
};
|
package/dist/main.js
CHANGED
|
@@ -1,48 +1,49 @@
|
|
|
1
|
-
import
|
|
1
|
+
import './assets/main.css';/* empty css */
|
|
2
|
+
import { Button as p } from "./components/Button/Button.js";
|
|
2
3
|
import { IconButton as x } from "./components/Button/IconButton/IconButton.js";
|
|
3
|
-
import { ToggleButton as
|
|
4
|
+
import { ToggleButton as f } from "./components/Button/ToggleButton/ToggleButton.js";
|
|
4
5
|
import { ToggleButtonGroup as n } from "./components/Button/ToggleButton/ToggleButtonGroup.js";
|
|
5
|
-
import { Dialog as
|
|
6
|
-
import { Divider as
|
|
7
|
-
import { Input as
|
|
8
|
-
import { TextArea as
|
|
9
|
-
import { Checkbox as
|
|
10
|
-
import { Counter as
|
|
11
|
-
import { Radio as
|
|
12
|
-
import { RadioGroup as
|
|
13
|
-
import { Select as
|
|
14
|
-
import { Snackbar as
|
|
15
|
-
import { Table as
|
|
16
|
-
import { Tab as
|
|
17
|
-
import { TabBar as
|
|
18
|
-
import { Tabs as
|
|
19
|
-
import { Tooltip as
|
|
20
|
-
|
|
6
|
+
import { Dialog as T, DialogActions as u, DialogContent as g, DialogTitle as b } from "./components/Dialog/Dialog.js";
|
|
7
|
+
import { Divider as d } from "./components/Divider/Divider.js";
|
|
8
|
+
import { Input as B } from "./components/Input/Input.js";
|
|
9
|
+
import { TextArea as C } from "./components/Input/TextArea.js";
|
|
10
|
+
import { Checkbox as k } from "./components/Input/Checkbox/Checkbox.js";
|
|
11
|
+
import { Counter as G } from "./components/Input/Counter/Counter.js";
|
|
12
|
+
import { Radio as R } from "./components/Input/Radio/Radio.js";
|
|
13
|
+
import { RadioGroup as v } from "./components/Input/Radio/RadioGroup.js";
|
|
14
|
+
import { Select as j } from "./components/Input/Select/Select.js";
|
|
15
|
+
import { Snackbar as w } from "./components/Snackbar/Snackbar.js";
|
|
16
|
+
import { Table as z, TableHead as E, Td as F, Th as J } from "./components/Table/Table.js";
|
|
17
|
+
import { Tab as L } from "./components/Tabs/Tab.js";
|
|
18
|
+
import { TabBar as N } from "./components/Tabs/TabBar.js";
|
|
19
|
+
import { Tabs as P } from "./components/Tabs/Tabs.js";
|
|
20
|
+
import { Tooltip as U } from "./components/Tooltip/Tooltip.js";
|
|
21
|
+
const r = "./main.css";
|
|
21
22
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
p as Button,
|
|
24
|
+
k as Checkbox,
|
|
25
|
+
G as Counter,
|
|
26
|
+
T as Dialog,
|
|
27
|
+
u as DialogActions,
|
|
28
|
+
g as DialogContent,
|
|
29
|
+
b as DialogTitle,
|
|
30
|
+
d as Divider,
|
|
30
31
|
x as IconButton,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
B as Input,
|
|
33
|
+
R as Radio,
|
|
34
|
+
v as RadioGroup,
|
|
35
|
+
j as Select,
|
|
36
|
+
w as Snackbar,
|
|
37
|
+
L as Tab,
|
|
38
|
+
N as TabBar,
|
|
39
|
+
z as Table,
|
|
40
|
+
E as TableHead,
|
|
41
|
+
P as Tabs,
|
|
42
|
+
F as Td,
|
|
43
|
+
C as TextArea,
|
|
44
|
+
J as Th,
|
|
45
|
+
f as ToggleButton,
|
|
45
46
|
n as ToggleButtonGroup,
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
U as Tooltip,
|
|
48
|
+
r as default
|
|
48
49
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function omit<T extends object, K extends keyof T>(obj: T, keysToOmit: K[]): Omit<T, K>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liujip0/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"types": "dist/main.d.ts",
|
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
"react-dom": "^19.1.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@eslint/js": "^9.
|
|
17
|
+
"@eslint/js": "^9.33.0",
|
|
18
18
|
"@material-symbols/font-400": "^0.33.0",
|
|
19
|
-
"@types/node": "^24.
|
|
20
|
-
"@types/react": "^19.1.
|
|
21
|
-
"@types/react-dom": "^19.1.
|
|
22
|
-
"@vitejs/plugin-react": "^4.
|
|
23
|
-
"eslint": "^9.
|
|
19
|
+
"@types/node": "^24.3.0",
|
|
20
|
+
"@types/react": "^19.1.10",
|
|
21
|
+
"@types/react-dom": "^19.1.7",
|
|
22
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
23
|
+
"eslint": "^9.33.0",
|
|
24
24
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
25
25
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
26
26
|
"glob": "^11.0.3",
|
|
27
27
|
"globals": "^16.3.0",
|
|
28
28
|
"prettier": "^3.6.2",
|
|
29
|
-
"react": "^19.1.
|
|
30
|
-
"react-dom": "^19.1.
|
|
29
|
+
"react": "^19.1.1",
|
|
30
|
+
"react-dom": "^19.1.1",
|
|
31
31
|
"typescript": "~5.8.3",
|
|
32
|
-
"typescript-eslint": "^8.
|
|
33
|
-
"vite": "^7.
|
|
32
|
+
"typescript-eslint": "^8.39.1",
|
|
33
|
+
"vite": "^7.1.2",
|
|
34
34
|
"vite-plugin-dts": "^4.5.4",
|
|
35
35
|
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
36
36
|
},
|