Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eb3d396c68 | |||
| 13ba5670f0 |
@@ -1 +0,0 @@
|
|||||||
{"sessionId":"4b0f0a7f-f187-40a3-a38b-cb9a7e877011","pid":3110692,"acquiredAt":1775914414249}
|
|
||||||
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# 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)
|
## 2026-04-12 - 3.75.0 - feat(dees-tile)
|
||||||
add configurable overscroll handling to tile content and use it in modals
|
add configurable overscroll handling to tile content and use it in modals
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@design.estate/dees-catalog",
|
"name": "@design.estate/dees-catalog",
|
||||||
"version": "3.75.0",
|
"version": "3.76.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"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.",
|
||||||
"main": "dist_ts_web/index.js",
|
"main": "dist_ts_web/index.js",
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '3.75.0',
|
version: '3.76.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.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -610,26 +610,26 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
<div class="searchGrid hidden">
|
<div class="searchGrid hidden">
|
||||||
<dees-input-text
|
<dees-input-text
|
||||||
.label=${'lucene syntax search'}
|
.label=${'lucene syntax search'}
|
||||||
.description=${`
|
.infoText=${`
|
||||||
You can use the lucene syntax to search for data, e.g.:
|
You can use the lucene syntax to search for data, e.g.:
|
||||||
|
|
||||||
\`\`\`
|
\`\`\`
|
||||||
name: "john" AND age: 18
|
name: "john" AND age: 18
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
`}
|
`}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
<dees-input-multitoggle
|
<dees-input-multitoggle
|
||||||
.label=${'search mode'}
|
.label=${'search mode'}
|
||||||
.options=${['table', 'data', 'server']}
|
.options=${['table', 'data', 'server']}
|
||||||
.selectedOption=${'table'}
|
.selectedOption=${'table'}
|
||||||
.description=${`
|
.infoText=${`
|
||||||
There are three basic modes:
|
There are three basic modes:
|
||||||
|
|
||||||
* table: only searches data already in the table
|
* table: only searches data already in the table
|
||||||
* data: searches original data, ignoring table transforms
|
* data: searches original data, ignoring table transforms
|
||||||
* server: searches data on the server
|
* server: searches data on the server
|
||||||
|
|
||||||
`}
|
`}
|
||||||
></dees-input-multitoggle>
|
></dees-input-multitoggle>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export const demoFunc = () => html`
|
|||||||
.required=${true}
|
.required=${true}
|
||||||
key="firstName"
|
key="firstName"
|
||||||
label="First Name"
|
label="First Name"
|
||||||
.description=${'Your given name'}
|
.infoText=${'Your given name'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
|
|
||||||
<dees-input-text
|
<dees-input-text
|
||||||
@@ -105,7 +105,7 @@ export const demoFunc = () => html`
|
|||||||
.required=${true}
|
.required=${true}
|
||||||
key="email"
|
key="email"
|
||||||
label="Email Address"
|
label="Email Address"
|
||||||
.description=${'We will use this to contact you'}
|
.infoText=${'We will use this to contact you'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
|
|
||||||
<dees-input-dropdown
|
<dees-input-dropdown
|
||||||
@@ -126,7 +126,7 @@ export const demoFunc = () => html`
|
|||||||
key="password"
|
key="password"
|
||||||
label="Password"
|
label="Password"
|
||||||
isPasswordBool
|
isPasswordBool
|
||||||
.description=${'Minimum 8 characters'}
|
.infoText=${'Minimum 8 characters'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
|
|
||||||
<dees-input-checkbox
|
<dees-input-checkbox
|
||||||
@@ -300,7 +300,7 @@ export const demoFunc = () => html`
|
|||||||
<dees-input-fileupload
|
<dees-input-fileupload
|
||||||
key="documents"
|
key="documents"
|
||||||
.label=${'Upload 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-input-fileupload>
|
||||||
|
|
||||||
<dees-form-submit>Submit Application</dees-form-submit>
|
<dees-form-submit>Submit Application</dees-form-submit>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
|
html,
|
||||||
css,
|
css,
|
||||||
type CSSResult,
|
type CSSResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
@@ -42,6 +43,9 @@ export abstract class DeesInputBase<T = any> extends DeesElement {
|
|||||||
@property({ type: Boolean })
|
@property({ type: Boolean })
|
||||||
accessor disabled: boolean = false;
|
accessor disabled: boolean = false;
|
||||||
|
|
||||||
|
@property({ type: String })
|
||||||
|
accessor infoText!: string;
|
||||||
|
|
||||||
@property({ type: String })
|
@property({ type: String })
|
||||||
accessor description!: string;
|
accessor description!: string;
|
||||||
|
|
||||||
@@ -90,6 +94,14 @@ export abstract class DeesInputBase<T = any> extends DeesElement {
|
|||||||
:host([label-position="none"]) dees-label {
|
:host([label-position="none"]) dees-label {
|
||||||
display: none;
|
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;
|
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
|
* Abstract method that child classes must implement to get their value
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -147,12 +147,6 @@ export class DeesInputCheckbox extends DeesInputBase<DeesInputCheckbox> {
|
|||||||
color: ${cssManager.bdTheme('hsl(0 0% 15%)', 'hsl(0 0% 90%)')};
|
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>
|
||||||
<div class="label-container">
|
<div class="label-container">
|
||||||
${this.label ? html`<div class="checkbox-label">${this.label}</div>` : ''}
|
${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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ export class DeesInputCode extends DeesInputBase<string> {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="input-wrapper">
|
<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>
|
<dees-tile>
|
||||||
<div slot="header" class="toolbar">
|
<div slot="header" class="toolbar">
|
||||||
<div class="toolbar-left">
|
<div class="toolbar-left">
|
||||||
@@ -362,6 +362,7 @@ export class DeesInputCode extends DeesInputBase<string> {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</dees-tile>
|
</dees-tile>
|
||||||
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type { DeesInputDatepicker } from './component.js';
|
|||||||
export const renderDatepicker = (component: DeesInputDatepicker): TemplateResult => {
|
export const renderDatepicker = (component: DeesInputDatepicker): TemplateResult => {
|
||||||
return html`
|
return html`
|
||||||
<div class="input-wrapper">
|
<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">
|
<div class="input-container">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@@ -27,6 +27,7 @@ export const renderDatepicker = (component: DeesInputDatepicker): TemplateResult
|
|||||||
<dees-icon class="calendar-icon" icon="lucide:calendar" iconSize="16"></dees-icon>
|
<dees-icon class="calendar-icon" icon="lucide:calendar" iconSize="16"></dees-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
${component.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ export const demoFunc = () => html`
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<dees-input-dropdown
|
<dees-input-dropdown
|
||||||
.label=${'Select Country'}
|
.label=${'Select Country'}
|
||||||
|
.description=${'Choose the country where your business is registered'}
|
||||||
.options=${[
|
.options=${[
|
||||||
{ option: 'United States', key: 'us' },
|
{ option: 'United States', key: 'us' },
|
||||||
{ option: 'Canada', key: 'ca' },
|
{ option: 'Canada', key: 'ca' },
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export class DeesInputDropdown extends DeesInputBase<DeesInputDropdown> {
|
|||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="input-wrapper">
|
<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="maincontainer">
|
||||||
<div
|
<div
|
||||||
class="selectedBox ${this.isOpened ? 'open' : ''} ${this.disabled ? 'disabled' : ''}"
|
class="selectedBox ${this.isOpened ? 'open' : ''} ${this.disabled ? 'disabled' : ''}"
|
||||||
@@ -179,6 +179,7 @@ export class DeesInputDropdown extends DeesInputBase<DeesInputDropdown> {
|
|||||||
${this.selectedOption?.option || 'Select an option'}
|
${this.selectedOption?.option || 'Select an option'}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export class DeesInputFileupload extends DeesInputBase<DeesInputFileupload> {
|
|||||||
<div class="input-wrapper">
|
<div class="input-wrapper">
|
||||||
<dees-label
|
<dees-label
|
||||||
.label=${this.label}
|
.label=${this.label}
|
||||||
.description=${this.description}
|
.infoText=${this.infoText}
|
||||||
.required=${this.required}
|
.required=${this.required}
|
||||||
></dees-label>
|
></dees-label>
|
||||||
<dees-tile
|
<dees-tile
|
||||||
@@ -114,6 +114,7 @@ export class DeesInputFileupload extends DeesInputBase<DeesInputFileupload> {
|
|||||||
${this.validationMessage
|
${this.validationMessage
|
||||||
? html`<div class="validation-message" aria-live="polite">${this.validationMessage}</div>`
|
? html`<div class="validation-message" aria-live="polite">${this.validationMessage}</div>`
|
||||||
: html``}
|
: html``}
|
||||||
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,14 +59,15 @@ export const demoFunc = () => html`
|
|||||||
<div class="demo-stack">
|
<div class="demo-stack">
|
||||||
<dees-input-fileupload
|
<dees-input-fileupload
|
||||||
.label=${'Attachments'}
|
.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'}
|
.accept=${'image/*,.pdf,.zip'}
|
||||||
.maxSize=${10 * 1024 * 1024}
|
.maxSize=${10 * 1024 * 1024}
|
||||||
></dees-input-fileupload>
|
></dees-input-fileupload>
|
||||||
|
|
||||||
<dees-input-fileupload
|
<dees-input-fileupload
|
||||||
.label=${'Brand assets'}
|
.label=${'Brand assets'}
|
||||||
.description=${'Upload high-resolution imagery (JPG/PNG)'}
|
.infoText=${'Upload high-resolution imagery (JPG/PNG)'}
|
||||||
.accept=${'image/jpeg,image/png'}
|
.accept=${'image/jpeg,image/png'}
|
||||||
.multiple=${false}
|
.multiple=${false}
|
||||||
.maxSize=${5 * 1024 * 1024}
|
.maxSize=${5 * 1024 * 1024}
|
||||||
@@ -77,14 +78,14 @@ export const demoFunc = () => html`
|
|||||||
<div class="demo-stack">
|
<div class="demo-stack">
|
||||||
<dees-input-fileupload
|
<dees-input-fileupload
|
||||||
.label=${'Audio uploads'}
|
.label=${'Audio uploads'}
|
||||||
.description=${'Share podcast drafts (MP3/WAV, max 25MB each)'}
|
.infoText=${'Share podcast drafts (MP3/WAV, max 25MB each)'}
|
||||||
.accept=${'audio/*'}
|
.accept=${'audio/*'}
|
||||||
.maxSize=${25 * 1024 * 1024}
|
.maxSize=${25 * 1024 * 1024}
|
||||||
></dees-input-fileupload>
|
></dees-input-fileupload>
|
||||||
|
|
||||||
<dees-input-fileupload
|
<dees-input-fileupload
|
||||||
.label=${'Disabled example'}
|
.label=${'Disabled example'}
|
||||||
.description=${'Uploader is disabled while moderation is pending'}
|
.infoText=${'Uploader is disabled while moderation is pending'}
|
||||||
.disabled=${true}
|
.disabled=${true}
|
||||||
></dees-input-fileupload>
|
></dees-input-fileupload>
|
||||||
</div>
|
</div>
|
||||||
@@ -100,7 +101,7 @@ export const demoFunc = () => html`
|
|||||||
<div class="demo-stack">
|
<div class="demo-stack">
|
||||||
<dees-input-text
|
<dees-input-text
|
||||||
.label=${'Project name'}
|
.label=${'Project name'}
|
||||||
.description=${'How should we refer to this project internally?'}
|
.infoText=${'How should we refer to this project internally?'}
|
||||||
.required=${true}
|
.required=${true}
|
||||||
.key=${'projectName'}
|
.key=${'projectName'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
@@ -114,7 +115,7 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<dees-input-fileupload
|
<dees-input-fileupload
|
||||||
.label=${'Statement of work'}
|
.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}
|
.required=${true}
|
||||||
.accept=${'application/pdf'}
|
.accept=${'application/pdf'}
|
||||||
.maxSize=${15 * 1024 * 1024}
|
.maxSize=${15 * 1024 * 1024}
|
||||||
@@ -124,7 +125,7 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<dees-input-fileupload
|
<dees-input-fileupload
|
||||||
.label=${'Creative references'}
|
.label=${'Creative references'}
|
||||||
.description=${'Optional. Upload up to five visual references'}
|
.infoText=${'Optional. Upload up to five visual references'}
|
||||||
.accept=${'image/*'}
|
.accept=${'image/*'}
|
||||||
.maxFiles=${5}
|
.maxFiles=${5}
|
||||||
.maxSize=${8 * 1024 * 1024}
|
.maxSize=${8 * 1024 * 1024}
|
||||||
@@ -133,7 +134,7 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<dees-input-text
|
<dees-input-text
|
||||||
.label=${'Notes'}
|
.label=${'Notes'}
|
||||||
.description=${'Add optional context for reviewers'}
|
.infoText=${'Add optional context for reviewers'}
|
||||||
.inputType=${'textarea'}
|
.inputType=${'textarea'}
|
||||||
.key=${'notes'}
|
.key=${'notes'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
|
|||||||
@@ -33,12 +33,13 @@ export const demoFunc = () => html`
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<dees-input-iban
|
<dees-input-iban
|
||||||
.label=${'Bank Account 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>
|
||||||
|
|
||||||
<dees-input-iban
|
<dees-input-iban
|
||||||
.label=${'Verified IBAN'}
|
.label=${'Verified IBAN'}
|
||||||
.description=${'This IBAN has been verified'}
|
.infoText=${'This IBAN has been verified'}
|
||||||
.value=${'DE89370400440532013000'}
|
.value=${'DE89370400440532013000'}
|
||||||
></dees-input-iban>
|
></dees-input-iban>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,13 +65,13 @@ export const demoFunc = () => html`
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<dees-input-iban
|
<dees-input-iban
|
||||||
.label=${'Payment Account'}
|
.label=${'Payment Account'}
|
||||||
.description=${'Required for processing payments'}
|
.infoText=${'Required for processing payments'}
|
||||||
.required=${true}
|
.required=${true}
|
||||||
></dees-input-iban>
|
></dees-input-iban>
|
||||||
|
|
||||||
<dees-input-iban
|
<dees-input-iban
|
||||||
.label=${'Locked IBAN'}
|
.label=${'Locked IBAN'}
|
||||||
.description=${'This IBAN cannot be changed'}
|
.infoText=${'This IBAN cannot be changed'}
|
||||||
.value=${'FR1420041010050500013M02606'}
|
.value=${'FR1420041010050500013M02606'}
|
||||||
.disabled=${true}
|
.disabled=${true}
|
||||||
></dees-input-iban>
|
></dees-input-iban>
|
||||||
@@ -81,7 +82,7 @@ export const demoFunc = () => html`
|
|||||||
<dees-form>
|
<dees-form>
|
||||||
<dees-input-text .label=${'Recipient Name'} .required=${true}></dees-input-text>
|
<dees-input-text .label=${'Recipient Name'} .required=${true}></dees-input-text>
|
||||||
<dees-input-iban .label=${'Recipient IBAN'} .required=${true}></dees-input-iban>
|
<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-input-text .label=${'Amount'} .inputType=${'number'} .required=${true}></dees-input-text>
|
||||||
</dees-form>
|
</dees-form>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export class DeesInputIban extends DeesInputBase<DeesInputIban> {
|
|||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="input-wrapper">
|
<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
|
<dees-input-text
|
||||||
.value=${this.value}
|
.value=${this.value}
|
||||||
.disabled=${this.disabled}
|
.disabled=${this.disabled}
|
||||||
@@ -64,6 +64,7 @@ export class DeesInputIban extends DeesInputBase<DeesInputIban> {
|
|||||||
this.validateIban(eventArg);
|
this.validateIban(eventArg);
|
||||||
}}
|
}}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -373,13 +373,6 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
line-height: 1.4;
|
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 */
|
/* Scrollbar styling */
|
||||||
.list-items::-webkit-scrollbar {
|
.list-items::-webkit-scrollbar {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
@@ -546,9 +539,7 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
<div class="validation-message">${this.validationText}</div>
|
<div class="validation-message">${this.validationText}</div>
|
||||||
` : ''}
|
` : ''}
|
||||||
|
|
||||||
${this.description ? html`
|
${this.renderDescription()}
|
||||||
<div class="description">${this.description}</div>
|
|
||||||
` : ''}
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<dees-input-multitoggle
|
<dees-input-multitoggle
|
||||||
.label=${'Display Mode'}
|
.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']}
|
.options=${['List View', 'Grid View', 'Compact']}
|
||||||
.selectedOption=${'Grid View'}
|
.selectedOption=${'Grid View'}
|
||||||
></dees-input-multitoggle>
|
></dees-input-multitoggle>
|
||||||
@@ -64,7 +65,7 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<dees-input-multitoggle
|
<dees-input-multitoggle
|
||||||
.label=${'T-Shirt Size'}
|
.label=${'T-Shirt Size'}
|
||||||
.description=${'Select your preferred size'}
|
.infoText=${'Select your preferred size'}
|
||||||
.options=${['XS', 'S', 'M', 'L', 'XL', 'XXL']}
|
.options=${['XS', 'S', 'M', 'L', 'XL', 'XXL']}
|
||||||
.selectedOption=${'M'}
|
.selectedOption=${'M'}
|
||||||
></dees-input-multitoggle>
|
></dees-input-multitoggle>
|
||||||
@@ -76,7 +77,7 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<dees-input-multitoggle
|
<dees-input-multitoggle
|
||||||
.label=${'Notifications'}
|
.label=${'Notifications'}
|
||||||
.description=${'Enable or disable push notifications'}
|
.infoText=${'Enable or disable push notifications'}
|
||||||
.type=${'boolean'}
|
.type=${'boolean'}
|
||||||
.selectedOption=${'true'}
|
.selectedOption=${'true'}
|
||||||
></dees-input-multitoggle>
|
></dees-input-multitoggle>
|
||||||
@@ -85,7 +86,7 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<dees-input-multitoggle
|
<dees-input-multitoggle
|
||||||
.label=${'Theme Mode'}
|
.label=${'Theme Mode'}
|
||||||
.description=${'Switch between light and dark theme'}
|
.infoText=${'Switch between light and dark theme'}
|
||||||
.type=${'boolean'}
|
.type=${'boolean'}
|
||||||
.booleanTrueName=${'Dark'}
|
.booleanTrueName=${'Dark'}
|
||||||
.booleanFalseName=${'Light'}
|
.booleanFalseName=${'Light'}
|
||||||
@@ -134,7 +135,7 @@ export const demoFunc = () => html`
|
|||||||
|
|
||||||
<dees-input-multitoggle
|
<dees-input-multitoggle
|
||||||
.label=${'Account Type'}
|
.label=${'Account Type'}
|
||||||
.description=${'This setting is locked'}
|
.infoText=${'This setting is locked'}
|
||||||
.options=${['Free', 'Pro', 'Enterprise']}
|
.options=${['Free', 'Pro', 'Enterprise']}
|
||||||
.selectedOption=${'Enterprise'}
|
.selectedOption=${'Enterprise'}
|
||||||
.disabled=${true}
|
.disabled=${true}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ export class DeesInputMultitoggle extends DeesInputBase<DeesInputMultitoggle> {
|
|||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="input-wrapper">
|
<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="mainbox">
|
||||||
<div class="selections">
|
<div class="selections">
|
||||||
<div class="indicator"></div>
|
<div class="indicator"></div>
|
||||||
@@ -158,6 +158,7 @@ export class DeesInputMultitoggle extends DeesInputBase<DeesInputMultitoggle> {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,13 +33,14 @@ export const demoFunc = () => html`
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<dees-input-phone
|
<dees-input-phone
|
||||||
.label=${'Phone Number'}
|
.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'}
|
.value=${'5551234567'}
|
||||||
></dees-input-phone>
|
></dees-input-phone>
|
||||||
|
|
||||||
<dees-input-phone
|
<dees-input-phone
|
||||||
.label=${'Contact Phone'}
|
.label=${'Contact Phone'}
|
||||||
.description=${'Required for account verification'}
|
.infoText=${'Required for account verification'}
|
||||||
.required=${true}
|
.required=${true}
|
||||||
.placeholder=${'+1 (555) 000-0000'}
|
.placeholder=${'+1 (555) 000-0000'}
|
||||||
></dees-input-phone>
|
></dees-input-phone>
|
||||||
@@ -66,7 +67,7 @@ export const demoFunc = () => html`
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<dees-input-phone
|
<dees-input-phone
|
||||||
.label=${'International Contact'}
|
.label=${'International Contact'}
|
||||||
.description=${'Automatically formats international numbers'}
|
.infoText=${'Automatically formats international numbers'}
|
||||||
.value=${'441234567890'}
|
.value=${'441234567890'}
|
||||||
></dees-input-phone>
|
></dees-input-phone>
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export class DeesInputPhone extends DeesInputBase<DeesInputPhone> {
|
|||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="input-wrapper">
|
<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
|
<dees-input-text
|
||||||
.value=${this.formattedPhone}
|
.value=${this.formattedPhone}
|
||||||
.disabled=${this.disabled}
|
.disabled=${this.disabled}
|
||||||
@@ -55,6 +55,7 @@ export class DeesInputPhone extends DeesInputBase<DeesInputPhone> {
|
|||||||
.placeholder=${this.placeholder}
|
.placeholder=${this.placeholder}
|
||||||
@input=${(event: InputEvent) => this.handlePhoneInput(event)}
|
@input=${(event: InputEvent) => this.handlePhoneInput(event)}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,13 +69,14 @@ export const demoFunc = () => html`
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<dees-input-quantityselector
|
<dees-input-quantityselector
|
||||||
.label=${'Quantity'}
|
.label=${'Quantity'}
|
||||||
.description=${'Select the desired quantity'}
|
.infoText=${'Select the desired quantity'}
|
||||||
|
.description=${'Minimum order quantity is 1 item'}
|
||||||
.value=${1}
|
.value=${1}
|
||||||
></dees-input-quantityselector>
|
></dees-input-quantityselector>
|
||||||
|
|
||||||
<dees-input-quantityselector
|
<dees-input-quantityselector
|
||||||
.label=${'Items in Cart'}
|
.label=${'Items in Cart'}
|
||||||
.description=${'Adjust the quantity of items'}
|
.infoText=${'Adjust the quantity of items'}
|
||||||
.value=${3}
|
.value=${3}
|
||||||
></dees-input-quantityselector>
|
></dees-input-quantityselector>
|
||||||
</div>
|
</div>
|
||||||
@@ -180,14 +181,14 @@ export const demoFunc = () => html`
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<dees-input-quantityselector
|
<dees-input-quantityselector
|
||||||
.label=${'Number of Licenses'}
|
.label=${'Number of Licenses'}
|
||||||
.description=${'Select how many licenses you need'}
|
.infoText=${'Select how many licenses you need'}
|
||||||
.required=${true}
|
.required=${true}
|
||||||
.value=${1}
|
.value=${1}
|
||||||
></dees-input-quantityselector>
|
></dees-input-quantityselector>
|
||||||
|
|
||||||
<dees-input-quantityselector
|
<dees-input-quantityselector
|
||||||
.label=${'Fixed Quantity'}
|
.label=${'Fixed Quantity'}
|
||||||
.description=${'This quantity cannot be changed'}
|
.infoText=${'This quantity cannot be changed'}
|
||||||
.disabled=${true}
|
.disabled=${true}
|
||||||
.value=${5}
|
.value=${5}
|
||||||
></dees-input-quantityselector>
|
></dees-input-quantityselector>
|
||||||
@@ -204,7 +205,7 @@ export const demoFunc = () => html`
|
|||||||
></dees-input-dropdown>
|
></dees-input-dropdown>
|
||||||
<dees-input-quantityselector
|
<dees-input-quantityselector
|
||||||
.label=${'Quantity'}
|
.label=${'Quantity'}
|
||||||
.description=${'Number of licenses'}
|
.infoText=${'Number of licenses'}
|
||||||
.value=${1}
|
.value=${1}
|
||||||
></dees-input-quantityselector>
|
></dees-input-quantityselector>
|
||||||
<dees-input-text
|
<dees-input-text
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ export class DeesInputQuantitySelector extends DeesInputBase<DeesInputQuantitySe
|
|||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="input-wrapper">
|
<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
|
<div
|
||||||
class="quantity-container ${this.disabled ? 'disabled' : ''}"
|
class="quantity-container ${this.disabled ? 'disabled' : ''}"
|
||||||
data-min="${this.value <= 0}"
|
data-min="${this.value <= 0}"
|
||||||
@@ -162,6 +162,7 @@ export class DeesInputQuantitySelector extends DeesInputBase<DeesInputQuantitySe
|
|||||||
aria-label="Increase quantity"
|
aria-label="Increase quantity"
|
||||||
>+</div>
|
>+</div>
|
||||||
</div>
|
</div>
|
||||||
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,14 +189,6 @@ export class DeesInputRadiogroup extends DeesInputBase<string | object> {
|
|||||||
line-height: 20px;
|
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 */
|
/* Validation styles */
|
||||||
:host([validationState="invalid"]) .radio-circle {
|
:host([validationState="invalid"]) .radio-circle {
|
||||||
border-color: ${cssManager.bdTheme('hsl(0 72.2% 50.6%)', 'hsl(0 62.8% 30.6%)')};
|
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>
|
</div>
|
||||||
${this.description ? html`<div class="description-text">${this.description}</div>` : ''}
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -278,13 +278,6 @@ export const richtextStyles = [
|
|||||||
border-color: ${cssManager.bdTheme('hsl(0 0% 15%)', 'hsl(0 0% 93.9%)')};
|
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 {
|
:host([disabled]) dees-tile {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export const renderRichtext = (component: DeesInputRichtext): TemplateResult =>
|
|||||||
`
|
`
|
||||||
: ''}
|
: ''}
|
||||||
</dees-tile>
|
</dees-tile>
|
||||||
${component.description ? html`<div class="description">${component.description}</div>` : ''}
|
${component.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
@@ -210,14 +210,6 @@ export class DeesInputTags extends DeesInputBase<DeesInputTags> {
|
|||||||
line-height: 1.5;
|
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 */
|
/* Scrollbar styling */
|
||||||
.suggestions-dropdown::-webkit-scrollbar {
|
.suggestions-dropdown::-webkit-scrollbar {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
@@ -302,9 +294,7 @@ export class DeesInputTags extends DeesInputBase<DeesInputTags> {
|
|||||||
<div class="validation-message">${this.validationText}</div>
|
<div class="validation-message">${this.validationText}</div>
|
||||||
` : ''}
|
` : ''}
|
||||||
|
|
||||||
${this.description ? html`
|
${this.renderDescription()}
|
||||||
<div class="description">${this.description}</div>
|
|
||||||
` : ''}
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,12 +94,13 @@ export const demoFunc = () => html`
|
|||||||
.label=${'Username'}
|
.label=${'Username'}
|
||||||
.value=${'johndoe'}
|
.value=${'johndoe'}
|
||||||
.key=${'username'}
|
.key=${'username'}
|
||||||
|
.description=${'Your username will be visible to other users'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
|
|
||||||
<dees-input-text
|
<dees-input-text
|
||||||
.label=${'Email Address'}
|
.label=${'Email Address'}
|
||||||
.value=${'john@example.com'}
|
.value=${'john@example.com'}
|
||||||
.description=${'We will never share your email with anyone'}
|
.infoText=${'We will never share your email with anyone'}
|
||||||
.key=${'email'}
|
.key=${'email'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
|
|
||||||
@@ -270,14 +271,14 @@ export const demoFunc = () => html`
|
|||||||
.label=${'Password with Toggle'}
|
.label=${'Password with Toggle'}
|
||||||
.isPasswordBool=${true}
|
.isPasswordBool=${true}
|
||||||
.value=${'mySecurePassword123'}
|
.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>
|
||||||
|
|
||||||
<dees-input-text
|
<dees-input-text
|
||||||
.label=${'API Key'}
|
.label=${'API Key'}
|
||||||
.isPasswordBool=${true}
|
.isPasswordBool=${true}
|
||||||
.value=${'sk-1234567890abcdef'}
|
.value=${'sk-1234567890abcdef'}
|
||||||
.description=${'Keep this key secure and never share it'}
|
.infoText=${'Keep this key secure and never share it'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
</div>
|
</div>
|
||||||
</dees-panel>
|
</dees-panel>
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ export class DeesInputText extends DeesInputBase {
|
|||||||
`}
|
`}
|
||||||
</style>
|
</style>
|
||||||
<div class="input-wrapper">
|
<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="maincontainer">
|
||||||
<input
|
<input
|
||||||
type="${this.isPasswordBool && !this.showPasswordBool ? 'password' : 'text'}"
|
type="${this.isPasswordBool && !this.showPasswordBool ? 'password' : 'text'}"
|
||||||
@@ -315,6 +315,7 @@ export class DeesInputText extends DeesInputBase {
|
|||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
: html`<div class="validationContainer"></div>`}
|
: html`<div class="validationContainer"></div>`}
|
||||||
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -170,12 +170,6 @@ export class DeesInputToggle extends DeesInputBase<DeesInputToggle> {
|
|||||||
color: ${cssManager.bdTheme('hsl(0 0% 15%)', 'hsl(0 0% 90%)')};
|
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>
|
||||||
<div class="label-container">
|
<div class="label-container">
|
||||||
${this.label ? html`<div class="toggle-label">${this.label}</div>` : ''}
|
${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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -48,13 +48,14 @@ export const demoFunc = () => html`
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<dees-input-typelist
|
<dees-input-typelist
|
||||||
.label=${'Tags'}
|
.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']}
|
.value=${['javascript', 'typescript', 'web-components']}
|
||||||
></dees-input-typelist>
|
></dees-input-typelist>
|
||||||
|
|
||||||
<dees-input-typelist
|
<dees-input-typelist
|
||||||
.label=${'Team Members'}
|
.label=${'Team Members'}
|
||||||
.description=${'Add email addresses of team members'}
|
.infoText=${'Add email addresses of team members'}
|
||||||
.value=${['alice@example.com', 'bob@example.com']}
|
.value=${['alice@example.com', 'bob@example.com']}
|
||||||
></dees-input-typelist>
|
></dees-input-typelist>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,7 +65,7 @@ export const demoFunc = () => html`
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<dees-input-typelist
|
<dees-input-typelist
|
||||||
.label=${'Your Skills'}
|
.label=${'Your Skills'}
|
||||||
.description=${'List your professional skills'}
|
.infoText=${'List your professional skills'}
|
||||||
.value=${['HTML', 'CSS', 'JavaScript', 'Node.js', 'React']}
|
.value=${['HTML', 'CSS', 'JavaScript', 'Node.js', 'React']}
|
||||||
></dees-input-typelist>
|
></dees-input-typelist>
|
||||||
|
|
||||||
@@ -88,14 +89,14 @@ export const demoFunc = () => html`
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<dees-input-typelist
|
<dees-input-typelist
|
||||||
.label=${'Project Dependencies'}
|
.label=${'Project Dependencies'}
|
||||||
.description=${'List all required npm packages'}
|
.infoText=${'List all required npm packages'}
|
||||||
.required=${true}
|
.required=${true}
|
||||||
.value=${['@design.estate/dees-element', '@design.estate/dees-domtools']}
|
.value=${['@design.estate/dees-element', '@design.estate/dees-domtools']}
|
||||||
></dees-input-typelist>
|
></dees-input-typelist>
|
||||||
|
|
||||||
<dees-input-typelist
|
<dees-input-typelist
|
||||||
.label=${'System Tags'}
|
.label=${'System Tags'}
|
||||||
.description=${'These tags are managed by the system'}
|
.infoText=${'These tags are managed by the system'}
|
||||||
.disabled=${true}
|
.disabled=${true}
|
||||||
.value=${['system', 'protected', 'readonly']}
|
.value=${['system', 'protected', 'readonly']}
|
||||||
></dees-input-typelist>
|
></dees-input-typelist>
|
||||||
@@ -108,16 +109,16 @@ export const demoFunc = () => html`
|
|||||||
<dees-input-text
|
<dees-input-text
|
||||||
.label=${'Summary'}
|
.label=${'Summary'}
|
||||||
.inputType=${'textarea'}
|
.inputType=${'textarea'}
|
||||||
.description=${'Brief description of the article'}
|
.infoText=${'Brief description of the article'}
|
||||||
></dees-input-text>
|
></dees-input-text>
|
||||||
<dees-input-typelist
|
<dees-input-typelist
|
||||||
.label=${'Tags'}
|
.label=${'Tags'}
|
||||||
.description=${'Add relevant tags for better discoverability'}
|
.infoText=${'Add relevant tags for better discoverability'}
|
||||||
.value=${['tutorial', 'web-development']}
|
.value=${['tutorial', 'web-development']}
|
||||||
></dees-input-typelist>
|
></dees-input-typelist>
|
||||||
<dees-input-typelist
|
<dees-input-typelist
|
||||||
.label=${'Co-Authors'}
|
.label=${'Co-Authors'}
|
||||||
.description=${'Add email addresses of co-authors'}
|
.infoText=${'Add email addresses of co-authors'}
|
||||||
></dees-input-typelist>
|
></dees-input-typelist>
|
||||||
</dees-form>
|
</dees-form>
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ export class DeesInputTypelist extends DeesInputBase<DeesInputTypelist> {
|
|||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="input-wrapper">
|
<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="mainbox">
|
||||||
<div class="tags" @click=${() => {
|
<div class="tags" @click=${() => {
|
||||||
this.shadowRoot!.querySelector('input')!.focus();
|
this.shadowRoot!.querySelector('input')!.focus();
|
||||||
@@ -188,6 +188,7 @@ export class DeesInputTypelist extends DeesInputBase<DeesInputTypelist> {
|
|||||||
.disabled=${this.disabled}
|
.disabled=${this.disabled}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -292,17 +292,18 @@ export class DeesInputWysiwyg extends DeesInputBase<string> {
|
|||||||
return html`
|
return html`
|
||||||
<dees-label
|
<dees-label
|
||||||
.label="${this.label}"
|
.label="${this.label}"
|
||||||
.description="${this.description}"
|
.infoText="${this.infoText}"
|
||||||
.required="${this.required}"
|
.required="${this.required}"
|
||||||
></dees-label>
|
></dees-label>
|
||||||
<div class="wysiwyg-container">
|
<div class="wysiwyg-container">
|
||||||
<div
|
<div
|
||||||
class="editor-content ${this.draggedBlockId ? 'dragging' : ''}"
|
class="editor-content ${this.draggedBlockId ? 'dragging' : ''}"
|
||||||
id="editor-content"
|
id="editor-content"
|
||||||
>
|
>
|
||||||
<!-- Blocks will be rendered programmatically -->
|
<!-- Blocks will be rendered programmatically -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
${this.renderDescription()}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ export class DeesInputProfilePicture extends DeesInputBase<DeesInputProfilePictu
|
|||||||
render(): TemplateResult {
|
render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<div class="input-wrapper">
|
<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
|
<div
|
||||||
class="profile-container"
|
class="profile-container"
|
||||||
@@ -329,6 +329,7 @@ export class DeesInputProfilePicture extends DeesInputBase<DeesInputProfilePictu
|
|||||||
accept="${this.acceptedFormats.join(',')}"
|
accept="${this.acceptedFormats.join(',')}"
|
||||||
@change=${this.handleFileSelect}
|
@change=${this.handleFileSelect}
|
||||||
/>
|
/>
|
||||||
|
${this.renderDescription()}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,31 +85,31 @@ export const demoFunc = () => html`
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="demo-section">
|
<div class="demo-section">
|
||||||
<h3>Description (Info Icon)</h3>
|
<h3>Info Text (Info Icon)</h3>
|
||||||
<p>When <code>description</code> is set, an info icon appears next to the label. Hover over it to see the tooltip.</p>
|
<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-grid">
|
||||||
<div class="label-row">
|
<div class="label-row">
|
||||||
<span class="annotation">description="..."</span>
|
<span class="annotation">infoText="..."</span>
|
||||||
<dees-label .label=${'API Key'} .description=${'Your API key can be found in the developer settings dashboard.'}></dees-label>
|
<dees-label .label=${'API Key'} .infoText=${'Your API key can be found in the developer settings dashboard.'}></dees-label>
|
||||||
</div>
|
</div>
|
||||||
<div class="label-row">
|
<div class="label-row">
|
||||||
<span class="annotation">short description</span>
|
<span class="annotation">short infoText</span>
|
||||||
<dees-label .label=${'Region'} .description=${'Select your nearest datacenter.'}></dees-label>
|
<dees-label .label=${'Region'} .infoText=${'Select your nearest datacenter.'}></dees-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="demo-section">
|
<div class="demo-section">
|
||||||
<h3>Required + Description</h3>
|
<h3>Required + Info Text</h3>
|
||||||
<p>Both indicators can be combined. The asterisk appears first, then the info icon.</p>
|
<p>Both indicators can be combined. The asterisk appears first, then the info icon.</p>
|
||||||
<div class="label-grid">
|
<div class="label-grid">
|
||||||
<div class="label-row">
|
<div class="label-row">
|
||||||
<span class="annotation">required + description</span>
|
<span class="annotation">required + infoText</span>
|
||||||
<dees-label .label=${'Password'} .required=${true} .description=${'Must be at least 8 characters with one uppercase letter and one number.'}></dees-label>
|
<dees-label .label=${'Password'} .required=${true} .infoText=${'Must be at least 8 characters with one uppercase letter and one number.'}></dees-label>
|
||||||
</div>
|
</div>
|
||||||
<div class="label-row">
|
<div class="label-row">
|
||||||
<span class="annotation">required + description</span>
|
<span class="annotation">required + infoText</span>
|
||||||
<dees-label .label=${'Email Address'} .required=${true} .description=${'We will send a verification link to this address.'}></dees-label>
|
<dees-label .label=${'Email Address'} .required=${true} .infoText=${'We will send a verification link to this address.'}></dees-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export class DeesLabel extends DeesElement {
|
|||||||
type: String,
|
type: String,
|
||||||
reflect: true,
|
reflect: true,
|
||||||
})
|
})
|
||||||
accessor description!: string;
|
accessor infoText!: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -98,12 +98,12 @@ export class DeesLabel extends DeesElement {
|
|||||||
<div class="label">
|
<div class="label">
|
||||||
${this.label}
|
${this.label}
|
||||||
${this.required ? html`<span class="required">*</span>` : ''}
|
${this.required ? html`<span class="required">*</span>` : ''}
|
||||||
${this.description
|
${this.infoText
|
||||||
? html`
|
? html`
|
||||||
<div class="description-icon">
|
<div class="description-icon">
|
||||||
<dees-icon .icon=${'lucide:info'}></dees-icon>
|
<dees-icon .icon=${'lucide:info'}></dees-icon>
|
||||||
</div>
|
</div>
|
||||||
<dees-speechbubble .text=${this.description}></dees-speechbubble>
|
<dees-speechbubble .text=${this.infoText}></dees-speechbubble>
|
||||||
`
|
`
|
||||||
: html``}
|
: html``}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user