@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.
Files changed (42) hide show
  1. package/dist/components/Backdrop/Backdrop.d.ts +2 -1
  2. package/dist/components/Backdrop/Backdrop.js +7 -7
  3. package/dist/components/Button/Button.d.ts +3 -3
  4. package/dist/components/Button/Button.js +4 -4
  5. package/dist/components/Button/IconButton/IconButton.d.ts +3 -2
  6. package/dist/components/Button/IconButton/IconButton.js +15 -9
  7. package/dist/components/Button/ToggleButton/ToggleButton.d.ts +10 -10
  8. package/dist/components/Button/ToggleButton/ToggleButton.js +28 -22
  9. package/dist/components/Button/ToggleButton/ToggleButtonGroup.d.ts +2 -2
  10. package/dist/components/Button/ToggleButton/ToggleButtonGroup.js +1 -1
  11. package/dist/components/Dialog/Dialog.d.ts +9 -4
  12. package/dist/components/Dialog/Dialog.js +32 -26
  13. package/dist/components/Divider/Divider.d.ts +2 -1
  14. package/dist/components/Divider/Divider.js +9 -9
  15. package/dist/components/Input/Checkbox/Checkbox.d.ts +5 -3
  16. package/dist/components/Input/Checkbox/Checkbox.js +23 -19
  17. package/dist/components/Input/Counter/Counter.d.ts +8 -4
  18. package/dist/components/Input/Counter/Counter.js +36 -30
  19. package/dist/components/Input/Input.d.ts +7 -8
  20. package/dist/components/Input/Input.js +17 -17
  21. package/dist/components/Input/Password.d.ts +2 -0
  22. package/dist/components/Input/Password.js +28 -0
  23. package/dist/components/Input/Radio/Radio.d.ts +10 -5
  24. package/dist/components/Input/Radio/Radio.js +34 -29
  25. package/dist/components/Input/Radio/RadioGroup.d.ts +5 -5
  26. package/dist/components/Input/Radio/RadioGroup.js +17 -17
  27. package/dist/components/Input/Select/Select.d.ts +9 -5
  28. package/dist/components/Input/Select/Select.js +38 -32
  29. package/dist/components/Input/TextArea.d.ts +5 -5
  30. package/dist/components/Input/TextArea.js +16 -16
  31. package/dist/components/Snackbar/Snackbar.d.ts +5 -2
  32. package/dist/components/Snackbar/Snackbar.js +23 -20
  33. package/dist/components/Table/Table.d.ts +6 -3
  34. package/dist/components/Table/Table.js +10 -10
  35. package/dist/components/Tabs/Tab.d.ts +3 -4
  36. package/dist/components/Tabs/Tab.js +8 -8
  37. package/dist/components/Tabs/TabBar.d.ts +2 -1
  38. package/dist/components/Tabs/TabBar.js +7 -7
  39. package/dist/main.js +43 -42
  40. package/dist/utils/omit.d.ts +1 -0
  41. package/dist/utils/omit.js +11 -0
  42. package/package.json +11 -11
@@ -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 a } from "react/jsx-runtime";
2
- import '../../assets/Backdrop.css';const t = "_backdrop_qbjym_1", p = {
3
- backdrop: t
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 k({ open: o, onClose: r }) {
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: p.backdrop
12
+ className: d.backdrop + " " + (a || "")
13
13
  }
14
- ) : /* @__PURE__ */ c(a, {});
14
+ ) : /* @__PURE__ */ c(t, {});
15
15
  }
16
16
  export {
17
- k as Backdrop
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
- ref?: React.Ref<HTMLButtonElement>;
5
- } & React.ButtonHTMLAttributes<HTMLButtonElement>;
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({ children: t, className: o, ref: n, ...u }) {
5
+ function e({ ref: t, children: o, className: n, ...u }) {
6
6
  return /* @__PURE__ */ s(
7
7
  "button",
8
8
  {
9
- ref: n,
10
- className: b.button + " " + (o || ""),
9
+ ref: t,
10
+ className: b.button + " " + (n || ""),
11
11
  ...u,
12
- children: t
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 u } from "react/jsx-runtime";
2
- import '../../../assets/IconButton.css';const s = "_button_180ek_1", b = {
3
- button: s
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 e({ children: t, className: o, ...n }) {
6
- return /* @__PURE__ */ u(
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
- className: b.button + " " + (o || ""),
10
- ...n,
11
- children: t
14
+ ref: t,
15
+ className: c.button + " " + (n || ""),
16
+ ...u,
17
+ children: o
12
18
  }
13
19
  );
14
20
  }
15
21
  export {
16
- e as IconButton
22
+ r as IconButton
17
23
  };
@@ -1,20 +1,20 @@
1
- type ToggleButtonProps = {
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
- disabled?: boolean;
7
- ref?: React.Ref<HTMLButtonElement>;
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 ToggleButton({ value, onClick, children, }: ToggleButtonPropsAsChild): React.ReactNode;
19
- export declare function ToggleButton({ value, onChange, children, }: ToggleButtonPropsAsStandalone): React.ReactNode;
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 b } from "react/jsx-runtime";
2
- import { Button as s } from "../Button.js";
3
- import '../../../assets/ToggleButton.css';const C = "_buttonFalse_1ed44_1", d = "_buttonTrue_1ed44_8", e = {
4
- buttonFalse: C,
5
- buttonTrue: d
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 g({
8
- value: n,
9
- children: o,
10
- className: u,
11
- classNameTrue: i,
12
- classNameFalse: l,
13
- disabled: c,
14
- ref: a,
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__ */ b(
18
- s,
17
+ return /* @__PURE__ */ e(
18
+ b,
19
19
  {
20
- ref: a,
21
- className: (("selected" in t ? t.selected : n) ? e.buttonTrue + " " + (i || "") : e.buttonFalse + " " + (l || "")) + " " + (u || ""),
20
+ ref: t,
21
+ className: (("selected" in n ? n.selected : o) ? u.buttonTrue + " " + (c || "") : u.buttonFalse + " " + (g || "")) + " " + (a || ""),
22
22
  onClick: () => {
23
- "onChange" in t && t.onChange !== void 0 ? t.onChange(!n) : "onClick" in t && t.onClick !== void 0 && t.onClick();
23
+ "onChange" in n && n.onChange ? n.onChange(!o) : "onClick" in n && n.onClick && n.onClick();
24
24
  },
25
- disabled: c,
26
- children: o
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
- g as ToggleButton
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, error, helperText, className, }: ToggleButtonGroupProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function ToggleButtonGroup({ value, onChange, children, label, helperText, error, className, }: ToggleButtonGroupProps): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -12,8 +12,8 @@ function f({
12
12
  onChange: o,
13
13
  children: c,
14
14
  label: s,
15
- error: i,
16
15
  helperText: p,
16
+ error: i,
17
17
  className: a
18
18
  }) {
19
19
  const m = t.Children.map(c, (e) => t.isValidElement(e) ? t.cloneElement(e, {
@@ -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 n, Fragment as l } from "react/jsx-runtime";
2
- import '../../assets/Dialog.css';const s = "_screenDarken_9wfqy_1", c = "_dialog_9wfqy_16", g = "_dialogTitle_9wfqy_29", r = "_dialogContent_9wfqy_36", d = "_dialogActions_9wfqy_41", i = {
3
- screenDarken: s,
4
- dialog: c,
5
- dialogTitle: g,
6
- dialogContent: r,
7
- dialogActions: d
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 f({ open: o, onClose: t, children: a }) {
10
- return o ? /* @__PURE__ */ n(
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: i.screenDarken,
19
+ className: t.screenDarken + " " + (e || ""),
14
20
  onClick: () => {
15
- t && t();
21
+ o && o();
16
22
  },
17
- children: /* @__PURE__ */ n(
23
+ children: /* @__PURE__ */ i(
18
24
  "div",
19
25
  {
20
- className: i.dialog,
21
- onClick: (e) => {
22
- e.stopPropagation();
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__ */ n(l, {});
34
+ ) : /* @__PURE__ */ i(c, {});
29
35
  }
30
- function m({ children: o }) {
31
- return /* @__PURE__ */ n("h2", { className: i.dialogTitle, children: o });
36
+ function D({ children: n, className: o }) {
37
+ return /* @__PURE__ */ i("h2", { className: t.dialogTitle + " " + (o || ""), children: n });
32
38
  }
33
- function u({ children: o }) {
34
- return /* @__PURE__ */ n("div", { className: i.dialogContent, children: o });
39
+ function k({ children: n, className: o }) {
40
+ return /* @__PURE__ */ i("div", { className: t.dialogContent + " " + (o || ""), children: n });
35
41
  }
36
- function D({ children: o }) {
37
- return /* @__PURE__ */ n("div", { className: i.dialogActions, children: o });
42
+ function y({ children: n, className: o }) {
43
+ return /* @__PURE__ */ i("div", { className: t.dialogActions + " " + (o || ""), children: n });
38
44
  }
39
45
  export {
40
- f as Dialog,
41
- D as DialogActions,
42
- u as DialogContent,
43
- m as DialogTitle
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 e } from "react/jsx-runtime";
2
- import '../../assets/Divider.css';const d = "_divider_rubc3_1", v = "_horizontalDivider_rubc3_8", t = "_verticalDivider_rubc3_13", i = {
3
- divider: d,
4
- horizontalDivider: v,
5
- verticalDivider: t
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 c({ orientation: r }) {
8
- return /* @__PURE__ */ e(
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
- c as Divider
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
- export declare function Checkbox({ value, onChange, id, label, className, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
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 i } from "../../Button/IconButton/IconButton.js";
3
- import '../../../assets/Radio.css';const h = "_container_12u6r_1", m = "_label_12u6r_7", r = {
4
- container: h,
5
- label: m
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: n,
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
- i,
19
+ b,
17
20
  {
18
- className: a,
21
+ className: s || "",
19
22
  onClick: () => {
20
- n(!c);
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: l,
31
+ id: n,
29
32
  checked: c,
30
- onChange: (s) => {
31
- n(s.currentTarget.checked);
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: l,
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
- _ as Checkbox
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
- label: string;
6
+ min?: number;
7
7
  max?: number;
8
+ label: string;
8
9
  disabled?: boolean;
9
- };
10
- export declare function Counter({ value, id, increment, decrement, label, max, disabled, }: CounterProps): import("react/jsx-runtime").JSX.Element;
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 u, jsx as o } from "react/jsx-runtime";
2
- import { Button as e } from "../../Button/Button.js";
3
- import { Input as m } from "../Input.js";
4
- import '../../../assets/Counter.css';const b = "_container_12kgw_1", p = "_button_12kgw_6", _ = "_buttonDisabled_12kgw_19", d = "_input_12kgw_31", t = {
5
- container: b,
6
- button: p,
7
- buttonDisabled: _,
8
- input: d
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 h({
11
- value: s,
12
- id: c,
13
- increment: r,
14
- decrement: a,
15
- label: l,
16
- max: i,
17
- disabled: n = !1
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__ */ u("div", { className: t.container, children: [
24
+ return /* @__PURE__ */ d("div", { className: t.container + " " + (b || ""), children: [
20
25
  /* @__PURE__ */ o(
21
- e,
26
+ r,
22
27
  {
23
- className: t.button + " " + (n ? t.buttonDisabled : ""),
28
+ className: t.button + " " + (n ? t.buttonDisabled : "") + " " + (c || ""),
24
29
  onClick: () => {
25
- s > 0 && a();
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
- m,
37
+ f,
33
38
  {
34
- id: c,
35
- value: s,
36
- label: l,
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
- e,
49
+ r,
44
50
  {
45
- className: t.button + " " + (n ? t.buttonDisabled : ""),
51
+ className: t.button + " " + (n ? t.buttonDisabled : "") + " " + (c || ""),
46
52
  onClick: () => {
47
- (i === void 0 || s < i) && r();
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
- h as Counter
62
+ j as Counter
57
63
  };
@@ -1,19 +1,18 @@
1
- type InputProps = {
1
+ export 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
- id: string;
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
- inputClassName?: string;
17
- } & React.InputHTMLAttributes<HTMLInputElement>;
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;
19
- export {};
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;