@besaitech/ng-design-system 0.0.57 → 0.0.58

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.
@@ -9324,6 +9324,14 @@ class SdsSelect {
9324
9324
  isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
9325
9325
  filled = computed(() => this.appearance() === 'filled', ...(ngDevMode ? [{ debugName: "filled" }] : []));
9326
9326
  onBrand = computed(() => this.appearance() === 'on-brand', ...(ngDevMode ? [{ debugName: "onBrand" }] : []));
9327
+ /** The trigger's value / placeholder colour: on the dark `on-brand` surface it stays white in light mode too. */
9328
+ valueTextClass = computed(() => {
9329
+ const selected = !!this.selectedOption();
9330
+ if (this.onBrand()) {
9331
+ return selected ? 'text-white' : 'text-white/60';
9332
+ }
9333
+ return selected ? 'text-ink' : 'text-ink-faint';
9334
+ }, ...(ngDevMode ? [{ debugName: "valueTextClass" }] : []));
9327
9335
  normalizedOptions = computed(() => this.options().map((o) => this.norm(o)), ...(ngDevMode ? [{ debugName: "normalizedOptions" }] : []));
9328
9336
  filteredOptions = computed(() => {
9329
9337
  const f = this.filterText().trim().toLowerCase();
@@ -9689,7 +9697,10 @@ class SdsSelect {
9689
9697
  (keydown)="onTriggerKeydown($event)"
9690
9698
  >
9691
9699
  @if (optionTpl() && selectedOption()) {
9692
- <span class="flex flex-1 items-center gap-2 truncate pl-3.5 text-ink">
9700
+ <span
9701
+ class="flex flex-1 items-center gap-2 truncate pl-3.5"
9702
+ [class]="onBrand() ? 'text-white' : 'text-ink'"
9703
+ >
9693
9704
  <ng-container
9694
9705
  [ngTemplateOutlet]="optionTpl()!.template"
9695
9706
  [ngTemplateOutletContext]="triggerContext()!"
@@ -9698,7 +9709,7 @@ class SdsSelect {
9698
9709
  } @else {
9699
9710
  <span
9700
9711
  class="flex-1 truncate pl-3.5"
9701
- [class]="selectedOption() ? 'text-ink' : 'text-ink-faint'"
9712
+ [class]="valueTextClass()"
9702
9713
  >
9703
9714
  {{ selectedOption() ? selectedOption()!.label : placeholder() }}
9704
9715
  </span>
@@ -9709,7 +9720,8 @@ class SdsSelect {
9709
9720
  type="button"
9710
9721
  tabindex="-1"
9711
9722
  [attr.aria-label]="clearLabel()"
9712
- class="mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-ink-faint hover:bg-black/5 hover:text-ink-soft"
9723
+ class="mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full"
9724
+ [class]="onBrand() ? 'text-white/60 hover:bg-white/10 hover:text-white' : 'text-ink-faint hover:bg-black/5 hover:text-ink-soft'"
9713
9725
  (click)="clear($event)"
9714
9726
  >
9715
9727
  <sds-icon name="x" [size]="15" />
@@ -9717,7 +9729,9 @@ class SdsSelect {
9717
9729
  }
9718
9730
 
9719
9731
  <span
9720
- class="mr-3 ml-1 inline-flex shrink-0 items-center justify-center text-ink-soft transition-transform duration-150"
9732
+ class="mr-3 ml-1 inline-flex shrink-0 items-center justify-center transition-transform duration-150"
9733
+ [class.text-ink-soft]="!onBrand()"
9734
+ [class.text-white/70]="onBrand()"
9721
9735
  [class.rotate-180]="open()"
9722
9736
  >
9723
9737
  <sds-icon name="chevron-down" [size]="18" />
@@ -9845,7 +9859,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
9845
9859
  (keydown)="onTriggerKeydown($event)"
9846
9860
  >
9847
9861
  @if (optionTpl() && selectedOption()) {
9848
- <span class="flex flex-1 items-center gap-2 truncate pl-3.5 text-ink">
9862
+ <span
9863
+ class="flex flex-1 items-center gap-2 truncate pl-3.5"
9864
+ [class]="onBrand() ? 'text-white' : 'text-ink'"
9865
+ >
9849
9866
  <ng-container
9850
9867
  [ngTemplateOutlet]="optionTpl()!.template"
9851
9868
  [ngTemplateOutletContext]="triggerContext()!"
@@ -9854,7 +9871,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
9854
9871
  } @else {
9855
9872
  <span
9856
9873
  class="flex-1 truncate pl-3.5"
9857
- [class]="selectedOption() ? 'text-ink' : 'text-ink-faint'"
9874
+ [class]="valueTextClass()"
9858
9875
  >
9859
9876
  {{ selectedOption() ? selectedOption()!.label : placeholder() }}
9860
9877
  </span>
@@ -9865,7 +9882,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
9865
9882
  type="button"
9866
9883
  tabindex="-1"
9867
9884
  [attr.aria-label]="clearLabel()"
9868
- class="mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-ink-faint hover:bg-black/5 hover:text-ink-soft"
9885
+ class="mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full"
9886
+ [class]="onBrand() ? 'text-white/60 hover:bg-white/10 hover:text-white' : 'text-ink-faint hover:bg-black/5 hover:text-ink-soft'"
9869
9887
  (click)="clear($event)"
9870
9888
  >
9871
9889
  <sds-icon name="x" [size]="15" />
@@ -9873,7 +9891,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
9873
9891
  }
9874
9892
 
9875
9893
  <span
9876
- class="mr-3 ml-1 inline-flex shrink-0 items-center justify-center text-ink-soft transition-transform duration-150"
9894
+ class="mr-3 ml-1 inline-flex shrink-0 items-center justify-center transition-transform duration-150"
9895
+ [class.text-ink-soft]="!onBrand()"
9896
+ [class.text-white/70]="onBrand()"
9877
9897
  [class.rotate-180]="open()"
9878
9898
  >
9879
9899
  <sds-icon name="chevron-down" [size]="18" />