@phillips/seldon 1.146.0 → 1.146.2
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/_virtual/index5.js +2 -2
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/_virtual/index8.js +2 -2
- package/dist/components/ComboBox/ComboBox.d.ts +8 -0
- package/dist/components/ComboBox/ComboBox.js +31 -29
- package/dist/components/ComboBox/ComboBox.stories.d.ts +1 -0
- package/dist/node_modules/exenv/index.js +1 -1
- package/dist/node_modules/ics/dist/index.js +2 -2
- package/dist/node_modules/ics/dist/pipeline/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +1 -2
- package/package.json +1 -1
package/dist/_virtual/index5.js
CHANGED
package/dist/_virtual/index6.js
CHANGED
package/dist/_virtual/index7.js
CHANGED
package/dist/_virtual/index8.js
CHANGED
|
@@ -55,6 +55,14 @@ export interface ComboBoxProps {
|
|
|
55
55
|
* If true, the input will be cleared when the user clicks away when the input value is not in the options list.
|
|
56
56
|
*/
|
|
57
57
|
autoClearInput?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* popoverContainer ref for the ComboBox
|
|
60
|
+
*/
|
|
61
|
+
popoverContainerRef?: React.RefObject<HTMLElement>;
|
|
62
|
+
/**
|
|
63
|
+
* No options message translation
|
|
64
|
+
*/
|
|
65
|
+
noOptionsMessage?: string;
|
|
58
66
|
}
|
|
59
67
|
/**
|
|
60
68
|
* ## Overview
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { Root as
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Root as T, Trigger as j, Portal as F, Content as K } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
3
3
|
import p from "../../node_modules/classnames/index.js";
|
|
4
|
-
import { Command as w, CommandInput as
|
|
4
|
+
import { Command as w, CommandInput as G, CommandList as X, CommandGroup as q, CommandItem as z } from "../../node_modules/cmdk/dist/index.js";
|
|
5
5
|
import l from "react";
|
|
6
|
-
import { useOnClickOutside as
|
|
6
|
+
import { useOnClickOutside as A } from "../../node_modules/usehooks-ts/dist/index.js";
|
|
7
7
|
import "../../assets/formatted/AccountActive.js";
|
|
8
8
|
import "../../assets/formatted/Account.js";
|
|
9
9
|
import "../../assets/formatted/Add.js";
|
|
@@ -14,11 +14,11 @@ import "../../assets/formatted/ArrowRight.js";
|
|
|
14
14
|
import "../../assets/formatted/ArrowUp.js";
|
|
15
15
|
import "../../assets/formatted/Bag.js";
|
|
16
16
|
import "../../assets/formatted/Calendar.js";
|
|
17
|
-
import
|
|
17
|
+
import H from "../../assets/formatted/ChevronDown.js";
|
|
18
18
|
import "../../assets/formatted/ChevronLeft.js";
|
|
19
19
|
import "../../assets/formatted/ChevronRight.js";
|
|
20
20
|
import "../../assets/formatted/ChevronUp.js";
|
|
21
|
-
import
|
|
21
|
+
import J from "../../assets/formatted/CloseX.js";
|
|
22
22
|
import "../../assets/formatted/ConditionReport.js";
|
|
23
23
|
import "../../assets/formatted/Delete.js";
|
|
24
24
|
import "../../assets/formatted/Download.js";
|
|
@@ -68,9 +68,9 @@ import "../../assets/formatted/VolumeMaximum.js";
|
|
|
68
68
|
import "../../assets/formatted/VolumeMid.js";
|
|
69
69
|
import "../../assets/formatted/VolumeMinimum.js";
|
|
70
70
|
import "../../assets/formatted/WeChat.js";
|
|
71
|
-
import { getCommonProps as
|
|
71
|
+
import { getCommonProps as M } from "../../utils/index.js";
|
|
72
72
|
import { getScssVar as v } from "../../utils/scssUtils.js";
|
|
73
|
-
const
|
|
73
|
+
const Q = l.forwardRef(function({
|
|
74
74
|
options: N = [],
|
|
75
75
|
className: g,
|
|
76
76
|
id: r,
|
|
@@ -84,18 +84,20 @@ const J = l.forwardRef(function({
|
|
|
84
84
|
ariaLabelContent: _,
|
|
85
85
|
hideLabel: R = !1,
|
|
86
86
|
autoClearInput: O = !0,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
popoverContainerRef: k,
|
|
88
|
+
noOptionsMessage: y = "No Options.",
|
|
89
|
+
...I
|
|
90
|
+
}, S) {
|
|
91
|
+
const { className: e, ...B } = M({ id: r }, "ComboBox"), [C, s] = l.useState(!1), $ = l.useRef(null), P = H, D = J, b = l.useRef(null), E = l.useRef({}), n = N.filter(
|
|
90
92
|
(o) => o.value.toLowerCase().includes(m.toLowerCase()) || o.label && o.label.toLowerCase().includes(m.toLowerCase())
|
|
91
93
|
);
|
|
92
|
-
return
|
|
94
|
+
return A(b, (o) => {
|
|
93
95
|
if (o.target.closest(`.${e}__item`) || o.target.closest(`.${e}__content`))
|
|
94
96
|
return;
|
|
95
|
-
!
|
|
97
|
+
!n.some(
|
|
96
98
|
(a) => a.value.toLowerCase() === m.toLowerCase()
|
|
97
99
|
) && O && i(""), s(!1), o.stopPropagation();
|
|
98
|
-
}), /* @__PURE__ */ t("div", { ref:
|
|
100
|
+
}), /* @__PURE__ */ t("div", { ref: S, className: p(e, g), id: r, ...B, ...I, children: /* @__PURE__ */ c("div", { ref: b, children: [
|
|
99
101
|
/* @__PURE__ */ t(
|
|
100
102
|
"label",
|
|
101
103
|
{
|
|
@@ -116,10 +118,10 @@ const J = l.forwardRef(function({
|
|
|
116
118
|
o.key === "Escape" && s(!1);
|
|
117
119
|
}, 0);
|
|
118
120
|
},
|
|
119
|
-
children: /* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */ t(
|
|
122
|
-
|
|
121
|
+
children: /* @__PURE__ */ c(T, { open: !0, children: [
|
|
122
|
+
/* @__PURE__ */ c("div", { className: `${e}__input-wrapper`, children: [
|
|
123
|
+
/* @__PURE__ */ t(j, { asChild: !0, children: /* @__PURE__ */ t(
|
|
124
|
+
G,
|
|
123
125
|
{
|
|
124
126
|
ref: $,
|
|
125
127
|
placeholder: x,
|
|
@@ -148,7 +150,7 @@ const J = l.forwardRef(function({
|
|
|
148
150
|
"aria-label": u || `${r}-clear`,
|
|
149
151
|
tabIndex: -1,
|
|
150
152
|
children: /* @__PURE__ */ t("div", { className: `${e}__icon`, children: /* @__PURE__ */ t(
|
|
151
|
-
|
|
153
|
+
D,
|
|
152
154
|
{
|
|
153
155
|
color: v("", "$primary-black"),
|
|
154
156
|
height: 18,
|
|
@@ -173,7 +175,7 @@ const J = l.forwardRef(function({
|
|
|
173
175
|
[`${e}__icon--flipped`]: C
|
|
174
176
|
}),
|
|
175
177
|
children: /* @__PURE__ */ t(
|
|
176
|
-
|
|
178
|
+
P,
|
|
177
179
|
{
|
|
178
180
|
color: v("", "$pure-black"),
|
|
179
181
|
height: 18,
|
|
@@ -186,20 +188,20 @@ const J = l.forwardRef(function({
|
|
|
186
188
|
}
|
|
187
189
|
)
|
|
188
190
|
] }),
|
|
189
|
-
/* @__PURE__ */ t(
|
|
190
|
-
|
|
191
|
+
/* @__PURE__ */ t(F, { container: k?.current, children: /* @__PURE__ */ t(
|
|
192
|
+
K,
|
|
191
193
|
{
|
|
192
194
|
className: `${e}__content`,
|
|
193
195
|
"aria-label": _ || `${r}-content`,
|
|
194
|
-
children: C && /* @__PURE__ */ t(
|
|
196
|
+
children: C && /* @__PURE__ */ t(X, { className: `${e}__list`, children: n.some(
|
|
195
197
|
(o) => o.value.toLowerCase().includes(m.toLowerCase()) || o.label && o.label.toLowerCase().includes(m.toLowerCase())
|
|
196
|
-
) ? /* @__PURE__ */ t(
|
|
198
|
+
) ? /* @__PURE__ */ t(q, { children: n.map(
|
|
197
199
|
(o, h) => (o.value.toLowerCase().includes(m.toLowerCase()) || o.label && o.label.toLowerCase().includes(m.toLowerCase())) && /* @__PURE__ */ t(
|
|
198
|
-
|
|
200
|
+
z,
|
|
199
201
|
{
|
|
200
202
|
className: `${e}__item`,
|
|
201
203
|
value: o.label ? `${o.label} ${o.value}` : o.value,
|
|
202
|
-
ref: (a) =>
|
|
204
|
+
ref: (a) => E.current[o.value] = a,
|
|
203
205
|
onSelect: (a) => {
|
|
204
206
|
i(a), s(!1);
|
|
205
207
|
},
|
|
@@ -207,7 +209,7 @@ const J = l.forwardRef(function({
|
|
|
207
209
|
},
|
|
208
210
|
`${o.value}-${h}`
|
|
209
211
|
)
|
|
210
|
-
) }) : /* @__PURE__ */ t(w.Empty, { children:
|
|
212
|
+
) }) : /* @__PURE__ */ t(w.Empty, { children: y }) })
|
|
211
213
|
}
|
|
212
214
|
) })
|
|
213
215
|
] })
|
|
@@ -215,7 +217,7 @@ const J = l.forwardRef(function({
|
|
|
215
217
|
)
|
|
216
218
|
] }) });
|
|
217
219
|
});
|
|
218
|
-
|
|
220
|
+
Q.displayName = "ComboBox";
|
|
219
221
|
export {
|
|
220
|
-
|
|
222
|
+
Q as default
|
|
221
223
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __exports as l } from "../../../_virtual/
|
|
1
|
+
import { __exports as l } from "../../../_virtual/index7.js";
|
|
2
2
|
import "./pipeline/index.js";
|
|
3
|
-
import { __exports as _ } from "../../../_virtual/
|
|
3
|
+
import { __exports as _ } from "../../../_virtual/index8.js";
|
|
4
4
|
Object.defineProperty(l, "__esModule", {
|
|
5
5
|
value: !0
|
|
6
6
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index6.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
@use '../../../allPartials' as *;
|
|
2
2
|
|
|
3
3
|
.#{$px}-nav__item {
|
|
4
|
-
cursor: pointer;
|
|
5
|
-
|
|
6
4
|
@include isHeaderMobile {
|
|
7
5
|
a {
|
|
8
6
|
white-space: normal;
|
|
@@ -35,6 +33,7 @@
|
|
|
35
33
|
& > button {
|
|
36
34
|
background-color: transparent;
|
|
37
35
|
border: 0;
|
|
36
|
+
cursor: pointer;
|
|
38
37
|
display: flex;
|
|
39
38
|
padding: 0.5rem 0.625rem calc(0.5rem + 2px); // 1 px so that the bottom border of the nav counts as part of the button
|
|
40
39
|
}
|