@openfin/ui-library 0.1.26 → 0.1.27-alpha.1633719062
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.
|
@@ -25,11 +25,11 @@ const Text_1 = require("../../typography/Text");
|
|
|
25
25
|
* @private This should not be exposed beyond the ui-library.
|
|
26
26
|
*/
|
|
27
27
|
exports.BaseInput = react_1.forwardRef((_a, ref) => {
|
|
28
|
-
var { className, renderInput, message, label, status, name, type } = _a, inputProps = __rest(_a, ["className", "renderInput", "message", "label", "status", "name", "type"]);
|
|
28
|
+
var { className, renderInput, message, label, status, name, type = 'text' } = _a, inputProps = __rest(_a, ["className", "renderInput", "message", "label", "status", "name", "type"]);
|
|
29
29
|
const displayLabelInline = type === 'checkbox' || type === 'radio';
|
|
30
30
|
return (jsx_runtime_1.jsxs(InputContainer, Object.assign({ flexDirection: "column", alignItems: "flex-start" }, { children: [jsx_runtime_1.jsxs(LabelWrapper, Object.assign({ inline: displayLabelInline }, { children: [!!label && (jsx_runtime_1.jsx(InputLabel, Object.assign({ as: "label", htmlFor: name, weight: "bold" }, { children: label }), void 0)),
|
|
31
|
-
!!renderInput && renderInput(Object.assign({ name, status }, inputProps)),
|
|
32
|
-
!renderInput && (jsx_runtime_1.jsx(exports.StyledInputField, Object.assign({ className: className, name: name, status: status }, inputProps, { ref: ref }), void 0))] }), void 0),
|
|
31
|
+
!!renderInput && renderInput(Object.assign({ name, status, type }, inputProps)),
|
|
32
|
+
!renderInput && (jsx_runtime_1.jsx(exports.StyledInputField, Object.assign({ className: className, name: name, status: status, type: type }, inputProps, { ref: ref }), void 0))] }), void 0),
|
|
33
33
|
!!message && jsx_runtime_1.jsx(InputMessage, Object.assign({ status: status }, { children: message }), void 0)] }), void 0));
|
|
34
34
|
});
|
|
35
35
|
exports.BaseInput.displayName = 'BaseInput';
|
|
@@ -83,4 +83,12 @@ exports.StyledInputField = styled_components_1.default.input `
|
|
|
83
83
|
&:disabled::placeholder {
|
|
84
84
|
color: ${({ theme }) => theme.palette.inputDisabled};
|
|
85
85
|
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* This is a hack to invert the calendar icon. This only works in dark mode.
|
|
89
|
+
* Until either light mode is a thing or we get a datetime picker design, this will do.
|
|
90
|
+
*/
|
|
91
|
+
::-webkit-calendar-picker-indicator {
|
|
92
|
+
filter: invert(1);
|
|
93
|
+
}
|
|
86
94
|
`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/ui-library",
|
|
3
3
|
"description": "OpenFin UI Component Library",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.27-alpha.1633719062",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"repository": "github:openfin/ui-library",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"tinycolor2": "^1.4.2"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"styled-components": "4.
|
|
18
|
+
"styled-components": "4.4.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@babel/cli": "^7.15.4",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"react-scripts": "4.0.1",
|
|
58
58
|
"rimraf": "^3.0.2",
|
|
59
59
|
"storybook-addon-performance": "^0.16.1",
|
|
60
|
-
"styled-components": "4.
|
|
60
|
+
"styled-components": "4.4.1",
|
|
61
61
|
"stylelint": "^13.12.0",
|
|
62
62
|
"stylelint-config-recommended": "^4.0.0",
|
|
63
63
|
"stylelint-config-styled-components": "^0.1.1",
|