@rhc-shared-components/rich-text-editor 0.6.5 → 0.7.0
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/index.js +7 -8
- package/dist/index.modern.js +8 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -128,13 +128,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
128
128
|
return target;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
var css_248z = ".form-group .max-char-length {\n float: right;\n color: #6A6E73;\n font-size: var(--pf-c-form__helper-text--FontSize);\n margin-top: var(--pf-c-form__helper-text--MarginTop);\n}\n.form-group .maxlength-error {\n color: var(--pf-c-form--m-error--Color);\n}";
|
|
132
|
-
var _excluded$1 = ["children", "helperTextInvalid", "
|
|
131
|
+
var css_248z = ".form-group .max-char-length {\n float: right;\n color: #6A6E73;\n font-size: var(--pf-v5-c-form__helper-text--FontSize);\n margin-top: var(--pf-v5-c-form__helper-text--MarginTop);\n}\n.form-group .maxlength-error {\n color: var(--pf-v5-c-form--m-error--Color);\n}";
|
|
132
|
+
var _excluded$1 = ["children", "helperTextInvalid", "validated", "helperText", "labelIcon", "onClick"];
|
|
133
133
|
|
|
134
134
|
var FormGroupContainer = function FormGroupContainer(_ref) {
|
|
135
135
|
var children = _ref.children,
|
|
136
136
|
helperTextInvalid = _ref.helperTextInvalid,
|
|
137
|
-
|
|
137
|
+
validated = _ref.validated,
|
|
138
138
|
helperText = _ref.helperText,
|
|
139
139
|
labelIcon = _ref.labelIcon,
|
|
140
140
|
onClick = _ref.onClick,
|
|
@@ -142,15 +142,14 @@ var FormGroupContainer = function FormGroupContainer(_ref) {
|
|
|
142
142
|
|
|
143
143
|
InsertCss();
|
|
144
144
|
return React__namespace.createElement(reactCore.FormGroup, Object.assign({
|
|
145
|
-
className: 'form-group'
|
|
146
|
-
helperTextInvalid: helperTextInvalid,
|
|
147
|
-
helperText: helperText,
|
|
148
|
-
validated: isValid ? reactCore.ValidatedOptions["default"] : reactCore.ValidatedOptions.error
|
|
145
|
+
className: 'form-group'
|
|
149
146
|
}, labelIcon && {
|
|
150
147
|
labelIcon: labelIcon
|
|
151
148
|
}, onClick && {
|
|
152
149
|
onClick: onClick
|
|
153
|
-
}, rest), children
|
|
150
|
+
}, rest), children, React__namespace.createElement(reactCore.FormHelperText, null, React__namespace.createElement(reactCore.HelperText, null, React__namespace.createElement(reactCore.HelperTextItem, {
|
|
151
|
+
variant: validated
|
|
152
|
+
}, validated === reactCore.ValidatedOptions.error ? helperTextInvalid : helperText))));
|
|
154
153
|
};
|
|
155
154
|
|
|
156
155
|
var InsertCss = function InsertCss() {
|
package/dist/index.modern.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CKEditor } from '@ckeditor/ckeditor5-react';
|
|
3
3
|
import ClassicEditor from '@rhc-shared-components/rhc-ckeditor';
|
|
4
|
-
import { FormGroup, ValidatedOptions } from '@patternfly/react-core';
|
|
4
|
+
import { FormGroup, FormHelperText, HelperText, HelperTextItem, ValidatedOptions } from '@patternfly/react-core';
|
|
5
5
|
import { useField, useFormikContext } from 'formik';
|
|
6
6
|
|
|
7
7
|
var css_248z$1 = ".rich-text-editor-custom {\n --pf-c-title--m-2xl--LineHeight: var(--pf-global--LineHeight--sm);\n --pf-c-title--m-2xl--FontSize: var(--pf-global--FontSize--2xl);\n --pf-c-title--m-2xl--FontWeight: var(--pf-global--FontWeight--normal);\n --pf-c-title--m-xl--LineHeight: var(--pf-global--LineHeight--md);\n --pf-c-title--m-xl--FontSize: var(--pf-global--FontSize--xl);\n --pf-c-title--m-xl--FontWeight: var(--pf-global--FontWeight--normal);\n --pf-c-title--m-lg--LineHeight: var(--pf-global--LineHeight--md);\n --pf-c-title--m-lg--FontSize: var(--pf-global--FontSize--lg);\n --pf-c-title--m-lg--FontWeight: var(--pf-global--FontWeight--normal);\n --pf-c-title--m-md--LineHeight: var(--pf-global--LineHeight--md);\n --pf-c-title--m-md--FontSize: var(--pf-global--FontSize--md);\n --pf-c-title--m-md--FontWeight: var(--pf-global--FontWeight--normal);\n}\n.rich-text-editor-custom .ck-editor__main {\n word-break: break-all;\n}\n.rich-text-editor-custom .ck-code-block-dropdown .ck-splitbutton__arrow {\n display: none;\n}\n.rich-text-editor-custom h1 {\n font-size: var(--pf-c-title--m-2xl--FontSize);\n font-weight: var(--pf-c-title--m-2xl--FontWeight);\n line-height: var(--pf-c-title--m-2xl--LineHeight);\n}\n.rich-text-editor-custom h2 {\n font-size: var(--pf-c-title--m-xl--FontSize);\n font-weight: var(--pf-c-title--m-xl--FontWeight);\n line-height: var(--pf-c-title--m-xl--LineHeight);\n}\n.rich-text-editor-custom h3 {\n font-size: var(--pf-c-title--m-lg--FontSize);\n font-weight: var(--pf-c-title--m-lg--FontWeight);\n line-height: var(--pf-c-title--m-lg--LineHeight);\n}\n.rich-text-editor-custom h4 {\n font-size: var(--pf-c-title--m-md--FontSize);\n font-weight: var(--pf-c-title--m-md--FontWeight);\n line-height: var(--pf-c-title--m-md--LineHeight);\n}\n.rich-text-editor-custom ul {\n display: block;\n list-style-type: disc;\n -webkit-margin-before: 1em;\n margin-block-start: 1em;\n -webkit-margin-after: 1em;\n margin-block-end: 1em;\n -webkit-margin-start: 0px;\n margin-inline-start: 0px;\n -webkit-margin-end: 0px;\n margin-inline-end: 0px;\n -webkit-padding-start: 40px;\n padding-inline-start: 40px;\n}\n.rich-text-editor-custom ul li {\n display: list-item;\n}\n.rich-text-editor-custom ul ul {\n list-style-type: circle;\n -webkit-margin-before: 0px;\n margin-block-start: 0px;\n -webkit-margin-after: 0px;\n margin-block-end: 0px;\n}\n.rich-text-editor-custom ol {\n display: block;\n list-style-type: decimal;\n -webkit-margin-before: 1em;\n margin-block-start: 1em;\n -webkit-margin-after: 1em;\n margin-block-end: 1em;\n -webkit-margin-start: 0px;\n margin-inline-start: 0px;\n -webkit-margin-end: 0px;\n margin-inline-end: 0px;\n -webkit-padding-start: 40px;\n padding-inline-start: 40px;\n}";
|
|
@@ -105,14 +105,14 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
105
105
|
return target;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
var css_248z = ".form-group .max-char-length {\n float: right;\n color: #6A6E73;\n font-size: var(--pf-c-form__helper-text--FontSize);\n margin-top: var(--pf-c-form__helper-text--MarginTop);\n}\n.form-group .maxlength-error {\n color: var(--pf-c-form--m-error--Color);\n}";
|
|
109
|
-
const _excluded$1 = ["children", "helperTextInvalid", "
|
|
108
|
+
var css_248z = ".form-group .max-char-length {\n float: right;\n color: #6A6E73;\n font-size: var(--pf-v5-c-form__helper-text--FontSize);\n margin-top: var(--pf-v5-c-form__helper-text--MarginTop);\n}\n.form-group .maxlength-error {\n color: var(--pf-v5-c-form--m-error--Color);\n}";
|
|
109
|
+
const _excluded$1 = ["children", "helperTextInvalid", "validated", "helperText", "labelIcon", "onClick"];
|
|
110
110
|
|
|
111
111
|
const FormGroupContainer = _ref => {
|
|
112
112
|
let {
|
|
113
113
|
children,
|
|
114
114
|
helperTextInvalid,
|
|
115
|
-
|
|
115
|
+
validated,
|
|
116
116
|
helperText,
|
|
117
117
|
labelIcon,
|
|
118
118
|
onClick
|
|
@@ -121,15 +121,14 @@ const FormGroupContainer = _ref => {
|
|
|
121
121
|
|
|
122
122
|
InsertCss();
|
|
123
123
|
return React.createElement(FormGroup, Object.assign({
|
|
124
|
-
className: 'form-group'
|
|
125
|
-
helperTextInvalid: helperTextInvalid,
|
|
126
|
-
helperText: helperText,
|
|
127
|
-
validated: isValid ? ValidatedOptions.default : ValidatedOptions.error
|
|
124
|
+
className: 'form-group'
|
|
128
125
|
}, labelIcon && {
|
|
129
126
|
labelIcon: labelIcon
|
|
130
127
|
}, onClick && {
|
|
131
128
|
onClick
|
|
132
|
-
}, rest), children
|
|
129
|
+
}, rest), children, React.createElement(FormHelperText, null, React.createElement(HelperText, null, React.createElement(HelperTextItem, {
|
|
130
|
+
variant: validated
|
|
131
|
+
}, validated === ValidatedOptions.error ? helperTextInvalid : helperText))));
|
|
133
132
|
};
|
|
134
133
|
|
|
135
134
|
const InsertCss = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhc-shared-components/rich-text-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "WYSWYG Editor for Red Hat Certified Apps",
|
|
5
5
|
"author": "gautamkrishnar",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"react-dom": ">=16.13.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@rhc-shared-components/form-group-container": "^0.
|
|
35
|
+
"@rhc-shared-components/form-group-container": "^1.0.1",
|
|
36
36
|
"@testing-library/jest-dom": "^4.2.4",
|
|
37
37
|
"@testing-library/react": "^9.5.0",
|
|
38
38
|
"@testing-library/user-event": "^7.2.1",
|