@caspeco/casper-ui-library 5.0.1 → 5.1.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/components/combobox/combobox-item.d.ts.map +1 -1
- package/dist/components/combobox/combobox-item.js +18 -17
- package/dist/components/combobox/types.d.ts +6 -1
- package/dist/components/combobox/types.d.ts.map +1 -1
- package/dist/components/tag/tag.d.ts.map +1 -1
- package/dist/components/tag/tag.js +30 -28
- package/dist/components/tag/types.d.ts +4 -0
- package/dist/components/tag/types.d.ts.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +234 -232
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-item.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox-item.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAahE,KAAK,iBAAiB,GAAG;IACxB,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"combobox-item.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox-item.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAahE,KAAK,iBAAiB,GAAG;IACxB,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,iBAAiB,2CAkBhF"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Flex as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as t } from "@chakra-ui/react";
|
|
3
3
|
import { Box as a } from "../box/box.js";
|
|
4
|
-
import { Tag as
|
|
4
|
+
import { Tag as o } from "../tag/tag.js";
|
|
5
5
|
import { ThemeSpaceVariable as c } from "../../theme/theme-types.js";
|
|
6
6
|
const s = {
|
|
7
|
-
info:
|
|
8
|
-
success:
|
|
9
|
-
warning:
|
|
10
|
-
error:
|
|
11
|
-
primary:
|
|
12
|
-
secondary:
|
|
13
|
-
neutral:
|
|
14
|
-
undefined:
|
|
7
|
+
info: o.Info,
|
|
8
|
+
success: o.Success,
|
|
9
|
+
warning: o.Warning,
|
|
10
|
+
error: o.Error,
|
|
11
|
+
primary: o.Primary,
|
|
12
|
+
secondary: o.Secondary,
|
|
13
|
+
neutral: o,
|
|
14
|
+
undefined: o.ComboboxItem
|
|
15
15
|
};
|
|
16
|
-
function b({ item:
|
|
17
|
-
const l = n ? "primary" :
|
|
18
|
-
return p ? /* @__PURE__ */ t
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
function b({ item: r, asPlainText: p, isDeleting: n }) {
|
|
17
|
+
const l = n ? "primary" : r.variant || "neutral", d = s[l];
|
|
18
|
+
return p ? /* @__PURE__ */ i(t, { gap: c.XSmall, overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", children: [
|
|
19
|
+
r.prepend,
|
|
20
|
+
r.label,
|
|
21
|
+
r.append
|
|
22
|
+
] }) : /* @__PURE__ */ e(a, { overflow: "hidden", children: /* @__PURE__ */ e(d, { prepend: r.prepend, append: r.append, dot: r.dot, solid: n, children: /* @__PURE__ */ e(a, { display: "block", overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", children: r.label }) }) });
|
|
22
23
|
}
|
|
23
24
|
export {
|
|
24
25
|
b as ComboboxItem
|
|
@@ -2,8 +2,9 @@ import { ResponsiveValue } from '@chakra-ui/react';
|
|
|
2
2
|
import { Placement } from '@floating-ui/dom';
|
|
3
3
|
import { LayoutProps, MarginProps } from '../../theme/index.js';
|
|
4
4
|
import { RefObject } from 'react';
|
|
5
|
+
import { Tag, TagProps } from '../tag/index.js';
|
|
5
6
|
export type { Placement };
|
|
6
|
-
export type ComboboxTagVariant =
|
|
7
|
+
export type ComboboxTagVariant = Lowercase<Exclude<keyof typeof Tag, keyof React.FC<TagProps> | "ComboboxItem">>;
|
|
7
8
|
export type Locales = "en-US" | "nb-NO" | "da-DK" | "sv-SE" | "en-GB";
|
|
8
9
|
export type ComboboxItem = {
|
|
9
10
|
/**
|
|
@@ -22,6 +23,10 @@ export type ComboboxItem = {
|
|
|
22
23
|
* Optional element to prepend to the item.
|
|
23
24
|
*/
|
|
24
25
|
prepend?: JSX.Element | null;
|
|
26
|
+
/**
|
|
27
|
+
* Optional element to append to the item.
|
|
28
|
+
*/
|
|
29
|
+
append?: JSX.Element | null;
|
|
25
30
|
/**
|
|
26
31
|
* Optional tag dot to display in front of the item label.
|
|
27
32
|
* Will be colored according to the variant.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,SA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","sourceRoot":"","sources":["../../../lib/components/tag/tag.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAA8B,MAAM,SAAS,CAAC;AAoChF,eAAO,MAAM,GAAG,EAAE,oBAEjB,CAAC"}
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { Tag as
|
|
3
|
-
import { Icon as
|
|
4
|
-
function
|
|
5
|
-
children:
|
|
6
|
-
dot:
|
|
1
|
+
import { jsx as n, jsxs as f, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { Tag as v, Circle as x, TagLabel as y, TagCloseButton as b } from "@chakra-ui/react";
|
|
3
|
+
import { Icon as T } from "../icon/icon.js";
|
|
4
|
+
function i({
|
|
5
|
+
children: r,
|
|
6
|
+
dot: a,
|
|
7
7
|
icon: t,
|
|
8
8
|
onClose: e,
|
|
9
|
-
ariaLabel:
|
|
9
|
+
ariaLabel: m,
|
|
10
10
|
prepend: l,
|
|
11
|
-
size:
|
|
12
|
-
variant:
|
|
13
|
-
isDisabled:
|
|
14
|
-
|
|
11
|
+
size: d = "xs",
|
|
12
|
+
variant: g = "neutral",
|
|
13
|
+
isDisabled: u,
|
|
14
|
+
append: c,
|
|
15
|
+
...S
|
|
15
16
|
}) {
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
t && /* @__PURE__ */ n(
|
|
19
|
-
l && /* @__PURE__ */ n(
|
|
20
|
-
/* @__PURE__ */ n(
|
|
17
|
+
return /* @__PURE__ */ f(v, { size: d, variant: g, ...S, children: [
|
|
18
|
+
a && /* @__PURE__ */ n(x, { className: "tag-dot" }),
|
|
19
|
+
t && /* @__PURE__ */ n(T, { className: "tag-icon", icon: t }),
|
|
20
|
+
l && /* @__PURE__ */ n(s, { children: l }),
|
|
21
|
+
/* @__PURE__ */ n(y, { display: "flex", alignContent: "center", children: r }),
|
|
22
|
+
c && /* @__PURE__ */ n(s, { children: c }),
|
|
21
23
|
e && /* @__PURE__ */ n(
|
|
22
|
-
|
|
24
|
+
b,
|
|
23
25
|
{
|
|
24
|
-
"aria-label":
|
|
25
|
-
isDisabled:
|
|
26
|
+
"aria-label": m,
|
|
27
|
+
isDisabled: u,
|
|
26
28
|
color: "inherit",
|
|
27
29
|
onClick: e
|
|
28
30
|
}
|
|
29
31
|
)
|
|
30
32
|
] });
|
|
31
33
|
}
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
const o = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "neutralSolid" : "neutral", ...a });
|
|
35
|
+
o.Primary = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "primarySolid" : "primary", ...a });
|
|
36
|
+
o.Secondary = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "secondarySolid" : "secondary", ...a });
|
|
37
|
+
o.Success = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "successSolid" : "success", ...a });
|
|
38
|
+
o.Error = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "errorSolid" : "error", ...a });
|
|
39
|
+
o.Warning = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "warningSolid" : "warning", ...a });
|
|
40
|
+
o.Info = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "infoSolid" : "info", ...a });
|
|
41
|
+
o.ComboboxItem = ({ ...r }) => /* @__PURE__ */ n(i, { variant: "comboboxItem", ...r });
|
|
40
42
|
export {
|
|
41
|
-
|
|
43
|
+
o as Tag
|
|
42
44
|
};
|
|
@@ -19,6 +19,10 @@ export type TagPropsBase = {
|
|
|
19
19
|
* Element to prepend to the tag. Use if you need to display a custom element to the left of the label.
|
|
20
20
|
*/
|
|
21
21
|
prepend?: JSX.Element | null;
|
|
22
|
+
/**
|
|
23
|
+
* Element to append to the tag. Use if you need to display a custom element to the right of the label.
|
|
24
|
+
*/
|
|
25
|
+
append?: JSX.Element | null;
|
|
22
26
|
/**
|
|
23
27
|
* Disables the close button of the tag.
|
|
24
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/tag/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEpF,KAAK,yBAAyB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAElE,MAAM,MAAM,YAAY,GAAG;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;CAC3C,GAAG,yBAAyB,GAC5B,WAAW,CAAC;AAEb,KAAK,mBAAmB,GAAG,YAAY,GAAG;IACzC;;OAEG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF,KAAK,sBAAsB,GAAG,YAAY,GAAG;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,SAAS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AK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC1B,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACzB,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC5B,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC5B,cAAc,GACd,SAAS,GACT,cAAc,GACd,SAAS,GACT,gBAAgB,GAChB,WAAW,GACX,cAAc,GACd,SAAS,GACT,YAAY,GACZ,OAAO,GACP,cAAc,GACd,SAAS,GACT,WAAW,GACX,MAAM,GAEN,cAAc,CAAC;AAElB,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG;IACzC,OAAO,EAAE,mBAAmB,CAAC;CAC7B,CAAC"}
|
|
@@ -1,287 +1,289 @@
|
|
|
1
|
-
import { computePosition as
|
|
2
|
-
import { createCoords as
|
|
3
|
-
import { getOverflowAncestors as
|
|
1
|
+
import { computePosition as st, flip as rt } from "../../core/dist/floating-ui.core.js";
|
|
2
|
+
import { createCoords as w, rectToClientRect as J, floor as A, max as E, round as D, min as V } from "../../utils/dist/floating-ui.utils.js";
|
|
3
|
+
import { getOverflowAncestors as z, isElement as v, getDocumentElement as R, getWindow as L, getFrameElement as U, getComputedStyle as b, isHTMLElement as C, isWebKit as Q, isTopLayer as _, getParentNode as W, isLastTraversableNode as H, isTableElement as ct, isContainingBlock as Y, getContainingBlock as lt, getNodeName as $, isOverflowElement as q, getNodeScroll as I } from "../../utils/dist/floating-ui.utils.dom.js";
|
|
4
4
|
function Z(t) {
|
|
5
|
-
const e =
|
|
6
|
-
let
|
|
7
|
-
const
|
|
8
|
-
return c && (
|
|
9
|
-
width:
|
|
10
|
-
height:
|
|
5
|
+
const e = b(t);
|
|
6
|
+
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
7
|
+
const i = C(t), r = i ? t.offsetWidth : o, s = i ? t.offsetHeight : n, c = D(o) !== r || D(n) !== s;
|
|
8
|
+
return c && (o = r, n = s), {
|
|
9
|
+
width: o,
|
|
10
|
+
height: n,
|
|
11
11
|
$: c
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function X(t) {
|
|
15
15
|
return v(t) ? t : t.contextElement;
|
|
16
16
|
}
|
|
17
17
|
function F(t) {
|
|
18
|
-
const e =
|
|
19
|
-
if (!
|
|
20
|
-
return
|
|
21
|
-
const
|
|
22
|
-
width:
|
|
23
|
-
height:
|
|
18
|
+
const e = X(t);
|
|
19
|
+
if (!C(e))
|
|
20
|
+
return w(1);
|
|
21
|
+
const o = e.getBoundingClientRect(), {
|
|
22
|
+
width: n,
|
|
23
|
+
height: i,
|
|
24
24
|
$: r
|
|
25
25
|
} = Z(e);
|
|
26
|
-
let s = (r ?
|
|
26
|
+
let s = (r ? D(o.width) : o.width) / n, c = (r ? D(o.height) : o.height) / i;
|
|
27
27
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
28
28
|
x: s,
|
|
29
29
|
y: c
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
32
|
+
const ft = /* @__PURE__ */ w(0);
|
|
33
|
+
function tt(t) {
|
|
34
34
|
const e = L(t);
|
|
35
|
-
return !Q() || !e.visualViewport ?
|
|
35
|
+
return !Q() || !e.visualViewport ? ft : {
|
|
36
36
|
x: e.visualViewport.offsetLeft,
|
|
37
37
|
y: e.visualViewport.offsetTop
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
return e === void 0 && (e = !1), !
|
|
40
|
+
function ut(t, e, o) {
|
|
41
|
+
return e === void 0 && (e = !1), !o || e && o !== L(t) ? !1 : e;
|
|
42
42
|
}
|
|
43
|
-
function T(t, e,
|
|
44
|
-
e === void 0 && (e = !1),
|
|
45
|
-
const
|
|
46
|
-
let s =
|
|
47
|
-
e && (
|
|
48
|
-
const c =
|
|
49
|
-
let
|
|
43
|
+
function T(t, e, o, n) {
|
|
44
|
+
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
45
|
+
const i = t.getBoundingClientRect(), r = X(t);
|
|
46
|
+
let s = w(1);
|
|
47
|
+
e && (n ? v(n) && (s = F(n)) : s = F(t));
|
|
48
|
+
const c = ut(r, o, n) ? tt(r) : w(0);
|
|
49
|
+
let f = (i.left + c.x) / s.x, l = (i.top + c.y) / s.y, u = i.width / s.x, h = i.height / s.y;
|
|
50
50
|
if (r) {
|
|
51
|
-
const
|
|
52
|
-
let
|
|
53
|
-
for (;
|
|
54
|
-
const
|
|
55
|
-
|
|
51
|
+
const d = L(r), a = n && v(n) ? L(n) : n;
|
|
52
|
+
let m = d, p = U(m);
|
|
53
|
+
for (; p && n && a !== m; ) {
|
|
54
|
+
const y = F(p), g = p.getBoundingClientRect(), x = b(p), O = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * y.x, S = g.top + (p.clientTop + parseFloat(x.paddingTop)) * y.y;
|
|
55
|
+
f *= y.x, l *= y.y, u *= y.x, h *= y.y, f += O, l += S, m = L(p), p = U(m);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
return J({
|
|
59
59
|
width: u,
|
|
60
60
|
height: h,
|
|
61
|
-
x:
|
|
62
|
-
y:
|
|
61
|
+
x: f,
|
|
62
|
+
y: l
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
const
|
|
67
|
-
return e ? e.left +
|
|
65
|
+
function M(t, e) {
|
|
66
|
+
const o = I(t).scrollLeft;
|
|
67
|
+
return e ? e.left + o : T(R(t)).left + o;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
n
|
|
71
|
-
const i = t.getBoundingClientRect(), o = i.left + e.scrollLeft - (n ? 0 : (
|
|
72
|
-
// RTL <body> scrollbar.
|
|
73
|
-
k(t, i)
|
|
74
|
-
)), r = i.top + e.scrollTop;
|
|
69
|
+
function et(t, e) {
|
|
70
|
+
const o = t.getBoundingClientRect(), n = o.left + e.scrollLeft - M(t, o), i = o.top + e.scrollTop;
|
|
75
71
|
return {
|
|
76
|
-
x:
|
|
77
|
-
y:
|
|
72
|
+
x: n,
|
|
73
|
+
y: i
|
|
78
74
|
};
|
|
79
75
|
}
|
|
80
|
-
function
|
|
76
|
+
function ht(t) {
|
|
81
77
|
let {
|
|
82
78
|
elements: e,
|
|
83
|
-
rect:
|
|
84
|
-
offsetParent:
|
|
85
|
-
strategy:
|
|
79
|
+
rect: o,
|
|
80
|
+
offsetParent: n,
|
|
81
|
+
strategy: i
|
|
86
82
|
} = t;
|
|
87
|
-
const r =
|
|
88
|
-
if (
|
|
89
|
-
return
|
|
90
|
-
let
|
|
83
|
+
const r = i === "fixed", s = R(n), c = e ? _(e.floating) : !1;
|
|
84
|
+
if (n === s || c && r)
|
|
85
|
+
return o;
|
|
86
|
+
let f = {
|
|
91
87
|
scrollLeft: 0,
|
|
92
88
|
scrollTop: 0
|
|
93
|
-
},
|
|
94
|
-
const u =
|
|
95
|
-
if ((h || !h && !r) && ((
|
|
96
|
-
const a = T(
|
|
97
|
-
|
|
89
|
+
}, l = w(1);
|
|
90
|
+
const u = w(0), h = C(n);
|
|
91
|
+
if ((h || !h && !r) && (($(n) !== "body" || q(s)) && (f = I(n)), C(n))) {
|
|
92
|
+
const a = T(n);
|
|
93
|
+
l = F(n), u.x = a.x + n.clientLeft, u.y = a.y + n.clientTop;
|
|
98
94
|
}
|
|
99
|
-
const
|
|
95
|
+
const d = s && !h && !r ? et(s, f) : w(0);
|
|
100
96
|
return {
|
|
101
|
-
width:
|
|
102
|
-
height:
|
|
103
|
-
x:
|
|
104
|
-
y:
|
|
97
|
+
width: o.width * l.x,
|
|
98
|
+
height: o.height * l.y,
|
|
99
|
+
x: o.x * l.x - f.scrollLeft * l.x + u.x + d.x,
|
|
100
|
+
y: o.y * l.y - f.scrollTop * l.y + u.y + d.y
|
|
105
101
|
};
|
|
106
102
|
}
|
|
107
|
-
function
|
|
103
|
+
function at(t) {
|
|
108
104
|
return Array.from(t.getClientRects());
|
|
109
105
|
}
|
|
110
|
-
function
|
|
111
|
-
const e =
|
|
112
|
-
let s = -
|
|
113
|
-
const c = -
|
|
114
|
-
return
|
|
115
|
-
width:
|
|
106
|
+
function dt(t) {
|
|
107
|
+
const e = R(t), o = I(t), n = t.ownerDocument.body, i = E(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = E(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
108
|
+
let s = -o.scrollLeft + M(t);
|
|
109
|
+
const c = -o.scrollTop;
|
|
110
|
+
return b(n).direction === "rtl" && (s += E(e.clientWidth, n.clientWidth) - i), {
|
|
111
|
+
width: i,
|
|
116
112
|
height: r,
|
|
117
113
|
x: s,
|
|
118
114
|
y: c
|
|
119
115
|
};
|
|
120
116
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
const K = 25;
|
|
118
|
+
function gt(t, e) {
|
|
119
|
+
const o = L(t), n = R(t), i = o.visualViewport;
|
|
120
|
+
let r = n.clientWidth, s = n.clientHeight, c = 0, f = 0;
|
|
121
|
+
if (i) {
|
|
122
|
+
r = i.width, s = i.height;
|
|
123
|
+
const u = Q();
|
|
124
|
+
(!u || u && e === "fixed") && (c = i.offsetLeft, f = i.offsetTop);
|
|
128
125
|
}
|
|
126
|
+
const l = M(n);
|
|
127
|
+
if (l <= 0) {
|
|
128
|
+
const u = n.ownerDocument, h = u.body, d = getComputedStyle(h), a = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, m = Math.abs(n.clientWidth - h.clientWidth - a);
|
|
129
|
+
m <= K && (r -= m);
|
|
130
|
+
} else l <= K && (r += l);
|
|
129
131
|
return {
|
|
130
132
|
width: r,
|
|
131
133
|
height: s,
|
|
132
134
|
x: c,
|
|
133
|
-
y:
|
|
135
|
+
y: f
|
|
134
136
|
};
|
|
135
137
|
}
|
|
136
|
-
const
|
|
137
|
-
function
|
|
138
|
-
const
|
|
138
|
+
const pt = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
139
|
+
function mt(t, e) {
|
|
140
|
+
const o = T(t, !0, e === "fixed"), n = o.top + t.clientTop, i = o.left + t.clientLeft, r = C(t) ? F(t) : w(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, f = i * r.x, l = n * r.y;
|
|
139
141
|
return {
|
|
140
142
|
width: s,
|
|
141
143
|
height: c,
|
|
142
|
-
x:
|
|
143
|
-
y:
|
|
144
|
+
x: f,
|
|
145
|
+
y: l
|
|
144
146
|
};
|
|
145
147
|
}
|
|
146
|
-
function j(t, e,
|
|
147
|
-
let
|
|
148
|
+
function j(t, e, o) {
|
|
149
|
+
let n;
|
|
148
150
|
if (e === "viewport")
|
|
149
|
-
|
|
151
|
+
n = gt(t, o);
|
|
150
152
|
else if (e === "document")
|
|
151
|
-
|
|
153
|
+
n = dt(R(t));
|
|
152
154
|
else if (v(e))
|
|
153
|
-
|
|
155
|
+
n = mt(e, o);
|
|
154
156
|
else {
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
x: e.x -
|
|
158
|
-
y: e.y -
|
|
157
|
+
const i = tt(t);
|
|
158
|
+
n = {
|
|
159
|
+
x: e.x - i.x,
|
|
160
|
+
y: e.y - i.y,
|
|
159
161
|
width: e.width,
|
|
160
162
|
height: e.height
|
|
161
163
|
};
|
|
162
164
|
}
|
|
163
|
-
return J(
|
|
165
|
+
return J(n);
|
|
164
166
|
}
|
|
165
|
-
function
|
|
166
|
-
const
|
|
167
|
-
return
|
|
167
|
+
function nt(t, e) {
|
|
168
|
+
const o = W(t);
|
|
169
|
+
return o === e || !v(o) || H(o) ? !1 : b(o).position === "fixed" || nt(o, e);
|
|
168
170
|
}
|
|
169
|
-
function
|
|
170
|
-
const
|
|
171
|
-
if (
|
|
172
|
-
return
|
|
173
|
-
let
|
|
174
|
-
const r =
|
|
171
|
+
function yt(t, e) {
|
|
172
|
+
const o = e.get(t);
|
|
173
|
+
if (o)
|
|
174
|
+
return o;
|
|
175
|
+
let n = z(t, [], !1).filter((c) => v(c) && $(c) !== "body"), i = null;
|
|
176
|
+
const r = b(t).position === "fixed";
|
|
175
177
|
let s = r ? W(t) : t;
|
|
176
|
-
for (; v(s) && !
|
|
177
|
-
const c =
|
|
178
|
-
!
|
|
178
|
+
for (; v(s) && !H(s); ) {
|
|
179
|
+
const c = b(s), f = Y(s);
|
|
180
|
+
!f && c.position === "fixed" && (i = null), (r ? !f && !i : !f && c.position === "static" && !!i && pt.has(i.position) || q(s) && !f && nt(t, s)) ? n = n.filter((u) => u !== s) : i = c, s = W(s);
|
|
179
181
|
}
|
|
180
|
-
return e.set(t,
|
|
182
|
+
return e.set(t, n), n;
|
|
181
183
|
}
|
|
182
|
-
function
|
|
184
|
+
function wt(t) {
|
|
183
185
|
let {
|
|
184
186
|
element: e,
|
|
185
|
-
boundary:
|
|
186
|
-
rootBoundary:
|
|
187
|
-
strategy:
|
|
187
|
+
boundary: o,
|
|
188
|
+
rootBoundary: n,
|
|
189
|
+
strategy: i
|
|
188
190
|
} = t;
|
|
189
|
-
const s = [...
|
|
190
|
-
const h = j(e, u,
|
|
191
|
-
return
|
|
192
|
-
}, j(e, c,
|
|
191
|
+
const s = [...o === "clippingAncestors" ? _(e) ? [] : yt(e, this._c) : [].concat(o), n], c = s[0], f = s.reduce((l, u) => {
|
|
192
|
+
const h = j(e, u, i);
|
|
193
|
+
return l.top = E(h.top, l.top), l.right = V(h.right, l.right), l.bottom = V(h.bottom, l.bottom), l.left = E(h.left, l.left), l;
|
|
194
|
+
}, j(e, c, i));
|
|
193
195
|
return {
|
|
194
|
-
width:
|
|
195
|
-
height:
|
|
196
|
-
x:
|
|
197
|
-
y:
|
|
196
|
+
width: f.right - f.left,
|
|
197
|
+
height: f.bottom - f.top,
|
|
198
|
+
x: f.left,
|
|
199
|
+
y: f.top
|
|
198
200
|
};
|
|
199
201
|
}
|
|
200
202
|
function xt(t) {
|
|
201
203
|
const {
|
|
202
204
|
width: e,
|
|
203
|
-
height:
|
|
205
|
+
height: o
|
|
204
206
|
} = Z(t);
|
|
205
207
|
return {
|
|
206
208
|
width: e,
|
|
207
|
-
height:
|
|
209
|
+
height: o
|
|
208
210
|
};
|
|
209
211
|
}
|
|
210
|
-
function
|
|
211
|
-
const
|
|
212
|
+
function vt(t, e, o) {
|
|
213
|
+
const n = C(e), i = R(e), r = o === "fixed", s = T(t, !0, r, e);
|
|
212
214
|
let c = {
|
|
213
215
|
scrollLeft: 0,
|
|
214
216
|
scrollTop: 0
|
|
215
217
|
};
|
|
216
|
-
const
|
|
217
|
-
function
|
|
218
|
-
|
|
218
|
+
const f = w(0);
|
|
219
|
+
function l() {
|
|
220
|
+
f.x = M(i);
|
|
219
221
|
}
|
|
220
|
-
if (
|
|
221
|
-
if ((
|
|
222
|
+
if (n || !n && !r)
|
|
223
|
+
if (($(e) !== "body" || q(i)) && (c = I(e)), n) {
|
|
222
224
|
const a = T(e, !0, r, e);
|
|
223
|
-
|
|
224
|
-
} else
|
|
225
|
-
r && !
|
|
226
|
-
const u =
|
|
225
|
+
f.x = a.x + e.clientLeft, f.y = a.y + e.clientTop;
|
|
226
|
+
} else i && l();
|
|
227
|
+
r && !n && i && l();
|
|
228
|
+
const u = i && !n && !r ? et(i, c) : w(0), h = s.left + c.scrollLeft - f.x - u.x, d = s.top + c.scrollTop - f.y - u.y;
|
|
227
229
|
return {
|
|
228
230
|
x: h,
|
|
229
|
-
y:
|
|
231
|
+
y: d,
|
|
230
232
|
width: s.width,
|
|
231
233
|
height: s.height
|
|
232
234
|
};
|
|
233
235
|
}
|
|
234
|
-
function
|
|
235
|
-
return
|
|
236
|
+
function N(t) {
|
|
237
|
+
return b(t).position === "static";
|
|
236
238
|
}
|
|
237
239
|
function G(t, e) {
|
|
238
|
-
if (!
|
|
240
|
+
if (!C(t) || b(t).position === "fixed")
|
|
239
241
|
return null;
|
|
240
242
|
if (e)
|
|
241
243
|
return e(t);
|
|
242
|
-
let
|
|
243
|
-
return
|
|
244
|
+
let o = t.offsetParent;
|
|
245
|
+
return R(t) === o && (o = o.ownerDocument.body), o;
|
|
244
246
|
}
|
|
245
|
-
function
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
return
|
|
249
|
-
if (!
|
|
250
|
-
let
|
|
251
|
-
for (;
|
|
252
|
-
if (v(
|
|
253
|
-
return
|
|
254
|
-
|
|
247
|
+
function ot(t, e) {
|
|
248
|
+
const o = L(t);
|
|
249
|
+
if (_(t))
|
|
250
|
+
return o;
|
|
251
|
+
if (!C(t)) {
|
|
252
|
+
let i = W(t);
|
|
253
|
+
for (; i && !H(i); ) {
|
|
254
|
+
if (v(i) && !N(i))
|
|
255
|
+
return i;
|
|
256
|
+
i = W(i);
|
|
255
257
|
}
|
|
256
|
-
return
|
|
258
|
+
return o;
|
|
257
259
|
}
|
|
258
|
-
let
|
|
259
|
-
for (;
|
|
260
|
-
|
|
261
|
-
return
|
|
260
|
+
let n = G(t, e);
|
|
261
|
+
for (; n && ct(n) && N(n); )
|
|
262
|
+
n = G(n, e);
|
|
263
|
+
return n && H(n) && N(n) && !Y(n) ? o : n || lt(t) || o;
|
|
262
264
|
}
|
|
263
|
-
const
|
|
264
|
-
const e = this.getOffsetParent ||
|
|
265
|
+
const bt = async function(t) {
|
|
266
|
+
const e = this.getOffsetParent || ot, o = this.getDimensions, n = await o(t.floating);
|
|
265
267
|
return {
|
|
266
|
-
reference:
|
|
268
|
+
reference: vt(t.reference, await e(t.floating), t.strategy),
|
|
267
269
|
floating: {
|
|
268
270
|
x: 0,
|
|
269
271
|
y: 0,
|
|
270
|
-
width:
|
|
271
|
-
height:
|
|
272
|
+
width: n.width,
|
|
273
|
+
height: n.height
|
|
272
274
|
}
|
|
273
275
|
};
|
|
274
276
|
};
|
|
275
277
|
function Rt(t) {
|
|
276
|
-
return
|
|
278
|
+
return b(t).direction === "rtl";
|
|
277
279
|
}
|
|
278
|
-
const
|
|
279
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
280
|
-
getDocumentElement:
|
|
281
|
-
getClippingRect:
|
|
282
|
-
getOffsetParent:
|
|
283
|
-
getElementRects:
|
|
284
|
-
getClientRects:
|
|
280
|
+
const Ct = {
|
|
281
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ht,
|
|
282
|
+
getDocumentElement: R,
|
|
283
|
+
getClippingRect: wt,
|
|
284
|
+
getOffsetParent: ot,
|
|
285
|
+
getElementRects: bt,
|
|
286
|
+
getClientRects: at,
|
|
285
287
|
getDimensions: xt,
|
|
286
288
|
getScale: F,
|
|
287
289
|
isElement: v,
|
|
@@ -290,105 +292,105 @@ const Ot = {
|
|
|
290
292
|
function it(t, e) {
|
|
291
293
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
292
294
|
}
|
|
293
|
-
function
|
|
294
|
-
let
|
|
295
|
-
const
|
|
295
|
+
function Ot(t, e) {
|
|
296
|
+
let o = null, n;
|
|
297
|
+
const i = R(t);
|
|
296
298
|
function r() {
|
|
297
299
|
var c;
|
|
298
|
-
clearTimeout(
|
|
300
|
+
clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
|
|
299
301
|
}
|
|
300
|
-
function s(c,
|
|
301
|
-
c === void 0 && (c = !1),
|
|
302
|
-
const
|
|
302
|
+
function s(c, f) {
|
|
303
|
+
c === void 0 && (c = !1), f === void 0 && (f = 1), r();
|
|
304
|
+
const l = t.getBoundingClientRect(), {
|
|
303
305
|
left: u,
|
|
304
306
|
top: h,
|
|
305
|
-
width:
|
|
307
|
+
width: d,
|
|
306
308
|
height: a
|
|
307
|
-
} =
|
|
308
|
-
if (c || e(), !
|
|
309
|
+
} = l;
|
|
310
|
+
if (c || e(), !d || !a)
|
|
309
311
|
return;
|
|
310
|
-
const
|
|
311
|
-
rootMargin: -
|
|
312
|
-
threshold: E(0,
|
|
312
|
+
const m = A(h), p = A(i.clientWidth - (u + d)), y = A(i.clientHeight - (h + a)), g = A(u), O = {
|
|
313
|
+
rootMargin: -m + "px " + -p + "px " + -y + "px " + -g + "px",
|
|
314
|
+
threshold: E(0, V(1, f)) || 1
|
|
313
315
|
};
|
|
314
|
-
let
|
|
315
|
-
function P
|
|
316
|
-
const
|
|
317
|
-
if (
|
|
318
|
-
if (!
|
|
316
|
+
let S = !0;
|
|
317
|
+
function k(P) {
|
|
318
|
+
const B = P[0].intersectionRatio;
|
|
319
|
+
if (B !== f) {
|
|
320
|
+
if (!S)
|
|
319
321
|
return s();
|
|
320
|
-
|
|
322
|
+
B ? s(!1, B) : n = setTimeout(() => {
|
|
321
323
|
s(!1, 1e-7);
|
|
322
324
|
}, 1e3);
|
|
323
325
|
}
|
|
324
|
-
|
|
326
|
+
B === 1 && !it(l, t.getBoundingClientRect()) && s(), S = !1;
|
|
325
327
|
}
|
|
326
328
|
try {
|
|
327
|
-
|
|
328
|
-
...
|
|
329
|
+
o = new IntersectionObserver(k, {
|
|
330
|
+
...O,
|
|
329
331
|
// Handle <iframe>s
|
|
330
|
-
root:
|
|
332
|
+
root: i.ownerDocument
|
|
331
333
|
});
|
|
332
334
|
} catch {
|
|
333
|
-
|
|
335
|
+
o = new IntersectionObserver(k, O);
|
|
334
336
|
}
|
|
335
|
-
|
|
337
|
+
o.observe(t);
|
|
336
338
|
}
|
|
337
339
|
return s(!0), r;
|
|
338
340
|
}
|
|
339
|
-
function
|
|
340
|
-
|
|
341
|
+
function Ft(t, e, o, n) {
|
|
342
|
+
n === void 0 && (n = {});
|
|
341
343
|
const {
|
|
342
|
-
ancestorScroll:
|
|
344
|
+
ancestorScroll: i = !0,
|
|
343
345
|
ancestorResize: r = !0,
|
|
344
346
|
elementResize: s = typeof ResizeObserver == "function",
|
|
345
347
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
346
|
-
animationFrame:
|
|
347
|
-
} =
|
|
348
|
-
u.forEach((
|
|
349
|
-
|
|
348
|
+
animationFrame: f = !1
|
|
349
|
+
} = n, l = X(t), u = i || r ? [...l ? z(l) : [], ...z(e)] : [];
|
|
350
|
+
u.forEach((g) => {
|
|
351
|
+
i && g.addEventListener("scroll", o, {
|
|
350
352
|
passive: !0
|
|
351
|
-
}), r &&
|
|
353
|
+
}), r && g.addEventListener("resize", o);
|
|
352
354
|
});
|
|
353
|
-
const h =
|
|
354
|
-
let
|
|
355
|
-
s && (a = new ResizeObserver((
|
|
356
|
-
let [
|
|
357
|
-
|
|
358
|
-
var
|
|
359
|
-
(
|
|
360
|
-
})),
|
|
361
|
-
}),
|
|
362
|
-
let
|
|
363
|
-
|
|
364
|
-
function
|
|
365
|
-
const
|
|
366
|
-
|
|
355
|
+
const h = l && c ? Ot(l, o) : null;
|
|
356
|
+
let d = -1, a = null;
|
|
357
|
+
s && (a = new ResizeObserver((g) => {
|
|
358
|
+
let [x] = g;
|
|
359
|
+
x && x.target === l && a && (a.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
360
|
+
var O;
|
|
361
|
+
(O = a) == null || O.observe(e);
|
|
362
|
+
})), o();
|
|
363
|
+
}), l && !f && a.observe(l), a.observe(e));
|
|
364
|
+
let m, p = f ? T(t) : null;
|
|
365
|
+
f && y();
|
|
366
|
+
function y() {
|
|
367
|
+
const g = T(t);
|
|
368
|
+
p && !it(p, g) && o(), p = g, m = requestAnimationFrame(y);
|
|
367
369
|
}
|
|
368
|
-
return
|
|
369
|
-
var
|
|
370
|
-
u.forEach((
|
|
371
|
-
|
|
372
|
-
}), h?.(), (
|
|
370
|
+
return o(), () => {
|
|
371
|
+
var g;
|
|
372
|
+
u.forEach((x) => {
|
|
373
|
+
i && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
|
|
374
|
+
}), h?.(), (g = a) == null || g.disconnect(), a = null, f && cancelAnimationFrame(m);
|
|
373
375
|
};
|
|
374
376
|
}
|
|
375
|
-
const
|
|
376
|
-
const
|
|
377
|
-
platform:
|
|
378
|
-
...
|
|
377
|
+
const Wt = rt, St = (t, e, o) => {
|
|
378
|
+
const n = /* @__PURE__ */ new Map(), i = {
|
|
379
|
+
platform: Ct,
|
|
380
|
+
...o
|
|
379
381
|
}, r = {
|
|
380
|
-
...
|
|
381
|
-
_c:
|
|
382
|
+
...i.platform,
|
|
383
|
+
_c: n
|
|
382
384
|
};
|
|
383
|
-
return
|
|
384
|
-
...
|
|
385
|
+
return st(t, e, {
|
|
386
|
+
...i,
|
|
385
387
|
platform: r
|
|
386
388
|
});
|
|
387
389
|
};
|
|
388
390
|
export {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
391
|
+
Ft as autoUpdate,
|
|
392
|
+
St as computePosition,
|
|
393
|
+
Wt as flip,
|
|
394
|
+
z as getOverflowAncestors,
|
|
395
|
+
Ct as platform
|
|
394
396
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caspeco/casper-ui-library",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"prettier": "@caspeco/prettier-config",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -25,23 +25,23 @@
|
|
|
25
25
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
26
26
|
"@caspeco/eslint-config": "^4.0.5",
|
|
27
27
|
"@caspeco/prettier-config": "^1.0.6",
|
|
28
|
-
"@eslint/js": "^9.
|
|
29
|
-
"@testing-library/jest-dom": "^6.
|
|
28
|
+
"@eslint/js": "^9.34.0",
|
|
29
|
+
"@testing-library/jest-dom": "^6.8.0",
|
|
30
30
|
"@testing-library/react": "^16.3.0",
|
|
31
31
|
"@types/jest": "^30.0.0",
|
|
32
32
|
"@types/node": "^24.3.0",
|
|
33
33
|
"@types/react": "^18.3.12",
|
|
34
34
|
"@types/react-dom": "^18.3.1",
|
|
35
|
-
"@vitejs/plugin-react-swc": "^4.0.
|
|
36
|
-
"eslint": "^9.
|
|
35
|
+
"@vitejs/plugin-react-swc": "^4.0.1",
|
|
36
|
+
"eslint": "^9.34.0",
|
|
37
37
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
38
38
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
39
39
|
"globals": "^16.3.0",
|
|
40
40
|
"jsdom": "^26.1.0",
|
|
41
41
|
"tsc-alias": "^1.8.16",
|
|
42
42
|
"typescript": "~5.9.2",
|
|
43
|
-
"typescript-eslint": "^8.
|
|
44
|
-
"vite": "^7.1.
|
|
43
|
+
"typescript-eslint": "^8.40.0",
|
|
44
|
+
"vite": "^7.1.3",
|
|
45
45
|
"vite-plugin-dts": "^4.5.4",
|
|
46
46
|
"vite-tsconfig-paths": "^5.1.4",
|
|
47
47
|
"vitest": "^3.2.4"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@chakra-ui/anatomy": "^2.3.4",
|
|
57
|
-
"@floating-ui/dom": "^1.7.
|
|
57
|
+
"@floating-ui/dom": "^1.7.4",
|
|
58
58
|
"@tanstack/react-table": "^8.21.3",
|
|
59
59
|
"csstype": "^3.1.3",
|
|
60
60
|
"date-fns": "^4.1.0"
|