@trackunit/react-filter-components 1.6.95 → 1.7.6

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 CHANGED
@@ -37,7 +37,7 @@ const Filter = ({ title, asIcon, children, popoverProps, isActive, activeLabel,
37
37
  }, []);
38
38
  const renderButton = () => {
39
39
  if (asIcon) {
40
- return (jsxRuntime.jsx(reactComponents.IconButton, { className: className, dataTestId: dataTestId, disabled: readOnly, icon: jsxRuntime.jsx(reactComponents.Icon, { name: asIcon, size: "small" }), onClick: handleClick, size: size, variant: isActive ? "filled" : "ghost-neutral" }));
40
+ return (jsxRuntime.jsx(reactComponents.IconButton, { className: className, dataTestId: dataTestId, disabled: readOnly, icon: jsxRuntime.jsx(reactComponents.Icon, { name: asIcon, size: "small" }), onClick: handleClick, size: size, variant: isActive ? "ghost" : "ghost-neutral" }));
41
41
  }
42
42
  return (jsxRuntime.jsxs(reactComponents.Button, { className: cvaFilterCustomButton({ isActive, className }), dataTestId: dataTestId, disabled: readOnly, onClick: handleClick, size: size, variant: "secondary", children: [title, isActive ? (jsxRuntime.jsx("div", { className: "grid overflow-hidden text-ellipsis whitespace-nowrap", children: jsxRuntime.jsx("span", { className: "text-primary-600 truncate", children: activeLabel }) })) : null] }));
43
43
  };
@@ -54,7 +54,7 @@ const Filter = ({ title, asIcon, children, popoverProps, isActive, activeLabel,
54
54
  className,
55
55
  "text-secondary-700 hover:text-secondary-800 grid list-none grid-flow-col items-center justify-between gap-1 rounded px-3 py-2 text-sm",
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-slate-900", children: [isActive && activeLabel ? (jsxRuntime.jsx(reactComponents.Badge, { className: !activeOptionsCount ? "mx-2" : "mx-1", compact: !activeOptionsCount, count: activeOptionsCount })) : null, readOnly ? null : jsxRuntime.jsx(reactComponents.Icon, { ariaHidden: true, color: "secondary", name: "ChevronRight", size: "small" })] })] })) : (renderButton()) }), jsxRuntime.jsx(reactComponents.PopoverContent, { children: children ? (jsxRuntime.jsx(reactComponents.MenuList, { className: cvaMenuListOverrides({ withStickyHeader }), dataTestId: dataTestId ? dataTestId : undefined, withStickyHeader: withStickyHeader, ...menuListProps, children: children })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})) })] }));
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-slate-900", children: [isActive && activeLabel ? (jsxRuntime.jsx(reactComponents.Badge, { className: !activeOptionsCount ? "mx-2" : "mx-1", compact: !activeOptionsCount, count: activeOptionsCount, ...(!activeOptionsCount ? {} : { size: "condensed" }) })) : null, readOnly ? null : jsxRuntime.jsx(reactComponents.Icon, { ariaHidden: true, color: "secondary", name: "ChevronRight", size: "small" })] })] })) : (renderButton()) }), jsxRuntime.jsx(reactComponents.PopoverContent, { children: children ? (jsxRuntime.jsx(reactComponents.MenuList, { className: cvaMenuListOverrides({ withStickyHeader }), dataTestId: dataTestId ? dataTestId : undefined, withStickyHeader: withStickyHeader, ...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"], {
package/index.esm.js CHANGED
@@ -35,7 +35,7 @@ const Filter = ({ title, asIcon, children, popoverProps, isActive, activeLabel,
35
35
  }, []);
36
36
  const renderButton = () => {
37
37
  if (asIcon) {
38
- return (jsx(IconButton, { className: className, dataTestId: dataTestId, disabled: readOnly, icon: jsx(Icon, { name: asIcon, size: "small" }), onClick: handleClick, size: size, variant: isActive ? "filled" : "ghost-neutral" }));
38
+ return (jsx(IconButton, { className: className, dataTestId: dataTestId, disabled: readOnly, icon: jsx(Icon, { name: asIcon, size: "small" }), onClick: handleClick, size: size, variant: isActive ? "ghost" : "ghost-neutral" }));
39
39
  }
40
40
  return (jsxs(Button, { className: cvaFilterCustomButton({ isActive, className }), dataTestId: dataTestId, disabled: readOnly, onClick: handleClick, size: size, variant: "secondary", children: [title, isActive ? (jsx("div", { className: "grid overflow-hidden text-ellipsis whitespace-nowrap", children: jsx("span", { className: "text-primary-600 truncate", children: activeLabel }) })) : null] }));
41
41
  };
@@ -52,7 +52,7 @@ const Filter = ({ title, asIcon, children, popoverProps, isActive, activeLabel,
52
52
  className,
53
53
  "text-secondary-700 hover:text-secondary-800 grid list-none grid-flow-col items-center justify-between gap-1 rounded px-3 py-2 text-sm",
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-slate-900", children: [isActive && activeLabel ? (jsx(Badge, { className: !activeOptionsCount ? "mx-2" : "mx-1", compact: !activeOptionsCount, count: activeOptionsCount })) : null, readOnly ? null : jsx(Icon, { ariaHidden: true, color: "secondary", name: "ChevronRight", size: "small" })] })] })) : (renderButton()) }), jsx(PopoverContent, { children: children ? (jsx(MenuList, { className: cvaMenuListOverrides({ withStickyHeader }), dataTestId: dataTestId ? dataTestId : undefined, withStickyHeader: withStickyHeader, ...menuListProps, children: children })) : (jsx(Fragment, {})) })] }));
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-slate-900", children: [isActive && activeLabel ? (jsx(Badge, { className: !activeOptionsCount ? "mx-2" : "mx-1", compact: !activeOptionsCount, count: activeOptionsCount, ...(!activeOptionsCount ? {} : { size: "condensed" }) })) : null, readOnly ? null : jsx(Icon, { ariaHidden: true, color: "secondary", name: "ChevronRight", size: "small" })] })] })) : (renderButton()) }), jsx(PopoverContent, { children: children ? (jsx(MenuList, { className: cvaMenuListOverrides({ withStickyHeader }), dataTestId: dataTestId ? dataTestId : undefined, withStickyHeader: withStickyHeader, ...menuListProps, children: children })) : (jsx(Fragment, {})) })] }));
56
56
  } }));
57
57
  };
58
58
  const cvaMenuListOverrides = cvaMerge(["overflow-x-hidden", "relative", "!max-w-full", "p-0"], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-filter-components",
3
- "version": "1.6.95",
3
+ "version": "1.7.6",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,11 +9,11 @@
9
9
  "dependencies": {
10
10
  "react": "19.0.0",
11
11
  "tailwind-merge": "^2.0.0",
12
- "@trackunit/ui-icons": "1.6.64",
13
- "@trackunit/css-class-variance-utilities": "1.6.65",
14
- "@trackunit/react-components": "1.8.44",
15
- "@trackunit/react-form-components": "1.7.60",
16
- "@trackunit/react-test-setup": "1.3.65"
12
+ "@trackunit/ui-icons": "1.7.5",
13
+ "@trackunit/css-class-variance-utilities": "1.7.4",
14
+ "@trackunit/react-components": "1.9.6",
15
+ "@trackunit/react-form-components": "1.8.6",
16
+ "@trackunit/react-test-setup": "1.4.4"
17
17
  },
18
18
  "module": "./index.esm.js",
19
19
  "main": "./index.cjs.js",