@situaction/traq-ui-ste 1.1.18 → 1.1.19
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/accordion/Accordion.d.ts +2 -0
- package/dist/components/accordion/Accordion.js +23 -17
- package/dist/components/accordion/item/AccordionItem.d.ts +2 -0
- package/dist/components/accordion/item/AccordionItem.js +36 -27
- package/dist/components/calendar/Calendar.d.ts +4 -0
- package/dist/components/calendar/Calendar.js +435 -435
- package/dist/components/icon/Icon.d.ts +2 -1
- package/dist/components/menu/Menu.js +56 -56
- package/dist/components/panel/side-panel/SidePanel.js +34 -34
- package/dist/components/select/Select.js +36 -36
- package/dist/components/tabs/Tabs.js +51 -46
- package/dist/styles/Menu.css +1 -1
- package/dist/styles/Select.css +1 -1
- package/dist/styles/SidePanel.css +1 -1
- package/dist/styles/Tabs.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { IconProps as PhosphorIconProps } from '@phosphor-icons/react';
|
|
2
3
|
|
|
3
4
|
import * as PhosphorIcons from "@phosphor-icons/react";
|
|
4
|
-
export interface IconProps {
|
|
5
|
+
export interface IconProps extends Omit<PhosphorIconProps, "size" | "weight" | "color"> {
|
|
5
6
|
/** Name of the icon from @phosphor-icons/react */
|
|
6
7
|
icon: keyof typeof PhosphorIcons;
|
|
7
8
|
/** Size of the icon in pixels (default: 16) */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as c, useRef as
|
|
3
|
-
import { Button as
|
|
1
|
+
import { jsx as n, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { useState as c, useRef as M, useEffect as $ } from "react";
|
|
3
|
+
import { Button as b } from "../button/Button.js";
|
|
4
4
|
import '../../styles/Size.css';import '../../styles/index.css';import '../../styles/Menu.css';/* empty css */
|
|
5
|
-
import { IconButton as
|
|
6
|
-
import { Icon as
|
|
5
|
+
import { IconButton as u } from "../icon-button/IconButton.js";
|
|
6
|
+
import { Icon as w } from "../icon/Icon.js";
|
|
7
7
|
import { Modal as y } from "../modal/Modal.js";
|
|
8
8
|
import "../theme/ThemeContext.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
const O = "
|
|
10
|
+
const O = "_fullHeight_o2xi7_15", S = "_fullWidth_o2xi7_18", j = "_open_o2xi7_21", D = "_close_o2xi7_25", q = "_menuButton_o2xi7_29", A = "_closeIcon_o2xi7_37", F = "_label_o2xi7_42", G = "_textEllipsis_o2xi7_46", J = "_pointer_o2xi7_51", K = "_fullImg_o2xi7_54", Q = "_menuParams_o2xi7_60", T = "_line_o2xi7_66", U = "_borderRadiusM_o2xi7_73", X = "_menuItem_o2xi7_77", Y = "_flexVerticalBetweenStart_o2xi7_86", Z = "_flexHorizontalBetween_o2xi7_93", ee = "_flexVertical_o2xi7_86", oe = "_flexVerticalBetweenCenter_o2xi7_107", e = {
|
|
11
11
|
fullHeight: O,
|
|
12
12
|
fullWidth: S,
|
|
13
13
|
open: j,
|
|
@@ -25,92 +25,92 @@ const O = "_fullHeight_ikhx4_15", S = "_fullWidth_ikhx4_18", j = "_open_ikhx4_21
|
|
|
25
25
|
flexVerticalBetweenStart: Y,
|
|
26
26
|
flexHorizontalBetween: Z,
|
|
27
27
|
flexVertical: ee,
|
|
28
|
-
flexVerticalBetweenCenter:
|
|
29
|
-
}, fe = ({ menuItems: s = [], menuParams: r = [], shortLogo:
|
|
30
|
-
const [
|
|
31
|
-
|
|
32
|
-
d &&
|
|
28
|
+
flexVerticalBetweenCenter: oe
|
|
29
|
+
}, fe = ({ menuItems: s = [], menuParams: r = [], shortLogo: x, logo: m, isOpen: h, defaultOpen: N = !1, defaultSelectedId: d }) => {
|
|
30
|
+
const [t, p] = c(N ?? !1), [g, B] = c(d ?? (s.length > 0 ? s[0].id : null)), I = M(null), [V, _] = c(!1), [H, C] = c(!1), [k, E] = c(null), [z, R] = c({}), L = M(null);
|
|
31
|
+
$(() => {
|
|
32
|
+
d && B(d);
|
|
33
33
|
}, [d]);
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
const
|
|
37
|
-
|
|
34
|
+
const v = (o, i) => {
|
|
35
|
+
if (o.stopPropagation(), B(i), s) {
|
|
36
|
+
const l = s.find((a) => a.id === i);
|
|
37
|
+
l == null || l.onClick();
|
|
38
38
|
}
|
|
39
39
|
}, P = () => {
|
|
40
|
-
p(!
|
|
41
|
-
}, W = (
|
|
40
|
+
p(!t), _(!1);
|
|
41
|
+
}, W = (o) => {
|
|
42
42
|
var i;
|
|
43
43
|
if (r) {
|
|
44
|
-
const
|
|
45
|
-
if (!
|
|
46
|
-
if (
|
|
47
|
-
const a =
|
|
48
|
-
E(
|
|
44
|
+
const l = r.find((a) => a.id === o);
|
|
45
|
+
if (!l) return;
|
|
46
|
+
if (l.content) {
|
|
47
|
+
const a = t ? "200px" : "40px";
|
|
48
|
+
E(l.content), R({ ...l.position, left: a }), C(!0);
|
|
49
49
|
} else
|
|
50
|
-
(i =
|
|
50
|
+
(i = l.onClick) == null || i.call(l);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
}, [
|
|
53
|
+
return $(() => {
|
|
54
|
+
h && h(t);
|
|
55
|
+
}, [t]), /* @__PURE__ */ n("nav", { ref: I, children: /* @__PURE__ */ f("div", { className: `${e.flexVerticalBetweenStart} ${e.fullHeight} ${t ? e.open : e.close}`, children: [
|
|
56
56
|
/* @__PURE__ */ f("div", { className: e.fullWidth, children: [
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ n(
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
60
|
className: `${e.flexHorizontalBetween} ${e.pointer} ${e.textEllipsis}`,
|
|
61
61
|
onClick: () => P(),
|
|
62
|
-
children:
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
] }) : /* @__PURE__ */
|
|
62
|
+
children: t ? /* @__PURE__ */ f("div", { className: e.fullImg, children: [
|
|
63
|
+
m && /* @__PURE__ */ n("img", { src: m, alt: "Logo situaction" }),
|
|
64
|
+
/* @__PURE__ */ n(u, { mode: "ghost", size: "menu", children: /* @__PURE__ */ n(w, { icon: "CaretDoubleLeft", size: 16, weight: "duotone" }) })
|
|
65
|
+
] }) : /* @__PURE__ */ n(
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
68
|
className: e.closeIcon,
|
|
69
|
-
onMouseEnter: () =>
|
|
70
|
-
onMouseLeave: () =>
|
|
71
|
-
onClick: () => p(!
|
|
72
|
-
children:
|
|
69
|
+
onMouseEnter: () => _(!0),
|
|
70
|
+
onMouseLeave: () => _(!1),
|
|
71
|
+
onClick: () => p(!t),
|
|
72
|
+
children: V || !x ? /* @__PURE__ */ n(u, { mode: "ghost", size: "menu", children: /* @__PURE__ */ n(w, { icon: "CaretDoubleRight", size: 22, weight: "duotone" }) }) : /* @__PURE__ */ n("img", { src: x, alt: "Logo situaction" })
|
|
73
73
|
}
|
|
74
74
|
)
|
|
75
75
|
}
|
|
76
76
|
),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
77
|
+
/* @__PURE__ */ n("div", { className: e.menuItem, children: s && s.map((o) => t ? /* @__PURE__ */ n("div", { className: `${e.textEllipsis} ${e.menuButton}`, children: /* @__PURE__ */ n(
|
|
78
|
+
b,
|
|
79
79
|
{
|
|
80
|
-
mode:
|
|
81
|
-
label:
|
|
82
|
-
onClick: (i) =>
|
|
83
|
-
childrenLeft:
|
|
80
|
+
mode: g === o.id ? "secondary" : "ghost",
|
|
81
|
+
label: o.label,
|
|
82
|
+
onClick: (i) => v(i, o.id),
|
|
83
|
+
childrenLeft: o.icon
|
|
84
84
|
}
|
|
85
|
-
) }, `button-${
|
|
86
|
-
|
|
85
|
+
) }, `button-${o.id}`) : /* @__PURE__ */ n("div", { className: e.textEllipsis, children: /* @__PURE__ */ n(
|
|
86
|
+
u,
|
|
87
87
|
{
|
|
88
|
-
mode:
|
|
89
|
-
children:
|
|
90
|
-
onClick: (i) =>
|
|
88
|
+
mode: g === o.id ? "secondary" : "ghost",
|
|
89
|
+
children: o.icon,
|
|
90
|
+
onClick: (i) => v(i, o.id)
|
|
91
91
|
}
|
|
92
|
-
) }, `icon-${
|
|
93
|
-
/* @__PURE__ */
|
|
92
|
+
) }, `icon-${o.id}`)) }),
|
|
93
|
+
/* @__PURE__ */ n("div", { className: e.line })
|
|
94
94
|
] }),
|
|
95
95
|
/* @__PURE__ */ f("div", { className: `${e.menuParams} ${e.flexVerticalBetweenCenter}`, children: [
|
|
96
|
-
r && r.map((
|
|
96
|
+
r && r.map((o) => /* @__PURE__ */ n(
|
|
97
97
|
"div",
|
|
98
98
|
{
|
|
99
99
|
className: `${e.fullWidth} ${e.textEllipsis}`,
|
|
100
|
-
onClick: () => W(
|
|
101
|
-
children:
|
|
100
|
+
onClick: () => W(o.id),
|
|
101
|
+
children: t ? /* @__PURE__ */ n("div", { className: e.menuButton, children: /* @__PURE__ */ n(b, { mode: "ghost", label: o.label, childrenLeft: o.icon }, o.id) }) : /* @__PURE__ */ n(u, { mode: "ghost", children: o.icon })
|
|
102
102
|
},
|
|
103
|
-
`param-icon-${
|
|
103
|
+
`param-icon-${o.id}`
|
|
104
104
|
)),
|
|
105
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ n(
|
|
106
106
|
y,
|
|
107
107
|
{
|
|
108
108
|
ref: L,
|
|
109
109
|
className: e.borderRadiusM,
|
|
110
|
-
open:
|
|
111
|
-
onClose: () =>
|
|
110
|
+
open: H,
|
|
111
|
+
onClose: () => C(!1),
|
|
112
112
|
position: z,
|
|
113
|
-
children:
|
|
113
|
+
children: k
|
|
114
114
|
}
|
|
115
115
|
)
|
|
116
116
|
] })
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as _, useRef as
|
|
3
|
-
import '../../../styles/SidePanel.css';const x = "
|
|
4
|
-
panel:
|
|
5
|
-
openPanelBtn:
|
|
6
|
-
box:
|
|
7
|
-
panelLeft:
|
|
8
|
-
panelRight:
|
|
9
|
-
panelOpenedLeft:
|
|
10
|
-
panelOpenedRight:
|
|
11
|
-
panelHidden:
|
|
12
|
-
displayPanel:
|
|
13
|
-
hidePanel:
|
|
2
|
+
import { useState as _, useRef as R, useEffect as y } from "react";
|
|
3
|
+
import '../../../styles/SidePanel.css';const L = "_panel_lk5yy_1", x = "_openPanelBtn_lk5yy_9", v = "_box_lk5yy_18", b = "_panelLeft_lk5yy_29", B = "_panelRight_lk5yy_36", C = "_panelOpenedLeft_lk5yy_43", H = "_panelOpenedRight_lk5yy_47", S = "_panelHidden_lk5yy_51", E = "_displayPanel_lk5yy_55", N = "_hidePanel_lk5yy_59", e = {
|
|
4
|
+
panel: L,
|
|
5
|
+
openPanelBtn: x,
|
|
6
|
+
box: v,
|
|
7
|
+
panelLeft: b,
|
|
8
|
+
panelRight: B,
|
|
9
|
+
panelOpenedLeft: C,
|
|
10
|
+
panelOpenedRight: H,
|
|
11
|
+
panelHidden: S,
|
|
12
|
+
displayPanel: E,
|
|
13
|
+
hidePanel: N
|
|
14
14
|
}, $ = ({
|
|
15
|
-
children:
|
|
16
|
-
width:
|
|
17
|
-
left:
|
|
15
|
+
children: f,
|
|
16
|
+
width: a,
|
|
17
|
+
left: o = !0,
|
|
18
18
|
opened: n = !1,
|
|
19
19
|
onToggle: t
|
|
20
20
|
}) => {
|
|
21
|
-
const [
|
|
22
|
-
"--dynamic-left": `-${
|
|
23
|
-
"--dynamic-right": `-${
|
|
24
|
-
width:
|
|
25
|
-
},
|
|
21
|
+
const [l, s] = _(n), [u, i] = _(n), p = R(null), m = {
|
|
22
|
+
"--dynamic-left": `-${a}`,
|
|
23
|
+
"--dynamic-right": `-${a}`,
|
|
24
|
+
width: a
|
|
25
|
+
}, h = o ? e.panelLeft : e.panelRight, P = o ? e.panelOpenedLeft : e.panelOpenedRight, k = [
|
|
26
26
|
e.panel,
|
|
27
|
-
|
|
28
|
-
!
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
h,
|
|
28
|
+
!l && e.panelHidden,
|
|
29
|
+
l && P,
|
|
30
|
+
u ? e.displayPanel : e.hidePanel
|
|
31
31
|
].filter(Boolean).join(" ");
|
|
32
|
-
return
|
|
33
|
-
n ? (
|
|
34
|
-
}, [n]),
|
|
35
|
-
const
|
|
36
|
-
const c =
|
|
37
|
-
c.closest("[data-ignore-outside-click]") ||
|
|
32
|
+
return y(() => {
|
|
33
|
+
n ? (i(!0), setTimeout(() => s(!0), 10)) : (s(!1), setTimeout(() => i(!1), 300));
|
|
34
|
+
}, [n]), y(() => {
|
|
35
|
+
const d = (O) => {
|
|
36
|
+
const c = O.target;
|
|
37
|
+
c.closest("[data-ignore-outside-click]") || p.current && !p.current.contains(c) && (s(!1), t == null || t(!1), setTimeout(() => i(!1), 300));
|
|
38
38
|
};
|
|
39
|
-
if (
|
|
40
|
-
return document.addEventListener("mousedown",
|
|
41
|
-
document.removeEventListener("mousedown",
|
|
39
|
+
if (l)
|
|
40
|
+
return document.addEventListener("mousedown", d), () => {
|
|
41
|
+
document.removeEventListener("mousedown", d);
|
|
42
42
|
};
|
|
43
|
-
}, [
|
|
43
|
+
}, [l, t]), /* @__PURE__ */ r("div", { style: m, className: k, children: /* @__PURE__ */ r("div", { ref: p, className: e.box, children: f }) });
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
46
46
|
$ as SidePanel
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import { jsxs as u, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Button as
|
|
2
|
+
import { useState as p, useRef as w, useEffect as C } from "react";
|
|
3
|
+
import { Button as f } from "../button/Button.js";
|
|
4
4
|
import '../../styles/Size.css';import '../../styles/index.css';import '../../styles/Select.css';/* empty css */
|
|
5
|
-
import { IconButton as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Modal as
|
|
5
|
+
import { IconButton as k } from "../icon-button/IconButton.js";
|
|
6
|
+
import { Icon as i } from "../icon/Icon.js";
|
|
7
|
+
import { Modal as x } from "../modal/Modal.js";
|
|
8
8
|
import "../theme/ThemeContext.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
const
|
|
11
|
-
selectContainer:
|
|
12
|
-
selected:
|
|
13
|
-
children:
|
|
14
|
-
active:
|
|
15
|
-
selectList:
|
|
16
|
-
modal:
|
|
17
|
-
dropdownFadeIn:
|
|
18
|
-
itemLabel:
|
|
19
|
-
}, K = ({ selected:
|
|
20
|
-
const [n, o] =
|
|
10
|
+
const N = "_selectContainer_glqzp_40", S = "_selected_glqzp_43", R = "_children_glqzp_47", y = "_active_glqzp_64", B = "_selectList_glqzp_68", F = "_modal_glqzp_77", j = "_dropdownFadeIn_glqzp_1", U = "_itemLabel_glqzp_84", c = {
|
|
11
|
+
selectContainer: N,
|
|
12
|
+
selected: S,
|
|
13
|
+
children: R,
|
|
14
|
+
active: y,
|
|
15
|
+
selectList: B,
|
|
16
|
+
modal: F,
|
|
17
|
+
dropdownFadeIn: j,
|
|
18
|
+
itemLabel: U
|
|
19
|
+
}, K = ({ selected: a, size: s = "m", listItem: _, modeDisplay: r = "all", onSelect: h, positionOverride: d }) => {
|
|
20
|
+
const [n, o] = p(!1), g = w(null), [z, L] = p({ top: "calc(100% + 6px)" }), v = a ?? _[0], [t, b] = p(v);
|
|
21
21
|
C(() => {
|
|
22
|
-
|
|
23
|
-
}, [
|
|
24
|
-
d &&
|
|
22
|
+
a && b(a);
|
|
23
|
+
}, [a]), C(() => {
|
|
24
|
+
d && L(d);
|
|
25
25
|
}, [d]);
|
|
26
|
-
const
|
|
27
|
-
b(e), o(!1),
|
|
28
|
-
},
|
|
26
|
+
const q = (e) => {
|
|
27
|
+
b(e), o(!1), h && h(e);
|
|
28
|
+
}, I = () => {
|
|
29
29
|
const e = !!t.icon, m = !!t.label;
|
|
30
|
-
return t.icon && r === "icon" && e ? /* @__PURE__ */ l(
|
|
31
|
-
|
|
30
|
+
return t.icon && r === "icon" && e ? /* @__PURE__ */ l(k, { mode: "tertiary", size: s ?? "m", onClick: () => o(!n), children: /* @__PURE__ */ l(i, { icon: t.icon }) }) : t.label && r === "text" && m ? /* @__PURE__ */ l(
|
|
31
|
+
f,
|
|
32
32
|
{
|
|
33
33
|
mode: "tertiary",
|
|
34
34
|
label: t.label,
|
|
35
|
-
childrenRight: /* @__PURE__ */ l(
|
|
35
|
+
childrenRight: /* @__PURE__ */ l(i, { icon: n ? "CaretUp" : "CaretDown", size: 14, weight: "bold" }),
|
|
36
36
|
size: s ?? "m",
|
|
37
37
|
onClick: () => o(!n)
|
|
38
38
|
}
|
|
39
39
|
) : t.label && t.icon && r === "all" && (e || m) ? /* @__PURE__ */ l(
|
|
40
|
-
|
|
40
|
+
f,
|
|
41
41
|
{
|
|
42
42
|
mode: "tertiary",
|
|
43
43
|
label: m ? t.label : "",
|
|
44
44
|
size: s ?? "m",
|
|
45
|
-
childrenLeft: e && /* @__PURE__ */ l(
|
|
46
|
-
childrenRight: /* @__PURE__ */ l(
|
|
45
|
+
childrenLeft: e && /* @__PURE__ */ l(i, { icon: t.icon }),
|
|
46
|
+
childrenRight: /* @__PURE__ */ l(i, { icon: n ? "CaretUp" : "CaretDown", size: 14, weight: "bold" }),
|
|
47
47
|
onClick: () => o(!n)
|
|
48
48
|
}
|
|
49
49
|
) : /* @__PURE__ */ l(
|
|
50
|
-
|
|
50
|
+
f,
|
|
51
51
|
{
|
|
52
52
|
mode: "tertiary",
|
|
53
53
|
label: "Sélectionner",
|
|
@@ -57,22 +57,22 @@ const R = "_selectContainer_ak06l_40", y = "_selected_ak06l_43", z = "_children_
|
|
|
57
57
|
);
|
|
58
58
|
};
|
|
59
59
|
return /* @__PURE__ */ u("div", { className: c.selectContainer, children: [
|
|
60
|
-
|
|
60
|
+
I(),
|
|
61
61
|
/* @__PURE__ */ l(
|
|
62
|
-
|
|
62
|
+
x,
|
|
63
63
|
{
|
|
64
|
-
ref:
|
|
64
|
+
ref: g,
|
|
65
65
|
open: n,
|
|
66
66
|
onClose: () => o(!1),
|
|
67
67
|
className: c.modal,
|
|
68
|
-
position:
|
|
69
|
-
children: /* @__PURE__ */ l("div", { className: c.selectList, children:
|
|
68
|
+
position: z,
|
|
69
|
+
children: /* @__PURE__ */ l("div", { className: c.selectList, children: _.map((e) => /* @__PURE__ */ u(
|
|
70
70
|
"div",
|
|
71
71
|
{
|
|
72
72
|
className: `${c.children} ${e.value === t.value ? c.active : ""}`,
|
|
73
|
-
onClick: () =>
|
|
73
|
+
onClick: () => q(e),
|
|
74
74
|
children: [
|
|
75
|
-
e.icon && /* @__PURE__ */ l(
|
|
75
|
+
e.icon && /* @__PURE__ */ l(i, { icon: e.icon }),
|
|
76
76
|
e.label && /* @__PURE__ */ l("div", { className: c.itemLabel, children: e.label })
|
|
77
77
|
]
|
|
78
78
|
},
|
|
@@ -1,69 +1,74 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as v, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useRef as _, useEffect as d, useLayoutEffect as C } from "react";
|
|
3
3
|
import '../../styles/index.css';import '../../styles/Tabs.css';/* empty css */
|
|
4
|
-
import { Button as
|
|
5
|
-
import { IconButton as
|
|
6
|
-
const
|
|
7
|
-
"tab-container": "_tab-
|
|
8
|
-
"tab-container-button": "_tab-container-
|
|
9
|
-
"tab-container-icon": "_tab-container-
|
|
10
|
-
"tab-container-text": "_tab-container-
|
|
11
|
-
"tab-items": "_tab-
|
|
12
|
-
"tab-items-button": "_tab-items-
|
|
13
|
-
"selected-button": "_selected-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"flexHorizontal-
|
|
17
|
-
"flexHorizontal-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
4
|
+
import { Button as N } from "../button/Button.js";
|
|
5
|
+
import { IconButton as $ } from "../icon-button/IconButton.js";
|
|
6
|
+
const p = "_underline_12jm7_57", n = {
|
|
7
|
+
"tab-container": "_tab-container_12jm7_23",
|
|
8
|
+
"tab-container-button": "_tab-container-button_12jm7_27",
|
|
9
|
+
"tab-container-icon": "_tab-container-icon_12jm7_32",
|
|
10
|
+
"tab-container-text": "_tab-container-text_12jm7_32",
|
|
11
|
+
"tab-items": "_tab-items_12jm7_35",
|
|
12
|
+
"tab-items-button": "_tab-items-button_12jm7_39",
|
|
13
|
+
"selected-button": "_selected-button_12jm7_44",
|
|
14
|
+
"selected-text": "_selected-text_12jm7_50",
|
|
15
|
+
underline: p,
|
|
16
|
+
"flexHorizontal-center": "_flexHorizontal-center_12jm7_65",
|
|
17
|
+
"flexHorizontal-left": "_flexHorizontal-left_12jm7_71",
|
|
18
|
+
"flexHorizontal-right": "_flexHorizontal-right_12jm7_77"
|
|
19
|
+
}, E = ({ listItems: o, type: l, onTabSelect: x, defaultActiveTab: a = 0, position: h = "left" }) => {
|
|
20
|
+
const [r, b] = m(a), [j, g] = m({}), i = _(null), z = _(null), s = _(new Array(o.length).fill(null));
|
|
21
|
+
d(() => {
|
|
22
|
+
s.current = new Array(o.length).fill(null);
|
|
23
|
+
}, [o.length]);
|
|
24
|
+
const f = (t) => {
|
|
25
|
+
b(t), x(o[t]);
|
|
26
|
+
}, R = (t) => {
|
|
27
|
+
if (i.current && t) {
|
|
28
|
+
const e = t.getBoundingClientRect(), u = i.current.getBoundingClientRect();
|
|
29
|
+
g({
|
|
30
|
+
left: `${e.left - u.left}px`,
|
|
26
31
|
width: `${e.width}px`
|
|
27
32
|
});
|
|
28
33
|
}
|
|
29
|
-
},
|
|
30
|
-
n[`flexHorizontal-${
|
|
31
|
-
|
|
34
|
+
}, H = [
|
|
35
|
+
n[`flexHorizontal-${h}`],
|
|
36
|
+
l === "button" ? n["tab-items-button"] : n["tab-items"]
|
|
32
37
|
].filter(Boolean).join(" ");
|
|
33
38
|
return C(() => {
|
|
34
|
-
const t =
|
|
35
|
-
t &&
|
|
36
|
-
}, [
|
|
37
|
-
b(
|
|
38
|
-
}, [
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
const t = s.current[r];
|
|
40
|
+
t && R(t);
|
|
41
|
+
}, [r, o.length]), d(() => {
|
|
42
|
+
b(a);
|
|
43
|
+
}, [a]), /* @__PURE__ */ v("div", { className: `tab ${n["tab-container"]} ${n[`tab-container-${l}`]}`, ref: i, children: [
|
|
44
|
+
/* @__PURE__ */ c("div", { className: H, children: o.map((t, e) => /* @__PURE__ */ c(
|
|
40
45
|
"div",
|
|
41
46
|
{
|
|
42
|
-
ref: (
|
|
43
|
-
className:
|
|
44
|
-
children:
|
|
45
|
-
|
|
47
|
+
ref: (u) => s.current[e] = u,
|
|
48
|
+
className: l === "button" && e === r ? n["selected-button"] : "",
|
|
49
|
+
children: l === "icon" ? /* @__PURE__ */ c(
|
|
50
|
+
$,
|
|
46
51
|
{
|
|
47
52
|
mode: "icon",
|
|
48
53
|
size: "s",
|
|
49
|
-
selected: e ===
|
|
50
|
-
onClick: () =>
|
|
54
|
+
selected: e === r,
|
|
55
|
+
onClick: () => f(e),
|
|
51
56
|
children: t
|
|
52
57
|
}
|
|
53
|
-
) : /* @__PURE__ */ r(
|
|
54
|
-
|
|
58
|
+
) : /* @__PURE__ */ c("div", { className: e === r ? n["selected-text"] : void 0, children: /* @__PURE__ */ c(
|
|
59
|
+
N,
|
|
55
60
|
{
|
|
56
61
|
size: "s",
|
|
57
62
|
label: t,
|
|
58
|
-
mode:
|
|
59
|
-
selected: e ===
|
|
60
|
-
onClick: () =>
|
|
63
|
+
mode: l === "text" ? "text" : "ghost",
|
|
64
|
+
selected: e === r,
|
|
65
|
+
onClick: () => f(e)
|
|
61
66
|
}
|
|
62
|
-
)
|
|
67
|
+
) })
|
|
63
68
|
},
|
|
64
69
|
e
|
|
65
70
|
)) }),
|
|
66
|
-
|
|
71
|
+
l !== "button" && /* @__PURE__ */ c("div", { ref: z, className: n.underline, style: j })
|
|
67
72
|
] });
|
|
68
73
|
};
|
|
69
74
|
export {
|
package/dist/styles/Menu.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
nav{height:100vh;width:fit-content;padding:0 var(--spacing-xs-3) var(--spacing-xs-3);flex-shrink:1;transition:.3s;box-sizing:border-box;z-index:5}nav .
|
|
1
|
+
nav{height:100vh;width:fit-content;padding:0 var(--spacing-xs-3) var(--spacing-xs-3);flex-shrink:1;transition:.3s;box-sizing:border-box;z-index:5}nav ._fullHeight_o2xi7_15{height:100%}nav ._fullWidth_o2xi7_18{width:100%}nav ._open_o2xi7_21{width:200px;transition:all ease .3s}nav ._close_o2xi7_25{width:40px;transition:all ease-out .3s}nav ._menuButton_o2xi7_29{width:100%}nav ._menuButton_o2xi7_29 button{padding:var(--spacing-xs-4);width:inherit!important;justify-content:flex-start!important}nav ._closeIcon_o2xi7_37{height:30px;cursor:pointer;margin:.875rem 0}nav ._label_o2xi7_42{letter-spacing:.72px;font-weight:600}nav ._textEllipsis_o2xi7_46{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}nav ._pointer_o2xi7_51{cursor:pointer}nav ._fullImg_o2xi7_54{margin:.875rem 0;display:flex;justify-content:space-between;width:100%}nav ._menuParams_o2xi7_60{gap:.125rem;position:relative;width:100%}._line_o2xi7_66{height:1px;width:100%;background-color:var(--general-border-window);margin:var(--spacing-xs-3) 0}._borderRadiusM_o2xi7_73{border-radius:6px}._menuItem_o2xi7_77{gap:.25rem;width:100%;display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}._flexVerticalBetweenStart_o2xi7_86{display:flex;justify-content:space-between;align-items:start;flex-direction:column}._flexHorizontalBetween_o2xi7_93{display:flex;justify-content:space-between;align-items:center;flex-direction:row}._flexVertical_o2xi7_86{display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}._flexVerticalBetweenCenter_o2xi7_107{display:flex;justify-content:space-between;align-items:center;flex-direction:column}
|
package/dist/styles/Select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._selectContainer_glqzp_40{position:relative}._selectContainer_glqzp_40 ._selected_glqzp_43{background:var(--button-tertiary-pressed-background);border-radius:var(--spacing-xs-6)}._selectContainer_glqzp_40 ._children_glqzp_47{padding:var(--spacing-xs-6) var(--spacing-xs-5);box-sizing:border-box;width:100%;gap:.5rem;cursor:pointer;font-style:normal;line-height:1.25rem;display:flex;justify-content:flex-start;align-items:center;flex-direction:row}._selectContainer_glqzp_40 ._children_glqzp_47:hover{background:var(--dropdown-line-background-hover);border-radius:var(--spacing-xs-6)}._selectContainer_glqzp_40 ._children_glqzp_47._active_glqzp_64{background:var(--button-tertiary-pressed-background);border-radius:var(--spacing-xs-6)}._selectContainer_glqzp_40 ._selectList_glqzp_68{max-height:200px;overflow-y:auto;gap:.125rem;display:flex;justify-content:flex-start;align-items:stretch;flex-direction:column}._selectContainer_glqzp_40 ._modal_glqzp_77{box-shadow:0 4px 4px 0 var(--shadow-color-lowest);border-radius:4px;padding:.25rem;animation:_dropdownFadeIn_glqzp_1 .2s ease-out;transform-origin:top left}._selectContainer_glqzp_40 ._itemLabel_glqzp_84{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes _dropdownFadeIn_glqzp_1{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._panel_lk5yy_1{position:absolute;z-index:10;top:0;transition:.3s;height:100%;box-sizing:border-box}._panel_lk5yy_1 ._openPanelBtn_lk5yy_9{width:40px;height:70px;background-color:var(--background-secondary);color:#fff;cursor:pointer;top:50%;transform:translateY(-50%)}._panel_lk5yy_1 ._box_lk5yy_18{box-shadow:0 10px 10px #0003;height:100%;box-sizing:border-box;position:relative;background-color:var(--background-primary);border-top:1px solid var(--general-border-window);border-left:1px solid var(--general-border-window);border-bottom:1px solid var(--general-border-window)}._panelLeft_lk5yy_29{left:var(--dynamic-left)}._panelLeft_lk5yy_29>div{border-radius:0 var(--spacing-xs) var(--spacing-xs) 0}._panelRight_lk5yy_36{right:var(--dynamic-right)}._panelRight_lk5yy_36>div{border-radius:var(--spacing-xs) 0 0 var(--spacing-xs)}._panelOpenedLeft_lk5yy_43{left:0}._panelOpenedRight_lk5yy_47{right:0}._panelHidden_lk5yy_51{visibility:hidden}._displayPanel_lk5yy_55{display:block}._hidePanel_lk5yy_59{display:none}
|
package/dist/styles/Tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._tab-
|
|
1
|
+
._tab-container_12jm7_23{position:relative;line-height:1.25rem}._tab-container-button_12jm7_27{border-radius:.375rem;border:1px solid var(--tabs-button-border);background:var(--tabs-button-background)}._tab-container-icon_12jm7_32,._tab-container-text_12jm7_32{border-bottom:1px solid var(--tabs-line-border)}._tab-items_12jm7_35{gap:2.25rem;padding:.625rem .125rem}._tab-items-button_12jm7_39{gap:.25rem;padding:.125rem}._selected-button_12jm7_44{border:1px solid var(--button-tertiary-default-border);background:var(--tabs-button-background-button);border-radius:.25rem}._selected-text_12jm7_50>button{font-weight:600!important}._selected-text_12jm7_50>button:hover{background-color:transparent!important}._underline_12jm7_57{position:absolute;bottom:0;height:2px;background-color:var(--tabs-cell-active-border);transition:all .3s ease}._flexHorizontal-center_12jm7_65{display:flex;justify-content:center;align-items:center;flex-direction:row}._flexHorizontal-left_12jm7_71{display:flex;justify-content:flex-start;align-items:center;flex-direction:row}._flexHorizontal-right_12jm7_77{display:flex;justify-content:flex-end;align-items:center;flex-direction:row}
|