fix(dees-input-list): align list input with dees-tile styling and improve item affordances
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-04-05 - 3.61.1 - fix(dees-input-list)
|
||||||
|
align list input with dees-tile styling and improve item affordances
|
||||||
|
|
||||||
|
- wrap the list in dees-tile with a dynamic item count heading and move the add-item controls into the tile footer
|
||||||
|
- replace custom container styling with shared tile and theme tokens for hover, focus, row, and disabled states
|
||||||
|
- show a bullet icon for non-sortable or disabled items when no candidate state icon is present
|
||||||
|
|
||||||
## 2026-04-05 - 3.61.0 - feat(dees-input-list)
|
## 2026-04-05 - 3.61.0 - feat(dees-input-list)
|
||||||
allow freeform entries alongside candidate suggestions in dees-input-list
|
allow freeform entries alongside candidate suggestions in dees-input-list
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '3.61.0',
|
version: '3.61.1',
|
||||||
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.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import {
|
|||||||
} from '@design.estate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
import { DeesInputBase } from '../dees-input-base/dees-input-base.js';
|
import { DeesInputBase } from '../dees-input-base/dees-input-base.js';
|
||||||
import '../../00group-utility/dees-icon/dees-icon.js';
|
import '../../00group-utility/dees-icon/dees-icon.js';
|
||||||
|
import '../../00group-layout/dees-tile/dees-tile.js';
|
||||||
import { demoFunc } from './dees-input-list.demo.js';
|
import { demoFunc } from './dees-input-list.demo.js';
|
||||||
import { themeDefaultStyles } from '../../00theme.js';
|
import { themeDefaultStyles } from '../../00theme.js';
|
||||||
|
|
||||||
@@ -119,26 +120,19 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-container {
|
dees-tile:hover::part(outer) {
|
||||||
background: ${cssManager.bdTheme('hsl(0 0% 100%)', 'hsl(0 0% 3.9%)')};
|
border-color: var(--dees-color-border-strong);
|
||||||
border: 1px solid ${cssManager.bdTheme('hsl(0 0% 89.8%)', 'hsl(0 0% 14.9%)')};
|
|
||||||
border-radius: 6px;
|
|
||||||
overflow: hidden;
|
|
||||||
transition: all 0.15s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-container:hover:not(.disabled) {
|
dees-tile:focus-within::part(outer) {
|
||||||
border-color: ${cssManager.bdTheme('hsl(0 0% 79.8%)', 'hsl(0 0% 20.9%)')};
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-container:focus-within {
|
|
||||||
border-color: ${cssManager.bdTheme('hsl(222.2 47.4% 51.2%)', 'hsl(217.2 91.2% 59.8%)')};
|
border-color: ${cssManager.bdTheme('hsl(222.2 47.4% 51.2%)', 'hsl(217.2 91.2% 59.8%)')};
|
||||||
box-shadow: 0 0 0 3px ${cssManager.bdTheme('hsl(222.2 47.4% 51.2% / 0.1)', 'hsl(217.2 91.2% 59.8% / 0.1)')};
|
box-shadow: 0 0 0 3px ${cssManager.bdTheme('hsl(222.2 47.4% 51.2% / 0.1)', 'hsl(217.2 91.2% 59.8% / 0.1)')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-container.disabled {
|
:host([disabled]) dees-tile {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-items {
|
.list-items {
|
||||||
@@ -151,8 +145,8 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
padding: 6px 10px;
|
padding: 6px 10px;
|
||||||
border-bottom: 1px solid ${cssManager.bdTheme('hsl(0 0% 89.8%)', 'hsl(0 0% 14.9%)')};
|
border-bottom: 1px solid var(--dees-color-border-subtle);
|
||||||
background: ${cssManager.bdTheme('hsl(0 0% 100%)', 'hsl(0 0% 3.9%)')};
|
background: transparent;
|
||||||
transition: transform 0.2s ease, background 0.15s ease, box-shadow 0.15s ease;
|
transition: transform 0.2s ease, background 0.15s ease, box-shadow 0.15s ease;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -163,7 +157,7 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.list-items:not(.is-dragging) .list-item:hover:not(.disabled) {
|
.list-items:not(.is-dragging) .list-item:hover:not(.disabled) {
|
||||||
background: ${cssManager.bdTheme('hsl(0 0% 97.5%)', 'hsl(0 0% 6.9%)')};
|
background: var(--dees-color-row-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dragging item - follows cursor */
|
/* Dragging item - follows cursor */
|
||||||
@@ -201,6 +195,14 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-bullet {
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
color: var(--dees-color-text-muted);
|
||||||
|
flex-shrink: 0;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
.drag-handle {
|
.drag-handle {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -303,8 +305,6 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
padding: 6px 10px;
|
padding: 6px 10px;
|
||||||
background: ${cssManager.bdTheme('hsl(0 0% 97.5%)', 'hsl(0 0% 6.9%)')};
|
|
||||||
border-top: 1px solid ${cssManager.bdTheme('hsl(0 0% 89.8%)', 'hsl(0 0% 14.9%)')};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.add-input {
|
.add-input {
|
||||||
@@ -442,7 +442,7 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
<div class="input-wrapper">
|
<div class="input-wrapper">
|
||||||
${this.label ? html`<dees-label .label=${this.label} .required=${this.required}></dees-label>` : ''}
|
${this.label ? html`<dees-label .label=${this.label} .required=${this.required}></dees-label>` : ''}
|
||||||
|
|
||||||
<div class="list-container ${this.disabled ? 'disabled' : ''}">
|
<dees-tile .heading="${this.value.length} item${this.value.length !== 1 ? 's' : ''}">
|
||||||
<div class="list-items">
|
<div class="list-items">
|
||||||
${this.value.length > 0 ? this.value.map((item, index) => html`
|
${this.value.length > 0 ? this.value.map((item, index) => html`
|
||||||
<div
|
<div
|
||||||
@@ -465,6 +465,8 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
` : html`
|
` : html`
|
||||||
<dees-icon class="candidate-unknown" .icon=${'lucide:helpCircle'}></dees-icon>
|
<dees-icon class="candidate-unknown" .icon=${'lucide:helpCircle'}></dees-icon>
|
||||||
`}
|
`}
|
||||||
|
` : !this.sortable || this.disabled ? html`
|
||||||
|
<dees-icon class="item-bullet" .icon=${'lucide:dot'}></dees-icon>
|
||||||
` : ''}
|
` : ''}
|
||||||
|
|
||||||
<div class="item-content">
|
<div class="item-content">
|
||||||
@@ -512,7 +514,7 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
${!this.disabled && (!this.maxItems || this.value.length < this.maxItems) ? html`
|
${!this.disabled && (!this.maxItems || this.value.length < this.maxItems) ? html`
|
||||||
<div class="add-item-container">
|
<div slot="footer" class="add-item-container">
|
||||||
<div class="autocomplete-wrapper">
|
<div class="autocomplete-wrapper">
|
||||||
${this.ghostText ? html`
|
${this.ghostText ? html`
|
||||||
<span class="ghost-text">
|
<span class="ghost-text">
|
||||||
@@ -538,7 +540,7 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
` : ''}
|
` : ''}
|
||||||
</div>
|
</dees-tile>
|
||||||
|
|
||||||
${this.validationText ? html`
|
${this.validationText ? html`
|
||||||
<div class="validation-message">${this.validationText}</div>
|
<div class="validation-message">${this.validationText}</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user