@trackunit/react-filter-components 1.14.15 → 1.15.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.
- package/index.cjs.js +3 -3
- package/index.esm.js +3 -3
- package/package.json +2 -2
package/index.cjs.js
CHANGED
|
@@ -54,7 +54,7 @@ const Filter = ({ title, asIcon, children, popoverProps, isActive, activeLabel,
|
|
|
54
54
|
className,
|
|
55
55
|
"grid list-none grid-flow-col items-center justify-between gap-1 rounded px-3 py-2 text-sm text-neutral-700 hover:text-neutral-800",
|
|
56
56
|
],
|
|
57
|
-
}), "data-testid": dataTestId, tabIndex: 0, children: [jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("truncate", isActive && "font-semibold"), children: title }), jsxRuntime.jsxs("span", { className: "grid grid-flow-col items-center justify-between text-neutral-900", children: [isActive && activeLabel ? (jsxRuntime.jsx(reactComponents.Badge, { className:
|
|
57
|
+
}), "data-testid": dataTestId, tabIndex: 0, children: [jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("truncate", isActive && "font-semibold"), children: title }), jsxRuntime.jsxs("span", { className: "grid grid-flow-col items-center justify-between text-neutral-900", children: [isActive && activeLabel ? (jsxRuntime.jsx(reactComponents.Badge, { className: activeOptionsCount === undefined ? "mx-2" : "mx-1", compact: activeOptionsCount === undefined, count: activeOptionsCount, ...(activeOptionsCount === undefined ? {} : { size: "condensed" }) })) : null, readOnly ? null : jsxRuntime.jsx(reactComponents.Icon, { ariaHidden: true, color: "neutral", name: "ChevronRight", size: "small" })] })] })) : (renderButton()) }), jsxRuntime.jsx(reactComponents.PopoverContent, { children: children !== undefined ? (jsxRuntime.jsx(reactComponents.MenuList, { className: cvaMenuListOverrides({ withStickyHeader }), "data-testid": dataTestId ? dataTestId : undefined, ...menuListProps, children: children })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})) })] }));
|
|
58
58
|
} }));
|
|
59
59
|
};
|
|
60
60
|
const cvaMenuListOverrides = cssClassVarianceUtilities.cvaMerge(["overflow-x-hidden", "relative", "!max-w-full", "p-0"], {
|
|
@@ -138,7 +138,7 @@ const CheckBoxFilterItem = ({ itemCount, className, suffix, "data-testid": dataT
|
|
|
138
138
|
selection: "auto",
|
|
139
139
|
focus: "auto",
|
|
140
140
|
className: tailwindMerge.twMerge(["py-1", "mx-1", "pl-2", "pr-3", "w-auto", "h-auto", "items-center", "gap-x-2", "select-none", "rounded"], className),
|
|
141
|
-
}), "data-testid": dataTestId ?? `${label}-checkbox-filter-item`, label: label, ref: ref, suffix: itemCount !== undefined || suffix ? (jsxRuntime.jsxs("span", { className: reactComponents.cvaMenuItemSuffix({ selected: rest.checked }), children: [suffix, itemCount === undefined ? null : itemCount] })) : null, ...rest }));
|
|
141
|
+
}), "data-testid": dataTestId ?? `${label}-checkbox-filter-item`, label: label, ref: ref, suffix: itemCount !== undefined || (suffix !== undefined && suffix !== null) ? (jsxRuntime.jsxs("span", { className: reactComponents.cvaMenuItemSuffix({ selected: rest.checked }), children: [suffix, itemCount === undefined ? null : itemCount] })) : null, ...rest }));
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
/**
|
|
@@ -153,7 +153,7 @@ const RadioFilterItem = ({ value, label, itemCount, selected, "data-testid": dat
|
|
|
153
153
|
selection: "auto",
|
|
154
154
|
focus: "auto",
|
|
155
155
|
className: tailwindMerge.twMerge(["py-1", "pl-2", "pr-3", "w-full", "h-auto", "items-center", "gap-x-2", "select-none", "rounded"], className),
|
|
156
|
-
}), "data-testid": dataTestId ?? `${label}-radio-filter-item`, label: label, suffix: itemCount !== undefined || suffix ? (jsxRuntime.jsxs("span", { className: reactComponents.cvaMenuItemSuffix({ selected: rest.checked }), children: [suffix, itemCount === undefined ? null : itemCount] })) : null, value: value, ...rest }));
|
|
156
|
+
}), "data-testid": dataTestId ?? `${label}-radio-filter-item`, label: label, suffix: itemCount !== undefined || (suffix !== undefined && suffix !== null) ? (jsxRuntime.jsxs("span", { className: reactComponents.cvaMenuItemSuffix({ selected: rest.checked }), children: [suffix, itemCount === undefined ? null : itemCount] })) : null, value: value, ...rest }));
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
exports.CheckBoxFilterItem = CheckBoxFilterItem;
|
package/index.esm.js
CHANGED
|
@@ -52,7 +52,7 @@ const Filter = ({ title, asIcon, children, popoverProps, isActive, activeLabel,
|
|
|
52
52
|
className,
|
|
53
53
|
"grid list-none grid-flow-col items-center justify-between gap-1 rounded px-3 py-2 text-sm text-neutral-700 hover:text-neutral-800",
|
|
54
54
|
],
|
|
55
|
-
}), "data-testid": dataTestId, tabIndex: 0, children: [jsx("span", { className: twMerge("truncate", isActive && "font-semibold"), children: title }), jsxs("span", { className: "grid grid-flow-col items-center justify-between text-neutral-900", children: [isActive && activeLabel ? (jsx(Badge, { className:
|
|
55
|
+
}), "data-testid": dataTestId, tabIndex: 0, children: [jsx("span", { className: twMerge("truncate", isActive && "font-semibold"), children: title }), jsxs("span", { className: "grid grid-flow-col items-center justify-between text-neutral-900", children: [isActive && activeLabel ? (jsx(Badge, { className: activeOptionsCount === undefined ? "mx-2" : "mx-1", compact: activeOptionsCount === undefined, count: activeOptionsCount, ...(activeOptionsCount === undefined ? {} : { size: "condensed" }) })) : null, readOnly ? null : jsx(Icon, { ariaHidden: true, color: "neutral", name: "ChevronRight", size: "small" })] })] })) : (renderButton()) }), jsx(PopoverContent, { children: children !== undefined ? (jsx(MenuList, { className: cvaMenuListOverrides({ withStickyHeader }), "data-testid": dataTestId ? dataTestId : undefined, ...menuListProps, children: children })) : (jsx(Fragment, {})) })] }));
|
|
56
56
|
} }));
|
|
57
57
|
};
|
|
58
58
|
const cvaMenuListOverrides = cvaMerge(["overflow-x-hidden", "relative", "!max-w-full", "p-0"], {
|
|
@@ -136,7 +136,7 @@ const CheckBoxFilterItem = ({ itemCount, className, suffix, "data-testid": dataT
|
|
|
136
136
|
selection: "auto",
|
|
137
137
|
focus: "auto",
|
|
138
138
|
className: twMerge(["py-1", "mx-1", "pl-2", "pr-3", "w-auto", "h-auto", "items-center", "gap-x-2", "select-none", "rounded"], className),
|
|
139
|
-
}), "data-testid": dataTestId ?? `${label}-checkbox-filter-item`, label: label, ref: ref, suffix: itemCount !== undefined || suffix ? (jsxs("span", { className: cvaMenuItemSuffix({ selected: rest.checked }), children: [suffix, itemCount === undefined ? null : itemCount] })) : null, ...rest }));
|
|
139
|
+
}), "data-testid": dataTestId ?? `${label}-checkbox-filter-item`, label: label, ref: ref, suffix: itemCount !== undefined || (suffix !== undefined && suffix !== null) ? (jsxs("span", { className: cvaMenuItemSuffix({ selected: rest.checked }), children: [suffix, itemCount === undefined ? null : itemCount] })) : null, ...rest }));
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
/**
|
|
@@ -151,7 +151,7 @@ const RadioFilterItem = ({ value, label, itemCount, selected, "data-testid": dat
|
|
|
151
151
|
selection: "auto",
|
|
152
152
|
focus: "auto",
|
|
153
153
|
className: twMerge(["py-1", "pl-2", "pr-3", "w-full", "h-auto", "items-center", "gap-x-2", "select-none", "rounded"], className),
|
|
154
|
-
}), "data-testid": dataTestId ?? `${label}-radio-filter-item`, label: label, suffix: itemCount !== undefined || suffix ? (jsxs("span", { className: cvaMenuItemSuffix({ selected: rest.checked }), children: [suffix, itemCount === undefined ? null : itemCount] })) : null, value: value, ...rest }));
|
|
154
|
+
}), "data-testid": dataTestId ?? `${label}-radio-filter-item`, label: label, suffix: itemCount !== undefined || (suffix !== undefined && suffix !== null) ? (jsxs("span", { className: cvaMenuItemSuffix({ selected: rest.checked }), children: [suffix, itemCount === undefined ? null : itemCount] })) : null, value: value, ...rest }));
|
|
155
155
|
};
|
|
156
156
|
|
|
157
157
|
export { CheckBoxFilterItem, Filter, FilterBody, FilterFooter, FilterHeader, RadioFilterItem, cvaFilterFooter, cvaFilterHeaderButton };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-filter-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@trackunit/ui-icons": "1.11.66",
|
|
13
13
|
"@trackunit/css-class-variance-utilities": "1.11.68",
|
|
14
14
|
"@trackunit/react-components": "1.18.9",
|
|
15
|
-
"@trackunit/react-form-components": "1.
|
|
15
|
+
"@trackunit/react-form-components": "1.16.0"
|
|
16
16
|
},
|
|
17
17
|
"module": "./index.esm.js",
|
|
18
18
|
"main": "./index.cjs.js",
|