diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/components/property-type-based-property/property-type-based-property.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/components/property-type-based-property/property-type-based-property.element.ts index 18c34c7129..a6a02fc152 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/components/property-type-based-property/property-type-based-property.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/components/property-type-based-property/property-type-based-property.element.ts @@ -79,6 +79,7 @@ export class UmbPropertyTypeBasedPropertyElement extends UmbLitElement { .alias=${this._property.alias} .label=${this._property.name} .description=${this._property.description ?? undefined} + .appearance=${this._property.appearance} property-editor-ui-alias=${ifDefined(this._propertyEditorUiAlias)} .config=${this._dataTypeData}>` : ''; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property/property-layout/property-layout.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property/property-layout/property-layout.element.ts index 96fcd65d73..fac6cc9d24 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property/property-layout/property-layout.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property/property-layout/property-layout.element.ts @@ -37,7 +37,7 @@ export class UmbPropertyLayoutElement extends UmbLitElement { * @attr * @default '' */ - @property({ type: String }) + @property({ type: String, reflect: true }) public orientation: 'horizontal' | 'vertical' = 'horizontal'; /** diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property/property/property.context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property/property/property.context.ts index 5b890baf54..eb0dd02e6c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property/property/property.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property/property/property.context.ts @@ -7,12 +7,14 @@ import { UmbBasicState, UmbClassState, UmbDeepState, + UmbObjectState, UmbStringState, } from '@umbraco-cms/backoffice/observable-api'; import { UmbContextToken } from '@umbraco-cms/backoffice/context-api'; import type { UmbPropertyEditorConfigProperty } from '@umbraco-cms/backoffice/property-editor'; import { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/property-editor'; import type { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/extension-registry'; +import type { UmbPropertyTypeAppearanceModel } from '@umbraco-cms/backoffice/content-type'; export class UmbPropertyContext extends UmbContextBase> { #alias = new UmbStringState(undefined); @@ -21,6 +23,8 @@ export class UmbPropertyContext extends UmbContextBase(undefined); + public readonly appearance = this.#appearance.asObservable(); #value = new UmbDeepState(undefined); public readonly value = this.#value.asObservable(); #configValues = new UmbArrayState([], (x) => x.alias); @@ -116,6 +120,12 @@ export class UmbPropertyContext extends UmbContextBase extends UmbContextBase { + this._orientation = appearance?.labelOnTop ? 'vertical' : 'horizontal'; + }, + null, + ); } private _onPropertyEditorChange = (e: CustomEvent): void => { @@ -275,9 +297,10 @@ export class UmbPropertyElement extends UmbLitElement { return html` ${this._renderPropertyActionMenu()} ${this._variantDifference