xaml-ui 1.0.34 → 1.0.35
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/fesm2022/xaml-ui.mjs
CHANGED
|
@@ -57,14 +57,6 @@ class FrameworkElementComponent {
|
|
|
57
57
|
get alignSelf() {
|
|
58
58
|
return ToAlignment(this.VerticalAlignment);
|
|
59
59
|
}
|
|
60
|
-
//True on Safari and on the other WebKit based browsers of Apple platforms, which share its layout
|
|
61
|
-
//engine. Evaluated once, as host bindings are re-read on every change detection pass.
|
|
62
|
-
static get IsSafari() {
|
|
63
|
-
if (this._isSafari === undefined) {
|
|
64
|
-
this._isSafari = typeof navigator !== 'undefined' && /apple/i.test(navigator.vendor ?? '');
|
|
65
|
-
}
|
|
66
|
-
return this._isSafari;
|
|
67
|
-
}
|
|
68
60
|
static { this._nextId = 1; }
|
|
69
61
|
static { this.DefaultStyles = `:host {
|
|
70
62
|
display: grid;
|
|
@@ -201,6 +193,9 @@ class TextBlockComponent extends FrameworkElementComponent {
|
|
|
201
193
|
return this.MinWidth;
|
|
202
194
|
return this.MaxWidth === undefined && this.HorizontalAlignment === 'Stretch' && this.TextTrimming === 'None' ? 'min-content' : undefined;
|
|
203
195
|
}
|
|
196
|
+
get overflow() {
|
|
197
|
+
return this.TextTrimming !== 'None' ? 'hidden' : undefined;
|
|
198
|
+
}
|
|
204
199
|
get fontWeight() {
|
|
205
200
|
return TextBlockComponent.ToFontWeight(this.FontWeight);
|
|
206
201
|
}
|
|
@@ -1398,24 +1393,13 @@ class ScrollBarComponent extends FrameworkElementComponent {
|
|
|
1398
1393
|
return this.Orientation === 'Vertical' ? event.clientY : event.clientX;
|
|
1399
1394
|
}
|
|
1400
1395
|
get thumbStyle() {
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
let
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
case 'Vertical':
|
|
1409
|
-
return {
|
|
1410
|
-
'height': size + 'px',
|
|
1411
|
-
'top': position + 'px'
|
|
1412
|
-
};
|
|
1413
|
-
case 'Horizontal':
|
|
1414
|
-
return {
|
|
1415
|
-
'width': size + 'px',
|
|
1416
|
-
'left': position + 'px'
|
|
1417
|
-
};
|
|
1418
|
-
}
|
|
1396
|
+
let scrollRange = this.ScrollSize - this.ViewportSize;
|
|
1397
|
+
let size = this.ScrollSize > 0 ? Math.min(this.ViewportSize / this.ScrollSize, 1) : 1;
|
|
1398
|
+
let position = scrollRange > 0 ? Math.min(Math.max(this.Value / scrollRange, 0), 1) : 0;
|
|
1399
|
+
return {
|
|
1400
|
+
'--thumb-size': size * 100 + '%',
|
|
1401
|
+
'--thumb-position': position
|
|
1402
|
+
};
|
|
1419
1403
|
}
|
|
1420
1404
|
onButtonDown(event, direction) {
|
|
1421
1405
|
event.target.setPointerCapture(event.pointerId);
|
|
@@ -1492,7 +1476,7 @@ class ScrollBarComponent extends FrameworkElementComponent {
|
|
|
1492
1476
|
<div #track class="track" (pointerdown)="onTrackDown($event)" (pointerup)="onTrackUp($event)">
|
|
1493
1477
|
<div #thumb class="thumb" [ngStyle]="thumbStyle" (pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)" (pointerup)="onPointerUp($event)"></div>
|
|
1494
1478
|
</div>
|
|
1495
|
-
<div class="buttons" (pointerdown)="onButtonDown($event, true)" (pointerup)="onButtonUp($event)">{{increaseGlyph}}</div>`, isInline: true, styles: [":host{position:relative}:host{display:grid;background-color:var(--SubtleFillColorTransparent)}:host.horizontal{grid-template-columns:auto 1fr auto}:host.horizontal>.buttons{align-self:center}:host.horizontal>.track{transform:translateY(-.75px);align-self:center;margin:0 -2px 0 -3px}:host.horizontal>.track>.thumb{transform:translateY(3px)}:host.vertical{grid-template-rows:auto 1fr auto}:host.vertical>.buttons{justify-self:center}:host.vertical>.track{transform:translate(-.75px);justify-self:center;margin:-3px 0 -2px}:host.vertical>.track>.thumb{transform:translate(3px)}:host:hover>.buttons{display:grid;opacity:1}:host:hover>.track>.thumb{
|
|
1479
|
+
<div class="buttons" (pointerdown)="onButtonDown($event, true)" (pointerup)="onButtonUp($event)">{{increaseGlyph}}</div>`, isInline: true, styles: [":host{position:relative}:host{display:grid;background-color:var(--SubtleFillColorTransparent)}:host.horizontal{grid-template-columns:auto 1fr auto}:host.horizontal>.buttons{align-self:center}:host.horizontal>.track{transform:translateY(-.75px);align-self:center;margin:0 -2px 0 -3px}:host.horizontal>.track>.thumb{transform:translateY(3px);width:var(--thumb-size);left:calc((100% - max(var(--thumb-size),var(--thumb-min-size))) * var(--thumb-position))}:host.vertical{grid-template-rows:auto 1fr auto}:host.vertical>.buttons{justify-self:center}:host.vertical>.track{transform:translate(-.75px);justify-self:center;margin:-3px 0 -2px}:host.vertical>.track>.thumb{transform:translate(3px);height:var(--thumb-size);top:calc((100% - max(var(--thumb-size),var(--thumb-min-size))) * var(--thumb-position))}:host:hover>.buttons{display:grid;opacity:1}:host:hover>.track>.thumb{--thumb-min-size: 10px;transform:translate(0)}:host>.buttons{display:hidden;font-family:var(--SymbolFontFamily);font-size:8pt;min-width:12px;min-height:12px;margin:4px;transform-origin:center;opacity:0;transition:opacity var(--ControlNormalAnimationDuration);color:var(--ControlStrongFillColorDefault)}:host>.buttons:hover{color:var(--TextFillColorSecondary)}:host>.buttons:active{color:var(--TextFillColorSecondary);transform:scale(.875)}:host>.track{display:grid;position:relative}:host>.track>.thumb{background-color:var(--ControlStrongFillColorDefault);position:relative;border-radius:3px;transition:transform var(--ControlNormalAnimationDuration),min-width var(--ControlNormalAnimationDuration),min-height var(--ControlNormalAnimationDuration);--thumb-min-size: 2px;min-width:var(--thumb-min-size);min-height:var(--thumb-min-size)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
1496
1480
|
}
|
|
1497
1481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ScrollBarComponent, decorators: [{
|
|
1498
1482
|
type: Component,
|
|
@@ -1500,7 +1484,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
1500
1484
|
<div #track class="track" (pointerdown)="onTrackDown($event)" (pointerup)="onTrackUp($event)">
|
|
1501
1485
|
<div #thumb class="thumb" [ngStyle]="thumbStyle" (pointerdown)="onPointerDown($event)" (pointermove)="onPointerMove($event)" (pointerup)="onPointerUp($event)"></div>
|
|
1502
1486
|
</div>
|
|
1503
|
-
<div class="buttons" (pointerdown)="onButtonDown($event, true)" (pointerup)="onButtonUp($event)">{{increaseGlyph}}</div>`, styles: [":host{position:relative}:host{display:grid;background-color:var(--SubtleFillColorTransparent)}:host.horizontal{grid-template-columns:auto 1fr auto}:host.horizontal>.buttons{align-self:center}:host.horizontal>.track{transform:translateY(-.75px);align-self:center;margin:0 -2px 0 -3px}:host.horizontal>.track>.thumb{transform:translateY(3px)}:host.vertical{grid-template-rows:auto 1fr auto}:host.vertical>.buttons{justify-self:center}:host.vertical>.track{transform:translate(-.75px);justify-self:center;margin:-3px 0 -2px}:host.vertical>.track>.thumb{transform:translate(3px)}:host:hover>.buttons{display:grid;opacity:1}:host:hover>.track>.thumb{
|
|
1487
|
+
<div class="buttons" (pointerdown)="onButtonDown($event, true)" (pointerup)="onButtonUp($event)">{{increaseGlyph}}</div>`, styles: [":host{position:relative}:host{display:grid;background-color:var(--SubtleFillColorTransparent)}:host.horizontal{grid-template-columns:auto 1fr auto}:host.horizontal>.buttons{align-self:center}:host.horizontal>.track{transform:translateY(-.75px);align-self:center;margin:0 -2px 0 -3px}:host.horizontal>.track>.thumb{transform:translateY(3px);width:var(--thumb-size);left:calc((100% - max(var(--thumb-size),var(--thumb-min-size))) * var(--thumb-position))}:host.vertical{grid-template-rows:auto 1fr auto}:host.vertical>.buttons{justify-self:center}:host.vertical>.track{transform:translate(-.75px);justify-self:center;margin:-3px 0 -2px}:host.vertical>.track>.thumb{transform:translate(3px);height:var(--thumb-size);top:calc((100% - max(var(--thumb-size),var(--thumb-min-size))) * var(--thumb-position))}:host:hover>.buttons{display:grid;opacity:1}:host:hover>.track>.thumb{--thumb-min-size: 10px;transform:translate(0)}:host>.buttons{display:hidden;font-family:var(--SymbolFontFamily);font-size:8pt;min-width:12px;min-height:12px;margin:4px;transform-origin:center;opacity:0;transition:opacity var(--ControlNormalAnimationDuration);color:var(--ControlStrongFillColorDefault)}:host>.buttons:hover{color:var(--TextFillColorSecondary)}:host>.buttons:active{color:var(--TextFillColorSecondary);transform:scale(.875)}:host>.track{display:grid;position:relative}:host>.track>.thumb{background-color:var(--ControlStrongFillColorDefault);position:relative;border-radius:3px;transition:transform var(--ControlNormalAnimationDuration),min-width var(--ControlNormalAnimationDuration),min-height var(--ControlNormalAnimationDuration);--thumb-min-size: 2px;min-width:var(--thumb-min-size);min-height:var(--thumb-min-size)}\n"] }]
|
|
1504
1488
|
}], propDecorators: { Orientation: [{
|
|
1505
1489
|
type: Input
|
|
1506
1490
|
}], ViewportSize: [{
|
|
@@ -1951,15 +1935,18 @@ class FlyoutBaseComponent {
|
|
|
1951
1935
|
//Start hide animation
|
|
1952
1936
|
this.isVisible = false;
|
|
1953
1937
|
//Remove event handlers
|
|
1954
|
-
if (this._backdropContextMenuSubscription)
|
|
1938
|
+
if (this._backdropContextMenuSubscription) {
|
|
1955
1939
|
this._backdropContextMenuSubscription();
|
|
1940
|
+
this._backdropContextMenuSubscription = undefined;
|
|
1941
|
+
}
|
|
1956
1942
|
//Dispose overlay after hidden
|
|
1957
|
-
|
|
1943
|
+
const overlayRef = this._overlayRef;
|
|
1944
|
+
if (!overlayRef)
|
|
1958
1945
|
return;
|
|
1959
|
-
await resume_after(FlyoutPresenter.TransitionDuration);
|
|
1960
|
-
this._overlayRef.detach();
|
|
1961
|
-
this._overlayRef.dispose();
|
|
1962
1946
|
this._overlayRef = undefined;
|
|
1947
|
+
await resume_after(FlyoutPresenter.TransitionDuration);
|
|
1948
|
+
overlayRef.detach();
|
|
1949
|
+
overlayRef.dispose();
|
|
1963
1950
|
}
|
|
1964
1951
|
get Target() {
|
|
1965
1952
|
return this._target;
|
|
@@ -3443,14 +3430,15 @@ class ToolTipDirective {
|
|
|
3443
3430
|
//Start hide animation
|
|
3444
3431
|
this._toolTip?.setInput('IsVisible', false);
|
|
3445
3432
|
//Dispose overlay after hidden
|
|
3446
|
-
|
|
3433
|
+
const overlayRef = this._overlayRef;
|
|
3434
|
+
if (!overlayRef)
|
|
3447
3435
|
return;
|
|
3448
|
-
await resume_after(ToolTipComponent.TransitionDuration);
|
|
3449
3436
|
this._hostElement.nativeElement.removeAttribute('aria-describedby');
|
|
3450
3437
|
this._toolTip = undefined;
|
|
3451
|
-
this._overlayRef.detach();
|
|
3452
|
-
this._overlayRef.dispose();
|
|
3453
3438
|
this._overlayRef = undefined;
|
|
3439
|
+
await resume_after(ToolTipComponent.TransitionDuration);
|
|
3440
|
+
overlayRef.detach();
|
|
3441
|
+
overlayRef.dispose();
|
|
3454
3442
|
}
|
|
3455
3443
|
static getPositionCandidates(placement) {
|
|
3456
3444
|
//Primary placement plus the opposite side as a fallback, so the tip flips when it would clip.
|