@citygross/components 0.7.69 → 0.7.70
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/build/@types/components/FormElements/Input/Input.d.ts +1 -1
- package/build/@types/components/FormElements/Input/Input.styles.d.ts +1 -0
- package/build/cjs/components/src/components/FormElements/Input/Input.js +2 -2
- package/build/cjs/components/src/components/FormElements/Input/Input.styles.js +6 -1
- package/build/cjs/components/src/components/FormElements/Input/Input.styles.js.map +1 -1
- package/build/es/components/src/components/FormElements/Input/Input.js +2 -2
- package/build/es/components/src/components/FormElements/Input/Input.styles.js +6 -1
- package/build/es/components/src/components/FormElements/Input/Input.styles.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as styles from './Input.styles';
|
|
2
|
-
export declare function Input({ flexGrow, isValid, fontSize, ...props }: styles.InputProps): JSX.Element;
|
|
2
|
+
export declare function Input({ flexGrow, isValid, fontSize, inputSize, ...props }: styles.InputProps): JSX.Element;
|
|
@@ -3,5 +3,6 @@ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
3
3
|
readonly isValid?: boolean;
|
|
4
4
|
flexGrow?: number;
|
|
5
5
|
fontSize?: number;
|
|
6
|
+
inputSize?: 'small' | 'medium';
|
|
6
7
|
}
|
|
7
8
|
export declare const Input: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, InputProps, never>;
|
|
@@ -11,8 +11,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
|
|
13
13
|
function Input(_a) {
|
|
14
|
-
var flexGrow = _a.flexGrow, isValid = _a.isValid, fontSize = _a.fontSize, props = _tslib.__rest(_a, ["flexGrow", "isValid", "fontSize"]);
|
|
15
|
-
return (React__default['default'].createElement(Input_styles.Input, _tslib.__assign({ flexGrow: flexGrow, fontSize: fontSize, isValid: isValid }, props)));
|
|
14
|
+
var flexGrow = _a.flexGrow, isValid = _a.isValid, fontSize = _a.fontSize, _b = _a.inputSize, inputSize = _b === void 0 ? 'medium' : _b, props = _tslib.__rest(_a, ["flexGrow", "isValid", "fontSize", "inputSize"]);
|
|
15
|
+
return (React__default['default'].createElement(Input_styles.Input, _tslib.__assign({ flexGrow: flexGrow, fontSize: fontSize, isValid: isValid, inputSize: inputSize }, props)));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
exports.Input = Input;
|
|
@@ -16,7 +16,12 @@ var Input = styled__default['default'].input(templateObject_1 || (templateObject
|
|
|
16
16
|
: (props === null || props === void 0 ? void 0 : props.isValid) === false
|
|
17
17
|
? 'red'
|
|
18
18
|
: (_d = (_c = props === null || props === void 0 ? void 0 : props.theme) === null || _c === void 0 ? void 0 : _c.palette) === null || _d === void 0 ? void 0 : _d.dark;
|
|
19
|
-
}, function (props) {
|
|
19
|
+
}, function (props) {
|
|
20
|
+
var _a, _b, _c, _d;
|
|
21
|
+
return props.inputSize === 'small'
|
|
22
|
+
? ((_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs) + "px " + ((_b = props.theme.spacings) === null || _b === void 0 ? void 0 : _b.xs) + "px"
|
|
23
|
+
: ((_c = props.theme.spacings) === null || _c === void 0 ? void 0 : _c.xs) + "px " + ((_d = props.theme.spacings) === null || _d === void 0 ? void 0 : _d.sm) + "px";
|
|
24
|
+
}, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.white; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.darkest; }, function (props) { var _a; return (_a = props.flexGrow) !== null && _a !== void 0 ? _a : 1; }, function (props) { var _a, _b, _c; return props.fontSize ? props.fontSize : (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.typography) === null || _b === void 0 ? void 0 : _b.size) === null || _c === void 0 ? void 0 : _c.s3; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.transition.inputTransition; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.brandBlue; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow.buttonHover; }, function (props) {
|
|
20
25
|
var _a, _b, _c, _d;
|
|
21
26
|
return props.disabled
|
|
22
27
|
? (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.medium
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,8 +3,8 @@ import { Input as Input$1 } from './Input.styles.js';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
5
|
function Input(_a) {
|
|
6
|
-
var flexGrow = _a.flexGrow, isValid = _a.isValid, fontSize = _a.fontSize, props = __rest(_a, ["flexGrow", "isValid", "fontSize"]);
|
|
7
|
-
return (React.createElement(Input$1, __assign({ flexGrow: flexGrow, fontSize: fontSize, isValid: isValid }, props)));
|
|
6
|
+
var flexGrow = _a.flexGrow, isValid = _a.isValid, fontSize = _a.fontSize, _b = _a.inputSize, inputSize = _b === void 0 ? 'medium' : _b, props = __rest(_a, ["flexGrow", "isValid", "fontSize", "inputSize"]);
|
|
7
|
+
return (React.createElement(Input$1, __assign({ flexGrow: flexGrow, fontSize: fontSize, isValid: isValid, inputSize: inputSize }, props)));
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export { Input };
|
|
@@ -8,7 +8,12 @@ var Input = styled.input(templateObject_1 || (templateObject_1 = __makeTemplateO
|
|
|
8
8
|
: (props === null || props === void 0 ? void 0 : props.isValid) === false
|
|
9
9
|
? 'red'
|
|
10
10
|
: (_d = (_c = props === null || props === void 0 ? void 0 : props.theme) === null || _c === void 0 ? void 0 : _c.palette) === null || _d === void 0 ? void 0 : _d.dark;
|
|
11
|
-
}, function (props) {
|
|
11
|
+
}, function (props) {
|
|
12
|
+
var _a, _b, _c, _d;
|
|
13
|
+
return props.inputSize === 'small'
|
|
14
|
+
? ((_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs) + "px " + ((_b = props.theme.spacings) === null || _b === void 0 ? void 0 : _b.xs) + "px"
|
|
15
|
+
: ((_c = props.theme.spacings) === null || _c === void 0 ? void 0 : _c.xs) + "px " + ((_d = props.theme.spacings) === null || _d === void 0 ? void 0 : _d.sm) + "px";
|
|
16
|
+
}, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.white; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.darkest; }, function (props) { var _a; return (_a = props.flexGrow) !== null && _a !== void 0 ? _a : 1; }, function (props) { var _a, _b, _c; return props.fontSize ? props.fontSize : (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.typography) === null || _b === void 0 ? void 0 : _b.size) === null || _c === void 0 ? void 0 : _c.s3; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.transition.inputTransition; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.brandBlue; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow.buttonHover; }, function (props) {
|
|
12
17
|
var _a, _b, _c, _d;
|
|
13
18
|
return props.disabled
|
|
14
19
|
? (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.medium
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.70",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"moment": "^2.29.1",
|
|
72
72
|
"react-loading-skeleton": "^2.2.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "42123de4fd41df07008cc53f537cd5ac35e79196"
|
|
75
75
|
}
|