@fluentui/web-components 2.5.12 → 2.5.13
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/CHANGELOG.json +46 -1
- package/CHANGELOG.md +11 -2
- package/dist/dts/anchor/index.d.ts +1 -1
- package/dist/esm/anchor/index.js +3 -2
- package/dist/web-components.d.ts +1 -1
- package/dist/web-components.js +27 -6
- package/dist/web-components.min.js +4 -4
- package/docs/api-report.md +1 -1
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,52 @@
|
|
|
2
2
|
"name": "@fluentui/web-components",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 11 Apr 2023 07:42:59 GMT",
|
|
6
|
+
"tag": "@fluentui/web-components_v2.5.13",
|
|
7
|
+
"version": "2.5.13",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "chhol@microsoft.com",
|
|
12
|
+
"package": "@fluentui/web-components",
|
|
13
|
+
"commit": "d641ed3418a70dbcfcc29ca56acb4f2711551044",
|
|
14
|
+
"comment": "update fast foundation packages to import bug fixes"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Fri, 03 Mar 2023 07:47:17 GMT",
|
|
21
|
+
"tag": "@fluentui/web-components_v2.5.12",
|
|
22
|
+
"version": "2.5.12",
|
|
23
|
+
"comments": {
|
|
24
|
+
"none": [
|
|
25
|
+
{
|
|
26
|
+
"author": "martinhochel@microsoft.com",
|
|
27
|
+
"package": "@fluentui/web-components",
|
|
28
|
+
"commit": "677a67b551966986db34a6fac608cb89ee150471",
|
|
29
|
+
"comment": "style: apply prettier 2.3-2.8 formatting on whole codebase"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Mon, 13 Feb 2023 07:37:39 GMT",
|
|
36
|
+
"tag": "@fluentui/web-components_v2.5.12",
|
|
37
|
+
"version": "2.5.12",
|
|
38
|
+
"comments": {
|
|
39
|
+
"none": [
|
|
40
|
+
{
|
|
41
|
+
"author": "martinhochel@microsoft.com",
|
|
42
|
+
"package": "@fluentui/web-components",
|
|
43
|
+
"commit": "cbba19f7ed8a619b5fa856575fde872e79be99b9",
|
|
44
|
+
"comment": "style: fix formatting in files that were silently passed previously"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Thu, 26 Jan 2023 07:35:32 GMT",
|
|
6
51
|
"tag": "@fluentui/web-components_v2.5.12",
|
|
7
52
|
"version": "2.5.12",
|
|
8
53
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui/web-components
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 11 Apr 2023 07:42:59 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [2.5.13](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v2.5.13)
|
|
8
|
+
|
|
9
|
+
Tue, 11 Apr 2023 07:42:59 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v2.5.12..@fluentui/web-components_v2.5.13)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- update fast foundation packages to import bug fixes ([PR #27506](https://github.com/microsoft/fluentui/pull/27506) by chhol@microsoft.com)
|
|
15
|
+
|
|
7
16
|
## [2.5.12](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v2.5.12)
|
|
8
17
|
|
|
9
|
-
Thu, 26 Jan 2023 07:
|
|
18
|
+
Thu, 26 Jan 2023 07:35:32 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v2.5.11..@fluentui/web-components_v2.5.12)
|
|
11
20
|
|
|
12
21
|
### Patches
|
|
@@ -17,7 +17,7 @@ export declare class Anchor extends FoundationAnchor {
|
|
|
17
17
|
* @remarks
|
|
18
18
|
* HTML Attribute: appearance
|
|
19
19
|
*/
|
|
20
|
-
appearance
|
|
20
|
+
appearance?: AnchorAppearance;
|
|
21
21
|
appearanceChanged(oldValue: AnchorAppearance, newValue: AnchorAppearance): void;
|
|
22
22
|
/**
|
|
23
23
|
* @internal
|
package/dist/esm/anchor/index.js
CHANGED
|
@@ -28,12 +28,13 @@ export class Anchor extends FoundationAnchor {
|
|
|
28
28
|
* @internal
|
|
29
29
|
*/
|
|
30
30
|
defaultSlottedContentChanged() {
|
|
31
|
+
var _a, _b;
|
|
31
32
|
const slottedElements = this.defaultSlottedContent.filter(x => x.nodeType === Node.ELEMENT_NODE);
|
|
32
33
|
if (slottedElements.length === 1 && slottedElements[0] instanceof SVGElement) {
|
|
33
|
-
this.control.classList.add('icon-only');
|
|
34
|
+
(_a = this.control) === null || _a === void 0 ? void 0 : _a.classList.add('icon-only');
|
|
34
35
|
}
|
|
35
36
|
else {
|
|
36
|
-
this.control.classList.remove('icon-only');
|
|
37
|
+
(_b = this.control) === null || _b === void 0 ? void 0 : _b.classList.remove('icon-only');
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
}
|
package/dist/web-components.d.ts
CHANGED
|
@@ -259,7 +259,7 @@ export declare class Anchor extends Anchor_2 {
|
|
|
259
259
|
* @remarks
|
|
260
260
|
* HTML Attribute: appearance
|
|
261
261
|
*/
|
|
262
|
-
appearance
|
|
262
|
+
appearance?: AnchorAppearance;
|
|
263
263
|
appearanceChanged(oldValue: AnchorAppearance, newValue: AnchorAppearance): void;
|
|
264
264
|
/**
|
|
265
265
|
* @internal
|
package/dist/web-components.js
CHANGED
|
@@ -5551,7 +5551,8 @@ class Anchor$1 extends FoundationElement {
|
|
|
5551
5551
|
// Check to see if delegatesFocus is supported
|
|
5552
5552
|
if (window.ShadowRoot && !window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") && ((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
|
|
5553
5553
|
this.focus = () => {
|
|
5554
|
-
|
|
5554
|
+
var _a;
|
|
5555
|
+
(_a = this.control) === null || _a === void 0 ? void 0 : _a.focus();
|
|
5555
5556
|
};
|
|
5556
5557
|
}
|
|
5557
5558
|
};
|
|
@@ -7388,8 +7389,11 @@ class DateFormatter {
|
|
|
7388
7389
|
year: this.yearFormat
|
|
7389
7390
|
}, locale = this.locale) {
|
|
7390
7391
|
const dateObj = this.getDateObject(date);
|
|
7392
|
+
if (!dateObj.getTime()) {
|
|
7393
|
+
return "";
|
|
7394
|
+
}
|
|
7391
7395
|
const optionsWithTimeZone = Object.assign({
|
|
7392
|
-
timeZone:
|
|
7396
|
+
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
7393
7397
|
}, format);
|
|
7394
7398
|
return new Intl.DateTimeFormat(locale, optionsWithTimeZone).format(dateObj);
|
|
7395
7399
|
}
|
|
@@ -13928,6 +13932,20 @@ class HorizontalScroll$1 extends FoundationElement {
|
|
|
13928
13932
|
this.scrollStops = stops;
|
|
13929
13933
|
this.setFlippers();
|
|
13930
13934
|
}
|
|
13935
|
+
/**
|
|
13936
|
+
* Checks to see if the stops are returning values
|
|
13937
|
+
* otherwise it will try to reinitialize them
|
|
13938
|
+
*
|
|
13939
|
+
* @returns boolean indicating that current scrollStops are valid non-zero values
|
|
13940
|
+
* @internal
|
|
13941
|
+
*/
|
|
13942
|
+
validateStops(reinit = true) {
|
|
13943
|
+
const hasStops = () => !!this.scrollStops.find(stop => stop > 0);
|
|
13944
|
+
if (!hasStops() && reinit) {
|
|
13945
|
+
this.setStops();
|
|
13946
|
+
}
|
|
13947
|
+
return hasStops();
|
|
13948
|
+
}
|
|
13931
13949
|
/**
|
|
13932
13950
|
*
|
|
13933
13951
|
*/
|
|
@@ -13949,7 +13967,7 @@ class HorizontalScroll$1 extends FoundationElement {
|
|
|
13949
13967
|
(_a = this.previousFlipperContainer) === null || _a === void 0 ? void 0 : _a.classList.toggle("disabled", position === 0);
|
|
13950
13968
|
if (this.scrollStops) {
|
|
13951
13969
|
const lastStop = Math.abs(this.scrollStops[this.scrollStops.length - 1]);
|
|
13952
|
-
(_b = this.nextFlipperContainer) === null || _b === void 0 ? void 0 : _b.classList.toggle("disabled", Math.abs(position) + this.width >= lastStop);
|
|
13970
|
+
(_b = this.nextFlipperContainer) === null || _b === void 0 ? void 0 : _b.classList.toggle("disabled", this.validateStops(false) && Math.abs(position) + this.width >= lastStop);
|
|
13953
13971
|
}
|
|
13954
13972
|
}
|
|
13955
13973
|
/**
|
|
@@ -14012,6 +14030,7 @@ class HorizontalScroll$1 extends FoundationElement {
|
|
|
14012
14030
|
* @public
|
|
14013
14031
|
*/
|
|
14014
14032
|
scrollToPrevious() {
|
|
14033
|
+
this.validateStops();
|
|
14015
14034
|
const scrollPosition = this.scrollContainer.scrollLeft;
|
|
14016
14035
|
const current = this.scrollStops.findIndex((stop, index) => stop >= scrollPosition && (this.isRtl || index === this.scrollStops.length - 1 || this.scrollStops[index + 1] > scrollPosition));
|
|
14017
14036
|
const right = Math.abs(this.scrollStops[current + 1]);
|
|
@@ -14026,6 +14045,7 @@ class HorizontalScroll$1 extends FoundationElement {
|
|
|
14026
14045
|
* @public
|
|
14027
14046
|
*/
|
|
14028
14047
|
scrollToNext() {
|
|
14048
|
+
this.validateStops();
|
|
14029
14049
|
const scrollPosition = this.scrollContainer.scrollLeft;
|
|
14030
14050
|
const current = this.scrollStops.findIndex(stop => Math.abs(stop) >= Math.abs(scrollPosition));
|
|
14031
14051
|
const outOfView = this.scrollStops.findIndex(stop => Math.abs(scrollPosition) + this.width <= Math.abs(stop));
|
|
@@ -15532,7 +15552,7 @@ __decorate$1([attr({
|
|
|
15532
15552
|
* The template for the {@link @microsoft/fast-foundation#(Tabs:class)} component.
|
|
15533
15553
|
* @public
|
|
15534
15554
|
*/
|
|
15535
|
-
const tabsTemplate = (context, definition) => html`<template class="${x => x.orientation}">${startSlotTemplate(context, definition)}<div class="tablist" part="tablist" role="tablist"><slot class="tab" name="tab" part="tab" ${slotted("tabs")}></slot>${when(x => x.showActiveIndicator, html`<div ${ref("activeIndicatorRef")} class="activeIndicator" part="activeIndicator"></div>`)}</div>${endSlotTemplate(context, definition)}<div class="tabpanel"
|
|
15555
|
+
const tabsTemplate = (context, definition) => html`<template class="${x => x.orientation}">${startSlotTemplate(context, definition)}<div class="tablist" part="tablist" role="tablist"><slot class="tab" name="tab" part="tab" ${slotted("tabs")}></slot>${when(x => x.showActiveIndicator, html`<div ${ref("activeIndicatorRef")} class="activeIndicator" part="activeIndicator"></div>`)}</div>${endSlotTemplate(context, definition)}<div class="tabpanel" part="tabpanel"><slot name="tabpanel" ${slotted("tabpanels")}></slot></div></template>`;
|
|
15536
15556
|
|
|
15537
15557
|
/**
|
|
15538
15558
|
* The orientation of the {@link @microsoft/fast-foundation#(Tabs:class)} component
|
|
@@ -19999,11 +20019,12 @@ class Anchor extends Anchor$1 {
|
|
|
19999
20019
|
* @internal
|
|
20000
20020
|
*/
|
|
20001
20021
|
defaultSlottedContentChanged() {
|
|
20022
|
+
var _a, _b;
|
|
20002
20023
|
const slottedElements = this.defaultSlottedContent.filter(x => x.nodeType === Node.ELEMENT_NODE);
|
|
20003
20024
|
if (slottedElements.length === 1 && slottedElements[0] instanceof SVGElement) {
|
|
20004
|
-
this.control.classList.add('icon-only');
|
|
20025
|
+
(_a = this.control) === null || _a === void 0 ? void 0 : _a.classList.add('icon-only');
|
|
20005
20026
|
} else {
|
|
20006
|
-
this.control.classList.remove('icon-only');
|
|
20027
|
+
(_b = this.control) === null || _b === void 0 ? void 0 : _b.classList.remove('icon-only');
|
|
20007
20028
|
}
|
|
20008
20029
|
}
|
|
20009
20030
|
}
|