@trackunit/react-filter-components 0.0.171 → 0.0.173

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
@@ -93,6 +93,20 @@ const cvaFilterBody = cssClassVarianceUtilities.cvaMerge(["grid", "gap-1", "p-1"
93
93
  },
94
94
  });
95
95
 
96
+ /**
97
+ * The FilterFooter component is used to display the title of the filter and a reset button.
98
+ * IT is intended for use in the Filter component.
99
+ * The reset button will only be visible if the showReset prop is set to true.
100
+ *
101
+ * @param {FilterFooterProps} props - The props for the FilterFooter component
102
+ * @returns {JSX.Element} FilterFooter component
103
+ */
104
+ const FilterFooter = (_a) => {
105
+ var { className, dataTestId, children } = _a, rest = __rest(_a, ["className", "dataTestId", "children"]);
106
+ return (jsxRuntime.jsx("div", Object.assign({ className: cvaFilterFooter({ className }), "data-testid": dataTestId }, rest, { children: children })));
107
+ };
108
+ const cvaFilterFooter = cssClassVarianceUtilities.cvaMerge(["flex", "justify-end", "before:p-1"]);
109
+
96
110
  /**
97
111
  * The FilterHeader component is used to display the title of the filter and a reset button.
98
112
  * IT is intended for use in the Filter component.
@@ -150,6 +164,8 @@ const RadioFilterItem = (_a) => {
150
164
  exports.CheckBoxFilterItem = CheckBoxFilterItem;
151
165
  exports.Filter = Filter;
152
166
  exports.FilterBody = FilterBody;
167
+ exports.FilterFooter = FilterFooter;
153
168
  exports.FilterHeader = FilterHeader;
154
169
  exports.RadioFilterItem = RadioFilterItem;
170
+ exports.cvaFilterFooter = cvaFilterFooter;
155
171
  exports.cvaFilterHeaderButton = cvaFilterHeaderButton;
package/index.esm.js CHANGED
@@ -85,6 +85,20 @@ const cvaFilterBody = cvaMerge(["grid", "gap-1", "p-1", "rounded", "w-full"], {
85
85
  },
86
86
  });
87
87
 
88
+ /**
89
+ * The FilterFooter component is used to display the title of the filter and a reset button.
90
+ * IT is intended for use in the Filter component.
91
+ * The reset button will only be visible if the showReset prop is set to true.
92
+ *
93
+ * @param {FilterFooterProps} props - The props for the FilterFooter component
94
+ * @returns {JSX.Element} FilterFooter component
95
+ */
96
+ const FilterFooter = (_a) => {
97
+ var { className, dataTestId, children } = _a, rest = __rest(_a, ["className", "dataTestId", "children"]);
98
+ return (jsx("div", Object.assign({ className: cvaFilterFooter({ className }), "data-testid": dataTestId }, rest, { children: children })));
99
+ };
100
+ const cvaFilterFooter = cvaMerge(["flex", "justify-end", "before:p-1"]);
101
+
88
102
  /**
89
103
  * The FilterHeader component is used to display the title of the filter and a reset button.
90
104
  * IT is intended for use in the Filter component.
@@ -139,4 +153,4 @@ const RadioFilterItem = (_a) => {
139
153
  return (jsx(MenuItem, Object.assign({ selected: selected, dataTestId: dataTestId, className: "flex justify-between cursor-default p-0 my-[2px]", suffix: jsx("small", { className: "pl-1 pr-3", children: itemCount }) }, menuItemProps, { children: jsx(RadioItem, Object.assign({}, rest, { value: value, className: "flex items-center w-full py-2 pl-2", dataTestId: dataTestId && `${dataTestId}-radio`, label: jsx(Text, { className: "cursor-pointer", type: "span", children: label }) })) })));
140
154
  };
141
155
 
142
- export { CheckBoxFilterItem, Filter, FilterBody, FilterHeader, RadioFilterItem, cvaFilterHeaderButton };
156
+ 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": "0.0.171",
3
+ "version": "0.0.173",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -8,8 +8,8 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@trackunit/css-class-variance-utilities": "0.0.11",
11
- "@trackunit/react-components": "0.1.144",
12
- "@trackunit/react-form-components": "0.0.113",
11
+ "@trackunit/react-components": "0.1.145",
12
+ "@trackunit/react-form-components": "0.0.114",
13
13
  "react": "18.2.0"
14
14
  },
15
15
  "module": "./index.esm.js",
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { CommonProps } from "@trackunit/react-components";
3
+ export interface FilterFooterProps extends CommonProps {
4
+ /**
5
+ * Items to render in the filter footer
6
+ */
7
+ children?: React.ReactNode;
8
+ }
9
+ /**
10
+ * The FilterFooter component is used to display the title of the filter and a reset button.
11
+ * IT is intended for use in the Filter component.
12
+ * The reset button will only be visible if the showReset prop is set to true.
13
+ *
14
+ * @param {FilterFooterProps} props - The props for the FilterFooter component
15
+ * @returns {JSX.Element} FilterFooter component
16
+ */
17
+ export declare const FilterFooter: ({ className, dataTestId, children, ...rest }: FilterFooterProps) => JSX.Element;
18
+ export declare const cvaFilterFooter: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
package/src/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./Filter/Filter";
2
2
  export * from "./FilterBody/FilterBody";
3
+ export * from "./FilterFooter/FilterFooter";
3
4
  export * from "./FilterHeader/FilterHeader";
4
5
  export * from "./FilterItem/CheckBoxFilter/CheckBoxFilterItem";
5
6
  export * from "./FilterItem/RadioFilter/RadioFilterItem";