@true-engineering/true-react-common-ui-kit 4.0.0-alpha38 → 4.0.0-alpha39
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/dist/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.d.ts +2 -1
- package/dist/true-react-common-ui-kit.js +3 -2
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +3 -2
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +4 -3
- package/src/components/FiltersPane/FiltersPane.stories.tsx +4 -0
- package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.tsx +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@true-engineering/true-react-common-ui-kit",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-alpha39",
|
|
4
4
|
"description": "True Engineering React UI Kit with theming support",
|
|
5
5
|
"author": "True Engineering (https://trueengineering.ru)",
|
|
6
6
|
"keywords": [
|
|
@@ -39,11 +39,12 @@
|
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsc && vite build",
|
|
42
|
+
"build:pr": "vite build",
|
|
42
43
|
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
|
|
43
44
|
"format": "prettier --write \"**/*.{js,jsx,css,json,ts,tsx}\"",
|
|
44
45
|
"format:check": "prettier --check \"**/*.{js,jsx,css,json,ts,tsx}\"",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
46
|
+
"types-check": "tsc --noEmit",
|
|
47
|
+
"full-check": "yarn types-check && yarn format:check && yarn lint"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@floating-ui/react": "^0.27.13",
|
|
@@ -79,6 +79,7 @@ interface IFiltersPaneWithCustomProps<Values extends Record<string, unknown>, Co
|
|
|
79
79
|
isGroupingEnabled: boolean;
|
|
80
80
|
checkboxPosition: 'left' | 'right';
|
|
81
81
|
isClearableFields: boolean;
|
|
82
|
+
isSearchAutoSized: boolean;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
function FiltersPaneWithCustomProps<Values extends Record<string, unknown>, Content>({
|
|
@@ -89,6 +90,7 @@ function FiltersPaneWithCustomProps<Values extends Record<string, unknown>, Cont
|
|
|
89
90
|
isGroupingEnabled,
|
|
90
91
|
checkboxPosition,
|
|
91
92
|
isClearableFields,
|
|
93
|
+
isSearchAutoSized,
|
|
92
94
|
...args
|
|
93
95
|
}: IFiltersPaneWithCustomProps<Values, Content>) {
|
|
94
96
|
const config: ConfigType<ConfigValues> = {
|
|
@@ -239,6 +241,7 @@ function FiltersPaneWithCustomProps<Values extends Record<string, unknown>, Cont
|
|
|
239
241
|
getValueView: convertFieldToString,
|
|
240
242
|
onChange: setSearchValue,
|
|
241
243
|
isDisabled: isSearchDisabled,
|
|
244
|
+
isAutoSized: isSearchAutoSized,
|
|
242
245
|
}}
|
|
243
246
|
enabledFilters={[
|
|
244
247
|
'name',
|
|
@@ -294,4 +297,5 @@ Default.args = {
|
|
|
294
297
|
withFieldNameInLabel: true,
|
|
295
298
|
isGroupingEnabled: true,
|
|
296
299
|
checkboxPosition: 'left',
|
|
300
|
+
isSearchAutoSized: false,
|
|
297
301
|
};
|
|
@@ -36,6 +36,7 @@ export interface IFiltersPaneSearchProps<Value> extends ICommonProps<IFiltersPan
|
|
|
36
36
|
hasClearSelectButton?: boolean;
|
|
37
37
|
isDisabled?: boolean;
|
|
38
38
|
isSelectSearchEnabled?: boolean;
|
|
39
|
+
isAutoSized?: boolean;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export function FiltersPaneSearch<Value>({
|
|
@@ -51,6 +52,7 @@ export function FiltersPaneSearch<Value>({
|
|
|
51
52
|
hasClearSelectButton,
|
|
52
53
|
isDisabled = false,
|
|
53
54
|
isSelectSearchEnabled = true,
|
|
55
|
+
isAutoSized = false,
|
|
54
56
|
maxLength,
|
|
55
57
|
data,
|
|
56
58
|
tweakStyles,
|
|
@@ -116,6 +118,7 @@ export function FiltersPaneSearch<Value>({
|
|
|
116
118
|
testId={getTestId(testId, 'input')}
|
|
117
119
|
maxLength={maxLength}
|
|
118
120
|
isDisabled={isDisabled}
|
|
121
|
+
isAutoSized={isAutoSized}
|
|
119
122
|
/>
|
|
120
123
|
|
|
121
124
|
<div className={classes.selectWrapper}>
|