@fluidattacks/design 11.11.1 → 11.12.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/card/card-with-input/index.js +2 -3
- package/dist/components/filters/filters-menu/index.js +23 -24
- package/dist/components/filters/options-menu/options/index.js +2 -3
- package/dist/components/inputs/fields/combobox/field/index.js +190 -189
- package/dist/components/inputs/fields/combobox/styles.d.ts +9 -8
- package/dist/components/inputs/fields/combobox/styles.js +67 -65
- package/dist/components/inputs/fields/combobox/types.d.ts +2 -2
- package/dist/components/slider/index.js +2 -3
- package/package.json +1 -1
|
@@ -12,7 +12,6 @@ import "react-dom";
|
|
|
12
12
|
import "../../typography/heading/index.js";
|
|
13
13
|
import "../../typography/span/index.js";
|
|
14
14
|
import "../../typography/text/index.js";
|
|
15
|
-
import "../../inputs/styles.js";
|
|
16
15
|
import "../../container/index.js";
|
|
17
16
|
import "../../icon-button/index.js";
|
|
18
17
|
import "../../../_virtual/dayjs.min.js";
|
|
@@ -21,7 +20,7 @@ import "../../layout/categories/buttons/index.js";
|
|
|
21
20
|
import { InputNumber as S } from "../../inputs/fields/number/index.js";
|
|
22
21
|
import "../../inputs/utils/action-button/index.js";
|
|
23
22
|
import "../../../node_modules/react-international-phone/dist/index.js";
|
|
24
|
-
const
|
|
23
|
+
const it = ({
|
|
25
24
|
control: u,
|
|
26
25
|
description: B,
|
|
27
26
|
disabled: t,
|
|
@@ -142,5 +141,5 @@ const pt = ({
|
|
|
142
141
|
);
|
|
143
142
|
};
|
|
144
143
|
export {
|
|
145
|
-
|
|
144
|
+
it as CardWithInput
|
|
146
145
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import I from "../../../_virtual/snakeCase.js";
|
|
3
|
-
import { forwardRef as O, useContext as $, useMemo as B, useCallback as
|
|
3
|
+
import { forwardRef as O, useContext as $, useMemo as B, useCallback as h, Fragment as L } from "react";
|
|
4
4
|
import { useTheme as R } from "styled-components";
|
|
5
5
|
import { FiltersContext as A } from "../context/index.js";
|
|
6
6
|
import { NoMatches as P } from "../search/no-matches/index.js";
|
|
@@ -15,7 +15,6 @@ import "react-dom";
|
|
|
15
15
|
import "../../typography/heading/index.js";
|
|
16
16
|
import "../../typography/span/index.js";
|
|
17
17
|
import { Text as M } from "../../typography/text/index.js";
|
|
18
|
-
import "../../inputs/styles.js";
|
|
19
18
|
import { Tag as K } from "../../tag/index.js";
|
|
20
19
|
import "../../../_virtual/dayjs.min.js";
|
|
21
20
|
import "../../icon-button/index.js";
|
|
@@ -27,8 +26,8 @@ import { parseTextFilterValue as U, parseCheckboxesFilterValue as X, parseInclud
|
|
|
27
26
|
const Z = (c, d) => {
|
|
28
27
|
if (d?.some((t) => t.type === "text") ?? !1)
|
|
29
28
|
return U(c ?? "").text ? "1" : "0";
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
29
|
+
const l = new Set(d?.map((t) => t.type) ?? []);
|
|
30
|
+
if (l.size === 1 && l.has("checkboxes"))
|
|
32
31
|
return X(
|
|
33
32
|
c ?? ""
|
|
34
33
|
).values.length.toString();
|
|
@@ -39,11 +38,11 @@ const Z = (c, d) => {
|
|
|
39
38
|
return (t.length + f.length).toString();
|
|
40
39
|
}
|
|
41
40
|
return (c ?? "").split(",").filter((t) => t && t !== "-").length.toString();
|
|
42
|
-
},
|
|
41
|
+
}, ke = O(function({
|
|
43
42
|
includeSearch: d = !1,
|
|
44
43
|
groupedFilters: g,
|
|
45
|
-
handleChangeId:
|
|
46
|
-
pinnedFilters:
|
|
44
|
+
handleChangeId: l,
|
|
45
|
+
pinnedFilters: p
|
|
47
46
|
}, b) {
|
|
48
47
|
const t = R(), {
|
|
49
48
|
id: f,
|
|
@@ -52,16 +51,16 @@ const Z = (c, d) => {
|
|
|
52
51
|
values: s,
|
|
53
52
|
updateSearch: v,
|
|
54
53
|
setValues: u
|
|
55
|
-
} = $(A), C = q(g, y), w = B(() => Object.values(s).filter(Boolean).length > 0, [s]), S =
|
|
54
|
+
} = $(A), C = q(g, y), w = B(() => Object.values(s).filter(Boolean).length > 0, [s]), S = p.length > 0, V = h(
|
|
56
55
|
(e) => () => {
|
|
57
|
-
|
|
56
|
+
l(e), v({ previousValue: s[e] ?? "" }), m({ searchFilter: "", searchGlobal: "" });
|
|
58
57
|
},
|
|
59
|
-
[
|
|
60
|
-
), j =
|
|
58
|
+
[l, v, m, s]
|
|
59
|
+
), j = h(() => {
|
|
61
60
|
u(
|
|
62
61
|
(e) => Object.keys(e).reduce((n, r) => ({ ...n, [r]: "" }), {})
|
|
63
|
-
),
|
|
64
|
-
}, [u,
|
|
62
|
+
), l("");
|
|
63
|
+
}, [u, l]), z = h(
|
|
65
64
|
(e) => {
|
|
66
65
|
m((n) => ({
|
|
67
66
|
...n,
|
|
@@ -69,7 +68,7 @@ const Z = (c, d) => {
|
|
|
69
68
|
}));
|
|
70
69
|
},
|
|
71
70
|
[m]
|
|
72
|
-
), E =
|
|
71
|
+
), E = h(
|
|
73
72
|
(e) => (n) => {
|
|
74
73
|
u((r) => ({ ...r, [e]: n }));
|
|
75
74
|
},
|
|
@@ -108,7 +107,7 @@ const Z = (c, d) => {
|
|
|
108
107
|
scroll: "y",
|
|
109
108
|
width: "100%",
|
|
110
109
|
children: [
|
|
111
|
-
S ? /* @__PURE__ */ o(k, { "data-testid": "menu-pinned", children:
|
|
110
|
+
S ? /* @__PURE__ */ o(k, { "data-testid": "menu-pinned", children: p.map((e) => {
|
|
112
111
|
const n = e.options?.[0]?.items?.map((r) => ({
|
|
113
112
|
name: r.label ?? r.value,
|
|
114
113
|
value: r.value
|
|
@@ -141,17 +140,17 @@ const Z = (c, d) => {
|
|
|
141
140
|
children: e
|
|
142
141
|
}
|
|
143
142
|
) : void 0,
|
|
144
|
-
n.map((
|
|
145
|
-
const G = s[
|
|
143
|
+
n.map((i) => {
|
|
144
|
+
const G = s[i.id], F = Z(
|
|
146
145
|
G,
|
|
147
|
-
|
|
146
|
+
i.options
|
|
148
147
|
);
|
|
149
148
|
return /* @__PURE__ */ o(L, { children: /* @__PURE__ */ a(
|
|
150
149
|
N,
|
|
151
150
|
{
|
|
152
151
|
as: "button",
|
|
153
|
-
"data-testid":
|
|
154
|
-
onClick: V(
|
|
152
|
+
"data-testid": i.id,
|
|
153
|
+
onClick: V(i.id),
|
|
155
154
|
children: [
|
|
156
155
|
/* @__PURE__ */ o(
|
|
157
156
|
T,
|
|
@@ -162,7 +161,7 @@ const Z = (c, d) => {
|
|
|
162
161
|
iconType: "fa-light"
|
|
163
162
|
}
|
|
164
163
|
),
|
|
165
|
-
|
|
164
|
+
i.label,
|
|
166
165
|
/* @__PURE__ */ a(
|
|
167
166
|
x,
|
|
168
167
|
{
|
|
@@ -171,7 +170,7 @@ const Z = (c, d) => {
|
|
|
171
170
|
gap: 0.5,
|
|
172
171
|
style: { marginLeft: "auto" },
|
|
173
172
|
children: [
|
|
174
|
-
f ===
|
|
173
|
+
f === i.id ? /* @__PURE__ */ o(
|
|
175
174
|
T,
|
|
176
175
|
{
|
|
177
176
|
icon: "chevron-right",
|
|
@@ -186,7 +185,7 @@ const Z = (c, d) => {
|
|
|
186
185
|
)
|
|
187
186
|
]
|
|
188
187
|
}
|
|
189
|
-
) },
|
|
188
|
+
) }, i.id);
|
|
190
189
|
})
|
|
191
190
|
]
|
|
192
191
|
},
|
|
@@ -198,5 +197,5 @@ const Z = (c, d) => {
|
|
|
198
197
|
] });
|
|
199
198
|
});
|
|
200
199
|
export {
|
|
201
|
-
|
|
200
|
+
ke as FiltersMenu
|
|
202
201
|
};
|
|
@@ -17,7 +17,6 @@ import "react-dom";
|
|
|
17
17
|
import "../../../typography/heading/index.js";
|
|
18
18
|
import { Span as le } from "../../../typography/span/index.js";
|
|
19
19
|
import "../../../typography/text/index.js";
|
|
20
|
-
import "../../../inputs/styles.js";
|
|
21
20
|
import "../../../container/index.js";
|
|
22
21
|
import { Tag as O } from "../../../tag/index.js";
|
|
23
22
|
import "../../../icon-button/index.js";
|
|
@@ -325,7 +324,7 @@ const pe = ({
|
|
|
325
324
|
}
|
|
326
325
|
) });
|
|
327
326
|
}
|
|
328
|
-
},
|
|
327
|
+
}, He = ({
|
|
329
328
|
id: i,
|
|
330
329
|
filteredItems: l,
|
|
331
330
|
filterValue: a,
|
|
@@ -439,6 +438,6 @@ const pe = ({
|
|
|
439
438
|
}) ?? null });
|
|
440
439
|
};
|
|
441
440
|
export {
|
|
442
|
-
|
|
441
|
+
He as Options,
|
|
443
442
|
pe as TextFilterRenderer
|
|
444
443
|
};
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useVirtualizer as
|
|
1
|
+
import { jsx as t, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import { useVirtualizer as Qe } from "../../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
|
|
3
3
|
import { useState as g, useMemo as y, useRef as v, useCallback as x } from "react";
|
|
4
|
-
import { useButton as
|
|
5
|
-
import { useComboBox as
|
|
6
|
-
import { useFilter as
|
|
7
|
-
import { useListBox as
|
|
8
|
-
import { useComboBoxState as
|
|
9
|
-
import { Item as
|
|
10
|
-
import { useTheme as
|
|
11
|
-
import { OutlineContainer as
|
|
12
|
-
import { StyledTextInputContainer as
|
|
4
|
+
import { useButton as Xe } from "../../../../../node_modules/react-aria/dist/private/button/useButton.js";
|
|
5
|
+
import { useComboBox as Ze } from "../../../../../node_modules/react-aria/dist/private/combobox/useComboBox.js";
|
|
6
|
+
import { useFilter as _e } from "../../../../../node_modules/react-aria/dist/private/i18n/useFilter.js";
|
|
7
|
+
import { useListBox as eo } from "../../../../../node_modules/react-aria/dist/private/listbox/useListBox.js";
|
|
8
|
+
import { useComboBoxState as oo } from "../../../../../node_modules/react-stately/dist/private/combobox/useComboBoxState.js";
|
|
9
|
+
import { Item as to } from "../../../../../node_modules/react-stately/dist/private/collections/Item.js";
|
|
10
|
+
import { useTheme as ro } from "styled-components";
|
|
11
|
+
import { OutlineContainer as no } from "../../../outline-container/index.js";
|
|
12
|
+
import { StyledTextInputContainer as so } from "../../../styles.js";
|
|
13
13
|
import { Popover as ye } from "../../../utils/popover/index.js";
|
|
14
|
-
import { Option as
|
|
15
|
-
import { StyledStatusMessage as
|
|
16
|
-
import { describeSelection as
|
|
17
|
-
import { Icon as
|
|
18
|
-
import { IconButton as
|
|
14
|
+
import { Option as lo } from "../option/index.js";
|
|
15
|
+
import { StyledStatusMessage as ao, ChevronIconButton as co, StyledMenu as ve, StyledDropdown as xe, StyledGroupHeader as io, StyledEmptyMessage as po } from "../styles.js";
|
|
16
|
+
import { describeSelection as uo, toSelection as $e } from "../utils.js";
|
|
17
|
+
import { Icon as Y } from "../../../../icon/index.js";
|
|
18
|
+
import { IconButton as fo } from "../../../../icon-button/index.js";
|
|
19
19
|
import "../../../../typography/heading/index.js";
|
|
20
20
|
import "../../../../typography/span/index.js";
|
|
21
|
-
import { Text as
|
|
22
|
-
import { useClickOutside as
|
|
23
|
-
const
|
|
21
|
+
import { Text as q } from "../../../../typography/text/index.js";
|
|
22
|
+
import { useClickOutside as ho } from "../../../../../hooks/use-click-outside.js";
|
|
23
|
+
const Vo = ({
|
|
24
24
|
field: i,
|
|
25
25
|
disabled: h = !1,
|
|
26
26
|
disabledKeys: w,
|
|
27
|
-
error:
|
|
28
|
-
helpLink:
|
|
29
|
-
helpLinkText:
|
|
30
|
-
helpText:
|
|
31
|
-
label:
|
|
32
|
-
loadingItems:
|
|
27
|
+
error: be,
|
|
28
|
+
helpLink: we,
|
|
29
|
+
helpLinkText: Se,
|
|
30
|
+
helpText: Be,
|
|
31
|
+
label: J,
|
|
32
|
+
loadingItems: P,
|
|
33
33
|
name: l,
|
|
34
|
-
multiSelection:
|
|
34
|
+
multiSelection: r = !1,
|
|
35
35
|
items: o,
|
|
36
|
-
onBlur:
|
|
36
|
+
onBlur: K,
|
|
37
37
|
onChange: d,
|
|
38
|
-
onClear:
|
|
39
|
-
placeholder:
|
|
40
|
-
clearable:
|
|
41
|
-
countLabel:
|
|
42
|
-
emptyMessage:
|
|
43
|
-
statusMessage:
|
|
44
|
-
required:
|
|
38
|
+
onClear: Q,
|
|
39
|
+
placeholder: Ce,
|
|
40
|
+
clearable: Ae = !1,
|
|
41
|
+
countLabel: X,
|
|
42
|
+
emptyMessage: Z,
|
|
43
|
+
statusMessage: _,
|
|
44
|
+
required: Oe,
|
|
45
45
|
setValue: S,
|
|
46
|
-
tooltip:
|
|
47
|
-
value:
|
|
46
|
+
tooltip: ze,
|
|
47
|
+
value: Ie,
|
|
48
48
|
watch: B,
|
|
49
|
-
weight:
|
|
49
|
+
weight: Re
|
|
50
50
|
}) => {
|
|
51
|
-
const m =
|
|
52
|
-
|
|
51
|
+
const m = ro(), G = h ? void 0 : be, a = i?.value ?? Ie, [N, $] = g(() => r ? uo(
|
|
52
|
+
$e(B?.(`${l}Options`)),
|
|
53
53
|
o.map((e) => e.value),
|
|
54
54
|
w ?? [],
|
|
55
55
|
o.find((e) => e.value === "All")?.name,
|
|
56
|
-
|
|
57
|
-
).text : o.find((e) => e.value === a)?.name ?? ""), [
|
|
58
|
-
() =>
|
|
59
|
-
[
|
|
60
|
-
), [
|
|
61
|
-
a !==
|
|
56
|
+
X
|
|
57
|
+
).text : o.find((e) => e.value === a)?.name ?? ""), [ee, C] = g(a), L = (P === !1 || !a) && !r, A = y(
|
|
58
|
+
() => L ? o.find((e) => e.value === a)?.name ?? "" : "",
|
|
59
|
+
[L, a, o]
|
|
60
|
+
), [Fe, Me] = g(a), [ke, oe] = g(A), [De, V] = g(a);
|
|
61
|
+
a !== Fe ? (Me(a), oe(A), !r && (P !== !0 || !a) && a !== De && (V(a), $(
|
|
62
62
|
o.find((e) => e.value === a)?.name ?? ""
|
|
63
|
-
), C(a ?? ""))) :
|
|
64
|
-
const [
|
|
65
|
-
const e =
|
|
63
|
+
), C(a ?? ""))) : L && A !== ke && (oe(A), $(A), C(a ?? ""));
|
|
64
|
+
const [Ge, j] = g(o), [te, O] = g(!1), { contains: T } = _e({ sensitivity: "base" }), H = v(null), U = v(null), z = v(null), I = v(null), re = v(null), R = v(null), W = v(/* @__PURE__ */ new Set()), Ne = y(() => {
|
|
65
|
+
const e = W.current, s = Array.from(w ?? []), p = o.some((n) => n.group !== void 0);
|
|
66
66
|
return o.toSorted((n, f) => {
|
|
67
67
|
if (n.value === "All") return -1;
|
|
68
68
|
if (f.value === "All") return 1;
|
|
@@ -75,7 +75,7 @@ const No = ({
|
|
|
75
75
|
return M.localeCompare(k);
|
|
76
76
|
if (b !== he) return b ? 1 : -1;
|
|
77
77
|
if (b) return 0;
|
|
78
|
-
if (
|
|
78
|
+
if (r) {
|
|
79
79
|
const me = e.has(n.value), ge = e.has(f.value);
|
|
80
80
|
if (me && !ge) return -1;
|
|
81
81
|
if (!me && ge) return 1;
|
|
@@ -84,14 +84,14 @@ const No = ({
|
|
|
84
84
|
}
|
|
85
85
|
if (b !== he) return b ? 1 : -1;
|
|
86
86
|
if (b) return 0;
|
|
87
|
-
if (
|
|
87
|
+
if (r) {
|
|
88
88
|
const M = e.has(n.value), k = e.has(f.value);
|
|
89
89
|
return M && !k ? -1 : !M && k ? 1 : n.name.localeCompare(f.name);
|
|
90
90
|
}
|
|
91
91
|
return 0;
|
|
92
92
|
}).map(
|
|
93
|
-
(n) => T(n.name, N) ||
|
|
94
|
-
|
|
93
|
+
(n) => T(n.name, N) || te ? /* @__PURE__ */ t(
|
|
94
|
+
to,
|
|
95
95
|
{
|
|
96
96
|
"aria-label": n.value,
|
|
97
97
|
hrefLang: n.href,
|
|
@@ -101,165 +101,170 @@ const No = ({
|
|
|
101
101
|
n.value
|
|
102
102
|
) : null
|
|
103
103
|
);
|
|
104
|
-
}, [T, w, N, o,
|
|
104
|
+
}, [T, w, N, o, r, te]), Ve = x(
|
|
105
105
|
(e) => {
|
|
106
106
|
const s = e.split(/,|\s/u).slice(-1)[0].trim();
|
|
107
|
-
$(
|
|
107
|
+
$(r ? s : e), e === "" || e.endsWith(",") ? O(!0) : (O(!1), i || V(e), C((p) => {
|
|
108
108
|
const u = e === "" ? "" : p;
|
|
109
109
|
return i && i.onChange(u), d && d(e), u;
|
|
110
|
-
}),
|
|
110
|
+
}), j(
|
|
111
111
|
o.filter(
|
|
112
|
-
(p) => T(p.name,
|
|
112
|
+
(p) => T(p.name, r ? s : e)
|
|
113
113
|
)
|
|
114
114
|
));
|
|
115
115
|
},
|
|
116
|
-
[T, o, i,
|
|
117
|
-
),
|
|
116
|
+
[T, o, i, r, d]
|
|
117
|
+
), Te = x(
|
|
118
118
|
(e) => {
|
|
119
|
-
$(o.find((s) => s.value === e)?.name ?? ""), C(e ? String(e) : ""), V(i ? e : String(e ?? "")), i && i.onChange(e), d && d(e ? String(e) : ""),
|
|
119
|
+
$(o.find((s) => s.value === e)?.name ?? ""), C(e ? String(e) : ""), V(i ? e : String(e ?? "")), i && i.onChange(e), d && d(e ? String(e) : ""), j(o);
|
|
120
120
|
},
|
|
121
121
|
[o, i, d]
|
|
122
|
-
),
|
|
122
|
+
), ne = x(
|
|
123
123
|
(e) => {
|
|
124
124
|
e.key === "Enter" && e.preventDefault(), O(!1);
|
|
125
125
|
},
|
|
126
126
|
[]
|
|
127
|
-
),
|
|
128
|
-
|
|
129
|
-
}, [i,
|
|
127
|
+
), Ee = x(() => {
|
|
128
|
+
K && K(), i && i.onBlur();
|
|
129
|
+
}, [i, K]), Ke = x(() => {
|
|
130
130
|
O(!0);
|
|
131
|
-
}, []), c =
|
|
132
|
-
allowsCustomValue:
|
|
131
|
+
}, []), c = oo({
|
|
132
|
+
allowsCustomValue: r,
|
|
133
133
|
allowsEmptyCollection: !0,
|
|
134
134
|
disabledKeys: w,
|
|
135
135
|
inputValue: N,
|
|
136
|
-
items:
|
|
136
|
+
items: Ge,
|
|
137
137
|
menuTrigger: "focus",
|
|
138
|
-
shouldCloseOnBlur: !
|
|
139
|
-
selectedKey:
|
|
140
|
-
onBlur:
|
|
141
|
-
onInputChange:
|
|
142
|
-
onKeyDown:
|
|
143
|
-
onKeyUp:
|
|
138
|
+
shouldCloseOnBlur: !r,
|
|
139
|
+
selectedKey: ee,
|
|
140
|
+
onBlur: Ee,
|
|
141
|
+
onInputChange: Ve,
|
|
142
|
+
onKeyDown: ne,
|
|
143
|
+
onKeyUp: Ke,
|
|
144
144
|
onOpenChange(e, s) {
|
|
145
|
-
e &&
|
|
146
|
-
|
|
145
|
+
e && r && B && (W.current = new Set(
|
|
146
|
+
$e(B(`${l}Options`)).filter(Boolean)
|
|
147
147
|
)), O(
|
|
148
148
|
e && (s === "manual" || s === "focus")
|
|
149
149
|
), e && s !== "focus" && requestAnimationFrame(() => {
|
|
150
|
-
|
|
150
|
+
H.current?.focus();
|
|
151
151
|
});
|
|
152
152
|
},
|
|
153
|
-
onSelectionChange:
|
|
154
|
-
children:
|
|
155
|
-
}),
|
|
156
|
-
$(""), C(null),
|
|
153
|
+
onSelectionChange: r ? void 0 : Te,
|
|
154
|
+
children: Ne
|
|
155
|
+
}), Le = x(() => {
|
|
156
|
+
$(""), C(null), j(o), c.setSelectedKey(null), c.setInputValue(""), i || V(""), d && d(""), r && S && (S(`${l}Options`, []), S(`${l}CheckAll`, "")), Q?.();
|
|
157
157
|
}, [
|
|
158
158
|
i,
|
|
159
159
|
o,
|
|
160
|
-
|
|
160
|
+
r,
|
|
161
161
|
l,
|
|
162
|
-
|
|
162
|
+
Q,
|
|
163
163
|
d,
|
|
164
164
|
S,
|
|
165
165
|
c
|
|
166
166
|
]), {
|
|
167
|
-
buttonProps:
|
|
168
|
-
inputProps:
|
|
169
|
-
listBoxProps:
|
|
170
|
-
} =
|
|
167
|
+
buttonProps: je,
|
|
168
|
+
inputProps: He,
|
|
169
|
+
listBoxProps: Ue
|
|
170
|
+
} = Ze(
|
|
171
171
|
{
|
|
172
172
|
inputValue: N,
|
|
173
|
-
buttonRef:
|
|
173
|
+
buttonRef: U,
|
|
174
174
|
id: l,
|
|
175
|
-
inputRef:
|
|
176
|
-
label:
|
|
175
|
+
inputRef: H,
|
|
176
|
+
label: J ?? l,
|
|
177
177
|
listBoxRef: z,
|
|
178
178
|
name: l,
|
|
179
|
-
placeholder:
|
|
179
|
+
placeholder: Ce,
|
|
180
180
|
popoverRef: R
|
|
181
181
|
},
|
|
182
182
|
c
|
|
183
|
-
), { listBoxProps:
|
|
183
|
+
), { listBoxProps: se } = eo(Ue, c, z), { buttonProps: We } = Xe(je, U), { width: le } = I.current?.getBoundingClientRect() ?? {
|
|
184
184
|
width: 240
|
|
185
185
|
};
|
|
186
|
-
|
|
187
|
-
c.isOpen && !
|
|
186
|
+
ho(I, () => {
|
|
187
|
+
c.isOpen && !r && c.close();
|
|
188
188
|
}, [R]);
|
|
189
|
-
const F = Array.from(c.collection),
|
|
190
|
-
(e) => e.key === "All" ||
|
|
191
|
-
) : -1,
|
|
189
|
+
const F = Array.from(c.collection), ae = r ? F.findLastIndex(
|
|
190
|
+
(e) => e.key === "All" || W.current.has(String(e.key))
|
|
191
|
+
) : -1, Ye = y(() => o.map((e) => e.value), [o]), ce = y(
|
|
192
192
|
() => new Map(o.map((e) => [e.value, e.group])),
|
|
193
193
|
[o]
|
|
194
|
-
),
|
|
194
|
+
), qe = y(
|
|
195
195
|
() => new Map(o.map((e) => [e.value, e.tag])),
|
|
196
196
|
[o]
|
|
197
|
-
),
|
|
197
|
+
), Je = y(
|
|
198
198
|
() => new Map(o.map((e) => [e.value, e.icon])),
|
|
199
199
|
[o]
|
|
200
200
|
), E = y(() => F.reduce(
|
|
201
201
|
(e, s, p) => {
|
|
202
|
-
const u =
|
|
202
|
+
const u = ce.get(String(s.key));
|
|
203
203
|
return u !== void 0 && u !== e.currentGroup ? (e.result.push({ type: "header", group: u }), e.currentGroup = u) : u === void 0 && e.currentGroup !== void 0 && (e.currentGroup = void 0), e.result.push({ type: "item", index: p }), e;
|
|
204
204
|
},
|
|
205
205
|
{ result: [], currentGroup: void 0 }
|
|
206
|
-
).result, [F,
|
|
206
|
+
).result, [F, ce]), ie = Qe({
|
|
207
207
|
count: E.length,
|
|
208
208
|
estimateSize: (e) => E[e].type === "header" ? 44 : 28,
|
|
209
209
|
getScrollElement: () => z.current,
|
|
210
210
|
useFlushSync: !1
|
|
211
|
-
}),
|
|
211
|
+
}), pe = c.isOpen && !h, ue = pe && !!_, fe = pe && o.length === 0 && !!Z, Pe = x(
|
|
212
212
|
(e) => {
|
|
213
213
|
e.preventDefault();
|
|
214
214
|
},
|
|
215
215
|
[]
|
|
216
|
-
), de =
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
216
|
+
), de = ue ? /* @__PURE__ */ t(
|
|
217
|
+
ao,
|
|
218
|
+
{
|
|
219
|
+
"aria-live": "polite",
|
|
220
|
+
onMouseDown: Pe,
|
|
221
|
+
role: "status",
|
|
222
|
+
children: /* @__PURE__ */ t(
|
|
223
|
+
q,
|
|
224
|
+
{
|
|
225
|
+
color: m.palette.gray[400],
|
|
226
|
+
size: "md",
|
|
227
|
+
textOverflow: "auto",
|
|
228
|
+
whiteSpace: "wrap",
|
|
229
|
+
children: _
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
}
|
|
228
233
|
) : null;
|
|
229
234
|
return /* @__PURE__ */ D(
|
|
230
|
-
|
|
235
|
+
no,
|
|
231
236
|
{
|
|
232
|
-
containerRef:
|
|
237
|
+
containerRef: re,
|
|
233
238
|
error: G,
|
|
234
|
-
helpLink:
|
|
235
|
-
helpLinkText:
|
|
236
|
-
helpText:
|
|
239
|
+
helpLink: we,
|
|
240
|
+
helpLinkText: Se,
|
|
241
|
+
helpText: Be,
|
|
237
242
|
htmlFor: l,
|
|
238
243
|
id: `combobox-${l}`,
|
|
239
|
-
label:
|
|
240
|
-
required:
|
|
241
|
-
tooltip:
|
|
242
|
-
weight:
|
|
244
|
+
label: J,
|
|
245
|
+
required: Oe,
|
|
246
|
+
tooltip: ze,
|
|
247
|
+
weight: Re,
|
|
243
248
|
children: [
|
|
244
249
|
/* @__PURE__ */ D(
|
|
245
|
-
|
|
250
|
+
so,
|
|
246
251
|
{
|
|
247
252
|
className: `${h ? "disabled" : ""} ${G ? "error" : ""}`,
|
|
248
253
|
ref: I,
|
|
249
254
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ t(
|
|
251
256
|
"input",
|
|
252
257
|
{
|
|
253
|
-
...
|
|
258
|
+
...He,
|
|
254
259
|
"aria-invalid": G ? "true" : "false",
|
|
255
260
|
"aria-label": l,
|
|
256
261
|
disabled: h,
|
|
257
|
-
onKeyDown:
|
|
258
|
-
ref:
|
|
262
|
+
onKeyDown: ne,
|
|
263
|
+
ref: H
|
|
259
264
|
}
|
|
260
265
|
),
|
|
261
|
-
G ? /* @__PURE__ */
|
|
262
|
-
|
|
266
|
+
G ? /* @__PURE__ */ t(
|
|
267
|
+
Y,
|
|
263
268
|
{
|
|
264
269
|
icon: "exclamation-circle",
|
|
265
270
|
iconClass: "error-icon",
|
|
@@ -267,14 +272,14 @@ const No = ({
|
|
|
267
272
|
iconSize: "lg"
|
|
268
273
|
}
|
|
269
274
|
) : void 0,
|
|
270
|
-
|
|
271
|
-
|
|
275
|
+
Ae && !h && (r ? (B?.(`${l}Options`)?.length ?? 0) > 0 : ee) ? /* @__PURE__ */ t(
|
|
276
|
+
fo,
|
|
272
277
|
{
|
|
273
278
|
icon: "xmark",
|
|
274
279
|
iconColor: m.palette.gray[400],
|
|
275
280
|
iconSize: "sm",
|
|
276
281
|
iconType: "fa-light",
|
|
277
|
-
onClick:
|
|
282
|
+
onClick: Le,
|
|
278
283
|
px: 0.125,
|
|
279
284
|
py: 0.125,
|
|
280
285
|
type: "reset",
|
|
@@ -282,19 +287,19 @@ const No = ({
|
|
|
282
287
|
}
|
|
283
288
|
) : void 0,
|
|
284
289
|
/* @__PURE__ */ D(
|
|
285
|
-
|
|
290
|
+
co,
|
|
286
291
|
{
|
|
287
|
-
...
|
|
292
|
+
...We,
|
|
288
293
|
$variant: "ghost",
|
|
289
294
|
className: `action ${c.isOpen && !h ? "open" : "closed"}`,
|
|
290
295
|
disabled: h,
|
|
291
296
|
px: 0.125,
|
|
292
297
|
py: 0.125,
|
|
293
|
-
ref:
|
|
298
|
+
ref: U,
|
|
294
299
|
type: "button",
|
|
295
300
|
children: [
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
|
|
301
|
+
/* @__PURE__ */ t("div", { className: "chevron-down", children: /* @__PURE__ */ t(
|
|
302
|
+
Y,
|
|
298
303
|
{
|
|
299
304
|
clickable: !1,
|
|
300
305
|
icon: "chevron-down",
|
|
@@ -303,8 +308,8 @@ const No = ({
|
|
|
303
308
|
iconType: "fa-light"
|
|
304
309
|
}
|
|
305
310
|
) }),
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
|
|
311
|
+
/* @__PURE__ */ t("div", { className: "chevron-up", children: /* @__PURE__ */ t(
|
|
312
|
+
Y,
|
|
308
313
|
{
|
|
309
314
|
clickable: !1,
|
|
310
315
|
icon: "chevron-up",
|
|
@@ -319,7 +324,7 @@ const No = ({
|
|
|
319
324
|
]
|
|
320
325
|
}
|
|
321
326
|
),
|
|
322
|
-
c.isOpen && c.collection.size > 0 && !h ? /* @__PURE__ */
|
|
327
|
+
c.isOpen && c.collection.size > 0 && !h ? /* @__PURE__ */ t(
|
|
323
328
|
ye,
|
|
324
329
|
{
|
|
325
330
|
className: "dropdown",
|
|
@@ -329,26 +334,25 @@ const No = ({
|
|
|
329
334
|
popoverRef: R,
|
|
330
335
|
state: c,
|
|
331
336
|
triggerRef: I,
|
|
332
|
-
children: /* @__PURE__ */ D(
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
/* @__PURE__ */ r(
|
|
337
|
+
children: /* @__PURE__ */ D(ve, { $width: le, children: [
|
|
338
|
+
de,
|
|
339
|
+
/* @__PURE__ */ t(
|
|
340
|
+
xe,
|
|
341
|
+
{
|
|
342
|
+
...se,
|
|
343
|
+
$multiSelection: r && !Array.from(w ?? []).includes("All"),
|
|
344
|
+
ref: z,
|
|
345
|
+
children: /* @__PURE__ */ t(
|
|
342
346
|
"div",
|
|
343
347
|
{
|
|
344
348
|
style: {
|
|
345
|
-
height: `${
|
|
349
|
+
height: `${ie.getTotalSize()}px`,
|
|
346
350
|
position: "relative"
|
|
347
351
|
},
|
|
348
|
-
children:
|
|
352
|
+
children: ie.getVirtualItems().map((e) => {
|
|
349
353
|
const s = E[e.index];
|
|
350
354
|
if (s.type === "header")
|
|
351
|
-
return /* @__PURE__ */
|
|
355
|
+
return /* @__PURE__ */ t(
|
|
352
356
|
"div",
|
|
353
357
|
{
|
|
354
358
|
style: {
|
|
@@ -359,8 +363,8 @@ const No = ({
|
|
|
359
363
|
height: `${e.size}px`,
|
|
360
364
|
transform: `translateY(${e.start}px)`
|
|
361
365
|
},
|
|
362
|
-
children: /* @__PURE__ */
|
|
363
|
-
|
|
366
|
+
children: /* @__PURE__ */ t(io, { children: /* @__PURE__ */ t(
|
|
367
|
+
q,
|
|
364
368
|
{
|
|
365
369
|
color: m.palette.gray[400],
|
|
366
370
|
fontWeight: "bold",
|
|
@@ -371,8 +375,8 @@ const No = ({
|
|
|
371
375
|
},
|
|
372
376
|
`header-${e.index}`
|
|
373
377
|
);
|
|
374
|
-
const p = F[s.index], u = E[e.index + 1], n = p.key === "All" && u?.type === "header", f =
|
|
375
|
-
return /* @__PURE__ */
|
|
378
|
+
const p = F[s.index], u = E[e.index + 1], n = p.key === "All" && u?.type === "header", f = r && s.index === ae && ae >= 0 && s.index < F.length - 1 && !n;
|
|
379
|
+
return /* @__PURE__ */ t(
|
|
376
380
|
"div",
|
|
377
381
|
{
|
|
378
382
|
style: {
|
|
@@ -384,21 +388,21 @@ const No = ({
|
|
|
384
388
|
transform: `translateY(${e.start}px)`,
|
|
385
389
|
borderBottom: f ? `1px solid ${m.palette.gray[200]}` : void 0
|
|
386
390
|
},
|
|
387
|
-
children: /* @__PURE__ */
|
|
388
|
-
|
|
391
|
+
children: /* @__PURE__ */ t(
|
|
392
|
+
lo,
|
|
389
393
|
{
|
|
390
|
-
allItemKeys:
|
|
391
|
-
containerRef:
|
|
392
|
-
countLabel:
|
|
393
|
-
icon:
|
|
394
|
+
allItemKeys: Ye,
|
|
395
|
+
containerRef: re,
|
|
396
|
+
countLabel: X,
|
|
397
|
+
icon: Je.get(String(p.key)),
|
|
394
398
|
item: p,
|
|
395
|
-
multiSelection:
|
|
399
|
+
multiSelection: r,
|
|
396
400
|
name: l,
|
|
397
401
|
popoverRef: R,
|
|
398
402
|
setInputValue: $,
|
|
399
403
|
setValue: S,
|
|
400
404
|
state: c,
|
|
401
|
-
tag:
|
|
405
|
+
tag: qe.get(String(p.key)),
|
|
402
406
|
watch: B
|
|
403
407
|
}
|
|
404
408
|
)
|
|
@@ -407,13 +411,12 @@ const No = ({
|
|
|
407
411
|
);
|
|
408
412
|
})
|
|
409
413
|
}
|
|
410
|
-
)
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
)
|
|
414
|
+
)
|
|
415
|
+
}
|
|
416
|
+
)
|
|
417
|
+
] })
|
|
415
418
|
}
|
|
416
|
-
) : !fe && !
|
|
419
|
+
) : !fe && !ue ? null : /* @__PURE__ */ t(
|
|
417
420
|
ye,
|
|
418
421
|
{
|
|
419
422
|
className: "dropdown",
|
|
@@ -423,29 +426,27 @@ const No = ({
|
|
|
423
426
|
popoverRef: R,
|
|
424
427
|
state: c,
|
|
425
428
|
triggerRef: I,
|
|
426
|
-
children: /* @__PURE__ */ D(
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
J,
|
|
429
|
+
children: /* @__PURE__ */ D(ve, { $width: le, children: [
|
|
430
|
+
de,
|
|
431
|
+
/* @__PURE__ */ t(
|
|
432
|
+
xe,
|
|
433
|
+
{
|
|
434
|
+
...se,
|
|
435
|
+
$multiSelection: !1,
|
|
436
|
+
ref: z,
|
|
437
|
+
children: fe ? /* @__PURE__ */ t(po, { children: /* @__PURE__ */ t(
|
|
438
|
+
q,
|
|
437
439
|
{
|
|
438
|
-
color: m.palette.gray[
|
|
440
|
+
color: m.palette.gray[600],
|
|
439
441
|
size: "md",
|
|
440
442
|
textOverflow: "auto",
|
|
441
443
|
whiteSpace: "wrap",
|
|
442
|
-
children:
|
|
444
|
+
children: Z
|
|
443
445
|
}
|
|
444
|
-
) }) : null
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
)
|
|
446
|
+
) }) : null
|
|
447
|
+
}
|
|
448
|
+
)
|
|
449
|
+
] })
|
|
449
450
|
}
|
|
450
451
|
)
|
|
451
452
|
]
|
|
@@ -453,5 +454,5 @@ const No = ({
|
|
|
453
454
|
);
|
|
454
455
|
};
|
|
455
456
|
export {
|
|
456
|
-
|
|
457
|
+
Vo as ComboBoxField
|
|
457
458
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
$hasStatus: boolean;
|
|
3
|
-
$multiSelection: boolean;
|
|
1
|
+
declare const StyledMenu: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$width"> & {
|
|
4
2
|
$width: number;
|
|
5
|
-
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<
|
|
6
|
-
$hasStatus: boolean;
|
|
7
|
-
$multiSelection: boolean;
|
|
3
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$width"> & {
|
|
8
4
|
$width: number;
|
|
9
5
|
}, never>>> & string;
|
|
6
|
+
declare const StyledDropdown: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "$multiSelection"> & {
|
|
7
|
+
$multiSelection: boolean;
|
|
8
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "$multiSelection"> & {
|
|
9
|
+
$multiSelection: boolean;
|
|
10
|
+
}, never>>> & string;
|
|
10
11
|
declare const StyledOption: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "$multiSelection"> & {
|
|
11
12
|
$multiSelection: boolean;
|
|
12
13
|
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "$multiSelection"> & {
|
|
@@ -73,5 +74,5 @@ declare const ChevronIconButton: import('styled-components/dist/types').IStyledC
|
|
|
73
74
|
forwardedAs?: import('styled-components').WebTarget | undefined;
|
|
74
75
|
}, never>>> & string;
|
|
75
76
|
declare const StyledGroupHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>>> & string;
|
|
76
|
-
declare const StyledStatusMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').
|
|
77
|
-
export { StyledDropdown, StyledOption, StyledEmptyMessage, StyledGroupHeader, StyledStatusMessage, ChevronIconButton, };
|
|
77
|
+
declare const StyledStatusMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
78
|
+
export { StyledDropdown, StyledMenu, StyledOption, StyledEmptyMessage, StyledGroupHeader, StyledStatusMessage, ChevronIconButton, };
|
|
@@ -1,42 +1,45 @@
|
|
|
1
1
|
import { styled as n } from "styled-components";
|
|
2
|
-
import { LabelText as
|
|
3
|
-
import { StyledIconButton as
|
|
4
|
-
const
|
|
5
|
-
${({ theme:
|
|
2
|
+
import { LabelText as i } from "../../../checkbox/styles.js";
|
|
3
|
+
import { StyledIconButton as p } from "../../../icon-button/styles.js";
|
|
4
|
+
const s = n.div`
|
|
5
|
+
${({ theme: o, $width: a }) => `
|
|
6
6
|
align-self: center;
|
|
7
|
-
background: ${
|
|
8
|
-
border: 1px solid ${
|
|
9
|
-
border-radius: ${
|
|
10
|
-
box-shadow: ${
|
|
7
|
+
background: ${o.palette.white};
|
|
8
|
+
border: 1px solid ${o.palette.gray[200]};
|
|
9
|
+
border-radius: ${o.spacing[0.5]};
|
|
10
|
+
box-shadow: ${o.shadows.md};
|
|
11
|
+
min-width: ${a < 240 ? a : 240}px;
|
|
12
|
+
padding: ${o.spacing[0.25]} 0;
|
|
13
|
+
width: 95%;
|
|
14
|
+
`}
|
|
15
|
+
`, d = n.ul`
|
|
16
|
+
${({ theme: o, $multiSelection: a }) => `
|
|
11
17
|
list-style: none;
|
|
12
18
|
max-height: 200px;
|
|
13
|
-
min-width: ${i < 240 ? i : 240}px;
|
|
14
19
|
overflow: hidden auto;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
scroll-padding: ${a.spacing[0.5]};
|
|
18
|
-
width: 95%;
|
|
20
|
+
scrollbar-color: ${o.palette.gray[600]} ${o.palette.gray[100]};
|
|
21
|
+
scroll-padding: ${o.spacing[0.5]};
|
|
19
22
|
|
|
20
23
|
> li:first-child {
|
|
21
|
-
border-bottom: ${
|
|
24
|
+
border-bottom: ${a ? `1px solid ${o.palette.gray[200]}` : "unset"};
|
|
22
25
|
}
|
|
23
26
|
`}
|
|
24
|
-
`,
|
|
25
|
-
${({ theme:
|
|
27
|
+
`, c = n.li`
|
|
28
|
+
${({ theme: o, $multiSelection: a }) => `
|
|
26
29
|
align-items: center;
|
|
27
|
-
background: ${
|
|
28
|
-
color: ${
|
|
30
|
+
background: ${o.palette.white};
|
|
31
|
+
color: ${o.palette.gray[800]};
|
|
29
32
|
cursor: pointer;
|
|
30
33
|
display: flex;
|
|
31
|
-
gap: ${
|
|
34
|
+
gap: ${o.spacing[0.5]};
|
|
32
35
|
justify-content: space-between;
|
|
33
|
-
line-height: ${
|
|
34
|
-
padding: ${
|
|
36
|
+
line-height: ${o.spacing[1.25]};
|
|
37
|
+
padding: ${a ? `${o.spacing[0.125]} ${o.spacing[0.75]}` : `${o.spacing[0.25]} ${o.spacing[1]}`};
|
|
35
38
|
|
|
36
39
|
a, p, label {
|
|
37
40
|
display: inline-flex;
|
|
38
41
|
overflow: hidden;
|
|
39
|
-
padding: ${
|
|
42
|
+
padding: ${a ? o.spacing[0.25] : "0"};
|
|
40
43
|
width: 100%;
|
|
41
44
|
}
|
|
42
45
|
|
|
@@ -51,30 +54,30 @@ const d = n.ul`
|
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
span {
|
|
54
|
-
color: ${
|
|
57
|
+
color: ${o.palette.gray[700]};
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
.option-icon {
|
|
58
|
-
color: ${
|
|
59
|
-
margin-right: ${
|
|
61
|
+
color: ${o.palette.gray[800]};
|
|
62
|
+
margin-right: ${o.spacing[0.5]};
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
.option-name {
|
|
63
|
-
color: ${
|
|
66
|
+
color: ${o.palette.gray[800]};
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
&:hover:not(.disabled, .selected) {
|
|
67
|
-
background: ${
|
|
70
|
+
background: ${o.palette.gray[50]};
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
&.selected {
|
|
71
|
-
background: ${
|
|
74
|
+
background: ${a ? o.palette.white : o.palette.gray[100]};
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
&.disabled {
|
|
75
78
|
cursor: not-allowed;
|
|
76
79
|
|
|
77
|
-
input:disabled ~ ${
|
|
80
|
+
input:disabled ~ ${i} {
|
|
78
81
|
opacity: 1;
|
|
79
82
|
}
|
|
80
83
|
|
|
@@ -83,29 +86,24 @@ const d = n.ul`
|
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
.option-name {
|
|
86
|
-
color: ${
|
|
89
|
+
color: ${o.palette.gray[600]};
|
|
87
90
|
opacity: 0.5;
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
93
|
`}
|
|
91
|
-
`,
|
|
92
|
-
${({ theme:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
gap: ${a.spacing[0.5]};
|
|
97
|
-
justify-content: space-between;
|
|
98
|
-
line-height: ${a.spacing[1.25]};
|
|
99
|
-
padding: ${a.spacing[0.25]} ${a.spacing[1]};
|
|
100
|
-
size: 28;
|
|
94
|
+
`, g = n.li`
|
|
95
|
+
${({ theme: o }) => `
|
|
96
|
+
line-height: ${o.spacing[1.25]};
|
|
97
|
+
padding: ${o.spacing[1]};
|
|
98
|
+
text-align: center;
|
|
101
99
|
`}
|
|
102
|
-
`,
|
|
103
|
-
${({ disabled:
|
|
100
|
+
`, e = n(p)`
|
|
101
|
+
${({ disabled: o, theme: a }) => `
|
|
104
102
|
position: relative;
|
|
105
103
|
|
|
106
104
|
& .chevron-down span,
|
|
107
105
|
& .chevron-up span {
|
|
108
|
-
${
|
|
106
|
+
${o ? `color: ${a.palette.gray[300]};` : ""}
|
|
109
107
|
}
|
|
110
108
|
|
|
111
109
|
/* CLOSE STATE */
|
|
@@ -122,36 +120,40 @@ const d = n.ul`
|
|
|
122
120
|
display: none;
|
|
123
121
|
}
|
|
124
122
|
`}
|
|
125
|
-
`,
|
|
126
|
-
${({ theme:
|
|
127
|
-
border-top: 1px solid ${
|
|
128
|
-
color: ${
|
|
123
|
+
`, $ = n.li`
|
|
124
|
+
${({ theme: o }) => `
|
|
125
|
+
border-top: 1px solid ${o.palette.gray[200]};
|
|
126
|
+
color: ${o.palette.gray[400]};
|
|
129
127
|
cursor: default;
|
|
130
128
|
font-weight: bold;
|
|
131
|
-
line-height: ${
|
|
132
|
-
margin-bottom: ${
|
|
133
|
-
margin-top: ${
|
|
134
|
-
padding: ${
|
|
129
|
+
line-height: ${o.spacing[1.25]};
|
|
130
|
+
margin-bottom: ${o.spacing[0.625]};
|
|
131
|
+
margin-top: ${o.spacing[0.625]};
|
|
132
|
+
padding: ${o.spacing[0.25]} ${o.spacing[1]};
|
|
135
133
|
user-select: none;
|
|
136
134
|
`}
|
|
137
|
-
`,
|
|
138
|
-
${({ theme:
|
|
139
|
-
|
|
140
|
-
border-top: 1px solid ${a.palette.gray[200]};
|
|
141
|
-
bottom: 0;
|
|
142
|
-
color: ${a.palette.gray[400]};
|
|
135
|
+
`, y = n.div`
|
|
136
|
+
${({ theme: o }) => `
|
|
137
|
+
border-bottom: 1px solid ${o.palette.gray[200]};
|
|
143
138
|
cursor: default;
|
|
144
|
-
line-height: ${
|
|
145
|
-
|
|
146
|
-
|
|
139
|
+
line-height: ${o.spacing[1.25]};
|
|
140
|
+
margin-bottom: ${o.spacing[0.5]};
|
|
141
|
+
padding: ${o.spacing[0.25]} ${o.spacing[1]} ${o.spacing[0.75]};
|
|
147
142
|
user-select: none;
|
|
143
|
+
|
|
144
|
+
&:has(+ ul:empty) {
|
|
145
|
+
border-bottom: none;
|
|
146
|
+
margin-bottom: 0;
|
|
147
|
+
padding-bottom: ${o.spacing[0.25]};
|
|
148
|
+
}
|
|
148
149
|
`}
|
|
149
150
|
`;
|
|
150
151
|
export {
|
|
151
|
-
|
|
152
|
+
e as ChevronIconButton,
|
|
152
153
|
d as StyledDropdown,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
g as StyledEmptyMessage,
|
|
155
|
+
$ as StyledGroupHeader,
|
|
156
|
+
s as StyledMenu,
|
|
157
|
+
c as StyledOption,
|
|
158
|
+
y as StyledStatusMessage
|
|
157
159
|
};
|
|
@@ -62,8 +62,8 @@ interface IOptionProps<T> {
|
|
|
62
62
|
* @property { Function } [onChange] - The callback to be called on input change.
|
|
63
63
|
* @property { string } [placeholder] - The placeholder for the input.
|
|
64
64
|
* @property { string } [emptyMessage] - Message shown when no items are present.
|
|
65
|
-
* @property { string } [statusMessage] - Message
|
|
66
|
-
*
|
|
65
|
+
* @property { string } [statusMessage] - Message fixed at the top of the
|
|
66
|
+
* dropdown, above the items it describes.
|
|
67
67
|
* @property { boolean } [clearable] - Whether the clear button is shown.
|
|
68
68
|
* @property {Function} [onClear] - Called when the clear button is clicked.
|
|
69
69
|
* @property { string } [countLabel] - Plural noun that summarizes two or
|
|
@@ -9,7 +9,6 @@ import { Thumb as k } from "./thumb/index.js";
|
|
|
9
9
|
import { normalizeValue as v } from "./utils.js";
|
|
10
10
|
import { Container as w } from "../container/index.js";
|
|
11
11
|
import { OutlineContainer as y } from "../inputs/outline-container/index.js";
|
|
12
|
-
import "../inputs/styles.js";
|
|
13
12
|
import "../checkbox/index.js";
|
|
14
13
|
import "../icon/index.js";
|
|
15
14
|
import "../../_virtual/lodash.js";
|
|
@@ -23,7 +22,7 @@ import "react-dom";
|
|
|
23
22
|
import "../layout/categories/buttons/index.js";
|
|
24
23
|
import "../inputs/utils/action-button/index.js";
|
|
25
24
|
import "../../node_modules/react-international-phone/dist/index.js";
|
|
26
|
-
const
|
|
25
|
+
const ee = (o) => {
|
|
27
26
|
const p = S(), m = $(null), { label: s, minValue: i = 0, maxValue: n = 100, name: r, setValue: d, watch: c } = o, a = x(), t = V({
|
|
28
27
|
...o,
|
|
29
28
|
numberFormatter: a,
|
|
@@ -76,6 +75,6 @@ const re = (o) => {
|
|
|
76
75
|
) });
|
|
77
76
|
};
|
|
78
77
|
export {
|
|
79
|
-
|
|
78
|
+
ee as Slider,
|
|
80
79
|
x as useNumberFormatter
|
|
81
80
|
};
|
package/package.json
CHANGED