@pibit.ai/cure-design-system 0.3.15 → 0.3.17
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/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -18
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +387 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +313 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +132 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +105 -0
- package/dist/patterns/table/TableWrapper.d.ts +0 -11
- package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
- package/dist/patterns/table/TableWrapper.js +72 -150
- package/dist/patterns/table/index.d.ts +2 -1
- package/dist/patterns/table/index.d.ts.map +1 -1
- package/dist/patterns/table/table.d.ts.map +1 -1
- package/dist/patterns/table/table.js +50 -44
- package/dist/patterns/tree-view/tree-view.d.ts +7 -1
- package/dist/patterns/tree-view/tree-view.d.ts.map +1 -1
- package/dist/patterns/tree-view/tree-view.js +77 -70
- package/dist/primitives/button/button-utility.js +7 -7
- package/dist/primitives/button/button.js +2 -2
- package/dist/primitives/tooltip/ellipsis-content.d.ts +12 -0
- package/dist/primitives/tooltip/ellipsis-content.d.ts.map +1 -0
- package/dist/primitives/tooltip/ellipsis-content.js +113 -0
- package/dist/primitives/tooltip/index.d.ts +1 -0
- package/dist/primitives/tooltip/index.d.ts.map +1 -1
- package/dist/styles/components.css +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { computePosition as Z, offset as tt, autoPlacement as et, size as ot, shift as it } from "../../core/dist/floating-ui.core.js";
|
|
2
|
+
import { createCoords as g, round as W, rectToClientRect as z, max as T, min as A } from "../../utils/dist/floating-ui.utils.js";
|
|
3
|
+
import { isElement as p, getDocumentElement as x, getComputedStyle as y, isHTMLElement as C, getWindow as R, isTopLayer as D, getParentNode as O, isLastTraversableNode as E, isTableElement as nt, isContainingBlock as X, getContainingBlock as st, getNodeName as N, isOverflowElement as H, getNodeScroll as S, getOverflowAncestors as ct, getFrameElement as M, isWebKit as _ } from "../../utils/dist/floating-ui.utils.dom.js";
|
|
4
|
+
function K(t) {
|
|
5
|
+
const e = y(t);
|
|
6
|
+
let i = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
7
|
+
const n = C(t), c = n ? t.offsetWidth : i, s = n ? t.offsetHeight : o, r = W(i) !== c || W(o) !== s;
|
|
8
|
+
return r && (i = c, o = s), {
|
|
9
|
+
width: i,
|
|
10
|
+
height: o,
|
|
11
|
+
$: r
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function j(t) {
|
|
15
|
+
return p(t) ? t : t.contextElement;
|
|
16
|
+
}
|
|
17
|
+
function L(t) {
|
|
18
|
+
const e = j(t);
|
|
19
|
+
if (!C(e))
|
|
20
|
+
return g(1);
|
|
21
|
+
const i = e.getBoundingClientRect(), {
|
|
22
|
+
width: o,
|
|
23
|
+
height: n,
|
|
24
|
+
$: c
|
|
25
|
+
} = K(e);
|
|
26
|
+
let s = (c ? W(i.width) : i.width) / o, r = (c ? W(i.height) : i.height) / n;
|
|
27
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!r || !Number.isFinite(r)) && (r = 1), {
|
|
28
|
+
x: s,
|
|
29
|
+
y: r
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const rt = /* @__PURE__ */ g(0);
|
|
33
|
+
function q(t) {
|
|
34
|
+
const e = R(t);
|
|
35
|
+
return !_() || !e.visualViewport ? rt : {
|
|
36
|
+
x: e.visualViewport.offsetLeft,
|
|
37
|
+
y: e.visualViewport.offsetTop
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function lt(t, e, i) {
|
|
41
|
+
return e === void 0 && (e = !1), !i || e && i !== R(t) ? !1 : e;
|
|
42
|
+
}
|
|
43
|
+
function v(t, e, i, o) {
|
|
44
|
+
e === void 0 && (e = !1), i === void 0 && (i = !1);
|
|
45
|
+
const n = t.getBoundingClientRect(), c = j(t);
|
|
46
|
+
let s = g(1);
|
|
47
|
+
e && (o ? p(o) && (s = L(o)) : s = L(t));
|
|
48
|
+
const r = lt(c, i, o) ? q(c) : g(0);
|
|
49
|
+
let l = (n.left + r.x) / s.x, f = (n.top + r.y) / s.y, u = n.width / s.x, h = n.height / s.y;
|
|
50
|
+
if (c) {
|
|
51
|
+
const d = R(c), a = o && p(o) ? R(o) : o;
|
|
52
|
+
let m = d, w = M(m);
|
|
53
|
+
for (; w && o && a !== m; ) {
|
|
54
|
+
const b = L(w), V = w.getBoundingClientRect(), $ = y(w), U = V.left + (w.clientLeft + parseFloat($.paddingLeft)) * b.x, Y = V.top + (w.clientTop + parseFloat($.paddingTop)) * b.y;
|
|
55
|
+
l *= b.x, f *= b.y, u *= b.x, h *= b.y, l += U, f += Y, m = R(w), w = M(m);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return z({
|
|
59
|
+
width: u,
|
|
60
|
+
height: h,
|
|
61
|
+
x: l,
|
|
62
|
+
y: f
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function B(t, e) {
|
|
66
|
+
const i = S(t).scrollLeft;
|
|
67
|
+
return e ? e.left + i : v(x(t)).left + i;
|
|
68
|
+
}
|
|
69
|
+
function G(t, e) {
|
|
70
|
+
const i = t.getBoundingClientRect(), o = i.left + e.scrollLeft - B(t, i), n = i.top + e.scrollTop;
|
|
71
|
+
return {
|
|
72
|
+
x: o,
|
|
73
|
+
y: n
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function ft(t) {
|
|
77
|
+
let {
|
|
78
|
+
elements: e,
|
|
79
|
+
rect: i,
|
|
80
|
+
offsetParent: o,
|
|
81
|
+
strategy: n
|
|
82
|
+
} = t;
|
|
83
|
+
const c = n === "fixed", s = x(o), r = e ? D(e.floating) : !1;
|
|
84
|
+
if (o === s || r && c)
|
|
85
|
+
return i;
|
|
86
|
+
let l = {
|
|
87
|
+
scrollLeft: 0,
|
|
88
|
+
scrollTop: 0
|
|
89
|
+
}, f = g(1);
|
|
90
|
+
const u = g(0), h = C(o);
|
|
91
|
+
if ((h || !h && !c) && ((N(o) !== "body" || H(s)) && (l = S(o)), h)) {
|
|
92
|
+
const a = v(o);
|
|
93
|
+
f = L(o), u.x = a.x + o.clientLeft, u.y = a.y + o.clientTop;
|
|
94
|
+
}
|
|
95
|
+
const d = s && !h && !c ? G(s, l) : g(0);
|
|
96
|
+
return {
|
|
97
|
+
width: i.width * f.x,
|
|
98
|
+
height: i.height * f.y,
|
|
99
|
+
x: i.x * f.x - l.scrollLeft * f.x + u.x + d.x,
|
|
100
|
+
y: i.y * f.y - l.scrollTop * f.y + u.y + d.y
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function ut(t) {
|
|
104
|
+
return Array.from(t.getClientRects());
|
|
105
|
+
}
|
|
106
|
+
function ht(t) {
|
|
107
|
+
const e = x(t), i = S(t), o = t.ownerDocument.body, n = T(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), c = T(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
108
|
+
let s = -i.scrollLeft + B(t);
|
|
109
|
+
const r = -i.scrollTop;
|
|
110
|
+
return y(o).direction === "rtl" && (s += T(e.clientWidth, o.clientWidth) - n), {
|
|
111
|
+
width: n,
|
|
112
|
+
height: c,
|
|
113
|
+
x: s,
|
|
114
|
+
y: r
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
const I = 25;
|
|
118
|
+
function at(t, e) {
|
|
119
|
+
const i = R(t), o = x(t), n = i.visualViewport;
|
|
120
|
+
let c = o.clientWidth, s = o.clientHeight, r = 0, l = 0;
|
|
121
|
+
if (n) {
|
|
122
|
+
c = n.width, s = n.height;
|
|
123
|
+
const u = _();
|
|
124
|
+
(!u || u && e === "fixed") && (r = n.offsetLeft, l = n.offsetTop);
|
|
125
|
+
}
|
|
126
|
+
const f = B(o);
|
|
127
|
+
if (f <= 0) {
|
|
128
|
+
const u = o.ownerDocument, h = u.body, d = getComputedStyle(h), a = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, m = Math.abs(o.clientWidth - h.clientWidth - a);
|
|
129
|
+
m <= I && (c -= m);
|
|
130
|
+
} else f <= I && (c += f);
|
|
131
|
+
return {
|
|
132
|
+
width: c,
|
|
133
|
+
height: s,
|
|
134
|
+
x: r,
|
|
135
|
+
y: l
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function dt(t, e) {
|
|
139
|
+
const i = v(t, !0, e === "fixed"), o = i.top + t.clientTop, n = i.left + t.clientLeft, c = C(t) ? L(t) : g(1), s = t.clientWidth * c.x, r = t.clientHeight * c.y, l = n * c.x, f = o * c.y;
|
|
140
|
+
return {
|
|
141
|
+
width: s,
|
|
142
|
+
height: r,
|
|
143
|
+
x: l,
|
|
144
|
+
y: f
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
function P(t, e, i) {
|
|
148
|
+
let o;
|
|
149
|
+
if (e === "viewport")
|
|
150
|
+
o = at(t, i);
|
|
151
|
+
else if (e === "document")
|
|
152
|
+
o = ht(x(t));
|
|
153
|
+
else if (p(e))
|
|
154
|
+
o = dt(e, i);
|
|
155
|
+
else {
|
|
156
|
+
const n = q(t);
|
|
157
|
+
o = {
|
|
158
|
+
x: e.x - n.x,
|
|
159
|
+
y: e.y - n.y,
|
|
160
|
+
width: e.width,
|
|
161
|
+
height: e.height
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
return z(o);
|
|
165
|
+
}
|
|
166
|
+
function J(t, e) {
|
|
167
|
+
const i = O(t);
|
|
168
|
+
return i === e || !p(i) || E(i) ? !1 : y(i).position === "fixed" || J(i, e);
|
|
169
|
+
}
|
|
170
|
+
function gt(t, e) {
|
|
171
|
+
const i = e.get(t);
|
|
172
|
+
if (i)
|
|
173
|
+
return i;
|
|
174
|
+
let o = ct(t, []).filter((r) => p(r) && N(r) !== "body"), n = null;
|
|
175
|
+
const c = y(t).position === "fixed";
|
|
176
|
+
let s = c ? O(t) : t;
|
|
177
|
+
for (; p(s) && !E(s); ) {
|
|
178
|
+
const r = y(s), l = X(s);
|
|
179
|
+
!l && r.position === "fixed" && (n = null), (c ? !l && !n : !l && r.position === "static" && !!n && (n.position === "absolute" || n.position === "fixed") || H(s) && !l && J(t, s)) ? o = o.filter((u) => u !== s) : n = r, s = O(s);
|
|
180
|
+
}
|
|
181
|
+
return e.set(t, o), o;
|
|
182
|
+
}
|
|
183
|
+
function pt(t) {
|
|
184
|
+
let {
|
|
185
|
+
element: e,
|
|
186
|
+
boundary: i,
|
|
187
|
+
rootBoundary: o,
|
|
188
|
+
strategy: n
|
|
189
|
+
} = t;
|
|
190
|
+
const s = [...i === "clippingAncestors" ? D(e) ? [] : gt(e, this._c) : [].concat(i), o], r = P(e, s[0], n);
|
|
191
|
+
let l = r.top, f = r.right, u = r.bottom, h = r.left;
|
|
192
|
+
for (let d = 1; d < s.length; d++) {
|
|
193
|
+
const a = P(e, s[d], n);
|
|
194
|
+
l = T(a.top, l), f = A(a.right, f), u = A(a.bottom, u), h = T(a.left, h);
|
|
195
|
+
}
|
|
196
|
+
return {
|
|
197
|
+
width: f - h,
|
|
198
|
+
height: u - l,
|
|
199
|
+
x: h,
|
|
200
|
+
y: l
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
function yt(t) {
|
|
204
|
+
const {
|
|
205
|
+
width: e,
|
|
206
|
+
height: i
|
|
207
|
+
} = K(t);
|
|
208
|
+
return {
|
|
209
|
+
width: e,
|
|
210
|
+
height: i
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
function wt(t, e, i) {
|
|
214
|
+
const o = C(e), n = x(e), c = i === "fixed", s = v(t, !0, c, e);
|
|
215
|
+
let r = {
|
|
216
|
+
scrollLeft: 0,
|
|
217
|
+
scrollTop: 0
|
|
218
|
+
};
|
|
219
|
+
const l = g(0);
|
|
220
|
+
function f() {
|
|
221
|
+
l.x = B(n);
|
|
222
|
+
}
|
|
223
|
+
if (o || !o && !c)
|
|
224
|
+
if ((N(e) !== "body" || H(n)) && (r = S(e)), o) {
|
|
225
|
+
const a = v(e, !0, c, e);
|
|
226
|
+
l.x = a.x + e.clientLeft, l.y = a.y + e.clientTop;
|
|
227
|
+
} else n && f();
|
|
228
|
+
c && !o && n && f();
|
|
229
|
+
const u = n && !o && !c ? G(n, r) : g(0), h = s.left + r.scrollLeft - l.x - u.x, d = s.top + r.scrollTop - l.y - u.y;
|
|
230
|
+
return {
|
|
231
|
+
x: h,
|
|
232
|
+
y: d,
|
|
233
|
+
width: s.width,
|
|
234
|
+
height: s.height
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
function F(t) {
|
|
238
|
+
return y(t).position === "static";
|
|
239
|
+
}
|
|
240
|
+
function k(t, e) {
|
|
241
|
+
if (!C(t) || y(t).position === "fixed")
|
|
242
|
+
return null;
|
|
243
|
+
if (e)
|
|
244
|
+
return e(t);
|
|
245
|
+
let i = t.offsetParent;
|
|
246
|
+
return x(t) === i && (i = i.ownerDocument.body), i;
|
|
247
|
+
}
|
|
248
|
+
function Q(t, e) {
|
|
249
|
+
const i = R(t);
|
|
250
|
+
if (D(t))
|
|
251
|
+
return i;
|
|
252
|
+
if (!C(t)) {
|
|
253
|
+
let n = O(t);
|
|
254
|
+
for (; n && !E(n); ) {
|
|
255
|
+
if (p(n) && !F(n))
|
|
256
|
+
return n;
|
|
257
|
+
n = O(n);
|
|
258
|
+
}
|
|
259
|
+
return i;
|
|
260
|
+
}
|
|
261
|
+
let o = k(t, e);
|
|
262
|
+
for (; o && nt(o) && F(o); )
|
|
263
|
+
o = k(o, e);
|
|
264
|
+
return o && E(o) && F(o) && !X(o) ? i : o || st(t) || i;
|
|
265
|
+
}
|
|
266
|
+
const xt = async function(t) {
|
|
267
|
+
const e = this.getOffsetParent || Q, i = this.getDimensions, o = await i(t.floating);
|
|
268
|
+
return {
|
|
269
|
+
reference: wt(t.reference, await e(t.floating), t.strategy),
|
|
270
|
+
floating: {
|
|
271
|
+
x: 0,
|
|
272
|
+
y: 0,
|
|
273
|
+
width: o.width,
|
|
274
|
+
height: o.height
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
function mt(t) {
|
|
279
|
+
return y(t).direction === "rtl";
|
|
280
|
+
}
|
|
281
|
+
const Rt = {
|
|
282
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ft,
|
|
283
|
+
getDocumentElement: x,
|
|
284
|
+
getClippingRect: pt,
|
|
285
|
+
getOffsetParent: Q,
|
|
286
|
+
getElementRects: xt,
|
|
287
|
+
getClientRects: ut,
|
|
288
|
+
getDimensions: yt,
|
|
289
|
+
getScale: L,
|
|
290
|
+
isElement: p,
|
|
291
|
+
isRTL: mt
|
|
292
|
+
}, Tt = tt, Ot = et, vt = it, Wt = ot, Et = (t, e, i) => {
|
|
293
|
+
const o = /* @__PURE__ */ new Map(), n = {
|
|
294
|
+
platform: Rt,
|
|
295
|
+
...i
|
|
296
|
+
}, c = {
|
|
297
|
+
...n.platform,
|
|
298
|
+
_c: o
|
|
299
|
+
};
|
|
300
|
+
return Z(t, e, {
|
|
301
|
+
...n,
|
|
302
|
+
platform: c
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
export {
|
|
306
|
+
Ot as autoPlacement,
|
|
307
|
+
Et as computePosition,
|
|
308
|
+
ct as getOverflowAncestors,
|
|
309
|
+
Tt as offset,
|
|
310
|
+
Rt as platform,
|
|
311
|
+
vt as shift,
|
|
312
|
+
Wt as size
|
|
313
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
function c() {
|
|
2
|
+
return typeof window < "u";
|
|
3
|
+
}
|
|
4
|
+
function f(t) {
|
|
5
|
+
return p(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
6
|
+
}
|
|
7
|
+
function r(t) {
|
|
8
|
+
var e;
|
|
9
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
10
|
+
}
|
|
11
|
+
function S(t) {
|
|
12
|
+
var e;
|
|
13
|
+
return (e = (p(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
14
|
+
}
|
|
15
|
+
function p(t) {
|
|
16
|
+
return c() ? t instanceof Node || t instanceof r(t).Node : !1;
|
|
17
|
+
}
|
|
18
|
+
function m(t) {
|
|
19
|
+
return c() ? t instanceof Element || t instanceof r(t).Element : !1;
|
|
20
|
+
}
|
|
21
|
+
function w(t) {
|
|
22
|
+
return c() ? t instanceof HTMLElement || t instanceof r(t).HTMLElement : !1;
|
|
23
|
+
}
|
|
24
|
+
function d(t) {
|
|
25
|
+
return !c() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof r(t).ShadowRoot;
|
|
26
|
+
}
|
|
27
|
+
function h(t) {
|
|
28
|
+
const {
|
|
29
|
+
overflow: e,
|
|
30
|
+
overflowX: a,
|
|
31
|
+
overflowY: i,
|
|
32
|
+
display: n
|
|
33
|
+
} = y(t);
|
|
34
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + i + a) && n !== "inline" && n !== "contents";
|
|
35
|
+
}
|
|
36
|
+
function k(t) {
|
|
37
|
+
return /^(table|td|th)$/.test(f(t));
|
|
38
|
+
}
|
|
39
|
+
function E(t) {
|
|
40
|
+
try {
|
|
41
|
+
if (t.matches(":popover-open"))
|
|
42
|
+
return !0;
|
|
43
|
+
} catch {
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
return t.matches(":modal");
|
|
47
|
+
} catch {
|
|
48
|
+
return !1;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const v = /transform|translate|scale|rotate|perspective|filter/, L = /paint|layout|strict|content/, o = (t) => !!t && t !== "none";
|
|
52
|
+
let s;
|
|
53
|
+
function T(t) {
|
|
54
|
+
const e = m(t) ? y(t) : t;
|
|
55
|
+
return o(e.transform) || o(e.translate) || o(e.scale) || o(e.rotate) || o(e.perspective) || !C() && (o(e.backdropFilter) || o(e.filter)) || v.test(e.willChange || "") || L.test(e.contain || "");
|
|
56
|
+
}
|
|
57
|
+
function _(t) {
|
|
58
|
+
let e = l(t);
|
|
59
|
+
for (; w(e) && !g(e); ) {
|
|
60
|
+
if (T(e))
|
|
61
|
+
return e;
|
|
62
|
+
if (E(e))
|
|
63
|
+
return null;
|
|
64
|
+
e = l(e);
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
function C() {
|
|
69
|
+
return s == null && (s = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), s;
|
|
70
|
+
}
|
|
71
|
+
function g(t) {
|
|
72
|
+
return /^(html|body|#document)$/.test(f(t));
|
|
73
|
+
}
|
|
74
|
+
function y(t) {
|
|
75
|
+
return r(t).getComputedStyle(t);
|
|
76
|
+
}
|
|
77
|
+
function W(t) {
|
|
78
|
+
return m(t) ? {
|
|
79
|
+
scrollLeft: t.scrollLeft,
|
|
80
|
+
scrollTop: t.scrollTop
|
|
81
|
+
} : {
|
|
82
|
+
scrollLeft: t.scrollX,
|
|
83
|
+
scrollTop: t.scrollY
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function l(t) {
|
|
87
|
+
if (f(t) === "html")
|
|
88
|
+
return t;
|
|
89
|
+
const e = (
|
|
90
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
91
|
+
t.assignedSlot || // DOM Element detected.
|
|
92
|
+
t.parentNode || // ShadowRoot detected.
|
|
93
|
+
d(t) && t.host || // Fallback.
|
|
94
|
+
S(t)
|
|
95
|
+
);
|
|
96
|
+
return d(e) ? e.host : e;
|
|
97
|
+
}
|
|
98
|
+
function N(t) {
|
|
99
|
+
const e = l(t);
|
|
100
|
+
return g(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : w(e) && h(e) ? e : N(e);
|
|
101
|
+
}
|
|
102
|
+
function D(t, e, a) {
|
|
103
|
+
var i;
|
|
104
|
+
e === void 0 && (e = []);
|
|
105
|
+
const n = N(t), b = n === ((i = t.ownerDocument) == null ? void 0 : i.body), u = r(n);
|
|
106
|
+
return b ? (R(u), e.concat(u, u.visualViewport || [], h(n) ? n : [], [])) : e.concat(n, D(n, []));
|
|
107
|
+
}
|
|
108
|
+
function R(t) {
|
|
109
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
110
|
+
}
|
|
111
|
+
export {
|
|
112
|
+
y as getComputedStyle,
|
|
113
|
+
_ as getContainingBlock,
|
|
114
|
+
S as getDocumentElement,
|
|
115
|
+
R as getFrameElement,
|
|
116
|
+
N as getNearestOverflowAncestor,
|
|
117
|
+
f as getNodeName,
|
|
118
|
+
W as getNodeScroll,
|
|
119
|
+
D as getOverflowAncestors,
|
|
120
|
+
l as getParentNode,
|
|
121
|
+
r as getWindow,
|
|
122
|
+
T as isContainingBlock,
|
|
123
|
+
m as isElement,
|
|
124
|
+
w as isHTMLElement,
|
|
125
|
+
g as isLastTraversableNode,
|
|
126
|
+
p as isNode,
|
|
127
|
+
h as isOverflowElement,
|
|
128
|
+
d as isShadowRoot,
|
|
129
|
+
k as isTableElement,
|
|
130
|
+
E as isTopLayer,
|
|
131
|
+
C as isWebKit
|
|
132
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const f = ["top", "right", "bottom", "left"], s = ["start", "end"], y = /* @__PURE__ */ f.reduce((t, n) => t.concat(n, n + "-" + s[0], n + "-" + s[1]), []), g = Math.min, l = Math.max, O = Math.round, S = (t) => ({
|
|
2
|
+
x: t,
|
|
3
|
+
y: t
|
|
4
|
+
}), a = {
|
|
5
|
+
left: "right",
|
|
6
|
+
right: "left",
|
|
7
|
+
bottom: "top",
|
|
8
|
+
top: "bottom"
|
|
9
|
+
};
|
|
10
|
+
function M(t, n, e) {
|
|
11
|
+
return l(t, g(n, e));
|
|
12
|
+
}
|
|
13
|
+
function P(t, n) {
|
|
14
|
+
return typeof t == "function" ? t(n) : t;
|
|
15
|
+
}
|
|
16
|
+
function m(t) {
|
|
17
|
+
return t.split("-")[0];
|
|
18
|
+
}
|
|
19
|
+
function h(t) {
|
|
20
|
+
return t.split("-")[1];
|
|
21
|
+
}
|
|
22
|
+
function p(t) {
|
|
23
|
+
return t === "x" ? "y" : "x";
|
|
24
|
+
}
|
|
25
|
+
function x(t) {
|
|
26
|
+
return t === "y" ? "height" : "width";
|
|
27
|
+
}
|
|
28
|
+
function d(t) {
|
|
29
|
+
const n = t[0];
|
|
30
|
+
return n === "t" || n === "b" ? "y" : "x";
|
|
31
|
+
}
|
|
32
|
+
function b(t) {
|
|
33
|
+
return p(d(t));
|
|
34
|
+
}
|
|
35
|
+
function C(t, n, e) {
|
|
36
|
+
e === void 0 && (e = !1);
|
|
37
|
+
const o = h(t), i = b(t), c = x(i);
|
|
38
|
+
let r = i === "x" ? o === (e ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
39
|
+
return n.reference[c] > n.floating[c] && (r = u(r)), [r, u(r)];
|
|
40
|
+
}
|
|
41
|
+
function j(t) {
|
|
42
|
+
return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
|
|
43
|
+
}
|
|
44
|
+
function u(t) {
|
|
45
|
+
const n = m(t);
|
|
46
|
+
return a[n] + t.slice(n.length);
|
|
47
|
+
}
|
|
48
|
+
function A(t) {
|
|
49
|
+
return {
|
|
50
|
+
top: 0,
|
|
51
|
+
right: 0,
|
|
52
|
+
bottom: 0,
|
|
53
|
+
left: 0,
|
|
54
|
+
...t
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function w(t) {
|
|
58
|
+
return typeof t != "number" ? A(t) : {
|
|
59
|
+
top: t,
|
|
60
|
+
right: t,
|
|
61
|
+
bottom: t,
|
|
62
|
+
left: t
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function L(t) {
|
|
66
|
+
const {
|
|
67
|
+
x: n,
|
|
68
|
+
y: e,
|
|
69
|
+
width: o,
|
|
70
|
+
height: i
|
|
71
|
+
} = t;
|
|
72
|
+
return {
|
|
73
|
+
width: o,
|
|
74
|
+
height: i,
|
|
75
|
+
top: e,
|
|
76
|
+
left: n,
|
|
77
|
+
right: n + o,
|
|
78
|
+
bottom: e + i,
|
|
79
|
+
x: n,
|
|
80
|
+
y: e
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
s as alignments,
|
|
85
|
+
M as clamp,
|
|
86
|
+
S as createCoords,
|
|
87
|
+
P as evaluate,
|
|
88
|
+
A as expandPaddingObject,
|
|
89
|
+
h as getAlignment,
|
|
90
|
+
b as getAlignmentAxis,
|
|
91
|
+
C as getAlignmentSides,
|
|
92
|
+
x as getAxisLength,
|
|
93
|
+
j as getOppositeAlignmentPlacement,
|
|
94
|
+
p as getOppositeAxis,
|
|
95
|
+
u as getOppositePlacement,
|
|
96
|
+
w as getPaddingObject,
|
|
97
|
+
m as getSide,
|
|
98
|
+
d as getSideAxis,
|
|
99
|
+
l as max,
|
|
100
|
+
g as min,
|
|
101
|
+
y as placements,
|
|
102
|
+
L as rectToClientRect,
|
|
103
|
+
O as round,
|
|
104
|
+
f as sides
|
|
105
|
+
};
|
|
@@ -71,15 +71,4 @@ export type TableWrapperProps = {
|
|
|
71
71
|
* ```
|
|
72
72
|
*/
|
|
73
73
|
export declare const TableWrapper: import('react').ForwardRefExoticComponent<TableWrapperProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
74
|
-
export declare const EllipsisContentWithTooltip: ({ content, className, link, tooltipPosition: tooltipPositionProp, tooltipSide, textClassName, }: {
|
|
75
|
-
content: string;
|
|
76
|
-
className?: string;
|
|
77
|
-
link?: boolean;
|
|
78
|
-
/** "start" aligns tooltip to the left of the trigger; "center" (default) centers it. */
|
|
79
|
-
tooltipPosition?: "start" | "center" | "end";
|
|
80
|
-
/** "above" (default) shows tooltip above the text; "below" shows it below. */
|
|
81
|
-
tooltipSide?: "above" | "below";
|
|
82
|
-
textClassName?: string;
|
|
83
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
84
|
-
export declare const createEllipsisContent: (content: string, className?: string, link?: boolean, tooltipPosition?: "start" | "center" | "end", tooltipSide?: "above" | "below", placeholder?: string, textClassName?: string) => import("react/jsx-runtime").JSX.Element;
|
|
85
74
|
//# sourceMappingURL=TableWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableWrapper.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/TableWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"TableWrapper.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/TableWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAInD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,kDAAkD;IAClD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,yCAAyC;IACzC,OAAO,EAAE;QACP,0BAA0B;QAC1B,KAAK,EAAE,MAAM,CAAC;QACd,wDAAwD;QACxD,GAAG,EAAE,MAAM,CAAC;QACZ,yCAAyC;QACzC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAC1B,gDAAgD;QAChD,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,qCAAqC;QACrC,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,mCAAmC;QACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,EAAE,CAAC;IACJ,yFAAyF;IACzF,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,SAAS,CAAC;IAC/D,qCAAqC;IACrC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,0CAA0C;IAC1C,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,6DAA6D;IAC7D,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kCAAkC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mDAAmD;IACnD,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC;IACzC,8CAA8C;IAC9C,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,SAAS,CAAC;CAClD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY,8GAkGxB,CAAC"}
|