lawgic-dev-kit 0.22.9 → 0.22.13
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/_virtual/index2.js +2 -3
- package/dist/_virtual/index3.js +3 -3
- package/dist/_virtual/index4.js +3 -5
- package/dist/_virtual/index5.js +5 -2
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/atoms/PasswordInput/PasswordInput.js +12 -12
- package/dist/components/atoms/SelectInput/SelectInput.js +5 -5
- package/dist/components/atoms/TextInput/TextInput.js +19 -19
- package/dist/components/atoms/UncontrolledSelector/UncontrolledSelector.js +7 -7
- package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.js +10 -10
- package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.js +11 -11
- package/dist/components/molecules/SingleSelectDropdown/SingleSelectDropdown.js +14 -14
- package/dist/components/molecules/Tooltip/Tooltip.d.ts +2 -1
- package/dist/components/molecules/Tooltip/Tooltip.js +12 -12
- package/dist/lawgic-dev-kit.css +1 -1
- package/dist/lawgic-dev-kit.umd.js +9 -9
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/toposort/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +3 -3
- package/dist/src/components/molecules/Tooltip/Tooltip.d.ts +2 -1
- package/package.json +1 -1
package/dist/_virtual/index2.js
CHANGED
package/dist/_virtual/index3.js
CHANGED
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var t = r();
|
|
4
|
-
const s = /* @__PURE__ */ o(t);
|
|
1
|
+
import { __require as r } from "../node_modules/tiny-case/index.js";
|
|
2
|
+
var a = r();
|
|
5
3
|
export {
|
|
6
|
-
|
|
4
|
+
a as t
|
|
7
5
|
};
|
package/dist/_virtual/index5.js
CHANGED
package/dist/_virtual/index6.js
CHANGED
package/dist/_virtual/index7.js
CHANGED
|
@@ -11,28 +11,28 @@ const V = ({
|
|
|
11
11
|
placeholder: p,
|
|
12
12
|
className: x = "",
|
|
13
13
|
disabled: t = !1,
|
|
14
|
-
size:
|
|
14
|
+
size: d = "md",
|
|
15
15
|
leftSide: a
|
|
16
16
|
}) => {
|
|
17
17
|
const {
|
|
18
|
-
field: { value: n = "", onChange:
|
|
18
|
+
field: { value: n = "", onChange: m, ref: g, onBlur: f },
|
|
19
19
|
fieldState: { error: o }
|
|
20
20
|
} = w({ name: e, control: c }), [s, h] = y(!1), { t: u } = N(), l = {
|
|
21
21
|
sm: {
|
|
22
22
|
container: "px-16 py-8",
|
|
23
|
-
text: "text-
|
|
24
|
-
label: "text-
|
|
23
|
+
text: "text-14",
|
|
24
|
+
label: "text-14",
|
|
25
25
|
error: "text-sm",
|
|
26
26
|
gap: "gap-8"
|
|
27
27
|
},
|
|
28
28
|
md: {
|
|
29
29
|
container: "p-16",
|
|
30
|
-
text: "text-
|
|
31
|
-
label: "text-
|
|
30
|
+
text: "text-body-m",
|
|
31
|
+
label: "text-body-m",
|
|
32
32
|
error: "text-sm",
|
|
33
33
|
gap: "gap-8"
|
|
34
34
|
}
|
|
35
|
-
}[
|
|
35
|
+
}[d];
|
|
36
36
|
return /* @__PURE__ */ r.jsxs(
|
|
37
37
|
"label",
|
|
38
38
|
{
|
|
@@ -42,7 +42,7 @@ const V = ({
|
|
|
42
42
|
/* @__PURE__ */ r.jsx(
|
|
43
43
|
"h6",
|
|
44
44
|
{
|
|
45
|
-
className: `text-gray-600 font-600 group ${o && "!text-red-500"} ${l.label} ${t && "text-gray-300"}`,
|
|
45
|
+
className: `text-gray-600 font-600 leading-none group ${o && "!text-red-500"} ${l.label} ${t && "text-gray-300"}`,
|
|
46
46
|
children: i
|
|
47
47
|
}
|
|
48
48
|
),
|
|
@@ -80,10 +80,10 @@ const V = ({
|
|
|
80
80
|
disabled: t,
|
|
81
81
|
placeholder: p,
|
|
82
82
|
value: n,
|
|
83
|
-
onChange: (b) =>
|
|
84
|
-
onBlur:
|
|
85
|
-
ref:
|
|
86
|
-
className: `group bg-transparent w-full h-full font-600 placeholder:font-600 ${l.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none`
|
|
83
|
+
onChange: (b) => m(b.target.value),
|
|
84
|
+
onBlur: f,
|
|
85
|
+
ref: g,
|
|
86
|
+
className: `group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${l.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none`
|
|
87
87
|
}
|
|
88
88
|
),
|
|
89
89
|
/* @__PURE__ */ r.jsx(
|
|
@@ -57,16 +57,16 @@ const me = ({
|
|
|
57
57
|
const { t: o } = Q(), [s, j] = $(!1), [v, C] = $(""), [l, S] = $(i || null), w = z(null), O = z(null), r = {
|
|
58
58
|
sm: {
|
|
59
59
|
container: "px-16 py-8",
|
|
60
|
-
text: "text-
|
|
61
|
-
label: "text-
|
|
60
|
+
text: "text-14",
|
|
61
|
+
label: "text-14",
|
|
62
62
|
error: "text-sm",
|
|
63
63
|
gap: "gap-8",
|
|
64
64
|
icon: "w-12 h-12"
|
|
65
65
|
},
|
|
66
66
|
md: {
|
|
67
67
|
container: "p-16",
|
|
68
|
-
text: "text-
|
|
69
|
-
label: "text-
|
|
68
|
+
text: "text-body-m",
|
|
69
|
+
label: "text-body-m",
|
|
70
70
|
error: "text-sm",
|
|
71
71
|
gap: "gap-8",
|
|
72
72
|
icon: "w-16 h-16"
|
|
@@ -115,7 +115,7 @@ const me = ({
|
|
|
115
115
|
onClick: V
|
|
116
116
|
});
|
|
117
117
|
return /* @__PURE__ */ t.jsxs("div", { className: `relative flex flex-col ${r.gap} ${f}`, children: [
|
|
118
|
-
d && /* @__PURE__ */ t.jsx("h6", { className: `text-gray-600 font-600 ${n ? "!text-red-500" : ""} ${r.label}`, children: d }),
|
|
118
|
+
d && /* @__PURE__ */ t.jsx("h6", { className: `text-gray-600 font-600 leading-none ${n ? "!text-red-500" : ""} ${r.label}`, children: d }),
|
|
119
119
|
/* @__PURE__ */ t.jsxs(
|
|
120
120
|
"div",
|
|
121
121
|
{
|
|
@@ -4,46 +4,46 @@ import { useTheme as v } from "../../../hooks/useTheme.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
const S = ({
|
|
6
6
|
label: c,
|
|
7
|
-
control:
|
|
7
|
+
control: d,
|
|
8
8
|
name: e,
|
|
9
|
-
placeholder:
|
|
10
|
-
className:
|
|
9
|
+
placeholder: x,
|
|
10
|
+
className: i = "",
|
|
11
11
|
disabled: t = !1,
|
|
12
12
|
leftSide: a,
|
|
13
13
|
rightSide: n,
|
|
14
|
-
translateKey:
|
|
14
|
+
translateKey: p = "",
|
|
15
15
|
size: g = "md",
|
|
16
|
-
...
|
|
16
|
+
...b
|
|
17
17
|
}) => {
|
|
18
18
|
const {
|
|
19
|
-
field: { value: u = "", onChange:
|
|
19
|
+
field: { value: u = "", onChange: m, ref: f, onBlur: h },
|
|
20
20
|
fieldState: { error: r }
|
|
21
|
-
} = w({ name: e, control:
|
|
21
|
+
} = w({ name: e, control: d }), { t: s } = v(), o = {
|
|
22
22
|
sm: {
|
|
23
23
|
container: "px-16 py-8",
|
|
24
|
-
text: "text-
|
|
25
|
-
label: "text-
|
|
24
|
+
text: "text-14",
|
|
25
|
+
label: "text-14",
|
|
26
26
|
error: "text-sm",
|
|
27
27
|
gap: "gap-8"
|
|
28
28
|
},
|
|
29
29
|
md: {
|
|
30
30
|
container: "p-16",
|
|
31
|
-
text: "text-
|
|
32
|
-
label: "text-
|
|
31
|
+
text: "text-body-m",
|
|
32
|
+
label: "text-body-m",
|
|
33
33
|
error: "text-sm",
|
|
34
34
|
gap: "gap-8"
|
|
35
35
|
}
|
|
36
|
-
}[g],
|
|
36
|
+
}[g], y = s(e), $ = s(p);
|
|
37
37
|
return /* @__PURE__ */ l.jsxs(
|
|
38
38
|
"label",
|
|
39
39
|
{
|
|
40
|
-
className: `flex flex-col group select-none ${o.gap} ${t && "cursor-not-allowed"} ${
|
|
40
|
+
className: `flex flex-col group select-none ${o.gap} ${t && "cursor-not-allowed"} ${i}`,
|
|
41
41
|
htmlFor: e,
|
|
42
42
|
children: [
|
|
43
43
|
/* @__PURE__ */ l.jsx(
|
|
44
44
|
"h6",
|
|
45
45
|
{
|
|
46
|
-
className: `text-gray-600 font-600 group ${r && "text-red-500!"} ${o.label} ${t && "text-gray-300"}`,
|
|
46
|
+
className: `text-gray-600 font-600 leading-none group ${r && "text-red-500!"} ${o.label} ${t && "text-gray-300"}`,
|
|
47
47
|
children: c
|
|
48
48
|
}
|
|
49
49
|
),
|
|
@@ -76,20 +76,20 @@ const S = ({
|
|
|
76
76
|
id: e,
|
|
77
77
|
name: e,
|
|
78
78
|
disabled: t,
|
|
79
|
-
placeholder:
|
|
79
|
+
placeholder: x,
|
|
80
80
|
value: u,
|
|
81
|
-
onChange: (j) =>
|
|
81
|
+
onChange: (j) => m(j.target.value),
|
|
82
82
|
onBlur: h,
|
|
83
83
|
ref: f,
|
|
84
|
-
className: `group bg-transparent w-full h-full font-600 placeholder:font-600 ${o.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden`,
|
|
85
|
-
...
|
|
84
|
+
className: `group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${o.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden`,
|
|
85
|
+
...b
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
88
|
n && n
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
|
-
(r == null ? void 0 : r.message) && /* @__PURE__ */ l.jsx("h4", { className: `font-500 text-red-500 leading-none ${o.error}`, children: s(r.message, { x:
|
|
92
|
+
(r == null ? void 0 : r.message) && /* @__PURE__ */ l.jsx("h4", { className: `font-500 text-red-500 leading-none ${o.error}`, children: s(r.message, { x: $ || y }) })
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
95
|
);
|
|
@@ -22,21 +22,21 @@ const me = ({
|
|
|
22
22
|
const [a, m] = N(!1), [l, p] = N(""), h = $(null), T = $(null), x = r.find((e) => e.value === s), n = {
|
|
23
23
|
sm: {
|
|
24
24
|
container: "px-16 py-8",
|
|
25
|
-
text: "text-
|
|
26
|
-
label: "text-
|
|
25
|
+
text: "text-14",
|
|
26
|
+
label: "text-14",
|
|
27
27
|
error: "text-sm",
|
|
28
28
|
gap: "gap-8",
|
|
29
29
|
icon: "w-12 h-12",
|
|
30
|
-
option: "text-
|
|
30
|
+
option: "text-14"
|
|
31
31
|
},
|
|
32
32
|
md: {
|
|
33
33
|
container: "p-16",
|
|
34
|
-
text: "text-
|
|
35
|
-
label: "text-
|
|
34
|
+
text: "text-body-m",
|
|
35
|
+
label: "text-body-m",
|
|
36
36
|
error: "text-sm",
|
|
37
37
|
gap: "gap-8",
|
|
38
38
|
icon: "w-16 h-16",
|
|
39
|
-
option: "text-
|
|
39
|
+
option: "text-body-m"
|
|
40
40
|
}
|
|
41
41
|
}[R], v = g(() => r.map((e) => ({
|
|
42
42
|
...e,
|
|
@@ -105,7 +105,7 @@ const me = ({
|
|
|
105
105
|
y && /* @__PURE__ */ t.jsx(
|
|
106
106
|
"h6",
|
|
107
107
|
{
|
|
108
|
-
className: `text-gray-600 font-600 group ${i ? "!text-red-500" : ""} ${n.label} ${u ? "text-gray-300" : ""}`,
|
|
108
|
+
className: `text-gray-600 font-600 leading-none group ${i ? "!text-red-500" : ""} ${n.label} ${u ? "text-gray-300" : ""}`,
|
|
109
109
|
children: y
|
|
110
110
|
}
|
|
111
111
|
),
|
|
@@ -8,10 +8,10 @@ const w = ({
|
|
|
8
8
|
name: t,
|
|
9
9
|
error: l,
|
|
10
10
|
placeholder: i,
|
|
11
|
-
className:
|
|
11
|
+
className: d = "",
|
|
12
12
|
disabled: e = !1,
|
|
13
13
|
disabledInput: s = !1,
|
|
14
|
-
size:
|
|
14
|
+
size: g = "md",
|
|
15
15
|
leftSide: a,
|
|
16
16
|
rightSide: c,
|
|
17
17
|
...b
|
|
@@ -19,29 +19,29 @@ const w = ({
|
|
|
19
19
|
const { t: x } = h(), r = {
|
|
20
20
|
sm: {
|
|
21
21
|
container: "px-16 py-8",
|
|
22
|
-
text: "text-
|
|
23
|
-
label: "text-
|
|
22
|
+
text: "text-14",
|
|
23
|
+
label: "text-14",
|
|
24
24
|
error: "text-sm",
|
|
25
25
|
gap: "gap-8"
|
|
26
26
|
},
|
|
27
27
|
md: {
|
|
28
28
|
container: "p-16",
|
|
29
|
-
text: "text-
|
|
30
|
-
label: "text-
|
|
29
|
+
text: "text-body-m",
|
|
30
|
+
label: "text-body-m",
|
|
31
31
|
error: "text-14",
|
|
32
32
|
gap: "gap-8"
|
|
33
33
|
}
|
|
34
|
-
}[
|
|
34
|
+
}[g];
|
|
35
35
|
return /* @__PURE__ */ o.jsxs(
|
|
36
36
|
"label",
|
|
37
37
|
{
|
|
38
|
-
className: `flex flex-col group select-none ${r.gap} ${e && "cursor-not-allowed"} ${
|
|
38
|
+
className: `flex flex-col group select-none ${r.gap} ${e && "cursor-not-allowed"} ${d}`,
|
|
39
39
|
htmlFor: t,
|
|
40
40
|
children: [
|
|
41
41
|
/* @__PURE__ */ o.jsx(
|
|
42
42
|
"h6",
|
|
43
43
|
{
|
|
44
|
-
className: `text-gray-600 font-600 group ${l && "!text-red-500"} ${r.label} ${e && "text-gray-300"}`,
|
|
44
|
+
className: `text-gray-600 font-600 leading-none group ${l && "!text-red-500"} ${r.label} ${e && "text-gray-300"}`,
|
|
45
45
|
children: u
|
|
46
46
|
}
|
|
47
47
|
),
|
|
@@ -74,7 +74,7 @@ const w = ({
|
|
|
74
74
|
onChange: (f) => {
|
|
75
75
|
p(f.target.value);
|
|
76
76
|
},
|
|
77
|
-
className: `group bg-transparent w-full h-full font-600 placeholder:font-600 ${r.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none ${s && "pointer-events-none !select-none !caret-transparent"}`
|
|
77
|
+
className: `group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${r.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none ${s && "pointer-events-none !select-none !caret-transparent"}`
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
80
|
c && c
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import E, { useState as
|
|
2
|
+
import E, { useState as j, useRef as v, useCallback as _ } from "react";
|
|
3
3
|
import { useFloating as q, useClick as H, useDismiss as Y, useInteractions as A, useTransitionStyles as G } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
|
|
4
4
|
import "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
5
5
|
import "../../../_virtual/lodash.js";
|
|
@@ -25,25 +25,25 @@ const fe = ({
|
|
|
25
25
|
size: C = "md"
|
|
26
26
|
}) => {
|
|
27
27
|
var y;
|
|
28
|
-
const [l, h] =
|
|
28
|
+
const [l, h] = j(!1), [i, f] = j(""), $ = v(null), z = v(null), o = {
|
|
29
29
|
sm: {
|
|
30
30
|
container: "px-16 py-8",
|
|
31
|
-
text: "text-
|
|
32
|
-
label: "text-
|
|
31
|
+
text: "text-14",
|
|
32
|
+
label: "text-14",
|
|
33
33
|
icon: "w-12 h-12",
|
|
34
34
|
checkboxSize: 16,
|
|
35
35
|
gap: "gap-8",
|
|
36
|
-
searchText: "text-
|
|
36
|
+
searchText: "text-14",
|
|
37
37
|
searchIcon: "size-12"
|
|
38
38
|
},
|
|
39
39
|
md: {
|
|
40
40
|
container: "p-16",
|
|
41
|
-
text: "text-
|
|
42
|
-
label: "text-
|
|
41
|
+
text: "text-body-m",
|
|
42
|
+
label: "text-body-m",
|
|
43
43
|
icon: "w-16 h-16",
|
|
44
44
|
checkboxSize: 20,
|
|
45
45
|
gap: "gap-8",
|
|
46
|
-
searchText: "text-
|
|
46
|
+
searchText: "text-body-m",
|
|
47
47
|
searchIcon: "size-16"
|
|
48
48
|
}
|
|
49
49
|
}[C], { x: S, y: L, strategy: M, refs: x, context: d } = q({
|
|
@@ -82,7 +82,7 @@ const fe = ({
|
|
|
82
82
|
onClick: () => !r && h(!l)
|
|
83
83
|
});
|
|
84
84
|
return /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col select-none ${o.gap} ${r ? "cursor-not-allowed" : ""} ${N}`, children: [
|
|
85
|
-
p && /* @__PURE__ */ e.jsx("h6", { className: `text-gray-600 font-600 ${o.label} ${r ? "text-gray-300" : ""}`, children: p }),
|
|
85
|
+
p && /* @__PURE__ */ e.jsx("h6", { className: `text-gray-600 font-600 leading-none ${o.label} ${r ? "text-gray-300" : ""}`, children: p }),
|
|
86
86
|
/* @__PURE__ */ e.jsxs(
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
@@ -151,7 +151,7 @@ const fe = ({
|
|
|
151
151
|
)
|
|
152
152
|
] }) }),
|
|
153
153
|
/* @__PURE__ */ e.jsx("div", { className: "max-h-[450px] overflow-y-auto", children: g.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "py-4", children: g.map((t) => {
|
|
154
|
-
var a, c,
|
|
154
|
+
var a, c, b;
|
|
155
155
|
const s = n.includes(t.value);
|
|
156
156
|
return /* @__PURE__ */ e.jsxs(E.Fragment, { children: [
|
|
157
157
|
t.dividerBefore && /* @__PURE__ */ e.jsx("div", { className: "px-16 py-8", children: /* @__PURE__ */ e.jsx("hr", { className: "border-t border-gray-200" }) }),
|
|
@@ -175,7 +175,7 @@ const fe = ({
|
|
|
175
175
|
{
|
|
176
176
|
className: `flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((a = t.colors) == null ? void 0 : a.bgColor) || ""} ${((c = t.colors) == null ? void 0 : c.textColor) || ""}`,
|
|
177
177
|
children: [
|
|
178
|
-
((
|
|
178
|
+
((b = t.colors) == null ? void 0 : b.dotColor) && /* @__PURE__ */ e.jsx(
|
|
179
179
|
"span",
|
|
180
180
|
{
|
|
181
181
|
className: "size-6 rounded-full flex-shrink-0",
|
|
@@ -29,25 +29,25 @@ const je = ({
|
|
|
29
29
|
const [n, i] = N(!1), [l, c] = N(""), R = w(null), B = w(null), s = {
|
|
30
30
|
sm: {
|
|
31
31
|
container: "px-16 py-8",
|
|
32
|
-
text: "text-
|
|
33
|
-
label: "text-
|
|
32
|
+
text: "text-14",
|
|
33
|
+
label: "text-14",
|
|
34
34
|
icon: "w-12 h-12",
|
|
35
35
|
checkboxSize: 16,
|
|
36
36
|
gap: "gap-8",
|
|
37
|
-
searchText: "text-
|
|
37
|
+
searchText: "text-14",
|
|
38
38
|
searchIcon: "size-12"
|
|
39
39
|
},
|
|
40
40
|
md: {
|
|
41
41
|
container: "p-16",
|
|
42
|
-
text: "text-
|
|
43
|
-
label: "text-
|
|
42
|
+
text: "text-body-m",
|
|
43
|
+
label: "text-body-m",
|
|
44
44
|
icon: "w-16 h-16",
|
|
45
45
|
checkboxSize: 20,
|
|
46
46
|
gap: "gap-8",
|
|
47
|
-
searchText: "text-
|
|
47
|
+
searchText: "text-body-m",
|
|
48
48
|
searchIcon: "size-16"
|
|
49
49
|
}
|
|
50
|
-
}[L], { x: I, y: O, strategy: T, refs:
|
|
50
|
+
}[L], { x: I, y: O, strategy: T, refs: d, context: x } = q({
|
|
51
51
|
open: n && !r,
|
|
52
52
|
onOpenChange: (t) => !r && i(t),
|
|
53
53
|
middleware: [
|
|
@@ -66,7 +66,7 @@ const je = ({
|
|
|
66
66
|
],
|
|
67
67
|
placement: "bottom-start",
|
|
68
68
|
whileElementsMounted: X
|
|
69
|
-
}), F = A(
|
|
69
|
+
}), F = A(x, { enabled: !r }), P = G(x), { getReferenceProps: W, getFloatingProps: D } = J([F, P]), { isMounted: E, styles: _ } = K(x, {
|
|
70
70
|
duration: { open: 200, close: 150 },
|
|
71
71
|
initial: { opacity: 0, transform: "translateY(-4px)" }
|
|
72
72
|
}), o = m.find((t) => t.value === a), H = (t) => {
|
|
@@ -77,11 +77,11 @@ const je = ({
|
|
|
77
77
|
onClick: () => !r && i(!n)
|
|
78
78
|
});
|
|
79
79
|
return /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col select-none ${s.gap} ${r ? "cursor-not-allowed" : ""} ${S}`, children: [
|
|
80
|
-
u && /* @__PURE__ */ e.jsx("h6", { className: `text-gray-600 font-600 ${s.label} ${r ? "text-gray-300" : ""}`, children: u }),
|
|
80
|
+
u && /* @__PURE__ */ e.jsx("h6", { className: `text-gray-600 font-600 leading-none ${s.label} ${r ? "text-gray-300" : ""}`, children: u }),
|
|
81
81
|
/* @__PURE__ */ e.jsxs(
|
|
82
82
|
"div",
|
|
83
83
|
{
|
|
84
|
-
ref:
|
|
84
|
+
ref: d.setReference,
|
|
85
85
|
className: `
|
|
86
86
|
flex items-center justify-between rounded-full border transition-all duration-200
|
|
87
87
|
${s.container}
|
|
@@ -116,13 +116,13 @@ const je = ({
|
|
|
116
116
|
E && !r && /* @__PURE__ */ e.jsxs(
|
|
117
117
|
"div",
|
|
118
118
|
{
|
|
119
|
-
ref:
|
|
119
|
+
ref: d.setFloating,
|
|
120
120
|
style: {
|
|
121
121
|
position: T,
|
|
122
122
|
top: O ?? 0,
|
|
123
123
|
left: I ?? 0,
|
|
124
124
|
..._,
|
|
125
|
-
width: (j =
|
|
125
|
+
width: (j = d.reference.current) == null ? void 0 : j.clientWidth,
|
|
126
126
|
zIndex: 50
|
|
127
127
|
},
|
|
128
128
|
className: "bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",
|
|
@@ -155,7 +155,7 @@ const je = ({
|
|
|
155
155
|
)
|
|
156
156
|
] }) }),
|
|
157
157
|
/* @__PURE__ */ e.jsx("div", { className: "max-h-[450px] overflow-y-auto", children: h.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "py-4", children: h.map((t) => {
|
|
158
|
-
var
|
|
158
|
+
var b, v, k;
|
|
159
159
|
const p = a === t.value;
|
|
160
160
|
return /* @__PURE__ */ e.jsxs(Y.Fragment, { children: [
|
|
161
161
|
t.dividerBefore && /* @__PURE__ */ e.jsx("div", { className: "px-16 py-8", children: /* @__PURE__ */ e.jsx("hr", { className: "border-t border-gray-200" }) }),
|
|
@@ -177,7 +177,7 @@ const je = ({
|
|
|
177
177
|
/* @__PURE__ */ e.jsxs(
|
|
178
178
|
"div",
|
|
179
179
|
{
|
|
180
|
-
className: `flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((
|
|
180
|
+
className: `flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((b = t.colors) == null ? void 0 : b.bgColor) || ""} ${((v = t.colors) == null ? void 0 : v.textColor) || ""}`,
|
|
181
181
|
children: [
|
|
182
182
|
((k = t.colors) == null ? void 0 : k.dotColor) && /* @__PURE__ */ e.jsx(
|
|
183
183
|
"span",
|
|
@@ -7,6 +7,7 @@ interface TooltipProps {
|
|
|
7
7
|
icon?: IconDefinition;
|
|
8
8
|
location?: TooltipLocation;
|
|
9
9
|
childClassName?: string;
|
|
10
|
+
forceShow?: boolean;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* Smart Tooltip Component
|
|
@@ -16,5 +17,5 @@ interface TooltipProps {
|
|
|
16
17
|
* By default, it truncates based on the parent's width. To truncate earlier,
|
|
17
18
|
* pass a specific width class to `childClassName` (e.g., `max-w-[200px]`).
|
|
18
19
|
*/
|
|
19
|
-
declare const Tooltip: ({ text, children, icon, location, childClassName }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare const Tooltip: ({ text, children, icon, location, childClassName, forceShow }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export default Tooltip;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { FontAwesomeIcon as
|
|
4
|
-
const
|
|
5
|
-
const [
|
|
2
|
+
import { useState as m, useRef as u, useLayoutEffect as h } from "react";
|
|
3
|
+
import { FontAwesomeIcon as w } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
4
|
+
const j = ({ text: s, children: a, icon: e, location: l = "top", childClassName: d = "", forceShow: p }) => {
|
|
5
|
+
const [x, i] = m(!1), n = u(null), b = {
|
|
6
6
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2 flex-col",
|
|
7
7
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2 flex-col-reverse",
|
|
8
8
|
left: "right-full top-1/2 -translate-y-1/2 mr-2 flex-row",
|
|
9
9
|
right: "left-full top-1/2 -translate-y-1/2 ml-2 flex-row-reverse"
|
|
10
|
-
},
|
|
10
|
+
}, c = {
|
|
11
11
|
top: "border-l-[8px] border-l-transparent border-r-[8px] border-r-transparent border-t-[8px] border-t-gray-700",
|
|
12
12
|
bottom: "border-l-[8px] border-l-transparent border-r-[8px] border-r-transparent border-b-[8px] border-b-gray-700",
|
|
13
13
|
left: "border-t-[8px] border-t-transparent border-b-[8px] border-b-transparent border-l-[8px] border-l-gray-700",
|
|
@@ -15,16 +15,16 @@ const y = ({ text: s, children: a, icon: e, location: l = "top", childClassName:
|
|
|
15
15
|
}, t = () => {
|
|
16
16
|
const o = n.current;
|
|
17
17
|
if (o) {
|
|
18
|
-
const
|
|
19
|
-
|
|
18
|
+
const f = o.scrollWidth > o.offsetWidth;
|
|
19
|
+
i(f);
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
return
|
|
22
|
+
return h(() => (t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t)), [s, a]), /* @__PURE__ */ r.jsxs("div", { className: "group relative grid min-w-0 w-full", children: [
|
|
23
23
|
/* @__PURE__ */ r.jsx("div", { ref: n, className: `truncate ${d}`, children: a }),
|
|
24
|
-
p && /* @__PURE__ */ r.jsxs("div", { className: `pointer-events-none absolute flex items-center opacity-0 transition-opacity group-hover:opacity-100 z-50 ${
|
|
24
|
+
x || p && /* @__PURE__ */ r.jsxs("div", { className: `pointer-events-none absolute flex items-center opacity-0 transition-opacity group-hover:opacity-100 z-50 ${b[l]}`, children: [
|
|
25
25
|
/* @__PURE__ */ r.jsx("div", { className: "bg-gray-700 p-12 rounded-[8px] shadow-xl max-w-[320px] w-max border border-gray-700/50", children: /* @__PURE__ */ r.jsxs("div", { className: `flex items-start ${e ? "gap-8" : "justify-center"}`, children: [
|
|
26
26
|
e && /* @__PURE__ */ r.jsx("div", { className: "flex items-center h-[16px] flex-shrink-0", children: /* @__PURE__ */ r.jsx(
|
|
27
|
-
|
|
27
|
+
w,
|
|
28
28
|
{
|
|
29
29
|
icon: e,
|
|
30
30
|
className: "text-[16px] text-gray-100"
|
|
@@ -32,10 +32,10 @@ const y = ({ text: s, children: a, icon: e, location: l = "top", childClassName:
|
|
|
32
32
|
) }),
|
|
33
33
|
/* @__PURE__ */ r.jsx("p", { className: "text-[12px] text-blue-50 leading-[16px] font-normal text-left", children: s })
|
|
34
34
|
] }) }),
|
|
35
|
-
/* @__PURE__ */ r.jsx("div", { className: `w-0 h-0 ${
|
|
35
|
+
/* @__PURE__ */ r.jsx("div", { className: `w-0 h-0 ${c[l]}` })
|
|
36
36
|
] })
|
|
37
37
|
] });
|
|
38
38
|
};
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
j as default
|
|
41
41
|
};
|