@design.estate/dees-wcctools 3.5.2 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-wcctools",
3
- "version": "3.5.2",
3
+ "version": "3.6.0",
4
4
  "private": false,
5
5
  "description": "A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.",
6
6
  "exports": {
@@ -17,17 +17,17 @@
17
17
  "author": "Lossless GmbH",
18
18
  "license": "UNLICENSED",
19
19
  "dependencies": {
20
- "@design.estate/dees-domtools": "^2.3.6",
21
- "@design.estate/dees-element": "^2.1.3",
20
+ "@design.estate/dees-domtools": "^2.3.7",
21
+ "@design.estate/dees-element": "^2.1.5",
22
22
  "@push.rocks/smartdelay": "^3.0.5",
23
- "lit": "^3.3.1"
23
+ "lit": "^3.3.2"
24
24
  },
25
25
  "devDependencies": {
26
- "@api.global/typedserver": "^7.11.1",
26
+ "@api.global/typedserver": "^8.1.0",
27
27
  "@git.zone/tsbuild": "^4.0.2",
28
28
  "@git.zone/tsbundle": "^2.6.3",
29
29
  "@git.zone/tsrun": "^2.0.1",
30
- "@git.zone/tstest": "^3.1.3",
30
+ "@git.zone/tstest": "^3.1.4",
31
31
  "@git.zone/tswatch": "^2.3.13",
32
32
  "@push.rocks/projectinfo": "^5.0.2",
33
33
  "@types/node": "^25.0.3"
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-wcctools',
6
- version: '3.5.2',
6
+ version: '3.6.0',
7
7
  description: 'A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.'
8
8
  }
@@ -71,7 +71,8 @@ export class WccSidebar extends DeesElement {
71
71
  --ring: #3b82f6;
72
72
  --radius: 4px;
73
73
 
74
- display: ${this.isHidden ? 'none' : 'block'};
74
+ display: ${this.isHidden ? 'none' : 'flex'};
75
+ flex-direction: column;
75
76
  border-right: 1px solid rgba(255, 255, 255, 0.08);
76
77
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
77
78
  font-size: 14px;
@@ -81,13 +82,20 @@ export class WccSidebar extends DeesElement {
81
82
  width: ${this.sidebarWidth}px;
82
83
  top: 0px;
83
84
  bottom: 0px;
84
- overflow-y: auto;
85
- overflow-x: hidden;
85
+ overflow: hidden;
86
86
  background: var(--background);
87
87
  color: var(--foreground);
88
88
  }
89
89
 
90
+ .sidebar-header {
91
+ flex-shrink: 0;
92
+ }
93
+
90
94
  .menu {
95
+ flex: 1;
96
+ min-height: 0;
97
+ overflow-y: auto;
98
+ overflow-x: hidden;
91
99
  padding: 0.5rem 0;
92
100
  }
93
101
 
@@ -281,6 +289,7 @@ export class WccSidebar extends DeesElement {
281
289
  .search-container {
282
290
  padding: 0.5rem;
283
291
  border-bottom: 1px solid var(--border);
292
+ position: relative;
284
293
  }
285
294
 
286
295
  .search-input {
@@ -289,7 +298,7 @@ export class WccSidebar extends DeesElement {
289
298
  background: var(--input);
290
299
  border: 1px solid var(--border);
291
300
  border-radius: var(--radius);
292
- padding: 0.5rem 0.75rem;
301
+ padding: 0.5rem 1.75rem 0.5rem 0.75rem;
293
302
  color: var(--foreground);
294
303
  font-size: 0.75rem;
295
304
  font-family: inherit;
@@ -305,6 +314,33 @@ export class WccSidebar extends DeesElement {
305
314
  color: var(--muted-foreground);
306
315
  }
307
316
 
317
+ .search-clear {
318
+ position: absolute;
319
+ right: 0.75rem;
320
+ top: 50%;
321
+ transform: translateY(-50%);
322
+ background: none;
323
+ border: none;
324
+ padding: 0.25rem;
325
+ cursor: pointer;
326
+ color: var(--muted-foreground);
327
+ display: flex;
328
+ align-items: center;
329
+ justify-content: center;
330
+ border-radius: 2px;
331
+ transition: color 0.15s ease, background 0.15s ease;
332
+ }
333
+
334
+ .search-clear:hover {
335
+ color: var(--foreground);
336
+ background: rgba(255, 255, 255, 0.1);
337
+ }
338
+
339
+ .search-clear .material-symbols-outlined {
340
+ font-size: 14px;
341
+ opacity: 1;
342
+ }
343
+
308
344
  .highlight {
309
345
  background: rgba(59, 130, 246, 0.3);
310
346
  border-radius: 2px;
@@ -394,17 +430,24 @@ export class WccSidebar extends DeesElement {
394
430
  background: var(--primary);
395
431
  }
396
432
  </style>
397
- <div class="search-container">
398
- <input
399
- type="text"
400
- class="search-input"
401
- placeholder="Search..."
402
- .value=${this.searchQuery}
403
- @input=${this.handleSearchInput}
404
- />
433
+ <div class="sidebar-header">
434
+ <div class="search-container">
435
+ <input
436
+ type="text"
437
+ class="search-input"
438
+ placeholder="Search..."
439
+ .value=${this.searchQuery}
440
+ @input=${this.handleSearchInput}
441
+ />
442
+ ${this.searchQuery ? html`
443
+ <button class="search-clear" @click=${this.clearSearch}>
444
+ <i class="material-symbols-outlined">close</i>
445
+ </button>
446
+ ` : null}
447
+ </div>
448
+ ${this.renderPinnedSection()}
405
449
  </div>
406
450
  <div class="menu">
407
- ${this.renderPinnedSection()}
408
451
  ${this.renderSections()}
409
452
  </div>
410
453
  <div
@@ -716,6 +759,11 @@ export class WccSidebar extends DeesElement {
716
759
  this.dispatchEvent(new CustomEvent('searchChanged', { detail: this.searchQuery }));
717
760
  }
718
761
 
762
+ private clearSearch() {
763
+ this.searchQuery = '';
764
+ this.dispatchEvent(new CustomEvent('searchChanged', { detail: this.searchQuery }));
765
+ }
766
+
719
767
  private matchesSearch(name: string): boolean {
720
768
  if (!this.searchQuery) return true;
721
769
  return name.toLowerCase().includes(this.searchQuery.toLowerCase());