foxit-component 1.0.3-alpha.2 → 1.0.3-alpha.3
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/es/Select/Select.d.ts +5 -1
- package/es/Select/Select.js +5 -3
- package/package.json +1 -1
package/es/Select/Select.d.ts
CHANGED
|
@@ -14,7 +14,11 @@ export interface SelectProps {
|
|
|
14
14
|
preIcon?: React.ReactNode;
|
|
15
15
|
value?: string | number | CustomOption | null;
|
|
16
16
|
onChange?: (v: unknown) => void;
|
|
17
|
-
|
|
17
|
+
styles?: {
|
|
18
|
+
control?: React.CSSProperties;
|
|
19
|
+
singleValue?: React.CSSProperties;
|
|
20
|
+
input?: React.CSSProperties;
|
|
21
|
+
};
|
|
18
22
|
[key: string]: unknown;
|
|
19
23
|
}
|
|
20
24
|
interface CustomOption {
|
package/es/Select/Select.js
CHANGED
|
@@ -5,7 +5,7 @@ import classNames from 'classnames';
|
|
|
5
5
|
import { Icon } from '../Icon/index.js';
|
|
6
6
|
|
|
7
7
|
var Select = function (_a) {
|
|
8
|
-
var options = _a.options, className = _a.className, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, isClearable = _a.isClearable, isSearchable = _a.isSearchable, isMulti = _a.isMulti, _b = _a.placeholder, placeholder = _b === void 0 ? 'Select...' : _b, preIcon = _a.preIcon, value = _a.value, onChange = _a.onChange,
|
|
8
|
+
var options = _a.options, className = _a.className, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, isClearable = _a.isClearable, isSearchable = _a.isSearchable, isMulti = _a.isMulti, _b = _a.placeholder, placeholder = _b === void 0 ? 'Select...' : _b, preIcon = _a.preIcon, value = _a.value, onChange = _a.onChange, passStyles = _a.styles, rest = __rest(_a, ["options", "className", "defaultValue", "isDisabled", "isClearable", "isSearchable", "isMulti", "placeholder", "preIcon", "value", "onChange", "styles"]);
|
|
9
9
|
var customStyles = {
|
|
10
10
|
control: function (styles, _a) {
|
|
11
11
|
var isDisabled = _a.isDisabled;
|
|
@@ -15,7 +15,7 @@ var Select = function (_a) {
|
|
|
15
15
|
border: '1px solid #757575'
|
|
16
16
|
}, ':focus-within': {
|
|
17
17
|
border: '1px solid #FF5F00'
|
|
18
|
-
} }),
|
|
18
|
+
} }), ((passStyles === null || passStyles === void 0 ? void 0 : passStyles.control) || {})));
|
|
19
19
|
},
|
|
20
20
|
menuPortal: function (base) { return (__assign(__assign({}, base), { zIndex: 99999 })); },
|
|
21
21
|
option: function (styles, _a) {
|
|
@@ -26,7 +26,9 @@ var Select = function (_a) {
|
|
|
26
26
|
},
|
|
27
27
|
indicatorSeparator: function (styles) { return (__assign(__assign({}, styles), { display: 'none' })); },
|
|
28
28
|
placeholder: function (styles) { return (__assign(__assign({}, styles), { color: '#B3B3B3' })); },
|
|
29
|
-
dropdownIndicator: function (styles) { return (__assign(__assign({}, styles), { paddingRight: 16 })); }
|
|
29
|
+
dropdownIndicator: function (styles) { return (__assign(__assign({}, styles), { paddingRight: 16 })); },
|
|
30
|
+
singleValue: function (styles) { return (__assign(__assign({}, styles), ((passStyles === null || passStyles === void 0 ? void 0 : passStyles.singleValue) || {}))); },
|
|
31
|
+
input: function (styles) { return (__assign(__assign({}, styles), ((passStyles === null || passStyles === void 0 ? void 0 : passStyles.input) || {}))); }
|
|
30
32
|
};
|
|
31
33
|
var CustomControl = function (props) { return (jsxs(components.Control, __assign({}, props, { children: [preIcon && (jsx("div", __assign({ style: {
|
|
32
34
|
display: 'flex',
|