diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-field.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-field.element.ts index d178e701aa..f4f7d45fdc 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-field.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-field.element.ts @@ -5,8 +5,7 @@ import { html, customElement, state, nothing, css } from '@umbraco-cms/backoffic import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; -const elementName = 'umb-picker-search-field'; -@customElement(elementName) +@customElement('umb-picker-search-field') export class UmbPickerSearchFieldElement extends UmbLitElement { @state() _query: string = ''; @@ -66,6 +65,11 @@ export class UmbPickerSearchFieldElement extends UmbLitElement { width: 100%; } + uui-input [slot='prepend'] { + display: flex; + align-items: center; + } + #divider { width: 100%; height: 1px; @@ -84,6 +88,6 @@ export class UmbPickerSearchFieldElement extends UmbLitElement { declare global { interface HTMLElementTagNameMap { - [elementName]: UmbPickerSearchFieldElement; + 'umb-picker-search-field': UmbPickerSearchFieldElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-result.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-result.element.ts index 7d5fd3b902..d43ba3a804 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-result.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-result.element.ts @@ -6,8 +6,7 @@ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import type { UmbSearchRequestArgs } from '@umbraco-cms/backoffice/search'; import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity'; -const elementName = 'umb-picker-search-result'; -@customElement(elementName) +@customElement('umb-picker-search-result') export class UmbPickerSearchResultElement extends UmbLitElement { @state() _query?: UmbSearchRequestArgs; @@ -67,6 +66,6 @@ export class UmbPickerSearchResultElement extends UmbLitElement { declare global { interface HTMLElementTagNameMap { - [elementName]: UmbPickerSearchResultElement; + 'umb-picker-search-result': UmbPickerSearchResultElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts index e357c39abd..7a6871b814 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts @@ -424,6 +424,10 @@ export class UmbMediaPickerModalElement extends UmbModalBaseElement = [ propertyEditorUiAlias: 'Umb.PropertyEditorUi.Integer', config: [{ alias: 'min', value: 0 }], }, - { - alias: 'minHeight', - label: 'Min height (pixels)', - description: 'Sets the minimum height of the textarea', - propertyEditorUiAlias: 'Umb.PropertyEditorUi.Integer', - config: [{ alias: 'min', value: 0 }], - }, - { - alias: 'maxHeight', - label: 'Max height (pixels)', - description: 'Sets the maximum height of the textarea', - propertyEditorUiAlias: 'Umb.PropertyEditorUi.Integer', - config: [{ alias: 'min', value: 0 }], - }, ], defaultData: [{ alias: 'rows', value: 10 }], }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/property-editors/textarea/property-editor-ui-textarea.element.ts b/src/Umbraco.Web.UI.Client/src/packages/property-editors/textarea/property-editor-ui-textarea.element.ts index e88d6be269..34402e9acd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/property-editors/textarea/property-editor-ui-textarea.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/property-editors/textarea/property-editor-ui-textarea.element.ts @@ -46,36 +46,25 @@ export class UmbPropertyEditorUITextareaElement @state() private _rows?: number; - @state() - private _maxHeight?: number; - - @state() - private _minHeight?: number; - @state() private _css: StyleInfo = {}; public set config(config: UmbPropertyEditorConfigCollection | undefined) { this._maxChars = Number(config?.getValueByAlias('maxChars')) || undefined; this._rows = Number(config?.getValueByAlias('rows')) || undefined; - this._minHeight = Number(config?.getValueByAlias('minHeight')) || undefined; - this._maxHeight = Number(config?.getValueByAlias('maxHeight')) || undefined; + // min/max height where for a short period present in the config, but we do not want this complexity of our configuration. + // @deprecated remove config option in v.18, leave good default. + const _minHeight = Number(config?.getValueByAlias('minHeight')) || undefined; + const _maxHeight = Number(config?.getValueByAlias('maxHeight')) || undefined; this._css = { - '--uui-textarea-min-height': this._minHeight ? `${this._minHeight}px` : 'reset', - '--uui-textarea-max-height': this._maxHeight ? `${this._maxHeight}px` : 'reset', + '--uui-textarea-min-height': _minHeight ? `${_minHeight}px` : 'reset', + '--uui-textarea-max-height': _maxHeight ? `${_maxHeight}px` : '33vh', }; } protected override firstUpdated(): void { this.addFormControlElement(this.shadowRoot!.querySelector('uui-textarea')!); - - if (this._minHeight && this._maxHeight && this._minHeight > this._maxHeight) { - console.warn( - `Property '${this.name}' (Textarea) has been misconfigured, 'minHeight' is greater than 'maxHeight'. Please correct your data type configuration.`, - this, - ); - } } override focus() {