@moontra/moonui-pro 2.26.13 → 2.26.14
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.
- package/dist/index.global.js +81 -81
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +43 -29
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -73508,6 +73508,7 @@ function DataTableQuickFilter({
|
|
|
73508
73508
|
filter,
|
|
73509
73509
|
data
|
|
73510
73510
|
}) {
|
|
73511
|
+
const [searchValue, setSearchValue] = useState("");
|
|
73511
73512
|
const column = table.getColumn(filter.column);
|
|
73512
73513
|
if (!column) {
|
|
73513
73514
|
return null;
|
|
@@ -73585,7 +73586,15 @@ function DataTableQuickFilter({
|
|
|
73585
73586
|
};
|
|
73586
73587
|
const handleClear = () => {
|
|
73587
73588
|
column.setFilterValue(void 0);
|
|
73589
|
+
setSearchValue("");
|
|
73588
73590
|
};
|
|
73591
|
+
const filteredOptions = useMemo(() => {
|
|
73592
|
+
if (!searchValue)
|
|
73593
|
+
return availableOptions;
|
|
73594
|
+
return availableOptions.filter(
|
|
73595
|
+
(option) => option.toLowerCase().includes(searchValue.toLowerCase())
|
|
73596
|
+
);
|
|
73597
|
+
}, [availableOptions, searchValue]);
|
|
73589
73598
|
return /* @__PURE__ */ jsxs(MoonUIPopoverPro, { children: [
|
|
73590
73599
|
/* @__PURE__ */ jsx(MoonUIPopoverTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
73591
73600
|
MoonUIButtonPro,
|
|
@@ -73612,35 +73621,40 @@ function DataTableQuickFilter({
|
|
|
73612
73621
|
]
|
|
73613
73622
|
}
|
|
73614
73623
|
) }),
|
|
73615
|
-
/* @__PURE__ */ jsx(MoonUIPopoverContentPro, { className: "w-[250px] p-0", align: "start", children: /* @__PURE__ */ jsxs(MoonUICommandPro, { children: [
|
|
73616
|
-
/* @__PURE__ */ jsx(
|
|
73617
|
-
|
|
73618
|
-
|
|
73619
|
-
|
|
73620
|
-
|
|
73621
|
-
|
|
73622
|
-
|
|
73623
|
-
|
|
73624
|
-
|
|
73625
|
-
|
|
73626
|
-
|
|
73627
|
-
|
|
73628
|
-
|
|
73629
|
-
|
|
73630
|
-
|
|
73631
|
-
|
|
73632
|
-
|
|
73633
|
-
|
|
73634
|
-
|
|
73635
|
-
|
|
73636
|
-
|
|
73637
|
-
|
|
73638
|
-
|
|
73639
|
-
|
|
73640
|
-
|
|
73641
|
-
|
|
73642
|
-
|
|
73643
|
-
|
|
73624
|
+
/* @__PURE__ */ jsx(MoonUIPopoverContentPro, { className: "w-[250px] p-0", align: "start", children: /* @__PURE__ */ jsxs(MoonUICommandPro, { shouldFilter: false, children: [
|
|
73625
|
+
/* @__PURE__ */ jsx(
|
|
73626
|
+
MoonUICommandInputPro,
|
|
73627
|
+
{
|
|
73628
|
+
placeholder: `Search ${label.toLowerCase()}...`,
|
|
73629
|
+
value: searchValue,
|
|
73630
|
+
onValueChange: setSearchValue
|
|
73631
|
+
}
|
|
73632
|
+
),
|
|
73633
|
+
/* @__PURE__ */ jsx(MoonUICommandListPro, { children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx(MoonUICommandEmptyPro, { children: "No results found" }) : /* @__PURE__ */ jsx(MoonUICommandGroupPro, { children: filteredOptions.map((option) => {
|
|
73634
|
+
const isSelected = selectedValues.has(option);
|
|
73635
|
+
return /* @__PURE__ */ jsxs(
|
|
73636
|
+
MoonUICommandItemPro,
|
|
73637
|
+
{
|
|
73638
|
+
value: option,
|
|
73639
|
+
onSelect: () => handleSelect(option),
|
|
73640
|
+
children: [
|
|
73641
|
+
/* @__PURE__ */ jsx(
|
|
73642
|
+
"div",
|
|
73643
|
+
{
|
|
73644
|
+
className: cn(
|
|
73645
|
+
"mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",
|
|
73646
|
+
isSelected ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"
|
|
73647
|
+
),
|
|
73648
|
+
children: /* @__PURE__ */ jsx(Check, { className: cn("h-4 w-4") })
|
|
73649
|
+
}
|
|
73650
|
+
),
|
|
73651
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1", children: option }),
|
|
73652
|
+
filter.showCounts && optionCounts[option] !== void 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: optionCounts[option] })
|
|
73653
|
+
]
|
|
73654
|
+
},
|
|
73655
|
+
option
|
|
73656
|
+
);
|
|
73657
|
+
}) }) }),
|
|
73644
73658
|
selectedValues.size > 0 && /* @__PURE__ */ jsx("div", { className: "border-t p-2", children: /* @__PURE__ */ jsxs(
|
|
73645
73659
|
MoonUIButtonPro,
|
|
73646
73660
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.26.
|
|
3
|
+
"version": "2.26.14",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|