@educarehq/solaris-ui 0.16.0 → 0.16.1
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.
|
@@ -2921,12 +2921,10 @@ class SolarisButtonDirective {
|
|
|
2921
2921
|
}
|
|
2922
2922
|
// Apply variant attributes synchronously so the element never flashes the
|
|
2923
2923
|
// base style before Angular's first change detection (SSR/hydration FOUC).
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
el.
|
|
2927
|
-
el.
|
|
2928
|
-
el.dataset['radius'] = this.radius();
|
|
2929
|
-
el.dataset['shape'] = this.shape();
|
|
2924
|
+
el.setAttribute('data-appearance', this.appearance());
|
|
2925
|
+
el.setAttribute('data-color', this.color());
|
|
2926
|
+
el.setAttribute('data-radius', this.radius());
|
|
2927
|
+
el.setAttribute('data-shape', this.shape());
|
|
2930
2928
|
effect(() => {
|
|
2931
2929
|
if (this.loading()) {
|
|
2932
2930
|
this.attachSpinner();
|
|
@@ -3872,7 +3870,7 @@ class SolarisFormFieldComponent {
|
|
|
3872
3870
|
this.controlResize.set(null);
|
|
3873
3871
|
return;
|
|
3874
3872
|
}
|
|
3875
|
-
const resize = first.
|
|
3873
|
+
const resize = first.getAttribute('data-resize') ?? first.getAttribute('resize');
|
|
3876
3874
|
const validResize = resize === 'none' ||
|
|
3877
3875
|
resize === 'vertical' ||
|
|
3878
3876
|
resize === 'horizontal' ||
|
|
@@ -4304,17 +4302,16 @@ class SolarisPopoverTriggerDirective {
|
|
|
4304
4302
|
this.connectedSide =
|
|
4305
4303
|
change.connectionPair.originY === 'bottom' ? 'bottom' : 'top';
|
|
4306
4304
|
if (this.panelContainerRef) {
|
|
4307
|
-
this.panelContainerRef.
|
|
4305
|
+
this.panelContainerRef.setAttribute('data-connected-side', this.connectedSide);
|
|
4308
4306
|
if (this.solarisPopoverTopConnected()) {
|
|
4309
|
-
this.panelContainerRef.
|
|
4307
|
+
this.panelContainerRef.setAttribute('data-form-field', '');
|
|
4310
4308
|
}
|
|
4311
4309
|
}
|
|
4312
4310
|
if (this.solarisPopoverTopConnected()) {
|
|
4313
|
-
this.elementRef.nativeElement.
|
|
4314
|
-
this.connectedSide;
|
|
4311
|
+
this.elementRef.nativeElement.setAttribute('data-connected-side', this.connectedSide);
|
|
4315
4312
|
const formFieldWrapper = this.elementRef.nativeElement.querySelector(':scope > .solaris-form-field__control-wrapper');
|
|
4316
4313
|
if (formFieldWrapper) {
|
|
4317
|
-
formFieldWrapper.
|
|
4314
|
+
formFieldWrapper.setAttribute('data-connected-side', this.connectedSide);
|
|
4318
4315
|
}
|
|
4319
4316
|
}
|
|
4320
4317
|
});
|
|
@@ -4385,12 +4382,12 @@ class SolarisPopoverTriggerDirective {
|
|
|
4385
4382
|
const componentRef = this.overlayRef.attach(portal);
|
|
4386
4383
|
this.panelContainerRef = componentRef.location.nativeElement.querySelector('.solaris-popover-panel__container');
|
|
4387
4384
|
if (this.panelContainerRef && initialSide) {
|
|
4388
|
-
this.panelContainerRef.
|
|
4385
|
+
this.panelContainerRef.setAttribute('data-connected-side', initialSide);
|
|
4389
4386
|
if (topConnected) {
|
|
4390
|
-
this.panelContainerRef.
|
|
4387
|
+
this.panelContainerRef.setAttribute('data-form-field', '');
|
|
4391
4388
|
const formFieldWrapper = this.elementRef.nativeElement.querySelector(':scope > .solaris-form-field__control-wrapper');
|
|
4392
4389
|
if (formFieldWrapper) {
|
|
4393
|
-
formFieldWrapper.
|
|
4390
|
+
formFieldWrapper.setAttribute('data-connected-side', initialSide);
|
|
4394
4391
|
}
|
|
4395
4392
|
}
|
|
4396
4393
|
}
|
|
@@ -4901,7 +4898,7 @@ class SolarisSelectComponent extends SolarisFormControl {
|
|
|
4901
4898
|
if (el) {
|
|
4902
4899
|
const wrapper = el.querySelector('.solaris-form-field__control-wrapper');
|
|
4903
4900
|
if (wrapper) {
|
|
4904
|
-
wrapper.
|
|
4901
|
+
wrapper.setAttribute('data-connected-side', side);
|
|
4905
4902
|
}
|
|
4906
4903
|
}
|
|
4907
4904
|
}
|
|
@@ -4910,7 +4907,7 @@ class SolarisSelectComponent extends SolarisFormControl {
|
|
|
4910
4907
|
if (el) {
|
|
4911
4908
|
const wrapper = el.querySelector('.solaris-form-field__control-wrapper');
|
|
4912
4909
|
if (wrapper) {
|
|
4913
|
-
|
|
4910
|
+
wrapper.removeAttribute('data-connected-side');
|
|
4914
4911
|
}
|
|
4915
4912
|
}
|
|
4916
4913
|
}
|
|
@@ -6506,7 +6503,7 @@ class SolarisMultiSelectComponent extends SolarisFormControl {
|
|
|
6506
6503
|
if (el) {
|
|
6507
6504
|
const wrapper = el.querySelector('.solaris-form-field__control-wrapper');
|
|
6508
6505
|
if (wrapper) {
|
|
6509
|
-
wrapper.
|
|
6506
|
+
wrapper.setAttribute('data-connected-side', side);
|
|
6510
6507
|
}
|
|
6511
6508
|
}
|
|
6512
6509
|
}
|
|
@@ -6515,7 +6512,7 @@ class SolarisMultiSelectComponent extends SolarisFormControl {
|
|
|
6515
6512
|
if (el) {
|
|
6516
6513
|
const wrapper = el.querySelector('.solaris-form-field__control-wrapper');
|
|
6517
6514
|
if (wrapper) {
|
|
6518
|
-
|
|
6515
|
+
wrapper.removeAttribute('data-connected-side');
|
|
6519
6516
|
}
|
|
6520
6517
|
}
|
|
6521
6518
|
}
|
|
@@ -12633,11 +12630,11 @@ class SolarisSegmentedItemComponent {
|
|
|
12633
12630
|
if (!innerEl)
|
|
12634
12631
|
return;
|
|
12635
12632
|
for (const node of Array.from(innerEl.childNodes)) {
|
|
12636
|
-
if (node.nodeType ===
|
|
12633
|
+
if (node.nodeType === 3 && node.textContent?.trim()) {
|
|
12637
12634
|
this.hasContent.set(true);
|
|
12638
12635
|
return;
|
|
12639
12636
|
}
|
|
12640
|
-
if (node.nodeType ===
|
|
12637
|
+
if (node.nodeType === 1) {
|
|
12641
12638
|
const el = node;
|
|
12642
12639
|
if (!el.classList.contains('solaris-segmented-item__icon')) {
|
|
12643
12640
|
this.hasContent.set(true);
|
|
@@ -12777,6 +12774,7 @@ class SolarisSegmentedControlComponent {
|
|
|
12777
12774
|
elementRef = inject(ElementRef);
|
|
12778
12775
|
injector = inject(Injector);
|
|
12779
12776
|
ngZone = inject(NgZone);
|
|
12777
|
+
platformId = inject(PLATFORM_ID);
|
|
12780
12778
|
items = contentChildren(SolarisSegmentedItemComponent, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
12781
12779
|
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
12782
12780
|
indicator = input(true, ...(ngDevMode ? [{ debugName: "indicator" }] : /* istanbul ignore next */ []));
|
|
@@ -12839,6 +12837,9 @@ class SolarisSegmentedControlComponent {
|
|
|
12839
12837
|
});
|
|
12840
12838
|
}
|
|
12841
12839
|
ngAfterViewInit() {
|
|
12840
|
+
if (!isPlatformBrowser(this.platformId)) {
|
|
12841
|
+
return;
|
|
12842
|
+
}
|
|
12842
12843
|
this.setupIndicatorMeasurement();
|
|
12843
12844
|
effect(() => {
|
|
12844
12845
|
this.value();
|
|
@@ -12882,6 +12883,9 @@ class SolarisSegmentedControlComponent {
|
|
|
12882
12883
|
// ControlValueAccessor
|
|
12883
12884
|
writeValue(safe) {
|
|
12884
12885
|
this.value.set(safe);
|
|
12886
|
+
if (!isPlatformBrowser(this.platformId)) {
|
|
12887
|
+
return;
|
|
12888
|
+
}
|
|
12885
12889
|
this.ngZone.runOutsideAngular(() => {
|
|
12886
12890
|
requestAnimationFrame(() => this.measureIndicator());
|
|
12887
12891
|
});
|