@trackunit/react-filter-components 0.0.55 → 0.0.57
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/README.md +1 -1
- package/index.cjs +3 -2
- package/index.js +2 -1
- package/package.json +4 -3
- package/src/FilterItem/types.d.ts +2 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ The `@trackunit/react-filter-components` package is the home of Trackunits publi
|
|
|
7
7
|
|
|
8
8
|
This library is exposed publicly for use in the the Trackunit [Iris App SDK](https://www.npmjs.com/package/@trackunit/iris-app).
|
|
9
9
|
|
|
10
|
-
To browse all
|
|
10
|
+
To browse all available components visit our [Public Storybook](https://developers.trackunit.com/page/ui-components).
|
|
11
11
|
|
|
12
12
|
For more info and a full guide on Iris App SDK Development, please visit our [Developer Hub](https://developers.trackunit.com/).
|
|
13
13
|
|
package/index.cjs
CHANGED
|
@@ -6,6 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var reactComponents = require('@trackunit/react-components');
|
|
7
7
|
var tailwindStyledComponents = require('@trackunit/tailwind-styled-components');
|
|
8
8
|
var React = require('react');
|
|
9
|
+
var reactFormComponents = require('@trackunit/react-form-components');
|
|
9
10
|
|
|
10
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
12
|
|
|
@@ -141,7 +142,7 @@ const CheckBoxFilterItem = (_a) => {
|
|
|
141
142
|
var _a;
|
|
142
143
|
e.preventDefault();
|
|
143
144
|
(_a = checkboxRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
144
|
-
}, selected: checkboxProps.checked, disabled: checkboxProps.disabled, className: className, dataTestId: dataTestId, prefix: prefix }, menuItemProps, { suffix: jsxRuntime.jsx("small", { children: itemCount }) }, { children: jsxRuntime.jsx(
|
|
145
|
+
}, selected: checkboxProps.checked, disabled: checkboxProps.disabled, className: className, dataTestId: dataTestId, prefix: prefix }, menuItemProps, { suffix: jsxRuntime.jsx("small", { children: itemCount }) }, { children: jsxRuntime.jsx(reactFormComponents.Checkbox, Object.assign({ ref: checkboxRef }, checkboxProps, { dataTestId: dataTestId && `${dataTestId}-checkbox`, className: "flex-grow cursor-pointer" })) })));
|
|
145
146
|
};
|
|
146
147
|
|
|
147
148
|
/**
|
|
@@ -153,7 +154,7 @@ const CheckBoxFilterItem = (_a) => {
|
|
|
153
154
|
*/
|
|
154
155
|
const RadioFilterItem = (_a) => {
|
|
155
156
|
var { value, label, itemCount, selected, dataTestId, menuItemProps } = _a, rest = __rest(_a, ["value", "label", "itemCount", "selected", "dataTestId", "menuItemProps"]);
|
|
156
|
-
return (jsxRuntime.jsx(reactComponents.MenuItem, Object.assign({ selected: selected, dataTestId: dataTestId, className: "flex justify-between cursor-default p-0 my-[2px]", suffix: jsxRuntime.jsx("small", Object.assign({ className: "pl-1 pr-3" }, { children: itemCount })) }, menuItemProps, { children: jsxRuntime.jsx(
|
|
157
|
+
return (jsxRuntime.jsx(reactComponents.MenuItem, Object.assign({ selected: selected, dataTestId: dataTestId, className: "flex justify-between cursor-default p-0 my-[2px]", suffix: jsxRuntime.jsx("small", Object.assign({ className: "pl-1 pr-3" }, { children: itemCount })) }, menuItemProps, { children: jsxRuntime.jsx(reactFormComponents.RadioItem, Object.assign({}, rest, { value: value, className: "flex items-center w-full py-2 pl-2", dataTestId: dataTestId && `${dataTestId}-radio`, label: jsxRuntime.jsx(reactComponents.Text, Object.assign({ className: "cursor-pointer", type: "span" }, { children: label })) })) })));
|
|
157
158
|
};
|
|
158
159
|
|
|
159
160
|
exports.CheckBoxFilterItem = CheckBoxFilterItem;
|
package/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Button, MenuList, Popover, PopoverTrigger, PopoverContent, Spinner, MenuItem,
|
|
2
|
+
import { Button, MenuList, Popover, PopoverTrigger, PopoverContent, Spinner, MenuItem, Text } from '@trackunit/react-components';
|
|
3
3
|
import { twx, tws, tw } from '@trackunit/tailwind-styled-components';
|
|
4
4
|
import React, { useRef } from 'react';
|
|
5
|
+
import { Checkbox, RadioItem } from '@trackunit/react-form-components';
|
|
5
6
|
|
|
6
7
|
/******************************************************************************
|
|
7
8
|
Copyright (c) Microsoft Corporation.
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-filter-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@trackunit/react-components": "0.1.
|
|
7
|
+
"@trackunit/react-components": "0.1.77",
|
|
8
|
+
"@trackunit/react-form-components": "0.0.1",
|
|
8
9
|
"react": "18.2.0",
|
|
9
|
-
"@trackunit/tailwind-styled-components": "0.0.
|
|
10
|
+
"@trackunit/tailwind-styled-components": "0.0.55",
|
|
10
11
|
"jest-canvas-mock": "2.4.0"
|
|
11
12
|
},
|
|
12
13
|
"module": "./index.js",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MenuItemProps } from "@trackunit/react-components";
|
|
2
|
+
import { CheckboxProps, RadioItemProps } from "@trackunit/react-form-components";
|
|
2
3
|
export interface CheckBoxFilterItemProps extends Omit<CheckboxProps, "prefix" | "suffix">, BaseFilterItemProps {
|
|
3
4
|
}
|
|
4
5
|
export interface RadioFilterItemProps extends RadioItemProps, BaseFilterItemProps {
|