@pismo/marola 0.0.1-alpha.17 → 0.0.1-alpha.18
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/{Button-CSuug0jG.js → Button-2b1peDFT.js} +25 -26
- package/dist/{ClickAwayListener-hSFuUJnv.js → ClickAwayListener-BSW-Nd-y.js} +3 -3
- package/dist/{Popup-DwaWJ3ye.js → Popup-B6ZSGIEI.js} +12 -13
- package/dist/{Portal-CGBQMhI6.js → Portal-DIeBsWdL.js} +2 -2
- package/dist/{SelectButton-DWZ2BRaX.js → SelectButton-pciwIWcj.js} +24 -22
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectButton.css +1 -1
- package/dist/assets/TextDisplay.css +1 -0
- package/dist/{combineHooksSlotProps-D8j4htsd.js → combineHooksSlotProps-DVjg9PRh.js} +18 -19
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +15 -16
- package/dist/components/Dialog/Dialog.stories.d.ts +3 -3
- package/dist/components/Icon/Icon.d.ts +10 -1
- package/dist/components/Icon/Icon.js +39 -25
- package/dist/components/Icon/Icon.stories.d.ts +16 -0
- package/dist/components/IconButton/Icon.stories.d.ts +15 -0
- package/dist/components/IconButton/IconButton.d.ts +14 -0
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.js +25 -26
- package/dist/components/Pagination/Pagination.d.ts +24 -5
- package/dist/components/Pagination/Pagination.js +119 -116
- package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
- package/dist/components/Select/Select.js +137 -138
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +10 -3
- package/dist/components/Skeleton/Skeleton.js +12 -15
- package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
- package/dist/components/Snackbar/Snackbar.js +6 -7
- package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
- package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
- package/dist/components/SortTooltip/SortTooltip.js +27 -16
- package/dist/components/Stepper/Stepper.d.ts +11 -1
- package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
- package/dist/components/Table/Table.js +38 -40
- package/dist/components/Tabs/Tab.d.ts +5 -0
- package/dist/components/Tabs/Tab.js +9 -10
- package/dist/components/Tabs/Tab.stories.d.ts +15 -0
- package/dist/components/Tabs/TabPanel.d.ts +4 -0
- package/dist/components/Tabs/TabPanel.js +13 -14
- package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -1
- package/dist/components/Tabs/Tabs.js +36 -37
- package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
- package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
- package/dist/components/TextDisplay/TextDisplay.js +37 -0
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
- package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
- package/dist/components/Toggle/Toggle.js +7 -8
- package/dist/components/Tooltip/Tooltip.d.ts +18 -6
- package/dist/components/Tooltip/Tooltip.js +104 -92
- package/dist/components/Tooltip/Tooltip.stories.d.ts +33 -0
- package/dist/components/Typography/Typography.d.ts +2 -0
- package/dist/components/Typography/Typography.js +40 -29
- package/dist/components/Typography/Typography.stories.d.ts +1 -0
- package/dist/{index-CtPvew6C.js → index-CH45lKw7.js} +310 -287
- package/dist/{index-BfeM9yWx.js → index-CjW42-M-.js} +5 -6
- package/dist/main.d.ts +1 -0
- package/dist/main.js +28 -26
- package/dist/{useButton-DSAvAfH_.js → useButton-DNk3wrQp.js} +3 -4
- package/dist/{useEventCallback-lXNMsMLa.js → useEventCallback-xTG9piMa.js} +1 -1
- package/dist/{useList-C5PBIv2I.js → useList-B0hog_3-.js} +48 -49
- package/package.json +1 -1
- package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as Hk } from "./index-CtPvew6C.js";
|
|
1
|
+
import { b as Ak, h as Hk } from "./index-CH45lKw7.js";
|
|
3
2
|
import QE from "react";
|
|
4
3
|
const Fk = "exact-prop: ";
|
|
5
|
-
function
|
|
4
|
+
function Xk(ne) {
|
|
6
5
|
return process.env.NODE_ENV === "production" ? ne : Ak({}, ne, {
|
|
7
6
|
[Fk]: (ze) => {
|
|
8
7
|
const L = Object.keys(ze).filter((pn) => !ne.hasOwnProperty(pn));
|
|
@@ -19577,9 +19576,9 @@ function GE() {
|
|
|
19577
19576
|
}
|
|
19578
19577
|
process.env.NODE_ENV === "production" ? (GE(), a0.exports = Bk()) : a0.exports = Pk();
|
|
19579
19578
|
var Yk = a0.exports;
|
|
19580
|
-
const
|
|
19579
|
+
const qk = /* @__PURE__ */ Hk(Yk);
|
|
19581
19580
|
export {
|
|
19582
|
-
|
|
19583
|
-
|
|
19581
|
+
qk as R,
|
|
19582
|
+
Xk as e,
|
|
19584
19583
|
Yk as r
|
|
19585
19584
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './components/SortTooltip/SortTooltip';
|
|
|
21
21
|
export * from './components/Stepper/Stepper';
|
|
22
22
|
export * from './components/Table/Table';
|
|
23
23
|
export * from './components/Tabs/Tabs';
|
|
24
|
+
export * from './components/TextDisplay/TextDisplay';
|
|
24
25
|
export * from './components/Toggle/Toggle';
|
|
25
26
|
export * from './components/Tooltip/Tooltip';
|
|
26
27
|
export * from './components/Typography/Typography';
|
package/dist/main.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Advice as e } from "./components/Advice/Advice.js";
|
|
2
2
|
import { Button as p } from "./components/Button/Button.js";
|
|
3
3
|
import { Checkbox as f } from "./components/Checkbox/Checkbox.js";
|
|
4
|
-
import { Chip as
|
|
4
|
+
import { Chip as m } from "./components/Chip/Chip.js";
|
|
5
5
|
import { Dialog as l } from "./components/Dialog/Dialog.js";
|
|
6
|
-
import { FamilyAndIcons as T, Icon as
|
|
6
|
+
import { FamilyAndIcons as T, Icon as s } from "./components/Icon/Icon.js";
|
|
7
7
|
import { IconButton as S } from "./components/IconButton/IconButton.js";
|
|
8
8
|
import { Input as u } from "./components/Input/Input.js";
|
|
9
9
|
import { InputSearch as d } from "./components/InputSearch/InputSearch.js";
|
|
10
|
-
import { LoadingSpinner as
|
|
11
|
-
import { PageHeader as
|
|
12
|
-
import { Pagination as
|
|
10
|
+
import { LoadingSpinner as D } from "./components/LoadingSpinner/LoadingSpinner.js";
|
|
11
|
+
import { PageHeader as h } from "./components/PageHeader/PageHeader.js";
|
|
12
|
+
import { Pagination as C, paginationDefaultTranslations as A } from "./components/Pagination/Pagination.js";
|
|
13
13
|
import { Select as B, SelectOption as v } from "./components/Select/Select.js";
|
|
14
14
|
import { Skeleton as H, SkeletonCircle as L, SkeletonTable as O } from "./components/Skeleton/Skeleton.js";
|
|
15
15
|
import { Snackbar as q } from "./components/Snackbar/Snackbar.js";
|
|
@@ -17,31 +17,32 @@ import { SortTooltip as z, sortTooltipDefaultTranslations as E } from "./compone
|
|
|
17
17
|
import { Stepper as J } from "./components/Stepper/Stepper.js";
|
|
18
18
|
import { Table as M } from "./components/Table/Table.js";
|
|
19
19
|
import { Tabs as Q } from "./components/Tabs/Tabs.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { default as oo } from "./components/Dialog/
|
|
25
|
-
import { default as eo } from "./components/Dialog/
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
20
|
+
import { TextDisplay as U } from "./components/TextDisplay/TextDisplay.js";
|
|
21
|
+
import { Toggle as W } from "./components/Toggle/Toggle.js";
|
|
22
|
+
import { Tooltip as Y } from "./components/Tooltip/Tooltip.js";
|
|
23
|
+
import { Typography as _ } from "./components/Typography/Typography.js";
|
|
24
|
+
import { default as oo } from "./components/Dialog/Title.js";
|
|
25
|
+
import { default as eo } from "./components/Dialog/Content.js";
|
|
26
|
+
import { default as po } from "./components/Dialog/Actions.js";
|
|
27
|
+
import { Tab as fo } from "./components/Tabs/Tab.js";
|
|
28
|
+
import { TabPanel as mo } from "./components/Tabs/TabPanel.js";
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
po as Actions,
|
|
30
31
|
e as Advice,
|
|
31
32
|
p as Button,
|
|
32
33
|
f as Checkbox,
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
m as Chip,
|
|
35
|
+
eo as Content,
|
|
35
36
|
l as Dialog,
|
|
36
|
-
|
|
37
|
+
oo as DialogTitle,
|
|
37
38
|
T as FamilyAndIcons,
|
|
38
|
-
|
|
39
|
+
s as Icon,
|
|
39
40
|
S as IconButton,
|
|
40
41
|
u as Input,
|
|
41
42
|
d as InputSearch,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
D as LoadingSpinner,
|
|
44
|
+
h as PageHeader,
|
|
45
|
+
C as Pagination,
|
|
45
46
|
B as Select,
|
|
46
47
|
v as SelectOption,
|
|
47
48
|
H as Skeleton,
|
|
@@ -50,13 +51,14 @@ export {
|
|
|
50
51
|
q as Snackbar,
|
|
51
52
|
z as SortTooltip,
|
|
52
53
|
J as Stepper,
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
fo as Tab,
|
|
55
|
+
mo as TabPanel,
|
|
55
56
|
M as Table,
|
|
56
57
|
Q as Tabs,
|
|
57
|
-
U as
|
|
58
|
-
W as
|
|
59
|
-
Y as
|
|
58
|
+
U as TextDisplay,
|
|
59
|
+
W as Toggle,
|
|
60
|
+
Y as Tooltip,
|
|
61
|
+
_ as Typography,
|
|
60
62
|
A as paginationDefaultTranslations,
|
|
61
63
|
E as sortTooltipDefaultTranslations
|
|
62
64
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as S, b as D, f as k } from "./index-CH45lKw7.js";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import { u as S, e as k } from "./index-CtPvew6C.js";
|
|
4
3
|
import { u as _ } from "./useIsFocusVisible-BH4IAdcw.js";
|
|
5
4
|
function v(p) {
|
|
6
5
|
const {
|
|
@@ -16,7 +15,7 @@ function v(p) {
|
|
|
16
15
|
}, []);
|
|
17
16
|
return [c, u];
|
|
18
17
|
}
|
|
19
|
-
function
|
|
18
|
+
function W(p = {}) {
|
|
20
19
|
const {
|
|
21
20
|
disabled: n = !1,
|
|
22
21
|
focusableWhenDisabled: l,
|
|
@@ -102,5 +101,5 @@ function h(p = {}) {
|
|
|
102
101
|
};
|
|
103
102
|
}
|
|
104
103
|
export {
|
|
105
|
-
|
|
104
|
+
W as u
|
|
106
105
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as p, u as re, f as ie } from "./index-CH45lKw7.js";
|
|
2
2
|
import * as f from "react";
|
|
3
|
-
import { L as x } from "./combineHooksSlotProps-
|
|
4
|
-
import { u as re, e as ie } from "./index-CtPvew6C.js";
|
|
3
|
+
import { L as x } from "./combineHooksSlotProps-DVjg9PRh.js";
|
|
5
4
|
function W(t, e, r = (n, l) => n === l) {
|
|
6
5
|
return t.length === e.length && t.every((n, l) => r(n, e[l]));
|
|
7
6
|
}
|
|
@@ -16,44 +15,44 @@ function L(t, e) {
|
|
|
16
15
|
e[n] !== void 0 && (r[n] = e[n]);
|
|
17
16
|
}), r;
|
|
18
17
|
}
|
|
19
|
-
function
|
|
18
|
+
function se(t) {
|
|
20
19
|
const {
|
|
21
20
|
nextState: e,
|
|
22
21
|
initialState: r,
|
|
23
22
|
stateComparers: n,
|
|
24
23
|
onStateChange: l,
|
|
25
|
-
controlledProps:
|
|
24
|
+
controlledProps: a,
|
|
26
25
|
lastActionRef: i
|
|
27
26
|
} = t, h = f.useRef(r);
|
|
28
27
|
f.useEffect(() => {
|
|
29
28
|
if (i.current === null)
|
|
30
29
|
return;
|
|
31
|
-
const
|
|
30
|
+
const s = L(h.current, a);
|
|
32
31
|
Object.keys(e).forEach((C) => {
|
|
33
32
|
var V;
|
|
34
|
-
const g = (V = n[C]) != null ? V : ue, c = e[C], m =
|
|
33
|
+
const g = (V = n[C]) != null ? V : ue, c = e[C], m = s[C];
|
|
35
34
|
if (m == null && c != null || m != null && c == null || m != null && c != null && !g(c, m)) {
|
|
36
35
|
var o, S;
|
|
37
36
|
l == null || l((o = i.current.event) != null ? o : null, C, c, (S = i.current.type) != null ? S : "", e);
|
|
38
37
|
}
|
|
39
38
|
}), h.current = e, i.current = null;
|
|
40
|
-
}, [h, e, i, l, n,
|
|
39
|
+
}, [h, e, i, l, n, a]);
|
|
41
40
|
}
|
|
42
|
-
function
|
|
41
|
+
function ae(t) {
|
|
43
42
|
const e = f.useRef(null), {
|
|
44
43
|
reducer: r,
|
|
45
44
|
initialState: n,
|
|
46
45
|
controlledProps: l = N,
|
|
47
|
-
stateComparers:
|
|
46
|
+
stateComparers: a = N,
|
|
48
47
|
onStateChange: i = q,
|
|
49
48
|
actionContext: h,
|
|
50
|
-
componentName:
|
|
49
|
+
componentName: s = ""
|
|
51
50
|
} = t, C = f.useRef(l);
|
|
52
51
|
process.env.NODE_ENV !== "production" && f.useEffect(() => {
|
|
53
52
|
Object.keys(l).forEach((o) => {
|
|
54
|
-
C.current[o] !== void 0 && l[o] === void 0 && console.error(`useControllableReducer: ${
|
|
53
|
+
C.current[o] !== void 0 && l[o] === void 0 && console.error(`useControllableReducer: ${s ? `The ${s} component` : "A component"} is changing a controlled prop to be uncontrolled: ${o}`), C.current[o] === void 0 && l[o] !== void 0 && console.error(`useControllableReducer: ${s ? `The ${s} component` : "A component"} is changing an uncontrolled prop to be controlled: ${o}`);
|
|
55
54
|
});
|
|
56
|
-
}, [l,
|
|
55
|
+
}, [l, s]);
|
|
57
56
|
const V = f.useCallback((o, S) => {
|
|
58
57
|
e.current = S;
|
|
59
58
|
const R = L(o, l);
|
|
@@ -63,24 +62,24 @@ function se(t) {
|
|
|
63
62
|
context: h
|
|
64
63
|
}));
|
|
65
64
|
}, [h]);
|
|
66
|
-
return
|
|
65
|
+
return se({
|
|
67
66
|
nextState: g,
|
|
68
67
|
initialState: n,
|
|
69
|
-
stateComparers:
|
|
68
|
+
stateComparers: a ?? N,
|
|
70
69
|
onStateChange: i ?? q,
|
|
71
70
|
controlledProps: l,
|
|
72
71
|
lastActionRef: e
|
|
73
72
|
}), [L(g, l), m];
|
|
74
73
|
}
|
|
75
|
-
function oe(t, e, r, n, l,
|
|
76
|
-
if (r.length === 0 || !n && r.every((h,
|
|
74
|
+
function oe(t, e, r, n, l, a) {
|
|
75
|
+
if (r.length === 0 || !n && r.every((h, s) => l(h, s)))
|
|
77
76
|
return -1;
|
|
78
77
|
let i = t;
|
|
79
78
|
for (; ; ) {
|
|
80
|
-
if (!
|
|
79
|
+
if (!a && e === "next" && i === r.length || !a && e === "previous" && i === -1)
|
|
81
80
|
return -1;
|
|
82
81
|
if (n ? !1 : l(r[i], i))
|
|
83
|
-
i += e === "next" ? 1 : -1,
|
|
82
|
+
i += e === "next" ? 1 : -1, a && (i = (i + r.length) % r.length);
|
|
84
83
|
else
|
|
85
84
|
return i;
|
|
86
85
|
}
|
|
@@ -89,12 +88,12 @@ function w(t, e, r) {
|
|
|
89
88
|
var n;
|
|
90
89
|
const {
|
|
91
90
|
items: l,
|
|
92
|
-
isItemDisabled:
|
|
91
|
+
isItemDisabled: a,
|
|
93
92
|
disableListWrap: i,
|
|
94
93
|
disabledItemsFocusable: h,
|
|
95
|
-
itemComparer:
|
|
94
|
+
itemComparer: s,
|
|
96
95
|
focusManagement: C
|
|
97
|
-
} = r, V = C === "DOM" ? 0 : -1, g = l.length - 1, c = t == null ? -1 : l.findIndex((D) =>
|
|
96
|
+
} = r, V = C === "DOM" ? 0 : -1, g = l.length - 1, c = t == null ? -1 : l.findIndex((D) => s(D, t));
|
|
98
97
|
let m, o, S = !i;
|
|
99
98
|
switch (e) {
|
|
100
99
|
case "reset":
|
|
@@ -113,8 +112,8 @@ function w(t, e, r) {
|
|
|
113
112
|
D < 0 ? !S && c !== -1 || Math.abs(e) > 1 ? (m = 0, o = "next") : (m = g, o = "previous") : D > g ? !S || Math.abs(e) > 1 ? (m = g, o = "previous") : (m = 0, o = "next") : (m = D, o = e >= 0 ? "next" : "previous");
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
|
-
const R = oe(m, o, l, h,
|
|
117
|
-
return R === -1 && t !== null && !
|
|
115
|
+
const R = oe(m, o, l, h, a, S);
|
|
116
|
+
return R === -1 && t !== null && !a(t, c) ? t : (n = l[R]) != null ? n : null;
|
|
118
117
|
}
|
|
119
118
|
function ce(t, e, r, n) {
|
|
120
119
|
return r === "none" ? [] : r === "single" ? n(e[0], t) ? e : [t] : e.some((l) => n(l, t)) ? e.filter((l) => !n(l, t)) : [...e, t];
|
|
@@ -123,14 +122,14 @@ function j(t, e, r) {
|
|
|
123
122
|
const {
|
|
124
123
|
itemComparer: n,
|
|
125
124
|
isItemDisabled: l,
|
|
126
|
-
selectionMode:
|
|
125
|
+
selectionMode: a,
|
|
127
126
|
items: i
|
|
128
127
|
} = r, {
|
|
129
128
|
selectedValues: h
|
|
130
|
-
} = e,
|
|
131
|
-
if (l(t,
|
|
129
|
+
} = e, s = i.findIndex((V) => n(t, V));
|
|
130
|
+
if (l(t, s))
|
|
132
131
|
return e;
|
|
133
|
-
const C = ce(t, h,
|
|
132
|
+
const C = ce(t, h, a, n);
|
|
134
133
|
return p({}, e, {
|
|
135
134
|
selectedValues: C,
|
|
136
135
|
highlightedValue: t
|
|
@@ -139,7 +138,7 @@ function j(t, e, r) {
|
|
|
139
138
|
function he(t, e, r) {
|
|
140
139
|
const n = e.highlightedValue, {
|
|
141
140
|
orientation: l,
|
|
142
|
-
pageSize:
|
|
141
|
+
pageSize: a
|
|
143
142
|
} = r;
|
|
144
143
|
switch (t) {
|
|
145
144
|
case "Home":
|
|
@@ -152,11 +151,11 @@ function he(t, e, r) {
|
|
|
152
151
|
});
|
|
153
152
|
case "PageUp":
|
|
154
153
|
return p({}, e, {
|
|
155
|
-
highlightedValue: w(n, -
|
|
154
|
+
highlightedValue: w(n, -a, r)
|
|
156
155
|
});
|
|
157
156
|
case "PageDown":
|
|
158
157
|
return p({}, e, {
|
|
159
|
-
highlightedValue: w(n,
|
|
158
|
+
highlightedValue: w(n, a, r)
|
|
160
159
|
});
|
|
161
160
|
case "ArrowUp":
|
|
162
161
|
if (l !== "vertical")
|
|
@@ -204,34 +203,34 @@ function fe(t, e, r) {
|
|
|
204
203
|
const {
|
|
205
204
|
items: n,
|
|
206
205
|
isItemDisabled: l,
|
|
207
|
-
disabledItemsFocusable:
|
|
206
|
+
disabledItemsFocusable: a,
|
|
208
207
|
getItemAsString: i
|
|
209
208
|
} = r, h = e.length > 1;
|
|
210
|
-
let
|
|
209
|
+
let s = h ? t.highlightedValue : w(t.highlightedValue, 1, r);
|
|
211
210
|
for (let C = 0; C < n.length; C += 1) {
|
|
212
|
-
if (!
|
|
211
|
+
if (!s || !h && t.highlightedValue === s)
|
|
213
212
|
return t;
|
|
214
|
-
if (de(
|
|
213
|
+
if (de(s, e, i) && (!l(s, n.indexOf(s)) || a))
|
|
215
214
|
return p({}, t, {
|
|
216
|
-
highlightedValue:
|
|
215
|
+
highlightedValue: s
|
|
217
216
|
});
|
|
218
|
-
|
|
217
|
+
s = w(s, 1, r);
|
|
219
218
|
}
|
|
220
219
|
return t;
|
|
221
220
|
}
|
|
222
221
|
function me(t, e, r, n) {
|
|
223
222
|
var l;
|
|
224
223
|
const {
|
|
225
|
-
itemComparer:
|
|
224
|
+
itemComparer: a,
|
|
226
225
|
focusManagement: i
|
|
227
226
|
} = n;
|
|
228
227
|
let h = null;
|
|
229
228
|
if (r.highlightedValue != null) {
|
|
230
|
-
var
|
|
231
|
-
h = (
|
|
229
|
+
var s;
|
|
230
|
+
h = (s = t.find((g) => a(g, r.highlightedValue))) != null ? s : null;
|
|
232
231
|
} else
|
|
233
232
|
i === "DOM" && e.length === 0 && (h = w(null, "reset", n));
|
|
234
|
-
const V = ((l = r.selectedValues) != null ? l : []).filter((g) => t.some((c) =>
|
|
233
|
+
const V = ((l = r.selectedValues) != null ? l : []).filter((g) => t.some((c) => a(c, g)));
|
|
235
234
|
return p({}, r, {
|
|
236
235
|
highlightedValue: h,
|
|
237
236
|
selectedValues: V
|
|
@@ -287,8 +286,8 @@ function xe(t) {
|
|
|
287
286
|
});
|
|
288
287
|
return f.useCallback((r) => {
|
|
289
288
|
if (r.key.length === 1 && r.key !== " ") {
|
|
290
|
-
const n = e.current, l = r.key.toLowerCase(),
|
|
291
|
-
n.searchString.length > 0 && n.lastTime &&
|
|
289
|
+
const n = e.current, l = r.key.toLowerCase(), a = performance.now();
|
|
290
|
+
n.searchString.length > 0 && n.lastTime && a - n.lastTime > be ? n.searchString = l : (n.searchString.length !== 1 || l !== n.searchString) && (n.searchString += l), n.lastTime = a, t(n.searchString, r);
|
|
292
291
|
}
|
|
293
292
|
}, [t]);
|
|
294
293
|
}
|
|
@@ -297,16 +296,16 @@ const z = {}, Ve = () => {
|
|
|
297
296
|
highlightedValue: null,
|
|
298
297
|
selectedValues: []
|
|
299
298
|
});
|
|
300
|
-
function
|
|
299
|
+
function Me(t) {
|
|
301
300
|
const {
|
|
302
301
|
controlledProps: e = z,
|
|
303
302
|
disabledItemsFocusable: r = !1,
|
|
304
303
|
disableListWrap: n = !1,
|
|
305
304
|
focusManagement: l = "activeDescendant",
|
|
306
|
-
getInitialState:
|
|
305
|
+
getInitialState: a = ve,
|
|
307
306
|
getItemDomElement: i,
|
|
308
307
|
getItemId: h,
|
|
309
|
-
isItemDisabled:
|
|
308
|
+
isItemDisabled: s = De,
|
|
310
309
|
rootRef: C,
|
|
311
310
|
onStateChange: V = Ve,
|
|
312
311
|
items: g,
|
|
@@ -349,7 +348,7 @@ function Oe(t) {
|
|
|
349
348
|
disabledItemsFocusable: r,
|
|
350
349
|
disableListWrap: n,
|
|
351
350
|
focusManagement: l,
|
|
352
|
-
isItemDisabled:
|
|
351
|
+
isItemDisabled: s,
|
|
353
352
|
itemComparer: c,
|
|
354
353
|
items: g,
|
|
355
354
|
getItemAsString: m,
|
|
@@ -358,7 +357,7 @@ function Oe(t) {
|
|
|
358
357
|
pageSize: P,
|
|
359
358
|
selectionMode: $,
|
|
360
359
|
stateComparers: O
|
|
361
|
-
}), [r, n, l,
|
|
360
|
+
}), [r, n, l, s, c, g, m, T, D, P, $, O]), Y = a(), X = _ ?? Ie, Q = f.useMemo(() => p({}, H, K), [H, K]), [k, v] = ae({
|
|
362
361
|
reducer: X,
|
|
363
362
|
actionContext: Q,
|
|
364
363
|
initialState: Y,
|
|
@@ -433,5 +432,5 @@ export {
|
|
|
433
432
|
j as h,
|
|
434
433
|
Ie as l,
|
|
435
434
|
w as m,
|
|
436
|
-
|
|
435
|
+
Me as u
|
|
437
436
|
};
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
function e() {
|
|
2
|
-
return e = Object.assign ? Object.assign.bind() : function(n) {
|
|
3
|
-
for (var a = 1; a < arguments.length; a++) {
|
|
4
|
-
var r = arguments[a];
|
|
5
|
-
for (var t in r)
|
|
6
|
-
Object.prototype.hasOwnProperty.call(r, t) && (n[t] = r[t]);
|
|
7
|
-
}
|
|
8
|
-
return n;
|
|
9
|
-
}, e.apply(this, arguments);
|
|
10
|
-
}
|
|
11
|
-
function i(n, a) {
|
|
12
|
-
if (n == null)
|
|
13
|
-
return {};
|
|
14
|
-
var r = {};
|
|
15
|
-
for (var t in n)
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(n, t)) {
|
|
17
|
-
if (a.indexOf(t) >= 0)
|
|
18
|
-
continue;
|
|
19
|
-
r[t] = n[t];
|
|
20
|
-
}
|
|
21
|
-
return r;
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
i as _,
|
|
25
|
-
e as a
|
|
26
|
-
};
|