diff --git a/package-lock.json b/package-lock.json index 5d8fbd4036..a48c087255 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14796,9 +14796,9 @@ } }, "superdesk-ui-framework": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/superdesk-ui-framework/-/superdesk-ui-framework-3.1.2.tgz", - "integrity": "sha512-zQNq1bxaV8w0X8aZ8Qylht/lse3Spk7Mp09wZr7M8TjHf+wDwy9SgT54vtoQjjaEF0lSp6El53D9vcQh37bWHA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/superdesk-ui-framework/-/superdesk-ui-framework-3.1.3.tgz", + "integrity": "sha512-COqb+IPwqY4PE+ns2PIACp4cy1GPyZxanoJ/GUj1tHe3JW6FJWr6zkU5PV0tFU2p5JQcUI8SHHTCdJHgbER1ZQ==", "requires": { "@popperjs/core": "^2.4.0", "@superdesk/primereact": "^5.0.2-12", diff --git a/package.json b/package.json index 68b974cb41..3d39aa0b0c 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "sass-loader": "6.0.6", "shortid": "2.2.8", "style-loader": "0.20.2", - "superdesk-ui-framework": "^3.1.2", + "superdesk-ui-framework": "^3.1.3", "ts-loader": "3.5.0", "typescript": "4.9.5", "uuid": "8.3.1", diff --git a/scripts/apps/authoring-react/authoring-section/authoring-section-field.tsx b/scripts/apps/authoring-react/authoring-section/authoring-section-field.tsx index b651dbc3c5..e755491583 100644 --- a/scripts/apps/authoring-react/authoring-section/authoring-section-field.tsx +++ b/scripts/apps/authoring-react/authoring-section/authoring-section-field.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import {IAuthoringFieldV2, IAuthoringSectionTheme, IFieldsData} from 'superdesk-api'; +import {IAuthoringFieldV2, IAuthoringSectionTheme, IAuthoringSectionClassNames, IFieldsData} from 'superdesk-api'; import {getField} from 'apps/fields'; import {getFieldContainer} from './get-field-container'; import {IPropsAuthoringSection} from './authoring-section'; diff --git a/scripts/apps/authoring-react/authoring-section/authoring-section.tsx b/scripts/apps/authoring-react/authoring-section/authoring-section.tsx index e4f9a4c26d..f85b52a4f3 100644 --- a/scripts/apps/authoring-react/authoring-section/authoring-section.tsx +++ b/scripts/apps/authoring-react/authoring-section/authoring-section.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import {IAuthoringSectionTheme, IFieldsV2, IVocabularyItem} from 'superdesk-api'; +import {IAuthoringSectionTheme, IAuthoringSectionClassNames, IFieldsV2, IVocabularyItem} from 'superdesk-api'; import {Map} from 'immutable'; import {IAuthoringValidationErrors, IToggledFields} from '../authoring-react'; import {AuthoringSectionField} from './authoring-section-field'; diff --git a/scripts/apps/authoring-react/authoring-section/get-field-container.tsx b/scripts/apps/authoring-react/authoring-section/get-field-container.tsx index f5d7033885..0766fd8e6f 100644 --- a/scripts/apps/authoring-react/authoring-section/get-field-container.tsx +++ b/scripts/apps/authoring-react/authoring-section/get-field-container.tsx @@ -26,10 +26,10 @@ export function getFieldContainer( class HeaderLayout extends React.PureComponent { render() { - const {miniToolbar} = this.props; + const {miniToolbar, sectionClassNames} = this.props; return ( -
+
{ render() { - const {miniToolbar} = this.props; + const {miniToolbar, sectionClassNames} = this.props; return ( -
+
{ const HelperComponent = this.props.config.helperComponent; return ( - + { HelperComponent != null && ( { return ( -
+
{fieldName} {this.required && ( diff --git a/scripts/core/editor3/styles.scss b/scripts/core/editor3/styles.scss index 13c54375da..e3dced3553 100644 --- a/scripts/core/editor3/styles.scss +++ b/scripts/core/editor3/styles.scss @@ -94,7 +94,6 @@ $editor-styleButton-size: 3rem; right: auto; z-index: 10; box-shadow: 0px 1px 5px rgba(0,0,0,0.4); - background-color: var(--sd-editor-colour__float-toolbar-bg); .link-toolbar.empty { display: none; } @@ -403,9 +402,10 @@ $editor-styleButton-size: 3rem; .Editor3-editor { cursor: text; font-size: 16px; - line-height: 140%; + line-height: 1.4; word-break: break-word; border: 1px solid var(--sd-editor-colour__controls-border); + border-radius: var(--b-radius--medium); } .Editor3-editor-single-line { @@ -543,6 +543,7 @@ $editor-styleButton-size: 3rem; background-color: $editor-neutral-bg; border-block-end: 1px solid; border-bottom-color: $editor-neutral-border; + border-radius: var(--b-radius--medium) var(--b-radius--medium) 0 0; line-height: 100% !important; &.disabled { @@ -851,10 +852,6 @@ $editor-styleButton-size: 3rem; // Theme specific overrides .sd-editor--theme-turquoise, .sd-editor--theme-military { - .Editor3-controls, .item-association { - background-color: rgba(0, 0, 0, 0.03); - border-bottom-color: rgba(0, 0, 0, 0.1); - } .Editor3-root, .item-association { border-color: rgba(0, 0, 0, 0.1); } @@ -934,7 +931,7 @@ $editor-styleButton-size: 3rem; background-color: #f8f8f8; } -.Editor3-single-line-style { +.sd-input-style .Editor3-root { background: var(--color-input-bg); color: var(--color-text); border: none; diff --git a/scripts/core/superdesk-api.d.ts b/scripts/core/superdesk-api.d.ts index 05ad086836..378e62e7a2 100644 --- a/scripts/core/superdesk-api.d.ts +++ b/scripts/core/superdesk-api.d.ts @@ -3411,6 +3411,7 @@ declare module 'superdesk-api' { * (it will be rendered in different DOM locations depending if field is in header or content section) */ miniToolbar?: JSX.Element; + sectionClassNames?: IAuthoringSectionClassNames; } export interface IEditorComponentProps { @@ -3497,6 +3498,11 @@ declare module 'superdesk-api' { }; } + export interface IAuthoringSectionClassNames { + header?: string; + content?: string; + } + export interface ICommonFieldConfig { readOnly?: boolean; required?: boolean; diff --git a/styles/sass/forms.scss b/styles/sass/forms.scss index 8901de4c6b..7d04efc471 100644 --- a/styles/sass/forms.scss +++ b/styles/sass/forms.scss @@ -374,7 +374,7 @@ textarea[readonly] { .sd-required { font-size: 11px; font-style: italic; - color: $grayDark; + color: var(--sd-editor-colour__txt); }