@trackunit/react-filter-components 1.14.14 → 1.14.16-alpha-ae1ff73fc64.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 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: !activeOptionsCount ? "mx-2" : "mx-1", compact: !activeOptionsCount, count: activeOptionsCount, ...(!activeOptionsCount ? {} : { 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, {})) })] }));
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: !activeOptionsCount ? "mx-2" : "mx-1", compact: !activeOptionsCount, count: activeOptionsCount, ...(!activeOptionsCount ? {} : { 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, {})) })] }));
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.14.14",
3
+ "version": "1.14.16-alpha-ae1ff73fc64.0",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,10 +9,10 @@
9
9
  "dependencies": {
10
10
  "react": "19.0.0",
11
11
  "tailwind-merge": "^2.0.0",
12
- "@trackunit/ui-icons": "1.11.66",
13
- "@trackunit/css-class-variance-utilities": "1.11.68",
14
- "@trackunit/react-components": "1.18.9",
15
- "@trackunit/react-form-components": "1.15.9"
12
+ "@trackunit/ui-icons": "1.11.67-alpha-ae1ff73fc64.0",
13
+ "@trackunit/css-class-variance-utilities": "1.11.69-alpha-ae1ff73fc64.0",
14
+ "@trackunit/react-components": "1.18.10-alpha-ae1ff73fc64.0",
15
+ "@trackunit/react-form-components": "1.15.10-alpha-ae1ff73fc64.0"
16
16
  },
17
17
  "module": "./index.esm.js",
18
18
  "main": "./index.cjs.js",
@@ -1,3 +1,3 @@
1
1
  export declare const cvaFilterCustomButton: (props?: ({
2
2
  isActive?: boolean | null | undefined;
3
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
3
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -14,4 +14,4 @@ export interface FilterFooterProps extends CommonProps, Refable<HTMLDivElement>
14
14
  * @returns {ReactElement} FilterFooter component
15
15
  */
16
16
  export declare const FilterFooter: ({ className, "data-testid": dataTestId, children, ref, ...rest }: FilterFooterProps) => import("react/jsx-runtime").JSX.Element;
17
- export declare const cvaFilterFooter: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
17
+ export declare const cvaFilterFooter: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
@@ -39,4 +39,4 @@ export interface FilterHeaderProps extends CommonProps, Refable<HTMLDivElement>
39
39
  export declare const FilterHeader: ({ "data-testid": dataTestId, title, resetLabel, showReset, onReset, loading, children, searchComponent, className, ref, ...rest }: FilterHeaderProps) => ReactElement;
40
40
  export declare const cvaFilterHeaderButton: (props?: ({
41
41
  isVisible?: boolean | null | undefined;
42
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
42
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;