@box/combobox-with-api 1.29.1 → 1.30.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.
@@ -1,73 +1,74 @@
1
1
  import { LoadingIndicator as $ } from "@box/blueprint-web";
2
2
  import { InlineError as P, Tree as ee } from "@box/tree";
3
- import { forwardRef as ae, useReducer as te, useState as A, useMemo as z, useCallback as u, useEffect as F } from "react";
4
- import { RootTreeNode as m, hasValidLevel as le, getServiceNode as D } from "../esm/lib/components/combobox-with-api-tree-view/tree-utils.js";
5
- import { t as se, i as oe, A as r } from "./treeReducer.js";
6
- import { jsx as f, jsxs as ne } from "react/jsx-runtime";
7
- import '../styles/dynamic-loading-tree.css';const re = "_container_1wa8l_2", de = "_label_1wa8l_16", ie = "_hiddenLabel_1wa8l_28", ce = "_comboboxContainer_1wa8l_31", me = "_withComboboxButtons_1wa8l_47", ue = "_textInputWrapper_1wa8l_63", pe = "_textInput_1wa8l_63", be = "_comboboxButtons_1wa8l_88", ye = "_withChips_1wa8l_95", he = "_popover_1wa8l_109", _e = "_loadingIndicator_1wa8l_173", ve = "_noResultOption_1wa8l_176", L = {
8
- container: re,
9
- label: de,
10
- hiddenLabel: ie,
11
- comboboxContainer: ce,
12
- withComboboxButtons: me,
13
- textInputWrapper: ue,
14
- textInput: pe,
15
- comboboxButtons: be,
3
+ import { forwardRef as te, useReducer as ae, useState as D, useMemo as z, useCallback as u, useEffect as F } from "react";
4
+ import { RootTreeNode as m, hasValidLevel as le, getServiceNode as L } from "../esm/lib/components/combobox-with-api-tree-view/tree-utils.js";
5
+ import { t as ne, i as se, A as d } from "./treeReducer.js";
6
+ import { jsx as f, jsxs as oe } from "react/jsx-runtime";
7
+ import '../styles/dynamic-loading-tree.css';const de = "_container_15bxn_2", re = "_disabled_15bxn_13", ie = "_label_15bxn_16", ce = "_hiddenLabel_15bxn_28", me = "_comboboxContainer_15bxn_31", ue = "_withComboboxButtons_15bxn_47", pe = "_textInputWrapper_15bxn_63", be = "_textInput_15bxn_63", _e = "_comboboxButtons_15bxn_88", ye = "_withChips_15bxn_95", he = "_popover_15bxn_109", ve = "_loadingIndicator_15bxn_173", fe = "_noResultOption_15bxn_176", V = {
8
+ container: de,
9
+ disabled: re,
10
+ label: ie,
11
+ hiddenLabel: ce,
12
+ comboboxContainer: me,
13
+ withComboboxButtons: ue,
14
+ textInputWrapper: pe,
15
+ textInput: be,
16
+ comboboxButtons: _e,
16
17
  withChips: ye,
17
18
  popover: he,
18
- loadingIndicator: _e,
19
- noResultOption: ve
20
- }, fe = (n) => {
21
- const i = [...n.children], {
19
+ loadingIndicator: ve,
20
+ noResultOption: fe
21
+ }, xe = (o) => {
22
+ const i = [...o.children], {
22
23
  metadata: c
23
- } = n;
24
+ } = o;
24
25
  return {
25
- ...n,
26
+ ...o,
26
27
  children: i,
27
28
  metadata: {
28
- ...n.metadata,
29
+ ...o.metadata,
29
30
  variant: c.variant,
30
- isLoading: n.status === "loading" && !n.children.length,
31
+ isLoading: o.status === "loading" && !o.children.length,
31
32
  labelName: c.labelName || "",
32
33
  labelValue: c.labelValue || ""
33
34
  }
34
35
  };
35
- }, ge = (n, i) => {
36
+ }, ge = (o, i) => {
36
37
  let c;
37
- return n.children.length && n.status === "loading" && (c = D(i.id, i.metadata.displayValue, "loading")), n.status === "error" && (c = D(i.id, i.metadata.displayValue, "reload")), n.status === "success" && n.marker && (c = D(i.id, i.metadata.displayValue, "loadMore")), c;
38
- }, Ee = /* @__PURE__ */ ae(({
39
- ariaLabel: n,
38
+ return o.children.length && o.status === "loading" && (c = L(i.id, i.metadata.displayValue, "loading")), o.status === "error" && (c = L(i.id, i.metadata.displayValue, "reload")), o.status === "success" && o.marker && (c = L(i.id, i.metadata.displayValue, "loadMore")), c;
39
+ }, Te = /* @__PURE__ */ te(({
40
+ ariaLabel: o,
40
41
  onSelect: i,
41
42
  selectedNodes: c,
42
43
  defaultFetcher: b,
43
- levels: O,
44
- selectableLevels: g,
45
- multiselect: w,
46
- open: V,
44
+ levels: R,
45
+ selectableLevels: x,
46
+ multiselect: O,
47
+ open: k,
47
48
  searchInput: p,
48
49
  noResultMessage: q,
49
50
  loadingAriaLabel: G
50
51
  }, H) => {
51
- const [_, s] = te(se, oe), [y, J] = A({
52
+ const [h, n] = ae(ne, se), [_, J] = D({
52
53
  nodes: [],
53
54
  selectedIds: []
54
- }), [E, h] = A(!1), [S, I] = A(!1), N = z(() => Math.max(...g), [g]), k = u((e = _) => {
55
- const t = [];
56
- return [...Object.values(e).map((a) => {
57
- const l = fe(a), d = ge(a, l);
58
- return d && (t.push(d), l.children.push(d.id)), l;
59
- }), ...t];
60
- }, [_]), B = u((e) => {
61
- const t = e.ancestors?.find((l) => l.level === e.level - 1), o = O.find((l) => l.level === e.level);
55
+ }), [E, y] = D(!1), [g, S] = D(!1), I = z(() => Math.max(...x), [x]), w = u((e = h) => {
56
+ const a = [];
57
+ return [...Object.values(e).map((t) => {
58
+ const l = xe(t), r = ge(t, l);
59
+ return r && (a.push(r), l.children.push(r.id)), l;
60
+ }), ...a];
61
+ }, [h]), B = u((e) => {
62
+ const a = e.ancestors?.find((l) => l.level === e.level - 1), s = R.find((l) => l.level === e.level);
62
63
  return e.level === 1 || p === "" ? e.displayValue : {
63
- labelName: o.displayName,
64
- labelValue: t.displayName
64
+ labelName: s.displayName,
65
+ labelValue: a.displayName
65
66
  };
66
- }, [O, p]), v = u((e) => ({
67
+ }, [R, p]), v = u((e) => ({
67
68
  id: e.value,
68
69
  name: e.displayValue,
69
70
  parent: m.id,
70
- isBranch: e.level !== N,
71
+ isBranch: e.level !== I,
71
72
  children: [],
72
73
  metadata: {
73
74
  variant: "content",
@@ -77,46 +78,46 @@ import '../styles/dynamic-loading-tree.css';const re = "_container_1wa8l_2", de
77
78
  marker: e.marker,
78
79
  ancestors: e.ancestors
79
80
  }
80
- }), [N]), T = u((e, t) => {
81
- s({
82
- type: r.RESET,
81
+ }), [I]), T = u((e, a) => {
82
+ n({
83
+ type: d.RESET,
83
84
  payload: {
84
85
  id: m.id,
85
86
  items: []
86
87
  }
87
- }), s({
88
- type: r.LOAD_SUCCESS,
88
+ }), n({
89
+ type: d.LOAD_SUCCESS,
89
90
  payload: {
90
91
  id: m.id,
91
92
  items: e,
92
- marker: t
93
+ marker: a
93
94
  }
94
- }), h(!1);
95
- }, [s, h]), x = u(() => {
96
- s({
97
- type: r.LOAD_ERROR,
95
+ }), y(!1);
96
+ }, [n, y]), C = u(() => {
97
+ n({
98
+ type: d.LOAD_ERROR,
98
99
  payload: {
99
100
  id: m.id
100
101
  }
101
- }), h(!1), I(!0);
102
- }, [s, h, I]), j = u((e, t) => {
103
- const o = new Set(e.map((a) => a.id));
104
- return t.filter((a) => a != null && o.has(a));
102
+ }), y(!1), S(!0);
103
+ }, [n, y, S]), j = u((e, a) => {
104
+ const s = new Set(e.map((t) => t.id));
105
+ return a.filter((t) => t != null && s.has(t));
105
106
  }, []);
106
107
  F(() => {
107
- const e = k(_);
108
+ const e = w(h);
108
109
  J({
109
110
  nodes: e,
110
111
  selectedIds: j(e, c)
111
112
  });
112
- }, [j, k, c, _, S]), F(() => {
113
- if (!V)
113
+ }, [j, w, c, h, g]), F(() => {
114
+ if (!k)
114
115
  return;
115
116
  const {
116
117
  signal: e
117
118
  } = new AbortController();
118
- h(!0), I(!1), p ? (s({
119
- type: r.RESET,
119
+ y(!0), S(!1), p ? (n({
120
+ type: d.RESET,
120
121
  payload: {
121
122
  id: m.id,
122
123
  items: []
@@ -128,40 +129,40 @@ import '../styles/dynamic-loading-tree.css';const re = "_container_1wa8l_2", de
128
129
  level: null,
129
130
  onlySelectableOptions: !1,
130
131
  ancestorId: null
131
- }).then((t) => {
132
- const o = t.options.filter((a) => a.selectable).map((a) => {
132
+ }).then((a) => {
133
+ const s = a.options.filter((t) => t.selectable).map((t) => {
133
134
  const {
134
135
  labelName: l,
135
- labelValue: d
136
- } = B(a);
136
+ labelValue: r
137
+ } = B(t);
137
138
  return {
138
- id: a.value,
139
- name: a.displayValue,
139
+ id: t.value,
140
+ name: t.displayValue,
140
141
  parent: m.id,
141
- isBranch: a.level < N,
142
+ isBranch: t.level < I,
142
143
  children: [],
143
144
  metadata: {
144
- variant: a.level === 1 ? "content" : "labeled",
145
- displayValue: a.displayValue,
146
- level: a.level,
147
- selectable: a.selectable,
148
- ancestors: a.ancestors,
145
+ variant: t.level === 1 ? "content" : "labeled",
146
+ displayValue: t.displayValue,
147
+ level: t.level,
148
+ selectable: t.selectable,
149
+ ancestors: t.ancestors,
149
150
  labelName: l,
150
- labelValue: d
151
+ labelValue: r
151
152
  }
152
153
  };
153
154
  });
154
- T(o, t.marker);
155
+ T(s, a.marker);
155
156
  }).catch(() => {
156
- x();
157
- })) : (s({
158
- type: r.RESET,
157
+ C();
158
+ })) : (n({
159
+ type: d.RESET,
159
160
  payload: {
160
161
  id: m.id,
161
162
  items: []
162
163
  }
163
- }), s({
164
- type: r.LOAD_DATA,
164
+ }), n({
165
+ type: d.LOAD_DATA,
165
166
  payload: {
166
167
  id: m.id
167
168
  }
@@ -172,24 +173,24 @@ import '../styles/dynamic-loading-tree.css';const re = "_container_1wa8l_2", de
172
173
  level: 1,
173
174
  onlySelectableOptions: !1,
174
175
  ancestorId: null
175
- }).then((t) => {
176
- const o = t.options.map(v);
177
- T(o, t.marker);
176
+ }).then((a) => {
177
+ const s = a.options.map(v);
178
+ T(s, a.marker);
178
179
  }).catch(() => {
179
- x();
180
+ C();
180
181
  }));
181
- }, [b, v, V, p, O, N, B, T, x]);
182
+ }, [b, v, k, p, R, I, B, T, C]);
182
183
  const K = u((e) => {
183
184
  const {
184
- isExpanded: t,
185
- isDisabled: o,
186
- element: a
185
+ isExpanded: a,
186
+ isDisabled: s,
187
+ element: t
187
188
  } = e;
188
- if (!t || o) {
189
- s({
190
- type: r.RESET,
189
+ if (!a || s) {
190
+ n({
191
+ type: d.RESET,
191
192
  payload: {
192
- id: a.id,
193
+ id: t.id,
193
194
  items: []
194
195
  }
195
196
  });
@@ -197,130 +198,130 @@ import '../styles/dynamic-loading-tree.css';const re = "_container_1wa8l_2", de
197
198
  }
198
199
  const {
199
200
  level: l
200
- } = a.metadata, {
201
- id: d,
202
- marker: R
203
- } = a, {
204
- signal: C
201
+ } = t.metadata, {
202
+ id: r,
203
+ marker: N
204
+ } = t, {
205
+ signal: A
205
206
  } = new AbortController();
206
- s({
207
- type: r.LOAD_DATA,
207
+ n({
208
+ type: d.LOAD_DATA,
208
209
  payload: {
209
- id: d
210
+ id: r
210
211
  }
211
212
  }), b({
212
- signal: C,
213
- marker: R,
213
+ signal: A,
214
+ marker: N,
214
215
  searchInput: "",
215
216
  level: l + 1,
216
- ancestorId: d,
217
+ ancestorId: r,
217
218
  onlySelectableOptions: !1
218
219
  }).then((U) => {
219
- const Z = U.options.map((W) => (a.children.push(W.value), v(W)));
220
- s({
221
- type: r.LOAD_SUCCESS,
220
+ const Z = U.options.map((W) => (t.children.push(W.value), v(W)));
221
+ n({
222
+ type: d.LOAD_SUCCESS,
222
223
  payload: {
223
- id: d,
224
+ id: r,
224
225
  items: Z,
225
226
  marker: U.marker
226
227
  }
227
228
  });
228
229
  }).catch(() => {
229
- s({
230
- type: r.LOAD_ERROR,
230
+ n({
231
+ type: d.LOAD_ERROR,
231
232
  payload: {
232
- id: d
233
+ id: r
233
234
  }
234
235
  });
235
236
  });
236
237
  }, [b, v]), M = u((e) => {
237
- S && (I(!1), h(!0));
238
- const t = _[e], {
239
- level: o
240
- } = t.metadata, {
241
- id: a,
238
+ g && (S(!1), y(!0));
239
+ const a = h[e], {
240
+ level: s
241
+ } = a.metadata, {
242
+ id: t,
242
243
  marker: l
243
- } = t, {
244
- signal: d
244
+ } = a, {
245
+ signal: r
245
246
  } = new AbortController();
246
- s({
247
- type: r.LOAD_DATA,
247
+ n({
248
+ type: d.LOAD_DATA,
248
249
  payload: {
249
- id: a
250
+ id: t
250
251
  }
251
252
  }), b({
252
- signal: d,
253
+ signal: r,
253
254
  marker: l,
254
255
  searchInput: p,
255
- level: p === "" ? o + 1 : null,
256
- ancestorId: a !== m.id ? a.toString() : null,
256
+ level: p === "" ? s + 1 : null,
257
+ ancestorId: t !== m.id ? t.toString() : null,
257
258
  onlySelectableOptions: !1
258
- }).then((R) => {
259
- const C = R.options.map(v);
260
- s({
261
- type: r.LOAD_SUCCESS,
259
+ }).then((N) => {
260
+ const A = N.options.map(v);
261
+ n({
262
+ type: d.LOAD_SUCCESS,
262
263
  payload: {
263
- id: a,
264
- items: C,
265
- marker: R.marker
264
+ id: t,
265
+ items: A,
266
+ marker: N.marker
266
267
  }
267
- }), h(!1);
268
+ }), y(!1);
268
269
  }).catch(() => {
269
- s({
270
- type: r.LOAD_ERROR,
270
+ n({
271
+ type: d.LOAD_ERROR,
271
272
  payload: {
272
- id: a,
273
+ id: t,
273
274
  marker: l
274
275
  }
275
276
  });
276
277
  });
277
- }, [b, S, v, p, _]), {
278
+ }, [b, g, v, p, h]), {
278
279
  isTreeEmpty: Q,
279
280
  focusedId: X
280
281
  } = z(() => {
281
- const t = y.nodes.find(({
282
+ const a = _.nodes.find(({
282
283
  id: l
283
- }) => l === m.id)?.children ?? [], o = t[0], a = !w && y.selectedIds.length === 0 && o != null;
284
+ }) => l === m.id)?.children ?? [], s = a[0], t = !O && _.selectedIds.length === 0 && s != null;
284
285
  return {
285
- isTreeEmpty: y.nodes.length === 0 || t.length === 0,
286
- focusedId: a ? o : void 0
286
+ isTreeEmpty: _.nodes.length === 0 || a.length === 0,
287
+ focusedId: t ? s : void 0
287
288
  };
288
- }, [w, y.nodes, y.selectedIds.length]), Y = u((e) => {
289
+ }, [O, _.nodes, _.selectedIds.length]), Y = u((e) => {
289
290
  const {
290
- metadata: t
291
+ metadata: a
291
292
  } = e.element;
292
- le(t) && g.includes(t.level) ? i(e) : (e.isSelected = !1, e.treeState.selectedIds.delete(e.element.id));
293
- }, [g, i]);
294
- return S ? /* @__PURE__ */ f(P, {
293
+ le(a) && x.includes(a.level) ? i(e) : (e.isSelected = !1, e.treeState.selectedIds.delete(e.element.id));
294
+ }, [x, i]);
295
+ return g ? /* @__PURE__ */ f(P, {
295
296
  onReload: () => {
296
297
  M("root");
297
298
  }
298
- }) : /* @__PURE__ */ ne("div", {
299
+ }) : /* @__PURE__ */ oe("div", {
299
300
  children: [E && /* @__PURE__ */ f("div", {
300
- className: L.noResultOption,
301
+ className: V.noResultOption,
301
302
  children: /* @__PURE__ */ f($, {
302
303
  "aria-label": G,
303
- className: L.loadingIndicator
304
+ className: V.loadingIndicator
304
305
  })
305
306
  }), Q && !E ? /* @__PURE__ */ f("div", {
306
- className: L.noResultOption,
307
+ className: V.noResultOption,
307
308
  children: q
308
309
  }) : !E && /* @__PURE__ */ f(ee, {
309
310
  ref: H,
310
- "aria-label": n,
311
- data: y.nodes,
311
+ "aria-label": o,
312
+ data: _.nodes,
312
313
  focusedId: X,
313
- multiSelect: w,
314
+ multiSelect: O,
314
315
  onExpand: K,
315
316
  onLoadData: M,
316
317
  onNodeSelect: Y,
317
- selectedIds: y.selectedIds,
318
+ selectedIds: _.selectedIds,
318
319
  size: "large",
319
320
  togglableSelect: !0
320
321
  })]
321
322
  });
322
323
  });
323
324
  export {
324
- Ee as D,
325
- L as s
325
+ Te as D,
326
+ V as s
326
327
  };
@@ -1,47 +1,47 @@
1
- import { ComboboxItemValue as ce } from "@ariakit/react";
2
- import { Combobox as d, useForkRef as ue, LoadingIndicator as de, InlineNotice as pe, Text as me } from "@box/blueprint-web";
3
- import { Search as he, Loader as fe } from "@box/blueprint-web-assets/icons/Fill";
4
- import { Size6 as V, Size1 as ge, IconIconOnLightSecondary as be } from "@box/blueprint-web-assets/tokens/tokens";
5
- import S from "clsx";
6
- import { forwardRef as D, useRef as A, useState as xe, useCallback as N, useMemo as L, useEffect as Oe } from "react";
7
- import { useIntl as B, FormattedMessage as k } from "react-intl";
1
+ import { ComboboxItemValue as ue } from "@ariakit/react";
2
+ import { Combobox as d, useForkRef as de, LoadingIndicator as pe, InlineNotice as me, Text as he } from "@box/blueprint-web";
3
+ import { Search as fe, Loader as ge } from "@box/blueprint-web-assets/icons/Fill";
4
+ import { Size6 as V, Size1 as be, IconIconOnLightSecondary as Oe } from "@box/blueprint-web-assets/tokens/tokens";
5
+ import N from "clsx";
6
+ import { forwardRef as B, useRef as L, useState as xe, useCallback as k, useMemo as y, useEffect as _e } from "react";
7
+ import { useIntl as W, FormattedMessage as F } from "react-intl";
8
8
  import a from "./messages.js";
9
- import { useAsyncList as _e } from "./use-async-list.js";
10
- import { useControllableState as Ce } from "./utils/use-controllable-state.js";
11
- import { useTrackVisibility as Re } from "./utils/use-intersection-observer.js";
12
- import { jsx as r, jsxs as F, Fragment as Ae } from "react/jsx-runtime";
13
- import '../../../../styles/combobox-with-api-pagination.css';const Le = "_disabled_19k3s_8", ye = "_highlightOptionText_19k3s_12", Ee = "_selected_19k3s_24", Ie = "_option_19k3s_35", ve = "_errorComboboxOption_19k3s_39", Me = "_errorComboboxOptionText_19k3s_44", i = {
14
- disabled: Le,
15
- highlightOptionText: ye,
16
- selected: Ee,
17
- option: Ie,
18
- errorComboboxOption: ve,
19
- errorComboboxOptionText: Me
20
- }, P = /* @__PURE__ */ D(({
21
- onTryAgain: I
9
+ import { useAsyncList as Ce } from "./use-async-list.js";
10
+ import { useControllableState as Re } from "./utils/use-controllable-state.js";
11
+ import { useTrackVisibility as Ae } from "./utils/use-intersection-observer.js";
12
+ import { jsx as r, jsxs as P, Fragment as Le } from "react/jsx-runtime";
13
+ import '../../../../styles/combobox-with-api-pagination.css';const ye = "_disabled_19k3s_8", Ee = "_highlightOptionText_19k3s_12", Ie = "_selected_19k3s_24", ve = "_option_19k3s_35", Me = "_errorComboboxOption_19k3s_39", Se = "_errorComboboxOptionText_19k3s_44", i = {
14
+ disabled: ye,
15
+ highlightOptionText: Ee,
16
+ selected: Ie,
17
+ option: ve,
18
+ errorComboboxOption: Me,
19
+ errorComboboxOptionText: Se
20
+ }, D = /* @__PURE__ */ B(({
21
+ onTryAgain: v
22
22
  }, p) => {
23
23
  const {
24
24
  formatMessage: m
25
- } = B();
26
- return /* @__PURE__ */ F(Ae, {
27
- children: [/* @__PURE__ */ r(pe, {
25
+ } = W();
26
+ return /* @__PURE__ */ P(Le, {
27
+ children: [/* @__PURE__ */ r(me, {
28
28
  variant: "error",
29
29
  variantIconAriaLabel: m(a.loadingResultsErrorIconLabel),
30
- children: /* @__PURE__ */ r(k, {
30
+ children: /* @__PURE__ */ r(F, {
31
31
  ...a.loadingResultsErrorMessage
32
32
  })
33
33
  }), /* @__PURE__ */ r(d.Option, {
34
34
  ref: p,
35
35
  className: i.errorComboboxOption,
36
- onClick: I,
37
- children: /* @__PURE__ */ F(me, {
36
+ onClick: v,
37
+ children: /* @__PURE__ */ P(he, {
38
38
  as: "span",
39
39
  className: i.errorComboboxOptionText,
40
40
  color: "textOnLightLink",
41
41
  variant: "bodyDefaultBold",
42
- children: [/* @__PURE__ */ r(k, {
42
+ children: [/* @__PURE__ */ r(F, {
43
43
  ...a.loadingResultsErrorAction
44
- }), /* @__PURE__ */ r(fe, {
44
+ }), /* @__PURE__ */ r(ge, {
45
45
  color: "currentColor",
46
46
  height: "12px",
47
47
  width: "12px"
@@ -49,42 +49,42 @@ import '../../../../styles/combobox-with-api-pagination.css';const Le = "_disabl
49
49
  })
50
50
  })]
51
51
  });
52
- }), y = "__LOADING__", E = "__LOADING_ERROR__", Te = "0px 0px 20px 0px", Ve = /* @__PURE__ */ r(he, {
53
- color: be,
52
+ }), E = "__LOADING__", I = "__LOADING_ERROR__", Te = "0px 0px 20px 0px", Ve = /* @__PURE__ */ r(fe, {
53
+ color: Oe,
54
54
  height: V,
55
55
  role: "presentation",
56
56
  style: {
57
- padding: ge,
57
+ padding: be,
58
58
  boxSizing: "border-box"
59
59
  },
60
60
  width: V
61
- }), Ue = /* @__PURE__ */ D(function(p, m) {
61
+ }), qe = /* @__PURE__ */ B(function(p, m) {
62
62
  const {
63
- dataTargetId: W,
64
- defaultFetcher: w,
65
- initialOpen: z = !1,
66
- onInputValueChange: G,
67
- value: j,
68
- onValueChange: U,
63
+ dataTargetId: w,
64
+ defaultFetcher: z,
65
+ initialOpen: G = !1,
66
+ onInputValueChange: j,
67
+ value: U,
68
+ onValueChange: q,
69
69
  onOpenChange: h,
70
- noResultMessage: q,
71
- defaultValue: H = [],
72
- loadingAriaLabel: J,
70
+ noResultMessage: H,
71
+ defaultValue: J = [],
72
+ loadingAriaLabel: K,
73
73
  multiselect: s = !1,
74
- disabled: K,
74
+ disabled: f,
75
75
  className: Q,
76
- displaySingleSelectionAsChip: f = !0,
76
+ displaySingleSelectionAsChip: g = !0,
77
77
  ...X
78
78
  } = p, {
79
79
  formatMessage: c
80
- } = B(), g = A(null), b = A(!0), [Y, v] = xe(z), e = _e({
80
+ } = W(), b = L(null), O = L(!0), [Y, M] = xe(G), e = Ce({
81
81
  async load({
82
82
  marker: o,
83
83
  searchInput: t,
84
- signal: C
84
+ signal: R
85
85
  }) {
86
- const l = await w({
87
- signal: C,
86
+ const l = await z({
87
+ signal: R,
88
88
  marker: o,
89
89
  searchInput: t
90
90
  });
@@ -93,73 +93,73 @@ import '../../../../styles/combobox-with-api-pagination.css';const Le = "_disabl
93
93
  marker: l.marker
94
94
  };
95
95
  }
96
- }), M = A(!1), Z = N(() => {
97
- M.current || (e.reload(), M.current = !0);
98
- }, []), [n, x] = Ce({
99
- prop: j,
100
- defaultProp: H,
101
- onChange: U
102
- }), O = !s && n.length === 1, $ = N((o) => {
103
- v(o), h?.(o);
104
- }, [h]), ee = (o) => {
105
- o === void 0 ? (x([]), (!b.current || !f) && (e.search(""), b.current = !0)) : Array.isArray(o) ? x(o) : (x([o]), s || (v(!1), h?.(!1)));
106
- }, oe = L(() => n.length === 0 ? s ? [] : void 0 : s ? n : n[0], [s, n]), _ = L(() => n.filter((o) => !e.items.some((t) => t.value === o.value)), [n, e.items]), te = (o) => {
96
+ }), S = L(!1), Z = k(() => {
97
+ S.current || (e.reload(), S.current = !0);
98
+ }, []), [n, x] = Re({
99
+ prop: U,
100
+ defaultProp: J,
101
+ onChange: q
102
+ }), _ = !s && n.length === 1, $ = _ && !f, ee = k((o) => {
103
+ M(o), h?.(o);
104
+ }, [h]), oe = (o) => {
105
+ f || (o === void 0 ? (x([]), (!O.current || !g) && (e.search(""), O.current = !0)) : Array.isArray(o) ? x(o) : (x([o]), s || (M(!1), h?.(!1))));
106
+ }, te = y(() => n.length === 0 ? s ? [] : void 0 : s ? n : n[0], [s, n]), C = y(() => n.filter((o) => !e.items.some((t) => t.value === o.value)), [n, e.items]), re = (o) => {
107
107
  const {
108
108
  value: t,
109
- displayValue: C,
109
+ displayValue: R,
110
110
  ...l
111
111
  } = o;
112
- if (t === y)
112
+ if (t === E)
113
113
  return e.hasNextPage ? /* @__PURE__ */ r(d.Option, {
114
114
  ...l,
115
- ref: ae,
115
+ ref: se,
116
116
  disabled: !0,
117
117
  value: t,
118
- children: /* @__PURE__ */ r(de, {
118
+ children: /* @__PURE__ */ r(pe, {
119
119
  "aria-label": c(a.loadingMoreAriaLabel),
120
120
  style: {
121
121
  position: "unset"
122
122
  }
123
123
  })
124
124
  }) : null;
125
- if (t === E && e.hasError && !e.isEmpty)
126
- return /* @__PURE__ */ r(P, {
125
+ if (t === I && e.hasError && !e.isEmpty)
126
+ return /* @__PURE__ */ r(D, {
127
127
  onTryAgain: () => {
128
- e.loadMore(), g.current?.focus();
128
+ e.loadMore(), b.current?.focus();
129
129
  }
130
130
  });
131
- if (_.some((R) => R.value === t))
131
+ if (C.some((A) => A.value === t))
132
132
  return null;
133
- const le = n.some((R) => R.value === t);
133
+ const ce = n.some((A) => A.value === t);
134
134
  return /* @__PURE__ */ r(d.Option, {
135
135
  ...l,
136
136
  className: i.option,
137
137
  value: t,
138
- children: /* @__PURE__ */ r(ce, {
139
- className: S(i.highlightOptionText, le && i.selected),
140
- value: C || t
138
+ children: /* @__PURE__ */ r(ue, {
139
+ className: N(i.highlightOptionText, ce && i.selected),
140
+ value: R || t
141
141
  })
142
142
  });
143
- }, re = (o) => {
144
- if (G?.(o), O && o === "") {
145
- b.current = !1;
143
+ }, ne = (o) => {
144
+ if (j?.(o), _ && o === "") {
145
+ O.current = !1;
146
146
  return;
147
147
  }
148
148
  e.search(o);
149
- }, ne = () => {
150
- e.reload(), g.current?.focus();
149
+ }, ae = () => {
150
+ e.reload(), b.current?.focus();
151
151
  };
152
152
  let u;
153
- e.hasError && !e.isLoading ? u = /* @__PURE__ */ r(P, {
154
- onTryAgain: ne
155
- }) : e.isEmpty && !e.isLoading ? u = q || c(a.noResults) : u = void 0;
156
- const [ae, {
157
- rootRef: se,
153
+ e.hasError && !e.isLoading ? u = /* @__PURE__ */ r(D, {
154
+ onTryAgain: ae
155
+ }) : e.isEmpty && !e.isLoading ? u = H || c(a.noResults) : u = void 0;
156
+ const [se, {
157
+ rootRef: ie,
158
158
  isVisible: T
159
- }] = Re({
159
+ }] = Ae({
160
160
  rootMargin: Te
161
161
  });
162
- Oe(() => {
162
+ _e(() => {
163
163
  if (!(T && e.hasNextPage))
164
164
  return;
165
165
  const t = setTimeout(() => {
@@ -169,46 +169,46 @@ import '../../../../styles/combobox-with-api-pagination.css';const Le = "_disabl
169
169
  clearTimeout(t);
170
170
  };
171
171
  }, [T]);
172
- const ie = L(() => {
172
+ const le = y(() => {
173
173
  const o = e.hasNextPage ? {
174
- displayValue: y,
175
- value: y
176
- } : null, t = !o && e.hasError && !e.isEmpty ? {
177
174
  displayValue: E,
178
175
  value: E
176
+ } : null, t = !o && e.hasError && !e.isEmpty ? {
177
+ displayValue: I,
178
+ value: I
179
179
  } : null;
180
- return [...e.items, ..._, o, t].filter(Boolean);
181
- }, [e.hasNextPage, e.hasError, e.isEmpty, e.items, _]);
180
+ return [...e.items, ...C, o, t].filter(Boolean);
181
+ }, [e.hasNextPage, e.hasError, e.isEmpty, e.items, C]);
182
182
  return /* @__PURE__ */ r(d, {
183
183
  ...X,
184
- ref: ue(g, m),
184
+ ref: de(b, m),
185
185
  as: "input",
186
- className: S({
187
- [i.disabled]: O
188
- }, Q),
186
+ className: N(Q, {
187
+ [i.disabled]: $
188
+ }),
189
189
  clearButtonAriaLabel: c(a.clearButtonAriaLabel),
190
190
  clearOnBlur: !1,
191
- "data-target-id": W,
192
- disabled: K || O && f,
193
- displaySingleSelectionAsChip: f,
191
+ "data-target-id": w,
192
+ disabled: f || _ && g,
193
+ displaySingleSelectionAsChip: g,
194
194
  displayValue: (o) => o.displayValue || o.value,
195
195
  endComboboxIcon: Ve,
196
196
  focusLoop: !1,
197
- getPopoverRef: se,
197
+ getPopoverRef: ie,
198
198
  loading: e.isReloading,
199
- loadingAriaLabel: J || c(a.loadingAriaLabel),
199
+ loadingAriaLabel: K || c(a.loadingAriaLabel),
200
200
  multiselect: s,
201
201
  noResultMessage: u,
202
202
  onFocus: Z,
203
- onInputValueChange: re,
204
- onOpenChange: $,
205
- onValueChange: ee,
203
+ onInputValueChange: ne,
204
+ onOpenChange: ee,
205
+ onValueChange: oe,
206
206
  open: Y,
207
- options: ie,
208
- renderOption: te,
209
- value: oe
207
+ options: le,
208
+ renderOption: re,
209
+ value: te
210
210
  });
211
211
  });
212
212
  export {
213
- Ue as ComboboxWithApiPagination
213
+ qe as ComboboxWithApiPagination
214
214
  };
@@ -1,37 +1,37 @@
1
1
  import { useComboboxStore as H, ComboboxProvider as J, PopoverAnchor as Q, Combobox as Y, ComboboxCancel as Z, ComboboxPopover as _, ComboboxItem as $ } from "@ariakit/react";
2
2
  import { useLabelable as ee, ChipsGroup as oe, InputChip as te, IconButton as le } from "@box/blueprint-web";
3
3
  import { XMark as ae, Search as re } from "@box/blueprint-web-assets/icons/Fill";
4
- import { Size6 as S, Size1 as se, IconIconOnLightSecondary as ne } from "@box/blueprint-web-assets/tokens/tokens";
4
+ import { Size6 as w, Size1 as se, IconIconOnLightSecondary as ne } from "@box/blueprint-web-assets/tokens/tokens";
5
5
  import p from "clsx";
6
- import { forwardRef as ie, useId as ce, useState as w, useRef as L } from "react";
6
+ import { forwardRef as ie, useId as ce, useState as L, useRef as y } from "react";
7
7
  import { useIntl as ue } from "react-intl";
8
- import y from "../combobox-with-api-pagination/messages.js";
8
+ import N from "../combobox-with-api-pagination/messages.js";
9
9
  import { useControllableState as me } from "../combobox-with-api-pagination/utils/use-controllable-state.js";
10
- import { s as l, D as pe } from "../../../../chunks/dynamic-loading-tree.js";
11
- import { jsxs as s, jsx as o } from "react/jsx-runtime";
12
- const de = () => /* @__PURE__ */ o(re, {
10
+ import { s as t, D as de } from "../../../../chunks/dynamic-loading-tree.js";
11
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
12
+ const pe = () => /* @__PURE__ */ o(re, {
13
13
  color: ne,
14
- height: S,
14
+ height: w,
15
15
  role: "presentation",
16
16
  style: {
17
17
  padding: se,
18
18
  boxSizing: "border-box"
19
19
  },
20
- width: S
21
- }), Oe = /* @__PURE__ */ ie(function(N, he) {
20
+ width: w
21
+ }), Oe = /* @__PURE__ */ ie(function(A, he) {
22
22
  const {
23
- className: A,
24
- closeOnSelection: O = !1,
25
- dataTargetId: R,
26
- defaultFetcher: T,
27
- defaultValue: B = [],
28
- disabled: z,
29
- hideLabel: d,
23
+ className: O,
24
+ closeOnSelection: R = !1,
25
+ dataTargetId: T,
26
+ defaultFetcher: B,
27
+ defaultValue: z = [],
28
+ disabled: s,
29
+ hideLabel: b,
30
30
  initialOpen: D = !1,
31
31
  label: M,
32
32
  levels: P,
33
33
  loadingAriaLabel: W,
34
- multiselect: b = !1,
34
+ multiselect: h = !1,
35
35
  noResultMessage: k,
36
36
  onValueChange: E,
37
37
  onOpenChange: F,
@@ -40,65 +40,70 @@ const de = () => /* @__PURE__ */ o(re, {
40
40
  selectableLevels: K,
41
41
  treeAriaLabel: U,
42
42
  value: X
43
- } = N, {
44
- formatMessage: h
45
- } = ue(), n = ce(), [f, C] = w(D), [a, i] = me({
43
+ } = A, {
44
+ formatMessage: f
45
+ } = ue(), i = ce(), [C, g] = L(D), [a, c] = me({
46
46
  prop: X,
47
- defaultProp: B,
47
+ defaultProp: z,
48
48
  onChange: E
49
- }), [g, v] = w(""), x = L(null), c = H({
49
+ }), [v, x] = L(""), I = y(null), u = H({
50
50
  includesBaseElement: !0,
51
51
  virtualFocus: !1,
52
- value: g,
52
+ value: v,
53
53
  setValue: (e) => {
54
- v(e);
54
+ x(e);
55
55
  },
56
- open: f,
56
+ open: C,
57
57
  setOpen: (e) => {
58
- C(e), F?.(e);
58
+ g(e), F?.(e);
59
59
  }
60
- }), I = a.length > 0, V = a.length > 0, q = ee(M, n), u = L(null);
61
- return /* @__PURE__ */ s(J, {
62
- store: c,
60
+ }), V = a.length > 0, S = a.length > 0, q = ee(M, i), m = y(null);
61
+ return /* @__PURE__ */ n(J, {
62
+ store: u,
63
63
  children: [/* @__PURE__ */ o(Q, {
64
- children: /* @__PURE__ */ s("div", {
65
- className: p(l.container, A),
64
+ children: /* @__PURE__ */ n("div", {
65
+ className: p(t.container, O, {
66
+ [t.disabled]: s
67
+ }),
66
68
  children: [/* @__PURE__ */ o(q, {
67
- className: p(l.label, {
68
- [l.hiddenLabel]: d
69
+ className: p(t.label, {
70
+ [t.hiddenLabel]: b
69
71
  }),
70
- hideLabel: d
72
+ hideLabel: b
71
73
  }), /* @__PURE__ */ o("div", {
72
- children: /* @__PURE__ */ s("div", {
73
- className: p(l.comboboxContainer, {
74
- [l.withChips]: V,
75
- [l.withComboboxButtons]: I
74
+ children: /* @__PURE__ */ n("div", {
75
+ className: p(t.comboboxContainer, {
76
+ [t.withChips]: S,
77
+ [t.withComboboxButtons]: V
76
78
  }),
77
- children: [V && /* @__PURE__ */ o(oe, {
79
+ children: [S && /* @__PURE__ */ o(oe, {
78
80
  children: a.map((e) => /* @__PURE__ */ o(te, {
79
81
  label: e.displayValue,
80
82
  onDelete: () => {
81
- const t = a.filter((r) => r.value !== e.value);
82
- i(t);
83
+ if (s)
84
+ return;
85
+ const l = a.filter((r) => r.value !== e.value);
86
+ c(l);
83
87
  },
84
88
  tooltip: e.displayValue
85
89
  }, e.value))
86
- }), /* @__PURE__ */ s("div", {
87
- className: l.textInputWrapper,
90
+ }), /* @__PURE__ */ n("div", {
91
+ className: t.textInputWrapper,
88
92
  children: [/* @__PURE__ */ o(Y, {
89
- ref: x,
93
+ ref: I,
90
94
  "aria-haspopup": "tree",
91
- className: l.textInput,
92
- "data-target-id": R,
93
- disabled: z,
94
- id: n,
95
+ className: t.textInput,
96
+ "data-target-id": T,
97
+ disabled: s,
98
+ id: i,
95
99
  placeholder: j,
96
- store: c
100
+ store: u
97
101
  }), /* @__PURE__ */ o("div", {
98
- className: l.comboboxButtons,
99
- children: I ? /* @__PURE__ */ o(Z, {
102
+ className: t.comboboxButtons,
103
+ children: V ? /* @__PURE__ */ o(Z, {
104
+ disabled: s,
100
105
  onClick: () => {
101
- i([]);
106
+ c([]);
102
107
  },
103
108
  render: (e) => /* @__PURE__ */ o(le, {
104
109
  ...e,
@@ -106,16 +111,16 @@ const de = () => /* @__PURE__ */ o(re, {
106
111
  icon: ae,
107
112
  size: "x-small"
108
113
  }),
109
- store: c
110
- }) : /* @__PURE__ */ o(de, {})
114
+ store: u
115
+ }) : /* @__PURE__ */ o(pe, {})
111
116
  })]
112
117
  })]
113
118
  })
114
119
  })]
115
120
  })
116
121
  }), /* @__PURE__ */ o(_, {
117
- "aria-labelledby": n,
118
- className: l.popover,
122
+ "aria-labelledby": i,
123
+ className: t.popover,
119
124
  fitViewport: !0,
120
125
  gutter: 8,
121
126
  portal: !0,
@@ -123,37 +128,37 @@ const de = () => /* @__PURE__ */ o(re, {
123
128
  sameWidth: !0,
124
129
  children: /* @__PURE__ */ o($, {
125
130
  onFocusVisible: (e) => {
126
- u.current?.firstChild?.focus();
131
+ m.current?.firstChild?.focus();
127
132
  },
128
133
  onKeyDown: (e) => {
129
134
  if (e.key === "ArrowUp") {
130
- const t = u.current?.firstChild;
131
- document.activeElement === t && (t.blur(), x.current?.focus());
135
+ const l = m.current?.firstChild;
136
+ document.activeElement === l && (l.blur(), I.current?.focus());
132
137
  }
133
138
  },
134
- children: /* @__PURE__ */ o(pe, {
135
- ref: u,
139
+ children: /* @__PURE__ */ o(de, {
140
+ ref: m,
136
141
  ariaLabel: U,
137
- defaultFetcher: T,
142
+ defaultFetcher: B,
138
143
  levels: P,
139
- loadingAriaLabel: W || h(y.loadingAriaLabel),
140
- multiselect: b,
141
- noResultMessage: k || h(y.noResults),
144
+ loadingAriaLabel: W || f(N.loadingAriaLabel),
145
+ multiselect: h,
146
+ noResultMessage: k || f(N.noResults),
142
147
  onSelect: (e) => {
143
148
  const {
144
- metadata: t
149
+ metadata: l
145
150
  } = e.element;
146
151
  let r = [];
147
- e.isSelected ? (b && (r = a.filter((m) => m.value !== e.element.id)), r.push({
152
+ e.isSelected ? (h && (r = a.filter((d) => d.value !== e.element.id)), r.push({
148
153
  value: e.element.id,
149
- displayValue: t.displayValue,
150
- level: t.level,
151
- selectable: t.selectable,
152
- ancestors: t.ancestors
153
- }), O && r.length > a.length && C(!1)) : r = a.filter((m) => m.value !== e.element.id), i(r), v("");
154
+ displayValue: l.displayValue,
155
+ level: l.level,
156
+ selectable: l.selectable,
157
+ ancestors: l.ancestors
158
+ }), R && r.length > a.length && g(!1)) : r = a.filter((d) => d.value !== e.element.id), c(r), x("");
154
159
  },
155
- open: f,
156
- searchInput: g.trimStart(),
160
+ open: C,
161
+ searchInput: v.trimStart(),
157
162
  selectableLevels: K,
158
163
  selectedNodes: a.map((e) => e.value)
159
164
  })
@@ -1 +1 @@
1
- ._container_1wa8l_2{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);display:flex;flex-direction:column}._container_1wa8l_2._disabled_1wa8l_13{opacity:.1}._container_1wa8l_2 ._label_1wa8l_16{font-weight:var(--body-default-bold-font-weight);font-size:var(--body-default-bold-font-size);font-family:var(--body-default-bold-font-family);line-height:var(--body-default-bold-line-height);letter-spacing:var(--body-default-bold-letter-spacing);text-transform:var(--body-default-bold-text-case);text-decoration:var(--body-default-bold-text-decoration);flex:0 0 fit-content;color:var(--text-text-on-light);overflow-wrap:break-word}._container_1wa8l_2 ._label_1wa8l_16:not(._hiddenLabel_1wa8l_28){margin-block-end:var(--space-2)}._container_1wa8l_2 ._comboboxContainer_1wa8l_31{position:relative;display:flex;flex-wrap:wrap;gap:var(--space-2);overflow-y:auto;background-color:var(--surface-dropdown-surface);border-top:var(--blueprint-combobox-border-top-width, var(--border-1)) solid var(--blueprint-combobox-border-color, var(--border-input-border));border-right:var(--blueprint-combobox-border-right-width, var(--border-1)) solid var(--blueprint-combobox-border-color, var(--border-input-border));border-bottom:var(--blueprint-combobox-border-bottom-width, var(--border-1)) solid var(--blueprint-combobox-border-color, var(--border-input-border));border-left:var(--blueprint-combobox-border-left-width, var(--border-1)) solid var(--blueprint-combobox-border-color, var(--border-input-border));border-radius:var(--blueprint-combobox-input-radius, var(--radius-2));box-shadow:var(--innershadow-1);padding-block:calc((40px - var(--space-5)) / 2 - var(--border-1));padding-inline:var(--space-3)}._container_1wa8l_2 ._comboboxContainer_1wa8l_31._withComboboxButtons_1wa8l_47{padding-inline-end:var(--space-10)}._container_1wa8l_2 ._comboboxContainer_1wa8l_31:not(:disabled):has(input:focus){background-color:var(--surface-dropdown-surface-focus);border:var(--border-2) solid var(--outline-focus-on-light);padding-block:calc((40px - var(--space-5)) / 2 - var(--border-2))}._container_1wa8l_2 ._comboboxContainer_1wa8l_31:not(:disabled)._error_1wa8l_55,._container_1wa8l_2 ._comboboxContainer_1wa8l_31:not(:disabled):has([aria-invalid=true]){background-color:var(--surface-dropdown-surface-error);border-top:var(--blueprint-combobox-border-error-top-width, var(--border-2)) solid var(--border-input-border-error);border-right:var(--blueprint-combobox-border-error-right-width, var(--border-2)) solid var(--border-input-border-error);border-bottom:var(--blueprint-combobox-border-error-bottom-width, var(--border-2)) solid var(--border-input-border-error);border-left:var(--blueprint-combobox-border-error-left-width, var(--border-2)) solid var(--border-input-border-error);padding-block:calc((40px - var(--space-5)) / 2 - var(--border-2))}._container_1wa8l_2 ._comboboxContainer_1wa8l_31 ._textInputWrapper_1wa8l_63{display:flex;flex:content;gap:var(--space-2);align-items:center}._container_1wa8l_2 ._comboboxContainer_1wa8l_31 ._textInputWrapper_1wa8l_63 ._textInput_1wa8l_63{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);width:100%;height:var(--space-5);padding:0;color:var(--text-text-on-light);background-color:transparent;border:none;outline:none}._container_1wa8l_2 ._comboboxContainer_1wa8l_31 ._textInputWrapper_1wa8l_63 ._errorIcon_1wa8l_85 path{fill:var(--icon-icon-error-on-light)}._container_1wa8l_2 ._comboboxContainer_1wa8l_31 ._textInputWrapper_1wa8l_63 ._comboboxButtons_1wa8l_88{position:absolute;top:var(--space-2);right:var(--space-2);display:flex;align-items:center}._container_1wa8l_2 ._comboboxContainer_1wa8l_31._withChips_1wa8l_95{max-height:calc(2 * var(--space-2) + 3 * var(--space-6));padding-block:calc((40px - var(--space-7)) / 2 - var(--border-1))}._container_1wa8l_2 ._comboboxContainer_1wa8l_31._withChips_1wa8l_95:not(:disabled)._error_1wa8l_55{padding-block:calc((40px - var(--space-7)) / 2 - var(--border-2))}._container_1wa8l_2 ._comboboxContainer_1wa8l_31._withChips_1wa8l_95:not(:disabled):has(input:focus){padding-block:calc((40px - var(--space-7)) / 2 - var(--border-2))}._container_1wa8l_2 ._inlineError_1wa8l_105{margin-block-start:var(--space-2)}._popover_1wa8l_109{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);z-index:380;max-height:300px;overflow:auto;background-color:var(--surface-menu-surface);border:var(--border-1) solid var(--border-card-border);border-radius:var(--radius-3);padding-block:var(--space-3);padding-inline:var(--space-3);box-shadow:var(--dropshadow-3)}._popover_1wa8l_109 ul{padding-inline-start:0}._popover_1wa8l_109 ._option_1wa8l_135{position:relative;box-sizing:border-box;width:100%;overflow-wrap:break-word;border:var(--border-2) solid transparent;border-radius:var(--radius-3);outline:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding-block:var(--space-2);padding-inline:var(--space-2)}._popover_1wa8l_109 ._option_1wa8l_135[aria-disabled]{opacity:.1}._popover_1wa8l_109 ._option_1wa8l_135[data-active-item]:not([aria-disabled]){background-color:var(--surface-menu-surface-focus);border:var(--border-2) solid var(--outline-focus-on-light)}._popover_1wa8l_109 ._option_1wa8l_135:hover{background-color:var(--surface-menu-surface-hover)}._popover_1wa8l_109 ._option_1wa8l_135 ._indicator_1wa8l_158{position:absolute;top:0;left:var(--space-2);display:flex;align-items:center;justify-content:center;height:var(--size-9)}._popover_1wa8l_109 ._option_1wa8l_135 ._indicator_1wa8l_158 ._indicatorIcon_1wa8l_167 path{fill:var(--icon-icon-on-light)}._popover_1wa8l_109 ._optionWithIndicator_1wa8l_170{padding-inline:var(--space-10) var(--space-2)}._popover_1wa8l_109 ._loadingIndicator_1wa8l_173{position:unset}._popover_1wa8l_109 ._noResultOption_1wa8l_176{color:var(--text-text-on-light);text-align:center;-webkit-user-select:none;user-select:none}
1
+ ._container_15bxn_2{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);display:flex;flex-direction:column}._container_15bxn_2._disabled_15bxn_13{opacity:.6}._container_15bxn_2 ._label_15bxn_16{font-weight:var(--body-default-bold-font-weight);font-size:var(--body-default-bold-font-size);font-family:var(--body-default-bold-font-family);line-height:var(--body-default-bold-line-height);letter-spacing:var(--body-default-bold-letter-spacing);text-transform:var(--body-default-bold-text-case);text-decoration:var(--body-default-bold-text-decoration);flex:0 0 fit-content;color:var(--text-text-on-light);overflow-wrap:break-word}._container_15bxn_2 ._label_15bxn_16:not(._hiddenLabel_15bxn_28){margin-block-end:var(--space-2)}._container_15bxn_2 ._comboboxContainer_15bxn_31{position:relative;display:flex;flex-wrap:wrap;gap:var(--space-2);overflow-y:auto;background-color:var(--surface-dropdown-surface);border-top:var(--blueprint-combobox-border-top-width, var(--border-1)) solid var(--blueprint-combobox-border-color, var(--border-input-border));border-right:var(--blueprint-combobox-border-right-width, var(--border-1)) solid var(--blueprint-combobox-border-color, var(--border-input-border));border-bottom:var(--blueprint-combobox-border-bottom-width, var(--border-1)) solid var(--blueprint-combobox-border-color, var(--border-input-border));border-left:var(--blueprint-combobox-border-left-width, var(--border-1)) solid var(--blueprint-combobox-border-color, var(--border-input-border));border-radius:var(--blueprint-combobox-input-radius, var(--radius-2));box-shadow:var(--innershadow-1);padding-block:calc((40px - var(--space-5)) / 2 - var(--border-1));padding-inline:var(--space-3)}._container_15bxn_2 ._comboboxContainer_15bxn_31._withComboboxButtons_15bxn_47{padding-inline-end:var(--space-10)}._container_15bxn_2 ._comboboxContainer_15bxn_31:not(:disabled):has(input:focus){background-color:var(--surface-dropdown-surface-focus);border:var(--border-2) solid var(--outline-focus-on-light);padding-block:calc((40px - var(--space-5)) / 2 - var(--border-2))}._container_15bxn_2 ._comboboxContainer_15bxn_31:not(:disabled)._error_15bxn_55,._container_15bxn_2 ._comboboxContainer_15bxn_31:not(:disabled):has([aria-invalid=true]){background-color:var(--surface-dropdown-surface-error);border-top:var(--blueprint-combobox-border-error-top-width, var(--border-2)) solid var(--border-input-border-error);border-right:var(--blueprint-combobox-border-error-right-width, var(--border-2)) solid var(--border-input-border-error);border-bottom:var(--blueprint-combobox-border-error-bottom-width, var(--border-2)) solid var(--border-input-border-error);border-left:var(--blueprint-combobox-border-error-left-width, var(--border-2)) solid var(--border-input-border-error);padding-block:calc((40px - var(--space-5)) / 2 - var(--border-2))}._container_15bxn_2 ._comboboxContainer_15bxn_31 ._textInputWrapper_15bxn_63{display:flex;flex:content;gap:var(--space-2);align-items:center}._container_15bxn_2 ._comboboxContainer_15bxn_31 ._textInputWrapper_15bxn_63 ._textInput_15bxn_63{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);width:100%;height:var(--space-5);padding:0;color:var(--text-text-on-light);background-color:transparent;border:none;outline:none}._container_15bxn_2 ._comboboxContainer_15bxn_31 ._textInputWrapper_15bxn_63 ._errorIcon_15bxn_85 path{fill:var(--icon-icon-error-on-light)}._container_15bxn_2 ._comboboxContainer_15bxn_31 ._textInputWrapper_15bxn_63 ._comboboxButtons_15bxn_88{position:absolute;top:var(--space-2);right:var(--space-2);display:flex;align-items:center}._container_15bxn_2 ._comboboxContainer_15bxn_31._withChips_15bxn_95{max-height:calc(2 * var(--space-2) + 3 * var(--space-6));padding-block:calc((40px - var(--space-7)) / 2 - var(--border-1))}._container_15bxn_2 ._comboboxContainer_15bxn_31._withChips_15bxn_95:not(:disabled)._error_15bxn_55{padding-block:calc((40px - var(--space-7)) / 2 - var(--border-2))}._container_15bxn_2 ._comboboxContainer_15bxn_31._withChips_15bxn_95:not(:disabled):has(input:focus){padding-block:calc((40px - var(--space-7)) / 2 - var(--border-2))}._container_15bxn_2 ._inlineError_15bxn_105{margin-block-start:var(--space-2)}._popover_15bxn_109{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);z-index:380;max-height:300px;overflow:auto;background-color:var(--surface-menu-surface);border:var(--border-1) solid var(--border-card-border);border-radius:var(--radius-3);padding-block:var(--space-3);padding-inline:var(--space-3);box-shadow:var(--dropshadow-3)}._popover_15bxn_109 ul{padding-inline-start:0}._popover_15bxn_109 ._option_15bxn_135{position:relative;box-sizing:border-box;width:100%;overflow-wrap:break-word;border:var(--border-2) solid transparent;border-radius:var(--radius-3);outline:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding-block:var(--space-2);padding-inline:var(--space-2)}._popover_15bxn_109 ._option_15bxn_135[aria-disabled]{opacity:.6}._popover_15bxn_109 ._option_15bxn_135[data-active-item]:not([aria-disabled]){background-color:var(--surface-menu-surface-focus);border:var(--border-2) solid var(--outline-focus-on-light)}._popover_15bxn_109 ._option_15bxn_135:hover{background-color:var(--surface-menu-surface-hover)}._popover_15bxn_109 ._option_15bxn_135 ._indicator_15bxn_158{position:absolute;top:0;left:var(--space-2);display:flex;align-items:center;justify-content:center;height:var(--size-9)}._popover_15bxn_109 ._option_15bxn_135 ._indicator_15bxn_158 ._indicatorIcon_15bxn_167 path{fill:var(--icon-icon-on-light)}._popover_15bxn_109 ._optionWithIndicator_15bxn_170{padding-inline:var(--space-10) var(--space-2)}._popover_15bxn_109 ._loadingIndicator_15bxn_173{position:unset}._popover_15bxn_109 ._noResultOption_15bxn_176{color:var(--text-text-on-light);text-align:center;-webkit-user-select:none;user-select:none}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/combobox-with-api",
3
- "version": "1.29.1",
3
+ "version": "1.30.0",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.15",
6
6
  "@box/blueprint-web": "^12.133.1",