@kolking/react-ui 1.4.0 → 1.5.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.
Files changed (33) hide show
  1. package/dist/{Input-DE1QkW7S.js → Input-DbQTM4UI.js} +39 -29
  2. package/dist/components/Dialog/Dialog.d.ts +10 -5
  3. package/dist/components/Dialog/Dialog.js +33 -38
  4. package/dist/components/Fields/Checkbox.js +1 -1
  5. package/dist/components/Fields/Field.d.ts +1 -1
  6. package/dist/components/Fields/Field.js +28 -27
  7. package/dist/components/Fields/Input.d.ts +2 -0
  8. package/dist/components/Fields/Input.js +1 -1
  9. package/dist/components/Fields/Numeric.d.ts +4 -0
  10. package/dist/components/Fields/Numeric.js +62 -0
  11. package/dist/components/Fields/Radio.js +1 -1
  12. package/dist/components/Fields/Switch.d.ts +13 -0
  13. package/dist/components/Fields/Switch.js +36 -0
  14. package/dist/components/Fields/index.d.ts +2 -1
  15. package/dist/components/Fields/index.js +13 -11
  16. package/dist/components/Flex/Flex.d.ts +1 -1
  17. package/dist/components/Flex/Flex.js +24 -23
  18. package/dist/components/Segmented/Segmented.js +22 -19
  19. package/dist/components/ToggleButton/ToggleButton.d.ts +5 -0
  20. package/dist/components/ToggleButton/ToggleButton.js +16 -0
  21. package/dist/components/ToggleButton/ToggleGroup.d.ts +12 -0
  22. package/dist/components/ToggleButton/ToggleGroup.js +43 -0
  23. package/dist/components/ToggleButton/index.d.ts +2 -0
  24. package/dist/components/ToggleButton/index.js +6 -0
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.js +60 -54
  27. package/dist/styles/_theme-default.scss +23 -21
  28. package/dist/styles/style.css +1 -1
  29. package/dist/utils/helpers.d.ts +1 -2
  30. package/dist/utils/helpers.js +21 -23
  31. package/package.json +1 -1
  32. package/dist/components/Fields/Quantity.d.ts +0 -7
  33. package/dist/components/Fields/Quantity.js +0 -61
@@ -1,15 +1,15 @@
1
- import { jsxs as f, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as _, jsx as s } from "react/jsx-runtime";
2
2
  import u from "classnames";
3
- import _ from "react";
3
+ import h from "react";
4
4
  import { cssProps as m } from "./utils/helpers.js";
5
- import { s as t, V as h } from "./ValidationTooltip-BgSwl0hJ.js";
6
- const x = "styles_checkbox_pxrU4", w = "styles_radio_0QV8R", v = "styles_label_K65D1", k = "styles_input_j6Qji", g = {
7
- checkbox: x,
8
- radio: w,
9
- label: v,
10
- input: k
5
+ import { s as t, V as x } from "./ValidationTooltip-BgSwl0hJ.js";
6
+ const w = "styles_checkbox_pxrU4", v = "styles_radio_0QV8R", k = "styles_label_K65D1", g = "styles_input_j6Qji", N = {
7
+ checkbox: w,
8
+ radio: v,
9
+ label: k,
10
+ input: g
11
11
  };
12
- function N(a) {
12
+ function j(e) {
13
13
  return ![
14
14
  "button",
15
15
  "checkbox",
@@ -21,13 +21,13 @@ function N(a) {
21
21
  "range",
22
22
  "reset",
23
23
  "submit"
24
- ].includes(a);
24
+ ].includes(e);
25
25
  }
26
- function p(a) {
27
- switch (a) {
26
+ function p(e) {
27
+ switch (e) {
28
28
  case "checkbox":
29
29
  case "radio":
30
- return g.input;
30
+ return N.input;
31
31
  case "date":
32
32
  case "datetime":
33
33
  case "datetime-local":
@@ -45,21 +45,31 @@ function p(a) {
45
45
  case "image":
46
46
  case "color":
47
47
  case "file":
48
- return t[a];
48
+ return t[e];
49
49
  default:
50
50
  return t.input;
51
51
  }
52
52
  }
53
- const Q = _.forwardRef(
54
- ({ size: a, error: c, type: e = "text", className: o, style: d, prefix: i, children: n, ...r }, l) => {
55
- const b = N(e) && (i || n) ? /* @__PURE__ */ f(
53
+ const C = h.forwardRef(
54
+ ({
55
+ size: e,
56
+ error: c,
57
+ type: a = "text",
58
+ wrapperType: b = a,
59
+ prefix: i,
60
+ className: o,
61
+ style: d,
62
+ children: n,
63
+ ...r
64
+ }, l) => {
65
+ const f = j(a) && (i || n) ? /* @__PURE__ */ _(
56
66
  "div",
57
67
  {
58
- "data-input-wrapper": !0,
68
+ "data-input-wrapper": b,
59
69
  "data-disabled": r.disabled,
60
70
  "data-invalid": c ? !0 : void 0,
61
71
  className: u(t.wrapper, o),
62
- style: { ...d, ...m({ size: a }) },
72
+ style: { ...d, ...m({ size: e }) },
63
73
  children: [
64
74
  i && /* @__PURE__ */ s("div", { "data-input-prefix": !0, className: t.wrapper_prefix, children: i }),
65
75
  /* @__PURE__ */ s(
@@ -67,9 +77,9 @@ const Q = _.forwardRef(
67
77
  {
68
78
  ...r,
69
79
  ref: l,
70
- type: e,
71
- "data-input": e,
72
- className: p(e)
80
+ type: a,
81
+ "data-input": a,
82
+ className: p(a)
73
83
  }
74
84
  ),
75
85
  n && /* @__PURE__ */ s("div", { "data-input-accessory": !0, className: t.wrapper_accessory, children: n })
@@ -80,17 +90,17 @@ const Q = _.forwardRef(
80
90
  {
81
91
  ...r,
82
92
  ref: l,
83
- type: e,
84
- "data-input": e,
93
+ type: a,
94
+ "data-input": a,
85
95
  "data-invalid": c ? !0 : void 0,
86
- className: u(p(e), o),
87
- style: { ...d, ...m({ size: a }) }
96
+ className: u(p(a), o),
97
+ style: { ...d, ...m({ size: e }) }
88
98
  }
89
99
  );
90
- return /* @__PURE__ */ s(h, { content: c, children: b });
100
+ return /* @__PURE__ */ s(x, { content: c, children: f });
91
101
  }
92
102
  );
93
103
  export {
94
- Q as I,
95
- g as s
104
+ C as I,
105
+ N as s
96
106
  };
@@ -1,10 +1,15 @@
1
1
  import { default as React } from 'react';
2
2
  import { ButtonProps } from '../Button';
3
- export type DialogProps = React.HTMLProps<HTMLDialogElement> & {
3
+ import { HeadingProps } from '../Heading';
4
+ export type DialogProps = React.DialogHTMLAttributes<HTMLDialogElement> & {
5
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
6
  width?: React.CSSProperties['width'];
5
7
  };
6
- export declare const Dialog: React.ForwardRefExoticComponent<Omit<DialogProps, "ref"> & React.RefAttributes<HTMLDialogElement>>;
7
- export declare const DialogTitle: ({ className, children, ...props }: React.HTMLProps<HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
8
- export declare const DialogContent: ({ className, children, ...props }: React.HTMLProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
9
- export declare const DialogFooter: ({ className, children, ...props }: React.HTMLProps<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Dialog: React.ForwardRefExoticComponent<React.DialogHTMLAttributes<HTMLDialogElement> & {
9
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
10
+ width?: React.CSSProperties["width"];
11
+ } & React.RefAttributes<HTMLDialogElement>>;
12
+ export declare const DialogTitle: ({ className, children, ...props }: Omit<HeadingProps, "title">) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const DialogContent: ({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const DialogFooter: ({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
10
15
  export declare const DialogClose: ({ className, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,58 +1,53 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import d from "react";
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import g from "react";
3
3
  import i from "classnames";
4
- import { Icon as g } from "../Icon/Icon.js";
5
- import { Button as m } from "../Button/Button.js";
6
- import { DialogFocusTrap as p } from "./DialogFocusTrap.js";
7
- import { cssProps as f } from "../../utils/helpers.js";
8
- const _ = "Dialog_dialog_G3gxL", D = "Dialog_wrapper_BMuhR", u = "Dialog_title_2pDPQ", N = "Dialog_content_7168G", w = "Dialog_footer_N-aEV", v = "Dialog_close_JSEkn", l = {
4
+ import { Icon as m } from "../Icon/Icon.js";
5
+ import { Button as p } from "../Button/Button.js";
6
+ import { Heading as f } from "../Heading/Heading.js";
7
+ import { DialogFocusTrap as u } from "./DialogFocusTrap.js";
8
+ import { cssProps as D } from "../../utils/helpers.js";
9
+ const _ = "Dialog_dialog_G3gxL", w = "Dialog_wrapper_BMuhR", v = "Dialog_footer_N-aEV", N = "Dialog_close_JSEkn", e = {
9
10
  dialog: _,
10
- wrapper: D,
11
- title: u,
12
- content: N,
13
- footer: w,
14
- close: v
15
- }, E = d.forwardRef(
16
- ({ open: o = !1, width: t, style: e, className: r, children: s, ...c }, n) => /* @__PURE__ */ a(p, { active: o, children: /* @__PURE__ */ a(
11
+ wrapper: w,
12
+ footer: v,
13
+ close: N
14
+ }, F = g.forwardRef(
15
+ ({ open: o = !1, size: a, width: r, style: l, className: s, children: c, ...d }, n) => /* @__PURE__ */ t(u, { active: o, children: /* @__PURE__ */ t(
17
16
  "dialog",
18
17
  {
19
- ...c,
18
+ ...d,
20
19
  ref: n,
21
20
  "data-floating-root": !0,
22
21
  "data-dialog": o ? "open" : "closed",
23
- className: i(l.dialog, r),
24
- style: { ...e, ...f({ width: t }) },
25
- children: /* @__PURE__ */ a("div", { "data-dialog-wrapper": !0, className: l.wrapper, children: s })
22
+ className: i(e.dialog, s),
23
+ style: { ...l, ...D({ size: a, width: r }) },
24
+ children: /* @__PURE__ */ t("div", { "data-dialog-wrapper": !0, className: e.wrapper, children: c })
26
25
  }
27
26
  ) })
28
- ), F = ({
27
+ ), T = ({ className: o, children: a, ...r }) => /* @__PURE__ */ t(f, { as: "h4", ...r, "data-dialog-title": !0, title: a, className: o }), j = ({
29
28
  className: o,
30
- children: t,
31
- ...e
32
- }) => /* @__PURE__ */ a("h4", { ...e, "data-dialog-title": !0, className: i(l.title, o), children: t }), G = ({
29
+ children: a,
30
+ ...r
31
+ }) => /* @__PURE__ */ t("div", { ...r, "data-dialog-content": !0, className: o, children: a }), k = ({
33
32
  className: o,
34
- children: t,
35
- ...e
36
- }) => /* @__PURE__ */ a("div", { ...e, "data-dialog-content": !0, className: i(l.content, o), children: t }), P = ({
37
- className: o,
38
- children: t,
39
- ...e
40
- }) => /* @__PURE__ */ a("div", { ...e, "data-dialog-footer": !0, className: i(l.footer, o), children: t }), T = ({ className: o, ...t }) => /* @__PURE__ */ a(
41
- m,
33
+ children: a,
34
+ ...r
35
+ }) => /* @__PURE__ */ t("div", { ...r, "data-dialog-footer": !0, className: i(e.footer, o), children: a }), G = ({ className: o, ...a }) => /* @__PURE__ */ t(
36
+ p,
42
37
  {
43
- ...t,
38
+ ...a,
44
39
  type: "button",
45
40
  variant: "tertiary",
46
41
  "data-dialog-close": !0,
47
42
  "aria-label": "dismiss dialog",
48
- icon: /* @__PURE__ */ a(g, { name: "close" }),
49
- className: i(l.close, o)
43
+ icon: /* @__PURE__ */ t(m, { name: "close" }),
44
+ className: i(e.close, o)
50
45
  }
51
46
  );
52
47
  export {
53
- E as Dialog,
54
- T as DialogClose,
55
- G as DialogContent,
56
- P as DialogFooter,
57
- F as DialogTitle
48
+ F as Dialog,
49
+ G as DialogClose,
50
+ j as DialogContent,
51
+ k as DialogFooter,
52
+ T as DialogTitle
58
53
  };
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as l } from "react/jsx-runtime";
2
2
  import p from "classnames";
3
3
  import h, { useRef as x, useImperativeHandle as k, useEffect as b } from "react";
4
4
  import { cssProps as R } from "../../utils/helpers.js";
5
- import { I as y, s as n } from "../../Input-DE1QkW7S.js";
5
+ import { I as y, s as n } from "../../Input-DbQTM4UI.js";
6
6
  const q = h.forwardRef(
7
7
  ({ size: c, error: a, label: t, className: f, style: u, required: m, indeterminate: r, ...s }, d) => {
8
8
  const o = s.checked, e = x(null);
@@ -17,4 +17,4 @@ export declare const FieldLabel: ({ label, required, className, children, ...pro
17
17
  export type FieldDescriptionProps = React.HTMLAttributes<HTMLDivElement>;
18
18
  export declare const FieldDescription: ({ className, children, ...props }: FieldDescriptionProps) => import("react/jsx-runtime").JSX.Element;
19
19
  export type FieldProps = React.HTMLAttributes<HTMLDivElement> & FieldConfig;
20
- export declare const Field: ({ id, label, labelAccessory, help, required, minWidth, maxWidth, className, children, ...props }: FieldProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const Field: ({ id, label, labelAccessory, help, required, minWidth, maxWidth, className, children, style, ...props }: FieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,14 @@
1
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
2
  import d from "classnames";
3
- import h from "react";
4
- import { cssProps as _ } from "../../utils/helpers.js";
5
- const p = "styles_field_hqzKT", u = "styles_header_Iwsz6", b = "styles_label_zRVTS", N = "styles_accessory_S4ccn", F = "styles_description_fZnNW", a = {
6
- field: p,
7
- header: u,
8
- label: b,
9
- accessory: N,
10
- description: F
11
- }, v = ({ label: e, required: s, className: l, children: t, ...c }) => /* @__PURE__ */ o("div", { "data-field-header": !0, className: a.header, children: [
3
+ import _ from "react";
4
+ import { cssProps as p } from "../../utils/helpers.js";
5
+ const u = "styles_field_hqzKT", b = "styles_header_Iwsz6", N = "styles_label_zRVTS", F = "styles_accessory_S4ccn", v = "styles_description_fZnNW", a = {
6
+ field: u,
7
+ header: b,
8
+ label: N,
9
+ accessory: F,
10
+ description: v
11
+ }, x = ({ label: e, required: s, className: l, children: t, ...c }) => /* @__PURE__ */ i("div", { "data-field-header": !0, className: a.header, children: [
12
12
  /* @__PURE__ */ r(
13
13
  "label",
14
14
  {
@@ -19,34 +19,35 @@ const p = "styles_field_hqzKT", u = "styles_header_Iwsz6", b = "styles_label_zRV
19
19
  children: e
20
20
  }
21
21
  ),
22
- h.Children.toArray(t).length > 0 && /* @__PURE__ */ r("div", { "data-field-accessory": !0, className: a.accessory, children: t })
23
- ] }), x = ({ className: e, children: s, ...l }) => /* @__PURE__ */ r("small", { ...l, "data-field-description": !0, className: d(a.description, e), children: s }), S = ({
22
+ _.Children.toArray(t).length > 0 && /* @__PURE__ */ r("div", { "data-field-accessory": !0, className: a.accessory, children: t })
23
+ ] }), z = ({ className: e, children: s, ...l }) => /* @__PURE__ */ r("small", { ...l, "data-field-description": !0, className: d(a.description, e), children: s }), T = ({
24
24
  id: e,
25
25
  label: s,
26
26
  labelAccessory: l,
27
27
  help: t,
28
28
  required: c,
29
- minWidth: n,
30
- maxWidth: f,
31
- className: m,
32
- children: y,
33
- ...i
34
- }) => /* @__PURE__ */ o(
29
+ minWidth: o,
30
+ maxWidth: n,
31
+ className: f,
32
+ children: m,
33
+ style: y,
34
+ ...h
35
+ }) => /* @__PURE__ */ i(
35
36
  "div",
36
37
  {
37
- ...i,
38
+ ...h,
38
39
  "data-field": e || !0,
39
- className: d(a.field, m),
40
- style: { ...i.style, ..._({ minWidth: n, maxWidth: f }) },
40
+ className: d(a.field, f),
41
+ style: { ...y, ...p({ minWidth: o, maxWidth: n }) },
41
42
  children: [
42
- s && /* @__PURE__ */ r(v, { htmlFor: e, label: s, required: c, children: l }),
43
- y,
44
- t && /* @__PURE__ */ r(x, { children: t })
43
+ s && /* @__PURE__ */ r(x, { htmlFor: e, label: s, required: c, children: l }),
44
+ m,
45
+ t && /* @__PURE__ */ r(z, { children: t })
45
46
  ]
46
47
  }
47
48
  );
48
49
  export {
49
- S as Field,
50
- x as FieldDescription,
51
- v as FieldLabel
50
+ T as Field,
51
+ z as FieldDescription,
52
+ x as FieldLabel
52
53
  };
@@ -4,8 +4,10 @@ export type BaseInputProps<T = React.InputHTMLAttributes<HTMLInputElement>> = Om
4
4
  error?: string;
5
5
  };
6
6
  export type InputProps = Omit<BaseInputProps, 'prefix'> & {
7
+ wrapperType?: string;
7
8
  prefix?: React.ReactNode;
8
9
  };
9
10
  export declare const Input: React.ForwardRefExoticComponent<Omit<BaseInputProps<React.InputHTMLAttributes<HTMLInputElement>>, "prefix"> & {
11
+ wrapperType?: string;
10
12
  prefix?: React.ReactNode;
11
13
  } & React.RefAttributes<HTMLInputElement>>;
@@ -3,7 +3,7 @@ import "classnames";
3
3
  import "react";
4
4
  import "../../utils/helpers.js";
5
5
  import "../../ValidationTooltip-BgSwl0hJ.js";
6
- import { I as a } from "../../Input-DE1QkW7S.js";
6
+ import { I as a } from "../../Input-DbQTM4UI.js";
7
7
  export {
8
8
  a as Input
9
9
  };
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { InputProps } from './Input';
3
+ export type NumericProps = Omit<InputProps, 'children'>;
4
+ export declare const Numeric: React.ForwardRefExoticComponent<NumericProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,62 @@
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
+ import b from "classnames";
3
+ import f, { useRef as y, useImperativeHandle as _, useCallback as c } from "react";
4
+ import { Icon as i } from "../Icon/Icon.js";
5
+ import { Button as o } from "../Button/Button.js";
6
+ import { I as h } from "../../Input-DbQTM4UI.js";
7
+ const v = "styles_numeric_dzUSE", w = "styles_increase_5S-Jo", E = "styles_decrease_j8UR6", s = {
8
+ numeric: v,
9
+ increase: w,
10
+ decrease: E
11
+ }, j = f.forwardRef(
12
+ ({ className: l, ...a }, u) => {
13
+ const e = y(null);
14
+ _(u, () => e.current);
15
+ const m = c(() => {
16
+ var n, r;
17
+ (n = e.current) == null || n.stepUp(), (r = e.current) == null || r.dispatchEvent(new Event("change", { bubbles: !0 }));
18
+ }, []), d = c(() => {
19
+ var n, r;
20
+ (n = e.current) == null || n.stepDown(), (r = e.current) == null || r.dispatchEvent(new Event("change", { bubbles: !0 }));
21
+ }, []);
22
+ return /* @__PURE__ */ p(
23
+ h,
24
+ {
25
+ ...a,
26
+ ref: e,
27
+ type: "number",
28
+ wrapperType: "numeric",
29
+ className: b(s.numeric, l),
30
+ children: [
31
+ /* @__PURE__ */ t(
32
+ o,
33
+ {
34
+ type: "button",
35
+ variant: "secondary",
36
+ "aria-label": "Increase",
37
+ disabled: a.disabled,
38
+ className: s.increase,
39
+ icon: /* @__PURE__ */ t(i, { name: "triangle-up" }),
40
+ onClick: m
41
+ }
42
+ ),
43
+ /* @__PURE__ */ t(
44
+ o,
45
+ {
46
+ type: "button",
47
+ variant: "secondary",
48
+ "aria-label": "Decrease",
49
+ disabled: a.disabled,
50
+ className: s.decrease,
51
+ icon: /* @__PURE__ */ t(i, { name: "triangle-down" }),
52
+ onClick: d
53
+ }
54
+ )
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ );
60
+ export {
61
+ j as Numeric
62
+ };
@@ -2,7 +2,7 @@ import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
2
  import c from "classnames";
3
3
  import f from "react";
4
4
  import { cssProps as n } from "../../utils/helpers.js";
5
- import { I as u, s } from "../../Input-DE1QkW7S.js";
5
+ import { I as u, s } from "../../Input-DbQTM4UI.js";
6
6
  const I = f.forwardRef(
7
7
  ({ size: r, error: t, label: a, className: e, style: i, required: d, ...m }, p) => /* @__PURE__ */ l(
8
8
  "label",
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { BaseInputProps } from './Input';
3
+ export type SwitchProps = BaseInputProps & {
4
+ label?: React.ReactNode;
5
+ checkedColor?: string;
6
+ };
7
+ export declare const Switch: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
8
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
9
+ error?: string;
10
+ } & {
11
+ label?: React.ReactNode;
12
+ checkedColor?: string;
13
+ } & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,36 @@
1
+ import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
+ import m from "react";
3
+ import u from "classnames";
4
+ import { cssProps as h } from "../../utils/helpers.js";
5
+ import { V as f } from "../../ValidationTooltip-BgSwl0hJ.js";
6
+ const _ = "styles_label_p-D4Y", w = "styles_input_VteBP", s = {
7
+ switch: "styles_switch_UNvH8",
8
+ label: _,
9
+ input: w
10
+ }, V = m.forwardRef(
11
+ ({ size: a, error: i, label: e, required: l, checkedColor: o, className: c, style: n, ...r }, p) => /* @__PURE__ */ d(
12
+ "label",
13
+ {
14
+ "data-input": "switch",
15
+ "data-required": l,
16
+ className: u(s.switch, c),
17
+ style: { ...n, ...h({ size: a, checkedColor: o }) },
18
+ children: [
19
+ /* @__PURE__ */ t(f, { content: i, children: /* @__PURE__ */ t(
20
+ "input",
21
+ {
22
+ ...r,
23
+ ref: p,
24
+ type: "checkbox",
25
+ "data-invalid": i ? !0 : void 0,
26
+ className: s.input
27
+ }
28
+ ) }),
29
+ e && /* @__PURE__ */ t("div", { className: s.label, children: e })
30
+ ]
31
+ }
32
+ )
33
+ );
34
+ export {
35
+ V as Switch
36
+ };
@@ -1,8 +1,9 @@
1
1
  export * from './Checkbox';
2
2
  export * from './Field';
3
3
  export * from './Input';
4
- export * from './Quantity';
4
+ export * from './Numeric';
5
5
  export * from './Radio';
6
6
  export * from './Select';
7
+ export * from './Switch';
7
8
  export * from './Textarea';
8
9
  export * from './ValidationTooltip';
@@ -1,20 +1,22 @@
1
- import { Checkbox as r } from "./Checkbox.js";
1
+ import { Checkbox as e } from "./Checkbox.js";
2
2
  import { Field as p, FieldDescription as i, FieldLabel as x } from "./Field.js";
3
- import { I as f } from "../../Input-DE1QkW7S.js";
4
- import { Quantity as l } from "./Quantity.js";
5
- import { Radio as n } from "./Radio.js";
3
+ import { I as f } from "../../Input-DbQTM4UI.js";
4
+ import { Numeric as l } from "./Numeric.js";
5
+ import { Radio as d } from "./Radio.js";
6
6
  import { Select as s } from "./Select.js";
7
- import { Textarea as b } from "./Textarea.js";
8
- import { V as I } from "../../ValidationTooltip-BgSwl0hJ.js";
7
+ import { Switch as b } from "./Switch.js";
8
+ import { Textarea as u } from "./Textarea.js";
9
+ import { V as S } from "../../ValidationTooltip-BgSwl0hJ.js";
9
10
  export {
10
- r as Checkbox,
11
+ e as Checkbox,
11
12
  p as Field,
12
13
  i as FieldDescription,
13
14
  x as FieldLabel,
14
15
  f as Input,
15
- l as Quantity,
16
- n as Radio,
16
+ l as Numeric,
17
+ d as Radio,
17
18
  s as Select,
18
- b as Textarea,
19
- I as ValidationTooltip
19
+ b as Switch,
20
+ u as Textarea,
21
+ S as ValidationTooltip
20
22
  };
@@ -19,4 +19,4 @@ export declare const Flex: <T extends React.ElementType = "div">(props: {
19
19
  wrap?: React.CSSProperties["flexWrap"];
20
20
  marginStart?: React.CSSProperties["marginBlockStart"];
21
21
  marginEnd?: React.CSSProperties["marginBlockEnd"];
22
- } & Omit<React.PropsWithoutRef<React.ComponentProps<T>>, "direction" | "as" | "align" | "wrap" | "justify" | "gap" | "marginStart" | "marginEnd"> & React.RefAttributes<unknown>) => React.ReactElement | null;
22
+ } & Omit<React.PropsWithoutRef<React.ComponentProps<T>>, "direction" | "as" | "align" | "wrap" | "justify" | "marginStart" | "marginEnd" | "gap"> & React.RefAttributes<unknown>) => React.ReactElement | null;
@@ -1,36 +1,37 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as p } from "react/jsx-runtime";
2
2
  import d from "classnames";
3
- import { fixedForwardRef as i, cssProps as p } from "../../utils/helpers.js";
4
- const y = "Flex_flex_GBHBA", F = {
5
- flex: y
3
+ import { fixedForwardRef as i, cssProps as F } from "../../utils/helpers.js";
4
+ const u = "Flex_flex_GBHBA", w = {
5
+ flex: u
6
6
  };
7
- function u({
8
- as: l,
7
+ function y({
8
+ as: o,
9
9
  direction: e = "row",
10
- gap: o,
11
- align: r,
10
+ gap: r,
11
+ align: t,
12
12
  justify: s,
13
- wrap: f,
14
- marginStart: n,
15
- marginEnd: x,
16
- className: m,
17
- ...t
18
- }, c) {
19
- return /* @__PURE__ */ a(
20
- l ?? "div",
13
+ wrap: l,
14
+ marginStart: f,
15
+ marginEnd: n,
16
+ className: x,
17
+ style: m,
18
+ ...c
19
+ }, a) {
20
+ return /* @__PURE__ */ p(
21
+ o ?? "div",
21
22
  {
22
- ...t,
23
- ref: c,
23
+ ...c,
24
+ ref: a,
24
25
  "data-flex": e,
25
- className: d(F.flex, m),
26
+ className: d(w.flex, x),
26
27
  style: {
27
- ...t.style,
28
- ...p({ gap: o, align: r, justify: s, direction: e, wrap: f, marginStart: n, marginEnd: x })
28
+ ...m,
29
+ ...F({ gap: r, align: t, justify: s, direction: e, wrap: l, marginStart: f, marginEnd: n })
29
30
  }
30
31
  }
31
32
  );
32
33
  }
33
- const j = i(u);
34
+ const v = i(y);
34
35
  export {
35
- j as Flex
36
+ v as Flex
36
37
  };