@box/combobox-with-api 1.17.0 → 1.18.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.
|
@@ -46,12 +46,12 @@ const de = () => /* @__PURE__ */ o(re, {
|
|
|
46
46
|
prop: X,
|
|
47
47
|
defaultProp: B,
|
|
48
48
|
onChange: E
|
|
49
|
-
}), [g,
|
|
49
|
+
}), [g, v] = w(""), x = L(null), c = H({
|
|
50
50
|
includesBaseElement: !0,
|
|
51
51
|
virtualFocus: !1,
|
|
52
52
|
value: g,
|
|
53
53
|
setValue: (e) => {
|
|
54
|
-
|
|
54
|
+
v(e);
|
|
55
55
|
},
|
|
56
56
|
open: f,
|
|
57
57
|
setOpen: (e) => {
|
|
@@ -68,47 +68,49 @@ const de = () => /* @__PURE__ */ o(re, {
|
|
|
68
68
|
[l.hiddenLabel]: d
|
|
69
69
|
}),
|
|
70
70
|
hideLabel: d
|
|
71
|
-
}), /* @__PURE__ */
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
children:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
tooltip: e.displayValue
|
|
84
|
-
}, e.value))
|
|
85
|
-
}), /* @__PURE__ */ s("div", {
|
|
86
|
-
className: l.textInputWrapper,
|
|
87
|
-
children: [/* @__PURE__ */ o(Y, {
|
|
88
|
-
ref: v,
|
|
89
|
-
"aria-haspopup": "tree",
|
|
90
|
-
className: l.textInput,
|
|
91
|
-
"data-target-id": R,
|
|
92
|
-
disabled: z,
|
|
93
|
-
id: n,
|
|
94
|
-
placeholder: j,
|
|
95
|
-
store: c
|
|
96
|
-
}), /* @__PURE__ */ o("div", {
|
|
97
|
-
className: l.comboboxButtons,
|
|
98
|
-
children: I ? /* @__PURE__ */ o(Z, {
|
|
99
|
-
onClick: () => {
|
|
100
|
-
i([]);
|
|
71
|
+
}), /* @__PURE__ */ o("div", {
|
|
72
|
+
children: /* @__PURE__ */ s("div", {
|
|
73
|
+
className: p(l.comboboxContainer, {
|
|
74
|
+
[l.withChips]: V,
|
|
75
|
+
[l.withComboboxButtons]: I
|
|
76
|
+
}),
|
|
77
|
+
children: [V && /* @__PURE__ */ o(oe, {
|
|
78
|
+
children: a.map((e) => /* @__PURE__ */ o(te, {
|
|
79
|
+
label: e.displayValue,
|
|
80
|
+
onDelete: () => {
|
|
81
|
+
const t = a.filter((r) => r.value !== e.value);
|
|
82
|
+
i(t);
|
|
101
83
|
},
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
84
|
+
tooltip: e.displayValue
|
|
85
|
+
}, e.value))
|
|
86
|
+
}), /* @__PURE__ */ s("div", {
|
|
87
|
+
className: l.textInputWrapper,
|
|
88
|
+
children: [/* @__PURE__ */ o(Y, {
|
|
89
|
+
ref: x,
|
|
90
|
+
"aria-haspopup": "tree",
|
|
91
|
+
className: l.textInput,
|
|
92
|
+
"data-target-id": R,
|
|
93
|
+
disabled: z,
|
|
94
|
+
id: n,
|
|
95
|
+
placeholder: j,
|
|
108
96
|
store: c
|
|
109
|
-
})
|
|
97
|
+
}), /* @__PURE__ */ o("div", {
|
|
98
|
+
className: l.comboboxButtons,
|
|
99
|
+
children: I ? /* @__PURE__ */ o(Z, {
|
|
100
|
+
onClick: () => {
|
|
101
|
+
i([]);
|
|
102
|
+
},
|
|
103
|
+
render: (e) => /* @__PURE__ */ o(le, {
|
|
104
|
+
...e,
|
|
105
|
+
"aria-label": "Clear selection",
|
|
106
|
+
icon: ae,
|
|
107
|
+
size: "x-small"
|
|
108
|
+
}),
|
|
109
|
+
store: c
|
|
110
|
+
}) : /* @__PURE__ */ o(de, {})
|
|
111
|
+
})]
|
|
110
112
|
})]
|
|
111
|
-
})
|
|
113
|
+
})
|
|
112
114
|
})]
|
|
113
115
|
})
|
|
114
116
|
}), /* @__PURE__ */ o(_, {
|
|
@@ -126,7 +128,7 @@ const de = () => /* @__PURE__ */ o(re, {
|
|
|
126
128
|
onKeyDown: (e) => {
|
|
127
129
|
if (e.key === "ArrowUp") {
|
|
128
130
|
const t = u.current?.firstChild;
|
|
129
|
-
document.activeElement === t && (t.blur(),
|
|
131
|
+
document.activeElement === t && (t.blur(), x.current?.focus());
|
|
130
132
|
}
|
|
131
133
|
},
|
|
132
134
|
children: /* @__PURE__ */ o(pe, {
|
|
@@ -148,7 +150,7 @@ const de = () => /* @__PURE__ */ o(re, {
|
|
|
148
150
|
level: t.level,
|
|
149
151
|
selectable: t.selectable,
|
|
150
152
|
ancestors: t.ancestors
|
|
151
|
-
}), O && r.length > a.length && C(!1)) : r = a.filter((m) => m.value !== e.element.id), i(r),
|
|
153
|
+
}), O && r.length > a.length && C(!1)) : r = a.filter((m) => m.value !== e.element.id), i(r), v("");
|
|
152
154
|
},
|
|
153
155
|
open: f,
|
|
154
156
|
searchInput: g.trimStart(),
|