@sky.ui/core 0.0.51 → 0.0.52

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.
@@ -189,7 +189,7 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
189
189
  ${u(e,e=>e,e=>s`<li class="error" part="error-item">${e}</li>`)}
190
190
  </ul>
191
191
  </div>
192
- `}getErrorMessages(){const e=Array.isArray(this.validationErrors)?this.validationErrors:[];switch(this.errorDisplayMode){case"single":return e.slice(0,1);case"all":return e;default:return[]}}handleIconClick(e,t){this.dispatchEvent(new CustomEvent("icon-click",{detail:{position:e,event:t},bubbles:!0,composed:!0}))}render(){const e=y({"icon-slot":!0,left:!0,focused:this.focused}),t=y({"icon-slot":!0,right:!0,focused:this.focused}),i=y({"placeholder-label":!0,active:this.selectedItems.length>0}),r="fieldset"===this.variant,n="inside"===this.variant,a=this.label?r?s`<legend class="label" part="label">${this.label}</legend>`:s`<div class="label" part="label">${this.label}</div>`:null,l=s`
192
+ `}getErrorMessages(){const e=Array.isArray(this.validationErrors)?this.validationErrors:[];switch(this.errorDisplayMode){case"single":return e.slice(0,1);case"all":return e;default:return[]}}handleIconClick(e,t){this.dispatchEvent(new CustomEvent("icon-click",{detail:{position:e,event:t},bubbles:!0,composed:!0}))}render(){const e=y({"icon-slot":!0,left:!0,focused:this.focused}),t=y({"icon-slot":!0,right:!0,focused:this.focused}),i=y({"placeholder-label":!0,active:this.selectedItems.length>0}),r="fieldset"===this.variant,n="inside"===this.variant,a=this.label?r?s`<legend class="label" part="label"><span class="legend-text">${this.label}</span></legend>`:s`<div class="label" part="label">${this.label}</div>`:null,l=s`
193
193
  <div
194
194
  class=${e}
195
195
  part="icon-slot"
@@ -352,11 +352,12 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
352
352
  /* Fieldset / legend */
353
353
  :host([variant="fieldset"]) {
354
354
  overflow: visible;
355
- padding-block-start: 0;
356
355
  }
357
356
 
358
357
  :host([variant="fieldset"]) .combo-box-container {
359
358
  overflow: visible;
359
+ /* Room for legend text sitting on the top border — keep off :host */
360
+ padding-block-start: 0.65em;
360
361
  }
361
362
 
362
363
  :host([variant="fieldset"]) fieldset.input-wrapper {
@@ -402,7 +403,7 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
402
403
  );
403
404
  }
404
405
 
405
- /* Multi chips stay single-line; do not grow taller than sky-input */
406
+ /* Multi chips: keep fieldset at input height; center chips in the body */
406
407
  :host([variant="fieldset"]) .input-fieldset-body:has(.chip:not([single-select])) {
407
408
  height: calc(
408
409
  var(--sky-input-height) - 2 * var(--sky-input-border-width)
@@ -410,6 +411,7 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
410
411
  min-height: calc(
411
412
  var(--sky-input-height) - 2 * var(--sky-input-border-width)
412
413
  );
414
+ align-items: center;
413
415
  padding-block: 0;
414
416
  }
415
417
 
@@ -421,7 +423,14 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
421
423
  min-height: calc(
422
424
  var(--sky-input-height-compact) - 2 * var(--sky-input-border-width)
423
425
  );
424
- padding-block: 0;
426
+ }
427
+
428
+ :host([variant="fieldset"]) .input-fieldset-body:has(.chip:not([single-select])) .field-main,
429
+ :host([variant="fieldset"]) .input-fieldset-body:has(.chip:not([single-select])) .chip-container {
430
+ align-self: stretch;
431
+ height: 100%;
432
+ min-height: 0;
433
+ align-items: center;
425
434
  }
426
435
 
427
436
  :host([variant="fieldset"]) legend.label {
@@ -429,21 +438,31 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
429
438
  width: auto;
430
439
  max-width: calc(100% - 2 * var(--sky-input-pad-x));
431
440
  margin-inline-start: var(--sky-input-pad-x);
432
- margin-bottom: 0;
441
+ margin-block: 0;
433
442
  padding-inline: var(--sky-input-pad-x-sm);
434
- padding-block: 2px;
443
+ padding-block: 0;
435
444
  border: none;
436
445
  background: transparent;
437
446
  background-color: transparent;
438
447
  color: var(--sky-text-secondary);
439
448
  font-size: var(--sky-font-size-xs);
440
- line-height: 1.4;
449
+ /* Take no in-flow space; inner text is centered on the border notch */
450
+ height: 0;
451
+ line-height: 0;
441
452
  overflow: visible;
442
- text-overflow: ellipsis;
443
453
  white-space: nowrap;
444
454
  pointer-events: none;
445
455
  }
446
456
 
457
+ :host([variant="fieldset"]) legend.label .legend-text {
458
+ display: inline-block;
459
+ max-width: 100%;
460
+ overflow: hidden;
461
+ text-overflow: ellipsis;
462
+ line-height: 1.2;
463
+ transform: translateY(-50%);
464
+ }
465
+
447
466
  :host([variant="fieldset"]) .combo-box-container:focus-within legend.label,
448
467
  :host([variant="fieldset"]) .input-wrapper[open] legend.label {
449
468
  color: var(--sky-dropdown-color);
@@ -472,15 +491,14 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
472
491
  :host([variant="fieldset"][compact]) .combo-box-container:focus-within legend.label,
473
492
  :host([variant="fieldset"][compact]) .input-wrapper[open] legend.label {
474
493
  font-size: var(--sky-font-size-xs);
475
- line-height: 1.4;
476
494
  }
477
495
 
478
496
  /* Inside: label in the wrapper above value row — keep tokens in sync with sky-input */
479
497
  :host([variant="inside"]) {
480
- --sky-input-height-inside: 44px;
481
- --sky-input-height-inside-compact: 40px;
482
- --sky-input-inside-label-block: 0.15rem;
483
- --sky-input-inside-value-min: 1.375rem;
498
+ --sky-input-height-inside: 40px;
499
+ --sky-input-height-inside-compact: 36px;
500
+ --sky-input-inside-label-block: 2px;
501
+ --sky-input-inside-value-min: 1.15em;
484
502
  }
485
503
 
486
504
  :host([variant="inside"]) .input-wrapper {
@@ -503,7 +521,7 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
503
521
  display: flex;
504
522
  flex-direction: column;
505
523
  justify-content: center;
506
- gap: 0.15rem;
524
+ gap: 0;
507
525
  padding-block: var(--sky-input-inside-label-block);
508
526
  padding-inline: 0;
509
527
  overflow: hidden;
@@ -513,8 +531,8 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
513
531
  margin: 0;
514
532
  padding-inline: var(--sky-input-pad-x);
515
533
  font-size: var(--sky-font-size-xs);
516
- line-height: 1.3;
517
- min-height: calc(var(--sky-font-size-xs) * 1.3);
534
+ line-height: 1.15;
535
+ min-height: 0;
518
536
  color: var(--sky-text-secondary);
519
537
  pointer-events: none;
520
538
  overflow: hidden;
@@ -525,8 +543,8 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
525
543
 
526
544
  :host([variant="inside"][compact]) .input-inside-main > .label {
527
545
  font-size: 0.6875rem;
528
- line-height: 1.3;
529
- min-height: calc(0.6875rem * 1.3);
546
+ line-height: 1.15;
547
+ min-height: 0;
530
548
  }
531
549
 
532
550
  :host([variant="inside"]) .combo-box-container:focus-within .input-inside-main > .label,
@@ -555,6 +573,25 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
555
573
  flex: 0 0 auto;
556
574
  }
557
575
 
576
+ :host([variant="inside"]) .input-inside-main:has(.chip:not([single-select])) {
577
+ justify-content: center;
578
+ align-self: center;
579
+ padding-block: 0;
580
+ gap: 2px;
581
+ }
582
+
583
+ :host([variant="inside"]) .input-inside-row:has(.chip:not([single-select])) {
584
+ min-height: 0;
585
+ height: auto;
586
+ align-items: center;
587
+ }
588
+
589
+ :host([variant="inside"]) .field-main:has(.chip:not([single-select])) {
590
+ align-self: center;
591
+ height: auto;
592
+ min-height: 0;
593
+ }
594
+
558
595
  /* Match sky-input: label + value share pad-x; zero start when left icon present */
559
596
  :host([variant="inside"]) .input-inside-main > .label,
560
597
  :host([variant="inside"]) .chip-container,
@@ -777,6 +814,7 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
777
814
  height: auto;
778
815
  min-height: var(--sky-input-height-inside);
779
816
  padding-block: var(--sky-input-pad-y-sm, 0px);
817
+ align-items: center;
780
818
  }
781
819
 
782
820
  :host([variant="inside"][compact]) .input-wrapper,
@@ -784,6 +822,14 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
784
822
  min-height: var(--sky-input-height-inside-compact);
785
823
  }
786
824
 
825
+ :host([variant="inside"]) .input-wrapper:has(.chip:not([single-select])) {
826
+ padding-block: 4px;
827
+ }
828
+
829
+ :host([variant="inside"][compact]) .input-wrapper:has(.chip:not([single-select])) {
830
+ padding-block: 2px;
831
+ }
832
+
787
833
  :host([compact]) .placeholder-label {
788
834
  font-size: var(--sky-font-size-sm);
789
835
  }
@@ -817,14 +863,31 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
817
863
  width: 100%;
818
864
  min-width: 0;
819
865
  max-width: 100%;
866
+ min-height: 0;
867
+ height: 100%;
820
868
  flex-wrap: nowrap;
821
869
  align-items: center;
870
+ align-self: stretch;
822
871
  overflow: hidden;
823
872
  box-sizing: border-box;
824
873
  margin: 0;
874
+ line-height: 1;
875
+ padding-block: 4px;
825
876
  padding-inline: var(--sky-input-pad-x) var(--sky-input-pad-x-sm);
826
877
  }
827
878
 
879
+ :host([compact]) .chip-container,
880
+ .chip-container[compact] {
881
+ gap: 4px;
882
+ padding-block: 2px;
883
+ }
884
+
885
+ :host([variant="inside"]) .chip-container {
886
+ height: auto;
887
+ align-self: center;
888
+ padding-block: 0;
889
+ }
890
+
828
891
  .input-wrapper:has(.icon-slot[filled].left) .chip-container {
829
892
  padding-inline-start: var(--sky-input-pad-x-sm);
830
893
  }
@@ -860,10 +923,6 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
860
923
  display: none;
861
924
  }
862
925
 
863
- .chip-container[compact] {
864
- gap: 4px;
865
- }
866
-
867
926
  .chip {
868
927
  background-color: var(--sky-glass-primary);
869
928
  border-radius: var(--sky-radius-primary);
@@ -874,6 +933,7 @@ import{unsafeCSS as e,css as t,LitElement as i,html as s,nothing as o}from"lit";
874
933
  line-height: 1;
875
934
  display: inline-flex;
876
935
  align-items: center;
936
+ align-self: center;
877
937
  gap: 4px;
878
938
  flex: 0 1 auto;
879
939
  max-width: 100%;