@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, x] = w(""), v = L(null), c = H({
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
- x(e);
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__ */ s("div", {
72
- className: p(l.comboboxContainer, {
73
- [l.withChips]: V,
74
- [l.withComboboxButtons]: I
75
- }),
76
- children: [V && /* @__PURE__ */ o(oe, {
77
- children: a.map((e) => /* @__PURE__ */ o(te, {
78
- label: e.displayValue,
79
- onDelete: () => {
80
- const t = a.filter((r) => r.value !== e.value);
81
- i(t);
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
- render: (e) => /* @__PURE__ */ o(le, {
103
- ...e,
104
- "aria-label": "Clear selection",
105
- icon: ae,
106
- size: "x-small"
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
- }) : /* @__PURE__ */ o(de, {})
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(), v.current?.focus());
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), x("");
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(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/combobox-with-api",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.15",
6
6
  "@box/blueprint-web": "^12.104.1",