@decisiv/ui-components 2.0.1-alpha.142 → 2.0.1-alpha.143
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.
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import { FilterProps } from './types';
|
|
4
|
-
declare const Filter:
|
|
5
|
-
({ active: filterActive, variant, kind, onClick, disabled, badgeColor, ...rest }: FilterProps): JSX.Element;
|
|
6
|
-
propTypes: {
|
|
7
|
-
active: PropTypes.Requireable<boolean>;
|
|
8
|
-
variant: PropTypes.Requireable<string>;
|
|
9
|
-
kind: PropTypes.Requireable<string>;
|
|
10
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
-
text: PropTypes.Validator<string>;
|
|
12
|
-
badgeColor: PropTypes.Requireable<import("../../utils/commonUIColors").CommonUIColorKeys>;
|
|
13
|
-
badgeIcon: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
14
|
-
count: PropTypes.Requireable<number>;
|
|
15
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
16
|
-
};
|
|
17
|
-
defaultProps: {
|
|
18
|
-
active: boolean;
|
|
19
|
-
variant: string;
|
|
20
|
-
onClick: null;
|
|
21
|
-
kind: string;
|
|
22
|
-
badgeIcon: null;
|
|
23
|
-
badgeColor: string;
|
|
24
|
-
count: undefined;
|
|
25
|
-
disabled: boolean;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
3
|
+
declare const Filter: React.ForwardRefExoticComponent<FilterProps & React.RefAttributes<HTMLButtonElement>>;
|
|
28
4
|
export default Filter;
|
|
29
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Filter/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Filter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAMtE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAStC,QAAA,MAAM,MAAM,uFAsDX,CAAC;AA4BF,eAAe,MAAM,CAAC"}
|
|
@@ -39,7 +39,7 @@ var components = {
|
|
|
39
39
|
simple: _SimplePrimary.default
|
|
40
40
|
}; // variant uses basic
|
|
41
41
|
|
|
42
|
-
var Filter = function
|
|
42
|
+
var Filter = (0, _react.forwardRef)(function (_ref, ref) {
|
|
43
43
|
var filterActive = _ref.active,
|
|
44
44
|
_ref$variant = _ref.variant,
|
|
45
45
|
variant = _ref$variant === void 0 ? 'simple' : _ref$variant,
|
|
@@ -68,6 +68,7 @@ var Filter = function Filter(_ref) {
|
|
|
68
68
|
}
|
|
69
69
|
}, [onClick, toggleStatus]);
|
|
70
70
|
return _react.default.createElement(_StyledFilter.default, _extends({
|
|
71
|
+
ref: ref,
|
|
71
72
|
kind: kind,
|
|
72
73
|
tabIndex: 0,
|
|
73
74
|
active: filterActive || active,
|
|
@@ -78,7 +79,7 @@ var Filter = function Filter(_ref) {
|
|
|
78
79
|
disabled: disabled,
|
|
79
80
|
badgeColor: disabled ? _visualInterest.VisualInterestColorName.licoriceMousse : badgeColor
|
|
80
81
|
}, rest)));
|
|
81
|
-
};
|
|
82
|
+
}); // @ts-ignore
|
|
82
83
|
|
|
83
84
|
Filter.propTypes = {
|
|
84
85
|
active: _propTypes.default.bool,
|
|
@@ -94,12 +95,13 @@ Filter.propTypes = {
|
|
|
94
95
|
Filter.defaultProps = {
|
|
95
96
|
active: false,
|
|
96
97
|
variant: 'simple',
|
|
97
|
-
onClick:
|
|
98
|
+
onClick: undefined,
|
|
98
99
|
kind: 'primary',
|
|
99
|
-
badgeIcon:
|
|
100
|
+
badgeIcon: undefined,
|
|
100
101
|
badgeColor: 'information',
|
|
101
102
|
count: undefined,
|
|
102
103
|
disabled: false
|
|
103
104
|
};
|
|
105
|
+
Filter.displayName = 'Filter';
|
|
104
106
|
var _default = Filter;
|
|
105
107
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decisiv/ui-components",
|
|
3
|
-
"version": "2.0.1-alpha.
|
|
3
|
+
"version": "2.0.1-alpha.143+69b8e4a",
|
|
4
4
|
"description": "Decisiv's design system React components",
|
|
5
5
|
"author": "Decisiv UI Development Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
73
|
"private": false,
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "69b8e4afa501944214740b4e6578349f5cfbba14"
|
|
75
75
|
}
|