@royaloperahouse/chord 2.1.1 → 2.1.2
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/CHANGELOG.md +3 -0
- package/dist/chord.cjs.development.js +23 -18
- package/dist/chord.cjs.development.js.map +1 -1
- package/dist/chord.cjs.production.min.js +1 -1
- package/dist/chord.cjs.production.min.js.map +1 -1
- package/dist/chord.esm.js +23 -18
- package/dist/chord.esm.js.map +1 -1
- package/dist/components/atoms/TextField/TextField.d.ts +1 -1
- package/dist/types/formTypes.d.ts +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3395,35 +3395,38 @@ var textStyles = /*#__PURE__*/styled.css(_templateObject2$b || (_templateObject2
|
|
|
3395
3395
|
var theme = _ref3.theme;
|
|
3396
3396
|
return theme.spacing[7];
|
|
3397
3397
|
});
|
|
3398
|
-
var Input = /*#__PURE__*/styled__default.input(_templateObject3$6 || (_templateObject3$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n\n width:
|
|
3399
|
-
var
|
|
3400
|
-
return
|
|
3398
|
+
var Input = /*#__PURE__*/styled__default.input(_templateObject3$6 || (_templateObject3$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", "\n\n width: ", ";\n height: 48px;\n padding: 0px 20px;\n\n border: 1px solid ", ";\n outline: none;\n\n ", "\n\n :disabled {\n background-color: ", ";\n border: 1px solid transparent;\n outline: none;\n }\n\n :focus {\n outline: ", "};\n }\n"])), textStyles, function (_ref4) {
|
|
3399
|
+
var width = _ref4.width;
|
|
3400
|
+
return width ? width + 'px' : '196px';
|
|
3401
3401
|
}, function (_ref5) {
|
|
3402
|
-
var
|
|
3403
|
-
|
|
3402
|
+
var theme = _ref5.theme;
|
|
3403
|
+
return theme.colors.darkgrey;
|
|
3404
|
+
}, function (_ref6) {
|
|
3405
|
+
var error = _ref6.error,
|
|
3406
|
+
theme = _ref6.theme;
|
|
3404
3407
|
if (!error) return;
|
|
3405
3408
|
return "\n border: 1px solid " + theme.colors.error + ";\n ";
|
|
3406
|
-
}, function (_ref6) {
|
|
3407
|
-
var theme = _ref6.theme;
|
|
3408
|
-
return theme.colors.lightgrey;
|
|
3409
3409
|
}, function (_ref7) {
|
|
3410
|
-
var
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
return "3px solid " + theme.colors.lapisLazuli;
|
|
3414
|
-
});
|
|
3415
|
-
var TextLabel = /*#__PURE__*/styled__default.p(_templateObject4$3 || (_templateObject4$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", ";\n\n color: ", ";\n"])), textStyles, function (_ref8) {
|
|
3410
|
+
var theme = _ref7.theme;
|
|
3411
|
+
return theme.colors.lightgrey;
|
|
3412
|
+
}, function (_ref8) {
|
|
3416
3413
|
var darkMode = _ref8.darkMode,
|
|
3417
3414
|
theme = _ref8.theme;
|
|
3418
|
-
|
|
3415
|
+
if (darkMode) return "4px solid " + theme.colors.lemonChiffon;
|
|
3416
|
+
return "3px solid " + theme.colors.lapisLazuli;
|
|
3419
3417
|
});
|
|
3420
|
-
var
|
|
3418
|
+
var TextLabel = /*#__PURE__*/styled__default.p(_templateObject4$3 || (_templateObject4$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", ";\n\n color: ", ";\n"])), textStyles, function (_ref9) {
|
|
3421
3419
|
var darkMode = _ref9.darkMode,
|
|
3422
3420
|
theme = _ref9.theme;
|
|
3421
|
+
return darkMode ? theme.colors.white : theme.colors.black;
|
|
3422
|
+
});
|
|
3423
|
+
var ErrorLabel = /*#__PURE__*/styled__default.p(_templateObject5$1 || (_templateObject5$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n ", ";\n\n color: ", ";\n"])), textStyles, function (_ref10) {
|
|
3424
|
+
var darkMode = _ref10.darkMode,
|
|
3425
|
+
theme = _ref10.theme;
|
|
3423
3426
|
return darkMode ? theme.colors.white : theme.colors.error;
|
|
3424
3427
|
});
|
|
3425
3428
|
|
|
3426
|
-
var _excluded$6 = ["label", "error", "darkMode"];
|
|
3429
|
+
var _excluded$6 = ["label", "error", "darkMode", "width"];
|
|
3427
3430
|
/**
|
|
3428
3431
|
* A text field component, that wraps around the native `<input />` element
|
|
3429
3432
|
* and adds some extra information around it (i.e. a text label and an error label).
|
|
@@ -3468,6 +3471,7 @@ var TextField = function TextField(_ref) {
|
|
|
3468
3471
|
error = _ref.error,
|
|
3469
3472
|
_ref$darkMode = _ref.darkMode,
|
|
3470
3473
|
darkMode = _ref$darkMode === void 0 ? false : _ref$darkMode,
|
|
3474
|
+
width = _ref.width,
|
|
3471
3475
|
inputProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
3472
3476
|
|
|
3473
3477
|
return /*#__PURE__*/React__default.createElement(TextFieldContainer, null, /*#__PURE__*/React__default.createElement("label", null, /*#__PURE__*/React__default.createElement(TextLabel, {
|
|
@@ -3477,7 +3481,8 @@ var TextField = function TextField(_ref) {
|
|
|
3477
3481
|
type: "text",
|
|
3478
3482
|
error: error,
|
|
3479
3483
|
darkMode: darkMode,
|
|
3480
|
-
"data-testid": "text-field-input"
|
|
3484
|
+
"data-testid": "text-field-input",
|
|
3485
|
+
width: width
|
|
3481
3486
|
}, inputProps))), error ? /*#__PURE__*/React__default.createElement(ErrorLabel, {
|
|
3482
3487
|
darkMode: darkMode,
|
|
3483
3488
|
"data-testid": "text-field-error-label"
|