@situaction/traq-ui-ste 1.0.27 → 1.1.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.
@@ -1,13 +1,9 @@
1
1
  import { ButtonHTMLAttributes, FC, ReactNode } from 'react';
2
- import { Color, Size } from '../interface';
2
+ import { Size } from '../interface';
3
3
 
4
4
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
5
  /** Is this the principal call to action on the page? */
6
6
  mode?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'text';
7
- /** What background color to use (blue, red, ...)*/
8
- color?: Color;
9
- /** what mode do you use for light or dark color **/
10
- colorMode?: 'light' | 'dark';
11
7
  /** How large should the button be? */
12
8
  size?: Size | 'menu';
13
9
  /** button contents */
@@ -1,84 +1,56 @@
1
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
- import { useTheme as x } from "../theme/ThemeContext.js";
3
- import '../../styles/Button.css';const k = "_button_zk0df_23", g = "_flexHorizontalCenter_zk0df_178", r = {
4
- button: k,
5
- "button-primary": "_button-primary_zk0df_45",
6
- "button-secondary": "_button-secondary_zk0df_59",
7
- "button-tertiary": "_button-tertiary_zk0df_73",
8
- "button-ghost": "_button-ghost_zk0df_87",
9
- "button-text": "_button-text_zk0df_103",
10
- "button-text-selected": "_button-text-selected_zk0df_116",
11
- "button-error": "_button-error_zk0df_122",
12
- "button-size-xl": "_button-size-xl_zk0df_135",
13
- "button-size-l": "_button-size-l_zk0df_141",
14
- "button-size-m": "_button-size-m_zk0df_147",
15
- "button-size-s": "_button-size-s_zk0df_153",
16
- "button-size-menu": "_button-size-menu_zk0df_159",
17
- "button-gap-menu": "_button-gap-menu_zk0df_165",
18
- "button-gap-xl": "_button-gap-xl_zk0df_168",
19
- "button-gap-l": "_button-gap-l_zk0df_171",
20
- "button-gap-m": "_button-gap-m_zk0df_165",
21
- "button-gap-s": "_button-gap-s_zk0df_174",
22
- flexHorizontalCenter: g
23
- }, H = ({
24
- mode: a = "primary",
25
- size: n = "m",
26
- color: t,
27
- colorMode: e,
28
- label: l,
29
- error: m,
30
- selected: d,
31
- childrenLeft: i,
32
- childrenRight: c,
33
- ...y
1
+ import { jsxs as d, jsx as n } from "react/jsx-runtime";
2
+ import '../../styles/Button.css';const i = "_button_vdgnu_23", p = "_flexHorizontalCenter_vdgnu_184", t = {
3
+ button: i,
4
+ "button-primary": "_button-primary_vdgnu_47",
5
+ "button-secondary": "_button-secondary_vdgnu_61",
6
+ "button-tertiary": "_button-tertiary_vdgnu_77",
7
+ "button-ghost": "_button-ghost_vdgnu_93",
8
+ "button-text": "_button-text_vdgnu_109",
9
+ "button-text-selected": "_button-text-selected_vdgnu_122",
10
+ "button-error": "_button-error_vdgnu_128",
11
+ "button-size-xl": "_button-size-xl_vdgnu_141",
12
+ "button-size-l": "_button-size-l_vdgnu_147",
13
+ "button-size-m": "_button-size-m_vdgnu_153",
14
+ "button-size-s": "_button-size-s_vdgnu_159",
15
+ "button-size-menu": "_button-size-menu_vdgnu_165",
16
+ "button-gap-menu": "_button-gap-menu_vdgnu_171",
17
+ "button-gap-xl": "_button-gap-xl_vdgnu_174",
18
+ "button-gap-l": "_button-gap-l_vdgnu_177",
19
+ "button-gap-m": "_button-gap-m_vdgnu_171",
20
+ "button-gap-s": "_button-gap-s_vdgnu_180",
21
+ flexHorizontalCenter: p
22
+ }, x = ({
23
+ mode: o = "primary",
24
+ size: u = "m",
25
+ label: b,
26
+ error: s,
27
+ selected: r,
28
+ childrenLeft: e,
29
+ childrenRight: _,
30
+ ...a
34
31
  }) => {
35
- const { mode: _ } = x(), s = () => m ? "error" : a, u = [
36
- r.button,
37
- r[`button-${s()}`],
38
- r[`button-size-${n}`],
39
- r[`button-gap-${n}`],
40
- d && a === "text" && r["button-text-selected"],
41
- r.flexHorizontalCenter
42
- ].filter(Boolean).join(" "), b = {
43
- "--dynamic-color-primary-text": t ? `var(--color-${t}-900)` : "var(--primary-color-900)",
44
- "--dynamic-color-text": "var(--color-light-100)",
45
- "--dynamic-color": t ? `var(--color-${t}-200)` : "var(--primary-color)",
46
- "--dynamic-color-hover": t ? `var(--color-${t}-200)` : "var(--primary-color-100)",
47
- "--dynamic-color-activated": t ? `var(--color-${t}-50)` : "var(--primary-color-50)"
48
- }, v = {
49
- "--dynamic-color-primary-text": "var(--color-light-100)",
50
- "--dynamic-color-text": t ? `var(--color-${t}-900)` : "var(--primary-color-900)",
51
- "--dynamic-color": t ? `var(--color-${t}-900})` : "var(--primary-color)",
52
- "--dynamic-color-hover": t ? `var(--color-${t}-800)` : "var(--primary-color-800)",
53
- "--dynamic-color-activated": t ? `var(--color-${t}-700})` : "var(--primary-color-700)"
54
- }, p = {
55
- "--dynamic-color-primary-text": t ? `var(--color-${t}-900)` : "var(--primary-color-950)",
56
- "--dynamic-color-text": "var(--color-light-100)",
57
- "--dynamic-color": t ? `var(--color-${t}-200)` : "var(--primary-color-200)",
58
- "--dynamic-color-hover": t ? `var(--color-${t}-200})` : "var(--primary-color-100)",
59
- "--dynamic-color-activated": t ? `var(--color-${t}-50})` : "var(--primary-color-50)"
60
- }, z = {
61
- "--dynamic-color-primary-text": "var(--color-light-100)",
62
- "--dynamic-color-text": t ? `var(--color-${t}-900)` : "var(--secondary-color)",
63
- "--dynamic-color": t ? `var(--color-${t}-900)` : "var(--secondary-color)",
64
- "--dynamic-color-hover": t ? `var(--color-${t}-800)` : "var(--primary-color-800)",
65
- "--dynamic-color-activated": t ? `var(--color-${t}-700)` : "var(--primary-color-700)"
66
- };
67
- return /* @__PURE__ */ f(
32
+ const l = () => s ? "error" : o, g = [
33
+ t.button,
34
+ t[`button-${l()}`],
35
+ t[`button-size-${u}`],
36
+ t[`button-gap-${u}`],
37
+ r && o === "text" && t["button-text-selected"],
38
+ t.flexHorizontalCenter
39
+ ].filter(Boolean).join(" ");
40
+ return /* @__PURE__ */ d(
68
41
  "button",
69
42
  {
70
43
  type: "button",
71
- className: u,
72
- style: e ? e === "dark" ? p : z : _ === "dark" ? b : v,
73
- ...y,
44
+ className: g,
45
+ ...a,
74
46
  children: [
75
- i && /* @__PURE__ */ o("span", { className: r.flexHorizontalCenter, children: i }),
76
- /* @__PURE__ */ o("span", { children: l }),
77
- c && /* @__PURE__ */ o("span", { className: r.flexHorizontalCenter, children: c })
47
+ e && /* @__PURE__ */ n("span", { className: t.flexHorizontalCenter, children: e }),
48
+ /* @__PURE__ */ n("span", { children: b }),
49
+ _ && /* @__PURE__ */ n("span", { className: t.flexHorizontalCenter, children: _ })
78
50
  ]
79
51
  }
80
52
  );
81
53
  };
82
54
  export {
83
- H as Button
55
+ x as Button
84
56
  };
@@ -1,47 +1,49 @@
1
- import { jsx as h } from "react/jsx-runtime";
2
- import { useState as b } from "react";
3
- import { useTheme as m } from "../theme/ThemeContext.js";
4
- import '../../styles/Checkbox.css';const n = "_checkbox_hj8dh_23", r = "_checked_hj8dh_34", j = "_disabled_hj8dh_46", e = {
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useState as d, useEffect as a } from "react";
3
+ import '../../styles/Checkbox.css';const n = "_checkbox_owci7_23", w = "_checked_owci7_31", r = "_disabled_owci7_37", c = {
5
4
  checkbox: n,
6
- "dark-mode": "_dark-mode_hj8dh_31",
7
- checked: r,
8
- disabled: j,
9
- "checkbox-size-s": "_checkbox-size-s_hj8dh_60",
10
- "checkbox-size-m": "_checkbox-size-m_hj8dh_65",
11
- "checkbox-size-l": "_checkbox-size-l_hj8dh_70",
12
- "checkbox-size-xl": "_checkbox-size-xl_hj8dh_75"
13
- }, p = ({
14
- checked: d = !1,
15
- icon: t = /* @__PURE__ */ h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 256 256", children: /* @__PURE__ */ h(
5
+ checked: w,
6
+ disabled: r,
7
+ "checkbox-size-xs": "_checkbox-size-xs_owci7_45",
8
+ "checkbox-size-s": "_checkbox-size-s_owci7_50",
9
+ "checkbox-size-m": "_checkbox-size-m_owci7_55",
10
+ "checkbox-size-l": "_checkbox-size-l_owci7_60",
11
+ "checkbox-size-xl": "_checkbox-size-xl_owci7_65"
12
+ }, f = ({
13
+ checked: e = !1,
14
+ icon: x = /* @__PURE__ */ o("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 256 256", children: /* @__PURE__ */ o(
16
15
  "path",
17
16
  {
18
17
  d: "M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"
19
18
  }
20
19
  ) }),
21
- size: i = "m",
22
- disabled: k = !1,
23
- onChange: s
20
+ size: k = "m",
21
+ disabled: _ = !1,
22
+ onChange: i
24
23
  }) => {
25
- const { mode: _ } = m(), [c, a] = b(d), l = () => {
26
- const o = !c;
27
- a(o), s && s(o);
28
- }, x = [
29
- e.checkbox,
30
- e[`checkbox-size-${i}`],
31
- c && e.checked,
32
- k && e.disabled,
33
- _ === "dark" && e["dark-mode"]
24
+ const [s, h] = d(e);
25
+ a(() => {
26
+ h(e);
27
+ }, [e]);
28
+ const l = () => {
29
+ const t = !s;
30
+ h(t), i && i(t);
31
+ }, b = [
32
+ c.checkbox,
33
+ c[`checkbox-size-${k}`],
34
+ s && c.checked,
35
+ _ && c.disabled
34
36
  ].filter(Boolean).join(" ");
35
- return /* @__PURE__ */ h(
37
+ return /* @__PURE__ */ o(
36
38
  "div",
37
39
  {
38
40
  "data-testid": "checkbox",
39
- className: x,
41
+ className: b,
40
42
  onClick: l,
41
- children: c && t
43
+ children: s && x
42
44
  }
43
45
  );
44
46
  };
45
47
  export {
46
- p as Checkbox
48
+ f as Checkbox
47
49
  };
@@ -1,13 +1,9 @@
1
1
  import { FC, ReactElement } from 'react';
2
- import { Color, Size } from '../interface';
2
+ import { Size } from '../interface';
3
3
 
4
4
  export interface IconButtonProps {
5
5
  /** Specifies the visual style of the button. */
6
6
  mode?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'icon';
7
- /** What background color to use (blue, red, ...)*/
8
- color?: Color;
9
- /** what mode do you use for light or dark color **/
10
- colorMode?: 'light' | 'dark';
11
7
  /** How large should the button be? */
12
8
  size?: Size | 'menu';
13
9
  /** If true, the button will have rounded corners. */
@@ -1,76 +1,48 @@
1
- import { jsx as $ } from "react/jsx-runtime";
2
- import { useTheme as x } from "../theme/ThemeContext.js";
3
- import '../../styles/IconButton.css';const z = "_button_67ovb_23", h = "_flexHorizontalCenter_67ovb_168", t = {
4
- button: z,
5
- "button-round": "_button-round_67ovb_50",
6
- "button-primary": "_button-primary_67ovb_53",
7
- "button-secondary": "_button-secondary_67ovb_66",
8
- "button-tertiary": "_button-tertiary_67ovb_80",
9
- "button-ghost": "_button-ghost_67ovb_94",
10
- "button-icon": "_button-icon_67ovb_107",
11
- "button-icon-selected": "_button-icon-selected_67ovb_119",
12
- "button-error": "_button-error_67ovb_128",
13
- "button-size-xl": "_button-size-xl_67ovb_141",
14
- "button-size-l": "_button-size-l_67ovb_146",
15
- "button-size-m": "_button-size-m_67ovb_151",
16
- "button-size-s": "_button-size-s_67ovb_156",
17
- "button-size-menu": "_button-size-menu_67ovb_161",
18
- flexHorizontalCenter: h
19
- }, S = ({
20
- mode: r = "primary",
21
- color: o,
22
- colorMode: a,
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import '../../styles/IconButton.css';const c = "_button_kop64_23", a = "_flexHorizontalCenter_kop64_177", t = {
3
+ button: c,
4
+ "button-round": "_button-round_kop64_51",
5
+ "button-primary": "_button-primary_kop64_54",
6
+ "button-secondary": "_button-secondary_kop64_68",
7
+ "button-tertiary": "_button-tertiary_kop64_84",
8
+ "button-ghost": "_button-ghost_kop64_100",
9
+ "button-icon": "_button-icon_kop64_116",
10
+ "button-icon-selected": "_button-icon-selected_kop64_128",
11
+ "button-error": "_button-error_kop64_137",
12
+ "button-size-xl": "_button-size-xl_kop64_150",
13
+ "button-size-l": "_button-size-l_kop64_155",
14
+ "button-size-m": "_button-size-m_kop64_160",
15
+ "button-size-s": "_button-size-s_kop64_165",
16
+ "button-size-menu": "_button-size-menu_kop64_170",
17
+ flexHorizontalCenter: a
18
+ }, z = ({
19
+ mode: o = "primary",
23
20
  size: n = "m",
24
21
  error: e,
25
- selected: i,
26
- round: c,
27
- disabled: l,
28
- children: v,
29
- onClick: y
22
+ selected: _,
23
+ round: u,
24
+ disabled: r,
25
+ children: b,
26
+ onClick: s
30
27
  }) => {
31
- const { mode: m } = x(), b = () => e ? "error" : r, u = [
28
+ const i = () => e ? "error" : o, l = [
32
29
  t.button,
33
- t[`button-${b()}`],
34
- c && t["button-round"],
30
+ t[`button-${i()}`],
31
+ u && t["button-round"],
35
32
  t[`button-size-${n}`],
36
- i && r === "icon" && t["button-icon-selected"],
33
+ _ && o === "icon" && t["button-icon-selected"],
37
34
  t.flexHorizontalCenter
38
- ].filter(Boolean).join(" "), s = {
39
- "--dynamic-color-primary-text": o ? `var(--color-${o}-900)` : "var(--primary-color-900)",
40
- "--dynamic-color-text": "var(--color-light-100)",
41
- "--dynamic-color": o ? `var(--color-${o}-200)` : "var(--primary-color)",
42
- "--dynamic-color-hover": o ? `var(--color-${o}-200)` : "var(--primary-color-100)",
43
- "--dynamic-color-activated": o ? `var(--color-${o}-50)` : "var(--primary-color-50)"
44
- }, _ = {
45
- "--dynamic-color-primary-text": "var(--color-light-100)",
46
- "--dynamic-color-text": o ? `var(--color-${o}-900)` : "var(--primary-color-900)",
47
- "--dynamic-color": o ? `var(--color-${o}-900)` : "var(--primary-color)",
48
- "--dynamic-color-hover": o ? `var(--color-${o}-800)` : "var(--primary-color-800)",
49
- "--dynamic-color-activated": o ? `var(--color-${o}-700)` : "var(--primary-color-700)"
50
- }, d = {
51
- "--dynamic-color-primary-text": o ? `var(--color-${o}-900)` : "var(--primary-color-950)",
52
- "--dynamic-color-text": "var(--color-light-100)",
53
- "--dynamic-color": o ? `var(--color-${o}-200)` : "var(--primary-color-200)",
54
- "--dynamic-color-hover": o ? `var(--color-${o}-200)` : "var(--primary-color-100)",
55
- "--dynamic-color-activated": o ? `var(--color-${o}-50)` : "var(--primary-color-50)"
56
- }, p = {
57
- "--dynamic-color-primary-text": "var(--color-light-100)",
58
- "--dynamic-color-text": o ? `var(--color-${o}-900)` : "var(--secondary-color)",
59
- "--dynamic-color": o ? `var(--color-${o}-900})` : "var(--secondary-color)",
60
- "--dynamic-color-hover": o ? `var(--color-${o}-800)` : "var(--primary-color-800)",
61
- "--dynamic-color-activated": o ? `var(--color-${o}-700)` : "var(--primary-color-700)"
62
- };
63
- return /* @__PURE__ */ $(
35
+ ].filter(Boolean).join(" ");
36
+ return /* @__PURE__ */ p(
64
37
  "button",
65
38
  {
66
- className: u,
67
- style: a ? a === "dark" ? d : p : m === "dark" ? s : _,
68
- onClick: y,
69
- disabled: l,
70
- children: v
39
+ className: l,
40
+ onClick: s,
41
+ disabled: r,
42
+ children: b
71
43
  }
72
44
  );
73
45
  };
74
46
  export {
75
- S as IconButton
47
+ z as IconButton
76
48
  };
@@ -5,7 +5,7 @@ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
5
5
  /** How large should the input be? **/
6
6
  sizeStyle?: Size;
7
7
  /** input status style **/
8
- status?: 'default' | 'error' | 'success' | 'secondary' | 'ghost';
8
+ status?: 'default' | 'error' | 'secondary' | 'ghost';
9
9
  /** Optional unit or additional label to display next to the input **/
10
10
  labelUnit?: string;
11
11
  /** If true, the input will have rounded corners **/
@@ -1,94 +1,82 @@
1
- import { jsxs as y, jsx as s, Fragment as p } from "react/jsx-runtime";
2
- import { useState as d, useRef as _ } from "react";
3
- import { useTheme as N } from "../theme/ThemeContext.js";
4
- import '../../styles/Input.css';const I = "_flexHorizontalBetween_8cbxu_156", $ = "_flexHorizontal_8cbxu_156", e = {
5
- "input-style": "_input-style_8cbxu_40",
6
- "input-style-disabled": "_input-style-disabled_8cbxu_52",
7
- "input-style-focused": "_input-style-focused_8cbxu_63",
8
- "input-style-secondary": "_input-style-secondary_8cbxu_71",
9
- "input-style-ghost": "_input-style-ghost_8cbxu_85",
10
- "input-style-error": "_input-style-error_8cbxu_88",
11
- "input-style-success": "_input-style-success_8cbxu_98",
12
- "input-container": "_input-container_8cbxu_108",
13
- "input-style-size-xl": "_input-style-size-xl_8cbxu_112",
14
- "input-style-size-l": "_input-style-size-l_8cbxu_122",
15
- "input-style-size-m": "_input-style-size-m_8cbxu_132",
16
- "input-style-size-s": "_input-style-size-s_8cbxu_142",
17
- "input-style-radius": "_input-style-radius_8cbxu_152",
18
- flexHorizontalBetween: I,
19
- flexHorizontal: $
20
- }, M = ({
21
- sizeStyle: f = "m",
22
- labelUnit: o,
1
+ import { jsxs as a, jsx as t, Fragment as c } from "react/jsx-runtime";
2
+ import { useState as p, useRef as _ } from "react";
3
+ import '../../styles/Input.css';const j = "_flexHorizontalBetween_1og0n_145", N = "_flexHorizontal_1og0n_145", e = {
4
+ "input-style": "_input-style_1og0n_40",
5
+ "input-style-disabled": "_input-style-disabled_1og0n_52",
6
+ "input-style-focused": "_input-style-focused_1og0n_63",
7
+ "input-style-secondary": "_input-style-secondary_1og0n_70",
8
+ "input-style-ghost": "_input-style-ghost_1og0n_84",
9
+ "input-style-error": "_input-style-error_1og0n_87",
10
+ "input-container": "_input-container_1og0n_97",
11
+ "input-style-size-xl": "_input-style-size-xl_1og0n_101",
12
+ "input-style-size-l": "_input-style-size-l_1og0n_111",
13
+ "input-style-size-m": "_input-style-size-m_1og0n_121",
14
+ "input-style-size-s": "_input-style-size-s_1og0n_131",
15
+ "input-style-radius": "_input-style-radius_1og0n_141",
16
+ flexHorizontalBetween: j,
17
+ flexHorizontal: N
18
+ }, R = ({
19
+ sizeStyle: y = "m",
20
+ labelUnit: l,
23
21
  status: n = "default",
24
- childrenLeft: i,
25
- childrenRight: u,
26
- round: x,
27
- disabled: r,
28
- defaultValue: h,
29
- ...m
22
+ childrenLeft: o,
23
+ childrenRight: i,
24
+ round: d,
25
+ disabled: u,
26
+ defaultValue: f,
27
+ ...g
30
28
  }) => {
31
- const { mode: t } = N(), [b, c] = d(!1), [g, z] = d(h || ""), v = _(null), a = _(null), B = () => c(!0), C = () => c(!1), H = (l) => {
32
- z(l.target.value);
29
+ const [z, r] = p(!1), [h, x] = p(f || ""), m = _(null), s = _(null), B = () => r(!0), C = () => r(!1), H = (F) => {
30
+ x(F.target.value);
33
31
  }, S = () => {
34
- var l;
35
- (l = a.current) == null || l.focus();
36
- }, k = [
32
+ s.current && s.current.focus();
33
+ }, v = [
37
34
  e["input-style"],
38
- e[`input-style-size-${f}`],
39
- x && e["input-style-radius"],
35
+ e[`input-style-size-${y}`],
36
+ d && e["input-style-radius"],
40
37
  e.flexHorizontalBetween
41
38
  ].filter(Boolean).join(" "), w = [
42
- b && e["input-style-focused"],
43
- r && e["input-style-disabled"],
39
+ z && e["input-style-focused"],
40
+ u && e["input-style-disabled"],
44
41
  n === "secondary" && e["input-style-secondary"],
45
42
  n === "ghost" && e["input-style-ghost"]
46
- ].filter(Boolean).join(" "), F = () => {
47
- switch (n) {
48
- case "error":
49
- return e["input-style-error"];
50
- case "success":
51
- return e["input-style-success"];
52
- default:
53
- return w;
54
- }
55
- }, j = {
56
- "--dynamic-color": t === "light" ? "var(--color-blue-grey-400)" : "var(--color-blue-grey-200)",
57
- "--dynamic-color-activated": t === "light" ? "var(--color-dark-100)" : "var(--color-light-100)",
58
- "--dynamic-color-disabled": t === "light" ? "var(--color-dark-40)" : "var(--color-light-40)",
59
- "--dynamic-color-border-disabled": t === "light" ? "var(--color-dark-10)" : "var(--color-light-10)",
60
- "--dynamic-color-secondary": t === "light" ? "var(--color-blue-situaction-900)" : "var(--color-light-100)"
61
- };
62
- return /* @__PURE__ */ y(
43
+ ].filter(Boolean).join(" ");
44
+ return /* @__PURE__ */ a(
63
45
  "div",
64
46
  {
65
- ref: v,
66
- className: `input-style ${k} ${F()}`,
47
+ ref: m,
48
+ className: `input-style ${v} ${(() => {
49
+ switch (n) {
50
+ case "error":
51
+ return e["input-style-error"];
52
+ default:
53
+ return w;
54
+ }
55
+ })()}`,
67
56
  onFocus: B,
68
57
  onBlur: C,
69
58
  onClick: S,
70
- style: j,
71
59
  children: [
72
- i && /* @__PURE__ */ s(p, { children: i }),
73
- /* @__PURE__ */ s("div", { className: e["input-container"], children: /* @__PURE__ */ s(
60
+ o && /* @__PURE__ */ t(c, { children: o }),
61
+ /* @__PURE__ */ t("div", { className: e["input-container"], children: /* @__PURE__ */ t(
74
62
  "input",
75
63
  {
76
64
  autoCorrect: "false",
77
- disabled: r,
78
- value: g,
65
+ disabled: u,
66
+ value: h,
79
67
  onChange: H,
80
- ref: a,
81
- ...m
68
+ ref: s,
69
+ ...g
82
70
  }
83
71
  ) }),
84
- /* @__PURE__ */ y(p, { children: [
85
- o && /* @__PURE__ */ s("div", { children: o }),
86
- u && /* @__PURE__ */ s("span", { className: e.flexHorizontal, children: u })
72
+ /* @__PURE__ */ a(c, { children: [
73
+ l && /* @__PURE__ */ t("div", { children: l }),
74
+ i && /* @__PURE__ */ t("span", { className: e.flexHorizontal, children: i })
87
75
  ] })
88
76
  ]
89
77
  }
90
78
  );
91
79
  };
92
80
  export {
93
- M as Input
81
+ R as Input
94
82
  };
@@ -1,46 +1,42 @@
1
- import { jsxs as v, jsx as s } from "react/jsx-runtime";
2
- import { useState as r, useRef as g, useEffect as w } from "react";
3
- import { Button as S } from "../button/Button.js";
4
- import { useTheme as k } from "../theme/ThemeContext.js";
5
- import '../../styles/Select.css';const b = "_customSelect_e5r04_40", x = "_selectOptions_e5r04_46", N = "_option_e5r04_70", t = {
6
- customSelect: b,
7
- selectOptions: x,
8
- "selectOptions-top": "_selectOptions-top_e5r04_54",
9
- "selectOptions-bottom": "_selectOptions-bottom_e5r04_57",
10
- "selectOptions-dark": "_selectOptions-dark_e5r04_60",
11
- "selectOptions-light": "_selectOptions-light_e5r04_63",
12
- "selectOptions-s": "_selectOptions-s_e5r04_66",
13
- option: N,
14
- "icon-size-s": "_icon-size-s_e5r04_98"
15
- }, E = ({
1
+ import { jsxs as b, jsx as s } from "react/jsx-runtime";
2
+ import { useState as r, useRef as f, useEffect as v } from "react";
3
+ import { Button as h } from "../button/Button.js";
4
+ import '../../styles/Select.css';const w = "_customSelect_12bxx_40", S = "_selectOptions_12bxx_46", g = "_option_12bxx_65", t = {
5
+ customSelect: w,
6
+ selectOptions: S,
7
+ "selectOptions-top": "_selectOptions-top_12bxx_55",
8
+ "selectOptions-bottom": "_selectOptions-bottom_12bxx_58",
9
+ "selectOptions-s": "_selectOptions-s_12bxx_61",
10
+ option: g,
11
+ "icon-size-s": "_icon-size-s_12bxx_73"
12
+ }, k = ({
16
13
  options: a,
17
14
  placeholder: p = "",
18
- onChange: n,
19
- disabled: d,
20
- top: m = !1
15
+ onChange: l,
16
+ disabled: m,
17
+ top: d = !1
21
18
  // size = "m",
22
19
  }) => {
23
- const { mode: _ } = k(), [o, l] = r(!1), [c, u] = r(null), i = g(null);
24
- w(() => {
25
- const e = (f) => {
26
- i.current && !i.current.contains(f.target) && l(!1);
20
+ const [o, n] = r(!1), [c, u] = r(null), i = f(null);
21
+ v(() => {
22
+ const e = (O) => {
23
+ i.current && !i.current.contains(O.target) && n(!1);
27
24
  };
28
25
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
29
26
  }, []);
30
- const O = () => [
27
+ const _ = () => [
31
28
  t.selectOptions,
32
- _ === "dark" ? t["selectOptions-dark"] : t["selectOptions-light"],
33
- m ? t["selectOptions-top"] : t["selectOptions-bottom"],
29
+ d ? t["selectOptions-top"] : t["selectOptions-bottom"],
34
30
  t["selectOptions-s"]
35
- ].join(" "), h = (e) => {
36
- u(e), l(!1), n && n(e.value);
31
+ ].join(" "), x = (e) => {
32
+ u(e), n(!1), l && l(e.value);
37
33
  };
38
- return /* @__PURE__ */ v("div", { className: `${t.customSelect}`, children: [
34
+ return /* @__PURE__ */ b("div", { className: `${t.customSelect}`, children: [
39
35
  /* @__PURE__ */ s(
40
- S,
36
+ h,
41
37
  {
42
- onClick: () => l(!o),
43
- disabled: d,
38
+ onClick: () => n(!o),
39
+ disabled: m,
44
40
  size: "s",
45
41
  mode: "tertiary",
46
42
  childrenRight: /* @__PURE__ */ s(
@@ -59,12 +55,12 @@ import '../../styles/Select.css';const b = "_customSelect_e5r04_40", x = "_selec
59
55
  label: c ? c.label : p
60
56
  }
61
57
  ),
62
- o && /* @__PURE__ */ s("div", { className: O(), children: a.map((e) => /* @__PURE__ */ s(
58
+ o && /* @__PURE__ */ s("div", { className: _(), children: a.map((e) => /* @__PURE__ */ s(
63
59
  "div",
64
60
  {
65
61
  className: t.option,
66
62
  role: "option",
67
- onClick: () => h(e),
63
+ onClick: () => x(e),
68
64
  children: e.label
69
65
  },
70
66
  e.value
@@ -72,5 +68,5 @@ import '../../styles/Select.css';const b = "_customSelect_e5r04_40", x = "_selec
72
68
  ] });
73
69
  };
74
70
  export {
75
- E as Select
71
+ k as Select
76
72
  };
@@ -2,7 +2,7 @@ import { FC, ReactNode } from 'react';
2
2
 
3
3
  export interface TabsProps {
4
4
  /** select the type of data text or icon that we put in tabs */
5
- type: 'text' | 'icon';
5
+ type: 'text' | 'icon' | 'button';
6
6
  /** Array of strings representing the labels of the tabs */
7
7
  listItems: (string | ReactNode)[];
8
8
  /** Index of the tab that should be active by default */