@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,
|
|
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"}
|
package/dist/react-ooui.es.js
CHANGED
|
@@ -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(
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
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
|
-
|
|
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
|
-
|
|
6617
|
+
g && /* @__PURE__ */ n(
|
|
6611
6618
|
uc,
|
|
6612
6619
|
{
|
|
6613
|
-
onChange: (
|
|
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:
|
|
6626
|
+
/* @__PURE__ */ n(He.ItemGroup, { title: r, children: h })
|
|
6619
6627
|
] });
|
|
6620
6628
|
}
|
|
6621
6629
|
function m(p) {
|