From 2abf7e356ddf980a8aed373aed6364d214304adf Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Tue, 17 Feb 2026 17:34:53 +0000 Subject: [PATCH] feat(dees-form): add layout styles to dees-form and standardize demo input grouping --- changelog.md | 8 + ts_web/00_commitinfo_data.ts | 2 +- .../00group-form/dees-form/dees-form.ts | 23 ++- .../dees-input-base/dees-input-base.ts | 19 +-- .../dees-input-dropdown.demo.ts | 94 ++++++----- .../dees-input-iban/dees-input-iban.demo.ts | 54 ++++--- .../dees-input-phone/dees-input-phone.demo.ts | 56 ++++--- .../dees-input-quantityselector.demo.ts | 58 ++++--- .../dees-input-radiogroup.demo.ts | 86 ++++++----- .../dees-input-text/dees-input-text.demo.ts | 146 ++++++++++-------- .../dees-input-typelist.demo.ts | 74 +++++---- 11 files changed, 350 insertions(+), 270 deletions(-) diff --git a/changelog.md b/changelog.md index b5f56e8..e72e088 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # Changelog +## 2026-02-17 - 3.43.0 - feat(dees-form) +add layout styles to dees-form and standardize demo input grouping + +- Add static CSS to dees-form: default column layout with gap and support for [horizontal-layout] (row wrapping, alignment and gap). +- Remove inline `; } diff --git a/ts_web/elements/00group-input/dees-input-base/dees-input-base.ts b/ts_web/elements/00group-input/dees-input-base/dees-input-base.ts index 19ff96d..6abcc45 100644 --- a/ts_web/elements/00group-input/dees-input-base/dees-input-base.ts +++ b/ts_web/elements/00group-input/dees-input-base/dees-input-base.ts @@ -54,37 +54,20 @@ export abstract class DeesInputBase extends DeesElement { /* CSS Variables for consistent spacing */ :host { --dees-input-spacing-unit: 8px; - --dees-input-vertical-gap: calc(var(--dees-input-spacing-unit) * 2); /* 16px */ - --dees-input-horizontal-gap: calc(var(--dees-input-spacing-unit) * 2); /* 16px */ --dees-input-label-gap: var(--dees-input-spacing-unit); /* 8px */ } - /* Default vertical stacking mode (for forms) */ + /* Default block display with no margins - spacing is container-driven */ :host { display: block; margin: 0; - margin-bottom: var(--dees-input-vertical-gap); - } - - /* Last child in container should have no bottom margin */ - :host(:last-child) { - margin-bottom: 0; } /* Horizontal layout mode - activated by attribute */ :host([layout-mode="horizontal"]) { display: inline-block; - margin: 0; - margin-right: var(--dees-input-horizontal-gap); - margin-bottom: 0; } - :host([layout-mode="horizontal"]:last-child) { - margin-right: 0; - } - - /* Auto mode - inherit from parent dees-form if present */ - /* Label position variations */ :host([label-position="left"]) .input-wrapper { display: grid; diff --git a/ts_web/elements/00group-input/dees-input-dropdown/dees-input-dropdown.demo.ts b/ts_web/elements/00group-input/dees-input-dropdown/dees-input-dropdown.demo.ts index d9d770e..1907688 100644 --- a/ts_web/elements/00group-input/dees-input-dropdown/dees-input-dropdown.demo.ts +++ b/ts_web/elements/00group-input/dees-input-dropdown/dees-input-dropdown.demo.ts @@ -31,6 +31,12 @@ export const demoFunc = () => html` flex-wrap: wrap; } + .input-group { + display: flex; + flex-direction: column; + gap: 16px; + } + .spacer { height: 200px; display: flex; @@ -63,30 +69,32 @@ export const demoFunc = () => html` } }}> - - - +
+ + + +
@@ -176,24 +184,26 @@ export const demoFunc = () => html` } }}> - - - +
+ + + +
diff --git a/ts_web/elements/00group-input/dees-input-iban/dees-input-iban.demo.ts b/ts_web/elements/00group-input/dees-input-iban/dees-input-iban.demo.ts index a82a1c4..eb6199b 100644 --- a/ts_web/elements/00group-input/dees-input-iban/dees-input-iban.demo.ts +++ b/ts_web/elements/00group-input/dees-input-iban/dees-input-iban.demo.ts @@ -13,6 +13,12 @@ export const demoFunc = () => html` margin: 0 auto; } + .input-group { + display: flex; + flex-direction: column; + gap: 16px; + } + .payment-group { display: flex; align-items: center; @@ -24,16 +30,18 @@ export const demoFunc = () => html`
- - - +
+ + + +
@@ -53,18 +61,20 @@ export const demoFunc = () => html` - - - +
+ + + +
diff --git a/ts_web/elements/00group-input/dees-input-phone/dees-input-phone.demo.ts b/ts_web/elements/00group-input/dees-input-phone/dees-input-phone.demo.ts index 3b5cb35..c6e5828 100644 --- a/ts_web/elements/00group-input/dees-input-phone/dees-input-phone.demo.ts +++ b/ts_web/elements/00group-input/dees-input-phone/dees-input-phone.demo.ts @@ -13,6 +13,12 @@ export const demoFunc = () => html` margin: 0 auto; } + .input-group { + display: flex; + flex-direction: column; + gap: 16px; + } + .horizontal-group { display: flex; align-items: center; @@ -24,18 +30,20 @@ export const demoFunc = () => html`
- - - +
+ + + +
@@ -55,17 +63,19 @@ export const demoFunc = () => html` - - - +
+ + + +
diff --git a/ts_web/elements/00group-input/dees-input-quantityselector/dees-input-quantityselector.demo.ts b/ts_web/elements/00group-input/dees-input-quantityselector/dees-input-quantityselector.demo.ts index 781d28d..0243c0c 100644 --- a/ts_web/elements/00group-input/dees-input-quantityselector/dees-input-quantityselector.demo.ts +++ b/ts_web/elements/00group-input/dees-input-quantityselector/dees-input-quantityselector.demo.ts @@ -14,6 +14,12 @@ export const demoFunc = () => html` margin: 0 auto; } + .input-group { + display: flex; + flex-direction: column; + gap: 16px; + } + .shopping-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); @@ -60,17 +66,19 @@ export const demoFunc = () => html`
- - - +
+ + + +
{ @@ -169,19 +177,21 @@ export const demoFunc = () => html` - - - +
+ + + +
diff --git a/ts_web/elements/00group-input/dees-input-radiogroup/dees-input-radiogroup.demo.ts b/ts_web/elements/00group-input/dees-input-radiogroup/dees-input-radiogroup.demo.ts index c50858c..f1fd488 100644 --- a/ts_web/elements/00group-input/dees-input-radiogroup/dees-input-radiogroup.demo.ts +++ b/ts_web/elements/00group-input/dees-input-radiogroup/dees-input-radiogroup.demo.ts @@ -23,6 +23,12 @@ export const demoFunc = () => html` margin-bottom: 0; } + .input-group { + display: flex; + flex-direction: column; + gap: 16px; + } + .demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); @@ -60,20 +66,22 @@ export const demoFunc = () => html` - - - +
+ + + +
@@ -132,30 +140,32 @@ export const demoFunc = () => html` - - - - - +
+ + + + + +
diff --git a/ts_web/elements/00group-input/dees-input-text/dees-input-text.demo.ts b/ts_web/elements/00group-input/dees-input-text/dees-input-text.demo.ts index 27fd11e..705ae10 100644 --- a/ts_web/elements/00group-input/dees-input-text/dees-input-text.demo.ts +++ b/ts_web/elements/00group-input/dees-input-text/dees-input-text.demo.ts @@ -30,6 +30,12 @@ export const demoFunc = () => html` flex-wrap: wrap; } + .input-group { + display: flex; + flex-direction: column; + gap: 16px; + } + .grid-layout { display: grid; grid-template-columns: 1fr 1fr; @@ -83,25 +89,27 @@ export const demoFunc = () => html` } }}> - - - - - +
+ + + + + +
@@ -172,31 +180,33 @@ export const demoFunc = () => html` } }}> - - - - -
+
+ + + + +
-
+
@@ -234,24 +244,26 @@ export const demoFunc = () => html` } }}> - - - - - +
+ + + + + +
@@ -279,19 +291,21 @@ export const demoFunc = () => html` }); }}> - - - +
+ + + +
diff --git a/ts_web/elements/00group-input/dees-input-typelist/dees-input-typelist.demo.ts b/ts_web/elements/00group-input/dees-input-typelist/dees-input-typelist.demo.ts index ecf4192..873dc21 100644 --- a/ts_web/elements/00group-input/dees-input-typelist/dees-input-typelist.demo.ts +++ b/ts_web/elements/00group-input/dees-input-typelist/dees-input-typelist.demo.ts @@ -13,6 +13,12 @@ export const demoFunc = () => html` margin: 0 auto; } + .input-group { + display: flex; + flex-direction: column; + gap: 16px; + } + .horizontal-group { display: flex; gap: 24px; @@ -39,27 +45,30 @@ export const demoFunc = () => html`
- - - +
+ + + +
- - -
+
+ + +
html` .value=${['innovation', 'startup', 'growth']} >
+
- - - +
+ + + +