@caspeco/casper-ui-library 8.0.2 → 8.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/README.md +25 -1
- package/dist/components/accordion/accordion.visual.test.d.ts +2 -0
- package/dist/components/accordion/accordion.visual.test.d.ts.map +1 -0
- package/dist/components/alert/alert.visual.test.d.ts +2 -0
- package/dist/components/alert/alert.visual.test.d.ts.map +1 -0
- package/dist/components/badge/badge.visual.test.d.ts +2 -0
- package/dist/components/badge/badge.visual.test.d.ts.map +1 -0
- package/dist/components/box/box.visual.test.d.ts +2 -0
- package/dist/components/box/box.visual.test.d.ts.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.visual.test.d.ts +2 -0
- package/dist/components/breadcrumbs/breadcrumbs.visual.test.d.ts.map +1 -0
- package/dist/components/button/button.visual.test.d.ts +2 -0
- package/dist/components/button/button.visual.test.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.visual.test.d.ts +2 -0
- package/dist/components/checkbox/checkbox.visual.test.d.ts.map +1 -0
- package/dist/components/checkbox-group/checkbox-group.visual.test.d.ts +2 -0
- package/dist/components/checkbox-group/checkbox-group.visual.test.d.ts.map +1 -0
- package/dist/components/combobox/combobox-item.d.ts +2 -1
- package/dist/components/combobox/combobox-item.d.ts.map +1 -1
- package/dist/components/combobox/combobox-item.js +12 -11
- package/dist/components/combobox/combobox-menu.d.ts +1 -1
- package/dist/components/combobox/combobox-menu.d.ts.map +1 -1
- package/dist/components/combobox/combobox-menu.js +250 -169
- package/dist/components/combobox/combobox.composition.d.ts +1 -0
- package/dist/components/combobox/combobox.composition.d.ts.map +1 -1
- package/dist/components/combobox/combobox.d.ts +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +187 -148
- package/dist/components/combobox/combobox.visual.test.d.ts +2 -0
- package/dist/components/combobox/combobox.visual.test.d.ts.map +1 -0
- package/dist/components/combobox/types.d.ts +41 -0
- package/dist/components/combobox/types.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.composition.d.ts +6 -2
- package/dist/components/date-picker/date-picker.composition.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.visual.test.d.ts +2 -0
- package/dist/components/date-picker/date-picker.visual.test.d.ts.map +1 -0
- package/dist/components/divider/divider.visual.test.d.ts +2 -0
- package/dist/components/divider/divider.visual.test.d.ts.map +1 -0
- package/dist/components/drawer/drawer.composition.d.ts +0 -1
- package/dist/components/drawer/drawer.composition.d.ts.map +1 -1
- package/dist/components/drawer/drawer.visual.test.d.ts +2 -0
- package/dist/components/drawer/drawer.visual.test.d.ts.map +1 -0
- package/dist/components/flex/flex.visual.test.d.ts +2 -0
- package/dist/components/flex/flex.visual.test.d.ts.map +1 -0
- package/dist/components/form-control/form-control.visual.test.d.ts +2 -0
- package/dist/components/form-control/form-control.visual.test.d.ts.map +1 -0
- package/dist/components/grid/grid.composition.d.ts +3 -0
- package/dist/components/grid/grid.composition.d.ts.map +1 -0
- package/dist/components/grid/grid.visual.test.d.ts +2 -0
- package/dist/components/grid/grid.visual.test.d.ts.map +1 -0
- package/dist/components/heading/heading.visual.test.d.ts +2 -0
- package/dist/components/heading/heading.visual.test.d.ts.map +1 -0
- package/dist/components/highlight/highlight.composition.d.ts +3 -0
- package/dist/components/highlight/highlight.composition.d.ts.map +1 -0
- package/dist/components/highlight/highlight.d.ts +5 -0
- package/dist/components/highlight/highlight.d.ts.map +1 -1
- package/dist/components/highlight/highlight.visual.test.d.ts +2 -0
- package/dist/components/highlight/highlight.visual.test.d.ts.map +1 -0
- package/dist/components/icon/icon.composition.d.ts +1 -1
- package/dist/components/icon/icon.composition.d.ts.map +1 -1
- package/dist/components/icon/icon.visual.test.d.ts +2 -0
- package/dist/components/icon/icon.visual.test.d.ts.map +1 -0
- package/dist/components/icon-button/icon-button.d.ts +1 -1
- package/dist/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.visual.test.d.ts +2 -0
- package/dist/components/icon-button/icon-button.visual.test.d.ts.map +1 -0
- package/dist/components/icon-button/types.d.ts +2 -2
- package/dist/components/icon-button/types.d.ts.map +1 -1
- package/dist/components/image/image.composition.d.ts.map +1 -1
- package/dist/components/image/image.visual.test.d.ts +2 -0
- package/dist/components/image/image.visual.test.d.ts.map +1 -0
- package/dist/components/image-upload/image-upload.composition.d.ts.map +1 -1
- package/dist/components/image-upload/image-upload.visual.test.d.ts +2 -0
- package/dist/components/image-upload/image-upload.visual.test.d.ts.map +1 -0
- package/dist/components/input/input.visual.test.d.ts +2 -0
- package/dist/components/input/input.visual.test.d.ts.map +1 -0
- package/dist/components/link/link.visual.test.d.ts +2 -0
- package/dist/components/link/link.visual.test.d.ts.map +1 -0
- package/dist/components/list/list.visual.test.d.ts +2 -0
- package/dist/components/list/list.visual.test.d.ts.map +1 -0
- package/dist/components/menu/menu.visual.test.d.ts +2 -0
- package/dist/components/menu/menu.visual.test.d.ts.map +1 -0
- package/dist/components/message/message.visual.test.d.ts +2 -0
- package/dist/components/message/message.visual.test.d.ts.map +1 -0
- package/dist/components/modal/modal.composition.d.ts.map +1 -1
- package/dist/components/modal/modal.visual.test.d.ts +2 -0
- package/dist/components/modal/modal.visual.test.d.ts.map +1 -0
- package/dist/components/navigation-list/navigation-list.visual.test.d.ts +2 -0
- package/dist/components/navigation-list/navigation-list.visual.test.d.ts.map +1 -0
- package/dist/components/paginator/paginator.visual.test.d.ts +2 -0
- package/dist/components/paginator/paginator.visual.test.d.ts.map +1 -0
- package/dist/components/quantity-button/quantity-button.composition.d.ts.map +1 -1
- package/dist/components/quantity-button/quantity-button.visual.test.d.ts +2 -0
- package/dist/components/quantity-button/quantity-button.visual.test.d.ts.map +1 -0
- package/dist/components/radio/radio.visual.test.d.ts +2 -0
- package/dist/components/radio/radio.visual.test.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group.visual.test.d.ts +2 -0
- package/dist/components/radio-group/radio-group.visual.test.d.ts.map +1 -0
- package/dist/components/segmented-control/segmented-control.visual.test.d.ts +2 -0
- package/dist/components/segmented-control/segmented-control.visual.test.d.ts.map +1 -0
- package/dist/components/select/select.visual.test.d.ts +2 -0
- package/dist/components/select/select.visual.test.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.visual.test.d.ts +2 -0
- package/dist/components/skeleton/skeleton.visual.test.d.ts.map +1 -0
- package/dist/components/stack/stack.visual.test.d.ts +2 -0
- package/dist/components/stack/stack.visual.test.d.ts.map +1 -0
- package/dist/components/stepper/stepper.visual.test.d.ts +2 -0
- package/dist/components/stepper/stepper.visual.test.d.ts.map +1 -0
- package/dist/components/switch/switch.visual.test.d.ts +2 -0
- package/dist/components/switch/switch.visual.test.d.ts.map +1 -0
- package/dist/components/table/table.visual.test.d.ts +2 -0
- package/dist/components/table/table.visual.test.d.ts.map +1 -0
- package/dist/components/tabs/tabs.composition.d.ts.map +1 -1
- package/dist/components/tabs/tabs.visual.test.d.ts +2 -0
- package/dist/components/tabs/tabs.visual.test.d.ts.map +1 -0
- package/dist/components/tag/tag.visual.test.d.ts +2 -0
- package/dist/components/tag/tag.visual.test.d.ts.map +1 -0
- package/dist/components/text/text.visual.test.d.ts +2 -0
- package/dist/components/text/text.visual.test.d.ts.map +1 -0
- package/dist/components/textarea/textarea.visual.test.d.ts +2 -0
- package/dist/components/textarea/textarea.visual.test.d.ts.map +1 -0
- package/dist/components/toast/toast.visual.test.d.ts +2 -0
- package/dist/components/toast/toast.visual.test.d.ts.map +1 -0
- package/dist/components/toggle-button/toggle-button.visual.test.d.ts +2 -0
- package/dist/components/toggle-button/toggle-button.visual.test.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.composition.d.ts +4 -1
- package/dist/components/tooltip/tooltip.composition.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.visual.test.d.ts +2 -0
- package/dist/components/tooltip/tooltip.visual.test.d.ts.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +123 -120
- package/dist/test-utils/create-visual-tests.d.ts +21 -0
- package/dist/test-utils/create-visual-tests.d.ts.map +1 -0
- package/dist/test-utils/render-for-visual-test.d.ts +8 -0
- package/dist/test-utils/render-for-visual-test.d.ts.map +1 -0
- package/package.json +16 -8
|
@@ -6,4 +6,5 @@ export declare const Sizes: () => import("react/jsx-runtime").JSX.Element;
|
|
|
6
6
|
export declare const GhostVariant: () => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const WithItemsAsPlainText: () => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export declare const WithFooterContent: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const WithFolderStyleStacked: () => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
//# sourceMappingURL=combobox.composition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox.composition.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"combobox.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox.composition.tsx"],"names":[],"mappings":"AAqOA,eAAO,MAAM,YAAY,+CAoBxB,CAAC;AAEF,eAAO,MAAM,WAAW,+CAmBvB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAiDpB,CAAC;AAEF,eAAO,MAAM,OAAO,+CAoBnB,CAAC;AAEF,eAAO,MAAM,KAAK,+CAyEjB,CAAC;AAEF,eAAO,MAAM,YAAY,+CAoBxB,CAAC;AAEF,eAAO,MAAM,oBAAoB,+CAyBhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,+CAyB7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,+CA8BlC,CAAC"}
|
|
@@ -6,5 +6,5 @@ import { ComboboxProps } from './types.js';
|
|
|
6
6
|
*
|
|
7
7
|
* @see Docs https://caspeco.github.io/casper-ui-library/components/combobox
|
|
8
8
|
*/
|
|
9
|
-
export declare function Combobox({ id, label, isSingleSelect, selectedItems, locale, size, variant, asPlainText, onSearch, items, maxVisibleItems, onChange, onBlur, isDisabled, isReadOnly, isRequired, placeholder, isInvalid, footerContent, popoverWidth, popoverPlacement, collapsed, ...props }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function Combobox({ id, label, isSingleSelect, selectedItems, locale, size, variant, asPlainText, onSearch, items, maxVisibleItems, onChange, onBlur, isDisabled, isReadOnly, isRequired, placeholder, isInvalid, footerContent, popoverWidth, popoverPlacement, collapsed, folderStyle, parentSelectsChildren, ...props }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAIX,aAAa,EAKb,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAIX,aAAa,EAKb,MAAM,SAAS,CAAC;AAsGjB;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EACxB,EAAE,EACF,KAAU,EACV,cAAsB,EACtB,aAAkB,EAClB,MAAgB,EAChB,IAAW,EACX,OAAmB,EACnB,WAAmB,EACnB,QAAQ,EACR,KAAK,EACL,eAAe,EACf,QAAQ,EACR,MAAM,EACN,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,SAAiB,EACjB,WAAuB,EACvB,qBAAqB,EACrB,GAAG,KAAK,EACR,EAAE,aAAa,2CAgTf"}
|
|
@@ -1,185 +1,224 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Box as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { ComboboxButton as
|
|
5
|
-
import { ComboboxMenu as
|
|
6
|
-
import { translations as
|
|
7
|
-
const
|
|
8
|
-
const [
|
|
9
|
-
if (!
|
|
10
|
-
const
|
|
11
|
-
|
|
1
|
+
import { jsxs as ue, jsx as K } from "react/jsx-runtime";
|
|
2
|
+
import { Box as de } from "@chakra-ui/react";
|
|
3
|
+
import { useState as x, useRef as Q, useEffect as N, useMemo as X } from "react";
|
|
4
|
+
import { ComboboxButton as fe } from "./combobox-button.js";
|
|
5
|
+
import { ComboboxMenu as ge } from "./combobox-menu.js";
|
|
6
|
+
import { translations as pe } from "./translations.js";
|
|
7
|
+
const be = (s, h) => {
|
|
8
|
+
const [t, n] = x(0), u = (i) => {
|
|
9
|
+
if (!h.current) return;
|
|
10
|
+
const S = [...h.current.querySelectorAll("li")];
|
|
11
|
+
S[i] && (S[i]?.scrollIntoView({
|
|
12
12
|
behavior: "smooth",
|
|
13
13
|
block: "nearest"
|
|
14
|
-
}),
|
|
14
|
+
}), n(i));
|
|
15
15
|
};
|
|
16
16
|
return {
|
|
17
|
-
index:
|
|
18
|
-
set:
|
|
19
|
-
next: () =>
|
|
20
|
-
previous: () =>
|
|
17
|
+
index: t,
|
|
18
|
+
set: u,
|
|
19
|
+
next: () => u((t + 1) % s.length),
|
|
20
|
+
previous: () => u((t - 1 + s.length) % s.length)
|
|
21
21
|
};
|
|
22
|
-
},
|
|
23
|
-
const [
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
|
|
22
|
+
}, Se = (s, h, t, n, u) => {
|
|
23
|
+
const [c, d] = x(!1);
|
|
24
|
+
return N(() => {
|
|
25
|
+
n && d(!1);
|
|
26
|
+
}, [n, d]), { isOpen: c, close: () => {
|
|
27
|
+
h || (t(""), u?.("")), d(!1);
|
|
28
28
|
}, open: () => {
|
|
29
|
-
|
|
29
|
+
c || n || (d(!0), s.set(0));
|
|
30
30
|
} };
|
|
31
|
-
},
|
|
32
|
-
const [
|
|
33
|
-
if (!
|
|
34
|
-
const
|
|
31
|
+
}, Ce = (s, h) => {
|
|
32
|
+
const [t, n] = x([]), u = X(() => {
|
|
33
|
+
if (!t.length) return s;
|
|
34
|
+
const c = t[t.length - 1], d = {
|
|
35
35
|
id: "_back",
|
|
36
|
-
label:
|
|
37
|
-
},
|
|
38
|
-
return
|
|
39
|
-
}, [
|
|
36
|
+
label: h.back
|
|
37
|
+
}, i = t[t.length - 1]?.children || [];
|
|
38
|
+
return c?.isSelectableParent ? [d, c, ...i] : [d, ...i];
|
|
39
|
+
}, [t, s, h]);
|
|
40
40
|
return {
|
|
41
|
-
open: (
|
|
42
|
-
|
|
41
|
+
open: (c) => {
|
|
42
|
+
n((d) => [...d, c]);
|
|
43
43
|
},
|
|
44
44
|
back: () => {
|
|
45
|
-
|
|
45
|
+
t.length && n((c) => [...c.slice(0, t.length - 1)]);
|
|
46
46
|
},
|
|
47
|
-
opened:
|
|
48
|
-
current:
|
|
47
|
+
opened: t,
|
|
48
|
+
current: u
|
|
49
49
|
};
|
|
50
|
-
},
|
|
51
|
-
const
|
|
52
|
-
function n
|
|
53
|
-
|
|
50
|
+
}, xe = (s) => X(() => {
|
|
51
|
+
const h = {};
|
|
52
|
+
function t(n, u) {
|
|
53
|
+
h[n.id] = [...u], n.children && n.children.forEach((c) => t(c, [...u, n.label]));
|
|
54
54
|
}
|
|
55
|
-
return
|
|
56
|
-
}, [
|
|
57
|
-
function
|
|
58
|
-
id:
|
|
59
|
-
label:
|
|
60
|
-
isSingleSelect:
|
|
61
|
-
selectedItems:
|
|
62
|
-
locale:
|
|
63
|
-
size:
|
|
64
|
-
variant:
|
|
65
|
-
asPlainText:
|
|
66
|
-
onSearch:
|
|
67
|
-
items:
|
|
68
|
-
maxVisibleItems:
|
|
69
|
-
onChange:
|
|
70
|
-
onBlur:
|
|
71
|
-
isDisabled:
|
|
72
|
-
isReadOnly:
|
|
73
|
-
isRequired:
|
|
74
|
-
placeholder:
|
|
75
|
-
isInvalid:
|
|
76
|
-
footerContent:
|
|
77
|
-
popoverWidth:
|
|
78
|
-
popoverPlacement:
|
|
79
|
-
collapsed:
|
|
80
|
-
|
|
55
|
+
return s.forEach((n) => t(n, [])), h;
|
|
56
|
+
}, [s]);
|
|
57
|
+
function Ee({
|
|
58
|
+
id: s,
|
|
59
|
+
label: h = "",
|
|
60
|
+
isSingleSelect: t = !1,
|
|
61
|
+
selectedItems: n = [],
|
|
62
|
+
locale: u = "en-US",
|
|
63
|
+
size: c = "md",
|
|
64
|
+
variant: d = "outline",
|
|
65
|
+
asPlainText: i = !1,
|
|
66
|
+
onSearch: S,
|
|
67
|
+
items: w,
|
|
68
|
+
maxVisibleItems: V,
|
|
69
|
+
onChange: j,
|
|
70
|
+
onBlur: F,
|
|
71
|
+
isDisabled: H,
|
|
72
|
+
isReadOnly: P,
|
|
73
|
+
isRequired: Y,
|
|
74
|
+
placeholder: Z,
|
|
75
|
+
isInvalid: _,
|
|
76
|
+
footerContent: $,
|
|
77
|
+
popoverWidth: T,
|
|
78
|
+
popoverPlacement: y,
|
|
79
|
+
collapsed: D = !1,
|
|
80
|
+
folderStyle: k = "grouped",
|
|
81
|
+
parentSelectsChildren: G,
|
|
82
|
+
...m
|
|
81
83
|
}) {
|
|
82
|
-
const [
|
|
83
|
-
let
|
|
84
|
-
if (
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
const [v, I] = x(""), [ee, R] = x(!1), O = pe[u], L = Q(null), M = Q(null), C = Ce(w, O), ne = v.toLowerCase() === n[0]?.label.toLowerCase(), E = v.length > 0 && !(i && ne), te = k === "stacked";
|
|
85
|
+
let p = C.current;
|
|
86
|
+
if (E) {
|
|
87
|
+
const e = [], r = v.toLowerCase();
|
|
88
|
+
if (k === "stacked") {
|
|
89
|
+
const l = (a) => a.map((f) => {
|
|
90
|
+
const B = f.label.toLowerCase().includes(r), o = f.children && f.children.length > 0;
|
|
91
|
+
if (B)
|
|
92
|
+
return f;
|
|
93
|
+
if (o) {
|
|
94
|
+
const b = l(f.children);
|
|
95
|
+
if (b.length > 0) {
|
|
96
|
+
const J = { ...f };
|
|
97
|
+
return J.children = b, J;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}).filter(Boolean);
|
|
101
|
+
p = l(w);
|
|
102
|
+
} else {
|
|
103
|
+
const l = (a) => {
|
|
104
|
+
e.push(a), a.children && a.children.forEach(l);
|
|
105
|
+
};
|
|
106
|
+
w.forEach(l), p = e.filter((a) => {
|
|
107
|
+
const f = a.label.toLowerCase().includes(v.toLowerCase());
|
|
108
|
+
return (!(a.children && a.children.length > 0) || a.isSelectableParent) && f;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
92
111
|
}
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}, [
|
|
97
|
-
const [
|
|
98
|
-
|
|
99
|
-
!
|
|
100
|
-
}, [
|
|
101
|
-
...
|
|
102
|
-
...
|
|
112
|
+
const q = be(p, M), g = Se(q, i, I, H, S);
|
|
113
|
+
N(() => {
|
|
114
|
+
i && !g.isOpen && I(n[0]?.label || "");
|
|
115
|
+
}, [g.isOpen, n, i]);
|
|
116
|
+
const [A, re] = x([]);
|
|
117
|
+
N(() => {
|
|
118
|
+
!g.isOpen || t || k === "stacked" || re(n);
|
|
119
|
+
}, [g.isOpen]), E || (p = [
|
|
120
|
+
...A,
|
|
121
|
+
...p.filter((e) => !A.find((r) => r.label === e.label))
|
|
103
122
|
]);
|
|
104
|
-
let
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
d.back();
|
|
123
|
+
let U = !1;
|
|
124
|
+
P ? p = n : (U = p.length > (V ?? 1 / 0), p = p.slice(0, V));
|
|
125
|
+
const oe = xe(w), le = (e) => {
|
|
126
|
+
const r = C.opened.length > 0 && C.opened[C.opened.length - 1]?.id === e.id, l = e.children && e.children.length > 0;
|
|
127
|
+
if (!E && !r && l) {
|
|
128
|
+
C.open(e), requestAnimationFrame(() => q.set(1));
|
|
111
129
|
return;
|
|
112
130
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
131
|
+
return t ? [e] : W(e);
|
|
132
|
+
}, se = (e) => {
|
|
133
|
+
const r = e.children && e.children.length > 0;
|
|
134
|
+
if (!(r && !e.isSelectableParent && (t || !G)))
|
|
135
|
+
return t ? [e] : r ? ce(e) : W(e);
|
|
136
|
+
}, W = (e) => n.some((l) => l.id === e.id) ? n.filter((l) => l.id !== e.id) : [...n, e];
|
|
137
|
+
function ce(e) {
|
|
138
|
+
let r;
|
|
139
|
+
const l = [], a = (o) => {
|
|
140
|
+
o.children && o.children.length > 0 ? (o.isSelectableParent && l.push(o), o.children.forEach(a)) : l.push(o);
|
|
141
|
+
};
|
|
142
|
+
a(e);
|
|
143
|
+
const f = n.filter(
|
|
144
|
+
(o) => l.some((b) => b.id === o.id)
|
|
145
|
+
);
|
|
146
|
+
return f.length > 0 && (!e.isSelectableParent || f.some((o) => o.id === e.id)) ? r = n.filter((o) => !f.some((b) => b.id === o.id)) : r = [...n, ...l.filter((o) => !n.some((b) => b.id === o.id))], r;
|
|
147
|
+
}
|
|
148
|
+
const ie = (e) => {
|
|
149
|
+
if (!e || P || H)
|
|
150
|
+
return;
|
|
151
|
+
if (M.current?.parentNode?.querySelector("input")?.focus(), e.id === "_back") {
|
|
152
|
+
C.back();
|
|
116
153
|
return;
|
|
117
154
|
}
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
},
|
|
123
|
-
id:
|
|
124
|
-
asPlainText:
|
|
125
|
-
inputValue:
|
|
126
|
-
selectedItems:
|
|
127
|
-
displayItems:
|
|
128
|
-
toggleItem:
|
|
129
|
-
highlightState:
|
|
130
|
-
openState:
|
|
131
|
-
parentStrings:
|
|
155
|
+
let r;
|
|
156
|
+
k === "grouped" ? r = le(e) : r = se(e), r && (i ? I(r[0]?.label ?? "") : te || (I(""), S?.("")), t && (r.length === 0 ? g.open() : g.close()), j && j(r));
|
|
157
|
+
}, ae = n.length === 0 ? Z ?? O.search : void 0, he = (e) => {
|
|
158
|
+
L.current?.contains(e.relatedTarget) || (g.close(), R(!1), F && F(n));
|
|
159
|
+
}, z = {
|
|
160
|
+
id: s,
|
|
161
|
+
asPlainText: i,
|
|
162
|
+
inputValue: v,
|
|
163
|
+
selectedItems: n,
|
|
164
|
+
displayItems: p,
|
|
165
|
+
toggleItem: ie,
|
|
166
|
+
highlightState: q,
|
|
167
|
+
openState: g,
|
|
168
|
+
parentStrings: oe,
|
|
132
169
|
// Button
|
|
133
|
-
size:
|
|
134
|
-
variant:
|
|
135
|
-
label:
|
|
136
|
-
placeHolderText:
|
|
137
|
-
isDisabled:
|
|
138
|
-
isReadOnly:
|
|
139
|
-
isInvalid:
|
|
140
|
-
collapsed:
|
|
141
|
-
hasPendingDelete:
|
|
142
|
-
setHasPendingDelete:
|
|
143
|
-
setInputValue:
|
|
144
|
-
onSearch:
|
|
170
|
+
size: c,
|
|
171
|
+
variant: d,
|
|
172
|
+
label: h,
|
|
173
|
+
placeHolderText: ae,
|
|
174
|
+
isDisabled: H,
|
|
175
|
+
isReadOnly: P,
|
|
176
|
+
isInvalid: _,
|
|
177
|
+
collapsed: D,
|
|
178
|
+
hasPendingDelete: ee,
|
|
179
|
+
setHasPendingDelete: R,
|
|
180
|
+
setInputValue: I,
|
|
181
|
+
onSearch: S,
|
|
145
182
|
// Menu
|
|
146
|
-
isSingleSelect:
|
|
147
|
-
isSearching:
|
|
148
|
-
isHidingItems:
|
|
149
|
-
popoverWidth:
|
|
150
|
-
popoverPlacement:
|
|
151
|
-
previousSelectedItems:
|
|
152
|
-
parentRef:
|
|
153
|
-
popupRef:
|
|
154
|
-
footerContent:
|
|
155
|
-
subMenuState:
|
|
156
|
-
translation:
|
|
183
|
+
isSingleSelect: t,
|
|
184
|
+
isSearching: E,
|
|
185
|
+
isHidingItems: U,
|
|
186
|
+
popoverWidth: T,
|
|
187
|
+
popoverPlacement: y,
|
|
188
|
+
previousSelectedItems: A,
|
|
189
|
+
parentRef: L,
|
|
190
|
+
popupRef: M,
|
|
191
|
+
footerContent: $,
|
|
192
|
+
subMenuState: C,
|
|
193
|
+
translation: O,
|
|
194
|
+
folderStyle: k,
|
|
195
|
+
parentSelectsChildren: G
|
|
157
196
|
};
|
|
158
|
-
return /* @__PURE__ */
|
|
159
|
-
|
|
197
|
+
return /* @__PURE__ */ ue(
|
|
198
|
+
de,
|
|
160
199
|
{
|
|
161
200
|
role: "combobox",
|
|
162
201
|
as: "label",
|
|
163
|
-
htmlFor:
|
|
202
|
+
htmlFor: s,
|
|
164
203
|
className: "combobox",
|
|
165
|
-
ref:
|
|
166
|
-
onClick:
|
|
167
|
-
onBlur:
|
|
204
|
+
ref: L,
|
|
205
|
+
onClick: g.open,
|
|
206
|
+
onBlur: he,
|
|
168
207
|
overflow: "visible",
|
|
169
208
|
width: "100%",
|
|
170
|
-
"aria-expanded":
|
|
171
|
-
"aria-invalid":
|
|
172
|
-
"aria-required":
|
|
173
|
-
"aria-disabled":
|
|
174
|
-
"aria-readonly":
|
|
175
|
-
...
|
|
209
|
+
"aria-expanded": g.isOpen,
|
|
210
|
+
"aria-invalid": _,
|
|
211
|
+
"aria-required": Y,
|
|
212
|
+
"aria-disabled": H,
|
|
213
|
+
"aria-readonly": P,
|
|
214
|
+
...m,
|
|
176
215
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
216
|
+
/* @__PURE__ */ K(fe, { ...z }),
|
|
217
|
+
g.isOpen && /* @__PURE__ */ K(ge, { ...z })
|
|
179
218
|
]
|
|
180
219
|
}
|
|
181
220
|
);
|
|
182
221
|
}
|
|
183
222
|
export {
|
|
184
|
-
|
|
223
|
+
Ee as Combobox
|
|
185
224
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.visual.test.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox.visual.test.tsx"],"names":[],"mappings":""}
|
|
@@ -102,6 +102,33 @@ export type ComboboxInnerProps = {
|
|
|
102
102
|
footerContent?: JSX.Element;
|
|
103
103
|
subMenuState: SubMenuState;
|
|
104
104
|
translation: Translation;
|
|
105
|
+
folderStyle?: "grouped" | "stacked";
|
|
106
|
+
parentSelectsChildren?: boolean;
|
|
107
|
+
};
|
|
108
|
+
type FolderProps = {
|
|
109
|
+
displayItems: ComboboxItem[];
|
|
110
|
+
selectedItems: ComboboxItem[];
|
|
111
|
+
toggleItem: (item: ComboboxItem | undefined) => void;
|
|
112
|
+
onHover: (index: number) => void;
|
|
113
|
+
isSingleSelect: boolean;
|
|
114
|
+
highlightState: {
|
|
115
|
+
index: number;
|
|
116
|
+
set: (index: number) => void;
|
|
117
|
+
next: () => void;
|
|
118
|
+
previous: () => void;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export type StackedFolderProps = FolderProps & {
|
|
122
|
+
parentSelectsChildren?: boolean;
|
|
123
|
+
inputValue: string;
|
|
124
|
+
};
|
|
125
|
+
export type GroupedFolderProps = FolderProps & {
|
|
126
|
+
subMenuState: SubMenuState;
|
|
127
|
+
parentStrings: Record<string, string[]>;
|
|
128
|
+
asPlainText: boolean;
|
|
129
|
+
isSearching: boolean;
|
|
130
|
+
isReadOnly?: boolean;
|
|
131
|
+
previousSelectedItems: ComboboxItem[];
|
|
105
132
|
};
|
|
106
133
|
export type ComboboxProps = MarginProps & LayoutProps & {
|
|
107
134
|
/**
|
|
@@ -197,5 +224,19 @@ export type ComboboxProps = MarginProps & LayoutProps & {
|
|
|
197
224
|
} | {
|
|
198
225
|
asPlainText?: false;
|
|
199
226
|
isSingleSelect?: undefined | false;
|
|
227
|
+
}) & ({
|
|
228
|
+
/**
|
|
229
|
+
* Style of folder rendering in the combobox.
|
|
230
|
+
* - "stacked": Folders are rendered in a stacked manner, showing hierarchy clearly.
|
|
231
|
+
* - "grouped": Folders are rendered in groups, providing a compact view.
|
|
232
|
+
*/
|
|
233
|
+
folderStyle: "stacked";
|
|
234
|
+
/**
|
|
235
|
+
* If true, selecting a parent item will automatically select all its child items.
|
|
236
|
+
*/
|
|
237
|
+
parentSelectsChildren?: boolean;
|
|
238
|
+
} | {
|
|
239
|
+
folderStyle?: "grouped";
|
|
240
|
+
parentSelectsChildren?: false;
|
|
200
241
|
});
|
|
201
242
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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;AACvC,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAE5C,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,MAAM,kBAAkB,GAAG,SAAS,CACzC,OAAO,CAAC,MAAM,OAAO,GAAG,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC,CACpE,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1F,MAAM,MAAM,YAAY,GAAG;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAA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|
3
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
2
4
|
export declare const BasicDateRangePicker: () => import("react/jsx-runtime").JSX.Element;
|
|
3
5
|
export declare const BasicMinimizedDateRangePicker: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare const BasicWeekNumberDatePicker: (
|
|
6
|
+
export declare const BasicWeekNumberDatePicker: ({ date }: {
|
|
7
|
+
date?: Date;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
9
|
//# sourceMappingURL=date-picker.composition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker.composition.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"date-picker.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker.composition.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,4CAmDxD,CAAC;AAEF,eAAO,MAAM,oBAAoB,+CAqBhC,CAAC;AAEF,eAAO,MAAM,6BAA6B,+CAoBzC,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,4CA8ClE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.visual.test.d.ts","sourceRoot":"","sources":["../../../lib/components/date-picker/date-picker.visual.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divider.visual.test.d.ts","sourceRoot":"","sources":["../../../lib/components/divider/divider.visual.test.tsx"],"names":[],"mappings":""}
|
|
@@ -2,6 +2,5 @@ export declare const RightDrawer: () => import("react/jsx-runtime").JSX.Element;
|
|
|
2
2
|
export declare const LeftDrawer: () => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare const TopDrawer: () => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const BottomDrawer: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare const Sizes: () => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export declare const InlineDrawer: () => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
//# sourceMappingURL=drawer.composition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/drawer/drawer.composition.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/drawer/drawer.composition.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,+CAavB,CAAC;AACF,eAAO,MAAM,UAAU,+CAatB,CAAC;AACF,eAAO,MAAM,SAAS,+CAarB,CAAC;AACF,eAAO,MAAM,YAAY,+CAaxB,CAAC;AAEF,eAAO,MAAM,YAAY,+CAoBxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.visual.test.d.ts","sourceRoot":"","sources":["../../../lib/components/drawer/drawer.visual.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flex.visual.test.d.ts","sourceRoot":"","sources":["../../../lib/components/flex/flex.visual.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-control.visual.test.d.ts","sourceRoot":"","sources":["../../../lib/components/form-control/form-control.visual.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/grid/grid.composition.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,+CAczB,CAAC;AAEF,eAAO,MAAM,cAAc,+CAoB1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.visual.test.d.ts","sourceRoot":"","sources":["../../../lib/components/grid/grid.visual.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.visual.test.d.ts","sourceRoot":"","sources":["../../../lib/components/heading/heading.visual.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/highlight/highlight.composition.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,+CAEtB,CAAC;AAEF,eAAO,MAAM,aAAa,+CAMzB,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { HighlightProps as ChakraHighlightProps } from '@chakra-ui/react';
|
|
2
2
|
export type HighlightProps = Pick<ChakraHighlightProps, "query" | "children">;
|
|
3
|
+
/**
|
|
4
|
+
* Highlight component to emphasize specific words or phrases within text.
|
|
5
|
+
*
|
|
6
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/highlight/
|
|
7
|
+
*/
|
|
3
8
|
export declare function Highlight(props: HighlightProps): import("react/jsx-runtime").JSX.Element;
|
|
4
9
|
//# sourceMappingURL=highlight.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../lib/components/highlight/highlight.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgC,KAAK,cAAc,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7G,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE9E,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CAS9C"}
|
|
1
|
+
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../lib/components/highlight/highlight.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgC,KAAK,cAAc,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7G,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE9E;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CAS9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.visual.test.d.ts","sourceRoot":"","sources":["../../../lib/components/highlight/highlight.visual.test.tsx"],"names":[],"mappings":""}
|