se-design 1.0.82 → 1.0.83-dev.1
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/chat.svg +4 -0
- package/dist/assets/icons/tag.svg +2 -2
- package/dist/assets/style.css +1 -1
- package/dist/components/AccessibleDiv/index.d.ts +23 -1
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/DropdownWithInputTags/index.d.ts +3 -0
- package/dist/components/Link/index.d.ts +6 -2
- package/dist/index.js +62 -54
- package/dist/index.js.map +1 -1
- package/dist/index100.js +1 -1
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +1 -1
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +1 -1
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +1 -1
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +1 -1
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +1 -1
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +1 -1
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +1 -1
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +1 -1
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +2 -2
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +2 -2
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +1 -1
- package/dist/index111.js.map +1 -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 +2 -2
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +2 -2
- package/dist/index120.js +1 -1
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +2 -2
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +2 -2
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +2 -2
- 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 +2 -2
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +2 -2
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +1 -1
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +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 +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +2 -2
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +2 -2
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +2 -2
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +1 -1
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +2 -2
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +1 -1
- 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 +25 -23
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +1 -1
- 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/index17.js +29 -29
- package/dist/index17.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/index18.js +85 -63
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +1 -1
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +2 -2
- 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 +1 -1
- 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/index19.js +181 -166
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +1 -1
- 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 +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +2 -2
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +2 -149
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +2 -9
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +2 -6
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -5
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +149 -42
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +8 -20
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +9 -0
- package/dist/index205.js.map +1 -0
- package/dist/index206.js +8 -0
- package/dist/index206.js.map +1 -0
- package/dist/index207.js +45 -0
- package/dist/index207.js.map +1 -0
- package/dist/index208.js +24 -0
- package/dist/index208.js.map +1 -0
- package/dist/{index211.js → index215.js} +1 -1
- package/dist/{index211.js.map → index215.js.map} +1 -1
- package/dist/{index212.js → index216.js} +13 -9
- package/dist/index216.js.map +1 -0
- package/dist/{index220.js → index224.js} +1 -1
- package/dist/{index220.js.map → index224.js.map} +1 -1
- package/dist/index23.js +3 -3
- package/dist/{index228.js → index232.js} +1 -1
- package/dist/{index228.js.map → index232.js.map} +1 -1
- package/dist/{index231.js → index235.js} +1 -1
- package/dist/{index231.js.map → index235.js.map} +1 -1
- package/dist/index244.js +168 -8
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +3 -9
- package/dist/index245.js.map +1 -1
- package/dist/index247.js +18 -169
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +10 -11
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +8 -4
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +175 -161
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +4 -5
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +168 -36
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +11 -2
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +5 -7
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +5 -326
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +36 -48
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +2 -2
- package/dist/index257.js +7 -75
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +308 -74
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +45 -47
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +2 -8
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +75 -4
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +89 -48
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +52 -2
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +8 -2
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +8 -0
- package/dist/index265.js.map +1 -0
- package/dist/index266.js +55 -0
- package/dist/index266.js.map +1 -0
- package/dist/index267.js +5 -0
- package/dist/index267.js.map +1 -0
- package/dist/index268.js +5 -0
- package/dist/index268.js.map +1 -0
- package/dist/index28.js +5 -5
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +1 -1
- package/dist/index3.js +59 -49
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.js +2 -2
- package/dist/index38.js +209 -194
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +3 -3
- package/dist/index4.js +1 -1
- package/dist/index40.js +1 -1
- package/dist/index43.js +1 -1
- package/dist/index45.js +60 -59
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +3 -3
- package/dist/index49.js +1 -1
- package/dist/index51.js +1 -1
- package/dist/index52.js +2 -2
- package/dist/index53.js +1 -1
- package/dist/index55.js +2 -2
- package/dist/index55.js.map +1 -1
- package/dist/index57.js +1 -1
- package/dist/index6.js +238 -236
- package/dist/index6.js.map +1 -1
- package/dist/index61.js +9 -8
- package/dist/index61.js.map +1 -1
- package/dist/index63.js +1 -1
- package/dist/index64.js +35 -34
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +1 -1
- package/dist/index67.js +1 -1
- package/dist/index68.js +80 -58
- package/dist/index68.js.map +1 -1
- package/dist/index7.js +1 -1
- package/dist/index70.js +1 -1
- package/dist/index75.js +108 -5
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +18 -54
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +10 -23
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +5 -9
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +62 -0
- package/dist/index79.js.map +1 -0
- package/dist/index80.js +24 -2
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +9 -2
- package/dist/index81.js.map +1 -1
- package/dist/index83.js +1 -1
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +2 -2
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +1 -1
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +2 -2
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +1 -1
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +1 -1
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +1 -1
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +3 -3
- package/dist/index90.js +1 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +1 -1
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +1 -1
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +1 -1
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +1 -1
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +1 -1
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +1 -1
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +1 -1
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +1 -1
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
- package/dist/index212.js.map +0 -1
- package/dist/index240.js +0 -173
- package/dist/index240.js.map +0 -1
- package/dist/index241.js +0 -7
- package/dist/index241.js.map +0 -1
- package/dist/index243.js +0 -22
- package/dist/index243.js.map +0 -1
- package/dist/index246.js +0 -8
- package/dist/index246.js.map +0 -1
- package/dist/index82.js +0 -5
- package/dist/index82.js.map +0 -1
package/dist/index19.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { getA11yNameAttributes as
|
|
4
|
-
import { useDismissOnFocusOut as
|
|
5
|
-
import { getFirstFocusableElement as
|
|
1
|
+
import B, { forwardRef as we, useState as F, useRef as te, useEffect as M, useImperativeHandle as ge } from "react";
|
|
2
|
+
import he from "react-dom";
|
|
3
|
+
import { getA11yNameAttributes as be } from "./index81.js";
|
|
4
|
+
import { useDismissOnFocusOut as ye } from "./index80.js";
|
|
5
|
+
import { getFirstFocusableElement as D, getLastFocusableElement as Ee, getFocusableElements as N, FOCUSABLE_WITH_ROLES_SELECTOR as ke } from "./index71.js";
|
|
6
6
|
import "./index72.js";
|
|
7
|
-
import { useRegisterPortalWithFocusTrap as
|
|
8
|
-
function
|
|
9
|
-
return
|
|
7
|
+
import { useRegisterPortalWithFocusTrap as Pe } from "./index208.js";
|
|
8
|
+
function T() {
|
|
9
|
+
return T = Object.assign ? Object.assign.bind() : function(b) {
|
|
10
10
|
for (var y = 1; y < arguments.length; y++) {
|
|
11
|
-
var
|
|
12
|
-
for (var h in
|
|
11
|
+
var m = arguments[y];
|
|
12
|
+
for (var h in m) ({}).hasOwnProperty.call(m, h) && (b[h] = m[h]);
|
|
13
13
|
}
|
|
14
14
|
return b;
|
|
15
|
-
},
|
|
15
|
+
}, T.apply(null, arguments);
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const He = /* @__PURE__ */ we(({
|
|
18
18
|
className: b = "",
|
|
19
19
|
automationId: y = "",
|
|
20
|
-
position:
|
|
20
|
+
position: m = "bottom-center",
|
|
21
21
|
popoverContentAutomationId: h = "",
|
|
22
22
|
contentWidth: R = "max",
|
|
23
|
-
renderPopoverContents:
|
|
24
|
-
renderPopoverSrcElement:
|
|
23
|
+
renderPopoverContents: K,
|
|
24
|
+
renderPopoverSrcElement: oe,
|
|
25
25
|
onPopoverToggle: z,
|
|
26
26
|
isPopoverOpen: C,
|
|
27
27
|
disabled: E = !1,
|
|
28
|
-
isWithPortal:
|
|
29
|
-
ariaLabel:
|
|
30
|
-
ariaLabelledBy:
|
|
28
|
+
isWithPortal: f = !1,
|
|
29
|
+
ariaLabel: ne,
|
|
30
|
+
ariaLabelledBy: re,
|
|
31
31
|
sourceRole: q = "button",
|
|
32
|
-
popupType:
|
|
33
|
-
popoverContentStyleProperty:
|
|
32
|
+
popupType: _ = "true",
|
|
33
|
+
popoverContentStyleProperty: $ = {
|
|
34
34
|
zIndex: 1e3,
|
|
35
35
|
borderColor: "var(--color-gray-200)",
|
|
36
36
|
color: "var(--color-gray-900)",
|
|
37
37
|
backgroundColor: "var(--color-white)"
|
|
38
38
|
},
|
|
39
|
-
disableClickToggle:
|
|
40
|
-
noBorder:
|
|
41
|
-
disableAutoClose:
|
|
42
|
-
focusFirstOnOpen:
|
|
43
|
-
...
|
|
44
|
-
},
|
|
45
|
-
const [i,
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
ariaLabel:
|
|
49
|
-
ariaLabelledBy:
|
|
39
|
+
disableClickToggle: g = !1,
|
|
40
|
+
noBorder: se = !1,
|
|
41
|
+
disableAutoClose: v = !1,
|
|
42
|
+
focusFirstOnOpen: ie = !1,
|
|
43
|
+
...ce
|
|
44
|
+
}, ae) => {
|
|
45
|
+
const [i, p] = F(!1), [k, U] = F(m), [le, V] = F(!1), l = te(null), c = te(null);
|
|
46
|
+
Pe(c, f && i);
|
|
47
|
+
const ue = be({
|
|
48
|
+
ariaLabel: ne,
|
|
49
|
+
ariaLabelledBy: re,
|
|
50
50
|
ariaDescribedBy: void 0
|
|
51
51
|
// Popover doesn't support describedBy yet
|
|
52
52
|
}), {
|
|
53
|
-
onBlurCapture:
|
|
54
|
-
} =
|
|
55
|
-
disabled: !i ||
|
|
56
|
-
onFocusOut: () =>
|
|
53
|
+
onBlurCapture: fe
|
|
54
|
+
} = ye({
|
|
55
|
+
disabled: !i || v || f,
|
|
56
|
+
onFocusOut: () => p(!1),
|
|
57
57
|
closeOnEscape: !1
|
|
58
|
-
}), [
|
|
58
|
+
}), [L, A] = F({
|
|
59
59
|
top: 0,
|
|
60
60
|
left: 0,
|
|
61
61
|
srcWidth: 0
|
|
62
|
-
}), [
|
|
63
|
-
|
|
64
|
-
container:
|
|
62
|
+
}), [pe, W] = F(!1), P = () => {
|
|
63
|
+
g ? (D({
|
|
64
|
+
container: l.current,
|
|
65
65
|
includeRoles: !0
|
|
66
|
-
}) ??
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
e?.returnFocusTo ? (e.returnFocusTo instanceof HTMLElement ? e.returnFocusTo : e.returnFocusTo.current)?.focus() :
|
|
66
|
+
}) ?? l.current)?.focus() : l.current?.focus();
|
|
67
|
+
}, X = (e) => {
|
|
68
|
+
p(!1), e?.returnFocus !== !1 && requestAnimationFrame(() => {
|
|
69
|
+
e?.returnFocusTo ? (e.returnFocusTo instanceof HTMLElement ? e.returnFocusTo : e.returnFocusTo.current)?.focus() : P();
|
|
70
70
|
});
|
|
71
|
-
},
|
|
72
|
-
if (!
|
|
71
|
+
}, O = (e = "bottom-center") => {
|
|
72
|
+
if (!l.current) return {
|
|
73
73
|
top: 0,
|
|
74
74
|
left: 0,
|
|
75
75
|
srcWidth: 0
|
|
76
76
|
};
|
|
77
77
|
let o = e;
|
|
78
|
-
const t =
|
|
78
|
+
const t = l.current.getBoundingClientRect(), r = window.innerWidth - document.documentElement.clientWidth, u = window.innerWidth - Math.max(r, 16), a = window.innerHeight;
|
|
79
79
|
let n = 0, s = 0;
|
|
80
80
|
switch (o) {
|
|
81
81
|
case "bottom-left":
|
|
@@ -100,140 +100,155 @@ const Se = /* @__PURE__ */ me(({
|
|
|
100
100
|
n = t.bottom, s = t.left;
|
|
101
101
|
break;
|
|
102
102
|
}
|
|
103
|
-
const
|
|
104
|
-
if ((o === "bottom-center" || o === "top-center") && (s = s -
|
|
105
|
-
const
|
|
106
|
-
|
|
103
|
+
const d = c.current?.getBoundingClientRect(), x = (R === "full" ? Math.max(t.width, d?.width || 0) : d?.width) || 0, w = d?.height || 0;
|
|
104
|
+
if ((o === "bottom-center" || o === "top-center") && (s = s - x / 2), s + x > u && (s = Math.max(0, u - x)), s < 0 && (s = 0), n + w > a) {
|
|
105
|
+
const ee = t.top, ve = a - t.bottom;
|
|
106
|
+
ee >= w || ee > ve ? (n = t.top - w, n < 48 && (n = 48)) : n = Math.max(48, a - w);
|
|
107
107
|
}
|
|
108
|
-
return n < 48 && (n = t.bottom, n + w >
|
|
108
|
+
return n < 48 && (n = t.bottom, n + w > a && (n = Math.max(48, a - w))), {
|
|
109
109
|
top: Math.round(n),
|
|
110
110
|
left: Math.round(s),
|
|
111
111
|
srcWidth: t.width
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
|
-
|
|
115
|
-
if (z && z(i), i && !
|
|
116
|
-
return
|
|
117
|
-
|
|
114
|
+
M(() => {
|
|
115
|
+
if (z && z(i), i && !f)
|
|
116
|
+
return v || document.body.addEventListener("click", j, !0), de(), () => {
|
|
117
|
+
v || document.body.removeEventListener("click", j, !0);
|
|
118
118
|
};
|
|
119
|
-
if (i &&
|
|
120
|
-
|
|
119
|
+
if (i && f) {
|
|
120
|
+
v ? window.addEventListener("scroll", G) : (document.body.addEventListener("click", I, !0), window.addEventListener("scroll", I)), window.addEventListener("resize", Y);
|
|
121
121
|
const e = (r) => {
|
|
122
|
-
r.key === "Escape" && c.current?.contains(document.activeElement) && (r.preventDefault(), r.stopPropagation(),
|
|
122
|
+
r.key === "Escape" && c.current?.contains(document.activeElement) && (r.preventDefault(), r.stopPropagation(), p(!1), requestAnimationFrame(() => P()));
|
|
123
123
|
};
|
|
124
|
-
window.addEventListener("keydown", e, !0),
|
|
124
|
+
window.addEventListener("keydown", e, !0), H();
|
|
125
125
|
let o, t;
|
|
126
126
|
return o = requestAnimationFrame(() => {
|
|
127
127
|
t = requestAnimationFrame(() => {
|
|
128
|
-
const r =
|
|
129
|
-
r &&
|
|
128
|
+
const r = O(k);
|
|
129
|
+
r && A(r), W(!0);
|
|
130
130
|
});
|
|
131
131
|
}), () => {
|
|
132
|
-
|
|
132
|
+
v ? window.removeEventListener("scroll", G) : (document.body.removeEventListener("click", I, !0), window.removeEventListener("scroll", I)), window.removeEventListener("resize", Y), window.removeEventListener("keydown", e, !0), cancelAnimationFrame(o), cancelAnimationFrame(t), W(!1);
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
}, [i,
|
|
136
|
-
const
|
|
137
|
-
if (!
|
|
138
|
-
|
|
135
|
+
}, [i, f, v]);
|
|
136
|
+
const H = () => {
|
|
137
|
+
if (!l.current) {
|
|
138
|
+
V(!1);
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
|
-
const e =
|
|
142
|
-
|
|
141
|
+
const e = l.current.getBoundingClientRect(), o = window.innerHeight, t = window.innerWidth, r = e.top < o && e.bottom > 0 && e.left < t && e.right > 0;
|
|
142
|
+
V(r);
|
|
143
143
|
};
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}, [C]),
|
|
144
|
+
M(() => {
|
|
145
|
+
p(C ?? !1);
|
|
146
|
+
}, [C]), M(() => {
|
|
147
147
|
i && setTimeout(() => {
|
|
148
|
-
const e =
|
|
148
|
+
const e = D({
|
|
149
149
|
container: c.current,
|
|
150
150
|
includeRoles: !0
|
|
151
151
|
});
|
|
152
|
-
e && (
|
|
153
|
-
},
|
|
152
|
+
e && (ie || document.activeElement === l.current) && e.focus();
|
|
153
|
+
}, f ? 60 : 0);
|
|
154
154
|
}, [i]);
|
|
155
|
-
const
|
|
155
|
+
const de = () => {
|
|
156
156
|
if (!c.current) return;
|
|
157
157
|
const e = c.current.getBoundingClientRect(), o = window.innerHeight;
|
|
158
|
-
e?.bottom > o ?
|
|
159
|
-
},
|
|
160
|
-
const o =
|
|
158
|
+
e?.bottom > o ? U(m.includes("left") ? "top-left" : m.includes("right") ? "top-right" : "top-center") : e?.top < 0 && U(m.includes("left") ? "bottom-left" : m.includes("right") ? "bottom-right" : "bottom-center");
|
|
159
|
+
}, j = (e) => {
|
|
160
|
+
const o = l.current;
|
|
161
161
|
if (!o) return;
|
|
162
|
-
const t = e.target, r = o.contains(t),
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
const o =
|
|
162
|
+
const t = e.target, r = o.contains(t), u = c.current?.contains(t), n = t.closest?.(".se-design-popover-wrapper"), s = n && n !== o, d = c.current?.contains(n);
|
|
163
|
+
v || (!r && !u || s && !d) && p(!1);
|
|
164
|
+
}, I = (e) => {
|
|
165
|
+
const o = l.current, t = c.current;
|
|
166
166
|
if (!o) return;
|
|
167
|
-
if (
|
|
168
|
-
const
|
|
169
|
-
|
|
167
|
+
if (H(), e.type === "scroll" && i) {
|
|
168
|
+
const w = O(k);
|
|
169
|
+
w && A(w);
|
|
170
170
|
}
|
|
171
|
-
const r = e.target,
|
|
172
|
-
|
|
173
|
-
},
|
|
174
|
-
if (i &&
|
|
175
|
-
|
|
176
|
-
const e =
|
|
177
|
-
e &&
|
|
171
|
+
const r = e.target, u = o.contains(r), a = t?.contains(r), s = r.closest?.(".se-design-popover-wrapper"), d = s && s !== o, x = c.current?.contains(s);
|
|
172
|
+
v || (!u && !a || d && !x) && p(!1);
|
|
173
|
+
}, Y = () => {
|
|
174
|
+
if (i && f && l.current) {
|
|
175
|
+
H();
|
|
176
|
+
const e = O(k);
|
|
177
|
+
e && A(e);
|
|
178
178
|
}
|
|
179
|
-
},
|
|
180
|
-
if (i &&
|
|
181
|
-
|
|
182
|
-
const e =
|
|
183
|
-
e &&
|
|
179
|
+
}, G = () => {
|
|
180
|
+
if (i && f && l.current) {
|
|
181
|
+
H();
|
|
182
|
+
const e = O(k);
|
|
183
|
+
e && A(e);
|
|
184
184
|
}
|
|
185
|
-
},
|
|
185
|
+
}, S = (e = !1) => {
|
|
186
186
|
const o = i;
|
|
187
|
-
|
|
187
|
+
p((t) => !t), !o && e && setTimeout(() => {
|
|
188
188
|
if (e === "last") {
|
|
189
|
-
const t =
|
|
189
|
+
const t = Ee({
|
|
190
190
|
container: c.current,
|
|
191
191
|
includeRoles: !0
|
|
192
192
|
});
|
|
193
193
|
t && t.focus();
|
|
194
194
|
} else {
|
|
195
|
-
const t =
|
|
195
|
+
const t = D({
|
|
196
196
|
container: c.current,
|
|
197
197
|
includeRoles: !0
|
|
198
198
|
});
|
|
199
199
|
t && t.focus();
|
|
200
200
|
}
|
|
201
201
|
}, 50);
|
|
202
|
-
},
|
|
202
|
+
}, J = (e, o) => {
|
|
203
203
|
if (!o) return;
|
|
204
204
|
const t = document.activeElement;
|
|
205
205
|
if (t?.tagName === "INPUT" || t?.tagName === "TEXTAREA" || t?.tagName === "SELECT")
|
|
206
206
|
return;
|
|
207
|
-
const r = Array.from(o.querySelectorAll(
|
|
208
|
-
const
|
|
209
|
-
return !
|
|
207
|
+
const r = Array.from(o.querySelectorAll(ke)).filter((n) => {
|
|
208
|
+
const s = window.getComputedStyle(n);
|
|
209
|
+
return !n.hasAttribute("disabled") && n.getAttribute("aria-disabled") !== "true" && s.display !== "none" && s.visibility !== "hidden" && (n.tabIndex >= 0 || n.hasAttribute("role"));
|
|
210
210
|
});
|
|
211
211
|
if (r.length === 0) return;
|
|
212
|
-
const
|
|
213
|
-
let
|
|
214
|
-
e.key === "ArrowDown" ? (e.preventDefault(), e.stopPropagation(),
|
|
215
|
-
},
|
|
212
|
+
const u = r.findIndex((n) => n === document.activeElement);
|
|
213
|
+
let a = -1;
|
|
214
|
+
e.key === "ArrowDown" ? (e.preventDefault(), e.stopPropagation(), a = u < r.length - 1 ? u + 1 : 0) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), a = u > 0 ? u - 1 : r.length - 1) : e.key === "Home" ? (e.preventDefault(), e.stopPropagation(), a = 0) : e.key === "End" && (e.preventDefault(), e.stopPropagation(), a = r.length - 1), a >= 0 && r[a] ? r[a].focus() : u === -1 && r.length > 0 && r[0].focus();
|
|
215
|
+
}, Q = (e) => {
|
|
216
216
|
if (e.key === "Escape")
|
|
217
|
-
e.preventDefault(), e.stopPropagation(),
|
|
217
|
+
e.preventDefault(), e.stopPropagation(), p(!1), requestAnimationFrame(() => P());
|
|
218
218
|
else if (e.key === "Tab") {
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
if (_ === "dialog") {
|
|
220
|
+
const o = N({
|
|
221
|
+
container: c.current,
|
|
222
|
+
filterHidden: !0
|
|
223
|
+
}), t = o.indexOf(e.target), r = t === o.length - 1, u = t === 0 || t === -1;
|
|
224
|
+
if (e.shiftKey && u)
|
|
225
|
+
e.preventDefault(), p(!1), P();
|
|
226
|
+
else if (!e.shiftKey && r && (p(!1), f)) {
|
|
227
|
+
e.preventDefault();
|
|
228
|
+
const a = l.current, n = N({
|
|
229
|
+
container: document.body,
|
|
230
|
+
filterHidden: !0
|
|
231
|
+
}), s = a ? n.indexOf(a) : -1, d = n[s + 1];
|
|
232
|
+
d ? d.focus() : a?.focus();
|
|
233
|
+
}
|
|
234
|
+
} else if (p(!1), e.shiftKey)
|
|
235
|
+
e.preventDefault(), P();
|
|
236
|
+
else if (f) {
|
|
222
237
|
e.preventDefault();
|
|
223
|
-
const o =
|
|
238
|
+
const o = l.current, t = N({
|
|
224
239
|
container: document.body,
|
|
225
240
|
filterHidden: !0
|
|
226
|
-
}), r = o ? t.indexOf(o) : -1,
|
|
227
|
-
|
|
241
|
+
}), r = o ? t.indexOf(o) : -1, u = t[r + 1];
|
|
242
|
+
u ? u.focus() : o?.focus();
|
|
228
243
|
}
|
|
229
|
-
} else e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End" ?
|
|
244
|
+
} else e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End" ? J(e, c.current) : (e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
230
245
|
};
|
|
231
|
-
|
|
232
|
-
togglePopover:
|
|
233
|
-
focusTrigger: () =>
|
|
234
|
-
element:
|
|
246
|
+
ge(ae, () => ({
|
|
247
|
+
togglePopover: S,
|
|
248
|
+
focusTrigger: () => l.current?.focus(),
|
|
249
|
+
element: l.current
|
|
235
250
|
}), []);
|
|
236
|
-
const
|
|
251
|
+
const me = {
|
|
237
252
|
"bottom-left": {
|
|
238
253
|
left: "0",
|
|
239
254
|
top: "100%"
|
|
@@ -260,90 +275,90 @@ const Se = /* @__PURE__ */ me(({
|
|
|
260
275
|
transform: "translateX(-50%)",
|
|
261
276
|
bottom: "100%"
|
|
262
277
|
}
|
|
263
|
-
},
|
|
264
|
-
return /* @__PURE__ */
|
|
278
|
+
}, Z = se ? "" : "shadow-md border rounded-md";
|
|
279
|
+
return /* @__PURE__ */ B.createElement("div", T({
|
|
265
280
|
className: "se-design-popover-wrapper cursor-pointer relative focus-outline rounded-md" + (b.length > 0 ? ` ${b}` : "") + (i ? " open" : "") + (E ? " opacity-50 cursor-not-allowed pointer-events-none" : ""),
|
|
266
|
-
ref:
|
|
281
|
+
ref: l,
|
|
267
282
|
onClick: (e) => {
|
|
268
|
-
E ||
|
|
283
|
+
E || g || (e.stopPropagation(), S());
|
|
269
284
|
},
|
|
270
285
|
onKeyDown: (e) => {
|
|
271
|
-
if (!(E ||
|
|
286
|
+
if (!(E || g))
|
|
272
287
|
if (e.key === "Enter" || e.key === " ") {
|
|
273
288
|
e.preventDefault(), e.stopPropagation();
|
|
274
289
|
const o = i;
|
|
275
|
-
|
|
276
|
-
const t =
|
|
290
|
+
S(), o || setTimeout(() => {
|
|
291
|
+
const t = D({
|
|
277
292
|
container: c.current,
|
|
278
293
|
includeRoles: !0
|
|
279
294
|
});
|
|
280
295
|
t && t.focus();
|
|
281
|
-
},
|
|
296
|
+
}, f ? 60 : 0);
|
|
282
297
|
} else if (e.key === "Escape" && i)
|
|
283
|
-
e.preventDefault(), e.stopPropagation(),
|
|
298
|
+
e.preventDefault(), e.stopPropagation(), p(!1);
|
|
284
299
|
else if ((e.key === "ArrowDown" || e.key === "ArrowUp") && i) {
|
|
285
300
|
const o = c.current;
|
|
286
|
-
o &&
|
|
287
|
-
} else e.key === "ArrowDown" && !i && (e.preventDefault(), e.stopPropagation(),
|
|
288
|
-
const o =
|
|
301
|
+
o && J(e, o);
|
|
302
|
+
} else e.key === "ArrowDown" && !i && (e.preventDefault(), e.stopPropagation(), p(!0), setTimeout(() => {
|
|
303
|
+
const o = D({
|
|
289
304
|
container: c.current,
|
|
290
305
|
includeRoles: !0
|
|
291
306
|
});
|
|
292
307
|
o && o.focus();
|
|
293
308
|
}, 0));
|
|
294
309
|
},
|
|
295
|
-
onBlurCapture:
|
|
310
|
+
onBlurCapture: fe,
|
|
296
311
|
onBlur: (e) => {
|
|
297
|
-
if (!i ||
|
|
298
|
-
const o = e.relatedTarget, t = !!(o &&
|
|
299
|
-
!t && !r &&
|
|
312
|
+
if (!i || v || !f) return;
|
|
313
|
+
const o = e.relatedTarget, t = !!(o && l.current?.contains(o)), r = !!(o && c.current?.contains(o));
|
|
314
|
+
!t && !r && p(!1);
|
|
300
315
|
},
|
|
301
|
-
role:
|
|
302
|
-
"aria-expanded":
|
|
303
|
-
"aria-haspopup":
|
|
304
|
-
tabIndex: E ||
|
|
305
|
-
"aria-disabled":
|
|
306
|
-
},
|
|
316
|
+
role: g ? "none" : q,
|
|
317
|
+
"aria-expanded": g ? void 0 : i ? "true" : "false",
|
|
318
|
+
"aria-haspopup": g ? void 0 : q === "combobox" ? "listbox" : _,
|
|
319
|
+
tabIndex: E || g ? -1 : 0,
|
|
320
|
+
"aria-disabled": g ? void 0 : E ? "true" : void 0
|
|
321
|
+
}, ue, {
|
|
307
322
|
"data-automation-id": y
|
|
308
|
-
},
|
|
323
|
+
}, ce), oe({
|
|
309
324
|
displayPopover: i,
|
|
310
|
-
togglePopover:
|
|
311
|
-
}), i && !
|
|
312
|
-
className: `popover-content absolute ${
|
|
325
|
+
togglePopover: S
|
|
326
|
+
}), i && !f && /* @__PURE__ */ B.createElement("div", {
|
|
327
|
+
className: `popover-content absolute ${Z} z-[1000] ${R == "full" ? "w-full" : "w-max"}`,
|
|
313
328
|
style: {
|
|
314
|
-
|
|
315
|
-
...
|
|
329
|
+
...$,
|
|
330
|
+
...me[k]
|
|
316
331
|
},
|
|
317
332
|
onClick: (e) => e.stopPropagation(),
|
|
318
|
-
onKeyDown:
|
|
333
|
+
onKeyDown: Q,
|
|
319
334
|
ref: c,
|
|
320
335
|
"data-automation-id": h
|
|
321
|
-
},
|
|
322
|
-
closePopoverCb:
|
|
323
|
-
})),
|
|
324
|
-
className: `popover-content-with-portal z-[2002] ${
|
|
336
|
+
}, K({
|
|
337
|
+
closePopoverCb: X
|
|
338
|
+
})), f && i && le && /* @__PURE__ */ he.createPortal(/* @__PURE__ */ B.createElement("div", {
|
|
339
|
+
className: `popover-content-with-portal z-[2002] ${Z} ${R == "full" ? "" : "w-max"}`,
|
|
325
340
|
style: {
|
|
326
341
|
position: "fixed",
|
|
327
|
-
top:
|
|
328
|
-
left:
|
|
329
|
-
visibility:
|
|
342
|
+
top: L.top,
|
|
343
|
+
left: L.left,
|
|
344
|
+
visibility: pe ? "visible" : "hidden",
|
|
330
345
|
maxHeight: "calc(100vh - 96px)",
|
|
331
|
-
overflowY: "
|
|
332
|
-
...R === "full" &&
|
|
333
|
-
width: `${
|
|
346
|
+
overflowY: "hidden",
|
|
347
|
+
...R === "full" && L.srcWidth ? {
|
|
348
|
+
width: `${L.srcWidth}px`
|
|
334
349
|
} : {},
|
|
335
|
-
|
|
350
|
+
...$,
|
|
336
351
|
zIndex: 2002
|
|
337
352
|
},
|
|
338
353
|
onClick: (e) => e.stopPropagation(),
|
|
339
|
-
onKeyDown:
|
|
354
|
+
onKeyDown: Q,
|
|
340
355
|
ref: c,
|
|
341
356
|
"data-automation-id": h
|
|
342
|
-
},
|
|
343
|
-
closePopoverCb:
|
|
357
|
+
}, K({
|
|
358
|
+
closePopoverCb: X
|
|
344
359
|
})), document.body));
|
|
345
360
|
});
|
|
346
361
|
export {
|
|
347
|
-
|
|
362
|
+
He as Popover
|
|
348
363
|
};
|
|
349
364
|
//# sourceMappingURL=index19.js.map
|