@ogcio/design-system-react 1.32.0 → 1.33.0
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/accordion/accordion-item.js +62 -57
- package/dist/alert/alert.js +37 -39
- package/dist/alert/variants.d.ts +49 -52
- package/dist/alert/variants.js +17 -18
- package/dist/atoms/Button.d.ts +2 -2
- package/dist/atoms/Button.js +2 -1
- package/dist/button/button.d.ts +2 -9
- package/dist/button/button.js +65 -32
- package/dist/button/helpers.d.ts +2 -1
- package/dist/button/types.d.ts +25 -8
- package/dist/button-group/button-group.js +43 -45
- package/dist/button-group/types.d.ts +5 -5
- package/dist/card/card-legacy.js +1 -1
- package/dist/card/types.d.ts +1 -1
- package/dist/combo-box/dropdown-item.js +1 -1
- package/dist/cookie-banner/cookie-banner.d.ts +1 -1
- package/dist/data-table/data-table-header.js +1 -1
- package/dist/drawer/drawer.d.ts +1 -1
- package/dist/drawer/drawer.js +17 -17
- package/dist/error-text/error-text.js +28 -27
- package/dist/forms/form-field/form-field.js +24 -25
- package/dist/header/components/header-search.js +2 -2
- package/dist/hint-text/hint-text.js +26 -20
- package/dist/icon-button/icon-button.d.ts +3 -5
- package/dist/index.d.ts +1 -1
- package/dist/label/label.d.ts +78 -30
- package/dist/label/label.js +29 -14
- package/dist/modal/modal.content.js +1 -1
- package/dist/modal/modal.js +38 -38
- package/dist/modal/types.d.ts +5 -4
- package/dist/pagination/pagination.js +27 -28
- package/dist/score-select/type.d.ts +2 -2
- package/dist/select/select-next.js +87 -87
- package/dist/side-nav/side-nav.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tabs/tab-item.js +53 -71
- package/dist/tabs/variants.d.ts +269 -0
- package/dist/tabs/variants.js +87 -0
- package/dist/tooltip/tooltip.js +27 -35
- package/dist/tooltip/variants.d.ts +115 -0
- package/dist/tooltip/variants.js +59 -0
- package/package.json +2 -2
package/dist/tabs/tab-item.js
CHANGED
|
@@ -1,112 +1,94 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as j, Fragment as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
10
|
-
base: "gi-tab-item",
|
|
11
|
-
variants: {
|
|
12
|
-
size: {
|
|
13
|
-
md: "gi-text-md gi-py-4",
|
|
14
|
-
sm: "gi-text-sm gi-py-2"
|
|
15
|
-
},
|
|
16
|
-
checked: {
|
|
17
|
-
true: "gi-tab-item-checked"
|
|
18
|
-
},
|
|
19
|
-
stretch: {
|
|
20
|
-
true: "gi-flex-1"
|
|
21
|
-
},
|
|
22
|
-
labelAlignment: {
|
|
23
|
-
start: "gi-justify-start",
|
|
24
|
-
center: "gi-justify-center",
|
|
25
|
-
end: "gi-justify-end"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: {
|
|
29
|
-
size: "md"
|
|
30
|
-
}
|
|
31
|
-
}), F = () => null, R = k((b, n) => {
|
|
2
|
+
import { jsxs as j, Fragment as A, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as $ } from "react";
|
|
4
|
+
import { cn as g } from "../cn.js";
|
|
5
|
+
import { Icon as z } from "../icon/icon.js";
|
|
6
|
+
import { Button as B } from "../primitives/button.js";
|
|
7
|
+
import { slugify as F } from "../utilities.js";
|
|
8
|
+
import { tabItemVariants as R } from "./variants.js";
|
|
9
|
+
const S = () => null, V = $((u, n) => {
|
|
32
10
|
const {
|
|
33
11
|
value: h,
|
|
34
|
-
href:
|
|
35
|
-
checked:
|
|
36
|
-
children:
|
|
12
|
+
href: s,
|
|
13
|
+
checked: i = !1,
|
|
14
|
+
children: I,
|
|
37
15
|
onTabClick: t,
|
|
38
|
-
onTabKeyDown:
|
|
39
|
-
size:
|
|
40
|
-
appearance:
|
|
41
|
-
labelAlignment:
|
|
42
|
-
stretch:
|
|
43
|
-
icon:
|
|
44
|
-
className:
|
|
45
|
-
...
|
|
46
|
-
} =
|
|
16
|
+
onTabKeyDown: r,
|
|
17
|
+
size: b = "md",
|
|
18
|
+
appearance: x = "default",
|
|
19
|
+
labelAlignment: N = "center",
|
|
20
|
+
stretch: v,
|
|
21
|
+
icon: l,
|
|
22
|
+
className: m,
|
|
23
|
+
...o
|
|
24
|
+
} = u, c = F(h), d = {
|
|
47
25
|
role: "tab",
|
|
48
|
-
"aria-selected":
|
|
49
|
-
"aria-controls": `tab-panel-${
|
|
50
|
-
id: `tab-${
|
|
51
|
-
tabIndex:
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
|
|
26
|
+
"aria-selected": i,
|
|
27
|
+
"aria-controls": `tab-panel-${c}`,
|
|
28
|
+
id: `tab-${c}`,
|
|
29
|
+
tabIndex: i ? 0 : -1
|
|
30
|
+
}, { base: f, border: y } = R({
|
|
31
|
+
size: b,
|
|
32
|
+
checked: i,
|
|
33
|
+
stretch: v,
|
|
34
|
+
labelAlignment: N,
|
|
35
|
+
appearance: x
|
|
36
|
+
}), p = /* @__PURE__ */ j(A, { children: [
|
|
37
|
+
l && /* @__PURE__ */ a(z, { icon: l }),
|
|
38
|
+
I,
|
|
55
39
|
/* @__PURE__ */ a(
|
|
56
40
|
"div",
|
|
57
41
|
{
|
|
58
|
-
className:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}),
|
|
62
|
-
"aria-hidden": "true"
|
|
42
|
+
className: y(),
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
"data-testid": "tab-item-border"
|
|
63
45
|
}
|
|
64
46
|
)
|
|
65
47
|
] });
|
|
66
|
-
return
|
|
48
|
+
return s ? /* @__PURE__ */ a(
|
|
67
49
|
"a",
|
|
68
50
|
{
|
|
69
|
-
href:
|
|
70
|
-
...f,
|
|
51
|
+
href: s,
|
|
71
52
|
...d,
|
|
72
|
-
|
|
73
|
-
|
|
53
|
+
...o,
|
|
54
|
+
className: g(
|
|
55
|
+
f(),
|
|
74
56
|
"gi-inline-flex gi-items-center gi-gap-2 gi-decoration-xs",
|
|
75
|
-
|
|
57
|
+
m
|
|
76
58
|
),
|
|
77
59
|
onClick: (e) => {
|
|
78
60
|
t == null || t(e);
|
|
79
61
|
},
|
|
80
62
|
onKeyDown: (e) => {
|
|
81
|
-
|
|
63
|
+
r == null || r(e);
|
|
82
64
|
},
|
|
83
65
|
ref: n,
|
|
84
66
|
children: p
|
|
85
67
|
}
|
|
86
68
|
) : /* @__PURE__ */ a(
|
|
87
|
-
|
|
69
|
+
B,
|
|
88
70
|
{
|
|
89
|
-
...f,
|
|
90
71
|
...d,
|
|
72
|
+
...o,
|
|
91
73
|
ref: n,
|
|
92
|
-
className:
|
|
93
|
-
|
|
74
|
+
className: g(
|
|
75
|
+
f(),
|
|
94
76
|
"gi-inline-flex gi-items-center gi-gap-2",
|
|
95
|
-
|
|
77
|
+
m
|
|
96
78
|
),
|
|
97
79
|
onClick: (e) => {
|
|
98
80
|
t == null || t(e);
|
|
99
81
|
},
|
|
100
82
|
onKeyDown: (e) => {
|
|
101
|
-
|
|
83
|
+
r == null || r(e);
|
|
102
84
|
},
|
|
103
85
|
children: p
|
|
104
86
|
}
|
|
105
87
|
);
|
|
106
88
|
});
|
|
107
|
-
|
|
108
|
-
|
|
89
|
+
V.displayName = "InternalTabItem";
|
|
90
|
+
S.displayName = "TabItem";
|
|
109
91
|
export {
|
|
110
|
-
|
|
111
|
-
|
|
92
|
+
V as InternalTabItem,
|
|
93
|
+
S as TabItem
|
|
112
94
|
};
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
export declare const tabItemVariants: import('tailwind-variants').TVReturnType<{
|
|
2
|
+
size: {
|
|
3
|
+
md: {
|
|
4
|
+
base: string;
|
|
5
|
+
};
|
|
6
|
+
sm: {
|
|
7
|
+
base: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
checked: {
|
|
11
|
+
false: {
|
|
12
|
+
base: string;
|
|
13
|
+
};
|
|
14
|
+
true: {
|
|
15
|
+
base: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
stretch: {
|
|
19
|
+
true: {
|
|
20
|
+
base: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
labelAlignment: {
|
|
24
|
+
start: {
|
|
25
|
+
base: string;
|
|
26
|
+
};
|
|
27
|
+
center: {
|
|
28
|
+
base: string;
|
|
29
|
+
};
|
|
30
|
+
end: {
|
|
31
|
+
base: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
appearance: {
|
|
35
|
+
default: {};
|
|
36
|
+
dark: {};
|
|
37
|
+
};
|
|
38
|
+
}, {
|
|
39
|
+
base: string[];
|
|
40
|
+
border: string[];
|
|
41
|
+
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
|
|
42
|
+
size: {
|
|
43
|
+
md: {
|
|
44
|
+
base: string;
|
|
45
|
+
};
|
|
46
|
+
sm: {
|
|
47
|
+
base: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
checked: {
|
|
51
|
+
false: {
|
|
52
|
+
base: string;
|
|
53
|
+
};
|
|
54
|
+
true: {
|
|
55
|
+
base: string[];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
stretch: {
|
|
59
|
+
true: {
|
|
60
|
+
base: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
labelAlignment: {
|
|
64
|
+
start: {
|
|
65
|
+
base: string;
|
|
66
|
+
};
|
|
67
|
+
center: {
|
|
68
|
+
base: string;
|
|
69
|
+
};
|
|
70
|
+
end: {
|
|
71
|
+
base: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
appearance: {
|
|
75
|
+
default: {};
|
|
76
|
+
dark: {};
|
|
77
|
+
};
|
|
78
|
+
}, {
|
|
79
|
+
size: {
|
|
80
|
+
md: {
|
|
81
|
+
base: string;
|
|
82
|
+
};
|
|
83
|
+
sm: {
|
|
84
|
+
base: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
checked: {
|
|
88
|
+
false: {
|
|
89
|
+
base: string;
|
|
90
|
+
};
|
|
91
|
+
true: {
|
|
92
|
+
base: string[];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
stretch: {
|
|
96
|
+
true: {
|
|
97
|
+
base: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
labelAlignment: {
|
|
101
|
+
start: {
|
|
102
|
+
base: string;
|
|
103
|
+
};
|
|
104
|
+
center: {
|
|
105
|
+
base: string;
|
|
106
|
+
};
|
|
107
|
+
end: {
|
|
108
|
+
base: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
appearance: {
|
|
112
|
+
default: {};
|
|
113
|
+
dark: {};
|
|
114
|
+
};
|
|
115
|
+
}>, {
|
|
116
|
+
size: {
|
|
117
|
+
md: {
|
|
118
|
+
base: string;
|
|
119
|
+
};
|
|
120
|
+
sm: {
|
|
121
|
+
base: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
checked: {
|
|
125
|
+
false: {
|
|
126
|
+
base: string;
|
|
127
|
+
};
|
|
128
|
+
true: {
|
|
129
|
+
base: string[];
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
stretch: {
|
|
133
|
+
true: {
|
|
134
|
+
base: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
labelAlignment: {
|
|
138
|
+
start: {
|
|
139
|
+
base: string;
|
|
140
|
+
};
|
|
141
|
+
center: {
|
|
142
|
+
base: string;
|
|
143
|
+
};
|
|
144
|
+
end: {
|
|
145
|
+
base: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
appearance: {
|
|
149
|
+
default: {};
|
|
150
|
+
dark: {};
|
|
151
|
+
};
|
|
152
|
+
}, {
|
|
153
|
+
base: string[];
|
|
154
|
+
border: string[];
|
|
155
|
+
}, import('tailwind-variants').TVReturnType<{
|
|
156
|
+
size: {
|
|
157
|
+
md: {
|
|
158
|
+
base: string;
|
|
159
|
+
};
|
|
160
|
+
sm: {
|
|
161
|
+
base: string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
checked: {
|
|
165
|
+
false: {
|
|
166
|
+
base: string;
|
|
167
|
+
};
|
|
168
|
+
true: {
|
|
169
|
+
base: string[];
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
stretch: {
|
|
173
|
+
true: {
|
|
174
|
+
base: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
labelAlignment: {
|
|
178
|
+
start: {
|
|
179
|
+
base: string;
|
|
180
|
+
};
|
|
181
|
+
center: {
|
|
182
|
+
base: string;
|
|
183
|
+
};
|
|
184
|
+
end: {
|
|
185
|
+
base: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
appearance: {
|
|
189
|
+
default: {};
|
|
190
|
+
dark: {};
|
|
191
|
+
};
|
|
192
|
+
}, {
|
|
193
|
+
base: string[];
|
|
194
|
+
border: string[];
|
|
195
|
+
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
|
|
196
|
+
size: {
|
|
197
|
+
md: {
|
|
198
|
+
base: string;
|
|
199
|
+
};
|
|
200
|
+
sm: {
|
|
201
|
+
base: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
checked: {
|
|
205
|
+
false: {
|
|
206
|
+
base: string;
|
|
207
|
+
};
|
|
208
|
+
true: {
|
|
209
|
+
base: string[];
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
stretch: {
|
|
213
|
+
true: {
|
|
214
|
+
base: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
labelAlignment: {
|
|
218
|
+
start: {
|
|
219
|
+
base: string;
|
|
220
|
+
};
|
|
221
|
+
center: {
|
|
222
|
+
base: string;
|
|
223
|
+
};
|
|
224
|
+
end: {
|
|
225
|
+
base: string;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
appearance: {
|
|
229
|
+
default: {};
|
|
230
|
+
dark: {};
|
|
231
|
+
};
|
|
232
|
+
}, {
|
|
233
|
+
size: {
|
|
234
|
+
md: {
|
|
235
|
+
base: string;
|
|
236
|
+
};
|
|
237
|
+
sm: {
|
|
238
|
+
base: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
checked: {
|
|
242
|
+
false: {
|
|
243
|
+
base: string;
|
|
244
|
+
};
|
|
245
|
+
true: {
|
|
246
|
+
base: string[];
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
stretch: {
|
|
250
|
+
true: {
|
|
251
|
+
base: string;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
labelAlignment: {
|
|
255
|
+
start: {
|
|
256
|
+
base: string;
|
|
257
|
+
};
|
|
258
|
+
center: {
|
|
259
|
+
base: string;
|
|
260
|
+
};
|
|
261
|
+
end: {
|
|
262
|
+
base: string;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
appearance: {
|
|
266
|
+
default: {};
|
|
267
|
+
dark: {};
|
|
268
|
+
};
|
|
269
|
+
}>, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { c as e } from "../index-CB-zPpNk.js";
|
|
2
|
+
const r = e({
|
|
3
|
+
slots: {
|
|
4
|
+
base: [
|
|
5
|
+
"group",
|
|
6
|
+
"gi-cursor-pointer gi-relative gi-px-1 gi-leading-6",
|
|
7
|
+
"gi-flex gi-gap-2",
|
|
8
|
+
"hover:gi-text-color-icon-system-neutral-interactive-hover hover:gi-bg-color-surface-system-neutral-interactive-hover hover:gi-fill-color-text-system-neutral-interactive-default",
|
|
9
|
+
"gi-focus-state-outline focus:gi-shadow-[inset_0_0_0_2px] focus:gi-border-none focus:gi-border-transparent focus:gi-bg-color-surface-system-neutral-interactive-hover focus:gi-text-color-text-system-neutral-interactive-default focus:gi-rounded-sm focus:gi-z-1"
|
|
10
|
+
],
|
|
11
|
+
border: [
|
|
12
|
+
"gi-h-[2px] gi-absolute gi-bottom-0 gi-left-0 gi-w-full",
|
|
13
|
+
"group-focus:!gi-bg-transparent"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
variants: {
|
|
17
|
+
size: {
|
|
18
|
+
md: {
|
|
19
|
+
base: "gi-text-md gi-py-4"
|
|
20
|
+
},
|
|
21
|
+
sm: {
|
|
22
|
+
base: "gi-text-sm gi-py-2"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
checked: {
|
|
26
|
+
false: {
|
|
27
|
+
base: "gi-text-color-text-system-neutral-interactive-muted gi-fill-color-text-system-neutral-interactive-muted"
|
|
28
|
+
},
|
|
29
|
+
true: {
|
|
30
|
+
base: [
|
|
31
|
+
"gi-bg-white gi-no-underline gi-font-bold",
|
|
32
|
+
"gi-text-color-text-system-neutral-interactive-default gi-fill-color-text-system-neutral-interactive-default"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
stretch: {
|
|
37
|
+
true: {
|
|
38
|
+
base: "gi-flex-1"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
labelAlignment: {
|
|
42
|
+
start: {
|
|
43
|
+
base: "gi-justify-start"
|
|
44
|
+
},
|
|
45
|
+
center: {
|
|
46
|
+
base: "gi-justify-center"
|
|
47
|
+
},
|
|
48
|
+
end: {
|
|
49
|
+
base: "gi-justify-end"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
appearance: {
|
|
53
|
+
default: {},
|
|
54
|
+
dark: {}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
compoundVariants: [
|
|
58
|
+
{
|
|
59
|
+
checked: !0,
|
|
60
|
+
appearance: "default",
|
|
61
|
+
class: {
|
|
62
|
+
border: "gi-bg-color-border-tone-primary-accent-selected"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
checked: !0,
|
|
67
|
+
appearance: "dark",
|
|
68
|
+
class: {
|
|
69
|
+
border: "gi-bg-color-text-system-neutral-interactive-default"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
checked: !1,
|
|
74
|
+
class: {
|
|
75
|
+
border: "group-hover:gi-bg-color-surface-system-neutral-interactive-hover"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
defaultVariants: {
|
|
80
|
+
size: "md",
|
|
81
|
+
checked: !1,
|
|
82
|
+
appearance: "default"
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export {
|
|
86
|
+
r as tabItemVariants
|
|
87
|
+
};
|
package/dist/tooltip/tooltip.js
CHANGED
|
@@ -1,60 +1,52 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
variants: {
|
|
8
|
-
position: {
|
|
9
|
-
left: "gi-tooltip-left",
|
|
10
|
-
right: "gi-tooltip-right",
|
|
11
|
-
top: "gi-tooltip-top",
|
|
12
|
-
bottom: "gi-tooltip-bottom"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}), F = ({
|
|
16
|
-
text: o,
|
|
2
|
+
import { jsxs as y, jsx as E } from "react/jsx-runtime";
|
|
3
|
+
import { useState as d, useId as v, useCallback as l, useEffect as k } from "react";
|
|
4
|
+
import { tooltipVariants as w } from "./variants.js";
|
|
5
|
+
const L = ["top", "bottom", "left", "right"], T = ({
|
|
6
|
+
text: t,
|
|
17
7
|
position: i = "top",
|
|
18
8
|
dataTestid: p,
|
|
19
9
|
children: u
|
|
20
10
|
}) => {
|
|
21
|
-
const [
|
|
11
|
+
const [o, n] = d(!1), [f, a] = d(!1), r = v(), c = () => n(!0), e = l(() => {
|
|
22
12
|
n(!1), a(!1);
|
|
23
|
-
}, []), s =
|
|
24
|
-
(
|
|
25
|
-
|
|
13
|
+
}, []), s = l(
|
|
14
|
+
(b) => {
|
|
15
|
+
b.key === "Escape" && e();
|
|
26
16
|
},
|
|
27
|
-
[
|
|
17
|
+
[e]
|
|
28
18
|
);
|
|
29
|
-
|
|
19
|
+
k(() => (document.addEventListener("keydown", s), () => {
|
|
30
20
|
document.removeEventListener("keydown", s);
|
|
31
|
-
}), [s])
|
|
21
|
+
}), [s]);
|
|
22
|
+
const { wrapper: m, tooltip: h } = w({ position: i });
|
|
23
|
+
return /* @__PURE__ */ y(
|
|
32
24
|
"span",
|
|
33
25
|
{
|
|
34
|
-
className:
|
|
35
|
-
onMouseEnter:
|
|
26
|
+
className: m(),
|
|
27
|
+
onMouseEnter: c,
|
|
36
28
|
onMouseLeave: () => {
|
|
37
|
-
f ||
|
|
29
|
+
f || e();
|
|
38
30
|
},
|
|
39
31
|
onFocus: () => {
|
|
40
|
-
a(!0),
|
|
32
|
+
a(!0), c();
|
|
41
33
|
},
|
|
42
34
|
onBlur: () => {
|
|
43
|
-
|
|
35
|
+
e();
|
|
44
36
|
},
|
|
45
|
-
"aria-describedby":
|
|
37
|
+
"aria-describedby": o ? r : void 0,
|
|
46
38
|
"data-testid": p,
|
|
47
39
|
children: [
|
|
48
40
|
u,
|
|
49
|
-
|
|
41
|
+
o && /* @__PURE__ */ E(
|
|
50
42
|
"span",
|
|
51
43
|
{
|
|
52
|
-
id:
|
|
44
|
+
id: r,
|
|
53
45
|
role: "tooltip",
|
|
54
|
-
className:
|
|
55
|
-
"aria-hidden": !
|
|
46
|
+
className: h(),
|
|
47
|
+
"aria-hidden": !o,
|
|
56
48
|
"data-testid": `dti-tooltip-content-${i}`,
|
|
57
|
-
children:
|
|
49
|
+
children: t.length > 100 ? t.slice(0, 100) + "..." : t
|
|
58
50
|
}
|
|
59
51
|
)
|
|
60
52
|
]
|
|
@@ -62,6 +54,6 @@ const T = ["top", "bottom", "left", "right"], E = y({
|
|
|
62
54
|
);
|
|
63
55
|
};
|
|
64
56
|
export {
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
T as Tooltip,
|
|
58
|
+
L as positionVariants
|
|
67
59
|
};
|