@ni/nimble-components 8.3.0 → 8.4.0
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/dist/all-components-bundle.js +71 -41
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +807 -792
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/all-components.d.ts +1 -0
- package/dist/esm/all-components.js +1 -0
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/anchored-region/index.d.ts +11 -0
- package/dist/esm/anchored-region/index.js +24 -0
- package/dist/esm/anchored-region/index.js.map +1 -0
- package/dist/esm/anchored-region/styles.d.ts +1 -0
- package/dist/esm/anchored-region/styles.js +9 -0
- package/dist/esm/anchored-region/styles.js.map +1 -0
- package/dist/esm/button/index.d.ts +2 -7
- package/dist/esm/button/index.js +0 -6
- package/dist/esm/button/index.js.map +1 -1
- package/dist/esm/nimble-components/src/all-components.d.ts +1 -0
- package/dist/esm/nimble-components/src/anchored-region/index.d.ts +11 -0
- package/dist/esm/nimble-components/src/anchored-region/styles.d.ts +1 -0
- package/dist/esm/nimble-components/src/button/index.d.ts +2 -7
- package/dist/esm/nimble-components/src/patterns/button/types.d.ts +20 -0
- package/dist/esm/nimble-components/src/toggle-button/index.d.ts +3 -8
- package/dist/esm/patterns/button/types.d.ts +20 -0
- package/dist/esm/patterns/button/types.js.map +1 -1
- package/dist/esm/toggle-button/index.d.ts +3 -8
- package/dist/esm/toggle-button/index.js +1 -7
- package/dist/esm/toggle-button/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -4730,6 +4730,18 @@
|
|
|
4730
4730
|
applyMixins(DelegatesARIALink, ARIAGlobalStatesAndProperties);
|
|
4731
4731
|
applyMixins(Anchor, StartEnd, DelegatesARIALink);
|
|
4732
4732
|
|
|
4733
|
+
/**
|
|
4734
|
+
* The template for the {@link @microsoft/fast-foundation#(AnchoredRegion:class)} component.
|
|
4735
|
+
* @public
|
|
4736
|
+
*/
|
|
4737
|
+
const anchoredRegionTemplate = (context, definition) => html `
|
|
4738
|
+
<template class="${x => (x.initialLayoutComplete ? "loaded" : "")}">
|
|
4739
|
+
${when(x => x.initialLayoutComplete, html `
|
|
4740
|
+
<slot></slot>
|
|
4741
|
+
`)}
|
|
4742
|
+
</template>
|
|
4743
|
+
`;
|
|
4744
|
+
|
|
4733
4745
|
/**
|
|
4734
4746
|
* a method to determine the current localization direction of the view
|
|
4735
4747
|
* @param rootNode - the HTMLElement to begin the query from, usually "this" when used in a component controller
|
|
@@ -4836,7 +4848,7 @@
|
|
|
4836
4848
|
*
|
|
4837
4849
|
* @public
|
|
4838
4850
|
*/
|
|
4839
|
-
class AnchoredRegion extends FoundationElement {
|
|
4851
|
+
class AnchoredRegion$1 extends FoundationElement {
|
|
4840
4852
|
constructor() {
|
|
4841
4853
|
super(...arguments);
|
|
4842
4854
|
/**
|
|
@@ -5022,10 +5034,10 @@
|
|
|
5022
5034
|
if (this.anchorElement === null || this.pendingPositioningUpdate) {
|
|
5023
5035
|
return;
|
|
5024
5036
|
}
|
|
5025
|
-
AnchoredRegion.intersectionService.requestPosition(this, this.handleIntersection);
|
|
5026
|
-
AnchoredRegion.intersectionService.requestPosition(this.anchorElement, this.handleIntersection);
|
|
5037
|
+
AnchoredRegion$1.intersectionService.requestPosition(this, this.handleIntersection);
|
|
5038
|
+
AnchoredRegion$1.intersectionService.requestPosition(this.anchorElement, this.handleIntersection);
|
|
5027
5039
|
if (this.viewportElement !== null) {
|
|
5028
|
-
AnchoredRegion.intersectionService.requestPosition(this.viewportElement, this.handleIntersection);
|
|
5040
|
+
AnchoredRegion$1.intersectionService.requestPosition(this.viewportElement, this.handleIntersection);
|
|
5029
5041
|
}
|
|
5030
5042
|
this.pendingPositioningUpdate = true;
|
|
5031
5043
|
};
|
|
@@ -5035,12 +5047,12 @@
|
|
|
5035
5047
|
this.stopObservers = () => {
|
|
5036
5048
|
if (this.pendingPositioningUpdate) {
|
|
5037
5049
|
this.pendingPositioningUpdate = false;
|
|
5038
|
-
AnchoredRegion.intersectionService.cancelRequestPosition(this, this.handleIntersection);
|
|
5050
|
+
AnchoredRegion$1.intersectionService.cancelRequestPosition(this, this.handleIntersection);
|
|
5039
5051
|
if (this.anchorElement !== null) {
|
|
5040
|
-
AnchoredRegion.intersectionService.cancelRequestPosition(this.anchorElement, this.handleIntersection);
|
|
5052
|
+
AnchoredRegion$1.intersectionService.cancelRequestPosition(this.anchorElement, this.handleIntersection);
|
|
5041
5053
|
}
|
|
5042
5054
|
if (this.viewportElement !== null) {
|
|
5043
|
-
AnchoredRegion.intersectionService.cancelRequestPosition(this.viewportElement, this.handleIntersection);
|
|
5055
|
+
AnchoredRegion$1.intersectionService.cancelRequestPosition(this.viewportElement, this.handleIntersection);
|
|
5044
5056
|
}
|
|
5045
5057
|
}
|
|
5046
5058
|
if (this.resizeDetector !== null) {
|
|
@@ -5723,64 +5735,64 @@
|
|
|
5723
5735
|
this.updateRegionStyle();
|
|
5724
5736
|
}
|
|
5725
5737
|
}
|
|
5726
|
-
AnchoredRegion.intersectionService = new IntersectionService();
|
|
5738
|
+
AnchoredRegion$1.intersectionService = new IntersectionService();
|
|
5727
5739
|
__decorate$1([
|
|
5728
5740
|
attr
|
|
5729
|
-
], AnchoredRegion.prototype, "anchor", void 0);
|
|
5741
|
+
], AnchoredRegion$1.prototype, "anchor", void 0);
|
|
5730
5742
|
__decorate$1([
|
|
5731
5743
|
attr
|
|
5732
|
-
], AnchoredRegion.prototype, "viewport", void 0);
|
|
5744
|
+
], AnchoredRegion$1.prototype, "viewport", void 0);
|
|
5733
5745
|
__decorate$1([
|
|
5734
5746
|
attr({ attribute: "horizontal-positioning-mode" })
|
|
5735
|
-
], AnchoredRegion.prototype, "horizontalPositioningMode", void 0);
|
|
5747
|
+
], AnchoredRegion$1.prototype, "horizontalPositioningMode", void 0);
|
|
5736
5748
|
__decorate$1([
|
|
5737
5749
|
attr({ attribute: "horizontal-default-position" })
|
|
5738
|
-
], AnchoredRegion.prototype, "horizontalDefaultPosition", void 0);
|
|
5750
|
+
], AnchoredRegion$1.prototype, "horizontalDefaultPosition", void 0);
|
|
5739
5751
|
__decorate$1([
|
|
5740
5752
|
attr({ attribute: "horizontal-viewport-lock", mode: "boolean" })
|
|
5741
|
-
], AnchoredRegion.prototype, "horizontalViewportLock", void 0);
|
|
5753
|
+
], AnchoredRegion$1.prototype, "horizontalViewportLock", void 0);
|
|
5742
5754
|
__decorate$1([
|
|
5743
5755
|
attr({ attribute: "horizontal-inset", mode: "boolean" })
|
|
5744
|
-
], AnchoredRegion.prototype, "horizontalInset", void 0);
|
|
5756
|
+
], AnchoredRegion$1.prototype, "horizontalInset", void 0);
|
|
5745
5757
|
__decorate$1([
|
|
5746
5758
|
attr({ attribute: "horizontal-threshold" })
|
|
5747
|
-
], AnchoredRegion.prototype, "horizontalThreshold", void 0);
|
|
5759
|
+
], AnchoredRegion$1.prototype, "horizontalThreshold", void 0);
|
|
5748
5760
|
__decorate$1([
|
|
5749
5761
|
attr({ attribute: "horizontal-scaling" })
|
|
5750
|
-
], AnchoredRegion.prototype, "horizontalScaling", void 0);
|
|
5762
|
+
], AnchoredRegion$1.prototype, "horizontalScaling", void 0);
|
|
5751
5763
|
__decorate$1([
|
|
5752
5764
|
attr({ attribute: "vertical-positioning-mode" })
|
|
5753
|
-
], AnchoredRegion.prototype, "verticalPositioningMode", void 0);
|
|
5765
|
+
], AnchoredRegion$1.prototype, "verticalPositioningMode", void 0);
|
|
5754
5766
|
__decorate$1([
|
|
5755
5767
|
attr({ attribute: "vertical-default-position" })
|
|
5756
|
-
], AnchoredRegion.prototype, "verticalDefaultPosition", void 0);
|
|
5768
|
+
], AnchoredRegion$1.prototype, "verticalDefaultPosition", void 0);
|
|
5757
5769
|
__decorate$1([
|
|
5758
5770
|
attr({ attribute: "vertical-viewport-lock", mode: "boolean" })
|
|
5759
|
-
], AnchoredRegion.prototype, "verticalViewportLock", void 0);
|
|
5771
|
+
], AnchoredRegion$1.prototype, "verticalViewportLock", void 0);
|
|
5760
5772
|
__decorate$1([
|
|
5761
5773
|
attr({ attribute: "vertical-inset", mode: "boolean" })
|
|
5762
|
-
], AnchoredRegion.prototype, "verticalInset", void 0);
|
|
5774
|
+
], AnchoredRegion$1.prototype, "verticalInset", void 0);
|
|
5763
5775
|
__decorate$1([
|
|
5764
5776
|
attr({ attribute: "vertical-threshold" })
|
|
5765
|
-
], AnchoredRegion.prototype, "verticalThreshold", void 0);
|
|
5777
|
+
], AnchoredRegion$1.prototype, "verticalThreshold", void 0);
|
|
5766
5778
|
__decorate$1([
|
|
5767
5779
|
attr({ attribute: "vertical-scaling" })
|
|
5768
|
-
], AnchoredRegion.prototype, "verticalScaling", void 0);
|
|
5780
|
+
], AnchoredRegion$1.prototype, "verticalScaling", void 0);
|
|
5769
5781
|
__decorate$1([
|
|
5770
5782
|
attr({ attribute: "fixed-placement", mode: "boolean" })
|
|
5771
|
-
], AnchoredRegion.prototype, "fixedPlacement", void 0);
|
|
5783
|
+
], AnchoredRegion$1.prototype, "fixedPlacement", void 0);
|
|
5772
5784
|
__decorate$1([
|
|
5773
5785
|
attr({ attribute: "auto-update-mode" })
|
|
5774
|
-
], AnchoredRegion.prototype, "autoUpdateMode", void 0);
|
|
5786
|
+
], AnchoredRegion$1.prototype, "autoUpdateMode", void 0);
|
|
5775
5787
|
__decorate$1([
|
|
5776
5788
|
observable
|
|
5777
|
-
], AnchoredRegion.prototype, "anchorElement", void 0);
|
|
5789
|
+
], AnchoredRegion$1.prototype, "anchorElement", void 0);
|
|
5778
5790
|
__decorate$1([
|
|
5779
5791
|
observable
|
|
5780
|
-
], AnchoredRegion.prototype, "viewportElement", void 0);
|
|
5792
|
+
], AnchoredRegion$1.prototype, "viewportElement", void 0);
|
|
5781
5793
|
__decorate$1([
|
|
5782
5794
|
observable
|
|
5783
|
-
], AnchoredRegion.prototype, "initialLayoutComplete", void 0);
|
|
5795
|
+
], AnchoredRegion$1.prototype, "initialLayoutComplete", void 0);
|
|
5784
5796
|
|
|
5785
5797
|
/**
|
|
5786
5798
|
* The template for the {@link @microsoft/fast-foundation#(BreadcrumbItem:class)} component.
|
|
@@ -9429,7 +9441,7 @@
|
|
|
9429
9441
|
</div>
|
|
9430
9442
|
`)}
|
|
9431
9443
|
${when(x => x.expanded, html `
|
|
9432
|
-
<${context.tagFor(AnchoredRegion)}
|
|
9444
|
+
<${context.tagFor(AnchoredRegion$1)}
|
|
9433
9445
|
:anchorElement="${x => x}"
|
|
9434
9446
|
vertical-positioning-mode="dynamic"
|
|
9435
9447
|
vertical-default-position="bottom"
|
|
@@ -9443,7 +9455,7 @@
|
|
|
9443
9455
|
part="submenu-region"
|
|
9444
9456
|
>
|
|
9445
9457
|
<slot name="submenu"></slot>
|
|
9446
|
-
</${context.tagFor(AnchoredRegion)}>
|
|
9458
|
+
</${context.tagFor(AnchoredRegion$1)}>
|
|
9447
9459
|
`)}
|
|
9448
9460
|
</template>
|
|
9449
9461
|
`;
|
|
@@ -12188,6 +12200,36 @@
|
|
|
12188
12200
|
observable
|
|
12189
12201
|
], TreeView$1.prototype, "slottedTreeItems", void 0);
|
|
12190
12202
|
|
|
12203
|
+
const styles$o = css `
|
|
12204
|
+
:host {
|
|
12205
|
+
contain: layout;
|
|
12206
|
+
display: block;
|
|
12207
|
+
z-index: 1000;
|
|
12208
|
+
}
|
|
12209
|
+
`;
|
|
12210
|
+
|
|
12211
|
+
// When the anchor element changes position on the page, it is the client's responsibility to update the position
|
|
12212
|
+
// of the anchored region by calling update() on the anchored region.
|
|
12213
|
+
//
|
|
12214
|
+
// When the anchor element is recreated on the page, it is the client's responsibility to reset the reference the
|
|
12215
|
+
// anchored region has to the anchor element. This can be done by either recreating the anchor element with a new
|
|
12216
|
+
// ID that is also set as the \`anchor\` attribute on the anchored region or by explicitly setting the value of
|
|
12217
|
+
// anchorElement on the anchored region to the new anchor element.
|
|
12218
|
+
/**
|
|
12219
|
+
* A nimble-styled anchored region control.
|
|
12220
|
+
*/
|
|
12221
|
+
class AnchoredRegion extends AnchoredRegion$1 {
|
|
12222
|
+
}
|
|
12223
|
+
const nimbleAnchoredRegion = AnchoredRegion.compose({
|
|
12224
|
+
baseName: 'anchored-region',
|
|
12225
|
+
baseClass: AnchoredRegion$1,
|
|
12226
|
+
template: anchoredRegionTemplate,
|
|
12227
|
+
styles: styles$o
|
|
12228
|
+
});
|
|
12229
|
+
DesignSystem.getOrCreate()
|
|
12230
|
+
.withPrefix('nimble')
|
|
12231
|
+
.register(nimbleAnchoredRegion());
|
|
12232
|
+
|
|
12191
12233
|
/**
|
|
12192
12234
|
* Do not edit directly
|
|
12193
12235
|
* Generated on Tue, 01 Mar 2022 15:26:47 GMT
|
|
@@ -13869,18 +13911,12 @@
|
|
|
13869
13911
|
constructor() {
|
|
13870
13912
|
super(...arguments);
|
|
13871
13913
|
/**
|
|
13872
|
-
* The appearance the button should have.
|
|
13873
|
-
*
|
|
13874
13914
|
* @public
|
|
13875
13915
|
* @remarks
|
|
13876
13916
|
* HTML Attribute: appearance
|
|
13877
13917
|
*/
|
|
13878
13918
|
this.appearance = ButtonAppearance.Outline;
|
|
13879
13919
|
/**
|
|
13880
|
-
* Specify as 'true' to hide the text content of the button. The button will
|
|
13881
|
-
* become square, and the text content will be used as the label of the button
|
|
13882
|
-
* for accessibility purposes.
|
|
13883
|
-
*
|
|
13884
13920
|
* @public
|
|
13885
13921
|
* @remarks
|
|
13886
13922
|
* HTML Attribute: content-hidden
|
|
@@ -18560,18 +18596,12 @@
|
|
|
18560
18596
|
constructor() {
|
|
18561
18597
|
super(...arguments);
|
|
18562
18598
|
/**
|
|
18563
|
-
* The appearance the button should have.
|
|
18564
|
-
*
|
|
18565
18599
|
* @public
|
|
18566
18600
|
* @remarks
|
|
18567
18601
|
* HTML Attribute: appearance
|
|
18568
18602
|
*/
|
|
18569
18603
|
this.appearance = ButtonAppearance.Outline;
|
|
18570
18604
|
/**
|
|
18571
|
-
* Specify as 'true' to hide the text content of the button. The button will
|
|
18572
|
-
* become square, and the text content will be used as the label of the button
|
|
18573
|
-
* for accessibility purposes.
|
|
18574
|
-
*
|
|
18575
18605
|
* @public
|
|
18576
18606
|
* @remarks
|
|
18577
18607
|
* HTML Attribute: content-hidden
|