@situaction/traq-ui-ste 1.0.20 → 1.0.22
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/button/Button.js +31 -31
- package/dist/components/checkbox/Checkbox.d.ts +1 -2
- package/dist/components/checkbox/Checkbox.js +6 -6
- package/dist/components/icon-button/IconButton.js +31 -31
- package/dist/components/input/Input.d.ts +1 -3
- package/dist/components/input/Input.js +62 -62
- package/dist/components/tabs/Tabs.d.ts +7 -3
- package/dist/components/tabs/Tabs.js +37 -23
- package/dist/components/tag-counter/TagCounter.d.ts +8 -0
- package/dist/components/tag-counter/TagCounter.js +20 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +11 -5
- package/dist/styles/Button.css +1 -1
- package/dist/styles/IconButton.css +1 -1
- package/dist/styles/Input.css +1 -1
- package/dist/styles/Tabs.css +1 -1
- package/dist/styles/TagCounter.css +1 -0
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import '../../styles/Button.css';const
|
|
5
|
-
button:
|
|
6
|
-
"button-primary": "_button-
|
|
7
|
-
"button-secondary": "_button-
|
|
8
|
-
"button-tertiary": "_button-
|
|
9
|
-
"button-ghost": "_button-
|
|
10
|
-
"button-text": "_button-
|
|
11
|
-
"button-text-selected": "_button-text-
|
|
12
|
-
"button-error": "_button-
|
|
13
|
-
"button-size-xl": "_button-size-
|
|
14
|
-
"button-size-l": "_button-size-
|
|
15
|
-
"button-size-m": "_button-size-
|
|
16
|
-
"button-size-s": "_button-size-
|
|
17
|
-
"button-gap-xl": "_button-gap-
|
|
18
|
-
"button-gap-l": "_button-gap-
|
|
19
|
-
"button-gap-m": "_button-gap-
|
|
20
|
-
"button-gap-s": "_button-gap-
|
|
21
|
-
flexHorizontalCenter:
|
|
1
|
+
import { jsxs as y, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as x } from "react";
|
|
3
|
+
import { useTheme as g } from "../theme/ThemeContext.js";
|
|
4
|
+
import '../../styles/Button.css';const v = "_button_1031d_21", z = "_flexHorizontalCenter_1031d_167", o = {
|
|
5
|
+
button: v,
|
|
6
|
+
"button-primary": "_button-primary_1031d_43",
|
|
7
|
+
"button-secondary": "_button-secondary_1031d_57",
|
|
8
|
+
"button-tertiary": "_button-tertiary_1031d_71",
|
|
9
|
+
"button-ghost": "_button-ghost_1031d_85",
|
|
10
|
+
"button-text": "_button-text_1031d_101",
|
|
11
|
+
"button-text-selected": "_button-text-selected_1031d_114",
|
|
12
|
+
"button-error": "_button-error_1031d_120",
|
|
13
|
+
"button-size-xl": "_button-size-xl_1031d_133",
|
|
14
|
+
"button-size-l": "_button-size-l_1031d_139",
|
|
15
|
+
"button-size-m": "_button-size-m_1031d_145",
|
|
16
|
+
"button-size-s": "_button-size-s_1031d_151",
|
|
17
|
+
"button-gap-xl": "_button-gap-xl_1031d_157",
|
|
18
|
+
"button-gap-l": "_button-gap-l_1031d_160",
|
|
19
|
+
"button-gap-m": "_button-gap-m_1031d_163",
|
|
20
|
+
"button-gap-s": "_button-gap-s_1031d_163",
|
|
21
|
+
flexHorizontalCenter: z
|
|
22
22
|
}, C = ({
|
|
23
23
|
mode: n = "primary",
|
|
24
24
|
size: s = "m",
|
|
@@ -29,32 +29,32 @@ import '../../styles/Button.css';const d = "_button_tf4v4_21", g = "_flexHorizon
|
|
|
29
29
|
selected: b,
|
|
30
30
|
childrenLeft: i,
|
|
31
31
|
childrenRight: _,
|
|
32
|
-
...
|
|
32
|
+
...d
|
|
33
33
|
}) => {
|
|
34
|
-
const { mode: e } =
|
|
35
|
-
|
|
34
|
+
const { mode: e } = g(), c = () => l ? "error" : n;
|
|
35
|
+
x(() => {
|
|
36
36
|
r && !t && console.warn("`colorMode` is defined but `color` is missing. `colorMode` will be ignored.");
|
|
37
37
|
}, [t]);
|
|
38
|
-
const
|
|
38
|
+
const m = [
|
|
39
39
|
o.button,
|
|
40
|
-
o[`button-${
|
|
40
|
+
o[`button-${c()}`],
|
|
41
41
|
o[`button-size-${s}`],
|
|
42
42
|
o[`button-gap-${s}`],
|
|
43
43
|
b && n === "text" && o["button-text-selected"],
|
|
44
44
|
o.flexHorizontalCenter
|
|
45
|
-
].join(" "),
|
|
45
|
+
].join(" "), p = {
|
|
46
46
|
"--dynamic-color-text": t ? r === "dark" ? `var(--color-${t}-900)` : "var(--color-light-100)" : e === "light" ? "var(--color-light-100)" : "var(--primary-color-900)",
|
|
47
47
|
"--dynamic-color": t ? `var(--color-${t}-${r === "dark" ? "200" : "900"})` : "var(--primary-color)",
|
|
48
48
|
"--dynamic-color-hover": t ? `var(--color-${t}-${r === "dark" ? "100" : "800"})` : e === "light" ? "var(--primary-color-800)" : "var(--primary-color-100)",
|
|
49
49
|
"--dynamic-color-activated": t ? `var(--color-${t}-${r === "dark" ? "50" : "700"})` : e === "light" ? "var(--primary-color-700)" : "var(--primary-color-50)"
|
|
50
50
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ y(
|
|
52
52
|
"button",
|
|
53
53
|
{
|
|
54
54
|
type: "button",
|
|
55
|
-
className:
|
|
56
|
-
style: n === "primary" ?
|
|
57
|
-
...
|
|
55
|
+
className: m,
|
|
56
|
+
style: n === "primary" ? p : void 0,
|
|
57
|
+
...d,
|
|
58
58
|
children: [
|
|
59
59
|
i && /* @__PURE__ */ a("span", { className: o.flexHorizontalCenter, children: i }),
|
|
60
60
|
/* @__PURE__ */ a("span", { children: u }),
|
|
@@ -22,10 +22,10 @@ import '../../styles/Checkbox.css';const n = "_checkbox_1cb1z_21", r = "_checked
|
|
|
22
22
|
disabled: i = !1,
|
|
23
23
|
onChange: o
|
|
24
24
|
}) => {
|
|
25
|
-
const { mode: k } = m(), [c,
|
|
25
|
+
const { mode: k } = m(), [c, _] = x(h), a = () => {
|
|
26
26
|
const d = !c;
|
|
27
|
-
|
|
28
|
-
},
|
|
27
|
+
_(d), o && o(d);
|
|
28
|
+
}, l = [
|
|
29
29
|
e.checkbox,
|
|
30
30
|
e[`checkbox-size-${b}`],
|
|
31
31
|
c && e.checked,
|
|
@@ -36,12 +36,12 @@ import '../../styles/Checkbox.css';const n = "_checkbox_1cb1z_21", r = "_checked
|
|
|
36
36
|
"div",
|
|
37
37
|
{
|
|
38
38
|
"data-testid": "checkbox",
|
|
39
|
-
className:
|
|
40
|
-
onClick:
|
|
39
|
+
className: l,
|
|
40
|
+
onClick: a,
|
|
41
41
|
children: c && t
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
46
|
-
g as
|
|
46
|
+
g as Checkbox
|
|
47
47
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as y } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as d } from "react";
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import '../../styles/IconButton.css';const
|
|
5
|
-
button:
|
|
6
|
-
"button-round": "_button-
|
|
7
|
-
"button-primary": "_button-
|
|
8
|
-
"button-secondary": "_button-
|
|
9
|
-
"button-tertiary": "_button-
|
|
10
|
-
"button-ghost": "_button-
|
|
11
|
-
"button-
|
|
12
|
-
"button-
|
|
13
|
-
"button-error": "_button-
|
|
14
|
-
"button-size-xl": "_button-size-
|
|
15
|
-
"button-size-l": "_button-size-
|
|
16
|
-
"button-size-m": "_button-size-
|
|
17
|
-
"button-size-s": "_button-size-
|
|
18
|
-
flexHorizontalCenter:
|
|
19
|
-
},
|
|
3
|
+
import { useTheme as j } from "../theme/ThemeContext.js";
|
|
4
|
+
import '../../styles/IconButton.css';const w = "_button_pjwt4_21", v = "_flexHorizontalCenter_pjwt4_160", o = {
|
|
5
|
+
button: w,
|
|
6
|
+
"button-round": "_button-round_pjwt4_48",
|
|
7
|
+
"button-primary": "_button-primary_pjwt4_51",
|
|
8
|
+
"button-secondary": "_button-secondary_pjwt4_64",
|
|
9
|
+
"button-tertiary": "_button-tertiary_pjwt4_78",
|
|
10
|
+
"button-ghost": "_button-ghost_pjwt4_92",
|
|
11
|
+
"button-icon": "_button-icon_pjwt4_105",
|
|
12
|
+
"button-icon-selected": "_button-icon-selected_pjwt4_117",
|
|
13
|
+
"button-error": "_button-error_pjwt4_126",
|
|
14
|
+
"button-size-xl": "_button-size-xl_pjwt4_139",
|
|
15
|
+
"button-size-l": "_button-size-l_pjwt4_144",
|
|
16
|
+
"button-size-m": "_button-size-m_pjwt4_149",
|
|
17
|
+
"button-size-s": "_button-size-s_pjwt4_154",
|
|
18
|
+
flexHorizontalCenter: v
|
|
19
|
+
}, h = ({
|
|
20
20
|
mode: e = "primary",
|
|
21
21
|
color: t,
|
|
22
22
|
colorMode: r,
|
|
@@ -24,22 +24,22 @@ import '../../styles/IconButton.css';const x = "_button_1v64m_21", z = "_flexHor
|
|
|
24
24
|
error: a,
|
|
25
25
|
selected: u,
|
|
26
26
|
round: s,
|
|
27
|
-
disabled:
|
|
28
|
-
children:
|
|
29
|
-
onClick:
|
|
27
|
+
disabled: _,
|
|
28
|
+
children: b,
|
|
29
|
+
onClick: l
|
|
30
30
|
}) => {
|
|
31
|
-
const { mode: n } =
|
|
31
|
+
const { mode: n } = j(), c = () => a ? "error" : e;
|
|
32
32
|
d(() => {
|
|
33
33
|
r && !t && console.warn("`colorMode` is defined but `color` is missing. `colorMode` will be ignored.");
|
|
34
34
|
}, [t]);
|
|
35
|
-
const
|
|
35
|
+
const m = [
|
|
36
36
|
o.button,
|
|
37
|
-
o[`button-${
|
|
37
|
+
o[`button-${c()}`],
|
|
38
38
|
s && o["button-round"],
|
|
39
39
|
o[`button-size-${i}`],
|
|
40
|
-
u && e === "icon" && o["button-
|
|
40
|
+
u && e === "icon" && o["button-icon-selected"],
|
|
41
41
|
o.flexHorizontalCenter
|
|
42
|
-
].join(" "),
|
|
42
|
+
].join(" "), p = {
|
|
43
43
|
"--dynamic-color-text": t ? r === "dark" ? "var(--primary-color-900)" : "var(--color-light-100)" : n === "light" ? "var(--color-light-100)" : "var(--primary-color-900)",
|
|
44
44
|
"--dynamic-color": t ? `var(--color-${t}-${r === "dark" ? "200" : "900"})` : "var(--primary-color)",
|
|
45
45
|
"--dynamic-color-hover": t ? `var(--color-${t}-${r === "dark" ? "100" : "800"})` : n === "light" ? "var(--primary-color-800)" : "var(--primary-color-100)",
|
|
@@ -48,14 +48,14 @@ import '../../styles/IconButton.css';const x = "_button_1v64m_21", z = "_flexHor
|
|
|
48
48
|
return /* @__PURE__ */ y(
|
|
49
49
|
"button",
|
|
50
50
|
{
|
|
51
|
-
className:
|
|
52
|
-
style:
|
|
53
|
-
onClick:
|
|
54
|
-
disabled:
|
|
55
|
-
children:
|
|
51
|
+
className: m,
|
|
52
|
+
style: p,
|
|
53
|
+
onClick: l,
|
|
54
|
+
disabled: _,
|
|
55
|
+
children: b
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
58
|
};
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
h as IconButton
|
|
61
61
|
};
|
|
@@ -5,9 +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';
|
|
9
|
-
/** The label or placeholder text for the input field **/
|
|
10
|
-
label: string;
|
|
8
|
+
status?: 'default' | 'error' | 'success' | 'secondary' | 'ghost';
|
|
11
9
|
/** Optional unit or additional label to display next to the input **/
|
|
12
10
|
labelUnit?: string;
|
|
13
11
|
/** If true, the input will have rounded corners **/
|
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as y, useRef as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import '../../styles/Input.css';const
|
|
5
|
-
"input-style": "_input-
|
|
6
|
-
"input-style-disabled": "_input-style-
|
|
7
|
-
"input-style-focused": "_input-style-
|
|
8
|
-
"input-style-secondary": "_input-style-
|
|
9
|
-
"input-style-
|
|
10
|
-
"input-style-
|
|
11
|
-
"input-
|
|
12
|
-
"input-
|
|
13
|
-
"input-style-size-
|
|
14
|
-
"input-style-size-
|
|
15
|
-
"input-style-size-
|
|
16
|
-
"input-style-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
labelUnit:
|
|
23
|
-
status:
|
|
1
|
+
import { jsxs as a, jsx as s, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useRef as F } from "react";
|
|
3
|
+
import { useTheme as j } from "../theme/ThemeContext.js";
|
|
4
|
+
import '../../styles/Input.css';const N = "_flexHorizontalBetween_tg8sh_154", k = "_flexHorizontal_tg8sh_154", t = {
|
|
5
|
+
"input-style": "_input-style_tg8sh_38",
|
|
6
|
+
"input-style-disabled": "_input-style-disabled_tg8sh_50",
|
|
7
|
+
"input-style-focused": "_input-style-focused_tg8sh_61",
|
|
8
|
+
"input-style-secondary": "_input-style-secondary_tg8sh_69",
|
|
9
|
+
"input-style-ghost": "_input-style-ghost_tg8sh_83",
|
|
10
|
+
"input-style-error": "_input-style-error_tg8sh_86",
|
|
11
|
+
"input-style-success": "_input-style-success_tg8sh_96",
|
|
12
|
+
"input-container": "_input-container_tg8sh_106",
|
|
13
|
+
"input-style-size-xl": "_input-style-size-xl_tg8sh_110",
|
|
14
|
+
"input-style-size-l": "_input-style-size-l_tg8sh_120",
|
|
15
|
+
"input-style-size-m": "_input-style-size-m_tg8sh_130",
|
|
16
|
+
"input-style-size-s": "_input-style-size-s_tg8sh_140",
|
|
17
|
+
"input-style-radius": "_input-style-radius_tg8sh_150",
|
|
18
|
+
flexHorizontalBetween: N,
|
|
19
|
+
flexHorizontal: k
|
|
20
|
+
}, D = ({
|
|
21
|
+
sizeStyle: p = "m",
|
|
22
|
+
labelUnit: n,
|
|
23
|
+
status: l = "default",
|
|
24
24
|
childrenLeft: o,
|
|
25
25
|
childrenRight: i,
|
|
26
|
-
round:
|
|
26
|
+
round: d,
|
|
27
27
|
disabled: r,
|
|
28
|
-
defaultValue:
|
|
29
|
-
...
|
|
28
|
+
defaultValue: _,
|
|
29
|
+
...h
|
|
30
30
|
}) => {
|
|
31
|
-
const { mode:
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
].filter(Boolean).join(" "),
|
|
39
|
-
|
|
40
|
-
r &&
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
const { mode: e } = j(), [g, u] = y(!1), [f, m] = y(_ || ""), z = F(null), v = () => u(!0), x = () => u(!1), B = (C) => {
|
|
32
|
+
m(C.target.value);
|
|
33
|
+
}, H = [
|
|
34
|
+
t["input-style"],
|
|
35
|
+
t[`input-style-size-${p}`],
|
|
36
|
+
d && t["input-style-radius"],
|
|
37
|
+
t.flexHorizontalBetween
|
|
38
|
+
].filter(Boolean).join(" "), b = [
|
|
39
|
+
g && t["input-style-focused"],
|
|
40
|
+
r && t["input-style-disabled"],
|
|
41
|
+
l === "secondary" && t["input-style-secondary"],
|
|
42
|
+
l === "ghost" && t["input-style-ghost"]
|
|
43
|
+
].filter(Boolean).join(" "), S = () => {
|
|
44
|
+
switch (l) {
|
|
44
45
|
case "error":
|
|
45
|
-
return
|
|
46
|
+
return t["input-style-error"];
|
|
46
47
|
case "success":
|
|
47
|
-
return
|
|
48
|
+
return t["input-style-success"];
|
|
48
49
|
default:
|
|
49
|
-
return
|
|
50
|
+
return b;
|
|
50
51
|
}
|
|
51
|
-
},
|
|
52
|
-
"--dynamic-color":
|
|
53
|
-
"--dynamic-color-activated":
|
|
54
|
-
"--dynamic-color-disabled":
|
|
55
|
-
"--dynamic-color-border-disabled":
|
|
56
|
-
"--dynamic-color-secondary":
|
|
52
|
+
}, w = {
|
|
53
|
+
"--dynamic-color": e === "light" ? "var(--color-blue-grey-400)" : "var(--color-blue-grey-200)",
|
|
54
|
+
"--dynamic-color-activated": e === "light" ? "var(--color-dark-100)" : "var(--color-light-100)",
|
|
55
|
+
"--dynamic-color-disabled": e === "light" ? "var(--color-dark-40)" : "var(--color-light-40)",
|
|
56
|
+
"--dynamic-color-border-disabled": e === "light" ? "var(--color-dark-10)" : "var(--color-light-10)",
|
|
57
|
+
"--dynamic-color-secondary": e === "light" ? "var(--color-blue-situaction-900)" : "var(--color-light-100)"
|
|
57
58
|
};
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ a(
|
|
59
60
|
"div",
|
|
60
61
|
{
|
|
61
62
|
ref: z,
|
|
62
|
-
className: `input-style ${
|
|
63
|
+
className: `input-style ${H} ${S()}`,
|
|
63
64
|
onFocus: v,
|
|
64
|
-
onBlur:
|
|
65
|
-
style:
|
|
65
|
+
onBlur: x,
|
|
66
|
+
style: w,
|
|
66
67
|
children: [
|
|
67
|
-
o && /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
68
|
+
o && /* @__PURE__ */ s(c, { children: o }),
|
|
69
|
+
/* @__PURE__ */ s("div", { className: t["input-container"], children: /* @__PURE__ */ s(
|
|
69
70
|
"input",
|
|
70
71
|
{
|
|
71
72
|
autoCorrect: "false",
|
|
72
|
-
placeholder: p,
|
|
73
73
|
disabled: r,
|
|
74
|
-
value:
|
|
75
|
-
onChange:
|
|
76
|
-
...
|
|
74
|
+
value: f,
|
|
75
|
+
onChange: B,
|
|
76
|
+
...h
|
|
77
77
|
}
|
|
78
78
|
) }),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
i && /* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ a(c, { children: [
|
|
80
|
+
n && /* @__PURE__ */ s("div", { children: n }),
|
|
81
|
+
i && /* @__PURE__ */ s("span", { className: t.flexHorizontal, children: i })
|
|
82
82
|
] })
|
|
83
83
|
]
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
86
|
};
|
|
87
87
|
export {
|
|
88
|
-
|
|
88
|
+
D as Input
|
|
89
89
|
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface TabsProps {
|
|
4
|
+
/** select the type of data text or icon that we put in tabs */
|
|
5
|
+
type: 'text' | 'icon';
|
|
4
6
|
/** Array of strings representing the labels of the tabs */
|
|
5
|
-
listItems: string[];
|
|
7
|
+
listItems: (string | ReactNode)[];
|
|
6
8
|
/** Index of the tab that should be active by default */
|
|
7
9
|
defaultActiveTab?: number;
|
|
10
|
+
/** Position Tabs */
|
|
11
|
+
position?: 'center' | 'right' | 'left';
|
|
8
12
|
/** Callback function to handle tab selection, receiving the selected tab's label */
|
|
9
|
-
onTabSelect: (selectedItem: string) => void;
|
|
13
|
+
onTabSelect: (selectedItem: string | ReactNode) => void;
|
|
10
14
|
}
|
|
11
15
|
export declare const Tabs: FC<TabsProps>;
|
|
@@ -1,39 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as z, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useRef as i, useLayoutEffect as H } from "react";
|
|
3
3
|
import { Button as v } from "../button/Button.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
"tab-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
import { IconButton as C } from "../icon-button/IconButton.js";
|
|
5
|
+
import '../../styles/Tabs.css';const B = "_underline_6d6ac_34", o = {
|
|
6
|
+
"tab-container": "_tab-container_6d6ac_21",
|
|
7
|
+
"tab-items": "_tab-items_6d6ac_29",
|
|
8
|
+
underline: B,
|
|
9
|
+
"flexHorizontal-center": "_flexHorizontal-center_6d6ac_42",
|
|
10
|
+
"flexHorizontal-left": "_flexHorizontal-left_6d6ac_48",
|
|
11
|
+
"flexHorizontal-right": "_flexHorizontal-right_6d6ac_54"
|
|
12
|
+
}, k = ({ listItems: r, type: u, onTabSelect: _, defaultActiveTab: m = 0, position: b = "left" }) => {
|
|
13
|
+
const [l, x] = d(m), [h, p] = d({}), c = i(null), g = i(null), s = i(new Array(r.length).fill(null)), f = (e) => {
|
|
14
|
+
x(e), _(r[e]);
|
|
12
15
|
}, R = (e) => {
|
|
13
|
-
if (
|
|
14
|
-
const t = e.getBoundingClientRect(),
|
|
15
|
-
|
|
16
|
-
left: `${t.left -
|
|
16
|
+
if (c.current && e) {
|
|
17
|
+
const t = e.getBoundingClientRect(), a = c.current.getBoundingClientRect();
|
|
18
|
+
p({
|
|
19
|
+
left: `${t.left - a.left}px`,
|
|
17
20
|
width: `${t.width}px`
|
|
18
21
|
});
|
|
19
22
|
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
}, y = [
|
|
24
|
+
o[`flexHorizontal-${b}`],
|
|
25
|
+
o["tab-items"]
|
|
26
|
+
].filter(Boolean).join(" ");
|
|
27
|
+
return H(() => {
|
|
28
|
+
const e = s.current[l];
|
|
23
29
|
e && R(e);
|
|
24
|
-
}, [
|
|
25
|
-
/* @__PURE__ */ n("div", { className:
|
|
30
|
+
}, [l]), /* @__PURE__ */ z("div", { className: `tab ${o["tab-container"]}`, ref: c, children: [
|
|
31
|
+
/* @__PURE__ */ n("div", { className: y, children: r.map((e, t) => /* @__PURE__ */ n("div", { ref: (a) => s.current[t] = a, children: u === "text" ? /* @__PURE__ */ n(
|
|
26
32
|
v,
|
|
27
33
|
{
|
|
28
34
|
label: e,
|
|
29
35
|
mode: "text",
|
|
30
|
-
selected: t ===
|
|
31
|
-
onClick: () =>
|
|
36
|
+
selected: t === l,
|
|
37
|
+
onClick: () => f(t)
|
|
38
|
+
}
|
|
39
|
+
) : /* @__PURE__ */ n(
|
|
40
|
+
C,
|
|
41
|
+
{
|
|
42
|
+
mode: "icon",
|
|
43
|
+
selected: t === l,
|
|
44
|
+
onClick: () => f(t),
|
|
45
|
+
children: e
|
|
32
46
|
}
|
|
33
47
|
) }, t)) }),
|
|
34
|
-
/* @__PURE__ */ n("div", { ref:
|
|
48
|
+
/* @__PURE__ */ n("div", { ref: g, className: o.underline, style: h })
|
|
35
49
|
] });
|
|
36
50
|
};
|
|
37
51
|
export {
|
|
38
|
-
|
|
52
|
+
k as Tabs
|
|
39
53
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as n } from "../theme/ThemeContext.js";
|
|
3
|
+
import '../../styles/TagCounter.css';const t = {
|
|
4
|
+
"tag-counter": "_tag-counter_12ztz_21",
|
|
5
|
+
"dark-mode": "_dark-mode_12ztz_32",
|
|
6
|
+
"tag-counter-size-xl": "_tag-counter-size-xl_12ztz_36",
|
|
7
|
+
"tag-counter-size-l": "_tag-counter-size-l_12ztz_43",
|
|
8
|
+
"tag-counter-size-m": "_tag-counter-size-m_12ztz_50",
|
|
9
|
+
"tag-counter-size-s": "_tag-counter-size-s_12ztz_57"
|
|
10
|
+
}, _ = ({ label: e, size: o = "m" }) => {
|
|
11
|
+
const { mode: r } = n(), s = [
|
|
12
|
+
t["tag-counter"],
|
|
13
|
+
t[`tag-counter-size-${o}`],
|
|
14
|
+
r === "dark" && t["dark-mode"]
|
|
15
|
+
].join(" ");
|
|
16
|
+
return /* @__PURE__ */ a("div", { className: s, children: e });
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
_ as TagCounter
|
|
20
|
+
};
|
package/dist/main.d.ts
CHANGED
|
@@ -5,4 +5,7 @@ export { Tabs } from './components/tabs/Tabs';
|
|
|
5
5
|
export { IconButton } from './components/icon-button/IconButton';
|
|
6
6
|
export { Tag } from './components/tag/Tag';
|
|
7
7
|
export { Title } from './components/title/Title';
|
|
8
|
+
export { TagCounter } from './components/tag-counter/TagCounter.tsx';
|
|
9
|
+
export { Checkbox } from './components/checkbox/Checkbox.tsx';
|
|
10
|
+
export { Tooltip } from './components/tooltip/Tooltip.tsx';
|
|
8
11
|
export { ThemeProvider, useTheme } from './components/theme/ThemeContext';
|
package/dist/main.js
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { Button as e } from "./components/button/Button.js";
|
|
2
2
|
import { Input as m } from "./components/input/Input.js";
|
|
3
|
-
import { Tabs as
|
|
3
|
+
import { Tabs as x } from "./components/tabs/Tabs.js";
|
|
4
4
|
import { IconButton as T } from "./components/icon-button/IconButton.js";
|
|
5
5
|
import { Tag as u } from "./components/tag/Tag.js";
|
|
6
6
|
import { Title as h } from "./components/title/Title.js";
|
|
7
|
-
import {
|
|
7
|
+
import { TagCounter as b } from "./components/tag-counter/TagCounter.js";
|
|
8
|
+
import { Checkbox as g } from "./components/checkbox/Checkbox.js";
|
|
9
|
+
import { Tooltip as s } from "./components/tooltip/Tooltip.js";
|
|
10
|
+
import { ThemeProvider as C, useTheme as I } from "./components/theme/ThemeContext.js";
|
|
8
11
|
import './styles/main.css';export {
|
|
9
12
|
e as Button,
|
|
13
|
+
g as Checkbox,
|
|
10
14
|
T as IconButton,
|
|
11
15
|
m as Input,
|
|
12
|
-
|
|
16
|
+
x as Tabs,
|
|
13
17
|
u as Tag,
|
|
14
|
-
|
|
18
|
+
b as TagCounter,
|
|
19
|
+
C as ThemeProvider,
|
|
15
20
|
h as Title,
|
|
16
|
-
|
|
21
|
+
s as Tooltip,
|
|
22
|
+
I as useTheme
|
|
17
23
|
};
|
package/dist/styles/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:Urbanist-Thin;src:url(../fonts/Urbanist-Thin.ttf) format("truetype");font-weight:100;font-style:normal}@font-face{font-family:Urbanist-Extra-Light;src:url(../fonts/Urbanist-ExtraLight.ttf) format("truetype");font-weight:200;font-style:normal}@font-face{font-family:Urbanist-Light;src:url(../fonts/Urbanist-Light.ttf) format("truetype");font-weight:300;font-style:normal}@font-face{font-family:Urbanist-Regular;src:url(../fonts/Urbanist-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:Urbanist;src:url(../fonts/Urbanist-Medium.ttf) format("truetype");font-weight:500;font-style:normal}@font-face{font-family:Urbanist-Back;src:url(../fonts/Urbanist-Black.ttf) format("truetype");font-weight:600;font-style:normal}@font-face{font-family:Urbanist-Semi-Bold;src:url(../fonts/Urbanist-SemiBold.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:Urbanist-Bold;src:url(../fonts/Urbanist-Bold.ttf) format("truetype");font-weight:800;font-style:normal}@font-face{font-family:Urbanist-Extra-Bold;src:url(../fonts/Urbanist-ExtraBold.ttf) format("truetype");font-weight:900;font-style:normal}:root,body{font-family:Urbanist,sans-serif;line-height:1;width:100vw;height:100vh}.
|
|
1
|
+
@font-face{font-family:Urbanist-Thin;src:url(../fonts/Urbanist-Thin.ttf) format("truetype");font-weight:100;font-style:normal}@font-face{font-family:Urbanist-Extra-Light;src:url(../fonts/Urbanist-ExtraLight.ttf) format("truetype");font-weight:200;font-style:normal}@font-face{font-family:Urbanist-Light;src:url(../fonts/Urbanist-Light.ttf) format("truetype");font-weight:300;font-style:normal}@font-face{font-family:Urbanist-Regular;src:url(../fonts/Urbanist-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:Urbanist;src:url(../fonts/Urbanist-Medium.ttf) format("truetype");font-weight:500;font-style:normal}@font-face{font-family:Urbanist-Back;src:url(../fonts/Urbanist-Black.ttf) format("truetype");font-weight:600;font-style:normal}@font-face{font-family:Urbanist-Semi-Bold;src:url(../fonts/Urbanist-SemiBold.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:Urbanist-Bold;src:url(../fonts/Urbanist-Bold.ttf) format("truetype");font-weight:800;font-style:normal}@font-face{font-family:Urbanist-Extra-Bold;src:url(../fonts/Urbanist-ExtraBold.ttf) format("truetype");font-weight:900;font-style:normal}:root,body{font-family:Urbanist,sans-serif;line-height:1;width:100vw;height:100vh}._button_1031d_21{font-family:var(--font-family);font-weight:500;border:0;cursor:pointer;width:fit-content}._button_1031d_21:focus-visible{outline:2px solid var(--dynamic-color);outline-offset:2px}._button_1031d_21:disabled{background-color:#0f0f0f0d;color:#0f0f0f66;border:1px solid rgba(15,15,15,.1);cursor:initial;pointer-events:none}._button_1031d_21:disabled *{fill:#0f0f0f66}._button-primary_1031d_43{color:var(--dynamic-color-text);background-color:var(--dynamic-color)}._button-primary_1031d_43:hover{background-color:var(--dynamic-color-hover)}._button-primary_1031d_43:active{background-color:var(--dynamic-color-activated);outline:none}._button-primary_1031d_43 *{fill:var(--dynamic-color-text)}._button-secondary_1031d_57{color:var(--color-text);background-color:#96b4ee33;border:1px solid rgba(150,180,238,.5)}._button-secondary_1031d_57:hover{background-color:#96b4ee66}._button-secondary_1031d_57:active{background-color:#96b4ee99}._button-secondary_1031d_57 *{fill:var(--color-text)}._button-tertiary_1031d_71{color:var(--color-text);background-color:transparent;border:1px solid rgba(150,180,238,.5)}._button-tertiary_1031d_71:hover{background-color:#96b4ee1a}._button-tertiary_1031d_71:active{background-color:#96b4ee33}._button-tertiary_1031d_71 *{fill:var(--color-text)}._button-ghost_1031d_85{color:var(--color-text);background-color:transparent}._button-ghost_1031d_85:hover{background-color:#96b4ee1a}._button-ghost_1031d_85:active{background-color:#96b4ee33}._button-ghost_1031d_85:disabled{border:none}._button-ghost_1031d_85 *{fill:var(--color-text)}._button-text_1031d_101{color:#96b4eecc;background-color:transparent;padding:0!important}._button-text_1031d_101:hover{color:#96b4ee}._button-text_1031d_101:disabled{border:none;background-color:transparent;color:#a5b4bb}._button-text-selected_1031d_114,._button-text-selected_1031d_114:hover{color:var(--color-text)}._button-error_1031d_120{color:#fff;background-color:#ff4747}._button-error_1031d_120:hover{background-color:#ed1515}._button-error_1031d_120:active{background-color:#c80d0d}._button-error_1031d_120 *{fill:var(--color-text)}._button-size-xl_1031d_133{padding:1rem 2rem;font-size:1.125em;line-height:28px;border-radius:8px}._button-size-l_1031d_139{padding:.75rem 1.5rem;font-size:1em;line-height:24px;border-radius:8px}._button-size-m_1031d_145{padding:.5rem 1rem;font-size:.875em;line-height:22px;border-radius:4px}._button-size-s_1031d_151{padding:.375rem .75rem;font-size:.75em;line-height:16px;border-radius:4px}._button-gap-xl_1031d_157{gap:12px}._button-gap-l_1031d_160{gap:8px}._button-gap-m_1031d_163,._button-gap-s_1031d_163{gap:4px}._flexHorizontalCenter_1031d_167{display:flex;justify-content:center;align-items:center;flex-direction:row}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_pjwt4_21{font-family:var(--font-family);font-weight:500;border:0;cursor:pointer;line-height:1;display:inline-flex;justify-content:center;align-items:center;min-width:12px;min-height:12px;aspect-ratio:1/1}._button_pjwt4_21:focus-visible{outline:none}._button_pjwt4_21:disabled{background-color:#0f0f0f0d;color:#0f0f0f66;border:1px solid rgba(15,15,15,.1);cursor:initial;pointer-events:none}._button_pjwt4_21:disabled *{fill:#0f0f0f66}._button-round_pjwt4_48._button_pjwt4_21{border-radius:50%}._button-primary_pjwt4_51{color:var(--dynamic-color-text);background-color:var(--dynamic-color)}._button-primary_pjwt4_51:hover{background-color:var(--dynamic-color-hover)}._button-primary_pjwt4_51:active{background-color:var(--dynamic-color-activated)}._button-primary_pjwt4_51 *{fill:var(--dynamic-color-text)}._button-secondary_pjwt4_64{color:var(--color-text);background-color:#96b4ee33;border:1px solid rgba(150,180,238,.5)}._button-secondary_pjwt4_64:hover{background-color:#96b4ee66}._button-secondary_pjwt4_64:active{background-color:#96b4ee99}._button-secondary_pjwt4_64 *{fill:var(--color-text)}._button-tertiary_pjwt4_78{color:var(--color-text);background-color:transparent;border:1px solid rgba(150,180,238,.5)}._button-tertiary_pjwt4_78:hover{background-color:#96b4ee1a}._button-tertiary_pjwt4_78:active{background-color:#96b4ee33}._button-tertiary_pjwt4_78 *{fill:var(--color-text)}._button-ghost_pjwt4_92{color:var(--color-text);background-color:transparent}._button-ghost_pjwt4_92:hover{background-color:#96b4ee1a}._button-ghost_pjwt4_92:active{background-color:#96b4ee33}._button-ghost_pjwt4_92 *{fill:var(--color-text)}._button-icon_pjwt4_105{fill:#96b4eecc;background-color:transparent}._button-icon_pjwt4_105:hover{fill:#96b4ee}._button-icon_pjwt4_105:disabled{border:none;background-color:transparent;fill:#a5b4bb}._button-icon-selected_pjwt4_117,._button-icon-selected_pjwt4_117:hover{fill:var(--color-text)}._button-icon_pjwt4_105 svg{fill:inherit}._button-error_pjwt4_126{color:#fff;background-color:#ff4747}._button-error_pjwt4_126:hover{background-color:#ed1515}._button-error_pjwt4_126:active{background-color:#c80d0d}._button-error_pjwt4_126 *{fill:var(--color-text)}._button-size-xl_pjwt4_139{border-radius:.5rem;padding:1rem;font-size:1.125em}._button-size-l_pjwt4_144{border-radius:.5rem;padding:.75rem;font-size:1em}._button-size-m_pjwt4_149{border-radius:.25rem;padding:.5rem;font-size:.875em}._button-size-s_pjwt4_154{border-radius:.25rem;padding:.375rem;font-size:.75em}._flexHorizontalCenter_pjwt4_160{display:flex;justify-content:center;align-items:center;flex-direction:row}
|
package/dist/styles/Input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
input{font-family:Urbanist,sans-serif;border:none;background-color:transparent}input:focus{outline:none;box-shadow:none;border-color:transparent}input::placeholder{font-family:Urbanist,sans-serif;color:var(--dynamic-color)}._input-
|
|
1
|
+
input{font-family:Urbanist,sans-serif;border:none;background-color:transparent;width:auto}input:focus{outline:none;box-shadow:none;border-color:transparent}input::placeholder{font-family:Urbanist,sans-serif;color:var(--dynamic-color)}._input-style_tg8sh_38{font-family:Urbanist,sans-serif;border:1px solid rgba(150,180,238,.5);color:var(--dynamic-color)}._input-style_tg8sh_38 input{color:var(--dynamic-color-activated)}._input-style_tg8sh_38 *{fill:var(--dynamic-color)}._input-style-disabled_tg8sh_50{background-color:#0f0f0f0d;border-color:var(--dynamic-color-border-disabled);pointer-events:none}._input-style-disabled_tg8sh_50 input{color:var(--dynamic-color-disabled)}._input-style-disabled_tg8sh_50 *{fill:var(--dynamic-color-disabled)}._input-style-focused_tg8sh_61{color:var(--dynamic-color);border-color:var(--dynamic-color-border);background-color:var(--dynamic-background-color)}._input-style-focused_tg8sh_61 *{fill:var(--dynamic-color-activated)}._input-style-secondary_tg8sh_69{background-color:#96b4ee33;color:var(--dynamic-color-secondary);border:1px solid rgba(150,180,238,.5)}._input-style-secondary_tg8sh_69 input{color:var(--dynamic-color-secondary)}._input-style-secondary_tg8sh_69 input::placeholder{color:var(--dynamic-color-secondary)}._input-style-secondary_tg8sh_69 *{fill:var(--dynamic-color-secondary)}._input-style-ghost_tg8sh_83{border:none}._input-style-error_tg8sh_86{border-color:#ff4747;color:#ff4747}._input-style-error_tg8sh_86 input::placeholder{color:#ff4747}._input-style-error_tg8sh_86 *{fill:#ff4747}._input-style-success_tg8sh_96{border-color:#33b449;color:#33b449}._input-style-success_tg8sh_96 input::placeholder{color:#33b449}._input-style-success_tg8sh_96 *{fill:#33b449}._input-style_tg8sh_38 ._input-container_tg8sh_106{position:relative;width:100%}._input-style-size-xl_tg8sh_110{padding:1rem;font-size:1.125em;line-height:28px;border-radius:8px;gap:.625rem}._input-style-size-xl_tg8sh_110 input{line-height:28px}._input-style-size-l_tg8sh_120{padding:.75rem;font-size:1em;line-height:24px;border-radius:8px;gap:.5rem}._input-style-size-l_tg8sh_120 input{line-height:24px}._input-style-size-m_tg8sh_130{padding:.5rem;font-size:.875em;line-height:20px;border-radius:4px;gap:.375rem}._input-style-size-m_tg8sh_130 input{line-height:20px}._input-style-size-s_tg8sh_140{padding:.375rem;font-size:.75em;line-height:16px;border-radius:4px;gap:.25rem}._input-style-size-s_tg8sh_140 input{line-height:16px}._input-style-radius_tg8sh_150{border-radius:50px}._flexHorizontalBetween_tg8sh_154{display:flex;justify-content:space-between;align-items:center;flex-direction:row}._flexHorizontal_tg8sh_154{display:flex;justify-content:flex-start;align-items:center;flex-direction:row}
|
package/dist/styles/Tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._tab-
|
|
1
|
+
._tab-container_6d6ac_21{position:relative;color:#a5b4bb;font-weight:500;font-size:.875em;line-height:1.25rem;border-bottom:1px solid rgba(150,180,238,.8)}._tab-items_6d6ac_29{gap:2.25rem;padding:.625rem .125rem}._underline_6d6ac_34{position:absolute;bottom:0;height:2px;background-color:var(--primary-color);transition:all .3s ease}._flexHorizontal-center_6d6ac_42{display:flex;justify-content:center;align-items:center;flex-direction:row}._flexHorizontal-left_6d6ac_48{display:flex;justify-content:flex-start;align-items:center;flex-direction:row}._flexHorizontal-right_6d6ac_54{display:flex;justify-content:flex-end;align-items:center;flex-direction:row}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tag-counter_12ztz_21{color:#1d3557;background-color:#96b4ee66;width:fit-content;display:flex;justify-content:center;align-items:center;padding:4px;box-sizing:border-box}._tag-counter_12ztz_21._dark-mode_12ztz_32{color:#fff;background-color:#fff3}._tag-counter-size-xl_12ztz_36{border-radius:.25rem;font-size:1.125em;line-height:1.75rem;min-width:1.75rem;height:1.75rem}._tag-counter-size-l_12ztz_43{border-radius:.25rem;font-size:1em;line-height:1.5rem;min-width:1.5rem;height:1.5rem}._tag-counter-size-m_12ztz_50{border-radius:.125rem;font-size:.875em;line-height:1.25rem;min-width:1.25rem;height:1.25rem}._tag-counter-size-s_12ztz_57{border-radius:.125rem;font-size:.75em;line-height:1rem;min-width:1rem;height:1rem}
|