@a-ui/react 7.13.0-beta.6 → 7.13.0-beta.7
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/cjs/index10.js +1 -1
- package/cjs/index100.js +1 -1
- package/cjs/index101.js +1 -1
- package/cjs/index102.js +1 -1
- package/cjs/index103.js +1 -1
- package/cjs/index104.js +1 -1
- package/cjs/index105.js +1 -1
- package/cjs/index106.js +1 -1
- package/cjs/index107.js +1 -1
- package/cjs/index108.js +1 -1
- package/cjs/index109.js +1 -1
- package/cjs/index11.js +1 -1
- package/cjs/index110.js +1 -1
- package/cjs/index111.js +1 -1
- package/cjs/index112.js +1 -1
- package/cjs/index113.js +1 -1
- package/cjs/index114.js +1 -2
- package/cjs/index115.js +1 -1
- package/cjs/index116.js +1 -1
- package/cjs/index117.js +1 -1
- package/cjs/index118.js +1 -1
- package/cjs/index119.js +1 -10
- package/cjs/index12.js +1 -1
- package/cjs/index120.js +1 -1
- package/cjs/index121.js +1 -1
- package/cjs/index122.js +1 -1
- package/cjs/index123.js +1 -1
- package/cjs/index124.js +1 -1
- package/cjs/index125.js +1 -1
- package/cjs/index126.js +1 -5
- package/cjs/index127.js +1 -9
- package/cjs/index128.js +1 -1
- package/cjs/index129.js +1 -1
- package/cjs/index13.js +1 -1
- package/cjs/index130.js +1 -1
- package/cjs/index131.js +1 -1
- package/cjs/index132.js +1 -1
- package/cjs/index133.js +1 -1
- package/cjs/index134.js +1 -1
- package/cjs/index135.js +1 -1
- package/cjs/index136.js +1 -1
- package/cjs/index137.js +1 -1
- package/cjs/index138.js +5 -8
- package/cjs/index139.js +1 -8
- package/cjs/index14.js +1 -1
- package/cjs/index140.js +1 -5
- package/cjs/index141.js +1 -1
- package/cjs/index142.js +1 -1
- package/cjs/index143.js +1 -1
- package/cjs/index144.js +1 -1
- package/cjs/index145.js +1 -11
- package/cjs/index146.js +1 -1
- package/cjs/index147.js +1 -1
- package/cjs/index148.js +1 -1
- package/cjs/index149.js +1 -1
- package/cjs/index150.js +1 -1
- package/cjs/index151.js +1 -1
- package/cjs/index152.js +1 -1
- package/cjs/index153.js +1 -1
- package/cjs/index154.js +1 -1
- package/cjs/index155.js +1 -1
- package/cjs/index156.js +1 -1
- package/cjs/index157.js +1 -1
- package/cjs/index158.js +1 -1
- package/cjs/index159.js +1 -1
- package/cjs/index16.js +1 -1
- package/cjs/index160.js +1 -1
- package/cjs/index161.js +1 -1
- package/cjs/index162.js +1 -1
- package/cjs/index163.js +1 -1
- package/cjs/index164.js +1 -1
- package/cjs/index165.js +1 -1
- package/cjs/index166.js +1 -1
- package/cjs/index167.js +1 -1
- package/cjs/index168.js +1 -1
- package/cjs/index169.js +1 -1
- package/cjs/index17.js +1 -1
- package/cjs/index170.js +1 -1
- package/cjs/index171.js +1 -1
- package/cjs/index172.js +1 -1
- package/cjs/index173.js +1 -1
- package/cjs/index174.js +1 -1
- package/cjs/index175.js +1 -1
- package/cjs/index176.js +1 -1
- package/cjs/index177.js +1 -1
- package/cjs/index178.js +1 -1
- package/cjs/index179.js +1 -1
- package/cjs/index18.js +1 -1
- package/cjs/index180.js +1 -1
- package/cjs/index181.js +1 -1
- package/cjs/index182.js +1 -1
- package/cjs/index183.js +1 -1
- package/cjs/index184.js +1 -1
- package/cjs/index185.js +1 -1
- package/cjs/index186.js +1 -1
- package/cjs/index187.js +1 -1
- package/cjs/index188.js +1 -1
- package/cjs/index189.js +1 -1
- package/cjs/index190.js +1 -1
- package/cjs/index191.js +1 -1
- package/cjs/index192.js +1 -1
- package/cjs/index193.js +1 -1
- package/cjs/index194.js +1 -1
- package/cjs/index195.js +1 -1
- package/cjs/index196.js +1 -1
- package/cjs/index197.js +1 -1
- package/cjs/index198.js +1 -1
- package/cjs/index199.js +1 -1
- package/cjs/index2.js +1 -1
- package/cjs/index20.js +1 -1
- package/cjs/index200.js +1 -1
- package/cjs/index201.js +1 -1
- package/cjs/index202.js +1 -1
- package/cjs/index203.js +1 -1
- package/cjs/index204.js +1 -1
- package/cjs/index205.js +1 -1
- package/cjs/index206.js +1 -1
- package/cjs/index207.js +1 -1
- package/cjs/index208.js +2 -1
- package/cjs/index209.js +1 -1
- package/cjs/index21.js +1 -1
- package/cjs/index210.js +1 -1
- package/cjs/index211.js +1 -1
- package/cjs/index212.js +1 -1
- package/cjs/index213.js +10 -1
- package/cjs/index214.js +1 -1
- package/cjs/index215.js +1 -1
- package/cjs/index216.js +1 -1
- package/cjs/index217.js +1 -1
- package/cjs/index218.js +1 -1
- package/cjs/index219.js +1 -1
- package/cjs/index22.js +1 -1
- package/cjs/index220.js +5 -1
- package/cjs/index221.js +9 -1
- package/cjs/index222.js +1 -1
- package/cjs/index223.js +8 -1
- package/cjs/index224.js +8 -1
- package/cjs/index225.js +5 -1
- package/cjs/index226.js +1 -1
- package/cjs/index227.js +1 -1
- package/cjs/index228.js +1 -1
- package/cjs/index229.js +11 -1
- package/cjs/index230.js +1 -1
- package/cjs/index231.js +1 -1
- package/cjs/index232.js +1 -1
- package/cjs/index233.js +1 -1
- package/cjs/index234.js +1 -1
- package/cjs/index235.js +1 -1
- package/cjs/index24.js +1 -1
- package/cjs/index25.js +1 -1
- package/cjs/index26.js +1 -1
- package/cjs/index27.js +1 -1
- package/cjs/index28.js +1 -1
- package/cjs/index3.js +1 -1
- package/cjs/index30.js +1 -1
- package/cjs/index31.js +1 -1
- package/cjs/index32.js +1 -1
- package/cjs/index33.js +1 -1
- package/cjs/index34.js +1 -1
- package/cjs/index36.js +1 -1
- package/cjs/index37.js +1 -1
- package/cjs/index38.js +1 -1
- package/cjs/index39.js +1 -1
- package/cjs/index4.js +1 -1
- package/cjs/index40.js +1 -1
- package/cjs/index41.js +1 -1
- package/cjs/index42.js +1 -1
- package/cjs/index43.js +1 -1
- package/cjs/index44.js +1 -1
- package/cjs/index45.js +1 -1
- package/cjs/index46.js +1 -1
- package/cjs/index47.js +1 -1
- package/cjs/index48.js +1 -1
- package/cjs/index49.js +1 -1
- package/cjs/index50.js +1 -1
- package/cjs/index51.js +1 -1
- package/cjs/index52.js +1 -1
- package/cjs/index53.js +1 -1
- package/cjs/index55.js +1 -1
- package/cjs/index57.js +1 -1
- package/cjs/index58.js +1 -1
- package/cjs/index59.js +1 -1
- package/cjs/index6.js +1 -1
- package/cjs/index60.js +1 -1
- package/cjs/index61.js +1 -7
- package/cjs/index62.js +1 -1
- package/cjs/index63.js +1 -1
- package/cjs/index64.js +1 -1
- package/cjs/index65.js +1 -1
- package/cjs/index66.js +1 -1
- package/cjs/index67.js +1 -1
- package/cjs/index68.js +1 -1
- package/cjs/index69.js +1 -1
- package/cjs/index70.js +1 -1
- package/cjs/index71.js +1 -1
- package/cjs/index72.js +1 -1
- package/cjs/index73.js +1 -1
- package/cjs/index74.js +1 -1
- package/cjs/index76.js +1 -1
- package/cjs/index77.js +1 -1
- package/cjs/index78.js +1 -1
- package/cjs/index79.js +7 -1
- package/cjs/index8.js +1 -1
- package/cjs/index82.js +1 -1
- package/cjs/index83.js +1 -1
- package/cjs/index84.js +1 -1
- package/cjs/index85.js +1 -1
- package/cjs/index87.js +1 -1
- package/cjs/index88.js +1 -1
- package/cjs/index89.js +1 -1
- package/cjs/index9.js +1 -1
- package/cjs/index90.js +1 -1
- package/cjs/index91.js +1 -5
- package/cjs/index92.js +1 -1
- package/cjs/index93.js +1 -1
- package/cjs/index94.js +1 -1
- package/cjs/index95.js +1 -1
- package/cjs/index96.js +1 -1
- package/cjs/index97.js +1 -1
- package/cjs/index98.js +1 -1
- package/cjs/index99.js +1 -1
- package/es/index10.mjs +3 -3
- package/es/index100.mjs +5 -4
- package/es/index101.mjs +5 -11
- package/es/index102.mjs +7 -247
- package/es/index103.mjs +4 -88
- package/es/index104.mjs +6 -14
- package/es/index105.mjs +5 -4
- package/es/index106.mjs +7 -2
- package/es/index107.mjs +13 -2
- package/es/index108.mjs +16 -2
- package/es/index109.mjs +8 -390
- package/es/index11.mjs +1 -1
- package/es/index110.mjs +5 -124
- package/es/index111.mjs +5 -133
- package/es/index112.mjs +5 -2
- package/es/index113.mjs +512 -7
- package/es/index114.mjs +49 -326
- package/es/index115.mjs +17 -49
- package/es/index116.mjs +18 -2
- package/es/index117.mjs +4 -64
- package/es/index118.mjs +8 -43
- package/es/index119.mjs +5 -59
- package/es/index12.mjs +14 -14
- package/es/index120.mjs +6 -45
- package/es/index121.mjs +5 -39
- package/es/index122.mjs +9 -2
- package/es/index123.mjs +5 -2
- package/es/index124.mjs +8 -2
- package/es/index125.mjs +11 -30
- package/es/index126.mjs +9 -19
- package/es/index127.mjs +8 -60
- package/es/index128.mjs +12 -62
- package/es/index129.mjs +3 -13
- package/es/index13.mjs +2 -2
- package/es/index130.mjs +32 -6
- package/es/index131.mjs +65 -7
- package/es/index132.mjs +7 -5
- package/es/index133.mjs +7 -5
- package/es/index134.mjs +6 -4
- package/es/index135.mjs +6 -6
- package/es/index136.mjs +13 -4
- package/es/index137.mjs +398 -2
- package/es/index138.mjs +38 -74
- package/es/index139.mjs +57 -93
- package/es/index14.mjs +3 -3
- package/es/index140.mjs +19 -49
- package/es/index141.mjs +40 -7
- package/es/index142.mjs +60 -4
- package/es/index143.mjs +29 -49
- package/es/index144.mjs +13 -2
- package/es/index145.mjs +58 -54
- package/es/index146.mjs +62 -2
- package/es/index147.mjs +63 -2
- package/es/index148.mjs +62 -4
- package/es/index149.mjs +39 -4
- package/es/index150.mjs +41 -7
- package/es/index151.mjs +52 -12
- package/es/index152.mjs +42 -15
- package/es/index153.mjs +36 -8
- package/es/index154.mjs +65 -5
- package/es/index155.mjs +65 -5
- package/es/index156.mjs +90 -4
- package/es/index157.mjs +19 -491
- package/es/index158.mjs +39 -48
- package/es/index159.mjs +40 -17
- package/es/index16.mjs +1 -1
- package/es/index160.mjs +24 -17
- package/es/index161.mjs +23 -4
- package/es/index162.mjs +23 -7
- package/es/index163.mjs +24 -5
- package/es/index164.mjs +23 -4
- package/es/index165.mjs +23 -5
- package/es/index166.mjs +13 -8
- package/es/index167.mjs +39 -4
- package/es/index168.mjs +39 -7
- package/es/index169.mjs +13 -11
- package/es/index17.mjs +4 -4
- package/es/index170.mjs +13 -8
- package/es/index171.mjs +23 -8
- package/es/index172.mjs +2 -13
- package/es/index173.mjs +235 -4
- package/es/index174.mjs +2 -33
- package/es/index175.mjs +2 -65
- package/es/index176.mjs +390 -7
- package/es/index177.mjs +124 -7
- package/es/index178.mjs +133 -6
- package/es/index179.mjs +68 -7
- package/es/index18.mjs +8 -8
- package/es/index180.mjs +31 -14
- package/es/index181.mjs +9 -2
- package/es/index182.mjs +153 -2
- package/es/index183.mjs +108 -2
- package/es/index184.mjs +19 -56
- package/es/index185.mjs +98 -19
- package/es/index186.mjs +47 -41
- package/es/index187.mjs +11 -61
- package/es/index188.mjs +245 -30
- package/es/index189.mjs +86 -10
- package/es/index190.mjs +14 -63
- package/es/index191.mjs +4 -62
- package/es/index192.mjs +2 -63
- package/es/index193.mjs +2 -63
- package/es/index194.mjs +58 -39
- package/es/index195.mjs +8 -40
- package/es/index196.mjs +18 -51
- package/es/index197.mjs +67 -42
- package/es/index198.mjs +31 -37
- package/es/index199.mjs +9 -66
- package/es/index2.mjs +1 -1
- package/es/index20.mjs +2 -2
- package/es/index200.mjs +107 -65
- package/es/index201.mjs +106 -90
- package/es/index202.mjs +6 -40
- package/es/index203.mjs +14 -39
- package/es/index204.mjs +28 -40
- package/es/index205.mjs +12 -24
- package/es/index206.mjs +2 -24
- package/es/index207.mjs +7 -23
- package/es/index208.mjs +324 -22
- package/es/index209.mjs +47 -21
- package/es/index21.mjs +1 -1
- package/es/index210.mjs +2 -24
- package/es/index211.mjs +62 -11
- package/es/index212.mjs +41 -38
- package/es/index213.mjs +58 -38
- package/es/index214.mjs +45 -15
- package/es/index215.mjs +37 -11
- package/es/index216.mjs +2 -68
- package/es/index217.mjs +2 -31
- package/es/index218.mjs +2 -9
- package/es/index219.mjs +30 -152
- package/es/index22.mjs +1 -1
- package/es/index220.mjs +19 -108
- package/es/index221.mjs +58 -17
- package/es/index222.mjs +2 -101
- package/es/index223.mjs +76 -47
- package/es/index224.mjs +93 -68
- package/es/index225.mjs +52 -31
- package/es/index226.mjs +8 -9
- package/es/index227.mjs +5 -108
- package/es/index228.mjs +51 -106
- package/es/index229.mjs +58 -59
- package/es/index230.mjs +2 -9
- package/es/index231.mjs +2 -20
- package/es/index232.mjs +2 -7
- package/es/index233.mjs +2 -16
- package/es/index234.mjs +2 -29
- package/es/index235.mjs +2 -13
- package/es/index24.mjs +3 -3
- package/es/index25.mjs +1 -1
- package/es/index26.mjs +1 -1
- package/es/index27.mjs +1 -1
- package/es/index28.mjs +1 -1
- package/es/index3.mjs +1 -1
- package/es/index30.mjs +42 -40
- package/es/index31.mjs +2 -2
- package/es/index32.mjs +2 -2
- package/es/index33.mjs +3 -3
- package/es/index34.mjs +1 -1
- package/es/index36.mjs +3 -3
- package/es/index37.mjs +3 -3
- package/es/index38.mjs +3 -3
- package/es/index39.mjs +3 -3
- package/es/index4.mjs +2 -2
- package/es/index40.mjs +2 -2
- package/es/index41.mjs +1 -1
- package/es/index42.mjs +4 -4
- package/es/index43.mjs +1 -1
- package/es/index44.mjs +2 -2
- package/es/index45.mjs +3 -3
- package/es/index46.mjs +3 -3
- package/es/index47.mjs +2 -2
- package/es/index48.mjs +1 -1
- package/es/index49.mjs +2 -2
- package/es/index50.mjs +1 -1
- package/es/index51.mjs +8 -11
- package/es/index52.mjs +47 -6
- package/es/index53.mjs +28 -21
- package/es/index55.mjs +46 -27
- package/es/index57.mjs +2 -49
- package/es/index58.mjs +74 -30
- package/es/index59.mjs +11 -17
- package/es/index6.mjs +3 -3
- package/es/index60.mjs +27 -27
- package/es/index61.mjs +34 -407
- package/es/index62.mjs +3 -28
- package/es/index63.mjs +33 -34
- package/es/index64.mjs +5 -17
- package/es/index65.mjs +4 -34
- package/es/index66.mjs +5 -2
- package/es/index67.mjs +4 -73
- package/es/index68.mjs +4 -28
- package/es/index69.mjs +16 -35
- package/es/index70.mjs +28 -3
- package/es/index71.mjs +80 -30
- package/es/index72.mjs +5 -4
- package/es/index73.mjs +24 -4
- package/es/index74.mjs +54 -4
- package/es/index76.mjs +4 -4
- package/es/index77.mjs +118 -16
- package/es/index78.mjs +19 -83
- package/es/index79.mjs +408 -5
- package/es/index8.mjs +2 -2
- package/es/index82.mjs +16 -84
- package/es/index83.mjs +30 -5
- package/es/index84.mjs +13 -118
- package/es/index85.mjs +57 -60
- package/es/index87.mjs +60 -12
- package/es/index88.mjs +57 -56
- package/es/index89.mjs +5 -5
- package/es/index9.mjs +1 -1
- package/es/index90.mjs +59 -390
- package/es/index91.mjs +3 -40
- package/es/index92.mjs +4 -23
- package/es/index93.mjs +11 -2
- package/es/index94.mjs +5 -235
- package/es/index95.mjs +63 -2
- package/es/index96.mjs +13 -66
- package/es/index97.mjs +7 -3
- package/es/index98.mjs +6 -4
- package/es/index99.mjs +5 -10
- package/package.json +1 -1
- package/cjs/index56.js +0 -1
- package/cjs/index75.js +0 -1
- package/cjs/index80.js +0 -1
- package/cjs/index81.js +0 -1
- package/cjs/index86.js +0 -1
- package/es/index56.mjs +0 -49
- package/es/index75.mjs +0 -7
- package/es/index80.mjs +0 -27
- package/es/index81.mjs +0 -57
- package/es/index86.mjs +0 -62
package/es/index78.mjs
CHANGED
|
@@ -1,87 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { parsers as A } from "./index175.mjs";
|
|
8
|
-
import { enUS as W } from "./index160.mjs";
|
|
9
|
-
const N = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, L = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Y = /^'([^]*?)'?$/, j = /''/g, q = /\S/, v = /[a-zA-Z]/;
|
|
10
|
-
function G(n, a, c, f) {
|
|
11
|
-
const r = () => D(c, NaN), i = F(), l = i.locale ?? W, d = i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, R = i.weekStartsOn ?? i.locale?.options?.weekStartsOn ?? 0;
|
|
12
|
-
if (!a)
|
|
13
|
-
return n ? r() : O(c, f?.in);
|
|
14
|
-
const m = {
|
|
15
|
-
firstWeekContainsDate: d,
|
|
16
|
-
weekStartsOn: R,
|
|
17
|
-
locale: l
|
|
18
|
-
}, p = [new $(f?.in, c)], x = a.match(L).map((t) => {
|
|
19
|
-
const e = t[0];
|
|
20
|
-
if (e in y) {
|
|
21
|
-
const o = y[e];
|
|
22
|
-
return o(t, l.formatLong);
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
}).join("").match(N), u = [];
|
|
26
|
-
for (let t of x) {
|
|
27
|
-
b(t) && E(t, a, n), C(t) && E(t, a, n);
|
|
28
|
-
const e = t[0], o = A[e];
|
|
29
|
-
if (o) {
|
|
30
|
-
const { incompatibleTokens: k } = o;
|
|
31
|
-
if (Array.isArray(k)) {
|
|
32
|
-
const w = u.find(
|
|
33
|
-
(T) => k.includes(T.token) || T.token === e
|
|
34
|
-
);
|
|
35
|
-
if (w)
|
|
36
|
-
throw new RangeError(
|
|
37
|
-
`The format string mustn't contain \`${w.fullToken}\` and \`${t}\` at the same time`
|
|
38
|
-
);
|
|
39
|
-
} else if (o.incompatibleTokens === "*" && u.length > 0)
|
|
40
|
-
throw new RangeError(
|
|
41
|
-
`The format string mustn't contain \`${t}\` and any other token at the same time`
|
|
42
|
-
);
|
|
43
|
-
u.push({ token: e, fullToken: t });
|
|
44
|
-
const g = o.run(
|
|
45
|
-
n,
|
|
46
|
-
t,
|
|
47
|
-
l.match,
|
|
48
|
-
m
|
|
49
|
-
);
|
|
50
|
-
if (!g)
|
|
51
|
-
return r();
|
|
52
|
-
p.push(g.setter), n = g.rest;
|
|
53
|
-
} else {
|
|
54
|
-
if (e.match(v))
|
|
55
|
-
throw new RangeError(
|
|
56
|
-
"Format string contains an unescaped latin alphabet character `" + e + "`"
|
|
57
|
-
);
|
|
58
|
-
if (t === "''" ? t = "'" : e === "'" && (t = z(t)), n.indexOf(t) === 0)
|
|
59
|
-
n = n.slice(t.length);
|
|
60
|
-
else
|
|
61
|
-
return r();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (n.length > 0 && q.test(n))
|
|
65
|
-
return r();
|
|
66
|
-
const P = p.map((t) => t.priority).sort((t, e) => e - t).filter((t, e, o) => o.indexOf(t) === e).map(
|
|
67
|
-
(t) => p.filter((e) => e.priority === t).sort((e, o) => o.subPriority - e.subPriority)
|
|
68
|
-
).map((t) => t[0]);
|
|
69
|
-
let s = O(c, f?.in);
|
|
70
|
-
if (isNaN(+s)) return r();
|
|
71
|
-
const h = {};
|
|
72
|
-
for (const t of P) {
|
|
73
|
-
if (!t.validate(s, m))
|
|
74
|
-
return r();
|
|
75
|
-
const e = t.set(s, h, m);
|
|
76
|
-
Array.isArray(e) ? (s = e[0], Object.assign(h, e[1])) : s = e;
|
|
77
|
-
}
|
|
78
|
-
return s;
|
|
1
|
+
import { ICONS_SVG_HTML_ID as s } from "./index59.mjs";
|
|
2
|
+
const r = 1048576;
|
|
3
|
+
function a(i, e = "") {
|
|
4
|
+
return e.split(",").map((t) => t.trim()).flatMap((t) => t.split(".")).some(
|
|
5
|
+
(t) => !t || t === "*" || t === i.type || t.includes("*") && !!t.split("/")?.[0] && i.type.startsWith(t.split("/")?.[0])
|
|
6
|
+
);
|
|
79
7
|
}
|
|
80
|
-
function
|
|
81
|
-
return
|
|
8
|
+
function c(i, e) {
|
|
9
|
+
return !e || i.size <= e * r;
|
|
10
|
+
}
|
|
11
|
+
function o(i, e, n) {
|
|
12
|
+
return i.map((t) => ({ validFormat: a(t, e), validSize: c(t, n) }));
|
|
13
|
+
}
|
|
14
|
+
function p(i) {
|
|
15
|
+
const e = document.getElementById(s);
|
|
16
|
+
return e ? !!e.querySelector(`symbol#ai-${i}`) : !1;
|
|
82
17
|
}
|
|
83
18
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
19
|
+
o as areFilesValid,
|
|
20
|
+
a as hasValidFormat,
|
|
21
|
+
c as hasValidSize,
|
|
22
|
+
p as iconExists
|
|
87
23
|
};
|
package/es/index79.mjs
CHANGED
|
@@ -1,8 +1,411 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import ce, { useState as w, useRef as $, useEffect as u, useContext as St, useCallback as At, useImperativeHandle as Et, createContext as kt, useLayoutEffect as Ot } from "react";
|
|
2
|
+
import { autoUpdate as Tt, arrow as xt, computePosition as ut, offset as Lt, flip as Ct, shift as Rt } from "./index137.mjs";
|
|
3
|
+
import lt from "./index138.mjs";
|
|
4
|
+
/*
|
|
5
|
+
* React Tooltip
|
|
6
|
+
* {@link https://github.com/ReactTooltip/react-tooltip}
|
|
7
|
+
* @copyright ReactTooltip Team
|
|
8
|
+
* @license MIT
|
|
9
|
+
*/
|
|
10
|
+
const Nt = "react-tooltip-core-styles", zt = "react-tooltip-base-styles", dt = { core: !1, base: !1 };
|
|
11
|
+
function pt({ css: l, id: n = zt, type: v = "base", ref: c }) {
|
|
12
|
+
var m, h;
|
|
13
|
+
if (!l || typeof document > "u" || dt[v] || v === "core" && typeof process < "u" && (!((m = process == null ? void 0 : process.env) === null || m === void 0) && m.REACT_TOOLTIP_DISABLE_CORE_STYLES) || v !== "base" && typeof process < "u" && (!((h = process == null ? void 0 : process.env) === null || h === void 0) && h.REACT_TOOLTIP_DISABLE_BASE_STYLES)) return;
|
|
14
|
+
v === "core" && (n = Nt), c || (c = {});
|
|
15
|
+
const { insertAt: C } = c;
|
|
16
|
+
if (document.getElementById(n)) return;
|
|
17
|
+
const b = document.head || document.getElementsByTagName("head")[0], _ = document.createElement("style");
|
|
18
|
+
_.id = n, _.type = "text/css", C === "top" && b.firstChild ? b.insertBefore(_, b.firstChild) : b.appendChild(_), _.styleSheet ? _.styleSheet.cssText = l : _.appendChild(document.createTextNode(l)), dt[v] = !0;
|
|
5
19
|
}
|
|
20
|
+
const ft = async ({ elementReference: l = null, tooltipReference: n = null, tooltipArrowReference: v = null, place: c = "top", offset: m = 10, strategy: h = "absolute", middlewares: C = [Lt(Number(m)), Ct({ fallbackAxisSideDirection: "start" }), Rt({ padding: 5 })], border: b, arrowSize: _ = 8 }) => {
|
|
21
|
+
if (!l) return { tooltipStyles: {}, tooltipArrowStyles: {}, place: c };
|
|
22
|
+
if (n === null) return { tooltipStyles: {}, tooltipArrowStyles: {}, place: c };
|
|
23
|
+
const q = C;
|
|
24
|
+
return v ? (q.push(xt({ element: v, padding: 5 })), ut(l, n, { placement: c, strategy: h, middleware: q }).then(({ x: K, y: j, placement: J, middlewareData: G }) => {
|
|
25
|
+
var I, x;
|
|
26
|
+
const Z = { left: `${K}px`, top: `${j}px`, border: b }, { x: M, y: U } = (I = G.arrow) !== null && I !== void 0 ? I : { x: 0, y: 0 }, W = (x = { top: "bottom", right: "left", bottom: "top", left: "right" }[J.split("-")[0]]) !== null && x !== void 0 ? x : "bottom", Y = b && { borderBottom: b, borderRight: b };
|
|
27
|
+
let ue = 0;
|
|
28
|
+
if (b) {
|
|
29
|
+
const ee = `${b}`.match(/(\d+)px/);
|
|
30
|
+
ue = ee?.[1] ? Number(ee[1]) : 1;
|
|
31
|
+
}
|
|
32
|
+
return { tooltipStyles: Z, tooltipArrowStyles: { left: M != null ? `${M}px` : "", top: U != null ? `${U}px` : "", right: "", bottom: "", ...Y, [W]: `-${_ / 2 + ue}px` }, place: J };
|
|
33
|
+
})) : ut(l, n, { placement: "bottom", strategy: h, middleware: q }).then(({ x: K, y: j, placement: J }) => ({ tooltipStyles: { left: `${K}px`, top: `${j}px` }, tooltipArrowStyles: {}, place: J }));
|
|
34
|
+
}, vt = (l, n) => !("CSS" in window && "supports" in window.CSS) || window.CSS.supports(l, n), mt = (l, n, v) => {
|
|
35
|
+
let c = null;
|
|
36
|
+
const m = function(...h) {
|
|
37
|
+
const C = () => {
|
|
38
|
+
c = null;
|
|
39
|
+
};
|
|
40
|
+
!c && (l.apply(this, h), c = setTimeout(C, n));
|
|
41
|
+
};
|
|
42
|
+
return m.cancel = () => {
|
|
43
|
+
c && (clearTimeout(c), c = null);
|
|
44
|
+
}, m;
|
|
45
|
+
}, yt = (l) => l !== null && !Array.isArray(l) && typeof l == "object", rt = (l, n) => {
|
|
46
|
+
if (l === n) return !0;
|
|
47
|
+
if (Array.isArray(l) && Array.isArray(n)) return l.length === n.length && l.every((m, h) => rt(m, n[h]));
|
|
48
|
+
if (Array.isArray(l) !== Array.isArray(n)) return !1;
|
|
49
|
+
if (!yt(l) || !yt(n)) return l === n;
|
|
50
|
+
const v = Object.keys(l), c = Object.keys(n);
|
|
51
|
+
return v.length === c.length && v.every((m) => rt(l[m], n[m]));
|
|
52
|
+
}, $t = (l) => {
|
|
53
|
+
if (!(l instanceof HTMLElement || l instanceof SVGElement)) return !1;
|
|
54
|
+
const n = getComputedStyle(l);
|
|
55
|
+
return ["overflow", "overflow-x", "overflow-y"].some((v) => {
|
|
56
|
+
const c = n.getPropertyValue(v);
|
|
57
|
+
return c === "auto" || c === "scroll";
|
|
58
|
+
});
|
|
59
|
+
}, wt = (l) => {
|
|
60
|
+
if (!l) return null;
|
|
61
|
+
let n = l.parentElement;
|
|
62
|
+
for (; n; ) {
|
|
63
|
+
if ($t(n)) return n;
|
|
64
|
+
n = n.parentElement;
|
|
65
|
+
}
|
|
66
|
+
return document.scrollingElement || document.documentElement;
|
|
67
|
+
}, jt = typeof window < "u" ? Ot : u, z = (l) => {
|
|
68
|
+
l.current && (clearTimeout(l.current), l.current = null);
|
|
69
|
+
}, It = "DEFAULT_TOOLTIP_ID", Bt = { anchorRefs: /* @__PURE__ */ new Set(), activeAnchor: { current: null }, attach: () => {
|
|
70
|
+
}, detach: () => {
|
|
71
|
+
}, setActiveAnchor: () => {
|
|
72
|
+
} }, Dt = kt({ getTooltipData: () => Bt });
|
|
73
|
+
function ht(l = It) {
|
|
74
|
+
return St(Dt).getTooltipData(l);
|
|
75
|
+
}
|
|
76
|
+
var Te = { tooltip: "core-styles-module_tooltip__3vRRp", fixed: "core-styles-module_fixed__pcSol", arrow: "core-styles-module_arrow__cvMwQ", noArrow: "core-styles-module_noArrow__xock6", clickable: "core-styles-module_clickable__ZuTTB", show: "core-styles-module_show__Nt9eE", closing: "core-styles-module_closing__sGnxF" }, ot = { tooltip: "styles-module_tooltip__mnnfp", arrow: "styles-module_arrow__K0L3T", dark: "styles-module_dark__xNqje", light: "styles-module_light__Z6W-X", success: "styles-module_success__A2AKt", warning: "styles-module_warning__SCK0X", error: "styles-module_error__JvumD", info: "styles-module_info__BWdHW" };
|
|
77
|
+
const qt = ({ forwardRef: l, id: n, className: v, classNameArrow: c, variant: m = "dark", anchorId: h, anchorSelect: C, place: b = "top", offset: _ = 10, events: q = ["hover"], openOnClick: K = !1, positionStrategy: j = "absolute", middlewares: J, wrapper: G, delayShow: I = 0, delayHide: x = 0, float: Z = !1, hidden: M = !1, noArrow: U = !1, clickable: W = !1, closeOnEsc: Y = !1, closeOnScroll: ue = !1, closeOnResize: ee = !1, openEvents: R, closeEvents: de, globalCloseEvents: xe, imperativeModeOnly: Ge, style: Me, position: We, afterShow: He, afterHide: H, disableTooltip: pe, content: Le, contentWrapperRef: te, isOpen: B, defaultIsOpen: fe = !1, setIsOpen: oe, previousActiveAnchor: Ce, activeAnchor: d, setActiveAnchor: ve, border: Pe, opacity: Xe, arrowColor: Je, arrowSize: me = 8, role: Ze = "tooltip" }) => {
|
|
78
|
+
var le;
|
|
79
|
+
const k = $(null), ye = $(null), D = $(null), re = $(null), we = $(null), [ne, Ue] = w({ tooltipStyles: {}, tooltipArrowStyles: {}, place: b }), [O, Re] = w(!1), [he, F] = w(!1), [f, be] = w(null), Ve = $(!1), _e = $(null), { anchorRefs: Ye, setActiveAnchor: Ne } = ht(n), ze = $(!1), [Q, $e] = w([]), se = $(!1), ge = K || q.includes("click"), Fe = ge || R?.click || R?.dblclick || R?.mousedown, je = R ? { ...R } : { mouseover: !0, focus: !0, mouseenter: !1, click: !1, dblclick: !1, mousedown: !1 };
|
|
80
|
+
!R && ge && Object.assign(je, { mouseenter: !1, focus: !1, mouseover: !1, click: !0 });
|
|
81
|
+
const ae = de ? { ...de } : { mouseout: !0, blur: !0, mouseleave: !1, click: !1, dblclick: !1, mouseup: !1 };
|
|
82
|
+
!de && ge && Object.assign(ae, { mouseleave: !1, blur: !1, mouseout: !1 });
|
|
83
|
+
const S = xe ? { ...xe } : { escape: Y || !1, scroll: ue || !1, resize: ee || !1, clickOutsideAnchor: Fe || !1 };
|
|
84
|
+
Ge && (Object.assign(je, { mouseover: !1, focus: !1, mouseenter: !1, click: !1, dblclick: !1, mousedown: !1 }), Object.assign(ae, { mouseout: !1, blur: !1, mouseleave: !1, click: !1, dblclick: !1, mouseup: !1 }), Object.assign(S, { escape: !1, scroll: !1, resize: !1, clickOutsideAnchor: !1 })), jt(() => (se.current = !0, () => {
|
|
85
|
+
se.current = !1;
|
|
86
|
+
}), []);
|
|
87
|
+
const T = (e) => {
|
|
88
|
+
se.current && (e && F(!0), setTimeout(() => {
|
|
89
|
+
se.current && (oe?.(e), B === void 0 && Re(e));
|
|
90
|
+
}, 10));
|
|
91
|
+
};
|
|
92
|
+
u(() => {
|
|
93
|
+
if (n) {
|
|
94
|
+
if (O) {
|
|
95
|
+
o(Ce);
|
|
96
|
+
const t = e(d), i = [.../* @__PURE__ */ new Set([...t, n])].filter(Boolean).join(" ");
|
|
97
|
+
d?.setAttribute("aria-describedby", i);
|
|
98
|
+
} else o(d);
|
|
99
|
+
return () => {
|
|
100
|
+
o(d), o(Ce);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function e(t) {
|
|
104
|
+
var i;
|
|
105
|
+
return ((i = t?.getAttribute("aria-describedby")) === null || i === void 0 ? void 0 : i.split(" ")) || [];
|
|
106
|
+
}
|
|
107
|
+
function o(t) {
|
|
108
|
+
const i = e(t).filter((g) => g !== n);
|
|
109
|
+
i.length ? t?.setAttribute("aria-describedby", i.join(" ")) : t?.removeAttribute("aria-describedby");
|
|
110
|
+
}
|
|
111
|
+
}, [d, O, n, Ce]), u(() => {
|
|
112
|
+
if (B === void 0) return () => null;
|
|
113
|
+
B && F(!0);
|
|
114
|
+
const e = setTimeout(() => {
|
|
115
|
+
Re(B);
|
|
116
|
+
}, 10);
|
|
117
|
+
return () => {
|
|
118
|
+
clearTimeout(e);
|
|
119
|
+
};
|
|
120
|
+
}, [B]), u(() => {
|
|
121
|
+
if (O !== Ve.current) if (z(we), Ve.current = O, O) He?.();
|
|
122
|
+
else {
|
|
123
|
+
const e = ((o) => {
|
|
124
|
+
const t = o.match(/^([\d.]+)(ms|s)$/);
|
|
125
|
+
if (!t) return 0;
|
|
126
|
+
const [, i, g] = t;
|
|
127
|
+
return Number(i) * (g === "ms" ? 1 : 1e3);
|
|
128
|
+
})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));
|
|
129
|
+
we.current = setTimeout(() => {
|
|
130
|
+
F(!1), be(null), H?.();
|
|
131
|
+
}, e + 25);
|
|
132
|
+
}
|
|
133
|
+
}, [O]);
|
|
134
|
+
const Ie = (e) => {
|
|
135
|
+
Ue((o) => rt(o, e) ? o : e);
|
|
136
|
+
}, Be = (e = I) => {
|
|
137
|
+
z(D), he ? T(!0) : D.current = setTimeout(() => {
|
|
138
|
+
T(!0);
|
|
139
|
+
}, e);
|
|
140
|
+
}, Se = (e = x) => {
|
|
141
|
+
z(re), re.current = setTimeout(() => {
|
|
142
|
+
ze.current || T(!1);
|
|
143
|
+
}, e);
|
|
144
|
+
}, De = (e) => {
|
|
145
|
+
var o;
|
|
146
|
+
if (!e) return;
|
|
147
|
+
const t = (o = e.currentTarget) !== null && o !== void 0 ? o : e.target;
|
|
148
|
+
if (!t?.isConnected) return ve(null), void Ne({ current: null });
|
|
149
|
+
I ? Be() : T(!0), ve(t), Ne({ current: t }), z(re);
|
|
150
|
+
}, Ae = () => {
|
|
151
|
+
W ? Se(x || 100) : x ? Se() : T(!1), z(D);
|
|
152
|
+
}, Ee = ({ x: e, y: o }) => {
|
|
153
|
+
var t;
|
|
154
|
+
const i = { getBoundingClientRect: () => ({ x: e, y: o, width: 0, height: 0, top: o, left: e, right: e, bottom: o }) };
|
|
155
|
+
ft({ place: (t = f?.place) !== null && t !== void 0 ? t : b, offset: _, elementReference: i, tooltipReference: k.current, tooltipArrowReference: ye.current, strategy: j, middlewares: J, border: Pe, arrowSize: me }).then((g) => {
|
|
156
|
+
Ie(g);
|
|
157
|
+
});
|
|
158
|
+
}, ke = (e) => {
|
|
159
|
+
if (!e) return;
|
|
160
|
+
const o = e, t = { x: o.clientX, y: o.clientY };
|
|
161
|
+
Ee(t), _e.current = t;
|
|
162
|
+
}, qe = (e) => {
|
|
163
|
+
var o;
|
|
164
|
+
if (!O) return;
|
|
165
|
+
const t = e.target;
|
|
166
|
+
t.isConnected && (!((o = k.current) === null || o === void 0) && o.contains(t) || [document.querySelector(`[id='${h}']`), ...Q].some((i) => i?.contains(t)) || (T(!1), z(D)));
|
|
167
|
+
}, Qe = mt(De, 50), y = mt(Ae, 50), A = (e) => {
|
|
168
|
+
y.cancel(), Qe(e);
|
|
169
|
+
}, r = () => {
|
|
170
|
+
Qe.cancel(), y();
|
|
171
|
+
}, s = At(() => {
|
|
172
|
+
var e, o;
|
|
173
|
+
const t = (e = f?.position) !== null && e !== void 0 ? e : We;
|
|
174
|
+
t ? Ee(t) : Z ? _e.current && Ee(_e.current) : d?.isConnected && ft({ place: (o = f?.place) !== null && o !== void 0 ? o : b, offset: _, elementReference: d, tooltipReference: k.current, tooltipArrowReference: ye.current, strategy: j, middlewares: J, border: Pe, arrowSize: me }).then((i) => {
|
|
175
|
+
se.current && Ie(i);
|
|
176
|
+
});
|
|
177
|
+
}, [O, d, Le, Me, b, f?.place, _, j, We, f?.position, Z, me]);
|
|
178
|
+
u(() => {
|
|
179
|
+
var e, o;
|
|
180
|
+
const t = new Set(Ye);
|
|
181
|
+
Q.forEach((a) => {
|
|
182
|
+
pe?.(a) || t.add({ current: a });
|
|
183
|
+
});
|
|
184
|
+
const i = document.querySelector(`[id='${h}']`);
|
|
185
|
+
i && !pe?.(i) && t.add({ current: i });
|
|
186
|
+
const g = () => {
|
|
187
|
+
T(!1);
|
|
188
|
+
}, P = wt(d), X = wt(k.current);
|
|
189
|
+
S.scroll && (window.addEventListener("scroll", g), P?.addEventListener("scroll", g), X?.addEventListener("scroll", g));
|
|
190
|
+
let E = null;
|
|
191
|
+
S.resize ? window.addEventListener("resize", g) : d && k.current && (E = Tt(d, k.current, s, { ancestorResize: !0, elementResize: !0, layoutShift: !0 }));
|
|
192
|
+
const N = (a) => {
|
|
193
|
+
a.key === "Escape" && T(!1);
|
|
194
|
+
};
|
|
195
|
+
S.escape && window.addEventListener("keydown", N), S.clickOutsideAnchor && window.addEventListener("click", qe);
|
|
196
|
+
const p = [], Oe = (a) => !!(a?.target && d?.contains(a.target)), bt = (a) => {
|
|
197
|
+
O && Oe(a) || De(a);
|
|
198
|
+
}, _t = (a) => {
|
|
199
|
+
O && Oe(a) && Ae();
|
|
200
|
+
}, nt = ["mouseover", "mouseout", "mouseenter", "mouseleave", "focus", "blur"], st = ["click", "dblclick", "mousedown", "mouseup"];
|
|
201
|
+
Object.entries(je).forEach(([a, V]) => {
|
|
202
|
+
V && (nt.includes(a) ? p.push({ event: a, listener: A }) : st.includes(a) && p.push({ event: a, listener: bt }));
|
|
203
|
+
}), Object.entries(ae).forEach(([a, V]) => {
|
|
204
|
+
V && (nt.includes(a) ? p.push({ event: a, listener: r }) : st.includes(a) && p.push({ event: a, listener: _t }));
|
|
205
|
+
}), Z && p.push({ event: "pointermove", listener: ke });
|
|
206
|
+
const at = () => {
|
|
207
|
+
ze.current = !0;
|
|
208
|
+
}, it = () => {
|
|
209
|
+
ze.current = !1, Ae();
|
|
210
|
+
}, ct = W && (ae.mouseout || ae.mouseleave);
|
|
211
|
+
return ct && ((e = k.current) === null || e === void 0 || e.addEventListener("mouseover", at), (o = k.current) === null || o === void 0 || o.addEventListener("mouseout", it)), p.forEach(({ event: a, listener: V }) => {
|
|
212
|
+
t.forEach((et) => {
|
|
213
|
+
var Ke;
|
|
214
|
+
(Ke = et.current) === null || Ke === void 0 || Ke.addEventListener(a, V);
|
|
215
|
+
});
|
|
216
|
+
}), () => {
|
|
217
|
+
var a, V;
|
|
218
|
+
S.scroll && (window.removeEventListener("scroll", g), P?.removeEventListener("scroll", g), X?.removeEventListener("scroll", g)), S.resize ? window.removeEventListener("resize", g) : E?.(), S.clickOutsideAnchor && window.removeEventListener("click", qe), S.escape && window.removeEventListener("keydown", N), ct && ((a = k.current) === null || a === void 0 || a.removeEventListener("mouseover", at), (V = k.current) === null || V === void 0 || V.removeEventListener("mouseout", it)), p.forEach(({ event: et, listener: Ke }) => {
|
|
219
|
+
t.forEach((gt) => {
|
|
220
|
+
var tt;
|
|
221
|
+
(tt = gt.current) === null || tt === void 0 || tt.removeEventListener(et, Ke);
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
}, [d, s, he, Ye, Q, R, de, xe, ge, I, x]), u(() => {
|
|
226
|
+
var e, o;
|
|
227
|
+
let t = (o = (e = f?.anchorSelect) !== null && e !== void 0 ? e : C) !== null && o !== void 0 ? o : "";
|
|
228
|
+
!t && n && (t = `[data-tooltip-id='${n.replace(/'/g, "\\'")}']`);
|
|
229
|
+
const i = new MutationObserver((g) => {
|
|
230
|
+
const P = [], X = [];
|
|
231
|
+
g.forEach((E) => {
|
|
232
|
+
if (E.type === "attributes" && E.attributeName === "data-tooltip-id" && (E.target.getAttribute("data-tooltip-id") === n ? P.push(E.target) : E.oldValue === n && X.push(E.target)), E.type === "childList") {
|
|
233
|
+
if (d) {
|
|
234
|
+
const N = [...E.removedNodes].filter((p) => p.nodeType === 1);
|
|
235
|
+
if (t) try {
|
|
236
|
+
X.push(...N.filter((p) => p.matches(t))), X.push(...N.flatMap((p) => [...p.querySelectorAll(t)]));
|
|
237
|
+
} catch {
|
|
238
|
+
}
|
|
239
|
+
N.some((p) => {
|
|
240
|
+
var Oe;
|
|
241
|
+
return !!(!((Oe = p?.contains) === null || Oe === void 0) && Oe.call(p, d)) && (F(!1), T(!1), ve(null), z(D), z(re), !0);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
if (t) try {
|
|
245
|
+
const N = [...E.addedNodes].filter((p) => p.nodeType === 1);
|
|
246
|
+
P.push(...N.filter((p) => p.matches(t))), P.push(...N.flatMap((p) => [...p.querySelectorAll(t)]));
|
|
247
|
+
} catch {
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}), (P.length || X.length) && $e((E) => [...E.filter((N) => !X.includes(N)), ...P]);
|
|
251
|
+
});
|
|
252
|
+
return i.observe(document.body, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["data-tooltip-id"], attributeOldValue: !0 }), () => {
|
|
253
|
+
i.disconnect();
|
|
254
|
+
};
|
|
255
|
+
}, [n, C, f?.anchorSelect, d]), u(() => {
|
|
256
|
+
s();
|
|
257
|
+
}, [s]), u(() => {
|
|
258
|
+
if (!te?.current) return () => null;
|
|
259
|
+
const e = new ResizeObserver(() => {
|
|
260
|
+
setTimeout(() => s());
|
|
261
|
+
});
|
|
262
|
+
return e.observe(te.current), () => {
|
|
263
|
+
e.disconnect();
|
|
264
|
+
};
|
|
265
|
+
}, [Le, te?.current]), u(() => {
|
|
266
|
+
var e;
|
|
267
|
+
const o = document.querySelector(`[id='${h}']`), t = [...Q, o];
|
|
268
|
+
d && t.includes(d) || ve((e = Q[0]) !== null && e !== void 0 ? e : o);
|
|
269
|
+
}, [h, Q, d]), u(() => (fe && T(!0), () => {
|
|
270
|
+
z(D), z(re);
|
|
271
|
+
}), []), u(() => {
|
|
272
|
+
var e;
|
|
273
|
+
let o = (e = f?.anchorSelect) !== null && e !== void 0 ? e : C;
|
|
274
|
+
if (!o && n && (o = `[data-tooltip-id='${n.replace(/'/g, "\\'")}']`), o) try {
|
|
275
|
+
const t = Array.from(document.querySelectorAll(o));
|
|
276
|
+
$e(t);
|
|
277
|
+
} catch {
|
|
278
|
+
$e([]);
|
|
279
|
+
}
|
|
280
|
+
}, [n, C, f?.anchorSelect]), u(() => {
|
|
281
|
+
D.current && (z(D), Be(I));
|
|
282
|
+
}, [I]);
|
|
283
|
+
const L = (le = f?.content) !== null && le !== void 0 ? le : Le, ie = O && Object.keys(ne.tooltipStyles).length > 0;
|
|
284
|
+
return Et(l, () => ({ open: (e) => {
|
|
285
|
+
if (e?.anchorSelect) try {
|
|
286
|
+
document.querySelector(e.anchorSelect);
|
|
287
|
+
} catch {
|
|
288
|
+
return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`);
|
|
289
|
+
}
|
|
290
|
+
be(e ?? null), e?.delay ? Be(e.delay) : T(!0);
|
|
291
|
+
}, close: (e) => {
|
|
292
|
+
e?.delay ? Se(e.delay) : T(!1);
|
|
293
|
+
}, activeAnchor: d, place: ne.place, isOpen: !!(he && !M && L && ie) })), he && !M && L ? ce.createElement(G, { id: n, role: Ze, className: lt("react-tooltip", Te.tooltip, ot.tooltip, ot[m], v, `react-tooltip__place-${ne.place}`, Te[ie ? "show" : "closing"], ie ? "react-tooltip__show" : "react-tooltip__closing", j === "fixed" && Te.fixed, W && Te.clickable), onTransitionEnd: (e) => {
|
|
294
|
+
z(we), O || e.propertyName !== "opacity" || (F(!1), be(null), H?.());
|
|
295
|
+
}, style: { ...Me, ...ne.tooltipStyles, opacity: Xe !== void 0 && ie ? Xe : void 0 }, ref: k }, L, ce.createElement(G, { className: lt("react-tooltip-arrow", Te.arrow, ot.arrow, c, U && Te.noArrow), style: { ...ne.tooltipArrowStyles, background: Je ? `linear-gradient(to right bottom, transparent 50%, ${Je} 50%)` : void 0, "--rt-arrow-size": `${me}px` }, ref: ye })) : null;
|
|
296
|
+
}, Kt = ({ content: l }) => ce.createElement("span", { dangerouslySetInnerHTML: { __html: l } }), Pt = ce.forwardRef(({ id: l, anchorId: n, anchorSelect: v, content: c, html: m, render: h, className: C, classNameArrow: b, variant: _ = "dark", place: q = "top", offset: K = 10, wrapper: j = "div", children: J = null, events: G = ["hover"], openOnClick: I = !1, positionStrategy: x = "absolute", middlewares: Z, delayShow: M = 0, delayHide: U = 0, float: W = !1, hidden: Y = !1, noArrow: ue = !1, clickable: ee = !1, closeOnEsc: R = !1, closeOnScroll: de = !1, closeOnResize: xe = !1, openEvents: Ge, closeEvents: Me, globalCloseEvents: We, imperativeModeOnly: He = !1, style: H, position: pe, isOpen: Le, defaultIsOpen: te = !1, disableStyleInjection: B = !1, border: fe, opacity: oe, arrowColor: Ce, arrowSize: d, setIsOpen: ve, afterShow: Pe, afterHide: Xe, disableTooltip: Je, role: me = "tooltip" }, Ze) => {
|
|
297
|
+
const [le, k] = w(c), [ye, D] = w(m), [re, we] = w(q), [ne, Ue] = w(_), [O, Re] = w(K), [he, F] = w(M), [f, be] = w(U), [Ve, _e] = w(W), [Ye, Ne] = w(Y), [ze, Q] = w(j), [$e, se] = w(G), [ge, Fe] = w(x), [je, ae] = w(null), [S, T] = w(null), Ie = $(null), Be = $(B), { anchorRefs: Se, activeAnchor: De } = ht(l), Ae = (y) => y?.getAttributeNames().reduce((A, r) => {
|
|
298
|
+
var s;
|
|
299
|
+
return r.startsWith("data-tooltip-") && (A[r.replace(/^data-tooltip-/, "")] = (s = y?.getAttribute(r)) !== null && s !== void 0 ? s : null), A;
|
|
300
|
+
}, {}), Ee = (y) => {
|
|
301
|
+
const A = { place: (r) => {
|
|
302
|
+
var s;
|
|
303
|
+
we((s = r) !== null && s !== void 0 ? s : q);
|
|
304
|
+
}, content: (r) => {
|
|
305
|
+
k(r ?? c);
|
|
306
|
+
}, html: (r) => {
|
|
307
|
+
D(r ?? m);
|
|
308
|
+
}, variant: (r) => {
|
|
309
|
+
var s;
|
|
310
|
+
Ue((s = r) !== null && s !== void 0 ? s : _);
|
|
311
|
+
}, offset: (r) => {
|
|
312
|
+
Re(r === null ? K : Number(r));
|
|
313
|
+
}, wrapper: (r) => {
|
|
314
|
+
var s;
|
|
315
|
+
Q((s = r) !== null && s !== void 0 ? s : j);
|
|
316
|
+
}, events: (r) => {
|
|
317
|
+
const s = r?.split(" ");
|
|
318
|
+
se(s ?? G);
|
|
319
|
+
}, "position-strategy": (r) => {
|
|
320
|
+
var s;
|
|
321
|
+
Fe((s = r) !== null && s !== void 0 ? s : x);
|
|
322
|
+
}, "delay-show": (r) => {
|
|
323
|
+
F(r === null ? M : Number(r));
|
|
324
|
+
}, "delay-hide": (r) => {
|
|
325
|
+
be(r === null ? U : Number(r));
|
|
326
|
+
}, float: (r) => {
|
|
327
|
+
_e(r === null ? W : r === "true");
|
|
328
|
+
}, hidden: (r) => {
|
|
329
|
+
Ne(r === null ? Y : r === "true");
|
|
330
|
+
}, "class-name": (r) => {
|
|
331
|
+
ae(r);
|
|
332
|
+
} };
|
|
333
|
+
Object.values(A).forEach((r) => r(null)), Object.entries(y).forEach(([r, s]) => {
|
|
334
|
+
var L;
|
|
335
|
+
(L = A[r]) === null || L === void 0 || L.call(A, s);
|
|
336
|
+
});
|
|
337
|
+
};
|
|
338
|
+
u(() => {
|
|
339
|
+
k(c);
|
|
340
|
+
}, [c]), u(() => {
|
|
341
|
+
D(m);
|
|
342
|
+
}, [m]), u(() => {
|
|
343
|
+
we(q);
|
|
344
|
+
}, [q]), u(() => {
|
|
345
|
+
Ue(_);
|
|
346
|
+
}, [_]), u(() => {
|
|
347
|
+
Re(K);
|
|
348
|
+
}, [K]), u(() => {
|
|
349
|
+
F(M);
|
|
350
|
+
}, [M]), u(() => {
|
|
351
|
+
be(U);
|
|
352
|
+
}, [U]), u(() => {
|
|
353
|
+
_e(W);
|
|
354
|
+
}, [W]), u(() => {
|
|
355
|
+
Ne(Y);
|
|
356
|
+
}, [Y]), u(() => {
|
|
357
|
+
Fe(x);
|
|
358
|
+
}, [x]), u(() => {
|
|
359
|
+
Be.current !== B && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
|
|
360
|
+
}, [B]), u(() => {
|
|
361
|
+
typeof window < "u" && window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles", { detail: { disableCore: B === "core", disableBase: B } }));
|
|
362
|
+
}, []), u(() => {
|
|
363
|
+
var y;
|
|
364
|
+
const A = new Set(Se);
|
|
365
|
+
let r = v;
|
|
366
|
+
if (!r && l && (r = `[data-tooltip-id='${l.replace(/'/g, "\\'")}']`), r) try {
|
|
367
|
+
document.querySelectorAll(r).forEach((o) => {
|
|
368
|
+
A.add({ current: o });
|
|
369
|
+
});
|
|
370
|
+
} catch {
|
|
371
|
+
console.warn(`[react-tooltip] "${r}" is not a valid CSS selector`);
|
|
372
|
+
}
|
|
373
|
+
const s = document.querySelector(`[id='${n}']`);
|
|
374
|
+
if (s && A.add({ current: s }), !A.size) return () => null;
|
|
375
|
+
const L = (y = S ?? s) !== null && y !== void 0 ? y : De.current, ie = new MutationObserver((o) => {
|
|
376
|
+
o.forEach((t) => {
|
|
377
|
+
var i;
|
|
378
|
+
if (!L || t.type !== "attributes" || !(!((i = t.attributeName) === null || i === void 0) && i.startsWith("data-tooltip-"))) return;
|
|
379
|
+
const g = Ae(L);
|
|
380
|
+
Ee(g);
|
|
381
|
+
});
|
|
382
|
+
}), e = { attributes: !0, childList: !1, subtree: !1 };
|
|
383
|
+
if (L) {
|
|
384
|
+
const o = Ae(L);
|
|
385
|
+
Ee(o), ie.observe(L, e);
|
|
386
|
+
}
|
|
387
|
+
return () => {
|
|
388
|
+
ie.disconnect();
|
|
389
|
+
};
|
|
390
|
+
}, [Se, De, S, n, v]), u(() => {
|
|
391
|
+
H?.border && console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."), fe && !vt("border", `${fe}`) && console.warn(`[react-tooltip] "${fe}" is not a valid \`border\`.`), H?.opacity && console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."), oe && !vt("opacity", `${oe}`) && console.warn(`[react-tooltip] "${oe}" is not a valid \`opacity\`.`);
|
|
392
|
+
}, []);
|
|
393
|
+
let ke = J;
|
|
394
|
+
const qe = $(null);
|
|
395
|
+
if (h) {
|
|
396
|
+
const y = h({ content: S?.getAttribute("data-tooltip-content") || le || null, activeAnchor: S });
|
|
397
|
+
ke = y ? ce.createElement("div", { ref: qe, className: "react-tooltip-content-wrapper" }, y) : null;
|
|
398
|
+
} else le && (ke = le);
|
|
399
|
+
ye && (ke = ce.createElement(Kt, { content: ye }));
|
|
400
|
+
const Qe = { forwardRef: Ze, id: l, anchorId: n, anchorSelect: v, className: lt(C, je), classNameArrow: b, content: ke, contentWrapperRef: qe, place: re, variant: ne, offset: O, wrapper: ze, events: $e, openOnClick: I, positionStrategy: ge, middlewares: Z, delayShow: he, delayHide: f, float: Ve, hidden: Ye, noArrow: ue, clickable: ee, closeOnEsc: R, closeOnScroll: de, closeOnResize: xe, openEvents: Ge, closeEvents: Me, globalCloseEvents: We, imperativeModeOnly: He, style: H, position: pe, isOpen: Le, defaultIsOpen: te, border: fe, opacity: oe, arrowColor: Ce, arrowSize: d, setIsOpen: ve, afterShow: Pe, afterHide: Xe, disableTooltip: Je, activeAnchor: S, previousActiveAnchor: Ie.current, setActiveAnchor: (y) => {
|
|
401
|
+
T((A) => (y?.isSameNode(A) || (Ie.current = A), y));
|
|
402
|
+
}, role: me };
|
|
403
|
+
return ce.createElement(qt, { ...Qe });
|
|
404
|
+
});
|
|
405
|
+
typeof window < "u" && window.addEventListener("react-tooltip-inject-styles", (l) => {
|
|
406
|
+
l.detail.disableCore || pt({ css: ":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}", type: "core" }), l.detail.disableBase || pt({ css: `
|
|
407
|
+
.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`, type: "base" });
|
|
408
|
+
});
|
|
6
409
|
export {
|
|
7
|
-
|
|
410
|
+
Pt as Tooltip
|
|
8
411
|
};
|
package/es/index8.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { classNames as c } from "./
|
|
2
|
+
import { classNames as c } from "./index51.mjs";
|
|
3
3
|
import { useEffect as g } from "react";
|
|
4
|
-
import { EMPHASIS_MAP as n, DEFAULT_EMPHASIS as t } from "./
|
|
4
|
+
import { EMPHASIS_MAP as n, DEFAULT_EMPHASIS as t } from "./index53.mjs";
|
|
5
5
|
import { logWarning as l } from "./index54.mjs";
|
|
6
6
|
function A({ ariaLabel: s, theme: r, emphasis: o, children: e, qa: i }) {
|
|
7
7
|
const a = parseInt(e), m = c({
|
package/es/index82.mjs
CHANGED
|
@@ -1,87 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
if (!a)
|
|
13
|
-
return n ? r() : O(c, f?.in);
|
|
14
|
-
const m = {
|
|
15
|
-
firstWeekContainsDate: d,
|
|
16
|
-
weekStartsOn: R,
|
|
17
|
-
locale: l
|
|
18
|
-
}, p = [new $(f?.in, c)], x = a.match(L).map((t) => {
|
|
19
|
-
const e = t[0];
|
|
20
|
-
if (e in y) {
|
|
21
|
-
const o = y[e];
|
|
22
|
-
return o(t, l.formatLong);
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
}).join("").match(N), u = [];
|
|
26
|
-
for (let t of x) {
|
|
27
|
-
b(t) && E(t, a, n), C(t) && E(t, a, n);
|
|
28
|
-
const e = t[0], o = A[e];
|
|
29
|
-
if (o) {
|
|
30
|
-
const { incompatibleTokens: k } = o;
|
|
31
|
-
if (Array.isArray(k)) {
|
|
32
|
-
const w = u.find(
|
|
33
|
-
(T) => k.includes(T.token) || T.token === e
|
|
34
|
-
);
|
|
35
|
-
if (w)
|
|
36
|
-
throw new RangeError(
|
|
37
|
-
`The format string mustn't contain \`${w.fullToken}\` and \`${t}\` at the same time`
|
|
38
|
-
);
|
|
39
|
-
} else if (o.incompatibleTokens === "*" && u.length > 0)
|
|
40
|
-
throw new RangeError(
|
|
41
|
-
`The format string mustn't contain \`${t}\` and any other token at the same time`
|
|
42
|
-
);
|
|
43
|
-
u.push({ token: e, fullToken: t });
|
|
44
|
-
const g = o.run(
|
|
45
|
-
n,
|
|
46
|
-
t,
|
|
47
|
-
l.match,
|
|
48
|
-
m
|
|
49
|
-
);
|
|
50
|
-
if (!g)
|
|
51
|
-
return r();
|
|
52
|
-
p.push(g.setter), n = g.rest;
|
|
53
|
-
} else {
|
|
54
|
-
if (e.match(v))
|
|
55
|
-
throw new RangeError(
|
|
56
|
-
"Format string contains an unescaped latin alphabet character `" + e + "`"
|
|
57
|
-
);
|
|
58
|
-
if (t === "''" ? t = "'" : e === "'" && (t = z(t)), n.indexOf(t) === 0)
|
|
59
|
-
n = n.slice(t.length);
|
|
60
|
-
else
|
|
61
|
-
return r();
|
|
62
|
-
}
|
|
1
|
+
import { getDefaultExportFromCjs as d } from "./index171.mjs";
|
|
2
|
+
import { __module as r } from "./index172.mjs";
|
|
3
|
+
import "./index173.mjs";
|
|
4
|
+
import { __exports as f } from "./index174.mjs";
|
|
5
|
+
(function(o, t) {
|
|
6
|
+
Object.defineProperty(t, "__esModule", {
|
|
7
|
+
value: !0
|
|
8
|
+
});
|
|
9
|
+
var a = f, l = u(a);
|
|
10
|
+
function u(e) {
|
|
11
|
+
return e && e.__esModule ? e : { default: e };
|
|
63
12
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
).map((t) => t[0]);
|
|
69
|
-
let s = O(c, f?.in);
|
|
70
|
-
if (isNaN(+s)) return r();
|
|
71
|
-
const h = {};
|
|
72
|
-
for (const t of P) {
|
|
73
|
-
if (!t.validate(s, m))
|
|
74
|
-
return r();
|
|
75
|
-
const e = t.set(s, h, m);
|
|
76
|
-
Array.isArray(e) ? (s = e[0], Object.assign(h, e[1])) : s = e;
|
|
77
|
-
}
|
|
78
|
-
return s;
|
|
79
|
-
}
|
|
80
|
-
function z(n) {
|
|
81
|
-
return n.match(Y)[1].replace(j, "'");
|
|
82
|
-
}
|
|
13
|
+
t.default = l.default, o.exports = t.default;
|
|
14
|
+
})(r, r.exports);
|
|
15
|
+
var i = r.exports;
|
|
16
|
+
const n = /* @__PURE__ */ d(i);
|
|
83
17
|
export {
|
|
84
|
-
|
|
85
|
-
G as parse,
|
|
86
|
-
A as parsers
|
|
18
|
+
n as default
|
|
87
19
|
};
|