@commercetools-uikit/localized-rich-text-input 15.13.0 → 15.13.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/dist/commercetools-uikit-localized-rich-text-input.cjs.dev.js +18 -11
- package/dist/commercetools-uikit-localized-rich-text-input.cjs.prod.js +10 -3
- package/dist/commercetools-uikit-localized-rich-text-input.esm.js +18 -11
- package/dist/declarations/src/editor.styles.d.ts +4 -1
- package/package.json +16 -16
|
@@ -71,9 +71,15 @@ var FlatButton__default = /*#__PURE__*/_interopDefault(FlatButton);
|
|
|
71
71
|
var isHotkey__default = /*#__PURE__*/_interopDefault(isHotkey);
|
|
72
72
|
var pipe__default = /*#__PURE__*/_interopDefault(pipe);
|
|
73
73
|
|
|
74
|
+
var getEditorLanguageLabelBorderColor = function getEditorLanguageLabelBorderColor(props) {
|
|
75
|
+
return "1px solid ".concat(props.isReadOnly ? designSystem.designTokens.borderColorForInputWhenReadonly : designSystem.designTokens.borderColorForInputWhenDisabled);
|
|
76
|
+
};
|
|
77
|
+
|
|
74
78
|
var EditorLanguageLabel = /*#__PURE__*/_styled__default["default"]("label", {
|
|
75
79
|
target: "ew063c2"
|
|
76
|
-
} )("white-space:nowrap;flex:0;color:", designSystem.designTokens.fontColorForInputWhenDisabled, ";line-height:calc(\n ", designSystem.designTokens.sizeHeightInput, " - 2 * ", designSystem.designTokens.borderRadius1, "\n );background-color:", designSystem.designTokens.backgroundColorForInputWhenDisabled, ";border-top-left-radius:", designSystem.designTokens.borderRadiusForInput, ";border-bottom-left-radius:", designSystem.designTokens.borderRadiusForInput, ";border:
|
|
80
|
+
} )("white-space:nowrap;flex:0;color:", designSystem.designTokens.fontColorForInputWhenDisabled, ";line-height:calc(\n ", designSystem.designTokens.sizeHeightInput, " - 2 * ", designSystem.designTokens.borderRadius1, "\n );background-color:", designSystem.designTokens.backgroundColorForInputWhenDisabled, ";border-top-left-radius:", designSystem.designTokens.borderRadiusForInput, ";border-bottom-left-radius:", designSystem.designTokens.borderRadiusForInput, ";border:", function (props) {
|
|
81
|
+
return getEditorLanguageLabelBorderColor(props);
|
|
82
|
+
}, ";padding:", designSystem.designTokens.paddingForLocalizedRichTextInputLabel, ";transition:border-color ", designSystem.designTokens.transitionStandard, ",background-color ", designSystem.designTokens.transitionStandard, ",color ", designSystem.designTokens.transitionStandard, ";border-right:0;box-shadow:none;appearance:none;cursor:inherit;" + ("" ));
|
|
77
83
|
|
|
78
84
|
var EditorWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
79
85
|
target: "ew063c1"
|
|
@@ -223,6 +229,7 @@ var Editor = /*#__PURE__*/react.forwardRef(function (props, forwardedRef) {
|
|
|
223
229
|
onChange: props.onChange,
|
|
224
230
|
children: [jsxRuntime.jsx(EditorLanguageLabel, {
|
|
225
231
|
htmlFor: props.id,
|
|
232
|
+
isReadOnly: props.isReadOnly,
|
|
226
233
|
children: jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
227
234
|
tone: "secondary",
|
|
228
235
|
children: props.language.toUpperCase()
|
|
@@ -397,7 +404,7 @@ var RichTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
397
404
|
|
|
398
405
|
return jsxRuntime.jsx(Editor$1, _objectSpread$2(_objectSpread$2({}, utils.filterDataAttributes(this.props)), {}, {
|
|
399
406
|
name: this.props.name,
|
|
400
|
-
isReadOnly: this.props.isReadOnly
|
|
407
|
+
isReadOnly: this.props.isReadOnly,
|
|
401
408
|
onChange: this.onValueChange,
|
|
402
409
|
id: this.props.id,
|
|
403
410
|
value: this.internalSlateValue,
|
|
@@ -616,7 +623,7 @@ LocalizedRichTextInput.isTouched = localizedUtils.isTouched;
|
|
|
616
623
|
var LocalizedRichTextInput$1 = LocalizedRichTextInput;
|
|
617
624
|
|
|
618
625
|
// NOTE: This string will be replaced on build time with the package version.
|
|
619
|
-
var version = "15.13.
|
|
626
|
+
var version = "15.13.2";
|
|
620
627
|
|
|
621
628
|
exports["default"] = LocalizedRichTextInput$1;
|
|
622
629
|
exports.version = version;
|