@situaction/traq-ui-ste 1.2.34 → 1.2.36
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/list/list-controls/ListControls.js +8 -7
- package/dist/components/list/nested-list/NestedList.js +7 -6
- package/dist/components/list/nested-list/item/NestedListItem.js +8 -7
- package/dist/components/menu/Menu.d.ts +4 -0
- package/dist/components/menu/Menu.js +55 -52
- package/dist/components/panel/side-panel-header/SidePanelHeader.js +5 -4
- package/dist/components/select/Select.js +3 -2
- package/dist/components/select-filter-input-tags/SelectFilterInputTags.js +5 -4
- package/dist/components/select-multi-items/SelectMultiItems.js +7 -6
- package/dist/components/switch/Switch.js +3 -2
- package/dist/components/tooltip/Tooltip.d.ts +2 -2
- package/dist/components/tooltip/Tooltip.js +83 -35
- package/dist/index-CxdrhfJv.mjs +19066 -0
- package/dist/styles/Tooltip.css +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Button as p } from "../../button/Button.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../icon-button/IconButton.js";
|
|
5
5
|
import { Checkbox as _ } from "../../checkbox/Checkbox.js";
|
|
6
|
+
import "../../../index-CxdrhfJv.mjs";
|
|
6
7
|
import "../../accordion/Accordion.js";
|
|
7
8
|
import { Icon as a } from "../../icon/Icon.js";
|
|
8
9
|
import "../../modal/Modal.js";
|
|
@@ -15,19 +16,19 @@ const u = "_list_1nihg_6", f = "_children_1nihg_29", g = "_selected_1nihg_43", k
|
|
|
15
16
|
children: f,
|
|
16
17
|
selected: g,
|
|
17
18
|
reset: k
|
|
18
|
-
},
|
|
19
|
+
}, X = ({ listChildren: l, handleItemClick: d, selectedItems: m, onReset: r, labelButtonReset: n }) => /* @__PURE__ */ c("div", { className: i.list, children: [
|
|
19
20
|
/* @__PURE__ */ e("div", { children: l.map((t, h) => {
|
|
20
21
|
if (t.key == null) return null;
|
|
21
|
-
const s = t.key,
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
const s = t.key, o = m.includes(s);
|
|
23
|
+
return /* @__PURE__ */ c(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
|
-
className: `${
|
|
26
|
+
className: `${o ? i.selected : ""} ${i.children}`,
|
|
26
27
|
children: [
|
|
27
28
|
/* @__PURE__ */ e(
|
|
28
29
|
_,
|
|
29
30
|
{
|
|
30
|
-
checked:
|
|
31
|
+
checked: o,
|
|
31
32
|
onChange: () => d(s)
|
|
32
33
|
}
|
|
33
34
|
),
|
|
@@ -48,5 +49,5 @@ const u = "_list_1nihg_6", f = "_children_1nihg_29", g = "_selected_1nihg_43", k
|
|
|
48
49
|
) })
|
|
49
50
|
] });
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
X as ListControls
|
|
52
53
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { NestedListItem as l } from "./item/NestedListItem.js";
|
|
3
3
|
import { Button as c } from "../../button/Button.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../icon-button/IconButton.js";
|
|
6
|
+
import "../../../index-CxdrhfJv.mjs";
|
|
6
7
|
import "../../accordion/Accordion.js";
|
|
7
8
|
import { Icon as a } from "../../icon/Icon.js";
|
|
8
9
|
import "../../modal/Modal.js";
|
|
@@ -10,13 +11,13 @@ import "../../carousel/Carousel.js";
|
|
|
10
11
|
import "../../carousel/FadeCarousel.js";
|
|
11
12
|
import "../../theme/ThemeContext.js";
|
|
12
13
|
import '../../../styles/Size.css';import '../../../styles/NestedList.css';/* empty css */
|
|
13
|
-
const h = "_nestedlist_7rnd3_6", _ = "_reset_7rnd3_18",
|
|
14
|
+
const h = "_nestedlist_7rnd3_6", _ = "_reset_7rnd3_18", e = {
|
|
14
15
|
nestedlist: h,
|
|
15
16
|
reset: _
|
|
16
|
-
},
|
|
17
|
-
s.map((n,
|
|
18
|
-
r &&
|
|
17
|
+
}, X = ({ items: s, align: o = "right", onReset: r, children: m, labelButtonReset: i }) => /* @__PURE__ */ d("div", { className: e.nestedlist, children: [
|
|
18
|
+
s.map((n, p) => /* @__PURE__ */ t(l, { ...n, align: o ?? "right", children: m }, p)),
|
|
19
|
+
r && i && /* @__PURE__ */ t("div", { className: e.reset, children: /* @__PURE__ */ t(c, { mode: "ghost", label: i, onClick: r, childrenLeft: /* @__PURE__ */ t(a, { icon: "FunnelX" }) }) })
|
|
19
20
|
] });
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
X as NestedList
|
|
22
23
|
};
|
|
@@ -3,6 +3,7 @@ import { useState as g, useRef as u, useLayoutEffect as z } from "react";
|
|
|
3
3
|
import "../../../button/Button.js";
|
|
4
4
|
import "../../../icon-button/IconButton.js";
|
|
5
5
|
import { TagCounter as B } from "../../../tag-counter/TagCounter.js";
|
|
6
|
+
import "../../../../index-CxdrhfJv.mjs";
|
|
6
7
|
import "../../../accordion/Accordion.js";
|
|
7
8
|
import { Icon as l } from "../../../icon/Icon.js";
|
|
8
9
|
import { Modal as L } from "../../../modal/Modal.js";
|
|
@@ -15,7 +16,7 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
15
16
|
items: $,
|
|
16
17
|
textSmall: j,
|
|
17
18
|
modal: v
|
|
18
|
-
},
|
|
19
|
+
}, G = ({
|
|
19
20
|
icon: a,
|
|
20
21
|
title: h,
|
|
21
22
|
numberSelect: i,
|
|
@@ -23,13 +24,13 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
23
24
|
onClick: m,
|
|
24
25
|
align: e = "right"
|
|
25
26
|
}) => {
|
|
26
|
-
const [c,
|
|
27
|
+
const [c, p] = g(!1), r = u(null), o = u(null), [x, C] = g({
|
|
27
28
|
top: "0px"
|
|
28
29
|
});
|
|
29
30
|
z(() => {
|
|
30
|
-
var
|
|
31
|
+
var d;
|
|
31
32
|
if (r.current && o.current) {
|
|
32
|
-
const N = o.current.getBoundingClientRect(), f = r.current.getBoundingClientRect().width, M = ((
|
|
33
|
+
const N = o.current.getBoundingClientRect(), f = r.current.getBoundingClientRect().width, M = ((d = o.current.parentElement) == null ? void 0 : d.getBoundingClientRect().top) || 0;
|
|
33
34
|
C({
|
|
34
35
|
top: `${N.top - M}px`,
|
|
35
36
|
...e === "right" ? { right: `-${f + 6}px` } : { left: `-${f + 6}px` }
|
|
@@ -37,7 +38,7 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
37
38
|
}
|
|
38
39
|
}, [c, e]);
|
|
39
40
|
const R = () => {
|
|
40
|
-
|
|
41
|
+
p(!0), m && m();
|
|
41
42
|
};
|
|
42
43
|
return /* @__PURE__ */ n(w, { children: [
|
|
43
44
|
/* @__PURE__ */ n(
|
|
@@ -63,7 +64,7 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
63
64
|
ref: r,
|
|
64
65
|
className: s.modal,
|
|
65
66
|
open: c,
|
|
66
|
-
onClose: () =>
|
|
67
|
+
onClose: () => p(!1),
|
|
67
68
|
position: x,
|
|
68
69
|
children: _
|
|
69
70
|
}
|
|
@@ -71,5 +72,5 @@ const S = "_nestedlist_2r2ga_6", $ = "_items_2r2ga_21", j = "_textSmall_2r2ga_28
|
|
|
71
72
|
] });
|
|
72
73
|
};
|
|
73
74
|
export {
|
|
74
|
-
|
|
75
|
+
G as NestedListItem
|
|
75
76
|
};
|
|
@@ -12,6 +12,8 @@ export interface MenuItem {
|
|
|
12
12
|
label: string;
|
|
13
13
|
/** Callback function executed when the item is clicked */
|
|
14
14
|
onClick: () => void;
|
|
15
|
+
/** Disabled button */
|
|
16
|
+
disabled?: boolean;
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
17
19
|
* Interface for a parameterized menu item that can open a modal or execute a custom action.
|
|
@@ -32,6 +34,8 @@ export interface MenuParam {
|
|
|
32
34
|
bottom: string;
|
|
33
35
|
left: string;
|
|
34
36
|
};
|
|
37
|
+
/** Disabled button */
|
|
38
|
+
disabled?: boolean;
|
|
35
39
|
}
|
|
36
40
|
/**
|
|
37
41
|
* Props for the Menu component, which renders a vertical navigation menu with actions and optional modal parameters.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import { useState as c, useRef as M, useEffect as B } from "react";
|
|
3
3
|
import { Button as $ } from "../button/Button.js";
|
|
4
4
|
import { IconButton as f } from "../icon-button/IconButton.js";
|
|
5
|
+
import "../../index-CxdrhfJv.mjs";
|
|
5
6
|
import "../accordion/Accordion.js";
|
|
6
7
|
import { Icon as N } from "../icon/Icon.js";
|
|
7
8
|
import { Modal as W } from "../modal/Modal.js";
|
|
@@ -9,7 +10,7 @@ import "../carousel/Carousel.js";
|
|
|
9
10
|
import "../carousel/FadeCarousel.js";
|
|
10
11
|
import "../theme/ThemeContext.js";
|
|
11
12
|
import '../../styles/Size.css';import '../../styles/Menu.css';/* empty css */
|
|
12
|
-
const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21", D = "_close_11eub_25", q = "_menuButton_11eub_29", A = "_closeIcon_11eub_37", F = "_textEllipsis_11eub_47", G = "_pointer_11eub_52", J = "_fullImg_11eub_55", K = "_menuParams_11eub_61", Q = "_line_11eub_67", T = "_borderRadiusM_11eub_74", U = "_menuItem_11eub_78", X = "_longLogo_11eub_87", Y = "_flexVerticalBetweenStart_11eub_92", Z = "_flexHorizontalCenter_11eub_106", ee = "_flexVerticalBetweenCenter_11eub_121",
|
|
13
|
+
const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21", D = "_close_11eub_25", q = "_menuButton_11eub_29", A = "_closeIcon_11eub_37", F = "_textEllipsis_11eub_47", G = "_pointer_11eub_52", J = "_fullImg_11eub_55", K = "_menuParams_11eub_61", Q = "_line_11eub_67", T = "_borderRadiusM_11eub_74", U = "_menuItem_11eub_78", X = "_longLogo_11eub_87", Y = "_flexVerticalBetweenStart_11eub_92", Z = "_flexHorizontalCenter_11eub_106", ee = "_flexVerticalBetweenCenter_11eub_121", o = {
|
|
13
14
|
fullHeight: y,
|
|
14
15
|
fullWidth: O,
|
|
15
16
|
open: j,
|
|
@@ -27,87 +28,89 @@ const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21
|
|
|
27
28
|
flexVerticalBetweenStart: Y,
|
|
28
29
|
flexHorizontalCenter: Z,
|
|
29
30
|
flexVerticalBetweenCenter: ee
|
|
30
|
-
},
|
|
31
|
-
const [
|
|
31
|
+
}, _e = ({ menuItems: i = [], menuParams: d = [], shortLogo: m, logo: p, isOpen: h, defaultOpen: I = !1, selectedId: r }) => {
|
|
32
|
+
const [t, b] = c(I ?? !1), [g, x] = c(r ?? (i.length > 0 ? i[0].id : null)), w = M(null), [H, _] = c(!1), [L, C] = c(!1), [k, E] = c(null), [z, R] = c({}), V = M(null);
|
|
32
33
|
B(() => {
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
const v = (
|
|
36
|
-
if (
|
|
37
|
-
const
|
|
38
|
-
|
|
34
|
+
r != null && x(r);
|
|
35
|
+
}, [r]);
|
|
36
|
+
const v = (e, s) => {
|
|
37
|
+
if (e.stopPropagation(), x(s), i) {
|
|
38
|
+
const n = i.find((a) => a.id === s);
|
|
39
|
+
n == null || n.onClick();
|
|
39
40
|
}
|
|
40
41
|
}, S = () => {
|
|
41
|
-
|
|
42
|
-
}, P = (
|
|
43
|
-
var
|
|
44
|
-
if (
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
47
|
-
if (
|
|
48
|
-
const
|
|
49
|
-
E(
|
|
42
|
+
b(!t), _(!1);
|
|
43
|
+
}, P = (e) => {
|
|
44
|
+
var s;
|
|
45
|
+
if (d) {
|
|
46
|
+
const n = d.find((a) => a.id === e);
|
|
47
|
+
if (!n) return;
|
|
48
|
+
if (n.content) {
|
|
49
|
+
const a = t ? "200px" : "40px";
|
|
50
|
+
E(n.content), R({ ...n.position, left: a }), C(!0);
|
|
50
51
|
} else
|
|
51
|
-
(
|
|
52
|
+
(s = n.onClick) == null || s.call(n);
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
55
|
return B(() => {
|
|
55
|
-
h && h(
|
|
56
|
-
}, [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
56
|
+
h && h(t);
|
|
57
|
+
}, [t]), /* @__PURE__ */ l("nav", { ref: w, children: /* @__PURE__ */ u("div", { className: `${o.flexVerticalBetweenStart} ${o.fullHeight} ${t ? o.open : o.close}`, children: [
|
|
58
|
+
/* @__PURE__ */ u("div", { className: o.fullWidth, children: [
|
|
59
|
+
/* @__PURE__ */ l(
|
|
59
60
|
"div",
|
|
60
61
|
{
|
|
61
|
-
className: `${
|
|
62
|
+
className: `${o.flexHorizontalCenter} ${o.pointer} ${o.textEllipsis}`,
|
|
62
63
|
onClick: () => S(),
|
|
63
|
-
children:
|
|
64
|
-
p && /* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
] }) : /* @__PURE__ */
|
|
64
|
+
children: t ? /* @__PURE__ */ u("div", { className: o.fullImg, children: [
|
|
65
|
+
p && /* @__PURE__ */ l("img", { className: o.longLogo, src: p, alt: "Logo situaction" }),
|
|
66
|
+
/* @__PURE__ */ l(f, { mode: "ghost", size: "menu", children: /* @__PURE__ */ l(N, { icon: "CaretDoubleLeft", size: 16, weight: "duotone" }) })
|
|
67
|
+
] }) : /* @__PURE__ */ l(
|
|
67
68
|
"div",
|
|
68
69
|
{
|
|
69
|
-
className:
|
|
70
|
+
className: o.closeIcon,
|
|
70
71
|
onMouseEnter: () => _(!0),
|
|
71
72
|
onMouseLeave: () => _(!1),
|
|
72
|
-
onClick: () =>
|
|
73
|
-
children: H || !m ? /* @__PURE__ */
|
|
73
|
+
onClick: () => b(!t),
|
|
74
|
+
children: H || !m ? /* @__PURE__ */ l(f, { mode: "ghost", size: "menu", children: /* @__PURE__ */ l(N, { icon: "CaretDoubleRight", size: 22, weight: "duotone" }) }) : /* @__PURE__ */ l("img", { src: m, alt: "Logo situaction" })
|
|
74
75
|
}
|
|
75
76
|
)
|
|
76
77
|
}
|
|
77
78
|
),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ l("div", { className: o.menuItem, children: i && i.map((e) => t ? /* @__PURE__ */ l("div", { className: `${o.textEllipsis} ${o.menuButton}`, children: /* @__PURE__ */ l(
|
|
79
80
|
$,
|
|
80
81
|
{
|
|
81
|
-
mode:
|
|
82
|
-
label:
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
mode: e.disabled ? "ghost" : g === e.id ? "secondary" : "ghost",
|
|
83
|
+
label: e.label,
|
|
84
|
+
disabled: e.disabled,
|
|
85
|
+
onClick: (s) => v(s, e.id),
|
|
86
|
+
childrenLeft: e.icon
|
|
85
87
|
}
|
|
86
|
-
) }, `button-${
|
|
88
|
+
) }, `button-${e.id}`) : /* @__PURE__ */ l("div", { className: o.textEllipsis, children: /* @__PURE__ */ l(
|
|
87
89
|
f,
|
|
88
90
|
{
|
|
89
|
-
mode:
|
|
90
|
-
children:
|
|
91
|
-
|
|
91
|
+
mode: e.disabled ? "ghost" : g === e.id ? "secondary" : "ghost",
|
|
92
|
+
children: e.icon,
|
|
93
|
+
disabled: e.disabled,
|
|
94
|
+
onClick: (s) => v(s, e.id)
|
|
92
95
|
}
|
|
93
|
-
) }, `icon-${
|
|
94
|
-
/* @__PURE__ */
|
|
96
|
+
) }, `icon-${e.id}`)) }),
|
|
97
|
+
/* @__PURE__ */ l("div", { className: o.line })
|
|
95
98
|
] }),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
|
|
99
|
+
/* @__PURE__ */ u("div", { className: `${o.menuParams} ${o.flexVerticalBetweenCenter}`, children: [
|
|
100
|
+
d && d.map((e) => /* @__PURE__ */ l(
|
|
98
101
|
"div",
|
|
99
102
|
{
|
|
100
|
-
className: `${
|
|
101
|
-
onClick: () => P(
|
|
102
|
-
children:
|
|
103
|
+
className: `${o.fullWidth} ${o.textEllipsis}`,
|
|
104
|
+
onClick: () => P(e.id),
|
|
105
|
+
children: t ? /* @__PURE__ */ l("div", { className: o.menuButton, children: /* @__PURE__ */ l($, { mode: "ghost", label: e.label, disabled: e.disabled, childrenLeft: e.icon }, e.id) }) : /* @__PURE__ */ l(f, { mode: "ghost", children: e.icon, disabled: e.disabled })
|
|
103
106
|
},
|
|
104
|
-
`param-icon-${
|
|
107
|
+
`param-icon-${e.id}`
|
|
105
108
|
)),
|
|
106
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ l(
|
|
107
110
|
W,
|
|
108
111
|
{
|
|
109
112
|
ref: V,
|
|
110
|
-
className:
|
|
113
|
+
className: o.borderRadiusM,
|
|
111
114
|
open: L,
|
|
112
115
|
onClose: () => C(!1),
|
|
113
116
|
position: z,
|
|
@@ -118,5 +121,5 @@ const y = "_fullHeight_11eub_15", O = "_fullWidth_11eub_18", j = "_open_11eub_21
|
|
|
118
121
|
] }) });
|
|
119
122
|
};
|
|
120
123
|
export {
|
|
121
|
-
|
|
124
|
+
_e as Menu
|
|
122
125
|
};
|
|
@@ -2,6 +2,7 @@ import { jsxs as C, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import "../../button/Button.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { IconButton as i } from "../../icon-button/IconButton.js";
|
|
5
|
+
import "../../../index-CxdrhfJv.mjs";
|
|
5
6
|
import "../../accordion/Accordion.js";
|
|
6
7
|
import { Icon as t } from "../../icon/Icon.js";
|
|
7
8
|
import "../../modal/Modal.js";
|
|
@@ -9,11 +10,11 @@ import "../../carousel/Carousel.js";
|
|
|
9
10
|
import "../../carousel/FadeCarousel.js";
|
|
10
11
|
import "../../theme/ThemeContext.js";
|
|
11
12
|
import '../../../styles/Size.css';import '../../../styles/SidePanelHeader.css';/* empty css */
|
|
12
|
-
const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13",
|
|
13
|
+
const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13", p = "_title_72g7b_20", r = {
|
|
13
14
|
sidePanelHeader: c,
|
|
14
15
|
buttonArrow: m,
|
|
15
|
-
title:
|
|
16
|
-
},
|
|
16
|
+
title: p
|
|
17
|
+
}, H = ({
|
|
17
18
|
title: s,
|
|
18
19
|
icon: o,
|
|
19
20
|
onClickBack: L,
|
|
@@ -75,5 +76,5 @@ const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13", h = "_title_7
|
|
|
75
76
|
)
|
|
76
77
|
] });
|
|
77
78
|
export {
|
|
78
|
-
|
|
79
|
+
H as SidePanelHeader
|
|
79
80
|
};
|
|
@@ -3,6 +3,7 @@ import { useState as y, useRef as v, useEffect as d } from "react";
|
|
|
3
3
|
import { Button as W } from "../button/Button.js";
|
|
4
4
|
import { Input as H } from "../input/Input.js";
|
|
5
5
|
import { IconButton as J } from "../icon-button/IconButton.js";
|
|
6
|
+
import "../../index-CxdrhfJv.mjs";
|
|
6
7
|
import "../accordion/Accordion.js";
|
|
7
8
|
import { Icon as _ } from "../icon/Icon.js";
|
|
8
9
|
import { Modal as Q } from "../modal/Modal.js";
|
|
@@ -19,7 +20,7 @@ const X = "_selectContainer_133eb_54", Y = "_children_133eb_61", Z = "_active_13
|
|
|
19
20
|
itemLabel: ee,
|
|
20
21
|
searchWrapper: te,
|
|
21
22
|
noResults: ne
|
|
22
|
-
},
|
|
23
|
+
}, ve = ({
|
|
23
24
|
selected: k,
|
|
24
25
|
size: g = "m",
|
|
25
26
|
listItem: h,
|
|
@@ -215,5 +216,5 @@ const X = "_selectContainer_133eb_54", Y = "_children_133eb_61", Z = "_active_13
|
|
|
215
216
|
] });
|
|
216
217
|
};
|
|
217
218
|
export {
|
|
218
|
-
|
|
219
|
+
ve as Select
|
|
219
220
|
};
|
|
@@ -3,15 +3,16 @@ import "../button/Button.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { Input as p } from "../input/Input.js";
|
|
5
5
|
import "../icon-button/IconButton.js";
|
|
6
|
+
import "../../index-CxdrhfJv.mjs";
|
|
6
7
|
import "../accordion/Accordion.js";
|
|
7
8
|
import "../modal/Modal.js";
|
|
8
9
|
import "../carousel/Carousel.js";
|
|
9
10
|
import "../carousel/FadeCarousel.js";
|
|
10
11
|
import "../theme/ThemeContext.js";
|
|
11
12
|
import '../../styles/Size.css';import '../../styles/SelectFilterInputTags.css';/* empty css */
|
|
12
|
-
const
|
|
13
|
-
listTagSelect:
|
|
14
|
-
},
|
|
13
|
+
const m = "_listTagSelect_2v3fb_6", a = {
|
|
14
|
+
listTagSelect: m
|
|
15
|
+
}, _ = ({ children: o, inputValue: r, handleInputChange: s, handleKeyDown: i }) => /* @__PURE__ */ e("div", { className: a.listTagSelect, children: /* @__PURE__ */ l("div", { children: [
|
|
15
16
|
o,
|
|
16
17
|
/* @__PURE__ */ e("div", { className: "flexAutoSize", children: /* @__PURE__ */ e(
|
|
17
18
|
p,
|
|
@@ -30,5 +31,5 @@ const a = "_listTagSelect_2v3fb_6", c = {
|
|
|
30
31
|
) })
|
|
31
32
|
] }) });
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
_ as SelectFilterInputTags
|
|
34
35
|
};
|
|
@@ -4,6 +4,7 @@ import { n as v, s as C, a as x } from "../../X.es-BEJ-zMPl.mjs";
|
|
|
4
4
|
import { Button as M } from "../button/Button.js";
|
|
5
5
|
import "../icon-button/IconButton.js";
|
|
6
6
|
import { TagCounter as w } from "../tag-counter/TagCounter.js";
|
|
7
|
+
import "../../index-CxdrhfJv.mjs";
|
|
7
8
|
import "../accordion/Accordion.js";
|
|
8
9
|
import { Modal as y } from "../modal/Modal.js";
|
|
9
10
|
import "../carousel/Carousel.js";
|
|
@@ -14,16 +15,16 @@ const N = "_relative_w7e9a_6", R = "_tagCounter_w7e9a_10", b = "_modal_w7e9a_18"
|
|
|
14
15
|
relative: N,
|
|
15
16
|
tagCounter: R,
|
|
16
17
|
modal: b
|
|
17
|
-
},
|
|
18
|
+
}, E = ({
|
|
18
19
|
label: a,
|
|
19
20
|
iconButton: l,
|
|
20
21
|
selectedCount: t = 0,
|
|
21
|
-
onClearSelection:
|
|
22
|
-
children:
|
|
22
|
+
onClearSelection: m,
|
|
23
|
+
children: n,
|
|
23
24
|
size: c = "m",
|
|
24
25
|
align: p = "right"
|
|
25
26
|
}) => {
|
|
26
|
-
const [e, i] = _(!1), d = h(null), f = () => i(!1), g = t > 0 ? /* @__PURE__ */ o(v, { onClick:
|
|
27
|
+
const [e, i] = _(!1), d = h(null), f = () => i(!1), g = t > 0 ? /* @__PURE__ */ o(v, { onClick: m }) : e ? /* @__PURE__ */ o(C, {}) : /* @__PURE__ */ o(x, {}), u = t > 0 ? "secondary" : "tertiary";
|
|
27
28
|
return /* @__PURE__ */ s("div", { className: r.relative, children: [
|
|
28
29
|
/* @__PURE__ */ o(
|
|
29
30
|
M,
|
|
@@ -39,9 +40,9 @@ const N = "_relative_w7e9a_6", R = "_tagCounter_w7e9a_10", b = "_modal_w7e9a_18"
|
|
|
39
40
|
onClick: () => i(!e)
|
|
40
41
|
}
|
|
41
42
|
),
|
|
42
|
-
/* @__PURE__ */ o(y, { ref: d, open: e, onClose: f, className: r.modal, position: { top: "calc(100% + 6px)", ...p === "right" ? { left: "0" } : { right: "0" } }, children:
|
|
43
|
+
/* @__PURE__ */ o(y, { ref: d, open: e, onClose: f, className: r.modal, position: { top: "calc(100% + 6px)", ...p === "right" ? { left: "0" } : { right: "0" } }, children: n })
|
|
43
44
|
] });
|
|
44
45
|
};
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
E as SelectMultiItems
|
|
47
48
|
};
|
|
@@ -2,6 +2,7 @@ import { jsxs as n, jsx as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as $, useEffect as b } from "react";
|
|
3
3
|
import "../button/Button.js";
|
|
4
4
|
import { IconButton as k } from "../icon-button/IconButton.js";
|
|
5
|
+
import "../../index-CxdrhfJv.mjs";
|
|
5
6
|
import "../accordion/Accordion.js";
|
|
6
7
|
import { Icon as g } from "../icon/Icon.js";
|
|
7
8
|
import "../modal/Modal.js";
|
|
@@ -20,7 +21,7 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
20
21
|
wrapper: E,
|
|
21
22
|
button: R,
|
|
22
23
|
active: T
|
|
23
|
-
},
|
|
24
|
+
}, P = ({
|
|
24
25
|
size: i = "m",
|
|
25
26
|
variant: w = "classic",
|
|
26
27
|
checked: l,
|
|
@@ -92,5 +93,5 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
92
93
|
] });
|
|
93
94
|
};
|
|
94
95
|
export {
|
|
95
|
-
|
|
96
|
+
P as Switch
|
|
96
97
|
};
|
|
@@ -15,8 +15,8 @@ export type TooltipProps = {
|
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* Tooltip component that shows additional information when hovering over an element.
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* Renders via a portal to escape overflow/scroll containers, and automatically
|
|
19
|
+
* adjusts position to stay within the viewport.
|
|
20
20
|
*/
|
|
21
21
|
export declare const Tooltip: FC<TooltipProps>;
|
|
22
22
|
export default Tooltip;
|
|
@@ -1,44 +1,92 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
tooltip:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { jsxs as S, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useRef as x, useCallback as L, useLayoutEffect as T } from "react";
|
|
3
|
+
import { r as j } from "../../index-CxdrhfJv.mjs";
|
|
4
|
+
import '../../styles/Tooltip.css';const I = "_tooltip_ymexm_30", y = {
|
|
5
|
+
"tooltip-container": "_tooltip-container_ymexm_30",
|
|
6
|
+
tooltip: I
|
|
7
|
+
}, W = {
|
|
8
|
+
"xs-5": 6,
|
|
9
|
+
"xs-3": 10,
|
|
10
|
+
xs: 14,
|
|
11
|
+
"m-1": 18
|
|
12
|
+
}, r = 8, N = ({ children: v, content: k, position: u = "top", gap: M = "xs-5", padding: _ = "xs-5" }) => {
|
|
13
|
+
const [l, g] = w(!1), [E, h] = w({ visibility: "hidden" }), n = x(null), d = x(null), o = W[M] ?? 6, f = L((t, e) => {
|
|
14
|
+
const a = window.innerWidth, m = window.innerHeight;
|
|
15
|
+
let s, i;
|
|
16
|
+
switch (u) {
|
|
17
|
+
case "top":
|
|
18
|
+
s = t.top - e.height - o, i = t.left + t.width / 2 - e.width / 2;
|
|
19
|
+
break;
|
|
20
|
+
case "topLeft":
|
|
21
|
+
s = t.top - e.height - o, i = t.right - e.width;
|
|
22
|
+
break;
|
|
23
|
+
case "topRight":
|
|
24
|
+
s = t.top - e.height - o, i = t.left;
|
|
25
|
+
break;
|
|
26
|
+
case "bottom":
|
|
27
|
+
s = t.bottom + o, i = t.left + t.width / 2 - e.width / 2;
|
|
28
|
+
break;
|
|
29
|
+
case "bottomLeft":
|
|
30
|
+
s = t.bottom + o, i = t.right - e.width;
|
|
31
|
+
break;
|
|
32
|
+
case "bottomRight":
|
|
33
|
+
s = t.bottom + o, i = t.left;
|
|
34
|
+
break;
|
|
35
|
+
case "left":
|
|
36
|
+
s = t.top + t.height / 2 - e.height / 2, i = t.left - e.width - o;
|
|
37
|
+
break;
|
|
38
|
+
case "right":
|
|
39
|
+
s = t.top + t.height / 2 - e.height / 2, i = t.right + o;
|
|
40
|
+
break;
|
|
41
|
+
default:
|
|
42
|
+
s = t.top - e.height - o, i = t.left + t.width / 2 - e.width / 2;
|
|
43
|
+
}
|
|
44
|
+
return i = Math.max(r, Math.min(i, a - e.width - r)), s = Math.max(r, Math.min(s, m - e.height - r)), { position: "fixed", top: s, left: i, visibility: "visible" };
|
|
45
|
+
}, [u, o]);
|
|
46
|
+
T(() => {
|
|
47
|
+
const t = [
|
|
48
|
+
"--background-tooltip",
|
|
49
|
+
"--general-border-window",
|
|
50
|
+
"--general-text-icons",
|
|
51
|
+
"--shadow-color-minimal"
|
|
52
|
+
];
|
|
53
|
+
if (l && n.current && d.current) {
|
|
54
|
+
const e = getComputedStyle(n.current), a = t.reduce((i, b) => {
|
|
55
|
+
const p = e.getPropertyValue(b).trim();
|
|
56
|
+
return p && (i[b] = p), i;
|
|
57
|
+
}, {}), m = n.current.getBoundingClientRect(), s = d.current.getBoundingClientRect();
|
|
58
|
+
h({ ...f(m, s), ...a });
|
|
59
|
+
}
|
|
60
|
+
}, [l, f]);
|
|
61
|
+
const C = () => {
|
|
62
|
+
h({ visibility: "hidden" }), g(!0);
|
|
63
|
+
}, V = [y.tooltip, "labelMedium", "fontWeight-600"].join(" "), P = { "--dynamic-padding": `var(--spacing-${_})` };
|
|
64
|
+
return /* @__PURE__ */ S(
|
|
28
65
|
"div",
|
|
29
66
|
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
onMouseEnter:
|
|
33
|
-
onMouseLeave: () =>
|
|
67
|
+
ref: n,
|
|
68
|
+
className: y["tooltip-container"],
|
|
69
|
+
onMouseEnter: C,
|
|
70
|
+
onMouseLeave: () => g(!1),
|
|
34
71
|
children: [
|
|
35
|
-
|
|
36
|
-
|
|
72
|
+
v,
|
|
73
|
+
l && j.createPortal(
|
|
74
|
+
/* @__PURE__ */ c(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
ref: d,
|
|
78
|
+
className: V,
|
|
79
|
+
style: { ...P, ...E },
|
|
80
|
+
children: k
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
document.body
|
|
84
|
+
)
|
|
37
85
|
]
|
|
38
86
|
}
|
|
39
87
|
);
|
|
40
88
|
};
|
|
41
89
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
90
|
+
N as Tooltip,
|
|
91
|
+
N as default
|
|
44
92
|
};
|