feat(dees-form): add layout styles to dees-form and standardize demo input grouping
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# 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 <style> from dees-form render to centralize styling.
|
||||||
|
- Simplify dees-input-base styles by removing host margins and making spacing container-driven.
|
||||||
|
- Update multiple demo files to wrap related inputs in a new .input-group container and include .input-group CSS for consistent vertical spacing.
|
||||||
|
|
||||||
## 2026-02-16 - 3.42.2 - fix(dees-chart-area)
|
## 2026-02-16 - 3.42.2 - fix(dees-chart-area)
|
||||||
add ApexAxisChartSeries type to dees-chart-area component to improve typing for ApexCharts series data
|
add ApexAxisChartSeries type to dees-chart-area component to improve typing for ApexCharts series data
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '3.42.2',
|
version: '3.43.0',
|
||||||
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
css,
|
||||||
type TemplateResult,
|
type TemplateResult,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
type CSSResult,
|
type CSSResult,
|
||||||
@@ -81,13 +82,25 @@ export class DeesForm extends DeesElement {
|
|||||||
@property({ type: Boolean, reflect: true, attribute: 'horizontal-layout' })
|
@property({ type: Boolean, reflect: true, attribute: 'horizontal-layout' })
|
||||||
accessor horizontalLayout: boolean = false;
|
accessor horizontalLayout: boolean = false;
|
||||||
|
|
||||||
|
public static styles = [
|
||||||
|
css`
|
||||||
|
:host {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:host([horizontal-layout]) {
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
|
|
||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<style>
|
|
||||||
:host {
|
|
||||||
display: contents;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,37 +54,20 @@ export abstract class DeesInputBase<T = any> extends DeesElement {
|
|||||||
/* CSS Variables for consistent spacing */
|
/* CSS Variables for consistent spacing */
|
||||||
:host {
|
:host {
|
||||||
--dees-input-spacing-unit: 8px;
|
--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 */
|
--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 {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0;
|
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 */
|
/* Horizontal layout mode - activated by attribute */
|
||||||
:host([layout-mode="horizontal"]) {
|
:host([layout-mode="horizontal"]) {
|
||||||
display: inline-block;
|
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 */
|
/* Label position variations */
|
||||||
:host([label-position="left"]) .input-wrapper {
|
:host([label-position="left"]) .input-wrapper {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ export const demoFunc = () => html`
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.spacer {
|
.spacer {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -63,30 +69,32 @@ export const demoFunc = () => html`
|
|||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
<dees-panel .title=${'1. Basic Dropdowns'} .subtitle=${'Standard dropdown with search functionality and various options'}>
|
<dees-panel .title=${'1. Basic Dropdowns'} .subtitle=${'Standard dropdown with search functionality and various options'}>
|
||||||
<dees-input-dropdown
|
<div class="input-group">
|
||||||
.label=${'Select Country'}
|
<dees-input-dropdown
|
||||||
.options=${[
|
.label=${'Select Country'}
|
||||||
{ option: 'United States', key: 'us' },
|
.options=${[
|
||||||
{ option: 'Canada', key: 'ca' },
|
{ option: 'United States', key: 'us' },
|
||||||
{ option: 'Germany', key: 'de' },
|
{ option: 'Canada', key: 'ca' },
|
||||||
{ option: 'France', key: 'fr' },
|
{ option: 'Germany', key: 'de' },
|
||||||
{ option: 'United Kingdom', key: 'uk' },
|
{ option: 'France', key: 'fr' },
|
||||||
{ option: 'Australia', key: 'au' },
|
{ option: 'United Kingdom', key: 'uk' },
|
||||||
{ option: 'Japan', key: 'jp' },
|
{ option: 'Australia', key: 'au' },
|
||||||
{ option: 'Brazil', key: 'br' }
|
{ option: 'Japan', key: 'jp' },
|
||||||
]}
|
{ option: 'Brazil', key: 'br' }
|
||||||
.selectedOption=${{ option: 'United States', key: 'us' }}
|
]}
|
||||||
></dees-input-dropdown>
|
.selectedOption=${{ option: 'United States', key: 'us' }}
|
||||||
|
></dees-input-dropdown>
|
||||||
<dees-input-dropdown
|
|
||||||
.label=${'Select Role'}
|
<dees-input-dropdown
|
||||||
.options=${[
|
.label=${'Select Role'}
|
||||||
{ option: 'Administrator', key: 'admin' },
|
.options=${[
|
||||||
{ option: 'Editor', key: 'editor' },
|
{ option: 'Administrator', key: 'admin' },
|
||||||
{ option: 'Viewer', key: 'viewer' },
|
{ option: 'Editor', key: 'editor' },
|
||||||
{ option: 'Guest', key: 'guest' }
|
{ option: 'Viewer', key: 'viewer' },
|
||||||
]}
|
{ option: 'Guest', key: 'guest' }
|
||||||
></dees-input-dropdown>
|
]}
|
||||||
|
></dees-input-dropdown>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
</dees-demowrapper>
|
</dees-demowrapper>
|
||||||
|
|
||||||
@@ -176,24 +184,26 @@ export const demoFunc = () => html`
|
|||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
<dees-panel .title=${'4. States'} .subtitle=${'Different states and configurations'}>
|
<dees-panel .title=${'4. States'} .subtitle=${'Different states and configurations'}>
|
||||||
<dees-input-dropdown
|
<div class="input-group">
|
||||||
.label=${'Required Field'}
|
<dees-input-dropdown
|
||||||
.required=${true}
|
.label=${'Required Field'}
|
||||||
.options=${[
|
.required=${true}
|
||||||
{ option: 'Option A', key: 'a' },
|
.options=${[
|
||||||
{ option: 'Option B', key: 'b' },
|
{ option: 'Option A', key: 'a' },
|
||||||
{ option: 'Option C', key: 'c' }
|
{ option: 'Option B', key: 'b' },
|
||||||
]}
|
{ option: 'Option C', key: 'c' }
|
||||||
></dees-input-dropdown>
|
]}
|
||||||
|
></dees-input-dropdown>
|
||||||
<dees-input-dropdown
|
|
||||||
.label=${'Disabled Dropdown'}
|
<dees-input-dropdown
|
||||||
.disabled=${true}
|
.label=${'Disabled Dropdown'}
|
||||||
.options=${[
|
.disabled=${true}
|
||||||
{ option: 'Cannot Select', key: 'disabled' }
|
.options=${[
|
||||||
]}
|
{ option: 'Cannot Select', key: 'disabled' }
|
||||||
.selectedOption=${{ option: 'Cannot Select', key: 'disabled' }}
|
]}
|
||||||
></dees-input-dropdown>
|
.selectedOption=${{ option: 'Cannot Select', key: 'disabled' }}
|
||||||
|
></dees-input-dropdown>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
</dees-demowrapper>
|
</dees-demowrapper>
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ export const demoFunc = () => html`
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.payment-group {
|
.payment-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -24,16 +30,18 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<div class="demo-container">
|
<div class="demo-container">
|
||||||
<dees-panel .title=${'Basic IBAN Input'} .subtitle=${'International Bank Account Number with automatic formatting'}>
|
<dees-panel .title=${'Basic IBAN Input'} .subtitle=${'International Bank Account Number with automatic formatting'}>
|
||||||
<dees-input-iban
|
<div class="input-group">
|
||||||
.label=${'Bank Account IBAN'}
|
<dees-input-iban
|
||||||
.description=${'Enter your International Bank Account Number'}
|
.label=${'Bank Account IBAN'}
|
||||||
></dees-input-iban>
|
.description=${'Enter your International Bank Account Number'}
|
||||||
|
></dees-input-iban>
|
||||||
<dees-input-iban
|
|
||||||
.label=${'Verified IBAN'}
|
<dees-input-iban
|
||||||
.description=${'This IBAN has been verified'}
|
.label=${'Verified IBAN'}
|
||||||
.value=${'DE89370400440532013000'}
|
.description=${'This IBAN has been verified'}
|
||||||
></dees-input-iban>
|
.value=${'DE89370400440532013000'}
|
||||||
|
></dees-input-iban>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Payment Information'} .subtitle=${'IBAN input with horizontal layout for payment forms'}>
|
<dees-panel .title=${'Payment Information'} .subtitle=${'IBAN input with horizontal layout for payment forms'}>
|
||||||
@@ -53,18 +61,20 @@ export const demoFunc = () => html`
|
|||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Validation & States'} .subtitle=${'Required fields and disabled states'}>
|
<dees-panel .title=${'Validation & States'} .subtitle=${'Required fields and disabled states'}>
|
||||||
<dees-input-iban
|
<div class="input-group">
|
||||||
.label=${'Payment Account'}
|
<dees-input-iban
|
||||||
.description=${'Required for processing payments'}
|
.label=${'Payment Account'}
|
||||||
.required=${true}
|
.description=${'Required for processing payments'}
|
||||||
></dees-input-iban>
|
.required=${true}
|
||||||
|
></dees-input-iban>
|
||||||
<dees-input-iban
|
|
||||||
.label=${'Locked IBAN'}
|
<dees-input-iban
|
||||||
.description=${'This IBAN cannot be changed'}
|
.label=${'Locked IBAN'}
|
||||||
.value=${'FR1420041010050500013M02606'}
|
.description=${'This IBAN cannot be changed'}
|
||||||
.disabled=${true}
|
.value=${'FR1420041010050500013M02606'}
|
||||||
></dees-input-iban>
|
.disabled=${true}
|
||||||
|
></dees-input-iban>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Bank Transfer Form'} .subtitle=${'Complete form example with IBAN validation'}>
|
<dees-panel .title=${'Bank Transfer Form'} .subtitle=${'Complete form example with IBAN validation'}>
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ export const demoFunc = () => html`
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.horizontal-group {
|
.horizontal-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -24,18 +30,20 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<div class="demo-container">
|
<div class="demo-container">
|
||||||
<dees-panel .title=${'Basic Phone Input'} .subtitle=${'Automatic formatting for phone numbers'}>
|
<dees-panel .title=${'Basic Phone Input'} .subtitle=${'Automatic formatting for phone numbers'}>
|
||||||
<dees-input-phone
|
<div class="input-group">
|
||||||
.label=${'Phone Number'}
|
<dees-input-phone
|
||||||
.description=${'Enter your phone number with country code'}
|
.label=${'Phone Number'}
|
||||||
.value=${'5551234567'}
|
.description=${'Enter your phone number with country code'}
|
||||||
></dees-input-phone>
|
.value=${'5551234567'}
|
||||||
|
></dees-input-phone>
|
||||||
<dees-input-phone
|
|
||||||
.label=${'Contact Phone'}
|
<dees-input-phone
|
||||||
.description=${'Required for account verification'}
|
.label=${'Contact Phone'}
|
||||||
.required=${true}
|
.description=${'Required for account verification'}
|
||||||
.placeholder=${'+1 (555) 000-0000'}
|
.required=${true}
|
||||||
></dees-input-phone>
|
.placeholder=${'+1 (555) 000-0000'}
|
||||||
|
></dees-input-phone>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Horizontal Layout'} .subtitle=${'Phone inputs arranged horizontally'}>
|
<dees-panel .title=${'Horizontal Layout'} .subtitle=${'Phone inputs arranged horizontally'}>
|
||||||
@@ -55,17 +63,19 @@ export const demoFunc = () => html`
|
|||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'International Numbers'} .subtitle=${'Supports formatting for numbers with country codes'}>
|
<dees-panel .title=${'International Numbers'} .subtitle=${'Supports formatting for numbers with country codes'}>
|
||||||
<dees-input-phone
|
<div class="input-group">
|
||||||
.label=${'International Contact'}
|
<dees-input-phone
|
||||||
.description=${'Automatically formats international numbers'}
|
.label=${'International Contact'}
|
||||||
.value=${'441234567890'}
|
.description=${'Automatically formats international numbers'}
|
||||||
></dees-input-phone>
|
.value=${'441234567890'}
|
||||||
|
></dees-input-phone>
|
||||||
<dees-input-phone
|
|
||||||
.label=${'Emergency Contact'}
|
<dees-input-phone
|
||||||
.value=${'911'}
|
.label=${'Emergency Contact'}
|
||||||
.disabled=${true}
|
.value=${'911'}
|
||||||
></dees-input-phone>
|
.disabled=${true}
|
||||||
|
></dees-input-phone>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Form Integration'} .subtitle=${'Phone input as part of a contact form'}>
|
<dees-panel .title=${'Form Integration'} .subtitle=${'Phone input as part of a contact form'}>
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ export const demoFunc = () => html`
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.shopping-grid {
|
.shopping-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||||
@@ -60,17 +66,19 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<div class="demo-container">
|
<div class="demo-container">
|
||||||
<dees-panel .title=${'Basic Quantity Selector'} .subtitle=${'Simple quantity input with increment/decrement buttons'}>
|
<dees-panel .title=${'Basic Quantity Selector'} .subtitle=${'Simple quantity input with increment/decrement buttons'}>
|
||||||
<dees-input-quantityselector
|
<div class="input-group">
|
||||||
.label=${'Quantity'}
|
<dees-input-quantityselector
|
||||||
.description=${'Select the desired quantity'}
|
.label=${'Quantity'}
|
||||||
.value=${1}
|
.description=${'Select the desired quantity'}
|
||||||
></dees-input-quantityselector>
|
.value=${1}
|
||||||
|
></dees-input-quantityselector>
|
||||||
<dees-input-quantityselector
|
|
||||||
.label=${'Items in Cart'}
|
<dees-input-quantityselector
|
||||||
.description=${'Adjust the quantity of items'}
|
.label=${'Items in Cart'}
|
||||||
.value=${3}
|
.description=${'Adjust the quantity of items'}
|
||||||
></dees-input-quantityselector>
|
.value=${3}
|
||||||
|
></dees-input-quantityselector>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Shopping Cart'} .subtitle=${'Modern e-commerce product cards with interactive quantity selectors'} .runAfterRender=${async (elementArg: HTMLElement) => {
|
<dees-panel .title=${'Shopping Cart'} .subtitle=${'Modern e-commerce product cards with interactive quantity selectors'} .runAfterRender=${async (elementArg: HTMLElement) => {
|
||||||
@@ -169,19 +177,21 @@ export const demoFunc = () => html`
|
|||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Required & Disabled States'} .subtitle=${'Different states for validation and restrictions'}>
|
<dees-panel .title=${'Required & Disabled States'} .subtitle=${'Different states for validation and restrictions'}>
|
||||||
<dees-input-quantityselector
|
<div class="input-group">
|
||||||
.label=${'Number of Licenses'}
|
<dees-input-quantityselector
|
||||||
.description=${'Select how many licenses you need'}
|
.label=${'Number of Licenses'}
|
||||||
.required=${true}
|
.description=${'Select how many licenses you need'}
|
||||||
.value=${1}
|
.required=${true}
|
||||||
></dees-input-quantityselector>
|
.value=${1}
|
||||||
|
></dees-input-quantityselector>
|
||||||
<dees-input-quantityselector
|
|
||||||
.label=${'Fixed Quantity'}
|
<dees-input-quantityselector
|
||||||
.description=${'This quantity cannot be changed'}
|
.label=${'Fixed Quantity'}
|
||||||
.disabled=${true}
|
.description=${'This quantity cannot be changed'}
|
||||||
.value=${5}
|
.disabled=${true}
|
||||||
></dees-input-quantityselector>
|
.value=${5}
|
||||||
|
></dees-input-quantityselector>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Order Form'} .subtitle=${'Complete order form with quantity selection'}>
|
<dees-panel .title=${'Order Form'} .subtitle=${'Complete order form with quantity selection'}>
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ export const demoFunc = () => html`
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.demo-grid {
|
.demo-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||||
@@ -60,20 +66,22 @@ export const demoFunc = () => html`
|
|||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'2. Horizontal Layout'} .subtitle=${'Radio groups with horizontal arrangement'}>
|
<dees-panel .title=${'2. Horizontal Layout'} .subtitle=${'Radio groups with horizontal arrangement'}>
|
||||||
<dees-input-radiogroup
|
<div class="input-group">
|
||||||
.label=${'Do you agree with the terms?'}
|
<dees-input-radiogroup
|
||||||
.options=${['Yes', 'No', 'Maybe']}
|
.label=${'Do you agree with the terms?'}
|
||||||
.direction=${'horizontal'}
|
.options=${['Yes', 'No', 'Maybe']}
|
||||||
.selectedOption=${'Yes'}
|
.direction=${'horizontal'}
|
||||||
></dees-input-radiogroup>
|
.selectedOption=${'Yes'}
|
||||||
|
></dees-input-radiogroup>
|
||||||
<dees-input-radiogroup
|
|
||||||
.label=${'Experience Level'}
|
<dees-input-radiogroup
|
||||||
.options=${['Beginner', 'Intermediate', 'Expert']}
|
.label=${'Experience Level'}
|
||||||
.direction=${'horizontal'}
|
.options=${['Beginner', 'Intermediate', 'Expert']}
|
||||||
.selectedOption=${'Intermediate'}
|
.direction=${'horizontal'}
|
||||||
.description=${'Select your experience level with web development'}
|
.selectedOption=${'Intermediate'}
|
||||||
></dees-input-radiogroup>
|
.description=${'Select your experience level with web development'}
|
||||||
|
></dees-input-radiogroup>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'3. Advanced Options'} .subtitle=${'Using object format with keys and payloads'}>
|
<dees-panel .title=${'3. Advanced Options'} .subtitle=${'Using object format with keys and payloads'}>
|
||||||
@@ -132,30 +140,32 @@ export const demoFunc = () => html`
|
|||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'6. Settings Example'} .subtitle=${'Common patterns in application settings'}>
|
<dees-panel .title=${'6. Settings Example'} .subtitle=${'Common patterns in application settings'}>
|
||||||
<dees-input-radiogroup
|
<div class="input-group">
|
||||||
.label=${'Theme Preference'}
|
<dees-input-radiogroup
|
||||||
.options=${[
|
.label=${'Theme Preference'}
|
||||||
{ option: 'Light Theme', key: 'light', payload: 'light' },
|
.options=${[
|
||||||
{ option: 'Dark Theme', key: 'dark', payload: 'dark' },
|
{ option: 'Light Theme', key: 'light', payload: 'light' },
|
||||||
{ option: 'System Default', key: 'system', payload: 'auto' }
|
{ option: 'Dark Theme', key: 'dark', payload: 'dark' },
|
||||||
]}
|
{ option: 'System Default', key: 'system', payload: 'auto' }
|
||||||
.selectedOption=${'dark'}
|
]}
|
||||||
.description=${'Choose how the application should appear'}
|
.selectedOption=${'dark'}
|
||||||
></dees-input-radiogroup>
|
.description=${'Choose how the application should appear'}
|
||||||
|
></dees-input-radiogroup>
|
||||||
<dees-input-radiogroup
|
|
||||||
.label=${'Notification Frequency'}
|
<dees-input-radiogroup
|
||||||
.options=${['All Notifications', 'Important Only', 'None']}
|
.label=${'Notification Frequency'}
|
||||||
.selectedOption=${'Important Only'}
|
.options=${['All Notifications', 'Important Only', 'None']}
|
||||||
.description=${'Control how often you receive notifications'}
|
.selectedOption=${'Important Only'}
|
||||||
></dees-input-radiogroup>
|
.description=${'Control how often you receive notifications'}
|
||||||
|
></dees-input-radiogroup>
|
||||||
<dees-input-radiogroup
|
|
||||||
.label=${'Language'}
|
<dees-input-radiogroup
|
||||||
.options=${['English', 'German', 'French', 'Spanish', 'Japanese']}
|
.label=${'Language'}
|
||||||
.selectedOption=${'English'}
|
.options=${['English', 'German', 'French', 'Spanish', 'Japanese']}
|
||||||
.direction=${'horizontal'}
|
.selectedOption=${'English'}
|
||||||
></dees-input-radiogroup>
|
.direction=${'horizontal'}
|
||||||
|
></dees-input-radiogroup>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'7. Form Integration'} .subtitle=${'Works seamlessly with dees-form'}>
|
<dees-panel .title=${'7. Form Integration'} .subtitle=${'Works seamlessly with dees-form'}>
|
||||||
|
|||||||
@@ -30,6 +30,12 @@ export const demoFunc = () => html`
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.grid-layout {
|
.grid-layout {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
@@ -83,25 +89,27 @@ export const demoFunc = () => html`
|
|||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
<dees-panel .title=${'Basic Text Inputs'} .subtitle=${'Standard text inputs with labels and descriptions'}>
|
<dees-panel .title=${'Basic Text Inputs'} .subtitle=${'Standard text inputs with labels and descriptions'}>
|
||||||
<dees-input-text
|
<div class="input-group">
|
||||||
.label=${'Username'}
|
<dees-input-text
|
||||||
.value=${'johndoe'}
|
.label=${'Username'}
|
||||||
.key=${'username'}
|
.value=${'johndoe'}
|
||||||
></dees-input-text>
|
.key=${'username'}
|
||||||
|
></dees-input-text>
|
||||||
<dees-input-text
|
|
||||||
.label=${'Email Address'}
|
<dees-input-text
|
||||||
.value=${'john@example.com'}
|
.label=${'Email Address'}
|
||||||
.description=${'We will never share your email with anyone'}
|
.value=${'john@example.com'}
|
||||||
.key=${'email'}
|
.description=${'We will never share your email with anyone'}
|
||||||
></dees-input-text>
|
.key=${'email'}
|
||||||
|
></dees-input-text>
|
||||||
<dees-input-text
|
|
||||||
.label=${'Password'}
|
<dees-input-text
|
||||||
.isPasswordBool=${true}
|
.label=${'Password'}
|
||||||
.value=${'secret123'}
|
.isPasswordBool=${true}
|
||||||
.key=${'password'}
|
.value=${'secret123'}
|
||||||
></dees-input-text>
|
.key=${'password'}
|
||||||
|
></dees-input-text>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
</dees-demowrapper>
|
</dees-demowrapper>
|
||||||
|
|
||||||
@@ -172,31 +180,33 @@ export const demoFunc = () => html`
|
|||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
<dees-panel .title=${'Label Positions'} .subtitle=${'Different label positioning options for various layouts'}>
|
<dees-panel .title=${'Label Positions'} .subtitle=${'Different label positioning options for various layouts'}>
|
||||||
<dees-input-text
|
<div class="input-group">
|
||||||
.label=${'Label on Top (Default)'}
|
<dees-input-text
|
||||||
.value=${'Standard layout'}
|
.label=${'Label on Top (Default)'}
|
||||||
.labelPosition=${'top'}
|
.value=${'Standard layout'}
|
||||||
></dees-input-text>
|
.labelPosition=${'top'}
|
||||||
|
></dees-input-text>
|
||||||
<dees-input-text
|
|
||||||
.label=${'Label on Left'}
|
<dees-input-text
|
||||||
.value=${'Inline label'}
|
.label=${'Label on Left'}
|
||||||
.labelPosition=${'left'}
|
.value=${'Inline label'}
|
||||||
></dees-input-text>
|
.labelPosition=${'left'}
|
||||||
|
></dees-input-text>
|
||||||
<div class="grid-layout">
|
|
||||||
|
<div class="grid-layout">
|
||||||
<dees-input-text
|
<dees-input-text
|
||||||
.label=${'City'}
|
.label=${'City'}
|
||||||
.value=${'New York'}
|
.value=${'New York'}
|
||||||
.labelPosition=${'left'}
|
.labelPosition=${'left'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
|
|
||||||
<dees-input-text
|
<dees-input-text
|
||||||
.label=${'ZIP Code'}
|
.label=${'ZIP Code'}
|
||||||
.value=${'10001'}
|
.value=${'10001'}
|
||||||
.labelPosition=${'left'}
|
.labelPosition=${'left'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
</dees-demowrapper>
|
</dees-demowrapper>
|
||||||
|
|
||||||
@@ -234,24 +244,26 @@ export const demoFunc = () => html`
|
|||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
<dees-panel .title=${'Validation & States'} .subtitle=${'Different validation states and input configurations'}>
|
<dees-panel .title=${'Validation & States'} .subtitle=${'Different validation states and input configurations'}>
|
||||||
<dees-input-text
|
<div class="input-group">
|
||||||
.label=${'Required Field'}
|
<dees-input-text
|
||||||
.required=${true}
|
.label=${'Required Field'}
|
||||||
.key=${'requiredField'}
|
.required=${true}
|
||||||
></dees-input-text>
|
.key=${'requiredField'}
|
||||||
|
></dees-input-text>
|
||||||
<dees-input-text
|
|
||||||
.label=${'Disabled Field'}
|
<dees-input-text
|
||||||
.value=${'Cannot edit this'}
|
.label=${'Disabled Field'}
|
||||||
.disabled=${true}
|
.value=${'Cannot edit this'}
|
||||||
></dees-input-text>
|
.disabled=${true}
|
||||||
|
></dees-input-text>
|
||||||
<dees-input-text
|
|
||||||
.label=${'Field with Error'}
|
<dees-input-text
|
||||||
.value=${'invalid@'}
|
.label=${'Field with Error'}
|
||||||
.validationText=${'Please enter a valid email address'}
|
.value=${'invalid@'}
|
||||||
.validationState=${'invalid'}
|
.validationText=${'Please enter a valid email address'}
|
||||||
></dees-input-text>
|
.validationState=${'invalid'}
|
||||||
|
></dees-input-text>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
</dees-demowrapper>
|
</dees-demowrapper>
|
||||||
|
|
||||||
@@ -279,19 +291,21 @@ export const demoFunc = () => html`
|
|||||||
});
|
});
|
||||||
}}>
|
}}>
|
||||||
<dees-panel .title=${'Advanced Features'} .subtitle=${'Password visibility toggle and other advanced features'}>
|
<dees-panel .title=${'Advanced Features'} .subtitle=${'Password visibility toggle and other advanced features'}>
|
||||||
<dees-input-text
|
<div class="input-group">
|
||||||
.label=${'Password with Toggle'}
|
<dees-input-text
|
||||||
.isPasswordBool=${true}
|
.label=${'Password with Toggle'}
|
||||||
.value=${'mySecurePassword123'}
|
.isPasswordBool=${true}
|
||||||
.description=${'Click the eye icon to show/hide password'}
|
.value=${'mySecurePassword123'}
|
||||||
></dees-input-text>
|
.description=${'Click the eye icon to show/hide password'}
|
||||||
|
></dees-input-text>
|
||||||
<dees-input-text
|
|
||||||
.label=${'API Key'}
|
<dees-input-text
|
||||||
.isPasswordBool=${true}
|
.label=${'API Key'}
|
||||||
.value=${'sk-1234567890abcdef'}
|
.isPasswordBool=${true}
|
||||||
.description=${'Keep this key secure and never share it'}
|
.value=${'sk-1234567890abcdef'}
|
||||||
></dees-input-text>
|
.description=${'Keep this key secure and never share it'}
|
||||||
|
></dees-input-text>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
</dees-demowrapper>
|
</dees-demowrapper>
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ export const demoFunc = () => html`
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.horizontal-group {
|
.horizontal-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 24px;
|
gap: 24px;
|
||||||
@@ -39,27 +45,30 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<div class="demo-container">
|
<div class="demo-container">
|
||||||
<dees-panel .title=${'Basic Type List'} .subtitle=${'Add and remove items from a list'}>
|
<dees-panel .title=${'Basic Type List'} .subtitle=${'Add and remove items from a list'}>
|
||||||
<dees-input-typelist
|
<div class="input-group">
|
||||||
.label=${'Tags'}
|
<dees-input-typelist
|
||||||
.description=${'Add tags by typing and pressing Enter'}
|
.label=${'Tags'}
|
||||||
.value=${['javascript', 'typescript', 'web-components']}
|
.description=${'Add tags by typing and pressing Enter'}
|
||||||
></dees-input-typelist>
|
.value=${['javascript', 'typescript', 'web-components']}
|
||||||
|
></dees-input-typelist>
|
||||||
<dees-input-typelist
|
|
||||||
.label=${'Team Members'}
|
<dees-input-typelist
|
||||||
.description=${'Add email addresses of team members'}
|
.label=${'Team Members'}
|
||||||
.value=${['alice@example.com', 'bob@example.com']}
|
.description=${'Add email addresses of team members'}
|
||||||
></dees-input-typelist>
|
.value=${['alice@example.com', 'bob@example.com']}
|
||||||
|
></dees-input-typelist>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Skills & Keywords'} .subtitle=${'Manage lists of skills and keywords'}>
|
<dees-panel .title=${'Skills & Keywords'} .subtitle=${'Manage lists of skills and keywords'}>
|
||||||
<dees-input-typelist
|
<div class="input-group">
|
||||||
.label=${'Your Skills'}
|
<dees-input-typelist
|
||||||
.description=${'List your professional skills'}
|
.label=${'Your Skills'}
|
||||||
.value=${['HTML', 'CSS', 'JavaScript', 'Node.js', 'React']}
|
.description=${'List your professional skills'}
|
||||||
></dees-input-typelist>
|
.value=${['HTML', 'CSS', 'JavaScript', 'Node.js', 'React']}
|
||||||
|
></dees-input-typelist>
|
||||||
<div class="horizontal-group">
|
|
||||||
|
<div class="horizontal-group">
|
||||||
<dees-input-typelist
|
<dees-input-typelist
|
||||||
.label=${'Categories'}
|
.label=${'Categories'}
|
||||||
.layoutMode=${'horizontal'}
|
.layoutMode=${'horizontal'}
|
||||||
@@ -72,22 +81,25 @@ export const demoFunc = () => html`
|
|||||||
.value=${['innovation', 'startup', 'growth']}
|
.value=${['innovation', 'startup', 'growth']}
|
||||||
></dees-input-typelist>
|
></dees-input-typelist>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Required & Disabled States'} .subtitle=${'Different input states for validation'}>
|
<dees-panel .title=${'Required & Disabled States'} .subtitle=${'Different input states for validation'}>
|
||||||
<dees-input-typelist
|
<div class="input-group">
|
||||||
.label=${'Project Dependencies'}
|
<dees-input-typelist
|
||||||
.description=${'List all required npm packages'}
|
.label=${'Project Dependencies'}
|
||||||
.required=${true}
|
.description=${'List all required npm packages'}
|
||||||
.value=${['@design.estate/dees-element', '@design.estate/dees-domtools']}
|
.required=${true}
|
||||||
></dees-input-typelist>
|
.value=${['@design.estate/dees-element', '@design.estate/dees-domtools']}
|
||||||
|
></dees-input-typelist>
|
||||||
<dees-input-typelist
|
|
||||||
.label=${'System Tags'}
|
<dees-input-typelist
|
||||||
.description=${'These tags are managed by the system'}
|
.label=${'System Tags'}
|
||||||
.disabled=${true}
|
.description=${'These tags are managed by the system'}
|
||||||
.value=${['system', 'protected', 'readonly']}
|
.disabled=${true}
|
||||||
></dees-input-typelist>
|
.value=${['system', 'protected', 'readonly']}
|
||||||
|
></dees-input-typelist>
|
||||||
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|
||||||
<dees-panel .title=${'Article Publishing Form'} .subtitle=${'Complete form with tag management'}>
|
<dees-panel .title=${'Article Publishing Form'} .subtitle=${'Complete form with tag management'}>
|
||||||
|
|||||||
Reference in New Issue
Block a user