@situaction/traq-ui-ste 1.1.28 → 1.1.30
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/editable-field/EditableField.d.ts +24 -0
- package/dist/components/editable-field/EditableField.js +30 -0
- package/dist/components/input/Input.js +29 -29
- package/dist/components/input-label/InputLabel.d.ts +16 -0
- package/dist/components/input-label/InputLabel.js +43 -0
- package/dist/components/panel/side-panel-header/SidePanelHeader.js +48 -32
- package/dist/components/tabs/Tabs.d.ts +3 -0
- package/dist/components/tabs/Tabs.js +74 -57
- package/dist/main.d.ts +2 -0
- package/dist/main.js +33 -29
- package/dist/styles/EditableField.css +1 -0
- package/dist/styles/Input.css +1 -1
- package/dist/styles/InputLabel.css +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LabelInputProps } from '../input-label/InputLabel';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Props for the EditableField component.
|
|
5
|
+
* Extends all props from InputLabel to allow reuse.
|
|
6
|
+
*/
|
|
7
|
+
interface EditableFieldProps extends Partial<LabelInputProps> {
|
|
8
|
+
/** Text displayed as the label above the field */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Value to display or edit */
|
|
11
|
+
value?: string;
|
|
12
|
+
/** Placeholder shown when the input is empty (in edit mode) */
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
/** If true, renders an editable input field */
|
|
15
|
+
edit: boolean;
|
|
16
|
+
/** Callback when value is changed (only in edit mode) */
|
|
17
|
+
onChange?: (val: string) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* EditableField displays either a read-only value or an editable input.
|
|
21
|
+
* It supports all props from InputLabel.
|
|
22
|
+
*/
|
|
23
|
+
export declare const EditableField: ({ label, value, placeholder, edit, onChange, ...inputLabelProps }: EditableFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { InputLabel as c } from "../input-label/InputLabel.js";
|
|
3
|
+
import '../../styles/EditableField.css';const m = "_editableField_1lhi9_30", o = "_statiqueField_1lhi9_39", l = {
|
|
4
|
+
editableField: m,
|
|
5
|
+
statiqueField: o
|
|
6
|
+
}, h = ({
|
|
7
|
+
label: i,
|
|
8
|
+
value: e,
|
|
9
|
+
placeholder: d,
|
|
10
|
+
edit: s,
|
|
11
|
+
onChange: a,
|
|
12
|
+
...r
|
|
13
|
+
// Spread to pass all remaining props to InputLabel
|
|
14
|
+
}) => s ? /* @__PURE__ */ t(
|
|
15
|
+
c,
|
|
16
|
+
{
|
|
17
|
+
label: i,
|
|
18
|
+
defaultValue: e || "",
|
|
19
|
+
placeholder: d || "",
|
|
20
|
+
onSubmit: a || (() => {
|
|
21
|
+
}),
|
|
22
|
+
...r
|
|
23
|
+
}
|
|
24
|
+
) : /* @__PURE__ */ n("div", { className: l.editableField, children: [
|
|
25
|
+
/* @__PURE__ */ t("span", { className: "textSmall", children: i }),
|
|
26
|
+
/* @__PURE__ */ t("div", { className: `${l.statiqueField} textSmall`, children: (e == null ? void 0 : e.trim()) || " " })
|
|
27
|
+
] });
|
|
28
|
+
export {
|
|
29
|
+
h as EditableField
|
|
30
|
+
};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsxs as a, jsx as t, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import '../../styles/Input.css';const
|
|
4
|
-
"input-style": "_input-
|
|
5
|
-
"input-style-disabled": "_input-style-
|
|
6
|
-
"input-style-focused": "_input-style-
|
|
7
|
-
"input-style-secondary": "_input-style-
|
|
8
|
-
"input-style-ghost": "_input-style-
|
|
9
|
-
"input-style-error": "_input-style-
|
|
10
|
-
"input-container": "_input-
|
|
11
|
-
"input-style-size-xl": "_input-style-size-
|
|
12
|
-
"input-style-size-l": "_input-style-size-
|
|
13
|
-
"input-style-size-m": "_input-style-size-
|
|
14
|
-
"input-style-size-s": "_input-style-size-
|
|
15
|
-
"input-style-radius": "_input-style-
|
|
16
|
-
flexHorizontalBetween:
|
|
1
|
+
import { jsxs as a, jsx as t, Fragment as y } from "react/jsx-runtime";
|
|
2
|
+
import { useState as c, useRef as p } from "react";
|
|
3
|
+
import '../../styles/Input.css';const F = "_flexHorizontalBetween_xyzdj_157", N = "_flexHorizontal_xyzdj_157", e = {
|
|
4
|
+
"input-style": "_input-style_xyzdj_52",
|
|
5
|
+
"input-style-disabled": "_input-style-disabled_xyzdj_64",
|
|
6
|
+
"input-style-focused": "_input-style-focused_xyzdj_75",
|
|
7
|
+
"input-style-secondary": "_input-style-secondary_xyzdj_82",
|
|
8
|
+
"input-style-ghost": "_input-style-ghost_xyzdj_96",
|
|
9
|
+
"input-style-error": "_input-style-error_xyzdj_99",
|
|
10
|
+
"input-container": "_input-container_xyzdj_109",
|
|
11
|
+
"input-style-size-xl": "_input-style-size-xl_xyzdj_113",
|
|
12
|
+
"input-style-size-l": "_input-style-size-l_xyzdj_123",
|
|
13
|
+
"input-style-size-m": "_input-style-size-m_xyzdj_133",
|
|
14
|
+
"input-style-size-s": "_input-style-size-s_xyzdj_143",
|
|
15
|
+
"input-style-radius": "_input-style-radius_xyzdj_153",
|
|
16
|
+
flexHorizontalBetween: F,
|
|
17
17
|
flexHorizontal: N
|
|
18
18
|
}, R = ({
|
|
19
|
-
sizeStyle:
|
|
19
|
+
sizeStyle: d = "m",
|
|
20
20
|
labelUnit: l,
|
|
21
21
|
status: n = "default",
|
|
22
22
|
childrenLeft: i,
|
|
23
23
|
childrenRight: o,
|
|
24
|
-
round:
|
|
24
|
+
round: _,
|
|
25
25
|
disabled: u,
|
|
26
|
-
defaultValue:
|
|
27
|
-
...
|
|
26
|
+
defaultValue: z,
|
|
27
|
+
...f
|
|
28
28
|
}) => {
|
|
29
|
-
const [
|
|
30
|
-
|
|
29
|
+
const [x, r] = c(!1), [j, h] = c(z || ""), m = p(null), s = p(null), g = () => r(!0), B = () => r(!1), C = (w) => {
|
|
30
|
+
h(w.target.value);
|
|
31
31
|
}, H = () => {
|
|
32
32
|
s.current && s.current.focus();
|
|
33
33
|
}, S = [
|
|
34
34
|
e["input-style"],
|
|
35
|
-
e[`input-style-size-${
|
|
36
|
-
|
|
35
|
+
e[`input-style-size-${d}`],
|
|
36
|
+
_ && e["input-style-radius"],
|
|
37
37
|
e.flexHorizontalBetween
|
|
38
38
|
].filter(Boolean).join(" "), v = [
|
|
39
|
-
|
|
39
|
+
x && e["input-style-focused"],
|
|
40
40
|
u && e["input-style-disabled"],
|
|
41
41
|
n === "secondary" && e["input-style-secondary"],
|
|
42
42
|
n === "ghost" && e["input-style-ghost"]
|
|
@@ -57,19 +57,19 @@ import '../../styles/Input.css';const j = "_flexHorizontalBetween_84wd5_152", N
|
|
|
57
57
|
onBlur: B,
|
|
58
58
|
onClick: H,
|
|
59
59
|
children: [
|
|
60
|
-
i && /* @__PURE__ */ t(
|
|
60
|
+
i && /* @__PURE__ */ t(y, { children: i }),
|
|
61
61
|
/* @__PURE__ */ t("div", { className: e["input-container"], children: /* @__PURE__ */ t(
|
|
62
62
|
"input",
|
|
63
63
|
{
|
|
64
64
|
autoCorrect: "false",
|
|
65
65
|
disabled: u,
|
|
66
|
-
value:
|
|
66
|
+
value: j,
|
|
67
67
|
onChange: C,
|
|
68
68
|
ref: s,
|
|
69
|
-
...
|
|
69
|
+
...f
|
|
70
70
|
}
|
|
71
71
|
) }),
|
|
72
|
-
/* @__PURE__ */ a(
|
|
72
|
+
/* @__PURE__ */ a(y, { children: [
|
|
73
73
|
l && /* @__PURE__ */ t("div", { children: l }),
|
|
74
74
|
o && /* @__PURE__ */ t("span", { className: e.flexHorizontal, children: o })
|
|
75
75
|
] })
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface LabelInputProps {
|
|
4
|
+
/** Label text displayed above the input */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Default value of the input (optional) */
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
/** Size of the input: small, medium, or large (optional, default: "s") */
|
|
9
|
+
size?: "s" | "m" | "l";
|
|
10
|
+
/** Callback triggered when the value is submitted */
|
|
11
|
+
onSubmit: (newValue: string) => void;
|
|
12
|
+
/** Placeholder shown when the input is empty (in edit mode) */
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
}
|
|
15
|
+
/** InputLabel is a labeled input component with submit-on-blur and Enter support */
|
|
16
|
+
export declare const InputLabel: FC<LabelInputProps>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsxs as h, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useEffect as f } from "react";
|
|
3
|
+
import { Input as b } from "../input/Input.js";
|
|
4
|
+
import '../../styles/InputLabel.css';const x = "_inputLabel_1x3uf_30", _ = "_fullWidth_1x3uf_39", o = {
|
|
5
|
+
inputLabel: x,
|
|
6
|
+
fullWidth: _
|
|
7
|
+
}, W = ({
|
|
8
|
+
label: a,
|
|
9
|
+
defaultValue: t,
|
|
10
|
+
size: u = "s",
|
|
11
|
+
onSubmit: r,
|
|
12
|
+
placeholder: y,
|
|
13
|
+
...c
|
|
14
|
+
}) => {
|
|
15
|
+
const [e, s] = d("");
|
|
16
|
+
f(() => {
|
|
17
|
+
s(t ?? "");
|
|
18
|
+
}, [t]);
|
|
19
|
+
const i = () => {
|
|
20
|
+
e.trim() !== t && r(e.trim());
|
|
21
|
+
}, m = (l) => {
|
|
22
|
+
l.key === "Enter" && i();
|
|
23
|
+
}, p = () => {
|
|
24
|
+
i();
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ h("div", { className: o.inputLabel, children: [
|
|
27
|
+
/* @__PURE__ */ n("label", { className: "textSmall", children: a }),
|
|
28
|
+
/* @__PURE__ */ n("div", { className: o.fullWidth, children: /* @__PURE__ */ n(
|
|
29
|
+
b,
|
|
30
|
+
{
|
|
31
|
+
value: e,
|
|
32
|
+
sizeStyle: u,
|
|
33
|
+
onChange: (l) => s(l.target.value),
|
|
34
|
+
onKeyDown: m,
|
|
35
|
+
onBlur: p,
|
|
36
|
+
...c
|
|
37
|
+
}
|
|
38
|
+
) })
|
|
39
|
+
] });
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
W as InputLabel
|
|
43
|
+
};
|
|
@@ -1,60 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as C, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import '../../../styles/Size.css';import '../../../styles/index.css';import '../../../styles/SidePanelHeader.css';/* empty css */
|
|
3
3
|
import "react";
|
|
4
|
-
import { IconButton as
|
|
5
|
-
import { Icon as
|
|
4
|
+
import { IconButton as i } from "../../icon-button/IconButton.js";
|
|
5
|
+
import { Icon as t } from "../../icon/Icon.js";
|
|
6
6
|
import "../../modal/Modal.js";
|
|
7
7
|
import "../../theme/ThemeContext.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
const
|
|
10
|
-
sidePanelHeader:
|
|
11
|
-
buttonArrow:
|
|
12
|
-
title:
|
|
13
|
-
},
|
|
14
|
-
title:
|
|
15
|
-
icon:
|
|
16
|
-
onClickBack:
|
|
17
|
-
onClickForward:
|
|
18
|
-
onClickClose:
|
|
19
|
-
disabledBack:
|
|
20
|
-
disabledForward:
|
|
21
|
-
}) => /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
9
|
+
const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13", h = "_title_72g7b_20", r = {
|
|
10
|
+
sidePanelHeader: c,
|
|
11
|
+
buttonArrow: m,
|
|
12
|
+
title: h
|
|
13
|
+
}, v = ({
|
|
14
|
+
title: s,
|
|
15
|
+
icon: o,
|
|
16
|
+
onClickBack: L,
|
|
17
|
+
onClickForward: l,
|
|
18
|
+
onClickClose: n,
|
|
19
|
+
disabledBack: d = !1,
|
|
20
|
+
disabledForward: a = !1
|
|
21
|
+
}) => /* @__PURE__ */ C("div", { className: r.sidePanelHeader, children: [
|
|
22
|
+
/* @__PURE__ */ C("div", { className: r.buttonArrow, children: [
|
|
23
23
|
/* @__PURE__ */ e(
|
|
24
|
-
|
|
24
|
+
i,
|
|
25
25
|
{
|
|
26
|
-
disabled:
|
|
26
|
+
disabled: d,
|
|
27
27
|
mode: "tertiary",
|
|
28
28
|
size: "s",
|
|
29
|
-
onClick:
|
|
30
|
-
children: /* @__PURE__ */ e(
|
|
29
|
+
onClick: L,
|
|
30
|
+
children: /* @__PURE__ */ e(t, { icon: "CaretLeft", size: 18 })
|
|
31
31
|
}
|
|
32
32
|
),
|
|
33
33
|
/* @__PURE__ */ e(
|
|
34
|
-
|
|
34
|
+
i,
|
|
35
35
|
{
|
|
36
|
-
disabled:
|
|
36
|
+
disabled: a,
|
|
37
37
|
mode: "tertiary",
|
|
38
38
|
size: "s",
|
|
39
|
-
onClick:
|
|
40
|
-
children: /* @__PURE__ */ e(
|
|
39
|
+
onClick: l,
|
|
40
|
+
children: /* @__PURE__ */ e(t, { icon: "CaretRight", size: 18 })
|
|
41
41
|
}
|
|
42
42
|
)
|
|
43
43
|
] }),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
/* @__PURE__ */ e("h3", { children:
|
|
44
|
+
/* @__PURE__ */ C("div", { className: r.title, children: [
|
|
45
|
+
o && /* @__PURE__ */ e(t, { icon: o, size: 22 }),
|
|
46
|
+
/* @__PURE__ */ e("h3", { children: s })
|
|
47
47
|
] }),
|
|
48
48
|
/* @__PURE__ */ e(
|
|
49
|
-
|
|
49
|
+
i,
|
|
50
50
|
{
|
|
51
51
|
size: "s",
|
|
52
52
|
mode: "tertiary",
|
|
53
|
-
children: /* @__PURE__ */
|
|
54
|
-
|
|
53
|
+
children: /* @__PURE__ */ C("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 16 16", fill: "none", children: [
|
|
54
|
+
/* @__PURE__ */ e(
|
|
55
|
+
"path",
|
|
56
|
+
{
|
|
57
|
+
opacity: "0.2",
|
|
58
|
+
d: "M3 2.5L10 2.5L10 4.79312C9.99995 4.85881 10.0128 4.92385 10.0379 4.98455C10.063 5.04525 10.0998 5.10041 10.1462 5.14688L9.88 6.35375C9.92642 6.40022 9.96322 6.45538 9.98832 6.51608C10.0134 6.57677 10.0263 6.64182 10.0262 6.7075L10.0262 9.29312C10.0263 9.3588 10.0134 9.42385 9.98832 9.48455C9.96322 9.54525 9.92642 9.60041 9.88 9.64687L10.1462 10.8538C10.0998 10.9002 10.063 10.9554 10.0379 11.0161C10.0128 11.0768 9.99995 11.1418 10 11.2075L10 13.5L3 13.5C2.86739 13.5 2.74021 13.4473 2.64645 13.3536C2.55268 13.2598 2.5 13.1326 2.5 13L2.5 3C2.5 2.86739 2.55268 2.74022 2.64645 2.64645C2.74021 2.55268 2.86739 2.5 3 2.5Z",
|
|
59
|
+
fill: "#FFFFFF"
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ e(
|
|
63
|
+
"path",
|
|
64
|
+
{
|
|
65
|
+
d: "M2 3L2 13C2 13.2652 2.10536 13.5196 2.29289 13.7071C2.48043 13.8946 2.73478 14 3 14L13 14C13.2652 14 13.5196 13.8946 13.7071 13.7071C13.8946 13.5196 14 13.2652 14 13L14 3C14 2.73478 13.8946 2.48043 13.7071 2.29289C13.5196 2.10536 13.2652 2 13 2L3 2C2.73478 2 2.48043 2.10536 2.29289 2.29289C2.10536 2.48043 2 2.73479 2 3ZM3 3L9.5 3L9.5 4.79375C9.49966 4.92502 9.5 5.02 9.5 5.16C9.5 5.3 9.5 5.58 9.5 5.73L9.5 6.70688L9.5 8L9.5 9.29313L9.5 10.43C9.5 10.59 9.5 10.69 9.5 10.85C9.5 10.98 9.49958 11.0755 9.5 11.2069L9.5 13L3 13L3 3ZM13 3L13 13L10.5 13L10.5 11.2069L10.5 10.69C10.5 10.5 10.5 9.87401 10.5 9.73C10.5 9.66401 10.5004 9.4245 10.5 9.29313L10.5 6.70688C10.5004 6.57551 10.5 6.41 10.5 6.28C10.5 6.13 10.5 6 10.5 5.89L10.5 4.79313L10.5 3L13 3ZM6.85375 10.3538C6.80731 10.4002 6.75217 10.4371 6.69147 10.4623C6.63077 10.4874 6.56571 10.5004 6.5 10.5004C6.43429 10.5004 6.36923 10.4874 6.30853 10.4623C6.24783 10.4371 6.19269 10.4002 6.14625 10.3538L4.14625 8.35375C4.09976 8.30731 4.06288 8.25217 4.03772 8.19147C4.01256 8.13077 3.99961 8.06571 3.99961 8C3.99961 7.93429 4.01256 7.86923 4.03772 7.80853C4.06288 7.74783 4.09976 7.69269 4.14625 7.64625L6.14625 5.64625C6.1927 5.5998 6.24785 5.56295 6.30855 5.5378C6.36925 5.51266 6.4343 5.49972 6.5 5.49972C6.5657 5.49972 6.63075 5.51266 6.69145 5.5378C6.75214 5.56295 6.80729 5.5998 6.85375 5.64625C6.9002 5.69271 6.93705 5.74786 6.9622 5.80855C6.98734 5.86925 7.00028 5.9343 7.00028 6C7.00028 6.0657 6.98734 6.13075 6.9622 6.19145C6.93705 6.25215 6.9002 6.3073 6.85375 6.35375L5.70687 7.5L9.5 7.5C9.5 7.54 9.5 7.58 9.5 7.64645C9.5 7.7 9.5 7.86739 9.5 8C9.5 8.13261 9.5 8.25 9.5 8.35355C9.5 8.41 9.5 8.45 9.5 8.5L5.70687 8.5L6.85375 9.64625C6.90024 9.69269 6.93712 9.74783 6.96228 9.80853C6.98744 9.86923 7.00039 9.93429 7.00039 10C7.00039 10.0657 6.98744 10.1308 6.96228 10.1915C6.93712 10.2522 6.90024 10.3073 6.85375 10.3538Z",
|
|
66
|
+
fill: "#FFFFFF"
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] }),
|
|
70
|
+
onClick: n
|
|
55
71
|
}
|
|
56
72
|
)
|
|
57
73
|
] });
|
|
58
74
|
export {
|
|
59
|
-
|
|
75
|
+
v as SidePanelHeader
|
|
60
76
|
};
|
|
@@ -11,7 +11,10 @@ export interface TabsProps {
|
|
|
11
11
|
position?: 'center' | 'right' | 'left';
|
|
12
12
|
/** Callback function to handle tab selection, receiving the selected tab's label */
|
|
13
13
|
onTabSelect: (selectedItem: string | ReactNode) => void;
|
|
14
|
+
/** Full width*/
|
|
14
15
|
fullWidth?: boolean;
|
|
16
|
+
/** tabs disabled */
|
|
17
|
+
disabledTabs?: number[];
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
17
20
|
* Tabs component that allows tab navigation with text, icons, or buttons.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as p, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useRef as u, useLayoutEffect as w } from "react";
|
|
3
3
|
import '../../styles/index.css';import '../../styles/Tabs.css';/* empty css */
|
|
4
|
-
import { Button as
|
|
5
|
-
import { IconButton as
|
|
6
|
-
const
|
|
4
|
+
import { Button as B } from "../button/Button.js";
|
|
5
|
+
import { IconButton as S } from "../icon-button/IconButton.js";
|
|
6
|
+
const j = "_underline_6o3gh_70", e = {
|
|
7
7
|
"tab-container": "_tab-container_6o3gh_30",
|
|
8
8
|
"tab-container-button": "_tab-container-button_6o3gh_34",
|
|
9
9
|
"tab-container-icon": "_tab-container-icon_6o3gh_39",
|
|
@@ -13,68 +13,85 @@ const w = "_underline_6o3gh_70", n = {
|
|
|
13
13
|
"tab-full-width": "_tab-full-width_6o3gh_51",
|
|
14
14
|
"selected-button": "_selected-button_6o3gh_57",
|
|
15
15
|
"selected-text": "_selected-text_6o3gh_63",
|
|
16
|
-
underline:
|
|
16
|
+
underline: j,
|
|
17
17
|
"flexHorizontal-center": "_flexHorizontal-center_6o3gh_78",
|
|
18
18
|
"flexHorizontal-left": "_flexHorizontal-left_6o3gh_84",
|
|
19
19
|
"flexHorizontal-right": "_flexHorizontal-right_6o3gh_90"
|
|
20
|
-
},
|
|
21
|
-
listItems:
|
|
20
|
+
}, y = ({
|
|
21
|
+
listItems: c,
|
|
22
22
|
type: o,
|
|
23
|
-
onTabSelect:
|
|
24
|
-
defaultActiveTab:
|
|
25
|
-
position:
|
|
26
|
-
fullWidth:
|
|
23
|
+
onTabSelect: h,
|
|
24
|
+
defaultActiveTab: m = 0,
|
|
25
|
+
position: g = "left",
|
|
26
|
+
fullWidth: x = !1,
|
|
27
|
+
disabledTabs: b = []
|
|
28
|
+
// ✅ par défaut vide
|
|
27
29
|
}) => {
|
|
28
|
-
const [
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
if (
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
left: `${
|
|
35
|
-
width: `${
|
|
30
|
+
const [s, v] = f(m), [z, $] = f({}), r = u(null), R = u(null), _ = u([]), d = (t) => {
|
|
31
|
+
b.includes(t) || (v(t), h(c[t]));
|
|
32
|
+
}, H = (t) => {
|
|
33
|
+
if (r.current && t) {
|
|
34
|
+
const n = t.getBoundingClientRect(), i = r.current.getBoundingClientRect();
|
|
35
|
+
$({
|
|
36
|
+
left: `${n.left - i.left}px`,
|
|
37
|
+
width: `${n.width}px`
|
|
36
38
|
});
|
|
37
39
|
}
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
o === "button" ?
|
|
40
|
+
}, C = [
|
|
41
|
+
e[`flexHorizontal-${g}`],
|
|
42
|
+
o === "button" ? e["tab-items-button"] : e["tab-items"]
|
|
41
43
|
].filter(Boolean).join(" ");
|
|
42
|
-
return
|
|
43
|
-
const t = _.current[
|
|
44
|
+
return w(() => {
|
|
45
|
+
const t = _.current[s];
|
|
44
46
|
t && requestAnimationFrame(() => {
|
|
45
|
-
|
|
47
|
+
H(t);
|
|
46
48
|
});
|
|
47
|
-
}, [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
49
|
+
}, [s, c.length]), /* @__PURE__ */ p(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
className: `tab ${e["tab-container"]} ${e[`tab-container-${o}`]} ${x && e["tab-full-width"]}`,
|
|
53
|
+
ref: r,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ l("div", { className: C, children: c.map((t, n) => {
|
|
56
|
+
const i = b.includes(n), a = n === s;
|
|
57
|
+
return /* @__PURE__ */ l(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
ref: (N) => _.current[n] = N,
|
|
61
|
+
className: `
|
|
62
|
+
${o === "button" && a ? e["selected-button"] : ""}
|
|
63
|
+
${i ? e["tab-disabled"] : ""}
|
|
64
|
+
`,
|
|
65
|
+
children: o === "icon" ? /* @__PURE__ */ l(
|
|
66
|
+
S,
|
|
67
|
+
{
|
|
68
|
+
mode: "icon",
|
|
69
|
+
size: "s",
|
|
70
|
+
selected: a,
|
|
71
|
+
onClick: () => d(n),
|
|
72
|
+
disabled: i,
|
|
73
|
+
children: t
|
|
74
|
+
}
|
|
75
|
+
) : /* @__PURE__ */ l("div", { className: a ? e["selected-text"] : void 0, children: /* @__PURE__ */ l(
|
|
76
|
+
B,
|
|
77
|
+
{
|
|
78
|
+
size: "s",
|
|
79
|
+
label: t,
|
|
80
|
+
mode: o === "text" ? "text" : "ghost",
|
|
81
|
+
selected: a,
|
|
82
|
+
onClick: () => d(n),
|
|
83
|
+
disabled: i
|
|
84
|
+
}
|
|
85
|
+
) })
|
|
86
|
+
},
|
|
87
|
+
n
|
|
88
|
+
);
|
|
89
|
+
}) }),
|
|
90
|
+
o !== "button" && /* @__PURE__ */ l("div", { ref: R, className: e.underline, style: z })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
77
94
|
};
|
|
78
95
|
export {
|
|
79
|
-
|
|
96
|
+
y as Tabs
|
|
80
97
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -25,4 +25,6 @@ export { NestedListItem } from './components/list/nested-list/item/NestedListIte
|
|
|
25
25
|
export { Switch } from './components/switch/Switch';
|
|
26
26
|
export { SidePanel } from './components/panel/side-panel/SidePanel';
|
|
27
27
|
export { SidePanelHeader } from './components/panel/side-panel-header/SidePanelHeader';
|
|
28
|
+
export { InputLabel } from './components/input-label/InputLabel';
|
|
29
|
+
export { EditableField } from './components/editable-field/EditableField';
|
|
28
30
|
export { ThemeProvider, useTheme } from './components/theme/ThemeContext';
|
package/dist/main.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { Button as m } from "./components/button/Button.js";
|
|
2
2
|
import { ButtonControlledScroll as x } from "./components/buttonControledScroll/ButtonControlledScroll.js";
|
|
3
3
|
import { Input as l } from "./components/input/Input.js";
|
|
4
|
-
import { Tabs as
|
|
5
|
-
import { IconButton as
|
|
4
|
+
import { Tabs as n } from "./components/tabs/Tabs.js";
|
|
5
|
+
import { IconButton as a } from "./components/icon-button/IconButton.js";
|
|
6
6
|
import { Tag as s } from "./components/tag/Tag.js";
|
|
7
|
-
import { Title as
|
|
7
|
+
import { Title as I } from "./components/title/Title.js";
|
|
8
8
|
import { TagCounter as S } from "./components/tag-counter/TagCounter.js";
|
|
9
|
-
import { Checkbox as
|
|
10
|
-
import { Tooltip as
|
|
11
|
-
import { Select as
|
|
12
|
-
import { Calendar as
|
|
13
|
-
import { Accordion as
|
|
14
|
-
import { AccordionItem as
|
|
15
|
-
import { Card as
|
|
16
|
-
import { Icon as
|
|
17
|
-
import { Menu as
|
|
18
|
-
import { Modal as
|
|
9
|
+
import { Checkbox as b } from "./components/checkbox/Checkbox.js";
|
|
10
|
+
import { Tooltip as L } from "./components/tooltip/Tooltip.js";
|
|
11
|
+
import { Select as B } from "./components/select/Select.js";
|
|
12
|
+
import { Calendar as P } from "./components/calendar/Calendar.js";
|
|
13
|
+
import { Accordion as F } from "./components/accordion/Accordion.js";
|
|
14
|
+
import { AccordionItem as k } from "./components/accordion/item/AccordionItem.js";
|
|
15
|
+
import { Card as w } from "./components/card/Card.js";
|
|
16
|
+
import { Icon as H } from "./components/icon/Icon.js";
|
|
17
|
+
import { Menu as q } from "./components/menu/Menu.js";
|
|
18
|
+
import { Modal as z } from "./components/modal/Modal.js";
|
|
19
19
|
import { SelectMultiItems as G } from "./components/select-multi-items/SelectMultiItems.js";
|
|
20
20
|
import { SelectFilterInputTags as K } from "./components/select-filter-input-tags/SelectFilterInputTags.js";
|
|
21
21
|
import { ListControls as Q } from "./components/list/list-controls/ListControls.js";
|
|
@@ -24,36 +24,40 @@ import { NestedListItem as W } from "./components/list/nested-list/item/NestedLi
|
|
|
24
24
|
import { Switch as Y } from "./components/switch/Switch.js";
|
|
25
25
|
import { SidePanel as _ } from "./components/panel/side-panel/SidePanel.js";
|
|
26
26
|
import { SidePanelHeader as oo } from "./components/panel/side-panel-header/SidePanelHeader.js";
|
|
27
|
-
import {
|
|
27
|
+
import { InputLabel as eo } from "./components/input-label/InputLabel.js";
|
|
28
|
+
import { EditableField as mo } from "./components/editable-field/EditableField.js";
|
|
29
|
+
import { ThemeProvider as xo, useTheme as fo } from "./components/theme/ThemeContext.js";
|
|
28
30
|
import './styles/Size.css';import './styles/index.css';/* empty css */
|
|
29
31
|
/* empty css */
|
|
30
32
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
F as Accordion,
|
|
34
|
+
k as AccordionItem,
|
|
33
35
|
m as Button,
|
|
34
36
|
x as ButtonControlledScroll,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
P as Calendar,
|
|
38
|
+
w as Card,
|
|
39
|
+
b as Checkbox,
|
|
40
|
+
mo as EditableField,
|
|
41
|
+
H as Icon,
|
|
42
|
+
a as IconButton,
|
|
40
43
|
l as Input,
|
|
44
|
+
eo as InputLabel,
|
|
41
45
|
Q as ListControls,
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
q as Menu,
|
|
47
|
+
z as Modal,
|
|
44
48
|
U as NestedList,
|
|
45
49
|
W as NestedListItem,
|
|
46
|
-
|
|
50
|
+
B as Select,
|
|
47
51
|
K as SelectFilterInputTags,
|
|
48
52
|
G as SelectMultiItems,
|
|
49
53
|
_ as SidePanel,
|
|
50
54
|
oo as SidePanelHeader,
|
|
51
55
|
Y as Switch,
|
|
52
|
-
|
|
56
|
+
n as Tabs,
|
|
53
57
|
s as Tag,
|
|
54
58
|
S as TagCounter,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
xo as ThemeProvider,
|
|
60
|
+
I as Title,
|
|
61
|
+
L as Tooltip,
|
|
62
|
+
fo as useTheme
|
|
59
63
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._editableField_1lhi9_30{width:100%;display:flex;justify-content:flex-start;align-items:start;flex-direction:column;gap:.25rem}._statiqueField_1lhi9_39{width:100%;border-radius:4px;border:1px solid var(--input-primary-default-border);padding:.5rem}
|
package/dist/styles/Input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
input{font-family:Urbanist,sans-serif;border:none;background-color:transparent;width:100%}input:focus{outline:none;box-shadow:none;border-color:transparent}input::placeholder{font-family:Urbanist,sans-serif;color:var(--input-primary-default-text)}._input-
|
|
1
|
+
input{font-family:Urbanist,sans-serif;border:none;background-color:transparent;width:100%}input:focus{outline:none;box-shadow:none;border-color:transparent}input::placeholder{font-family:Urbanist,sans-serif;color:var(--input-primary-default-text)}input:-webkit-autofill{box-shadow:0 0 0 1000px transparent inset!important;-webkit-text-fill-color:inherit!important;background-color:transparent!important}._input-style_xyzdj_52{font-family:Urbanist,sans-serif;border:1px solid var(--input-primary-default-border);color:var(--input-primary-default-text)}._input-style_xyzdj_52 input{color:var(--input-primary-actived-text)}._input-style_xyzdj_52 *{fill:var(--input-primary-default-icons)}._input-style-disabled_xyzdj_64{background-color:#0000000d;border-color:var(--input-primary-disabled-border);pointer-events:none}._input-style-disabled_xyzdj_64 input{color:var(--input-primary-disabled-text)}._input-style-disabled_xyzdj_64 *{fill:var(--input-primary-disabled-icons)}._input-style-focused_xyzdj_75{color:var(--input-primary-actived-text);border-color:var(--input-primary-actived-border)}._input-style-focused_xyzdj_75 *{fill:var(--icon-selector-button-default-icon)}._input-style-secondary_xyzdj_82{color:var(--input-secondary-default-text);border:1px solid var(--input-secondary-default-border);background:var(--input-secondary-default-background)}._input-style-secondary_xyzdj_82 input{color:var(--input-primary-actived-text)}._input-style-secondary_xyzdj_82 input::placeholder{color:var(--input-secondary-default-text)}._input-style-secondary_xyzdj_82 *{fill:var(--input-secondary-default-icons)}._input-style-ghost_xyzdj_96{border:none}._input-style-error_xyzdj_99{border-color:var(--input-primary-error-border);color:var(--input-primary-error-text)}._input-style-error_xyzdj_99 input::placeholder{color:var(--input-primary-error-text)}._input-style-error_xyzdj_99 *{fill:var(--input-primary-error-icons)}._input-style_xyzdj_52 ._input-container_xyzdj_109{position:relative;width:100%}._input-style-size-xl_xyzdj_113{padding:1rem;font-size:1.125em;line-height:28px;border-radius:8px;gap:.625rem}._input-style-size-xl_xyzdj_113 input{line-height:28px}._input-style-size-l_xyzdj_123{padding:.75rem;font-size:1em;line-height:24px;border-radius:8px;gap:.5rem}._input-style-size-l_xyzdj_123 input{line-height:24px}._input-style-size-m_xyzdj_133{padding:.5rem;font-size:.875em;line-height:20px;border-radius:4px;gap:.375rem}._input-style-size-m_xyzdj_133 input{line-height:20px}._input-style-size-s_xyzdj_143{padding:.375rem;font-size:.875em;line-height:16px;border-radius:4px;gap:.25rem}._input-style-size-s_xyzdj_143 input{line-height:16px}._input-style-radius_xyzdj_153{border-radius:50px}._flexHorizontalBetween_xyzdj_157{display:flex;justify-content:space-between;align-items:center;flex-direction:row}._flexHorizontal_xyzdj_157{display:flex;justify-content:flex-start;align-items:center;flex-direction:row}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._inputLabel_1x3uf_30{width:100%;display:flex;justify-content:flex-start;align-items:start;flex-direction:column;gap:.25rem}._fullWidth_1x3uf_39{width:100%}
|