From 32646d12a8de0e5b0b0a14e4303537bb960e5509 Mon Sep 17 00:00:00 2001 From: Tomi Virkki Date: Fri, 13 Dec 2024 16:38:09 +0200 Subject: [PATCH] experiment: add LitElement based version of vaadin-form-layout (#8343) --- .../src/vaadin-form-layout-mixin.js | 12 +++-- .../form-layout/src/vaadin-lit-form-item.d.ts | 6 +++ .../form-layout/src/vaadin-lit-form-item.js | 48 +++++++++++++++++++ .../src/vaadin-lit-form-layout.d.ts | 6 +++ .../form-layout/src/vaadin-lit-form-layout.js | 44 +++++++++++++++++ .../form-layout/test/form-item-lit.test.js | 2 + .../test/form-item-polymer.test.js | 2 + ...{form-item.test.js => form-item.common.js} | 1 - .../form-layout/test/form-layout-lit.test.js | 4 ++ .../test/form-layout-polymer.test.js | 4 ++ ...m-layout.test.js => form-layout.common.js} | 3 -- .../theme/lumo/vaadin-lit-form-item.js | 2 + .../theme/lumo/vaadin-lit-form-layout.js | 2 + .../theme/material/vaadin-lit-form-item.js | 2 + .../theme/material/vaadin-lit-form-layout.js | 1 + .../form-layout/vaadin-lit-form-item.d.ts | 1 + packages/form-layout/vaadin-lit-form-item.js | 2 + .../form-layout/vaadin-lit-form-layout.d.ts | 1 + .../form-layout/vaadin-lit-form-layout.js | 2 + 19 files changed, 137 insertions(+), 8 deletions(-) create mode 100644 packages/form-layout/src/vaadin-lit-form-item.d.ts create mode 100644 packages/form-layout/src/vaadin-lit-form-item.js create mode 100644 packages/form-layout/src/vaadin-lit-form-layout.d.ts create mode 100644 packages/form-layout/src/vaadin-lit-form-layout.js create mode 100644 packages/form-layout/test/form-item-lit.test.js create mode 100644 packages/form-layout/test/form-item-polymer.test.js rename packages/form-layout/test/{form-item.test.js => form-item.common.js} (99%) create mode 100644 packages/form-layout/test/form-layout-lit.test.js create mode 100644 packages/form-layout/test/form-layout-polymer.test.js rename packages/form-layout/test/{form-layout.test.js => form-layout.common.js} (99%) create mode 100644 packages/form-layout/theme/lumo/vaadin-lit-form-item.js create mode 100644 packages/form-layout/theme/lumo/vaadin-lit-form-layout.js create mode 100644 packages/form-layout/theme/material/vaadin-lit-form-item.js create mode 100644 packages/form-layout/theme/material/vaadin-lit-form-layout.js create mode 100644 packages/form-layout/vaadin-lit-form-item.d.ts create mode 100644 packages/form-layout/vaadin-lit-form-item.js create mode 100644 packages/form-layout/vaadin-lit-form-layout.d.ts create mode 100644 packages/form-layout/vaadin-lit-form-layout.js diff --git a/packages/form-layout/src/vaadin-form-layout-mixin.js b/packages/form-layout/src/vaadin-form-layout-mixin.js index abb0d329e3..1b094578f8 100644 --- a/packages/form-layout/src/vaadin-form-layout-mixin.js +++ b/packages/form-layout/src/vaadin-form-layout-mixin.js @@ -71,6 +71,7 @@ export const FormLayoutMixin = (superClass) => ]; }, observer: '_responsiveStepsChanged', + sync: true, }, /** @@ -79,6 +80,7 @@ export const FormLayoutMixin = (superClass) => */ _columnCount: { type: Number, + sync: true, }, /** @@ -87,6 +89,7 @@ export const FormLayoutMixin = (superClass) => */ _labelsOnTop: { type: Boolean, + sync: true, }, /** @private */ @@ -102,15 +105,12 @@ export const FormLayoutMixin = (superClass) => /** @protected */ ready() { - // Here we create and attach a style element that we use for validating + // Here we attach a style element that we use for validating // CSS values in `responsiveSteps`. We can't add this to the `