@gisce/react-ooui 2.0.0-alpha.29 → 2.0.0-alpha.30

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 +1 @@
1
- {"version":3,"file":"DropdownButton.d.ts","sourceRoot":"","sources":["../../src/actionbar/DropdownButton.tsx"],"names":[],"mappings":"AAMA,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;CACpC,CAAC;AAEF,iBAAS,cAAc,CAAC,KAAK,EAAE,KAAK,2CAmEnC;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"DropdownButton.d.ts","sourceRoot":"","sources":["../../src/actionbar/DropdownButton.tsx"],"names":[],"mappings":"AAMA,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;CACpC,CAAC;AAEF,iBAAS,cAAc,CAAC,KAAK,EAAE,KAAK,2CAmFnC;AAED,eAAe,cAAc,CAAC"}
@@ -6597,25 +6597,33 @@ function Vt(t) {
6597
6597
  label: s,
6598
6598
  disabled: a = !1,
6599
6599
  searchable: l = "auto"
6600
- } = t, [d, u] = b([...i]), c = (p) => {
6601
- u(
6602
- p ? i.filter(
6603
- (h) => h.name.toLowerCase().indexOf(p.toLowerCase()) !== -1
6604
- ) : [...i]
6605
- );
6600
+ } = t, [d, u] = b(), c = (p) => {
6601
+ if (!p) {
6602
+ u(void 0);
6603
+ return;
6604
+ }
6605
+ const h = p.trim();
6606
+ if (h.length === 0) {
6607
+ u(void 0);
6608
+ return;
6609
+ }
6610
+ u(h);
6606
6611
  };
6607
6612
  function f() {
6608
- const p = d == null ? void 0 : d.map((h, g) => h.name === "divider" ? /* @__PURE__ */ n(He.Divider, {}, "divider" + g) : /* @__PURE__ */ n(He.Item, { children: h.name }, h.id));
6613
+ let p = [];
6614
+ d ? p = i.filter((y) => y.name.toLowerCase().includes(d.toLowerCase())) : p = i;
6615
+ const h = p.map((y, w) => y.name === "divider" ? /* @__PURE__ */ n(He.Divider, {}, "divider" + w) : /* @__PURE__ */ n(He.Item, { children: y.name }, y.id)), g = l === !0 || l === "auto" && i.length > 3;
6609
6616
  return /* @__PURE__ */ V(He, { onClick: m, children: [
6610
- (l === "auto" && i.length > 3 || l === !0) && /* @__PURE__ */ n(
6617
+ g && /* @__PURE__ */ n(
6611
6618
  uc,
6612
6619
  {
6613
- onChange: (h) => c(h.target.value),
6620
+ onChange: (y) => c(y.target.value),
6614
6621
  onSearch: c,
6615
- allowClear: !0
6622
+ allowClear: !0,
6623
+ style: { padding: 5 }
6616
6624
  }
6617
6625
  ),
6618
- /* @__PURE__ */ n(He.ItemGroup, { title: r, children: p })
6626
+ /* @__PURE__ */ n(He.ItemGroup, { title: r, children: h })
6619
6627
  ] });
6620
6628
  }
6621
6629
  function m(p) {