@liujip0/components 0.2.2 → 0.2.3
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 +6 -6
- package/dist/components/Input/Input.js +17 -17
- 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/utils/omit.d.ts +1 -0
- package/dist/utils/omit.js +11 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type BackdropProps = {
|
|
2
2
|
open: boolean;
|
|
3
3
|
onClose?: () => void;
|
|
4
|
+
className?: string;
|
|
4
5
|
};
|
|
5
|
-
export declare function Backdrop({ open, onClose }: BackdropProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function Backdrop({ open, onClose, className }: BackdropProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as c, Fragment as
|
|
2
|
-
import '../../assets/Backdrop.css';const
|
|
3
|
-
backdrop:
|
|
1
|
+
import { jsx as c, Fragment as t } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/Backdrop.css';const p = "_backdrop_qbjym_1", d = {
|
|
3
|
+
backdrop: p
|
|
4
4
|
};
|
|
5
|
-
function
|
|
5
|
+
function n({ open: o, onClose: r, className: a }) {
|
|
6
6
|
return o ? /* @__PURE__ */ c(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
onClick: () => {
|
|
10
10
|
r && r();
|
|
11
11
|
},
|
|
12
|
-
className:
|
|
12
|
+
className: d.backdrop + " " + (a || "")
|
|
13
13
|
}
|
|
14
|
-
) : /* @__PURE__ */ c(
|
|
14
|
+
) : /* @__PURE__ */ c(t, {});
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
n as Backdrop
|
|
18
18
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type ButtonProps = {
|
|
2
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
2
3
|
children?: React.ReactNode;
|
|
3
4
|
className?: string;
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export declare function Button({ children, className, ref, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className">;
|
|
6
|
+
export declare function Button({ ref, children, className, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -2,14 +2,14 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import '../../assets/Button.css';const r = "_button_y7o2r_1", b = {
|
|
3
3
|
button: r
|
|
4
4
|
};
|
|
5
|
-
function e({
|
|
5
|
+
function e({ ref: t, children: o, className: n, ...u }) {
|
|
6
6
|
return /* @__PURE__ */ s(
|
|
7
7
|
"button",
|
|
8
8
|
{
|
|
9
|
-
ref:
|
|
10
|
-
className: b.button + " " + (
|
|
9
|
+
ref: t,
|
|
10
|
+
className: b.button + " " + (n || ""),
|
|
11
11
|
...u,
|
|
12
|
-
children:
|
|
12
|
+
children: o
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
15
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type IconButtonProps = {
|
|
2
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
2
3
|
children: React.ReactNode;
|
|
3
4
|
className?: string;
|
|
4
|
-
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
5
|
-
export declare function IconButton({ children, className, ...props }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className">;
|
|
6
|
+
export declare function IconButton({ ref, children, className, ...props }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../../assets/IconButton.css';const
|
|
3
|
-
button:
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import '../../../assets/IconButton.css';const b = "_button_180ek_1", c = {
|
|
3
|
+
button: b
|
|
4
4
|
};
|
|
5
|
-
function
|
|
6
|
-
|
|
5
|
+
function r({
|
|
6
|
+
ref: t,
|
|
7
|
+
children: o,
|
|
8
|
+
className: n,
|
|
9
|
+
...u
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ s(
|
|
7
12
|
"button",
|
|
8
13
|
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
ref: t,
|
|
15
|
+
className: c.button + " " + (n || ""),
|
|
16
|
+
...u,
|
|
17
|
+
children: o
|
|
12
18
|
}
|
|
13
19
|
);
|
|
14
20
|
}
|
|
15
21
|
export {
|
|
16
|
-
|
|
22
|
+
r as IconButton
|
|
17
23
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ToggleButtonProps = {
|
|
3
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
2
4
|
children?: React.ReactNode;
|
|
3
5
|
className?: string;
|
|
4
6
|
classNameTrue?: string;
|
|
5
7
|
classNameFalse?: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
type ToggleButtonPropsAsStandalone = {
|
|
8
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "ref" | "className">;
|
|
9
|
+
export type ToggleButtonPropsAsStandalone = {
|
|
10
10
|
value: boolean;
|
|
11
11
|
onChange: (value: boolean) => void;
|
|
12
|
-
} & ToggleButtonProps
|
|
12
|
+
} & Omit<ToggleButtonProps, "value" | "onChange" | "onClick">;
|
|
13
13
|
export type ToggleButtonPropsAsChild = {
|
|
14
14
|
value: string;
|
|
15
15
|
selected?: boolean;
|
|
16
16
|
onClick?: () => void;
|
|
17
|
-
} & ToggleButtonProps
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function
|
|
20
|
-
export {};
|
|
17
|
+
} & Omit<ToggleButtonProps, "value" | "onClick" | "onChange">;
|
|
18
|
+
export declare function ToggleButtonInternal({ value, onChange, }: ToggleButtonPropsAsStandalone): React.ReactNode;
|
|
19
|
+
export declare function ToggleButtonInternal({ value, onClick, }: ToggleButtonPropsAsChild): React.ReactNode;
|
|
20
|
+
export declare function ToggleButton({ ...props }: ToggleButtonPropsAsStandalone | Omit<ToggleButtonPropsAsChild, "selected" | "onClick">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { omit as C } from "../../../utils/omit.js";
|
|
3
|
+
import { Button as b } from "../Button.js";
|
|
4
|
+
import '../../../assets/ToggleButton.css';const f = "_buttonFalse_1ed44_1", m = "_buttonTrue_1ed44_8", u = {
|
|
5
|
+
buttonFalse: f,
|
|
6
|
+
buttonTrue: m
|
|
6
7
|
};
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
...t
|
|
8
|
+
function i({
|
|
9
|
+
ref: t,
|
|
10
|
+
value: o,
|
|
11
|
+
children: l,
|
|
12
|
+
className: a,
|
|
13
|
+
classNameTrue: c,
|
|
14
|
+
classNameFalse: g,
|
|
15
|
+
...n
|
|
16
16
|
}) {
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
|
|
17
|
+
return /* @__PURE__ */ e(
|
|
18
|
+
b,
|
|
19
19
|
{
|
|
20
|
-
ref:
|
|
21
|
-
className: (("selected" in
|
|
20
|
+
ref: t,
|
|
21
|
+
className: (("selected" in n ? n.selected : o) ? u.buttonTrue + " " + (c || "") : u.buttonFalse + " " + (g || "")) + " " + (a || ""),
|
|
22
22
|
onClick: () => {
|
|
23
|
-
"onChange" in
|
|
23
|
+
"onChange" in n && n.onChange ? n.onChange(!o) : "onClick" in n && n.onClick && n.onClick();
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
children:
|
|
25
|
+
..."onChange" in n ? C(n, ["onChange"]) : n,
|
|
26
|
+
children: l
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
|
+
function _({
|
|
31
|
+
...t
|
|
32
|
+
}) {
|
|
33
|
+
return "onChange" in t ? /* @__PURE__ */ e(i, { ...t }) : /* @__PURE__ */ e(i, { ...t });
|
|
34
|
+
}
|
|
30
35
|
export {
|
|
31
|
-
|
|
36
|
+
_ as ToggleButton,
|
|
37
|
+
i as ToggleButtonInternal
|
|
32
38
|
};
|
|
@@ -4,9 +4,9 @@ type ToggleButtonGroupProps = {
|
|
|
4
4
|
onChange: (value: string) => void;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
label?: string;
|
|
7
|
-
error?: boolean;
|
|
8
7
|
helperText?: string;
|
|
8
|
+
error?: boolean;
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
11
|
-
export declare function ToggleButtonGroup({ value, onChange, children, label,
|
|
11
|
+
export declare function ToggleButtonGroup({ value, onChange, children, label, helperText, error, className, }: ToggleButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -2,18 +2,23 @@ type DialogProps = {
|
|
|
2
2
|
open: boolean;
|
|
3
3
|
onClose?: () => void;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
+
backdropClassName?: string;
|
|
6
|
+
dialogClassName?: string;
|
|
5
7
|
};
|
|
6
|
-
export declare function Dialog({ open, onClose, children }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function Dialog({ open, onClose, children, backdropClassName, dialogClassName, }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
type DialogTitleProps = {
|
|
8
10
|
children: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
9
12
|
};
|
|
10
|
-
export declare function DialogTitle({ children }: DialogTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function DialogTitle({ children, className }: DialogTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
type DialogContentProps = {
|
|
12
15
|
children: React.ReactNode;
|
|
16
|
+
className?: string;
|
|
13
17
|
};
|
|
14
|
-
export declare function DialogContent({ children }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function DialogContent({ children, className }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
|
|
15
19
|
type DialogActionsProps = {
|
|
16
20
|
children: React.ReactNode;
|
|
21
|
+
className?: string;
|
|
17
22
|
};
|
|
18
|
-
export declare function DialogActions({ children }: DialogActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function DialogActions({ children, className }: DialogActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
24
|
export {};
|
|
@@ -1,44 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../assets/Dialog.css';const
|
|
3
|
-
screenDarken:
|
|
4
|
-
dialog:
|
|
5
|
-
dialogTitle:
|
|
6
|
-
dialogContent:
|
|
7
|
-
dialogActions:
|
|
1
|
+
import { jsx as i, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/Dialog.css';const g = "_screenDarken_9wfqy_1", r = "_dialog_9wfqy_16", d = "_dialogTitle_9wfqy_29", _ = "_dialogContent_9wfqy_36", f = "_dialogActions_9wfqy_41", t = {
|
|
3
|
+
screenDarken: g,
|
|
4
|
+
dialog: r,
|
|
5
|
+
dialogTitle: d,
|
|
6
|
+
dialogContent: _,
|
|
7
|
+
dialogActions: f
|
|
8
8
|
};
|
|
9
|
-
function
|
|
10
|
-
|
|
9
|
+
function u({
|
|
10
|
+
open: n,
|
|
11
|
+
onClose: o,
|
|
12
|
+
children: a,
|
|
13
|
+
backdropClassName: e,
|
|
14
|
+
dialogClassName: l
|
|
15
|
+
}) {
|
|
16
|
+
return n ? /* @__PURE__ */ i(
|
|
11
17
|
"div",
|
|
12
18
|
{
|
|
13
|
-
className:
|
|
19
|
+
className: t.screenDarken + " " + (e || ""),
|
|
14
20
|
onClick: () => {
|
|
15
|
-
|
|
21
|
+
o && o();
|
|
16
22
|
},
|
|
17
|
-
children: /* @__PURE__ */
|
|
23
|
+
children: /* @__PURE__ */ i(
|
|
18
24
|
"div",
|
|
19
25
|
{
|
|
20
|
-
className:
|
|
21
|
-
onClick: (
|
|
22
|
-
|
|
26
|
+
className: t.dialog + " " + (l || ""),
|
|
27
|
+
onClick: (s) => {
|
|
28
|
+
s.stopPropagation();
|
|
23
29
|
},
|
|
24
30
|
children: a
|
|
25
31
|
}
|
|
26
32
|
)
|
|
27
33
|
}
|
|
28
|
-
) : /* @__PURE__ */
|
|
34
|
+
) : /* @__PURE__ */ i(c, {});
|
|
29
35
|
}
|
|
30
|
-
function
|
|
31
|
-
return /* @__PURE__ */
|
|
36
|
+
function D({ children: n, className: o }) {
|
|
37
|
+
return /* @__PURE__ */ i("h2", { className: t.dialogTitle + " " + (o || ""), children: n });
|
|
32
38
|
}
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */
|
|
39
|
+
function k({ children: n, className: o }) {
|
|
40
|
+
return /* @__PURE__ */ i("div", { className: t.dialogContent + " " + (o || ""), children: n });
|
|
35
41
|
}
|
|
36
|
-
function
|
|
37
|
-
return /* @__PURE__ */
|
|
42
|
+
function y({ children: n, className: o }) {
|
|
43
|
+
return /* @__PURE__ */ i("div", { className: t.dialogActions + " " + (o || ""), children: n });
|
|
38
44
|
}
|
|
39
45
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
u as Dialog,
|
|
47
|
+
y as DialogActions,
|
|
48
|
+
k as DialogContent,
|
|
49
|
+
D as DialogTitle
|
|
44
50
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type DividerProps = {
|
|
2
2
|
orientation: "horizontal" | "vertical";
|
|
3
|
+
className?: string;
|
|
3
4
|
};
|
|
4
|
-
export declare function Divider({ orientation }: DividerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function Divider({ orientation, className }: DividerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../assets/Divider.css';const
|
|
3
|
-
divider:
|
|
4
|
-
horizontalDivider:
|
|
5
|
-
verticalDivider:
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/Divider.css';const v = "_divider_rubc3_1", t = "_horizontalDivider_rubc3_8", o = "_verticalDivider_rubc3_13", i = {
|
|
3
|
+
divider: v,
|
|
4
|
+
horizontalDivider: t,
|
|
5
|
+
verticalDivider: o
|
|
6
6
|
};
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */
|
|
7
|
+
function n({ orientation: r, className: e }) {
|
|
8
|
+
return /* @__PURE__ */ d(
|
|
9
9
|
"div",
|
|
10
10
|
{
|
|
11
|
-
className: i.divider + " " + (i[r] + "Divider")
|
|
11
|
+
className: i.divider + " " + (i[r] + "Divider") + " " + (e || "")
|
|
12
12
|
}
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
n as Divider
|
|
17
17
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
type CheckboxProps = {
|
|
2
|
+
id: string;
|
|
2
3
|
value: boolean;
|
|
3
4
|
onChange: (value: boolean) => void;
|
|
4
|
-
id: string;
|
|
5
5
|
label?: string | React.ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
buttonClassName?: string;
|
|
8
|
+
labelClassName?: string;
|
|
9
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "id" | "value" | "onChange" | "className">;
|
|
10
|
+
export declare function Checkbox({ id, value, onChange, label, className, buttonClassName, labelClassName, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export {};
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { IconButton as
|
|
3
|
-
import '../../../assets/Radio.css';const
|
|
4
|
-
container:
|
|
5
|
-
label:
|
|
2
|
+
import { IconButton as b } from "../../Button/IconButton/IconButton.js";
|
|
3
|
+
import '../../../assets/Radio.css';const d = "_container_12u6r_1", _ = "_label_12u6r_7", r = {
|
|
4
|
+
container: d,
|
|
5
|
+
label: _
|
|
6
6
|
};
|
|
7
|
-
function
|
|
7
|
+
function p({
|
|
8
|
+
id: n,
|
|
8
9
|
value: c,
|
|
9
|
-
onChange:
|
|
10
|
-
id: l,
|
|
10
|
+
onChange: l,
|
|
11
11
|
label: o,
|
|
12
|
-
className: a
|
|
12
|
+
className: a,
|
|
13
|
+
buttonClassName: s,
|
|
14
|
+
labelClassName: i,
|
|
15
|
+
...m
|
|
13
16
|
}) {
|
|
14
|
-
return /* @__PURE__ */ t("div", { className: r.container, children: [
|
|
17
|
+
return /* @__PURE__ */ t("div", { className: r.container + " " + (a || ""), children: [
|
|
15
18
|
/* @__PURE__ */ t(
|
|
16
|
-
|
|
19
|
+
b,
|
|
17
20
|
{
|
|
18
|
-
className:
|
|
21
|
+
className: s || "",
|
|
19
22
|
onClick: () => {
|
|
20
|
-
|
|
23
|
+
l(!c);
|
|
21
24
|
},
|
|
22
25
|
children: [
|
|
23
26
|
c ? /* @__PURE__ */ e("span", { className: "material-symbols-outlined", children: "check_box" }) : /* @__PURE__ */ e("span", { className: "material-symbols-outlined", children: "check_box_outline_blank" }),
|
|
@@ -25,12 +28,13 @@ function _({
|
|
|
25
28
|
"input",
|
|
26
29
|
{
|
|
27
30
|
type: "checkbox",
|
|
28
|
-
id:
|
|
31
|
+
id: n,
|
|
29
32
|
checked: c,
|
|
30
|
-
onChange: (
|
|
31
|
-
|
|
33
|
+
onChange: (h) => {
|
|
34
|
+
l(h.currentTarget.checked);
|
|
32
35
|
},
|
|
33
|
-
hidden: !0
|
|
36
|
+
hidden: !0,
|
|
37
|
+
...m
|
|
34
38
|
}
|
|
35
39
|
)
|
|
36
40
|
]
|
|
@@ -39,13 +43,13 @@ function _({
|
|
|
39
43
|
o && /* @__PURE__ */ e(
|
|
40
44
|
"label",
|
|
41
45
|
{
|
|
42
|
-
htmlFor:
|
|
43
|
-
className: r.label,
|
|
46
|
+
htmlFor: n,
|
|
47
|
+
className: r.label + " " + (i || ""),
|
|
44
48
|
children: o
|
|
45
49
|
}
|
|
46
50
|
)
|
|
47
51
|
] });
|
|
48
52
|
}
|
|
49
53
|
export {
|
|
50
|
-
|
|
54
|
+
p as Checkbox
|
|
51
55
|
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
type CounterProps = {
|
|
2
|
-
value: number;
|
|
3
2
|
id: string;
|
|
3
|
+
value: number;
|
|
4
4
|
increment: () => void;
|
|
5
5
|
decrement: () => void;
|
|
6
|
-
|
|
6
|
+
min?: number;
|
|
7
7
|
max?: number;
|
|
8
|
+
label: string;
|
|
8
9
|
disabled?: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
className?: string;
|
|
11
|
+
buttonClassName?: string;
|
|
12
|
+
inputClassName?: string;
|
|
13
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "id" | "value" | "onChange" | "type" | "min" | "max" | "disabled">;
|
|
14
|
+
export declare function Counter({ id, value, increment, decrement, min, max, label, disabled, className, buttonClassName, inputClassName, ...props }: CounterProps): import("react/jsx-runtime").JSX.Element;
|
|
11
15
|
export {};
|
|
@@ -1,50 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { Input as
|
|
4
|
-
import '../../../assets/Counter.css';const
|
|
5
|
-
container:
|
|
6
|
-
button:
|
|
7
|
-
buttonDisabled:
|
|
8
|
-
input:
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Button as r } from "../../Button/Button.js";
|
|
3
|
+
import { Input as f } from "../Input.js";
|
|
4
|
+
import '../../../assets/Counter.css';const k = "_container_12kgw_1", h = "_button_12kgw_6", D = "_buttonDisabled_12kgw_19", N = "_input_12kgw_31", t = {
|
|
5
|
+
container: k,
|
|
6
|
+
button: h,
|
|
7
|
+
buttonDisabled: D,
|
|
8
|
+
input: N
|
|
9
9
|
};
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
increment:
|
|
14
|
-
decrement:
|
|
15
|
-
|
|
16
|
-
max:
|
|
17
|
-
|
|
10
|
+
function j({
|
|
11
|
+
id: a,
|
|
12
|
+
value: i,
|
|
13
|
+
increment: u,
|
|
14
|
+
decrement: l,
|
|
15
|
+
min: s,
|
|
16
|
+
max: e,
|
|
17
|
+
label: m,
|
|
18
|
+
disabled: n,
|
|
19
|
+
className: b,
|
|
20
|
+
buttonClassName: c,
|
|
21
|
+
inputClassName: p,
|
|
22
|
+
..._
|
|
18
23
|
}) {
|
|
19
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ d("div", { className: t.container + " " + (b || ""), children: [
|
|
20
25
|
/* @__PURE__ */ o(
|
|
21
|
-
|
|
26
|
+
r,
|
|
22
27
|
{
|
|
23
|
-
className: t.button + " " + (n ? t.buttonDisabled : ""),
|
|
28
|
+
className: t.button + " " + (n ? t.buttonDisabled : "") + " " + (c || ""),
|
|
24
29
|
onClick: () => {
|
|
25
|
-
s
|
|
30
|
+
(s === void 0 || i > s) && l();
|
|
26
31
|
},
|
|
27
32
|
disabled: n,
|
|
28
33
|
children: /* @__PURE__ */ o("span", { className: "material-symbols-outlined", children: "remove" })
|
|
29
34
|
}
|
|
30
35
|
),
|
|
31
36
|
/* @__PURE__ */ o(
|
|
32
|
-
|
|
37
|
+
f,
|
|
33
38
|
{
|
|
34
|
-
id:
|
|
35
|
-
value:
|
|
36
|
-
label:
|
|
39
|
+
id: a,
|
|
40
|
+
value: i,
|
|
41
|
+
label: m,
|
|
37
42
|
disabled: n,
|
|
38
|
-
className: t.input,
|
|
39
|
-
type: "number"
|
|
43
|
+
className: t.input + " " + (p || ""),
|
|
44
|
+
type: "number",
|
|
45
|
+
..._
|
|
40
46
|
}
|
|
41
47
|
),
|
|
42
48
|
/* @__PURE__ */ o(
|
|
43
|
-
|
|
49
|
+
r,
|
|
44
50
|
{
|
|
45
|
-
className: t.button + " " + (n ? t.buttonDisabled : ""),
|
|
51
|
+
className: t.button + " " + (n ? t.buttonDisabled : "") + " " + (c || ""),
|
|
46
52
|
onClick: () => {
|
|
47
|
-
(
|
|
53
|
+
(e === void 0 || i < e) && u();
|
|
48
54
|
},
|
|
49
55
|
disabled: n,
|
|
50
56
|
children: /* @__PURE__ */ o("span", { className: "material-symbols-outlined", children: "add" })
|
|
@@ -53,5 +59,5 @@ function h({
|
|
|
53
59
|
] });
|
|
54
60
|
}
|
|
55
61
|
export {
|
|
56
|
-
|
|
62
|
+
j as Counter
|
|
57
63
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
type InputProps = {
|
|
2
|
+
id: string;
|
|
2
3
|
value: string | number;
|
|
3
4
|
onChange?: (value: string) => void;
|
|
4
5
|
type?: "text" | "password" | "email" | "number" | "search";
|
|
5
|
-
|
|
6
|
+
label?: string;
|
|
7
|
+
helperText?: string;
|
|
6
8
|
startIcon?: React.ReactNode;
|
|
7
9
|
endIcon?: React.ReactNode;
|
|
8
|
-
label?: string;
|
|
9
10
|
error?: boolean;
|
|
10
|
-
helperText?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
className?: string;
|
|
13
13
|
outlineClassName?: string;
|
|
14
|
+
inputClassName?: string;
|
|
14
15
|
labelClassName?: string;
|
|
15
16
|
helperTextClassName?: string;
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
export declare function Input({ value, onChange, type, id, startIcon, endIcon, label, error, helperText, disabled, className, outlineClassName, labelClassName, helperTextClassName, inputClassName, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "id" | "value" | "onChange" | "type" | "disabled" | "className">;
|
|
18
|
+
export declare function Input({ id, value, onChange, type, label, helperText, startIcon, endIcon, error, disabled, className, outlineClassName, inputClassName, labelClassName, helperTextClassName, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export {};
|