@ship-ui/core 0.14.22 → 0.14.23

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/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A modern signal based and zoneless compatable UI library for Angular visit our website [shipui.com](https://shipui.com) for more info.
4
4
 
5
+ Docs can be found at [docs.shipui.com](https://docs.shipui.com)
6
+
5
7
  ## Base setup
6
8
 
7
9
  To start using ShipUI make sure you're using angular 19 or newer.
@@ -51,7 +51,7 @@ function classMutationSignal() {
51
51
  }
52
52
  }
53
53
  });
54
- observer.observe(element, { attributes: true });
54
+ observer.observe(element, { attributes: true, attributeFilter: ['class'] });
55
55
  destroyRef.onDestroy(() => observer.disconnect());
56
56
  return classListSignal.asReadonly();
57
57
  }
@@ -611,14 +611,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
611
611
  class ShipCheckboxComponent {
612
612
  constructor() {
613
613
  this.currentClassList = classMutationSignal();
614
- this.showClasses = computed(() => {
615
- const classArr = this.currentClassList().split(' ');
616
- return classArr;
617
- }, ...(ngDevMode ? [{ debugName: "showClasses" }] : []));
618
614
  }
619
615
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ShipCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
620
616
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: ShipCheckboxComponent, isStandalone: true, selector: "sh-checkbox", ngImport: i0, template: `
621
- <div class="box sh-sheet" [class]="showClasses()">
617
+ <div class="box sh-sheet" [class]="currentClassList()">
622
618
  <sh-icon class="inherit default-indicator">check-bold</sh-icon>
623
619
  <sh-icon class="inherit indeterminate-indicator">minus-bold</sh-icon>
624
620
  </div>
@@ -632,7 +628,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
632
628
  selector: 'sh-checkbox',
633
629
  imports: [ShipIconComponent],
634
630
  template: `
635
- <div class="box sh-sheet" [class]="showClasses()">
631
+ <div class="box sh-sheet" [class]="currentClassList()">
636
632
  <sh-icon class="inherit default-indicator">check-bold</sh-icon>
637
633
  <sh-icon class="inherit indeterminate-indicator">minus-bold</sh-icon>
638
634
  </div>
@@ -2800,15 +2796,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
2800
2796
  }] });
2801
2797
 
2802
2798
  class ShipRadioComponent {
2803
- #selfRef = inject(ElementRef);
2804
- onClick() {
2805
- if (this.#selfRef.nativeElement.querySelector('input')) {
2806
- this.#selfRef.nativeElement.querySelector('input').focus();
2807
- }
2799
+ constructor() {
2800
+ this.currentClassList = classMutationSignal();
2808
2801
  }
2809
2802
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ShipRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2810
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: ShipRadioComponent, isStandalone: true, selector: "sh-radio", host: { listeners: { "click": "onClick()" } }, ngImport: i0, template: `
2811
- <div class="radio"></div>
2803
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: ShipRadioComponent, isStandalone: true, selector: "sh-radio", ngImport: i0, template: `
2804
+ <div class="radio sh-sheet" [class]="currentClassList()"></div>
2812
2805
 
2813
2806
  <ng-content />
2814
2807
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -2819,16 +2812,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
2819
2812
  selector: 'sh-radio',
2820
2813
  imports: [],
2821
2814
  template: `
2822
- <div class="radio"></div>
2815
+ <div class="radio sh-sheet" [class]="currentClassList()"></div>
2823
2816
 
2824
2817
  <ng-content />
2825
2818
  `,
2826
2819
  changeDetection: ChangeDetectionStrategy.OnPush,
2827
2820
  }]
2828
- }], propDecorators: { onClick: [{
2829
- type: HostListener,
2830
- args: ['click']
2831
- }] } });
2821
+ }] });
2832
2822
 
2833
2823
  class ShipRangeSliderComponent {
2834
2824
  constructor() {
@@ -2972,7 +2962,7 @@ class ShipRangeSliderComponent {
2972
2962
  this.#updateStateFromInput(false);
2973
2963
  }
2974
2964
  });
2975
- this.#observer.observe(this.#inputElement, { attributes: true });
2965
+ this.#observer.observe(this.#inputElement, { attributes: true, attributeFilter: MUTATION_ATTRIBUTES });
2976
2966
  }
2977
2967
  #countDecimals(value) {
2978
2968
  if (isNaN(value) || Math.floor(value) === value)