@onereach/ui-components-common 20.7.0 → 20.8.0-beta.5334.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dom-qGGG2YCX.js +6 -0
- package/dist/helpers.js +10 -3
- package/dist/hooks.js +1 -1
- package/dist/index.js +111 -135
- package/dist/{useValidationAttributes-w0RCHARs.js → useValidationAttributes-BpeWsfb0.js} +1 -1
- package/dist/utils/functions/dom.d.ts +0 -30
- package/dist/utils.js +163 -109
- package/package.json +4 -8
- package/src/utils/functions/dom.ts +0 -199
- package/dist/dom-DzNS5tBj.js +0 -97
- package/dist/extractCssVarName-FgXy_HI0.js +0 -160
- package/dist/searchItemsByLabel-CPGAoUEr.js +0 -13
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const e = typeof window < "u" ? window : null, t = ((e == null ? void 0 : e.requestAnimationFrame) || (e == null ? void 0 : e.webkitRequestAnimationFrame) || (e == null ? void 0 : e.mozRequestAnimationFrame) || (e == null ? void 0 : e.msRequestAnimationFrame) || (e == null ? void 0 : e.oRequestAnimationFrame) || // Fallback, but not a true polyfill
|
|
2
|
+
// Only needed for Opera Mini
|
|
3
|
+
((n) => setTimeout(n, 16))).bind(e);
|
|
4
|
+
export {
|
|
5
|
+
t as r
|
|
6
|
+
};
|
package/dist/helpers.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./dom-qGGG2YCX.js";
|
|
2
|
+
import { i as o } from "./isUndefined-B5qXrATz.js";
|
|
3
|
+
const s = (t, r) => {
|
|
4
|
+
const e = r.find((n) => t === n.value);
|
|
5
|
+
if (o(e))
|
|
6
|
+
throw new Error("[getItemByValue]: Item not found.");
|
|
7
|
+
return e;
|
|
8
|
+
}, m = (t, r) => t.map((e) => s(e, r)), l = async (t, r) => r.filter((e) => new RegExp(t, "i").test(e.label));
|
|
2
9
|
export {
|
|
3
10
|
s as getItemByValue,
|
|
4
|
-
|
|
5
|
-
|
|
11
|
+
m as getItemsByValue,
|
|
12
|
+
l as searchItemsByLabel
|
|
6
13
|
};
|
package/dist/hooks.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a, b as u, c as t, d as o, e as r, f as i, g as l, h as m, i as n, j as b, k as d, l as v, m as T, u as f, n as g } from "./useValidationAttributes-
|
|
1
|
+
import { a, b as u, c as t, d as o, e as r, f as i, g as l, h as m, i as n, j as b, k as d, l as v, m as T, u as f, n as g } from "./useValidationAttributes-BpeWsfb0.js";
|
|
2
2
|
export {
|
|
3
3
|
a as useControlAttributes,
|
|
4
4
|
u as useDateFormat,
|
package/dist/index.js
CHANGED
|
@@ -1,142 +1,118 @@
|
|
|
1
|
-
import { D as
|
|
2
|
-
import {
|
|
3
|
-
import { D as
|
|
4
|
-
import { D as
|
|
5
|
-
import { Spacing as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { i as
|
|
9
|
-
import { g as
|
|
1
|
+
import { D as _, a as s } from "./dropdown-open-k6cFnrqA.js";
|
|
2
|
+
import { getItemByValue as T, getItemsByValue as a, searchItemsByLabel as t } from "./helpers.js";
|
|
3
|
+
import { D as o, L as A, T as O, a as C, b as D, c as i, d as S, e as N, f as X, g as P, h as L, i as m, j as u, k as l, l as n, m as M, u as I, n as g } from "./useValidationAttributes-BpeWsfb0.js";
|
|
4
|
+
import { D as H, T as F } from "./TimeFormat-CdFMIbra.js";
|
|
5
|
+
import { Spacing as f } from "./types.js";
|
|
6
|
+
import { CODE_BACKSPACE as b, CODE_BREAK as d, CODE_DELETE as G, CODE_DOWN as c, CODE_END as U, CODE_ENTER as V, CODE_ESC as y, CODE_HOME as h, CODE_LEFT as v, CODE_PAGEDOWN as W, CODE_PAGEUP as k, CODE_RIGHT as w, CODE_SPACE as K, CODE_UP as Y, HSL_LIMITS as j, PLACEMENT_BOTTOM_END as q, PLACEMENT_BOTTOM_START as z, PLACEMENT_LEFT_END as Q, PLACEMENT_LEFT_START as J, PLACEMENT_RIGHT_END as Z, PLACEMENT_RIGHT_START as $, PLACEMENT_TOP_END as ee, PLACEMENT_TOP_START as Ee, RX_ABBREVIATION_FROM_STRING as _e, RX_ARRAY_NOTATION as se, RX_BV_PREFIX as Re, RX_DATE as Te, RX_DATE_SPLIT as ae, RX_DIGITS as te, RX_ENCODED_COMMA as re, RX_ENCODE_REVERSE as oe, RX_EXTENSION as Ae, RX_HASH as Oe, RX_HASH_ID as Ce, RX_HREF as De, RX_HTML_TAGS as ie, RX_HYPHENATE as Se, RX_LONG_COLOR as Ne, RX_LOWER_UPPER as Xe, RX_NUMBER as Pe, RX_PLUS as Le, RX_QUERY_START as me, RX_REGEXP_REPLACE as ue, RX_SHORT_COLOR as le, RX_SPACES as ne, RX_SPACE_SPLIT as Me, RX_STAR as Ie, RX_START_SPACE_WORD as ge, RX_TIME as pe, RX_TRIM_LEFT as He, RX_TRIM_RIGHT as Fe, RX_UNDERSCORE as xe, RX_UN_KEBAB as fe, exclude as Be, extractCssVarName as be, flattenDeep as de, generateColorFromString as Ge, generateHslFromString as ce, getAbbreviation as Ue, getHashOfString as Ve, hexToRgb as ye, hslToColorString as he, include as ve, isAncestor as We, isArray as ke, isDescendant as we, isEmpty as Ke, isEqual as Ye, isNil as je, isNull as qe, isNumber as ze, isObject as Qe, isString as Je, normalize as Ze, pxToRem as $e, rgbToHex as eE, toArray as EE } from "./utils.js";
|
|
7
|
+
import { r as sE } from "./dom-qGGG2YCX.js";
|
|
8
|
+
import { i as TE } from "./isUndefined-B5qXrATz.js";
|
|
9
|
+
import { g as tE, i as rE } from "./getPageElevations-BuZyM94T.js";
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
11
|
+
b as CODE_BACKSPACE,
|
|
12
|
+
d as CODE_BREAK,
|
|
13
|
+
G as CODE_DELETE,
|
|
14
|
+
c as CODE_DOWN,
|
|
15
|
+
U as CODE_END,
|
|
16
|
+
V as CODE_ENTER,
|
|
17
|
+
y as CODE_ESC,
|
|
18
|
+
h as CODE_HOME,
|
|
19
|
+
v as CODE_LEFT,
|
|
20
|
+
W as CODE_PAGEDOWN,
|
|
21
|
+
k as CODE_PAGEUP,
|
|
22
|
+
w as CODE_RIGHT,
|
|
23
|
+
K as CODE_SPACE,
|
|
24
|
+
Y as CODE_UP,
|
|
25
|
+
o as DATE_FORMAT,
|
|
26
|
+
H as DateFormat,
|
|
27
|
+
_ as DropdownClose,
|
|
28
|
+
s as DropdownOpen,
|
|
29
|
+
j as HSL_LIMITS,
|
|
30
30
|
A as LOCALE,
|
|
31
|
-
|
|
32
|
-
Y as PLACEMENT_BOTTOM_END,
|
|
31
|
+
q as PLACEMENT_BOTTOM_END,
|
|
33
32
|
z as PLACEMENT_BOTTOM_START,
|
|
34
33
|
Q as PLACEMENT_LEFT_END,
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
J as PLACEMENT_LEFT_START,
|
|
35
|
+
Z as PLACEMENT_RIGHT_END,
|
|
37
36
|
$ as PLACEMENT_RIGHT_START,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
ms as reflow,
|
|
114
|
-
Ns as removeAttr,
|
|
115
|
-
ns as removeClass,
|
|
116
|
-
Xs as removeNode,
|
|
117
|
-
us as removeStyle,
|
|
118
|
-
Ps as requestAF,
|
|
119
|
-
gs as requestIC,
|
|
120
|
-
as as rgbToHex,
|
|
121
|
-
T as searchItemsByLabel,
|
|
122
|
-
Ls as select,
|
|
123
|
-
Ms as selectAll,
|
|
124
|
-
Is as setAttr,
|
|
125
|
-
ps as setStyle,
|
|
126
|
-
ss as toArray,
|
|
127
|
-
O as useControlAttributes,
|
|
128
|
-
i as useDateFormat,
|
|
129
|
-
D as useDateMask,
|
|
130
|
-
l as useElevation,
|
|
131
|
-
S as useIdAttribute,
|
|
132
|
-
m as useLocale,
|
|
133
|
-
N as useOverflow,
|
|
134
|
-
n as usePopoverState,
|
|
135
|
-
X as useProxyModelValue,
|
|
37
|
+
ee as PLACEMENT_TOP_END,
|
|
38
|
+
Ee as PLACEMENT_TOP_START,
|
|
39
|
+
_e as RX_ABBREVIATION_FROM_STRING,
|
|
40
|
+
se as RX_ARRAY_NOTATION,
|
|
41
|
+
Re as RX_BV_PREFIX,
|
|
42
|
+
Te as RX_DATE,
|
|
43
|
+
ae as RX_DATE_SPLIT,
|
|
44
|
+
te as RX_DIGITS,
|
|
45
|
+
re as RX_ENCODED_COMMA,
|
|
46
|
+
oe as RX_ENCODE_REVERSE,
|
|
47
|
+
Ae as RX_EXTENSION,
|
|
48
|
+
Oe as RX_HASH,
|
|
49
|
+
Ce as RX_HASH_ID,
|
|
50
|
+
De as RX_HREF,
|
|
51
|
+
ie as RX_HTML_TAGS,
|
|
52
|
+
Se as RX_HYPHENATE,
|
|
53
|
+
Ne as RX_LONG_COLOR,
|
|
54
|
+
Xe as RX_LOWER_UPPER,
|
|
55
|
+
Pe as RX_NUMBER,
|
|
56
|
+
Le as RX_PLUS,
|
|
57
|
+
me as RX_QUERY_START,
|
|
58
|
+
ue as RX_REGEXP_REPLACE,
|
|
59
|
+
le as RX_SHORT_COLOR,
|
|
60
|
+
ne as RX_SPACES,
|
|
61
|
+
Me as RX_SPACE_SPLIT,
|
|
62
|
+
Ie as RX_STAR,
|
|
63
|
+
ge as RX_START_SPACE_WORD,
|
|
64
|
+
pe as RX_TIME,
|
|
65
|
+
He as RX_TRIM_LEFT,
|
|
66
|
+
Fe as RX_TRIM_RIGHT,
|
|
67
|
+
xe as RX_UNDERSCORE,
|
|
68
|
+
fe as RX_UN_KEBAB,
|
|
69
|
+
f as Spacing,
|
|
70
|
+
O as TIME_FORMAT,
|
|
71
|
+
F as TimeFormat,
|
|
72
|
+
Be as exclude,
|
|
73
|
+
be as extractCssVarName,
|
|
74
|
+
de as flattenDeep,
|
|
75
|
+
Ge as generateColorFromString,
|
|
76
|
+
ce as generateHslFromString,
|
|
77
|
+
Ue as getAbbreviation,
|
|
78
|
+
Ve as getHashOfString,
|
|
79
|
+
T as getItemByValue,
|
|
80
|
+
a as getItemsByValue,
|
|
81
|
+
tE as getPageElevations,
|
|
82
|
+
ye as hexToRgb,
|
|
83
|
+
he as hslToColorString,
|
|
84
|
+
ve as include,
|
|
85
|
+
We as isAncestor,
|
|
86
|
+
ke as isArray,
|
|
87
|
+
we as isDescendant,
|
|
88
|
+
Ke as isEmpty,
|
|
89
|
+
Ye as isEqual,
|
|
90
|
+
je as isNil,
|
|
91
|
+
qe as isNull,
|
|
92
|
+
ze as isNumber,
|
|
93
|
+
Qe as isObject,
|
|
94
|
+
Je as isString,
|
|
95
|
+
TE as isUndefined,
|
|
96
|
+
rE as isVisible,
|
|
97
|
+
Ze as normalize,
|
|
98
|
+
$e as pxToRem,
|
|
99
|
+
sE as requestAF,
|
|
100
|
+
eE as rgbToHex,
|
|
101
|
+
t as searchItemsByLabel,
|
|
102
|
+
EE as toArray,
|
|
103
|
+
C as useControlAttributes,
|
|
104
|
+
D as useDateFormat,
|
|
105
|
+
i as useDateMask,
|
|
106
|
+
S as useElevation,
|
|
107
|
+
N as useIdAttribute,
|
|
108
|
+
X as useLocale,
|
|
109
|
+
P as useOverflow,
|
|
110
|
+
L as usePopoverState,
|
|
111
|
+
m as useProxyModelValue,
|
|
136
112
|
u as useResponsive,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
113
|
+
l as useTheme,
|
|
114
|
+
n as useTimeFormat,
|
|
115
|
+
M as useTimeMask,
|
|
116
|
+
I as useToggle,
|
|
117
|
+
g as useValidationAttributes
|
|
142
118
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAttrs as h, computed as u, inject as g, isRef as p, ref as c, watch as v, getCurrentInstance as M, onMounted as R } from "vue";
|
|
2
2
|
import { D as x, T as b } from "./TimeFormat-CdFMIbra.js";
|
|
3
|
-
import { r as C } from "./dom-
|
|
3
|
+
import { r as C } from "./dom-qGGG2YCX.js";
|
|
4
4
|
import { g as E } from "./getPageElevations-BuZyM94T.js";
|
|
5
5
|
import { useMutationObserver as $, useResizeObserver as F, refDebounced as S, useMediaQuery as P } from "@vueuse/core";
|
|
6
6
|
import O from "@onereach/styles/screens.json";
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
export declare const MutationObs: MutationObserver;
|
|
2
1
|
export declare const requestAF: any;
|
|
3
|
-
export declare const requestIC: (((callback: IdleRequestCallback, options?: IdleRequestOptions | undefined) => number) & typeof requestIdleCallback) | ((cb: () => void) => number);
|
|
4
|
-
export declare const cancelAF: any;
|
|
5
|
-
export declare const removeNode: (el: HTMLElement) => void;
|
|
6
|
-
export declare const reflow: (el: HTMLElement) => number | null;
|
|
7
|
-
export declare const selectAll: (selector: string, root?: HTMLElement | undefined) => Element[];
|
|
8
|
-
export declare const select: (selector: string, root?: HTMLElement | undefined) => Element | null;
|
|
9
|
-
export declare const contains: (parent: HTMLElement, child: HTMLElement) => boolean;
|
|
10
|
-
export declare const getById: (id: string) => HTMLElement | null;
|
|
11
|
-
export declare const addClass: (el: HTMLElement, className: string) => void;
|
|
12
|
-
export declare const removeClass: (el: HTMLElement, className: string) => void;
|
|
13
|
-
export declare const hasClass: (el: HTMLElement, className: string) => boolean;
|
|
14
|
-
export declare const setAttr: (el: HTMLElement, attr: string, value: any) => void;
|
|
15
|
-
export declare const removeAttr: (el: HTMLElement, attr: string) => void;
|
|
16
|
-
export declare const getAttr: (el: HTMLElement, attr: string) => string | null;
|
|
17
|
-
export declare const hasAttr: (el: HTMLElement, attr: string) => boolean | null;
|
|
18
|
-
export declare const setStyle: (el: HTMLElement, prop: any, value: any) => void;
|
|
19
|
-
export declare const removeStyle: (el: HTMLElement, prop: any) => void;
|
|
20
|
-
export declare const getStyle: (el: HTMLElement, prop: any) => string | null;
|
|
21
|
-
export declare const getBCR: (el: HTMLElement) => DOMRect | null;
|
|
22
|
-
export declare const getCS: (el: HTMLElement) => CSSStyleDeclaration | Record<string, string>;
|
|
23
|
-
export declare const offset: (el: HTMLElement) => {
|
|
24
|
-
top: number;
|
|
25
|
-
left: number;
|
|
26
|
-
};
|
|
27
|
-
export declare const position: (el: HTMLElement) => {
|
|
28
|
-
top: number;
|
|
29
|
-
left: number;
|
|
30
|
-
};
|
|
31
|
-
export declare const getMaxZIndex: (element: HTMLElement | null) => number;
|
package/dist/utils.js
CHANGED
|
@@ -1,111 +1,165 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
|
|
1
|
+
import { r as Gt } from "./dom-qGGG2YCX.js";
|
|
2
|
+
import { i as a } from "./isUndefined-B5qXrATz.js";
|
|
3
|
+
import { g as lt, i as Ut } from "./getPageElevations-BuZyM94T.js";
|
|
4
|
+
const T = {
|
|
5
|
+
h: {
|
|
6
|
+
min: 0,
|
|
7
|
+
max: 360
|
|
8
|
+
},
|
|
9
|
+
s: {
|
|
10
|
+
min: 50,
|
|
11
|
+
max: 75
|
|
12
|
+
},
|
|
13
|
+
l: {
|
|
14
|
+
min: 60,
|
|
15
|
+
max: 80
|
|
16
|
+
}
|
|
17
|
+
}, h = 8, H = 19, $ = 46, y = 40, F = 35, B = 13, m = 27, x = 36, G = 37, b = 34, l = 33, U = 39, j = 32, V = 38, K = "top-start", W = "top-end", w = "bottom-start", z = "bottom-end", Y = "right-start", Z = "right-end", k = "left-start", q = "left-end", Q = /\[(\d+)]/g, J = /^(BV?)/, v = /^\d+$/, tt = /^\..+/, nt = /^#/, rt = /^#[A-Za-z]+[\w\-:.]*$/, ot = /(<([^>]+)>)/gi, st = /\B([A-Z])/g, et = /([a-z])([A-Z])/g, ct = /^[0-9]*\.?[0-9]+$/, Et = /\+/g, _t = /[-/\\^$*+?.()|[\]{}]/g, Rt = /[\s\uFEFF\xA0]+/g, Tt = /\s+/, ut = /\/\*$/, At = /(\s|^)(\w)/g, ft = /^\s+/, Ot = /\s+$/, at = /_/g, gt = /-(\w)/g, g = /[\p{Alpha}\p{Nd}]+/gu, Ct = /^\d+-\d\d?-\d\d?(?:\s|T|$)/, Nt = /-|\s|T/, St = /^([0-1]?[0-9]|2[0-3]):[0-5]?[0-9](:[0-5]?[0-9])?$/, it = /^.*(#[^#]+)$/, Dt = /%2C/g, Xt = /[!'()*]/g, pt = /^(\?|#|&)/, C = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, N = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, Pt = (t, n) => n.filter((r) => r !== t);
|
|
18
|
+
function S(t) {
|
|
19
|
+
return Math.abs(
|
|
20
|
+
t.split("").reduce((n, r) => r.charCodeAt(0) + ((n << 5) - n), 0)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function E(t, n, r) {
|
|
24
|
+
return Math.floor(t % (r - n) + n);
|
|
25
|
+
}
|
|
26
|
+
function dt(t) {
|
|
27
|
+
t = t.replace(C, (r, o, s, e) => o + o + s + s + e + e);
|
|
28
|
+
const n = N.exec(t);
|
|
29
|
+
return n ? {
|
|
30
|
+
r: parseInt(n[1], 16),
|
|
31
|
+
g: parseInt(n[2], 16),
|
|
32
|
+
b: parseInt(n[3], 16)
|
|
33
|
+
} : null;
|
|
34
|
+
}
|
|
35
|
+
function _(t) {
|
|
36
|
+
const n = t.toString(16);
|
|
37
|
+
return n.length == 1 ? "0" + n : n;
|
|
38
|
+
}
|
|
39
|
+
function It(t, n, r) {
|
|
40
|
+
return "#" + _(t) + _(n) + _(r);
|
|
41
|
+
}
|
|
42
|
+
function i(t, n = T) {
|
|
43
|
+
const r = n != null && n.h ? [n.h.min, n.h.max] : [0, 360], o = n != null && n.s ? [n.s.min, n.s.max] : [0, 100], s = n != null && n.l ? [n.l.min, n.l.max] : [0, 100], e = S(t), A = E(e, ...r), f = E(e, ...o), O = E(e, ...s);
|
|
44
|
+
return {
|
|
45
|
+
h: A,
|
|
46
|
+
s: f,
|
|
47
|
+
l: O
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function D(t) {
|
|
51
|
+
return `hsl(${t.h}, ${t.s}%, ${t.l}%)`;
|
|
52
|
+
}
|
|
53
|
+
function Lt(t, n = T) {
|
|
54
|
+
return D(i(t, n));
|
|
55
|
+
}
|
|
56
|
+
function X(t = []) {
|
|
57
|
+
return t.flatMap((n) => Array.isArray(n) ? X(n) : n);
|
|
58
|
+
}
|
|
59
|
+
const Mt = (t) => t === 0 ? "0" : `${t / 16}rem`;
|
|
60
|
+
function ht(t, n) {
|
|
61
|
+
return typeof t != "string" || !t ? "" : (t.match(g) ?? []).reduce((r, o) => r + (+o == 0 || parseInt(o) ? parseInt(o) : o[0] || ""), "").toUpperCase().substring(0, n);
|
|
62
|
+
}
|
|
63
|
+
const Ht = (t, n) => n.concat(t), p = (t, n) => {
|
|
64
|
+
const { parentElement: r } = n;
|
|
65
|
+
return r ? t === r ? !0 : p(t, r) : !1;
|
|
66
|
+
}, c = (t) => Array.isArray(t), P = (t, n) => {
|
|
67
|
+
const { parentElement: r } = t;
|
|
68
|
+
return r ? n === r ? !0 : P(r, n) : !1;
|
|
69
|
+
}, $t = (t) => u(t) ? !0 : L(t) || c(t) ? t.length === 0 : R(t) ? Object.keys(t).length === 0 : !1, d = (t, n) => {
|
|
70
|
+
if (Object.is(t, n))
|
|
71
|
+
return !0;
|
|
72
|
+
if (c(t) && c(n))
|
|
73
|
+
return t.length === n.length && t.every((r, o) => r === n[o]);
|
|
74
|
+
if (R(t) && R(n)) {
|
|
75
|
+
const r = Object.keys(t), o = Object.keys(n);
|
|
76
|
+
return d(r, o) && r.every((s) => t[s] === n[s]);
|
|
77
|
+
}
|
|
78
|
+
return !1;
|
|
79
|
+
}, u = (t) => I(t) || a(t), I = (t) => t === null, yt = (t) => typeof t == "number", R = (t) => typeof t == "object" && (t == null ? void 0 : t.constructor) === Object, L = (t) => typeof t == "string", Ft = (t) => u(t) ? [] : c(t) ? t : [t];
|
|
80
|
+
function Bt(t) {
|
|
81
|
+
return t.replace(/var\((.*)\)/, (n, r) => r);
|
|
82
|
+
}
|
|
5
83
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
g as
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
Da as isNil,
|
|
88
|
-
Xa as isNull,
|
|
89
|
-
Pa as isNumber,
|
|
90
|
-
la as isObject,
|
|
91
|
-
na as isString,
|
|
92
|
-
Ja as isUndefined,
|
|
93
|
-
ss as isVisible,
|
|
94
|
-
La as normalize,
|
|
95
|
-
ha as offset,
|
|
96
|
-
va as position,
|
|
97
|
-
Ia as pxToRem,
|
|
98
|
-
ya as reflow,
|
|
99
|
-
Va as removeAttr,
|
|
100
|
-
qa as removeClass,
|
|
101
|
-
Wa as removeNode,
|
|
102
|
-
ja as removeStyle,
|
|
103
|
-
Ka as requestAF,
|
|
104
|
-
Ya as requestIC,
|
|
105
|
-
Ma as rgbToHex,
|
|
106
|
-
ka as select,
|
|
107
|
-
wa as selectAll,
|
|
108
|
-
za as setAttr,
|
|
109
|
-
Qa as setStyle,
|
|
110
|
-
ga as toArray
|
|
84
|
+
h as CODE_BACKSPACE,
|
|
85
|
+
H as CODE_BREAK,
|
|
86
|
+
$ as CODE_DELETE,
|
|
87
|
+
y as CODE_DOWN,
|
|
88
|
+
F as CODE_END,
|
|
89
|
+
B as CODE_ENTER,
|
|
90
|
+
m as CODE_ESC,
|
|
91
|
+
x as CODE_HOME,
|
|
92
|
+
G as CODE_LEFT,
|
|
93
|
+
b as CODE_PAGEDOWN,
|
|
94
|
+
l as CODE_PAGEUP,
|
|
95
|
+
U as CODE_RIGHT,
|
|
96
|
+
j as CODE_SPACE,
|
|
97
|
+
V as CODE_UP,
|
|
98
|
+
T as HSL_LIMITS,
|
|
99
|
+
z as PLACEMENT_BOTTOM_END,
|
|
100
|
+
w as PLACEMENT_BOTTOM_START,
|
|
101
|
+
q as PLACEMENT_LEFT_END,
|
|
102
|
+
k as PLACEMENT_LEFT_START,
|
|
103
|
+
Z as PLACEMENT_RIGHT_END,
|
|
104
|
+
Y as PLACEMENT_RIGHT_START,
|
|
105
|
+
W as PLACEMENT_TOP_END,
|
|
106
|
+
K as PLACEMENT_TOP_START,
|
|
107
|
+
g as RX_ABBREVIATION_FROM_STRING,
|
|
108
|
+
Q as RX_ARRAY_NOTATION,
|
|
109
|
+
J as RX_BV_PREFIX,
|
|
110
|
+
Ct as RX_DATE,
|
|
111
|
+
Nt as RX_DATE_SPLIT,
|
|
112
|
+
v as RX_DIGITS,
|
|
113
|
+
Dt as RX_ENCODED_COMMA,
|
|
114
|
+
Xt as RX_ENCODE_REVERSE,
|
|
115
|
+
tt as RX_EXTENSION,
|
|
116
|
+
nt as RX_HASH,
|
|
117
|
+
rt as RX_HASH_ID,
|
|
118
|
+
it as RX_HREF,
|
|
119
|
+
ot as RX_HTML_TAGS,
|
|
120
|
+
st as RX_HYPHENATE,
|
|
121
|
+
N as RX_LONG_COLOR,
|
|
122
|
+
et as RX_LOWER_UPPER,
|
|
123
|
+
ct as RX_NUMBER,
|
|
124
|
+
Et as RX_PLUS,
|
|
125
|
+
pt as RX_QUERY_START,
|
|
126
|
+
_t as RX_REGEXP_REPLACE,
|
|
127
|
+
C as RX_SHORT_COLOR,
|
|
128
|
+
Rt as RX_SPACES,
|
|
129
|
+
Tt as RX_SPACE_SPLIT,
|
|
130
|
+
ut as RX_STAR,
|
|
131
|
+
At as RX_START_SPACE_WORD,
|
|
132
|
+
St as RX_TIME,
|
|
133
|
+
ft as RX_TRIM_LEFT,
|
|
134
|
+
Ot as RX_TRIM_RIGHT,
|
|
135
|
+
at as RX_UNDERSCORE,
|
|
136
|
+
gt as RX_UN_KEBAB,
|
|
137
|
+
Pt as exclude,
|
|
138
|
+
Bt as extractCssVarName,
|
|
139
|
+
X as flattenDeep,
|
|
140
|
+
Lt as generateColorFromString,
|
|
141
|
+
i as generateHslFromString,
|
|
142
|
+
ht as getAbbreviation,
|
|
143
|
+
S as getHashOfString,
|
|
144
|
+
lt as getPageElevations,
|
|
145
|
+
dt as hexToRgb,
|
|
146
|
+
D as hslToColorString,
|
|
147
|
+
Ht as include,
|
|
148
|
+
p as isAncestor,
|
|
149
|
+
c as isArray,
|
|
150
|
+
P as isDescendant,
|
|
151
|
+
$t as isEmpty,
|
|
152
|
+
d as isEqual,
|
|
153
|
+
u as isNil,
|
|
154
|
+
I as isNull,
|
|
155
|
+
yt as isNumber,
|
|
156
|
+
R as isObject,
|
|
157
|
+
L as isString,
|
|
158
|
+
a as isUndefined,
|
|
159
|
+
Ut as isVisible,
|
|
160
|
+
E as normalize,
|
|
161
|
+
Mt as pxToRem,
|
|
162
|
+
Gt as requestAF,
|
|
163
|
+
It as rgbToHex,
|
|
164
|
+
Ft as toArray
|
|
111
165
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components-common",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.8.0-beta.5334.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -55,16 +55,13 @@
|
|
|
55
55
|
],
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "vite build",
|
|
58
|
-
"dev": "vite build --watch"
|
|
59
|
-
"prepare": "pnpm build"
|
|
58
|
+
"dev": "vite build --watch"
|
|
60
59
|
},
|
|
61
60
|
"dependencies": {
|
|
62
61
|
"@onereach/styles": "^20.7.0",
|
|
63
|
-
"@vueuse/core": "9.13.0"
|
|
64
|
-
"lodash": "^4.17.21"
|
|
62
|
+
"@vueuse/core": "9.13.0"
|
|
65
63
|
},
|
|
66
64
|
"devDependencies": {
|
|
67
|
-
"@types/lodash": "^4.17.0",
|
|
68
65
|
"rollup-plugin-node-externals": "6.1.2",
|
|
69
66
|
"vite": "^5.2.3",
|
|
70
67
|
"vite-plugin-dts": "3.7.3"
|
|
@@ -72,6 +69,5 @@
|
|
|
72
69
|
"peerDependencies": {
|
|
73
70
|
"vue": "3.3.4 || 2.6.14"
|
|
74
71
|
},
|
|
75
|
-
"npmUnpacked": "20.1.2"
|
|
76
|
-
"gitHead": "c6e76af1de233eaa448a2c6808065d45caf7cd49"
|
|
72
|
+
"npmUnpacked": "20.1.2"
|
|
77
73
|
}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import get from 'lodash/get';
|
|
2
|
-
import isElement from 'lodash/isElement';
|
|
3
|
-
|
|
4
1
|
const WINDOW = typeof window !== 'undefined' ? window : null;
|
|
5
2
|
|
|
6
|
-
export const MutationObs: MutationObserver =
|
|
7
|
-
WINDOW?.MutationObserver
|
|
8
|
-
|| (WINDOW as any)?.WebKitMutationObserver
|
|
9
|
-
|| (WINDOW as any)?.MozMutationObserver
|
|
10
|
-
|| null;
|
|
11
|
-
|
|
12
3
|
export const requestAF = (
|
|
13
4
|
WINDOW?.requestAnimationFrame ||
|
|
14
5
|
(WINDOW as any)?.webkitRequestAnimationFrame ||
|
|
@@ -20,193 +11,3 @@ export const requestAF = (
|
|
|
20
11
|
((cb: () => void) => setTimeout(cb, 16))
|
|
21
12
|
).bind(WINDOW);
|
|
22
13
|
|
|
23
|
-
export const requestIC = (
|
|
24
|
-
WINDOW?.requestIdleCallback ||
|
|
25
|
-
// Fallback, but not a true polyfill
|
|
26
|
-
((cb: () => void) => setTimeout(cb, 1))
|
|
27
|
-
).bind(WINDOW);
|
|
28
|
-
|
|
29
|
-
// eslint-disable-next-line no-unsafe-optional-chaining
|
|
30
|
-
export const cancelAF = (WINDOW?.cancelAnimationFrame || (WINDOW as any)?.mozCancelAnimationFrame).bind(WINDOW);
|
|
31
|
-
|
|
32
|
-
// Remove a node from DOM
|
|
33
|
-
export const removeNode = (el: HTMLElement): void => { el && el.parentNode && el.parentNode.removeChild(el); };
|
|
34
|
-
|
|
35
|
-
// Cause/wait-for an element to reflow its content (adjusting its height/width)
|
|
36
|
-
export const reflow = (el: HTMLElement): number | null => {
|
|
37
|
-
// Requesting an elements offsetHeight will trigger a reflow of the element content
|
|
38
|
-
return get(el, ['offsetHeight'], null);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
// Select all elements matching selector. Returns `[]` if none found
|
|
42
|
-
export const selectAll = (selector: string, root?: HTMLElement | undefined): Element[] =>
|
|
43
|
-
[...(root && isElement(root) ? root : document).querySelectorAll(selector)];
|
|
44
|
-
|
|
45
|
-
// Select a single element, returns `null` if not found
|
|
46
|
-
export const select = (selector: string, root?: HTMLElement | undefined): Element | null =>
|
|
47
|
-
(root && isElement(root) ? root : document).querySelector(selector) || null;
|
|
48
|
-
|
|
49
|
-
// Returns true if the parent element contains the child element
|
|
50
|
-
export const contains = (parent: HTMLElement, child: HTMLElement): boolean =>
|
|
51
|
-
parent && typeof parent.contains === 'function' ? parent.contains(child) : false;
|
|
52
|
-
|
|
53
|
-
// Get an element given an ID
|
|
54
|
-
export const getById = (id: string): HTMLElement | null =>
|
|
55
|
-
document.getElementById(/^#/.test(id) ? id.slice(1) : id) || null;
|
|
56
|
-
|
|
57
|
-
// Add a class to an element
|
|
58
|
-
export const addClass = (el: HTMLElement, className: string): void => {
|
|
59
|
-
// We are checking for `el.classList` existence here since IE 11
|
|
60
|
-
// returns `undefined` for some elements (e.g. SVG elements)
|
|
61
|
-
if (className && isElement(el) && el.classList) {
|
|
62
|
-
el.classList.add(className);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// Remove a class from an element
|
|
67
|
-
export const removeClass = (el: HTMLElement, className: string): void => {
|
|
68
|
-
// We are checking for `el.classList` existence here since IE 11
|
|
69
|
-
// returns `undefined` for some elements (e.g. SVG elements)
|
|
70
|
-
if (className && isElement(el) && el.classList) el.classList.remove(className);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
// Test if an element has a class
|
|
74
|
-
export const hasClass = (el: HTMLElement, className: string): boolean => {
|
|
75
|
-
// We are checking for `el.classList` existence here since IE 11
|
|
76
|
-
// returns `undefined` for some elements (e.g. SVG elements)
|
|
77
|
-
if (className && isElement(el) && el.classList) return el.classList.contains(className);
|
|
78
|
-
|
|
79
|
-
return false;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
// Set an attribute on an element
|
|
83
|
-
export const setAttr = (el: HTMLElement, attr: string, value: any): void => {
|
|
84
|
-
if (attr && isElement(el)) {
|
|
85
|
-
el.setAttribute(attr, value);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
// Remove an attribute from an element
|
|
90
|
-
export const removeAttr = (el: HTMLElement, attr: string): void => {
|
|
91
|
-
if (attr && isElement(el)) {
|
|
92
|
-
el.removeAttribute(attr);
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// Get an attribute value from an element
|
|
97
|
-
export const getAttr = (el: HTMLElement, attr: string): string | null =>
|
|
98
|
-
(attr && isElement(el) ? el.getAttribute(attr) : null);
|
|
99
|
-
|
|
100
|
-
// Determine if an attribute exists on an element
|
|
101
|
-
// Returns `true` or `false`, or `null` if element not found
|
|
102
|
-
export const hasAttr = (el: HTMLElement, attr: string): boolean | null =>
|
|
103
|
-
(attr && isElement(el) ? el.hasAttribute(attr) : null);
|
|
104
|
-
|
|
105
|
-
// Set an style property on an element
|
|
106
|
-
export const setStyle = (el: HTMLElement, prop: any, value: any): void => {
|
|
107
|
-
if (prop && isElement(el)) {
|
|
108
|
-
el.style[prop] = value;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
// Remove an style property from an element
|
|
113
|
-
export const removeStyle = (el: HTMLElement, prop: any): void => {
|
|
114
|
-
if (prop && isElement(el)) {
|
|
115
|
-
el.style[prop] = '';
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
// Get an style property value from an element
|
|
120
|
-
// Returns `null` if not found
|
|
121
|
-
export const getStyle = (el: HTMLElement, prop: any): string | null =>
|
|
122
|
-
(prop && isElement(el) ? el.style[prop] || null : null);
|
|
123
|
-
|
|
124
|
-
// Return the Bounding Client Rect of an element
|
|
125
|
-
export const getBCR = (el: HTMLElement): DOMRect | null => (isElement(el) ? el.getBoundingClientRect() : null);
|
|
126
|
-
|
|
127
|
-
// Get computed style object for an element
|
|
128
|
-
export const getCS = (el: HTMLElement): CSSStyleDeclaration | Record<string, string> =>
|
|
129
|
-
get(WINDOW, 'getComputedStyle', null) && isElement(el)
|
|
130
|
-
? getComputedStyle(el)
|
|
131
|
-
: {};
|
|
132
|
-
|
|
133
|
-
// Return an element's offset with respect to document element
|
|
134
|
-
export const offset = (el: HTMLElement): { top: number; left: number; } => {
|
|
135
|
-
const _offset = {
|
|
136
|
-
top: 0,
|
|
137
|
-
left: 0,
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
if (!isElement(el) || el.getClientRects().length === 0) {
|
|
141
|
-
return _offset;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const bcr = getBCR(el);
|
|
145
|
-
if (bcr) {
|
|
146
|
-
const win = el.ownerDocument.defaultView;
|
|
147
|
-
|
|
148
|
-
_offset.top = bcr.top + get(win, 'pageYOffset', 0);
|
|
149
|
-
_offset.left = bcr.left + get(win, 'pageXOffset', 0);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return _offset;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
// Return an element's offset with respect to to its offsetParent
|
|
156
|
-
export const position = (el: HTMLElement): { top: number; left: number; } => {
|
|
157
|
-
let _offset = {
|
|
158
|
-
top: 0,
|
|
159
|
-
left: 0,
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
if (!isElement(el)) {
|
|
163
|
-
return _offset;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
let parentOffset = {
|
|
167
|
-
top: 0,
|
|
168
|
-
left: 0,
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
const elStyles = getCS(el);
|
|
172
|
-
|
|
173
|
-
if (elStyles.position === 'fixed') {
|
|
174
|
-
_offset = getBCR(el) || _offset;
|
|
175
|
-
} else {
|
|
176
|
-
_offset = offset(el);
|
|
177
|
-
const doc = el.ownerDocument;
|
|
178
|
-
let offsetParent: (Node & ParentNode) | null = el.offsetParent || doc.documentElement;
|
|
179
|
-
while (
|
|
180
|
-
offsetParent &&
|
|
181
|
-
(offsetParent === doc.body || offsetParent === doc.documentElement) &&
|
|
182
|
-
getCS(offsetParent as HTMLElement).position === 'static'
|
|
183
|
-
) {
|
|
184
|
-
offsetParent = offsetParent.parentNode;
|
|
185
|
-
}
|
|
186
|
-
if (offsetParent && offsetParent !== el && offsetParent.nodeType === Node.ELEMENT_NODE) {
|
|
187
|
-
parentOffset = offset(offsetParent as HTMLElement);
|
|
188
|
-
|
|
189
|
-
const offsetParentStyles = getCS(offsetParent as HTMLElement);
|
|
190
|
-
parentOffset.top += parseFloat(offsetParentStyles.borderTopWidth as string);
|
|
191
|
-
parentOffset.left += parseFloat(offsetParentStyles.borderLeftWidth as string);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
return {
|
|
196
|
-
top: _offset.top - parentOffset.top - parseFloat(elStyles.marginTop as string),
|
|
197
|
-
left: _offset.left - parentOffset.left - parseFloat(elStyles.marginLeft as string),
|
|
198
|
-
};
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
export const getMaxZIndex = (element: HTMLElement | null): number => {
|
|
202
|
-
let maxZIndex = 0;
|
|
203
|
-
while (element) {
|
|
204
|
-
const cs = getCS(element);
|
|
205
|
-
const zIndex = cs.zIndex;
|
|
206
|
-
if (zIndex !== 'auto') {
|
|
207
|
-
maxZIndex = +zIndex > maxZIndex ? +zIndex : maxZIndex;
|
|
208
|
-
}
|
|
209
|
-
element = element.parentElement;
|
|
210
|
-
}
|
|
211
|
-
return maxZIndex;
|
|
212
|
-
};
|
package/dist/dom-DzNS5tBj.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import r from "lodash/get";
|
|
2
|
-
import n from "lodash/isElement";
|
|
3
|
-
const s = typeof window < "u" ? window : null, g = (s == null ? void 0 : s.MutationObserver) || (s == null ? void 0 : s.WebKitMutationObserver) || (s == null ? void 0 : s.MozMutationObserver) || null, b = ((s == null ? void 0 : s.requestAnimationFrame) || (s == null ? void 0 : s.webkitRequestAnimationFrame) || (s == null ? void 0 : s.mozRequestAnimationFrame) || (s == null ? void 0 : s.msRequestAnimationFrame) || (s == null ? void 0 : s.oRequestAnimationFrame) || // Fallback, but not a true polyfill
|
|
4
|
-
// Only needed for Opera Mini
|
|
5
|
-
((t) => setTimeout(t, 16))).bind(s), A = ((s == null ? void 0 : s.requestIdleCallback) || // Fallback, but not a true polyfill
|
|
6
|
-
((t) => setTimeout(t, 1))).bind(s), y = ((s == null ? void 0 : s.cancelAnimationFrame) || (s == null ? void 0 : s.mozCancelAnimationFrame)).bind(s), w = (t) => {
|
|
7
|
-
t && t.parentNode && t.parentNode.removeChild(t);
|
|
8
|
-
}, C = (t) => r(t, ["offsetHeight"], null), F = (t, e) => [...(e && n(e) ? e : document).querySelectorAll(t)], h = (t, e) => (e && n(e) ? e : document).querySelector(t) || null, q = (t, e) => t && typeof t.contains == "function" ? t.contains(e) : !1, v = (t) => document.getElementById(/^#/.test(t) ? t.slice(1) : t) || null, S = (t, e) => {
|
|
9
|
-
e && n(t) && t.classList && t.classList.add(e);
|
|
10
|
-
}, x = (t, e) => {
|
|
11
|
-
e && n(t) && t.classList && t.classList.remove(e);
|
|
12
|
-
}, E = (t, e) => e && n(t) && t.classList ? t.classList.contains(e) : !1, L = (t, e, o) => {
|
|
13
|
-
e && n(t) && t.setAttribute(e, o);
|
|
14
|
-
}, M = (t, e) => {
|
|
15
|
-
e && n(t) && t.removeAttribute(e);
|
|
16
|
-
}, R = (t, e) => e && n(t) ? t.getAttribute(e) : null, T = (t, e) => e && n(t) ? t.hasAttribute(e) : null, z = (t, e, o) => {
|
|
17
|
-
e && n(t) && (t.style[e] = o);
|
|
18
|
-
}, B = (t, e) => {
|
|
19
|
-
e && n(t) && (t.style[e] = "");
|
|
20
|
-
}, k = (t, e) => e && n(t) && t.style[e] || null, m = (t) => n(t) ? t.getBoundingClientRect() : null, c = (t) => r(s, "getComputedStyle", null) && n(t) ? getComputedStyle(t) : {}, u = (t) => {
|
|
21
|
-
const e = {
|
|
22
|
-
top: 0,
|
|
23
|
-
left: 0
|
|
24
|
-
};
|
|
25
|
-
if (!n(t) || t.getClientRects().length === 0)
|
|
26
|
-
return e;
|
|
27
|
-
const o = m(t);
|
|
28
|
-
if (o) {
|
|
29
|
-
const i = t.ownerDocument.defaultView;
|
|
30
|
-
e.top = o.top + r(i, "pageYOffset", 0), e.left = o.left + r(i, "pageXOffset", 0);
|
|
31
|
-
}
|
|
32
|
-
return e;
|
|
33
|
-
}, P = (t) => {
|
|
34
|
-
let e = {
|
|
35
|
-
top: 0,
|
|
36
|
-
left: 0
|
|
37
|
-
};
|
|
38
|
-
if (!n(t))
|
|
39
|
-
return e;
|
|
40
|
-
let o = {
|
|
41
|
-
top: 0,
|
|
42
|
-
left: 0
|
|
43
|
-
};
|
|
44
|
-
const i = c(t);
|
|
45
|
-
if (i.position === "fixed")
|
|
46
|
-
e = m(t) || e;
|
|
47
|
-
else {
|
|
48
|
-
e = u(t);
|
|
49
|
-
const l = t.ownerDocument;
|
|
50
|
-
let a = t.offsetParent || l.documentElement;
|
|
51
|
-
for (; a && (a === l.body || a === l.documentElement) && c(a).position === "static"; )
|
|
52
|
-
a = a.parentNode;
|
|
53
|
-
if (a && a !== t && a.nodeType === Node.ELEMENT_NODE) {
|
|
54
|
-
o = u(a);
|
|
55
|
-
const f = c(a);
|
|
56
|
-
o.top += parseFloat(f.borderTopWidth), o.left += parseFloat(f.borderLeftWidth);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
top: e.top - o.top - parseFloat(i.marginTop),
|
|
61
|
-
left: e.left - o.left - parseFloat(i.marginLeft)
|
|
62
|
-
};
|
|
63
|
-
}, _ = (t) => {
|
|
64
|
-
let e = 0;
|
|
65
|
-
for (; t; ) {
|
|
66
|
-
const i = c(t).zIndex;
|
|
67
|
-
i !== "auto" && (e = +i > e ? +i : e), t = t.parentElement;
|
|
68
|
-
}
|
|
69
|
-
return e;
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
g as M,
|
|
73
|
-
A as a,
|
|
74
|
-
w as b,
|
|
75
|
-
y as c,
|
|
76
|
-
C as d,
|
|
77
|
-
h as e,
|
|
78
|
-
q as f,
|
|
79
|
-
v as g,
|
|
80
|
-
S as h,
|
|
81
|
-
x as i,
|
|
82
|
-
E as j,
|
|
83
|
-
L as k,
|
|
84
|
-
M as l,
|
|
85
|
-
R as m,
|
|
86
|
-
T as n,
|
|
87
|
-
z as o,
|
|
88
|
-
B as p,
|
|
89
|
-
k as q,
|
|
90
|
-
b as r,
|
|
91
|
-
F as s,
|
|
92
|
-
m as t,
|
|
93
|
-
c as u,
|
|
94
|
-
u as v,
|
|
95
|
-
P as w,
|
|
96
|
-
_ as x
|
|
97
|
-
};
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import "./dom-DzNS5tBj.js";
|
|
2
|
-
import { i as O } from "./isUndefined-B5qXrATz.js";
|
|
3
|
-
const R = {
|
|
4
|
-
h: {
|
|
5
|
-
min: 0,
|
|
6
|
-
max: 360
|
|
7
|
-
},
|
|
8
|
-
s: {
|
|
9
|
-
min: 50,
|
|
10
|
-
max: 75
|
|
11
|
-
},
|
|
12
|
-
l: {
|
|
13
|
-
min: 60,
|
|
14
|
-
max: 80
|
|
15
|
-
}
|
|
16
|
-
}, H = 8, $ = 19, y = 46, B = 40, F = 35, m = 13, G = 27, b = 36, U = 37, l = 34, x = 33, j = 39, K = 32, V = 38, W = "top-start", k = "top-end", w = "bottom-start", z = "bottom-end", Y = "right-start", Z = "right-end", q = "left-start", Q = "left-end", J = /\[(\d+)]/g, v = /^(BV?)/, ss = /^\d+$/, ns = /^\..+/, ts = /^#/, rs = /^#[A-Za-z]+[\w\-:.]*$/, as = /(<([^>]+)>)/gi, os = /\B([A-Z])/g, es = /([a-z])([A-Z])/g, cs = /^[0-9]*\.?[0-9]+$/, Es = /\+/g, _s = /[-/\\^$*+?.()|[\]{}]/g, Rs = /[\s\uFEFF\xA0]+/g, Ts = /\s+/, us = /\/\*$/, As = /(\s|^)(\w)/g, fs = /^\s+/, Os = /\s+$/, Cs = /_/g, gs = /-(\w)/g, C = /[\p{Alpha}\p{Nd}]+/gu, Ns = /^\d+-\d\d?-\d\d?(?:\s|T|$)/, Ss = /-|\s|T/, Ds = /^([0-1]?[0-9]|2[0-3]):[0-5]?[0-9](:[0-5]?[0-9])?$/, Xs = /^.*(#[^#]+)$/, is = /%2C/g, ps = /[!'()*]/g, Ps = /^(\?|#|&)/, g = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, N = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, ds = (s, n) => n.filter((t) => t !== s);
|
|
17
|
-
function S(s) {
|
|
18
|
-
return Math.abs(
|
|
19
|
-
s.split("").reduce((n, t) => t.charCodeAt(0) + ((n << 5) - n), 0)
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
function c(s, n, t) {
|
|
23
|
-
return Math.floor(s % (t - n) + n);
|
|
24
|
-
}
|
|
25
|
-
function Is(s) {
|
|
26
|
-
s = s.replace(g, (t, r, a, o) => r + r + a + a + o + o);
|
|
27
|
-
const n = N.exec(s);
|
|
28
|
-
return n ? {
|
|
29
|
-
r: parseInt(n[1], 16),
|
|
30
|
-
g: parseInt(n[2], 16),
|
|
31
|
-
b: parseInt(n[3], 16)
|
|
32
|
-
} : null;
|
|
33
|
-
}
|
|
34
|
-
function E(s) {
|
|
35
|
-
const n = s.toString(16);
|
|
36
|
-
return n.length == 1 ? "0" + n : n;
|
|
37
|
-
}
|
|
38
|
-
function Ls(s, n, t) {
|
|
39
|
-
return "#" + E(s) + E(n) + E(t);
|
|
40
|
-
}
|
|
41
|
-
function D(s, n = R) {
|
|
42
|
-
const t = n != null && n.h ? [n.h.min, n.h.max] : [0, 360], r = n != null && n.s ? [n.s.min, n.s.max] : [0, 100], a = n != null && n.l ? [n.l.min, n.l.max] : [0, 100], o = S(s), u = c(o, ...t), A = c(o, ...r), f = c(o, ...a);
|
|
43
|
-
return {
|
|
44
|
-
h: u,
|
|
45
|
-
s: A,
|
|
46
|
-
l: f
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
function X(s) {
|
|
50
|
-
return `hsl(${s.h}, ${s.s}%, ${s.l}%)`;
|
|
51
|
-
}
|
|
52
|
-
function Ms(s, n = R) {
|
|
53
|
-
return X(D(s, n));
|
|
54
|
-
}
|
|
55
|
-
function i(s = []) {
|
|
56
|
-
return s.flatMap((n) => Array.isArray(n) ? i(n) : n);
|
|
57
|
-
}
|
|
58
|
-
const hs = (s) => s === 0 ? "0" : `${s / 16}rem`;
|
|
59
|
-
function Hs(s, n) {
|
|
60
|
-
return typeof s != "string" || !s ? "" : (s.match(C) ?? []).reduce((t, r) => t + (+r == 0 || parseInt(r) ? parseInt(r) : r[0] || ""), "").toUpperCase().substring(0, n);
|
|
61
|
-
}
|
|
62
|
-
const $s = (s, n) => n.concat(s), p = (s, n) => {
|
|
63
|
-
const { parentElement: t } = n;
|
|
64
|
-
return t ? s === t ? !0 : p(s, t) : !1;
|
|
65
|
-
}, e = (s) => Array.isArray(s), P = (s, n) => {
|
|
66
|
-
const { parentElement: t } = s;
|
|
67
|
-
return t ? n === t ? !0 : P(t, n) : !1;
|
|
68
|
-
}, ys = (s) => T(s) ? !0 : L(s) || e(s) ? s.length === 0 : _(s) ? Object.keys(s).length === 0 : !1, d = (s, n) => {
|
|
69
|
-
if (Object.is(s, n))
|
|
70
|
-
return !0;
|
|
71
|
-
if (e(s) && e(n))
|
|
72
|
-
return s.length === n.length && s.every((t, r) => t === n[r]);
|
|
73
|
-
if (_(s) && _(n)) {
|
|
74
|
-
const t = Object.keys(s), r = Object.keys(n);
|
|
75
|
-
return d(t, r) && t.every((a) => s[a] === n[a]);
|
|
76
|
-
}
|
|
77
|
-
return !1;
|
|
78
|
-
}, T = (s) => I(s) || O(s), I = (s) => s === null, Bs = (s) => typeof s == "number", _ = (s) => typeof s == "object" && (s == null ? void 0 : s.constructor) === Object, L = (s) => typeof s == "string", Fs = (s) => T(s) ? [] : e(s) ? s : [s];
|
|
79
|
-
function ms(s) {
|
|
80
|
-
return s.replace(/var\((.*)\)/, (n, t) => t);
|
|
81
|
-
}
|
|
82
|
-
export {
|
|
83
|
-
ds as $,
|
|
84
|
-
os as A,
|
|
85
|
-
es as B,
|
|
86
|
-
H as C,
|
|
87
|
-
cs as D,
|
|
88
|
-
Es as E,
|
|
89
|
-
_s as F,
|
|
90
|
-
Rs as G,
|
|
91
|
-
R as H,
|
|
92
|
-
Ts as I,
|
|
93
|
-
us as J,
|
|
94
|
-
As as K,
|
|
95
|
-
fs as L,
|
|
96
|
-
Os as M,
|
|
97
|
-
Cs as N,
|
|
98
|
-
gs as O,
|
|
99
|
-
W as P,
|
|
100
|
-
C as Q,
|
|
101
|
-
J as R,
|
|
102
|
-
Ns as S,
|
|
103
|
-
Ss as T,
|
|
104
|
-
Ds as U,
|
|
105
|
-
Xs as V,
|
|
106
|
-
is as W,
|
|
107
|
-
ps as X,
|
|
108
|
-
Ps as Y,
|
|
109
|
-
g as Z,
|
|
110
|
-
N as _,
|
|
111
|
-
$ as a,
|
|
112
|
-
Is as a0,
|
|
113
|
-
Ls as a1,
|
|
114
|
-
D as a2,
|
|
115
|
-
X as a3,
|
|
116
|
-
Ms as a4,
|
|
117
|
-
i as a5,
|
|
118
|
-
S as a6,
|
|
119
|
-
c as a7,
|
|
120
|
-
hs as a8,
|
|
121
|
-
Hs as a9,
|
|
122
|
-
$s as aa,
|
|
123
|
-
p as ab,
|
|
124
|
-
e as ac,
|
|
125
|
-
P as ad,
|
|
126
|
-
ys as ae,
|
|
127
|
-
d as af,
|
|
128
|
-
T as ag,
|
|
129
|
-
I as ah,
|
|
130
|
-
Bs as ai,
|
|
131
|
-
_ as aj,
|
|
132
|
-
L as ak,
|
|
133
|
-
Fs as al,
|
|
134
|
-
ms as am,
|
|
135
|
-
y as b,
|
|
136
|
-
B as c,
|
|
137
|
-
F as d,
|
|
138
|
-
m as e,
|
|
139
|
-
G as f,
|
|
140
|
-
b as g,
|
|
141
|
-
U as h,
|
|
142
|
-
l as i,
|
|
143
|
-
x as j,
|
|
144
|
-
j as k,
|
|
145
|
-
K as l,
|
|
146
|
-
V as m,
|
|
147
|
-
k as n,
|
|
148
|
-
w as o,
|
|
149
|
-
z as p,
|
|
150
|
-
Y as q,
|
|
151
|
-
Z as r,
|
|
152
|
-
q as s,
|
|
153
|
-
Q as t,
|
|
154
|
-
v as u,
|
|
155
|
-
ss as v,
|
|
156
|
-
ns as w,
|
|
157
|
-
ts as x,
|
|
158
|
-
rs as y,
|
|
159
|
-
as as z
|
|
160
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "./dom-DzNS5tBj.js";
|
|
2
|
-
import { i as s } from "./isUndefined-B5qXrATz.js";
|
|
3
|
-
const a = (t, r) => {
|
|
4
|
-
const e = r.find((n) => t === n.value);
|
|
5
|
-
if (s(e))
|
|
6
|
-
throw new Error("[getItemByValue]: Item not found.");
|
|
7
|
-
return e;
|
|
8
|
-
}, m = (t, r) => t.map((e) => a(e, r)), l = async (t, r) => r.filter((e) => new RegExp(t, "i").test(e.label));
|
|
9
|
-
export {
|
|
10
|
-
m as a,
|
|
11
|
-
a as g,
|
|
12
|
-
l as s
|
|
13
|
-
};
|