se-design 1.0.86 → 1.0.87-dev.2
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/assets/icons/cloud-check.svg +4 -0
- package/dist/components/Icon/index.d.ts +5 -0
- package/dist/components/InputWithTags/index.d.ts +3 -1
- package/dist/components/Tooltip/index.d.ts +5 -1
- package/dist/index112.js +1 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +2 -2
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +1 -1
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +2 -2
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +1 -1
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +1 -1
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +2 -2
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +1 -1
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +2 -2
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +1 -1
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +1 -1
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +1 -1
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +1 -1
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +1 -1
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +2 -2
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -2
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index130.js +2 -2
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -2
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +1 -1
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +1 -1
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +1 -1
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +2 -2
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +2 -2
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +2 -2
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +1 -1
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +1 -1
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +1 -1
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +1 -1
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +1 -1
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +1 -1
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +1 -1
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +1 -1
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +2 -2
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +2 -2
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +1 -1
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +1 -1
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +1 -1
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +1 -1
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +1 -1
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +2 -2
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +1 -1
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +2 -2
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +2 -2
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +2 -2
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +111 -107
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +2 -2
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +1 -1
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +1 -1
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +1 -1
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +1 -1
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +1 -1
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +1 -1
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +1 -1
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +1 -1
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +1 -1
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +1 -1
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +1 -1
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +1 -1
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +1 -1
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +1 -1
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +1 -1
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +1 -1
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +1 -1
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +1 -1
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +1 -1
- package/dist/index179.js.map +1 -1
- package/dist/index180.js +1 -1
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +1 -1
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +1 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +1 -1
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +2 -2
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +2 -2
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +1 -1
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +1 -1
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +2 -2
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +2 -2
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +1 -1
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +1 -1
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +1 -1
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +1 -1
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +1 -1
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +1 -1
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +1 -1
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +1 -1
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +2 -2
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +2 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -2
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +2 -149
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +149 -9
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +8 -5
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +5 -4
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +1 -1
- package/dist/index223.js +8 -0
- package/dist/index223.js.map +1 -0
- package/dist/{index224.js → index225.js} +1 -1
- package/dist/{index224.js.map → index225.js.map} +1 -1
- package/dist/index23.js +16 -16
- package/dist/index23.js.map +1 -1
- package/dist/{index232.js → index233.js} +1 -1
- package/dist/{index232.js.map → index233.js.map} +1 -1
- package/dist/{index235.js → index236.js} +1 -1
- package/dist/{index235.js.map → index236.js.map} +1 -1
- package/dist/index245.js +169 -3
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +7 -0
- package/dist/index246.js.map +1 -0
- package/dist/index248.js +18 -9
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +9 -9
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -1
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +9 -4
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +5 -170
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +170 -11
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +11 -6
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +5 -5
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +5 -37
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +38 -2
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +2 -8
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +7 -326
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +324 -47
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +50 -2
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +2 -76
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +65 -82
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +89 -48
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +51 -7
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +7 -4
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +4 -51
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +52 -2
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +2 -2
- package/dist/index269.js +5 -0
- package/dist/index269.js.map +1 -0
- package/dist/index29.js +1 -1
- package/dist/index30.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.js +1 -1
- package/dist/index37.js +55 -36
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +163 -162
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +55 -51
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +66 -61
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +1 -1
- package/dist/index45.js +39 -38
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +52 -51
- package/dist/index46.js.map +1 -1
- package/dist/index49.js +1 -1
- package/dist/index51.js +1 -1
- package/dist/index52.js +1 -1
- package/dist/index53.js +1 -1
- package/dist/index57.js +1 -1
- package/dist/index6.js +305 -299
- package/dist/index6.js.map +1 -1
- package/dist/index61.js +1 -1
- package/dist/index63.js +1 -1
- package/dist/index65.js +1 -1
- package/dist/index7.js +1 -1
- package/dist/index79.js +1 -1
- package/dist/index81.js +9 -7
- package/dist/index81.js.map +1 -1
- package/dist/index9.js +20 -20
- package/dist/index9.js.map +1 -1
- package/package.json +1 -1
- package/dist/index244.js +0 -173
- package/dist/index244.js.map +0 -1
- package/dist/index247.js +0 -22
- package/dist/index247.js.map +0 -1
package/dist/index158.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index158.js","sources":["../src/assets/icons/
|
|
1
|
+
{"version":3,"file":"index158.js","sources":["../src/assets/icons/padlock.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20d='M11.7709%206.17139H3.23724C2.71358%206.17139%202.28906%206.59591%202.28906%207.11957V12.8087C2.28906%2013.3323%202.71358%2013.7568%203.23724%2013.7568H11.7709C12.2946%2013.7568%2012.7191%2013.3323%2012.7191%2012.8087V7.11957C12.7191%206.59591%2012.2946%206.17139%2011.7709%206.17139Z'%20stroke='%23CB384E'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.8239%206.1706V4.74832C10.8239%203.86816%2010.4743%203.02406%209.85191%202.4017C9.22955%201.77933%208.38544%201.42969%207.50528%201.42969C6.62512%201.42969%205.78101%201.77933%205.15866%202.4017C4.53629%203.02406%204.18665%203.86816%204.18665%204.74832V6.1706'%20stroke='%23CB384E'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.50485%2010.4392C7.76668%2010.4392%207.97894%2010.2269%207.97894%209.96509C7.97894%209.70326%207.76668%209.491%207.50485%209.491C7.24302%209.491%207.03076%209.70326%207.03076%209.96509C7.03076%2010.2269%207.24302%2010.4392%207.50485%2010.4392Z'%20stroke='%23CB384E'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_75"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index159.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%3e%3cpath%20d='M3%200.732748C2.11635%200.732748%201.4%201.44909%201.4%202.33275V13.6661C1.4%2014.5497%202.11635%2015.2661%203%2015.2661H11C11.8837%2015.2661%2012.6%2014.5497%2012.6%2013.6661V5.54084C12.6%205.35519%2012.5263%205.17714%2012.395%205.04586C12.395%205.04586%2012.395%205.04586%2012.395%205.04586L10.3409%202.99182L8.28689%200.937775C8.15561%200.806498%207.97756%200.732748%207.79191%200.732748H3Z'%20stroke='currentColor'%20stroke-width='1.2'/%3e%3cpath%20d='M7.83273%201.33275V4.49942C7.83273%205.0517%208.28045%205.49942%208.83273%205.49942H11.9994'%20stroke='currentColor'%20stroke-width='1.2'%20stroke-linecap='round'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
t as default
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=index159.js.map
|
package/dist/index159.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index159.js","sources":["../src/assets/icons/
|
|
1
|
+
{"version":3,"file":"index159.js","sources":["../src/assets/icons/pages.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%3e%3cpath%20d='M3%200.732748C2.11635%200.732748%201.4%201.44909%201.4%202.33275V13.6661C1.4%2014.5497%202.11635%2015.2661%203%2015.2661H11C11.8837%2015.2661%2012.6%2014.5497%2012.6%2013.6661V5.54084C12.6%205.35519%2012.5263%205.17714%2012.395%205.04586C12.395%205.04586%2012.395%205.04586%2012.395%205.04586L10.3409%202.99182L8.28689%200.937775C8.15561%200.806498%207.97756%200.732748%207.79191%200.732748H3Z'%20stroke='currentColor'%20stroke-width='1.2'/%3e%3cpath%20d='M7.83273%201.33275V4.49942C7.83273%205.0517%208.28045%205.49942%208.83273%205.49942H11.9994'%20stroke='currentColor'%20stroke-width='1.2'%20stroke-linecap='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_76"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index16.js
CHANGED
|
@@ -1,227 +1,231 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { useStableId as
|
|
4
|
-
import { useDismissOnFocusOut as
|
|
1
|
+
import c, { useState as N, useRef as $, useEffect as P } from "react";
|
|
2
|
+
import ee, { flushSync as te } from "react-dom";
|
|
3
|
+
import { useStableId as oe } from "./index206.js";
|
|
4
|
+
import { useDismissOnFocusOut as re } from "./index80.js";
|
|
5
5
|
import "./index72.js";
|
|
6
6
|
function I() {
|
|
7
|
-
return I = Object.assign ? Object.assign.bind() : function(
|
|
8
|
-
for (var
|
|
9
|
-
var s = arguments[
|
|
10
|
-
for (var
|
|
7
|
+
return I = Object.assign ? Object.assign.bind() : function(v) {
|
|
8
|
+
for (var p = 1; p < arguments.length; p++) {
|
|
9
|
+
var s = arguments[p];
|
|
10
|
+
for (var d in s) ({}).hasOwnProperty.call(s, d) && (v[d] = s[d]);
|
|
11
11
|
}
|
|
12
|
-
return
|
|
12
|
+
return v;
|
|
13
13
|
}, I.apply(null, arguments);
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
content:
|
|
17
|
-
tooltipSrc:
|
|
15
|
+
const de = ({
|
|
16
|
+
content: v,
|
|
17
|
+
tooltipSrc: p,
|
|
18
18
|
position: s = "bottom-center",
|
|
19
|
-
displayOn:
|
|
19
|
+
displayOn: d = "hover",
|
|
20
|
+
disabled: z = !1,
|
|
20
21
|
maxWidth: B = 240,
|
|
21
22
|
isWithPortal: F = !1,
|
|
22
23
|
tooltipSrcRef: w = void 0,
|
|
23
24
|
isTriggerDisabled: y = !1,
|
|
24
|
-
disabledTriggerAriaLabel:
|
|
25
|
-
tooltipContentClasses:
|
|
26
|
-
tooltipOffset:
|
|
27
|
-
automationId:
|
|
25
|
+
disabledTriggerAriaLabel: S = void 0,
|
|
26
|
+
tooltipContentClasses: _ = "",
|
|
27
|
+
tooltipOffset: m = 8,
|
|
28
|
+
automationId: K = ""
|
|
28
29
|
}) => {
|
|
29
|
-
const [L,
|
|
30
|
+
const [L, g] = N(!1), M = $(null), V = $(null), E = w || V, [q, U] = N({}), [k, D] = N(!1), A = $(null), H = typeof v == "string", x = oe(void 0, "tooltip-content"), T = () => {
|
|
30
31
|
A.current && (clearTimeout(A.current), A.current = null);
|
|
31
32
|
}, C = () => {
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
T(),
|
|
35
|
-
},
|
|
33
|
+
d !== "always-on" && (T(), A.current = setTimeout(() => g(!1), 150));
|
|
34
|
+
}, R = () => {
|
|
35
|
+
T(), g(!0);
|
|
36
|
+
}, W = (e) => {
|
|
36
37
|
if (y) {
|
|
37
38
|
if (e.key === "Escape") {
|
|
38
|
-
e.preventDefault(),
|
|
39
|
+
e.preventDefault(), g(!1);
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
41
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
42
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), g((t) => !t));
|
|
42
43
|
}
|
|
43
|
-
},
|
|
44
|
+
}, G = re({
|
|
44
45
|
disabled: y,
|
|
45
|
-
onFocusIn:
|
|
46
|
+
onFocusIn: R,
|
|
46
47
|
onFocusOut: C,
|
|
47
|
-
onEscape: () =>
|
|
48
|
+
onEscape: () => g(!1)
|
|
48
49
|
});
|
|
49
50
|
P(() => {
|
|
50
51
|
const e = M.current;
|
|
51
|
-
e && (s == "bottom-center" ? (e.setAttribute("style", "left: 50%;transform: translateX(-50%);"), e.classList.add("before:left-[calc(50%-7px)]"), e.classList.add("before:top-[-7px]")) : s == "bottom-left" ? (e.classList.add("before:left-[calc(10%-7px)]"), e.classList.add("before:top-[-7px]")) : s == "bottom-right" ? (e.setAttribute("style", "right: 0;"), e.classList.add("before:right-[calc(10%+7px)]"), e.classList.add("before:top-[-7px]")) : s == "top-center" ? (e.setAttribute("style", "left: 50%;transform: translateX(-50%);bottom: calc(100% + 8px);"), e.classList.add("before:left-[calc(50%-7px)]"), e.classList.add("before:bottom-[-7px]")) : s == "top-left" ? (e.setAttribute("style", "bottom: calc(100% + 8px);"), e.classList.add("before:left-[calc(10%-7px)]"), e.classList.add("before:bottom-[-7px]")) : s == "top-right" ? (e.setAttribute("style", "right: 0;bottom: calc(100% + 8px);"), e.classList.add("before:right-[calc(10%+7px)]"), e.classList.add("before:bottom-[-7px]")) : s == "left-top" ? (e.setAttribute("style", "right: calc(100% + 10px);top:0;"), e.classList.add("before:right-[-6px]"), e.classList.add("before:top-[7px]")) : s == "left-center" ? (e.setAttribute("style", "right: calc(100% + 10px);top: 50%;transform: translateY(-50%);"), e.classList.add("before:right-[-6px]"), e.classList.add("before:top-[calc(50%-7px)]")) : s == "left-bottom" ? (e.setAttribute("style", "right: calc(100% + 10px);bottom:0;"), e.classList.add("before:right-[-6px]"), e.classList.add("before:bottom-[7px]")) : s == "right-top" ? (e.setAttribute("style", "left: calc(100% + 10px);top:0;"), e.classList.add("before:left-[-6px]"), e.classList.add("before:top-[7px]")) : s == "right-center" ? (e.setAttribute("style", "left: calc(100% + 10px);top: 50%;transform: translateY(-50%);"), e.classList.add("before:left-[-6px]"), e.classList.add("before:top-[calc(50%-7px)]")) : s == "right-bottom" && (e.setAttribute("style", "left: calc(100% + 10px);bottom:0;"), e.classList.add("before:left-[-6px]"), e.classList.add("before:bottom-[7px]")),
|
|
52
|
-
}, [
|
|
52
|
+
e && (s == "bottom-center" ? (e.setAttribute("style", "left: 50%;transform: translateX(-50%);"), e.classList.add("before:left-[calc(50%-7px)]"), e.classList.add("before:top-[-7px]")) : s == "bottom-left" ? (e.classList.add("before:left-[calc(10%-7px)]"), e.classList.add("before:top-[-7px]")) : s == "bottom-right" ? (e.setAttribute("style", "right: 0;"), e.classList.add("before:right-[calc(10%+7px)]"), e.classList.add("before:top-[-7px]")) : s == "top-center" ? (e.setAttribute("style", "left: 50%;transform: translateX(-50%);bottom: calc(100% + 8px);"), e.classList.add("before:left-[calc(50%-7px)]"), e.classList.add("before:bottom-[-7px]")) : s == "top-left" ? (e.setAttribute("style", "bottom: calc(100% + 8px);"), e.classList.add("before:left-[calc(10%-7px)]"), e.classList.add("before:bottom-[-7px]")) : s == "top-right" ? (e.setAttribute("style", "right: 0;bottom: calc(100% + 8px);"), e.classList.add("before:right-[calc(10%+7px)]"), e.classList.add("before:bottom-[-7px]")) : s == "left-top" ? (e.setAttribute("style", "right: calc(100% + 10px);top:0;"), e.classList.add("before:right-[-6px]"), e.classList.add("before:top-[7px]")) : s == "left-center" ? (e.setAttribute("style", "right: calc(100% + 10px);top: 50%;transform: translateY(-50%);"), e.classList.add("before:right-[-6px]"), e.classList.add("before:top-[calc(50%-7px)]")) : s == "left-bottom" ? (e.setAttribute("style", "right: calc(100% + 10px);bottom:0;"), e.classList.add("before:right-[-6px]"), e.classList.add("before:bottom-[7px]")) : s == "right-top" ? (e.setAttribute("style", "left: calc(100% + 10px);top:0;"), e.classList.add("before:left-[-6px]"), e.classList.add("before:top-[7px]")) : s == "right-center" ? (e.setAttribute("style", "left: calc(100% + 10px);top: 50%;transform: translateY(-50%);"), e.classList.add("before:left-[-6px]"), e.classList.add("before:top-[calc(50%-7px)]")) : s == "right-bottom" && (e.setAttribute("style", "left: calc(100% + 10px);bottom:0;"), e.classList.add("before:left-[-6px]"), e.classList.add("before:bottom-[7px]")), d == "hover" && e.classList.add("group-hover:visible"));
|
|
53
|
+
}, [v]), P(() => {
|
|
53
54
|
const e = M.current;
|
|
54
55
|
e && (L ? e.classList.remove("invisible") : e.classList.add("invisible"));
|
|
55
56
|
}, [L]), P(() => {
|
|
56
|
-
|
|
57
|
-
}, [
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
...
|
|
57
|
+
d === "always-on" && g(!0);
|
|
58
|
+
}, [d]);
|
|
59
|
+
const J = () => {
|
|
60
|
+
d == "click" && g((e) => !e);
|
|
61
|
+
}, Q = {
|
|
62
|
+
...d === "click" && {
|
|
62
63
|
onClick: () => {
|
|
63
|
-
|
|
64
|
+
g((e) => !e);
|
|
64
65
|
}
|
|
65
66
|
},
|
|
66
|
-
...
|
|
67
|
-
onMouseEnter: () =>
|
|
68
|
-
onMouseLeave: () =>
|
|
67
|
+
...d === "hover" && {
|
|
68
|
+
onMouseEnter: () => g(!0),
|
|
69
|
+
onMouseLeave: () => g(!1)
|
|
69
70
|
}
|
|
70
|
-
},
|
|
71
|
-
const e =
|
|
71
|
+
}, Z = () => {
|
|
72
|
+
const e = E.current;
|
|
72
73
|
if (!e)
|
|
73
74
|
return {};
|
|
74
|
-
const t = e.getBoundingClientRect(), n = window.scrollX || window.pageXOffset,
|
|
75
|
-
let a = 0,
|
|
75
|
+
const t = e.getBoundingClientRect(), n = window.scrollX || window.pageXOffset, i = window.scrollY || window.pageYOffset, o = 14, h = document.getElementById(x), r = h?.offsetWidth || 0, l = h?.offsetHeight || 0;
|
|
76
|
+
let a = 0, f = 0, b = 0, u = 0;
|
|
76
77
|
switch (s) {
|
|
77
78
|
case "bottom-center":
|
|
78
|
-
a = t.bottom +
|
|
79
|
+
a = t.bottom + i + m, f = t.left + n + t.width / 2 - r / 2, b = r / 2 - o / 2, u = -o / 2;
|
|
79
80
|
break;
|
|
80
81
|
case "bottom-left":
|
|
81
|
-
a = t.bottom +
|
|
82
|
+
a = t.bottom + i + m, f = t.left + n, b = r * 0.1 - o / 2, u = -o / 2;
|
|
82
83
|
break;
|
|
83
84
|
case "bottom-right":
|
|
84
|
-
a = t.bottom +
|
|
85
|
+
a = t.bottom + i + m, f = t.right + n - r, b = r - r * 0.1 - o / 2, u = -o / 2;
|
|
85
86
|
break;
|
|
86
87
|
case "top-center":
|
|
87
|
-
a = t.top +
|
|
88
|
+
a = t.top + i - l - m, f = t.left + n + t.width / 2 - r / 2, b = r / 2 - o / 2, u = l - o / 2;
|
|
88
89
|
break;
|
|
89
90
|
case "top-left":
|
|
90
|
-
a = t.top +
|
|
91
|
+
a = t.top + i - l - m, f = t.left + n, b = r * 0.1 - o / 2, u = l - o / 2;
|
|
91
92
|
break;
|
|
92
93
|
case "top-right":
|
|
93
|
-
a = t.top +
|
|
94
|
+
a = t.top + i - l - m, f = t.right + n - r, b = r - r * 0.1 - o / 2, u = l - o / 2;
|
|
94
95
|
break;
|
|
95
96
|
case "left-top":
|
|
96
|
-
a = t.top +
|
|
97
|
+
a = t.top + i, f = t.left + n - r - m, b = r - o / 2, u = o / 2;
|
|
97
98
|
break;
|
|
98
99
|
case "left-center":
|
|
99
|
-
a = t.top +
|
|
100
|
+
a = t.top + i + t.height / 2 - l / 2, f = t.left + n - r - m, b = r - o / 2, u = l / 2 - o / 2;
|
|
100
101
|
break;
|
|
101
102
|
case "left-bottom":
|
|
102
|
-
a = t.bottom +
|
|
103
|
+
a = t.bottom + i - l, f = t.left + n - r - m, b = r - o / 2, u = l - o / 2;
|
|
103
104
|
break;
|
|
104
105
|
case "right-top":
|
|
105
|
-
a = t.top +
|
|
106
|
+
a = t.top + i, f = t.right + n + m, b = -o / 2, u = o / 2;
|
|
106
107
|
break;
|
|
107
108
|
case "right-center":
|
|
108
|
-
a = t.top +
|
|
109
|
+
a = t.top + i + t.height / 2 - l / 2, f = t.right + n + m, b = -o / 2, u = l / 2 - o / 2;
|
|
109
110
|
break;
|
|
110
111
|
case "right-bottom":
|
|
111
|
-
a = t.bottom +
|
|
112
|
+
a = t.bottom + i - l, f = t.right + n + m, b = -o / 2, u = l - o / 2;
|
|
112
113
|
break;
|
|
113
114
|
default:
|
|
114
|
-
a = t.bottom +
|
|
115
|
+
a = t.bottom + i + m, f = t.left + n + t.width / 2 - r / 2, b = r / 2 - o / 2, u = -o / 2;
|
|
115
116
|
break;
|
|
116
117
|
}
|
|
117
118
|
return {
|
|
118
119
|
position: "absolute",
|
|
119
120
|
top: `${a}px`,
|
|
120
|
-
left: `${
|
|
121
|
+
left: `${f}px`,
|
|
121
122
|
zIndex: 9999,
|
|
122
|
-
"--arrow-left": `${
|
|
123
|
-
"--arrow-top": `${
|
|
123
|
+
"--arrow-left": `${b}px`,
|
|
124
|
+
"--arrow-top": `${u}px`
|
|
124
125
|
};
|
|
125
126
|
};
|
|
126
|
-
P(() => {
|
|
127
|
+
if (P(() => {
|
|
127
128
|
if (!L || !F) {
|
|
128
|
-
|
|
129
|
+
D(!1);
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
131
132
|
const e = () => {
|
|
132
|
-
const h = document.getElementById(
|
|
133
|
+
const h = document.getElementById(x);
|
|
133
134
|
if (!h || h.offsetHeight === 0) {
|
|
134
135
|
requestAnimationFrame(e);
|
|
135
136
|
return;
|
|
136
137
|
}
|
|
137
|
-
const r =
|
|
138
|
-
|
|
139
|
-
U(r),
|
|
138
|
+
const r = Z();
|
|
139
|
+
te(() => {
|
|
140
|
+
U(r), D(!0);
|
|
140
141
|
});
|
|
141
142
|
}, t = setTimeout(e, w ? 60 : 10), n = (h) => {
|
|
142
|
-
const r = document.getElementById(
|
|
143
|
-
r && l && !r.contains(a) && !l.contains(a) &&
|
|
144
|
-
},
|
|
145
|
-
|
|
143
|
+
const r = document.getElementById(x), l = E.current, a = h.target;
|
|
144
|
+
r && l && !r.contains(a) && !l.contains(a) && g(!1);
|
|
145
|
+
}, i = d !== "always-on";
|
|
146
|
+
i && document.body.addEventListener("click", n, !0), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e);
|
|
146
147
|
let o = null;
|
|
147
|
-
return w &&
|
|
148
|
+
return w && E.current && (o = new MutationObserver(() => {
|
|
148
149
|
e();
|
|
149
|
-
}), o.observe(
|
|
150
|
+
}), o.observe(E.current, {
|
|
150
151
|
attributes: !0,
|
|
151
152
|
attributeFilter: ["style", "class"]
|
|
152
153
|
})), () => {
|
|
153
|
-
clearTimeout(t), T(),
|
|
154
|
+
clearTimeout(t), T(), i && document.body.removeEventListener("click", n, !0), window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e), o && o.disconnect();
|
|
154
155
|
};
|
|
155
|
-
}, [L, F, s,
|
|
156
|
-
const
|
|
157
|
-
"aria-describedby":
|
|
158
|
-
...typeof
|
|
159
|
-
ariaDescribedBy:
|
|
156
|
+
}, [L, F, s, d, w, x]), z) return /* @__PURE__ */ c.createElement(c.Fragment, null, p);
|
|
157
|
+
const O = /* @__PURE__ */ c.isValidElement(p) && p.props.disabled, X = !y && /* @__PURE__ */ c.isValidElement(p) ? /* @__PURE__ */ c.cloneElement(p, {
|
|
158
|
+
"aria-describedby": x,
|
|
159
|
+
...typeof p.type != "string" && {
|
|
160
|
+
ariaDescribedBy: x
|
|
161
|
+
},
|
|
162
|
+
...O && {
|
|
163
|
+
tabIndex: 0
|
|
160
164
|
}
|
|
161
|
-
}) :
|
|
165
|
+
}) : p, Y = y ? {
|
|
162
166
|
tabIndex: 0,
|
|
163
167
|
role: "button",
|
|
164
|
-
"aria-label":
|
|
165
|
-
"aria-describedby":
|
|
166
|
-
onFocus:
|
|
168
|
+
"aria-label": S,
|
|
169
|
+
"aria-describedby": x,
|
|
170
|
+
onFocus: R,
|
|
167
171
|
onBlur: C,
|
|
168
|
-
onKeyDown:
|
|
169
|
-
} : void 0,
|
|
170
|
-
return F ? /* @__PURE__ */
|
|
172
|
+
onKeyDown: W
|
|
173
|
+
} : void 0, j = y ? void 0 : G;
|
|
174
|
+
return F ? /* @__PURE__ */ c.createElement("div", I({
|
|
171
175
|
className: "se-design-tooltip group relative inline-flex items-center min-w-0"
|
|
172
|
-
},
|
|
176
|
+
}, Q, Y, j), /* @__PURE__ */ c.createElement("div", {
|
|
173
177
|
className: "cursor-pointer flex items-center min-w-0",
|
|
174
|
-
ref: w ? void 0 :
|
|
175
|
-
onMouseEnter:
|
|
178
|
+
ref: w ? void 0 : E,
|
|
179
|
+
onMouseEnter: d === "always-on" ? void 0 : T,
|
|
176
180
|
onMouseLeave: C
|
|
177
|
-
},
|
|
181
|
+
}, X), L && /* @__PURE__ */ ee.createPortal(/* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement("style", null, `#${x}::before {
|
|
178
182
|
left: var(--arrow-left, 0);
|
|
179
183
|
top: var(--arrow-top, 0);
|
|
180
|
-
}`), /* @__PURE__ */
|
|
181
|
-
id:
|
|
184
|
+
}`), /* @__PURE__ */ c.createElement("div", {
|
|
185
|
+
id: x,
|
|
182
186
|
role: "tooltip",
|
|
183
187
|
className: `flex justify-center px-3 py-2 min-w-24 bg-[var(--color-gray-800)] text-[var(--color-white)] text-base rounded-[3px]
|
|
184
188
|
before:content-[' '] before:w-3.5 before:h-3.5 before:bg-[var(--color-gray-800)] before:inline-block
|
|
185
|
-
before:absolute before:rounded-tl-sm before:rotate-45 ${
|
|
189
|
+
before:absolute before:rounded-tl-sm before:rotate-45 ${_}`,
|
|
186
190
|
style: {
|
|
187
191
|
...q,
|
|
188
192
|
maxWidth: `${B}px`,
|
|
189
193
|
wordBreak: "break-word",
|
|
190
194
|
overflowWrap: "break-word",
|
|
191
|
-
visibility:
|
|
192
|
-
opacity:
|
|
193
|
-
pointerEvents:
|
|
194
|
-
transition:
|
|
195
|
+
visibility: k ? "visible" : "hidden",
|
|
196
|
+
opacity: k ? 1 : 0,
|
|
197
|
+
pointerEvents: k ? "auto" : "none",
|
|
198
|
+
transition: k ? "opacity 0.15s ease-in" : "none",
|
|
195
199
|
// Ensure it stays at 0,0 until positioned to avoid any visual flash
|
|
196
|
-
...
|
|
200
|
+
...k ? {} : {
|
|
197
201
|
position: "fixed",
|
|
198
202
|
top: "0px",
|
|
199
203
|
left: "0px"
|
|
200
204
|
}
|
|
201
205
|
},
|
|
202
|
-
onMouseEnter:
|
|
206
|
+
onMouseEnter: d === "always-on" ? void 0 : T,
|
|
203
207
|
onMouseLeave: C
|
|
204
|
-
},
|
|
208
|
+
}, H ? /* @__PURE__ */ c.createElement("p", {
|
|
205
209
|
className: "leading-normal"
|
|
206
|
-
},
|
|
210
|
+
}, v) : v)), document.body)) : /* @__PURE__ */ c.createElement("div", I({
|
|
207
211
|
className: "se-design-tooltip group relative inline-flex items-center min-w-0",
|
|
208
|
-
onClick:
|
|
209
|
-
},
|
|
212
|
+
onClick: J
|
|
213
|
+
}, Y, j), /* @__PURE__ */ c.createElement("div", {
|
|
210
214
|
className: "cursor-pointer flex items-center min-w-0"
|
|
211
|
-
},
|
|
215
|
+
}, X), /* @__PURE__ */ c.createElement("div", {
|
|
212
216
|
ref: M,
|
|
213
|
-
id:
|
|
217
|
+
id: x,
|
|
214
218
|
role: "tooltip",
|
|
215
219
|
className: `flex justify-center px-3 py-2 min-w-24 max-w-[${B}px]
|
|
216
220
|
absolute top-[calc(100%+8px)] w-max bg-[var(--color-gray-800)] text-[var(--color-white)] text-base rounded-[3px]
|
|
217
221
|
before:content-[' '] before:w-3.5 before:h-3.5 before:bg-[var(--color-gray-800)] before:inline-block
|
|
218
222
|
before:absolute before:rounded-tl-sm before:rotate-45`,
|
|
219
|
-
"data-automation-id":
|
|
220
|
-
},
|
|
223
|
+
"data-automation-id": K || "tooltip-content"
|
|
224
|
+
}, H ? /* @__PURE__ */ c.createElement("p", {
|
|
221
225
|
className: "leading-normal"
|
|
222
|
-
},
|
|
226
|
+
}, v) : v));
|
|
223
227
|
};
|
|
224
228
|
export {
|
|
225
|
-
|
|
229
|
+
de as Tooltip
|
|
226
230
|
};
|
|
227
231
|
//# sourceMappingURL=index16.js.map
|
package/dist/index16.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index16.js","sources":["../src/components/Tooltip/index.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\nimport ReactDOM, { flushSync } from 'react-dom';\nimport { useStableId } from '../../utils/useStableId';\nimport { useDismissOnFocusOut } from '../../utils/a11y';\n\nexport interface TooltipProps {\n /**\n * Tooltip contents\n */\n content: string | React.ReactNode;\n /**\n * Tooltip position\n */\n position?:\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right'\n | 'left-top'\n | 'left-center'\n | 'left-bottom'\n | 'right-top'\n | 'right-center'\n | 'right-bottom';\n /**\n * Display tooltip on Hover, Click or Always\n */\n displayOn?: 'hover' | 'click' | 'always-on';\n /**\n * Tooltip trigger contents\n */\n tooltipSrc?: React.ReactNode;\n /**\n * Tooltip trigger contents ref\n */\n tooltipSrcRef?: React.RefObject<HTMLElement>;\n /**\n * When true, the real trigger is disabled and cannot receive focus.\n * Tooltip will make its wrapper focusable and treat it as a \"button\" that reveals tooltip content.\n */\n isTriggerDisabled?: boolean;\n /**\n * Required when isTriggerDisabled is true. Provides an accessible name for the focusable wrapper trigger.\n */\n disabledTriggerAriaLabel?: string;\n /**\n * Max width of the tooltip content\n */\n maxWidth?: number;\n /**\n * Whether to use portal for the tooltip content\n */\n isWithPortal?: boolean;\n /**\n * Tooltip content classes\n */\n tooltipContentClasses?: string;\n /**\n * Tooltip offset\n */\n tooltipOffset?: number;\n /**\n * Automation ID for testing\n */\n automationId?: string;\n}\n\nexport const Tooltip = ({\n content,\n tooltipSrc,\n position = 'bottom-center',\n displayOn = 'hover',\n maxWidth = 240,\n isWithPortal = false,\n tooltipSrcRef = undefined,\n isTriggerDisabled = false,\n disabledTriggerAriaLabel = undefined,\n tooltipContentClasses = '',\n tooltipOffset = 8,\n automationId = ''\n}: TooltipProps) => {\n const [displayTooltip, setDisplayTooltip] = useState(false);\n const tooltipContentRef = useRef<HTMLDivElement>(null);\n // Support for external ref when provided\n const internalToolTipSrcRef = useRef<HTMLDivElement>(null);\n const tooltipSourceRef = (tooltipSrcRef || internalToolTipSrcRef) as React.RefObject<HTMLElement>;\n const [tooltipPortalStyle, setTooltipPortalStyle] = useState({});\n const [isPortalPositioned, setIsPortalPositioned] = useState(false);\n const hideTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const isContentString = typeof content === 'string';\n const tooltipContentId = useStableId(undefined, 'tooltip-content');\n\n // Helper to clear hide timeout\n const clearHideTimeout = () => {\n if (hideTimeoutRef.current) {\n clearTimeout(hideTimeoutRef.current);\n hideTimeoutRef.current = null;\n }\n };\n\n // Helper to schedule hide\n const scheduleHide = () => {\n if (displayOn !== 'always-on') {\n clearHideTimeout();\n hideTimeoutRef.current = setTimeout(() => setDisplayTooltip(false), 150);\n }\n };\n\n const showTooltip = () => {\n clearHideTimeout();\n setDisplayTooltip(true);\n };\n\n const onDisabledTriggerKeyDown = (e: React.KeyboardEvent) => {\n if (!isTriggerDisabled) return;\n if (e.key === 'Escape') {\n e.preventDefault();\n setDisplayTooltip(false);\n return;\n }\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n setDisplayTooltip((prev) => !prev);\n }\n };\n\n // Enabled trigger: use React focus/blur capture handlers (no native event listeners).\n // This keeps the tooltip open while focus stays anywhere inside the tooltip wrapper.\n const dismissOnFocusOutProps = useDismissOnFocusOut<HTMLDivElement>({\n disabled: isTriggerDisabled,\n onFocusIn: showTooltip,\n onFocusOut: scheduleHide,\n onEscape: () => setDisplayTooltip(false)\n });\n\n useEffect(() => {\n const tooltipContent = tooltipContentRef.current;\n\n if (!tooltipContent) {\n return;\n }\n\n if (position == 'bottom-center') {\n tooltipContent.setAttribute('style', `left: 50%;transform: translateX(-50%);`);\n tooltipContent.classList.add(`before:left-[calc(50%-7px)]`);\n tooltipContent.classList.add(`before:top-[-7px]`);\n } else if (position == 'bottom-left') {\n tooltipContent.classList.add(`before:left-[calc(10%-7px)]`);\n tooltipContent.classList.add(`before:top-[-7px]`);\n } else if (position == 'bottom-right') {\n tooltipContent.setAttribute('style', `right: 0;`);\n tooltipContent.classList.add(`before:right-[calc(10%+7px)]`);\n tooltipContent.classList.add(`before:top-[-7px]`);\n } else if (position == 'top-center') {\n tooltipContent.setAttribute('style', `left: 50%;transform: translateX(-50%);bottom: calc(100% + 8px);`);\n tooltipContent.classList.add(`before:left-[calc(50%-7px)]`);\n tooltipContent.classList.add(`before:bottom-[-7px]`);\n } else if (position == 'top-left') {\n tooltipContent.setAttribute('style', `bottom: calc(100% + 8px);`);\n tooltipContent.classList.add(`before:left-[calc(10%-7px)]`);\n tooltipContent.classList.add(`before:bottom-[-7px]`);\n } else if (position == 'top-right') {\n tooltipContent.setAttribute('style', `right: 0;bottom: calc(100% + 8px);`);\n tooltipContent.classList.add(`before:right-[calc(10%+7px)]`);\n tooltipContent.classList.add(`before:bottom-[-7px]`);\n } else if (position == 'left-top') {\n tooltipContent.setAttribute('style', `right: calc(100% + 10px);top:0;`);\n tooltipContent.classList.add(`before:right-[-6px]`);\n tooltipContent.classList.add(`before:top-[7px]`);\n } else if (position == 'left-center') {\n tooltipContent.setAttribute('style', `right: calc(100% + 10px);top: 50%;transform: translateY(-50%);`);\n tooltipContent.classList.add(`before:right-[-6px]`);\n tooltipContent.classList.add(`before:top-[calc(50%-7px)]`);\n } else if (position == 'left-bottom') {\n tooltipContent.setAttribute('style', `right: calc(100% + 10px);bottom:0;`);\n tooltipContent.classList.add(`before:right-[-6px]`);\n tooltipContent.classList.add(`before:bottom-[7px]`);\n } else if (position == 'right-top') {\n tooltipContent.setAttribute('style', `left: calc(100% + 10px);top:0;`);\n tooltipContent.classList.add(`before:left-[-6px]`);\n tooltipContent.classList.add(`before:top-[7px]`);\n } else if (position == 'right-center') {\n tooltipContent.setAttribute('style', `left: calc(100% + 10px);top: 50%;transform: translateY(-50%);`);\n tooltipContent.classList.add(`before:left-[-6px]`);\n tooltipContent.classList.add(`before:top-[calc(50%-7px)]`);\n } else if (position == 'right-bottom') {\n tooltipContent.setAttribute('style', `left: calc(100% + 10px);bottom:0;`);\n tooltipContent.classList.add(`before:left-[-6px]`);\n tooltipContent.classList.add(`before:bottom-[7px]`);\n }\n\n if (displayOn == 'hover') {\n tooltipContent.classList.add(`group-hover:visible`);\n }\n }, [content]);\n\n useEffect(() => {\n const tooltipContent = tooltipContentRef.current;\n\n if (!tooltipContent) {\n return;\n }\n if (displayTooltip) {\n tooltipContent.classList.remove(`invisible`);\n } else {\n tooltipContent.classList.add(`invisible`);\n }\n }, [displayTooltip]);\n\n // Ensure tooltip stays open when displayOn is always-on\n useEffect(() => {\n if (displayOn === 'always-on') {\n setDisplayTooltip(true);\n }\n }, [displayOn]);\n\n const onTooltipSrcClick = () => {\n if (displayOn == 'click') {\n setDisplayTooltip((displayTooltip) => !displayTooltip);\n }\n };\n\n const toggleTooltip = () => {\n setDisplayTooltip((displayTooltip) => !displayTooltip);\n };\n\n const events = {\n ...(displayOn === 'click' && { onClick: toggleTooltip }),\n ...(displayOn === 'hover' && {\n onMouseEnter: () => setDisplayTooltip(true),\n onMouseLeave: () => setDisplayTooltip(false)\n })\n };\n\n const calculateTooltipPortalStyle = () => {\n const refToUse = tooltipSourceRef.current;\n if (!refToUse) {\n return {};\n }\n\n const srcRect = refToUse.getBoundingClientRect();\n const scrollX = window.scrollX || window.pageXOffset;\n const scrollY = window.scrollY || window.pageYOffset;\n const arrowSize = 14; // 14px (3.5 * 4 = 14px in Tailwind)\n\n // Get tooltip content dimensions if available\n const tooltipElement = document.getElementById(tooltipContentId);\n const tooltipWidth = tooltipElement?.offsetWidth || 0;\n const tooltipHeight = tooltipElement?.offsetHeight || 0;\n\n let top = 0;\n let left = 0;\n let arrowLeft = 0;\n let arrowTop = 0;\n\n switch (position) {\n case 'bottom-center':\n top = srcRect.bottom + scrollY + tooltipOffset;\n left = srcRect.left + scrollX + srcRect.width / 2 - tooltipWidth / 2;\n arrowLeft = tooltipWidth / 2 - arrowSize / 2;\n arrowTop = -arrowSize / 2;\n break;\n case 'bottom-left':\n top = srcRect.bottom + scrollY + tooltipOffset;\n left = srcRect.left + scrollX;\n arrowLeft = tooltipWidth * 0.1 - arrowSize / 2;\n arrowTop = -arrowSize / 2;\n break;\n case 'bottom-right':\n top = srcRect.bottom + scrollY + tooltipOffset;\n left = srcRect.right + scrollX - tooltipWidth;\n arrowLeft = tooltipWidth - tooltipWidth * 0.1 - arrowSize / 2;\n arrowTop = -arrowSize / 2;\n break;\n case 'top-center':\n top = srcRect.top + scrollY - tooltipHeight - tooltipOffset;\n left = srcRect.left + scrollX + srcRect.width / 2 - tooltipWidth / 2;\n arrowLeft = tooltipWidth / 2 - arrowSize / 2;\n arrowTop = tooltipHeight - arrowSize / 2;\n break;\n case 'top-left':\n top = srcRect.top + scrollY - tooltipHeight - tooltipOffset;\n left = srcRect.left + scrollX;\n arrowLeft = tooltipWidth * 0.1 - arrowSize / 2;\n arrowTop = tooltipHeight - arrowSize / 2;\n break;\n case 'top-right':\n top = srcRect.top + scrollY - tooltipHeight - tooltipOffset;\n left = srcRect.right + scrollX - tooltipWidth;\n arrowLeft = tooltipWidth - tooltipWidth * 0.1 - arrowSize / 2;\n arrowTop = tooltipHeight - arrowSize / 2;\n break;\n case 'left-top':\n top = srcRect.top + scrollY;\n left = srcRect.left + scrollX - tooltipWidth - tooltipOffset;\n arrowLeft = tooltipWidth - arrowSize / 2;\n arrowTop = arrowSize / 2;\n break;\n case 'left-center':\n top = srcRect.top + scrollY + srcRect.height / 2 - tooltipHeight / 2;\n left = srcRect.left + scrollX - tooltipWidth - tooltipOffset;\n arrowLeft = tooltipWidth - arrowSize / 2;\n arrowTop = tooltipHeight / 2 - arrowSize / 2;\n break;\n case 'left-bottom':\n top = srcRect.bottom + scrollY - tooltipHeight;\n left = srcRect.left + scrollX - tooltipWidth - tooltipOffset;\n arrowLeft = tooltipWidth - arrowSize / 2;\n arrowTop = tooltipHeight - arrowSize / 2;\n break;\n case 'right-top':\n top = srcRect.top + scrollY;\n left = srcRect.right + scrollX + tooltipOffset;\n arrowLeft = -arrowSize / 2;\n arrowTop = arrowSize / 2;\n break;\n case 'right-center':\n top = srcRect.top + scrollY + srcRect.height / 2 - tooltipHeight / 2;\n left = srcRect.right + scrollX + tooltipOffset;\n arrowLeft = -arrowSize / 2;\n arrowTop = tooltipHeight / 2 - arrowSize / 2;\n break;\n case 'right-bottom':\n top = srcRect.bottom + scrollY - tooltipHeight;\n left = srcRect.right + scrollX + tooltipOffset;\n arrowLeft = -arrowSize / 2;\n arrowTop = tooltipHeight - arrowSize / 2;\n break;\n default:\n top = srcRect.bottom + scrollY + tooltipOffset;\n left = srcRect.left + scrollX + srcRect.width / 2 - tooltipWidth / 2;\n arrowLeft = tooltipWidth / 2 - arrowSize / 2;\n arrowTop = -arrowSize / 2;\n break;\n }\n\n return {\n position: 'absolute',\n top: `${top}px`,\n left: `${left}px`,\n zIndex: 9999,\n '--arrow-left': `${arrowLeft}px`,\n '--arrow-top': `${arrowTop}px`\n } as React.CSSProperties & { '--arrow-left': string; '--arrow-top': string };\n };\n\n useEffect(() => {\n if (!displayTooltip || !isWithPortal) {\n setIsPortalPositioned(false);\n return;\n }\n\n const updatePosition = () => {\n const tooltipElement = document.getElementById(tooltipContentId);\n\n // Wait for tooltip to be rendered and have valid dimensions\n if (!tooltipElement || tooltipElement.offsetHeight === 0) {\n requestAnimationFrame(updatePosition);\n return;\n }\n\n const calculatedStyle = calculateTooltipPortalStyle();\n \n // Batch both state updates into a single synchronous render using flushSync\n flushSync(() => {\n setTooltipPortalStyle(calculatedStyle);\n setIsPortalPositioned(true);\n });\n };\n\n // Initial position calculation\n const timeout = setTimeout(updatePosition, tooltipSrcRef ? 60 : 10);\n\n const handleClick = (e: MouseEvent) => {\n const tooltip = document.getElementById(tooltipContentId);\n const source = tooltipSourceRef.current;\n const target = e.target as Node;\n\n if (tooltip && source && !tooltip.contains(target) && !source.contains(target)) {\n setDisplayTooltip(false);\n }\n };\n\n // Only add click listener if not always-on\n const shouldAddClickListener = displayOn !== 'always-on';\n if (shouldAddClickListener) {\n document.body.addEventListener('click', handleClick, true);\n }\n window.addEventListener('scroll', updatePosition, true);\n window.addEventListener('resize', updatePosition);\n\n // Watch for style changes on the source element when tooltipSrcRef is provided\n // This ensures the tooltip position updates when the blocker is repositioned\n let mutationObserver: MutationObserver | null = null;\n if (tooltipSrcRef && tooltipSourceRef.current) {\n mutationObserver = new MutationObserver(() => {\n updatePosition();\n });\n mutationObserver.observe(tooltipSourceRef.current, {\n attributes: true,\n attributeFilter: ['style', 'class']\n });\n }\n\n return () => {\n clearTimeout(timeout);\n clearHideTimeout();\n if (shouldAddClickListener) {\n document.body.removeEventListener('click', handleClick, true);\n }\n window.removeEventListener('scroll', updatePosition, true);\n window.removeEventListener('resize', updatePosition);\n if (mutationObserver) {\n mutationObserver.disconnect();\n }\n };\n }, [displayTooltip, isWithPortal, position, displayOn, tooltipSrcRef, tooltipContentId]);\n\n // For enabled triggers: link trigger to tooltip content via aria-describedby so screen\n // readers announce tooltip text on focus. Native elements need kebab-case only;\n // se-design components (Icon, Button) also accept camelCase ariaDescribedBy prop.\n // Disabled trigger already wires aria-describedby in disabledTriggerProps.\n const linkedTooltipSrc =\n !isTriggerDisabled && React.isValidElement(tooltipSrc)\n ? React.cloneElement(tooltipSrc as React.ReactElement<any>, {\n 'aria-describedby': tooltipContentId,\n ...(typeof tooltipSrc.type !== 'string' && { ariaDescribedBy: tooltipContentId })\n })\n : tooltipSrc;\n\n const disabledTriggerProps = isTriggerDisabled\n ? {\n tabIndex: 0,\n role: 'button' as const,\n 'aria-label': disabledTriggerAriaLabel,\n 'aria-describedby': tooltipContentId,\n onFocus: showTooltip,\n onBlur: scheduleHide,\n onKeyDown: onDisabledTriggerKeyDown\n }\n : undefined;\n\n const enabledTriggerProps = !isTriggerDisabled\n ? dismissOnFocusOutProps\n : undefined;\n\n return !isWithPortal ? (\n <div\n className=\"se-design-tooltip group relative inline-flex items-center min-w-0\"\n onClick={onTooltipSrcClick}\n {...disabledTriggerProps}\n {...enabledTriggerProps}\n >\n <div className=\"cursor-pointer flex items-center min-w-0\">\n {linkedTooltipSrc}\n </div>\n <div\n ref={tooltipContentRef}\n id={tooltipContentId}\n role=\"tooltip\"\n className={`flex justify-center px-3 py-2 min-w-24 max-w-[${maxWidth}px]\n absolute top-[calc(100%+8px)] w-max bg-[var(--color-gray-800)] text-[var(--color-white)] text-base rounded-[3px]\n before:content-[' '] before:w-3.5 before:h-3.5 before:bg-[var(--color-gray-800)] before:inline-block\n before:absolute before:rounded-tl-sm before:rotate-45`}\n data-automation-id={automationId || 'tooltip-content'}\n >\n {isContentString ? <p className=\"leading-normal\">{content}</p> : content}\n </div>\n </div>\n ) : (\n <div\n className=\"se-design-tooltip group relative inline-flex items-center min-w-0\"\n {...events}\n {...disabledTriggerProps}\n {...enabledTriggerProps}\n >\n <div\n className=\"cursor-pointer flex items-center min-w-0\"\n ref={tooltipSrcRef ? undefined : (tooltipSourceRef as React.RefObject<HTMLDivElement>)}\n onMouseEnter={displayOn === 'always-on' ? undefined : clearHideTimeout}\n onMouseLeave={scheduleHide}\n >\n {linkedTooltipSrc}\n </div>\n {displayTooltip &&\n ReactDOM.createPortal(\n <>\n <style>\n {`#${tooltipContentId}::before {\n left: var(--arrow-left, 0);\n top: var(--arrow-top, 0);\n }`}\n </style>\n <div\n id={tooltipContentId}\n role=\"tooltip\"\n className={`flex justify-center px-3 py-2 min-w-24 bg-[var(--color-gray-800)] text-[var(--color-white)] text-base rounded-[3px]\n before:content-[' '] before:w-3.5 before:h-3.5 before:bg-[var(--color-gray-800)] before:inline-block\n before:absolute before:rounded-tl-sm before:rotate-45 ${tooltipContentClasses}`}\n style={{\n ...tooltipPortalStyle,\n maxWidth: `${maxWidth}px`,\n wordBreak: 'break-word',\n overflowWrap: 'break-word',\n visibility: isPortalPositioned ? 'visible' : 'hidden',\n opacity: isPortalPositioned ? 1 : 0,\n pointerEvents: isPortalPositioned ? 'auto' : 'none',\n transition: isPortalPositioned ? 'opacity 0.15s ease-in' : 'none',\n // Ensure it stays at 0,0 until positioned to avoid any visual flash\n ...(isPortalPositioned ? {} : { position: 'fixed', top: '0px', left: '0px' })\n }}\n onMouseEnter={displayOn === 'always-on' ? undefined : clearHideTimeout}\n onMouseLeave={scheduleHide}\n >\n {isContentString ? <p className=\"leading-normal\">{content}</p> : content}\n </div>\n </>,\n document.body\n )}\n </div>\n );\n};\n"],"names":["Tooltip","content","tooltipSrc","position","displayOn","maxWidth","isWithPortal","tooltipSrcRef","undefined","isTriggerDisabled","disabledTriggerAriaLabel","tooltipContentClasses","tooltipOffset","automationId","displayTooltip","setDisplayTooltip","useState","tooltipContentRef","useRef","internalToolTipSrcRef","tooltipSourceRef","tooltipPortalStyle","setTooltipPortalStyle","isPortalPositioned","setIsPortalPositioned","hideTimeoutRef","isContentString","tooltipContentId","useStableId","clearHideTimeout","current","clearTimeout","scheduleHide","setTimeout","showTooltip","onDisabledTriggerKeyDown","e","key","preventDefault","prev","dismissOnFocusOutProps","useDismissOnFocusOut","disabled","onFocusIn","onFocusOut","onEscape","useEffect","tooltipContent","setAttribute","classList","add","remove","onTooltipSrcClick","events","onClick","toggleTooltip","onMouseEnter","onMouseLeave","calculateTooltipPortalStyle","refToUse","srcRect","getBoundingClientRect","scrollX","window","pageXOffset","scrollY","pageYOffset","arrowSize","tooltipElement","document","getElementById","tooltipWidth","offsetWidth","tooltipHeight","offsetHeight","top","left","arrowLeft","arrowTop","bottom","width","right","height","zIndex","updatePosition","requestAnimationFrame","calculatedStyle","flushSync","timeout","handleClick","tooltip","source","target","contains","shouldAddClickListener","body","addEventListener","mutationObserver","MutationObserver","observe","attributes","attributeFilter","removeEventListener","disconnect","linkedTooltipSrc","React","isValidElement","cloneElement","type","ariaDescribedBy","disabledTriggerProps","tabIndex","role","onFocus","onBlur","onKeyDown","enabledTriggerProps","createElement","_extends","className","ref","ReactDOM","createPortal","Fragment","id","style","wordBreak","overflowWrap","visibility","opacity","pointerEvents","transition"],"mappings":";;;;;;;;;;;;;;AAqEO,MAAMA,KAAUA,CAAC;AAAA,EACtBC,SAAAA;AAAAA,EACAC,YAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,WAAAA,IAAY;AAAA,EACZC,UAAAA,IAAW;AAAA,EACXC,cAAAA,IAAe;AAAA,EACfC,eAAAA,IAAgBC;AAAAA,EAChBC,mBAAAA,IAAoB;AAAA,EACpBC,0BAAAA,IAA2BF;AAA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,CAAQ;AAAA;AAAA;AAAA;AAAA,IAIpE,sBAAoBQ,KAAgB;AAAA,EAAA,GAEnCa,IAAkB+E,gBAAAA,EAAAY,cAAA,KAAA;AAAA,IAAGE,WAAU;AAAA,EAAA,GAAkBtH,CAAW,IAAIA,CAC9D,CACF;AAqDT;"}
|
|
1
|
+
{"version":3,"file":"index16.js","sources":["../src/components/Tooltip/index.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\nimport ReactDOM, { flushSync } from 'react-dom';\nimport { useStableId } from '../../utils/useStableId';\nimport { useDismissOnFocusOut } from '../../utils/a11y';\n\nexport interface TooltipProps {\n /**\n * Tooltip contents\n */\n content: string | React.ReactNode;\n /**\n * Tooltip position\n */\n position?:\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right'\n | 'left-top'\n | 'left-center'\n | 'left-bottom'\n | 'right-top'\n | 'right-center'\n | 'right-bottom';\n /**\n * Display tooltip on Hover, Click or Always\n */\n displayOn?: 'hover' | 'click' | 'always-on';\n /**\n * Tooltip trigger contents\n */\n tooltipSrc?: React.ReactNode;\n /**\n * Tooltip trigger contents ref\n */\n tooltipSrcRef?: React.RefObject<HTMLElement>;\n /**\n * When true, the real trigger is disabled and cannot receive focus.\n * Tooltip will make its wrapper focusable and treat it as a \"button\" that reveals tooltip content.\n */\n isTriggerDisabled?: boolean;\n /**\n * Required when isTriggerDisabled is true. Provides an accessible name for the focusable wrapper trigger.\n */\n disabledTriggerAriaLabel?: string;\n /**\n * When true, tooltip is suppressed — renders tooltipSrc only, no tooltip behavior.\n */\n disabled?: boolean;\n /**\n * Max width of the tooltip content\n */\n maxWidth?: number;\n /**\n * Whether to use portal for the tooltip content\n */\n isWithPortal?: boolean;\n /**\n * Tooltip content classes\n */\n tooltipContentClasses?: string;\n /**\n * Tooltip offset\n */\n tooltipOffset?: number;\n /**\n * Automation ID for testing\n */\n automationId?: string;\n}\n\nexport const Tooltip = ({\n content,\n tooltipSrc,\n position = 'bottom-center',\n displayOn = 'hover',\n disabled = false,\n maxWidth = 240,\n isWithPortal = false,\n tooltipSrcRef = undefined,\n isTriggerDisabled = false,\n disabledTriggerAriaLabel = undefined,\n tooltipContentClasses = '',\n tooltipOffset = 8,\n automationId = ''\n}: TooltipProps) => {\n const [displayTooltip, setDisplayTooltip] = useState(false);\n const tooltipContentRef = useRef<HTMLDivElement>(null);\n // Support for external ref when provided\n const internalToolTipSrcRef = useRef<HTMLDivElement>(null);\n const tooltipSourceRef = (tooltipSrcRef || internalToolTipSrcRef) as React.RefObject<HTMLElement>;\n const [tooltipPortalStyle, setTooltipPortalStyle] = useState({});\n const [isPortalPositioned, setIsPortalPositioned] = useState(false);\n const hideTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const isContentString = typeof content === 'string';\n const tooltipContentId = useStableId(undefined, 'tooltip-content');\n\n // Helper to clear hide timeout\n const clearHideTimeout = () => {\n if (hideTimeoutRef.current) {\n clearTimeout(hideTimeoutRef.current);\n hideTimeoutRef.current = null;\n }\n };\n\n // Helper to schedule hide\n const scheduleHide = () => {\n if (displayOn !== 'always-on') {\n clearHideTimeout();\n hideTimeoutRef.current = setTimeout(() => setDisplayTooltip(false), 150);\n }\n };\n\n const showTooltip = () => {\n clearHideTimeout();\n setDisplayTooltip(true);\n };\n\n const onDisabledTriggerKeyDown = (e: React.KeyboardEvent) => {\n if (!isTriggerDisabled) return;\n if (e.key === 'Escape') {\n e.preventDefault();\n setDisplayTooltip(false);\n return;\n }\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n setDisplayTooltip((prev) => !prev);\n }\n };\n\n // Enabled trigger: use React focus/blur capture handlers (no native event listeners).\n // This keeps the tooltip open while focus stays anywhere inside the tooltip wrapper.\n const dismissOnFocusOutProps = useDismissOnFocusOut<HTMLDivElement>({\n disabled: isTriggerDisabled,\n onFocusIn: showTooltip,\n onFocusOut: scheduleHide,\n onEscape: () => setDisplayTooltip(false)\n });\n\n useEffect(() => {\n const tooltipContent = tooltipContentRef.current;\n\n if (!tooltipContent) {\n return;\n }\n\n if (position == 'bottom-center') {\n tooltipContent.setAttribute('style', `left: 50%;transform: translateX(-50%);`);\n tooltipContent.classList.add(`before:left-[calc(50%-7px)]`);\n tooltipContent.classList.add(`before:top-[-7px]`);\n } else if (position == 'bottom-left') {\n tooltipContent.classList.add(`before:left-[calc(10%-7px)]`);\n tooltipContent.classList.add(`before:top-[-7px]`);\n } else if (position == 'bottom-right') {\n tooltipContent.setAttribute('style', `right: 0;`);\n tooltipContent.classList.add(`before:right-[calc(10%+7px)]`);\n tooltipContent.classList.add(`before:top-[-7px]`);\n } else if (position == 'top-center') {\n tooltipContent.setAttribute('style', `left: 50%;transform: translateX(-50%);bottom: calc(100% + 8px);`);\n tooltipContent.classList.add(`before:left-[calc(50%-7px)]`);\n tooltipContent.classList.add(`before:bottom-[-7px]`);\n } else if (position == 'top-left') {\n tooltipContent.setAttribute('style', `bottom: calc(100% + 8px);`);\n tooltipContent.classList.add(`before:left-[calc(10%-7px)]`);\n tooltipContent.classList.add(`before:bottom-[-7px]`);\n } else if (position == 'top-right') {\n tooltipContent.setAttribute('style', `right: 0;bottom: calc(100% + 8px);`);\n tooltipContent.classList.add(`before:right-[calc(10%+7px)]`);\n tooltipContent.classList.add(`before:bottom-[-7px]`);\n } else if (position == 'left-top') {\n tooltipContent.setAttribute('style', `right: calc(100% + 10px);top:0;`);\n tooltipContent.classList.add(`before:right-[-6px]`);\n tooltipContent.classList.add(`before:top-[7px]`);\n } else if (position == 'left-center') {\n tooltipContent.setAttribute('style', `right: calc(100% + 10px);top: 50%;transform: translateY(-50%);`);\n tooltipContent.classList.add(`before:right-[-6px]`);\n tooltipContent.classList.add(`before:top-[calc(50%-7px)]`);\n } else if (position == 'left-bottom') {\n tooltipContent.setAttribute('style', `right: calc(100% + 10px);bottom:0;`);\n tooltipContent.classList.add(`before:right-[-6px]`);\n tooltipContent.classList.add(`before:bottom-[7px]`);\n } else if (position == 'right-top') {\n tooltipContent.setAttribute('style', `left: calc(100% + 10px);top:0;`);\n tooltipContent.classList.add(`before:left-[-6px]`);\n tooltipContent.classList.add(`before:top-[7px]`);\n } else if (position == 'right-center') {\n tooltipContent.setAttribute('style', `left: calc(100% + 10px);top: 50%;transform: translateY(-50%);`);\n tooltipContent.classList.add(`before:left-[-6px]`);\n tooltipContent.classList.add(`before:top-[calc(50%-7px)]`);\n } else if (position == 'right-bottom') {\n tooltipContent.setAttribute('style', `left: calc(100% + 10px);bottom:0;`);\n tooltipContent.classList.add(`before:left-[-6px]`);\n tooltipContent.classList.add(`before:bottom-[7px]`);\n }\n\n if (displayOn == 'hover') {\n tooltipContent.classList.add(`group-hover:visible`);\n }\n }, [content]);\n\n useEffect(() => {\n const tooltipContent = tooltipContentRef.current;\n\n if (!tooltipContent) {\n return;\n }\n if (displayTooltip) {\n tooltipContent.classList.remove(`invisible`);\n } else {\n tooltipContent.classList.add(`invisible`);\n }\n }, [displayTooltip]);\n\n // Ensure tooltip stays open when displayOn is always-on\n useEffect(() => {\n if (displayOn === 'always-on') {\n setDisplayTooltip(true);\n }\n }, [displayOn]);\n\n const onTooltipSrcClick = () => {\n if (displayOn == 'click') {\n setDisplayTooltip((displayTooltip) => !displayTooltip);\n }\n };\n\n const toggleTooltip = () => {\n setDisplayTooltip((displayTooltip) => !displayTooltip);\n };\n\n const events = {\n ...(displayOn === 'click' && { onClick: toggleTooltip }),\n ...(displayOn === 'hover' && {\n onMouseEnter: () => setDisplayTooltip(true),\n onMouseLeave: () => setDisplayTooltip(false)\n })\n };\n\n const calculateTooltipPortalStyle = () => {\n const refToUse = tooltipSourceRef.current;\n if (!refToUse) {\n return {};\n }\n\n const srcRect = refToUse.getBoundingClientRect();\n const scrollX = window.scrollX || window.pageXOffset;\n const scrollY = window.scrollY || window.pageYOffset;\n const arrowSize = 14; // 14px (3.5 * 4 = 14px in Tailwind)\n\n // Get tooltip content dimensions if available\n const tooltipElement = document.getElementById(tooltipContentId);\n const tooltipWidth = tooltipElement?.offsetWidth || 0;\n const tooltipHeight = tooltipElement?.offsetHeight || 0;\n\n let top = 0;\n let left = 0;\n let arrowLeft = 0;\n let arrowTop = 0;\n\n switch (position) {\n case 'bottom-center':\n top = srcRect.bottom + scrollY + tooltipOffset;\n left = srcRect.left + scrollX + srcRect.width / 2 - tooltipWidth / 2;\n arrowLeft = tooltipWidth / 2 - arrowSize / 2;\n arrowTop = -arrowSize / 2;\n break;\n case 'bottom-left':\n top = srcRect.bottom + scrollY + tooltipOffset;\n left = srcRect.left + scrollX;\n arrowLeft = tooltipWidth * 0.1 - arrowSize / 2;\n arrowTop = -arrowSize / 2;\n break;\n case 'bottom-right':\n top = srcRect.bottom + scrollY + tooltipOffset;\n left = srcRect.right + scrollX - tooltipWidth;\n arrowLeft = tooltipWidth - tooltipWidth * 0.1 - arrowSize / 2;\n arrowTop = -arrowSize / 2;\n break;\n case 'top-center':\n top = srcRect.top + scrollY - tooltipHeight - tooltipOffset;\n left = srcRect.left + scrollX + srcRect.width / 2 - tooltipWidth / 2;\n arrowLeft = tooltipWidth / 2 - arrowSize / 2;\n arrowTop = tooltipHeight - arrowSize / 2;\n break;\n case 'top-left':\n top = srcRect.top + scrollY - tooltipHeight - tooltipOffset;\n left = srcRect.left + scrollX;\n arrowLeft = tooltipWidth * 0.1 - arrowSize / 2;\n arrowTop = tooltipHeight - arrowSize / 2;\n break;\n case 'top-right':\n top = srcRect.top + scrollY - tooltipHeight - tooltipOffset;\n left = srcRect.right + scrollX - tooltipWidth;\n arrowLeft = tooltipWidth - tooltipWidth * 0.1 - arrowSize / 2;\n arrowTop = tooltipHeight - arrowSize / 2;\n break;\n case 'left-top':\n top = srcRect.top + scrollY;\n left = srcRect.left + scrollX - tooltipWidth - tooltipOffset;\n arrowLeft = tooltipWidth - arrowSize / 2;\n arrowTop = arrowSize / 2;\n break;\n case 'left-center':\n top = srcRect.top + scrollY + srcRect.height / 2 - tooltipHeight / 2;\n left = srcRect.left + scrollX - tooltipWidth - tooltipOffset;\n arrowLeft = tooltipWidth - arrowSize / 2;\n arrowTop = tooltipHeight / 2 - arrowSize / 2;\n break;\n case 'left-bottom':\n top = srcRect.bottom + scrollY - tooltipHeight;\n left = srcRect.left + scrollX - tooltipWidth - tooltipOffset;\n arrowLeft = tooltipWidth - arrowSize / 2;\n arrowTop = tooltipHeight - arrowSize / 2;\n break;\n case 'right-top':\n top = srcRect.top + scrollY;\n left = srcRect.right + scrollX + tooltipOffset;\n arrowLeft = -arrowSize / 2;\n arrowTop = arrowSize / 2;\n break;\n case 'right-center':\n top = srcRect.top + scrollY + srcRect.height / 2 - tooltipHeight / 2;\n left = srcRect.right + scrollX + tooltipOffset;\n arrowLeft = -arrowSize / 2;\n arrowTop = tooltipHeight / 2 - arrowSize / 2;\n break;\n case 'right-bottom':\n top = srcRect.bottom + scrollY - tooltipHeight;\n left = srcRect.right + scrollX + tooltipOffset;\n arrowLeft = -arrowSize / 2;\n arrowTop = tooltipHeight - arrowSize / 2;\n break;\n default:\n top = srcRect.bottom + scrollY + tooltipOffset;\n left = srcRect.left + scrollX + srcRect.width / 2 - tooltipWidth / 2;\n arrowLeft = tooltipWidth / 2 - arrowSize / 2;\n arrowTop = -arrowSize / 2;\n break;\n }\n\n return {\n position: 'absolute',\n top: `${top}px`,\n left: `${left}px`,\n zIndex: 9999,\n '--arrow-left': `${arrowLeft}px`,\n '--arrow-top': `${arrowTop}px`\n } as React.CSSProperties & { '--arrow-left': string; '--arrow-top': string };\n };\n\n useEffect(() => {\n if (!displayTooltip || !isWithPortal) {\n setIsPortalPositioned(false);\n return;\n }\n\n const updatePosition = () => {\n const tooltipElement = document.getElementById(tooltipContentId);\n\n // Wait for tooltip to be rendered and have valid dimensions\n if (!tooltipElement || tooltipElement.offsetHeight === 0) {\n requestAnimationFrame(updatePosition);\n return;\n }\n\n const calculatedStyle = calculateTooltipPortalStyle();\n \n // Batch both state updates into a single synchronous render using flushSync\n flushSync(() => {\n setTooltipPortalStyle(calculatedStyle);\n setIsPortalPositioned(true);\n });\n };\n\n // Initial position calculation\n const timeout = setTimeout(updatePosition, tooltipSrcRef ? 60 : 10);\n\n const handleClick = (e: MouseEvent) => {\n const tooltip = document.getElementById(tooltipContentId);\n const source = tooltipSourceRef.current;\n const target = e.target as Node;\n\n if (tooltip && source && !tooltip.contains(target) && !source.contains(target)) {\n setDisplayTooltip(false);\n }\n };\n\n // Only add click listener if not always-on\n const shouldAddClickListener = displayOn !== 'always-on';\n if (shouldAddClickListener) {\n document.body.addEventListener('click', handleClick, true);\n }\n window.addEventListener('scroll', updatePosition, true);\n window.addEventListener('resize', updatePosition);\n\n // Watch for style changes on the source element when tooltipSrcRef is provided\n // This ensures the tooltip position updates when the blocker is repositioned\n let mutationObserver: MutationObserver | null = null;\n if (tooltipSrcRef && tooltipSourceRef.current) {\n mutationObserver = new MutationObserver(() => {\n updatePosition();\n });\n mutationObserver.observe(tooltipSourceRef.current, {\n attributes: true,\n attributeFilter: ['style', 'class']\n });\n }\n\n return () => {\n clearTimeout(timeout);\n clearHideTimeout();\n if (shouldAddClickListener) {\n document.body.removeEventListener('click', handleClick, true);\n }\n window.removeEventListener('scroll', updatePosition, true);\n window.removeEventListener('resize', updatePosition);\n if (mutationObserver) {\n mutationObserver.disconnect();\n }\n };\n }, [displayTooltip, isWithPortal, position, displayOn, tooltipSrcRef, tooltipContentId]);\n\n // For enabled triggers: link trigger to tooltip content via aria-describedby so screen\n // readers announce tooltip text on focus. Native elements need kebab-case only;\n // se-design components (Icon, Button) also accept camelCase ariaDescribedBy prop.\n // Disabled trigger already wires aria-describedby in disabledTriggerProps.\n if (disabled) return <>{tooltipSrc}</>;\n\n // Auto-add tabIndex={0} to disabled sources so they remain reachable for tooltip hover/focus\n const isSourceDisabled = React.isValidElement<{ disabled?: boolean }>(tooltipSrc) && tooltipSrc.props.disabled;\n const linkedTooltipSrc =\n !isTriggerDisabled && React.isValidElement(tooltipSrc)\n ? React.cloneElement(tooltipSrc as React.ReactElement<any>, {\n 'aria-describedby': tooltipContentId,\n ...(typeof tooltipSrc.type !== 'string' && { ariaDescribedBy: tooltipContentId }),\n ...(isSourceDisabled && { tabIndex: 0 })\n })\n : tooltipSrc;\n\n const disabledTriggerProps = isTriggerDisabled\n ? {\n tabIndex: 0,\n role: 'button' as const,\n 'aria-label': disabledTriggerAriaLabel,\n 'aria-describedby': tooltipContentId,\n onFocus: showTooltip,\n onBlur: scheduleHide,\n onKeyDown: onDisabledTriggerKeyDown\n }\n : undefined;\n\n const enabledTriggerProps = !isTriggerDisabled\n ? dismissOnFocusOutProps\n : undefined;\n\n return !isWithPortal ? (\n <div\n className=\"se-design-tooltip group relative inline-flex items-center min-w-0\"\n onClick={onTooltipSrcClick}\n {...disabledTriggerProps}\n {...enabledTriggerProps}\n >\n <div className=\"cursor-pointer flex items-center min-w-0\">\n {linkedTooltipSrc}\n </div>\n <div\n ref={tooltipContentRef}\n id={tooltipContentId}\n role=\"tooltip\"\n className={`flex justify-center px-3 py-2 min-w-24 max-w-[${maxWidth}px]\n absolute top-[calc(100%+8px)] w-max bg-[var(--color-gray-800)] text-[var(--color-white)] text-base rounded-[3px]\n before:content-[' '] before:w-3.5 before:h-3.5 before:bg-[var(--color-gray-800)] before:inline-block\n before:absolute before:rounded-tl-sm before:rotate-45`}\n data-automation-id={automationId || 'tooltip-content'}\n >\n {isContentString ? <p className=\"leading-normal\">{content}</p> : content}\n </div>\n </div>\n ) : (\n <div\n className=\"se-design-tooltip group relative inline-flex items-center min-w-0\"\n {...events}\n {...disabledTriggerProps}\n {...enabledTriggerProps}\n >\n <div\n className=\"cursor-pointer flex items-center min-w-0\"\n ref={tooltipSrcRef ? undefined : (tooltipSourceRef as React.RefObject<HTMLDivElement>)}\n onMouseEnter={displayOn === 'always-on' ? undefined : clearHideTimeout}\n onMouseLeave={scheduleHide}\n >\n {linkedTooltipSrc}\n </div>\n {displayTooltip &&\n ReactDOM.createPortal(\n <>\n <style>\n {`#${tooltipContentId}::before {\n left: var(--arrow-left, 0);\n top: var(--arrow-top, 0);\n }`}\n </style>\n <div\n id={tooltipContentId}\n role=\"tooltip\"\n className={`flex justify-center px-3 py-2 min-w-24 bg-[var(--color-gray-800)] text-[var(--color-white)] text-base rounded-[3px]\n before:content-[' '] before:w-3.5 before:h-3.5 before:bg-[var(--color-gray-800)] before:inline-block\n before:absolute before:rounded-tl-sm before:rotate-45 ${tooltipContentClasses}`}\n style={{\n ...tooltipPortalStyle,\n maxWidth: `${maxWidth}px`,\n wordBreak: 'break-word',\n overflowWrap: 'break-word',\n visibility: isPortalPositioned ? 'visible' : 'hidden',\n opacity: isPortalPositioned ? 1 : 0,\n pointerEvents: isPortalPositioned ? 'auto' : 'none',\n transition: isPortalPositioned ? 'opacity 0.15s ease-in' : 'none',\n // Ensure it stays at 0,0 until positioned to avoid any visual flash\n ...(isPortalPositioned ? {} : { position: 'fixed', top: '0px', left: '0px' })\n }}\n onMouseEnter={displayOn === 'always-on' ? undefined : clearHideTimeout}\n onMouseLeave={scheduleHide}\n >\n {isContentString ? <p className=\"leading-normal\">{content}</p> : content}\n </div>\n </>,\n document.body\n )}\n </div>\n );\n};\n"],"names":["Tooltip","content","tooltipSrc","position","displayOn","disabled","maxWidth","isWithPortal","tooltipSrcRef","undefined","isTriggerDisabled","disabledTriggerAriaLabel","tooltipContentClasses","tooltipOffset","automationId","displayTooltip","setDisplayTooltip","useState","tooltipContentRef","useRef","internalToolTipSrcRef","tooltipSourceRef","tooltipPortalStyle","setTooltipPortalStyle","isPortalPositioned","setIsPortalPositioned","hideTimeoutRef","isContentString","tooltipContentId","useStableId","clearHideTimeout","current","clearTimeout","scheduleHide","setTimeout","showTooltip","onDisabledTriggerKeyDown","e","key","preventDefault","prev","dismissOnFocusOutProps","useDismissOnFocusOut","onFocusIn","onFocusOut","onEscape","useEffect","tooltipContent","setAttribute","classList","add","remove","onTooltipSrcClick","events","onClick","toggleTooltip","onMouseEnter","onMouseLeave","calculateTooltipPortalStyle","refToUse","srcRect","getBoundingClientRect","scrollX","window","pageXOffset","scrollY","pageYOffset","arrowSize","tooltipElement","document","getElementById","tooltipWidth","offsetWidth","tooltipHeight","offsetHeight","top","left","arrowLeft","arrowTop","bottom","width","right","height","zIndex","updatePosition","requestAnimationFrame","calculatedStyle","flushSync","timeout","handleClick","tooltip","source","target","contains","shouldAddClickListener","body","addEventListener","mutationObserver","MutationObserver","observe","attributes","attributeFilter","removeEventListener","disconnect","React","createElement","Fragment","isSourceDisabled","isValidElement","props","linkedTooltipSrc","cloneElement","type","ariaDescribedBy","tabIndex","disabledTriggerProps","role","onFocus","onBlur","onKeyDown","enabledTriggerProps","_extends","className","ref","ReactDOM","createPortal","id","style","wordBreak","overflowWrap","visibility","opacity","pointerEvents","transition"],"mappings":";;;;;;;;;;;;;;AAyEO,MAAMA,KAAUA,CAAC;AAAA,EACtBC,SAAAA;AAAAA,EACAC,YAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,WAAAA,IAAY;AAAA,EACZC,UAAAA,IAAW;AAAA,EACXC,UAAAA,IAAW;AAAA,EACXC,cAAAA,IAAe;AAAA,EACfC,eAAAA,IAAgBC;AAAAA,EAChBC,mBAAAA,IAAoB;AAAA,EACpBC,0BAAAA,IAA2BF;AAAAA,EAC3BG,uBAAAA,IAAwB;AAAA,EACxBC,eAAAA,IAAgB;AAAA,EAChBC,cAAAA,IAAe;AACH,MAAM;AAClB,QAAM,CAACC,GAAgBC,CAAiB,IAAIC,EAAS,EAAK,GACpDC,IAAoBC,EAAuB,IAAI,GAE/CC,IAAwBD,EAAuB,IAAI,GACnDE,IAAoBb,KAAiBY,GACrC,CAACE,GAAoBC,CAAqB,IAAIN,EAAS,CAAA,CAAE,GACzD,CAACO,GAAoBC,CAAqB,IAAIR,EAAS,EAAK,GAC5DS,IAAiBP,EAA6C,IAAI,GAClEQ,IAAkB,OAAO1B,KAAY,UACrC2B,IAAmBC,GAAYpB,QAAW,iBAAiB,GAG3DqB,IAAmBA,MAAM;AAC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@@
|
|
|
1
|
-
const
|
|
1
|
+
const C = "data:image/svg+xml,%3csvg%20width='29'%20height='28'%20viewBox='0%200%2029%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.01319%200C5.21753%200%204.45447%200.31607%203.89187%200.87868C3.32925%201.44129%203.01318%202.20436%203.01318%203V25C3.01318%2025.7956%203.32925%2026.5588%203.89187%2027.1214C4.45447%2027.684%205.21753%2028%206.01319%2028H24.0132C24.8088%2028%2025.5718%2027.684%2026.1344%2027.1214C26.697%2026.5588%2027.0132%2025.7956%2027.0132%2025V10C27.0132%209.73478%2026.9078%209.48042%2026.7202%209.2929L17.7203%200.292894C17.5327%200.105357%2017.2784%200%2017.0132%200H6.01319Z'%20fill='%23E1E8F5'/%3e%3cpath%20d='M26.7202%209.2929C26.9078%209.48042%2027.0132%209.73478%2027.0132%2010H18.0132C17.4609%2010%2017.0132%209.55228%2017.0132%209V0C17.2784%200%2017.5327%200.105357%2017.7203%200.292894L26.7202%209.2929Z'%20fill='%23C5D0E6'/%3e%3crect%20x='0.789062'%20y='12.833'%20width='24.5'%20height='12.8333'%20rx='1.16667'%20fill='%23F45A54'/%3e%3cpath%20d='M4.90437%2022.8716V16.0837H7.44982C7.97129%2016.0837%208.40879%2016.1809%208.76232%2016.3754C9.11807%2016.5698%209.38654%2016.8372%209.56772%2017.1775C9.75112%2017.5155%209.84282%2017.9%209.84282%2018.3309C9.84282%2018.7662%209.75112%2019.1528%209.56772%2019.4909C9.38433%2019.829%209.11365%2020.0952%208.7557%2020.2897C8.39774%2020.4819%207.95693%2020.578%207.43325%2020.578H5.74623V19.5671H7.26753C7.57246%2019.5671%207.82214%2019.5141%208.01659%2019.408C8.21103%2019.302%208.35465%2019.1561%208.44746%2018.9705C8.54247%2018.7849%208.58998%2018.5717%208.58998%2018.3309C8.58998%2018.09%208.54247%2017.8779%208.44746%2017.6945C8.35465%2017.5111%208.20993%2017.3686%208.01327%2017.2669C7.81883%2017.1631%207.56804%2017.1112%207.2609%2017.1112H6.13401V22.8716H4.90437ZM13.2111%2022.8716H10.9109V16.0837H13.2575C13.9314%2016.0837%2014.5103%2016.2196%2014.9942%2016.4914C15.4803%2016.7609%2015.8537%2017.1487%2016.1145%2017.6547C16.3752%2018.1607%2016.5056%2018.7662%2016.5056%2019.471C16.5056%2020.1781%2016.3741%2020.7857%2016.1112%2021.2939C15.8504%2021.8021%2015.4737%2022.1921%2014.981%2022.4639C14.4904%2022.7357%2013.9005%2022.8716%2013.2111%2022.8716ZM12.1405%2021.8077H13.1514C13.6243%2021.8077%2014.0187%2021.7215%2014.3346%2021.5491C14.6506%2021.3746%2014.8882%2021.115%2015.0472%2020.7703C15.2063%2020.4233%2015.2859%2019.9903%2015.2859%2019.471C15.2859%2018.9518%2015.2063%2018.5209%2015.0472%2018.1784C14.8882%2017.8337%2014.6528%2017.5763%2014.3413%2017.4061C14.0319%2017.2338%2013.6475%2017.1476%2013.1879%2017.1476H12.1405V21.8077ZM17.6739%2022.8716V16.0837H22.0224V17.1145H18.9035V18.9573H21.7241V19.9881H18.9035V22.8716H17.6739Z'%20fill='white'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
C as default
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=index160.js.map
|
package/dist/index160.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index160.js","sources":["../src/assets/icons/
|
|
1
|
+
{"version":3,"file":"index160.js","sources":["../src/assets/icons/pdf-file.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='29'%20height='28'%20viewBox='0%200%2029%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.01319%200C5.21753%200%204.45447%200.31607%203.89187%200.87868C3.32925%201.44129%203.01318%202.20436%203.01318%203V25C3.01318%2025.7956%203.32925%2026.5588%203.89187%2027.1214C4.45447%2027.684%205.21753%2028%206.01319%2028H24.0132C24.8088%2028%2025.5718%2027.684%2026.1344%2027.1214C26.697%2026.5588%2027.0132%2025.7956%2027.0132%2025V10C27.0132%209.73478%2026.9078%209.48042%2026.7202%209.2929L17.7203%200.292894C17.5327%200.105357%2017.2784%200%2017.0132%200H6.01319Z'%20fill='%23E1E8F5'/%3e%3cpath%20d='M26.7202%209.2929C26.9078%209.48042%2027.0132%209.73478%2027.0132%2010H18.0132C17.4609%2010%2017.0132%209.55228%2017.0132%209V0C17.2784%200%2017.5327%200.105357%2017.7203%200.292894L26.7202%209.2929Z'%20fill='%23C5D0E6'/%3e%3crect%20x='0.789062'%20y='12.833'%20width='24.5'%20height='12.8333'%20rx='1.16667'%20fill='%23F45A54'/%3e%3cpath%20d='M4.90437%2022.8716V16.0837H7.44982C7.97129%2016.0837%208.40879%2016.1809%208.76232%2016.3754C9.11807%2016.5698%209.38654%2016.8372%209.56772%2017.1775C9.75112%2017.5155%209.84282%2017.9%209.84282%2018.3309C9.84282%2018.7662%209.75112%2019.1528%209.56772%2019.4909C9.38433%2019.829%209.11365%2020.0952%208.7557%2020.2897C8.39774%2020.4819%207.95693%2020.578%207.43325%2020.578H5.74623V19.5671H7.26753C7.57246%2019.5671%207.82214%2019.5141%208.01659%2019.408C8.21103%2019.302%208.35465%2019.1561%208.44746%2018.9705C8.54247%2018.7849%208.58998%2018.5717%208.58998%2018.3309C8.58998%2018.09%208.54247%2017.8779%208.44746%2017.6945C8.35465%2017.5111%208.20993%2017.3686%208.01327%2017.2669C7.81883%2017.1631%207.56804%2017.1112%207.2609%2017.1112H6.13401V22.8716H4.90437ZM13.2111%2022.8716H10.9109V16.0837H13.2575C13.9314%2016.0837%2014.5103%2016.2196%2014.9942%2016.4914C15.4803%2016.7609%2015.8537%2017.1487%2016.1145%2017.6547C16.3752%2018.1607%2016.5056%2018.7662%2016.5056%2019.471C16.5056%2020.1781%2016.3741%2020.7857%2016.1112%2021.2939C15.8504%2021.8021%2015.4737%2022.1921%2014.981%2022.4639C14.4904%2022.7357%2013.9005%2022.8716%2013.2111%2022.8716ZM12.1405%2021.8077H13.1514C13.6243%2021.8077%2014.0187%2021.7215%2014.3346%2021.5491C14.6506%2021.3746%2014.8882%2021.115%2015.0472%2020.7703C15.2063%2020.4233%2015.2859%2019.9903%2015.2859%2019.471C15.2859%2018.9518%2015.2063%2018.5209%2015.0472%2018.1784C14.8882%2017.8337%2014.6528%2017.5763%2014.3413%2017.4061C14.0319%2017.2338%2013.6475%2017.1476%2013.1879%2017.1476H12.1405V21.8077ZM17.6739%2022.8716V16.0837H22.0224V17.1145H18.9035V18.9573H21.7241V19.9881H18.9035V22.8716H17.6739Z'%20fill='white'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_77"],"mappings":"AAAA,MAAAA,IAAe;"}
|