Compare commits

...

18 Commits

Author SHA1 Message Date
eb3d396c68 v3.76.0
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-04-12 18:50:54 +00:00
13ba5670f0 feat(input): separate label info tooltips from description text across input components 2026-04-12 18:50:54 +00:00
961b811b7a v3.75.0
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-04-12 17:45:33 +00:00
cd491e1517 feat(dees-tile): add configurable overscroll handling to tile content and use it in modals 2026-04-12 17:45:33 +00:00
b8a03def79 v3.74.2
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-04-12 17:28:34 +00:00
2b6798083d fix(modal,tile,input-text): move scroll handling from tile content to modal and update input text demo to use changeSubject subscriptions 2026-04-12 17:28:34 +00:00
3c7b5dc690 v3.74.1
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-04-12 17:01:05 +00:00
2f4afddf73 fix(dees-input-text): adjust password toggle and validation icon alignment in text input 2026-04-12 17:01:05 +00:00
212a46894e v3.74.0
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-04-12 16:58:39 +00:00
653ef109be feat(input-text): add validated success state and text editing context menu to text inputs 2026-04-12 16:58:39 +00:00
a0b17132ad fix(dees-input-text, dees-input-iban): enhance validation handling and improve demo for input states 2026-04-12 11:44:59 +00:00
486ec11ce6 fix(dees-input-text): rename validation state class from 'error' to 'invalid' for consistency 2026-04-12 11:15:18 +00:00
a24d28d4e0 v3.73.2
Some checks failed
Default (tags) / security (push) Failing after 1s
Default (tags) / test (push) Failing after 1s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-04-12 11:10:21 +00:00
8cc45a53e9 fix(input,label): correct validation state attribute handling in text inputs and refine label description icon styling 2026-04-12 11:10:21 +00:00
edf7a86f07 v3.73.1
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-04-12 10:47:18 +00:00
8b8a8ff943 fix(dees-label): align label content and icon consistently using inline flex layout 2026-04-12 10:47:18 +00:00
59610f463e v3.73.0
Some checks failed
Default (tags) / security (push) Failing after 0s
Default (tags) / test (push) Failing after 0s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-04-12 10:44:17 +00:00
c1672bb8ae feat(dees-label): expand dees-label demo coverage and update supporting dependencies 2026-04-12 10:44:17 +00:00
39 changed files with 520 additions and 250 deletions

View File

@@ -1 +0,0 @@
{"sessionId":"4b0f0a7f-f187-40a3-a38b-cb9a7e877011","pid":3110692,"acquiredAt":1775914414249}

View File

@@ -1,5 +1,59 @@
# Changelog
## 2026-04-12 - 3.76.0 - feat(input)
separate label info tooltips from description text across input components
- adds a dedicated infoText property for dees-label tooltips while keeping description available for helper text rendered below inputs
- introduces a shared renderDescription() helper in the input base component and updates multiple input components to use the unified description styling
- updates demos and consuming components to migrate tooltip content from description to infoText where appropriate
## 2026-04-12 - 3.75.0 - feat(dees-tile)
add configurable overscroll handling to tile content and use it in modals
- introduces a reflected overscroll property on dees-tile with contain, auto, and none options
- moves tile content scrolling and scrollbar styling into dees-tile instead of modal-specific styling
- updates dees-modal to enable contained overscroll through the new dees-tile API
## 2026-04-12 - 3.74.2 - fix(modal,tile,input-text)
move scroll handling from tile content to modal and update input text demo to use changeSubject subscriptions
- bump @design.estate/dees-wcctools from ^3.8.2 to ^3.8.4
- set dees-tile content overflow to hidden and apply scroll styling through dees-modal part selectors
- simplify the interactive dees-input-text demo by subscribing directly to changeSubject for live value updates
## 2026-04-12 - 3.74.1 - fix(dees-input-text)
adjust password toggle and validation icon alignment in text input
- positions the password toggle and validation icon with fixed top offsets for improved vertical alignment
- updates the validation icon styling to use a larger themed icon without the circular background
## 2026-04-12 - 3.74.0 - feat(input-text)
add validated success state and text editing context menu to text inputs
- show a delayed checkmark confirmation for successful validation and hide inline validation text afterward
- move IBAN validation handling into the shared text input validation function
- improve the email validation demo to use a stricter regex-based check
- add cut, copy, paste, and select-all context menu actions for text inputs
## 2026-04-12 - 3.73.2 - fix(input,label)
correct validation state attribute handling in text inputs and refine label description icon styling
- Change dees-input-text validationState to reflect as a string attribute and align validation selectors with the emitted host attribute
- Wrap the dees-label description icon in a dedicated container to improve sizing, hover feedback, and alignment
## 2026-04-12 - 3.73.1 - fix(dees-label)
align label content and icon consistently using inline flex layout
- change the label container from inline-block to inline-flex with centered alignment
- remove icon-specific vertical transform in favor of layout-based alignment
## 2026-04-12 - 3.73.0 - feat(dees-label)
expand dees-label demo coverage and update supporting dependencies
- replace the minimal dees-label demo with a structured showcase for basic, required, description, combined, and empty-label states
- add themed demo styling and inline annotations to better document component behavior
- update @design.estate/dees-wcctools, lucide, and @types/node dependency versions
## 2026-04-12 - 3.72.1 - fix(dees-stepper)
improve stepper exit animation timing for cancel confirmation flow

View File

@@ -1,6 +1,6 @@
{
"name": "@design.estate/dees-catalog",
"version": "3.72.1",
"version": "3.76.0",
"private": false,
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
"main": "dist_ts_web/index.js",
@@ -18,7 +18,7 @@
"dependencies": {
"@design.estate/dees-domtools": "^2.5.4",
"@design.estate/dees-element": "^2.2.4",
"@design.estate/dees-wcctools": "^3.8.0",
"@design.estate/dees-wcctools": "^3.8.4",
"@fortawesome/fontawesome-svg-core": "^7.2.0",
"@fortawesome/free-brands-svg-icons": "^7.2.0",
"@fortawesome/free-regular-svg-icons": "^7.2.0",
@@ -35,10 +35,10 @@
"@tiptap/starter-kit": "^2.23.0",
"@tsclass/tsclass": "^9.5.0",
"echarts": "^5.6.0",
"lightweight-charts": "^5.1.0",
"highlight.js": "11.11.1",
"ibantools": "^4.5.1",
"lucide": "^0.577.0",
"lightweight-charts": "^5.1.0",
"lucide": "^1.8.0",
"monaco-editor": "0.55.1",
"pdfjs-dist": "^4.10.38",
"xterm": "^5.3.0",
@@ -50,7 +50,7 @@
"@git.zone/tstest": "^3.6.3",
"@git.zone/tswatch": "^3.3.2",
"@push.rocks/projectinfo": "^5.1.0",
"@types/node": "^25.5.0"
"@types/node": "^25.6.0"
},
"files": [
"ts/**/*",

65
pnpm-lock.yaml generated
View File

@@ -15,8 +15,8 @@ importers:
specifier: ^2.2.4
version: 2.2.4
'@design.estate/dees-wcctools':
specifier: ^3.8.0
version: 3.8.0
specifier: ^3.8.4
version: 3.8.4
'@fortawesome/fontawesome-svg-core':
specifier: ^7.2.0
version: 7.2.0
@@ -75,8 +75,8 @@ importers:
specifier: ^5.1.0
version: 5.1.0
lucide:
specifier: ^0.577.0
version: 0.577.0
specifier: ^1.8.0
version: 1.8.0
monaco-editor:
specifier: 0.55.1
version: 0.55.1
@@ -106,8 +106,8 @@ importers:
specifier: ^5.1.0
version: 5.1.0
'@types/node':
specifier: ^25.5.0
version: 25.5.0
specifier: ^25.6.0
version: 25.6.0
packages:
@@ -323,8 +323,8 @@ packages:
'@design.estate/dees-element@2.2.4':
resolution: {integrity: sha512-O9cA6flBMMd+pBwMQrZXwAWel9yVxgokolb+Em6gvkXxPJ0P/B5UDn4Vc2d4ts3ta55PTBm+l2dPeDVGx/bl7Q==}
'@design.estate/dees-wcctools@3.8.0':
resolution: {integrity: sha512-CC14iVKUrguzD9jIrdPBd9fZ4egVJEZMxl5y8iy0l7WLumeoYvGsoXj5INVkRPLRVLqziIdi4Je1hXqHt2NU+g==}
'@design.estate/dees-wcctools@3.8.4':
resolution: {integrity: sha512-KpFK/azK+a/Xpq33pXKcho+tdFKVHhKZM5ArvHqo9QMwTczgp5DZZgowTDUuqAofjZwnuVfCPHK/Pw9e64N46A==}
'@emnapi/core@1.8.1':
resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==}
@@ -2121,11 +2121,11 @@ packages:
'@types/node@16.9.1':
resolution: {integrity: sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==}
'@types/node@22.19.15':
resolution: {integrity: sha512-F0R/h2+dsy5wJAUe3tAU6oqa2qbWY5TpNfL/RGmo1y38hiyO1w3x2jPtt76wmuaJI4DQnOBu21cNXQ2STIUUWg==}
'@types/node@22.19.17':
resolution: {integrity: sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==}
'@types/node@25.5.0':
resolution: {integrity: sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==}
'@types/node@25.6.0':
resolution: {integrity: sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==}
'@types/randomatic@3.1.5':
resolution: {integrity: sha512-VCwCTw6qh1pRRw+5rNTAwqPmf6A+hdrkdM7dBpZVmhl7g+em3ONXlYK/bWPVKqVGMWgP0d1bog8Vc/X6zRwRRQ==}
@@ -3054,6 +3054,9 @@ packages:
lucide@0.577.0:
resolution: {integrity: sha512-PpC/m5eOItp/WU/GlQPFBXDOhq6HibL73KzYP37OX3LM7VmzWQF8voEj8QRWUFvy9FIKfeDQkWYoyS1D/MdWFA==}
lucide@1.8.0:
resolution: {integrity: sha512-JjV/QnadgFLj1Pyu9IKl0lknrolFEzo04B64QcYLLeRzZl/iEHpdbSrRRKbyXcv45SZNv+WGjIUCT33e7xHO6Q==}
make-dir@3.1.0:
resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==}
engines: {node: '>=8'}
@@ -4002,8 +4005,8 @@ packages:
undici-types@6.21.0:
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
undici-types@7.18.2:
resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==}
undici-types@7.19.2:
resolution: {integrity: sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==}
unified@11.0.5:
resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==}
@@ -4708,7 +4711,7 @@ snapshots:
dependencies:
'@design.estate/dees-domtools': 2.5.4
'@design.estate/dees-element': 2.2.4
'@design.estate/dees-wcctools': 3.8.0
'@design.estate/dees-wcctools': 3.8.4
'@fortawesome/fontawesome-svg-core': 7.2.0
'@fortawesome/free-brands-svg-icons': 7.2.0
'@fortawesome/free-regular-svg-icons': 7.2.0
@@ -4784,7 +4787,7 @@ snapshots:
- supports-color
- vue
'@design.estate/dees-wcctools@3.8.0':
'@design.estate/dees-wcctools@3.8.4':
dependencies:
'@design.estate/dees-domtools': 2.5.4
'@design.estate/dees-element': 2.2.4
@@ -5257,7 +5260,7 @@ snapshots:
'@inquirer/figures': 1.0.15
'@inquirer/type': 2.0.0
'@types/mute-stream': 0.0.4
'@types/node': 22.19.15
'@types/node': 22.19.17
'@types/wrap-ansi': 3.0.0
ansi-escapes: 4.3.2
cli-width: 4.1.0
@@ -7235,7 +7238,7 @@ snapshots:
'@types/clean-css@4.2.11':
dependencies:
'@types/node': 25.5.0
'@types/node': 25.6.0
source-map: 0.6.1
'@types/debug@4.1.12':
@@ -7245,7 +7248,7 @@ snapshots:
'@types/fs-extra@11.0.4':
dependencies:
'@types/jsonfile': 6.1.4
'@types/node': 25.5.0
'@types/node': 25.6.0
'@types/hast@3.0.4':
dependencies:
@@ -7265,7 +7268,7 @@ snapshots:
'@types/jsonfile@6.1.4':
dependencies:
'@types/node': 25.5.0
'@types/node': 25.6.0
'@types/linkify-it@5.0.0': {}
@@ -7288,21 +7291,21 @@ snapshots:
'@types/mute-stream@0.0.4':
dependencies:
'@types/node': 25.5.0
'@types/node': 25.6.0
'@types/node-forge@1.3.14':
dependencies:
'@types/node': 25.5.0
'@types/node': 25.6.0
'@types/node@16.9.1': {}
'@types/node@22.19.15':
'@types/node@22.19.17':
dependencies:
undici-types: 6.21.0
'@types/node@25.5.0':
'@types/node@25.6.0':
dependencies:
undici-types: 7.18.2
undici-types: 7.19.2
'@types/randomatic@3.1.5': {}
@@ -7314,11 +7317,11 @@ snapshots:
'@types/tar-stream@3.1.4':
dependencies:
'@types/node': 25.5.0
'@types/node': 25.6.0
'@types/through2@2.0.41':
dependencies:
'@types/node': 25.5.0
'@types/node': 25.6.0
'@types/trusted-types@2.0.7': {}
@@ -7344,11 +7347,11 @@ snapshots:
'@types/ws@8.18.1':
dependencies:
'@types/node': 25.5.0
'@types/node': 25.6.0
'@types/yauzl@2.10.3':
dependencies:
'@types/node': 25.5.0
'@types/node': 25.6.0
optional: true
'@ungap/structured-clone@1.3.0': {}
@@ -8300,6 +8303,8 @@ snapshots:
lucide@0.577.0: {}
lucide@1.8.0: {}
make-dir@3.1.0:
dependencies:
semver: 6.3.1
@@ -9570,7 +9575,7 @@ snapshots:
undici-types@6.21.0: {}
undici-types@7.18.2: {}
undici-types@7.19.2: {}
unified@11.0.5:
dependencies:

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@design.estate/dees-catalog',
version: '3.72.1',
version: '3.76.0',
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
}

View File

@@ -610,26 +610,26 @@ export class DeesTable<T> extends DeesElement {
<div class="searchGrid hidden">
<dees-input-text
.label=${'lucene syntax search'}
.description=${`
.infoText=${`
You can use the lucene syntax to search for data, e.g.:
\`\`\`
name: "john" AND age: 18
\`\`\`
`}
></dees-input-text>
<dees-input-multitoggle
.label=${'search mode'}
.options=${['table', 'data', 'server']}
.selectedOption=${'table'}
.description=${`
.infoText=${`
There are three basic modes:
* table: only searches data already in the table
* data: searches original data, ignoring table transforms
* server: searches data on the server
`}
></dees-input-multitoggle>
</div>

View File

@@ -92,7 +92,7 @@ export const demoFunc = () => html`
.required=${true}
key="firstName"
label="First Name"
.description=${'Your given name'}
.infoText=${'Your given name'}
></dees-input-text>
<dees-input-text
@@ -105,7 +105,7 @@ export const demoFunc = () => html`
.required=${true}
key="email"
label="Email Address"
.description=${'We will use this to contact you'}
.infoText=${'We will use this to contact you'}
></dees-input-text>
<dees-input-dropdown
@@ -126,7 +126,7 @@ export const demoFunc = () => html`
key="password"
label="Password"
isPasswordBool
.description=${'Minimum 8 characters'}
.infoText=${'Minimum 8 characters'}
></dees-input-text>
<dees-input-checkbox
@@ -300,7 +300,7 @@ export const demoFunc = () => html`
<dees-input-fileupload
key="documents"
.label=${'Upload Documents'}
.description=${'PDF, DOC, or DOCX files up to 10MB'}
.infoText=${'PDF, DOC, or DOCX files up to 10MB'}
></dees-input-fileupload>
<dees-form-submit>Submit Application</dees-form-submit>

View File

@@ -1,6 +1,7 @@
import {
DeesElement,
property,
html,
css,
type CSSResult,
cssManager,
@@ -42,6 +43,9 @@ export abstract class DeesInputBase<T = any> extends DeesElement {
@property({ type: Boolean })
accessor disabled: boolean = false;
@property({ type: String })
accessor infoText!: string;
@property({ type: String })
accessor description!: string;
@@ -90,6 +94,14 @@ export abstract class DeesInputBase<T = any> extends DeesElement {
:host([label-position="none"]) dees-label {
display: none;
}
/* Description text below input */
.descriptionText {
margin-top: 4px;
font-size: 12px;
line-height: 1.4;
color: ${cssManager.bdTheme('hsl(0 0% 45.1%)', 'hsl(0 0% 63.9%)')};
}
`,
];
}
@@ -155,6 +167,14 @@ export abstract class DeesInputBase<T = any> extends DeesElement {
this.disabled = false;
}
/**
* Renders the description text below the input.
* Call ${this.renderDescription()} at the end of your render template.
*/
public renderDescription() {
return this.description ? html`<div class="descriptionText">${this.description}</div>` : '';
}
/**
* Abstract method that child classes must implement to get their value
*/

View File

@@ -147,12 +147,6 @@ export class DeesInputCheckbox extends DeesInputBase<DeesInputCheckbox> {
color: ${cssManager.bdTheme('hsl(0 0% 15%)', 'hsl(0 0% 90%)')};
}
/* Description */
.description-text {
font-size: 12px;
color: ${cssManager.bdTheme('hsl(0 0% 45.1%)', 'hsl(0 0% 63.9%)')};
line-height: 1.5;
}
`,
];
@@ -185,7 +179,7 @@ export class DeesInputCheckbox extends DeesInputBase<DeesInputCheckbox> {
</div>
<div class="label-container">
${this.label ? html`<div class="checkbox-label">${this.label}</div>` : ''}
${this.description ? html`<div class="description-text">${this.description}</div>` : ''}
${this.renderDescription()}
</div>
</div>
</div>

View File

@@ -284,7 +284,7 @@ export class DeesInputCode extends DeesInputBase<string> {
}
</style>
<div class="input-wrapper">
<dees-label .label=${this.label} .description=${this.description} .required=${this.required}></dees-label>
<dees-label .label=${this.label} .infoText=${this.infoText} .required=${this.required}></dees-label>
<dees-tile>
<div slot="header" class="toolbar">
<div class="toolbar-left">
@@ -362,6 +362,7 @@ export class DeesInputCode extends DeesInputBase<string> {
</div>
</div>
</dees-tile>
${this.renderDescription()}
</div>
`;
}

View File

@@ -4,7 +4,7 @@ import type { DeesInputDatepicker } from './component.js';
export const renderDatepicker = (component: DeesInputDatepicker): TemplateResult => {
return html`
<div class="input-wrapper">
<dees-label .label=${component.label} .description=${component.description} .required=${component.required}></dees-label>
<dees-label .label=${component.label} .infoText=${component.infoText} .required=${component.required}></dees-label>
<div class="input-container">
<input
type="text"
@@ -27,6 +27,7 @@ export const renderDatepicker = (component: DeesInputDatepicker): TemplateResult
<dees-icon class="calendar-icon" icon="lucide:calendar" iconSize="16"></dees-icon>
</div>
</div>
${component.renderDescription()}
</div>
`;

View File

@@ -72,6 +72,7 @@ export const demoFunc = () => html`
<div class="input-group">
<dees-input-dropdown
.label=${'Select Country'}
.description=${'Choose the country where your business is registered'}
.options=${[
{ option: 'United States', key: 'us' },
{ option: 'Canada', key: 'ca' },

View File

@@ -168,7 +168,7 @@ export class DeesInputDropdown extends DeesInputBase<DeesInputDropdown> {
public render(): TemplateResult {
return html`
<div class="input-wrapper">
<dees-label .label=${this.label} .description=${this.description} .required=${this.required}></dees-label>
<dees-label .label=${this.label} .infoText=${this.infoText} .required=${this.required}></dees-label>
<div class="maincontainer">
<div
class="selectedBox ${this.isOpened ? 'open' : ''} ${this.disabled ? 'disabled' : ''}"
@@ -179,6 +179,7 @@ export class DeesInputDropdown extends DeesInputBase<DeesInputDropdown> {
${this.selectedOption?.option || 'Select an option'}
</div>
</div>
${this.renderDescription()}
</div>
`;
}

View File

@@ -73,7 +73,7 @@ export class DeesInputFileupload extends DeesInputBase<DeesInputFileupload> {
<div class="input-wrapper">
<dees-label
.label=${this.label}
.description=${this.description}
.infoText=${this.infoText}
.required=${this.required}
></dees-label>
<dees-tile
@@ -114,6 +114,7 @@ export class DeesInputFileupload extends DeesInputBase<DeesInputFileupload> {
${this.validationMessage
? html`<div class="validation-message" aria-live="polite">${this.validationMessage}</div>`
: html``}
${this.renderDescription()}
</div>
`;
}

View File

@@ -59,14 +59,15 @@ export const demoFunc = () => html`
<div class="demo-stack">
<dees-input-fileupload
.label=${'Attachments'}
.description=${'Upload supporting documents for your request'}
.infoText=${'Upload supporting documents for your request'}
.description=${'Accepted formats: images, PDF, and ZIP archives up to 10MB'}
.accept=${'image/*,.pdf,.zip'}
.maxSize=${10 * 1024 * 1024}
></dees-input-fileupload>
<dees-input-fileupload
.label=${'Brand assets'}
.description=${'Upload high-resolution imagery (JPG/PNG)'}
.infoText=${'Upload high-resolution imagery (JPG/PNG)'}
.accept=${'image/jpeg,image/png'}
.multiple=${false}
.maxSize=${5 * 1024 * 1024}
@@ -77,14 +78,14 @@ export const demoFunc = () => html`
<div class="demo-stack">
<dees-input-fileupload
.label=${'Audio uploads'}
.description=${'Share podcast drafts (MP3/WAV, max 25MB each)'}
.infoText=${'Share podcast drafts (MP3/WAV, max 25MB each)'}
.accept=${'audio/*'}
.maxSize=${25 * 1024 * 1024}
></dees-input-fileupload>
<dees-input-fileupload
.label=${'Disabled example'}
.description=${'Uploader is disabled while moderation is pending'}
.infoText=${'Uploader is disabled while moderation is pending'}
.disabled=${true}
></dees-input-fileupload>
</div>
@@ -100,7 +101,7 @@ export const demoFunc = () => html`
<div class="demo-stack">
<dees-input-text
.label=${'Project name'}
.description=${'How should we refer to this project internally?'}
.infoText=${'How should we refer to this project internally?'}
.required=${true}
.key=${'projectName'}
></dees-input-text>
@@ -114,7 +115,7 @@ export const demoFunc = () => html`
<dees-input-fileupload
.label=${'Statement of work'}
.description=${'Upload a signed statement of work (PDF, max 15MB)'}
.infoText=${'Upload a signed statement of work (PDF, max 15MB)'}
.required=${true}
.accept=${'application/pdf'}
.maxSize=${15 * 1024 * 1024}
@@ -124,7 +125,7 @@ export const demoFunc = () => html`
<dees-input-fileupload
.label=${'Creative references'}
.description=${'Optional. Upload up to five visual references'}
.infoText=${'Optional. Upload up to five visual references'}
.accept=${'image/*'}
.maxFiles=${5}
.maxSize=${8 * 1024 * 1024}
@@ -133,7 +134,7 @@ export const demoFunc = () => html`
<dees-input-text
.label=${'Notes'}
.description=${'Add optional context for reviewers'}
.infoText=${'Add optional context for reviewers'}
.inputType=${'textarea'}
.key=${'notes'}
></dees-input-text>

View File

@@ -33,12 +33,13 @@ export const demoFunc = () => html`
<div class="input-group">
<dees-input-iban
.label=${'Bank Account IBAN'}
.description=${'Enter your International Bank Account Number'}
.infoText=${'Enter your International Bank Account Number'}
.description=${'Your IBAN can be found on your bank statement'}
></dees-input-iban>
<dees-input-iban
.label=${'Verified IBAN'}
.description=${'This IBAN has been verified'}
.infoText=${'This IBAN has been verified'}
.value=${'DE89370400440532013000'}
></dees-input-iban>
</div>
@@ -64,13 +65,13 @@ export const demoFunc = () => html`
<div class="input-group">
<dees-input-iban
.label=${'Payment Account'}
.description=${'Required for processing payments'}
.infoText=${'Required for processing payments'}
.required=${true}
></dees-input-iban>
<dees-input-iban
.label=${'Locked IBAN'}
.description=${'This IBAN cannot be changed'}
.infoText=${'This IBAN cannot be changed'}
.value=${'FR1420041010050500013M02606'}
.disabled=${true}
></dees-input-iban>
@@ -81,7 +82,7 @@ export const demoFunc = () => html`
<dees-form>
<dees-input-text .label=${'Recipient Name'} .required=${true}></dees-input-text>
<dees-input-iban .label=${'Recipient IBAN'} .required=${true}></dees-input-iban>
<dees-input-text .label=${'Transfer Reference'} .description=${'Optional reference for the transfer'}></dees-input-text>
<dees-input-text .label=${'Transfer Reference'} .infoText=${'Optional reference for the transfer'}></dees-input-text>
<dees-input-text .label=${'Amount'} .inputType=${'number'} .required=${true}></dees-input-text>
</dees-form>
</dees-panel>

View File

@@ -44,16 +44,27 @@ export class DeesInputIban extends DeesInputBase<DeesInputIban> {
public render(): TemplateResult {
return html`
<div class="input-wrapper">
<dees-label .label=${this.label || 'IBAN'} .description=${this.description}></dees-label>
<dees-label .label=${this.label || 'IBAN'} .infoText=${this.infoText}></dees-label>
<dees-input-text
.value=${this.value}
.disabled=${this.disabled}
.required=${this.required}
.placeholder=${'DE89 3704 0044 0532 0130 00'}
.validationFunction=${(value: string) => {
const normalized = value.replace(/ /g, '');
if (normalized.length === 0) {
return { valid: true, message: '' };
}
const isValid = ibantools.isValidIBAN(normalized);
return isValid
? { valid: true, message: 'IBAN is valid' }
: { valid: false, message: 'Please enter a valid IBAN' };
}}
@input=${(eventArg: InputEvent) => {
this.validateIban(eventArg);
}}
></dees-input-text>
${this.renderDescription()}
</div>
`;
}
@@ -81,10 +92,6 @@ export class DeesInputIban extends DeesInputBase<DeesInputIban> {
}
}
this.enteredIbanIsValid = ibantools.isValidIBAN(this.enteredString.replace(/ /g, ''));
const deesInputText = this.shadowRoot!.querySelector('dees-input-text') as any;
if (deesInputText) {
deesInputText.validationText = `IBAN is valid: ${this.enteredIbanIsValid}`;
}
}
public getValue(): string {

View File

@@ -373,13 +373,6 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
line-height: 1.4;
}
.description {
color: ${cssManager.bdTheme('hsl(215.4 16.3% 56.9%)', 'hsl(215 20.2% 55.1%)')};
font-size: 12px;
margin-top: 4px;
line-height: 1.4;
}
/* Scrollbar styling */
.list-items::-webkit-scrollbar {
width: 8px;
@@ -546,9 +539,7 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
<div class="validation-message">${this.validationText}</div>
` : ''}
${this.description ? html`
<div class="description">${this.description}</div>
` : ''}
${this.renderDescription()}
</div>
`;
}

View File

@@ -55,7 +55,8 @@ export const demoFunc = () => html`
<dees-input-multitoggle
.label=${'Display Mode'}
.description=${'Choose how content is displayed'}
.infoText=${'Choose how content is displayed'}
.description=${'This setting affects how items appear on your dashboard'}
.options=${['List View', 'Grid View', 'Compact']}
.selectedOption=${'Grid View'}
></dees-input-multitoggle>
@@ -64,7 +65,7 @@ export const demoFunc = () => html`
<dees-input-multitoggle
.label=${'T-Shirt Size'}
.description=${'Select your preferred size'}
.infoText=${'Select your preferred size'}
.options=${['XS', 'S', 'M', 'L', 'XL', 'XXL']}
.selectedOption=${'M'}
></dees-input-multitoggle>
@@ -76,7 +77,7 @@ export const demoFunc = () => html`
<dees-input-multitoggle
.label=${'Notifications'}
.description=${'Enable or disable push notifications'}
.infoText=${'Enable or disable push notifications'}
.type=${'boolean'}
.selectedOption=${'true'}
></dees-input-multitoggle>
@@ -85,7 +86,7 @@ export const demoFunc = () => html`
<dees-input-multitoggle
.label=${'Theme Mode'}
.description=${'Switch between light and dark theme'}
.infoText=${'Switch between light and dark theme'}
.type=${'boolean'}
.booleanTrueName=${'Dark'}
.booleanFalseName=${'Light'}
@@ -134,7 +135,7 @@ export const demoFunc = () => html`
<dees-input-multitoggle
.label=${'Account Type'}
.description=${'This setting is locked'}
.infoText=${'This setting is locked'}
.options=${['Free', 'Pro', 'Enterprise']}
.selectedOption=${'Enterprise'}
.disabled=${true}

View File

@@ -146,7 +146,7 @@ export class DeesInputMultitoggle extends DeesInputBase<DeesInputMultitoggle> {
public render(): TemplateResult {
return html`
<div class="input-wrapper">
<dees-label .label=${this.label} .description=${this.description}></dees-label>
<dees-label .label=${this.label} .infoText=${this.infoText}></dees-label>
<div class="mainbox">
<div class="selections">
<div class="indicator"></div>
@@ -158,6 +158,7 @@ export class DeesInputMultitoggle extends DeesInputBase<DeesInputMultitoggle> {
)}
</div>
</div>
${this.renderDescription()}
</div>
`;
}

View File

@@ -33,13 +33,14 @@ export const demoFunc = () => html`
<div class="input-group">
<dees-input-phone
.label=${'Phone Number'}
.description=${'Enter your phone number with country code'}
.infoText=${'Enter your phone number with country code'}
.description=${'Include country code for international numbers'}
.value=${'5551234567'}
></dees-input-phone>
<dees-input-phone
.label=${'Contact Phone'}
.description=${'Required for account verification'}
.infoText=${'Required for account verification'}
.required=${true}
.placeholder=${'+1 (555) 000-0000'}
></dees-input-phone>
@@ -66,7 +67,7 @@ export const demoFunc = () => html`
<div class="input-group">
<dees-input-phone
.label=${'International Contact'}
.description=${'Automatically formats international numbers'}
.infoText=${'Automatically formats international numbers'}
.value=${'441234567890'}
></dees-input-phone>

View File

@@ -47,7 +47,7 @@ export class DeesInputPhone extends DeesInputBase<DeesInputPhone> {
public render(): TemplateResult {
return html`
<div class="input-wrapper">
<dees-label .label=${this.label} .description=${this.description}></dees-label>
<dees-label .label=${this.label} .infoText=${this.infoText}></dees-label>
<dees-input-text
.value=${this.formattedPhone}
.disabled=${this.disabled}
@@ -55,6 +55,7 @@ export class DeesInputPhone extends DeesInputBase<DeesInputPhone> {
.placeholder=${this.placeholder}
@input=${(event: InputEvent) => this.handlePhoneInput(event)}
></dees-input-text>
${this.renderDescription()}
</div>
`;
}

View File

@@ -69,13 +69,14 @@ export const demoFunc = () => html`
<div class="input-group">
<dees-input-quantityselector
.label=${'Quantity'}
.description=${'Select the desired quantity'}
.infoText=${'Select the desired quantity'}
.description=${'Minimum order quantity is 1 item'}
.value=${1}
></dees-input-quantityselector>
<dees-input-quantityselector
.label=${'Items in Cart'}
.description=${'Adjust the quantity of items'}
.infoText=${'Adjust the quantity of items'}
.value=${3}
></dees-input-quantityselector>
</div>
@@ -180,14 +181,14 @@ export const demoFunc = () => html`
<div class="input-group">
<dees-input-quantityselector
.label=${'Number of Licenses'}
.description=${'Select how many licenses you need'}
.infoText=${'Select how many licenses you need'}
.required=${true}
.value=${1}
></dees-input-quantityselector>
<dees-input-quantityselector
.label=${'Fixed Quantity'}
.description=${'This quantity cannot be changed'}
.infoText=${'This quantity cannot be changed'}
.disabled=${true}
.value=${5}
></dees-input-quantityselector>
@@ -204,7 +205,7 @@ export const demoFunc = () => html`
></dees-input-dropdown>
<dees-input-quantityselector
.label=${'Quantity'}
.description=${'Number of licenses'}
.infoText=${'Number of licenses'}
.value=${1}
></dees-input-quantityselector>
<dees-input-text

View File

@@ -129,7 +129,7 @@ export class DeesInputQuantitySelector extends DeesInputBase<DeesInputQuantitySe
public render(): TemplateResult {
return html`
<div class="input-wrapper">
${this.label ? html`<dees-label .label=${this.label} .description=${this.description} .required=${this.required}></dees-label>` : ''}
${this.label ? html`<dees-label .label=${this.label} .infoText=${this.infoText} .required=${this.required}></dees-label>` : ''}
<div
class="quantity-container ${this.disabled ? 'disabled' : ''}"
data-min="${this.value <= 0}"
@@ -162,6 +162,7 @@ export class DeesInputQuantitySelector extends DeesInputBase<DeesInputQuantitySe
aria-label="Increase quantity"
>+</div>
</div>
${this.renderDescription()}
</div>
`;
}

View File

@@ -189,14 +189,6 @@ export class DeesInputRadiogroup extends DeesInputBase<string | object> {
line-height: 20px;
}
.description-text {
font-size: 13px;
color: ${cssManager.bdTheme('hsl(215.4 16.3% 56.9%)', 'hsl(215 20.2% 55.1%)')};
margin-top: 10px;
line-height: 1.5;
letter-spacing: -0.003em;
}
/* Validation styles */
:host([validationState="invalid"]) .radio-circle {
border-color: ${cssManager.bdTheme('hsl(0 72.2% 50.6%)', 'hsl(0 62.8% 30.6%)')};
@@ -256,7 +248,7 @@ export class DeesInputRadiogroup extends DeesInputBase<string | object> {
`;
})}
</div>
${this.description ? html`<div class="description-text">${this.description}</div>` : ''}
${this.renderDescription()}
</div>
`;
}

View File

@@ -278,13 +278,6 @@ export const richtextStyles = [
border-color: ${cssManager.bdTheme('hsl(0 0% 15%)', 'hsl(0 0% 93.9%)')};
}
.description {
margin-top: 8px;
font-size: 12px;
color: ${cssManager.bdTheme('hsl(215.4 16.3% 46.9%)', 'hsl(215 20.2% 65.1%)')};
line-height: 1.4;
}
:host([disabled]) dees-tile {
opacity: 0.6;
cursor: not-allowed;

View File

@@ -26,7 +26,7 @@ export const renderRichtext = (component: DeesInputRichtext): TemplateResult =>
`
: ''}
</dees-tile>
${component.description ? html`<div class="description">${component.description}</div>` : ''}
${component.renderDescription()}
</div>
`;

View File

@@ -210,14 +210,6 @@ export class DeesInputTags extends DeesInputBase<DeesInputTags> {
line-height: 1.5;
}
/* Description styles */
.description {
color: ${cssManager.bdTheme('hsl(215.4 16.3% 56.9%)', 'hsl(215 20.2% 55.1%)')};
font-size: 13px;
margin-top: 6px;
line-height: 1.5;
}
/* Scrollbar styling */
.suggestions-dropdown::-webkit-scrollbar {
width: 8px;
@@ -302,9 +294,7 @@ export class DeesInputTags extends DeesInputBase<DeesInputTags> {
<div class="validation-message">${this.validationText}</div>
` : ''}
${this.description ? html`
<div class="description">${this.description}</div>
` : ''}
${this.renderDescription()}
</div>
`;
}

View File

@@ -94,12 +94,13 @@ export const demoFunc = () => html`
.label=${'Username'}
.value=${'johndoe'}
.key=${'username'}
.description=${'Your username will be visible to other users'}
></dees-input-text>
<dees-input-text
.label=${'Email Address'}
.value=${'john@example.com'}
.description=${'We will never share your email with anyone'}
.infoText=${'We will never share your email with anyone'}
.key=${'email'}
></dees-input-text>
@@ -210,39 +211,7 @@ export const demoFunc = () => html`
</dees-panel>
</dees-demowrapper>
<dees-demowrapper .runAfterRender=${async (elementArg: HTMLElement) => {
// Demonstrate validation states
const requiredInput = elementArg.querySelector('dees-input-text[required]') as DeesInputText;
const disabledInput = elementArg.querySelector('dees-input-text[disabled]') as DeesInputText;
const errorInput = elementArg.querySelector('dees-input-text[validationState="invalid"]') as DeesInputText;
if (requiredInput) {
// Show validation on blur for empty required field
requiredInput.addEventListener('blur', () => {
if (!requiredInput.getValue()) {
console.log('Required field is empty!');
}
});
}
if (disabledInput) {
console.log('Disabled input cannot be edited');
}
if (errorInput) {
console.log('Error input shows validation message:', errorInput.validationText);
// Simulate fixing the error
errorInput.addEventListener('changeSubject', () => {
const value = errorInput.getValue();
if (value.includes('@') && value.includes('.')) {
errorInput.validationState = 'valid';
errorInput.validationText = '';
console.log('Email validation passed!');
}
});
}
}}>
<dees-demowrapper>
<dees-panel .title=${'Validation & States'} .subtitle=${'Different validation states and input configurations'}>
<div class="input-group">
<dees-input-text
@@ -258,10 +227,15 @@ export const demoFunc = () => html`
></dees-input-text>
<dees-input-text
.label=${'Field with Error'}
.label=${'Email with Validation'}
.value=${'invalid@'}
.validationText=${'Please enter a valid email address'}
.validationState=${'invalid'}
.validationFunction=${(value: string) => {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (emailRegex.test(value)) {
return { valid: true, message: 'Email address is valid' };
}
return { valid: false, message: 'Please enter a valid email address' };
}}
></dees-input-text>
</div>
</dees-panel>
@@ -297,54 +271,35 @@ export const demoFunc = () => html`
.label=${'Password with Toggle'}
.isPasswordBool=${true}
.value=${'mySecurePassword123'}
.description=${'Click the eye icon to show/hide password'}
.infoText=${'Click the eye icon to show/hide password'}
></dees-input-text>
<dees-input-text
.label=${'API Key'}
.isPasswordBool=${true}
.value=${'sk-1234567890abcdef'}
.description=${'Keep this key secure and never share it'}
.infoText=${'Keep this key secure and never share it'}
></dees-input-text>
</div>
</dees-panel>
</dees-demowrapper>
<dees-demowrapper .runAfterRender=${async (elementArg: HTMLElement) => {
// Set up interactive example
const dynamicInput = elementArg.querySelector('dees-input-text');
const dynamicInput = elementArg.querySelector('dees-input-text') as DeesInputText;
const output = elementArg.querySelector('#text-input-output');
if (dynamicInput && output) {
// Update output on every change
dynamicInput.addEventListener('changeSubject', ((event: CustomEvent) => {
const value = (event.detail as DeesInputText).getValue();
output.textContent = `Current value: "${value}"`;
}) as EventListener);
// Also track focus/blur events
dynamicInput.addEventListener('focus', () => {
console.log('Input focused');
});
dynamicInput.addEventListener('blur', () => {
console.log('Input blurred');
});
// Track keypress events
let keypressCount = 0;
dynamicInput.addEventListener('keydown', () => {
keypressCount++;
console.log(`Keypress count: ${keypressCount}`);
dynamicInput.changeSubject.subscribe(() => {
output.textContent = `Current value: "${dynamicInput.getValue()}"`;
});
}
}}>
<dees-panel .title=${'Interactive Example'} .subtitle=${'Try typing in the inputs to see real-time value changes'}>
<dees-input-text
.label=${'Dynamic Input'}
<dees-panel .title=${'Interactive Example'} .subtitle=${'Try typing in the input to see real-time value changes'}>
<dees-input-text
.label=${'Dynamic Input'}
.placeholder=${'Type something here...'}
></dees-input-text>
<div class="interactive-section">
<div id="text-input-output" class="output-text">Current value: ""</div>
</div>

View File

@@ -7,11 +7,13 @@ import {
customElement,
type TemplateResult,
property,
state,
html,
cssManager,
css,
} from '@design.estate/dees-element';
import { themeDefaultStyles } from '../../00theme.js';
import '../../00group-overlay/dees-contextmenu/dees-contextmenu.js';
declare global {
interface HTMLElementTagNameMap {
@@ -44,7 +46,7 @@ export class DeesInputText extends DeesInputBase {
accessor showPasswordBool = false;
@property({
type: Boolean,
type: String,
reflect: true,
})
accessor validationState!: 'valid' | 'warn' | 'invalid';
@@ -54,8 +56,8 @@ export class DeesInputText extends DeesInputBase {
})
accessor validationText: string = '';
@property({})
accessor validationFunction!: (value: string) => boolean;
@property({ attribute: false })
accessor validationFunction!: (value: string) => { valid: boolean; message?: string };
@property({
type: Boolean,
@@ -63,6 +65,11 @@ export class DeesInputText extends DeesInputBase {
})
accessor vintegrated: boolean = false;
@property({ attribute: false })
accessor validConfirmed: boolean = false;
private validTimeout: ReturnType<typeof setTimeout> | undefined;
public static styles = [
themeDefaultStyles,
...DeesInputBase.baseStyles,
@@ -127,7 +134,7 @@ export class DeesInputText extends DeesInputBase {
.showPassword {
position: absolute;
right: 1px;
top: 50%;
top: 20px;
transform: translateY(-50%);
display: flex;
align-items: center;
@@ -145,6 +152,29 @@ export class DeesInputText extends DeesInputBase {
color: ${cssManager.bdTheme('hsl(0 0% 15%)', 'hsl(0 0% 93.9%)')};
}
/* Valid checkmark icon */
.validIcon {
position: absolute;
right: 10px;
top: 20px;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.2s ease;
pointer-events: none;
color: ${cssManager.bdTheme('hsl(142.1 76.2% 36.3%)', 'hsl(142.1 70.6% 45.3%)')};
}
.validIcon.show {
opacity: 1;
}
.validIcon dees-icon {
font-size: 18px;
}
/* Validation styles */
.validationContainer {
margin-top: 4px;
@@ -156,7 +186,7 @@ export class DeesInputText extends DeesInputBase {
overflow: hidden;
}
.validationContainer.error {
.validationContainer.invalid {
background: ${cssManager.bdTheme('hsl(0 84.2% 60.2% / 0.1)', 'hsl(0 72.2% 50.6% / 0.1)')};
color: ${cssManager.bdTheme('hsl(0 84.2% 60.2%)', 'hsl(0 72.2% 50.6%)')};
}
@@ -172,31 +202,31 @@ export class DeesInputText extends DeesInputBase {
}
/* Error state for input */
:host([validation-state="invalid"]) input {
:host([validationstate="invalid"]) input {
border-color: ${cssManager.bdTheme('hsl(0 84.2% 60.2%)', 'hsl(0 72.2% 50.6%)')};
}
:host([validation-state="invalid"]) input:focus {
:host([validationstate="invalid"]) input:focus {
border-color: ${cssManager.bdTheme('hsl(0 84.2% 60.2%)', 'hsl(0 72.2% 50.6%)')};
box-shadow: 0 0 0 2px ${cssManager.bdTheme('hsl(0 84.2% 60.2% / 0.05)', 'hsl(0 72.2% 50.6% / 0.05)')};
}
/* Warning state for input */
:host([validation-state="warn"]) input {
:host([validationstate="warn"]) input {
border-color: ${cssManager.bdTheme('hsl(25 95% 53%)', 'hsl(25 95% 63%)')};
}
:host([validation-state="warn"]) input:focus {
:host([validationstate="warn"]) input:focus {
border-color: ${cssManager.bdTheme('hsl(25 95% 53%)', 'hsl(25 95% 63%)')};
box-shadow: 0 0 0 2px ${cssManager.bdTheme('hsl(25 95% 53% / 0.05)', 'hsl(25 95% 63% / 0.05)')};
}
/* Valid state for input */
:host([validation-state="valid"]) input {
:host([validationstate="valid"]) input {
border-color: ${cssManager.bdTheme('hsl(142.1 76.2% 36.3%)', 'hsl(142.1 70.6% 45.3%)')};
}
:host([validation-state="valid"]) input:focus {
:host([validationstate="valid"]) input:focus {
border-color: ${cssManager.bdTheme('hsl(142.1 76.2% 36.3%)', 'hsl(142.1 70.6% 45.3%)')};
box-shadow: 0 0 0 2px ${cssManager.bdTheme('hsl(142.1 76.2% 36.3% / 0.05)', 'hsl(142.1 70.6% 45.3% / 0.05)')};
}
@@ -239,9 +269,9 @@ export class DeesInputText extends DeesInputBase {
input {
font-family: ${this.isPasswordBool ? cssMonoFontFamily : 'inherit'};
letter-spacing: ${this.isPasswordBool ? '0.5px' : 'normal'};
padding-right: ${this.isPasswordBool ? '48px' : '12px'};
padding-right: ${this.isPasswordBool ? '48px' : this.validConfirmed ? '40px' : '12px'};
}
${this.validationText
${this.validationText && !this.validConfirmed
? css`
.validationContainer {
height: auto;
@@ -259,7 +289,7 @@ export class DeesInputText extends DeesInputBase {
`}
</style>
<div class="input-wrapper">
<dees-label .label=${this.label} .description=${this.description} .required=${this.required}></dees-label>
<dees-label .label=${this.label} .infoText=${this.infoText} .required=${this.required}></dees-label>
<div class="maincontainer">
<input
type="${this.isPasswordBool && !this.showPasswordBool ? 'password' : 'text'}"
@@ -275,28 +305,114 @@ export class DeesInputText extends DeesInputBase {
</div>
`
: html``}
<div class="validIcon ${this.validConfirmed ? 'show' : ''}">
<dees-icon .icon=${'lucide:Check'}></dees-icon>
</div>
${this.validationText
? html`
<div class="validationContainer ${this.validationState || 'error'}">
<div class="validationContainer ${this.validationState || 'invalid'}">
${this.validationText}
</div>
`
: html`<div class="validationContainer"></div>`}
${this.renderDescription()}
</div>
</div>
`;
}
firstUpdated() {
// Input event handling is already done in updateValue method
if (this.validationFunction && this.value) {
const result = this.validationFunction(this.value);
this.validationState = result.valid ? 'valid' : 'invalid';
this.validationText = result.message || '';
if (result.valid) {
this.validConfirmed = false;
this.validTimeout = setTimeout(() => {
this.validConfirmed = true;
this.validationState = undefined as any;
}, 500);
}
}
}
public async updateValue(eventArg: Event) {
const target: any = eventArg.target;
this.value = target.value;
if (this.validationFunction) {
const result = this.validationFunction(this.value);
this.validationState = result.valid ? 'valid' : 'invalid';
this.validationText = result.message || '';
if (result.valid) {
this.validConfirmed = false;
clearTimeout(this.validTimeout);
this.validTimeout = setTimeout(() => {
this.validConfirmed = true;
this.validationState = undefined as any;
}, 500);
} else {
clearTimeout(this.validTimeout);
this.validConfirmed = false;
}
}
this.changeSubject.next(this);
}
public getContextMenuItems() {
const input = this.shadowRoot!.querySelector('input')!;
const hasSelection = input.selectionStart !== input.selectionEnd;
return [
{
name: 'Cut',
iconName: 'lucide:Scissors',
shortcut: 'Cmd+X',
disabled: !hasSelection,
action: async () => {
const selected = this.value.substring(input.selectionStart!, input.selectionEnd!);
await navigator.clipboard.writeText(selected);
const start = input.selectionStart!;
this.value = this.value.substring(0, start) + this.value.substring(input.selectionEnd!);
input.value = this.value;
input.setSelectionRange(start, start);
this.changeSubject.next(this);
},
},
{
name: 'Copy',
iconName: 'lucide:Copy',
shortcut: 'Cmd+C',
disabled: !hasSelection,
action: async () => {
const selected = this.value.substring(input.selectionStart!, input.selectionEnd!);
await navigator.clipboard.writeText(selected);
},
},
{
name: 'Paste',
iconName: 'lucide:ClipboardPaste',
shortcut: 'Cmd+V',
action: async () => {
const text = await navigator.clipboard.readText();
const start = input.selectionStart!;
const end = input.selectionEnd!;
this.value = this.value.substring(0, start) + text + this.value.substring(end);
input.value = this.value;
input.setSelectionRange(start + text.length, start + text.length);
this.changeSubject.next(this);
},
},
{ divider: true },
{
name: 'Select All',
iconName: 'lucide:TextCursorInput',
shortcut: 'Cmd+A',
action: async () => {
input.select();
},
},
];
}
public getValue(): string {
return this.value;
}

View File

@@ -170,12 +170,6 @@ export class DeesInputToggle extends DeesInputBase<DeesInputToggle> {
color: ${cssManager.bdTheme('hsl(0 0% 15%)', 'hsl(0 0% 90%)')};
}
/* Description */
.description-text {
font-size: 12px;
color: ${cssManager.bdTheme('hsl(0 0% 45.1%)', 'hsl(0 0% 63.9%)')};
line-height: 1.5;
}
`,
];
@@ -199,7 +193,7 @@ export class DeesInputToggle extends DeesInputBase<DeesInputToggle> {
</div>
<div class="label-container">
${this.label ? html`<div class="toggle-label">${this.label}</div>` : ''}
${this.description ? html`<div class="description-text">${this.description}</div>` : ''}
${this.renderDescription()}
</div>
</div>
</div>

View File

@@ -48,13 +48,14 @@ export const demoFunc = () => html`
<div class="input-group">
<dees-input-typelist
.label=${'Tags'}
.description=${'Add tags by typing and pressing Enter'}
.infoText=${'Add tags by typing and pressing Enter'}
.description=${'Tags help categorize and filter your content'}
.value=${['javascript', 'typescript', 'web-components']}
></dees-input-typelist>
<dees-input-typelist
.label=${'Team Members'}
.description=${'Add email addresses of team members'}
.infoText=${'Add email addresses of team members'}
.value=${['alice@example.com', 'bob@example.com']}
></dees-input-typelist>
</div>
@@ -64,7 +65,7 @@ export const demoFunc = () => html`
<div class="input-group">
<dees-input-typelist
.label=${'Your Skills'}
.description=${'List your professional skills'}
.infoText=${'List your professional skills'}
.value=${['HTML', 'CSS', 'JavaScript', 'Node.js', 'React']}
></dees-input-typelist>
@@ -88,14 +89,14 @@ export const demoFunc = () => html`
<div class="input-group">
<dees-input-typelist
.label=${'Project Dependencies'}
.description=${'List all required npm packages'}
.infoText=${'List all required npm packages'}
.required=${true}
.value=${['@design.estate/dees-element', '@design.estate/dees-domtools']}
></dees-input-typelist>
<dees-input-typelist
.label=${'System Tags'}
.description=${'These tags are managed by the system'}
.infoText=${'These tags are managed by the system'}
.disabled=${true}
.value=${['system', 'protected', 'readonly']}
></dees-input-typelist>
@@ -108,16 +109,16 @@ export const demoFunc = () => html`
<dees-input-text
.label=${'Summary'}
.inputType=${'textarea'}
.description=${'Brief description of the article'}
.infoText=${'Brief description of the article'}
></dees-input-text>
<dees-input-typelist
.label=${'Tags'}
.description=${'Add relevant tags for better discoverability'}
.infoText=${'Add relevant tags for better discoverability'}
.value=${['tutorial', 'web-development']}
></dees-input-typelist>
<dees-input-typelist
.label=${'Co-Authors'}
.description=${'Add email addresses of co-authors'}
.infoText=${'Add email addresses of co-authors'}
></dees-input-typelist>
</dees-form>

View File

@@ -153,7 +153,7 @@ export class DeesInputTypelist extends DeesInputBase<DeesInputTypelist> {
public render(): TemplateResult {
return html`
<div class="input-wrapper">
<dees-label .label=${this.label} .description=${this.description}></dees-label>
<dees-label .label=${this.label} .infoText=${this.infoText}></dees-label>
<div class="mainbox">
<div class="tags" @click=${() => {
this.shadowRoot!.querySelector('input')!.focus();
@@ -188,6 +188,7 @@ export class DeesInputTypelist extends DeesInputBase<DeesInputTypelist> {
.disabled=${this.disabled}
/>
</div>
${this.renderDescription()}
</div>
`;
}

View File

@@ -292,17 +292,18 @@ export class DeesInputWysiwyg extends DeesInputBase<string> {
return html`
<dees-label
.label="${this.label}"
.description="${this.description}"
.infoText="${this.infoText}"
.required="${this.required}"
></dees-label>
<div class="wysiwyg-container">
<div
<div
class="editor-content ${this.draggedBlockId ? 'dragging' : ''}"
id="editor-content"
>
<!-- Blocks will be rendered programmatically -->
</div>
</div>
${this.renderDescription()}
`;
}

View File

@@ -273,7 +273,7 @@ export class DeesInputProfilePicture extends DeesInputBase<DeesInputProfilePictu
render(): TemplateResult {
return html`
<div class="input-wrapper">
<dees-label .label=${this.label} .description=${this.description} .required=${this.required}></dees-label>
<dees-label .label=${this.label} .infoText=${this.infoText} .required=${this.required}></dees-label>
<div
class="profile-container"
@@ -329,6 +329,7 @@ export class DeesInputProfilePicture extends DeesInputBase<DeesInputProfilePictu
accept="${this.acceptedFormats.join(',')}"
@change=${this.handleFileSelect}
/>
${this.renderDescription()}
</div>
`;
}

View File

@@ -1,7 +1,128 @@
import { html, cssManager } from '@design.estate/dees-element';
import { html, css, cssManager } from '@design.estate/dees-element';
export const demoFunc = () => {
return html`
<dees-label .label=${'a label'}></dees-label>
`;
}
export const demoFunc = () => html`
<style>
${css`
.demo-container {
display: flex;
flex-direction: column;
gap: 24px;
padding: 24px;
max-width: 800px;
margin: 0 auto;
}
.demo-section {
background: ${cssManager.bdTheme('#f8f9fa', '#1a1a1a')};
border-radius: 8px;
padding: 24px;
border: 1px solid ${cssManager.bdTheme('#e0e0e0', '#333')};
}
.demo-section h3 {
margin-top: 0;
margin-bottom: 16px;
color: ${cssManager.bdTheme('#333', '#fff')};
}
.demo-section p {
color: ${cssManager.bdTheme('#666', '#999')};
margin-bottom: 16px;
font-size: 13px;
}
.label-grid {
display: flex;
flex-direction: column;
gap: 24px;
}
.label-row {
display: flex;
align-items: baseline;
gap: 16px;
}
.label-row .annotation {
font-size: 12px;
font-family: monospace;
color: ${cssManager.bdTheme('#888', '#666')};
flex-shrink: 0;
min-width: 200px;
}
`}
</style>
<div class="demo-container">
<div class="demo-section">
<h3>Basic Label</h3>
<p>A simple text label with no additional indicators.</p>
<div class="label-grid">
<div class="label-row">
<span class="annotation">label="Username"</span>
<dees-label .label=${'Username'}></dees-label>
</div>
<div class="label-row">
<span class="annotation">label="Email Address"</span>
<dees-label .label=${'Email Address'}></dees-label>
</div>
</div>
</div>
<div class="demo-section">
<h3>Required Indicator</h3>
<p>When <code>required</code> is set, a red asterisk appears after the label text.</p>
<div class="label-grid">
<div class="label-row">
<span class="annotation">required=${'{true}'}</span>
<dees-label .label=${'Full Name'} .required=${true}></dees-label>
</div>
<div class="label-row">
<span class="annotation">required=${'{false}'} (default)</span>
<dees-label .label=${'Nickname'} .required=${false}></dees-label>
</div>
</div>
</div>
<div class="demo-section">
<h3>Info Text (Info Icon)</h3>
<p>When <code>infoText</code> is set, an info icon appears next to the label. Hover over it to see the tooltip.</p>
<div class="label-grid">
<div class="label-row">
<span class="annotation">infoText="..."</span>
<dees-label .label=${'API Key'} .infoText=${'Your API key can be found in the developer settings dashboard.'}></dees-label>
</div>
<div class="label-row">
<span class="annotation">short infoText</span>
<dees-label .label=${'Region'} .infoText=${'Select your nearest datacenter.'}></dees-label>
</div>
</div>
</div>
<div class="demo-section">
<h3>Required + Info Text</h3>
<p>Both indicators can be combined. The asterisk appears first, then the info icon.</p>
<div class="label-grid">
<div class="label-row">
<span class="annotation">required + infoText</span>
<dees-label .label=${'Password'} .required=${true} .infoText=${'Must be at least 8 characters with one uppercase letter and one number.'}></dees-label>
</div>
<div class="label-row">
<span class="annotation">required + infoText</span>
<dees-label .label=${'Email Address'} .required=${true} .infoText=${'We will send a verification link to this address.'}></dees-label>
</div>
</div>
</div>
<div class="demo-section">
<h3>Empty Label</h3>
<p>When <code>label</code> is empty or not set, nothing is rendered. The element below has no label text:</p>
<div class="label-grid">
<div class="label-row">
<span class="annotation">label="" (empty)</span>
<dees-label .label=${''}></dees-label>
</div>
</div>
</div>
</div>
`;

View File

@@ -32,7 +32,7 @@ export class DeesLabel extends DeesElement {
type: String,
reflect: true,
})
accessor description!: string;
accessor infoText!: string;
@property({
type: Boolean,
@@ -50,7 +50,8 @@ export class DeesLabel extends DeesElement {
}
.label {
display: inline-block;
display: inline-flex;
align-items: center;
color: ${cssManager.bdTheme('hsl(0 0% 15%)', 'hsl(0 0% 90%)')};
font-size: 14px;
font-weight: 500;
@@ -66,13 +67,26 @@ export class DeesLabel extends DeesElement {
margin-left: 2px;
}
dees-icon {
display: inline-block;
font-size: 12px;
transform: translateY(1px);
margin-left: 4px;
.description-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
margin: -6px 0 -6px 2px;
border-radius: 4px;
cursor: default;
transition: background 0.15s ease, color 0.15s ease;
color: ${cssManager.bdTheme('hsl(0 0% 45.1%)', 'hsl(0 0% 63.9%)')};
cursor: help;
}
.description-icon:hover {
background: ${cssManager.bdTheme('hsl(0 0% 0% / 0.06)', 'hsl(0 0% 100% / 0.08)')};
color: ${cssManager.bdTheme('hsl(0 0% 25%)', 'hsl(0 0% 80%)')};
}
.description-icon dees-icon {
font-size: 14px;
}
`,
];
@@ -84,10 +98,12 @@ export class DeesLabel extends DeesElement {
<div class="label">
${this.label}
${this.required ? html`<span class="required">*</span>` : ''}
${this.description
${this.infoText
? html`
<dees-icon .icon=${'lucide:info'}></dees-icon>
<dees-speechbubble .text=${this.description}></dees-speechbubble>
<div class="description-icon">
<dees-icon .icon=${'lucide:info'}></dees-icon>
</div>
<dees-speechbubble .text=${this.infoText}></dees-speechbubble>
`
: html``}
</div>

View File

@@ -45,6 +45,9 @@ export class DeesTile extends DeesElement {
@property({ type: String })
accessor heading: string = '';
@property({ type: String, reflect: true })
accessor overscroll: 'contain' | 'auto' | 'none' = 'auto';
@state()
accessor hasFooter: boolean = false;
@@ -102,11 +105,14 @@ export class DeesTile extends DeesElement {
border-bottom: 1px solid var(--dees-color-border-subtle);
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior: contain;
scrollbar-width: thin;
scrollbar-color: var(--dees-color-scrollbar-thumb) transparent;
}
:host([overscroll="contain"]) .tile-content {
overscroll-behavior: contain;
}
.tile-content.no-footer {
border-bottom: none;
border-bottom-left-radius: 0;

View File

@@ -343,7 +343,7 @@ export class DeesModal extends DeesElement {
${minWidthStyle ? `dees-tile { min-width: ${minWidthStyle}; }` : ''}
</style>
<div class="modalContainer" @click=${this.handleOutsideClick} style="z-index: ${this.modalZIndex}">
<dees-tile class="${widthClass} ${mobileFullscreenClass}">
<dees-tile class="${widthClass} ${mobileFullscreenClass}" .overscroll=${'contain'}>
<div slot="header" class="heading">
<div class="heading-text">${this.heading}</div>
<div class="header-buttons">